[gdb] Fix -Wstrict-null-sentinel warning (--with-iconv-bin)
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
8ddd8e0e
SM
12020-02-11 Simon Marchi <simon.marchi@efficios.com>
2
3 * configure: Re-generate.
4
898e7f60
SM
52020-02-11 Simon Marchi <simon.marchi@efficios.com>
6
7 * configure: Re-generate.
8
58df732b
SM
92020-02-11 Simon Marchi <simon.marchi@efficios.com>
10
11 * acinclude.m4: Update warning.m4 path.
12
7928d571
HD
132020-02-09 Hannes Domani <ssbssa@yahoo.de>
14
15 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
16 (handle_exception): Set siginfo_er.
17 (win32_xfer_siginfo): New function.
18
919adfe8
TT
192020-02-07 Tom Tromey <tom@tromey.com>
20 Pedro Alves <palves@redhat.com>
21
22 * README: Update build documentation.
23 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
24 host, not target.
25 * configure.ac: Update paths.
26 * configure: Rebuild.
27 * acinclude.m4: Update paths.
28 * Makefile.in: Update include paths.
29 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
30 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
31 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
32 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
33 (%-generated.c): Update paths.
34 * Move entire directory from ../gdb/gdbserver.
35
287c844a
MR
362020-01-29 Maciej W. Rozycki <macro@wdc.com>
37
38 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
39
548a204f
PFC
402020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
41
42 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
43 assignment instead of srv_linux_obj.
44
a2236a08
HD
452020-01-28 Hannes Domani <ssbssa@yahoo.de>
46
47 * server.c (handle_qxfer_libraries): Write segment-address with
48 paddress.
49
bdaed379
HD
502020-01-24 Hannes Domani <ssbssa@yahoo.de>
51
52 * Makefile.in (install-strip): New target.
53 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
54 * aclocal.m4: Regenerate.
55 * configure: Regenerate.
56 * configure.ac: Add AM_PROG_INSTALL_STRIP.
57
42cd72aa
MR
582020-01-24 Maciej W. Rozycki <macro@wdc.com>
59
60 * Makefile.in (SFILES): Adjust paths to point to real files.
61 (OBS): Move waitstatus.o to target/waitstatus.o.
62 (TAGS): Transform paths appropriately.
63 (%.o): Rename to...
64 (nat/%.o): ... this pattern rule.
65 (%.o): Rename to...
66 (target/%.o): ... this pattern rule.
67 * configure.srv: Adjust paths throughout to include nat/ prefix
68 with the revant files.
69 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
70 * configure: Regenerate.
71
42ba50ec
MR
722020-01-24 Maciej W. Rozycki <macro@wdc.com>
73
74 * Makefile.in (TAGS): Remove config files from the recipe.
75
05ea2a05
TT
762020-01-14 Tom Tromey <tom@tromey.com>
77
78 * configure: Rebuild.
79 * configure.ac: Remove any checks that were added to common.m4.
80 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
81 lib-link.m4.
82
01027315
TT
832020-01-14 Tom Tromey <tom@tromey.com>
84
85 * server.h: Include config.h.
86 * gdbreplay.c: Include config.h.
87 * configure: Rebuild.
88 * configure.ac: Don't source common.host.
89 * acinclude.m4: Update path.
90 * Makefile.in (INCSUPPORT): New variable.
91 (INCLUDE_CFLAGS): Add INCSUPPORT.
92 (SFILES): Update paths.
93 (version-generated.c): Update path to create-version.sh.
94 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
95
b2ceabe8
TT
962020-01-14 Tom Tromey <tom@tromey.com>
97
98 * configure.ac (LIBS): Use WIN32APILIBS.
99 (USE_WIN32API): Don't define.
100 * configure: Rebuild.
101
25c51f71
TT
1022020-01-14 Tom Tromey <tom@tromey.com>
103
104 * configure: Rebuild.
105
c0bd321d
SM
1062020-01-13 Simon Marchi <simon.marchi@efficios.com>
107
108 * Makefile.in (%-generated.c): Remove rule for files from
109 regformats/i386.
110
bb564c58
SM
1112020-01-13 Simon Marchi <simon.marchi@efficios.com>
112
113 * configure: Re-generate.
114
6e37c371
SM
1152020-01-13 Simon Marchi <simon.marchi@efficios.com>
116
117 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
118 Define to static.
119 * tracepoint.c (stop_tracing, flush_trace_buffer,
120 about_to_request_buffer_space, get_trace_state_variable_value,
121 set_trace_state_variable_value, gdb_collect): Add declaration.
122
df4a0200
SM
1232020-01-13 Simon Marchi <simon.marchi@efficios.com>
124
125 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
126 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
127 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
128 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
129 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
130 static.
131
89e94ec9
SM
1322020-01-13 Simon Marchi <simon.marchi@efficios.com>
133
134 * inferiors.c: Include gdbsupport/common-inferior.h.
135
2552728a
SM
1362020-01-13 Simon Marchi <simon.marchi@efficios.com>
137
138 * hostio-errno.c: Include hostio.h.
139
4025fa09
SM
1402020-01-13 Simon Marchi <simon.marchi@efficios.com>
141
142 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
143 prerequisite.
144
c0b0a142
SM
1452020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
146
147 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
148 * linux-arm-tdesc.h: Include arch/arm.h.
149
bb1183e2
SM
1502020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
151
152 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
153
f5df0b5f
SM
1542020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
155
156 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
157 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
158
5b6d1e4f
PA
1592020-01-10 Pedro Alves <palves@redhat.com>
160
161 * fork-child.c (post_fork_inferior): Pass target down to
162 startup_inferior.
163 * inferiors.c (switch_to_thread): Add process_stratum_target
164 parameter.
165 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
166 * nto-low.c (nto_target_ops): Now a process_stratum_target.
167 * linux-low.c (linux_target_ops): Now a process_stratum_target.
168 * remote-utils.c (prepare_resume_reply): Pass the target to
169 switch_to_thread.
170 * target.c (the_target): Now a process_stratum_target.
171 (done_accessing_memory): Pass the target to switch_to_thread.
172 (set_target_ops): Ajust to use process_stratum_target.
173 * target.h (struct target_ops): Rename to ...
174 (struct process_stratum_target): ... this.
175 (the_target, set_target_ops): Adjust.
176 (prepare_to_access_memory): Adjust comment.
177 * win32-low.c (child_xfer_memory): Adjust to use
178 process_stratum_target.
179 (win32_target_ops): Now a process_stratum_target.
180
559e7e50
EZ
1812020-01-06 Eli Zaretskii <eliz@gnu.org>
182 Pedro Alves <palves@redhat.com>
183
184 * win32-low.c (get_child_debug_event): Extract the fatal exception
185 from the exit status and convert to the equivalent Posix signal
186 number.
187 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
188 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
189
48189bec
HD
1902020-01-01 Hannes Domani <ssbssa@yahoo.de>
191
192 * Makefile.in: Use INSTALL_PROGRAM_ENV.
193
5dd8bf88
JB
1942020-01-01 Joel Brobecker <brobecker@adacore.com>
195
196 * server.c (gdbserver_version): Change copyright year to 2020.
197 * gdbreplay.c (gdbreplay_version): Likewise.
198
0ad6b8ee
CB
1992019-12-19 Christian Biesinger <cbiesinger@google.com>
200
201 * configure: Regenerate.
202 * configure.ac: Quote variable arguments of test.
203
1ee7b812
BE
2042019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
205
206 * Makefile.in: Fix build with GNU Make 3.81
207
d9fa87f4
TT
2082019-12-16 Tom Tromey <tromey@adacore.com>
209
210 * server.c (get_exec_file): Constify result.
211
ab7d13f0
CB
2122019-12-10 Christian Biesinger <cbiesinger@google.com>
213
214 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
215 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
216 * config.in: Regenerate.
217 * configure: Regenerate.
218 * configure.ac: Don't check for strerror.
219 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
220 Call safe_strerror instead of strerror.
221 * server.h (strerror): Remove this now-unnecessary declaration.
222 * tracepoint.c (init_named_socket): Call safe_strerror instead of
223 strerror.
224 (gdb_agent_helper_thread): Likewise.
225 * utils.c (perror_with_name): Likewise.
226
4da8c3a8
TT
2272019-11-26 Tom Tromey <tom@tromey.com>
228
229 * configure, config.in: Rebuild.
230
21987b9c
TT
2312019-11-26 Tom Tromey <tom@tromey.com>
232
233 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
234 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
235 gdb_sigmask.
236 * configure, config.in: Rebuild.
237
5e030278
TT
2382019-11-26 Tom Tromey <tom@tromey.com>
239
240 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
241 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
242 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
243 * acinclude.m4: Include ax_pthread.m4.
244 * config.in, configure: Rebuild.
245
6d91ce9a
CB
2462019-11-26 Christian Biesinger <cbiesinger@google.com>
247
248 * debug.c (debug_set_output): Call safe_strerror instead of
249 strerror.
250 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
251 (linux_kill_one_lwp): Likewise.
252 (linux_detach_one_lwp): Likewise.
253 (linux_wait_for_event_filtered): Likewise.
254 (store_register): Likewise.
255 * lynx-low.c (lynx_attach): Likewise.
256 * mem-break.c (insert_memory_breakpoint): Likewise.
257 (remove_memory_breakpoint): Likewise.
258 (delete_fast_tracepoint_jump): Likewise.
259 (set_fast_tracepoint_jump): Likewise.
260 (uninsert_fast_tracepoint_jumps_at): Likewise.
261 (reinsert_fast_tracepoint_jumps_at): Likewise.
262 * nto-low.c (nto_xfer_memory): Likewise.
263 (nto_resume): Likewise.
264
6cdd651f
LM
2652019-11-20 Luis Machado <luis.machado@linaro.org>
266
267 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
268 instead of register count.
269 * tdesc.c (tdesc_contains_feature): New function.
270 * tdesc.h (tdesc_contains_feature): New prototype.
271
cd850b40
CB
2722019-11-15 Christian Biesinger <cbiesinger@google.com>
273
274 * Makefile.in: Add safe-strerror.c.
275 * configure: Regenerate.
276 * configure.ac: Don't source common.host.
277
5abebf3c
CB
2782019-11-15 Christian Biesinger <cbiesinger@google.com>
279
280 * config.in: Regenerate.
281 * configure: Regenerate.
282
e06f3d6e
AB
2832019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
284
285 * ax.c (ax_printf): Handle size_t_arg.
286
ca3a04f6
CB
2872019-11-06 Christian Biesinger <cbiesinger@google.com>
288
289 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
290 * mi/mi-main.c (output_cores): Likewise.
291 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
292 (linux_xfer_osdata_modules): Likewise.
293 * remote.c (register_remote_support_xml): Likewise.
294 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
295 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
296
e48f6033
CB
2972019-11-01 Christian Biesinger <cbiesinger@google.com>
298
299 * configure: Regenerate.
300 * configure.ac: Remove check for strerror_r.
301
e7e97a2e
CB
3022019-10-31 Christian Biesinger <cbiesinger@google.com>
303
304 * config.in: Regenerate.
305 * configure: Regenerate.
306 * configure.ac: Also check for strerror_r.
307
75cafaa6
CB
3082019-10-31 Christian Biesinger <cbiesinger@google.com>
309
310 * ax.h (debug_agent): Remove duplicate declaration.
311
30baf67b
TV
3122019-10-26 Tom de Vries <tdevries@suse.de>
313
314 * linux-aarch64-low.c: Fix typos in comments.
315 * linux-arm-low.c: Same.
316 * linux-low.c: Same.
317 * linux-ppc-low.c: Same.
318 * proc-service.c: Same.
319 * regcache.h: Same.
320 * server.c: Same.
321 * tracepoint.c: Same.
322 * win32-low.c: Same.
323
52c64cf7
TT
3242019-10-25 Tom Tromey <tromey@adacore.com>
325
326 * utils.c (xstrdup): Remove.
327
c12d372d
TT
3282019-10-23 Tom Tromey <tom@tromey.com>
329
330 * configure, config.in: Rebuild.
331
4d0b984b
TT
3322019-10-23 Tom Tromey <tom@tromey.com>
333
334 * configure: Rebuild.
335 * acinclude.m4: Use m4_include, not sinclude.
336
c5adaa19
TT
3372019-10-17 Tom Tromey <tromey@adacore.com>
338
339 * configure: Rebuild.
340 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
341 in AC_CONFIG_FILES invocation.
342 * Makefile.in (stamp-h, Makefile): Use new-style config.status
343 invocation.
344
fec4e896
CB
3452019-10-16 Christian Biesinger <cbiesinger@google.com>
346
347 * server.c: Include xml-builtin.h.
348 (get_xml_features): Don't declare xml_builtins here.
349
00975ff6
AB
3502019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
351
352 * Makefile.in: Remove references to vec-ipa.o.
353
0dc32745
AB
3542019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
355
356 * Makefile.in: Remove references to vec.c.
357
3e6ec53a
CB
3582019-10-02 Christian Biesinger <cbiesinger@google.com>
359
360 * server.c (server_waiting): Change to bool.
361 (extended_protocol): Likewise.
362 (response_needed): Likewise.
363 (exit_requested): Likewise.
364 (run_once): Likewise.
365 (report_no_resumed): Likewise.
366 (non_stop): Likewise.
367 (disable_packet_vCont): Likewise.
368 (disable_packet_Tthread): Likewise.
369 (disable_packet_qC): Likewise.
370 (disable_packet_qfThreadInfo): Likewise.
371 (handle_general_set): Update.
372 (handle_detach): Update.
373 (handle_monitor_command): Update.
374 (handle_query): Update.
375 (captured_main): Update.
376 (process_serial_event): Update.
377 * server.h (server_waiting): Change to bool.
378 (disable_packet_vCont): Likewise.
379 (disable_packet_Tthread): Likewise.
380 (disable_packet_qC): Likewise.
381 (disable_packet_qfThreadInfo): Likewise.
382 (run_once): Likewise.
383 (non_stop): Likewise.
384 * target.c (target_stop_and_wait): Update.
385
80fd2826
TT
3862019-10-02 Tom Tromey <tromey@adacore.com>
387
388 * Makefile.in (SFILES): Add common-inferior.c.
389 (OBS): Add common-inferior.o.
390 * server.c (startup_with_shell): Don't define.
391
46f29a9a
AB
3922019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
393
394 * linux-low.c (linux_low_read_btrace): Update for change to
395 std::vector.
396
f9d949fb
CB
3972019-09-20 Christian Biesinger <cbiesinger@google.com>
398
399 * debug.c (debug_threads): Remove comment in favor of the header.
400 * debug.h (using_threads): Add declaration.
401 (debug_threads): Add comment.
402 * linux-aarch64-low.c: Include debug.h and remove declaration of
403 debug_threads.
404 * nto-low.c: Likewise.
405 * remote-utils.c: Likewise.
406 * thread-db.c: Likewise.
407
abf516c6
UW
4082019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
409
410 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
411 and powerpc-cell64l-ipa.o.
412 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
413 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
414 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
415 (spu*-*-*): Remove.
416
417 * spu-low.c: Remove file.
418
419 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
420 (parse_spufs_run): Remove.
421 (ppc_get_pc): Remove Cell/B.E. support.
422 (ppc_set_pc): Likewise.
423 (ppc_breakpoint_at): Likewise.
424 (ppc_arch_setup): Likewise.
425 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
426 tdesc_powerpc_cell32l.
427 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
428 or init_registers_powerpc_cell32l.
429 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
430 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
431 or init_registers_powerpc_cell32l.
432 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
433 (init_registers_powerpc_cell32l): Remove prototype.
434 (init_registers_powerpc_cell64l): Likewise.
435
436 * target.h (struct target_ops): Remove qxfer_spu member.
437 * server.c (handle_qxfer_spu): Remove.
438 (qxfer_packets): Remove entry for "spu".
439 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
440 * linux-low.c (SPUFS_MAGIC): Remove.
441 (spu_enumerate_spu_ids): Remove.
442 (linux_qxfer_spu): Remove.
443 (linux_target_ops): Remove qxfer_spu member.
444 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
445 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
446 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
447
2d41fa11
SDJ
4482019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
449
450 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
451 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
452 * config.in: Regenerate.
453 * configure: Regenerate.
454
d59b55f0
TT
4552019-08-15 Tom Tromey <tromey@adacore.com>
456
457 * target.c (target_write_memory): Use gdb::byte_vector.
458
4196ab2a
TT
4592019-08-15 Tom Tromey <tromey@adacore.com>
460
461 * tracepoint.c (write_inferior_data_pointer)
462 (write_inferior_integer, write_inferior_int8)
463 (write_inferior_uinteger, m_tracepoint_action_download)
464 (r_tracepoint_action_download, x_tracepoint_action_download)
465 (l_tracepoint_action_download, clear_inferior_trace_buffer)
466 (download_agent_expr, download_tracepoint_1)
467 (download_trace_state_variables, upload_fast_traceframes): Update.
468 * server.c (gdb_write_memory): Update.
469 * remote-utils.c (relocate_instruction): Update.
470 * proc-service.c (ps_pdwrite): Update.
471 * mem-break.c (remove_memory_breakpoint)
472 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
473 (uninsert_fast_tracepoint_jumps_at)
474 (reinsert_fast_tracepoint_jumps_at): Update.
475 * linux-x86-low.c (append_insns)
476 (i386_install_fast_tracepoint_jump_pad)
477 (amd64_write_goto_address, i386_write_goto_address): Update.
478 * linux-s390-low.c (append_insns, s390_write_goto_address):
479 Update.
480 * linux-ppc-low.c (ppc_relocate_instruction)
481 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
482 (ppc_write_goto_address): Update.
483 * linux-aarch64-low.c (append_insns): Update.
484 * target.h (struct target_ops): Update.
485 (write_inferior_memory): Don't declare.
486 * target.c (target_write_memory): Rename from
487 write_inferior_memory. Remove old target_write_memory.
488
c6778d00
TT
4892019-08-15 Tom Tromey <tromey@adacore.com>
490
491 * target.c (write_inferior_memory): Use std::vector.
492
404f2902
FCE
4932019-08-06 Frank Ch. Eigler <fche@redhat.com>
494
495 PR build/24886
496 * configure.ac: Drop enable-libmcheck support.
497 * configure, config.in: Rebuild.
498 * acinclude.m4: Don't include it.
499
4c5aa8e0
AH
5002019-07-19 Alan Hayward <alan.hayward@arm.com>
501
502 * configure.srv: Remove Arm xml files.
503
7cc17433
AH
5042019-07-19 Alan Hayward <alan.hayward@arm.com>
505
506 * configure.srv: Add new files. Remove xml generated files.
507 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
508 registers.
509 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
510 * linux-aarch32-tdesc.c: New file.
511 * linux-aarch32-tdesc.h: New file.
512 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
513 * linux-arm-low.c (init_registers_arm, tdesc_arm)
514 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
515 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
516 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
517 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
518 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
519 (arm_read_description): Call arm_linux_read_description.
520 (initialize_low_arch): Don't init registers.
521 * linux-arm-tdesc.c: New file.
522 * linux-arm-tdesc.h: New file.
523
166a82be
AH
5242019-07-10 Alan Hayward <alan.hayward@arm.com>
525
526 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
527 Move counter inside for.
528 (arm_read_description): Check ptrace earlier.
529 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
530
268a13a5
TT
5312019-07-09 Tom Tromey <tom@tromey.com>
532
533 * configure: Rebuild.
534 * configure.ac: Change common to gdbsupport.
535 * acinclude.m4: Change common to gdbsupport.
536 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
537 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
538 common to gdbsupport.
539 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
540 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
541 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
542 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
543 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
544 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
545 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
546 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
547 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
548 common to gdbsupport.
549
350fab54
AH
5502019-07-04 Alan Hayward <alan.hayward@arm.com>
551
552 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
553 defines.
554 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
555
2b40fda7
AH
5562019-07-04 Alan Hayward <alan.hayward@arm.com>
557
558 * configure.srv: Remove legacy xml.
559 * linux-aarch64-low.c (initialize_low_arch): Remove
560 initialize_low_tdesc call.
561 * linux-aarch64-tdesc-selftest.c: Remove file.
562 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
563 * linux-x86-low.c (initialize_low_arch): Remove
564 initialize_low_tdesc call.
565 * linux-x86-tdesc-selftest.c: Remove file.
566 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
567
7d10623d
TV
5682019-06-20 Tom de Vries <tdevries@suse.de>
569
570 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
571 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
572
8d6a48df
TV
5732019-06-19 Tom de Vries <tdevries@suse.de>
574
575 * debug.h (debug_write): Change return type to ssize_t.
576 * debug.c (debug_write): Same.
577
73cc7272
TT
5782019-06-14 Tom Tromey <tom@tromey.com>
579
580 * configure.ac: Use new path to gnulib.
581 * configure: Rebuild.
582 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
583 to gnulib.
584
08f10e02
TT
5852019-06-11 Tom Tromey <tom@tromey.com>
586
587 * Makefile.in (SFILES): Add alloc.c.
588 (OBS): Add alloc.o.
589 (IPA_OBJS): Add alloc-ipa.o.
590 (alloc-ipa.o): New target.
591 (%.o: ../%.c): New pattern rule.
592
422186a9
TT
5932019-06-10 Tom Tromey <tromey@adacore.com>
594
595 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
596 end warning with a newline.
597 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
598 newline.
599 * thread-db.c (attach_thread): Don't end warning with a newline.
600 (thread_db_notice_clone): Likewise.
601 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
602 newline.
603 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
604 end warning with a newline.
605
b02f78f9
PA
6062019-06-04 Pedro Alves <palves@redhat.com>
607
608 * server.c (captured_main): Use make_unique_xstrdup.
609
88ed7edb
TT
6102019-06-02 Tom Tromey <tom@tromey.com>
611
612 * gdbreplay.c (fromhex): Remove.
613 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
614
33a6bc35
TT
6152019-05-29 Tom Tromey <tromey@adacore.com>
616
617 * configure: Rebuild.
618
e90a813d
KB
6192019-05-06 Kevin Buettner <kevinb@redhat.com>
620
621 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
622 sign extension code on 32-bit builds.
623
353ea2d1
EZ
6242019-05-03 Eli Zaretskii <eliz@gnu.org>
625
626 * remote-utils.c:
627 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
628
b494cdff
TT
6292019-04-19 Tom Tromey <tom@tromey.com>
630
631 * server.c (struct vstop_notif): Derive from notif_event.
632 <base>: Remove.
633 (queue_stop_reply): Update.
634 (remove_all_on_match_ptid): Change type. Rewrite.
635 (discard_queued_stop_replies): Rewrite.
636 (in_queued_stop_replies_ptid): Change type.
637 (in_queued_stop_replies): Rewrite.
638 (notif_stop): Update.
639 (queue_stop_reply_callback): Update.
640 (captured_main): Don't call initialize_notif.
641 (push_stop_notification): Update.
642 * notif.c (notif_write_event, handle_notif_ack)
643 (notif_event_enque, notif_push): Update.
644 (notif_event_xfree, initialize_notif): Remove.
645 * notif.h (struct notif_event): Include <list>, not
646 "common/queue.h".
647 (struct notif_server) <queue>: Now a std::list.
648 (notif_event_p): Remove typedef.
649 (initialize_notif): Don't declare.
650 (struct notif_event): Add virtual destructor.
651
a7e559cc
AH
6522019-04-17 Alan Hayward <alan.hayward@arm.com>
653
654 * ax.c (ax_vdebug): Call debug_printf.
655 * debug.c (debug_write): New function.
656 * debug.h (debug_write): New declaration.
657 * linux-low.c (sigchld_handler): Call debug_write.
658
aeb2e706
AH
6592019-04-17 Alan Hayward <alan.hayward@arm.com>
660
661 * debug.c (debug_set_output): New function.
662 (debug_vprintf): Send output to debug_file.
663 (debug_flush): Likewise.
664 * debug.h (debug_set_output): New declaration.
665 * server.c (handle_monitor_command): Add debug-file option.
666 (captured_main): Likewise.
667
c1bc0935
AH
6682019-04-17 Alan Hayward <alan.hayward@arm.com>
669
670 * debug.c (remote_debug): Add definition.
671 * debug.h (remote_debug): Add declaration.
672 * hostio.c (remote_debug): Remove declaration.
673 * remote-utils.c (struct ui_file): Likewise.
674 (remote_debug): Likewise.
675 * remote-utils.h (remote_debug): Likewise,
676 * server.c (remote_debug): Remove definition.
677
3f52fdbc
KB
6782019-04-10 Kevin Buettner <kevinb@redhat.com>
679
680 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
681 when using a 64-bit gdbserver.
682
b0319eaa
TT
6832019-04-09 Tom Tromey <tromey@adacore.com>
684
685 * linux-low.c (select_event_lwp): Use find_thread_in_random.
686
eedc3f4f
TT
6872019-04-08 Tom Tromey <tom@tromey.com>
688
689 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
690 throw.
691 (linux_resume_one_lwp): Likewise.
692
230d2906
TT
6932019-04-08 Tom Tromey <tom@tromey.com>
694
695 * gdbreplay.c: Update.
696 * linux-low.c: Update.
697 * server.c: Update.
698
a70b8144
TT
6992019-04-08 Tom Tromey <tom@tromey.com>
700
701 * server.c: Use C++ exception handling.
702 * linux-low.c: Use C++ exception handling.
703 * gdbreplay.c: Use C++ exception handling.
704
3d6e9d23
TT
7052019-04-08 Tom Tromey <tom@tromey.com>
706
707 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
708 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
709 (captured_main, main): Update.
710 * gdbreplay.c (main): Update.
711
0570503d
PFC
7122019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
713
714 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
715 value in argument pointer, return 1 if the entry is found and 0
716 otherwise. Move comment.
717 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
718 * linux-low.h (linux_get_auxv): Declare.
719 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
720
227a9e65
TT
7212019-04-05 Tom Tromey <tromey@adacore.com>
722
723 * server.c (gdbserver_usage): Use upper-case for metasyntactic
724 variables.
725
69f4c9cc
AH
7262019-03-28 Alan Hayward <alan.hayward@arm.com>
727
728 * linux-low.c (AT_HWCAP2): Add define if not already included.
729
974c89e0
AH
7302019-03-26 Alan Hayward <alan.hayward@arm.com>
731
732 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
733 (aarch64_arch_setup): Call linux_get_hwcap.
734 * linux-arm-low.c (arm_get_hwcap): Remove function.
735 (arm_read_description): Call linux_get_hwcap.
736 * linux-low.c (linux_get_auxv): New function.
737 (linux_get_hwcap): Likewise.
738 (linux_get_hwcap2): Likewise.
739 * linux-low.h (linux_get_hwcap): New declaration.
740 (linux_get_hwcap2): Likewise.
741 * linux-ppc-low.c (ppc_get_auxv): Remove function.
742 (ppc_arch_setup): Call linux_get_hwcap.
743 * linux-s390-low.c (s390_get_hwcap): Remove function.
744 (s390_arch_setup): Call linux_get_hwcap.
745
1ef53e6b
AH
7462019-03-22 Alan Hayward <alan.hayward@arm.com>
747 Jiong Wang <jiong.wang@arm.com>
748
749 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
750 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
751 to fail.
752 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
753
ee4fbcfa
AH
7542019-03-22 Alan Hayward <alan.hayward@arm.com>
755 Jiong Wang <jiong.wang@arm.com>
756
757 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
758 (aarch64_get_hwcap): New function.
759 (aarch64_arch_setup): Read APIA hwcap.
760
6dc0ebde
AH
7612019-03-22 Alan Hayward <alan.hayward@arm.com>
762 Jiong Wang <jiong.wang@arm.com>
763
764 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
765 (initialize_low_tracepoint): Likewise.
766 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
767 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
768 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
769 (aarch64_linux_read_description): Likewise.
770 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
771
1163a4b7
JB
7722019-03-12 John Baldwin <jhb@FreeBSD.org>
773
774 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
775 i386_create_target_description for 'segments' parameter.
776 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
777 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
778 * win32-i386-low.c (i386_arch_setup): Likewise.
779
d3a70e03
TT
7802019-03-12 Tom Tromey <tromey@adacore.com>
781
782 * linux-low.c (iterate_over_lwps): Update.
783
37991b4f
TT
7842019-03-06 Tom Tromey <tom@tromey.com>
785
786 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
787 (captured_main): Use SCOPE_EXIT.
788
45950eb6
SDJ
7892019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
790
791 * configure.srv: Use '$enable_unittest' instead of '$development'
792 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
793 case.
794
43ac54fc
TT
7952019-02-27 Tom Tromey <tromey@adacore.com>
796
797 * gdbreplay.c (logchar): Handle \r\n.
798
df0da8a2
AH
7992019-02-07 Alan Hayward <alan.hayward@arm.com>
800
801 * linux-low.c (linux_attach): Add process before lwp.
802 * server.c (attach_inferior): Check if already attached.
803
1a5c2598
TT
8042019-02-07 Tom Tromey <tom@tromey.com>
805
806 * x86-tdesc.h: Rename include guard.
807 * x86-low.h: Add include guard.
808 * wincecompat.h: Rename include guard.
809 * win32-low.h: Add include guard.
810 * utils.h: Rename include guard.
811 * tracepoint.h: Rename include guard.
812 * tdesc.h: Rename include guard.
813 * target.h: Rename include guard.
814 * server.h: Rename include guard.
815 * remote-utils.h: Rename include guard.
816 * regcache.h: Rename include guard.
817 * nto-low.h: Rename include guard.
818 * notif.h: Add include guard.
819 * mem-break.h: Rename include guard.
820 * lynx-low.h: Add include guard.
821 * linux-x86-tdesc.h: Add include guard.
822 * linux-s390-tdesc.h: Add include guard.
823 * linux-ppc-tdesc-init.h: Add include guard.
824 * linux-low.h: Add include guard.
825 * linux-aarch64-tdesc.h: Add include guard.
826 * linux-aarch32-low.h: Add include guard.
827 * inferiors.h: Rename include guard.
828 * i387-fp.h: Rename include guard.
829 * hostio.h: Rename include guard.
830 * gdbthread.h: Rename include guard.
831 * gdb_proc_service.h: Rename include guard.
832 * event-loop.h: Rename include guard.
833 * dll.h: Rename include guard.
834 * debug.h: Rename include guard.
835 * ax.h: Rename include guard.
836
956cc47c
SN
8372018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
838
839 PR gdb/23985
840 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
841 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
842
a0707f3c
TT
8432019-01-25 Tom Tromey <tom@tromey.com>
844
845 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
846
0747795c
TT
8472019-01-25 Tom Tromey <tom@tromey.com>
848
849 * win32-low.c: Fix common/ includes.
850 * win32-i386-low.c: Fix common/ includes.
851 * tracepoint.c: Fix common/ includes.
852 * thread-db.c: Fix common/ includes.
853 * target.h: Fix common/ includes.
854 * symbol.c: Fix common/ includes.
855 * spu-low.c: Fix common/ includes.
856 * server.h: Fix common/ includes.
857 * server.c: Fix common/ includes.
858 * remote-utils.c: Fix common/ includes.
859 * regcache.h: Fix common/ includes.
860 * regcache.c: Fix common/ includes.
861 * nto-x86-low.c: Fix common/ includes.
862 * notif.h: Fix common/ includes.
863 * mem-break.h: Fix common/ includes.
864 * lynx-low.c: Fix common/ includes.
865 * lynx-i386-low.c: Fix common/ includes.
866 * linux-x86-tdesc-selftest.c: Fix common/ includes.
867 * linux-x86-low.c: Fix common/ includes.
868 * linux-low.c: Fix common/ includes.
869 * inferiors.h: Fix common/ includes.
870 * i387-fp.c: Fix common/ includes.
871 * hostio.c: Fix common/ includes.
872 * hostio-errno.c: Fix common/ includes.
873 * gdbthread.h: Fix common/ includes.
874 * gdbreplay.c: Fix common/ includes.
875 * fork-child.c: Fix common/ includes.
876 * event-loop.c: Fix common/ includes.
877 * ax.c:
878 (enum gdb_agent_op): Fix common/ includes.
879
be6d4f74
TT
8802019-01-21 Tom Tromey <tom@tromey.com>
881
882 * tracepoint.c: Fix includes.
883 * remote-utils.c: Fix includes.
884 * linux-x86-low.c: Fix includes.
885
66d91b39
JB
8862019-01-01 Joel Brobecker <brobecker@adacore.com>
887
888 * gdbreplay.c (gdbreplay_version): Update copyright year in
889 version message.
890 * server.c (gdbserver_version): Likewise.
891
754e3168
AH
8922018-12-05 Alan Hayward <alan.hayward@arm.com>
893
894 * linux-low.c (add_lwp): Switch ordering.
895
d105de22
TT
8962018-11-29 Tom Tromey <tom@tromey.com>
897
898 * win32-low.c (win32_join): Take pid, not process.
899 * target.h (struct target_ops) <join>: Change argument type.
900 (join_inferior): Change argument name.
901 * spu-low.c (spu_join): Take pid, not process.
902 * server.c (handle_detach): Preserve pid before destroying
903 process.
904 * lynx-low.c (lynx_join): Take pid, not process.
905 * linux-low.c (linux_join): Take pid, not process.
906
50138245
AH
9072018-11-23 Alan Hayward <alan.hayward@arm.com>
908
909 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
910 (aarch64_cannot_fetch_register): Likewise.
911 (struct linux_target_ops): Update references.
912
64f57f3d
PFC
9132018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
914
915 * linux-ppc-low.c: Include nat/linux-ptrace.h.
916
8d619c01
EBM
9172018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
918
919 * configure.srv (ipa_ppc_linux_regobj): Add
920 powerpc-isa207-htm-vsx32l-ipa.o and
921 powerpc-isa207-htm-vsx64l-ipa.o.
922 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
923 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
924 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
925 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
926 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
927 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
928 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
929 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
930 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
931 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
932 (init_registers_powerpc_isa207_htm_vsx32l)
933 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
934 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
935 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
936 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
937 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
938 (ppc_store_tm_ctarregset): New functions.
939 (ppc_regsets): Add entries for HTM regsets.
940 (ppc_arch_setup): Set htm in features struct when needed. Set
941 sizes for the HTM regsets.
942 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
943 (initialize_low_arch): Call
944 init_registers_powerpc_isa207_htm_vsx32l and
945 init_registers_powerpc_isa207_htm_vsx64l.
946 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
947 PPC_TDESC_ISA207_HTM_VSX.
948 (initialize_low_tracepoint): Call
949 init_registers_powerpc_isa207_htm_vsx32l and
950 init_registers_powerpc_isa207_htm_vsx64l.
951
232bfb86
EBM
9522018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
953
954 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
955 rs6000/power-linux-pmu.xml to srv_xmlfiles.
956 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
957 (ppc_store_pmuregset): New functions.
958 (ppc_regsets): Add entries for ebb and pmu regsets.
959 (ppc_arch_setup): Set isa207 in features struct if the ebb and
960 pmu regsets are available. Set sizes for these regsets.
961
f2cf6173
EBM
9622018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
963
964 * configure.srv (ipa_ppc_linux_regobj): Add
965 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
966 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
967 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
968 rs6000/powerpc-isa207-vsx32l.xml, and
969 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
970 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
971 <PPC_TDESC_ISA207_VSX>: New enum value.
972 (init_registers_powerpc_isa207_vsx32l): Declare.
973 (init_registers_powerpc_isa207_vsx64l): Declare.
974 * linux-ppc-low.c (ppc_fill_tarregset): New function.
975 (ppc_store_tarregset): New function.
976 (ppc_regsets): Add entry for the TAR regset.
977 (ppc_arch_setup): Set isa207 in features struct when needed. Set
978 size for the TAR regsets.
979 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
980 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
981 and init_registers_powerpc_isa207_vsx64l.
982 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
983 (initialize_low_tracepoint): Call
984 init_registers_powerpc_isa207_vsx32l and
985 init_registers_powerpc_isa207_vsx64l.
986
7ca18ed6
EBM
9872018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
988 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
989
990 * configure.srv (ipa_ppc_linux_regobj): Add
991 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
992 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
993 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
994 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
995 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
996 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
997 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
998 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
999 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1000 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1001 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1002 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1003 (ppc_hwcap): Add comment.
1004 (ppc_hwcap2): New global.
1005 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1006 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1007 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1008 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1009 when needed. Set sizes for the the DSCR and PPR regsets.
1010 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1011 (initialize_low_arch): Call
1012 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1013 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1014 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1015 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1016 (initialize_low_tracepoint): Call
1017 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1018 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1019
5c849b22
PFC
10202018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1021
1022 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1023
8ecfd7bd
SDJ
10242018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1025 Simon Marchi <simark@simark.ca>
1026
1027 * acinclude.m4: Include "../selftest.m4".
1028 * configure: Regenerate.
1029 * configure.ac: Use "GDB_AC_SELFTEST".
1030 * configure.srv: Use "$enable_unittests" instead of
1031 "$development" when checking whether unit tests have been
1032 enabled.
1033 * server.c (captured_main): Update message informing that
1034 selftests have been disabled.
1035
96643e35
TT
10362018-10-04 Tom Tromey <tom@tromey.com>
1037
1038 * configure: Rebuild.
1039
da4ae14a
TT
10402018-10-04 Tom Tromey <tom@tromey.com>
1041
1042 * server.c (handle_status): Rename inner "thread".
1043 (process_serial_event): Declare "res" in 'm' case.
1044 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1045 (iterate_over_lwps): Rename inner "thread".
1046 (linux_qxfer_libraries_svr4): Rename inner "len".
1047 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1048
7c619dbd
GB
10492018-10-01 Gary Benson <gbenson@redhat.com>
1050
1051 * gdb_proc_service.h: Moved common code to
1052 common/gdb_proc_service.h.
1053
3795e814
GB
10542018-10-01 Gary Benson <gbenson@redhat.com>
1055
1056 * gdb_proc_service.h: Synchronize comments and whitespace with
1057 GDB's version of this file.
1058
49b036f1
TT
10592018-09-25 Tom Tromey <tom@tromey.com>
1060
1061 * configure: Rebuild.
1062 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1063
8ff03f0b
SM
10642018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1065
1066 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1067 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1068 ($(IPA_LIB)): Sort IPA_OBJS.
1069
a1cd91dc
SM
10702018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1071
1072 * Makefile.in: Remove references to $(ADD_DEPS).
1073
752312ba
TT
10742018-09-16 Tom Tromey <tom@tromey.com>
1075
1076 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1077 variables.
1078 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1079 variables.
1080
f1628857
TT
10812018-09-05 Tom Tromey <tom@tromey.com>
1082
1083 * configure: Rebuild.
1084
ad202fcc
SM
10852018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1086
1087 PR build/23399
1088 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1089
d3d8724a
TT
10902018-08-27 Tom Tromey <tom@tromey.com>
1091
1092 PR build/23087:
1093 * configure: Rebuild.
1094
b4f183d2
TT
10952018-08-27 Tom Tromey <tom@tromey.com>
1096
1097 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1098 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1099 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1100 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1101 (s390x_emit_stack_adjust): Add casts to unsigned char.
1102
4e2aa472
SM
11032018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1104
1105 PR gdb/23374
1106 PR gdb/23375
1107 * server.h (struct client_state) <disable_randomization>:
1108 Initialize to 1.
1109
cf4088a9
SM
11102018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1111
1112 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1113 variable.
1114 (mips_supply_ptrace_register): Likewise.
1115
a0de763e
TT
11162018-07-22 Tom Tromey <tom@tromey.com>
1117
1118 * configure: Rebuild.
1119
b0a7723d
TT
11202018-07-22 Tom Tromey <tom@tromey.com>
1121
1122 * win32-low.c (win32_create_inferior): Remove unused variables.
1123 * gdbreplay.c (remote_open): Remove unused variable.
1124 * remote-utils.c (remote_prepare): Remove unused variable.
1125 * x86-tdesc.h (X86_TDESC_H): Define.
1126 (amd64_expedite_regs): Define conditionally.
1127 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1128 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1129 * remote-utils.c (readchar): Remove unused variable.
1130
a780ef4f
PA
11312018-07-13 Pedro Alves <palves@redhat.com>
1132
1133 * linux-low.c (linux_kill): Change parameter to process_info
1134 pointer instead of pid. Adjust.
1135 * lynx-low.c (lynx_kill): Likewise.
1136 * nto-low.c (nto_kill): Likewise.
1137 * spu-low.c (spu_kill): Likewise.
1138 * win32-low.c (win32_kill): Likewise.
1139 * server.c (handle_v_kill, kill_inferior_callback)
1140 (detach_or_kill_for_exit): Adjust.
1141 * target.c (kill_inferior): Change parameter to process_info
1142 pointer instead of pid. Adjust.
1143 * target.h (struct target_ops) <kill>: Change parameter to
1144 process_info pointer instead of pid. Adjust all implementations
1145 and callers.
1146 (kill_inferior): Likewise.
1147
ef2ddb33
PA
11482018-07-13 Pedro Alves <palves@redhat.com>
1149
1150 * linux-low.c (linux_detach, linux_join): Change parameter to
1151 process_info pointer instead of pid. Adjust.
1152 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1153 * nto-low.c (nto_detach): Likewise.
1154 * spu-low.c (spu_detach, spu_join): Likewise.
1155 * win32-low.c (win32_detach, win32_join): Likewise.
1156 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1157 * target.h (struct target_ops) <detach, join>: Change parameter to
1158 process_info pointer instead of pid. Adjust all implementations
1159 and callers.
1160 (detach_inferior, join_inferior): Rename 'pid' parameter to
1161 'proc'.
1162
c7ab0aef
SDJ
11632018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1164 Jan Kratochvil <jan.kratochvil@redhat.com>
1165 Paul Fertser <fercerpav@gmail.com>
1166 Tsutomu Seki <sekiriki@gmail.com>
1167
1168 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1169 (OBS): Add 'common/netstuff.o'.
1170 (GDBREPLAY_OBS): Likewise.
1171 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1172 (remote_open): Implement support for IPv6
1173 connections.
1174 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1175 and 'wspiapi.h'.
1176 (handle_accept_event): Accept connections from IPv6 sources.
1177 (remote_prepare): Handle IPv6-style hostnames; implement
1178 support for IPv6 connections.
1179 (remote_open): Implement support for printing connections from
1180 IPv6 sources.
1181
31445d10
PA
11822018-07-11 Pedro Alves <palves@redhat.com>
1183
1184 PR gdb/23377
1185 * mem-break.c (any_persistent_commands): Add process_info
1186 parameter and use it instead of relying on the current process.
1187 Change return type to bool.
1188 * mem-break.h (any_persistent_commands): Add process_info
1189 parameter and change return type to bool.
1190 * server.c (handle_detach): Remove require_running_or_return call.
1191 Look up the process_info for the process we're about to detach.
1192 If not found, return back error to GDB. Adjust
1193 any_persistent_commands call to pass down a process pointer.
1194
cb197132
PA
11952018-07-11 Pedro Alves <palves@redhat.com>
1196
1197 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1198 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1199 instead of collect_register_by_name.
1200 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1201 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1202
1b919490
VB
12032018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1204 Pedro Alves <palves@redhat.com>
1205
1206 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1207
d7e15655
TT
12082018-07-03 Tom Tromey <tom@tromey.com>
1209
1210 * linux-low.c: Update.
1211 * lynx-low.c: Update.
1212 * mem-break.c: Update.
1213 * nto-low.c: Update.
1214 * remote-utils.c: Update.
1215 * server.c: Update.
1216 * spu-low.c: Update.
1217 * target.c: Update.
1218 * win32-low.c: Update.
1219
26a57c92
TT
12202018-07-03 Tom Tromey <tom@tromey.com>
1221
1222 * server.c: Update.
1223
0e998d96
TT
12242018-07-03 Tom Tromey <tom@tromey.com>
1225
1226 * linux-low.c: Update.
1227
cc6bcb54
TT
12282018-07-03 Tom Tromey <tom@tromey.com>
1229
1230 * target.c: Update.
1231
e38504b3
TT
12322018-07-03 Tom Tromey <tom@tromey.com>
1233
1234 * linux-low.c: Update.
1235 * linux-mips-low.c: Update.
1236 * lynx-low.c: Update.
1237 * nto-low.c: Update.
1238 * remote-utils.c: Update.
1239 * server.c: Update.
1240 * spu-low.c: Update.
1241 * target.c: Update.
1242 * thread-db.c: Update.
1243
e99b03dc
TT
12442018-07-03 Tom Tromey <tom@tromey.com>
1245
1246 * linux-low.c: Update.
1247 * linux-mips-low.c: Update.
1248 * lynx-low.c: Update.
1249 * mem-break.c: Update.
1250 * nto-low.c: Update.
1251 * remote-utils.c: Update.
1252 * server.c: Update.
1253 * spu-low.c: Update.
1254 * target.c: Update.
1255 * tracepoint.c: Update.
1256
f2907e49
TT
12572018-07-03 Tom Tromey <tom@tromey.com>
1258
1259 * linux-low.c: Update.
1260 * linux-ppc-low.c: Update.
1261 * linux-x86-low.c: Update.
1262 * proc-service.c: Update.
1263 * server.c: Update.
1264 * spu-low.c: Update.
1265 * thread-db.c: Update.
1266 * win32-low.c: Update.
1267
fd79271b
TT
12682018-07-03 Tom Tromey <tom@tromey.com>
1269
1270 * linux-low.c: Update.
1271 * lynx-low.c: Update.
1272 * nto-low.c: Update.
1273 * remote-utils.c: Update.
1274 * spu-low.c: Update.
1275 * thread-db.c: Update.
1276 * win32-low.c: Update.
1277
c0867626
SDJ
12782018-06-29 Joel Brobecker <brobecker@adacore.com>
1279
1280 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1281 parameter in call to 'amd64_create_target_description'.
1282
2512d7ef
JK
12832018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1284
1285 * x86-tdesc.h: Remove executable permission flag.
1286
d0ac1c44
SM
12872018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1288
1289 * configure.ac: Remove AC_PREREQ, add missing quoting.
1290 * configure: Re-generate.
1291 * config.in: Re-generate.
1292 * aclocal.m4: Re-generate.
1293
c4eb05ff
SM
12942018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1295
1296 * tracepoint.h (current_traceframe): Remove declaration.
1297
02895270
AH
12982018-06-18 Alan Hayward <alan.hayward@arm.com>
1299
1300 * linux-aarch64-low.c (is_sve_tdesc): New function.
1301 (aarch64_sve_regs_copy_to_regcache): Likewise.
1302 (aarch64_sve_regs_copy_from_regcache): Likewise.
1303 (aarch64_regs_info): Add SVE checks.
1304 (initialize_low_arch): Initialize SVE.
1305
e9902bfc
AH
13062018-06-18 Alan Hayward <alan.hayward@arm.com>
1307
1308 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1309
fefa175e
AH
13102018-06-11 Alan Hayward <alan.hayward@arm.com>
1311
1312 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1313 (initialize_low_tracepoint): Likewise
1314 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1315 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1316 param.
1317 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1318 checks.
1319 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1320
b91ad3ff
AH
13212018-06-11 Alan Hayward <alan.hayward@arm.com>
1322
1323 * server.h (PBUFSIZ): Increase size
1324
f868386e
AH
13252018-06-11 Alan Hayward <alan.hayward@arm.com>
1326
1327 * regcache.c (regcache::raw_compare): New function.
1328 * regcache.h (regcache::raw_compare): New declaration.
1329
9c861883
AH
13302018-06-11 Alan Hayward <alan.hayward@arm.com>
1331
1332 * regcache.c (new_register_cache): Use new.
1333 (free_register_cache): Use delete.
1334 (register_data): Use const.
1335 (supply_register): Move body inside regcache.
1336 (regcache::raw_supply): New override function.
1337 (collect_register): Move body inside regcache.
1338 (regcache::raw_collect): New override function.
1339 (regcache::get_register_status): New override function.
1340 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1341
40591844
TT
13422018-06-09 Tom Tromey <tom@tromey.com>
1343
1344 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1345 declare queue.
1346 (event_queue): Use std::queue.
1347 (gdb_event_xfree): Remove.
1348 (initialize_event_loop, process_event, wait_for_event): Update.
1349
6341380d
SC
13502018-06-08 Stan Cox <scox@redhat.com>
1351
1352 * win32-low.c (win32_create_inferior): last_ptid and last_status
1353 moved to client_state.
1354
03349c93
PA
13552018-06-08 Pedro Alves <palves@redhat.com>
1356
1357 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1358 common/common-exceptions.o, common/common-utils.o,
1359 common/errors.o, common/print-utils.o and utils.o.
1360 * gdbreplay.c: Include "common-defs.h" instead of the two
1361 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1362 string.h or alloca.h.
1363 (perror_with_name): Delete.
1364 (remote_open): Use xstrdup instead of strdup.
1365 (main): Rename to ...
1366 (captured_main): ... this.
1367 (main): New.
1368
8dcc53b3
TT
13692018-06-08 Tom Tromey <tom@tromey.com>
1370
1371 * linux-low.c (linux_low_read_btrace): Update.
1372
c12a5089
SC
13732018-06-04 Stan Cox <scox@redhat.com>
1374
1375 * server.h (struct client_state): New.
1376 * server.c (cont_thread, general_thread, multi_process)
1377 (report_fork_events, report_vfork_events, report_exec_events)
1378 (report_thread_events, swbreak_feature, hwbreak_feature)
1379 (vCont_supported, disable_randomization, pass_signals)
1380 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1381 Moved to client_state.
1382 * remote-utils.c (remote_debug, noack_mode)
1383 (transport_is_reliable): Moved to client_state.
1384 * tracepoint.c (current_traceframe): Moved to client_state.
1385
1386 Update all callers.
1387 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1388 linux-low.c, remote-utils.h, target.c: Use client_state.
1389
122394f1
AH
13902018-05-31 Alan Hayward <alan.hayward@arm.com>
1391
1392 * configure.srv: Add new c/h file.
1393
95228a0d
AH
13942018-05-31 Alan Hayward <alan.hayward@arm.com>
1395
1396 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1397 null VQ.
1398
d8dab6c3
MR
13992018-05-25 Maciej W. Rozycki <macro@mips.com>
1400
1401 * gdb.arch/mips-fpregset-core.exp: New test.
1402 * gdb.arch/mips-fpregset-core.c: New test source.
1403
81e25b7c
EK
14042018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1405
1406 PR server/23198
1407 * hostio.c (require_int): Do not report overflow for integers
1408 between 0xfffffff and 0x7fffffff.
1409
7e947ad3
MR
14102018-05-22 Maciej W. Rozycki <macro@mips.com>
1411
1412 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1413 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1414 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1415 functions.
1416 (the_low_target): Wire them.
1417
1d75a658
PFC
14182018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1419
1420 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1421 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1422 mode. Call collect_register_by_name with vscr using
1423 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1424 (ppc_store_vrregset): Add and set vscr_offset variable as in
1425 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1426 vscr_offset.
1427
d078308a
PFC
14282018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1429
1430 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1431 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1432 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1433
7273b5fc
PFC
14342018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1435
1436 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1437 (ppc_store_vsxregset): Likewise.
1438 (ppc_fill_vrregset): Likewise.
1439 (ppc_store_vrregset): Likewise.
1440 (ppc_fill_evrregset): Likewise.
1441 (ppc_store_evrregset): Likewise.
1442 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1443 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1444 needed.
1445
2e077f5e
PFC
14462018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1447
1448 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1449 wordsize of the inferior. Call ppc_linux_target_wordsize.
1450
bd64614e
PFC
14512018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1452
1453 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1454 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1455 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1456 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1457 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1458 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1459 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1460 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1461 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1462 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1463 (tdesc_powerpc_e500l): Remove.
1464 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1465 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1466 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1467 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1468 linux-ppc-tdesc.h.
1469 (ppc_arch_setup): Remove target description matching code. Fill a
1470 ppc_linux_features struct and call ppc_linux_match_description
1471 with it.
1472
75d74cca
MR
14732018-05-22 Maciej W. Rozycki <macro@mips.com>
1474
1475 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1476 width of the requested register exceeds the width of the
1477 `ptrace' data type.
1478 (mips_cannot_store_register): Likewise.
1479
e4439e43
MR
14802018-05-21 Maciej W. Rozycki <macro@mips.com>
1481
1482 * linux-mips-low.c (mips_fetch_register): New function. Update
1483 preceding comment.
1484 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1485 (the_low_target): Wire `mips_fetch_register'.
1486
55271bf9
JB
14872018-05-10 Joel Brobecker <brobecker@adacore.com>
1488
1489 * lynx-i386-low.c (LYNXOS_178): New macro.
1490 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1491 the layout on LynxOS-178.
1492 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1493 handle floating point registers that are not supported by
1494 LynxOS-178.
1495
1a34f210
TT
14962018-05-10 Tom Tromey <tom@tromey.com>
1497
1498 * configure: Rebuild.
1499
190852c8
JB
15002018-05-10 Joel Brobecker <brobecker@adacore.com>
1501
1502 PR server/23158:
1503 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1504 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1505 Use it to set the expedite_regs field in the given tdesc.
1506 * x86-tdesc.h: New file.
1507 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1508 Adjust following the addition of the new expedite_regs parameter
1509 to init_target_desc.
1510 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1511 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1512 (i386_linux_read_description, amd64_linux_read_description):
1513 Adjust following the addition of the new expedite_regs parameter
1514 to init_target_desc.
1515 * lynx-i386-low.c: #include "x86-tdesc.h".
1516 (lynx_i386_arch_setup): Adjust following the addition of the new
1517 expedite_regs parameter to init_target_desc.
1518 * nto-x86-low.c: #include "x86-tdesc.h".
1519 (nto_x86_arch_setup): Adjust following the addition of the new
1520 expedite_regs parameter to init_target_desc.
1521 * win32-i386-low.c: #include "x86-tdesc.h".
1522 (i386_arch_setup): Adjust following the addition of the new
1523 expedite_regs parameter to init_target_desc.
1524
7dbac825
JB
15252018-05-10 Joel Brobecker <brobecker@adacore.com>
1526
1527 PR server/23158:
1528 * win32-low.c (win32_create_inferior): Add call to my_wait
1529 setting last_status global.
1530
906994d9
JB
15312018-05-10 Joel Brobecker <brobecker@adacore.com>
1532
1533 PR server/23158:
1534 * win32-low.c (create_process): Only call gdb_tilde_expand if
1535 inferior_cwd is not NULL.
1536
8ee22052
AB
15372018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1538
1539 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1540 registers to the cache if their values have changed.
1541 (i387_xsave_to_cache): Provide default values for x87 control
1542 registers when these features are available, but disabled.
1543 * regcache.c (supply_register_by_name_zeroed): New function.
1544 * regcache.h (supply_register_by_name_zeroed): Declare new
1545 function.
1546
aff689d3
TT
15472018-05-07 Tom Tromey <tom@tromey.com>
1548
1549 * configure: Rebuild.
1550
85e26832
TT
15512018-05-04 Tom Tromey <tom@tromey.com>
1552
1553 * configure: Rebuild.
1554
a3b60e45
JK
15552018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1556 Pedro Alves <palves@redhat.com>
1557
1558 * linux-aarch64-low.c (aarch64_stopped_data_address):
1559 Likewise.
1560
632e107b
TT
15612018-04-27 Tom Tromey <tom@tromey.com>
1562
1563 * configure: Rebuild.
1564
458412c3
TT
15652018-04-23 Tom Tromey <tom@tromey.com>
1566
1567 * configure: Rebuild.
1568
f31c089e
SM
15692018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1570
1571 * Makefile.in (depcomp): Add "..".
1572 (all_deps_files): New and use it.
1573
b319b098
AH
15742018-04-18 Alan Hayward <alan.hayward@arm.com>
1575
1576 * configure.srv (aarch64*-*-linux*): Don't include xml.
1577 (i[34567]86-*-cygwin*): Likewise.
1578 (i[34567]86-*-linux*): Likewise.
1579 (i[34567]86-*-lynxos*): Likewise.
1580 (i[34567]86-*-mingw32ce*): Likewise.
1581 (i[34567]86-*-mingw*): Likewise.
1582 (i[34567]86-*-nto*): Likewise.
1583 (tic6x-*-uclinux): Likewise.
1584 (x86_64-*-linux*): Likewise.
1585 (x86_64-*-mingw*): Likewise.
1586 (x86_64-*-cygwin*): Likewise.
1587
3b74854b
AH
15882018-04-18 Alan Hayward <alan.hayward@arm.com>
1589
1590 * tdesc.c: Remove xml parameter.
1591
e98577a9
AH
15922018-04-18 Alan Hayward <alan.hayward@arm.com>
1593
1594 * server.c (get_features_xml): Remove cast.
1595 * tdesc.c (void target_desc::accept): Fill in function.
1596 (tdesc_get_features_xml): Remove old xml creation.
1597 (print_xml_feature::visit_pre): Add xml vistor.
1598 * tdesc.h (struct target_desc): Make xmltarget mutable.
1599 (tdesc_get_features_xml): Remove declaration.
1600
d278f585
AH
16012018-04-18 Alan Hayward <alan.hayward@arm.com>
1602
1603 * tdesc.c (tdesc_architecture_name): Add new function.
1604 (tdesc_osabi_name): Likewise.
1605 (tdesc_get_features_xml): Use new functions.
1606
eee8a18d
AH
16072018-04-18 Alan Hayward <alan.hayward@arm.com>
1608
1609 * tdesc.c (tdesc_create_flags): Remove.
1610 (tdesc_add_flag): Likewise.
1611 (tdesc_named_type): Likewise.
1612 (tdesc_create_union): Likewise.
1613 (tdesc_create_struct): Likewise.
1614 (tdesc_create_vector): Likewise.
1615 (tdesc_add_bitfield): Likewise.
1616 (tdesc_add_field): Likewise.
1617 (tdesc_set_struct_size): Likewise.
1618
82ec9bc7
AH
16192018-04-18 Alan Hayward <alan.hayward@arm.com>
1620
1621 * tdesc.c (~target_desc): Remove implictly deleted items.
1622 (init_target_desc): Iterate all features.
1623 (tdesc_get_features_xml): Use vector.
1624 (tdesc_create_feature): Create feature.
1625 * tdesc.h (tdesc_feature) Remove
1626 (target_desc): Add features.
1627
ea3e7d71
AH
16282018-04-18 Alan Hayward <alan.hayward@arm.com>
1629
1630 * Makefile.in: Add common/tdesc.c
1631 * tdesc.c (init_target_desc): init all reg_defs from register
1632 vector.
1633 (tdesc_create_reg): Create tdesc_reg.
1634 * tdesc.h (tdesc_feature): Add register vector.
1635
17d08cd4
SM
16362018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1637
1638 * tdesc.h (struct target_desc) <features>: Change type to
1639 std::vector<std::string>.
1640 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1641 changes.
1642 (tdesc_get_features_xml): Likewise.
1643 (tdesc_create_feature): Likewise.
1644
5cd3e386
AH
16452018-03-26 Alan Hayward <alan.hayward@arm.com>
1646
1647 * regcache.c (find_register_by_number): Return a ref.
1648 (find_regno): Use references.
1649 (register_size): Likewise.
1650 (register_data): Likewise.
1651 * tdesc.c (target_desc::~target_desc): Remove free calls.
1652 (target_desc::operator==): Use std::vector compare.
1653 (init_target_desc): Use reference.
1654 (tdesc_create_reg): Use reg constructors.
1655 * tdesc.h (struct target_desc): Replace pointer with object.
1656
dff7492c
AH
16572018-03-23 Alan Hayward <alan.hayward@arm.com>
1658
1659 * regcache.c (find_register_by_number): Make static.
1660 (find_regno): Use find_register_by_number
1661 * regcache.h (struct reg): Remove declaration.
1662
d80e5242
AH
16632018-03-23 Alan Hayward <alan.hayward@arm.com>
1664
1665 * tdesc.c (target_desc::~target_desc): Move to here.
1666 (target_desc::operator==): Likewise.
1667 * tdesc.h (target_desc::~target_desc): Move from here.
1668 (target_desc::operator==): Likewise.
1669
f69c5afb
AA
16702018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1671
1672 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1673
ce29f843
AA
16742018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1675
1676 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1677 S390_TDESC_GS.
1678 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1679 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1680 and init_registers_s390_gs_linux64.
1681
c49bd90b
AA
16822018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1683
1684 * linux-s390-low.c (s390_fill_gs): Remove function.
1685 (s390_fill_gsbc): Remove function.
1686 (s390_regsets): Set fill functions for the guarded storage regsets
1687 to NULL.
1688
7edb9bd3
AA
16892018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1690
1691 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1692 the word size. Add comment.
1693 (s390_get_wordsize): New function.
1694 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1695 pswm with it. Instead, use s390_get_wordsize to determine the
1696 word size first and derive the correct tdesc from that directly.
1697
39be3c7e
SM
16982018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1699
1700 * Makefile.in: Include silent-rules.mk.
1701 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1702 (COMPILE): Add ECHO_CXX.
1703 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1704 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1705 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1706 (version-generated.c): Add ECHO_GEN.
1707 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1708 (IPAGENT_COMPILE): Add ECHO_CXX.
1709 (%-generated.c): Add ECHO_REGDAT.
1710
3ae9ce5d
TT
17112018-03-14 Tom Tromey <tom@tromey.com>
1712
1713 PR cli/14977:
1714 * ax.c (ax_printf): Special case for NULL.
1715
e6a58aa8
SM
17162018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1717
1718 * linux-low.c (linux_qxfer_libraries_svr4): Use
1719 xml_escape_text_append.
1720
f6e8a41e
SM
17212018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1722
1723 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1724
b9671caf
SM
17252018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1726
1727 * server.c (handle_general_set): Remove unnecessary xstrdup.
1728
e80aaf61
SM
17292018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1730
1731 * server.c (parse_debug_format_options): Adjust to
1732 delim_string_to_char_ptr_vec changes.
1733 * thread-db.c (thread_db_load_search): Adjust to
1734 dirnames_to_char_ptr_vec changes.
1735
b1223e78
MM
17362018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1737
1738 * target.h (target_enable_btrace, target_disable_btrace)
1739 (target_read_btrace, target_read_btrace_conf): Turn macro into
1740 inline function. Throw error if target method is not defined.
1741 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1742 check for btrace target method. Be prepared to handle exceptions
1743 from btrace target methods.
1744
81561546
SDJ
17452018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1746
1747 * server.c (captured_main): Change order of error message printed
1748 when the current working directory cannot be found.
1749
25e3c82c
SDJ
17502018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1751
1752 * server.c: Include "filenames.h" and "pathstuff.h".
1753 (program_name): Delete variable.
1754 (program_path): New anonymous class.
1755 (get_exec_wrapper): Use "program_path" instead of
1756 "program_name".
1757 (handle_v_run): Likewise.
1758 (captured_main): Likewise.
1759 (process_serial_event): Likewise.
1760
b4987c95
SDJ
17612018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1762
1763 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1764 (OBJS): Add "pathstuff.o".
1765 * server.c (current_directory): New global variable.
1766 (captured_main): Initialize "current_directory".
1767
f46cd62a
AH
17682018-02-26 Alan Hayward <alan.hayward@arm.com>
1769
1770 * tdesc.c: Use common/tdesc.h.
1771 * tdesc.h: Likewise.
1772
a543c5ca
AH
17732018-02-20 Alan Hayward <alan.hayward@arm.com>
1774 Simon Marchi <simon.marchi@ericsson.com>
1775
1776 * Makefile.in: Switch order of make rules.
1777
b5884fa7
AH
17782018-02-19 Alan Hayward <alan.hayward@arm.com>
1779
1780 * Makefile.in: Add common directory in build.
1781 * configure.ac: Add common reference.
1782 * configure: Regenerate.
1783
de6242d3
MM
17842018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1785
1786 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1787 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1788 * spu-low.c (spu_target_ops): Likewise.
1789 * win32-low.c (win32_target_ops): Likewise.
1790 * server.c (supported_btrace_packets): Report packets unconditionally.
1791 * target.h (target_ops) <supports_btrace>: Remove.
1792 (target_supports_btrace): Remove.
1793
9ee23a85
MM
17942018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1795
1796 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1797 (handle_btrace_disable): Change return type to void. Use exceptions
1798 to report errors.
1799 (handle_btrace_general_set): Catch exception and copy message to
1800 return message.
1801
8ce47547
TT
18022018-02-08 Tom Tromey <tom@tromey.com>
1803
1804 * linux-low.c (install_software_single_step_breakpoints): Use
1805 make_scoped_restore.
1806 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1807 (do_restore_current_thread_cleanup): Remove.
1808 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1809 declare.
1810
45dd3607
TT
18112018-02-08 Tom Tromey <tom@tromey.com>
1812
1813 * mem-break.c (set_raw_breakpoint_at): Use
1814 gdb::unique_xmalloc_ptr.
1815
e671cd59
PA
18162018-01-30 Pedro Alves <palves@redhat.com>
1817
1818 PR gdb/13211
1819 * target.c (target_terminal::terminal_state): Rename to ...
1820 (target_terminal::m_terminal_state): ... this.
1821
a0aad537
JC
18222018-01-19 James Clarke <jrtc27@jrtc27.com>
1823
1824 * linux-low.c (handle_extended_wait): Surround call to
1825 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1826
4d9b86e1
SM
18272018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1828
1829 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1830 linux_ptrace_attach_fail_reason_string now returning an
1831 std::string.
1832 (linux_attach): Likewise.
1833 * thread-db.c (attach_thread): Likewise.
1834
f517c180
EA
18352018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1836
1837 PR gdb/21559
1838 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1839 checking for fs_base/gs_base fields in struct user_regs_struct.
1840 * configure: Regenerate.
1841
9a70f35c
YQ
18422018-01-16 Yao Qi <yao.qi@linaro.org>
1843
1844 PR gdb/18749
1845 * linux-low.c (fetch_register): Call supply_register instead of
1846 error.
1847
605fd3c6
YQ
18482018-01-08 Yao Qi <yao.qi@linaro.org>
1849 Simon Marchi <simon.marchi@ericsson.com>
1850
1851 * Makefile.in (OBS): Remove selftest.o.
1852 * configure.ac: Set srv_selftest_objs if $development is true.
1853 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1854 * configure: Re-generated.
1855 * server.c (captured_main): Wrap variable selftest_filter with
1856 GDB_SELF_TEST.
1857
2cc05030
SM
18582018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1859
1860 * server.c (parse_debug_format_options): Return std::string.
1861 (handle_monitor_command, captured_main): Adjust.
1862
e379cee6
PA
18632018-01-05 Pedro Alves <palves@redhat.com>
1864
1865 PR gdb/18653
1866 * server.c (captured_main): Pass quiet=false to
1867 save_original_signals_state.
1868
82e1e79a
JB
18692018-01-01 Joel Brobecker <brobecker@adacore.com>
1870
1871 * gdbreplay.c (gdbreplay_version): Update copyright year in
1872 version message.
1873 * server.c (gdbserver_version): Likewise.
1874
8e481c3b
TT
18752017-12-08 Tom Tromey <tom@tromey.com>
1876
1877 * ax.c (ax_printf): Update.
1878
a8806230
YQ
18792017-12-07 Yao Qi <yao.qi@linaro.org>
1880
1881 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1882 aarch64_linux_read_description.
1883 * linux-amd64-ipa.c (idx2mask): New array.
1884 (get_ipa_tdesc): Move idx2mask out.
1885 (initialize_low_tracepoint): Initialize target descriptions.
1886 * linux-i386-ipa.c (idx2mask): New array.
1887 (get_ipa_tdesc): Move idx2mask out.
1888 (initialize_low_tracepoint): Initialize target descriptions.
1889
d4a0e8b5
SM
18902017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1891
1892 * tdesc.c (struct tdesc_type): Change return type.
1893 (tdesc_add_flag): Change parameter type.
1894 (tdesc_add_bitfield): Likewise.
1895 (tdesc_add_field): Likewise.
1896 (tdesc_set_struct_size): Likewise.
1897
798a7429
SM
18982017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1899
1900 * regcache.c (registers_to_string): Remove unused variable.
1901
c0e15c9b
SM
19022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1903
1904 * inferiors.c (for_each_inferior_with_data): Remove.
1905 * inferiors.h (for_each_inferior_with_data): Remove.
1906 * server.c (handle_qxfer_threads_worker): Change parameter type.
1907 (handle_qxfer_threads_proper): Use for_each_thread.
1908
f0045347
SM
19092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1910
1911 * inferiors.c (for_each_inferior): Remove.
1912 (clear_inferiors): Use for_each_thread.
1913 * inferiors.h (for_each_inferior): Remove.
1914 * linux-low.c (linux_wait_for_event_filtered): Use
1915 for_each_thread.
1916 (linux_stabilize_threads): Likewise.
1917 * regcache.c (regcache_release): Likewise.
1918 * server.c (gdb_wants_all_threads_stopped): Likewise.
1919 (clear_pending_status_callback): Remove.
1920 (handle_status): Use for_each_thread.
1921 (captured_main): Likewise.
1922 * win32-low.c (child_init_thread_list): Likewise.
1923 (win32_clear_inferiors): Likewise.
1924 (fake_breakpoint_event): Likewise.
1925
9521758b
SM
19262017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1927
1928 * inferiors.h (find_inferior): Remove.
1929 * inferiors.c (find_inferior): Remove.
1930
8f86d7aa
SM
19312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1932
1933 * linux-low.c (resume_status_pending_p): Update comment.
1934 (need_step_over_p): Update comment.
1935
e2b44075
SM
19362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1937
1938 * linux-low.c (proceed_one_lwp): Return void, change parameter
1939 type.
1940 (unsuspend_and_proceed_one_lwp): Likewise.
1941 (proceed_all_lwps): Use for_each_thread.
1942 (unstop_all_lwps): Likewise.
1943
c80825ff
SM
19442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1945
1946 * linux-low.c (linux_resume_one_thread): Return void, take
1947 parameter directly.
1948 (linux_resume): Use for_each_thread.
1949
df3e4dbe
SM
19502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1951
1952 * linux-low.c (send_sigstop_callback): Return void, change
1953 parameter type. Rename to...
1954 (send_sigstop): ... this.
1955 (suspend_and_send_sigstop_callback): Return void, change parameter
1956 type. Rename to...
1957 (suspend_and_send_sigstop): ... this.
1958 (stop_all_lwps): Use for_each_thread.
1959
5a6b0a41
SM
19602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1961
1962 * linux-low.c (lwp_running): Return bool, remove unused
1963 argument.
1964 (linux_stabilize_threads): Use find_thread.
1965
39a64da5
SM
19662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1967
1968 * linux-low.c (select_singlestep_lwp_callback): Remove.
1969 (count_events_callback): Remove.
1970 (select_event_lwp_callback): Remove.
1971 (select_event_lwp): Use find_thread/for_each_thread.
1972
a1385b7b
SM
19732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1974
1975 * linux-low.c (not_stopped_callback): Return bool, take filter
1976 argument directly.
1977 (linux_wait_for_event_filtered): Use find_thread.
1978 (linux_wait_1): Likewise.
1979
454296a2
SM
19802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1981
1982 * linux-low.c (same_lwp): Remove.
1983 (find_lwp_pid): Use find_thread.
1984
6b2a85da
SM
19852017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1986
1987 * linux-low.c (delete_lwp_callback): Remove.
1988 (linux_mourn): Use for_each_thread.
1989
798a38e8
SM
19902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1991
1992 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1993 args parameter, don't check for pid.
1994 (linux_detach): Use for_each_thread.
1995
e4eb0dec
SM
19962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1997
1998 * linux-low.c (struct counter): Remove.
1999 (second_thread_of_pid_p): Remove.
2000 (last_thread_of_process_p): Use find_thread.
2001
83e1b6c1
SM
20022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2003
2004 * inferiors.c (find_inferior_in_random): Remove.
2005 * inferiors.h (find_inferior_in_random): Remove.
2006 * linux-low.c (status_pending_p_callback): Return bool, accept
2007 parameter ptid directly.
2008 (linux_wait_for_event_filtered): Use find_thread_in_random.
2009 (linux_wait_1): Likewise.
2010
8dc7b443
SM
20112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2012
2013 * inferiors.c (find_inferior_id): Remove.
2014 (find_thread_ptid): Move implemention from find_inferior_id to
2015 here.
2016 * inferiors.h (find_inferior_id): Remove.
2017 * server.c (handle_status): Use find_thread_ptid.
2018 (process_serial_event): Likewise.
2019 * thread-db.c (find_one_thread): Likewise.
2020 (thread_db_thread_handle): Likewise.
2021 * win32-low.c (thread_rec): Likewise.
2022 (child_delete_thread): Likewise.
2023 (win32_thread_alive): Likewise.
2024 (get_child_debug_event): Likewise.
2025
da25033c
SM
20262017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2027
2028 * linux-mips-low.c (update_watch_registers_callback): Return
2029 void, remove pid_p parameter, don't check for pid.
2030 (mips_insert_point, mips_remove_point): Use for_each_thread.
2031
c91bb56b
SM
20322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2033
2034 * lynx.low (lynx_delete_thread_callback): Remove.
2035 (lynx_mourn): Use for_each_thread.
2036
634a3254
SM
20372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2038
2039 * regcache.c (regcache_invalidate_one): Remove.
2040 (regcache_invalidate_pid): use for_each_thread.
2041
41272101
TT
20422017-11-26 Tom Tromey <tom@tromey.com>
2043
2044 * linux-low.c (linux_create_inferior): Update.
2045
f5291a6f
UW
20462017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2047
2048 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2049
6654d750
AH
20502017-11-24 Alan Hayward <alan.hayward@arm.com>
2051
2052 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2053 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2054 * linux-aarch64-tdesc-selftest.c: New file.
2055 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2056
20572017-11-24 Alan Hayward <alan.hayward@arm.com>
2058
2059 * configure.srv: Add new file.
2060 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2061 * linux-aarch64-tdesc-selftest.c: New file.
2062 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2063
49bdb7ee
AH
20642017-11-24 Alan Hayward <alan.hayward@arm.com>
2065
2066 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2067 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2068 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2069
d6d7ce56
AH
20702017-11-24 Alan Hayward <alan.hayward@arm.com>
2071
2072 * configure.srv: Add new files.
2073 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2074 aarch64_linux_read_description.
2075 * linux-aarch64-low.c (aarch64_linux_read_description):
2076 Merge with aarch64_arch_setup.
2077 (aarch64_arch_setup): Call aarch64_linux_read_description.
2078 * linux-aarch64-tdesc.c: New file.
2079 * linux-aarch64-tdesc.h: New file.
2080
506fe5f4
YQ
20812017-11-24 Yao Qi <yao.qi@linaro.org>
2082
2083 * configure.srv: Set $srv_regobj for tic6x-linux.
2084 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2085 (tic6x_read_description): Move some code to tic6x_arch_setup.
2086 (tic6x_tdesc_test): New function.
2087 (initialize_low_arch): Call selftests::register_test.
2088
29f9a567
YQ
20892017-11-22 Yao Qi <yao.qi@linaro.org>
2090
2091 * remote-utils.c (prepare_resume_reply): Use memcpy.
2092
578290ec
SM
20932017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2094
2095 * linux-low.c (kill_one_lwp_callback): Return void, take
2096 argument directly, don't filter on pid.
2097 (linux_kill): Use for_each_thread.
2098
eca55aec
SM
20992017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2100
2101 * linux-low.c (need_step_over_p): Return bool, remove dummy
2102 argument.
2103 (linux_resume, proceed_all_lwps): Use find_thread.
2104
25c28b4d
SM
21052017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2106
2107 * linux-low.c (resume_status_pending_p): Return bool, remove
2108 flag_p argument.
2109 (linux_resume): Use find_thread.
2110
5fdda392
SM
21112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2112
2113 * linux-low.c (struct thread_resume_array): Remove.
2114 (linux_set_resume_request): Return void, take arguments
2115 directly.
2116 (linux_resume): Use for_each_thread.
2117
fcb056a5
SM
21182017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2119
2120 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2121 return bool, remove data argument.
2122 (linux_stabilize_threads): Use find_thread.
2123
139720c5
SM
21242017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2125
2126 * linux-low.c (unsuspend_one_lwp): Remove.
2127 (unsuspend_all_lwps): Use for_each_thread, inline code from
2128 unsuspend_one_lwp.
2129
6d1e5673
SM
21302017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2131
2132 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2133 * linux-low.c (struct iterate_over_lwps_args): Remove.
2134 (iterate_over_lwps_filter): Remove.
2135 (iterate_over_lwps): Use find_thread.
2136
bbf550d5
SM
21372017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2138
2139 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2140 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2141 code from reset_lwp_ptrace_options_callback.
2142
00192f77
SM
21432017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2144
2145 * linux-arm-low.c (struct update_registers_data): Remove.
2146 (update_registers_callback): Return void, take arguments
2147 directly, don't check thread's pid.
2148 (arm_insert_point, arm_remove_point): Use for_each_thread.
2149
2bee2b6c
SM
21502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2151
2152 * win32-low.c (continue_one_thread): Return void, take argument
2153 directly.
2154 (child_continue): Use for_each_thread.
2155
0b360f19
SM
21562017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2157
2158 * win32-i386-low.c (update_debug_registers_callback): Rename
2159 to ...
2160 (update_debug_registers): ... this, return void, remove pid_p arg.
2161 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2162
f27866ba
SM
21632017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2164
2165 * inferiors.h (struct process_info): Add constructor, initialize
2166 fields..
2167 <syscalls_to_catch>: Change type to std::vector<int>.
2168 * inferiors.c (add_process): Allocate process_info with new.
2169 (remove_process): Free process_info with delete.
2170 * linux-low.c (handle_extended_wait): Adjust.
2171 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2172 * server.c (handle_general_set): Adjust.
2173
e849ea89
PA
21742017-11-16 Pedro Alves <palves@redhat.com>
2175
2176 * remote-utils.c (remote_close): Block SIGIO signals instead of
2177 uninstalling the SIGIO handler.
2178
1d0aa65c
AH
21792017-11-16 Alan Hayward <alan.hayward@arm.com>
2180
2181 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2182
3491a34c
YQ
21832017-11-16 Yao Qi <yao.qi@linaro.org>
2184
2185 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2186 (tic6x_store_gregset): Likewise.
2187 (tic6x_usrregs_info): Move it up.
2188
a602f924
AH
21892017-11-15 Alan Hayward <alan.hayward@arm.com>
2190
2191 * Makefile.in: Update arch rules.
2192 * configure.srv: Explicitly mark arch/ files.
2193
5616b6c3
AS
21942017-11-13 Andreas Schwab <schwab@suse.de>
2195
2196 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2197 function.
2198 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2199
d1928160
PA
22002017-11-06 Pedro Alves <palves@redhat.com>
2201
2202 * config.in, configure: Regenerate.
2203
bac608e7
SM
22042017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2205
2206 * target.c (struct thread_search): Remove.
2207 (thread_search_callback): Remove.
2208 (prepare_to_access_memory): Use for_each_thread instead of
2209 find_inferior. Inline code from thread_search_callback.
2210
eaddb425
SM
22112017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2212
2213 * server.c (struct visit_actioned_threads_data): Remove.
2214 (visit_actioned_threads): Change prototype to take arguments
2215 directly.
2216 (resume): Use find_thread instead of find_inferior.
2217
99078d34
SM
22182017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2219
2220 * server.c (queue_stop_reply_callback): Change prototype, return
2221 void.
2222 (find_status_pending_thread_callback): Remove.
2223 (handle_status): Replace find_inferior with find_thread and
2224 for_each_thread.
2225
cc628f3d
AH
22262017-10-25 Alan Hayward <alan.hayward@arm.com>
2227
2228 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2229 with REGNO.
2230 (aarch64_store_gregset): Likewise.
2231 (aarch64_fill_fpregset): Likewise.
2232 (aarch64_store_fpregset): Likewise.
2233
4d3bb80e
SM
22342017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2235
2236 * gdbthread.h (find_thread, for_each_thread): New functions.
2237 * inferiors.c (thread_of_pid): Remove.
2238 (find_any_thread_of_pid): Use find_thread.
2239 * linux-low.c (num_lwps): Use for_each_thread.
2240
7a7cdfa0
YQ
22412017-10-17 Yao Qi <yao.qi@linaro.org>
2242
2243 * Makefile.in: Remove one rule.
2244 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2245
e675d170
YQ
22462017-10-17 Yao Qi <yao.qi@linaro.org>
2247
2248 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2249 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2250
7eb4e0f9
YQ
22512017-10-17 Yao Qi <yao.qi@linaro.org>
2252
2253 * configure.srv: Rename arm.o with arch/arm.o.
2254
60d6cfc9
YQ
22552017-10-17 Yao Qi <yao.qi@linaro.org>
2256
2257 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2258 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2259 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2260 (arch-i386.o, arch-amd64.o): Remove rules.
2261 (arch/%.o): New rule.
2262 Update POSTCOMPILE and COMPILE.pre.
2263 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2264 * configure: Re-generated.
2265 * configure.srv: Replace arch-i386.o with arch/i386.o.
2266 Replace arch-amd64.o with arch/amd64.o.
2267
5bfda255
YQ
22682017-10-16 Yao Qi <yao.qi@linaro.org>
2269
2270 * configure: Regenerated.
2271
9c80ecd6
SM
22722017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2273
2274 * inferiors.h: (struct inferior_list): Remove.
2275 (struct inferior_list_entry); Remove.
2276 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2277 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2278 get_first_inferior): Remove.
2279 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2280 find_inferior_id, find_inferior_in_random): Change signature.
2281 * inferiors.c (all_threads): Change type to
2282 std::list<thread_info *>.
2283 (get_thread): Remove macro.
2284 (find_inferior, find_inferior_id): Change signature, implement
2285 using find_thread.
2286 (find_inferior_in_random): Change signature, implement using
2287 find_thread_in_random.
2288 (for_each_inferior, for_each_inferior_with_data): Change
2289 signature, implement using for_each_thread.
2290 (add_inferior_to_list, remove_inferior): Remove.
2291 (add_thread, get_first_thread, thread_of_pid,
2292 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2293 (get_first_inferior, one_inferior_p, clear_inferior_list):
2294 Remove.
2295 (clear_inferiors, get_thread_process): Update.
2296 * gdbthread.h: Include <list>.
2297 (struct thread_info) <entry>: Remove field.
2298 <id>: New field.
2299 (all_threads): Change type to std::list<thread_info *>.
2300 (get_first_inferior): Add doc.
2301 (find_thread, for_each_thread, find_thread_in_random): New
2302 functions.
2303 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2304 * linux-arm-low.c (update_registers_callback): Update.
2305 * linux-low.c (second_thread_of_pid_p): Update.
2306 (kill_one_lwp_callback, linux_detach_lwp_callback,
2307 delete_lwp_callback, status_pending_p_callback, same_lwp,
2308 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2309 iterate_over_lwps, not_stopped_callback,
2310 resume_stopped_resumed_lwps, count_events_callback,
2311 select_singlestep_lwp_callback, select_event_lwp_callback,
2312 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2313 suspend_and_send_sigstop_callback, wait_for_sigstop,
2314 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2315 lwp_running, linux_set_resume_request, resume_status_pending_p,
2316 need_step_over_p, start_step_over, linux_resume_one_thread,
2317 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2318 reset_lwp_ptrace_options_callback): Update.
2319 * linux-mips-low.c (update_watch_registers_callback): Update.
2320 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2321 Update.
2322 (free_register_cache_thread_one): Remove.
2323 (regcache_release): Update.
2324 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2325 handle_qxfer_threads_worker): Update.
2326 (handle_query): Update, use list iterator.
2327 (visit_actioned_threads, handle_pending_status,
2328 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2329 clear_pending_status_callback, set_pending_status_callback,
2330 find_status_pending_thread_callback, handle_status,
2331 process_serial_event): Update.
2332 * target.c (thread_search_callback): Update.
2333 * thread-db.c (thread_db_get_tls_address): Update.
2334 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2335 Update.
2336 * win32-i386-low.c (update_debug_registers_callback): Update.
2337 * win32-low.c (delete_thread_info, child_delete_thread,
2338 continue_one_thread, suspend_one_thread,
2339 get_child_debug_event): Adjust.
2340
9179355e
SM
23412017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2342
2343 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2344 * inferiors.h: Include <list>.
2345 (struct process_info) <entry>: Remove field.
2346 <pid>: New field.
2347 (pid_of): Change macro to function.
2348 (ptid_of, lwpid_of): Remove macro.
2349 (all_processes): Change type to std::list<process_info *>.
2350 (ALL_PROCESSES): Remove macro.
2351 (for_each_process, find_process): New function.
2352 * inferiors.c (all_processes): Change type to
2353 std::list<process_info *>.
2354 (find_thread_process): Adjust.
2355 (add_process): Likewise.
2356 (remove_process): Likewise.
2357 (find_process_pid): Likewise.
2358 (get_first_process): Likewise.
2359 (started_inferior_callback): Remove.
2360 (have_started_inferiors_p): Adjust.
2361 (attached_inferior_callback): Remove.
2362 (have_attached_inferiors_p): Adjust.
2363 * linux-low.c (check_zombie_leaders): Likewise.
2364 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2365 (x86_linux_update_xmltarget): Adjust.
2366 * server.c (handle_query): Likewise.
2367 (gdb_reattached_process): Remove.
2368 (handle_status): Adjust.
2369 (kill_inferior_callback): Likewise.
2370 (detach_or_kill_inferior): Remove.
2371 (print_started_pid): Likewise.
2372 (print_attached_pid): Likewise.
2373 (detach_or_kill_for_exit): Update.
2374 (process_serial_event): Likewise.
2375 * linux-arm-low.c (arm_new_fork): Likewise.
2376
c9cb8905
SM
23772017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2378
2379 * dll.h: Include <list>.
2380 (struct dll_info): Add constructor.
2381 <entry>: Remove field.
2382 (all_dlls): Change type to std::list<dll_info>.
2383 * dll.c: Include <algorithm>.
2384 (get_dll): Remove macro.
2385 (all_dlls): Change type to std::list<dll_info *>.
2386 (free_one_dll): Remove.
2387 (match_dll): Likewise.
2388 (loaded_dll): Adjust.
2389 (unloaded_dll): Adjust to all_dlls type change, use
2390 std::find_if. Inline code from match_dll.
2391 (clear_dlls): Adjust to all_dlls type change.
2392 * server.c (emit_dll_description): Remove.
2393 (handle_qxfer_libraries): Adjust to all_dlls type change,
2394 integrate emit_dll_description's functionality.
2395
04ec7890
SM
23962017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2397
2398 * linux-low.h (struct linux_target_ops) <delete_process>: New
2399 field.
2400 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2401 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2402 (struct linux_target_ops): Add delete_process callback.
2403 * linux-arm-low.c (arm_delete_process): New.
2404 (struct linux_target_ops): Add delete_process callback.
2405 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2406 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2407 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2408 * linux-mips-low.c (mips_linux_delete_process): New.
2409 (struct linux_target_ops): Add delete_process callback.
2410 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2411 * linux-s390-low.c (struct linux_target_ops): Likewise.
2412 * linux-sh-low.c (struct linux_target_ops): Likewise.
2413 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2414 * linux-tile-low.c (struct linux_target_ops): Likewise.
2415 * linux-x86-low.c (x86_linux_delete_process): New.
2416 (struct linux_target_ops): Add delete_process callback.
2417 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2418
466eecee
SM
24192017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2420
2421 * linux-aarch64-low.c (the_low_target): Add thread delete
2422 callback.
2423 * linux-arm-low.c (arm_delete_thread): New function.
2424 (the_low_target): Add thread delete callback.
2425 * linux-bfin-low.c (the_low_target): Likewise.
2426 * linux-crisv32-low.c (the_low_target): Likewise.
2427 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2428 set.
2429 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2430 field.
2431 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2432 * linux-mips-low.c (mips_linux_delete_thread): New function.
2433 (the_low_target): Add thread delete callback.
2434 * linux-ppc-low.c (the_low_target): Likewise.
2435 * linux-s390-low.c (the_low_target): Likewise.
2436 * linux-sh-low.c (the_low_target): Likewise.
2437 * linux-tic6x-low.c (the_low_target): Likewise.
2438 * linux-tile-low.c (the_low_target): Likewise.
2439 * linux-x86-low.c (the_low_target): Likewise.
2440 * linux-xtensa-low.c (the_low_target): Likewise.
2441
b79f7801
YZ
24422017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2443
2444 * win32-low.c: Include "common-inferior.h".
2445
bc3b087d
SDJ
24462017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2447
2448 * inferiors.c (set_inferior_cwd): New function.
2449 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2450 (handle_query): Inform that QSetWorkingDir is supported.
2451 * win32-low.c (create_process): Pass the inferior's cwd to
2452 CreateProcess.
2453
d092c5a2
SDJ
24542017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2455
2456 * inferiors.c (current_inferior_cwd): New global variable.
2457 (get_inferior_cwd): New function.
2458 * inferiors.h (struct process_info) <cwd>: New field.
2459
7da0a886
SDJ
24602017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2461
2462 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2463 (OBS): Add gdb_tilde_expand.o.
2464
289a6840
SM
24652017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2466
2467 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2468 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2469
256642e8
PA
24702017-09-29 Pedro Alves <palves@redhat.com>
2471
2472 * ax.c (gdb_parse_agent_expr): Constify.
2473 * ax.h (gdb_parse_agent_expr): Constify.
2474 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2475 Constify.
2476 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2477 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2478 * remote-utils.h (read_ptid): Constify.
2479 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2480 (process_point_options, process_serial_event): Constify.
2481 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2482 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2483 (cmd_qtbuffer): Constify.
2484
5b9ca4d4
PA
24852017-09-29 Pedro Alves <palves@redhat.com>
2486
2487 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2488 fails.
2489
94c207e0
PA
24902017-09-29 Pedro Alves <palves@redhat.com>
2491
2492 * linux-low.c (handle_extended_wait): Pass parent thread instead
2493 of process to thread_db_notice_clone.
2494 * linux-low.h (thread_db_notice_clone): Replace parent process
2495 parameter with parent thread parameter.
2496 * thread-db.c (find_one_thread): Add comment.
2497 (thread_db_notice_clone): Replace parent process parameter with
2498 parent thread parameter. Temporarily switch to the parent thread.
2499
75352e28
SDJ
25002017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2501
2502 * gdbthread.h: Include "common-gdbthread.h".
2503 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2504 "if" when validating the ptid.
2505 * remote-utils.c: Include "gdbthread.h".
2506 (prepare_resume_reply): Use "switch_to_thread".
2507 * target.c (done_accessing_memory): Likewise.
2508
ad339634
AA
25092017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2510
2511 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2512 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2513 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2514 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2515 s390x-gs-linux64-ipa.o to ipa_obj.
2516 * linux-s390-low.c (HWCAP_S390_GS): New define.
2517 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2518 New functions.
2519 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2520 (s390_arch_setup): Check for guarded-storage support and choose
2521 appropriate tdesc.
2522 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2523 init_registers_s390x_gs_linux64.
2524 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2525 enum value.
2526 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2527 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2528
cc4d742f
SM
25292017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2530
2531 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2532
f6327dcb
KB
25332017-09-21 Kevin Buettner <kevinb@redhat.com>
2534
2535 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2536 (thread_db_thread_handle): Declare.
2537 * linux-low.c (linux_target_ops): Initialize thread_handle.
2538 * server.c (handle_qxfer_threads_worker): Add support for
2539 "handle" attribute.
2540 * target.h (struct target_ops): Add new function pointer,
2541 thread_handle.
2542 (target_thread_handle): Define.
2543 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2544 field in lwp.
2545 (thread_db_thread_handle): New function.
2546
86299109
KB
25472017-09-21 Kevin Buettner <kevinb@redhat.com>
2548
2549 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2550 * linux-low.h (thread_db_notice_clone): Declare.
2551 * thread-db.c (thread_db_notice_clone): New function.
2552
f557a88a
PA
25532017-09-21 Pedro Alves <palves@redhat.com>
2554
2555 * server.c (gdb_read_memory, handle_status, process_serial_event)
2556 (handle_serial_event, handle_target_event): Adjust to
2557 set_desired_thread prototype change.
2558 * target.c (set_desired_thread): Remove 'use_general' parameter
2559 and adjust.
2560 * target.h (set_desired_thread): Remove 'use_general' parameter.
2561
223ffa71
TT
25622017-09-20 Tom Tromey <tom@tromey.com>
2563
2564 * target.c (target_terminal::terminal_state): Define.
2565 (target_terminal::init): Rename from target_terminal_init.
2566 (target_terminal::inferior): Rename from
2567 target_terminal_inferior.
2568 (target_terminal::ours): Rename from target_terminal_ours.
2569 (target_terminal::ours_for_output, target_terminal::info): New.
2570
04fd3ba9
SM
25712017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2572
2573 * server.c (accumulate_file_name_length): Remove.
2574 (emit_dll_description): Adjust to std::string change.
2575 (handle_qxfer_libraries): Use std::string to hold document.
2576
5e187554
SM
25772017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2578
2579 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2580 return type of xml_escape_text.
2581 * server.c (emit_dll_description): Likewise.
2582
1526853e
SM
25832017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2584
2585 * server.c (captured_main): Accept argument for --selftest.
2586 Update run_tests call.
2587 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2588 when registering selftests.
2589
c4dfafab
SDJ
25902017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2591
2592 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2593 instead of "VEC" for "target_desc.reg_defs".
2594 (regcache_cpy): Likewise.
2595 (registers_to_string): Likewise.
2596 (registers_from_string): Likewise.
2597 (find_regno): Likewise.
2598 (supply_regblock): Likewise.
2599 (regcache_raw_read_unsigned): Likewise.
2600 * tdesc.c (init_target_desc): Likewise.
2601 (tdesc_create_reg): Likewise.
2602 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2603 (struct target_desc) <reg_defs>: Convert to "std::vector".
2604 (target_desc): Do not initialize "reg_defs".
2605 (~target_desc): Update code to use "std::vector" instead of "VEC"
2606 for "target_desc.reg_defs".
2607 (operator==): Likewise.
2608
124aceb4
SM
26092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2610
2611 * inferiors.h (thread_to_gdb_id): Remove.
2612 * inferiors.c (thread_to_gdb_id): Remove.
2613 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2614 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2615 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2616 Likewise.
2617 * nto-low.c (nto_fetch_registers, nto_store_registers,
2618 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2619
96cde54f
SM
26202017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2621
2622 * inferiors.h (gdb_id_to_thread_id): Remove.
2623 * inferiors.c (gdb_id_to_thread_id): Remove.
2624 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2625 removal. Move pid declaration closer to where it's used.
2626
e8ca139e
SM
26272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2628
2629 * server.c (handle_detach): New function.
2630 (process_serial_event): Move code out, call handle_detach.
2631
f8a4e119
SM
26322017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2633
2634 * server.c (require_running): Rename to ...
2635 (require_running_or_return): ... this ...
2636 (require_running_or_break): ... and this.
2637 (handle_query, process_serial_event): Adjust.
2638
0eb0a407
SM
26392017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2640
2641 * linux-low.c (linux_set_resume_request): Remove unused
2642 variables.
2643
785922a5
SM
26442017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2645
2646 * server.c (first_thread_of): Remove.
2647 (process_serial_event): Replace usage of first_thread_of with
2648 find_any_thread_of_pid.
2649 * tracepoint.c (same_process_p): Remove.
2650 (gdb_agent_about_to_close): Replace usage of same_process_p with
2651 find_any_thread_of_pid.
2652 * linux-x86-low.c (same_process_callback): Remove.
2653 (x86_arch_setup_process_callback): Replace usage of
2654 same_process_callback with find_any_thread_of_pid.
2655 * thread-db.c (any_thread_of): Remove.
2656 (switch_to_process): Replace usage of any_thread_of with
2657 find_any_thread_of_pid.
2658 * inferiors.c (thread_pid_matches_callback): Remove.
2659 (find_thread_process): Adjust to use find_any_thread_of_pid.
2660
a059f00c
SDJ
26612017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2662
2663 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2664 with "!VEC_empty".
a059f00c 2665
cc397f3a
SDJ
26662017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2667
2668 * linux-low.c (handle_extended_wait): Use
2669 "allocate_target_description" instead of "XNEW".
2670 * linux-x86-low.c (initialize_low_arch): Likewise.
2671
22916b07
YQ
26722017-09-05 Yao Qi <yao.qi@linaro.org>
2673
2674 * configure.srv (srv_i386_regobj): Remove.
2675 (srv_amd64_regobj): Remove.
2676 (srv_regobj): Set it to "" for x86 non-linux targets.
2677 * linux-x86-tdesc.c (i386_linux_read_description):
2678 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2679 (init_registers_i386): Remove the declaration.
2680 (tdesc_i386): Remove the declaration.
2681 (lynx_i386_arch_setup): Call i386_create_target_description.
2682 * nto-x86-low.c: Likewise.
2683 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2684 [!__x86_64__]: include arch/i386.h.
2685 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2686
38602d55
YQ
26872017-09-05 Yao Qi <yao.qi@linaro.org>
2688
2689 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2690 i386/amd64-XXX-linux from it.
2691
44b886ff
YQ
26922017-09-05 Yao Qi <yao.qi@linaro.org>
2693
2694 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2695 false.
2696 (ipa_amd64_linux_regobj): Remove.
2697 (ipa_x32_linux_regobj): Remove.
2698
b4570e4b
YQ
26992017-09-05 Yao Qi <yao.qi@linaro.org>
2700
2701 * Makefile.in (arch-amd64.o): New rule.
2702 * configure.srv: Append arch-amd64.o.
2703 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2704 (get_ipa_tdesc): Call amd64_linux_read_description.
2705 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2706 and init_registers_amd64_XXX.
2707 * linux-x86-low.c (x86_linux_read_description): Call
2708 amd64_linux_read_description.
2709 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2710 (initialize_low_arch): Don't call init_registers_x32_XXX and
2711 init_registers_amd64_XXX.
2712 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2713 and tdesc_amd64_XXX.
2714 [__x86_64__] (amd64_tdesc_test): New function.
2715 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2716 and init_registers_amd64_XXX.
2717 * linux-x86-tdesc.c: Include arch/amd64.h.
2718 (xcr0_to_tdesc_idx): New function.
2719 (i386_linux_read_description): New function.
2720 (amd64_get_ipa_tdesc_idx): New function.
2721 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2722 (amd64_get_ipa_tdesc): Declare.
2723
d1f28ea2
YQ
27242017-09-05 Yao Qi <yao.qi@linaro.org>
2725
2726 * configure.srv (srv_i386_linux_xmlfiles): Remove
2727 i386/i386-XXX-linux.xml from it.
2728
25a93583
YQ
27292017-09-05 Yao Qi <yao.qi@linaro.org>
2730
2731 * configure.srv: Set srv_i386_linux_regobj empty if $development
2732 is false.
2733 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2734 initialize_low_tdesc.
2735 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2736 with #if initialize_low_tdesc.
2737 * linux-x86-tdesc-selftest.c: New file.
2738 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2739
5f035c07
YQ
27402017-09-05 Yao Qi <yao.qi@linaro.org>
2741
2742 * Makefile.in (arch-i386.o): New rule.
2743 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2744 (x86_64-*-linux*): Likewise.
2745 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2746 include arch/i386.h.
2747 (i386_linux_read_description): Remove code and call
2748 i386_create_target_description.
2749 * tdesc.c (allocate_target_description): New function.
2750 * tdesc.h (set_tdesc_architecture): Remove declaration.
2751 (set_tdesc_osabi): Likewise.
2752
0abe8a89
YQ
27532017-09-05 Yao Qi <yao.qi@linaro.org>
2754
2755 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2756 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2757 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2758 .xmltarget.
2759 * server.c (get_features_xml): Call tdesc_get_features_xml.
2760 * tdesc.c (set_tdesc_architecture): New function.
2761 (set_tdesc_osabi): New function.
2762 (tdesc_get_features_xml): New function.
2763 (tdesc_create_feature): Add an argument.
2764 * tdesc.h (struct target_desc) <features>: New field.
2765 <arch, osabi>: New field.
2766 (~target_desc): xfree features, arch, and osabi.
2767 (target_desc::oerator==): Don't compare .xmltarget.
2768 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2769 (set_tdesc_osabi): Likewise.
2770 (tdesc_get_features_xml): Likewise.
2771
0a188386
YQ
27722017-09-05 Yao Qi <yao.qi@linaro.org>
2773
2774 * linux-x86-tdesc.c: Include selftest.h.
2775 (i386_tdesc_test): New function.
2776 (initialize_low_tdesc): Call selftests::register_test.
2777 * tdesc.h: Include regdef.h.
2778 (target_desc): Override operator == and !=.
2779
f49ff000
YQ
27802017-09-05 Yao Qi <yao.qi@linaro.org>
2781
2782 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2783 (ipa_obj): Likewise.
2784 * linux-i386-ipa.c: Include common/x86-xstate.h
2785 (get_ipa_tdesc): Call i386_linux_read_description.
2786 (initialize_low_tracepoint): Don't call init_registers_XXX
2787 functions, call initialize_low_tdesc instead.
2788 * linux-x86-low.c (x86_linux_read_description): Call
2789 i386_linux_read_description.
2790 (initialize_low_arch): Don't call init_registers_i386_XXX
2791 functions, call initialize_low_tdesc.
2792 * linux-x86-tdesc.c: New file.
2793 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2794 (i386_get_ipa_tdesc_idx): Declare.
2795 (i386_get_ipa_tdesc): Declare.
2796 (initialize_low_tdesc): Declare.
2797
2b68ef2f
YQ
27982017-09-05 Yao Qi <yao.qi@linaro.org>
2799
2800 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2801 instead of 0.
2802
f7000548
YQ
28032017-09-05 Yao Qi <yao.qi@linaro.org>
2804
2805 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2806 * regcache.c (get_thread_regcache): Use VEC_length.
2807 (init_register_cache): Likewise.
2808 (regcache_cpy): Likewise.
2809 (registers_to_string): Iterate reg_defs via VEC_iterate.
2810 (find_regno): Likewise.
2811 (find_register_by_number): Use VEC_index.
2812 (register_size): Call find_register_by_number.
2813 (register_data): Call find_register_by_number.
2814 (supply_regblock): Use VEC_length.
2815 (regcache_raw_read_unsigned): Likewise.
2816 * tdesc.c (init_target_desc): Iterate reg_defs via
2817 VEC_iterate.
2818 (default_description): Update initializer.
2819 (copy_target_description): Don't update field num_registers.
2820 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2821 <num_registers>: Remove.
2822
50a421ac
SM
28232017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2824
2825 * Makefile.in (.SECONDARY): Define target.
2826
23fdd69e
SM
28272017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2828
2829 * linux-low.c (linux_wait_1): Adjust.
2830 * server.c (queue_stop_reply_callback): Adjust.
2831
0a2dde4a
SDJ
28322017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2833
2834 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2835 QEnvironmentUnset and QEnvironmentReset packets.
2836 (handle_query): Inform remote that QEnvironmentHexEncoded,
2837 QEnvironmentUnset and QEnvironmentReset are supported.
2838
6afd337d
SM
28392017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2840
2841 * inferiors.h (inferior_target_data): Rename to ...
2842 (thread_target_data): ... this.
2843 (inferior_regcache_data): Rename to ...
2844 (thread_regcache_data): ... this.
2845 (set_inferior_regcache_data): Rename to ...
2846 (set_thread_regcache_data): ... this.
2847 * inferiors.c (inferior_target_data): Rename to ...
2848 (thread_target_data): ... this.
2849 (inferior_regcache_data): Rename to ...
2850 (thread_regcache_data): ... this.
2851 (set_inferior_regcache_data): Rename to ...
2852 (set_thread_regcache_data): ... this.
2853 (free_one_thread): Update.
2854 * linux-low.h (get_thread_lwp): Update.
2855 * regcache.c (get_thread_regcache): Update.
2856 (regcache_invalidate_thread): Update.
2857 (free_register_cache_thread): Update.
2858 * win32-i386-low.c (update_debug_registers_callback): Update.
2859 (win32_get_current_dr): Update.
2860 * win32-low.c (thread_rec): Update.
2861 (delete_thread_info): Update.
2862 (continue_one_thread): Update.
2863 (suspend_one_thread): Update.
2864
a160cc46
SM
28652017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2866
2867 * inferiors.c (set_inferior_target_data): Remove.
2868 * inferiors.h (set_inferior_target_data): Remove.
2869
6d580b63
YQ
28702017-08-18 Yao Qi <yao.qi@linaro.org>
2871
2872 * Makefile.in (OBS): Add selftest.o.
2873 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2874 * configure, config.in: Re-generated.
2875 * server.c: Include common/sefltest.h.
2876 (captured_main): Handle option --selftest.
2877
f5a29eb0
YQ
28782017-08-09 Yao Qi <yao.qi@linaro.org>
2879
2880 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2881 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2882 i386-avx-mpx.o and i386-mmx.o.
2883 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2884 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2885 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2886 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2887 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2888 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2889 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2890 i386/amd64-avx-mpx.xml.
2891
57757c2f
YQ
28922017-08-09 Yao Qi <yao.qi@linaro.org>
2893
2894 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2895 and x32-avx-avx512.o.
2896 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2897 i386/x32-avx-avx512.xml.
2898
229d26fc
SM
28992017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2900
2901 * tracepoint.h (enum class fast_tpoint_collect_result): New
2902 enumeration.
2903 (fast_tracepoint_collecting): Change return type to
2904 fast_tpoint_collect_result.
2905 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2906 * linux-low.h: Include tracepoint.h.
2907 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2908 fast_tpoint_collect_result.
2909 * linux-low.c (handle_tracepoints): Adjust.
2910 (linux_fast_tracepoint_collecting): Change return type to
2911 fast_tpoint_collect_result.
2912 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2913 linux_wait_1, stuck_in_jump_pad_callback,
2914 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2915 proceed_one_lwp): Adjust to type change.
2916
2e1e43e1
YQ
29172017-07-10 Yao Qi <yao.qi@linaro.org>
2918
2919 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2920
adc764e7
YQ
29212017-06-29 Yao Qi <yao.qi@linaro.org>
2922
2923 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2924 Remove.
2925 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2926
a206891a
SM
29272017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2928
2929 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2930
9a6c7d9c
SDJ
29312017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2932
2933 * linux-low.c (linux_create_inferior): Adjust code to access the
2934 environment information via 'gdb_environ' class.
2935 * lynx-low.c (lynx_create_inferior): Likewise.
2936 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2937 (get_environ): Return a pointer to 'our_environ'.
2938 (captured_main): Initialize 'our_environ'.
2939 * server.h (get_environ): Adjust prototype.
2940 * spu-low.c (spu_create_inferior): Adjust code to access the
2941 environment information via 'gdb_environ' class.
2942
ae3e2ccf
SM
29432017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2944
2945 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2946 usage of "register" keyword.
2947
3e019bdc
SM
29482017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2949
2950 * configure: Re-generate.
2951
8465943a
SM
29522017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2953
2954 * configure: Re-generate.
2955
cf0dd6f0
SM
29562017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2957
2958 * Makefile.in (COMPILE.pre): Add "-x c++".
2959
9845682b
SDJ
29602017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2961
2962 * fork-child.c: Conditionally include <signal.h>.
2963
aefd8b33
SDJ
29642017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2965
2966 * server.c (handle_general_set): Handle new packet
2967 "QStartupWithShell".
2968 (handle_query): Add "QStartupWithShell" to the list of supported
2969 packets.
2970 (gdbserver_usage): Add help text explaining the
2971 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2972 options.
2973 (captured_main): Recognize and act upon the presence of the new
2974 CLI options.
2975
2090129c
SDJ
29762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2977 Pedro Alves <palves@redhat.com>
2978
2979 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2980 * configure: Regenerate.
2981 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2982 "fork-inferior.o".
2983 (i[34567]86-*-lynxos*): Likewise.
2984 (spu*-*-*): Likewise.
2985 * fork-child.c: New file.
2986 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2987 and "environ.h".
2988 (linux_ptrace_fun): New function.
2989 (linux_create_inferior): Adjust function prototype to reflect
2990 change on "target.h". Adjust function code to use
2991 "fork_inferior".
2992 (linux_request_interrupt): Delete "signal_pid".
2993 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2994 (lynx_ptrace_fun): New function.
2995 (lynx_create_inferior): Adjust function prototype to reflect
2996 change on "target.h". Adjust function code to use
2997 "fork_inferior".
2998 * nto-low.c (nto_create_inferior): Adjust function prototype and
2999 code to reflect change on "target.h". Update comments.
3000 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3001 "common-terminal.h" and "environ.h".
3002 (terminal_fd): Moved to fork-child.c.
3003 (old_foreground_pgrp): Likewise.
3004 (restore_old_foreground_pgrp): Likewise.
3005 (last_status): Make it global.
3006 (last_ptid): Likewise.
3007 (our_environ): New variable.
3008 (startup_with_shell): Likewise.
3009 (program_name): Likewise.
3010 (program_argv): Rename to...
3011 (program_args): ...this.
3012 (wrapper_argv): New variable.
3013 (start_inferior): Delete function.
3014 (get_exec_wrapper): New function.
3015 (get_exec_file): Likewise.
3016 (get_environ): Likewise.
3017 (prefork_hook): Likewise.
3018 (post_fork_inferior): Likewise.
3019 (postfork_hook): Likewise.
3020 (postfork_child_hook): Likewise.
3021 (handle_v_run): Update code to deal with arguments coming from the
3022 remote host. Update calls from "start_inferior" to
3023 "create_inferior".
3024 (captured_main): Likewise. Initialize environment variable. Call
3025 "have_job_control".
3026 * server.h (post_fork_inferior): New prototype.
3027 (get_environ): Likewise.
3028 (last_status): Declare.
3029 (last_ptid): Likewise.
3030 (signal_pid): Likewise.
3031 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3032 (spu_ptrace_fun): New function.
3033 (spu_create_inferior): Adjust function prototype to reflect change
3034 on "target.h". Adjust function code to use "fork_inferior".
3035 * target.c (target_terminal_init): New function.
3036 (target_terminal_inferior): Likewise.
3037 (target_terminal_ours): Likewise.
3038 * target.h: Include <vector>.
3039 (struct target_ops) <create_inferior>: Update prototype.
3040 (create_inferior): Update macro.
3041 * utils.c (gdb_flush_out_err): New function.
3042 * win32-low.c (win32_create_inferior): Adjust function prototype
3043 and code to reflect change on "target.h".
3044
043a4934
SDJ
30452017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3046
3047 * inferiors.c (switch_to_thread): New function.
3048
15652511
SDJ
30492017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3050
3051 * Makefile.in (SFILE): Add "common/job-control.c".
3052 (OBS): Add "job-control.o".
3053
21ea5acd
SDJ
30542017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3055
3056 * Makefile: Remove "@host_makefile_frag@".
3057
e13cb306
PA
30582017-05-05 Pedro Alves <palves@redhat.com>
3059
3060 * configure: Regenerate.
3061
c94fee56
SDJ
30622017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3063
3064 * configure: Regenerate.
3065
a0ff9e1a
SM
30662017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3067
3068 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3069 software_single_step change of return type to
3070 std::vector<CORE_ADDR>.
3071 * linux-low.c (install_software_single_step_breakpoints):
3072 Likewise.
3073 * linux-low.h (install_software_single_step_breakpoints):
3074 Likewise.
3075
be628ab8
SDJ
30762017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3077
3078 * remote-utils.c: Include "gdb_termios.h" instead of
3079 "terminal.h".
3080 * terminal.h: Delete file.
3081
7c5ded6a
SDJ
30822017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3083
3084 * server.c: Include <vector>.
3085 <program_argv, wrapper_argv>: Convert to std::vector.
3086 (start_inferior): Rewrite function to use C++.
3087 (handle_v_run): Likewise. Update code that calculates the argv
3088 based on the vRun packet; use C++.
3089 (captured_main): Likewise.
3090
436252de
SM
30912017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3092
3093 * server.c (handle_v_cont): Initialize thread_resume::thread
3094 with null_ptid.
3095
9bf2a700
PA
30962017-04-05 Pedro Alves <palves@redhat.com>
3097
3098 * configure: Regenerate.
3099
a121b7c1
PA
31002017-04-05 Pedro Alves <palves@redhat.com>
3101
3102 * gdbreplay.c (sync_error): Constify.
3103 * linux-x86-low.c (push_opcode): Constify.
3104
21c8a587
PA
31052017-04-05 Pedro Alves <palves@redhat.com>
3106
3107 * win32-low.c (get_child_debug_event)
3108 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3109 Report TARGET_WAITKIND_SPURIOUS instead.
3110
fb32b4f7
PA
31112017-04-05 Pedro Alves <palves@redhat.com>
3112
e79be6e5
SM
3113 * remote-utils.c (remote_prepare, remote_open): Constify.
3114 * remote-utils.h (remote_prepare, remote_open): Constify.
3115 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3116
65dd1e59
SM
31172017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3118
3119 * Makefile.in (clean): Clear .deps.
3120
8fa5b777
SM
31212017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3122
3123 * .gitignore: Remove generated files, replace with wildcard.
3124 * (clean): Replace removal of generated files with wildcard.
3125 (version.c): Replace with...
3126 (version-generated.c): ...this.
3127 (xml-builtin.c): Replace with...
3128 (xml-builtin-generated.c): ...this.
3129 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3130 (%.c: *regformats*): Replace with...
3131 (%-generated.c: *regformats*): ...this.
3132
a12e714b
MF
31332017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3134
3135 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3136 (xtensa_fill_gregset): Call collect_register_by_name for
3137 threadptr register.
3138 (xtensa_store_gregset): Call supply_register_by_name for
3139 threadptr register.
3140
1a09b50a
MF
31412017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3142
3143 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3144 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3145 (xtensa_store_gregset): Call supply_register for all registers in
3146 a0_regnum..a0_regnum + C0_NREGS range.
3147
1a01e7c6
SM
31482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3149
3150 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3151 (ax-ipa.o: ax.c): Remove.
3152 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3153 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3154 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3155 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3156 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3157
36bc18a8
SM
31582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3159
3160 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3161 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3162 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3163 (errors-ipa.o: ../common/errors.c): Remove.
3164 (format-ipa.o: ../common/format.c): Remove.
3165 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3166
a8ebe3d5
SM
31672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3168
3169 * Makefile.in (%-ipa.o: %.c): New rule.
3170 (tracepoint-ipa.o: tracepoint.c): Remove.
3171 (utils-ipa.o: utils.c): Remove.
3172 (remote-utils-ipa.o: remote-utils.c): Remove.
3173 (regcache-ipa.o: regcache.c): Remove.
3174 (i386-linux-ipa.o: i386-linux.c): Remove.
3175 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3176 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3177 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3178 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3179 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3180 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3181 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3182 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3183 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3184 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3185 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3186 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3187 (aarch64-ipa.o: aarch64.c): Remove.
3188 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3189 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3190 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3191 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3192 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3193 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3194 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3195 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3196 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3197 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3198 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3199 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3200 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3201 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3202 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3203 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3204 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3205 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3206 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3207 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3208 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3209 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3210 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3211 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3212 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3213 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3214 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3215 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3216 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3217 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3218 (tdesc-ipa.o: tdesc.c): Remove.
3219 (x32-linux-ipa.o: x32-linux.c): Remove.
3220 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3221 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3222
50cfacb7
SM
32232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3224
3225 * Makefile.in (%.o: ../arch/%.c): New rule.
3226 (arm.o: ../arch/arm.c): Remove.
3227 (arm-linux.o: ../arch/arm-linux.c): Remove.
3228 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3229 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3230
c5a22423
SM
32312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3232
3233 * Makefile.in (%.o: ../nat/%.c): New rule.
3234 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3235 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3236 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3237 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3238 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3239 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3240 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3241 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3242 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3243 (linux-personality.o: ../nat/linux-personality.c): Remove.
3244 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3245 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3246 (x86-linux.o: ../nat/x86-linux.c): Remove.
3247 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3248 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3249
6bda016b
SM
32502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3251
3252 * Makefile.in (%.o: ../common/%.c): New rule.
3253 (signals.o: ../common/signals.c): Remove.
3254 (print-utils.o: ../common/print-utils.c): Remove.
3255 (rsp-low.o: ../common/rsp-low.c): Remove.
3256 (common-utils.o: ../common/common-utils.c): Remove.
3257 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3258 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3259 (vec.o: ../common/vec.c): Remove.
3260 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3261 (xml-utils.o: ../common/xml-utils.c): Remove.
3262 (ptid.o: ../common/ptid.c): Remove.
3263 (buffer.o: ../common/buffer.c): Remove.
3264 (format.o: ../common/format.c): Remove.
3265 (filestuff.o: ../common/filestuff.c): Remove.
3266 (agent.o: ../common/agent.c): Remove.
3267 (errors.o: ../common/errors.c): Remove.
3268 (environ.o: ../common/environ.c): Remove.
3269 (common-debug.o: ../common/common-debug.c): Remove.
3270 (cleanups.o: ../common/cleanups.c): Remove.
3271 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3272 (fileio.o: ../common/fileio.c): Remove.
3273 (common-regcache.o: ../common/common-regcache.c): Remove.
3274 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3275 (new-op.o: ../common/new-op.c): Remove.
3276 (btrace-common.o: ../common/btrace-common.c): Remove.
3277
21122961
SM
32782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3279
3280 * Makefile.in (%.o: ../target/%.c): New rule.
3281 (waitstatus.o: ../target/waitstatus.c): Remove.
3282
c362e621
SM
32832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3284
3285 * Makefile.in
3286 (%.c: ../regformats/%.dat,
3287 (%.c: ../regformats/arm/%.dat,
3288 (%.c: ../regformats/i386/%.dat,
3289 (%.c: ../regformats/rs6000/%.dat): New rules.
3290 (aarch64.c): Remove.
3291 (reg-arm.c): Remove.
3292 (arm-with-iwmmxt.c): Remove.
3293 (arm-with-vfpv2.c): Remove.
3294 (arm-with-vfpv3.c): Remove.
3295 (arm-with-neon.c): Remove.
3296 (reg-bfin.c): Remove.
3297 (reg-cris.c): Remove.
3298 (reg-crisv32.c): Remove.
3299 (i386.c): Remove.
3300 (i386-linux.c): Remove.
3301 (i386-avx.c): Remove.
3302 (i386-avx-linux.c): Remove.
3303 (i386-avx-avx512.c): Remove.
3304 (i386-avx-avx512-linux.c): Remove.
3305 (i386-mpx.c): Remove.
3306 (i386-mpx-linux.c): Remove.
3307 (i386-avx-mpx-avx512-pku.c): Remove.
3308 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3309 (i386-avx-mpx.c): Remove.
3310 (i386-avx-mpx-linux.c): Remove.
3311 (i386-mmx.c): Remove.
3312 (i386-mmx-linux.c): Remove.
3313 (reg-ia64.c): Remove.
3314 (reg-m32r.c): Remove.
3315 (reg-m68k.c): Remove.
3316 (reg-cf.c): Remove.
3317 (mips-linux.c): Remove.
3318 (mips-dsp-linux.c): Remove.
3319 (mips64-linux.c): Remove.
3320 (mips64-dsp-linux.c): Remove.
3321 (nios2-linux.c): Remove.
3322 (powerpc-32.c): Remove.
3323 (powerpc-32l.c): Remove.
3324 (powerpc-altivec32l.c): Remove.
3325 (powerpc-cell32l.c): Remove.
3326 (powerpc-vsx32l.c): Remove.
3327 (powerpc-isa205-32l.c): Remove.
3328 (powerpc-isa205-altivec32l.c): Remove.
3329 (powerpc-isa205-vsx32l.c): Remove.
3330 (powerpc-e500l.c): Remove.
3331 (powerpc-64l.c): Remove.
3332 (powerpc-altivec64l.c): Remove.
3333 (powerpc-cell64l.c): Remove.
3334 (powerpc-vsx64l.c): Remove.
3335 (powerpc-isa205-64l.c): Remove.
3336 (powerpc-isa205-altivec64l.c): Remove.
3337 (powerpc-isa205-vsx64l.c): Remove.
3338 (s390-linux32.c): Remove.
3339 (s390-linux32v1.c): Remove.
3340 (s390-linux32v2.c): Remove.
3341 (s390-linux64.c): Remove.
3342 (s390-linux64v1.c): Remove.
3343 (s390-linux64v2.c): Remove.
3344 (s390-te-linux64.c): Remove.
3345 (s390-vx-linux64.c): Remove.
3346 (s390-tevx-linux64.c): Remove.
3347 (s390x-linux64.c): Remove.
3348 (s390x-linux64v1.c): Remove.
3349 (s390x-linux64v2.c): Remove.
3350 (s390x-te-linux64.c): Remove.
3351 (s390x-vx-linux64.c): Remove.
3352 (s390x-tevx-linux64.c): Remove.
3353 (tic6x-c64xp-linux.c): Remove.
3354 (tic6x-c64x-linux.c): Remove.
3355 (tic6x-c62x-linux.c): Remove.
3356 (reg-sh.c): Remove.
3357 (reg-sparc64.c): Remove.
3358 (reg-spu.c): Remove.
3359 (amd64.c): Remove.
3360 (amd64-linux.c): Remove.
3361 (amd64-avx.c): Remove.
3362 (amd64-avx-linux.c): Remove.
3363 (amd64-avx-avx512.c): Remove.
3364 (amd64-avx-avx512-linux.c): Remove.
3365 (amd64-mpx.c): Remove.
3366 (amd64-mpx-linux.c): Remove.
3367 (amd64-avx-mpx-avx512-pku.c): Remove.
3368 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3369 (amd64-avx-mpx.c): Remove.
3370 (amd64-avx-mpx-linux.c): Remove.
3371 (x32.c): Remove.
3372 (x32-linux.c): Remove.
3373 (x32-avx.c): Remove.
3374 (x32-avx-linux.c): Remove.
3375 (x32-avx-avx512.c): Remove.
3376 (x32-avx-avx512-linux.c): Remove.
3377 (reg-xtensa.c): Remove.
3378 (reg-tilegx.c): Remove.
3379 (reg-tilegx32.c): Remove.
3380
1672e0d9
SDJ
33812017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3382
3383 * Makefile.in (SFILES): Add "common/environ.c".
3384 (OBJS): Add "common/environ.h".
3385
239b6d10
WT
33862017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3387
3388 * configure.ac: Check if the fs_base and gs_base members of
3389 `struct user_regs_struct' exist.
3390 * config.in: Regenerated.
3391 * configure: Likewise.
3392
694b382c
AT
33932017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3394
3395 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3396 target_read_memory.
3397 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3398 (get_next_pcs_syscall_next_pc): Likewise.
3399
7dc53023
LM
34002016-12-23 Luis Machado <lgustavo@codesourcery.com>
3401
3402 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3403 * nto-x86-low.c: Likewise.
3404
ad02e4fe
SM
34052016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3406
3407 * Makefile.in: Include disable-implicit-rules.mk.
3408
dcb07cfa
PA
34092016-11-23 Pedro Alves <palves@redhat.com>
3410
3411 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3412 (debug_vprintf): Use std::chrono::steady_clock instead of
3413 gettimeofday. Use '.' instead of ':'.
3414 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3415 (get_timestamp): Use std::chrono::steady_clock instead of
3416 gettimeofday.
3417
8629c02c
SM
34182016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3419
3420 * Makefile.in: Fix whitespace formatting.
3421
b593ecca
SM
34222016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3423
3424 * Makefile.in (SFILES, OBS): Flatten list and order
3425 alphabetically.
3426
9986ba08
PA
34272016-11-23 Pedro Alves <palves@redhat.com>
3428
3429 * event-loop.c (handle_file_event): Use warning.
3430 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3431 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3432 Use warning.
3433
4eefa7bc
PA
34342016-11-23 Pedro Alves <palves@redhat.com>
3435
3436 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3437 output.
3438 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3439 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3440 debug_printf and debug_flush for debug output.
3441 * server.c (handle_general_set): Likewise.
3442 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3443 output.
3444
5443506e
SM
34452016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3446
3447 * Makefile.in (.c.o): Replace rule with ...
3448 (%.o: %.c): ... this one.
3449
3b165252
SM
34502016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3451
3452 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3453 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3454 make.
3455 * configure.ac: Remove checks for the make program.
3456 * configure: Re-generate.
3457
0bcda685
PA
34582016-10-28 Pedro Alves <palves@redhat.com>
3459
3460 * Makefile.in (CXX_DIALECT): Get from configure.
3461 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3462 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3463 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3464 * config.in: Regenerate.
3465 * configure: Regenerate.
3466
c3805894
YQ
34672016-10-27 Yao Qi <yao.qi@linaro.org>
3468
3469 * linux-low.c (linux_supports_range_stepping): Return true if
3470 can_software_single_step return true.
3471
89342618
YQ
34722016-10-27 Yao Qi <yao.qi@linaro.org>
3473
3474 * inferiors.c (find_inferior_in_random): New function.
3475 * inferiors.h (find_inferior_in_random): Declare.
3476 * linux-low.c (linux_wait_for_event_filtered): Call
3477 find_inferior_in_random instead of find_inferior.
3478
e3652c84
YQ
34792016-10-27 Yao Qi <yao.qi@linaro.org>
3480
3481 * linux-low.c (linux_wait_1): If single-step breakpoints are
3482 inserted, remove them.
3483
5a04c4cf
PA
34842016-10-26 Pedro Alves <palves@redhat.com>
3485
3486 * linux-low.c (handle_extended_wait): Link parent/child fork
3487 threads.
3488 (linux_wait_1): Unlink them.
3489 (linux_set_resume_request): Ignore resume requests for
3490 already-resumed and unhandled fork child threads.
3491 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3492 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3493 New functions.
3494 (handle_v_requests) <vCont>: Don't call require_running.
3495 * server.h (in_queued_stop_replies): New declaration.
3496
cb93dc7f
YQ
34972016-10-24 Yao Qi <yao.qi@linaro.org>
3498
3499 PR server/20733
3500 * linux-aarch64-low.c (append_insns): Cast the return value to
3501 'uint32_t *'.
3502
a1078bea
YQ
35032016-10-10 Yao Qi <yao.qi@linaro.org>
3504
3505 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3506
1fb77080
SDJ
35072016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3508
3509 * target.c (target_supports_multi_process): New function, moved
3510 from...
3511 * target.h (target_supports_multi_process): ... here. Remove
3512 macro.
3513
39b5a3b9
TT
35142016-10-05 Tom Tromey <tom@tromey.com>
3515
3516 PR remote/20655:
3517 * tracepoint.c (handle_tracepoint_bkpts): Check
3518 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3519
c1d0b70a
YQ
35202016-10-05 Yao Qi <yao.qi@linaro.org>
3521
3522 * configure.srv: Update the path of arm-*.xml files.
3523
0a69eedb
YQ
35242016-10-05 Terry Guo <terry.guo@arm.com>
3525 Yao Qi <yao.qi@linaro.org>
3526
3527 * Makefile.in: Adjust the path of rules.
3528 * configure.srv: Update the path of xml files.
3529 * regformats/arm-with-iwmmxt.dat: Regenerated.
3530 * regformats/arm-with-neon.dat: Likewise.
3531 * regformats/arm-with-vfpv2.dat: Likewise.
3532 * regformats/arm-with-vfpv3.dat Likewise.
3533
17e16485
YQ
35342016-09-30 Yao Qi <yao.qi@linaro.org>
3535
3536 PR gdbserver/20627
3537 * target.c (target_stop_and_wait): Don't call
3538 target_continue_no_signal, use resume_stop instead.
3539
edeeb602
YQ
35402016-09-26 Yao Qi <yao.qi@linaro.org>
3541
3542 * linux-low.c (linux_wait_1): Call debug_exit.
3543
503b1c39
PA
35442016-09-23 Pedro Alves <palves@redhat.com>
3545
3546 * Makefile.in (SFILES): Add common/new-op.c.
3547 (OBS): Add common/new-op.o.
3548 (new-op.o): New rule.
3549
74172ecf
SM
35502016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3551
3552 * .gitinore: Ignore more files.
3553
fc6cda2e
YQ
35542016-09-21 Yao Qi <yao.qi@linaro.org>
3555
3556 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3557 23.
3558
bc1e6c81
SDJ
35592016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3560
3561 * server.c (start_inferior): Call target_mourn_inferior instead of
3562 mourn_inferior; pass ptid_t argument to it.
3563 (resume): Likewise.
3564 (handle_target_event): Likewise.
3565 * target.c (target_mourn_inferior): New function.
3566 * target.h (mourn_inferior): Delete macro.
3567
0e00e962
AA
35682016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3569
3570 * linux-low.c (lwp_is_stepping): New function.
3571
1d8cb77d
CL
35722016-09-06 Carl Love <cel@us.ibm.com>
3573
3574 * server.c (start_inferior): Fixed comment, requested comment change
3575 didn't get updated correctly. Removed reference to ptrace () call as
3576 it is only true on Linux systems.
3577
7313bced
CL
35782016-09-06 Carl Love <cel@us.ibm.com>
3579
3580 * server.c (start_inferior): Do not call
3581 function target_post_create_inferior () if the
3582 inferior process has already exited.
3583
cf6de44d
PA
35842016-09-05 Pedro Alves <palves@redhat.com>
3585
3586 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3587 (COMPILE.pre, CC_LD): Use CXX directly.
3588 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3589 * acinclude.m4: Don't include build-with-cxx.m4.
3590 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3591 * configure: Regenerate.
3592
c1da6748
AT
35932016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3594
3595 PR gdb/19495
3596 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3597 call writing data to own_buf.
3598
f2b9e3df
SDJ
35992016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3600
3601 * target.c (mywait): Call target_wait instead of
3602 the_target->wait.
3603 (target_wait): New function.
3604
049a8570
SDJ
36052016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3606
3607 * server.c (start_inferior): New variable 'ptid'. Replace calls
3608 to the_target->resume by target_continue{,_no_signal}, depending
3609 on the case.
3610 * target.c (target_stop_and_wait): Call target_continue_no_signal
3611 instead of the_target->resume.
3612 (target_continue): New function.
3613
3aa5cfa0
AT
36142016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3615
3616 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3617
754653a7
AZ
36182016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3619
3620 PR server/20491
3621 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3622 ps_prochandle.
3623 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3624 * linux-arm-low.c (ps_get_thread_area): Likewise.
3625 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3626 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3627 * linux-mips-low.c (ps_get_thread_area): Likewise.
3628 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3629 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3630 * linux-x86-low.c (ps_get_thread_area): Likewise.
3631 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3632
ed036b40
PA
36332016-08-19 Pedro Alves <palves@redhat.com>
3634
3635 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3636
c8ef42ee
PA
36372016-08-19 Pedro Alves <palves@redhat.com>
3638
3639 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3640 comment. Use memcpy instead of casting through unsigned long.
3641
9c235a72
PA
36422016-08-19 Pedro Alves <palves@redhat.com>
3643
3644 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3645 allocating around 0x80000000.
3646
201506da
PA
36472016-08-19 Pedro Alves <palves@redhat.com>
3648
3649 PR gdb/20415
3650 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3651 (x32-avx512-linux-ipa.o): New rules.
3652 * configure.ac (x86_64-*-linux*): New x32 check.
3653 * configure.srv (ipa_x32_linux_regobj): New.
3654 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3655 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3656 descriptions.
3657 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3658 descriptions.
3659 * configure: Regenerate.
3660
f348d89a
PA
36612016-08-09 Pedro Alves <palves@redhat.com>
3662
3663 PR gdb/18653
3664 * Makefile.in (OBS): Add signals-state-save-restore.o.
3665 (signals-state-save-restore.o): New rule.
3666 * config.in: Regenerate.
3667 * configure: Regenerate.
3668 * linux-low.c: Include "signals-state-save-restore.h".
3669 (linux_create_inferior): Call
3670 restore_original_signals_state.
3671 * server.c: Include "dispositions-save-restore.h".
3672 (captured_main): Call save_original_signals_state.
3673
1baf5149
PA
36742016-08-05 Pedro Alves <palves@redhat.com>
3675
3676 * configure: Regenerate.
3677
fcd4a73d
YQ
36782016-08-04 Yao Qi <yao.qi@linaro.org>
3679
3680 * linux-low.c (regsets_fetch_inferior_registers): Check
3681 errno is ESRCH or not.
3682
979659d0
YQ
36832016-08-02 Yao Qi <yao.qi@linaro.org>
3684
3685 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3686 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3687 (thread_db_load_search): Update.
3688 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3689 td_ta_set_event and td_ta_event_getmsg.
3690
6598661d
PA
36912016-07-26 Pedro Alves <palves@redhat.com>
3692
3693 PR server/20414
3694 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3695 of unsigned long for 64-bit registers and use uint32_t instead of
3696 unsigned int for 32-bit registers.
3697
9cf12d57
PA
36982016-07-26 Pedro Alves <palves@redhat.com>
3699
3700 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3701 to 'ptrace'.
3702
305450ed
TT
37032016-07-21 Tom Tromey <tom@tromey.com>
3704
3705 * configure: Rebuild.
3706
2583da7c
YQ
37072016-07-21 Yao Qi <yao.qi@linaro.org>
3708
3709 * mem-break.c (find_gdb_breakpoint): Cast bp to
3710 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3711
21536b36
YQ
37122016-07-21 Yao Qi <yao.qi@linaro.org>
3713
3714 * server.c (handle_v_requests): Support s and S actions
3715 if target_supports_software_single_step return true.
3716
8901d193
YQ
37172016-07-21 Yao Qi <yao.qi@linaro.org>
3718
3719 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3720 is resume_step, call maybe_hw_step.
3721 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3722 and unstop them.
3723 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3724 breakpoints or not.
3725 (proceed_one_lwp): If resume request is resume_step, install
3726 reinsert breakpoints and call maybe_hw_step.
3727
0e9a339e
YQ
37282016-07-21 Yao Qi <yao.qi@linaro.org>
3729
3730 * linux-low.c (proceed_one_lwp): Declare.
3731 (linux_resume_one_thread): Remove local variable 'step'.
3732 Lift code enqueue signal. Call proceed_one_lwp instead of
3733 linux_resume_one_lwp.
3734
4281b351
YQ
37352016-07-21 Yao Qi <yao.qi@linaro.org>
3736
3737 * linux-low.c (linux_resume_one_thread): Call
3738 enqueue_pending_signal.
3739
984a2c04
YQ
37402016-07-21 Yao Qi <yao.qi@linaro.org>
3741
3742 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3743 * inferiors.c (do_restore_current_thread_cleanup): New function.
3744 (make_cleanup_restore_current_thread): Likewise.
3745 * linux-low.c (install_software_single_step_breakpoints): Call
3746 make_cleanup_restore_current_thread. Switch current_thread to
3747 thread.
3748
bec903c9
YQ
37492016-07-21 Yao Qi <yao.qi@linaro.org>
3750
3751 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3752 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3753 (clone_one_breakpoint): Likewise.
3754 (delete_reinsert_breakpoints): Change parameter to thread.
3755 Callers updated.
3756 (has_reinsert_breakpoints): Likewise.
3757 (uninsert_reinsert_breakpoints): Likewise.
3758 (reinsert_reinsert_breakpoints): Likewise.
3759 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3760 (delete_reinsert_breakpoints): Likewise.
3761 (reinsert_reinsert_breakpoints): Likewise.
3762 (uninsert_reinsert_breakpoints): Likewise.
3763 (has_reinsert_breakpoints): Likewise.
3764
63c40ec7
YQ
37652016-07-21 Yao Qi <yao.qi@linaro.org>
3766
3767 * inferiors.c (get_thread_process): Make parameter const.
3768 * inferiors.h (get_thread_process): Update declaration.
3769 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3770 Add new parameters child_thread and parent_thread. Callers
3771 updated.
3772 * mem-break.h (clone_all_breakpoints): Update declaration.
3773
9aa76cd0
YQ
37742016-07-21 Yao Qi <yao.qi@linaro.org>
3775
3776 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3777 <command_list, handler>: Remove.
3778 (struct gdb_breakpoint): New.
3779 (struct other_breakpoint): New.
3780 (struct reinsert_breakpoint): New.
3781 (is_gdb_breakpoint): New function.
3782 (any_persistent_commands): Update command_list if
3783 is_gdb_breakpoint returns true.
3784 (set_breakpoint): Create breakpoints according to their types.
3785 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3786 (set_gdb_breakpoint_1): Likewise.
3787 (set_gdb_breakpoint): Likewise.
3788 (clear_breakpoint_conditions): Change parameter type to
3789 'struct gdb_breakpoint *'.
3790 (clear_breakpoint_commands): Likewise.
3791 (clear_breakpoint_conditions_and_commands): Likewise.
3792 (add_condition_to_breakpoint): Likewise.
3793 (add_breakpoint_condition): Likewise.
3794 (add_commands_to_breakpoint): Likewise.
3795 (check_breakpoints): Check other_breakpoint.
3796 (clone_one_breakpoint): Clone breakpopint according to its type.
3797 * mem-break.h (struct gdb_breakpoint): Declare.
3798 (set_gdb_breakpoint): Update declaration.
3799 (clear_breakpoint_conditions_and_commands): Likewise.
3800 (add_breakpoint_condition): Likewise.
3801 (add_breakpoint_commands): Likewise.
3802 * server.c (process_point_options): Change parameter type to
3803 'struct gdb_breakpoint *'.
3804
811f8301
YQ
38052016-07-21 Yao Qi <yao.qi@linaro.org>
3806
3807 * mem-break.c (set_breakpoint_at): Rename it to ...
3808 (set_breakpoint_type_at): ... it.
3809 (set_breakpoint_at): Call set_breakpoint_type_at.
3810 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3811 * mem-break.h (set_breakpoint_at): Update comments.
3812
b1c51e36
CLT
38132016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3814
3815 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3816 to buf parameter.
3817 (nios2_store_gregset): Likewise.
3818
ced2dffb
PA
38192016-07-01 Pedro Alves <palves@redhat.com>
3820 Antoine Tremblay <antoine.tremblay@ericsson.com>
3821
3822 * linux-low.c: Change interface to take the target lwp_info
3823 pointer directly and return void. Handle detaching from a zombie
3824 thread.
3825 (linux_detach_lwp_callback): New function.
3826 (linux_detach): Detach from the leader thread after detaching from
3827 the clone threads.
3828
2ac09a5b
YQ
38292016-06-28 Yao Qi <yao.qi@linaro.org>
3830
3831 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3832 for variable new_offset.
3833 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3834 (aarch64_ftrace_insn_reloc_cb): Likewise.
3835 (aarch64_ftrace_insn_reloc_tb): Likewise.
3836 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3837 PRIx64 instead of PRIx32.
3838
79e7fd4f
YQ
38392016-06-28 Yao Qi <yao.qi@linaro.org>
3840
3841 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3842 (the_low_target): Install arm_get_syscall_trapinfo.
3843
061fc021
YQ
38442016-06-28 Yao Qi <yao.qi@linaro.org>
3845
3846 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3847 function.
3848 (the_low_target): Install aarch64_get_syscall_trapinfo.
3849
4cc32bec
YQ
38502016-06-28 Yao Qi <yao.qi@linaro.org>
3851
3852 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3853 Callers updated.
3854 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3855 Remove parameter sysno.
3856 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3857 sysret.
3858
782c1122
AA
38592016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3860
3861 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3862 (s390_emit_ne_goto): Likewise.
3863 (s390_emit_lt_goto): Likewise.
3864 (s390_emit_le_goto): Likewise.
3865 (s390_emit_gt_goto): Likewise.
3866 (s390_emit_ge_goto): Likewise.
3867 (s390x_emit_eq_goto): Likewise.
3868 (s390x_emit_ne_goto): Likewise.
3869 (s390x_emit_lt_goto): Likewise.
3870 (s390x_emit_le_goto): Likewise.
3871 (s390x_emit_gt_goto): Likewise.
3872 (s390x_emit_ge_goto): Likewise.
3873 (s390_emit_ops_impl): Mark variable static.
3874 (s390x_emit_ops): Likewise.
3875
2e7b624b
YQ
38762016-06-17 Yao Qi <yao.qi@linaro.org>
3877
3878 * linux-low.c (handle_extended_wait): Call
3879 uninsert_reinsert_breakpoints for the parent process. Remove
3880 reinsert breakpoints from the child process. Reinsert them to
3881 the parent process when vfork is done.
3882 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3883 (reinsert_reinsert_breakpoints): New function.
3884 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3885 (reinsert_reinsert_breakpoints): Declare.
3886
8a81c5d7
YQ
38872016-06-17 Yao Qi <yao.qi@linaro.org>
3888
3889 * linux-low.c (handle_extended_wait): If the parent is doing
3890 step-over, remove the reinsert breakpoints from the forked child.
3891
f50bf8e5
YQ
38922016-06-17 Yao Qi <yao.qi@linaro.org>
3893
3894 * linux-low.c (unsuspend_all_lwps): Declare.
3895 (linux_low_filter_event): If thread exited, call finish_step_over.
3896 If step-over is finished, unsuspend other threads.
3897
8376a3cb
YQ
38982016-06-17 Yao Qi <yao.qi@linaro.org>
3899
3900 * linux-low.c (linux_resume_one_lwp_throw): Assert
3901 has_reinsert_breakpoints returns false.
3902 * mem-break.c (delete_disabled_breakpoints): Assert
3903 bp type isn't reinsert_breakpoint.
3904
f79b145d
YQ
39052016-06-17 Yao Qi <yao.qi@linaro.org>
3906
3907 * linux-low.c (maybe_hw_step): New function.
3908 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3909 (finish_step_over): Switch current_thread to lwp temporarily,
3910 and assert has_reinsert_breakpoints returns true.
3911 (proceed_one_lwp): Call maybe_hw_step.
3912 * mem-break.c (has_reinsert_breakpoints): New function.
3913 * mem-break.h (has_reinsert_breakpoints): Declare.
3914
0ae534d2
JT
39152016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3916
3917 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3918
fcdad592
YQ
39192016-05-17 Yao Qi <yao.qi@linaro.org>
3920
3921 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3922 instead of find_inferior.
3923
9e784964
YQ
39242016-05-05 Yao Qi <yao.qi@linaro.org>
3925
3926 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3927 Initialize res to zero.
3928
cf2ebb6e
YQ
39292016-05-05 Yao Qi <yao.qi@linaro.org>
3930
3931 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3932 to uint32_t.
3933
c1aebf87
UW
39342016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3935
3936 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3937 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3938 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3939
35fd2deb 39402016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3941 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3942
3943 * tracepoint.c (write_inferior_int8): New function.
3944 (cmd_qtenable_disable): Write enable flag using
3945 write_inferior_int8.
3946
484b3c32
YQ
39472016-04-25 Yao Qi <yao.qi@linaro.org>
3948
3949 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3950 (need_step_over_p): Return zero if the LWP has pending signals
3951 can be delivered on software single step target.
3952
85ba7d86
YQ
39532016-04-25 Yao Qi <yao.qi@linaro.org>
3954
3955 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3956 return instead of error.
3957
3539aa13
YQ
39582016-04-22 Yao Qi <yao.qi@linaro.org>
3959
3960 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3961 to 23.
3962
5b061e98
YQ
39632016-04-22 Yao Qi <yao.qi@linaro.org>
3964
3965 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3966 signal when stepping over breakpoint with software single
3967 step.
3968
3451269c
PA
39692016-04-21 Pedro Alves <palves@redhat.com>
3970
3971 * linux-s390-low.c (s390_collect_ptrace_register)
3972 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3973 add casts.
3974 (s390_check_regset): Use void * instead of gdb_byte *.
3975
a2358508
PA
39762016-04-20 Pedro Alves <palves@redhat.com>
3977
3978 * configure: Renegerate.
3979
6885166d
YQ
39802016-04-20 Yao Qi <yao.qi@linaro.org>
3981
3982 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3983 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3984 number 16.
3985 (arm_store_gregset): Likewise.
3986
2b863f51
WT
39872016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3988
3989 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3990 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3991 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3992 (amd64-avx-mpx-linux.c): New rules.
3993 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3994 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3995 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3996 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3997 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3998 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3999 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4000 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4001 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4002 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4003 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4004 * linux-x86-low.c (x86_linux_read_description): Add case for
4005 X86_XSTATE_AVX_MPX_MASK.
4006 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4007 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4008 init_registers_i386_avx_mpx_linux.
4009 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4010 (initialize_low_tracepoint): Call
4011 init_registers_i386_avx_mpx_linux.
4012 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4013 (initialize_low_tracepoint): Call
4014 init_registers_amd64_avx_mpx_linux.
4015 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4016 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4017 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4018 declarations.
4019
9b30624b
PA
40202016-04-18 Pedro Alves <palves@redhat.com>
4021
4022 * configure: Regenerate.
4023
45e3745e
AT
40242016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4025
4026 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4027 (aarch64_emit_sub): Likewise.
4028
2afc13ff
PA
40292016-04-12 Pedro Alves <palves@redhat.com>
4030
4031 * utils.c (prepare_to_throw_exception): Delete.
4032
6e774b13
SM
40332016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4034
4035 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4036
4dca19f8
MK
40372016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4038
4039 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4040
d0a9981f
MK
40412016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4042
4043 * linux-aarch64-ipa.c: Add <elf.h> include.
4044 * linux-ppc-ipa.c: Add <elf.h> include.
4045 * linux-s390-ipa.c: Add <elf.h> include.
4046
252db07e
MK
40472016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4048
4049 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4050 (get_raw_reg_ptr): Likewise.
4051 (get_trace_state_variable_value_ptr): Likewise.
4052 (set_trace_state_variable_value_ptr): Likewise.
4053 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4054 char *.
4055
14e2b6d9
MK
40562016-03-31 Wei-cheng Wang <cole945@gmail.com>
4057 Marcin Kościelnicki <koriakin@0x04.net>
4058
4059 PR/17221
4060 * linux-ppc-low.c (emit_insns): New function.
4061 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4062 (ppc_emit_prologue): New function.
4063 (ppc_emit_epilogue): New function.
4064 (ppc_emit_add): New function.
4065 (ppc_emit_sub): New function.
4066 (ppc_emit_mul): New function.
4067 (ppc_emit_lsh): New function.
4068 (ppc_emit_rsh_signed): New function.
4069 (ppc_emit_rsh_unsigned): New function.
4070 (ppc_emit_ext): New function.
4071 (ppc_emit_zero_ext): New function.
4072 (ppc_emit_log_not): New function.
4073 (ppc_emit_bit_and): New function.
4074 (ppc_emit_bit_or): New function.
4075 (ppc_emit_bit_xor): New function.
4076 (ppc_emit_bit_not): New function.
4077 (ppc_emit_equal): New function.
4078 (ppc_emit_less_signed): New function.
4079 (ppc_emit_less_unsigned): New function.
4080 (ppc_emit_ref): New function.
4081 (ppc_emit_const): New function.
4082 (ppc_emit_reg): New function.
4083 (ppc_emit_pop): New function.
4084 (ppc_emit_stack_flush): New function.
4085 (ppc_emit_swap): New function.
4086 (ppc_emit_stack_adjust): New function.
4087 (ppc_emit_call): New function.
4088 (ppc_emit_int_call_1): New function.
4089 (ppc_emit_void_call_2): New function.
4090 (ppc_emit_if_goto): New function.
4091 (ppc_emit_goto): New function.
4092 (ppc_emit_eq_goto): New function.
4093 (ppc_emit_ne_goto): New function.
4094 (ppc_emit_lt_goto): New function.
4095 (ppc_emit_le_goto): New function.
4096 (ppc_emit_gt_goto): New function.
4097 (ppc_emit_ge_goto): New function.
4098 (ppc_write_goto_address): New function.
4099 (ppc_emit_ops_impl): New static variable.
4100 (ppc64v1_emit_prologue): New function.
4101 (ppc64v2_emit_prologue): New function.
4102 (ppc64_emit_epilogue): New function.
4103 (ppc64_emit_add): New function.
4104 (ppc64_emit_sub): New function.
4105 (ppc64_emit_mul): New function.
4106 (ppc64_emit_lsh): New function.
4107 (ppc64_emit_rsh_signed): New function.
4108 (ppc64_emit_rsh_unsigned): New function.
4109 (ppc64_emit_ext): New function.
4110 (ppc64_emit_zero_ext): New function.
4111 (ppc64_emit_log_not): New function.
4112 (ppc64_emit_bit_and): New function.
4113 (ppc64_emit_bit_or): New function.
4114 (ppc64_emit_bit_xor): New function.
4115 (ppc64_emit_bit_not): New function.
4116 (ppc64_emit_equal): New function.
4117 (ppc64_emit_less_signed): New function.
4118 (ppc64_emit_less_unsigned): New function.
4119 (ppc64_emit_ref): New function.
4120 (ppc64_emit_const): New function.
4121 (ppc64v1_emit_reg): New function.
4122 (ppc64v2_emit_reg): New function.
4123 (ppc64_emit_pop): New function.
4124 (ppc64_emit_stack_flush): New function.
4125 (ppc64_emit_swap): New function.
4126 (ppc64v1_emit_call): New function.
4127 (ppc64v2_emit_call): New function.
4128 (ppc64v1_emit_int_call_1): New function.
4129 (ppc64v2_emit_int_call_1): New function.
4130 (ppc64v1_emit_void_call_2): New function.
4131 (ppc64v2_emit_void_call_2): New function.
4132 (ppc64_emit_if_goto): New function.
4133 (ppc64_emit_eq_goto): New function.
4134 (ppc64_emit_ne_goto): New function.
4135 (ppc64_emit_lt_goto): New function.
4136 (ppc64_emit_le_goto): New function.
4137 (ppc64_emit_gt_goto): New function.
4138 (ppc64_emit_ge_goto): New function.
4139 (ppc64v1_emit_ops_impl): New static variable.
4140 (ppc64v2_emit_ops_impl): New static variable.
4141 (ppc_emit_ops): New function.
4142 (linux_low_target): Wire in ppc_emit_ops.
4143
a2174ba4
MK
41442016-03-31 Wei-cheng Wang <cole945@gmail.com>
4145 Marcin Kościelnicki <koriakin@0x04.net>
4146
4147 PR/17221
4148 * Makefile.in: Add powerpc-*-ipa.o
4149 * configure.srv: Add ipa_obj for powerpc*-linux.
4150 * linux-ppc-ipa.c: New file.
4151 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4152 includes.
4153 (PPC_FIELD): New macro.
4154 (PPC_SEXT): New macro.
4155 (PPC_OP6): New macro.
4156 (PPC_BO): New macro.
4157 (PPC_LI): New macro.
4158 (PPC_BD): New macro.
4159 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4160 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4161 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4162 (ppc_get_thread_area): New function.
4163 (is_elfv2_inferior): New function.
4164 (gen_ds_form): New function.
4165 (GEN_STD): New macro.
4166 (GEN_STDU): New macro.
4167 (GEN_LD): New macro.
4168 (GEN_LDU): New macro.
4169 (gen_d_form): New function.
4170 (GEN_ADDI): New macro.
4171 (GEN_ADDIS): New macro.
4172 (GEN_LI): New macro.
4173 (GEN_LIS): New macro.
4174 (GEN_ORI): New macro.
4175 (GEN_ORIS): New macro.
4176 (GEN_LWZ): New macro.
4177 (GEN_STW): New macro.
4178 (GEN_STWU): New macro.
4179 (gen_xfx_form): New function.
4180 (GEN_MFSPR): New macro.
4181 (GEN_MTSPR): New macro.
4182 (GEN_MFCR): New macro.
4183 (GEN_MTCR): New macro.
4184 (GEN_SYNC): New macro.
4185 (GEN_LWSYNC): New macro.
4186 (gen_x_form): New function.
4187 (GEN_OR): New macro.
4188 (GEN_MR): New macro.
4189 (GEN_LWARX): New macro.
4190 (GEN_STWCX): New macro.
4191 (GEN_CMPW): New macro.
4192 (gen_md_form): New function.
4193 (GEN_RLDICL): New macro.
4194 (GEN_RLDICR): New macro.
4195 (gen_i_form): New function.
4196 (GEN_B): New macro.
4197 (GEN_BL): New macro.
4198 (gen_b_form): New function.
4199 (GEN_BNE): New macro.
4200 (GEN_LOAD): New macro.
4201 (GEN_STORE): New macro.
4202 (gen_limm): New function.
4203 (gen_atomic_xchg): New function.
4204 (gen_call): New function.
4205 (ppc_relocate_instruction): New function.
4206 (ppc_install_fast_tracepoint_jump_pad): New function.
4207 (ppc_get_min_fast_tracepoint_insn_len): New function.
4208 (ppc_get_ipa_tdesc_idx): New function.
4209 (the_low_target): Wire in the new functions.
4210 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4211 tdescs.
4212 * linux-ppc-tdesc.h: New file.
4213
a13c4696
MK
42142016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4215
4216 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4217 (alloc_jump_pad_buffer): New function.
4218 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4219 (alloc_jump_pad_buffer): New function.
4220 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4221 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4222 (alloc_jump_pad_buffer): New function.
4223 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4224 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4225 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4226 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4227
1cda1512
MK
42282016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4229
4230 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4231 * linux-amd64-ipa.c: Likewise.
4232 * linux-i386-ipa.c: Likewise.
4233 * linux-s390-ipa.c: Likewise.
4234 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4235 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4236 set_trace_state_variable_value_ptr.
4237 (struct ipa_sym_addresses): Likewise.
4238 (symbol_list): Likewise.
4239 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4240 accessing gdb_collect directly.
4241 (gdb_collect_ptr_type): New typedef.
4242 (get_raw_reg_ptr_type): New typedef.
4243 (get_trace_state_variable_value_ptr_type): New typedef.
4244 (set_trace_state_variable_value_ptr_type): New typedef.
4245 (gdb_collect_ptr): New global.
4246 (get_raw_reg_ptr): New global.
4247 (get_trace_state_variable_value_ptr): New global.
4248 (set_trace_state_variable_value_ptr): New global.
4249 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4250 accessing get_raw_reg directly.
4251 (get_get_tsv_func_addr): Likewise for
4252 get_trace_state_variable_value_ptr.
4253 (get_set_tsv_func_addr): Likewise for
4254 set_trace_state_variable_value_ptr.
4255 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4256
72fb5488
SM
42572016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4258
4259 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4260
28170b88
MK
42612016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4262
4263 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4264 packets.
4265 (relocate_instruction): Remove own_buf.
4266 * server.c (own_buf): Make global.
4267 (handle_v_requests): Make global.
4268 * server.h (own_buf): New declaration.
4269 (handle_v_requests): New prototype.
4270
f39e8743
MK
42712016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4272
4273 PR 18377
4274 * linux-s390-low.c (add_insns): New function.
4275 (s390_emit_prologue): New function.
4276 (s390_emit_epilogue): New function.
4277 (s390_emit_add): New function.
4278 (s390_emit_sub): New function.
4279 (s390_emit_mul): New function.
4280 (s390_emit_lsh): New function.
4281 (s390_emit_rsh_signed): New function.
4282 (s390_emit_rsh_unsigned): New function.
4283 (s390_emit_ext): New function.
4284 (s390_emit_log_not): New function.
4285 (s390_emit_bit_and): New function.
4286 (s390_emit_bit_or): New function.
4287 (s390_emit_bit_xor): New function.
4288 (s390_emit_bit_not): New function.
4289 (s390_emit_equal): New function.
4290 (s390_emit_less_signed): New function.
4291 (s390_emit_less_unsigned): New function.
4292 (s390_emit_ref): New function.
4293 (s390_emit_if_goto): New function.
4294 (s390_emit_goto): New function.
4295 (s390_write_goto_address): New function.
4296 (s390_emit_litpool): New function.
4297 (s390_emit_const): New function.
4298 (s390_emit_call): New function.
4299 (s390_emit_reg): New function.
4300 (s390_emit_pop): New function.
4301 (s390_emit_stack_flush): New function.
4302 (s390_emit_zero_ext): New function.
4303 (s390_emit_swap): New function.
4304 (s390_emit_stack_adjust): New function.
4305 (s390_emit_set_r2): New function.
4306 (s390_emit_int_call_1): New function.
4307 (s390_emit_void_call_2): New function.
4308 (s390_emit_eq_goto): New function.
4309 (s390_emit_ne_goto): New function.
4310 (s390_emit_lt_goto): New function.
4311 (s390_emit_le_goto): New function.
4312 (s390_emit_gt_goto): New function.
4313 (s390_emit_ge_goto): New function.
4314 (s390x_emit_prologue): New function.
4315 (s390x_emit_epilogue): New function.
4316 (s390x_emit_add): New function.
4317 (s390x_emit_sub): New function.
4318 (s390x_emit_mul): New function.
4319 (s390x_emit_lsh): New function.
4320 (s390x_emit_rsh_signed): New function.
4321 (s390x_emit_rsh_unsigned): New function.
4322 (s390x_emit_ext): New function.
4323 (s390x_emit_log_not): New function.
4324 (s390x_emit_bit_and): New function.
4325 (s390x_emit_bit_or): New function.
4326 (s390x_emit_bit_xor): New function.
4327 (s390x_emit_bit_not): New function.
4328 (s390x_emit_equal): New function.
4329 (s390x_emit_less_signed): New function.
4330 (s390x_emit_less_unsigned): New function.
4331 (s390x_emit_ref): New function.
4332 (s390x_emit_if_goto): New function.
4333 (s390x_emit_const): New function.
4334 (s390x_emit_call): New function.
4335 (s390x_emit_reg): New function.
4336 (s390x_emit_pop): New function.
4337 (s390x_emit_stack_flush): New function.
4338 (s390x_emit_zero_ext): New function.
4339 (s390x_emit_swap): New function.
4340 (s390x_emit_stack_adjust): New function.
4341 (s390x_emit_int_call_1): New function.
4342 (s390x_emit_void_call_2): New function.
4343 (s390x_emit_eq_goto): New function.
4344 (s390x_emit_ne_goto): New function.
4345 (s390x_emit_lt_goto): New function.
4346 (s390x_emit_le_goto): New function.
4347 (s390x_emit_gt_goto): New function.
4348 (s390x_emit_ge_goto): New function.
4349 (s390_emit_ops): New function.
4350 (struct linux_target_ops): Fill in emit_ops hook.
4351
abd9baf9
MK
43522016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4353
4354 PR 18377
4355 * Makefile.in: Add s390 IPA files.
4356 * configure.srv: Build IPA for s390.
4357 * linux-s390-ipa.c: New file.
4358 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4359 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4360 (tdesc_s390_linux32): Likewise.
4361 (init_registers_s390_linux32v1): Likewise.
4362 (tdesc_s390_linux32v1): Likewise.
4363 (init_registers_s390_linux32v2): Likewise.
4364 (tdesc_s390_linux32v2): Likewise.
4365 (init_registers_s390_linux64): Likewise.
4366 (tdesc_s390_linux64): Likewise.
4367 (init_registers_s390_linux64v1): Likewise.
4368 (tdesc_s390_linux64v1): Likewise.
4369 (init_registers_s390_linux64v2): Likewise.
4370 (tdesc_s390_linux64v2): Likewise.
4371 (init_registers_s390_te_linux64): Likewise.
4372 (tdesc_s390_te_linux64): Likewise.
4373 (init_registers_s390_vx_linux64): Likewise.
4374 (tdesc_s390_vx_linux64): Likewise.
4375 (init_registers_s390_tevx_linux64): Likewise.
4376 (tdesc_s390_tevx_linux64): Likewise.
4377 (init_registers_s390x_linux64): Likewise.
4378 (tdesc_s390x_linux64): Likewise.
4379 (init_registers_s390x_linux64v1): Likewise.
4380 (tdesc_s390x_linux64v1): Likewise.
4381 (init_registers_s390x_linux64v2): Likewise.
4382 (tdesc_s390x_linux64v2): Likewise.
4383 (init_registers_s390x_te_linux64): Likewise.
4384 (tdesc_s390x_te_linux64): Likewise.
4385 (init_registers_s390x_vx_linux64): Likewise.
4386 (tdesc_s390x_vx_linux64): Likewise.
4387 (init_registers_s390x_tevx_linux64): Likewise.
4388 (tdesc_s390x_tevx_linux64): Likewise.
4389 (have_hwcap_s390_vx): New static variable.
4390 (s390_arch_setup): Fill have_hwcap_s390_vx.
4391 (s390_get_thread_area): New function.
4392 (s390_ft_entry_gpr_esa): New const.
4393 (s390_ft_entry_gpr_zarch): New const.
4394 (s390_ft_entry_misc): New const.
4395 (s390_ft_entry_fr): New const.
4396 (s390_ft_entry_vr): New const.
4397 (s390_ft_main_31): New const.
4398 (s390_ft_main_64): New const.
4399 (s390_ft_exit_fr): New const.
4400 (s390_ft_exit_vr): New const.
4401 (s390_ft_exit_misc): New const.
4402 (s390_ft_exit_gpr_esa): New const.
4403 (s390_ft_exit_gpr_zarch): New const.
4404 (append_insns): New function.
4405 (s390_relocate_instruction): New function.
4406 (s390_install_fast_tracepoint_jump_pad): New function.
4407 (s390_get_min_fast_tracepoint_insn_len): New function.
4408 (s390_get_ipa_tdesc_idx): New function.
4409 (struct linux_target_ops): Wire in the above functions.
4410 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4411 * linux-s390-tdesc.h: New file.
4412
a4105d04
MK
44132016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4414
4415 * linux-s390-low.c (s390_supports_tracepoints): New function.
4416 (struct linux_target_ops): Fill supports_tracepoints hook.
4417
35ac8b3e
YQ
44182016-03-18 Yao Qi <yao.qi@linaro.org>
4419
4420 * linux-low.c (lwp_signal_can_be_delivered): New function.
4421 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4422
94610ec4
YQ
44232016-03-18 Yao Qi <yao.qi@linaro.org>
4424
4425 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4426 0 if signal is enqueued. Remove 'signal' from one debugging
4427 message. Move one debugging message to some lines below.
4428 Remove code setting 'signal' to 0.
4429
80aea927
YQ
44302016-03-18 Yao Qi <yao.qi@linaro.org>
4431
4432 * linux-low.c (linux_low_filter_event): Remove redundant
4433 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4434
b04fd3be
MK
44352016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4436
4437 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4438 (struct linux_target_ops): Wire in the above.
4439
c40c8d4b
YQ
44402016-03-03 Yao Qi <yao.qi@linaro.org>
4441
4442 * linux-low.c: Update comments to start_step_over.
4443
0f8288ae
YQ
44442016-03-03 Yao Qi <yao.qi@linaro.org>
4445
4446 PR server/19736
4447 * linux-low.c (handle_extended_wait): Set child suspended
4448 if event_lwp->bp_reinsert isn't zero.
4449
fdbd04a8
YQ
44502016-03-02 Yao Qi <yao.qi@linaro.org>
4451
4452 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4453 enqueue_pending_signal.
4454
6896a8fa
MK
44552016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4456
4457 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4458 is actually loaded.
4459
ab503087
MK
44602016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4461
4462 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4463 (s390_regmap_3264) [!__s390x__]: New global.
4464 (s390_collect_ptrace_register): Skip map entries containing -1.
4465 (s390_supply_ptrace_register): Ditto.
4466 (s390_fill_gprs_high): New function.
4467 (s390_store_gprs_high): New function.
4468 (s390_regsets): Add NT_S390_HIGH_GPRS.
4469 (s390_get_hwcap): Enable on 31-bit.
4470 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4471 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4472 Detect NT_S390_HIGH_GPRS.
4473 (s390_usrregs_info_3264): Enable on 31-bit.
4474 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4475 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4476
ae91f625
MK
44772016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4478
4479 PR gdb/13808
4480 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4481 * configure.srv: Ditto.
4482 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4483 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4484 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4485 (init_registers_amd64_linux): Remove prototype.
4486 (tdesc_amd64_linux): Remove declaration.
4487 (get_ipa_tdesc): New function.
4488 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4489 initialize remaining tdescs.
4490 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4491 (init_registers_i386_linux): Remove prototype.
4492 (tdesc_i386_linux): Remove declaration.
4493 (get_ipa_tdesc): New function.
4494 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4495 initialize remaining tdescs.
4496 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4497 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4498 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4499 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4500 (x86_get_ipa_tdesc_idx): New function.
4501 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4502 * linux-x86-tdesc.h: New file.
4503 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4504 (target_get_ipa_tdesc_idx): New macro.
4505 * tracepoint.c (ipa_tdesc_idx): New macro.
4506 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4507 (symbol_list): Add ipa_tdesc_idx.
4508 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4509 (ipa_tdesc): Remove.
4510 (ipa_tdesc_idx): New variable.
4511 (get_context_regcache): Use get_ipa_tdesc.
4512 (gdb_collect): Ditto.
4513 (gdb_probe): Ditto.
4514 * tracepoint.h (get_ipa_tdesc): New prototype.
4515 (ipa_tdesc): Remove.
4516
e7ad2f14
PA
45172016-02-24 Pedro Alves <palves@redhat.com>
4518
4519 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4520 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4521 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4522 Factor out common code between the USE_SIGTRAP_SIGINFO and
4523 !USE_SIGTRAP_SIGINFO blocks.
4524 (linux_low_filter_event): Call save_stop_reason instead of
4525 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4526 Update comments.
4527 (linux_wait_1): Update comments.
4528
657f9cde
WW
45292016-02-24 Wei-cheng Wang <cole945@gmail.com>
4530
4531 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4532 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4533 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4534 ppc_insert_point, ppc_remove_point.
4535
b00b61e1
MK
45362016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4537
4538 * linux-s390-low.c (s390_supports_z_point_type): New function.
4539 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4540
553cb527
YQ
45412016-02-16 Yao Qi <yao.qi@linaro.org>
4542
4543 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4544 PC. Get pc from regcache_read_pc.
4545
a5652c21
YQ
45462016-02-12 Yao Qi <yao.qi@linaro.org>
4547
4548 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4549 or linux_get_pc_32bit.
4550 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4551
ed443b61
YQ
45522016-02-12 Yao Qi <yao.qi@linaro.org>
4553
4554 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4555 arm_linux_get_next_pcs_fixup.
4556
020ecd38
MK
45572016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4558
4559 * tracepoint.c (x_tracepoint_action_download): Change
4560 write_inferior_data_ptr to write_inferior_data_pointer.
4561 (cmd_qtstart): Likewise.
4562 (write_inferior_data_ptr): Remove.
4563 (download_agent_expr): Change write_inferior_data_ptr to
4564 write_inferior_data_pointer.
4565 (download_tracepoint_1): Likewise.
4566 (download_tracepoint): Likewise.
4567 (download_trace_state_variables): Likewise.
4568
7cae9051
WW
45692016-02-11 Wei-cheng Wang <cole945@gmail.com>
4570 Marcin Kościelnicki <koriakin@0x04.net>
4571
4572 * tracepoint.c (struct tracepoint_action_ops): Remove.
4573 (struct tracepoint_action): Remove ops.
4574 (m_tracepoint_action_download, r_tracepoint_action_download)
4575 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4576 size and offset accordingly.
4577 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4578 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4579 (tracepoint_action_send, tracepoint_action_download): New functions.
4580 Helpers for trace action handlers.
4581 (add_tracepoint_action): Remove setup actions ops.
4582 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4583
9f6a71b4
YQ
45842016-02-10 Yao Qi <yao.qi@linaro.org>
4585
4586 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4587
1e94266c
SM
45882016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4589
4590 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4591 to AC_OUTPUT.
4592 * configure: Regenerate.
4593
8adce034
SM
45942016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4595
4596 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4597 void * to gdb_byte *.
4598 * linux-low.c (siginfo_fixup): Likewise.
4599 (linux_xfer_siginfo): Likewise.
4600 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4601 Likewise.
4602 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4603
93813b37
WT
46042016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4605
4606 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4607 to srv_tgtobj.
4608 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4609 to srv_tgtobj.
4610 * linux-x86-low.c [__x86_64__]: Include
4611 "nat/amd64-linux-siginfo.h".
4612 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4613 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4614 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4615 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4616 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4617 (cpt_si_fd, si_timerid, si_overrun): Move from
4618 nat/amd64-linux-siginfo.c.
4619 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4620
8424cc97
SM
46212016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4622
4623 * server.c (skip_to_semicolon): Remove.
4624 (process_point_options): Use strchrnul instead of
4625 skip_to_semicolon.
4626
4d18591b
YQ
46272016-01-26 Yao Qi <yao.qi@linaro.org>
4628
4629 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4630 * linux-low.c (install_software_single_step_breakpoints): Don't
4631 call regcache_read_pc.
4632 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4633 argument pc.
4634
d8020970
YQ
46352016-01-26 Yao Qi <yao.qi@linaro.org>
4636
4637 * linux-low.c (install_software_single_step_breakpoints): Call
4638 regcache_read_pc instead of get_pc.
4639
8b207339
YQ
46402016-01-26 Yao Qi <yao.qi@linaro.org>
4641
4642 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4643 (unblock_async_io): Rename to ...
4644 (block_unblock_async_io): ... it. New function.
4645 (enable_async_io): Don't install SIGIO handler. Unblock it
4646 instead.
4647 (disable_async_io): Don't ignore SIGIO. Block it instead.
4648 (initialize_async_io): Install SIGIO handler. Don't call
4649 unblock_async_io.
4650
18879fef
YQ
46512016-01-26 Yao Qi <yao.qi@linaro.org>
4652
4653 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4654 first character is '\003', call *the_target->request_interrupt.
4655
a0f8e08a
YQ
46562016-01-25 Yao Qi <yao.qi@linaro.org>
4657
4658 * remote-utils.c (new_thread_notify): Remove.
4659 (dead_thread_notify): Likewise.
4660 * remote-utils.h (new_thread_notify): Remove declaration.
4661 (dead_thread_notify): Likewise.
4662
cc5fd9ab
MK
46632016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4664
4665 * gdb.trace/pending.exp: Fix expected message on continue.
4666
99e8eb11
MK
46672016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4668
4669 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4670 it works properly on big-endian machines where sizeof (CORE_ADDR)
4671 != sizeof (void *).
4672
a994041d
PA
46732016-01-21 Pedro Alves <palves@redhat.com>
4674
4675 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4676 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4677 * configure: Regenerate.
4678
f7a6a40d
YQ
46792016-01-21 Yao Qi <yao.qi@linaro.org>
4680
4681 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4682 is_thumb and set it according to CPSR saved on the stack.
4683 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4684 arm_sigreturn_next_pc.
4685
6f69e520
YQ
46862016-01-18 Yao Qi <yao.qi@linaro.org>
4687
4688 * linux-low.c (linux_set_pc_64bit): New function.
4689 (linux_get_pc_64bit): New function.
4690 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4691 Declare.
4692 * linux-sparc-low.c (debug_threads): Remove declaration.
4693 (sparc_get_pc): Remove.
4694 (the_low_target): Use linux_get_pc_64bit instead of
4695 sparc_get_pc.
4696 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4697 (the_low_target): Use linux_get_pc_64bit and
4698 linux_set_pc_64bit.
4699
276d4552
YQ
47002016-01-18 Yao Qi <yao.qi@linaro.org>
4701
4702 * linux-arm-low.c (debug_threads): Remove declaration.
4703 (arm_get_pc, arm_set_pc): Remove.
4704 (the_low_target): Use linux_get_pc_32bit and
4705 linux_set_pc_32bit.
4706 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4707 (the_low_target): Use linux_get_pc_32bit and
4708 linux_set_pc_32bit.
4709 * linux-cris-low.c (debug_threads): Remove declaration.
4710 (cris_get_pc, cris_set_pc,): Remove.
4711 (the_low_target): Use linux_get_pc_32bit and
4712 linux_set_pc_32bit.
4713 * linux-crisv32-low.c (debug_threads): Remove declaration.
4714 (cris_get_pc, cris_set_pc): Remove.
4715 (the_low_target): Use linux_get_pc_32bit and
4716 linux_set_pc_32bit.
4717 * linux-low.c: Include inttypes.h.
4718 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4719 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4720 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4721 (the_low_target): Use linux_get_pc_32bit and
4722 linux_set_pc_32bit.
4723 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4724 (the_low_target): Use linux_get_pc_32bit and
4725 linux_set_pc_32bit.
4726 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4727 (the_low_target): Use linux_get_pc_32bit and
4728 linux_set_pc_32bit.
4729 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4730 (the_low_target): Use linux_get_pc_32bit and
4731 linux_set_pc_32bit.
4732 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4733 (the_low_target): Use linux_get_pc_32bit and
4734 linux_set_pc_32bit.
4735
eb0edac8
GB
47362016-01-18 Gary Benson <gbenson@redhat.com>
4737
4738 * configure.ac (AC_FUNC_FORK): New check.
4739 * config.in: Regenerate.
4740 * configure: Likewise.
4741
1b451dda
YQ
47422016-01-14 Yao Qi <yao.qi@linaro.org>
4743
4744 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4745 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4746 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4747 arm_get_next_pcs_ctor.
4748
82075af2
JS
47492016-01-12 Josh Stone <jistone@redhat.com>
4750 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4751
4752 * inferiors.h: Include "gdb_vecs.h".
4753 (struct process_info): Add syscalls_to_catch.
4754 * inferiors.c (remove_process): Free syscalls_to_catch.
4755 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4756 syscall_return stops.
4757 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4758 * server.c (handle_general_set): Handle QCatchSyscalls.
4759 (handle_query): Report support for QCatchSyscalls.
4760 * target.h (struct target_ops): Add supports_catch_syscall.
4761 (target_supports_catch_syscall): New macro.
4762 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4763 (struct lwp_info): Add syscall_state.
4764 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4765 Maintain syscall_state and syscalls_to_catch across exec.
4766 (get_syscall_trapinfo): New function, proxy to the_low_target.
4767 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4768 (linux_low_filter_event): Toggle syscall_state entry/return for
4769 syscall traps, and set it ignored for all others.
4770 (gdb_catching_syscalls_p): New function.
4771 (gdb_catch_this_syscall_p): New function.
4772 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4773 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4774 (linux_supports_catch_syscall): New function.
4775 (linux_target_ops): Install it.
4776 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4777 (the_low_target): Install it.
4778
8f13a3ce
MF
47792016-01-12 Mike Frysinger <vapier@gentoo.org>
4780
4781 * acinclude.m4: Include new ../warning.m4 file.
4782 * configure: Regenerated.
4783 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4784
5b3da067
MF
47852016-01-12 Mike Frysinger <vapier@gentoo.org>
4786
4787 * ax.c (is_goto_target): Mark static.
4788 * linux-low.c (register_addr): Likewise.
4789 (linux_fetch_registers, linux_store_registers): Likewise.
4790 * mem-break.c (any_persistent_commands): Fix old prototype.
4791 (add_commands_to_breakpoint): Mark static.
4792 * regcache.c (find_register_by_name): Delete unused func.
4793 * remote-utils.c (hex_or_minus_one): Mark static.
4794 * server.c (monitor_show_help): Mark static.
4795 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4796 handle_v_requests): Likewise.
4797
bc504a31
PA
47982016-01-12 Pedro Alves <palves@redhat.com>
4799
4800 Remove use of the registered trademark symbol throughout.
4801
5a0dd67a
YQ
48022016-01-08 Yao Qi <yao.qi@linaro.org>
4803
4804 * remote-utils.c (getpkt): If c is '\003', call target hook
4805 request_interrupt.
4806
b2ca446f
YQ
48072016-01-06 Yao Qi <yao.qi@linaro.org>
4808
4809 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4810 linux-aarch32-low.c.
4811 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4812 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4813 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4814 (thumb2_breakpoint): Declare.
4815 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4816 linux-aarch32-low.h.
4817 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4818 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4819 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4820
edd88788
JB
48212016-01-01 Joel Brobecker <brobecker@adacore.com>
4822
4823 * gdbreplay.c (gdbreplay_version): Change copyright year in
4824 version message.
4825 * server.c (gdbserver_version): Likewise.
4826
65da7f14
PP
48272015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4828
4829 * server.c (crc32_table): Delete.
4830 (crc32): Use libiberty's xcrc32 function.
4831
4abd5ed2
JB
48322015-12-22 Joel Brobecker <brobecker@adacore.com>
4833
4834 * lynx-low.c (lynx_delete_thread_callback): New function.
4835 (lynx_mourn): Properly delete our process and all of its
4836 threads. Remove call to clear_inferiors.
4837
0e50fe5c
JB
48382015-12-22 Joel Brobecker <brobecker@adacore.com>
4839
4840 * target.c (thread_search_callback): Add check that
4841 the thread_stopped target callback is not NULL before
4842 calling it.
4843
35adc03f
YQ
48442015-12-21 Yao Qi <yao.qi@linaro.org>
4845
4846 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4847 arm breakpoint.
4848
bd2b2909
AT
48492015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4850
4851 * server.c (handle_query): Call target_supports_software_single_step.
4852
7fe5e27e
AT
48532015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4854
4855 * linux-low.c (single_step): New function.
4856 (linux_resume_one_lwp_throw): Call single_step.
4857 (start_step_over): Likewise.
4858
d9311bfa
AT
48592015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4860
4861 * Makefile.in (SFILES): Append arch/arm-linux.c,
4862 arch/arm-get-next-pcs.c.
4863 (arm-linux.o): New rule.
4864 (arm-get-next-pcs.o): New rule.
4865 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4866 arm-linux.o.
4867 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4868 to linux-aarch32-low.c.
4869 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4870 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4871 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4872 (thumb2_breakpoint_len): Likewise.
4873 (arm_is_thumb_mode): Make non-static.
4874 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4875 from linux-aarch32-low.c.
4876 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4877 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4878 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4879 (thumb2_breakpoint_len): Likewise.
4880 (arm_is_thumb_mode): New declaration.
4881 * linux-arm-low.c: Include arch/arm-linux.h
4882 aarch/arm-get-next-pcs.h, sys/syscall.h.
4883 (get_next_pcs_ops): New struct.
4884 (get_next_pcs_addr_bits_remove): New function.
4885 (get_next_pcs_is_thumb): New function.
4886 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4887 (arm_sigreturn_next_pc): Likewise.
4888 (get_next_pcs_syscall_next_pc): Likewise.
4889 (arm_gdbserver_get_next_pcs): Likewise.
4890 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4891 Initialize.
4892 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4893 * server.h: Include gdb_vecs.h.
4894
68ce2059
AT
48952015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4896
4897 * Makefile.in (SFILES): Append common/common-regcache.c.
4898 (OBS): Append common-regcache.o.
4899 (common-regcache.o): New rule.
4900 * regcache.c (init_register_cache): Initialize cache to
4901 REG_UNAVAILABLE.
4902 (regcache_raw_read_unsigned): New function.
4903 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4904 register_status enum.
4905
fa5308bd
AT
49062015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4907
4908 * linux-aarch64-low.c (the_low_targets): Rename
4909 breakpoint_reinsert_addr to get_next_pcs.
4910 * linux-arm-low.c (the_low_targets): Likewise.
4911 * linux-bfin-low.c (the_low_targets): Likewise.
4912 * linux-cris-low.c (the_low_targets): Likewise.
4913 * linux-crisv32-low.c (the_low_targets): Likewise.
4914 * linux-low.c (can_software_single_step): Likewise.
4915 (install_software_single_step_breakpoints): New function.
4916 (start_step_over): Use install_software_single_step_breakpoints.
4917 * linux-low.h: New CORE_ADDR vector.
4918 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4919 get_next_pcs.
4920 * linux-mips-low.c (the_low_targets): Likewise.
4921 * linux-nios2-low.c (the_low_targets): Likewise.
4922 * linux-sparc-low.c (the_low_targets): Likewise.
4923
4a6ed09b
PA
49242015-12-17 Pedro Alves <palves@redhat.com>
4925
4926 * linux-low.c (linux_kill_one_lwp): Remove references to
4927 LinuxThreads.
4928 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4929 to 'kill'.
4930 (linux_init_signals): Delete.
4931 (initialize_low): Adjust.
4932 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4933
7544db95
PA
49342015-12-16 Pedro Alves <palves@redhat.com>
4935
4936 * configure.ac (compiler warning flags): When testing a
4937 -Wno-foo option, check whether -Wfoo works instead.
4938 * configure: Regenerate.
4939
8020350c
DB
49402015-12-11 Don Breazeal <donb@codesourcery.com>
4941
4942 * server.c (process_serial_event): Don't exit from gdbserver
4943 in remote mode if there are still active inferiors.
4944
db91f502
YQ
49452015-12-11 Yao Qi <yao.qi@linaro.org>
4946
4947 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4948 arm_breakpoint_at if the process is 32-bit.
4949
b37a6290
YQ
49502015-12-11 Yao Qi <yao.qi@linaro.org>
4951
4952 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4953 arm breakpoint.
4954
17b1509a
YQ
49552015-12-07 Yao Qi <yao.qi@linaro.org>
4956
4957 * configure.srv: Append arm.o to srv_tgtobj for
4958 aarch64*-*-linux* target.
4959 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4960 from linux-arm-low.c.
4961 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4962 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4963 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4964 (thumb2_breakpoint_len): Likewise.
4965 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4966 (arm_breakpoint_kinds): Likewise.
4967 (arm_breakpoint_kind_from_pc): Likewise.
4968 (arm_sw_breakpoint_from_kind): Likewise.
4969 (arm_breakpoint_kind_from_current_state): Likewise.
4970 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4971 (arm_sw_breakpoint_from_kind): Declare.
4972 (arm_breakpoint_kind_from_current_state): Declare.
4973 (arm_breakpoint_at): Declare.
4974 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4975 arm_sw_breakpoint_from_kind if process is 32-bit.
4976 (aarch64_breakpoint_kind_from_pc): New function.
4977 (aarch64_breakpoint_kind_from_current_state): New function.
4978 (the_low_target): Initialize fields breakpoint_kind_from_pc
4979 and breakpoint_kind_from_current_state.
4980 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4981 linux-aarch32-low.c.
4982 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4983 (arm_breakpoint, arm_breakpoint_len): Likewise.
4984 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4985 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4986 (arm_is_thumb_mode): Likewise.
4987 (arm_breakpoint_at): Likewise.
4988 (arm_breakpoint_kind_from_pc): Likewise.
4989 (arm_sw_breakpoint_from_kind): Likewise.
4990 (arm_breakpoint_kind_from_current_state): Likewise.
4991
4992 Revert:
4993 2015-08-04 Yao Qi <yao.qi@linaro.org>
4994
4995 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4996 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4997 * server.c (extended_protocol): Remove "static".
4998 * server.h (extended_protocol): Declare it.
4999
ece66d65
JS
50002015-12-04 Josh Stone <jistone@redhat.com>
5001
5002 * target.h (struct target_ops) <arch_setup>: Rename to ...
5003 (struct target_ops) <post_create_inferior>: ... this.
5004 (target_arch_setup): Rename to ...
5005 (target_post_create_inferior): ... this, calling post_create_inferior.
5006 * server.c (start_inferior): Update target_arch_setup calls to
5007 target_post_create_inferior.
5008 * linux-low.c (linux_low_ptrace_options): Forward declare.
5009 (linux_arch_setup): Update its comment for general use.
5010 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5011 (struct linux_target_ops): Use linux_post_create_inferior.
5012 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5013 to post_create_inferior.
5014 * nto-low.c (struct nto_target_ops): Likewise.
5015 * spu-low.c (struct spu_target_ops): Likewise.
5016 * win32-low.c (struct win32_target_ops): Likewise.
5017
e58c48b4
AT
50182015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5019
5020 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5021
fbec8956
AT
50222015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5023
5024 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5025 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5026 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5027 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5028 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5029 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5030 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5031 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5032 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5033 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5034 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5035 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5036
9b4c5f87
AT
50372015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5038
5039 * linux-low.c (linux_look_up_symbols): Don't call
5040 linux_supports_traceclone.
5041 * linux-low.h (thread_db_init): Remove use_events argument.
5042 * thread-db.c (thread_db_use_event): Remove global variable.
5043 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5044 (struct thread_db) <td_create_bp>: Remove field.
5045 (thread_db_create_event): Remove function.
5046 (thread_db_enable_reporting): Likewise.
5047 (find_one_thread): Don't check for thread_db_use_events.
5048 (attach_thread): Likewise.
5049 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5050 (try_thread_db_load_1): Don't check for thread_db_use_events.
5051 (thread_db_init): Remove use_events argument and thread events
5052 handling.
5053 (remove_thread_event_breakpoints): Remove function.
5054 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5055
7d00775e
AT
50562015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5057
5058 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5059 New function.
5060 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5061 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5062 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5063 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5064 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5065 Initialize.
5066 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5067 New function.
5068 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5069 * linux-low.c (can_hardware_single_step): Use
5070 supports_hardware_single_step.
5071 (can_software_single_step): New function.
5072 (start_step_over): Call can_software_single_step.
5073 (linux_supports_hardware_single_step): New function.
5074 (struct target_ops) <supports_software_single_step>: Initialize.
5075 * linux-low.h (struct linux_target_ops)
5076 <supports_hardware_single_step>: Initialize.
5077 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5078 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5079 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5080 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5081 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5082 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5083 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5084 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5085 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5086 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5087 Initialize.
5088 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5089 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5090 Initialize.
5091 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5092 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5093 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5094 New function.
5095 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5096 * target.h (struct target_ops): <supports_software_single_step>:
5097 New field.
5098 (target_supports_software_single_step): New macro.
5099
2d97cd35
AT
51002015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5101
5102 * linux-low.c (linux_wait_1): Fix pc advance condition.
5103 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5104 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5105
769ef81f
AT
51062015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5107
5108 * linux-arm-low.c (arm_is_thumb_mode): New function.
5109 (arm_breakpoint_at): Use arm_is_thumb_mode.
5110 (arm_breakpoint_kind_from_current_state): New function.
5111 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5112 Initialize.
5113 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5114 (linux_breakpoint_kind_from_current_state): New function.
5115 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5116 * linux-low.h (struct linux_target_ops)
5117 <breakpoint_kind_from_current_state>: New field.
5118 * target.h (struct target_ops): Likewise.
5119 (target_breakpoint_kind_from_current_state): New macro.
5120
1bebeeca
PA
51212015-11-30 Pedro Alves <palves@redhat.com>
5122
5123 * linux-low.c (linux_resume): Wake up the event loop before
5124 returning.
5125
a67a9fae
PA
51262015-11-30 Pedro Alves <palves@redhat.com>
5127
5128 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5129 check.
5130 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5131 to -1.
5132 * target.c (struct thread_search): New structure.
5133 (thread_search_callback): New function.
5134 (prev_general_thread): New global.
5135 (prepare_to_access_memory, done_accessing_memory): New functions.
5136 * target.h (prepare_to_access_memory, done_accessing_memory):
5137 Replace macros with function declarations.
5138
f2faf941
PA
51392015-11-30 Pedro Alves <palves@redhat.com>
5140
5141 PR 14618
5142 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5143 report TARGET_WAITKIND_NO_RESUMED.
5144 * remote-utils.c (prepare_resume_reply): Handle
5145 TARGET_WAITKIND_NO_RESUMED.
5146 * server.c (report_no_resumed): New global.
5147 (handle_query) <qSupported>: Handle "no-resumed+". Report
5148 "no-resumed+" support.
5149 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5150 return error if the client doesn't support no-resumed events.
5151 (push_stop_notification): New function.
5152 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5153 events if the client supports them.
5154
a681f9c9
PA
51552015-11-30 Pedro Alves <palves@redhat.com>
5156
5157 * linux-low.c (thread_still_has_status_pending_p): Don't check
5158 vCont;t here.
5159 (lwp_resumed): New function.
5160 (status_pending_p_callback): Return early if the LWP is not
5161 supposed to be resumed.
5162
65706a29
PA
51632015-11-30 Pedro Alves <palves@redhat.com>
5164
5165 * linux-low.c (handle_extended_wait): Assert that the LWP's
5166 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5167 thread create events, leave the new child's status pending.
5168 (linux_low_filter_event): If GDB wants to hear about thread exit
5169 events, leave the LWP marked dead and don't delete it.
5170 (linux_wait_for_event_filtered): Don't check for thread exit.
5171 (filter_exit_event): New function.
5172 (linux_wait_1): Use it, when returning an exit event.
5173 (linux_resume_one_lwp_throw): Assert that the LWP's
5174 waitstatus is TARGET_WAITKIND_IGNORE.
5175 * remote-utils.c (prepare_resume_reply): Handle
5176 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5177 * server.c (report_thread_events): New global.
5178 (handle_general_set): Handle QThreadEvents.
5179 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5180 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5181 TARGET_WAITKIND_THREAD_EXITED.
5182 * server.h (report_thread_events): Declare.
5183
56cf4bed
PA
51842015-11-30 Pedro Alves <palves@redhat.com>
5185
5186 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5187 the thread's last_resume_kind was resume_stop.
5188
500c1d85
PA
51892015-11-30 Pedro Alves <palves@redhat.com>
5190
5191 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5192 before returning.
5193
de979965
PA
51942015-11-30 Pedro Alves <palves@redhat.com>
5195
5196 * server.c (handle_v_requests): Handle vCtrlC.
5197
34c65914
PA
51982015-11-30 Pedro Alves <palves@redhat.com>
5199
5200 * gdbthread.h (find_any_thread_of_pid): Declare.
5201 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5202 functions.
5203 * server.c (handle_query): If current_thread is NULL, look for
5204 another thread of the selected process.
5205
79efa585 52062015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5207 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5208
5209 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5210 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5211 name in reply.
5212 * target.h (struct target_ops) <thread_name>: New field.
5213 (target_thread_name): New macro.
5214
80d82c19
JB
52152015-11-23 Joel Brobecker <brobecker@adacore.com>
5216
5217 * regcache.h (regcache_invalidate_pid): Add declaration.
5218 * regcache.c (regcache_invalidate_pid): New function, extracted
5219 from regcache_invalidate.
5220 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5221 Add trivial documentation comment.
5222 * lynx-low.c: Use regcache_invalidate_pid instead of
5223 regcache_invalidate.
5224
64da5dd5
JB
52252015-11-23 Joel Brobecker <brobecker@adacore.com>
5226
5227 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5228 and Elf64_auxv_t if the target is Android.
5229
37ce4055
DE
52302015-11-22 Doug Evans <xdje42@gmail.com>
5231
5232 * target.h: #include <sys/types.h>.
5233
06e03fff
PA
52342015-11-19 Pedro Alves <palves@redhat.com>
5235
5236 * linux-low.c (linux_process_qsupported): Change prototype.
5237 Adjust.
5238 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5239 Change prototype.
5240 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5241 and adjust to loop over all features.
5242 * server.c (handle_query) <qSupported>: Adjust to call
5243 target_process_qsupported once, passing it a vector of unprocessed
5244 features.
5245 * target.h (struct target_ops) <process_qsupported>: Change
5246 prototype.
5247 (target_process_qsupported): Adjust.
5248
9a084706
PA
52492015-11-19 Pedro Alves <palves@redhat.com>
5250
5251 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5252 mode.
5253 * configure: Regenerate.
5254
dad44a1f
PA
52552015-11-19 Pedro Alves <palves@redhat.com>
5256
5257 * configure: Regenerate.
5258
231c0592
YQ
52592015-11-19 Yao Qi <yao.qi@linaro.org>
5260
5261 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5262 type to uint32_t.
5263
6c1c9a8b
YQ
52642015-11-19 Yao Qi <yao.qi@linaro.org>
5265
5266 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5267 (struct aarch64_operand): Move enum out.
5268
9caa3311
YQ
52692015-11-19 Yao Qi <yao.qi@linaro.org>
5270
5271 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5272 struct user_fpsimd_state *.
5273 (aarch64_store_fpregset): Likewise.
5274
6a69a054
YQ
52752015-11-19 Yao Qi <yao.qi@linaro.org>
5276
5277 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5278 struct user_pt_regs *.
5279 (aarch64_store_gregset): Likewise.
5280
1798301e
PA
52812015-11-18 Pedro Alves <palves@redhat.com>
5282
5283 * Makefile.in (all_object_files): Add $IPA_OBJS.
5284
ce7715e2
PA
52852015-11-17 Pedro Alves <palves@redhat.com>
5286
5287 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5288 GDB_SIGNAL_0 and gdb_signal_to_string.
5289
c0879059
PA
52902015-11-17 Pedro Alves <palves@redhat.com>
5291
5292 * win32-low.c (handle_output_debug_string): Remove parameter.
5293 (win32_kill): Remove our_status local and adjust call to
5294 handle_output_debug_string.
5295 (get_child_debug_event): Adjust call to
5296 handle_output_debug_string.
5297
1996e237
SM
52982015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5299
5300 * linux-mips-low.c (mips_fill_gregset): Add cast.
5301 (mips_store_gregset): Likewise.
5302 (mips_fill_fpregset): Likewise.
5303 (mips_store_fpregset): Likewise.
5304
cbec665b
SM
53052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5306
5307 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5308 priv.
5309
eb3e3c67
SM
53102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5311
5312 * linux-mips-low.c (mips_linux_new_thread): Change type of
5313 watch_type to enum target_hw_bp_type.
5314
171de4b8
SM
53152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5316
5317 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5318 Change return type to arm_hwbp_type.
5319
04248ead
SM
53202015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5321
5322 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5323 (arm_store_gregset): Likewise.
5324 * linux-arm-low.c (arm_get_hwcap): Likewise.
5325 (arm_read_description): Likewise.
5326
04b3479c
SM
53272015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5328
5329 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5330
2bc84e8a
SM
53312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5332
5333 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5334 (ppc_fill_vsxregset): Likewise.
5335 (ppc_store_vsxregset): Likewise.
5336 (ppc_fill_vrregset): Likewise.
5337 (ppc_store_vrregset): Likewise.
5338 (ppc_fill_evrregset): Likewise.
5339 (ppc_store_evrregset): Likewise.
5340
e6c5bb05
SM
53412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5342
5343 * linux-ppc-low.c (ppc_usrregs_info): Remove
5344 forward-declaration.
5345 (ppc_arch_setup): Move lower in file.
5346
7ea45d72
SM
53472015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5348
5349 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5350 (ps_pdwrite): Likewise.
5351
69291610
HW
53522015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5353
5354 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5355 to after assert checks.
5356
b42945fd
SM
53572015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5358
5359 * proc-service.c (ps_pdread): Add/adjust casts.
5360 (ps_pdwrite): Add/adjust casts.
5361
d6f85c84
SM
53622015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5363
5364 * server.c (handle_search_memory_1): Cast return value of
5365 memmem.
5366
f98cd059
SM
53672015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5368
5369 * server.c (write_qxfer_response): Change type of data to
5370 gdb_byte *.
5371
d2412fa5
PA
53722015-10-29 Pedro Alves <palves@redhat.com>
5373
5374 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5375
c17414a2
PA
53762015-10-29 Pedro Alves <palves@redhat.com>
5377
5378 * tracepoint.c (clear_installed_tracepoints): Add casts.
5379
e053fbc4
PA
53802015-10-29 Pedro Alves <palves@redhat.com>
5381
5382 * server.c (handle_v_cont, process_serial_event): Add enum
5383 gdb_signal casts to signal parsing code.
5384
add67df8
PA
53852015-10-29 Pedro Alves <palves@redhat.com>
5386
5387 * linux-low.h (NULL_REGSET): Define.
5388 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5389 * linux-arm-low.c (arm_regsets): Likewise.
5390 * linux-crisv32-low.c (cris_regsets): Likewise.
5391 * linux-m68k-low.c (m68k_regsets): Likewise.
5392 * linux-mips-low.c (mips_regsets): Likewise.
5393 * linux-nios2-low.c (nios2_regsets): Likewise.
5394 * linux-ppc-low.c (ppc_regsets): Likewise.
5395 * linux-s390-low.c (s390_regsets): Likewise.
5396 * linux-sh-low.c (sh_regsets): Likewise.
5397 * linux-sparc-low.c (sparc_regsets): Likewise.
5398 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5399 * linux-tile-low.c (tile_regsets): Likewise.
5400 * linux-x86-low.c (x86_regsets): Likewise.
5401 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5402
50bc912a
PA
54032015-10-29 Pedro Alves <palves@redhat.com>
5404
5405 * linux-low.h (NULL_REGSET): Define.
5406 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5407 * linux-arm-low.c (arm_regsets): Likewise.
5408 * linux-crisv32-low.c (cris_regsets): Likewise.
5409 * linux-m68k-low.c (m68k_regsets): Likewise.
5410 * linux-mips-low.c (mips_regsets): Likewise.
5411 * linux-nios2-low.c (nios2_regsets): Likewise.
5412 * linux-ppc-low.c (ppc_regsets): Likewise.
5413 * linux-s390-low.c (s390_regsets): Likewise.
5414 * linux-sh-low.c (sh_regsets): Likewise.
5415 * linux-sparc-low.c (sparc_regsets): Likewise.
5416 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5417 * linux-tile-low.c (tile_regsets): Likewise.
5418 * linux-x86-low.c (x86_regsets): Likewise.
5419 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5420
682b2546
DE
54212015-10-26 Doug Evans <dje@google.com>
5422
5423 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5424
963843d4
DE
54252015-10-26 Doug Evans <dje@google.com>
5426
5427 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5428
d41401ac
DE
54292015-10-26 Doug Evans <dje@google.com>
5430
5431 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5432 for debug_printf.
5433 (attach_thread, find_new_threads_callback): Ditto.
5434
3db28855
AT
54352015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5436
5437 * mem-break.h (set_breakpoint_data): Remove.
5438
fb78e89c
AT
54392015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5440
5441 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5442 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5443 (initialize_low): Remove set_breakpoint_data call.
5444 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5445 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5446 (initialize_low): Remove set_breakpoint_data call.
5447 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5448 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5449 (initialize_low): Remove set_breakpoint_data call.
5450
2e6ee069
AT
54512015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5452
5453 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5454 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5455 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5456 * target.h (target_breakpoint_kind_from_pc): New macro.
5457
1652a986
AT
54582015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5459
5460 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5461 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5462 the default breakpoint kind.
5463
abeead09
AT
54642015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5465
5466 * linux-arm-low.c (arm_supports_z_point_type): Add software
5467 breakpoint support.
5468
b0b4b501
AT
54692015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5470
5471 * linux-arm-low.c: Refactor breakpoint definitions.
5472 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5473 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5474
8689682c
AT
54752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5476
5477 * Makefile.in: Add arm.c/o.
5478 * configure.srv: Likewise.
5479 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5480 (arm_breakpoint_kind_from_pc): New function.
5481 (arm_sw_breakpoint_from_kind): Return proper kind.
5482 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5483
27165294
AT
54842015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5485
5486 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5487 removal.
5488 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5489 (struct raw_breakpoint) <size>: Remove.
5490 (struct raw_breakpoint) <kind>: Add.
5491 (bp_size): New function.
5492 (bp_opcode): Likewise.
5493 (find_raw_breakpoint_at): Adjust for kind.
5494 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5495 (remove_memory_breakpoint): Adjust for kind call bp_size.
5496 (set_raw_breakpoint_at): Adjust for kind.
5497 (set_breakpoint): Likewise.
5498 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5499 (delete_raw_breakpoint): Adjust for kind.
5500 (delete_breakpoint): Likewise.
5501 (find_gdb_breakpoint): Likewise.
5502 (set_gdb_breakpoint_1): Likewise.
5503 (set_gdb_breakpoint): Likewise.
5504 (delete_gdb_breakpoint_1): Likewise.
5505 (delete_gdb_breakpoint): Likewise.
5506 (uninsert_raw_breakpoint): Likewise.
5507 (reinsert_raw_breakpoint): Likewise.
5508 (set_breakpoint_data): Remove.
5509 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5510 (check_mem_read): Adjust for kind call bp_size.
5511 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5512 (clone_one_breakpoint): Adjust for kind.
5513 * mem-break.h (set_gdb_breakpoint): Likewise.
5514 (delete_gdb_breakpoint): Likewise.
5515 * server.c (process_serial_event): Likewise.
5516
dd373349
AT
55172015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5518
5519 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5525 (arm_sw_breakpoint_from_kind): New function.
5526 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5527 (struct linux_target_ops) <breakpoint>: Remove.
5528 (struct linux_target_ops) <breakpoint_len>: Remove.
5529 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5530 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5531 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5532 (struct linux_target_ops) <breakpoint>: Remove.
5533 (struct linux_target_ops) <breakpoint_len>: Remove.
5534 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5535 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5536 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5537 (struct linux_target_ops) <breakpoint>: Remove.
5538 (struct linux_target_ops) <breakpoint_len>: Remove.
5539 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5540 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5541 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5542 and sw_breakpoint_from_kind to increment the pc.
5543 (linux_breakpoint_kind_from_pc): New function.
5544 (linux_sw_breakpoint_from_kind): New function.
5545 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5546 (initialize_low): Call breakpoint_kind_from_pc and
5547 sw_breakpoint_from_kind to replace breakpoint_data/len.
5548 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5549 New field.
5550 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5551 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5552 (struct linux_target_ops) <breakpoint>: Remove.
5553 (struct linux_target_ops) <breakpoint_len>: Remove.
5554 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5555 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5556 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5557 (struct linux_target_ops) <breakpoint>: Remove.
5558 (struct linux_target_ops) <breakpoint_len>: Remove.
5559 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5560 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5561 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5562 (struct linux_target_ops) <breakpoint>: Remove.
5563 (struct linux_target_ops) <breakpoint_len>: Remove.
5564 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5565 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5566 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5567 (struct linux_target_ops) <breakpoint>: Remove.
5568 (struct linux_target_ops) <breakpoint_len>: Remove.
5569 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5570 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5571 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5572 (struct linux_target_ops) <breakpoint>: Remove.
5573 (struct linux_target_ops) <breakpoint_len>: Remove.
5574 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5575 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5576 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5577 (struct linux_target_ops) <breakpoint>: Remove.
5578 (struct linux_target_ops) <breakpoint_len>: Remove.
5579 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5580 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5581 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5582 (struct linux_target_ops) <breakpoint>: Remove.
5583 (struct linux_target_ops) <breakpoint_len>: Remove.
5584 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5585 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5586 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5587 (struct linux_target_ops) <breakpoint>: Remove.
5588 (struct linux_target_ops) <breakpoint_len>: Remove.
5589 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5590 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5591 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5592 (struct linux_target_ops) <breakpoint>: Remove.
5593 (struct linux_target_ops) <breakpoint_len>: Remove.
5594 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5595 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5596 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5597 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5598 (struct linux_target_ops) <breakpoint>: Remove.
5599 (struct linux_target_ops) <breakpoint_len>: Remove.
5600 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5601 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5602 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5603 (struct linux_target_ops) <breakpoint>: Remove.
5604 (struct linux_target_ops) <breakpoint_len>: Remove.
5605 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5606 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5607
4cd98a19
AT
56082015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5609
5610 * linux-cris-low.c (cris_get_pc): Remove void arg.
5611
774ee6d2
AR
56122015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5613
5614 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5615 variable name.
5616
833dcd29
AR
56172015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5618
5619 * inferiors.c (thread_pid_matches_callback): New function.
5620 (find_thread_process): New function.
5621 (remove_thread): Reset current_thread.
5622 (remove_process): Assert threads have been removed first.
5623
8d689ee5
YQ
56242015-10-15 Yao Qi <yao.qi@linaro.org>
5625
5626 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5627 if it is 3.
5628 (aarch64_remove_point): Likewise.
5629 * regcache.c (regcache_register_size): New function.
5630
1c2e1515
YQ
56312015-10-12 Yao Qi <yao.qi@linaro.org>
5632
5633 * linux-aarch64-low.c: Update all callers as emit_load_store
5634 is renamed to aarch64_emit_load_store.
5635
e1c587c3
YQ
56362015-10-12 Yao Qi <yao.qi@linaro.org>
5637
5638 * linux-aarch64-low.c: Update all callers of function renaming
5639 from emit_insn to aarch64_emit_insn.
5640
b6542f81
YQ
56412015-10-12 Yao Qi <yao.qi@linaro.org>
5642
5643 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5644 arch/aarch64-insn.h.
5645 (struct aarch64_memory_operand): Likewise.
5646 (ENCODE): Likewise.
5647 (emit_insn): Move to arch/aarch64-insn.c.
5648 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5649 (emit_load_store): Move to arch/aarch64-insn.c.
5650 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5651 (can_encode_int32): Remove.
5652
246994ce
YQ
56532015-10-12 Yao Qi <yao.qi@linaro.org>
5654
5655 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5656 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5657 (aarch64_relocate_instruction): Likewise.
5658 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5659 (struct aarch64_insn_visitor): Likewise.
5660
0badd99f
YQ
56612015-10-12 Yao Qi <yao.qi@linaro.org>
5662
5663 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5664 (struct aarch64_insn_visitor): New.
5665 (struct aarch64_insn_relocation_data): New.
5666 (aarch64_ftrace_insn_reloc_b): New function.
5667 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5668 (aarch64_ftrace_insn_reloc_cb): Likewise.
5669 (aarch64_ftrace_insn_reloc_tb): Likewise.
5670 (aarch64_ftrace_insn_reloc_adr): Likewise.
5671 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5672 (aarch64_ftrace_insn_reloc_others): Likewise.
5673 (visitor): New.
5674 (aarch64_relocate_instruction): Use visitor.
5675
dfaffe9d
YQ
56762015-10-12 Yao Qi <yao.qi@linaro.org>
5677
5678 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5679 int. Add argument buf.
5680 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5681 aarch64_relocate_instruction.
5682
70b439f0
YQ
56832015-10-12 Yao Qi <yao.qi@linaro.org>
5684
5685 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5686 argument insn. Remove local variable insn. Don't call
5687 target_read_uint32.
5688 (aarch64_install_fast_tracepoint_jump_pad): Call
5689 target_read_uint32.
5690
7781c06f
YQ
56912015-09-30 Yao Qi <yao.qi@linaro.org>
5692
5693 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5694 (emit_load_store_pair): Likewise.
5695
9a3c8263
SM
56962015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5697
5698 * dll.c (match_dll): Add cast(s).
5699 (unloaded_dll): Likewise.
5700 * linux-low.c (second_thread_of_pid_p): Likewise.
5701 (delete_lwp_callback): Likewise.
5702 (count_events_callback): Likewise.
5703 (select_event_lwp_callback): Likewise.
5704 (linux_set_resume_request): Likewise.
5705 * server.c (accumulate_file_name_length): Likewise.
5706 (emit_dll_description): Likewise.
5707 (handle_qxfer_threads_worker): Likewise.
5708 (visit_actioned_threads): Likewise.
5709 * thread-db.c (any_thread_of): Likewise.
5710 * tracepoint.c (same_process_p): Likewise.
5711 (match_blocktype): Likewise.
5712 (build_traceframe_info_xml): Likewise.
5713
224c3ddb
SM
57142015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5715
5716 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5717 assignment.
5718 (gdb_unparse_agent_expr): Likewise.
5719 * hostio.c (require_data): Likewise.
5720 (handle_pread): Likewise.
5721 * linux-low.c (disable_regset): Likewise.
5722 (fetch_register): Likewise.
5723 (store_register): Likewise.
5724 (get_dynamic): Likewise.
5725 (linux_qxfer_libraries_svr4): Likewise.
5726 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5727 (set_fast_tracepoint_jump): Likewise.
5728 (uninsert_fast_tracepoint_jumps_at): Likewise.
5729 (reinsert_fast_tracepoint_jumps_at): Likewise.
5730 (validate_inserted_breakpoint): Likewise.
5731 (clone_agent_expr): Likewise.
5732 * regcache.c (init_register_cache): Likewise.
5733 * remote-utils.c (putpkt_binary_1): Likewise.
5734 (decode_M_packet): Likewise.
5735 (decode_X_packet): Likewise.
5736 (look_up_one_symbol): Likewise.
5737 (relocate_instruction): Likewise.
5738 (monitor_output): Likewise.
5739 * server.c (handle_search_memory): Likewise.
5740 (handle_qxfer_exec_file): Likewise.
5741 (handle_qxfer_libraries): Likewise.
5742 (handle_qxfer): Likewise.
5743 (handle_query): Likewise.
5744 (handle_v_cont): Likewise.
5745 (handle_v_run): Likewise.
5746 (captured_main): Likewise.
5747 * target.c (write_inferior_memory): Likewise.
5748 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5749 * tracepoint.c (init_trace_buffer): Likewise.
5750 (add_tracepoint_action): Likewise.
5751 (add_traceframe): Likewise.
5752 (add_traceframe_block): Likewise.
5753 (cmd_qtdpsrc): Likewise.
5754 (cmd_qtdv): Likewise.
5755 (cmd_qtstatus): Likewise.
5756 (response_source): Likewise.
5757 (response_tsv): Likewise.
5758 (cmd_qtnotes): Likewise.
5759 (gdb_collect): Likewise.
5760 (initialize_tracepoint): Likewise.
5761
afbe19f8
PL
57622015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5763
5764 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5765 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5766 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5767 <NOP>: New.
5768 (enum aarch64_condition_codes): New enum.
5769 (w0): New static global.
5770 (fp): Likewise.
5771 (lr): Likewise.
5772 (struct aarch64_memory_operand) <type>: New
5773 MEMORY_OPERAND_POSTINDEX type.
5774 (postindex_memory_operand): New helper function.
5775 (emit_ret): New function.
5776 (emit_load_store_pair): New function, factored out of emit_stp
5777 with support for MEMORY_OPERAND_POSTINDEX.
5778 (emit_stp): Rewrite using emit_load_store_pair.
5779 (emit_ldp): New function.
5780 (emit_load_store): Likewise.
5781 (emit_ldr): Mention post-index instruction in comment.
5782 (emit_ldrh): New function.
5783 (emit_ldrb): New function.
5784 (emit_ldrsw): Mention post-index instruction in comment.
5785 (emit_str): Likewise.
5786 (emit_subs): New function.
5787 (emit_cmp): Likewise.
5788 (emit_and): Likewise.
5789 (emit_orr): Likewise.
5790 (emit_orn): Likewise.
5791 (emit_eor): Likewise.
5792 (emit_mvn): Likewise.
5793 (emit_lslv): Likewise.
5794 (emit_lsrv): Likewise.
5795 (emit_asrv): Likewise.
5796 (emit_mul): Likewise.
5797 (emit_sbfm): Likewise.
5798 (emit_sbfx): Likewise.
5799 (emit_ubfm): Likewise.
5800 (emit_ubfx): Likewise.
5801 (emit_csinc): Likewise.
5802 (emit_cset): Likewise.
5803 (emit_nop): Likewise.
5804 (emit_ops_insns): New helper function.
5805 (emit_pop): Likewise.
5806 (emit_push): Likewise.
5807 (aarch64_emit_prologue): New function.
5808 (aarch64_emit_epilogue): Likewise.
5809 (aarch64_emit_add): Likewise.
5810 (aarch64_emit_sub): Likewise.
5811 (aarch64_emit_mul): Likewise.
5812 (aarch64_emit_lsh): Likewise.
5813 (aarch64_emit_rsh_signed): Likewise.
5814 (aarch64_emit_rsh_unsigned): Likewise.
5815 (aarch64_emit_ext): Likewise.
5816 (aarch64_emit_log_not): Likewise.
5817 (aarch64_emit_bit_and): Likewise.
5818 (aarch64_emit_bit_or): Likewise.
5819 (aarch64_emit_bit_xor): Likewise.
5820 (aarch64_emit_bit_not): Likewise.
5821 (aarch64_emit_equal): Likewise.
5822 (aarch64_emit_less_signed): Likewise.
5823 (aarch64_emit_less_unsigned): Likewise.
5824 (aarch64_emit_ref): Likewise.
5825 (aarch64_emit_if_goto): Likewise.
5826 (aarch64_emit_goto): Likewise.
5827 (aarch64_write_goto_address): Likewise.
5828 (aarch64_emit_const): Likewise.
5829 (aarch64_emit_call): Likewise.
5830 (aarch64_emit_reg): Likewise.
5831 (aarch64_emit_pop): Likewise.
5832 (aarch64_emit_stack_flush): Likewise.
5833 (aarch64_emit_zero_ext): Likewise.
5834 (aarch64_emit_swap): Likewise.
5835 (aarch64_emit_stack_adjust): Likewise.
5836 (aarch64_emit_int_call_1): Likewise.
5837 (aarch64_emit_void_call_2): Likewise.
5838 (aarch64_emit_eq_goto): Likewise.
5839 (aarch64_emit_ne_goto): Likewise.
5840 (aarch64_emit_lt_goto): Likewise.
5841 (aarch64_emit_le_goto): Likewise.
5842 (aarch64_emit_gt_goto): Likewise.
5843 (aarch64_emit_ge_got): Likewise.
5844 (aarch64_emit_ops_impl): New static global variable.
5845 (aarch64_emit_ops): New target function, return
5846 &aarch64_emit_ops_impl.
5847 (struct linux_target_ops): Install it.
5848
bb903df0
PL
58492015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5850
5851 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5852 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5853 aarch64-ipa.o.
5854 * linux-aarch64-ipa.c: New file.
5855 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5856 and endian.h.
5857 (aarch64_get_thread_area): New target method.
5858 (extract_signed_bitfield): New helper function.
5859 (aarch64_decode_ldr_literal): New function.
5860 (enum aarch64_opcodes): New enum.
5861 (struct aarch64_register): New struct.
5862 (struct aarch64_operand): New struct.
5863 (x0): New static global.
5864 (x1): Likewise.
5865 (x2): Likewise.
5866 (x3): Likewise.
5867 (x4): Likewise.
5868 (w2): Likewise.
5869 (ip0): Likewise.
5870 (sp): Likewise.
5871 (xzr): Likewise.
5872 (aarch64_register): New helper function.
5873 (register_operand): Likewise.
5874 (immediate_operand): Likewise.
5875 (struct aarch64_memory_operand): New struct.
5876 (offset_memory_operand): New helper function.
5877 (preindex_memory_operand): Likewise.
5878 (enum aarch64_system_control_registers): New enum.
5879 (ENCODE): New macro.
5880 (emit_insn): New helper function.
5881 (emit_b): New function.
5882 (emit_bcond): Likewise.
5883 (emit_cb): Likewise.
5884 (emit_tb): Likewise.
5885 (emit_blr): Likewise.
5886 (emit_stp): Likewise.
5887 (emit_ldp_q_offset): Likewise.
5888 (emit_stp_q_offset): Likewise.
5889 (emit_load_store): Likewise.
5890 (emit_ldr): Likewise.
5891 (emit_ldrsw): Likewise.
5892 (emit_str): Likewise.
5893 (emit_ldaxr): Likewise.
5894 (emit_stxr): Likewise.
5895 (emit_stlr): Likewise.
5896 (emit_data_processing_reg): Likewise.
5897 (emit_data_processing): Likewise.
5898 (emit_add): Likewise.
5899 (emit_sub): Likewise.
5900 (emit_mov): Likewise.
5901 (emit_movk): Likewise.
5902 (emit_mov_addr): Likewise.
5903 (emit_mrs): Likewise.
5904 (emit_msr): Likewise.
5905 (emit_sevl): Likewise.
5906 (emit_wfe): Likewise.
5907 (append_insns): Likewise.
5908 (can_encode_int32_in): New helper function.
5909 (aarch64_relocate_instruction): New function.
5910 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5911 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5912 (struct linux_target_ops): Install aarch64_get_thread_area,
5913 aarch64_install_fast_tracepoint_jump_pad and
5914 aarch64_get_min_fast_tracepoint_insn_len.
5915
787749ea
PL
59162015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5917
5918 * Makefile.in (aarch64-insn.o): New rule.
5919 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5920
9812b2e6
YQ
59212015-09-21 Yao Qi <yao.qi@linaro.org>
5922
5923 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5924
18fe412b
YQ
59252015-09-21 Yao Qi <yao.qi@linaro.org>
5926
5927 * tracepoint.c (max_jump_pad_size): Remove.
5928
a0cc84cd
YQ
59292015-09-18 Yao Qi <yao.qi@linaro.org>
5930
5931 * linux-aarch64-low.c: Don't include sys/uio.h.
5932 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5933
d78908cf
WW
59342015-09-16 Wei-cheng Wang <cole945@gmail.com>
5935
5936 * tracepoint.c (eval_result_type): Change prototype.
5937 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5938
d57e0d50
PA
59392015-09-15 Pedro Alves <palves@redhat.com>
5940
5941 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5942 Check whether to report exec events instead of checking whether
5943 multiprocess is enabled.
5944
5a676acc
PA
59452015-09-15 Pedro Alves <palves@redhat.com>
5946
5947 PR remote/18965
5948 * remote-utils.c (prepare_resume_reply): Merge
5949 TARGET_WAITKIND_VFORK_DONE switch case with the
5950 TARGET_WAITKIND_FORKED case.
5951
7c5d0fad
YQ
59522015-09-15 Yao Qi <yao.qi@linaro.org>
5953
5954 * server.c (handle_query): Check string comparison using
5955 "else if" instead of "if".
5956
750ce8d1
YQ
59572015-09-15 Yao Qi <yao.qi@linaro.org>
5958
5959 * server.c (vCont_supported): New global variable.
5960 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5961 matches. Append ";vContSupported+" to own_buf.
5962 (handle_v_requests): Append ";s;S" to own_buf if target supports
5963 hardware single step or vCont_supported is false.
5964 (capture_main): Set vCont_supported to zero.
5965
70b90b91
YQ
59662015-09-15 Yao Qi <yao.qi@linaro.org>
5967
5968 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5969 it to ...
5970 (linux_supports_hardware_single_step): ... New function.
5971 (linux_target_ops): Update.
5972 * lynx-low.c (lynx_target_ops): Set field
5973 supports_hardware_single_step to target_can_do_hardware_single_step.
5974 * nto-low.c (nto_target_ops): Likewise.
5975 * spu-low.c (spu_target_ops): Likewise.
5976 * win32-low.c (win32_target_ops): Likewise.
5977 * target.c (target_can_do_hardware_single_step): New function.
5978 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5979 Remove. <supports_hardware_single_step>: New field.
5980 (target_supports_conditional_breakpoints): Remove.
5981 (target_supports_hardware_single_step): New macro.
5982 (target_can_do_hardware_single_step): Declare.
5983 * server.c (handle_query): Use target_supports_hardware_single_step
5984 instead of target_supports_conditional_breakpoints.
5985
ade90bde
YQ
59862015-09-15 Yao Qi <yao.qi@linaro.org>
5987
5988 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5989 function.
5990 (struct linux_target_ops the_low_target): Install
5991 aarch64_linux_siginfo_fixup.
5992
94585166
DB
59932015-09-11 Don Breazeal <donb@codesourcery.com>
5994 Luis Machado <lgustavo@codesourcery.com>
5995
5996 * linux-low.c (linux_mourn): Static declaration.
5997 (linux_arch_setup): Move in front of
5998 handle_extended_wait.
5999 (linux_arch_setup_thread): New function.
6000 (handle_extended_wait): Handle exec events. Call
6001 linux_arch_setup_thread. Make event_lwp argument a
6002 pointer-to-a-pointer.
6003 (check_zombie_leaders): Do not check stopped threads.
6004 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6005 (linux_low_filter_event): Add lwp and thread for exec'ing
6006 non-leader thread if leader thread has been deleted.
6007 Refactor code into linux_arch_setup_thread and call it.
6008 Pass child lwp pointer by reference to handle_extended_wait.
6009 (linux_wait_for_event_filtered): Update comment.
6010 (linux_wait_1): Prevent clobbering exec event status.
6011 (linux_supports_exec_events): New function.
6012 (linux_target_ops) <supports_exec_events>: Initialize new member.
6013 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6014 new member.
6015 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6016 * server.c (report_exec_events): New global variable.
6017 (handle_query): Handle qSupported query for exec-events feature.
6018 (captured_main): Initialize report_exec_events.
6019 * server.h (report_exec_events): Declare new global variable.
6020 * target.h (struct target_ops) <supports_exec_events>: New
6021 member.
6022 (target_supports_exec_events): New macro.
6023 * win32-low.c (win32_target_ops) <supports_exec_events>:
6024 Initialize new member.
6025
0568462b
MM
60262015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6027
6028 * linux-low.c (linux_low_enable_btrace): Remove.
6029 (linux_target_ops): Replace linux_low_enable_btrace with
6030 linux_enable_btrace.
6031
39edd165
YQ
60322015-09-03 Yao Qi <yao.qi@linaro.org>
6033
6034 * linux-aarch64-low.c (aarch64_insert_point): Call
6035 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6036 returns true.
6037
1db33b5a
UW
60382015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6039
6040 * linux-low.c (check_stopped_by_breakpoint): Use
6041 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6042
ab290430
PA
60432015-08-27 Pedro Alves <palves@redhat.com>
6044
6045 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6046
8d749320
SM
60472015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6048
6711b7f8
SM
6049 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6050 the XNEW-family equivalent.
8d749320
SM
6051 (compile_bytecodes): Likewise.
6052 * dll.c (loaded_dll): Likewise.
6053 * event-loop.c (append_callback_event): Likewise.
6054 (create_file_handler): Likewise.
6055 (create_file_event): Likewise.
6056 * hostio.c (handle_open): Likewise.
6057 * inferiors.c (add_thread): Likewise.
6058 (add_process): Likewise.
6059 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6060 * linux-arm-low.c (arm_new_process): Likewise.
6061 (arm_new_thread): Likewise.
6062 * linux-low.c (add_to_pid_list): Likewise.
6063 (linux_add_process): Likewise.
6064 (handle_extended_wait): Likewise.
6065 (add_lwp): Likewise.
6066 (enqueue_one_deferred_signal): Likewise.
6067 (enqueue_pending_signal): Likewise.
6068 (linux_resume_one_lwp_throw): Likewise.
6069 (linux_resume_one_thread): Likewise.
6070 (linux_read_memory): Likewise.
6071 (linux_write_memory): Likewise.
6072 * linux-mips-low.c (mips_linux_new_process): Likewise.
6073 (mips_linux_new_thread): Likewise.
6074 (mips_add_watchpoint): Likewise.
6075 * linux-x86-low.c (initialize_low_arch): Likewise.
6076 * lynx-low.c (lynx_add_process): Likewise.
6077 * mem-break.c (set_raw_breakpoint_at): Likewise.
6078 (set_breakpoint): Likewise.
6079 (add_condition_to_breakpoint): Likewise.
6080 (add_commands_to_breakpoint): Likewise.
6081 (clone_agent_expr): Likewise.
6082 (clone_one_breakpoint): Likewise.
6083 * regcache.c (new_register_cache): Likewise.
6084 * remote-utils.c (look_up_one_symbol): Likewise.
6085 * server.c (queue_stop_reply): Likewise.
6086 (start_inferior): Likewise.
6087 (queue_stop_reply_callback): Likewise.
6088 (handle_target_event): Likewise.
6089 * spu-low.c (fetch_ppc_memory): Likewise.
6090 (store_ppc_memory): Likewise.
6091 * target.c (set_target_ops): Likewise.
6092 * thread-db.c (thread_db_load_search): Likewise.
6093 (try_thread_db_load_1): Likewise.
6094 * tracepoint.c (add_tracepoint): Likewise.
6095 (add_tracepoint_action): Likewise.
6096 (create_trace_state_variable): Likewise.
6097 (cmd_qtdpsrc): Likewise.
6098 (cmd_qtro): Likewise.
6099 (add_while_stepping_state): Likewise.
6100 * win32-low.c (child_add_thread): Likewise.
6101 (get_image_name): Likewise.
6102
ed8b7b42
YQ
61032015-08-25 Yao Qi <yao.qi@linaro.org>
6104
6105 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6106
db3cb7cb
YQ
61072015-08-25 Yao Qi <yao.qi@linaro.org>
6108
6109 * Makefile.in (aarch64-linux.o): New rule.
6110 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6111 srv_tgtobj.
6112 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6113 (aarch64_init_debug_reg_state): Make it extern.
6114 (aarch64_linux_prepare_to_resume): Remove.
6115
f6011a1c
YQ
61162015-08-25 Yao Qi <yao.qi@linaro.org>
6117
6118 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6119 lwp_arch_private_info and ptid_of_lwp.
6120
88e2cf7e
YQ
61212015-08-25 Yao Qi <yao.qi@linaro.org>
6122
6123 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6124 Find proc_info by find_process_pid. All callers updated.
6125
5e35436e
YQ
61262015-08-25 Yao Qi <yao.qi@linaro.org>
6127
6128 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6129 Remove.
6130 (debug_reg_change_callback): Remove.
6131 (aarch64_notify_debug_reg_change): Remove.
6132
4a8a7965
YQ
61332015-08-25 Yao Qi <yao.qi@linaro.org>
6134
6135 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6136 Call current_lwp_ptid.
6137
32a271ee
YQ
61382015-08-25 Yao Qi <yao.qi@linaro.org>
6139
6140 * linux-aarch64-low.c (debug_reg_change_callback): Use
6141 debug_printf.
6142
0d51c8d7
YQ
61432015-08-25 Yao Qi <yao.qi@linaro.org>
6144
6145 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6146
31a43dd5
YQ
61472015-08-25 Yao Qi <yao.qi@linaro.org>
6148
6149 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6150
8ee52567
YQ
61512015-08-25 Yao Qi <yao.qi@linaro.org>
6152
6153 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6154 the code.
6155
ff3f0f45
YQ
61562015-08-25 Yao Qi <yao.qi@linaro.org>
6157
6158 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6159 Remove.
6160 (debug_reg_change_callback): Remove argument entry and add argument
6161 lwp. Remove local variable thread. Don't print thread id in the
6162 debugging output. Don't check whether pid of thread equals to pid.
6163 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6164 iterate_over_lwps instead find_inferior.
6165
3d40fbb5
PA
61662015-08-24 Pedro Alves <palves@redhat.com>
6167
6168 * inferiors.c (get_first_process): New function.
6169 * inferiors.h (get_first_process): New declaration.
6170 * remote-utils.c (read_ptid): Default to the first process in the
6171 list, instead of to the current thread's process.
6172
438e1e42
PA
61732015-08-24 Pedro Alves <palves@redhat.com>
6174
6175 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6176 * event-loop.c: Likewise.
6177 * remote-utils.c: Likewise.
6178 * tracepoint.c: Likewise.
6179
a8c6d4fc
PA
61802015-08-24 Pedro Alves <palves@redhat.com>
6181
6182 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6183 ptid_get_lwp.
6184
99b0bb12
PA
61852015-08-21 Pedro Alves <palves@redhat.com>
6186
6187 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6188 instead of literal 1.
6189
f8904751
PA
61902015-08-21 Pedro Alves <palves@redhat.com>
6191
6192 * tdesc.c (default_description): Explicitly zero-initialize.
6193
465a859e
PA
61942015-08-21 Pedro Alves <palves@redhat.com>
6195
6196 PR gdb/18749
6197 * inferiors.c (remove_thread): Discard any pending stop reply for
6198 this thread.
6199 * server.c (remove_all_on_match_pid): Rename to ...
6200 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6201 instead of a pid.
6202 (discard_queued_stop_replies): Change parameter to a ptid. Now
6203 extern.
6204 (handle_v_kill, kill_inferior_callback, captured_main)
6205 (process_serial_event): Adjust.
6206 * server.h (discard_queued_stop_replies): Declare.
6207
f0db101d
PA
62082015-08-21 Pedro Alves <palves@redhat.com>
6209
6210 * linux-low.c (wait_for_sigstop): Always switch to no thread
6211 selected if the previously current thread dies.
6212 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6213 process instead of the current thread's.
6214 * remote-utils.c (input_interrupt): Don't check if there's no
6215 current thread.
6216 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6217 current thread to the general thread fails, error out.
6218 (handle_qxfer_auxv, handle_qxfer_libraries)
6219 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6220 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6221 (handle_query): Check if there's a thread selected instead of
6222 checking whether there's any thread in the thread list.
6223 (handle_qxfer_threads, handle_qxfer_btrace)
6224 (handle_qxfer_btrace_conf): Don't error out early if there's no
6225 thread in the thread list.
6226 (handle_v_cont, myresume): Don't set the current thread to the
6227 continue thread.
6228 (process_serial_event) <Hg handling>: Also set thread_id if the
6229 previous general thread is still alive.
6230 (process_serial_event) <g/G handling>: If setting the current
6231 thread to the general thread fails, error out.
6232 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6233 thread's lwp instead of the current thread's.
6234 * target.c (set_desired_thread): If the desired thread was not
6235 found, leave the current thread pointing to NULL. Return an int
6236 (boolean) indicating success.
6237 * target.h (set_desired_thread): Change return type to int.
6238
40045d91
MF
62392015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6240
6241 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6242 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6243 #includes.
6244 (ps_get_thread_area): New function.
6245
45face3b
GB
62462015-08-19 Gary Benson <gbenson@redhat.com>
6247
6248 * hostio.c (handle_pread): Do not attempt to read more data
6249 than hostio_reply_with_data can fit in a packet.
6250
16d5f642
JB
62512015-08-18 Joel Brobecker <brobecker@adacore.com>
6252
6253 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6254
a738da3a
MF
62552015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6256
6257 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6258
33ebda9d
PA
62592015-08-06 Pedro Alves <palves@redhat.com>
6260
6261 * tracepoint.c (expr_eval_result): Now an int.
6262
a44892be
PA
62632015-08-06 Pedro Alves <palves@redhat.com>
6264
6265 * gdbthread.h (struct regcache): Forward declare.
6266 (struct thread_info) <regcache_data>: Now a struct regcache
6267 pointer.
6268 * inferiors.c (inferior_regcache_data)
6269 (set_inferior_regcache_data): Now work with struct regcache
6270 pointers.
6271 * inferiors.h (struct regcache): Forward declare.
6272 (inferior_regcache_data, set_inferior_regcache_data): Now work
6273 with struct regcache pointers.
6274 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6275 (free_register_cache_thread): Remove struct regcache pointer
6276 casts.
6277
608a1e46
PA
62782015-08-06 Pedro Alves <palves@redhat.com>
6279
6280 * server.c (captured_main): On error, print the exception message
6281 to stderr, and if run_once is set, throw a quit.
6282
f0ce0d3a
PA
62832015-08-06 Pedro Alves <palves@redhat.com>
6284
6285 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6286 the current thread.
6287
bf47e248
PA
62882015-08-06 Pedro Alves <palves@redhat.com>
6289
6290 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6291 reading beyond the passed in buffer length.
6292
b6b9ffcc
PL
62932015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6294
6295 * tracepoint.c (symbol_list) <required>: Remove.
6296
863d01bd
PA
62972015-08-06 Pedro Alves <palves@redhat.com>
6298
6299 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6300 count if stopping and suspending threads.
6301 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6302 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6303 (linux_detach): Complete an ongoing step-over.
6304 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6305 throughout.
6306 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6307 (linux_wait_1): If passing a signal to the inferior after
6308 finishing a step-over, unsuspend and re-resume all lwps. If we
6309 see a single-step event but the thread should be continuing, don't
6310 pass the trap to gdb.
6311 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6312 internal_error instead of gdb_assert.
6313 (enqueue_pending_signal): New function.
6314 (check_ptrace_stopped_lwp_gone): Add debug output.
6315 (start_step_over): Use internal_error instead of gdb_assert.
6316 (complete_ongoing_step_over): New function.
6317 (linux_resume_one_thread): Don't resume a suspended thread.
6318 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6319 it stepping.
6320
00db26fa
PA
63212015-08-06 Pedro Alves <palves@redhat.com>
6322
6323 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6324 (linux_thread_alive): Use lwp_is_marked_dead.
6325 (extended_event_reported): Delete.
6326 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6327 instead of extended_event_reported.
6328 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6329 as well.
6330 (lwp_is_marked_dead): New function.
6331 (lwp_running): Use lwp_is_marked_dead.
6332 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6333 comment.
6334
ad071a30
PA
63352015-08-06 Pedro Alves <palves@redhat.com>
6336
6337 * linux-low.c (linux_wait_1): Move fork event output out of the
6338 !report_to_gdb check. Pass event_child->waitstatus to
6339 target_waitstatus_to_string instead of ourstatus.
6340
524b57e6
YQ
63412015-08-04 Yao Qi <yao.qi@linaro.org>
6342
6343 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6344 if current_thread is 32 bit.
6345
6085d6f6
YQ
63462015-08-04 Yao Qi <yao.qi@linaro.org>
6347
6348 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6349 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6350 * server.c (extended_protocol): Remove "static".
6351 * server.h (extended_protocol): Declare it.
6352
8a7e4587
YQ
63532015-08-04 Yao Qi <yao.qi@linaro.org>
6354
6355 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6356 both aarch64 and aarch32.
6357 (aarch64_set_pc): Likewise.
6358
3b53ae99
YQ
63592015-08-04 Yao Qi <yao.qi@linaro.org>
6360
6361 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6362 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6363 arm-with-neon.xml to srv_xmlfiles.
6364 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6365 (is_64bit_tdesc): New function.
6366 (aarch64_linux_read_description): New function.
6367 (aarch64_arch_setup): Call aarch64_linux_read_description.
6368 (regs_info): Rename to regs_info_aarch64.
6369 (aarch64_regs_info): Return right regs_info.
6370 (initialize_low_arch): Call initialize_low_arch_aarch32.
6371
bd9e6534
YQ
63722015-08-04 Yao Qi <yao.qi@linaro.org>
6373
6374 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6375 * linux-aarch32-low.c: New file.
6376 * linux-aarch32-low.h: New file.
6377 * linux-arm-low.c (arm_fill_gregset): Move it to
6378 linux-aarch32-low.c.
6379 (arm_store_gregset): Likewise.
6380 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6381 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6382 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6383 (regs_info): Rename to regs_info_arm.
6384 (arm_regs_info): Return regs_info_aarch32 if
6385 have_ptrace_getregset is 1 and target description is
6386 arm_with_neon or arm_with_vfpv3.
6387 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6388 Call initialize_low_arch_aarch32 instead.
6389
ded48a5e
YQ
63902015-08-04 Yao Qi <yao.qi@linaro.org>
6391
6392 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6393 * linux-low.c: ... here.
6394 * linux-low.h (have_ptrace_getregset): Declare it.
6395
96e9210f
PA
63962015-08-04 Pedro Alves <palves@redhat.com>
6397
6398 * thread-db.c (struct thread_db): Use new typedefs.
6399 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6400 CHK calls.
6401 (disable_thread_event_reporting): Cast result of dlsym to
6402 destination function pointer type.
6403 (thread_db_mourn): Use td_ta_delete_ftype.
6404
af60a1ef
SL
64052015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6406
6407 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6408 arch variant.
6409 (CDX_BREAKPOINT): Define for R2.
6410 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6411 (the_low_target): Add comments.
6412
e8b41681
YQ
64132015-07-30 Yao Qi <yao.qi@linaro.org>
6414
6415 * linux-arm-low.c (arm_hwcap): Remove it.
6416 (arm_read_description): New local variable arm_hwcap. Don't
6417 set arm_hwcap to zero.
6418
89abb039
YQ
64192015-07-30 Yao Qi <yao.qi@linaro.org>
6420
6421 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6422 Use regcache->tdesc instead.
6423 (arm_store_wmmxregset): Likewise.
6424 (arm_fill_vfpregset): Likewise.
6425 (arm_store_vfpregset): Likewise.
6426
deca266c
YQ
64272015-07-30 Yao Qi <yao.qi@linaro.org>
6428
6429 * linux-arm-low.c: Include arch/arm.h.
6430 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6431 (arm_store_gregset): Likewise.
6432
aa58a496
SM
64332015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6434
6435 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6436 ptrace's 4th parameter.
6437
50904b25
YQ
64382015-07-27 Yao Qi <yao.qi@linaro.org>
6439
6440 * configure.srv (case aarch64*-*-linux*): Don't set
6441 srv_linux_usrregs.
6442
5826e159
PA
64432015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6444
6445 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6446 sys/ptrace.h.
6447 * linux-arm-low.c: Likewise.
6448 * linux-cris-low.c: Likewise.
6449 * linux-crisv32-low.c: Likewise.
6450 * linux-low.c: Likewise.
6451 * linux-m68k-low.c: Likewise.
6452 * linux-mips-low.c: Likewise.
6453 * linux-nios2-low.c: Likewise.
6454 * linux-s390-low.c: Likewise.
6455 * linux-sparc-low.c: Likewise.
6456 * linux-tic6x-low.c: Likewise.
6457 * linux-tile-low.c: Likewise.
6458 * linux-x86-low.c: Likewise.
6459
54019719
PA
64602015-07-24 Pedro Alves <palves@redhat.com>
6461
6462 * config.in: Regenerate.
6463 * configure: Regenerate.
6464
eb7aa561
PA
64652015-07-24 Pedro Alves <palves@redhat.com>
6466
6467 * acinclude.m4: Include ../ptrace.m4.
6468 * configure.ac: Call GDB_AC_PTRACE.
6469 * config.in, configure: Regenerate.
6470
55d7b841
YQ
64712015-07-24 Yao Qi <yao.qi@linaro.org>
6472
6473 * linux-low.c (linux_create_inferior): Remove setting to
6474 proc->priv->new_inferior.
6475 (linux_attach): Likewise.
6476 (linux_low_filter_event): Likewise.
6477 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6478
c06cbd92
YQ
64792015-07-24 Yao Qi <yao.qi@linaro.org>
6480
6481 * linux-low.c (linux_arch_setup): New function.
6482 (linux_low_filter_event): If proc->tdesc is NULL and
6483 proc->attached is true, call the_low_target.arch_setup.
6484 Otherwise, keep status pending, and return.
6485 (linux_resume_one_lwp_throw): Don't call get_pc if
6486 thread->while_stepping isn't NULL. Don't call
6487 get_thread_regcache if proc->tdesc is NULL.
6488 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6489 (linux_target_ops): Install arch_setup.
6490 * server.c (start_inferior): Call the_target->arch_setup.
6491 * target.h (struct target_ops) <arch_setup>: New field.
6492 (target_arch_setup): New marco.
6493 * lynx-low.c (lynx_target_ops): Update.
6494 * nto-low.c (nto_target_ops): Update.
6495 * spu-low.c (spu_target_ops): Update.
6496 * win32-low.c (win32_target_ops): Update.
6497
5ae3ebba
YQ
64982015-07-24 Yao Qi <yao.qi@linaro.org>
6499
6500 * linux-low.c (linux_add_process): Don't set
6501 proc->priv->new_inferior.
6502 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6503 (linux_attach): Likewise.
6504
eb97750b
YQ
65052015-07-24 Yao Qi <yao.qi@linaro.org>
6506
6507 * server.c (start_inferior): Code refactor.
6508
51aee833
YQ
65092015-07-24 Yao Qi <yao.qi@linaro.org>
6510
6511 * server.c (process_serial_event): Set general_thread.
6512
af1b22f3
YQ
65132015-07-21 Yao Qi <yao.qi@linaro.org>
6514
6515 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6516 aarch64_linux_get_debug_reg_capacity.
6517
554717a3
YQ
65182015-07-17 Yao Qi <yao.qi@linaro.org>
6519
6520 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6521 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6522 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6523 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6524 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6525 (AARCH64_HWP_ALIGNMENT): Likewise.
6526 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6527 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6528 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6529 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6530 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6531 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6532 (struct aarch64_debug_reg_state): Likewise.
6533 (struct arch_lwp_info): Likewise.
6534 (aarch64_align_watchpoint): Likewise.
6535 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6536 (aarch64_watchpoint_length): Likewise.
6537 (aarch64_point_encode_ctrl_reg): Likewise
6538 (aarch64_point_is_aligned): Likewise.
6539 (aarch64_align_watchpoint): Likewise.
6540 (aarch64_linux_set_debug_regs):
6541 (aarch64_dr_state_insert_one_point): Likewise.
6542 (aarch64_dr_state_remove_one_point): Likewise.
6543 (aarch64_handle_breakpoint): Likewise.
6544 (aarch64_handle_aligned_watchpoint): Likewise.
6545 (aarch64_handle_unaligned_watchpoint): Likewise.
6546 (aarch64_handle_watchpoint): Likewise.
6547
c67ca4de
YQ
65482015-07-17 Yao Qi <yao.qi@linaro.org>
6549
6550 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6551 and don't aarch64_get_debug_reg_state. All callers update.
6552 (aarch64_handle_aligned_watchpoint): Likewise.
6553 (aarch64_handle_unaligned_watchpoint): Likewise.
6554 (aarch64_handle_watchpoint): Likewise.
6555 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6556 (aarch64_remove_point): Likewise.
6557
25abf979
YQ
65582015-07-17 Yao Qi <yao.qi@linaro.org>
6559
6560 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6561 debug_printf.
6562 (aarch64_handle_unaligned_watchpoint): Likewise.
6563
db1ff28b
JK
65642015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6565
6566 Revert the previous 3 commits:
6567 Move gdb_regex* to common/
6568 Move linux_find_memory_regions_full & co.
6569 gdbserver build-id attribute generator
6570
700ca40f
JK
65712015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6572 Jan Kratochvil <jan.kratochvil@redhat.com>
6573
6574 gdbserver build-id attribute generator.
6575 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6576 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6577 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6578 (find_phdr): New.
6579 (get_dynamic): Use find_pdhr to traverse program headers.
6580 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6581 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6582 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6583 (get_hex_build_id): New.
6584 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6585 to reply XML document.
6586
9904185c
JK
65872015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6588 Jan Kratochvil <jan.kratochvil@redhat.com>
6589
6590 * target.c: Include target/target-utils.h and fcntl.h.
6591 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6592 (target_fileio_read_stralloc): New functions.
6593
6e5b4429
JK
65942015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6595
6596 * Makefile.in (OBS): Add gdb_regex.o.
6597 (gdb_regex.o): New.
6598 * config.in: Rebuilt.
6599 * configure: Rebuilt.
6600
ddc98fbf
JK
66012015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6602 Jan Kratochvil <jan.kratochvil@redhat.com>
6603
6604 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6605 * Makefile.in (OBS): Add target-utils.o.
6606 (linux-maps.o, target-utils.o): New.
6607 * configure.srv (srv_linux_obj): Add linux-maps.o.
6608
e57bb7a0
PL
66092015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6610
6611 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6612 function, return 1.
6613 (the_low_target): Install it.
6614
586b02a9
PA
66152015-07-14 Pedro Alves <palves@redhat.com>
6616
6617 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6618 Instead, ignore ECHILD, and throw an error for other errnos.
6619
58c1b36c
PA
66202015-07-10 Pedro Alves <palves@redhat.com>
6621
6622 * event-loop.c (struct callback_event) <data>: Change type to
6623 gdb_client_data instance instead of gdb_client_data pointer.
6624 (append_callback_event): Adjust.
6625
421530db
PL
66262015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6627
6628 * linux-aarch64-low.c: Add comments for each linux_target_ops
6629 method. Remove comments already covered in target_ops and
6630 linux_target_ops definitions.
6631 (the_low_target): Add comments for each unimplemented method.
6632
c2d65f38
YQ
66332015-07-09 Yao Qi <yao.qi@linaro.org>
6634
6635 * linux-aarch64-low.c (aarch64_regmap): Remove.
6636 (aarch64_usrregs_info): Remove.
6637 (regs_info): Set field usrregs to NULL.
6638
b20a6524
MM
66392015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6640
6641 * linux-low.c: Include "rsp-low.h"
6642 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6643 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6644 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6645 (handle_btrace_enable_pt): New.
6646 (handle_btrace_general_set): Support "pt".
6647 (handle_btrace_conf_general_set): Support "pt:size".
6648
96c97461
PL
66492015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6650
6651 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6652 Z_PACKET_SW_BP.
6653
37d66942
PL
66542015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6655
6656 * linux-aarch64-low.c: Remove comment about endianness.
6657 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6658 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6659 memcmp.
6660
dc06243f
GB
66612015-06-24 Gary Benson <gbenson@redhat.com>
6662
6663 * linux-i386-ipa.c (stdint.h): Do not include.
6664 * lynx-i386-low.c (stdint.h): Likewise.
6665 * lynx-ppc-low.c (stdint.h): Likewise.
6666 * mem-break.c (stdint.h): Likewise.
6667 * thread-db.c (stdint.h): Likewise.
6668 * tracepoint.c (stdint.h): Likewise.
6669 * win32-low.c (stdint.h): Likewise.
6670
124e13d9
SM
66712015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6672
6673 * server.c (write_qxfer_response): Update call to
6674 remote_escape_output.
6675
909c2cda
JK
66762015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6677 Jan Kratochvil <jan.kratochvil@redhat.com>
6678
6679 Merge multiple hex conversions.
6680 * gdbreplay.c (tohex): Rename to 'fromhex'.
6681 (logchar): Use fromhex.
6682
24c05f46
JK
66832015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6684
6685 * server.c (handle_qxfer_libraries): Set `version' attribute for
6686 <library-list>.
6687
14d2069a
GB
66882015-06-10 Gary Benson <gbenson@redhat.com>
6689
6690 * target.h (struct target_ops) <multifs_open>: New field.
6691 <multifs_unlink>: Likewise.
6692 <multifs_readlink>: Likewise.
6693 * linux-low.c (nat/linux-namespaces.h): New include.
6694 (linux_target_ops): Initialize the_target->multifs_open,
6695 the_target->multifs_unlink and the_target->multifs_readlink.
6696 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6697 * hostio.c (hostio_fs_pid): New static variable.
6698 (hostio_handle_new_gdb_connection): New function.
6699 (handle_setfs): Likewise.
6700 (handle_open): Use the_target->multifs_open as appropriate.
6701 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6702 (handle_readlink): Use the_target->multifs_readlink as
6703 appropriate.
6704 (handle_vFile): Handle vFile:setfs packets.
6705 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6706 after target_handle_new_gdb_connection.
6707
4b8b5e72
GB
67082015-06-10 Gary Benson <gbenson@redhat.com>
6709
6710 * configure.ac (AC_CHECK_FUNCS): Add setns.
6711 * config.in: Regenerate.
6712 * configure: Likewise.
6713 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6714 (linux-namespaces.o): New rule.
6715 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6716
3ac2e371
GB
67172015-06-09 Gary Benson <gbenson@redhat.com>
6718
6719 * hostio.c (handle_open): Process mode argument with
6720 fileio_to_host_mode.
6721
ca9b78ce
YQ
67222015-06-01 Yao Qi <yao.qi@linaro.org>
6723
6724 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6725 * linux-x86-low.c: Likewise.
6726
bfacd19d
DB
67272015-05-28 Don Breazeal <donb@codesourcery.com>
6728
6729 * linux-low.c (handle_extended_wait): Initialize
6730 thread_info.last_resume_kind for new fork children.
6731
452003ef
PA
67322015-05-15 Pedro Alves <palves@redhat.com>
6733
6734 * target.h (target_handle_new_gdb_connection): Rewrite using if
6735 wrapped in do/while.
6736
1041a03c
JB
67372015-05-14 Joel Brobecker <brobecker@adacore.com>
6738
6739 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6740 * configure, config.in: Regenerate.
6741 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6742 Declare typedef.
6743
c269dbdb
DB
67442015-05-12 Don Breazeal <donb@codesourcery.com>
6745
6746 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6747 PTRACE_EVENT_VFORK_DONE.
6748 (linux_low_ptrace_options, extended_event_reported): Add vfork
6749 events.
6750 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6751 and "vforkdone" for RSP 'T' Stop Reply Packet.
6752 * server.h (report_vfork_events): Declare
6753 global variable.
6754
3a8a0396
DB
67552015-05-12 Don Breazeal <donb@codesourcery.com>
6756
6757 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6758 (the_low_target) <new_fork>: Initialize new member.
6759 * linux-arm-low.c (arm_new_fork): New function.
6760 (the_low_target) <new_fork>: Initialize new member.
6761 * linux-low.c (handle_extended_wait): Call new target function
6762 new_fork.
6763 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6764 * linux-mips-low.c (mips_add_watchpoint): New function
6765 extracted from mips_insert_point.
6766 (the_low_target) <new_fork>: Initialize new member.
6767 (mips_linux_new_fork): New function.
6768 (mips_insert_point): Call mips_add_watchpoint.
6769 * linux-x86-low.c (x86_linux_new_fork): New function.
6770 (the_low_target) <new_fork>: Initialize new member.
6771
de0d863e
DB
67722015-05-12 Don Breazeal <donb@codesourcery.com>
6773
6774 * linux-low.c (handle_extended_wait): Implement return value,
6775 rename argument 'event_child' to 'event_lwp', handle
6776 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6777 (linux_low_ptrace_options): New function.
6778 (linux_low_filter_event): Call linux_low_ptrace_options,
6779 use different argument fo linux_enable_event_reporting,
6780 use return value from handle_extended_wait.
6781 (extended_event_reported): New function.
6782 (linux_wait_1): Call extended_event_reported and set
6783 status to report fork events.
6784 (linux_write_memory): Add pid to debug message.
6785 (reset_lwp_ptrace_options_callback): New function.
6786 (linux_handle_new_gdb_connection): New function.
6787 (linux_target_ops): Initialize new structure member.
6788 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6789 * lynx-low.c: Initialize new structure member.
6790 * remote-utils.c (prepare_resume_reply): Implement stop reason
6791 "fork" for "T" stop message.
6792 * server.c (handle_query): Call handle_new_gdb_connection.
6793 * server.h (report_fork_events): Declare global flag.
6794 * target.h (struct target_ops) <handle_new_gdb_connection>:
6795 New member.
6796 (target_handle_new_gdb_connection): New macro.
6797 * win32-low.c: Initialize new structure member.
6798
ddcbc397
DB
67992015-05-12 Don Breazeal <donb@codesourcery.com>
6800
6801 * mem-break.c (APPEND_TO_LIST): Define macro.
6802 (clone_agent_expr): New function.
6803 (clone_one_breakpoint): New function.
6804 (clone_all_breakpoints): New function.
6805 * mem-break.h: Declare new functions.
6806
89245bc0
DB
68072015-05-12 Don Breazeal <donb@codesourcery.com>
6808
6809 * linux-low.c (linux_supports_fork_events): New function.
6810 (linux_supports_vfork_events): New function.
6811 (linux_target_ops): Initialize new structure members.
6812 (initialize_low): Call linux_check_ptrace_features.
6813 * lynx-low.c (lynx_target_ops): Initialize new structure
6814 members.
6815 * server.c (report_fork_events, report_vfork_events):
6816 New global flags.
6817 (handle_query): Add new features to qSupported packet and
6818 response.
6819 (captured_main): Initialize new global variables.
6820 * target.h (struct target_ops) <supports_fork_events>:
6821 New member.
6822 <supports_vfork_events>: New member.
6823 (target_supports_fork_events): New macro.
6824 (target_supports_vfork_events): New macro.
6825 * win32-low.c (win32_target_ops): Initialize new structure
6826 members.
6827
835205d0
GB
68282015-05-12 Gary Benson <gbenson@redhat.com>
6829
6830 * server.c (handle_qxfer_exec_file): Use current process
6831 if annex is empty.
6832
21e94bd9
SL
68332015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6834
6835 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6836 Remove HAVE_PTRACE_GETREGS conditionals.
6837 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6838 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6839
45614f15
YQ
68402015-05-08 Yao Qi <yao.qi@linaro.org>
6841
6842 * linux-low.c (linux_supports_conditional_breakpoints): New
6843 function.
6844 (linux_target_ops): Install new target method.
6845 * lynx-low.c (lynx_target_ops): Install NULL hook for
6846 supports_conditional_breakpoints.
6847 * nto-low.c (nto_target_ops): Likewise.
6848 * spu-low.c (spu_target_ops): Likewise.
6849 * win32-low.c (win32_target_ops): Likewise.
6850 * server.c (handle_query): Check
6851 target_supports_conditional_breakpoints.
6852 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6853 New field.
6854 (target_supports_conditional_breakpoints): New macro.
6855
80ad801e
PA
68562015-05-06 Pedro Alves <palves@redhat.com>
6857
6858 PR server/18081
6859 * server.c (start_inferior): If the process exits, mourn it.
6860
819843c7
GB
68612015-04-21 Gary Benson <gbenson@redhat.com>
6862
6863 * hostio.c (fileio_open_flags_to_host): Factored out to
6864 fileio_to_host_openflags in common/fileio.c. Single use
6865 updated.
6866
a2d5a9d7
MF
68672015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6868
6869 * linux-xtensa-low.c (xtensa_fill_gregset)
6870 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6871 XCHAL_HAVE_LOOP.
6872
deb44829
MF
68732015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6874
6875 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6876 (regs_info): Replace usrregs pointer with NULL.
6877
e57f1de3
GB
68782015-04-17 Gary Benson <gbenson@redhat.com>
6879
6880 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6881 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6882 * server.c (handle_qxfer_exec_file): New function.
6883 (qxfer_packets): Add exec-file entry.
6884 (handle_query): Report qXfer:exec-file:read as supported packet.
6885
62828379
RN
68862015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6887
6888 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6889
b88bb450
GB
68902015-04-09 Gary Benson <gbenson@redhat.com>
6891
6892 * hostio-errno.c (errno_to_fileio_error): Remove function.
6893 Update caller to use remote_fileio_to_fio_error.
6894
c8f4bfdd
YQ
68952015-04-09 Yao Qi <yao.qi@linaro.org>
6896
6897 * linux-low.c (linux_insert_point): Call
6898 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6899 (linux_remove_point): Call remove_memory_breakpoint if type is
6900 raw_bkpt_type_sw.
6901 * linux-x86-low.c (x86_insert_point): Don't call
6902 insert_memory_breakpoint.
6903 (x86_remove_point): Don't call remove_memory_breakpoint.
6904
41f98f02
PA
69052015-04-01 Pedro Alves <palves@redhat.com>
6906 Cleber Rosa <crosa@redhat.com>
6907
6908 * server.c (gdbserver_usage): Reorganize and extend the usage
6909 message.
6910
2bf6fb9d
PA
69112015-03-24 Pedro Alves <palves@redhat.com>
6912
6913 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6914 output. Also dump TRAP_TRACE.
6915 (linux_low_filter_event): In debug output, distinguish a
6916 resume_stop SIGSTOP from a delayed SIGSTOP.
6917
369f6daa
GB
69182015-03-24 Gary Benson <gbenson@redhat.com>
6919
6920 * linux-x86-low.c (x86_linux_new_thread): Moved to
6921 nat/x86-linux.c.
6922 (x86_linux_prepare_to_resume): Likewise.
6923
8e5d4070
GB
69242015-03-24 Gary Benson <gbenson@redhat.com>
6925
6926 * Makefile.in (x86-linux-dregs.o): New rule.
6927 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6928 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6929 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6930 (x86_linux_dr_get): Likewise.
6931 (x86_linux_dr_set): Likewise.
6932 (update_debug_registers_callback): Likewise.
6933 (x86_linux_dr_set_addr): Likewise.
6934 (x86_linux_dr_get_addr): Likewise.
6935 (x86_linux_dr_set_control): Likewise.
6936 (x86_linux_dr_get_control): Likewise.
6937 (x86_linux_dr_get_status): Likewise.
6938 (x86_linux_update_debug_registers): Likewise.
6939
2b95d440
GB
69402015-03-24 Gary Benson <gbenson@redhat.com>
6941
6942 * linux-x86-low.c (x86_linux_update_debug_registers):
6943 New function, factored out from...
6944 (x86_linux_prepare_to_resume): ...this.
6945
14b0bc68
GB
69462015-03-24 Gary Benson <gbenson@redhat.com>
6947
6948 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6949 (x86_linux_dr_set): Likewise.
6950 (update_debug_registers_callback): Likewise.
6951 (x86_linux_dr_set_addr): Likewise.
6952 (x86_linux_dr_get_addr): Likewise.
6953 (x86_linux_dr_set_control): Likewise.
6954 (x86_linux_dr_get_control): Likewise.
6955 (x86_linux_dr_get_status): Likewise.
6956 (x86_linux_prepare_to_resume): Likewise.
6957
5dfe6ca8
GB
69582015-03-24 Gary Benson <gbenson@redhat.com>
6959
6960 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6961 Use perror_with_name. Pass string through gettext.
6962 (x86_linux_dr_set): Likewise.
6963
d33472ad
GB
69642015-03-24 Gary Benson <gbenson@redhat.com>
6965
6966 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6967 (x86_linux_dr_set_addr): ...this.
6968 (x86_dr_low_get_addr): Rename to...
6969 (x86_linux_dr_get_addr): ...this.
6970 (x86_dr_low_set_control): Rename to...
6971 (x86_linux_dr_set_control): ...this.
6972 (x86_dr_low_get_control): Rename to...
6973 (x86_linux_dr_get_control): ...this.
6974 (x86_dr_low_get_status): Rename to...
6975 (x86_linux_dr_get_status): ...this.
6976 (x86_dr_low): Update with new function names.
6977
4b134ca1
GB
69782015-03-24 Gary Benson <gbenson@redhat.com>
6979
6980 * Makefile.in (x86-linux.o): New rule.
6981 * configure.srv: Add x86-linux.o to relevant targets.
6982 * linux-low.c (lwp_set_arch_private_info): New function.
6983 (lwp_arch_private_info): Likewise.
6984 * linux-x86-low.c: Include nat/x86-linux.h.
6985 (arch_lwp_info): Removed structure.
6986 (update_debug_registers_callback):
6987 Use lwp_set_debug_registers_changed.
6988 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6989 and lwp_set_debug_registers_changed.
6990 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6991
34c703da
GB
69922015-03-24 Gary Benson <gbenson@redhat.com>
6993
6994 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6995 * linux-arm-low.c (arm_new_thread): Likewise.
6996 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6997 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6998 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6999 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7000
cff068da
GB
70012015-03-24 Gary Benson <gbenson@redhat.com>
7002
7003 * linux-low.c (ptid_of_lwp): New function.
7004 (lwp_is_stopped): Likewise.
7005 (lwp_stop_reason): Likewise.
7006 * linux-x86-low.c (update_debug_registers_callback):
7007 Use lwp_is_stopped.
7008 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7009 lwp_stop_reason.
7010
b2f7c7e8
GB
70112015-03-24 Gary Benson <gbenson@redhat.com>
7012
7013 * linux-low.h (linux_stop_lwp): Remove declaration.
7014
6d4ee8c6
GB
70152015-03-24 Gary Benson <gbenson@redhat.com>
7016
7017 * linux-low.h: Include nat/linux-nat.h.
7018 * linux-low.c (iterate_over_lwps_args): New structure.
7019 (iterate_over_lwps_filter): New function.
7020 (iterate_over_lwps): Likewise.
7021 * linux-x86-low.c (update_debug_registers_callback):
7022 Update signature to what iterate_over_lwps expects.
7023 Remove PID check that iterate_over_lwps now performs.
7024 (x86_dr_low_set_addr): Use iterate_over_lwps.
7025 (x86_dr_low_set_control): Likewise.
7026
70a0bb6b
GB
70272015-03-24 Gary Benson <gbenson@redhat.com>
7028
7029 * linux-x86-low.c (x86_debug_reg_state): New function.
7030 (x86_linux_prepare_to_resume): Use the above.
7031
7b669087
GB
70322015-03-24 Gary Benson <gbenson@redhat.com>
7033
7034 * linux-low.c (current_lwp_ptid): New function.
7035 * linux-x86-low.c: Include nat/linux-nat.h.
7036 (x86_dr_low_get_addr): Use current_lwp_ptid.
7037 (x86_dr_low_get_control): Likewise.
7038 (x86_dr_low_get_status): Likewise.
7039
eef49a3d
PA
70402015-03-20 Pedro Alves <palves@redhat.com>
7041
7042 * tracepoint.c (cmd_qtstatus): Make "str" const.
7043
b2333d22
PA
70442015-03-20 Pedro Alves <palves@redhat.com>
7045
7046 * server.c (handle_general_set): Make "req_str" const.
7047
23f238d3
PA
70482015-03-19 Pedro Alves <palves@redhat.com>
7049
7050 * linux-low.c (linux_resume_one_lwp): Rename to ...
7051 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7052 instead call perror_with_name.
7053 (check_ptrace_stopped_lwp_gone): New function.
7054 (linux_resume_one_lwp): Reimplement as wrapper around
7055 linux_resume_one_lwp_throw that swallows errors if the LWP is
7056 gone.
7057
91baf43f
PA
70582015-03-19 Pedro Alves <palves@redhat.com>
7059
7060 * linux-low.c (count_events_callback, select_event_lwp_callback):
7061 No longer check whether the thread has resume_stop as last resume
7062 kind.
7063
8bf3b159
PA
70642015-03-19 Pedro Alves <palves@redhat.com>
7065
7066 * linux-low.c (count_events_callback, select_event_lwp_callback):
7067 Use the lwp's status_pending_p field, not the thread's.
7068
b90fc188
PA
70692015-03-19 Pedro Alves <palves@redhat.com>
7070
7071 * linux-low.c (select_event_lwp_callback): Update comments to
7072 no longer mention SIGTRAP.
7073
464b0089
GB
70742015-03-18 Gary Benson <gbenson@redhat.com>
7075
7076 * server.c (handle_query): Do not report vFile:fstat as supported.
7077
aa9e327f
GB
70782015-03-11 Gary Benson <gbenson@redhat.com>
7079
7080 * hostio.c (sys/types.h): New include.
7081 (sys/stat.h): Likewise.
7082 (common-remote-fileio.h): Likewise.
7083 (handle_fstat): New function.
7084 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7085
791c0056
GB
70862015-03-11 Gary Benson <gbenson@redhat.com>
7087
7088 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7089 struct stat.st_blocks and struct stat.st_blksize.
7090 * configure: Regenerate.
7091 * config.in: Likewise.
7092 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7093 (OBS): Add common-remote-fileio.o.
7094 (common-remote-fileio.o): New rule.
7095
9a9df970
PA
70962015-03-09 Pedro Alves <palves@redhat.com>
7097
7098 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7099 'struct sockaddr' pointer in 'accept' call.
7100
9eb1356e
PA
71012015-03-09 Pedro Alves <palves@redhat.com>
7102
7103 Revert:
7104 2015-03-07 Pedro Alves <palves@redhat.com>
7105 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7106 or <winsock2.h> here. Instead include "gdb_socket.h".
7107 (remote_open): Use union gdb_sockaddr_u.
7108 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7109 or <winsock2.h> here. Instead include "gdb_socket.h".
7110 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7111 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7112 or <sys/un.h>.
7113 (init_named_socket, gdb_agent_helper_thread): Use union
7114 gdb_sockaddr_u.
7115
aac331e4
PA
71162015-03-07 Pedro Alves <palves@redhat.com>
7117
7118 * configure.ac (build_warnings): Move
7119 -Wdeclaration-after-statement to the C-specific set.
7120 * configure: Regenerate.
7121
366c75fc
PA
71222015-03-07 Pedro Alves <palves@redhat.com>
7123
7124 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7125 or <winsock2.h> here. Instead include "gdb_socket.h".
7126 (remote_open): Use union gdb_sockaddr_u.
7127 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7128 or <winsock2.h> here. Instead include "gdb_socket.h".
7129 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7130 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7131 or <sys/un.h>.
7132 (init_named_socket, gdb_agent_helper_thread): Use union
7133 gdb_sockaddr_u.
7134
492d29ea
PA
71352015-03-07 Pedro Alves <palves@redhat.com>
7136
7137 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7138 instead.
7139
60a191ed
YQ
71402015-03-06 Yao Qi <yao.qi@linaro.org>
7141
7142 * linux-aarch64-low.c (aarch64_insert_point): Use
7143 show_debug_regs as a boolean.
7144 (aarch64_remove_point): Likewise.
7145
f5771b1d
PA
71462015-03-05 Pedro Alves <palves@redhat.com>
7147
7148 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7149 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7150 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7151 * nto-low.c (nto_target_ops): Likewise.
7152 * spu-low.c (spu_target_ops): Likewise.
7153 * win32-low.c (win32_target_ops): Likewise.
7154
3e572f71
PA
71552015-03-04 Pedro Alves <palves@redhat.com>
7156
72f4393d 7157 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7158 Decide whether a breakpoint triggered based on the SIGTRAP's
7159 siginfo.si_code.
72f4393d
L
7160 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7161 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7162 (linux_low_filter_event): Check for breakpoints before checking
7163 watchpoints.
7164 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7165 siginfo.si_code.
72f4393d
L
7166 (linux_stopped_by_sw_breakpoint)
7167 (linux_supports_stopped_by_sw_breakpoint)
7168 (linux_stopped_by_hw_breakpoint)
7169 (linux_supports_stopped_by_hw_breakpoint): New functions.
7170 (linux_target_ops): Install new target methods.
3e572f71 7171
1ec68e26
PA
71722015-03-04 Pedro Alves <palves@redhat.com>
7173
7174 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7175 * server.c (swbreak_feature, hwbreak_feature): New globals.
7176 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7177 (captured_main): Clear swbreak_feature and hwbreak_feature.
7178 * server.h (swbreak_feature, hwbreak_feature): Declare.
7179 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7180 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7181 supports_stopped_by_hw_breakpoint>: New fields.
7182 (target_supports_stopped_by_sw_breakpoint)
7183 (target_stopped_by_sw_breakpoint)
7184 (target_supports_stopped_by_hw_breakpoint)
7185 (target_stopped_by_hw_breakpoint): Declare.
7186
15c66dd6
PA
71872015-03-04 Pedro Alves <palves@redhat.com>
7188
7189 enum lwp_stop_reason -> enum target_stop_reason
7190 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7191 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7192 (linux_wait_1, stuck_in_jump_pad_callback)
7193 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7194 (linux_stopped_by_watchpoint):
7195 * linux-low.h (enum lwp_stop_reason): Delete.
7196 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7197 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7198
98fc70d6
YQ
71992015-03-04 Yao Qi <yao.qi@linaro.org>
7200
7201 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7202
dd2ac174
GB
72032015-03-03 Gary Benson <gbenson@redhat.com>
7204
7205 * hostio.c (handle_vFile): Fix prefix lengths.
7206
d68e53f4
MM
72072015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7208
7209 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7210 ptr_bits.
7211
bf2d68ab
AA
72122015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7213
7214 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7215 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7216 (clean): Add "rm -f" for above C files.
7217 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7218 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7219 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7220 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7221 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7222 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7223 (init_registers_s390x_vx_linux64)
7224 (init_registers_s390x_tevx_linux64)
7225 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7226 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7227 declarations.
7228 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7229 (s390_store_vxrs_high): New functions.
7230 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7231 NT_S390_VXRS_HIGH.
7232 (s390_arch_setup): Add logic for selecting one of the new target
7233 descriptions. Activate the new vector regsets if applicable.
7234 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7235 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7236 and init_registers_s390x_tevx_linux64.
7237
c966a859
PA
72382015-03-01 Pedro Alves <palves@redhat.com>
7239
7240 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7241 parameter.
7242
4180215b
PA
72432015-02-27 Pedro Alves <palves@redhat.com>
7244
7245 * linux-x86-low.c (u_debugreg_offset): New function.
7246 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7247
749bab01
PA
72482015-02-27 Pedro Alves <palves@redhat.com>
7249
7250 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7251 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7252 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7253 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7254 (ps_lsetfpregs, ps_getpid)
7255 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7256 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7257 (ps_lsetxregs, ps_plog): Declare.
7258
3c14e5a3
PA
72592015-02-27 Pedro Alves <palves@redhat.com>
7260
7261 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7262 IP_AGENT_EXPORT_FUNC.
7263 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7264 IP_AGENT_EXPORT_FUNC.
7265 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7266 (IP_AGENT_EXPORT): Delete.
7267 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7268 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7269 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7270 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7271 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7272 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7273 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7274 (traceframe_read_count, traceframe_write_count)
7275 (traceframes_created, trace_state_variables, get_raw_reg)
7276 (get_trace_state_variable_value, set_trace_state_variable_value)
7277 (ust_loaded, helper_thread_id, cmd_buf): Use
7278 IPA_SYM_EXPORTED_NAME.
7279 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7280 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7281 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7282 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7283 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7284 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7285 EXTERN_C_PUSH/EXTERN_C_POP.
7286 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7287 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7288 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7289 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7290 (traceframe_write_count, traceframe_read_count)
7291 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7292 (about_to_request_buffer_space, get_trace_state_variable_value)
7293 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7294 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7295 EXTERN_C_PUSH/EXTERN_C_POP.
7296 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7297 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7298 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7299 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7300 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7301 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7302 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7303 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7304 Define.
7305 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7306 (IP_AGENT_EXPORT_VAR_DECL): Define.
7307 (tracing): Declare.
7308 (gdb_agent_get_raw_reg): Declare.
7309
fe978cb0
PA
73102015-02-27 Tom Tromey <tromey@redhat.com>
7311 Pedro Alves <palves@redhat.com>
7312
7313 Rename symbols whose names are reserved C++ keywords throughout.
7314
3bc3d82a
PA
73152015-02-27 Pedro Alves <palves@redhat.com>
7316
7317 * Makefile.in (COMPILER): New, get it from autoconf.
7318 (CXX): Get from autoconf instead.
7319 (COMPILE.pre): Use COMPILER.
7320 (CC-LD): Rename to ...
7321 (CC_LD): ... this. Use COMPILER.
7322 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7323 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7324 * acinclude.m4: Include build-with-cxx.m4.
7325 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7326 Disable -Werror by default if building in C++ mode.
7327 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7328 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7329 the C++ compiler. Save/restore CXXFLAGS too.
7330 * configure: Regenerate.
7331
07697489
PA
73322015-02-27 Pedro Alves <palves@redhat.com>
7333
7334 * acinclude.m4: Include libiberty.m4.
7335 * configure.ac: Call libiberty_INIT.
7336 * config.in, configure: Regenerate.
7337
9beb7c4e
PA
73382015-02-26 Pedro Alves <palves@redhat.com>
7339
7340 * linux-low.c (linux_wait_1): When incrementing the PC past a
7341 program breakpoint always use the_low_target.breakpoint_len as
7342 increment, rather than the maximum between that and
7343 the_low_target.decr_pc_after_break.
7344
8090aef2
PA
73452015-02-23 Pedro Alves <palves@redhat.com>
7346
7347 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7348 thread was doing a step-over; always adjust the PC if
7349 we stepped over a permanent breakpoint.
7350 (linux_wait_1): If we stepped over breakpoint that was on top of a
7351 permanent breakpoint, manually advance the PC past it.
7352
bc9540e8
PA
73532015-02-23 Pedro Alves <palves@redhat.com>
7354
7355 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7356 modes.
7357 (x86_fill_gregset, x86_store_gregset): Use it when handling
7358 $orig_eax.
7359
2db9a427
PA
73602015-02-20 Pedro Alves <palves@redhat.com>
7361
7362 * thread-db.c: Include "nat/linux-procfs.h".
7363 (thread_db_init): Skip listing new threads if the kernel supports
7364 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7365
afa8d396
PA
73662015-02-20 Pedro Alves <palves@redhat.com>
7367
7368 * linux-low.c (status_pending_p_callback): Use ptid_match.
7369
c9587f88
AT
73702015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7371
7372 PR breakpoints/16812
7373 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7374 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7375 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7376
b05ec7a5
AT
73772015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7378
7379 PR breakpoints/15956
7380 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7381
d33501a5
MM
73822015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7383
7384 * linux-low.c (linux_low_btrace_conf): Print size.
7385 * server.c (handle_btrace_conf_general_set): New.
7386 (hanle_general_set): Call handle_btrace_conf_general_set.
7387 (handle_query): Report Qbtrace-conf:bts:size as supported.
7388
f4abbc16
MM
73892015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7390
7391 * linux-low.c (linux_low_enable_btrace): Update parameters.
7392 (linux_low_btrace_conf): New.
7393 (linux_target_ops)<to_btrace_conf>: Initialize.
7394 * server.c (current_btrace_conf): New.
7395 (handle_btrace_enable): Rename to ...
7396 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7397 to target_enable_btrace. Update comment. Update users.
7398 (handle_qxfer_btrace_conf): New.
7399 (qxfer_packets): Add btrace-conf entry.
7400 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7401 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7402 (target_ops)<read_btrace_conf>: New.
7403 (target_enable_btrace): Update parameters.
7404 (target_read_btrace_conf): New.
7405
043c3577
MM
74062015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7407
7408 * server.c (handle_btrace_general_set): Remove call to
7409 target_supports_btrace.
7410 (supported_btrace_packets): New.
7411 (handle_query): Call supported_btrace_packets.
7412 * target.h: include btrace-common.h.
7413 (btrace_target_info): Removed.
7414 (supports_btrace, target_supports_btrace): Update parameters.
7415
734b0e4b
MM
74162015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7417
7418 * Makefile.in (SFILES): Add common/btrace-common.c.
7419 (OBS): Add common/btrace-common.o.
7420 (btrace-common.o): Add build rules.
7421 * linux-low: Include btrace-common.h.
7422 (linux_low_read_btrace): Use struct btrace_data. Call
7423 btrace_data_init and btrace_data_fini.
7424
d6c146e9
PA
74252015-02-06 Pedro Alves <palves@redhat.com>
7426
7427 * thread-db.c (find_new_threads_callback): Add debug output.
7428
20ba1ce6
PA
74292015-02-04 Pedro Alves <palves@redhat.com>
7430
7431 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7432 (resume_stopped_resumed_lwps): New function.
7433 (linux_wait_for_event_filtered): Use it.
7434
8cc73a39
SDJ
74352015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7436
7437 * Makefile.in (SFILES): Add linux-personality.c.
7438 (linux-personality.o): New rule.
7439 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7440 list of objects to be built.
7441 * linux-low.c: Include nat/linux-personality.h.
7442 (linux_create_inferior): Remove code to disable address space
7443 randomization (moved to ../nat/linux-personality.c). Create
7444 cleanup to disable address space randomization.
7445
fb23d554
SDJ
74462015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7447
7448 * Makefile.in (posix-strerror.o): New rule.
7449 (mingw-strerror.o): Likewise.
7450 * configure: Regenerated.
7451 * configure.ac: Source file ../common/common.host. Initialize new
7452 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7453
cdf43629
YQ
74542015-01-14 Yao Qi <yao@codesourcery.com>
7455
7456 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7457 (ppc-linux.o): New rule.
7458 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7459 * configure.ac: AC_CHECK_FUNCS(getauxval).
7460 * config.in: Re-generated.
7461 * configure: Re-generated.
7462 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7463 ppc64_64bit_inferior_p
7464
514c5338
YQ
74652015-01-14 Yao Qi <yao@codesourcery.com>
7466
7467 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7468 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7469 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7470 (PT_ORIG_R3, PT_TRAP): Likewise.
7471 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7472 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7473 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7474
3368c1e5
JB
74752015-01-10 Joel Brobecker <brobecker@adacore.com>
7476
7477 * i387-fp.c (i387_cache_to_xsave): In look over
7478 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7479 zmmh_low_space field by use of zmmh_high_space.
7480
582511be
PA
74812015-01-09 Pedro Alves <palves@redhat.com>
7482
7483 * linux-low.c (step_over_bkpt): Move higher up in the file.
7484 (handle_extended_wait): Don't store the stop_pc here.
7485 (get_stop_pc): Adjust comments and rename to ...
7486 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7487 stopped for a software breakpoint or hardware breakpoint.
7488 (thread_still_has_status_pending_p): New function.
7489 (status_pending_p_callback): Use
7490 thread_still_has_status_pending_p. If the event is no longer
7491 interesting, resume the LWP.
7492 (handle_tracepoints): Add assert.
7493 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7494 (wstatus_maybe_breakpoint): New function.
7495 (cancel_breakpoint): Delete function.
7496 (check_stopped_by_watchpoint): New function, factored out from
7497 linux_low_filter_event.
7498 (lp_status_maybe_breakpoint): Delete function.
7499 (linux_low_filter_event): Remove filter_ptid argument.
7500 Leave thread group exits pending here. Store the LWP's stop PC.
7501 Always leave events pending.
7502 (linux_wait_for_event_filtered): Pull all events out of the
7503 kernel, and leave them all pending.
7504 (count_events_callback, select_event_lwp_callback): Consider all
7505 events.
7506 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7507 (select_event_lwp): Only give preference to the stepping LWP in
7508 all-stop mode. Adjust comments.
7509 (ignore_event): New function.
7510 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7511 references to cancel_breakpoints. Adjust to renames. Also give
7512 equal priority to all LWPs that have had events in non-stop mode.
7513 If reporting a software breakpoint event, unadjust the LWP's PC.
7514 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7515 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7516 Adjust.
7517 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7518 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7519 (linux_stopped_by_watchpoint): Adjust.
7520 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7521 * linux-low.h (enum lwp_stop_reason): New.
7522 (struct lwp_info) <stop_pc>: Adjust comment.
7523 <stopped_by_watchpoint>: Delete field.
7524 <stop_reason>: New field.
7525 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7526 * mem-break.c (software_breakpoint_inserted_here)
7527 (hardware_breakpoint_inserted_here): New function.
7528 * mem-break.h (software_breakpoint_inserted_here)
7529 (hardware_breakpoint_inserted_here): Declare.
7530 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7531 (cancel_breakpoints): Delete.
7532 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7533 (upload_fast_traceframes): Remove references to
7534 cancel_breakpoints.
7535
a33e3959
PA
75362015-01-09 Pedro Alves <palves@redhat.com>
7537
7538 * thread-db.c (find_new_threads_callback): Ignore thread if the
7539 kernel thread ID is -1.
7540
8784d563
PA
75412015-01-09 Pedro Alves <palves@redhat.com>
7542
7543 * linux-low.c (linux_attach_fail_reason_string): Move to
7544 nat/linux-ptrace.c, and rename.
7545 (linux_attach_lwp): Update comment.
7546 (attach_proc_task_lwp_callback): New function.
7547 (linux_attach): Adjust to rename and use
7548 linux_proc_attach_tgid_threads.
7549 (linux_attach_fail_reason_string): Delete declaration.
7550
76f2b779
JB
75512015-01-01 Joel Brobecker <brobecker@adacore.com>
7552
7553 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7554 * server.c (gdbserver_version): Likewise.
7555
fafcc06a
SDJ
75562014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7557
7558 * remote-utils.c: Include ctype.h.
7559 (input_interrupt): Explicitly handle the case when the char
7560 received is the NUL byte. Improve the printing of non-ASCII
7561 characters.
7562
beed38b8
JB
75632014-12-16 Joel Brobecker <brobecker@adacore.com>
7564
7565 * linux-low.c (linux_low_filter_event): Update call to
7566 linux_enable_event_reporting following the addition of
7567 a new parameter to that function.
7568
bf330350
CU
75692014-12-16 Catalin Udma <catalin.udma@freescale.com>
7570
7571 PR server/17457
7572 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7573 (AARCH64_FPCR_REGNO): Likewise.
7574 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7575 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7576 (aarch64_store_fpregset): Likewise.
7577
5227d625
JB
75782014-12-15 Joel Brobecker <brobecker@adacore.com>
7579
7580 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7581 Remove FIXME comment about assumption about N.
7582
f93b65a0
JB
75832014-12-13 Joel Brobecker <brobecker@adacore.com>
7584
7585 * configure.ac: If large-file support is disabled in GDBserver,
7586 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7587 * configure: Regenerate.
7588
e5a9158d
AA
75892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7590
7591 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7592 warning upon ENODATA from ptrace.
7593 * linux-s390-low.c (s390_store_tdb): New.
7594 (s390_regsets): Add regset for NT_S390_TDB.
7595
feea5f36
AA
75962014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7597
7598 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7599 without a fill_function.
7600 * linux-s390-low.c (s390_fill_last_break): Remove.
7601 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7602 (s390_arch_setup): Use regset's size instead of fill_function for
7603 loop end condition.
7604
098dbe61
AA
76052014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7606
7607 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7608 the regset's store function when ptrace returned an error.
7609 * regcache.c (get_thread_regcache): Invalidate register cache
7610 before fetching inferior's registers.
7611
28eef672
AA
76122014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7613
7614 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7615 while-loop as for-loop.
7616 (regsets_store_inferior_registers): Likewise.
7617
bdca27a2
YQ
76182014-11-28 Yao Qi <yao@codesourcery.com>
7619
7620 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7621 * config.in, configure: Re-generate.
7622 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7623 is defined.
7624
9c232dda
YQ
76252014-11-21 Yao Qi <yao@codesourcery.com>
7626
7627 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7628 (AC_CHECK_HEADERS): Remove malloc.h.
7629 * configure: Re-generated.
7630 * config.in: Re-generated.
7631 * server.h: Don't include alloca.h and malloc.h.
7632 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7633 Don't include malloc.h.
7634
43968415
JB
76352014-11-17 Joel Brobecker <brobecker@adacore.com>
7636
7637 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7638 corresponding ERRNO check in same block.
7639
40e91bc7
PA
76402014-11-12 Pedro Alves <palves@redhat.com>
7641
7642 * server.c (cont_thread): Update comment.
7643 (start_inferior, attach_inferior): No longer clear cont_thread.
7644 (handle_v_cont): No longer set cont_thread.
7645 (captured_main): Clear cont_thread each time a GDB connects.
7646
c2c118cf
PA
76472014-11-12 Pedro Alves <palves@redhat.com>
7648
7649 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7650 thread, and don't resume all threads if the Hc thread has exited.
7651
78708b7c
PA
76522014-11-12 Pedro Alves <palves@redhat.com>
7653
7654 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7655 the process group instead of to a specific LWP.
7656
a2abc7de
PA
76572014-10-15 Pedro Alves <palves@redhat.com>
7658
7659 PR server/17487
7660 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7661 parameter.
7662 (arm_set_thread_context): Delete.
7663 (the_low_target): Adjust.
7664 * win32-i386-low.c (debug_registers_changed)
7665 (debug_registers_used): Delete.
7666 (update_debug_registers_callback): New function.
7667 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7668 needing to update their debug registers.
7669 (win32_get_current_dr): New function.
7670 (x86_dr_low_get_addr, x86_dr_low_get_control)
7671 (x86_dr_low_get_status): Fetch the debug register from the thread
7672 record's context.
7673 (i386_initial_stuff): Adjust.
7674 (i386_get_thread_context): Remove current_event parameter. Don't
7675 clear debug_registers_changed nor copy DR values to
7676 debug_reg_state.
7677 (i386_set_thread_context): Delete.
7678 (i386_prepare_to_resume): New function.
7679 (i386_thread_added): Mark the thread as needing to update irs
7680 debug registers.
7681 (the_low_target): Remove i386_set_thread_context and install
7682 i386_prepare_to_resume.
7683 * win32-low.c (win32_get_thread_context): Adjust.
7684 (win32_set_thread_context): Use SetThreadContext
7685 directly.
7686 (win32_prepare_to_resume): New function.
7687 (win32_require_context): New function, factored out from ...
7688 (thread_rec): ... this.
7689 (continue_one_thread): Call win32_prepare_to_resume on each thread
7690 we're about to continue.
7691 (win32_resume): Call win32_prepare_to_resume on the event thread.
7692 * win32-low.h (struct win32_thread_info)
7693 <debug_registers_changed>: New field.
7694 (struct win32_target_ops): Change prototype of set_thread_context,
7695 delete set_thread_context and add prepare_to_resume.
7696 (win32_require_context): New declaration.
7697
a442d071
GB
76982014-10-08 Gary Benson <gbenson@redhat.com>
7699
7700 * server.h: Do not include common-exceptions.h.
7701
6f1947e8
GB
77022014-10-08 Gary Benson <gbenson@redhat.com>
7703
7704 * server.h: Do not include cleanups.h.
7705
63b434a4
JH
77062014-09-30 James Hogan <james.hogan@imgtec.com>
7707
7708 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7709 mips64-dsp-linux.c.
7710
c4d9ceb6
YQ
77112014-09-23 Yao Qi <yao@codesourcery.com>
7712
7713 * linux-low.c (lp_status_maybe_breakpoint): New function.
7714 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7715 (count_events_callback): Likewise.
7716 (select_event_lwp_callback): Likewise.
7717 (cancel_breakpoints_callback): Likewise.
7718
89a5711c
DB
77192014-09-19 Don Breazeal <donb@codesourcery.com>
7720
7721 * linux-low.c (handle_extended_wait): Call
7722 linux_ptrace_get_extended_event.
7723 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7724 linux_is_extended_waitstatus.
7725
bffc0964
JB
77262014-09-16 Joel Brobecker <brobecker@adacore.com>
7727
7728 * Makefile.in (CPPFLAGS): Define.
7729 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7730 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7731
0bfdf32f
GB
77322014-09-16 Gary Benson <gbenson@redhat.com>
7733
7734 * inferiors.h (current_inferior): Renamed as...
7735 (current_thread): New variable. All uses updated.
7736 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7737 (maybe_move_out_of_jump_pad): Likewise.
7738 (cancel_breakpoint): Likewise.
7739 (linux_low_filter_event): Likewise.
7740 (wait_for_sigstop): Likewise.
7741 (linux_resume_one_lwp): Likewise.
7742 (need_step_over_p): Likewise.
7743 (start_step_over): Likewise.
7744 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7745 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7746 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7747 and save_inferior as saved_thread.
7748 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7749 saved_thread.
7750 (regcache_invalidate_thread): Likewise.
7751 * remote-utils.c (prepare_resume_reply): Likewise.
7752 * thread-db.c (thread_db_get_tls_address): Likewise.
7753 (disable_thread_event_reporting): Likewise.
7754 (remove_thread_event_breakpoints): Likewise.
7755 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7756 as saved_thread.
7757 * target.h (set_desired_inferior): Renamed as...
7758 (set_desired_thread): New declaration. All uses updated.
7759 * server.c (myresume): Updated comment to reference thread instead
7760 of inferior.
7761 (handle_serial_event): Likewise.
7762 (handle_target_event): Likewise.
7763
361c8ade
GB
77642014-09-12 Tom Tromey <tromey@redhat.com>
7765 Gary Benson <gbenson@redhat.com>
7766
7767 * regcache.h: Include common-regcache.h.
7768 (regcache_read_pc): Don't declare.
7769 * regcache.c (get_thread_regcache_for_ptid): New function.
7770
bd9269f7
GB
77712014-09-11 Tom Tromey <tromey@redhat.com>
7772 Gary Benson <gbenson@redhat.com>
7773
7774 * symbol.c: New file.
7775 * Makefile.in (SFILES): Add symbol.c.
7776 (OBS): Add symbol.o.
7777
f8c1d06b
GB
77782014-09-11 Gary Benson <gbenson@redhat.com>
7779
7780 * target.c (target_stop_ptid, target_continue_ptid): New
7781 functions.
7782
721ec300
GB
77832014-09-11 Tom Tromey <tromey@redhat.com>
7784 Gary Benson <gbenson@redhat.com>
7785
7786 * target.h: Include target/target.h.
7787 * target.c (target_read_memory, target_read_uint32)
7788 (target_write_memory): New functions.
7789
c5e92cca
GB
77902014-09-11 Gary Benson <gbenson@redhat.com>
7791
7792 * server.h (debug_hw_points): Don't declare.
7793 * server.c (debug_hw_points): Don't define. Replace all uses
7794 with show_debug_regs.
7795 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7796 all uses with show_debug_regs.
7797
2e4bb98a
EBM
77982014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7799
7800 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7801 endianness into account.
7802 (ppc_supply_ptrace_register): Likewise.
7803
ac740bc7
JH
78042014-09-03 James Hogan <james.hogan@imgtec.com>
7805
7806 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7807 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7808
97ea6506
GB
78092014-09-03 Gary Benson <gbenson@redhat.com>
7810
7811 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7812 ALL_DEBUG_ADDRESS_REGISTERS.
7813
df7e5265
GB
78142014-09-02 Gary Benson <gbenson@redhat.com>
7815
7816 * i386-low.h: Renamed as...
7817 * x86-low.h: New file. All type, function and variable name
7818 prefixes changed from "i386_" to "x86_". All references updated.
7819 * i386-low.c: Renamed as...
7820 * x86-low.c: New file. All type, function and variable name
7821 prefixes changed from "i386_" to "x86_". All references updated.
7822
ed859da7
GB
78232014-09-02 Gary Benson <gbenson@redhat.com>
7824
7825 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7826 (x86_linux_new_thread): Likewise.
7827
860789c7
GB
78282014-08-29 Gary Benson <gbenson@redhat.com>
7829
7830 * server.h (setjmp.h): Do not include.
7831 (toplevel): Do not declare.
7832 (common-exceptions.h): Include.
7833 (cleanups.h): Likewise.
7834 * server.c (toplevel): Do not define.
7835 (exit_code): New static global.
7836 (detach_or_kill_for_exit_cleanup): New function.
7837 (main): New function. Original main renamed to...
7838 (captured_main): New function.
7839 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7840
ff55e1b5
GB
78412014-08-29 Gary Benson <gbenson@redhat.com>
7842
7843 * Makefile.in (SFILES): Add common/common-exceptions.c.
7844 (OBS): Add common-exceptions.o.
7845 (common-exceptions.o): New rule.
7846 * utils.c (prepare_to_throw_exception): New function.
7847
e9bcb658
GB
78482014-08-29 Gary Benson <gbenson@redhat.com>
7849
7850 * config.in: Regenerate.
7851 * configure: Likewise.
7852
e3180625
GB
78532014-08-29 Gary Benson <gbenson@redhat.com>
7854
7855 * Makefile.in (SFILES): Add common/cleanups.c.
7856 (OBS): cleanups.o.
7857 (cleanups.o): New rule.
7858
e3d6ba5d
GB
78592014-08-29 Gary Benson <gbenson@redhat.com>
7860
7861 * utils.c (internal_vwarning): New function.
7862
7096e886
GB
78632014-08-28 Gary Benson <gbenson@redhat.com>
7864
7865 * utils.h (fatal): Remove declaration.
7866 * utils.c (fatal): Remove function.
7867
14ce3192
GB
78682014-08-28 Gary Benson <gbenson@redhat.com>
7869
7870 * tracepoint.c (gdb_agent_init): Replace fatal with
7871 perror_with_name.
7872 (initialize_tracepoint): Likewise.
7873
50278d59
GB
78742014-08-28 Gary Benson <gbenson@redhat.com>
7875
7876 * remote-utils.c (remote_prepare): Replace fatal with error.
7877
aa96c426
GB
78782014-08-28 Gary Benson <gbenson@redhat.com>
7879
7880 * linux-low.c (linux_async): Replace fatal with warning.
7881 Tidy up and return.
7882 (linux_start_non_stop): Return -1 if linux_async failed.
7883
f7160e97
GB
78842014-08-28 Gary Benson <gbenson@redhat.com>
7885
7886 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7887 gdb_assert.
7888 (i386_dr_low_get_addr): Remove vague comment.
7889 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7890 gdb_assert.
7891
38e08fca
GB
78922014-08-28 Gary Benson <gbenson@redhat.com>
7893
7894 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7895 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7896 internal_error.
7897 (linux_resume_one_lwp): Likewise.
7898 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7899 gdb_assert.
7900 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7901 with internal_error.
7902 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7903 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7904 (find_register_by_name): Replace fatal with internal_error.
7905 (find_regno): Likewise.
7906 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7907 * thread-db.c (thread_db_create_event): Likewise.
7908 (thread_db_load_search): Likewise.
7909 (try_thread_db_load_1): Likewise.
7910 * tracepoint.c (get_jump_space_head): Replace fatal with
7911 internal_error.
7912 (claim_trampoline_space): Likewise.
7913 (have_fast_tracepoint_trampoline_buffer): Likewise.
7914 (cmd_qtstart): Likewise.
7915 (stop_tracing): Likewise.
7916 (fast_tracepoint_collecting): Likewise.
7917 (target_malloc): Likewise.
7918 (download_tracepoint): Likewise.
7919 (download_trace_state_variables): Replace check with gdb_assert.
7920 (upload_fast_traceframes): Replace fatal with internal_error.
7921
34abf635
GB
79222014-08-19 Tom Tromey <tromey@redhat.com>
7923 Gary Benson <gbenson@redhat.com>
7924
7925 * Makefile.in (SFILES): Add common/common-debug.c.
7926 (OBS): Add common-debug.o.
7927 (common-debug.o): New rule.
7928 * debug.h (debug_printf): Don't declare.
7929 * debug.c (debug_printf): Renamed and rewritten as...
7930 (debug_vprintf): New function.
7931
f6e94d78
GB
79322014-08-19 Gary Benson <gbenson@redhat.com>
7933
7934 * utils.h: Do not include print-utils.h.
7935
9239eeab
GB
79362014-08-19 Tom Tromey <tromey@redhat.com>
7937 Gary Benson <gbenson@redhat.com>
7938
7939 * server.h: Add static assertion.
7940 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7941
ef87c8bb
GB
79422014-08-19 Tom Tromey <tromey@redhat.com>
7943 Gary Benson <gbenson@redhat.com>
7944
7945 * Makefile.in (SFILES): Add common/errors.c.
7946 (OBS): Add errors.o.
7947 (IPA_OBS): Add errors-ipa.o.
7948 (errors.o): New rule.
7949 (errors-ipa.o): Likewise.
7950 * utils.h (perror_with_name, error, warning): Don't declare.
7951 * utils.c (warning): Renamed and rewritten as...
7952 (vwarning): New function.
7953 (error): Renamed and rewritten as...
7954 (verror): New function.
7955 (internal_error): Renamed and rewritten as...
7956 (internal_verror): New function.
7957
bb974a24
GB
79582014-08-07 Gary Benson <gbenson@redhat.com>
7959
7960 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7961 * configure: Regenerate.
7962 * config.in: Likewise.
7963 * server.h: Do not include errno.h.
7964 * event-loop.c: Likewise.
7965 * hostio-errno.c: Likewise.
7966 * linux-low.c: Likewise.
7967 * remote-utils.c: Likewise.
7968 * spu-low.c: Likewise.
7969 * utils.c: Likewise.
7970 * gdbreplay.c: Unconditionally include errno.h.
7971
6d3d12eb
GB
79722014-08-07 Gary Benson <gbenson@redhat.com>
7973
7974 * server.h: Do not include string.h.
7975 * event-loop.c: Likewise.
7976 * linux-low.c: Likewise.
7977 * regcache.c: Likewise.
7978 * remote-utils.c: Likewise.
7979 * spu-low.c: Likewise.
7980 * utils.c: Likewise.
7981
dccbb609
GB
79822014-08-07 Gary Benson <gbenson@redhat.com>
7983
7984 * server.h: Do not include gdb_assert.h.
7985
e76df0d0
GB
79862014-08-07 Gary Benson <gbenson@redhat.com>
7987
7988 * server.h: Do not include common-utils.h.
7989
4cb9c816
GB
79902014-08-07 Gary Benson <gbenson@redhat.com>
7991
7992 * server.h: Do not include ptid.h.
7993 * notif.h: Likewise.
7994
3995eeee
GB
79952014-08-07 Gary Benson <gbenson@redhat.com>
7996
7997 * server.h: Do not include gdb_locale.h.
7998
cb9f1a9b
GB
79992014-08-07 Gary Benson <gbenson@redhat.com>
8000
8001 * server.h: Do not include gdb/signals.h.
8002 * win32-low.c: Likewise.
8003
a5fceff8
GB
80042014-08-07 Gary Benson <gbenson@redhat.com>
8005
8006 * server.h: Do not include pathmax.h.
8007
b9391142
GB
80082014-08-07 Gary Benson <gbenson@redhat.com>
8009
8010 * server.h: Do not include libiberty.h.
8011 * linux-bfin-low.c: Likewise.
8012
0e443c87
GB
80132014-08-07 Gary Benson <gbenson@redhat.com>
8014
8015 * server.h: Do not include ansidecl.h.
8016
8ebb3f56
GB
80172014-08-07 Gary Benson <gbenson@redhat.com>
8018
8019 * linux-x86-low.c: Do not include stddef.h.
8020 * lynx-ppc-low.c: Likewise.
8021 * tracepoint.c: Likewise.
8022
8980bdf6
GB
80232014-08-07 Gary Benson <gbenson@redhat.com>
8024
8025 * server.h: Do not include stdarg.h.
8026 * nto-low.c: Likewise.
8027
d7096f71
GB
80282014-08-07 Gary Benson <gbenson@redhat.com>
8029
8030 * server.h: Do not include stdlib.h.
8031 * inferiors.c: Likewise.
8032 * linux-low.c: Likewise.
8033 * regcache.c: Likewise.
8034 * spu-low.c: Likewise.
8035 * tracepoint.c: Likewise.
8036 * utils.c: Likewise.
8037
d02f550d
GB
80382014-08-07 Gary Benson <gbenson@redhat.com>
8039
8040 * server.h: Do not include stdio.h.
8041 * linux-low.c: Likewise.
8042 * remote-utils.c: Likewise.
8043 * spu-low.c: Likewise.
8044 * utils.c: Likewise.
8045 * wincecompat.c: Likewise.
8046
87f6c4e3
GB
80472014-08-06 Gary Benson <gbenson@redhat.com>
8048
8049 * regcache.c (init_register_cache): Move conditionals inside if.
8050
7089dca4
GB
80512014-08-06 Gary Benson <gbenson@redhat.com>
8052
8053 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8054
462f517e
GB
80552014-07-31 Gary Benson <gbenson@redhat.com>
8056
8057 * ax.h: Do not include server.h.
8058 * gdbthread.h: Likewise.
8059 * lynx-low.h: Likewise.
8060 * notif.h: Likewise.
8061
976411d6
GB
80622014-07-30 Gary Benson <gbenson@redhat.com>
8063
8064 * server.h: Include common-defs.h.
8065 Do not include config.h or build-gnulib-gdbserver/config.h.
8066
d41f6d8e
GB
80672014-07-30 Gary Benson <gbenson@redhat.com>
8068
8069 * hostio-errno.c: Move server.h to top of includes list.
8070 * inferiors.c: Likewise.
8071 * linux-x86-low.c: Likewise.
8072 * notif.c: Include server.h.
8073
314c6a35
TT
80742014-07-24 Tom Tromey <tromey@redhat.com>
8075 Gary Benson <gbenson@redhat.com>
8076
8077 * server.h (CORE_ADDR): Now unsigned.
8078
69ff6be5
PA
80792014-07-16 Pedro Alves <palves@redhat.com>
8080
8081 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8082
ce9e3fe7
PA
80832014-07-15 Pedro Alves <palves@redhat.com>
8084
8085 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8086 copy.
8087
e76126e8
PA
80882014-07-11 Pedro Alves <palves@redhat.com>
8089
8090 * linux-low.c (kill_wait_lwp): New function, based on
8091 kill_one_lwp_callback, but use my_waitpid directly.
8092 (kill_one_lwp_callback, linux_kill): Use it.
8093
8e9db26e
PA
80942014-06-23 Pedro Alves <palves@redhat.com>
8095
8096 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8097 before setting DR0..DR3.
8098
698b3e08
GB
80992014-06-20 Gary Benson <gbenson@redhat.com>
8100
8101 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8102 * configure: Regenerated.
8103 * config.in: Likewise.
8104
125f8a3d
GB
81052014-06-20 Gary Benson <gbenson@redhat.com>
8106
8107 * Makefile.in (SFILES): Update locations for files moved
8108 from common to nat.
8109 (object file files): Reordered.
8110
42995dbd
GB
81112014-06-20 Gary Benson <gbenson@redhat.com>
8112
8113 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8114 (i386_dr_low_set_addr): Likewise.
8115 (i386_dr_low_get_addr): Likewise.
8116 (i386_dr_low_can_set_control): Likewise.
8117 (i386_dr_low_set_control): Likewise.
8118 (i386_dr_low_get_control): Likewise.
8119 (i386_dr_low_get_status): Likewise.
8120 (i386_get_debug_register_length): Likewise.
8121 * linux-x86-low.c (i386_dr_low_set_addr):
8122 Changed signature. Made static.
8123 (i386_dr_low_get_addr): Likewise.
8124 (i386_dr_low_set_control): Likewise.
8125 (i386_dr_low_get_control): Likewise.
8126 (i386_dr_low_get_status): Likewise.
8127 (i386_dr_low): New global variable.
8128 * win32-i386-low.c (i386_dr_low_set_addr):
8129 Changed signature. Made static.
8130 (i386_dr_low_get_addr): Likewise.
8131 (i386_dr_low_set_control): Likewise.
8132 (i386_dr_low_get_control): Likewise.
8133 (i386_dr_low_get_status): Likewise.
8134 (i386_dr_low): New global variable.
8135
e1d2394b
MS
81362014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8137
8138 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8139 * Makefile.in (AR, AR_FLAGS): Define.
8140 * configure: Regenerate.
8141
3a8ee006
GB
81422014-06-19 Gary Benson <gbenson@redhat.com>
8143
8144 * Makefile.in (i386-dregs.o): New rule.
8145 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8146 * i386-low.c (target.h): Remove include.
8147 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8148 (DR_CONTROL_SHIFT): Likewise.
8149 (DR_CONTROL_SIZE): Likewise.
8150 (DR_RW_EXECUTE): Likewise.
8151 (DR_RW_WRITE): Likewise.
8152 (DR_RW_READ): Likewise.
8153 (DR_RW_IORW): Likewise.
8154 (DR_LEN_1): Likewise.
8155 (DR_LEN_2): Likewise.
8156 (DR_LEN_4): Likewise.
8157 (DR_LEN_8): Likewise.
8158 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8159 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8160 (DR_ENABLE_SIZE): Likewise.
8161 (DR_LOCAL_SLOWDOWN): Likewise.
8162 (DR_GLOBAL_SLOWDOWN): Likewise.
8163 (DR_CONTROL_RESERVED): Likewise.
8164 (I386_DR_CONTROL_MASK): Likewise.
8165 (I386_DR_VACANT): Likewise.
8166 (I386_DR_LOCAL_ENABLE): Likewise.
8167 (I386_DR_GLOBAL_ENABLE): Likewise.
8168 (I386_DR_DISABLE): Likewise.
8169 (I386_DR_SET_RW_LEN): Likewise.
8170 (I386_DR_GET_RW_LEN): Likewise.
8171 (I386_DR_WATCH_HIT): Likewise.
8172 (i386_wp_op_t): Likewise.
8173 (i386_show_dr): Likewise.
8174 (i386_length_and_rw_bits): Likewise.
8175 (i386_insert_aligned_watchpoint): Likewise.
8176 (i386_remove_aligned_watchpoint): Likewise.
8177 (i386_handle_nonaligned_watchpoint): Likewise.
8178 i386_update_inferior_debug_regs(): Likewise.
8179 (i386_dr_insert_watchpoint): Likewise.
8180 (i386_dr_remove_watchpoint): Likewise.
8181 (i386_dr_region_ok_for_watchpoint): Likewise.
8182 (i386_dr_stopped_data_address): Likewise.
8183 (i386_dr_stopped_by_watchpoint): Likewise.
8184
8f26655c
GB
81852014-06-19 Gary Benson <gbenson@redhat.com>
8186
8187 * i386-low.c (i386_dr_show): Renamed to
8188 i386_show_dr and made static. All uses updated.
8189 (i386_dr_length_and_rw_bits): Renamed to
8190 i386_length_and_rw_bits and made static.
8191 All uses updated.
8192 (i386_dr_insert_aligned_watchpoint): Renamed to
8193 i386_insert_aligned_watchpoint and made static.
8194 All uses updated.
8195 (i386_dr_remove_aligned_watchpoint): Renamed to
8196 i386_remove_aligned_watchpoint and made static.
8197 All uses updated.
8198 (i386_dr_update_inferior_debug_regs): Renamed to
8199 i386_update_inferior_debug_regs and made static.
8200 All uses updated.
8201
b9228891
GB
82022014-06-18 Gary Benson <gbenson@redhat.com>
8203
5171def3
GB
8204 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8205 (i386_dr_low_can_set_control): Likewise.
8206 (i386_get_debug_register_length): Likewise.
8207 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8208 (i386_dr_low_can_set_control): Likewise.
8209 (i386_get_debug_register_length): Likewise.
8210
82112014-06-17 Gary Benson <gbenson@redhat.com>
8212
b9228891
GB
8213 * i386-low.h (i386-dregs.h): New include.
8214 (DR_FIRSTADDR): Now in i386-dregs.h.
8215 (DR_LASTADDR): Likewise.
8216 (DR_NADDR): Likewise.
8217 (DR_STATUS): Likewise.
8218 (DR_CONTROL): Likewise.
8219 (i386_debug_reg_state): Likewise.
8220 (i386_dr_insert_watchpoint): Likewise.
8221 (i386_dr_remove_watchpoint): Likewise.
8222 (i386_dr_region_ok_for_watchpoint): Likewise.
8223 (i386_dr_stopped_data_address): Likewise.
8224 (i386_dr_stopped_by_watchpoint): Likewise.
8225 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8226
4be83cc2
GB
82272014-06-18 Gary Benson <gbenson@redhat.com>
8228
8229 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8230 i386_dr_insert_watchpoint.
8231 (i386_low_remove_watchpoint): Renamed to
8232 i386_dr_remove_watchpoint.
8233 (i386_low_region_ok_for_watchpoint): Renamed to
8234 i386_dr_region_ok_for_watchpoint.
8235 (i386_low_stopped_data_address): Renamed to
8236 i386_dr_stopped_data_address.
8237 (i386_low_stopped_by_watchpoint): Renamed to
8238 i386_dr_stopped_by_watchpoint.
8239 * i386-low.c (i386_show_dr): Renamed to
8240 i386_dr_show and made nonstatic. All uses updated.
8241 (i386_length_and_rw_bits): Renamed to
8242 i386_dr_length_and_rw_bits and made nonstatic.
8243 All uses updated.
8244 (i386_insert_aligned_watchpoint): Renamed to
8245 i386_dr_insert_aligned_watchpoint and made nonstatic.
8246 All uses updated.
8247 (i386_remove_aligned_watchpoint): Renamed to
8248 i386_dr_remove_aligned_watchpoint and made nonstatic.
8249 All uses updated.
8250 (i386_update_inferior_debug_regs): Renamed to
8251 i386_dr_update_inferior_debug_regs and made nonstatic.
8252 All uses updated.
8253 (i386_low_insert_watchpoint): Renamed to
8254 i386_dr_insert_watchpoint. All uses updated.
8255 (i386_low_remove_watchpoint): Renamed to
8256 i386_dr_remove_watchpoint. All uses updated.
8257 (i386_low_region_ok_for_watchpoint): Renamed to
8258 i386_dr_region_ok_for_watchpoint. All uses updated.
8259 (i386_low_stopped_data_address): Renamed to
8260 i386_dr_stopped_data_address. All uses updated.
8261 (i386_low_stopped_by_watchpoint): Renamed to
8262 i386_dr_stopped_by_watchpoint. All uses updated.
8263
131aa0d4
GB
82642014-06-18 Gary Benson <gbenson@redhat.com>
8265
8266 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8267 (i386_dr_low_can_set_control): Likewise.
8268 (i386_insert_aligned_watchpoint): New check.
8269
d9305f7f
GB
82702014-06-18 Gary Benson <gbenson@redhat.com>
8271
8272 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8273 Renamed to state.
8274
e927c9fc
GB
82752014-06-18 Gary Benson <gbenson@redhat.com>
8276
8277 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8278 instead of fatal and error.
8279 (i386_handle_nonaligned_watchpoint): Likewise.
8280
1b6d4134
GB
82812014-06-18 Gary Benson <gbenson@redhat.com>
8282
8283 * i386-low.c (i386_get_debug_register_length): New macro.
8284 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8285 (i386_show_dr): Use debug_printf instead of fprintf. Use
8286 phex to format values.
8287
6e62758f
GB
82882014-06-18 Gary Benson <gbenson@redhat.com>
8289
8290 * i386-low.h: Comment changes.
8291 * i386-low.c: Likewise.
8292
fc6e2f03
GB
82932014-06-18 Gary Benson <gbenson@redhat.com>
8294
8295 * i386-low.c: Whitespace changes.
8296
f9d1eeed
TT
82972014-06-12 Tom Tromey <tromey@redhat.com>
8298
8299 * utils.c (freeargv): Remove.
8300
0b04e523
TT
83012014-06-12 Tom Tromey <tromey@redhat.com>
8302
8303 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8304 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8305 (parse_debug_format_options): Likewise.
8306 (gdbserver_usage): Likewise.
8307 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8308 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8309 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8310 against libiberty.
8311 ($(LIBGNU)): Depend on libiberty.
8312 (all-lib): Recurse into all subdirs.
8313 (install-only): Invoke "install" target in subdirs.
8314 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8315 targets.
8316 * configure: Rebuild.
8317 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8318 for vasprintf, vsnprintf, or gettimeofday.
8319 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8320 srv_tgtobj.
8321
270c9937
JB
83222014-06-05 Joel Brobecker <brobecker@adacore.com>
8323
8324 * development.sh: Delete.
8325 * Makefile.in (config.status): Adjust dependency on development.sh.
8326 * configure.ac: Adjust development.sh source call.
8327 * configure: Regenerate.
8328
0a261ed8
PA
83292014-06-02 Pedro Alves <palves@redhat.com>
8330
8331 * ax.c (gdb_free_agent_expr): New function.
8332 * ax.h (gdb_free_agent_expr): New declaration.
8333 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8334 list.
8335 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8336 static.
8337 (clear_breakpoint_conditions_and_commands): New function.
8338 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8339 (clear_breakpoint_conditions_and_commands): New declaration.
8340
e9dae05e
RR
83412014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8342
8343 * linux-aarch64-low.c (asm/ptrace.h): Include.
8344
5876f503
JK
83452014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8346
8347 Fix TLS access for -static -pthread.
8348 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8349 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8350 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8351
802e8e6d
PA
83522014-05-20 Pedro Alves <palves@redhat.com>
8353
8354 * linux-aarch64-low.c (aarch64_insert_point)
8355 (aarch64_remove_point): No longer check whether the type is
8356 supported here. Adjust to new interface.
8357 (the_low_target): Install aarch64_supports_z_point_type as
8358 supports_z_point_type method.
8359 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8360 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8361 instead of a Z packet char. Adjust.
8362 (arm_supports_z_point_type): New function.
8363 (arm_insert_point, arm_remove_point): Adjust to new interface.
8364 (the_low_target): Install arm_supports_z_point_type.
8365 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8366 (cris_insert_point, cris_remove_point): Adjust to new interface.
8367 Don't check whether the type is supported here.
8368 (the_low_target): Install cris_supports_z_point_type.
8369 * linux-low.c (linux_supports_z_point_type): New function.
8370 (linux_insert_point, linux_remove_point): Adjust to new interface.
8371 * linux-low.h (struct linux_target_ops) <insert_point,
8372 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8373 raw_breakpoint pointer parameter.
8374 <supports_z_point_type>: New method.
8375 * linux-mips-low.c (mips_supports_z_point_type): New function.
8376 (mips_insert_point, mips_remove_point): Adjust to new interface.
8377 Use mips_supports_z_point_type.
8378 (the_low_target): Install mips_supports_z_point_type.
8379 * linux-ppc-low.c (the_low_target): Install NULL as
8380 supports_z_point_type method.
8381 * linux-s390-low.c (the_low_target): Install NULL as
8382 supports_z_point_type method.
8383 * linux-sparc-low.c (the_low_target): Install NULL as
8384 supports_z_point_type method.
8385 * linux-x86-low.c (x86_supports_z_point_type): New function.
8386 (x86_insert_point): Adjust to new insert_point interface. Use
8387 insert_memory_breakpoint. Adjust to new
8388 i386_low_insert_watchpoint interface.
8389 (x86_remove_point): Adjust to remove_point interface. Use
8390 remove_memory_breakpoint. Adjust to new
8391 i386_low_remove_watchpoint interface.
8392 (the_low_target): Install x86_supports_z_point_type.
8393 * lynx-low.c (lynx_target_ops): Install NULL as
8394 supports_z_point_type callback.
8395 * nto-low.c (nto_supports_z_point_type): New.
8396 (nto_insert_point, nto_remove_point): Adjust to new interface.
8397 (nto_target_ops): Install nto_supports_z_point_type.
8398 * mem-break.c: Adjust intro comment.
8399 (struct raw_breakpoint) <raw_type, size>: New fields.
8400 <inserted>: Update comment.
8401 <shlib_disabled>: Delete field.
8402 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8403 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8404 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8405 (raw_bkpt_type_to_target_hw_bp_type): New function.
8406 (find_enabled_raw_code_breakpoint_at): New function.
8407 (find_raw_breakpoint_at): New type and size parameters. Use them.
8408 (insert_memory_breakpoint): New function, based off
8409 set_raw_breakpoint_at.
8410 (remove_memory_breakpoint): New function.
8411 (set_raw_breakpoint_at): Reimplement.
8412 (set_breakpoint): New, based on set_breakpoint_at.
8413 (set_breakpoint_at): Reimplement.
8414 (delete_raw_breakpoint): Go through the_target->remove_point
8415 instead of assuming memory breakpoints.
8416 (find_gdb_breakpoint_at): Delete.
8417 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8418 (find_gdb_breakpoint): New function.
8419 (set_gdb_breakpoint_at): Delete.
8420 (z_type_supported): New function.
8421 (set_gdb_breakpoint_1): New function, loosely based off
8422 set_gdb_breakpoint_at.
8423 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8424 (delete_gdb_breakpoint_at): Delete.
8425 (delete_gdb_breakpoint_1): New function, loosely based off
8426 delete_gdb_breakpoint_at.
8427 (delete_gdb_breakpoint): New function.
8428 (clear_gdb_breakpoint_conditions): Rename to ...
8429 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8430 breakpoint.
8431 (add_condition_to_breakpoint): Make static.
8432 (add_breakpoint_condition): Take a struct breakpoint pointer
8433 instead of an address. Adjust.
8434 (gdb_condition_true_at_breakpoint): Rename to ...
8435 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8436 z_type parameter.
8437 (gdb_condition_true_at_breakpoint): Reimplement.
8438 (add_breakpoint_commands): Take a struct breakpoint pointer
8439 instead of an address. Adjust.
8440 (gdb_no_commands_at_breakpoint): Rename to ...
8441 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8442 parameter. Return true if no breakpoint was found. Change debug
8443 output.
8444 (gdb_no_commands_at_breakpoint): Reimplement.
8445 (run_breakpoint_commands): Rename to ...
8446 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8447 and change return type to boolean.
8448 (run_breakpoint_commands): New function.
8449 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8450 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8451 breakpoint. Go through the_target->remove_point instead of
8452 assuming memory breakpoint.
8453 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8454 software and hardware breakpoints.
8455 (reinsert_raw_breakpoint): Go through the_target->insert_point
8456 instead of assuming memory breakpoint.
8457 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8458 software and hardware breakpoints.
8459 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8460 Check both software and hardware breakpoints.
8461 (validate_inserted_breakpoint): Assert the breakpoint is a
8462 software breakpoint. Set the inserted flag to -1 instead of
8463 setting shlib_disabled.
8464 (delete_disabled_breakpoints): Adjust.
8465 (validate_breakpoints): Only validate software breakpoints.
8466 Adjust to inserted flag change.
8467 (check_mem_read, check_mem_write): Skip breakpoint types other
8468 than software breakpoints. Adjust to inserted flag change.
8469 * mem-break.h (enum raw_bkpt_type): New enum.
8470 (raw_breakpoint, struct process_info): Forward declare.
8471 (Z_packet_to_target_hw_bp_type): Delete declaration.
8472 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8473 (set_gdb_breakpoint, delete_gdb_breakpoint)
8474 (clear_breakpoint_conditions): New declarations.
8475 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8476 (breakpoint_inserted_here): Update comment.
8477 (add_breakpoint_condition, add_breakpoint_commands): Replace
8478 address parameter with a breakpoint pointer parameter.
8479 (gdb_breakpoint_here): Update comment.
8480 (delete_gdb_breakpoint_at): Delete.
8481 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8482 * server.c (process_point_options): Take a struct breakpoint
8483 pointer instead of an address. Adjust.
8484 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8485 delete_gdb_breakpoint.
8486 * spu-low.c (spu_target_ops): Install NULL as
8487 supports_z_point_type method.
8488 * target.h: Include mem-break.h.
8489 (struct target_ops) <prepare_to_access_memory>: Update comment.
8490 <supports_z_point_type>: New field.
8491 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8492 instead of a char. Also take a raw breakpoint pointer.
8493 * win32-arm-low.c (the_low_target): Install NULL as
8494 supports_z_point_type.
8495 * win32-i386-low.c (i386_supports_z_point_type): New function.
8496 (i386_insert_point, i386_remove_point): Adjust to new interface.
8497 (the_low_target): Install i386_supports_z_point_type.
8498 * win32-low.c (win32_supports_z_point_type): New function.
8499 (win32_insert_point, win32_remove_point): Adjust to new interface.
8500 (win32_target_ops): Install win32_supports_z_point_type.
8501 * win32-low.h (struct win32_target_ops):
8502 <supports_z_point_type>: New method.
8503 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8504 instead of a char. Also take a raw breakpoint pointer.
8505
932539e3
PA
85062014-05-20 Pedro Alves <palves@redhat.com>
8507
8508 * mem-break.h: Include break-common.h.
8509 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8510 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8511 (Z_packet_to_target_hw_bp_type): New declaration.
8512 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8513 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8514 (Z_PACKET_ACCESS_WP): Delete macros.
8515 (Z_packet_to_hw_type): Delete function.
8516 * i386-low.h: Don't include break-common.h here.
8517 (Z_packet_to_hw_type): Delete declaration.
8518 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8519 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8520 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8521 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8522 * linux-aarch64-low.c: Don't include break-common.h here.
8523 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8524 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8525 (Z_packet_to_target_hw_bp_type): Delete function.
8526 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8527 function.
8528 (mips_insert_point, mips_remove_point): Use
8529 Z_packet_to_target_hw_bp_type.
8530
4ff0d3d8
PA
85312014-05-20 Pedro Alves <palves@redhat.com>
8532
8533 * linux-aarch64-low.c: Include break-common.h.
8534 (enum target_point_type): Delete.
8535 (Z_packet_to_point_type): Rename to ...
8536 (Z_packet_to_target_hw_bp_type): ... this, and return a
8537 target_hw_bp_type instead.
8538 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8539 instead of an enum target_point_type.
8540 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8541 breakpoint type.
8542 (aarch64_dr_state_insert_one_point)
8543 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8544 (aarch64_handle_aligned_watchpoint)
8545 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8546 Take an enum target_hw_bp_type instead of an enum
8547 target_point_type.
8548 (aarch64_supports_z_point_type): New function.
8549 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8550 use Z_packet_to_target_hw_bp_type.
8551
786dc519
JB
85522014-05-20 Joel Brobecker <brobecker@adacore.com>
8553
8554 * configure.ac: Only use -Werror by default when DEVELOPMENT
8555 is true.
8556 * configure: Regenerate.
8557
9e0aa64f
JK
85582014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8559
8560 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8561 * linux-x86-low.c (X86_64_USER_REGS): New.
8562 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8563
2b577b92
YQ
85642014-04-28 Yao Qi <yao@codesourcery.com>
8565
8566 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8567 name.
8568
94611da2
PA
85692014-04-25 Pedro Alves <palves@redhat.com>
8570
8571 PR server/16255
8572 * linux-low.c (linux_attach_fail_reason_string): New function.
8573 (linux_attach_lwp): Delete.
8574 (linux_attach_lwp_1): Rename to ...
8575 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8576 argument. Remove "initial" parameter. Return int instead of
8577 void. Don't error or warn here.
8578 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8579 failure to attach to the tgid. Call warning when failing to
8580 attach to an lwp.
8581 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8582 argument. Remove "initial" parameter. Return int instead of
8583 void. Don't error or warn here.
8584 (linux_attach_fail_reason_string): New declaration.
8585 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8586 interface change. Use linux_attach_fail_reason_string.
8587
01f9f808
MS
85882014-04-24 Michael Sturm <michael.sturm@mintel.com>
8589 Walfred Tedeschi <walfred.tedeschi@intel.com>
8590
8591 * Makefile.in: Added rules to handle new files
8592 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8593 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8594 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8595 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8596 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8597 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8598 x32-avx512-linux.o.
8599 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8600 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8601 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8602 i386/x32-avx512.xml.
8603 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8604 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8605 i386/x32-avx512-linux.xml.
8606 * i387-fp.c (num_avx512_k_registers): New constant for number
8607 of K registers.
8608 (num_avx512_zmmh_low_registers): New constant for number of
8609 lower ZMM registers (0-15).
8610 (num_avx512_zmmh_high_registers): New constant for number of
8611 higher ZMM registers (16-31).
8612 (num_avx512_ymmh_registers): New contant for number of higher
8613 YMM registers (ymm16-31 added by avx521 on x86_64).
8614 (num_avx512_xmm_registers): New constant for number of higher
8615 XMM registers (xmm16-31 added by AVX512 on x86_64).
8616 (struct i387_xsave): Add space for AVX512 registers.
8617 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8618 Add code to handle AVX512 registers.
8619 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8620 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8621 prototypei from generated file.
8622 (tdesc_amd64_avx512_linux): Likewise.
8623 (init_registers_x32_avx512_linux): Likewise.
8624 (tdesc_x32_avx512_linux): Likewise.
8625 (init_registers_i386_avx512_linux): Likewise.
8626 (tdesc_i386_avx512_linux): Likewise.
8627 (x86_64_regmap): Add AVX512 registers.
8628 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8629 mask.
8630 (initialize_low_arch): Add code to initialize AVX512 registers.
8631
51aa91f9
PA
86322014-04-23 Pedro Alves <palves@redhat.com>
8633
8634 * mem-break.c (find_gdb_breakpoint_at): Make static.
8635 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8636
a4165e94
PA
86372014-04-23 Pedro Alves <palves@redhat.com>
8638
8639 * i386-low.c: Don't include break-common.h here.
8640 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8641 prototype to take target_hw_bp_type as argument instead of a Z
8642 packet char.
8643 * i386-low.h: Include break-common.h here.
8644 (Z_packet_to_hw_type): Declare.
8645 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8646 prototypes.
8647 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8648 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8649 (x86_remove_point): Convert the packet number to a
8650 target_hw_bp_type before calling i386_low_remove_watchpoint.
8651 * win32-i386-low.c (i386_insert_point): Convert the packet number
8652 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8653 (i386_remove_point): Convert the packet number to a
8654 target_hw_bp_type before calling i386_low_remove_watchpoint.
8655
b8acf843
PA
86562014-04-23 Pedro Alves <palves@redhat.com>
8657
8658 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8659
d708bcd1
PA
86602014-04-10 Pedro Alves <palves@redhat.com>
8661
8662 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8663 Check if the condition or command is NULL before checking if the
8664 breakpoint is known. On success, return true.
8665 * mem-break.h (add_breakpoint_condition): Document return.
8666 (add_breakpoint_commands): Add describing comment.
8667 * server.c (skip_to_semicolon): New function.
8668 (process_point_options): Use it.
8669
2eec7d5b
PA
86702014-04-09 Pedro Alves <palves@redhat.com>
8671
8672 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8673 to lwpid_of.
8674
fa96cb38
PA
86752014-02-27 Pedro Alves <palves@redhat.com>
8676
8677 PR 12702
8678 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8679 macros.
8680 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8681 output.
8682 (last_thread_of_process_p): Take a PID argument instead of a
8683 thread pointer.
8684 (linux_wait_for_lwp): Delete.
8685 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8686 functions.
8687 (linux_low_filter_event): New function, party factored out from
8688 linux_wait_for_event.
8689 (linux_wait_for_event): Rename to ...
8690 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8691 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8692 sigsuspend. Check for zombie leaders.
8693 (linux_wait_for_event): Reimplement as wrapper around
8694 linux_wait_for_event_filtered.
8695 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8696 a normal or signal exit is seen, it's the whole process exiting.
8697 (wait_for_sigstop): No longer a for_each_inferior callback.
8698 Rewrite on top of linux_wait_for_event_filtered.
8699 (stop_all_lwps): Call wait_for_sigstop directly.
8700 * server.c (resume, handle_target_event): Handle
8701 TARGET_WAITKIND_NO_RESUMED.
8702
d763de10
JB
87032014-02-26 Joel Brobecker <brobecker@adacore.com>
8704
8705 * win32-low.c (psapi_get_dll_name,
8706 * win32_CreateToolhelp32Snapshot): Delete.
8707 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8708 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8709 Delete.
8710 (handle_load_dll): Add function description.
8711 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8712
850a0f76
JB
87132014-02-26 Joel Brobecker <brobecker@adacore.com>
8714
8715 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8716 Add comment.
8717 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8718 base address when calling win32_add_one_solib.
8719 (handle_load_dll): Delete local variable load_addr.
8720 Remove 0x1000 offset applied to DLL base address when calling
8721 win32_add_one_solib.
8722 (handle_unload_dll): Add comment.
8723
f25b3fc3
JB
87242014-02-26 Joel Brobecker <brobecker@adacore.com>
8725
8726 * win32-low.c (win32_add_all_dlls): Renames
8727 win32_ensure_ntdll_loaded. Rewrite function documentation.
8728 Adjust implementation to always load all DLLs.
8729 Add 0x1000 offset to DLL base address when calling
8730 win32_add_one_solib.
8731 (child_initialization_done): New static global.
8732 (do_initial_child_stuff): Set child_initialization_done to
8733 zero during child initialization, and 1 after. Replace call
8734 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8735 Add comment.
8736 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8737 (handle_unload_dll): Add function documentation.
8738 (get_child_debug_event): Ignore load and unload DLL events
8739 during child initialization.
8740
d86d4aaf
DE
87412014-02-20 Doug Evans <dje@google.com>
8742
3bc32da3 8743 Remove global all_lwps.
d86d4aaf
DE
8744 * inferiors.h (ptid_of): Move here from linux-low.h.
8745 (pid_of, lwpid_of): Ditto.
8746 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8747 parameter is a struct thread_info * now.
8748 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8749 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8750 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8751 directly.
8752 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8753 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8754 * linux-arm-low.c (update_registers_callback): Update, "entry"
8755 parameter is a struct thread_info * now.
8756 Fetch lwpid from current_inferior directly.
8757 (arm_insert_point): Pass &all_threads to find_inferior instead of
8758 &all_lwps.
8759 (arm_remove_point): Ditto.
8760 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8761 (arm_prepare_to_resume): Fetch pid from thread.
8762 (arm_read_description): Fetch lwpid from current_inferior directly.
8763 * linux-low.c (all_lwps): Delete.
8764 (delete_lwp): Delete call to remove_inferior.
8765 (handle_extended_wait): Fetch lwpid from thread.
8766 (add_lwp): Don't set lwp->entry.id. Remove call to
8767 add_inferior_to_list.
8768 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8769 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8770 (kill_one_lwp_callback): Ditto.
8771 (linux_kill): Don't dereference NULL pointer.
8772 Fetch ptid,lwpid from thread.
8773 (get_detach_signal): Fetch ptid from thread.
8774 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8775 Simplify call to regcache_invalidate_thread.
8776 (delete_lwp_callback): Update, "entry" parameter is a
8777 struct thread_info * now. Fetch pid from thread.
8778 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8779 (status_pending_p_callback): Update, "entry" parameter is a
8780 struct thread_info * now. Fetch ptid from thread.
8781 (find_lwp_pid): Update, "entry" parameter is a
8782 struct thread_info * now.
8783 (linux_wait_for_lwp): Fetch pid from thread.
8784 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8785 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8786 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8787 (dequeue_one_deferred_signal): Ditto.
8788 (cancel_breakpoint): Fetch ptid from current_inferior.
8789 (linux_wait_for_event): Pass &all_threads to find_inferior,
8790 not &all_lwps. Fetch ptid, lwpid from thread.
8791 (count_events_callback): Update, "entry" parameter is a
8792 struct thread_info * now.
8793 (select_singlestep_lwp_callback): Ditto.
8794 (select_event_lwp_callback): Ditto.
8795 (cancel_breakpoints_callback): Ditto.
8796 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8797 not &all_lwps.
8798 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8799 (unsuspend_one_lwp): Update, "entry" parameter is a
8800 struct thread_info * now.
8801 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8802 not &all_lwps.
8803 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8804 Fetch lwpid from thread, not lwp.
8805 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8806 Pass &all_threads to find_inferior, not &all_lwps.
8807 (send_sigstop): Fetch lwpid from thread, not lwp.
8808 (send_sigstop_callback): Update, "entry" parameter is a
8809 struct thread_info * now.
8810 (suspend_and_send_sigstop_callback): Ditto.
8811 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8812 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8813 struct thread_info * now.
8814 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8815 from thread, lwp.
8816 (lwp_running): Update, "entry" parameter is a
8817 struct thread_info * now.
8818 (stop_all_lwps): Fetch ptid from thread.
8819 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8820 (linux_resume_one_lwp): Fetch lwpid from thread.
8821 (linux_set_resume_request): Update, "entry" parameter is a
8822 struct thread_info * now. Fetch pid, lwpid from thread.
8823 (resume_status_pending_p): Update, "entry" parameter is a
8824 struct thread_info * now.
8825 (need_step_over_p): Ditto. Fetch lwpid from thread.
8826 (start_step_over): Fetch lwpid from thread.
8827 (linux_resume_one_thread): Update, "entry" parameter is a
8828 struct thread_info * now. Fetch lwpid from thread.
8829 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8830 (proceed_one_lwp): Update, "entry" parameter is a
8831 struct thread_info * now. Fetch lwpid from thread.
8832 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8833 struct thread_info * now.
8834 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8835 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8836 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8837 directly.
8838 (regsets_store_inferior_registers): Ditto.
8839 (fetch_register, store_register): Ditto.
8840 (linux_read_memory, linux_write_memory): Ditto.
8841 (linux_request_interrupt): Ditto.
8842 (linux_read_auxv): Ditto.
8843 (linux_xfer_siginfo): Ditto.
8844 (linux_qxfer_spu): Ditto.
8845 (linux_qxfer_libraries_svr4): Ditto.
8846 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8847 moved to inferiors.h.
8848 (get_lwp): Delete.
8849 (get_thread_lwp): Update.
8850 (struct lwp_info): Delete member "entry". Simplify comment for
8851 member "thread".
8852 (all_lwps): Delete.
8853 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8854 current_inferior directly.
8855 (update_watch_registers_callback): Update, "entry" parameter is a
8856 struct thread_info * now. Fetch pid from thread.
8857 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8858 (mips_insert_point): Fetch lwpid from current_inferior.
8859 Pass &all_threads to find_inferior, not &all_lwps.
8860 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8861 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8862 directly.
8863 (mips_stopped_data_address): Ditto.
8864 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8865 directly.
8866 * linux-tile-low.c (tile_arch_setup): Ditto.
8867 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8868 (update_debug_registers_callback): Update, "entry" parameter is a
8869 struct thread_info * now. Fetch pid from thread.
8870 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8871 Pass &all_threads to find_inferior, not &all_lwps.
8872 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8873 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8874 Pass &all_threads to find_inferior, not &all_lwps.
8875 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8876 (i386_dr_low_get_status): Ditto.
8877 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8878 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8879 (x86_linux_read_description): Ditto.
8880 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8881
3b8361aa
DE
88822014-02-20 Doug Evans <dje@google.com>
8883
8884 * inferiors.c (get_first_inferior): Fix buglet.
8885
f7667f0d
DE
88862014-02-19 Doug Evans <dje@google.com>
8887
8888 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8889 * inferiors.c (add_thread): Change result type to struct thread_info *.
8890 All callers updated.
8891 (add_lwp): Call add_thread here instead of in callers.
8892 All callers updated.
8893 * linux-low.h (get_lwp_thread): Rewrite.
8894 (struct lwp_info): New member "thread".
8895
b3312d80
DE
88962014-02-19 Doug Evans <dje@google.com>
8897
8898 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8899 All callers updated.
8900
ecc6f45c
DE
89012014-02-19 Doug Evans <dje@google.com>
8902
8903 * inferiors.c (add_thread): Fix whitespace.
8904
649ebbca
DE
89052014-02-19 Doug Evans <dje@google.com>
8906
8907 * dll.c (clear_dlls): Replace accessing list implemention details
8908 with API function.
8909 * gdbthread.h (get_first_thread): Declare.
8910 * inferiors.c (for_each_inferior_with_data): New function.
8911 (get_first_thread): New function.
8912 (find_thread_ptid): Simplify.
8913 (get_first_inferior): New function.
8914 (clear_list): Delete.
8915 (one_inferior_p): New function.
8916 (clear_inferior_list): New function.
8917 (clear_inferiors): Update.
8918 * inferiors.h (for_each_inferior_with_data): Declare.
8919 (clear_inferior_list): Declare.
8920 (one_inferior_p): Declare.
8921 (get_first_inferior): Declare.
8922 * linux-low.c (linux_wait_for_event): Replace accessing list
8923 implemention details with API function.
8924 * server.c (target_running): Ditto.
8925 (accumulate_file_name_length): New function.
8926 (emit_dll_description): New function.
8927 (handle_qxfer_libraries): Replace accessing list implemention
8928 details with API function.
8929 (handle_qxfer_threads_worker): New function.
8930 (handle_qxfer_threads_proper): Replace accessing list implemention
8931 details with API function.
8932 (handle_query): Ditto.
8933 (visit_actioned_threads_callback_ftype): New typedef.
8934 (visit_actioned_threads_data): New struct.
8935 (visit_actioned_threads): Rewrite to be find_inferior callback.
8936 (resume): Call find_inferior.
8937 (handle_status): Replace accessing list implemention
8938 details with API function.
8939 (process_serial_event): Replace accessing list implemention details
8940 with API function.
8941 * target.c (set_desired_inferior): Replace accessing list implemention
8942 details with API function.
8943 * tracepoint.c (same_process_p): New function.
8944 (gdb_agent_about_to_close): Replace accessing list implemention
8945 details with API function.
8946 * win32-low.c (child_delete_thread): Replace accessing list
8947 implemention details with API function.
8948 (match_dll_by_basename): New function.
8949 (dll_is_loaded_by_basename): New function.
8950 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8951 details call to dll_is_loaded_by_basename.
8952
80894984
DE
89532014-02-19 Doug Evans <dje@google.com>
8954
8955 * dll.h (struct dll_info): Add comment.
8956 * gdbthread.h (struct thread_info): Add comment.
8957 (current_ptid): Simplify.
8958 * inferiors.c (add_process): Update.
8959 (remove_process): Update.
8960 * inferiors.h (struct process_info): Rename member "head" to "entry".
8961 * linux-low.c (delete_lwp): Update.
8962 (add_lwp): Update.
8963 (last_thread_of_process_p): Update.
8964 (kill_one_lwp_callback, linux_kill): Update.
8965 (status_pending_p_callback): Update.
8966 (wait_for_sigstop): Update. Simplify read of ptid.
8967 (start_step_over): Update.
8968 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8969 (get_lwp_thread): Update.
8970 (struct lwp_info): Rename member "head" to "entry".
8971 * regcache.h (inferior_list_entry): Delete.
8972 * server.c (kill_inferior_callback): Update.
8973 (detach_or_kill_inferior_callback): Update.
8974 (print_started_pid): Update.
8975 (print_attached_pid): Update.
8976 (process_serial_event): Simplify read of ptid.
8977 * thread-db.c (thread_db_create_event): Update.
8978 (thread_db_get_tls_address): Update.
8979 * win32-low.c (current_inferior_ptid): Simplify.
8980
46917d26
TT
89812014-02-19 Tom Tromey <tromey@redhat.com>
8982
8983 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8984 argument.
8985 (target_supports_btrace): Update.
8986
0759a81e
YQ
89872014-02-14 Yao Qi <yao@codesourcery.com>
8988
8989 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8990 (rsp-low-ipa.o): New target.
8991
a7191e8b
TT
89922014-02-12 Tom Tromey <tromey@redhat.com>
8993
8994 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8995 convert_ascii_to_int.
8996 * regcache.c (registers_to_string): Likewise.
8997 * remote-utils.c (decode_M_packet): Likewise.
8998 * server.c (process_serial_event): Likewise.
8999
ff0e980e
TT
90002014-02-12 Tom Tromey <tromey@redhat.com>
9001
9002 * server.c (handle_query, handle_v_run): Use hex2bin, not
9003 unhexify.
9004 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9005
e9371aff
TT
90062014-02-12 Tom Tromey <tromey@redhat.com>
9007
9008 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9009 convert_int_to_ascii.
9010 * regcache.c (registers_to_string, collect_register_as_string):
9011 Likewise.
9012 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9013 Likewise.
9014 * server.c (process_serial_event): Likewise.
9015 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9016 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9017
971dc0b8
TT
90182014-02-12 Tom Tromey <tromey@redhat.com>
9019
9020 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9021 bin2hex, not hexify.
9022 * tracepoint.c (cmd_qtstatus): Likewise.
9023
0a822afb
TT
90242014-02-12 Tom Tromey <tromey@redhat.com>
9025
9026 * remote-utils.c (monitor_output): Pass explicit length to
9027 hexify.
9028
9c3d6531
TT
90292014-02-12 Tom Tromey <tromey@redhat.com>
9030
9031 * tracepoint.c: Include rsp-low.h.
9032 * server.c: Include rsp-low.h.
9033 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9034 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9035 declare.
9036 * remote-utils.c: Include rsp-low.h.
9037 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9038 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9039 (convert_int_to_ascii, convert_ascii_to_int): Move to
9040 common/rsp-low.c.
9041 * regcache.c: Include rsp-low.h.
9042 * ax.c: Include rsp-low.h.
9043 * Makefile.in (SFILES): Add common/rsp-low.c.
9044 (OBS): Add rsp-low.o.
9045 (rsp-low.o): New target.
9046
01fd3ea5
TT
90472014-02-12 Tom Tromey <tromey@redhat.com>
9048
9049 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9050 Include print-utils.h.
9051 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9052 (plongest, thirty_two, phex_nz): Remove.
9053 * Makefile.in (SFILES): Add common/print-utils.c.
9054 (OBS): Add print-utils.o.
9055 (print-utils-ipa.o): New target.
9056 (print-utils.o): New target.
9057 (IPA_OBJS): Add print-utils-ipa.o.
9058
e99dc820
TT
90592014-02-06 Tom Tromey <tromey@redhat.com>
9060
9061 * Makefile.in (SFILES): Fix indentation.
9062
ee1e2d4f
DE
90632014-02-05 Doug Evans <dje@google.com>
9064
9065 * linux-low.c (linux_wait_for_event): Improve comment.
9066 (linux_wait_1): Keep current_inferior in sync with event_child.
9067
f5a02773
DE
90682014-01-22 Doug Evans <dje@google.com>
9069
9070 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9071
87ce2a04
DE
90722014-01-22 Doug Evans <dje@google.com>
9073
9074 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9075 * configure: Regenerate.
9076 * config.in: Regenerate.
9077 * Makefile.in (SFILES): Add debug.c.
9078 (OBS): Add debug.o.
9079 * debug.c: New file.
9080 * debug.h: New file.
9081 * linux-aarch64-low.c (*): Update all debugging printfs to use
9082 debug_printf instead of fprintf.
9083 * linux-arm-low.c (*): Ditto.
9084 * linux-cris-low.c (*): Ditto.
9085 * linux-crisv32-low.c (*): Ditto.
9086 * linux-m32r-low.c (*): Ditto.
9087 * linux-sparc-low.c (*): Ditto.
9088 * linux-x86.c (*): Ditto.
9089 * linux-low.c (*): Ditto.
9090 (linux_wait_1): Add calls to debug_enter, debug_exit.
9091 (linux_wait): Remove redundant debugging printf.
9092 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9093 (linux_resume, unstop_all_lwps): Ditto.
9094 * mem-break.c (*): Update all debugging printfs to use
9095 debug_printf instead of fprintf.
9096 * remote-utils.c (*): Ditto.
9097 * thread-db.c (*): Ditto.
9098 * server.c #include <ctype.h>, "gdb_vecs.h".
9099 (debug_threads): Moved to debug.c.
9100 (*): Update all debugging printfs to use debug_printf instead of
9101 fprintf.
9102 (start_inferior): Replace call to fflush with call to debug_flush.
9103 (monitor_show_help): Mention set debug-format.
9104 (parse_debug_format_options): New function.
9105 (handle_monitor_command): Handle "monitor set debug-format".
9106 (gdbserver_usage): Mention --debug-format.
9107 (main): Parse --debug-format.
9108 * server.h (debug_threads): Declaration moved to debug.h.
9109 #include "debug.h".
9110 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9111 trace_debug_1 that uses debug_printf.
9112 (tracepoint_look_up_symbols): Update all debugging printfs to use
9113 debug_printf instead of fprintf.
9114
e671835b
BS
91152014-01-20 Baruch Siach <baruch@tkos.co.il>
9116
9117 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9118 sys/ptrace.h.
9119
b5737fa9
PA
91202014-01-17 Pedro Alves <palves@redhat.com>
9121
ea38d2a9 9122 PR build/16445
c7faa97a
PA
9123 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9124 defined after including gdb_proc_service.h.
b5737fa9 9125
40ed484e
DE
91262014-01-16 Doug Evans <dje@google.com>
9127
9128 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9129 (match_dll): Use it.
9130
969c39fb
MM
91312014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9132
9133 * target.h (target_ops) <read_btrace>: Change parameters and
9134 return type to allow error reporting.
9135 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9136 trace reading errors on.
9137 * linux-low.c (linux_low_read_btrace): Pass trace reading
9138 errors on.
9139 (linux_low_disable_btrace): New.
9140
ab7f45ba
DE
91412014-01-15 Doug Evans <dje@google.com>
9142
9143 * inferiors.c (thread_id_to_gdb_id): Delete.
9144 * inferiors.h (thread_id_to_gdb_id): Delete.
9145
66af0f44
EZ
91462014-01-13 Eli Zaretskii <eliz@gnu.org>
9147
9148 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9149 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9150 versions.
9151
9939e131
PA
91522014-01-08 Pedro Alves <palves@redhat.com>
9153
9154 * server.c (handle_status): Don't discard previous queued stop
9155 replies or thread's pending status here.
9156 (main) <disconnection>: Do it here instead.
9157
b7ea362b
PA
91582014-01-08 Pedro Alves <palves@redhat.com>
9159
9160 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9161 * server.c (visit_actioned_threads, handle_pending_status): New
9162 function.
9163 (handle_v_cont): Factor out parts to ...
9164 (resume): ... this new function. If in all-stop, and a thread
9165 being resumed has a pending status, report it without actually
9166 resuming.
9167 (myresume): Adjust to use the new 'resume' function.
9168 (clear_pending_status_callback, set_pending_status_callback)
9169 (find_status_pending_thread_callback): New functions.
9170 (handle_status): Handle the case of multiple threads having
9171 interesting statuses to report. Report threads' real last signal
9172 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9173 with an interesting thread to report the status for, instead of
9174 always reporting the status of the first thread.
9175
28498c42
JB
91762014-01-01 Joel Brobecker <brobecker@adacore.com>
9177
9178 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9179 * gdbreplay.c (gdbreplay_version): Likewise.
9180
f45c82da
YZ
91812013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9182
9183 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9184 iov.iov_len with the real length in use.
9185
379a5e2d
JB
91862013-12-13 Joel Brobecker <brobecker@adacore.com>
9187
9188 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9189 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9190 for all targets that use win32-low.c.
9191 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9192 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9193
4210d83e
PA
91942013-12-13 Pedro Alves <palves@redhat.com>
9195
9196 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9197 if equal to TARGET_WAITKIND_LOADED.
9198 * win32-low.c (cached_status): New static global.
9199 (win32_wait): Add declaration.
9200 (do_initial_child_stuff): Flush all initial pending debug events
9201 up to the initial breakpoint.
9202 (win32_wait): If CACHED_STATUS was set, return that instead
9203 of doing a real wait. Remove the code resuming the execution
9204 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9205 during the initial phase. Also remove the code changing
9206 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9207 TARGET_WAITKIND_STOPPED.
9208
e7f0d979
YQ
92092013-12-11 Yao Qi <yao@codesourcery.com>
9210
9211 * notif.c (handle_notif_ack): Return 0 if no notification
9212 matches.
9213
ebcf782c
DE
92142013-11-20 Doug Evans <dje@google.com>
9215
9216 * linux-low.c (linux_set_resume_request): Fix comment.
9217
20ad9378
DE
92182013-11-20 Doug Evans <dje@google.com>
9219
9220 * linux-low.c (resume_status_pending_p): Tweak comment.
9221
a196ebeb
WT
92222013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9223
9224 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9225 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9226 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9227 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9228 (srv_amd64_regobj): Add amd64-mpx.o.
9229 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9230 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9231 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9232 * i387-fp.c (num_pl_bnd_register) Added constant.
9233 (num_pl_bnd_cfg_registers) Added constant.
9234 (struct i387_xsave) Added reserved area and MPX fields.
9235 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9236 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9237 function.
9238 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9239 (init_registers_amd64_mpx_linux): Declare new function.
9240 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9241 (x86_64_regmap): Add MPX registers.
9242 (x86_linux_read_description): Add MPX case.
9243 (initialize_low_arch): Initialize MPX targets.
9244
0080a2f6
TT
92452013-11-18 Tom Tromey <tromey@redhat.com>
9246
9247 * configure: Rebuild.
9248 * configure.ac: Don't check for stdlib.h.
9249 * gdbreplay.c: Unconditionally include stdlib.h.
9250
2978b111
TT
92512013-11-18 Tom Tromey <tromey@redhat.com>
9252
9253 * config.in: Rebuild.
9254 * configure: Rebuild.
9255 * configure.ac: Don't use AC_HEADER_DIRENT.
9256
a3d08894
TT
92572013-11-18 Tom Tromey <tromey@redhat.com>
9258
9259 * server.h: Don't check HAVE_STRING_H.
9260 * gdbreplay.c: Don't check HAVE_STRING_H.
9261 * configure: Rebuild.
9262
0a5dd17d
TT
92632013-11-18 Tom Tromey <tromey@redhat.com>
9264
9265 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9266 LIBGNU.
9267
1bd2f0ba
TT
92682013-11-08 Tom Tromey <tromey@redhat.com>
9269
9270 * configure, config.in: Rebuild.
9271 * configure.ac: Remove unused configury.
9272
3266f10b
TT
92732013-11-08 Tom Tromey <tromey@redhat.com>
9274
9275 * acinclude.m4: Include common.m4, codeset.m4.
9276 * configure, config.in: Rebuild.
9277 * configure.ac: Use GDB_AC_COMMON.
9278
6682d959
AA
92792013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9280
9281 * linux-s390-low.c (HWCAP_S390_TE): New define.
9282 (s390_arch_setup): Consider the TE field in the HWCAP for
9283 determining 'have_regset_tdb'.
9284
fd0a4d76
SDJ
92852013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9286
9287 PR gdb/16014
9288 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9289 call to sizeof.
9290
1a3d890b
PA
92912013-10-02 Pedro Alves <palves@redhat.com>
9292
9293 * server.c (process_serial_event): Don't output "GDBserver
9294 exiting" if GDB is connected through stdio.
9295 * target.c (mywait): Likewise, be silent if GDB is connected
9296 through stdio.
9297
97ad4581
JB
92982013-10-01 Joel Brobecker <brobecker@adacore.com>
9299
9300 * lynx-low.c (lynx_add_threads_after_attach): New function.
9301 (lynx_attach): Remove call to add_thread. Add call to
9302 lynx_add_threads_after_attach instead.
9303
5b4e221c
MF
93042013-09-28 Mike Frysinger <vapier@gentoo.org>
9305
9306 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9307 * config.in, configure: Regenerated.
9308
ee47b2f8
YQ
93092013-09-18 Yao Qi <yao@codesourcery.com>
9310
9311 PR server/15959
9312 * server.c (start_inferior): Clear 'resume_info'.
9313
d6707650 93142013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9315
d6707650
JW
9316 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9317 for each register.
9318
9243dd0e 93192013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9320
9243dd0e
JW
9321 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9322 linux-tile-low.o to srv_tgtobj.
9323
c623a6ef
WN
93242013-09-16 Will Newton <will.newton@linaro.org>
9325
9326 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9327 out regs.
9328
fb71d39e
PA
93292013-09-06 Pedro Alves <palves@redhat.com>
9330
9331 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9332 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9333 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9334 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9335 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9336 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9337
8e7e9910
PA
93382013-09-06 Pedro Alves <palves@redhat.com>
9339
9340 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9341 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9342
7c3a12ca
PA
93432013-09-06 Pedro Alves <palves@redhat.com>
9344
9345 * linux-amd64-ipa.c: Include tracepoint.h.
9346 * linux-i386-ipa.c: Include tracepoint.h.
9347
8eb3d7b6
RW
93482013-09-06 Ricard Wanderlof <ricardw@axis.com>
9349
9350 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9351 (ps_get_thread_area): New function.
9352
eddddb9d
RW
93532013-09-06 Ricard Wanderlof <ricardw@axis.com>
9354
9355 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9356 (initialize_low_arch): Call init_registers_crisv32 rather than
9357 init_register_crisv32.
9358
533b0600
PA
93592013-09-05 Pedro Alves <palves@redhat.com>
9360
9361 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9362 to ...
9363 * hostio.h: ... this new file.
9364 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9365 win32-low.c: Include hostio.h.
9366
0ce3d3b5
PA
93672013-09-05 Pedro Alves <palves@redhat.com>
9368
9369 * server.h (gdb_client_data, handler_func, callback_handler_func)
9370 (delete_file_handler, add_file_handler, append_callback_event)
9371 (delete_callback_event, start_event_loop, initialize_event_loop):
9372 Move to event-loop.h and include it.
9373 * event-loop.h: New file.
9374
799cdc37
PA
93752013-09-05 Pedro Alves <palves@redhat.com>
9376
9377 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9378 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9379 (loaded_dll, unloaded_dll): Move to ...
9380 * dll.h: ... this new file.
9381 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9382
6a6bbd9d
PA
93832013-09-05 Pedro Alves <palves@redhat.com>
9384
9385 * server.h (current_process, get_thread_process, all_processes)
9386 (add_inferior_to_list, for_each_inferior, current_inferior)
9387 (remove_inferior, add_process, remove_process, find_process_pid)
9388 (have_started_inferiors_p, have_attached_inferiors_p)
9389 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9390 (clear_inferiors, find_inferior, find_inferior_id)
9391 (inferior_target_data, set_inferior_target_data)
9392 (inferior_regcache_data, set_inferior_regcache_data): Move to
9393 inferiors.h, and include it.
9394 * inferiors.h: New file.
9395
f699aaba
PA
93962013-09-05 Pedro Alves <palves@redhat.com>
9397
9398 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9399 Move ...
72f4393d 9400 * ax.h: ... here.
f699aaba 9401
c144c7a0
PA
94022013-09-05 Pedro Alves <palves@redhat.com>
9403
9404 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9405 tracepoint.h.
9406 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9407 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9408 (handle_tracepoint_general_set, handle_tracepoint_query)
9409 (tracepoint_finished_step, tracepoint_was_hit)
9410 (release_while_stepping_state_list, current_traceframe)
9411 (in_readonly_region, traceframe_read_mem)
9412 (fetch_traceframe_registers, traceframe_read_sdata)
9413 (traceframe_read_info, struct fast_tpoint_collect_status)
9414 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9415 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9416 (supply_fast_tracepoint_registers)
9417 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9418 (ipa_tdesc, claim_trampoline_space)
9419 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9420 (agent_mem_read, agent_get_trace_state_variable_value)
9421 (agent_set_trace_state_variable_value, agent_tsv_read)
9422 (agent_mem_read_string, get_raw_reg_func_addr)
9423 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9424 * tracepoint.h: ... this new file.
9425
ff42e6ab
PA
94262013-09-05 Pedro Alves <palves@redhat.com>
9427
9428 * server.h (perror_with_name, error, fatal, warning, paddress)
9429 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9430 include it.
9431 * utils.h: New file.
9432
541af0f4
PA
94332013-09-05 Pedro Alves <palves@redhat.com>
9434
9435 * server.h (remote_debug, noack_mode, transport_is_reliable)
9436 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9437 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9438 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9439 (write_enn, initialize_async_io, enable_async_io)
9440 (disable_async_io, check_remote_input_interrupt_request)
9441 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9442 (dead_thread_notify, prepare_resume_reply)
9443 (decode_address_to_semicolon, decode_address, decode_m_packet)
9444 (decode_M_packet, decode_X_packet, decode_xfer_write)
9445 (decode_search_memory_packet, unhexify, hexify)
9446 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9447 (look_up_one_symbol, relocate_instruction)
9448 (monitor_output): Move to remote-utils.h, and include it.
9449 * remote-utils.h: New file.
9450
eebdf26b
PA
94512013-09-05 Pedro Alves <palves@redhat.com>
9452
9453 * server.h (_): Delete.
9454
3aafd2ff
PA
94552013-09-02 Pedro Alves <palves@redhat.com>
9456
9457 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9458 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9459 allocated.
9460 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9461
cee83bcb
PM
94622013-09-02 Pierre Muller <muller@sourceware.org>
9463
9464 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9465 or WriteProcessMemory complete successfully and handle
9466 ERROR_PARTIAL_COPY error.
9467
9a13b2fa
PA
94682013-09-02 Pedro Alves <palves@redhat.com>
9469
9470 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9471 error instead of EIO.
9472
602e3198
JK
94732013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9474
9475 PR server/15604
9476 * linux-low.c: Include filestuff.h.
9477 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9478 * lynx-low.c: Include filestuff.h.
9479 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9480 * server.c: Include filestuff.h.
9481 (main): Call notice_open_fds.
9482 * spu-low.c: Include filestuff.h.
9483 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9484
96d7229d
LM
94852013-08-22 Luis Machado <lgustavo@codesourcery.com>
9486
9487 * Makefile.in: Explain why ../target and ../nat are not
9488 listed as include file search paths.
9489 (linux-waitpid.o): New object file rule.
9490 * configure.srv (srv_native_linux_obj): New variable.
9491 Replace all occurrences of linux native object files with
9492 $srv_native_linux_obj.
9493 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9494 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9495 (linux_enable_event_reporting): Remove declaration.
9496 (my_waitpid): Moved to common/linux-waitpid.c.
9497 (linux_wait_for_event): Pass ptid when calling
9498 linux_enable_event_reporting.
9499 (linux_supports_tracefork_flag): Remove.
9500 (linux_enable_event_reporting): Likewise.
9501 (linux_tracefork_grandchild): Remove.
9502 (STACK_SIZE): Moved to common/linux-ptrace.c.
9503 (linux_tracefork_child): Remove.
9504 (linux_test_for_tracefork): Remove.
9505 (linux_look_up_symbols): Call linux_supports_traceclone.
9506 (initialize_low): Remove call to linux_test_for_tracefork.
9507 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9508 common/linux-ptrace.h.
9509 (PTRACE_TYPE_ARG4): Likewise.
9510 Include linux-ptrace.h.
9511
32940073
PA
95122013-08-21 Pedro Alves <palves@redhat.com>
9513
9514 * config.in: Renegerate.
9515
33b60d58 95162013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9517
33b60d58
LM
9518 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9519 (SFILES): Remove $(srcdir)/common/target-common.c and
9520 add $(srcdir)/target/waitstatus.c.
9521 (OBS): Remove target-common.o and add waitstatus.o.
9522 (server_h): Remove $(srcdir)/../common/target-common.h and
9523 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9524 and $(srcdir)/../target/waitstatus.h.
9525 (target-common.o): Remove.
9526 (waitstatus.o): New target object file.
9527 * target.h: Do not include target-common.h and
9528 include target/resume.h, target/wait.h and
9529 target/waitstatus.h.
9530
b8e1b30e
LM
95312013-08-13 Luis Machado <lgustavo@codesourcery.com>
9532
9533 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9534 to PTRACE_TYPE_ARG3.
9535 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9536 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9537 PTRACE_TYPE_ARG4.
9538 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9539 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9540
7a60ad40
YQ
95412013-07-27 Jie Zhang <jie@codesourcery.com>
9542 Daniel Jacobowitz <dan@codesourcery.com>
9543 Yao Qi <yao@codesourcery.com>
9544
9545 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9546 (mips-linux-watch.o): New rule.
9547 (mips_linux_watch_h): New variable.
9548 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9549 srv_tgtobj.
9550 * linux-mips-low.c: Include mips-linux-watch.h.
9551 (struct arch_process_info, struct arch_lwp_info): New.
9552 (update_watch_registers_callback): New function.
9553 (mips_linux_new_process, mips_linux_new_thread) New functions.
9554 (mips_linux_prepare_to_resume, mips_insert_point): New
9555 functions.
9556 (mips_remove_point, mips_stopped_by_watchpoint): New
9557 functions.
9558 (rsp_bp_type_to_target_hw_bp_type): New function.
9559 (mips_stopped_data_address): New function.
9560 (the_low_target): Add watchpoint support functions.
9561
de6f69ad
YQ
95622013-07-27 Yao Qi <yao@codesourcery.com>
9563
9564 * i386-low.c: Include break-common.h.
9565 (enum target_hw_bp_type): Remove.
9566
3360c0bf
LM
95672013-07-24 Luis Machado <lgustavo@codesourcery.com>
9568
9569 * Makefile.in (SFILES): /common/target-common.c.
9570 (OBS): Add target-common.o.
9571 (server_h): Add $(srcdir)/../common/target-common.h.
9572 (target-common.o): New target.
9573 * server.c (queue_stop_reply_callback): Free
9574 status string after use.
9575 * target.c (target_waitstatus_to_string): Remove.
9576 * target.h: Include target-common.h.
9577 (resume_kind): Likewise.
9578 (target_waitkind): Likewise.
9579 (target_waitstatus): Likewise.
9580 (TARGET_WNOHANG): Likewise.
9581
bd885420
YQ
95822013-07-04 Yao Qi <yao@codesourcery.com>
9583
9584 * Makefile.in (host_alias): Use @host_noncanonical@.
9585 (target_alias): Use @target_noncanonical@.
9586 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9587 ACX_NONCANONICAL_HOST.
9588 * configure: Regenerated.
9589
9590 Revert:
9591 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9592
9593 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9594 * configure: Rebuild.
9595 * Makefile.in (version_host, version_target): Get from configure.
9596 (version.c): Use $(version_host) and $(version_target).
9597
17ef446e
PA
95982013-07-03 Pedro Alves <palves@redhat.com>
9599
9600 * Makefile.in (config.status): Depend on development.sh.
9601 * acinclude.m4: Include libmcheck.m4.
9602 * configure: Regenerate.
9603
7a9a7487
MG
96042013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9605
9606 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9607 attribute inside the parentheses.
9608 (winapi_DebugSetProcessKillOnExit): Ditto.
9609 (winapi_DebugBreakProcess): Ditto.
9610 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9611
49b64de6
MG
96122013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9613
9614 * notif.h (notif_event): Add a dummy member to avoid compiler
9615 errors.
9616
d5749ee7
PA
96172013-07-01 Pedro Alves <palves@redhat.com>
9618
9619 * hostio.c (HOSTIO_PATH_MAX): Define.
9620 (require_filename, handle_open, handle_unlink, handle_readlink):
9621 Use it.
9622
d8d2a3ee
PA
96232013-07-01 Pedro Alves <palves@redhat.com>
9624
9625 * server.h: Include "pathmax.h".
9626 * linux-low.c: Don't include sys/param.h.
9627 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9628 MAXPATHLEN.
9629 * win32-low.c: Don't include sys/param.h.
9630 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9631
bc7dea8d
PA
96322013-07-01 Pedro Alves <palves@redhat.com>
9633
9634 * event-loop.c: Don't check HAVE_UNISTD_H before including
9635 <unistd.h>.
9636 * gdbreplay.c: Likewise.
9637 * remote-utils.c: Likewise.
9638 * server.c: Likewise.
9639 * configure.ac: Don't check for unistd.h.
9640 * configure: Regenerate.
9641
d6c2da54
TT
96422013-06-28 Tom Tromey <tromey@redhat.com>
9643
9644 * Makefile.in (version.c): Use version.in, not
9645 common/version.in.
9646
257b6bec
MG
96472013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9648
9649 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9650 * configure: Rebuild.
9651 * Makefile.in (version_host, version_target): Get from configure.
9652 (version.c): Use $(version_host) and $(version_target).
9653
86ebe149
DK
96542013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9655
9656 Fix trace-status to output user name without trailing colon.
9657 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9658
f30aa5af
DK
96592013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9660
9661 Fix trace-status to output proper start-time and stop-time.
9662 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9663 output start time and stop time in hex as gdb expects.
9664
28a93511
YQ
96652013-06-26 Pedro Alves <pedro@codesourcery.com>
9666
9667 * tracepoint.c (build_traceframe_info_xml): Output trace state
9668 variables present in the trace buffer.
9669
01208463
TT
96702013-06-24 Tom Tromey <tromey@redhat.com>
9671
9672 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9673 create-version.sh.
9674 (version.o): Remove.
9675 * gdbreplay.c: Include version.h.
9676 (version, host_name): Don't declare.
9677 * server.h: Include version.h.
9678 (version, host_name): Don't declare.
9679
760256f9
PA
96802013-06-12 Pedro Alves <palves@redhat.com>
9681
9682 * linux-x86-low.c (linux_is_elf64): Delete global.
9683 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9684 with local linux_pid_exe_is_elf_64_file use.
9685
030031ee
PA
96862013-06-11 Pedro Alves <palves@redhat.com>
9687
9688 * linux-low.c (regset_disabled, disable_regset): New functions.
9689 (regsets_fetch_inferior_registers)
9690 (regsets_store_inferior_registers): Use them.
9691 (initialize_regsets_info); Don't allocate the disabled_regsets
9692 array here.
9693 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9694 comment.
9695
5da6eb0a
PA
96962013-06-11 Pedro Alves <palves@redhat.com>
9697
9698 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9699 xmalloc.
9700
7e5aaa09
PA
97012013-06-11 Pedro Alves <palves@redhat.com>
9702
9703 * linux-x86-low.c (initialize_low_arch): Call
9704 init_registers_x32_avx_linux.
9705
d878444c
JK
97062013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9707
9708 Fix compatibility with Android Bionic.
9709 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9710 it is not empty.
9711
3aee8918
PA
97122013-06-07 Pedro Alves <palves@redhat.com>
9713
5f2b57b5 9714 PR server/14823
3aee8918
PA
9715 * Makefile.in (OBS): Add tdesc.o.
9716 (IPA_OBJS): Add tdesc-ipa.o.
9717 (tdesc-ipa.o): New rule.
9718 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9719 interface.
9720 * linux-low.c (new_inferior): Delete.
9721 (disabled_regsets, num_regsets): Delete.
9722 (linux_add_process): Adjust to set the new per-process
9723 new_inferior flag.
9724 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9725 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9726 was a stop. When calling arch_setup, switch the current inferior
9727 to the thread that got an event.
9728 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9729 (regsets_fetch_inferior_registers)
9730 (regsets_store_inferior_registers): New regsets_info parameter.
9731 Adjust to use it.
9732 (linux_register_in_regsets): New regs_info parameter. Adjust to
9733 use it.
9734 (register_addr, fetch_register, store_register): New usrregs_info
9735 parameter. Adjust to use it.
9736 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9737 parameter regs_info. Adjust to use it.
9738 (linux_fetch_registers): Get the current inferior's regs_info, and
9739 adjust to use it.
9740 (linux_store_registers): Ditto.
9741 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9742 (initialize_low): Don't initialize the target_regsets here. Call
9743 initialize_low_arch.
9744 * linux-low.h (target_regsets): Delete declaration.
9745 (struct regsets_info): New.
9746 (struct usrregs_info): New.
9747 (struct regs_info): New.
9748 (struct process_info_private) <new_inferior>: New field.
9749 (struct linux_target_ops): Delete the num_regs, regmap, and
9750 regset_bitmap fields. New field regs_info.
9751 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9752 * i387-fp.c (num_xmm_registers): Delete.
9753 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9754 calls to new interface.
9755 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9756 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9757 Infer the number of xmm registers from the regcache's target
9758 description.
9759 * i387-fp.h (num_xmm_registers): Delete.
9760 * inferiors.c (add_thread): Don't install the thread's regcache
9761 here.
9762 * proc-service.c (gregset_info): Fetch the current inferior's
9763 regs_info. Adjust to use it.
9764 * regcache.c: Include tdesc.h.
9765 (register_bytes, reg_defs, num_registers)
9766 (gdbserver_expedite_regs): Delete.
9767 (get_thread_regcache): If the thread doesn't have a regcache yet,
9768 create one, instead of aborting gdbserver.
9769 (regcache_invalidate_one): Rename to ...
9770 (regcache_invalidate_thread): ... this.
9771 (regcache_invalidate_one): New.
9772 (regcache_invalidate): Only invalidate registers of the current
9773 process.
9774 (init_register_cache): Add target_desc parameter, and use it.
9775 (new_register_cache): Ditto. Assert the target description has a
9776 non zero registers_size.
9777 (regcache_cpy): Add assertions. Adjust.
9778 (realloc_register_cache, set_register_cache): Delete.
9779 (registers_to_string, registers_from_string): Adjust.
9780 (find_register_by_name, find_regno, find_register_by_number)
9781 (register_cache_size): Add target_desc parameter, and use it.
9782 (free_register_cache_thread, free_register_cache_thread_one)
9783 (regcache_release, register_cache_size): New.
9784 (register_size): Add target_desc parameter, and use it.
9785 (register_data, supply_register, supply_register_zeroed)
9786 (supply_regblock, supply_register_by_name, collect_register)
9787 (collect_register_as_string, collect_register_by_name): Adjust.
9788 * regcache.h (struct target_desc): Forward declare.
9789 (struct regcache) <tdesc>: New field.
9790 (init_register_cache, new_register_cache): Add target_desc
9791 parameter.
9792 (regcache_invalidate_thread): Declare.
9793 (regcache_invalidate_one): Delete declaration.
9794 (regcache_release): Declare.
9795 (find_register_by_number, register_cache_size, register_size)
9796 (find_regno): Add target_desc parameter.
9797 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9798 declarations.
9799 * remote-utils.c: Include tdesc.h.
9800 (outreg, prepare_resume_reply): Adjust.
9801 * server.c: Include tdesc.h.
9802 (gdbserver_xmltarget): Delete declaration.
9803 (get_features_xml, process_serial_event): Adjust.
9804 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9805 declare.
9806 (struct process_info) <tdesc>: New field.
9807 (ipa_tdesc): Declare.
9808 * tdesc.c: New file.
9809 * tdesc.h: New file.
9810 * tracepoint.c: Include tdesc.h.
9811 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9812 (get_context_regcache): Adjust to pass ipa_tdesc down.
9813 (do_action_at_tracepoint): Adjust to get the register cache size
9814 from the context regcache's description.
9815 (traceframe_walk_blocks): Adjust to get the register cache size
9816 from the current trace frame's description.
9817 (traceframe_get_pc): Adjust to get current trace frame's
9818 description and pass it down.
9819 (gdb_collect): Adjust to get the register cache size from the
9820 IPA's description.
9821 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9822 (gdbserver_xmltarget): Delete.
9823 (initialize_low_tracepoint): Set the ipa's target description.
9824 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9825 (initialize_low_tracepoint): Set the ipa's target description.
9826 * linux-x86-low.c: Include tdesc.h.
9827 [__x86_64__] (is_64bit_tdesc): New.
9828 (ps_get_thread_area, x86_get_thread_area): Use it.
9829 (i386_cannot_store_register): Rename to ...
9830 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9831 (i386_cannot_fetch_register): Rename to ...
9832 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9833 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9834 to new interface.
9835 (target_regsets): Rename to ...
9836 (x86_regsets): ... this.
9837 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9838 interface.
9839 (x86_siginfo_fixup): Use is_64bit_tdesc.
9840 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9841 (tdesc_x32_avx_linux, tdesc_x32_linux)
9842 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9843 Declare.
9844 (x86_linux_update_xmltarget): Delete.
9845 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9846 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9847 (AMD64_LINUX_USER64_CS): New.
9848 (x86_linux_read_description): New, based on
9849 x86_linux_update_xmltarget.
9850 (same_process_callback): New.
9851 (x86_arch_setup_process_callback): New.
9852 (x86_linux_update_xmltarget): New.
9853 (x86_regsets_info): New.
9854 (amd64_linux_regs_info): New.
9855 (i386_linux_usrregs_info): New.
9856 (i386_linux_regs_info): New.
9857 (x86_linux_regs_info): New.
9858 (x86_arch_setup): Reimplement.
9859 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9860 (x86_emit_ops): Ditto.
9861 (the_low_target): Adjust. Install x86_linux_regs_info,
9862 x86_cannot_fetch_register, and x86_cannot_store_register.
9863 (initialize_low_arch): New.
9864 * linux-ia64-low.c (tdesc_ia64): Declare.
9865 (ia64_fetch_register): Adjust.
9866 (ia64_usrregs_info, regs_info): New globals.
9867 (ia64_regs_info): New function.
9868 (the_low_target): Adjust.
9869 (initialize_low_arch): New function.
9870 * linux-sparc-low.c (tdesc_sparc64): Declare.
9871 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9872 Adjust.
9873 (sparc_arch_setup): New function.
9874 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9875 (the_low_target): Adjust.
9876 (initialize_low_arch): New function.
9877 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9878 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9879 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9880 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9881 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9882 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9883 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9884 (tdesc_powerpc_isa205_vsx64l): Declare.
9885 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9886 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9887 (ppc_set_pc, ppc_get_hwcap): Adjust.
9888 (ppc_usrregs_info): Forward declare.
9889 (!__powerpc64__) ppc_regmap_adjusted: New global.
9890 (ppc_arch_setup): Adjust to the current process'es target
9891 description.
9892 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9893 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9894 (ppc_store_evrregset): Adjust.
9895 (target_regsets): Rename to ...
9896 (ppc_regsets): ... this, and make static.
9897 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9898 (ppc_regs_info): New function.
9899 (the_low_target): Adjust.
9900 (initialize_low_arch): New function.
9901 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9902 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9903 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9904 (tdesc_s390x_linux64v2): Declare.
9905 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9906 (s390_fill_gregset, s390_store_last_break): Adjust.
9907 (target_regsets): Rename to ...
9908 (s390_regsets): ... this, and make static.
9909 (s390_get_pc, s390_set_pc): Adjust.
9910 (s390_get_hwcap): New target_desc parameter, and use it.
9911 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9912 (s390_arch_setup): Adjust to set the current process'es target
9913 description. Don't adjust the regmap.
9914 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9915 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9916 (regs_info_3264): New globals.
9917 (s390_regs_info): New function.
9918 (the_low_target): Adjust.
9919 (initialize_low_arch): New function.
9920 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9921 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9922 [__mips64] (init_registers_mips_linux)
9923 (init_registers_mips_dsp_linux): Delete defines.
9924 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9925 (have_dsp): New global.
9926 (mips_read_description): New, based on mips_arch_setup.
9927 (mips_arch_setup): Reimplement.
9928 (get_usrregs_info): New function.
9929 (mips_cannot_fetch_register, mips_cannot_store_register)
9930 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9931 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9932 (target_regsets): Rename to ...
9933 (mips_regsets): ... this, and make static.
9934 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9935 (dsp_regs_info, regs_info): New globals.
9936 (mips_regs_info): New function.
9937 (the_low_target): Adjust.
9938 (initialize_low_arch): New function.
9939 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9940 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9941 Declare.
9942 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9943 (arm_read_description): New, with bits factored from
9944 arm_arch_setup.
9945 (arm_arch_setup): Reimplement.
9946 (target_regsets): Rename to ...
9947 (arm_regsets): ... this, and make static.
9948 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9949 (arm_regs_info): New function.
9950 (the_low_target): Adjust.
9951 (initialize_low_arch): New function.
9952 * linux-m68k-low.c (tdesc_m68k): Declare.
9953 (target_regsets): Rename to ...
9954 (m68k_regsets): ... this, and make static.
9955 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9956 (m68k_regs_info): New function.
9957 (m68k_arch_setup): New function.
9958 (the_low_target): Adjust.
9959 (initialize_low_arch): New function.
9960 * linux-sh-low.c (tdesc_sharch): Declare.
9961 (target_regsets): Rename to ...
9962 (sh_regsets): ... this, and make static.
9963 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9964 (sh_regs_info, sh_arch_setup): New functions.
9965 (the_low_target): Adjust.
9966 (initialize_low_arch): New function.
9967 * linux-bfin-low.c (tdesc_bfin): Declare.
9968 (bfin_arch_setup): New function.
9969 (bfin_usrregs_info, regs_info): New globals.
9970 (bfin_regs_info): New function.
9971 (the_low_target): Adjust.
9972 (initialize_low_arch): New function.
9973 * linux-cris-low.c (tdesc_cris): Declare.
9974 (cris_arch_setup): New function.
9975 (cris_usrregs_info, regs_info): New globals.
9976 (cris_regs_info): New function.
9977 (the_low_target): Adjust.
9978 (initialize_low_arch): New function.
9979 * linux-cris-low.c (tdesc_crisv32): Declare.
9980 (cris_arch_setup): New function.
9981 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9982 (cris_regs_info): New function.
9983 (the_low_target): Adjust.
9984 (initialize_low_arch): New function.
9985 * linux-m32r-low.c (tdesc_m32r): Declare.
9986 (m32r_arch_setup): New function.
9987 (m32r_usrregs_info, regs_info): New globals.
9988 (m32r_regs_info): Adjust.
9989 (initialize_low_arch): New function.
9990 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9991 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9992 (tic6x_usrregs_info): Forward declare.
9993 (tic6x_read_description): New function, based on ...
9994 (tic6x_arch_setup): ... this. Reimplement.
9995 (target_regsets): Rename to ...
9996 (tic6x_regsets): ... this, and make static.
9997 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9998 (tic6x_regs_info): New function.
9999 (the_low_target): Adjust.
10000 (initialize_low_arch): New function.
10001 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10002 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10003 (target_regsets): Rename to ...
10004 (xtensa_regsets): ... this, and make static.
10005 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10006 globals.
10007 (xtensa_arch_setup, xtensa_regs_info): New functions.
10008 (the_low_target): Adjust.
10009 (initialize_low_arch): New function.
10010 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10011 (nios2_arch_setup): Set the current process'es tdesc.
10012 (target_regsets): Rename to ...
10013 (nios2_regsets): ... this.
10014 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10015 (nios2_regs_info): New function.
10016 (the_low_target): Adjust.
10017 (initialize_low_arch): New function.
a261b8f5
PA
10018 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10019 (aarch64_arch_setup): Set the current process'es tdesc.
10020 (target_regsets): Rename to ...
10021 (aarch64_regsets): ... this.
10022 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10023 (aarch64_regs_info): New function.
10024 (the_low_target): Adjust.
10025 (initialize_low_arch): New function.
3aee8918
PA
10026 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10027 globals.
10028 (target_regsets): Rename to ...
10029 (tile_regsets): ... this.
10030 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10031 (tile_regs_info): New function.
10032 (tile_arch_setup): Set the current process'es tdesc.
10033 (the_low_target): Adjust.
10034 (initialize_low_arch): New function.
10035 * spu-low.c (tdesc_spu): Declare.
10036 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10037 * win32-arm-low.c (tdesc_arm): Declare.
10038 (arm_arch_setup): New function.
10039 (the_low_target): Install arm_arch_setup instead of
10040 init_registers_arm.
10041 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10042 (init_windows_x86): Rename to ...
10043 (i386_arch_setup): ... this. Set `win32_tdesc'.
10044 (the_low_target): Adjust.
10045 * win32-low.c (win32_tdesc): New global.
10046 (child_add_thread): Don't create the thread cache here.
10047 (do_initial_child_stuff): Set the new process'es tdesc.
10048 * win32-low.h (struct target_desc): Forward declare.
10049 (win32_tdesc): Declare.
10050 * lynx-i386-low.c (tdesc_i386): Declare global.
10051 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10052 * lynx-low.c (lynx_tdesc): New global.
10053 (lynx_add_process): Set the new process'es tdesc.
10054 * lynx-low.h (struct target_desc): Forward declare.
10055 (lynx_tdesc): Declare global.
10056 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10057 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10058 * nto-low.c (nto_tdesc): New global.
10059 (do_attach): Set the new process'es tdesc.
10060 * nto-low.h (struct target_desc): Forward declare.
10061 (nto_tdesc): Declare.
10062 * nto-x86-low.c (tdesc_i386): Declare.
10063 (nto_x86_arch_setup): Set `nto_tdesc'.
10064
b1fbec62
GB
100652013-06-04 Gary Benson <gbenson@redhat.com>
10066
10067 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10068 to qSupported response when appropriate.
10069 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10070 with nonzero-length annex.
10071 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10072 arguments supplied in annex.
10073
d1ec4ce7
DE
100742013-05-31 Doug Evans <dje@google.com>
10075
ac44adcb 10076 PR server/15594
d1ec4ce7
DE
10077 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10078 64 bits in 64-cross-32 environment.
10079
9b25f2d3
PA
100802013-05-28 Pedro Alves <palves@redhat.com>
10081
10082 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10083 (aarch64-without-fpu.c): Delete rule.
10084 * configure.srv (aarch64*-*-linux*): Remove references to
10085 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10086 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10087 declaration.
10088
6740dc9c
PA
100892013-05-24 Pedro Alves <palves@redhat.com>
10090
10091 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10092 instead of strchr/decode_address. Error if the range isn't split
10093 with a ','. Don't assume there's be a ':' in the action.
10094
c2d6af84
PA
100952013-05-23 Yao Qi <yao@codesourcery.com>
10096 Pedro Alves <palves@redhat.com>
10097
10098 * linux-low.c (lwp_in_step_range): New function.
10099 (linux_wait_1): If the thread was range stepping and stopped
10100 outside the stepping range, report the stop to GDB. Otherwise,
10101 continue stepping. Add range stepping debug output.
10102 (linux_set_resume_request): Copy the step range from the resume
10103 request to the lwp.
10104 (linux_supports_range_stepping): New.
10105 (linux_target_ops) <supports_range_stepping>: Set to
10106 linux_supports_range_stepping.
10107 * linux-low.h (struct linux_target_ops)
10108 <supports_range_stepping>: New field.
10109 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10110 * linux-x86-low.c (x86_supports_range_stepping): New.
10111 (the_low_target) <supports_range_stepping>: Set to
10112 x86_supports_range_stepping.
10113 * server.c (handle_v_cont): Handle 'r' action.
10114 (handle_v_requests): Append ";r" if the target supports range
10115 stepping.
10116 * target.h (struct thread_resume) <step_range_start,
10117 step_range_end>: New fields.
10118 (struct target_ops) <supports_range_stepping>:
10119 New field.
10120 (target_supports_range_stepping): New macro.
10121
58794e1a
JB
101222013-05-17 Joel Brobecker <brobecker@adacore.com>
10123
10124 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10125 confusion in comment.
10126
d631c5a7
JB
101272013-05-17 Joel Brobecker <brobecker@adacore.com>
10128
10129 * lynx-low.c (struct process_info_private): New type.
10130 (lynx_add_process): New function.
10131 (lynx_create_inferior, lynx_attach): Replace calls to
10132 add_process by calls to lynx_add_process.
10133 (lynx_resume): If PTID is null, then try using
10134 current_process()->private->last_wait_event_ptid.
10135 Add comments.
10136 (lynx_clear_inferiors): Delete. The contents of that function
10137 has been inlined in lynx_mourn;
10138 (lynx_wait_1): Save the ptid in the process's private data.
10139 (lynx_mourn): Free the process' private data. Replace call
10140 to lynx_clear_inferiors by call to clear_inferiors.
10141
96f7a20f
YQ
101422013-05-17 Yao Qi <yao@codesourcery.com>
10143
10144 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10145 the right place.
10146
db0dfaa0
LM
101472013-05-16 Luis Machado <lgustavo@codesourcery.com>
10148
10149 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10150 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10151 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10152 PT_TEXT_END_ADDR guards. Update comments.
10153 (linux_target_op) <read_offsets>: Conditionally define to
10154 linux_read_offsets if the target is UCLIBC and if it defines
10155 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10156
68f5f838
SL
101572013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10158 Andrew Jenner <andrew@codesourcery.com>
10159
10160 * Makefile.in (SFILES): Add linux-nios2-low.c.
10161 (clean): Add action to delete nios2-linux.c.
10162 (nios2-linux.c): New rule.
10163 * configure.srv: Add nios2*-*-linux*.
10164 * linux-nios2-low.c: New.
10165
1ebff1fd
HAQ
101662013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10167
10168 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10169
f6150862
HZ
101702013-04-25 Hui Zhu <hui@codesourcery.com>
10171
10172 PR gdb/15186
f6150862
HZ
10173 * ax.c (ax_printf): Add fflush.
10174
614c279d
TT
101752013-04-22 Tom Tromey <tromey@redhat.com>
10176
10177 * Makefile.in (SFILES): Add filestuff.c.
10178 (OBS): Add filestuff.o.
10179 (filestuff.o): New target.
10180 * config.in, configure: Rebuild.
10181 * configure.ac: Check for fdwalk, pipe2.
10182
7d4e5717
PA
101832013-04-17 Pedro Alves <palves@redhat.com>
10184
10185 * configure.ac (USE_THREAD_DB): Delete variable.
10186 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10187 Don't AC_SUBST USE_THREAD_DB.
10188 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10189 * config.in, configure: Regenerate.
10190
d5c93e41
PA
101912013-04-16 Pedro Alves <palves@redhat.com>
10192
10193 * linux-low.h (struct lwp_info) <thread_known>: Move under
10194 the USE_THREAD_DB #ifdef.
10195
04f5fe89
PA
101962013-04-16 Pedro Alves <palves@redhat.com>
10197
10198 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10199 (linux-low.o): Delete rule.
10200 * linux-low.h: Always include "gdb_thread_db.h" instead of
10201 conditionally including thread_db.h.
10202 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10203 HAVE_THREAD_DB_H.
10204
480b27bf
JK
102052013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10206
10207 * Makefile.in (install-only): Fix make install regression.
10208
43662968
JK
102092013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10210
10211 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10212 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10213 installation.
10214 * gdbserver.1: Remove.
10215
3e74e146
PA
102162013-03-22 Pedro Alves <palves@redhat.com>
10217
10218 * linux-low.c (handle_extended_wait): Don't call
10219 linux_enable_event_reporting.
10220
a8347a2a
TT
102212013-03-15 Tony Theodore <tonyt@logyst.com>
10222
10223 PR build/9098:
10224 * Makefile.in (SHELL): Use @SHELL@.
10225
eeb56fa7
SDJ
102262013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10227
10228 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10229 compiler warning.
10230
4fa7e2ff
JB
102312013-03-13 Joel Brobecker <brobecker@adacore.com>
10232
10233 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10234 Remove extraneous NULL element.
10235
8ddb1965
YQ
102362013-03-13 Yao Qi <yao@codesourcery.com>
10237
10238 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10239 'V' block in trace frame.
10240
9accd112
MM
102412013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10242
10243 * target.h (struct target_ops): Add btrace ops.
10244 (target_supports_btrace): New macro.
10245 (target_enable_btrace): New macro.
10246 (target_disable_btrace): New macro.
10247 (target_read_btrace): New macro.
10248 * gdbthread.h (struct thread_info): Add btrace field.
10249 * server.c: Include btrace-common.h.
10250 (handle_btrace_general_set): New function.
10251 (handle_btrace_enable): New function.
10252 (handle_btrace_disable): New function.
10253 (handle_general_set): Call handle_btrace_general_set.
10254 (handle_qxfer_btrace): New function.
10255 (struct qxfer qxfer_packets[]): Add btrace entry.
10256 * inferiors.c (remove_thread): Disable btrace.
10257 * linux-low: Include linux-btrace.h.
10258 (linux_low_enable_btrace): New function.
10259 (linux_low_read_btrace): New function.
10260 (linux_target_ops): Add btrace ops.
10261 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10262 Add srv_linux_btrace=yes.
10263 (x86_64-*-linux*): Add linux-btrace.o.
10264 Add srv_linux_btrace=yes.
10265 * configure.ac: Define HAVE_LINUX_BTRACE.
10266 * config.in: Regenerated.
10267 * configure: Regenerated.
10268
5cc22e4c
MM
102692013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10270
10271 * server.c (handle_qxfer): Preserve error message if -3 is
10272 returned.
10273 (qxfer): Document the -3 return value.
10274
7c97f91e
MM
102752013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10276
10277 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10278 (linux_btrace_h): New variable.
10279 (linux-btrace.o): New rule.
10280
be9a119c 102812013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10282 Hafiz Abid Qadeer <abidh@codesourcery.com>
10283
10284 * tracepoint.c (trace_buffer_size): New global.
10285 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10286 (init_trace_buffer): Change to one-argument function. Allocate
10287 trace buffer memory.
10288 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10289 handle QTBuffer:size packet.
10290 (cmd_bigqtbuffer_size): New function.
10291 (initialize_tracepoint): Call init_trace_buffer with
10292 DEFAULT_TRACE_BUFFER_SIZE.
10293 * server.c (handle_query): Add QTBuffer:size in the
10294 supported packets.
10295
e64f7499
YQ
102962013-03-07 Yao Qi <yao@codesourcery.com>
10297
10298 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10299 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10300 of -1.
10301 (cmd_qtsp): Adjust condition. Do post increment.
10302 Set cur_action and cur_step_action back to 0.
10303
f0ae6fc3
PA
103042013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10305
10306 PR server/15236
10307 * linux-low.c (linux_write_memory): Return early success if LEN is
10308 zero.
10309
b5b0b0af
CV
103102013-03-05 Corinna Vinschen <vinschen@redhat.de>
10311
334ad4a8 10312 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10313
589bc927
TT
103142013-02-28 Tom Tromey <tromey@redhat.com>
10315
10316 * configure.ac: Invoke AC_SYS_LARGEFILE.
10317 * configure, config.in: Rebuild.
10318
dfe07582
CV
103192013-02-28 Corinna Vinschen <vinschen@redhat.com>
10320
10321 * win32-low.c: Throughout, fix format strings and casts of
10322 printf-like functions to avoid type related warnings on all
10323 platforms.
10324 (get_child_debug_event): Print dwDebugEventCode as hex since
10325 that's how it's usually documented.
10326
736cd585
YQ
103272013-02-28 Yao Qi <yao@codesourcery.com>
10328
10329 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10330 pulongest.
10331
e1f58301
JW
103322013-02-27 Jiong Wang <jiwang@tilera.com>
10333
10334 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10335 (reg-tilegx32.c): New rule.
10336 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10337 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10338 different register info initializer according to elf class.
10339 (init_registers_tilgx32): New function. The tilegx32 register info
10340 initializer.
10341 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10342 (tile_store_gregset): Likewise.
10343
d171ca78
YQ
103442013-02-27 Yao Qi <yao@codesourcery.com>
10345
10346 * server.c (process_point_options): Print debug message when
10347 debug_threads is true.
10348
282bbdf3
YQ
103492013-02-26 Yao Qi <yao@codesourcery.com>
10350
10351 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10352
aca22551
PA
103532013-02-19 Pedro Alves <palves@redhat.com>
10354 Kai Tietz <ktietz@redhat.com>
10355
10356 PR gdb/15161
10357
10358 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10359 instead of strtoul to extract address from packet.
10360 (process_serial_event) <'z'>: Likewise.
10361
4f3cee1c
YQ
103622013-02-18 Yao Qi <yao@codesourcery.com>
10363
10364 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10365
8e1d55a3
PA
103662013-02-14 Pedro Alves <palves@redhat.com>
10367
10368 Plug memory leak.
10369
10370 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10371 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10372
458820da
PA
103732013-02-14 Pedro Alves <palves@redhat.com>
10374
10375 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10376
baea0dae
PA
103772013-02-14 Pedro Alves <palves@redhat.com>
10378
10379 * tracepoint.c (save_string): Delete.
10380 (add_tracepoint_action): Use savestring instead of save_string.
10381
0b1afbb3
PA
103822013-02-12 Pedro Alves <palves@redhat.com>
10383
10384 * linux-xtensa-low.c: Ditto.
10385 * xtensa-xtregs.c: Ditto.
10386
8a4ac37e
PA
103872013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10388
10389 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10390 thread_db.
10391
148de6bb
MS
103922013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10393
10394 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10395 aarch64_num_wp_regs and aarch64_num_bp_regs to
10396 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10397
55fac6e0
MS
103982013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10399
10400 * linux-aarch64-low.c (ps_get_thread_area): Replace
10401 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10402
176eb98c
MS
104032013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10404 Marcus Shawcroft <marcus.shawcroft@arm.com>
10405 Nigel Stephens <nigel.stephens@arm.com>
10406 Yufeng Zhang <yufeng.zhang@arm.com>
10407
10408 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10409 (aarch64.c, aarch64-without-fpu.c): New targets.
10410 * configure.srv (aarch64*-*-linux*): New.
10411 * linux-aarch64-low.c: New file.
10412
56f7af9c
MS
104132013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10414
43aaf8b6 10415 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10416 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10417 (dequeue_one_deferred_signal, linux_resume_one_thread)
10418 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10419 (linux_tracefork_grandchild, linux_test_for_tracefork)
10420 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10421 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10422 where the argument is 0.
10423
60f662b0
YQ
104242013-01-25 Yao Qi <yao@codesourcery.com>
10425
10426 * event-loop.c: Include "queue.h".
10427 (gdb_event_p): New typedef.
10428 (struct gdb_event) <next_event>: Remove.
10429 (event_queue): Change to QUEUE(gdb_event_p).
10430 (async_queue_event): Remove.
10431 (gdb_event_xfree): New.
10432 (initialize_event_loop): New.
10433 (process_event): Use API from QUEUE.
10434 (wait_for_event): Likewise.
10435 * server.c (main): Call initialize_event_loop.
10436 * server.h (initialize_event_loop): Declare.
10437
5ae4861a
YQ
104382013-01-18 Yao Qi <yao@codesourcery.com>
10439
10440 * ax.h (struct eval_agent_expr_context): New.
10441 (gdb_eval_agent_expr): Update declaration.
10442 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10443 TFRAME. Add new argument CTX.
10444 * server.h (struct eval_agent_expr_context): Declare.
10445 (agent_mem_read, agent_tsv_read): Update declaration.
10446 (agent_mem_read_string): Likewise.
10447 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10448 (add_traceframe_block): Add new argument TPOINT.
10449 Increase TPOINT->traceframe_usage.
10450 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10451 eval_tracepoint_agent_expr.
10452 (condition_true_at_tracepoint): Likewise.
10453 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10454 (agent_mem_read_string, agent_tsv_read): Likewise.
10455
85e00e85
YQ
104562013-01-16 Yao Qi <yao@codesourcery.com>
10457
10458 * linux-low.c (linux_resume_one_lwp): Don't check
10459 'lwp->bp_reinsert != 0'.
10460
4039cf45
JB
104612013-01-07 Joel Brobecker <brobecker@adacore.com>
10462 Pedro Alves <palves@redhat.com>
10463
10464 * lynx-low.c (ptrace_request_to_str): Define a temporary
10465 macro and use it to simplify this function's implementation.
10466
9044dee2
JB
104672013-01-07 Joel Brobecker <brobecker@adacore.com>
10468
10469 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10470 sets errno.
10471
e6352c8f
JB
104722013-01-07 Joel Brobecker <brobecker@adacore.com>
10473
10474 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10475
50681a27
JB
104762013-01-07 Joel Brobecker <brobecker@adacore.com>
10477
10478 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10479
3f6e77ef
JB
104802013-01-07 Joel Brobecker <brobecker@adacore.com>
10481
10482 * lynx-low.c (lynx_resume): Use the resume_info parameter
10483 to determine the ptid for the lynx_ptrace call, unless
10484 it is equal to minus_one_ptid, in which case we use the
10485 ptid of the current_inferior.
10486 (lynx_wait_1): After having received a thread create/exit
10487 event, resume the inferior's execution using the signaling
10488 thread's ptid, rather than the old ptid.
10489
7fda33ae
JB
104902013-01-07 Joel Brobecker <brobecker@adacore.com>
10491
10492 * lynx-low.c (lynx_resume): Delete variable ret.
10493
b9786c74
JB
104942013-01-01 Joel Brobecker <brobecker@adacore.com>
10495
10496 * gdbreplay.c (gdbreplay_version): Update copyright year.
10497 * server.c (gdbserver_version): Likewise.
10498
8b93d60f
JB
104992012-12-17 Joel Brobecker <brobecker@adacore.com>
10500
10501 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10502 new thread.
10503
037335a7
JB
105042012-12-17 Joel Brobecker <brobecker@adacore.com>
10505
10506 * lynx-low.c (ptrace_request_to_str): Add handling for
10507 PTRACE_GETTRACESIG.
10508
52d4cbd8
JB
105092012-12-17 Joel Brobecker <brobecker@adacore.com>
10510
10511 * lynx-low.c (lynx_attach): Delete variable new_process.
10512
ab8f6ca9
JB
105132012-12-17 Joel Brobecker <brobecker@adacore.com>
10514
10515 * lynx-low.c (lynx_create_inferior): Delete variable
10516 new_process.
10517
78cbc024
JB
105182012-12-17 Joel Brobecker <brobecker@adacore.com>
10519
10520 * lynx-low.c (ptrace_request_to_str): Do not handle
10521 PTRACE_GETTHREADLIST if this macro does not exist.
10522
14a00470
YQ
105232012-12-15 Yao Qi <yao@codesourcery.com>
10524
10525 * Makefile.in (OBS): Add notif.o.
10526 * notif.c, notif.h: New.
10527 * server.c: Include "notif.h".
10528 (struct vstop_notif) <next>: Remove.
10529 <base>: New field.
10530 (queue_stop_reply): Update.
10531 (push_event, send_next_stop_reply): Remove.
10532 (discard_queued_stop_replies): Update.
10533 (notif_stop): New variable.
10534 (handle_v_stopped): Remove.
10535 (handle_v_requests): Don't call handle_v_stopped. Call
10536 handle_ack_notif instead.
10537 (queue_stop_reply_callback): Call notif_event_enque instead
10538 of queue_stop_reply.
10539 (handle_status): Don't call send_next_stop_reply, call
10540 notif_write_event instead.
10541 (kill_inferior_callback): Likewise.
10542 (detach_or_kill_inferior_callback): Likewise.
10543 (main): Call initialize_notif.
10544 (process_serial_event): Call QUEUE_is_empty.
10545 (handle_target_event): Call notif_push instead of push event.
10546 * server.h (push_event): Remove declaration.
10547
61c125b9
TT
105482012-12-10 Tom Tromey <tromey@redhat.com>
10549
10550 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10551 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10552 macros.
10553 (.c.o): Rewrite.
10554 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10555 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10556 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10557 (amd64-linux-ipa.o, ax.o): Rewrite.
10558 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10559 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10560 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10561 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10562 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10563 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10564 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10565 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10566 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10567 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10568 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10569 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10570 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10571 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10572 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10573 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10574 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10575 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10576 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10577 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10578 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10579 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10580 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10581 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10582 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10583 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10584 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10585 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10586 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10587 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10588 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10589 (reg-tilegx.o): Remove.
10590 (all_object_files): New macro.
10591 Include .deps files.
10592 * aclocal.m4, configure: Rebuild.
10593 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10594 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10595 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10596
e90e9ad9
TT
105972012-12-05 Tom Tromey <tromey@redhat.com>
10598
10599 PR gdb/14917:
10600 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10601
02d403bf 106022012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10603
10604 * configure.ac: Check for linux/perf_event.h.
10605 * config.in: Regenerated.
10606 * configure: Regenerated.
10607
0270a750
PA
106082012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10609
10610 * hostio.c (handle_readlink): Decrease buffer size
10611 parameter passed to readlink by one byte.
10612
8c29b58e
YQ
106132012-11-26 Yao Qi <yao@codesourcery.com>
10614
10615 * configure.ac (build_warnings): Append '-Wempty-body'.
10616 * configure: Regenerated.
10617 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10618 body.
10619
8bdce1ff
PM
106202012-11-15 Pierre Muller <muller@sourceware.org>
10621
10622 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10623 * config.in: Regenerate.
10624 * configure: Regenerate.
10625 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10626 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10627 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10628 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10629 header.
10630 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10631 instead of <sys/wait.h> header.
10632 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10633
02d403bf 106342012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10635
10636 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10637 (various make rules): Remove -DGDBSERVER
10638
fbd5db48
YQ
106392012-11-09 Yao Qi <yao@codesourcery.com>
10640
10641 * spu-low.c (current_ptid): Move it to ..
10642 * gdbthread.h: ... here. New.
10643 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10644 * server.c (myresume, process_serial_event): Likewise.
10645 * thread-db.c (thread_db_find_new_threads): Likewise.
10646 * tracepoint.c (run_inferior_command): Likewise.
10647
b3dc46ff
AB
106482012-10-01 Andrew Burgess <aburgess@broadcom.com>
10649
10650 * server.c (handle_search_memory_1): Include access length in
10651 warning message.
10652
07c04788
HPN
106532012-09-05 Michael Brandt <michael.brandt@axis.com>
10654
10655 * linux-crisv32-low.c: Fix compile errors.
10656
918d227b
YQ
106572012-09-04 Yao Qi <yao@codesourcery.com>
10658
10659 * tracepoint.c (cmd_qtsv): Adjust debug message.
10660 Don't check CUR_TPOINT.
10661
18c1b81a
YQ
106622012-08-28 Yao Qi <yao@codesourcery.com>
10663
10664 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10665 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10666 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10667 Remove declarations of xmalloc, xreallloc, xstrdup and
10668 freeargv.
10669 * Makefile.in (libiberty_h): New.
10670 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10671 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10672
dc82f37b
YQ
106732012-08-23 Yao Qi <yao@codesourcery.com>
10674
10675 * server.h: Remove declaration of 'xsnprintf'.
10676
406b1477
KS
106772012-08-22 Keith Seitz <keiths@redhat.com>
10678
10679 * server.h: Include build-gnulib-gbserver/config.h.
10680 * gdbreplay.c: Likewise.
10681
e6712ff1
DE
106822012-08-08 Doug Evans <dje@google.com>
10683
10684 * Makefile.in (SFILES): Add gdb_vecs.c.
10685 (OBS): Add gdb_vecs.o.
10686 (gdb_vecs_h, host_defs_h): New variables.
10687 (thread-db.o): Add $(gdb_vecs_h) dependency.
10688 (gdb_vecs.o): New rule.
10689 * thread-db.c: #include "gdb_vecs.h".
10690 (thread_db_load_search): Use a vector to iterate over path elements.
10691 Handle text appearing after "$pdir".
10692
10693 * configure.ac: Add check for strstr.
10694 * config.in: Regenerate.
10695 * configure: Regenerate.
10696
7c3270ae
UW
106972012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10698
10699 * hostio.c (handle_pread): If pread fails, fall back to attempting
10700 lseek/read.
10701 (handle_pwrite): Likewise for pwrite.
10702
b62e2b27
UW
107032012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10704
10705 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10706 between unsupported TYPE and unimplementable ADDR/LEN combination.
10707 (arm_insert_point): Act on new return value.
10708
78a99e91
PA
107092012-07-31 Pedro Alves <palves@redhat.com>
10710
10711 * server.c (process_point_options): Only skip tokens if we find
10712 one that is unrecognized. Don't treat 'X' specially while
10713 skipping unrecognized tokens.
10714
fcf303ab
UW
107152012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10716
10717 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10718 to 4-byte-align HW breakpoint addresses for Thumb.
10719
7255706c
YQ
107202012-07-27 Yao Qi <yao@codesourcery.com>
10721
10722 PR remote/14161.
10723
10724 * server.h: Declare gdb_agent_about_to_close.
10725 * target.c (kill_inferior): Include "agent.h".
10726 New. Send command 'kill'.
10727 * target.h (kill_inferior): Removed macro.
10728 * tracepoint.c (gdb_agent_about_to_close): New.
10729 (gdb_agent_helper_thread): Handle command 'close'.
10730 Wait endlessly until the inferior stops.
10731 Install gdb_agent_remove_socket to atexit hook.
10732 (agent_socket_name): New static variable.
10733 (gdb_agent_socket_init): Replace local variable 'name' with
10734 'agent_socket_name'.
10735 (gdb_agent_remove_socket): New.
10736
5a3f286f
YQ
107372012-07-27 Yao Qi <yao@codesourcery.com>
10738
10739 * server.c (process_point_options): Stop at 'X' when parsing.
10740
961bd387
ME
107412012-07-19 Michael Eager <eager@eagercon.com>
10742
a261b8f5 10743 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10744 to hw_execute.
10745 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10746 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10747 hardware breakpoint.
10748
aa7c7447
JK
107492012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10750
10751 * gdbserver/linux-low.c (initialize_low): Call
10752 linux_ptrace_init_warnings.
10753
7f216e7c
DE
107542012-07-02 Doug Evans <dje@google.com>
10755
10756 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10757 pointer to int.
10758
d3ce09f5
SS
107592012-07-02 Stan Shebs <stan@codesourcery.com>
10760
10761 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10762 (ax.o): Add it to build rule.
10763 (ax-ipa.o): Ditto.
10764 (OBS): Add format.o.
10765 (IPA_OBS): Add format.o.
10766 * server.c (handle_query): Claim support for breakpoint commands.
10767 (process_point_options): Add command case.
10768 (process_serial_event): Leave running if there are printfs in
10769 effect.
10770 * mem-break.h (any_persistent_commands): Declare.
10771 (add_breakpoint_commands): Declare.
10772 (gdb_no_commands_at_breakpoint): Declare.
10773 (run_breakpoint_commands): Declare.
10774 * mem-break.c (struct point_command_list): New struct.
10775 (struct breakpoint): New field command_list.
10776 (any_persistent_commands): New function.
10777 (add_commands_to_breakpoint): New function.
10778 (add_breakpoint_commands): New function.
10779 (gdb_no_commands_at_breakpoint): New function.
10780 (run_breakpoint_commands): New function.
10781 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10782 locally.
10783 * ax.c: Include format.h.
10784 (ax_printf): New function.
10785 (gdb_eval_agent_expr): Add printf opcode.
10786
2f8f6aed
YQ
107872012-06-13 Yao Qi <yao@codesourcery.com>
10788
10789 * server.c (start_inferior): Remove duplicated writes to fields
10790 'last_resume_kind' and 'last_status' of 'current_inferior'.
10791
0c9070b3
YQ
107922012-06-12 Yao Qi <yao@codesourcery.com>
10793 Pedro Alves <palves@redhat.com>
10794
10795 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10796 comment.
10797 * server.c (handle_v_cont): Extend comment.
10798
c52daf70
YQ
107992012-06-11 Yao Qi <yao@codesourcery.com>
10800
10801 * linux-low.c (linux_attach): Add 'static'.
10802
d38bbb0a
YQ
108032012-06-06 Yao Qi <yao@codesourcery.com>
10804
10805 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10806
89dc0afd
JK
108072012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10808
10809 Fix gcc -flto compilation warning.
10810 * server.c (main): Make variable multi_mode and attach volatile.
10811
75f62ce7
TJB
108122012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10813
10814 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10815 if the platform doesn't know about it.
10816
65f479b6
PA
108172012-05-30 Jeff Kenton <jkenton@tilera.com>
10818
10819 * Makefile.in (SFILES): Add linux-tile-low.c.
10820 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10821 * configure.srv: Handle tilegx-*-linux*.
10822 * linux-tile-low.c: New file.
10823
0c5bf5a9
JK
108242012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10825
10826 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10827
a493e3e2
PA
108282012-05-24 Pedro Alves <palves@redhat.com>
10829
10830 PR gdb/7205
10831
43aaf8b6 10832 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10833
2ea28649
PA
108342012-05-24 Pedro Alves <palves@redhat.com>
10835
10836 PR gdb/7205
10837
10838 Replace target_signal with gdb_signal throughout.
10839
8d409d16
MR
108402012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10841
10842 * linux-low.c (linux_store_registers): Avoid the copying sequence
10843 when no data has been retrieved by ptrace.
10844
23512c01
MGD
108452012-05-22 Will Deacon <will.deacon@arm.com>
10846
10847 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10848 Include asm/ptrace.h.
10849 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10850 already defined.
10851
4934b29e
MR
108522012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10853
10854 * linux-low.c (linux_store_registers): Don't re-retrieve data
10855 with ptrace that has already been obtained from /proc. Always
10856 copy any data retrieved with ptrace to the buffer supplied.
10857
bde24c0a
PA
108582012-05-11 Yao Qi <yao@codesourcery.com>
10859 Pedro Alves <palves@redhat.com>
10860
10861 * linux-low.c (enum stopping_threads_kind): New.
10862 (stopping_threads): Change type to `enum stopping_threads_kind'.
10863 (handle_extended_wait): If stopping and suspending threads, leave
10864 the new_lwp suspended too.
10865 (linux_wait_for_event): Adjust.
10866 (stop_all_lwps): Set `stopping_threads' to
10867 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10868 whether we're suspending threads or just stopping them. Assert no
10869 recursion happens.
10870
623b6bdf
YQ
108712012-04-29 Yao Qi <yao@codesourcery.com>
10872
10873 * server.h: Move some code to ...
10874 * gdbthread.h: ... here. New.
10875 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10876 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10877 (nto-low.o, win32-low.o): Likewise.
10878 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10879 * regcache.c, remote-utils.c, server.c: Likewise.
10880 * target.c, tracepoint.c, win32-low.c: Likewise.
10881
f15f9948
TJB
108822012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10883
10884 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10885 (PTRACE_ARG4_TYPE): Likewise.
10886 (PTRACE_XFER_TYPE): Likewise.
10887 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10888 ptrace to PTRACE_ARG3_TYPE.
10889 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10890 (PTRACE_ARG4_TYPE): Likewise.
10891 (PTRACE_XFER_TYPE): Likewise.
10892 (linux_detach_one_lwp): Cast fourth argument of
10893 ptrace to long then PTRACE_ARG4_TYPE.
10894 (regsets_fetch_inferior_registers): Cast third argument of
10895 ptrace to long then PTRACE_ARG3_TYPE.
10896 (regsets_store_inferior_registers): Likewise.
10897
38ea300a
PA
108982012-04-20 Pedro Alves <palves@redhat.com>
10899
10900 * configure: Regenerate.
10901
c971b7fa
PA
109022012-04-19 Pedro Alves <palves@redhat.com>
10903
43aaf8b6 10904 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10905 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10906 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10907 (all, install-only, uninstall, clean-info, all-lib, clean): No
10908 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10909 (maintainer-clean realclean distclean): Use subdir_do.
10910 (subdir_do): New.
10911 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10912 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10913 * acinclude.m4: Include acx_configure_dir.m4.
10914 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10915 calls. Call AC_PROG_RANLIB. Configure gnulib using
10916 ACX_CONFIGURE_DIR.
10917 (GNULIB): New.
10918 (GNULIB_STDINT_H): Adjust.
10919 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10920 * gdbreplay.c: Include build-gnulib/config.h.
10921 * server.h: Likewise.
10922 * aclocal.m4: Regenerate.
10923 * config.in: Regenerate.
10924 * configure: Regenerate.
c971b7fa 10925
809277f8
PA
109262012-04-19 Pedro Alves <palves@redhat.com>
10927
10928 * Makefile.in (LIBGNU, INCGNU): Adjust.
10929 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10930 (all, install-only, uninstall, clean-info, all-lib, clean)
10931 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10932 * configure.ac: Adjust AC_OUTPUT output.
10933 * aclocal.m4: Regenerate.
10934 * configure: Regenerate.
10935
fd9bb8b8
PA
109362012-04-19 Pedro Alves <palves@redhat.com>
10937
10938 * Makefile.in (generated_files): New.
10939 (server_h): Remove the explicit dependency on config.h, and depend
10940 on $generated_files.
10941
1c298c66
PA
109422012-04-19 Pedro Alves <palves@redhat.com>
10943
10944 * Makefile.in (INCGNU): Add -Ignulib.
10945
57c4b50b
PA
109462012-04-19 Pedro Alves <palves@redhat.com>
10947
10948 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10949 (INCGNU): ... this, and spell out -I here.
10950 (GNULIB_LIB): Rename to ...
10951 (LIBGNU): ... this.
10952 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10953
1030e047
PA
109542012-04-19 Pedro Alves <palves@redhat.com>
10955
10956 * config.in: Regenerate.
10957
447d4319
PA
109582012-04-19 Pedro Alves <palves@redhat.com>
10959
10960 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10961 * server.h (memmem): Remove declaration.
10962 * config.in: Regenerate.
10963 * configure: Regenerate.
10964
aad9eab9
YQ
109652012-04-19 Yao Qi <yao@codesourcery.com>
10966
10967 * Makefile.in (SFILES): Add common/vec.c.
10968 (OBS): Add vec.o.
10969 (vec.o): New rule.
10970
3e10640f
YQ
109712012-04-19 Yao Qi <yao@codesourcery.com>
10972
10973 * remote-utils.c (prepare_resume_reply): Replace with macro
10974 target_core_of_thread.
10975 * server.c (handle_qxfer_threads_proper): Likewise.
10976 * target.h (traget_core_of_thread): New macro.
10977
71622373
PA
109782012-04-18 Pedro Alves <palves@redhat.com>
10979
10980 * aclocal.m4: Regenerate.
10981 * configure: Regenerate.
10982
80d26939
YQ
109832012-04-16 Yao Qi <yao@codesourcery.com>
10984
10985 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10986 duplicated on address.
10987
42476b70
YQ
109882012-04-16 Yao Qi <yao@codesourcery.com>
10989
10990 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10991 (struct tracepoint_action_ops) <send>: New field.
10992 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10993 (agent_expr_send, x_tracepoint_action_send): New.
10994 (l_tracepoint_action_send): New.
10995 (cmd_qtdp): Download and install tracepoint
10996 according to `use_agent'.
10997 (run_inferior_command): Add one more parameter `len'.
10998 Update callers.
10999 (tracepoint_send_agent): New.
11000 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11001
7bc83639
YQ
110022012-04-16 Yao Qi <yao@codesourcery.com>
11003
11004 * tracepoint.c (download_tracepoints): Moved to ...
11005 (cmd_qtstart): ... here.
11006
5f18041e
YQ
110072012-04-14 Yao Qi <yao@codesourcery.com>
11008
11009 * tracepoint.c: Include inttypes.h.
11010 (struct collect_memory_action): Use sized types.
11011 (struct tracepoint): Likewise.
11012 (cmd_qtdp, stop_tracing): Update print specifiers.
11013 (cmd_qtp, response_tracepoint): Likewise.
11014 (collect_data_at_tracepoint): Likewise.
11015 (collect_data_at_step): Likewise.
11016
55a8c076
YQ
110172012-04-14 Yao Qi <yao@codesourcery.com>
11018
11019 Import gnulib module inttypes.
11020 * aclocal.m4, config.in, configure: Regenerated.
11021
dc750257
YQ
110222012-04-14 Yao Qi <yao@codesourcery.com>
11023
11024 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11025 Makefile and config.status at last.
11026
0ab5faf9
YQ
110272012-04-13 Yao Qi <yao@codesourcery.com>
11028
11029 * tracepoint.c: Include stdint.h unconditionally.
11030
18f5fd81
TJB
110312012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11032
11033 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11034 on BFD_HAVE_SYS_PROCFS_TYPE.
11035 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11036 * configure: Regenerate.
11037 * config.in: Likewise.
11038
4d47af5c
L
110392012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11040
11041 * Makefile.in (clean): Also remove x32.c x32-linux.c
11042 x32-avx.c x32-avx-linux.c.
11043 (x32.o): New target.
11044 (x32.c): Likewise.
11045 (x32-linux.o): Likewise.
11046 (x32-linux.c): Likewise.
11047 (x32-avx.o): Likewise.
11048 (x32-avx.c): Likewise.
11049 (x32-avx-linux.o): Likewise.
11050 (x32-avx-linux.c): Likewise.
11051
11052 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11053 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11054 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11055 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11056 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11057 i386/x32-avx-linux.xml.
11058
11059 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11060 (init_registers_x32_avx_linux): Likwise.
11061 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11062 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11063
ecedbe58
PA
110642012-04-13 Pedro Alves <palves@redhat.com>
11065
11066 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11067 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11068 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11069 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11070 the sub-make.
11071
c92b5177
L
110722012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11073
11074 * linux-x86-low.c (compat_x32_clock_t): New.
11075 (compat_x32_siginfo_t): Likewise.
11076 (compat_x32_siginfo_from_siginfo): Likewise.
11077 (siginfo_from_compat_x32_siginfo): Likewise.
11078 (linux_is_elf64): Likewise.
11079 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11080 and siginfo_from_compat_x32_siginfo for x32.
11081 (x86_arch_setup): Set linux_is_elf64.
11082
214d508e
L
110832012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11084
11085 PR gdb/13969
11086 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11087 e_machine field.
11088 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11089 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11090 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11091 compatible with process.
11092
c9a1864a
YQ
110932012-04-12 Yao Qi <yao@codesourcery.com>
11094
11095 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11096 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11097 (install-only, install-info, clean): Handle sub dir gnulib.
11098 (all-lib, am--refresh): New targets.
11099 (memmem.o): Remove target.
11100 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11101 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11102 (AC_REPLACE_FUNCS): Remove memmem.
11103 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11104 (AC_OUTPUT): Generate Makefile in gnulib/.
11105 * aclocal.m4, config.in, configure: Regenerated.
11106
367ba2c2
MR
111072012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11108
11109 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11110
9d236627
PA
111112012-04-05 Pedro Alves <palves@redhat.com>
11112
11113 -Werror=strict-aliasing
11114
11115 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11116 pointer.
11117
111217b3
PA
111182012-04-04 Pedro Alves <palves@redhat.com>
11119
11120 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11121 (sparc_store_gregset_from_stack, sparc_store_gregset)
11122 (sparc_breakpoint_at): Fix formatting.
11123
8365dcf5
TJB
111242012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11125
11126 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11127 are available.
11128 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11129 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11130 * config.in: Regenerate.
11131 * configure: Likewise.
11132
689cc2ae
PA
111332012-03-29 Pedro Alves <palves@redhat.com>
11134
11135 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11136 Correct ptrace arguments.
11137
c14dfd32
PA
111382012-03-28 Pedro Alves <palves@redhat.com>
11139
11140 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11141 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11142 (IA64_FR1_REGNUM): New defines.
11143 (ia64_fetch_register): New.
11144 (the_low_target): Install it.
11145 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11146 field.
11147 * linux-low.c (linux_fetch_registers): Try the
11148 the_low_target.fetch_register hook first.
11149
11150 * linux-arm-low.c (the_low_target): Adjust.
11151 * linux-bfin-low.c (the_low_target): Adjust.
11152 * linux-cris-low.c (the_low_target): Adjust.
11153 * linux-crisv32-low.c (the_low_target): Adjust.
11154 * linux-m32r-low.c (the_low_target): Adjust.
11155 * linux-m68k-low.c (the_low_target): Adjust.
11156 * linux-mips-low.c (the_low_target): Adjust.
11157 * linux-ppc-low.c (the_low_target): Adjust.
11158 * linux-s390-low.c (the_low_target): Adjust.
11159 * linux-sh-low.c (the_low_target): Adjust.
11160 * linux-sparc-low.c (the_low_target): Adjust.
11161 * linux-tic6x-low.c (the_low_target): Adjust.
11162 * linux-x86-low.c (the_low_target): Adjust.
11163 * linux-xtensa-low.c (the_low_target): Adjust.
11164
63c88e13
PA
111652012-03-26 Pedro Alves <palves@redhat.com>
11166
11167 * server.c (handle_qxfer_libraries): Don't bail early if
11168 the_target->qxfer_libraries_svr4 is not NULL.
11169
fb723180
PA
111702012-03-26 Pedro Alves <palves@redhat.com>
11171
11172 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11173
0afae3cf
PA
111742012-03-23 Pedro Alves <palves@redhat.com>
11175
11176 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11177 "library-list-svr4" element's start tag when the the DSO list is
11178 empty.
11179
485f1ee4
PA
111802012-03-23 Pedro Alves <palves@redhat.com>
11181
11182 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11183 a variable whose type size is the same as the inferior's pointer
11184 size.
11185
a5362b9a
TS
111862012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11187
11188 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11189 struct siginfo.
11190 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11191 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11192 * linux-low.h: Include <signal.h>.
11193 (struct siginfo): Remove forward declaration.
11194 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11195 struct siginfo.
11196
d226c142
MF
111972012-03-21 Mike Frysinger <vapier@gentoo.org>
11198
11199 * .gitignore: Ignore more files.
11200
122f36ef
PA
112012012-03-19 Pedro Alves <palves@redhat.com>
11202 Jan Kratochvil <jan.kratochvil@redhat.com>
11203
11204 * server.c (cont_thread, general_thread): Add describing comments.
11205 (start_inferior): Clear `cont_thread'.
11206 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11207 of a process.
11208
fc3e5175
YQ
112092012-03-15 Yao Qi <yao@codesourcery.com>
11210
11211 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11212 handling to ...
11213 (cmd_qtdp): ... here.
11214
8d0d92cd
YQ
112152012-03-15 Yao Qi <yao@codesourcery.com>
11216
11217 * tracepoint.c (struct tracepoint_action_ops): New.
11218 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11219 (m_tracepoint_action_download): New.
11220 (r_tracepoint_action_download): New.
11221 (x_tracepoint_action_download): New.
11222 (l_tracepoint_action_download): New.
11223 (add_tracepoint_action): Install `action->ops' according type.
11224 (download_tracepoint_1): Move code `download' function pointer
11225 of various tracepoint_action_ops.
11226
87b0bb13
JK
112272012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11228
11229 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11230 linux_ptrace_attach_warnings.
11231
5f572dec
JK
112322012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11233
11234 * Makefile.in (linux-ptrace.o): New.
11235 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11236 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11237 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11238 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11239 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11240 of these targets.
11241 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11242
f4647387
YQ
112432012-03-08 Yao Qi <yao@codesourcery.com>
11244 Pedro Alves <palves@redhat.com>
11245
11246 Fix PR server/13392.
11247 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11248 offset of JMP insn.
11249 * tracepoint.c (remove_tracepoint): New.
11250 (cmd_qtdp): Call remove_tracepoint when failed to install.
11251
9b224c5e
PA
112522012-03-07 Pedro Alves <palves@redhat.com>
11253
11254 * linux-low.c (get_detach_signal): New.
11255 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11256 Pass on pending signals to PTRACE_DETACH. Check the result of the
11257 ptrace call.
11258 * server.c (program_signals, program_signals_p): New.
11259 (handle_general_set): Handle QProgramSignals.
11260 * server.h (program_signals, program_signals_p): Declare.
11261
e237a7e2
JK
112622012-03-05 Pedro Alves <palves@redhat.com>
11263 Jan Kratochvil <jan.kratochvil@redhat.com>
11264
11265 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11266 New comment why.
11267
5808517f
YQ
112682012-03-03 Yao Qi <yao@codesourcery.com>
11269
11270 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11271 agent_look_up_symbols.
11272
58b4daa5
YQ
112732012-03-03 Yao Qi <yao@codesourcery.com>
11274
11275 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11276 (linux-x86-low.o): Likewise.
11277 * server.h: Remove in_process_agent_loaded.
11278 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11279 common/agent.c.
11280 Update callers.
11281
8ffcbaaf
YQ
112822012-03-03 Yao Qi <yao@codesourcery.com>
11283
11284 * tracepoint.c (gdb_agent_capability): New global.
11285 (in_process_agent_loaded_ust): Renamed to
11286 `in_process_agent_supports_ust'.
11287 Update callers.
11288 (in_process_agent_supports_ust): Call agent_capability_check.
11289 (clear_installed_tracepoints): Assert that agent supports
11290 agent.
11291
d1feda86
YQ
112922012-03-03 Yao Qi <yao@codesourcery.com>
11293
11294 * linux-low.c (linux_supports_agent): New.
11295 (linux_target_ops): Initialize field `supports_agent' with
11296 linux_supports_agent.
11297 * target.h (struct target_ops) <supports_agent>: New.
11298 (target_supports_agent): New macro.
11299 * server.c (handle_general_set): Handle packet 'QAgent'.
11300 (handle_query): Send `QAgent+'.
11301 * Makefile.in (server.o): Depends on agent.h.
11302
2fa291ac
YQ
113032012-03-03 Yao Qi <yao@codesourcery.com>
11304
11305 * Makefile.in (OBS): Add agent.o.
11306 Add new rule for agent.o.
11307 Track dependence of tracepoint.c on agent.h.
11308 * tracepoint.c (run_inferior_command_1):
11309 (run_inferior_command): Call agent_run_command.
11310 (gdb_ust_connect_sync_socket): Deleted. Move it to
11311 common/agent.c.
11312 (resume_thread, stop_thread): Likewise.
11313 (gdb_ust_socket_init): Renamed to ...
11314 (gdb_agent_socket_init): ... New.
11315 (gdb_ust_thread): Renamed to ...
11316 (gdb_agent_helper_thread): ... New.
11317 (gdb_ust_init): Move some code to ...
11318 (gdb_agent_init): ... here. New.
11319 [HAVE_UST]: Call gdb_ust_init.
11320 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11321 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11322 * config.in, configure: Regenerated.
11323
05044653
PA
113242012-03-02 Pedro Alves <palves@redhat.com>
11325
11326 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11327 * linux-low.c (struct simple_pid_list): New.
11328 (stopped_pids): New a struct simple_pid_list pointer.
11329 (add_to_pid_list, pull_pid_from_list): New.
11330 (handle_extended_wait): Don't assume the first signal new children
11331 report is SIGSTOP. Adjust call to pull_pid_from_list.
11332 (linux_wait_for_lwp): Adjust.
11333
8d00225b
YQ
113342012-03-02 Yao Qi <yao@codesourcery.com>
11335
11336 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11337 debug log.
11338
19560ba5
YQ
113392012-03-02 Yao Qi <yao@codesourcery.com>
11340
11341 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11342 `stop_pc' and `tpoint'. Update caller.
11343
1faeff08
MR
113442012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11345
11346 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11347 * linux-low.c (use_linux_regsets): New macro.
11348 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11349 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11350 (linux_register_in_regsets): New function.
11351 (usr_fetch_inferior_registers): Skip registers covered by
11352 regsets.
11353 (usr_store_inferior_registers): Likewise.
11354 (usr_fetch_inferior_registers): New macro.
11355 (usr_store_inferior_registers): Likewise.
11356 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11357 (linux_store_registers): Likewise.
11358 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11359 prototype.
11360 (init_registers_mips64_dsp_linux): Likewise.
11361 (init_registers_mips_linux): New macro.
11362 (init_registers_mips_dsp_linux): Likewise.
11363 (mips_dsp_num_regs): Likewise.
11364 (DSP_BASE, DSP_CONTROL): New fallback macros.
11365 (mips_base_regs): New macro.
11366 (mips_regmap): Use it. Fix the size.
11367 (mips_dsp_regmap): New variable.
11368 (mips_dsp_regset_bitmap): Likewise.
11369 (mips_arch_setup): New function.
11370 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11371 than mips_regmap.
11372 (mips_cannot_store_register): Likewise.
11373 (the_low_target): Update .arch_setup, .num_regs and .regmap
11374 initializers. Add .regset_bitmap initializer.
11375 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11376 initializer.
11377 * linux-bfin-low.c (the_low_target): Likewise.
11378 * linux-cris-low.c (the_low_target): Likewise.
11379 * linux-crisv32-low.c (the_low_target): Likewise.
11380 * linux-ia64-low.c (the_low_target): Likewise.
11381 * linux-m32r-low.c (the_low_target): Likewise.
11382 * linux-m68k-low.c (the_low_target): Likewise.
11383 * linux-ppc-low.c (the_low_target): Likewise.
11384 * linux-s390-low.c (the_low_target): Likewise.
11385 * linux-sh-low.c (the_low_target): Likewise.
11386 * linux-sparc-low.c (the_low_target): Likewise.
11387 * linux-tic6x-low.c (the_low_target): Likewise.
11388 * linux-x86-low.c (the_low_target): Likewise.
11389 * linux-xtensa-low.c (the_low_target): Likewise.
11390 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11391 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11392 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11393 srv_xmlfiles.
11394 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11395 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11396
c03e6ccc
YQ
113972012-02-29 Yao Qi <yao@codesourcery.com>
11398 Pedro Alves <palves@redhat.com>
11399
11400 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11401 `step_over_finished' is true.
11402
644cebc9
PA
114032012-02-27 Pedro Alves <palves@redhat.com>
11404
11405 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11406 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11407
c14d7ab2
PA
114082012-02-27 Pedro Alves <palves@redhat.com>
11409
11410 PR server/9684
11411 * linux-low.c (pid_is_stopped): New.
11412 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11413
412c89dd
LM
114142012-02-25 Luis Machado <lgustavo@codesourcery.com>
11415
11416 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11417 of conditions.
11418
b745defe
MR
114192012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11420
11421 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11422
9f3a5c85
LM
114232012-02-24 Luis Machado <lgustavo@codesourcery>
11424
11425 * server.c (handle_query): Advertise support for target-side
11426 breakpoint condition evaluation.
11427 (process_point_options): New function.
11428 (process_serial_event): When inserting a breakpoint, check for
11429 a target-side condition that should be evaluated.
11430
11431 * mem-break.c: Include regcache.h and ax.h.
11432 (point_cond_list_t): New data structure.
11433 (breakpoint) <cond_list>: New field.
11434 (find_gdb_breakpoint_at): Make non-static.
11435 (delete_gdb_breakpoint_at): Clear any target-side
11436 conditions.
11437 (clear_gdb_breakpoint_conditions): New function.
11438 (add_condition_to_breakpoint): Likewise.
11439 (add_breakpoint_condition): Likewise.
11440 (gdb_condition_true_at_breakpoint): Likewise.
11441 (gdb_breakpoint_here): Return result directly instead
11442 of going through a local variable.
11443
11444 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11445 (clear_gdb_breakpoint_conditions): Likewise.
11446 (add_breakpoint_condition): Likewise.
11447 (gdb_condition_true_at_breakpoint): Likewise.
11448
11449 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11450 (need_step_over_p): Take target-side breakpoint condition into
11451 consideration.
11452
5e1dc496
LM
114532012-02-24 Luis Machado <lgustavo@codesourcery>
11454
11455 * server.h: Include tracepoint.h.
11456 (agent_mem_read, agent_get_trace_state_variable_value,
11457 agent_set_trace_state_variable_value,
11458 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11459 get_set_tsv_func_addr): New prototypes.
11460
11461 * ax.h: New include file.
11462 * ax.c: New source file.
11463
11464 * tracepoint.c: Include ax.h.
11465 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11466 agent_expr, eval_result_type): Move to ax.h.
11467 (parse_agent_expr): Rename to ...
11468 (gdb_parse_agent_expr): ... this, make it non-static and move
11469 to ax.h.
11470 (unparse_agent_expr) Rename to ...
11471 (gdb_unparse_agent_expr): ... this, make it non-static and move
11472 to ax.h.
11473 (eval_agent_expr): Rename to ...
11474 (eval_tracepoint_agent_expr): ... this.
11475 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11476 forward declarations.
11477 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11478 (agent_get_trace_state_variable_value): New function.
11479 (agent_set_trace_state_variable_value): New function.
11480 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11481 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11482 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11483 (condition_true_at_tracepoint): Likewise.
11484 (parse_agent_expr): Rename to ...
11485 (gdb_parse_agent_expr): ... this and move to ax.c.
11486 (unparse_agent_expr): Rename to ...
11487 (gdb_unparse_agent_expr): ... this and move to ax.c.
11488 (gdb_agent_op_name): Move to ax.c.
11489 (eval_agent_expr): Rename to ...
11490 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11491 and move to ax.c.
11492 (eval_tracepoint_agent_expr): New function.
11493 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11494 non-static.
5e1dc496
LM
11495 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11496 ax.c.
11497 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11498 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11499 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11500 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11501 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11502 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11503 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11504 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11505 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11506 (compile_bytecodes): Remove forward declaration.
11507 (is_goto_target): Move to ax.c.
11508 (compile_bytecodes): Move to ax.c and call
11509 agent_get_trace_state_variable_value (...) and
11510 agent_set_trace_state_variable_value (...).
11511
11512 * Makefile.in: Update ax.c and IPA dependencies.
11513
277e4e52
PA
115142012-02-24 Pedro Alves <palves@redhat.com>
11515
11516 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11517 (cmd_bigqtbuffer_circular): ... this. Only handle
11518 'QTBuffer:circular:'.
11519 (handle_tracepoint_general_set): Adjust.
11520
bf4c19f7
YQ
115212012-02-16 Yao Qi <yao@codesourcery.com>
11522
11523 * inferiors.c: Move code to ...
11524 * dll.c: .... here. New.
11525 * server.h: Declare clear_dlls.
11526 * Makefile.in (SFILES): Add dll.c.
11527 (OBS): Add dll.o
11528 (dll.o): New rule.
11529
d73f2619
YQ
115302012-02-11 Yao Qi <yao@codesourcery.com>
11531
11532 * server.c: (handle_monitor_command): Add a new parameter
11533 `own_buf'.
11534 (handle_query): Update caller.
11535
f8255c2a
JB
115362012-02-09 Joel Brobecker <brobecker@adacore.com>
11537
11538 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11539 * configure, config.in: Regenerate.
11540 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11541 is not defined.
11542
da84f473
PA
115432012-02-02 Pedro Alves <palves@redhat.com>
11544
11545 Try SIGKILL first, then PTRACE_KILL.
11546 * linux-low.c (linux_kill_one_lwp): New.
11547 (linux_kill_one_lwp): Rename to ...
11548 (kill_one_lwp_callback): ... this. Use the new
11549 linux_kill_one_lwp.
11550
e886a173
PA
115512012-02-02 Pedro Alves <palves@redhat.com>
11552
11553 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11554 inferior.
11555
be07f1a2
PA
115562012-01-27 Pedro Alves <palves@redhat.com>
11557
11558 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11559 (elf_64_file_p): Make static.
11560 (linux_pid_exe_is_elf_64_file): New.
11561 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11562 Delete declarations.
11563 (linux_pid_exe_is_elf_64_file): Declare.
11564 * linux-x86-low.c (x86_arch_setup): Use
11565 linux_pid_exe_is_elf_64_file.
11566
d8301ad1
JK
115672012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11568
11569 * linux-low.c (linux_wait_for_event_1): Rename to ...
11570 (linux_wait_for_event): ... here and merge it with former
11571 linux_wait_for_event - new variable wait_ptid, use it.
11572 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11573
01b17894
PA
115742012-01-23 Pedro Alves <palves@redhat.com>
11575
11576 * server.c (main): Avoid yet another case of infinite loop while
11577 detaching/killing after a longjmp.
11578
e825046f
JK
115792012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11580
11581 Code cleanup.
11582 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11583
b9e7b9c3
UW
115842012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11585
11586 * hostio.c (handle_readlink): New function.
11587 (handle_vFile): Call it to handle "vFile:readlink" packets.
11588
901f9912
UW
115892012-01-20 Pedro Alves <palves@redhat.com>
11590 Ulrich Weigand <ulrich.weigand@linaro.org>
11591
11592 * server.c (handle_v_requests): Only support vAttach and vRun to
11593 start multiple processes when in extended protocol mode.
11594
fc1ab1a0
PA
115952012-01-17 Pedro Alves <palves@redhat.com>
11596
11597 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11598 memalign plus mprotect to allocate the scratch buffer.
11599
7d5d4e98
PA
116002012-01-13 Pedro Alves <palves@redhat.com>
11601
11602 * server.c (attach_inferior): Clear `cont_thread'.
11603
f128d5e9
PA
116042012-01-13 Pedro Alves <palves@redhat.com>
11605
11606 * server.c (main): Avoid infinite loop while detaching/killing
11607 after a longjmp.
11608
06db92f0
DE
116092012-01-09 Doug Evans <dje@google.com>
11610
11611 * server.c (start_inferior): Set last_ptid in --wrapper case.
11612
32d92999
YQ
116132012-01-06 Yao Qi <yao@codesourcery.com>
11614
11615 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11616 defined.
11617 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11618
5e0a92a9
YQ
116192012-01-04 Yao Qi <yao@codesourcery.com>
11620
11621 * tracepoint.c (cmd_qtdp): Print debug message
11622 for static tracepoint.
11623
ae639e8c
YQ
116242012-01-04 Yao Qi <yao@codesourcery.com>
11625
11626 * tracepoint.c (trace_vdebug): Differentiate debug message
11627 between gdbserver and IPA.
11628
f72429c5
YQ
116292012-01-03 Yao Qi <yao@codesourcery.com>
11630
11631 * tracepoint.c (tracepoint_was_hit): Don't collect for
11632 static tracepoint.
11633
12c3e59c
JB
116342012-01-02 Joel Brobecker <brobecker@adacore.com>
11635
11636 * terminal.h: Reformat copyright header.
11637
67827812
JB
116382012-01-02 Joel Brobecker <brobecker@adacore.com>
11639
11640 * server.c (gdbserver_version): Update copyright year.
11641 * gdbreplay.c (gdbreplay_version): Likewise.
11642
3e52c33d
JK
116432011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11644
11645 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11646
11647 Revert:
11648 2011-12-18 Hui Zhu <teawater@gmail.com>
11649 * linux-low.c (linux_create_inferior): Save return value to ret.
11650
66f1260e
HZ
116512011-12-18 Hui Zhu <teawater@gmail.com>
11652
11653 * linux-low.c (linux_create_inferior): Save return value to ret.
11654
e77616d7
DE
116552011-12-16 Doug Evans <dje@google.com>
11656
e7b06c57
DE
11657 * linux-low.c (linux_create_inferior): If stdio connection,
11658 redirect stdin from /dev/null, stdout to stderr.
11659 * remote-utils.c (remote_is_stdio): New static global.
11660 (remote_connection_is_stdio): New function.
11661 (remote_prepare): Handle stdio connection.
11662 (remote_open): Ditto.
11663 (remote_close): Don't close stdin for stdio connections.
11664 (read_prim,write_prim): New functions. Replace all calls to
11665 read/write to these.
11666 * server.c (main): Watch for "-" argument. Move call to
11667 remote_prepare before start_inferior.
11668 * server.h (STDIO_CONNECTION_NAME): New macro.
11669 (remote_connection_is_stdio): Declare.
11670
e77616d7
DE
11671 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11672 in debugging output.
11673
82067193
YQ
116742011-12-15 Yao Qi <yao@codesourcery.com>
11675
11676 * tracepoint.c: Include sys/syscall.h.
11677 (gdb_ust_thread): Remove preprocessor conditional.
11678
82bfbe7e
PA
116792011-12-14 Pedro Alves <pedro@codesourcery.com>
11680
11681 * linux-low.c (linux_detach_one_lwp): Call
11682 the_low_target.prepare_to_resume before detaching.
11683
712c6575
YQ
116842011-12-14 Yao Qi <yao@codesourcery.com>
11685
11686 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11687 of write.
11688
d54d1edf
YQ
116892011-12-14 Yao Qi <yao@codesourcery.com>
11690
11691 * i386-low.c (i386_low_stopped_data_address): Initialize local
11692 variable `control'.
11693
6210a125
PA
116942011-12-13 Pedro Alves <pedro@codesourcery.com>
11695
11696 PR remote/13492
11697
11698 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11699 DR_CONTROL unless necessary. Extend comments.
11700 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11701 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11702
2ece8244
YQ
117032011-12-13 Yao Qi <yao@codesourcery.com>
11704
11705 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11706 macros.
11707 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11708
784867a5
JK
117092011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11710
11711 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11712 Print new debug message for such case.
11713
6bf36717
JK
117142011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11715
11716 Fix overlapping memcpy.
11717 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11718 the read_inferior_memory transfer.
11719 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11720 write_inferior_memory transfer.
11721 (set_fast_tracepoint_jump): New variable buf. Use it for the
11722 read_inferior_memory and write_inferior_memory transfers.
11723 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11724 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11725 Use it for the write_inferior_memory transfer.
11726 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11727 buffers.
11728
50275556
MR
117292011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11730
11731 * linux-low.c (fetch_register, store_register): Make code
11732 consistent, fix formatting.
11733
7325beb4
MR
117342011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11735
11736 * linux-low.c (usr_store_inferior_registers): Factor out code
11737 to handle individual registers into...
11738 (store_register): ... this new function.
11739
c642a434
UW
117402011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11741
11742 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11743 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11744 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11745 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11746 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11747 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11748 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11749 (srv_xmlfiles): Add new XML files.
11750
11751 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11752 and <sys/uio.h>.
11753 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11754 (init_registers_s390_linux32v1): Add prototype.
11755 (init_registers_s390_linux32v2): Likewise.
11756 (init_registers_s390_linux64v1): Likewise.
11757 (init_registers_s390_linux64v2): Likewise.
11758 (init_registers_s390x_linux64v1): Likewise.
11759 (init_registers_s390x_linux64v2): Likewise.
11760 (s390_num_regs): Increment to 52.
11761 (s390_regmap): Add orig_r2 register.
11762 (s390_num_regs_3264): Increment to 68.
11763 (s390_regmap_3264): Add orig_r2 register.
11764 (s390_collect_ptrace_register): Handle orig_r2 register.
11765 (s390_supply_ptrace_register): Likewise.
11766 (s390_fill_last_break): New function.
11767 (s390_store_last_break): Likewise.
11768 (s390_fill_system_call): New function.
11769 (s390_store_system_call): Likewise.
11770 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11771 register sets.
11772 (s390_check_regset): New function.
11773 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11774 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11775 Update target_regsets for available register sets.
11776
2268b414
JK
117772011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11778 Jan Kratochvil <jan.kratochvil@redhat.com>
11779
11780 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11781 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11782 New.
11783 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11784 * linux-low.h (struct process_info_private): New member r_debug.
11785 * server.c (handle_qxfer_libraries): Call
11786 the_target->qxfer_libraries_svr4.
11787 (handle_qxfer_libraries_svr4): New function.
11788 (qxfer_packets): New entry "libraries-svr4".
11789 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11790 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11791 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11792 PACKET_qXfer_libraries_svr4.
11793
d6db1fab
UW
117942011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11795
11796 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11797 PSW address/mask between 8-byte and 16-byte formats.
11798 (s390_supply_ptrace_register): Likewise.
11799 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11800 basic addressing mode bit.
11801
242f5f1c
SS
118022011-11-24 Stan Shebs <stan@codesourcery.com>
11803
11804 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11805
f196051f
SS
118062011-11-17 Stan Shebs <stan@codesourcery.com>
11807
11808 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11809 (tracing_start_time): New global.
11810 (tracing_stop_time): New global.
11811 (tracing_user_name): New global.
11812 (tracing_notes): New global.
11813 (tracing_stop_note): New global.
11814 (cmd_qtstart): Set traceframe_usage, start_time.
11815 (stop_tracing): Set stop_time.
11816 (cmd_qtstatus): Report additional status.
11817 (cmd_qtp): New function.
11818 (handle_tracepoint_query): Call it.
11819 (cmd_qtnotes): New function.
11820 (handle_tracepoint_general_set): Call it.
11821 (get_timestamp): Rename from tsv_get_timestamp.
11822
405f8e94
SS
118232011-11-14 Stan Shebs <stan@codesourcery.com>
11824 Kwok Cheung Yeung <kcy@codesourcery.com>
11825
11826 * linux-x86-low.c (small_jump_insn): New.
11827 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11828 trampoline and error message, build a trampoline and issue a small
11829 jump instruction to it.
11830 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11831 trampoline and error message.
11832 (x86_get_min_fast_tracepoint_insn_len): New.
11833 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11834 * linux-low.h (struct linux_target_ops): Add arguments to
11835 install_fast_tracepoint_jump_pad operation, add new operation.
11836 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11837 arguments.
11838 (linux_get_min_fast_tracepoint_insn_len): New function.
11839 (linux_target_op): Add new operation.
11840 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11841 (gdb_trampoline_buffer_end): Ditto.
11842 (gdb_trampoline_buffer_error): Ditto.
11843 (struct ipa_sym_addresses): Add fields for new IPA variables.
11844 (symbol_list): Add entries for new IPA variables.
11845 (struct tracepoint): Add fields to hold the address range of the
11846 trampoline used by the tracepoint.
11847 (trampoline_buffer_head): New static variable.
11848 (trampoline_buffer_tail): Ditto.
11849 (claim_trampoline_space): New function.
11850 (have_fast_tracepoint_trampoline_buffer): New function.
11851 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11852 structure.
11853 (install_fast_tracepoint): Ditto, also add error buffer argument.
11854 (cmd_qtminftpilen): New function.
11855 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11856 (fast_tracepoint_from_trampoline_address): New function.
11857 (fast_tracepoint_collecting): Handle trampoline as part of jump
11858 pad space.
11859 (set_trampoline_buffer_space): New function.
11860 (initialize_tracepoint): Initialize new IPA variables.
11861 * target.h (struct target_ops): Add arguments to
11862 install_fast_tracepoint_jump_pad operation, add new
11863 get_min_fast_tracepoint_insn_len operation.
11864 (target_get_min_fast_tracepoint_insn_len): New.
11865 (install_fast_tracepoint_jump_pad): Add arguments.
11866 * server.h (IPA_BUFSIZ): Define.
11867 * linux-i386-ipa.c: Include extra header files.
11868 (initialize_fast_tracepoint_trampoline_buffer): New function.
11869 (initialize_low_tracepoint): Call it.
11870 * server.h (set_trampoline_buffer_space): Declare.
11871 (claim_trampoline_space): Ditto.
11872 (have_fast_tracepoint_trampoline_buffer): Ditto.
11873
1e4d1764
YQ
118742011-11-14 Yao Qi <yao@codesourcery.com>
11875
11876 * server.c (handle_query): Handle InstallInTrace for qSupported.
11877 * tracepoint.c (add_tracepoint): Sort list.
11878 (install_tracepoint, download_tracepoint): New.
11879 (cmd_qtdp): Call them to install and download tracepoints.
11880 (sort_tracepoints): Removed.
11881 (cmd_qtstart): Update.
11882
5c73ff4e
YQ
118832011-11-14 Yao Qi <yao@codesourcery.com>
11884
11885 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11886 * mem-break.h: Declare.
11887 * tracepoint.c (cmd_qtstart): Move some code to ...
11888 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11889 New.
11890 (download_tracepoints): Move some code to ...
11891 (download_tracepoint_1): ... here. New.
11892
86a30030
YQ
118932011-11-08 Yao Qi <yao@codesourcery.com>
11894
11895 * remote-utils.c (relocate_instruction): A comment fix.
11896
8d26e50c
JB
118972011-11-07 Joel Brobecker <brobecker@adacore.com>
11898
11899 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11900 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11901 dr_status_mirror and dr_control_mirror from debug_reg_state.
11902 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11903 (i386_initial_stuff): Remove use of deleted globals.
11904 (i386_get_thread_context, i386_set_thread_context,
11905 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11906 from debug_reg_state.
11907
a59306a3
YQ
119082011-11-05 Yao Qi <yao@codesourcery.com>
11909
11910 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11911 address as TPOINT's.
11912
3065dfb6
SS
119132011-11-02 Stan Shebs <stan@codesourcery.com>
11914
11915 * tracepoint.c (agent_mem_read_string): New function.
11916 (eval_agent_expr): Call it for tracenz.
11917 * server.c (handle_query): Report support for tracenz.
11918
fd0d8c7c
YQ
119192011-11-02 Yao Qi <yao@codesourcery.com>
11920
11921 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11922
609086b1
YQ
119232011-11-02 Yao Qi <yao@codesourcery.com>
11924
11925 * target.h: Fix a typo in comment.
11926
b9fd1791
PA
119272011-10-31 Pedro Alves <pedro@codesourcery.com>
11928
11929 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11930 clobber the breakpoints' shadows with fast tracepoint jumps.
11931 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11932 * target.c (write_inferior_memory): Also pass MYADDR down to
11933 check_mem_write.
11934
03583c20
UW
119352011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11936
11937 * configure.ac: Check support for personality routine.
11938 * configure: Regenerate.
11939 * config.in: Likewise.
11940 * linux-low.c: Include <sys/personality.h>.
11941 Define ADDR_NO_RANDOMIZE if necessary.
11942 (linux_create_inferior): Disable address space randomization when
11943 forking inferior, if requested.
11944 (linux_supports_disable_randomization): New function.
11945 (linux_target_ops): Install it.
11946 * server.h (disable_randomization): Declare.
11947 * server.c (disable_randomization): New global variable.
11948 (handle_general_set): Handle QDisableRandomization.
11949 (handle_query): Likewise for qSupported.
11950 (main): Support --disable-randomization and --no-disable-randomization
11951 command line arguments.
11952 * target.h (struct target_ops): Add supports_disable_randomization.
11953 (target_supports_disable_randomization): New macro.
11954
723b724b
MF
119552011-09-29 Mike Frysinger <vapier@gentoo.org>
11956
11957 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11958 ifdef check.
11959 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11960 [!PT_GETDSBT] (target_loadmap): New definition.
11961 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11962 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11963 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11964 and PT_GETDSBT to LINUX_LOADMAP.
11965 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11966 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11967
55329a5c 119682011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11969
11970 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11971 (arm_linux_hwbp_cap): New static variable.
11972 (arm_linux_get_hwbp_cap): Replace by ...
11973 (arm_linux_init_hwbp_cap): ... this new function.
11974 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11975 (arm_linux_get_hw_watchpoint_count): Likewise.
11976 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11977 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11978 (arm_prepare_to_resume): Use perror_with_name instead of error.
11979
55329a5c 119802011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11981
11982 * linux-arm-low.c: Include <signal.h>.
11983 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11984 (struct arm_linux_hwbp_cap): New data type.
11985 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11986 (struct arm_linux_hw_breakpoint): New data type.
11987 (MAX_BPTS, MAX_WPTS): Define.
11988 (struct arch_process_info, struct arch_lwp_info): New data types.
11989 (arm_linux_get_hwbp_cap): New function.
11990 (arm_linux_get_hw_breakpoint_count): Likewise.
11991 (arm_linux_get_hw_watchpoint_count): Likewise.
11992 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11993 (arm_hwbp_control_initialize): Likewise.
11994 (arm_hwbp_control_is_enabled): Likewise.
11995 (arm_hwbp_control_is_initialized): Likewise.
11996 (arm_hwbp_control_disable): Likewise.
11997 (arm_linux_hw_breakpoint_equal): Likewise.
11998 (arm_linux_hw_point_initialize): Likewise.
11999 (struct update_registers_data): New data structure.
12000 (update_registers_callback: New function.
12001 (arm_insert_point): Likewise.
12002 (arm_remove_point): Likewise.
12003 (arm_stopped_by_watchpoint): Likewise.
12004 (arm_stopped_data_address): Likewise.
12005 (arm_new_process): Likewise.
12006 (arm_new_thread): Likewise.
12007 (arm_prepare_to_resume): Likewise.
12008 (the_low_target): Register arm_insert_point, arm_remove_point,
12009 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12010 arm_new_thread, and arm_prepare_to_resume.
12011
6b9801d4
SS
120122011-09-15 Stan Shebs <stan@codesourcery.com>
12013
12014 * server.h (struct emit_ops): Add compare-goto fields.
12015 * tracepoint.c (gdb_agent_op_sizes): New table.
12016 (emit_eq_goto): New function.
12017 (emit_ne_goto): New function.
12018 (emit_lt_goto): New function.
12019 (emit_le_goto): New function.
12020 (emit_gt_goto): New function.
12021 (emit_ge_goto): New function.
12022 (is_goto_target): New function.
12023 (compile_bytecodes): Recognize special cases of compare-goto
12024 combinations and call specialized emitters for them.
12025 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12026 (amd64_emit_ne_goto): New function.
12027 (amd64_emit_lt_goto): New function.
12028 (amd64_emit_le_goto): New function.
12029 (amd64_emit_gt_goto): New function.
12030 (amd64_emit_ge_goto): New function.
12031 (amd64_emit_ops): Add the new functions.
12032 (i386_emit_eq_goto): New function.
12033 (i386_emit_ne_goto): New function.
12034 (i386_emit_lt_goto): New function.
12035 (i386_emit_le_goto): New function.
12036 (i386_emit_gt_goto): New function.
12037 (i386_emit_ge_goto): New function.
12038 (i386_emit_ops): Add the new functions.
12039
bf15cbda
SS
120402011-09-08 Stan Shebs <stan@codesourcery.com>
12041
12042 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12043 (i386_emit_epilogue): Restore %ebx.
12044
943ca1dd
JZ
120452011-08-31 Jie Zhang <jzhang918@gmail.com>
12046
12047 * server.c (step_thread): Remove definition.
12048 (process_serial_event): Don't handle Hs.
12049 * server.h (step_thread): Remove declaration.
12050 * target.c (set_desired_inferior): Remove use of step_thread.
12051
e3deef73
LM
120522011-08-24 Luis Machado <lgustavo@codesourcery.com>
12053
12054 * linux-low.c: Include linux-procfs.h.
12055 (linux_attach_lwp_1): Update comments.
12056 (linux_attach): Scan for existing threads when attaching to a
12057 process that is the tgid.
12058 * Makefile.in: Update dependencies.
12059
13da1c97
LM
120602011-08-24 Luis Machado <lgustavo@codesourcery.com>
12061
12062 * configure.srv: Add linux-procfs.o dependencies.
12063
881127c9
YQ
120642011-08-14 Yao Qi <yao@codesourcery.com>
12065
12066 * target.h (struct target_ops): Fix indent.
12067 * win32-low.c (win32_target_ops): Fix comment.
12068
58dbd541
YQ
120692011-08-14 Andrew Jenner <andrew@codesourcery.com>
12070 Yao Qi <yao@codesourcery.com>
12071
12072 * Makefile.in (clean): Remove tic6x-*.c files.
12073 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12074 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12075 (tic6x-c64xp-linux.c): Likewise.
12076 * configure.srv: Add support for tic6x-*-uclinux.
12077 * linux-tic6x-low.c: New.
12078 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12079
78d85199
YQ
120802011-08-14 Andrew Stubbs <ams@codesourcery.com>
12081 Yao Qi <yao@codesourcery.com>
12082
12083 * target.h (struct target_ops): Add read_loadmap.
12084 * linux-low.c (struct target_loadseg): New type.
12085 (struct target_loadmap): New type.
12086 (linux_read_loadmap): New function.
12087 (linux_target_ops): Add linux_read_loadmap.
12088 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12089 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12090 to NULL.
78d85199 12091
a959a88d
EZ
120922011-08-05 Eli Zaretskii <eliz@gnu.org>
12093
12094 * win32-low.c: Include <stdint.h>.
12095
1ced966e
PA
120962011-07-22 Pedro Alves <pedro@codesourcery.com>
12097
12098 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12099 to the inferior here.
12100 (i386_remove_aligned_watchpoint): Ditto.
12101 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12102 fit part of the watchpoint in the debug registers.
12103 (i386_update_inferior_debug_regs): New.
12104 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12105 registers, and only update the inferior on success.
12106 (i386_low_remove_watchpoint): Ditto.
12107
d26e3629
KY
121082011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12109
12110 * linux-low.c (compare_ints, unique, list_threads, show_process,
12111 linux_core_of_thread): Delete.
12112 (linux_target_ops): Change linux_core_of_thread to
12113 linux_common_core_of_thread.
12114 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12115 * utils.c (malloc_failure): Change type of argument.
12116 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12117 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12118 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12119 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12120 (IPA_OBJS): Add common-utils-ipa.o.
12121 (ptid_h, linux_osdata_h): New macros.
12122 (server_h): Add common/common-utils.h, common/xml-utils.h,
12123 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12124 common/ptid.h.
12125 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12126 ptid.o, buffer.o): New rules.
12127 (linux-low.o): Add common/linux-osdata.h as a dependency.
12128 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12129 * configure.ac: Add AC_HEADER_DIRENT check.
12130 * config.in: Regenerate.
12131 * configure: Regenerate.
12132 * remote-utils.c (xml_escape_text): Delete.
12133 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12134 buffer_xml_printf): Move to common/buffer.c.
12135 * server.c (main): Remove call to initialize_inferiors.
12136 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12137 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12138 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12139 internal_error, gdb_assert, gdb_assert_fail): Delete.
12140 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12141 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12142 common/buffer.h.
12143 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12144 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12145 initialize_inferiors): Delete.
12146
2275a1a7
PA
121472011-07-20 Pedro Alves <pedro@codesourcery.com>
12148
12149 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12150 symbol error.
12151
0a5b1e09
PA
121522011-05-31 Pedro Alves <pedro@codesourcery.com>
12153
12154 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12155 assertion.
12156 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12157
6938fd34
YQ
121582011-05-26 Yao Qi <yao@codesourcery.com>
12159
12160 * Makefile.in (thread-db.o): Track dependence to
12161 common/gdb_thread_db.h.
12162 * thread-db.c: include gdb_thread_db.h from right place.
12163
b481f9e0
TT
121642011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12165
12166 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12167 __FILE__ and __LINE__ to internal_error.
12168
98a5dd13
DE
121692011-05-13 Doug Evans <dje@google.com>
12170
12171 * thread-db.c (try_thread_db_load_from_sdir): New function.
12172 (try_thread_db_load_from_dir): New function.
12173 (thread_db_load_search): Handle $sdir, ignore $pdir.
12174 Remove trying of system directories if search of
12175 libthread-db-search-path fails, that is now done via $sdir.
12176
d248b706
KY
121772011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12178
12179 * server.c (handle_query): Add EnableDisableTracepoints to the list
12180 of supported features.
43aaf8b6 12181 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12182 tracepoints.
43aaf8b6
PA
12183 (cmd_qtenable_disable): New.
12184 (cmd_qtstart): Install tracepoints even if disabled.
12185 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12186 receiving a QTEnable or QTDisable packet.
12187 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12188 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12189 tracepoints.
12190 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12191
84e578fb
DE
121922011-05-10 Doug Evans <dje@google.com>
12193
12194 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12195
71f55dd8
DE
121962011-05-04 Doug Evans <dje@google.com>
12197
12198 * linux-low.c (linux_join): Skip process lookup.
12199 * spu-low.c (spu_join): Ditto.
12200 * server.c (join_inferiors_callback): Delete.
12201 (process_serial_event): For 'D' packet (detach) call join_inferior
12202 directly.
12203
4d393d60
JM
122042011-05-04 Joseph Myers <joseph@codesourcery.com>
12205
12206 * README: Don't mention xscale*-*-linux*.
12207 * configure.srv (xscale*-*-linux*): Don't handle target.
12208
b00ad6ff
NF
122092011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12210
12211 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12212 casting pointers.
12213 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12214 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12215 (i386_emit_void_call_2): Likewise.
12216
af96c192
YQ
122172011-04-26 Yao Qi <yao@codesourcery.com>
12218
43aaf8b6
PA
12219 * linux-low.c: Move common macros to linux-ptrace.h.
12220 Include linux-ptrace.h.
af96c192
YQ
12221 * Makefile.in (linux_ptrace_h): New.
12222 (linux-low.o): Depends on linux-ptrace.h.
12223
03f2bd59
JK
122242011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12225
12226 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12227 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12228 (remote_prepare): New function with most of the TCP code from ...
12229 (remote_open): ... here. Detect PORT here unconditionally. Move also
12230 setting transport_is_reliable.
12231 * server.c (run_once): New variable.
12232 (gdbserver_usage): Document it.
12233 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12234 the first run if RUN_ONCE.
12235 * server.h (run_once, remote_prepare): New declarations.
12236
7a9dd1b2
TT
122372011-04-19 Tom Tromey <tromey@redhat.com>
12238
12239 * win32-low.c (handle_load_dll): Remove duplicate "the".
12240
81239425
PM
122412011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12242
12243 Remove support for old Cygwin 1.5 versions.
12244 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12245 function to avoid warning.
12246 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12247 warning.
12248
9e0627f1
PM
122492011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12250
12251 * gdbserver/server.h (Macro _): Define it if not available.
12252
588eebee
MS
122532011-03-14 Michael Snyder <msnyder@vmware.com>
12254
348af9f7 12255 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12256
43f70d4c
JB
122572011-03-10 Joel Brobecker <brobecker@adacore.com>
12258
12259 * Makefile.in (maintainer-clean realclean distclean): Remove
12260 "make ... subdir_do" command.
12261
348af9f7
MS
122622011-03-10 Michael Snyder <msnyder@vmware.com>
12263
12264 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12265
12266 * server.c (handle_v_run): Free alloced buffer on early return.
12267
e637a4f5
YQ
122682011-03-09 Yao Qi <yao@codesourcery.com>
12269
12270 Revert:
12271 2011-03-04 Yao Qi <yao@codesourcery.com>
12272
12273 * Makefile.in: Remove GNU make feature --directory.
12274
12275 2011-03-05 Yao Qi <yao@codesourcery.com>
12276
12277 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12278 (subdir_do): New make target. Copied from gdb/Makefile.
12279 (maintainer-clean, realclean, distclean, clean): Call corresponding
12280 make targets in common/Makefile.
12281
12282 2011-02-11 Yao Qi <yao@codesourcery.com>
12283
12284 * configure.ac: Call AC_PROG_RANLIB.
12285 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12286 * configure: Regenerate.
12287
e6edda56
JK
122882011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12289
12290 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12291
e5141119
JB
122922011-03-06 Yao Qi <yao@codesourcery.com>
12293
12294 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12295
64794aa4
JB
122962011-03-05 Yao Qi <yao@codesourcery.com>
12297
12298 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12299 (subdir_do): New make target. Copied from gdb/Makefile.
12300 (maintainer-clean, realclean, distclean, clean): Call corresponding
12301 make targets in common/Makefile.
12302
7a762829
YQ
123032011-03-04 Yao Qi <yao@codesourcery.com>
12304
12305 * Makefile.in: Remove GNU make feature --directory.
12306
348af9f7
MS
123072011-03-04 Michael Snyder <msnyder@vmware.com>
12308
12309 * server.c (queue_stop_reply): Call xmalloc not malloc.
12310
123112011-03-02 Michael Snyder <msnyder@vmware.com>
12312
12313 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12314
9f72fee2
MS
123152011-02-28 Michael Snyder <msnyder@vmware.com>
12316
588eebee
MS
12317 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12318 (cmd_qtframe): Ditto.
12319 (cmd_qtbuffer): Ditto.
12320 (cmd_bigqtbuffer): Ditto.
12321
9f72fee2
MS
12322 * utils.c (decimal2str): Initialize 'width' to nine, then
12323 don't mess with it.
12324
8040bd49
UW
123252011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12326
12327 * hostio.c (require_data): Free *data, not data.
12328
7e52cbd0
JK
123292011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12330
12331 * hostio.c (require_data): Use free, not xfree.
12332
9130f83e
MS
123332011-02-27 Michael Snyder <msnyder@vmware.com>
12334
4b812f4e
MS
12335 * server.c (handle_query): Discard unused value.
12336
9130f83e
MS
12337 * hostio.c (require_data): Free malloc memory before returning
12338 error.
12339
69d37113
MS
123402011-02-26 Michael Snyder <msnyder@vmware.com>
12341
12342 * linux-low.c (list_threads): Call closedir for dirent.
12343
35f5825a
MS
123442011-02-27 Michael Snyder <msnyder@vmware.com>
12345
2a589cef
MS
12346 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12347 a case statement falls through.
12348
0adea5f7
MS
12349 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12350
35f5825a
MS
12351 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12352 in comparison.
12353
238f1c74
MS
123542011-02-26 Michael Snyder <msnyder@vmware.com>
12355
12356 * utils.c (decimal2str): Eliminate dead code and dead param.
12357 (pulongest): Drop dead param from call to decimal2str.
12358 (plongest): Ditto.
12359
633ff500
JB
123602011-02-24 Joel Brobecker <brobecker@adacore.com>
12361
12362 Revert the following patch (not approved yet):
12363 2011-02-21 Hui Zhu <teawater@gmail.com>
12364 * tracepoint.c (tp_printf): New function.
12365 (eval_agent_expr): Handle gdb_agent_op_printf.
12366
f9c6ff72
HZ
123672011-02-21 Hui Zhu <teawater@gmail.com>
12368
12369 * tracepoint.c (tp_printf): New function.
12370 (eval_agent_expr): Handle gdb_agent_op_printf.
12371
94d5e490
TT
123722011-02-18 Tom Tromey <tromey@redhat.com>
12373
12374 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12375 (tracepoint.o): Likewise.
12376 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12377 (gdb_agent_op_names): Likewise.
12378
c7f96d2b
TT
123792011-02-18 Tom Tromey <tromey@redhat.com>
12380
12381 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12382 gdb_agent_op_rot>: New constants.
12383 (gdb_agent_op_names): Add pick and roll.
12384 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12385 cases.
12386
0feedb2c
JK
123872011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12388
12389 * aclocal.m4: Regenerated with aclocal-1.11.1.
12390
b3b9301e
PA
123912011-02-14 Pedro Alves <pedro@codesourcery.com>
12392
12393 * server.c (handle_qxfer_traceframe_info): New.
12394 (qxfer_packets): Register "traceframe-info".
12395 (handle_query): Report support for qXfer:traceframe-info:read+.
12396 * tracepoint.c (match_blocktype): New.
12397 (traceframe_find_block_type): Rename to ...
12398 (traceframe_walk_blocks): ... this. Add callback filter argument,
12399 and use it.
12400 (traceframe_find_block_type): New, reimplemented on top of
12401 traceframe_walk_blocks.
12402 (build_traceframe_info_xml): New.
12403 (traceframe_read_info): New.
12404 * server.h (traceframe_read_info): Declare.
12405
4f3e6fb7
YQ
124062011-02-11 Yao Qi <yao@codesourcery.com>
12407
12408 * configure.ac: Call AC_PROG_RANLIB.
12409 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12410 * configure: Regenerate.
12411
764880b7
PA
124122011-02-07 Pedro Alves <pedro@codesourcery.com>
12413
12414 * server.c (gdb_read_memory): Change return semantics to allow
12415 partial transfers.
12416 (handle_search_memory_1): Adjust.
12417 (process_serial_event) <'m' packet>: Handle partial transfers.
12418 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12419
1c79eb8a
PA
124202011-01-28 Pedro Alves <pedro@codesourcery.com>
12421
12422 * regcache.c (init_register_cache): Initialize
12423 regcache->register_status.
12424 (free_register_cache): Release regcache->register_status.
12425 (regcache_cpy): Copy register_status.
12426 (registers_to_string): Print 'x's for unavailable registers.
12427 (supply_register): Mark the register's status valid or
12428 unavailable, depending on whether a buffer was passed in or not.
12429 (supply_register_zeroed): New.
12430 (supply_regblock): Mark the registers' status valid or
12431 unavailable, depending on whether a buffer was passed in or not.
12432 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12433 (struct regcache): New `register_status' field.
12434 (supply_register_zeroed): Declare.
12435 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12436 supply_register_zeroed, rather than passing a NULL buffer to
12437 supply_register.
12438 * tracepoint.c (fetch_traceframe_registers): Update comment.
12439
85724a0e
PA
124402011-01-28 Pedro Alves <pedro@codesourcery.com>
12441
12442 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12443 buffer explicit.
12444
d08aafef
PA
124452011-01-25 Pedro Alves <pedro@codesourcery.com>
12446
12447 * server.h (decode_xfer_write): Change prototype.
12448 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12449 and don't extract the annex here.
12450 * server.c (decode_xfer_read): Remove `annex' parameter,
12451 and don't extract the annex here.
12452 (decode_xfer): New.
12453 (struct qxfer): New.
12454 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12455 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12456 (handle_qxfer_statictrace): New functions, abstracted out from
12457 handle_query, and made to use the struct qxfer interface.
12458 (handle_threads_qxfer_proper): Rename to ...
12459 (handle_qxfer_threads_proper): ... this.
12460 (handle_threads_qxfer): Rename to ...
12461 (handle_qxfer_threads): ... this. Adjust.
12462 (qxfer_packets): New array.
12463 (handle_qxfer): New function.
12464 (handle_query): Use handle_qxfer.
12465
493e2a69
MS
124662011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12467
12468 * gdbreplay.c: Shorten lines of >= 80 columns.
12469 * linux-low.c: Ditto.
12470 * linux-ppc-low.c: Ditto.
12471 * linux-s390-low.c: Ditto.
12472 * linux-sparc-low.c: Ditto.
12473 * linux-x86-low.c: Ditto.
12474 * linux-xtensa-low.c: Ditto.
12475 * mem-break.c: Ditto.
12476 * nto-low.c: Ditto.
12477 * regcache.h: Ditto.
12478 * remote-utils.c: Ditto.
12479 * server.c: Ditto.
12480 * server.h: Ditto.
12481 * thread-db.c: Ditto.
12482 * tracepoint.c: Ditto.
12483 * utils.c: Ditto.
12484 * win32-low.h: Ditto.
12485
44944448
JB
124862011-01-05 Joel Brobecker <brobecker@adacore.com>
12487
12488 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12489 update.
12490
71ce852c
JB
124912011-01-01 Joel Brobecker <brobecker@adacore.com>
12492
12493 * server.c (gdbserver_version): Update copyright year in version
12494 output.
12495 * gdbreplay.c (gdbreplay_version): Ditto.
12496
eb826dc6
MF
124972010-12-29 Jie Zhang <jie.zhang@analog.com>
12498
12499 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12500 * linux-bfin-low.c: New file.
12501 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12502 PT_DATA_ADDR for BFIN targets.
12503 * Makefile.in (SFILES): Add linux-bfin-low.c.
12504 (clean): Remove reg-bfin.c.
12505 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12506 * README: Mention supported Blackfin targets.
12507
39ab222a
MF
125082010-12-23 Mike Frysinger <vapier@gentoo.org>
12509
12510 * .gitignore: New file.
12511
a1f2ce7d
MF
125122010-11-16 Mike Frysinger <vapier@gentoo.org>
12513
12514 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12515
f474844c
JZ
125162010-10-22 Jie Zhang <jie@codesourcery.com>
12517
12518 * Makefile.in: Add FLAGS_TO_PASS variable.
12519 (install): Remove dependency of install-only and recursively
12520 invoke make for install-only.
12521
f1048712
DE
125222010-10-04 Doug Evans <dje@google.com>
12523
12524 * Makefile.in (uninstall): Use $(DESTDIR).
12525
b53a1623
PA
125262010-09-24 Pedro Alves <pedro@codesourcery.com>
12527
e6ee044d
PA
12528 PR gdb/11842
12529
b53a1623
PA
12530 * linux-x86-low.c (compat_siginfo_from_siginfo)
12531 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12532 si_code is < 0. Check for si_code == SI_TIMER before checking for
12533 si_code < 0.
12534
fa1bd1e4
JB
125352010-09-13 Joel Brobecker <brobecker@adacore.com>
12536
12537 * lynx-i386-low.c: New file.
12538 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12539
47fac8f8
JB
125402010-09-13 Joel Brobecker <brobecker@adacore.com>
12541
12542 * lynx-low.c (ptrace_request_to_str): Remove handling for
12543 request values that have been removed in LynxOS 5.x.
12544
1adfc54d
JB
125452010-09-13 Joel Brobecker <brobecker@adacore.com>
12546
12547 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12548 <ptrace.h>
12549
c2a66c29
NS
125502010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12551
12552 * configure.ac: Add --enable-inprocess-agent option.
12553 * configure: Rebuilt.
12554
32fcada3
YQ
125552010-09-06 Yao Qi <yao@codesourcery.com>
12556
12557 * linux-low.c (linux_kill): Remove unused variable.
12558 (linux_stabilize_threads): Likewise.
12559 * server.c (start_inferior): Likewise.
12560 (queue_stop_reply_callback): Likewise.
12561 * tracepoint.c (do_action_at_tracepoint): Likewise.
12562
0cccb683
YQ
125632010-09-06 Yao Qi <yao@codesourcery.com>
12564
12565 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12566 on return.
12567
423ec54c
JK
125682010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12569
12570 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12571
12ac6819
PA
125722010-09-06 Pedro Alves <pedro@codesourcery.com>
12573
12574 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12575 "$(IPA_DEPFILES)".
12576
8ed54b31
JB
125772010-09-01 Joel Brobecker <brobecker@adacore.com>
12578
12579 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12580 gdbserver/lynx-ppc-low.c: New files.
12581 * Makefile.in (lynx_low_h): New variable.
12582 (lynx-low.o, lynx-ppc-low.o): New rules.
12583 * configure.ac: On LynxOS, link with -lnetinet.
12584 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12585 * configure: regenerate.
12586
bb0116a4
JB
125872010-09-01 Joel Brobecker <brobecker@adacore.com>
12588
12589 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12590 * configure.ac: Add check for vasprintf and vsnprintf.
12591 * configure, config.in: Regenerate.
12592 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12593
a778ab81 125942010-09-01 Joel Brobecker <brobecker@adacore.com>
12595
12596 * gdbreplay.c: Move include of alloca.h up, next to include of
12597 malloc.h.
12598 * server.h: Add include of malloc.h.
12599 * mem-break.c: Remove include of malloc.h.
12600 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12601
8b034a19 126022010-09-01 Joel Brobecker <brobecker@adacore.com>
12603
12604 * Makefile.in (memmem.o): Build with -Wno-error.
12605
126062010-09-01 Joel Brobecker <brobecker@adacore.com>
12607
12608 * utils.c (xsnprintf): Make non-static.
12609 * server.h: Add xsnprintf declaration.
12610 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12611 replace calls to snprintf by calls to xsnprintf throughout.
12612
126132010-09-01 Joel Brobecker <brobecker@adacore.com>
12614
12615 * configure.ac: Add configure check for alloca.
12616 * configure, config.in: Regenerate.
12617 * server.h: Include alloca.h if it exists.
12618 * gdbreplay.c: Include alloca.h if it exists.
12619
1a981360
PA
126202010-08-28 Pedro Alves <pedro@codesourcery.com>
12621
12622 * linux-low.c (__SIGRTMIN): Define if not already defined.
12623 (linux_create_inferior): Check for __ANDROID__ rather than
12624 __SIGRTMIN.
12625 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12626 are already deferred.
12627 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12628 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12629 stopped and already has a pending signal to report.
12630 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12631 a pending signal to report or is moving out of a jump pad.
12632 (linux_init_signals): Check for __ANDROID__ rather than
12633 __SIGRTMIN.
12634
b4d51a55
PA
126352010-08-28 Pedro Alves <pedro@codesourcery.com>
12636
12637 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12638 debug_threads check. Avoid a linear search when not doing debug
12639 output.
12640
ec48365d
PA
126412010-08-27 Pedro Alves <pedro@codesourcery.com>
12642
12643 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12644 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12645 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12646 (process_event): Change local fd's type to gdb_fildes_t.
12647 (create_file_handler): Adjust prototype.
12648 (delete_file_handler): Adjust prototype.
12649 (handle_file_event): Adjust prototype. Use pfildes.
12650 (create_file_event): Adjsut prototype.
12651 * remote-utils.c (remote_desc, listen_desc): Change type to
12652 gdb_fildes_t.
12653 * server.h: New gdb_fildes_t typedef.
12654 [USE_WIN32API]: Include winsock2.h.
12655 (delete_file_handler, add_file_handler): Adjust prototypes.
12656 (pfildes): Declare.
12657 * utils.c (pfildes): New.
12658
854d88f0
PA
126592010-08-27 Pedro Alves <pedro@codesourcery.com>
12660
12661 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12662 * configure: Regenerate.
12663
0146f85b
PA
126642010-08-27 Pedro Alves <pedro@codesourcery.com>
12665
12666 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12667 (linux_done_accessing_memory): ... this.
12668 (linux_target_ops): Adjust.
12669 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12670 * nto-low.c (nto_target_ops): Adjust comment.
12671 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12672 * spu-low.c (spu_target_ops): Adjust comment.
12673 * target.h (target_ops): Rename unprepare_to_access_memory field
12674 to done_accessing_memory.
12675 (unprepare_to_access_memory): Rename to ...
12676 (done_accessing_memory): ... this.
12677
90d74c30
PA
126782010-08-26 Pedro Alves <pedro@codesourcery.com>
12679
12680 * linux-low.c (linux_prepare_to_access_memory): New.
12681 (linux_unprepare_to_access_memory): New.
12682 (linux_target_ops): Install them.
12683 * server.c (read_memory): Rename to ...
12684 (gdb_read_memory): ... this. Use
12685 prepare_to_access_memory/prepare_to_access_memory.
12686 (write_memory): Rename to ...
12687 (gdb_write_memory): ... this. Use
12688 prepare_to_access_memory/prepare_to_access_memory.
12689 (handle_search_memory_1): Adjust.
12690 (process_serial_event): Adjust.
12691 * target.h (struct target_ops): New fields
12692 prepare_to_access_memory and unprepare_to_access_memory.
12693 (prepare_to_access_memory, unprepare_to_access_memory): New.
12694 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12695 prepare_to_access_memory/prepare_to_access_memory.
12696 * nto-low.c (nto_target_ops): Adjust.
12697 * spu-low.c (spu_target_ops): Adjust.
12698 * win32-low.c (win32_target_ops): Adjust.
12699
fd467969
PA
127002010-08-26 Pedro Alves <pedro@codesourcery.com>
12701
12702 * Makefile.in (WARN_CFLAGS): Get it from configure.
12703 (WERROR_CFLAGS): New.
12704 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12705 * configure.ac: Introduce --enable-werror, which adds -Werror to
12706 the compiler command line. Enabled by default. Disable with
12707 --disable-werror. Add -Wdeclaration-after-statement
12708 Wpointer-arith and -Wformat-nonliteral to warning flags.
12709 * configure: Regenerate.
12710
331e2f5f
PA
127112010-08-26 Pedro Alves <pedro@codesourcery.com>
12712
12713 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12714
e581f2b4
PA
127152010-08-26 Pedro Alves <pedro@codesourcery.com>
12716
12717 * gdbreplay.c (remote_error): New.
12718 (gdbchar): New.
12719 (expect): Use gdbchar. Check for error reading from GDB.
12720 Clarify sync error output.
12721 (play): Check for errors writing to GDB.
12722 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12723 * remote-utils.c (getpkt): Check for errors writing to the remote
12724 descriptor.
12725
3c11dd79
PA
127262010-08-25 Pedro Alves <pedro@codesourcery.com>
12727
12728 * linux-low.c (linux_wait_1): Move non-debugging code out of
12729 `debug_threads' control.
12730
d20a8ad9
PA
127312010-08-25 Pedro Alves <pedro@codesourcery.com>
12732
12733 * linux-low.c (linux_wait_1): Don't set last_status here.
12734 * server.c (push_event, queue_stop_reply_callback): Assert we're
12735 not pushing a TARGET_WAITKIND_IGNORE event.
12736 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12737 (myresume, handle_target_event): Set the thread's last_resume_kind
12738 and last_status from the target returned status.
12739
964e4306
PA
127402010-08-25 Pedro Alves <pedro@codesourcery.com>
12741
12742 PR threads/10729
12743
12744 * linux-x86-low.c (update_debug_registers_callback): New.
12745 (i386_dr_low_set_addr): Use it.
12746 (i386_dr_low_get_addr): New.
12747 (i386_dr_low_set_control): Use update_debug_registers_callback.
12748 (i386_dr_low_get_control): New.
12749 (i386_dr_low_get_status): Adjust.
12750 * linux-low.c (linux_stop_lwp): New.
12751 * linux-low.h (linux_stop_lwp): Declare.
12752
12753 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12754 argument instead of a i386_debug_reg_state.
12755 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12756 a i386_debug_reg_state.
12757 (i386_insert_aligned_watchpoint): Adjust.
12758 (i386_remove_aligned_watchpoint): Adjust.
12759 (i386_low_stopped_data_address): Read the debug registers from the
12760 inferior instead of from the mirrors.
12761 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12762 (i386_dr_low_get_addr): Declare.
12763 (i386_dr_low_get_control): Declare.
12764 (i386_dr_low_get_status): Change prototype.
12765
12766 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12767 (i386_dr_low_get_addr): New.
12768 (i386_dr_low_get_control): New.
12769 (i386_dr_low_get_status): Adjust prototype. Return
12770 dr_status_mirror.
12771 (i386_initial_stuff): Clear dr_status_mirror and
12772 dr_control_mirror.
12773 (i386_get_thread_context): Adjust.
12774 (i386_set_thread_context): Adjust.
12775 (i386_thread_added): Adjust.
12776
5f21a75b
PA
127772010-08-24 Pedro Alves <pedro@codesourcery.com>
12778
12779 * linux-low.h (linux_thread_area): Delete declaration.
12780
3e4c1235
TS
127812010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12782
12783 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12784 after its termination.
12785
1971b033
PA
127862010-08-09 Pedro Alves <pedro@codesourcery.com>
12787
12788 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12789 (gdb_wants_all_stopped): Delete.
12790 (linux_wait_1): Don't call them.
12791 * server.c (handle_v_cont): Tag all threads as want-stopped.
12792 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12793 stopped as "client-wants-stopped".
12794
310444ac
PA
127952010-07-31 Pedro Alves <pedro@codesourcery.com>
12796
12797 * Makefile.in (signals_h): New.
12798 (server_h): Depend on it.
12799 (server.o): Don't depend on $(signals_def).
12800 (signals.o): Depend on $(signals_def).
12801
a19cae16
JK
128022010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12803
12804 * Makefile.in (signals_def): New.
12805 (server_h): Append include/gdb/signals.h and signals_def.
12806 (server.o): Append signals_def.
12807
30d50328
JK
128082010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12809
12810 * server.c (handle_target_event): Use target_signal_to_host for
12811 resume_info.sig initialization.
12812 * target.h (struct thread_resume) <sig>: New comment.
12813
5c3216e2
OS
128142010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12815
c6f46ca0
OS
12816 * server.c (handle_query): strcpy() the returned string from paddress()
12817 instead of sprintf().
5c3216e2
OS
12818 * utils.c (paddress): Return phex_nz().
12819
6bd31874
JB
128202010-07-07 Joel Brobecker <brobecker@adacore.com>
12821
12822 * server.c (handle_v_cont): Call mourn_inferior if process
12823 just exited.
12824 (myresume): Likewise.
12825
0fb4aa4b
PA
128262010-07-01 Pedro Alves <pedro@codesourcery.com>
12827
12828 Static tracepoints, and integration with UST.
12829
12830 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12831 * mem-break.c (uninsert_all_breakpoints)
12832 (reinsert_all_breakpoints): New.
12833 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12834 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12835 (gdb_agent_ust_loaded, helper_thread_id)
12836 (gdb_agent_helper_thread_id): New macros.
12837 (struct ipa_sym_addresses): Add addr_ust_loaded,
12838 addr_helper_thread_id, addr_cmd_buf.
12839 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12840 (in_process_agent_loaded_ust): New.
12841 (write_e_ust_not_loaded): New.
12842 (maybe_write_ipa_ust_not_loaded): New.
12843 (struct collect_static_trace_data_action): New.
12844 (enum tracepoint_type) <static_tracepoint>: New.
12845 (struct tracepoint) <handle>: Mention static tracepoints.
12846 (struct static_tracepoint_ctx): New.
12847 (CMD_BUF_SIZE): New.
12848 (add_tracepoint_action): Handle static tracepoint actions.
12849 (unprobe_marker_at): New.
12850 (clear_installed_tracepoints): Handle static tracepoints.
12851 (cmd_qtdp): Handle static tracepoints.
12852 (probe_marker_at): New.
12853 (cmd_qtstart): Handle static tracepoints.
12854 (response_tracepoint): Handle static tracepoints.
12855 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12856 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12857 (get_context_regcache): Handle static tracepoints.
12858 (do_action_at_tracepoint): Handle static tracepoint actions.
12859 (traceframe_find_block_type): Handle static trace data blocks.
12860 (traceframe_read_sdata): New.
12861 (download_tracepoints): Download static tracepoint actions.
12862 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12863 (GDB_PROBE_NAME): New.
12864 (ust_ops): New.
12865 (GET_UST_SYM): New.
12866 (USTF): New.
12867 (dlsym_ust): New.
12868 (ust_marker_to_static_tracepoint): New.
12869 (gdb_probe): New.
12870 (collect_ust_data_at_tracepoint): New.
12871 (gdb_ust_probe): New.
12872 (UNIX_PATH_MAX, SOCK_DIR): New.
12873 (gdb_ust_connect_sync_socket): New.
12874 (resume_thread, stop_thread): New.
12875 (run_inferior_command): New.
12876 (init_named_socket): New.
12877 (gdb_ust_socket_init): New.
12878 (cstr_to_hexstr): New.
12879 (next_st): New.
12880 (first_marker, next_marker): New.
12881 (response_ust_marker): New.
12882 (cmd_qtfstm, cmd_qtsstm): New.
12883 (unprobe_marker_at, probe_marker_at): New.
12884 (cmd_qtstmat, gdb_ust_thread): New.
12885 (gdb_ust_init): New.
12886 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12887 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12888 (ST_REGENTRY): New.
12889 (x86_64_st_collect_regmap): New.
12890 (X86_64_NUM_ST_COLLECT_GREGS): New.
12891 (AMD64_RIP_REGNUM): New.
12892 (supply_static_tracepoint_registers): New.
12893 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12894 (ST_REGENTRY): New.
12895 (i386_st_collect_regmap): New.
12896 (i386_NUM_ST_COLLECT_GREGS): New.
12897 (supply_static_tracepoint_registers): New.
12898 * server.c (handle_query): Handle qXfer:statictrace:read.
12899 <qSupported>: Report support for StaticTracepoints, and
12900 qXfer:statictrace:read features.
12901 * server.h (traceframe_read_sdata)
12902 (supply_static_tracepoint_registers): Declare.
12903 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12904 (unpack_varlen_hex): Include in IPA build.
12905 * Makefile.in (ustlibs, ustinc): New.
12906 (IPA_OBJS): Add remote-utils-ipa.o.
12907 ($(IPA_LIB)): Link -ldl and -lpthread.
12908 (UST_CFLAGS): New.
12909 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12910 * config.in, configure: Regenerate.
12911
9e4344e5
PA
129122010-06-20 Ian Lance Taylor <iant@google.com>
12913 Pedro Alves <pedro@codesourcery.com>
12914
12915 * linux-x86-low.c (always_true): Delete.
12916 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12917 trying to fool the compiler with always_true.
12918
c6beb2cb
PA
129192010-06-20 Pedro Alves <pedro@codesourcery.com>
12920
12921 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12922 conditions in gdbserver.
12923
d2ed6730
UW
129242010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12925
12926 * spu-low.c (spu_read_memory): Wrap around local store limit.
12927 (spu_write_memory): Likewise.
12928
4e29fb54
PA
129292010-06-15 Pedro Alves <pedro@codesourcery.com>
12930
12931 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12932 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12933 LONGEST uses.
12934 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12935 uses.
12936 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12937 uses with LONGEST uses.
12938
6a271cae
PA
129392010-06-14 Stan Shebs <stan@codesourcery.com>
12940 Pedro Alves <pedro@codesourcery.com>
12941
12942 Bytecode compiler.
12943
12944 * linux-x86-low.c: Include limits.h.
12945 (add_insns): New.
12946 (always_true): New.
12947 (EMIT_ASM): New.
12948 (EMIT_ASM32): New.
12949 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12950 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12951 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12952 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12953 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12954 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12955 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12956 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12957 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12958 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12959 (amd64_emit_void_call_2): New.
12960 (amd64_emit_ops): New.
12961 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12962 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12963 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12964 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12965 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12966 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12967 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12968 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12969 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12970 (i386_emit_stack_adjust, i386_emit_int_call_1)
12971 (i386_emit_void_call_2): New.
12972 (i386_emit_ops): New.
12973 (x86_emit_ops): New.
12974 (the_low_target): Install x86_emit_ops.
12975 * server.h (struct emit_ops): New.
12976 (get_raw_reg_func_addr): Declare.
12977 (current_insn_ptr, emit_error): Declare.
12978 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12979 (set_trace_state_variable_value): New defines.
12980 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12981 addr_get_trace_state_variable_value and
12982 addr_set_trace_state_variable_value.
12983 (symbol_list): New fields for get_raw_reg,
12984 get_trace_state_variable_value and set_trace_state_variable_value.
12985 (condfn): New typedef.
12986 (struct tracepoint): New field `compiled_cond'.
12987 (do_action_at_tracepoint): Clear compiled_cond.
12988 (get_trace_state_variable_value, set_trace_state_variable_value):
12989 Export in the IPA.
12990 (condition_true_at_tracepoint): If there's a compiled condition,
12991 run that.
12992 (current_insn_ptr, emit_error): New globals.
12993 (struct bytecode_address): New.
12994 (get_raw_reg_func_addr): New.
12995 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12996 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12997 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12998 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12999 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13000 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13001 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13002 (compile_tracepoint_condition, compile_bytecodes): New.
13003 * target.h (emit_ops): Forward declare.
13004 (struct target_ops): New field emit_ops.
13005 (target_emit_ops): New.
13006 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13007 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13008 * linux-low.c (linux_emit_ops): New.
13009 (linux_target_ops): Install it.
13010 * linux-low.h (struct linux_target_ops): New field emit_ops.
13011
92b72907
UW
130122010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13013
13014 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13015 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13016
fa593d66
PA
130172010-06-01 Pedro Alves <pedro@codesourcery.com>
13018 Stan Shebs <stan@codesourcery.com>
13019
13020 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13021 (all): Depend on $(extra_libraries).
13022 (install-only): Install the IPA.
13023 (IPA_OBJS, IPA_LIB): New.
13024 (clean): Remove the IPA lib.
13025 (IPAGENT_CFLAGS): New.
13026 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13027 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13028 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13029 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13030 * configure.ac: Check for atomic builtins support in the compiler.
13031 (IPA_DEPFILES, extra_libraries): Define.
13032 * configure.srv (ipa_obj): Add description.
13033 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13034 (i[34567]86-*-linux*): Set ipa_obj.
13035 (x86_64-*-linux*): Set ipa_obj.
13036 * linux-low.c (stabilizing_threads): New.
13037 (supports_fast_tracepoints): New.
13038 (linux_detach): Stabilize threads before detaching.
13039 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13040 the lwp is either not stabilizing, or is moving out of a jump pad.
13041 (linux_fast_tracepoint_collecting): New.
13042 (maybe_move_out_of_jump_pad): New.
13043 (enqueue_one_deferred_signal): New.
13044 (dequeue_one_deferred_signal): New.
13045 (linux_wait_for_event_1): If moving out of a jump pad, defer
13046 pending signals to later.
13047 (linux_stabilize_threads): New.
13048 (linux_wait_1): Check if threads need moving out of jump pads, and
13049 do it if so.
13050 (stuck_in_jump_pad_callback): New.
13051 (move_out_of_jump_pad_callback): New.
13052 (lwp_running): New.
13053 (linux_resume_one_lwp): Handle moving out of jump pads.
13054 (linux_set_resume_request): Dequeue deferred signals.
13055 (need_step_over_p): Also step over fast tracepoint jumps.
13056 (start_step_over): Also uninsert fast tracepoint jumps.
13057 (finish_step_over): Also reinsert fast tracepoint jumps.
13058 (linux_install_fast_tracepoint_jump): New.
13059 (linux_target_ops): Install linux_stabilize_threads and
13060 linux_install_fast_tracepoint_jump_pad.
13061 * linux-low.h (linux_target_ops) <get_thread_area,
13062 install_fast_tracepoint_jump_pad>: New fields.
13063 (struct lwp_info) <collecting_fast_tracepoint,
13064 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13065 (linux_get_thread_area): Declare.
13066 * linux-x86-low.c (jump_insn): New.
13067 (x86_get_thread_area): New.
13068 (append_insns): New.
13069 (push_opcode): New.
13070 (amd64_install_fast_tracepoint_jump_pad): New.
13071 (i386_install_fast_tracepoint_jump_pad): New.
13072 (x86_install_fast_tracepoint_jump_pad): New.
13073 (the_low_target): Install x86_get_thread_area and
13074 x86_install_fast_tracepoint_jump_pad.
13075 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13076 (struct fast_tracepoint_jump): New.
13077 (fast_tracepoint_jump_insn): New.
13078 (fast_tracepoint_jump_shadow): New.
13079 (find_fast_tracepoint_jump_at): New.
13080 (fast_tracepoint_jump_here): New.
13081 (delete_fast_tracepoint_jump): New.
13082 (set_fast_tracepoint_jump): New.
13083 (uninsert_fast_tracepoint_jumps_at): New.
13084 (reinsert_fast_tracepoint_jumps_at): New.
13085 (set_breakpoint_at): Use write_inferior_memory.
13086 (uninsert_raw_breakpoint): Use write_inferior_memory.
13087 (check_mem_read): Mask out fast tracepoint jumps.
13088 (check_mem_write): Mask out fast tracepoint jumps.
13089 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13090 (set_fast_tracepoint_jump): Declare.
13091 (delete_fast_tracepoint_jump)
13092 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13093 (reinsert_fast_tracepoint_jumps_at): Declare.
13094 * regcache.c: Don't compile many functions when building the
13095 in-process agent library.
13096 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13097 the register buffer in the heap.
13098 (free_register_cache): If the register buffer isn't owned by the
13099 regcache, don't free it.
13100 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13101 pre-existing register caches.
13102 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13103 type.
13104 (convert_ascii_to_int): : Constify `from' parameter type.
13105 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13106 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13107 the needed buffer in-place.
13108 (relocate_instruction): New.
13109 * server.c (handle_query) <qSymbols>: If the target supports
13110 tracepoints, give it a chance of looking up symbols. Report
13111 support for fast tracepoints.
13112 (handle_status): Stabilize threads.
13113 (process_serial_event): Adjust.
13114 * server.h (struct fast_tracepoint_jump): Forward declare.
13115 (struct process_info) <fast_tracepoint_jumps>: New field.
13116 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13117 (decode_X_packet, decode_M_packet): Adjust.
13118 (relocate_instruction): Declare.
13119 (in_process_agent_loaded): Declare.
13120 (tracepoint_look_up_symbols): Declare.
13121 (struct fast_tpoint_collect_status): Declare.
13122 (fast_tracepoint_collecting): Declare.
13123 (force_unlock_trace_buffer): Declare.
13124 (handle_tracepoint_bkpts): Declare.
13125 (initialize_low_tracepoint)
13126 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13127 * target.h (struct target_ops) <stabilize_threads,
13128 install_fast_tracepoint_jump_pad>: New fields.
13129 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13130 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13131 [HAVE_STDINT_H]: Include stdint.h.
13132 (trace_debug_1): Rename to ...
13133 (trace_vdebug): ... this.
13134 (trace_debug): Rename to ...
13135 (trace_debug_1): ... this. Add `level' parameter.
13136 (trace_debug): New.
13137 (ATTR_USED, ATTR_NOINLINE): New.
13138 (IP_AGENT_EXPORT): New.
13139 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13140 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13141 (about_to_request_buffer_space, trace_buffer_is_full)
13142 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13143 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13144 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13145 (traceframe_write_count, traceframes_created)
13146 (trace_state_variables)
13147 New renaming defines.
13148 (struct ipa_sym_addresses): New.
13149 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13150 (symbol_list): New.
13151 (ipa_sym_addrs): New.
13152 (all_tracepoint_symbols_looked_up): New.
13153 (in_process_agent_loaded): New.
13154 (write_e_ipa_not_loaded): New.
13155 (maybe_write_ipa_not_loaded): New.
13156 (tracepoint_look_up_symbols): New.
13157 (debug_threads) [IN_PROCESS_AGENT]: New.
13158 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13159 (UNKNOWN_SIDE_EFFECTS): New.
13160 (stop_tracing): New.
13161 (flush_trace_buffer): New.
13162 (stop_tracing_bkpt): New.
13163 (flush_trace_buffer_bkpt): New.
13164 (read_inferior_integer): New.
13165 (read_inferior_uinteger): New.
13166 (read_inferior_data_pointer): New.
13167 (write_inferior_data_pointer): New.
13168 (write_inferior_integer): New.
13169 (write_inferior_uinteger): New.
13170 (struct collect_static_trace_data_action): Delete.
13171 (enum tracepoint_type): New.
13172 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13173 <actions_str, step_actions, step_actions_str>: Only include in
13174 GDBserver.
fa593d66
PA
13175 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13176 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13177 (tracepoints): Use IP_AGENT_EXPORT.
13178 (last_tracepoint): Don't include in the IPA.
13179 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13180 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13181 (alloced_trace_state_variables): New.
13182 (trace_state_variables): Use IP_AGENT_EXPORT.
13183 (traceframe_t): Delete unused variable.
13184 (circular_trace_buffer): Don't include in the IPA.
13185 (trace_buffer_start): Delete.
13186 (struct trace_buffer_control): New.
13187 (trace_buffer_free): Delete.
13188 (struct ipa_trace_buffer_control): New.
13189 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13190 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13191 New.
13192 (trace_buffer_ctrl): New.
13193 (TRACE_BUFFER_CTRL_CURR): New.
13194 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13195 Reimplement as macros.
13196 (trace_buffer_wrap): Delete.
13197 (traceframe_write_count, traceframe_read_count)
13198 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13199 (struct tracepoint_hit_ctx) <type>: New field.
13200 (struct fast_tracepoint_ctx): New.
13201 (memory_barrier): New.
13202 (cmpxchg): New.
13203 (record_tracepoint_error): Update atomically in the IPA.
13204 (clear_inferior_trace_buffer): New.
13205 (about_to_request_buffer_space): New.
13206 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13207 updating the same buffer.
13208 (add_tracepoint): Default the tracepoint's type to trap
13209 tracepoint, and orig_size to -1.
13210 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13211 internal variables.
13212 (create_trace_state_variable): New parameter `gdb'. Handle it.
13213 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13214 (cmd_qtdp): Handle fast tracepoints.
13215 (cmd_qtdv): Adjust.
13216 (max_jump_pad_size): New.
13217 (gdb_jump_pad_head): New.
13218 (get_jump_space_head): New.
13219 (claim_jump_space): New.
13220 (sort_tracepoints): New.
13221 (MAX_JUMP_SIZE): New.
13222 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13223 IPA.
13224 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13225 support. Upload fast traceframes, and delete internal IPA
13226 breakpoints.
13227 (stop_tracing_handler): New.
13228 (flush_trace_buffer_handler): New.
13229 (cmd_qtstop): Upload fast tracepoints.
13230 (response_tracepoint): Handle fast tracepoints.
13231 (tracepoint_finished_step): Upload fast traceframes. Set the
13232 tracepoint hit context's tracepoint type.
13233 (handle_tracepoint_bkpts): New.
13234 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13235 type. Add comment about fast tracepoints.
13236 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13237 non-existing action_str field.
13238 (get_context_regcache): Handle fast tracepoints.
13239 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13240 to the regcache.
13241 (fast_tracepoint_from_jump_pad_address): New.
13242 (fast_tracepoint_from_ipa_tpoint_address): New.
13243 (collecting_t): New.
13244 (force_unlock_trace_buffer): New.
13245 (fast_tracepoint_collecting): New.
13246 (collecting): New.
13247 (gdb_collect): New.
13248 (write_inferior_data_ptr): New.
13249 (target_tp_heap): New.
13250 (target_malloc): New.
13251 (download_agent_expr): New.
13252 (UALIGN): New.
13253 (download_tracepoints): New.
13254 (download_trace_state_variables): New.
13255 (upload_fast_traceframes): New.
13256 (IPA_FIRST_TRACEFRAME): New.
13257 (IPA_NEXT_TRACEFRAME_1): New.
13258 (IPA_NEXT_TRACEFRAME): New.
13259 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13260 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13261 (gdb_jump_pad_buffer_end): New.
13262 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13263 (initialize_tracepoint): Adjust.
13264 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13265 buffer. Initialize the low module.
13266 * utils.c (PREFIX, TOOLNAME): New.
13267 (malloc_failure): Use PREFIX.
13268 (error): In the IPA, an error causes an exit.
13269 (fatal, warning): Use PREFIX.
13270 (internal_error): Use TOOLNAME.
13271 (NUMCELLS): Increase to 10.
13272 * configure, config.in: Regenerate.
13273
d149dd1d
PA
132742010-06-01 Pedro Alves <pedro@codesourcery.com>
13275
13276 * server.c (handle_query) <qSupported>: Do two passes over the
13277 qSupported string to avoid nesting strtok.
13278
f6528abd
JK
132792010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13280
13281 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13282 (CDEPS): New.
13283 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13284 -Wl,--dynamic-list.
13285 * configure: Regenerate.
13286 * proc-service.list: New.
13287
ca2a87a0
JK
132882010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13289
13290 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13291 New comment.
13292
363a6e9f
OS
132932010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13294
13295 * gdbreplay.c (remote_open): Check error return from socket() call by
13296 its equality to -1 not by it being negative.
13297 * remote-utils.c (remote_open): Likewise.
13298
d23b6cb1
PA
132992010-05-23 Pedro Alves <pedro@codesourcery.com>
13300
13301 * config.h: Regenerate.
13302
28d3cf85
MK
133032010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13304
13305 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13306 doesn't provide PTRACE_GET_THREAD_AREA.
13307
fea36a59
MK
133082010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13309
13310 * linux-m68k-low.c: Include <asm/ptrace.h>
13311 (ps_get_thread_area): Implement.
13312
24b066ba
DE
133132010-05-03 Doug Evans <dje@google.com>
13314
13315 * event-loop.c (struct callback_event): New struct.
13316 (callback_list): New global.
13317 (append_callback_event, delete_callback_event): New functions.
13318 (process_callback): New function.
13319 (start_event_loop): Call it.
13320 * remote-utils.c (NOT_SCHEDULED): Define.
13321 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13322 moved out of readchar.
13323 (readchar): Rewrite. Call reschedule before returning.
13324 (reset_readchar): New function.
13325 (remote_close): Call it.
13326 (process_remaining, reschedule): New functions.
13327 * server.h (callback_handler_func): New typedef.
13328 (append_callback_event, delete_callback_event): Declare.
13329
9836d6ea
PA
133302010-05-03 Pedro Alves <pedro@codesourcery.com>
13331
13332 * proc-service.c (ps_pglobal_lookup): Use
13333 thread_db_look_up_one_symbol.
13334 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13335 parameter. Use it instead of all_symbols_looked_up.
13336 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13337 field.
13338 (all_symbols_looked_up): Don't declare.
13339 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13340 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13341 field.
13342 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13343 Set all_symbols_looked_up here.
13344 (thread_db_look_up_one_symbol): New.
13345 (thread_db_get_tls_address): Adjust.
13346 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13347 thread_db object on the heap, and tentatively set it in the
13348 process structure.
13349 (thread_db_init): Don't set all_symbols_looked_up here.
13350 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13351
7984d532
PA
133522010-05-03 Pedro Alves <pedro@codesourcery.com>
13353
13354 * linux-low.c (linux_kill, linux_detach): Adjust.
13355 (status_pending_p_callback): Remove redundant statement. Check
13356 for !TARGET_WAITIKIND_IGNORE, instead of
13357 TARGET_WAITKIND_STOPPED.
13358 (handle_tracepoints): Make sure LWP is locked. Adjust.
13359 (linux_wait_for_event_1): Adjust.
13360 (linux_cancel_breakpoints): New.
13361 (unsuspend_one_lwp): New.
13362 (unsuspend_all_lwps): New.
13363 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13364 (send_sigstop_callback): Change return type to int, add new
13365 `except' parameter and handle it.
13366 (suspend_and_send_sigstop_callback): New.
13367 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13368 pass them down. If SUSPEND, also increment the lwp's suspend
13369 count.
13370 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13371 (need_step_over_p): Don't consider suspended LWPs.
13372 (start_step_over): Adjust.
13373 (proceed_one_lwp): Change return type to int, add new `except'
13374 parameter and handle it.
13375 (unsuspend_and_proceed_one_lwp): New.
13376 (proceed_all_lwps): Use find_inferior instead of
13377 for_each_inferior.
13378 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13379 also decrement the suspend count of LWPs. Pass `except' down,
13380 instead of hacking its suspend count.
13381 (linux_pause_all): Add `freeze' parameter. Adjust.
13382 (linux_unpause_all): New.
13383 (linux_target_ops): Install linux_unpause_all.
13384 * server.c (handle_status): Adjust.
13385 * target.h (struct target_ops): New fields `unpause_all' and
13386 `cancel_breakpoints'. Add new parameter to `pause_all'.
13387 (pause_all): Add new `freeze' parameter.
13388 (unpause_all): New.
13389 (cancel_breakpoints): New.
13390 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13391 cancel breakpoints.
13392 (cmd_qtstart): Pause threads.
13393 (stop_tracing): Pause threads, and cancel breakpoints.
13394 * win32-low.c (win32_target_ops): Adjust.
13395
e471f25b
PA
133962010-05-03 Pedro Alves <pedro@codesourcery.com>
13397
13398 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13399 the inferior right away from here...
13400 (linux_wait_1): ... to here, and adjust to check the thread's
13401 last_resume_kind instead of the lwp's step or stop_expected flags.
13402
1915ef4f
PA
134032010-05-02 Pedro Alves <pedro@codesourcery.com>
13404
13405 * README: Use consistent `GDB' and `GDBserver' spellings.
13406
f9e39928
PA
134072010-05-02 Pedro Alves <pedro@codesourcery.com>
13408
13409 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13410 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13411 (linux_detach_one_lwp): Assume the lwp is stopped.
13412 (any_thread_of): Delete.
13413 (linux_detach): Stop all lwps here. Don't blindly delete all
13414 breakpoints.
13415 (delete_lwp_callback): New.
13416 (linux_mourn): Delete all lwps of the process that is gone.
13417 (linux_wait_1): Don't delete the last lwp of the process here.
13418 * mem-break.h (mark_breakpoints_out): Declare.
13419 * mem-break.c (mark_breakpoints_out): New.
13420 (free_all_breakpoints): Use it.
13421 * server.c (handle_target_event): If the process is gone, mark
13422 breakpoints out.
13423 * thread-db.c (struct thread_db) <create_bp>: New field.
13424 (thread_db_enable_reporting): Fix prototype. Store a thread event
13425 breakpoint reference in the thread_db struct.
13426 (thread_db_load_search): Clear the thread_db object.
13427 (try_thread_db_load_1): Ditto.
13428 (switch_to_process): New.
13429 (disable_thread_event_reporting): Use it.
13430 (remove_thread_event_breakpoints): New.
13431 (thread_db_detach, thread_db_mourn): Use it.
13432
1e7fc18c
PA
134332010-05-01 Pedro Alves <pedro@codesourcery.com>
13434
13435 * linux-low.c (linux_enable_event_reporting): New.
13436 (linux_wait_for_event_1, handle_extended_wait): Use it.
13437
02fc4de7
PA
134382010-04-30 Pedro Alves <pedro@codesourcery.com>
13439
13440 * linux-low.c (linux_kill_one_lwp, linux_kill)
13441 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13442 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13443 SIGSTOP even if the LWP is stopped.
13444 (send_sigstop_callback): New.
13445 (stop_all_lwps): Use send_sigstop_callback instead.
13446 (linux_resume_one_thread): Adjust.
13447 (proceed_one_lwp): Still proceed an LWP that the client has
13448 requested to stop, if we haven't reported it as stopped yet. Make
13449 sure that LWPs the client want stopped, have a pending SIGSTOP.
13450
bc3b5632
DE
134512010-04-26 Doug Evans <dje@google.com>
13452
ae1ada35
DE
13453 * server.c (handle_general_set): Make static.
13454
bc3b5632
DE
13455 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13456 Print received char after testing for error/eof instead of before.
13457 (input_interrupt): Tweak comment.
13458
65730243
DE
134592010-04-23 Doug Evans <dje@google.com>
13460
13461 * server.c (start_inferior): Print inferior argv if --debug.
13462
a8ae7dc0
AR
134632010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13464
13465 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13466 * nto-x86-low.c: Include server.h
13467
1c07cc19
PM
134682010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13469
13470 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13471 be consistent with other sources of this directory.
13472 (init_registers_amd64): Correct name of source file of this function
13473 in the comment.
13474
e0a61e09
PM
134752010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13476
13477 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13478 64-bit executables.
13479
54709339
PM
134802010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13481
13482 * win32-i386-low.c: Add 64-bit support.
13483 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13484 (init_registers_amd64): Declare.
13485 (mappings): Add 64-bit version of array.
13486 (init_windows_x86): New function.
13487 (the_low_target): Change init_arch field to init_windows_x86.
13488
e8f0053d
PM
134892010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13490
13491 * win32-low.c: Adapt to support also 64-bit architecture.
13492 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13493 (get_image_name): Use SIZE_T type for local variable `done'.
13494 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13495 (toolhelp_get_dll_name): Idem.
13496 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13497 Use uintptr_t typecast to avoid warning.
13498 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13499 (handle_exception): Use phex_nz to avoid warning.
13500 (win32_wait): Remove unused local variable `process'.
13501
c481e77e
PM
135022010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13503
13504 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13505 `amd64-avx.o'.
13506
12ea4b69
PM
135072010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13508
13509 * configure.ac: Use `ws2_32' library for srv_mingw.
13510 * configure: Regenerate.
13511 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13512 * remote-utils.c: Likewise.
13513
f6d1620c
L
135142010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13515
13516 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13517 if __x86_64__ is defined.
13518
8e642873
PM
135192010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13520
13521 * configure: Regenerate.
13522
711e434b
PM
135232010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13524
13525 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13526 * target.h (target_ops): New get_tib_address field.
13527 * win32-low.h (win32_thread_info): Add thread_local_base field.
13528 * win32-low.c (child_add_thread): Add tlb argument.
13529 Set thread_local_base field to TLB.
13530 (get_child_debug_event): Adapt to child_add_thread change.
13531 (win32_get_tib_address): New function.
13532 (win32_target_ops): Set get_tib_address field to
13533 win32_get_tib_address.
13534 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13535
505106cd
PA
135362010-04-12 Pedro Alves <pedro@codesourcery.com>
13537
505106cd
PA
13538 * linux-low.c (linux_mourn): Also remove the process.
13539 * server.c (handle_target_event): Don't remove the process here.
13540 * nto-low.c (nto_mourn): New.
13541 (nto_target_ops): Install it.
13542 * spu-low.c (spu_mourn): New.
13543 (spu_target_ops): Install it.
13544 * win32-low.c (win32_mourn): New.
13545 (win32_target_ops): Install it.
13546
e8470a06
PA
135472010-04-12 Pedro Alves <pedro@codesourcery.com>
13548
13549 * server.h (buffer_xml_printf): Remove redundant `;'.
13550
45ba0d02
PA
135512010-04-12 Pedro Alves <pedro@codesourcery.com>
13552
13553 * regcache.c (set_register_cache): Invalidate regcaches before
13554 changing the register cache layout.
13555 (regcache_invalidate_one): Allow a NULL regcache.
13556 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13557 regcaches before changing the register cache layout or the target
13558 regsets.
13559
59e04013
L
135602010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13561
13562 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13563 variable warning on Linux/x86-64.
13564
8336d594
PA
135652010-04-11 Pedro Alves <pedro@codesourcery.com>
13566
13567 GDBserver disconnected tracing support.
13568
13569 * linux-low.c (linux_remove_process): Delete.
13570 (add_lwp): Don't set last_resume_kind here.
13571 (linux_kill): Use `mourn'.
13572 (linux_detach): Use `thread_db_detach', and `mourn'.
13573 (linux_mourn): New.
13574 (linux_attach_lwp_1): Adjust comment.
13575 (linux_attach): last_resume_kind moved the thread_info; adjust.
13576 (status_pending_p_callback): Adjust.
13577 (linux_wait_for_event_1): Adjust.
13578 (count_events_callback, select_singlestep_lwp_callback)
13579 (select_event_lwp_callback, cancel_breakpoints_callback)
13580 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13581 (proceed_one_lwp): Adjust.
13582 (linux_async): Add debug output.
13583 (linux_thread_stopped): New.
13584 (linux_pause_all): New.
13585 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13586 linux_pause_all.
13587 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13588 (thread_db_free): Delete declaration.
13589 (thread_db_detach, thread_db_mourn): Declare.
13590 * thread-db.c (thread_db_init): Use thread_db_mourn.
13591 (thread_db_free): Delete, split in two.
13592 (disable_thread_event_reporting): New.
13593 (thread_db_detach): New.
13594 (thread_db_mourn): New.
13595
13596 * server.h (struct thread_info) <last_resume_kind>: New field.
13597 <attached>: Add comment.
13598 <gdb_detached>: New field.
13599 (handler_func): Change return type to int.
13600 (handle_serial_event, handle_target_event): Ditto.
13601 (gdb_connected): Declare.
13602 (tracing): Delete.
13603 (disconnected_tracing): Declare.
13604 (stop_tracing): Declare.
13605
13606 * server.c (handle_query) <qSupported>: Report support for
13607 disconnected tracing.
13608 (queue_stop_reply_callback): Account for running threads.
13609 (gdb_wants_thread_stopped): New.
13610 (gdb_wants_all_threads_stopped): New.
13611 (gdb_reattached_process): New.
13612 (handle_status): Clear the `gdb_detached' flag of all processes.
13613 In all-stop, stop all threads.
13614 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13615 (process_serial_event): If the remote connection breaks, or if an
13616 exit was forced with "monitor exit", force an event loop exit.
13617 Handle disconnected tracing on detach.
13618 (handle_serial_event): Adjust.
13619 (handle_target_event): If GDB isn't connected, forward events back
13620 to the inferior, unless the last process exited, in which case,
13621 exit gdbserver. Adjust interface.
13622
13623 * remote-utils.c (remote_open): Don't block in accept. Instead
13624 register an event loop source on the listen socket file
13625 descriptor. Refactor bits into ...
13626 (listen_desc): ... this new global.
13627 (gdb_connected): ... this new function.
13628 (enable_async_notification): ... this new function.
13629 (handle_accept_event): ... this new function.
13630 (remote_close): Clear remote_desc.
13631
13632 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13633
13634 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13635 New fields.
13636 (mourn_inferior): Define.
13637 (target_process_qsupported): Avoid the dangling else problem.
13638 (thread_stopped): Define.
13639 (pause_all): Define.
13640 (target_waitstatus_to_string): Declare.
13641 * target.c (target_waitstatus_to_string): New.
13642
13643 * tracepoint.c (tracing): Make extern.
13644 (disconnected_tracing): New.
13645 (stop_tracing): Make extern. Handle tracing stops due to GDB
13646 disconnecting.
13647 (cmd_qtdisconnected): New.
13648 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13649 (handle_tracepoint_general_set): Handle QTDisconnected.
13650
13651 * event-loop.c (event_handler_func): Change return type to int.
13652 (process_event): Bail out if the event handler wants the event
13653 loop to stop.
13654 (handle_file_event): Ditto.
13655 (start_event_loop): Bail out if the event handler wants the event
13656 loop to stop.
13657
13658 * nto-low.c (nto_target_ops): Adjust.
13659 * spu-low.c (spu_wait): Don't remove the process here.
13660 (spu_target_ops): Adjust.
13661 * win32-low.c (win32_wait): Don't remove the process here.
13662 (win32_target_ops): Adjust.
13663
5d267c4c
PA
136642010-04-11 Pedro Alves <pedro@codesourcery.com>
13665
13666 * regcache.c (realloc_register_cache): Invalidate inferior's
13667 regcache before recreating it.
13668
623ccd72
PA
136692010-04-09 Pedro Alves <pedro@codesourcery.com>
13670
13671 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13672
219f2f23
PA
136732010-04-09 Stan Shebs <stan@codesourcery.com>
13674 Pedro Alves <pedro@codesourcery.com>
13675
13676 * server.h (LONGEST): New.
13677 (struct thread_info) <while_stepping>: New field.
13678 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13679 Declare.
13680 (initialize_tracepoint, handle_tracepoint_general_set)
13681 (handle_tracepoint_query, tracepoint_finished_step)
13682 (tracepoint_was_hit, release_while_stepping_state_list):
13683 (current_traceframe): Declare.
13684 * server.c (handle_general_set): Handle tracepoint packets.
13685 (read_memory): New.
13686 (write_memory): New.
13687 (handle_search_memory_1): Use read_memory.
13688 (handle_query): Report support for conditional tracepoints, trace
13689 state variables, and tracepoint sources. Handle tracepoint
13690 queries.
13691 (main): Initialize the tracepoints module.
13692 (process_serial_event): Handle traceframe reads/writes.
13693
13694 * linux-low.c (handle_tracepoints): New.
13695 (linux_wait_1): Call it.
13696 (linux_resume_one_lwp): Handle while-stepping.
13697 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13698 (linux_target_ops): Install them.
13699 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13700 New field.
13701 * linux-x86-low.c (x86_supports_tracepoints): New.
13702 (the_low_target). Install it.
13703
13704 * mem-break.h (delete_breakpoint): Declare.
13705 * mem-break.c (delete_breakpoint): Make external.
13706
13707 * target.h (struct target_ops): Add `supports_tracepoints',
13708 `read_pc', and `write_pc' fields.
13709 (target_supports_tracepoints): Define.
13710 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13711 (phex_nz): New.
13712
13713 * regcache.h (struct regcache) <registers_owned>: New field.
13714 (init_register_cache, regcache_cpy): Declare.
13715 (regcache_read_pc, regcache_write_pc): Declare.
13716 (register_cache_size): Declare.
13717 (supply_regblock): Declare.
13718 * regcache.c (init_register_cache): New.
13719 (new_register_cache): Use it.
13720 (regcache_cpy): New.
13721 (register_cache_size): New.
13722 (supply_regblock): New.
13723 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13724
219f2f23
PA
13725 * tracepoint.c: New.
13726
13727 * Makefile.in (OBS): Add tracepoint.o.
13728 (tracepoint.o): New rule.
13729
3a13a53b
L
137302010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13731
13732 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13733 (i386-mmx.o): New.
13734 (i386-mmx.c): Likewise.
13735 (i386-mmx-linux.o): Likewise.
13736 (i386-mmx-linux.c): Likewise.
13737
13738 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13739 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13740 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13741 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13742
13743 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13744 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13745 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13746
1570b33e
L
137472010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13748
13749 * Makefile.in (clean): Updated.
13750 (i386-avx.o): New.
13751 (i386-avx.c): Likewise.
13752 (i386-avx-linux.o): Likewise.
13753 (i386-avx-linux.c): Likewise.
13754 (amd64-avx.o): Likewise.
13755 (amd64-avx.c): Likewise.
13756 (amd64-avx-linux.o): Likewise.
13757 (amd64-avx-linux.c): Likewise.
13758
13759 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13760 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13761 (srv_amd64_regobj): Add amd64-avx.o.
13762 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13763 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13764 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13765 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13766 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13767 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13768 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13769
13770 * i387-fp.c: Include "i386-xstate.h".
13771 (i387_xsave): New.
13772 (i387_cache_to_xsave): Likewise.
13773 (i387_xsave_to_cache): Likewise.
13774 (x86_xcr0): Likewise.
13775
13776 * i387-fp.h (i387_cache_to_xsave): Likewise.
13777 (i387_xsave_to_cache): Likewise.
13778 (x86_xcr0): Likewise.
13779
13780 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13781 * linux-crisv32-low.c (target_regsets): Likewise.
13782 * linux-m68k-low.c (target_regsets): Likewise.
13783 * linux-mips-low.c (target_regsets): Likewise.
13784 * linux-ppc-low.c (target_regsets): Likewise.
13785 * linux-s390-low.c (target_regsets): Likewise.
13786 * linux-sh-low.c (target_regsets): Likewise.
13787 * linux-sparc-low.c (target_regsets): Likewise.
13788 * linux-xtensa-low.c (target_regsets): Likewise.
13789
13790 * linux-low.c: Include <sys/uio.h>.
13791 (regsets_fetch_inferior_registers): Support nt_type.
13792 (regsets_store_inferior_registers): Likewise.
13793 (linux_process_qsupported): New.
13794 (linux_target_ops): Add linux_process_qsupported.
13795
13796 * linux-low.h (regset_info): Add nt_type.
13797 (linux_target_ops): Add process_qsupported.
13798
13799 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13800 and <sys/uio.h>.
13801 (init_registers_i386_avx_linux): New.
13802 (init_registers_amd64_avx_linux): Likewise.
13803 (xmltarget_i386_linux_no_xml): Likewise.
13804 (xmltarget_amd64_linux_no_xml): Likewise.
13805 (PTRACE_GETREGSET): Likewise.
13806 (PTRACE_SETREGSET): Likewise.
13807 (x86_fill_xstateregset): Likewise.
13808 (x86_store_xstateregset): Likewise.
13809 (use_xml): Likewise.
13810 (x86_linux_update_xmltarget): Likewise.
13811 (x86_linux_process_qsupported): Likewise.
13812 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13813 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13814 init_registers_i386_linux here. Call
13815 x86_linux_update_xmltarget.
13816 (the_low_target): Add x86_linux_process_qsupported.
13817
13818 * server.c (handle_query): Call target_process_qsupported.
13819
13820 * target.h (target_ops): Add process_qsupported.
13821 (target_process_qsupported): New.
13822
fc7238bb
PA
138232010-04-03 Pedro Alves <pedro@codesourcery.com>
13824
13825 * inferiors.c (add_thread): Set last_status kind to
13826 TARGET_WAITKIND_IGNORE.
13827 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13828 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13829 (linux_wait_1): Move `thread' local definition to block that uses
13830 it. Don't NULL initialize `event_child'.
13831 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13832 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13833 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13834
bdabb078
PA
138352010-04-01 Pedro Alves <pedro@codesourcery.com>
13836
13837 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13838 an extended waitstatus, or by a watchpoint.
13839 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13840 thread was stepping or has been stopped by a watchpoint.
13841
d3bbe7a0
PA
138422010-04-01 Pedro Alves <pedro@codesourcery.com>
13843
13844 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13845 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13846 of another, then delete the previous, and validate all
13847 breakpoints.
13848 (validate_inserted_breakpoint): New.
13849 (delete_disabled_breakpoints): New.
13850 (validate_breakpoints): New.
13851 (check_mem_read): Validate breakpoints before trusting their
13852 shadow. Delete disabled breakpoints.
13853 (check_mem_write): Validate breakpoints before trusting they
13854 should be inserted. Delete disabled breakpoints.
13855 * mem-break.h (validate_breakpoints):
13856 * server.c (handle_query): Validate breakpoints when we see a
13857 qSymbol query.
13858
8b07ae33
PA
138592010-04-01 Pedro Alves <pedro@codesourcery.com>
13860
13861 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13862 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13863 if we could tell there's a GDB breakpoint at stop_pc.
13864 (need_step_over_p): Don't do a step over if we find a GDB
13865 breakpoint at the resume PC.
13866
13867 * mem-break.c (struct raw_breakpoint): New.
13868 (enum bkpt_type): New type `gdb_breakpoint'.
13869 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13870 fields. New field `raw'.
13871 (find_raw_breakpoint_at): New.
13872 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13873 breakpoint instead.
13874 (set_breakpoint_at): Adjust.
13875 (delete_raw_breakpoint): New.
13876 (release_breakpoint): New.
13877 (delete_breakpoint): Rename to...
13878 (delete_breakpoint_1): ... this. Add proc parameter. Use
13879 release_breakpoint. Return ENOENT.
13880 (delete_breakpoint): Reimplement.
13881 (find_breakpoint_at): Delete.
13882 (find_gdb_breakpoint_at): New.
13883 (delete_breakpoint_at): Delete.
13884 (set_gdb_breakpoint_at): New.
13885 (delete_gdb_breakpoint_at): New.
13886 (gdb_breakpoint_here): New.
13887 (set_reinsert_breakpoint): Use release_breakpoint.
13888 (uninsert_breakpoint): Rename to ...
13889 (uninsert_raw_breakpoint): ... this.
13890 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13891 (reinsert_raw_breakpoint): Change parameter type to
13892 raw_breakpoint.
13893 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13894 instead.
13895 (check_breakpoints): Adjust. Use release_breakpoint.
13896 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13897 (breakpoint_inserted_here): Ditto.
13898 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13899 Don't trust the breakpoint's shadow if it is not inserted.
13900 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13901 (delete_all_breakpoints): Adjust.
13902 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13903 use delete_breakpoint_1.
13904
13905 * mem-break.h (breakpoints_supported): Delete declaration.
13906 (set_gdb_breakpoint_at): Declare.
13907 (gdb_breakpoint_here): Declare.
13908 (delete_breakpoint_at): Delete.
13909 (delete_gdb_breakpoint_at): Declare.
13910
13911 * server.h (struct raw_breakpoint): Forward declare.
13912 (struct process_info): New field `raw_breakpoints'.
13913
13914 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13915 breakpoints.
13916
6bf5e0ba
PA
139172010-03-24 Pedro Alves <pedro@codesourcery.com>
13918
13919 * linux-low.c (status_pending_p_callback): Fix comment.
13920 (linux_wait_for_event_1): Move most of the internal breakpoint
13921 handling from here...
13922 (linux_wait_1): ... to here.
13923 (count_events_callback): New.
13924 (select_singlestep_lwp_callback): New.
13925 (select_event_lwp_callback): New.
13926 (cancel_breakpoints_callback): New.
13927 (select_event_lwp): New.
13928 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13929 priority to all LWPs that have had events that should be reported
13930 to the client. Cancel breakpoints when about to reporting the
13931 event to the client, not while stopping lwps. No longer cancel
13932 finished single-steps here.
13933 (cancel_finished_single_step): Delete.
13934 (cancel_finished_single_steps): Delete.
13935
414a389f
PA
139362010-03-24 Pedro Alves <pedro@codesourcery.com>
13937
13938 * mem-break.c (enum bkpt_type): New.
13939 (struct breakpoint): New field `type'.
13940 (set_breakpoint_at): Change return type to struct breakpoint
13941 pointer. Set type to `other_breakpoint' by default.
13942 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13943 in the breakpoint list.
13944 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13945 (reinsert_breakpoint): Rename to ...
13946 (reinsert_raw_breakpoint): ... this.
13947 (reinsert_breakpoints_at): Adjust.
13948 * mem-break.h (struct breakpoint): Declare.
13949 (set_breakpoint_at): Change return type to struct breakpoint
13950 pointer.
13951
2280c721
PA
139522010-03-24 Pedro Alves <pedro@codesourcery.com>
13953
13954 * server.c (handle_query): Assign, not compare.
13955
d50171e4
PA
139562010-03-24 Pedro Alves <pedro@codesourcery.com>
13957
13958 Teach linux gdbserver to step-over-breakpoints.
13959
13960 * linux-low.c (can_hardware_single_step): New.
13961 (supports_breakpoints): New.
13962 (handle_extended_wait): If stopping threads, read the stop pc of
13963 the new cloned LWP.
13964 (get_pc): New.
13965 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13966 low target doesn't support retrieving the PC.
13967 (add_lwp): Set last_resume_kind to resume_continue.
13968 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13969 (linux_attach): Don't clear stop_expected. Set the lwp's
13970 last_resume_kind to resume_stop.
13971 (linux_detach_one_lwp): Don't check for removed breakpoints.
13972 (check_removed_breakpoint): Delete.
13973 (status_pending_p): Rename to ...
13974 (status_pending_p_callback): ... this. Don't check for removed
13975 breakpoints. Don't consider threads that are stopped from GDB's
13976 perspective.
13977 (linux_wait_for_lwp): Always read the stop_pc here.
13978 (cancel_breakpoint): New.
13979 (step_over_bkpt): New global.
13980 (linux_wait_for_event_1): Implement stepping over breakpoints.
13981 (gdb_wants_lwp_stopped): New.
13982 (gdb_wants_all_stopped): New.
13983 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13984 single-step traps here. Store the thread's last reported target
13985 wait status.
13986 (send_sigstop): Don't clear stop_expected. Always set it,
13987 instead.
13988 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13989 (cancel_finished_single_step): New.
13990 (cancel_finished_single_steps): New.
13991 (wait_for_sigstop): Don't cancel finished single-step traps here.
13992 (linux_resume_one_lwp): Don't check for removed breakpoints.
13993 Don't set `step' on non-hardware step archs.
13994 (linux_set_resume_request): Ignore resume_stop requests if already
13995 stopping or stopped. Set the lwp's last_resume_kind.
13996 (resume_status_pending_p): Don't check for removed breakpoints.
13997 (need_step_over_p): New.
13998 (start_step_over): New.
13999 (finish_step_over): New.
14000 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14001 requests. Clear the thread's last reported target waitstatus.
14002 Don't use the `suspended' flag. Don't consider pending breakpoints.
14003 (linux_resume): Start a step-over if necessary.
14004 (proceed_one_lwp): New.
14005 (proceed_all_lwps): New.
14006 (unstop_all_lwps): New.
14007 * linux-low.h (struct lwp_info): Rewrite comment for the
14008 `suspended' flag. Add the `stop_pc' field. Delete the
14009 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14010 Add `'last_resume_kind' and `need_step_over' fields.
14011 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14012 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14013 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14014 (set_raw_breakpoint_at): New.
14015 (set_breakpoint_at): Rewrite to use it.
14016 (reinsert_breakpoint_handler): Delete.
14017 (set_reinsert_breakpoint): New.
14018 (reinsert_breakpoint_by_bp): Delete.
14019 (delete_reinsert_breakpoints): New.
14020 (uninsert_breakpoint): Rewrite.
14021 (uninsert_breakpoints_at): New.
14022 (reinsert_breakpoint): Rewrite.
14023 (reinsert_breakpoints_at): New.
14024 (check_breakpoints): Rewrite.
14025 (breakpoint_here): New.
14026 (breakpoint_inserted_here): New.
14027 (check_mem_read): Adjust.
14028 * mem-break.h (breakpoints_supported, breakpoint_here)
14029 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14030 (reinsert_breakpoint_by_bp): Delete declaration.
14031 (delete_reinsert_breakpoints): Declare.
14032 (reinsert_breakpoint): Delete declaration.
14033 (reinsert_breakpoints_at): Declare.
14034 (uninsert_breakpoint): Delete declaration.
14035 (uninsert_breakpoints_at): Declare.
14036 (check_breakpoints): Adjust prototype.
14037 * server.h: Adjust include order.
14038 (struct thread_info): Declare here. Add a `last_status' field.
14039
30ba68cb
MS
140402010-03-23 Michael Snyder <msnyder@vmware.com>
14041
14042 * server.c (crc32): New function.
14043 (handle_query): Add handling for 'qCRC:' request.
14044
b9a881c2
PA
140452010-03-23 Pedro Alves <pedro@codesourcery.com>
14046
14047 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14048 lwp had been stopped by a watchpoint.
14049
e92d13d5
PA
140502010-03-16 Pedro Alves <pedro@codesourcery.com>
14051
14052 * server.h (internal_error): Declare.
14053 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14054 * utils.c (internal_error): New function.
14055
64daa791
AS
140562010-03-15 Andreas Schwab <schwab@redhat.com>
14057
14058 * configure.srv: Fix typo setting srv_regobj.
14059
f52cd8cd
PA
140602010-03-15 Pedro Alves <pedro@codesourcery.com>
14061
14062 * linux-low.c (fetch_register): Avoid passing a non string literal
14063 format to `error'.
14064 (usr_store_inferior_registers): Ditto.
14065
93ae6fdc
PA
140662010-03-14 Pedro Alves <pedro@codesourcery.com>
14067
14068 * linux-low.c (linux_write_memory): Bail out early if peeking
14069 memory failed.
14070
c3adc08c
PA
140712010-03-14 Pedro Alves <pedro@codesourcery.com>
14072
14073 * linux-low.h (struct lwp_info): New fields
14074 `stopped_by_watchpoint' and `stopped_data_address'.
14075 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14076 here, and cache them in the lwp object.
14077 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14078 directly.
14079 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14080 field.
14081 (linux_stopped_by_watchpoint): Rewrite.
14082 (linux_stopped_data_address): Rewrite.
14083
bce522a2
PA
140842010-03-06 Simo Melenius <simo.melenius@iki.fi>
14085
14086 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14087 switching the current inferior, not before.
14088
90884b2b
L
140892010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14090
14091 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14092 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14093 i386-linux.c and amd64-linux.c.
14094 (reg-i386.o): Removed.
14095 (reg-i386.c): Likewise.
14096 (reg-i386-linux.o): Likewise.
14097 (reg-i386-linux.c): Likewise.
14098 (reg-x86-64.o): Likewise.
14099 (reg-x86-64.c): Likewise.
14100 (reg-x86-64-linux.o): Likewise.
14101 (reg-x86-64-linux.c): Likewise.
14102 (i386.o): New.
14103 (i386.c): Likewise.
14104 (i386-linux.o): Likewise.
14105 (i386-linux.c): Likewise.
14106 (amd64.o): Likewise.
14107 (amd64.c): Likewise.
14108 (amd64-linux.o): Likewise.
14109 (amd64-linux.c): Likewise.
14110
14111 * configure.srv (srv_i386_regobj): New.
14112 (srv_i386_linux_regobj): Likewise.
14113 (srv_amd64_regobj): Likewise.
14114 (srv_amd64_linux_regobj): Likewise.
14115 (srv_i386_32bit_xmlfiles): Likewise.
14116 (srv_i386_64bit_xmlfiles): Likewise.
14117 (srv_i386_xmlfiles): Likewise.
14118 (srv_amd64_xmlfiles): Likewise.
14119 (srv_i386_linux_xmlfiles): Likewise.
14120 (srv_amd64_linux_xmlfiles): Likewise.
14121 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14122 srv_xmlfiles to $srv_i386_xmlfiles.
14123 (i[34567]86-*-mingw32ce*): Likewise.
14124 (i[34567]86-*-mingw*): Likewise.
14125 (i[34567]86-*-nto*): Likewise.
14126 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14127 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14128 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14129 (x86_64-*-linux*): Likewise.
14130
14131 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14132 (init_registers_amd64_linux): New.
14133 (x86_arch_setup): Replace init_registers_x86_64_linux with
14134 init_registers_amd64_linux.
14135
193f13e6
MK
141362010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14137
14138 * configure.ac: Check for libdl. If it is not available link against
14139 static libthread_db.
14140 * configure: Regenerate.
14141
85d721b8
PA
141422010-02-22 Pedro Alves <pedro@codesourcery.com>
14143
14144 PR9605
14145
14146 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14147 handing a read watchpoint.
14148 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14149
6076632b
DE
141502010-02-12 Doug Evans <dje@google.com>
14151
14152 * linux-low.c (linux_supports_tracefork_flag): Document.
14153 (linux_look_up_symbols): Add comment.
14154
3327ccf7
L
141552010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14156
14157 * regcache.c (supply_register): Clear regcache if buf is NULL.
14158
0718675c 141592010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14160 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14161
14162 * inferiors.c (find_inferior): Add function documentation.
14163 (unloaded_dll): Handle the case where the unloaded dll has not
14164 been previously registered in the dll list.
14165
177321bd
DJ
141662010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14167
14168 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14169 (thumb2_breakpoint): New.
14170 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14171
2b009048
DJ
141722010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14173
14174 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14175 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14176 breakpoints.
14177
3be029c7
PA
141782010-01-21 Pedro Alves <pedro@codesourcery.com>
14179
14180 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14181
18f5de3b
JK
141822010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14183
14184 * linux-s390-low.c (s390_collect_ptrace_register)
14185 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14186
3743bb4f
DE
141872010-01-21 Doug Evans <dje@google.com>
14188
14ce3065
DE
14189 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14190 (PTRACE_ARG4_TYPE): New macro.
14191 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14192 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14193 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14194 (usr_store_inferior_registers): Ditto.
14195 (linux_read_memory, linux_write_memory): Ditto.
14196 (linux_test_for_tracefork): Ditto.
14197
3743bb4f
DE
14198 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14199 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14200
8b315be5
PA
142012010-01-21 Pedro Alves <pedro@codesourcery.com>
14202
14203 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14204 target.
14205
85492558
PA
142062010-01-21 Pedro Alves <pedro@codesourcery.com>
14207
14208 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14209 prototype to take a regcache. Adjust.
14210
442ea881
PA
142112010-01-20 Pedro Alves <pedro@codesourcery.com>
14212
14213 * regcache.h (struct thread_info): Forward declare.
14214 (struct regcache): New.
14215 (new_register_cache): Adjust prototype.
14216 (get_thread_regcache): Declare.
14217 (free_register_cache): Adjust prototype.
14218 (registers_to_string, registers_from_string): Ditto.
14219 (supply_register, supply_register_by_name, collect_register)
14220 (collect_register_as_string, collect_register_by_name): Ditto.
14221 * regcache.c (struct inferior_regcache_data): Delete.
14222 (get_regcache): Rename to ...
14223 (get_thread_regcache): ... this. Adjust. Switch inferior before
14224 fetching registers.
14225 (regcache_invalidate_one): Adjust.
14226 (regcache_invalidate): Fix prototype.
14227 (new_register_cache): Return the new register cache.
14228 (free_register_cache): Change prototype.
14229 (realloc_register_cache): Adjust.
14230 (registers_to_string): Change prototype to take a regcache. Adjust.
14231 (registers_from_string): Ditto.
14232 (register_data): Ditto.
14233 (supply_register): Ditto.
14234 (supply_register_by_name): Ditto.
14235 (collect_register): Ditto.
14236 (collect_register_as_string): Ditto.
14237 (collect_register_by_name): Ditto.
14238 * server.c (process_serial_event): Adjust.
14239 * linux-low.h (regset_fill_func, regset_store_func): Change
14240 prototype.
14241 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14242 Change prototype.
14243 * linux-low.c (get_stop_pc): Adjust.
14244 (check_removed_breakpoint): Adjust.
14245 (linux_wait_for_event): Adjust.
14246 (linux_resume_one_lwp): Adjust.
14247 (fetch_register): Add regcache parameter. Adjust.
14248 (usr_store_inferior_registers): Ditto.
14249 (regsets_fetch_inferior_registers): Ditto.
14250 (regsets_store_inferior_registers): Ditto.
14251 (linux_fetch_registers, linux_store_registers): Ditto.
14252 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14253 regcache. Adjust.
43aaf8b6
PA
14254 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14255 Ditto.
442ea881
PA
14256 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14257 prototype to take a regcache.
14258 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14259 * remote-utils.c (convert_ascii_to_int, outreg)
14260 (prepare_resume_reply): Change prototype to take a regcache.
14261 Adjust.
14262 * target.h (struct target_ops) <fetch_registers, store_registers>:
14263 Change prototype to take a regcache.
14264 (fetch_inferior_registers, store_inferior_registers): Change
14265 prototype to take a regcache. Adjust.
14266 * proc-service.c (ps_lgetregs): Adjust.
14267 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14268 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14269 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14270 take a regcache. Adjust.
14271 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14272 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14273 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14274 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14275 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14276 (cris_cannot_fetch_register):
14277 (cris_breakpoint_at): Change prototype to take a regcache.
14278 Adjust.
14279 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14280 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14281 to take a regcache. Adjust.
14282 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14283 Adjust.
14284 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14285 take a regcache. Adjust.
14286 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14287 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14288 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14289 * linux-mips-low.c (mips_get_pc):
14290 (mips_set_pc): Change prototype to take a regcache. Adjust.
14291 (mips_reinsert_addr): Adjust.
14292 (mips_collect_register): Change prototype to take a regcache.
14293 Adjust.
14294 (mips_supply_register):
14295 (mips_collect_register_32bit, mips_supply_register_32bit)
14296 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14297 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14298 * linux-ppc-low.c (ppc_supply_ptrace_register)
14299 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14300 (parse_spufs_run): Adjust.
14301 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14302 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14303 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14304 take a regcache. Adjust.
14305 * linux-s390-low.c (s390_collect_ptrace_register)
14306 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14307 (s390_set_pc): Change prototype to take a regcache. Adjust.
14308 (s390_arch_setup): Adjust.
14309 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14310 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14311 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14312 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14313 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14314 regcache. Adjust.
14315 (sparc_breakpoint_at): Adjust.
14316 * linux-xtensa-low.c (xtensa_fill_gregset):
14317 (xtensa_store_gregset):
14318 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14319 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14320 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14321 prototype to take a regcache. Adjust.
14322 * win32-arm-low.c (arm_fetch_inferior_register)
14323 (arm_store_inferior_register): Change prototype to take a
14324 regcache. Adjust.
14325 * win32-i386-low.c (i386_fetch_inferior_register)
14326 (i386_store_inferior_register): Change prototype to take a
14327 regcache. Adjust.
14328 * win32-low.c (child_fetch_inferior_registers)
14329 (child_store_inferior_registers): Change prototype to take a
14330 regcache. Adjust.
14331 (win32_wait): Adjust.
14332 (win32_fetch_inferior_registers): Change prototype to take a
14333 regcache. Adjust.
14334 (win32_store_inferior_registers): Adjust.
14335 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14336 store_inferior_register>: Change prototype to take a regcache.
14337
60c3d7b0
DE
143382010-01-20 Doug Evans <dje@google.com>
14339
14340 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14341 #ifdef.
14342 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14343 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14344
dc146f7c
VP
143452010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14346
14347 * linux-low.c (linux_core_of_thread): New.
14348 (compare_ints, show_process, list_threads): New.
14349 (linux_qxfer_osdata): Report threads and cores.
14350 (linux_target_op): Register linux_core_of_thread.
14351 * remote-utils.c (prepare_resume_reply): Report the core.
14352 (buffer_xml_printf): Support %d specifier.
14353 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14354 New.
14355 (handle_query): Handle qXfer:threads. Announce availability
14356 thereof.
14357 * target.h (struct target_ops): New field core_of_thread.
14358
7803799a
UW
143592010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14360
14361 * Makefile.in (clean): Remove new generated files.
14362 (reg-s390.o, reg-s390.c): Remove rules.
14363 (reg-s390x.o, reg-s390x.c): Likewise.
14364 (s390-linux32.o, s390-linux32.c): Add rules.
14365 (s390-linux64.o, s390-linux64.c): Likewise.
14366 (s390x-linux64.o, s390x-linux64.c): Likewise.
14367 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14368 * linux-s390-low.c: Include <elf.h>.
14369 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14370 (init_registers_s390): Remove prototype.
14371 (init_registers_s390x): Likewise.
14372 (init_registers_s390_linux32): Add prototype.
14373 (init_registers_s390_linux64): Likewise.
14374 (init_registers_s390x_linux64): Likewise.
14375 (s390_num_regs_3264): New define.
14376 (s390_regmap_3264): New global variable.
14377 (s390_cannot_fetch_register): Remove obsolete check.
14378 (s390_cannot_store_register): Likewise.
14379 (s390_collect_ptrace_register): Handle upper/lower register halves.
14380 (s390_supply_ptrace_register): Likewise.
14381 (s390_fill_gregset): Update to register number changes.
14382 (s390_get_hwcap): New routine.
14383 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14384 Install appropriate regmap and register set.
14385
6e7ffa39
JB
143862010-01-01 Joel Brobecker <brobecker@adacore.com>
14387
14388 * server.c (gdbserver_version): Update copyright year to 2010.
14389 * gdbreplay.c (gdbreplay_version): Likewise.
14390
957f3f49
DE
143912009-12-28 Doug Evans <dje@google.com>
14392
14393 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14394 elf/external.h. Include <elf.h> instead but only if necessary.
14395
ca5c370d
PA
143962009-12-28 Pedro Alves <pedro@codesourcery.com>
14397
14398 * linux-low.c (linux_remove_process): Remove `detaching'
14399 parameter. Don't release/detach from thread_db here.
14400 (linux_kill): Release/detach from thread_db here, ...
14401 (linux_detach): ... and here, before actually detaching.
14402 (linux_wait_1): ... and here, when a process exits.
14403 * thread-db.c (any_thread_of): New.
14404 (thread_db_free): Switch the current inferior to a thread of the
14405 passed in process.
14406
4ee62156
DE
144072009-12-21 Doug Evans <dje@google.com>
14408
d90e6a88
DE
14409 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14410
c5f62d5f
DE
14411 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14412 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14413 warning ifndef __NR_tkill. Move setting of errno there too.
14414 Delete unnecessary resetting of errno after syscall.
14415 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14416
10e86dd7
DE
14417 * configure.ac: Check for dladdr.
14418 * config.in: Regenerate.
14419 * configure: Regenerate.
14420 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14421 (try_thread_db_load): Update.
14422
4ee62156
DE
14423 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14424
00f515da
DE
144252009-12-18 Doug Evans <dje@google.com>
14426
e9464885
DE
14427 * event-loop.c: Include unistd.h if it exists.
14428
07d4f67e
DE
14429 * linux-low.c (my_waitpid): Move definition away from being in
14430 between linux_tracefork_child/linux_test_for_tracefork.
14431
00f515da
DE
14432 * gdb_proc_service.h (psaddr_t): Fix type.
14433 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14434 signature to match glibc.
14435
1de1badb
DE
144362009-12-16 Doug Evans <dje@google.com>
14437
14438 * linux-low.c (linux_read_memory): Fix argument to read.
14439
aeeb81d1
PA
144402009-11-26 Pedro Alves <pedro@codesourcery.com>
14441
14442 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14443 events, don't leave current_inferior pointing at null.
14444
10357975
PA
144452009-11-26 Pedro Alves <pedro@codesourcery.com>
14446
14447 * win32-low.c (LOG): Delete.
14448 (OUTMSG): Output to stderr.
14449 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14450 on compile time LOG macro.
14451 (win32_wait): Fix debug output.
14452
cf6e3471
PA
144532009-11-26 Pedro Alves <pedro@codesourcery.com>
14454
14455 * win32-low.c (win32_add_one_solib): If the dll name is
14456 "ntdll.dll", prepend the system directory to the dll path.
14457
0c85e18e
MK
144582009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14459
14460 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14461
9ac544ce 144622009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14463 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14464
14465 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14466 * configure.ac: Check for __mcoldfire__ and set
14467 gdb_cv_m68k_is_coldfire.
14468 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14469 reg-cf.o and reg-m68k.o.
14470 * configure: Regenerated.
14471
fd7dd3e6
PA
144722009-11-16 Pedro Alves <pedro@codesourcery.com>
14473
14474 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14475 Pass it to thread_db_free.
14476 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14477 proper `detaching' argument to linux_remove_process.
14478 * linux-low.h (thread_db_free): Add `detaching' parameter.
14479 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14480 to thread_db_free.
14481 (thread_db_free): Add `detaching' parameter. Only
14482 call td_ta_clear_event if detaching from process.
14483
75aa492e
MK
144842009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14485
14486 * thread-db.c (thread_db_free): Fix typo.
14487
21e1bee4
PP
144882009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14489
14490 PR gdb/10838
14491 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14492
8838b45e
NS
144932009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14494
14495 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14496 with an i686 compiler.
14497 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14498 needed.
14499 * configure: Rebuilt.
14500
8a35fb51
SL
145012009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14502
14503 PR gdb/10783
14504
14505 * server.c (handle_search_memory_1): Correct read_addr initialization
14506 in loop for searching subsequent chunks.
14507
96f15937
PP
145082009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14509
14510 * configure.ac: New --with-libthread-db option.
14511 * thread-db.c: Allow direct dependence on libthread_db.
14512 (thread_db_free): Adjust.
14513 * config.in: Regenerate.
14514 * configure: Likewise.
889bf7c5 14515
5f7d1694
PP
145162009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14517
14518 PR gdb/10757
14519 * thread-db.c (attach_thread): New function.
14520 (maybe_attach_thread): Return success/failure.
14521 (find_new_threads_callback): Adjust.
889bf7c5
PA
14522 (thread_db_find_new_threads): Loop until no new threads.
14523
88e3b899
PA
145242009-10-13 Pedro Alves <pedro@codesourcery.com>
14525
14526 * proc-service.c (ps_lgetregs): Formatting.
14527
cdbfd419
PP
145282009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14529
14530 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14531 * configure.ac: Adjust.
14532 * linux-low.h (struct process_info_private): Move members to struct
14533 thread_db.
14534 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14535 * linux-low.c (linux_remove_process): Adjust.
14536 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14537 * server.c (handle_query): Move code ...
14538 (handle_monitor_command): ... here. New function.
14539 * target.h (struct target_ops): New member.
14540 * thread-db.c (struct thread_db): New.
14541 (libthread_db_search_path): New variable.
14542 (thread_db_create_event, thread_db_enable_reporting)
14543 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14544 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14545 (try_thread_db_load_1, dladdr_to_soname): New functions.
14546 (try_thread_db_load, thread_db_load_search): New functions.
14547 (thread_db_init): Search for libthread_db.
14548 (thread_db_free): New function.
14549 (thread_db_handle_monitor_command): Likewise.
14550 * config.in: Regenerate.
14551 * configure: Regenerate.
889bf7c5 14552
4168d2d6
UW
145532009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14554
14555 * spu-low.c (spu_kill): Wait for inferior to terminate.
14556 Call clear_inferiors.
14557 (spu_detach): Call clear_inferiors.
14558
81ecdfbb
RW
145592009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14560
14561 * aclocal.m4: Regenerate.
14562 * config.in: Likewise.
14563 * configure: Likewise.
14564
0b9ff2c0
UW
145652009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14566
14567 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14568 (parse_spufs_run): New function.
14569 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14570 (ppc_breakpoint_at): Handle SPU breakpoints.
14571
efcbbd14
UW
145722009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14573
14574 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14575 (SPUFS_MAGIC): Define.
14576 (spu_enumerate_spu_ids): New function.
14577 (linux_qxfer_spu): New function.
14578 (linux_target_ops): Install linux_qxfer_spu.
14579
f4d9bade
UW
145802009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14581
14582 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14583 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14584 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14585 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14586 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14587 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14588 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14589 (init_registers_powerpc_cell32l): Add prototype.
14590 (init_registers_powerpc_cell64l): Likewise.
14591 (ppc_arch_setup): Detect Cell/B.E. architecture.
14592
96e946ca
RW
145932009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14594
14595 * Makefile.in (datarootdir): New variable.
14596
58d6951d
DJ
145972009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14598
14599 * linux-low.c (linux_write_memory): Update debugging output.
14600 * Makefile.in (clean): Add new descriptions.
14601 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14602 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14603 * configure.srv: Add new files for arm*-*-linux*.
14604 * linux-arm-low.c: Add new declarations.
14605 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14606 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14607 (HWCAP_VFPv3D16): New.
14608 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14609 instead of __IWMMXT__.
14610 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14611 (arm_arch_setup): New.
14612 (target_regsets): Remove #ifdef. Add VFP regset.
14613 (the_low_target): Use arm_arch_setup.
14614
12b42a12
DJ
146152009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14616
14617 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14618 the main thread again.
14619
ac8c974e
AR
146202009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14621
14622 Adding Neutrino gdbserver.
14623 * configure: Regenerated.
14624 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14625 * configure.srv (i[34567]86-*-nto*): New target.
14626 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14627 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14628 (nto_comctrl) [__QNX__]: New function.
14629 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14630
4424e0c3 146312009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14632
14633 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14634 srv_tgtobj.
14635
912cf4ba
PA
146362009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14637 Pedro Alves <pedro@codesourcery.com>
14638
14639 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14640 don't support CONTEXT_EXTENDED_REGISTERS.
14641 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14642 (the_low_target): Install them.
14643 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14644 failing with ERROR_PIPE_NOT_CONNECTED.
14645
aa5ca48f
DE
146462009-06-30 Doug Evans <dje@google.com>
14647 Pierre Muller <muller@ics.u-strasbg.fr>
14648
14649 Add h/w watchpoint support to x86-linux, win32-i386.
14650 * Makefile.in (SFILES): Add i386-low.c
14651 (i386_low_h): Define.
14652 (i386-low.o): Add dependencies.
14653 (linux-x86-low.o): Add i386-low.h dependency.
14654 (win32-i386-low.o): Ditto.
14655 * i386-low.c: New file.
14656 * i386-low.h: New file.
14657 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14658 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14659 * linux-low.c (linux_add_process): Initialize arch_private.
14660 (linux_remove_process): Free arch_private.
14661 (add_lwp): Initialize arch_private.
14662 (delete_lwp): Free arch_private.
14663 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14664 provided.
14665 * linux-low.h (process_info_private): New member arch_private.
14666 (lwp_info): New member arch_private.
14667 (linux_target_ops): New members new_process, new_thread,
14668 prepare_to_resume.
14669 (ptid_of): New macro.
14670 * linux-x86-low.c: Include stddef.h, i386-low.h.
14671 (arch_process_info): New struct.
14672 (arch_lwp_info): New struct.
14673 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14674 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14675 (i386_dr_low_get_status): New function.
14676 (x86_insert_point, x86_remove_point): New functions.
14677 (x86_stopped_by_watchpoint): New function.
14678 (x86_stopped_data_address): New function.
14679 (x86_linux_new_process, x86_linux_new_thread): New functions.
14680 (x86_linux_prepare_to_resume): New function.
14681 (the_low_target): Add entries for insert_point, remove_point,
14682 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14683 prepare_to_resume.
14684 * server.c (debug_hw_points): New global.
14685 (monitor_show_help): Document set debug-hw-points.
14686 (handle_query): Process "set debug-hw-points".
14687 * server.h (debug_hw_points): Declare.
14688 (paddress): Declare.
14689 * utils.c (NUMCELLS, CELLSIZE): New macros.
14690 (get_sell, xsnprintf, paddress): New functions.
14691 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14692 remove_point, stopped_by_watchpoint, stopped_data_address.
14693 * win32-i386-low.c: Include i386-low.h.
14694 (debug_reg_state): Replaces dr.
14695 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14696 (i386_dr_low_get_status): New function.
14697 (i386_insert_point, i386_remove_point): New functions.
14698 (i386_stopped_by_watchpoint): New function.
14699 (i386_stopped_data_address): New function.
14700 (i386_initial_stuff): Update.
14701 (get_thread_context,set_thread_context,i386_thread_added): Update.
14702 (the_low_target): Add entries for insert_point,
14703 remove_point, stopped_by_watchpoint, stopped_data_address.
14704 * win32-low.c (win32_insert_watchpoint): New function.
14705 (win32_remove_watchpoint): New function.
14706 (win32_stopped_by_watchpoint): New function.
14707 (win32_stopped_data_address): New function.
14708 (win32_target_ops): Add entries for insert_watchpoint,
14709 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14710 * win32-low.h (win32_target_ops): New members insert_point,
14711 remove_point, stopped_by_watchpoint, stopped_data_address.
14712
d993e290
PA
147132009-06-25 Pedro Alves <pedro@codesourcery.com>
14714
14715 * server.c (process_serial_event): Re-return unsupported, not
14716 error, if the type isn't recognized. Re-allow supporting only
14717 insert or remove packets. Also call require_running for
14718 breakpoints. Add missing break statement to default case. Tidy.
14719 * target.h (struct target_ops): Rename insert_watchpoint to
14720 insert_point, and remove_watchpoint to remove_point.
14721
14722 * linux-low.h (struct linux_target_ops): Likewise.
14723 * linux-low.c (linux_insert_watchpoint): Rename to ...
14724 (linux_insert_point): ... this. Adjust.
14725 (linux_remove_watchpoint): Rename to ...
14726 (linux_remove_point): ... this. Adjust.
14727 (linux_target_ops): Adjust.
14728 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14729 (cris_insert_point): ... this.
14730 (cris_remove_watchpoint): Rename to ...
14731 (cris_remove_point): ... this.
14732 (the_low_target): Adjust.
14733
0f54c268
PM
147342009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14735
14736 * server.c (handle_v_kill): Pass signal_pid to
14737 kill_inferior if multi_process is zero.
14738
c6314022
AR
147392009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14740
14741 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14742 * target.h (target_ops): Comment for *_watchpoint to make it clear
14743 the functions can get types '0' and '1'.
14744
4463ce24
AR
147452009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14746
14747 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14748 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14749 * regcache.c (get_regcache): Likewise.
14750 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14751 * win32-low.c (child_fetch_inferior_registers): Remove check for
14752 regno 0.
14753
cf8fd78b
PA
147542009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14755 Pedro Alves <pedro@codesourcery.com>
14756
14757 * target.h (struct target_ops) <supports_multi_process>: New
14758 callback.
14759 (target_supports_multi_process): New.
14760 * server.c (handle_query): Even if GDB reports support, only
14761 enable multi-process if the target also supports it. Report
14762 multi-process support only if the target backend supports it.
14763 * linux-low.c (linux_supports_multi_process): New function.
14764 (linux_target_ops): Install it as target_supports_multi_process
14765 callback.
14766
47c0c975
DE
147672009-05-24 Doug Evans <dje@google.com>
14768
e09875d4
DE
14769 Global renaming of find_thread_pid to find_thread_ptid.
14770 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14771 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14772 All callers updated.
14773
e27d73f6
DE
14774 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14775 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14776 directly.
14777
47c0c975
DE
14778 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14779 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14780 (linux_resume_one_lwp): Ditto.
14781
2acc282a
DE
147822009-05-23 Doug Evans <dje@google.com>
14783
14784 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14785 from struct inferior_list_entry * to struct lwp_info *.
14786 All callers updated.
14787
9f1036c1
DE
147882009-05-13 Doug Evans <dje@google.com>
14789
14790 * linux-x86-low.c: Don't include assert.h.
14791 (x86_siginfo_fixup): Use fatal, not assert.
14792 (x86_arch_setup): Fix comment.
14793
d0722149
DE
147942009-05-12 Doug Evans <dje@google.com>
14795
14796 Biarch support for i386/amd64 gdbserver.
14797 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14798 Add linux-x86-low.c.
14799 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14800 (linux-x86-low.o): Add.
14801 * linux-x86-64-low.c: Delete.
14802 * linux-i386-low.c: Delete.
14803 * linux-x86-low.c: New file.
14804 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14805 linux-x86-low.o.
14806 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14807 linux-x86-low.o.
14808 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14809 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14810 (linux_child_pid_to_exec_file): New function.
14811 (elf_64_header_p, elf_64_file_p): New functions.
14812 (siginfo_fixup): New function.
14813 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14814 give target a chance to convert layout.
14815 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14816 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14817
fdeb2a12
DE
148182009-05-07 Doug Evans <dje@google.com>
14819
14820 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14821 (regsets_store_inferior_registers): Ditto.
14822
a6dbe5df
PA
148232009-05-06 Pedro Alves <pedro@codesourcery.com>
14824
14825 PR server/10048
14826
14827 * linux-low.c (must_set_ptrace_flags): Delete.
14828 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14829 of the global.
14830 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14831 `lwp->must_set_ptrace_flags' instead.
ba42693b 14832 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14833 (linux_wait_1): ... not here.
14834
5091eb23
DE
148352009-04-30 Doug Evans <dje@google.com>
14836
9f767825
DE
14837 * inferiors.c (started_inferior_callback): New function.
14838 (attached_inferior_callback): New function.
14839 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14840 * server.c (print_started_pid, print_attached_pid): New functions.
14841 (detach_or_kill_for_exit): New function.
14842 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14843 * server.h (have_started_inferiors_p): Declare.
14844 (have_attached_inferiors_p): Declare.
14845
5091eb23
DE
14846 * inferiors.c (remove_process): Fix memory leak, free process.
14847 * linux-low.c (linux_remove_process): New function.
14848 (linux_kill): Call it instead of remove_process.
14849 (linux_detach, linux_wait_1): Ditto.
14850
155c8968
PA
148512009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14852
14853 * configure.srv: Add x86 Windows CE target.
14854
7fe519cb
UW
148552009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14856
14857 * inferiors.c (get_thread_process): Make global.
14858 * server.h (get_thread_process): Add prototype.
14859 * thread-db.c (find_one_thread): Use get_thread_process
14860 instead of current_process.
14861 (thread_db_get_tls_address): Do not crash if called when
14862 thread layer is not yet initialized.
14863
5472f405
UW
148642009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14865
14866 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14867 * spu-low.c (current_tid): Rename to ...
14868 (current_ptid): ... this.
14869 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14870 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14871 ptid_get_lwp (current_ptid) instead of current_tid.
14872 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14873 instead of current_tid. Use find_process_pid to verify pid
14874 argument is valid. Pass proper argument to remove_process.
14875 (spu_thread_alive): Compare current_ptid instead of current_tid.
14876 (spu_resume): Likewise.
14877
55ac2b99
PA
148782009-04-02 Pedro Alves <pedro@codesourcery.com>
14879
14880 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14881 variable.
14882
95954743
PA
148832009-04-01 Pedro Alves <pedro@codesourcery.com>
14884
14885 Implement the multiprocess extensions, and add linux multiprocess
14886 support.
14887
14888 * server.h (ULONGEST): Declare.
14889 (struct ptid, ptid_t): New.
14890 (minus_one_ptid, null_ptid): Declare.
14891 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14892 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14893 (struct inferior_list_entry): Change `id' type from unsigned from
14894 to ptid_t.
14895 (struct sym_cache, struct breakpoint, struct
14896 process_info_private): Forward declare.
14897 (struct process_info): Declare.
14898 (current_process): Declare.
14899 (all_processes): Declare.
14900 (initialize_inferiors): Declare.
14901 (add_thread): Adjust to use ptid_t.
14902 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14903 (add_process, remove_process, find_thread_pid): Declare.
14904 (find_inferior_id): Adjust to use ptid_t.
14905 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14906 (multi_process): Declare.
14907 (push_event): Adjust to use ptid_t.
14908 (read_ptid, write_ptid): Declare.
14909 (prepare_resume_reply): Adjust to use ptid_t.
14910 (clear_symbol_cache): Declare.
14911 * inferiors.c (all_processes): New.
14912 (null_ptid, minus_one_ptid): New.
14913 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14914 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14915 (add_thread): Change unsigned long to ptid. Remove gdb_id
14916 parameter. Adjust.
14917 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14918 (gdb_id_to_thread): Rename to ...
14919 (find_thread_pid): ... this. Change unsigned long to ptid.
14920 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14921 (loaded_dll, pull_pid_from_list): Adjust.
14922 (add_process, remove_process, find_process_pid)
14923 (get_thread_process, current_process, initialize_inferiors): New.
14924 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14925 (struct target_waitstatus) <related_pid>: Ditto.
14926 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14927 return type to int.
14928 (struct target_ops) <join>: Add `pid' argument.
14929 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14930 (struct target_ops) <wait>: Add `ptid' field. Change return type
14931 to ptid.
14932 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14933 (mywait): Add `ptid' argument. Change return type to ptid_t.
14934 (target_pid_to_str): Declare.
14935 * target.c (set_desired_inferior): Adjust to use ptids.
14936 (mywait): Add new `ptid' argument. Adjust.
14937 (target_pid_to_str): New.
14938 * mem-break.h (free_all_breakpoints): Declare.
14939 * mem-break.c (breakpoints): Delelete.
14940 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14941 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14942 to use per-process breakpoint list.
14943 (free_all_breakpoints): New.
14944 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14945 (symbol_cache, all_symbols_looked_up): Delete.
14946 (hexchars): New.
14947 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14948 read_ptid): New.
14949 (prepare_resume_reply): Change ptid argument's type from unsigned
14950 long to ptid_t. Adjust. Implement W;process and X;process.
14951 (free_sym_cache, clear_symbol_cache): New.
14952 (look_up_one_symbol): Adjust to per-process symbol cache. *
14953 * server.c (cont_thread, general_thread, step_thread): Change type
14954 to ptid_t.
14955 (attached): Delete.
14956 (multi_process): New.
14957 (last_ptid): Change type to ptid_t.
14958 (struct vstop_notif) <ptid>: Change type to ptid_t.
14959 (queue_stop_reply, push_event): Change `ptid' argument's type to
14960 ptid_t.
14961 (discard_queued_stop_replies): Add `pid' argument.
14962 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14963 changes. Don't reference the `attached' global.
14964 (attach_inferior): Adjust to mywait interface changes.
14965 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14966 features. Handle and report "multiprocess+". Handle
14967 "qAttached:PID".
14968 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14969 changes.
14970 (handle_v_kill): New.
14971 (handle_v_stopped): Adjust to use target_pid_to_str.
14972 (handle_v_requests): Allow multiple attaches and runs when
14973 multiprocess extensions are in effect. Handle "vKill".
14974 (myresume): Adjust to use ptids.
14975 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14976 (handle_status): Adjust to discard_queued_stop_replies interface
14977 change.
14978 (first_thread_of, kill_inferior_callback)
14979 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14980 (main): Call initialize_inferiors. Adjust to use ptids, killing
14981 and detaching from all inferiors. Handle multiprocess packet
14982 variants.
14983 * linux-low.h: Include gdb_proc_service.h.
14984 (struct process_info_private): New.
14985 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14986 <lwpid_of>: Use ptid_get_lwp.
14987 (get_lwp_thread): Adjust.
14988 (struct lwp_info): Add `dead' member.
14989 (find_lwp_pid): Declare.
14990 * linux-low.c (thread_db_active): Delete.
14991 (new_inferior): Adjust comment.
14992 (inferior_pid): Delete.
14993 (linux_add_process): New.
14994 (handle_extended_wait): Adjust.
14995 (add_lwp): Change unsigned long to ptid.
14996 (linux_create_inferior): Add process to processes table. Adjust
14997 to use ptids. Don't set new_inferior here.
14998 (linux_attach_lwp): Rename to ...
14999 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15000 it. Adjust to use ptids.
15001 (linux_attach_lwp): New.
15002 (linux_attach): Add process to processes table. Don't set
15003 new_inferior here.
15004 (struct counter): New.
15005 (second_thread_of_pid_p, last_thread_of_process_p): New.
15006 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15007 multiple processes.
15008 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15009 processes. Remove process from process table.
15010 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15011 to multiple processes.
15012 (any_thread_of): New.
15013 (linux_detach): Add `pid' argument, and handle it. Remove process
15014 from processes table.
15015 (linux_join): Add `pid' argument. Handle it.
15016 (linux_thread_alive): Change unsighed long argument to ptid_t.
15017 Consider dead lwps as not being alive.
15018 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15019 threads we're not interested in.
15020 (same_lwp, find_lwp_pid): New.
15021 (linux_wait_for_lwp): Change `pid' argument's type from int to
15022 ptid_t. Adjust.
15023 (linux_wait_for_event): Rename to ...
15024 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15025 from int to ptid_t. Adjust.
15026 (linux_wait_for_event): New.
15027 (linux_wait_1): Add `ptid' argument. Change return type to
15028 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15029 that exit from the process table.
15030 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15031 Adjust.
15032 (mark_lwp_dead): New.
15033 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15034 stopping all threads, mark its main lwp as dead.
15035 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15036 ptids.
15037 (fetch_register, usr_store_inferior_registers)
15038 (regsets_fetch_inferior_registers)
15039 (regsets_store_inferior_registers, linux_read_memory)
15040 (linux_write_memory): Inline `inferior_pid'.
15041 (linux_look_up_symbols): Adjust to use per-process
15042 `thread_db_active'.
15043 (linux_request_interrupt): Adjust to use ptids.
15044 (linux_read_auxv): Inline `inferior_pid'.
15045 (initialize_low): Don't reference thread_db_active.
15046 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15047 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15048 (ps_getpid): Return the pid of the current inferior.
15049 * thread-db.c (proc_handle, thread_agent): Delete.
15050 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15051 per-process data.
15052 (find_one_thread): Change argument type to ptid_t. Adjust to
15053 per-process data.
15054 (maybe_attach_thread): Adjust to per-process data and ptids.
15055 (thread_db_find_new_threads): Ditto.
15056 (thread_db_init): Ditto.
15057 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15058 processes table. Adjust to use ptids.
15059 (spu_kill, spu_detach): Adjust interface. Remove process from
15060 processes table.
15061 (spu_join, spu_thread_alive): Adjust interface.
15062 (spu_wait): Adjust interface. Remove process from processes
15063 table. Adjust to use ptids.
15064 * win32-low.c (current_inferior_tid): Delete.
15065 (current_inferior_ptid): New.
15066 (debug_event_ptid): New.
15067 (thread_rec): Take a ptid. Adjust.
15068 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15069 (child_delete_thread): Ditto.
15070 (do_initial_child_stuff): Add `attached' argument. Add process to
15071 processes table.
15072 (child_fetch_inferior_registers, child_store_inferior_registers):
15073 Adjust.
15074 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15075 (win32_attach): Pass 1 to do_initial_child_stuff.
15076 (win32_kill): Adjust interface. Remove process from processes
15077 table.
15078 (win32_detach): Ditto.
15079 (win32_join): Adjust interface.
15080 (win32_thread_alive): Take a ptid.
15081 (win32_resume): Adjust to use ptids.
15082 (get_child_debug_event): Ditto.
15083 (win32_wait): Adjust interface. Remove exiting process from
15084 processes table.
15085
bd99dc85
PA
150862009-04-01 Pedro Alves <pedro@codesourcery.com>
15087
15088 Non-stop mode support.
15089
15090 * server.h (non_stop): Declare.
15091 (gdb_client_data, handler_func): Declare.
15092 (delete_file_handler, add_file_handler, start_event_loop):
15093 Declare.
15094 (handle_serial_event, handle_target_event, push_event)
15095 (putpkt_notif): Declare.
15096 * target.h (enum resume_kind): New.
15097 (struct thread_resume): Replace `step' field by `kind' field.
15098 (TARGET_WNOHANG): Define.
15099 (struct target_ops) <wait>: Add `options' argument.
15100 <supports_non_stop, async, start_non_stop>: New fields.
15101 (target_supports_non_stop, target_async): New.
15102 (start_non_stop): Declare.
15103 (mywait): Add `options' argument.
15104 * target.c (mywait): Add `options' argument. Print child exit
15105 notifications here.
15106 (start_non_stop): New.
15107 * server.c (non_stop, own_buf, mem_buf): New globals.
15108 (struct vstop_notif): New.
15109 (notif_queue): New global.
15110 (queue_stop_reply, push_event, discard_queued_stop_replies)
15111 (send_next_stop_reply): New.
15112 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15113 interface changes.
15114 (attach_inferior): In non-stop mode, don't wait for the target
15115 here.
15116 (handle_general_set): Handle QNonStop.
15117 (handle_query): When handling qC, return the current general
15118 thread, instead of the first thread of the list.
15119 (handle_query): If the backend supports non-stop mode, include
15120 QNonStop+ in the qSupported query response.
15121 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15122 and non-stop mode.
15123 (handle_v_attach, handle_v_run): Handle non-stop mode.
15124 (handle_v_stopped): New.
15125 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15126 (myresume): Adjust to use resume_kind. Handle non-stop.
15127 (queue_stop_reply_callback): New.
15128 (handle_status): Handle non-stop mode.
15129 (main): Clear non_stop flag on reconnection. Use the event-loop.
15130 Refactor serial protocol handling from here ...
15131 (process_serial_event): ... to this new function. When GDB
15132 selects any thread, select one here. In non-stop mode, wait until
15133 GDB acks all pending events before exiting.
15134 (handle_serial_event, handle_target_event): New.
15135 * remote-utils.c (remote_open): Install remote_desc in the event
15136 loop.
15137 (remote_close): Remove remote_desc from the event loop.
15138 (putpkt_binary): Rename to...
15139 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15140 (putpkt_binary): New as wrapper around putpkt_binary_1.
15141 (putpkt_notif): New.
15142 (prepare_resume_reply): In non-stop mode, don't change the
15143 general_thread.
15144 * event-loop.c: New.
15145 * Makefile.in (OBJ): Add event-loop.o.
15146 (event-loop.o): New rule.
15147
15148 * linux-low.h (pid_of): Moved here.
15149 (lwpid_of): New.
15150 (get_lwp_thread): Use lwpid_of.
15151 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15152 * linux-low.c (pid_of): Delete.
15153 (inferior_pid): Use lwpid_of.
15154 (linux_event_pipe): New.
15155 (target_is_async_p): New.
15156 (delete_lwp): New.
15157 (handle_extended_wait): Use lwpid_of.
15158 (add_lwp): Don't set lwpid field.
15159 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15160 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15161 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15162 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15163 first. Adjust to linux_wait_for_event interface changes. Use
15164 lwpid_of.
15165 (linux_detach): Don't delete the main lwp here.
15166 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15167 (status_pending_p): Don't consider explicitly suspended lwps.
15168 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15169 pointer. Add OPTIONS argument. Change return type to int. Use
15170 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15171 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15172 pointer. Add status pointer argument. Return a pid instead of a
15173 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15174 changes. In non-stop mode, don't switch to a random thread.
15175 (linux_wait): Rename to...
15176 (linux_wait_1): ... this. Add target_options argument, and handle
15177 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15178 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15179 clean exit and signal exit code. Don't stop all threads in
15180 non-stop mode. In all-stop mode, only stop all threads when
15181 reporting a stop to GDB. Handle explicit thread stop requests.
15182 (async_file_flush, async_file_mark): New.
15183 (linux_wait): New.
15184 (send_sigstop): Use lwpid_of.
15185 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15186 interface changes. In non-stop mode, don't switch to a random
15187 thread.
15188 (linux_resume_one_lwp): Use lwpid_of.
15189 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15190 (linux_resume_one_thread): ... this. Handle resume_stop. In
15191 non-stop mode, don't look for pending flag in all threads.
15192 (resume_status_pending_p): Don't consider explicitly suspended
15193 threads.
15194 (my_waitpid): Reimplement. Emulate __WALL.
15195 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15196 Use lwpid_of.
15197 (sigchld_handler, linux_supports_non_stop, linux_async)
15198 (linux_start_non_stop): New.
15199 (linux_target_ops): Register linux_supports_non_stop, linux_async
15200 and linux_start_non_stop.
15201 (initialize_low): Install SIGCHLD handler.
15202 * thread-db.c (thread_db_create_event, find_one_thread)
15203 (thread_db_get_tls_address): Use lwpid_of.
15204 * win32-low.c (win32_detach): Adjust to use resume_kind.
15205 (win32_wait): Add `options' argument.
15206 * spu-low.c (spu_resume): Adjust to use resume_kind.
15207 (spu_wait): Add `options' argument.
15208
5b1c542e
PA
152092009-04-01 Pedro Alves <pedro@codesourcery.com>
15210
15211 Decouple target code from remote protocol.
15212
15213 * target.h (enum target_waitkind): New.
15214 (struct target_waitstatus): New.
15215 (struct target_ops) <wait>: Return an unsigned long. Take a
15216 target_waitstatus pointer instead of a char pointer.
15217 (mywait): Likewise.
15218 * target.c (mywait): Change prototype to return an unsigned long.
15219 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15220 * server.h (thread_from_wait, old_thread_from_wait): Delete
15221 declarations.
15222 (prepare_resume_reply): Change prototype to take a
15223 target_waitstatus.
15224 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15225 (last_status, last_ptid): New.
15226 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15227 pid instead of a signal.
15228 (attach_inferior): Remove "status" and "signal" parameters.
15229 Adjust.
15230 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15231 not as an address.
15232 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15233 (handle_v_requests, myresume): Remove "status" and "signal"
15234 parameters. Adjust.
15235 (handle_status): New.
15236 (main): Delete local `status'. Adjust.
15237 * remote-utils.c: Include target.h.
15238 (prepare_resume_reply): Change prototype to take a
15239 target_waitstatus. Adjust.
15240
15241 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15242 interface.
15243 * spu-low.c (spu_wait): Adjust.
15244 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15245 Delete.
15246 (win32_wait): Adjust.
15247
2bd7c093
PA
152482009-04-01 Pedro Alves <pedro@codesourcery.com>
15249
15250 * target.h (struct thread_resume): Delete leave_stopped member.
15251 (struct target_ops): Add a `n' argument to the `resume' callback.
15252 * server.c (start_inferior): Adjust.
15253 (handle_v_cont, myresume): Adjust.
15254 * linux-low.c (check_removed_breakpoint): Adjust to resume
15255 interface change, and to removed leave_stopped field.
15256 (resume_ptr): Delete.
15257 (struct thread_resume_array): New.
15258 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15259 resume interface change.
15260 (linux_continue_one_thread, linux_queue_one_thread)
15261 (resume_status_pending_p): Check if the resume field is NULL
15262 instead of checking the leave_stopped member.
15263 (linux_resume): Adjust to the target resume interface change.
15264 * spu-low.c (spu_resume): Adjust to the target resume interface
15265 change.
15266 * win32-low.c (win32_detach, win32_resume): Ditto.
15267
c35fafde
PA
152682009-04-01 Pedro Alves <pedro@codesourcery.com>
15269
15270 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15271 flag.
15272 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15273 pending.
15274 (linux_continue_one_thread): Only preserve the stepping flag if
15275 there's a pending breakpoint.
15276
0a59d50b
PA
152772009-03-31 Pedro Alves <pedro@codesourcery.com>
15278
15279 * server.c (main): After the inferior having exited, call
15280 remote_close before exiting gdbserver.
15281
f04c6d38
TJB
152822009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15283
15284 Fix size of FPSCR in Power 7 processors.
15285 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15286 (PPC_FEATURE_HAS_DFP): New #define.
15287 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15288 size of the FPSCR.
15289
78e5cee6
PA
152902009-03-23 Pedro Alves <pedro@codesourcery.com>
15291
15292 * server.c (handle_query) Whitespace and formatting.
15293
1b3f6016
PA
152942009-03-22 Pedro Alves <pedro@codesourcery.com>
15295
15296 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15297 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15298 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15299 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15300 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15301 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15302 Makefile.in, configure.ac: Fix whitespace throughout.
15303 * configure: Regenerate.
15304
a07b2135
PA
153052009-03-22 Pedro Alves <pedro@codesourcery.com>
15306
15307 * inferiors.c (find_inferior): Make it safe for the callback
15308 function to delete the currently iterated inferior.
15309
67cc2626
PA
153102009-03-22 Pedro Alves <pedro@codesourcery.com>
15311
15312 * Makefile.in (linuw_low_h): Move higher.
15313 (thread-db.o): Depend on $(linux_low_h).
15314
54a0b537
PA
153152009-03-17 Pedro Alves <pedro@codesourcery.com>
15316
15317 Rename "process" to "lwp" throughout.
15318
15319 * linux-low.c (all_processes): Rename to...
15320 (all_lwps): ... this.
15321 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15322 (add_process): Rename to ...
15323 (add_lwp): ... this. Adjust.
15324 (linux_create_inferior): Adjust.
15325 (linux_attach_lwp): Adjust.
15326 (linux_attach): Adjust.
15327 (linux_kill_one_process): Rename to ...
15328 (linux_kill_one_lwp): ... this. Adjust.
15329 (linux_kill): Adjust.
15330 (linux_detach_one_process): Rename to ...
15331 (linux_detach_one_lwp): ... this. Adjust.
15332 (linux_detach): Adjust.
15333 (check_removed_breakpoint): Adjust.
15334 (status_pending_p): Adjust.
15335 (linux_wait_for_process): Rename to ...
15336 (linux_wait_for_lwp): ... this. Adjust.
15337 (linux_wait_for_event): Adjust.
15338 (send_sigstop): Adjust.
15339 (wait_for_sigstop): Adjust.
15340 (stop_all_processes): Rename to ...
15341 (stop_all_lwps): ... this.
15342 (linux_resume_one_process): Rename to ...
15343 (linux_resume_one_lwp): ... this. Adjust.
15344 (linux_set_resume_request, linux_continue_one_thread)
15345 (linux_queue_one_thread, resume_status_pending_p)
15346 (usr_store_inferior_registers, regsets_store_inferior_registers)
15347 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15348 Adjust.
15349 * linux-low.h (get_process): Rename to ...
15350 (get_lwp): ... this. Adjust.
15351 (get_thread_process): Rename to ...
15352 (get_thread_lwp): ... this. Adjust.
15353 (get_process_thread): Rename to ...
15354 (get_lwp_thread): ... this. Adjust.
15355 (struct process_info): Rename to ...
15356 (struct lwp_info): ... this.
15357 (all_processes): Rename to ...
15358 (all_lwps): ... this.
15359 * proc-service.c (ps_lgetregs): Adjust.
15360 * thread-db.c (thread_db_create_event, find_one_thread)
15361 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15362
0b16c5cf
PA
153632009-03-14 Pedro Alves <pedro@codesourcery.com>
15364
15365 * server.c (handle_query): Handle "qAttached".
15366
32de4b9d
NS
153672009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15368
15369 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15370 GPLv3, update license URL.
15371
2aecd87f
DE
153722009-03-01 Doug Evans <dje@google.com>
15373
93efd302 15374 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15375 (server_h): Add gdb_signals.h.
15376 (signals.o): Update.
15377 * server.h (target_signal_from_host,target_signal_to_host_p)
15378 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15379
86b1f9c5
PM
153802009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15381
15382 * remote-utils.c (getpkt): Also generate remote-debug
15383 information if noack_mode is set.
15384
4aa995e1
PA
153852009-02-06 Pedro Alves <pedro@codesourcery.com>
15386
15387 * server.c (handle_query): Report qXfer:siginfo:read and
15388 qXfer:siginfo:write as supported and handle them.
15389 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15390 * linux-low.c (linux_xfer_siginfo): New.
15391 (linux_target_ops): Set it.
15392
62709adf
PA
153932009-01-26 Pedro Alves <pedro@codesourcery.com>
15394
15395 * server.c (gdbserver_usage): Mention --remote-debug.
15396 (main): Accept '--remote-debug' switch.
15397
aef93bd7
DE
153982009-01-18 Doug Evans <dje@google.com>
15399
15400 * regcache.c (new_register_cache): No need to check result of xcalloc.
15401 * server.c (handle_search_memory): Back out calls to xmalloc,
15402 result is checked and error is returned to user upon failure.
15403 (handle_query): Ditto. Add more checks for result of malloc.
15404 (handle_v_cont): Check result of malloc, report error back to
15405 user upon failure.
15406 (handle_v_run): Ditto. Call freeargv.
15407 * server.h (freeargv): Declare.
15408 * utils.c (freeargv): New fn.
15409
54363045
DE
154102009-01-15 Doug Evans <dje@google.com>
15411
f626972c
DE
15412 * gdbreplay.c (perror_with_name): Make arg const char *.
15413 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15414 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15415 * utils.c (perror_with_name): Make arg const char *.
54363045 15416
18aae699
PA
154172009-01-14 Pedro Alves <pedro@codesourcery.com>
15418
15419 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15420 when handling a EXIT_PROCESS_DEBUG_EVENT.
15421
ff703abe
JB
154222009-01-06 Joel Brobecker <brobecker@adacore.com>
15423
15424 * gdbreplay.c (gdbreplay_version): Update copyright year.
15425 * server.c (gdbserver_version): Likewise.
15426
f21cc1a2 154272009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15428
15429 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15430 (handle_extended_wait): Improve comment.
0e21c1ec 15431
bca929d3
DE
154322008-12-13 Doug Evans <dje@google.com>
15433
15434 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15435 * server.h (ATTR_MALLOC): New macro.
15436 (xmalloc,xcalloc,xstrdup): Declare.
15437 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15438 * inferiors.c: Ditto.
15439 * linux-low.c: Ditto.
15440 * mem-break.c: Ditto.
15441 * regcache.c: Ditto.
15442 * remote-utils.c: Ditto.
15443 * server.c: Ditto.
15444 * target.c: Ditto.
15445 * win32-low.c: Ditto.
15446
97438e3f
DE
154472008-12-12 Doug Evans <dje@google.com>
15448
896c7fbb
DE
15449 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15450 in debugging printf.
15451
97438e3f
DE
15452 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15453
e3b886f8
DE
154542008-12-09 Doug Evans <dje@google.com>
15455
15456 * linux-low.h (struct process_info): Delete member tid, unused.
15457 * thread-db.c (find_one_thread): Update.
15458 (maybe_attach_thread): Update.
15459
07e059b5
VP
154602008-12-02 Pedro Alves <pedro@codesourcery.com>
15461
889bf7c5
PA
15462 * target.h (struct target_ops): Add qxfer_osdata member.
15463 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15464 and dirent.h.
15465 (linux_qxfer_osdata): New functions.
15466 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15467 callback.
15468 * server.c (handle_query): Handle "qXfer:osdata:read:".
15469 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15470 (buffer_xml_printf): New functions.
15471 * server.h (struct buffer): New.
15472 (buffer_grow_str, buffer_grow_str0): New macros.
15473 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15474 (buffer_xml_printf): Declare.
07e059b5 15475
4cab47ab
DE
154762008-11-24 Doug Evans <dje@google.com>
15477
15478 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15479
f142445f
DJ
154802008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15481
15482 * server.c (handle_v_run): Always use the supplied argument list.
15483
d0107bb6 154842008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15485
d0107bb6
BW
15486 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15487 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15488
2c4ad781
TJB
154892008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15490
15491 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15492 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15493 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15494 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15495 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15496 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15497 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15498 XML target descriptions.
15499 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15500 when inferior is running on an ISA 2.05 or later processor. Add
15501 special case to return offset for full 64-bit slot of FPSCR when
15502 in 32-bits.
15503
dfb64f85
DJ
155042008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15505
15506 * Makefile.in (SFILES, clean): Added sparc64 files.
15507 (reg-sparc64.o, reg-sparc64.c): New.
15508 * configure.srv (sparc*-*-linux*): New configuration.
15509 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15510 syscall arguments for SPARC.
15511 (regsets_store_inferior_registers): Likewise.
15512 * linux-sparc-low.c: New file.
15513
66b6e1dd
DE
155142008-10-21 Doug Evans <dje@google.com>
15515
15516 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15517 (READLINE_DIR,READLINE_DEP): Delete.
15518 (INTERNAL_CFLAGS): Update.
15519 (LINTFLAGS): Update.
15520
9b710a42
PA
155212008-10-10 Pedro Alves <pedro@codesourcery.com>
15522
15523 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15524 whole argv from the last run, not just argv[0].
15525
5822d809
PA
155262008-09-08 Pedro Alves <pedro@codesourcery.com>
15527
15528 * regcache.c (new_register_cache): Return NULL if the register
15529 cache size isn't known yet.
15530 (free_register_cache): Avoid dereferencing a NULL regcache.
15531
74aac56f
DJ
155322008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15533
15534 * configure.srv: Merge MIPS and MIPS64.
15535
400b20f5
MR
155362008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15537
15538 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15539
677c5bb1
LM
155402008-08-18 Luis Machado <luisgpm@br.ibm.com>
15541
15542 * Makefile.in: Add required vsx dependencies.
15543
15544 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15545 Declare init_registers_powerpc_vsx32l.
15546 Declare init_registers_powerpc_vsx64l.
15547 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15548 (ppc_arch_setup): Check for VSX in hwcap.
15549 (ppc_fill_vsxregset): New function.
15550 (ppc_store_vsxregset): New function.
15551 Add new VSX entry in regset_info target_regsets.
15552
15553 * configure.srv: Add new VSX dependencies.
15554
a6f3e723
SL
155552008-08-12 Pedro Alves <pedro@codesourcery.com>
15556
15557 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15558 (remote_open): Set or clear transport_is_reliable.
15559 (putpkt_binary): Don't expect acks in noack mode.
15560 (getpkt): Don't send ack/nac in noack mode.
15561 * server.c (handle_general_set): Handle QStartNoAckMode.
15562 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15563 qSupported.
15564 (main): Reset noack_mode on every connection.
15565 * server.h (noack_mode): Declare.
15566
a417dc56
RW
155672008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15568
15569 * Makefile.in (GDBREPLAY_OBS): New variable.
15570 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15571
3221518c
UW
155722008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15573 Daniel Jacobowitz <dan@codesourcery.com>
15574
15575 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15576 (usr_store_inferior_registers): Likewise.
15577 (regsets_store_inferior_registers): Likewise.
15578
ec56be1b
PA
155792008-07-31 Rolf Jansen <rj@surtec.com>
15580 Pedro Alves <pedro@codesourcery.com>
15581
15582 * configure.ac: Check for memmem declaration.
15583 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15584 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15585 (disable_packet_qfThreadInfo): Unconditionally compile.
15586 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15587 * configure, config.in: Regenerate.
15588
2fe5e3ff
DE
155892008-07-28 Doug Kwan <dougkwan@google.com>
15590
15591 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15592 (linux_write_memory): Remove declaration of errno.
15593
836acd6d
UW
155942008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15595
15596 * linux-low.c (handle_extended_wait): Do not use "status"
15597 variable uninitialized.
15598
aeba519e
PA
155992008-07-07 Pedro Alves <pedro@codesourcery.com>
15600
15601 * server.c (handle_v_attach): Inhibit reporting dll changes.
15602
db42f210
PA
156032008-06-27 Pedro Alves <pedro@codesourcery.com>
15604
15605 * remote-utils.c (prepare_resume_reply): If requested, don't
15606 output "thread:TID" in the T stop reply.
15607
15608 * server.c (disable_packet_vCont, disable_packet_Tthread)
15609 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15610 (handle_query): If requested, disable support for qC, qfThreadInfo
15611 and qsThreadInfo.
15612 (handle_v_requests): If requested, disable support for vCont.
15613 (gdbserver_show_disableable): New.
15614 (main): Handle --disable-packet and --disable-packet=LIST.
15615
15616 * server.h (disable_packet_vCont, disable_packet_Tthread)
15617 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15618
8e4c5421
CD
156192008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15620
15621 * server.c (gdbserver_usage): Mention --version.
15622
6e23a804
DJ
156232008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15624
15625 * Makefile.in (gdbreplay.o): New rule.
15626
90aa6a40
JM
156272008-06-06 Joseph Myers <joseph@codesourcery.com>
15628
15629 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15630 message, not gdbserver.
15631
c16158bc 156322008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15633 Nathan Sidwell <nathan@codesourcery.com>
15634 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15635
15636 * acinclude.m4: Include ../../config/acx.m4.
15637 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15638 * configure, config.in: Regenerate.
15639 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15640 * server.c (gdbserver_version): Print PKGVERSION.
15641 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15642 (main): Adjust gdbserver_usage calls.
15643 * gdbreplay.c (version, host_name): Add declarations.
15644 (gdbreplay_version, gdbreplay_usage): New.
15645 (main): Accept --version and --help options.
15646
aeb75bf5
DJ
156472008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15648
15649 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15650 (arm_breakpoint_at): Handle Thumb.
15651 (the_low_target): Add comment.
15652
76b233dd
UW
156532008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15654
15655 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15656
08388c79
DE
156572008-05-09 Doug Evans <dje@google.com>
15658
a3c83fae
DE
15659 * server.h (decode_search_memory_packet): Declare.
15660 * remote-utils.c (decode_search_memory_packet): New fn.
15661 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15662 (handle_search_memory): New fn.
15663 (handle_query): Process qSearch:memory packets.
15664
bb9c3d36
UW
156652008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15666
15667 * regcache.c (registers_length): Remove.
15668 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15669 full register packet.
15670 * regcache.h (registers_length): Remove prototype.
15671 * server.h (PBUFSIZ): Define to 16384.
15672
7284e1be
UW
156732008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15674
15675 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15676 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15677 powerpc-64l.o, and powerpc-altivec64l.o.
15678 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15679 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15680 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15681 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15682 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15683 to srv_xmlfiles.
15684
15685 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15686 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15687 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15688 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15689 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15690 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15691 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15692 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15693 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15694 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15695 (clean): Update.
15696
15697 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15698 (init_registers_powerpc_32l): ... this new prototype.
15699 (init_registers_powerpc_32): Remove, replace by ...
15700 (init_registers_powerpc_altivec32l): ... this new prototype.
15701 (init_registers_powerpc_e500): Remove, replace by ...
15702 (init_registers_powerpc_e500l): ... this new prototype.
15703 (init_registers_ppc64): Remove, replace by ...
15704 (init_registers_powerpc_64l): ... this new prototype.
15705 (init_registers_powerpc_64): Remove, replace by ...
15706 (init_registers_powerpc_altivec64l): ... this new prototype.
15707 (ppc_num_regs): Set to 73.
15708 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15709 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15710 (ppc_cannot_store_register): Handle orig_r3 and trap.
15711 (ppc_arch_setup): Update init_registers_... calls.
15712 (ppc_fill_gregset): Handle orig_r3 and trap.
15713
15714 * inferiors.c (clear_inferiors): Reset current_inferior.
15715
fdc59709
PB
157162008-04-23 Paolo Bonzini <bonzini@gnu.org>
15717
889bf7c5
PA
15718 * acinclude.m4: Add override.m4.
15719 * configure: Regenerate.
fdc59709 15720
c9b2f845
UW
157212008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15722
15723 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15724 initial call to init_register_ppc64.
15725
550512b8
UW
157262008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15727
43aaf8b6
PA
15728 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15729 single powerpc*-*-linux* case.
550512b8
UW
15730 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15731
b6430ec3
UW
157322008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15733
15734 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15735 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15736 from reg_xmlfiles.
15737 * linux-ppc-low.c: Include <elf.h>.
15738 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15739 (ppc_hwcap): New global variable.
15740 (ppc_regmap): Remove __SPE__ #ifdef sections.
15741 (ppc_regmap_e500): New global variable.
15742 (ppc_cannot_store_register): Update __SPE__ special case.
15743 (ppc_get_hwcap): New function.
15744 (ppc_arch_setup): Use it to determine whether inferior supports
15745 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15746 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15747 Do not access registers if target does not support AltiVec.
15748 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15749 Do not access registers if target does not support SPE.
15750 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15751
52fa2412
UW
157522008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15753
15754 * linux-low.c (disabled_regsets, num_regsets): New.
15755 (use_regsets_p): Delete.
15756 (linux_wait_for_process): Clear disabled_regsets.
15757 (regsets_fetch_inferior_registers): Check and set it.
15758 (regsets_store_inferior_registers): Likewise.
15759 (linux_fetch_registers, linux_store_registers): Do not use
15760 use_regsets_p.
15761 (initialize_low): Allocate disabled_regsets.
15762
e28b3332
DJ
157632008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15764
15765 * Makefile.in (LIBOBJS): New.
15766 (OBS): Use LIBOBJS.
15767 (memmem.o): New rule.
15768 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15769 * configure: Regenerated.
15770
4536995d
UW
157712008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15772
15773 * server.c (handle_query): Never return "unsupported" for
15774 qXfer:features:read queries.
15775
221c031f
UW
157762008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15777
15778 * server.c (get_features_xml): Fix inverted condition.
15779 (handle_query): Always support qXfer:feature:read.
15780
ccd213ac
DJ
157812008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15782
15783 * server.c (wrapper_argv): New.
15784 (start_inferior): Handle wrapper_argv. If set, expect an extra
15785 trap.
15786 (gdbserver_usage): Document --wrapper.
15787 (main): Parse --wrapper.
15788
6fe305f7
UW
157892008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15790
15791 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15792 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15793 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15794 (ppc_set_pc): Likewise.
15795 (ppc_arch_setup): New function.
15796 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15797 of collect_register.
889bf7c5 15798 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15799
5b0a002e
UW
158002008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15801
15802 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15803 instead of linux-ppc64-low.o.
15804 * linux-ppc64-low.c: Remove file.
15805 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15806 (linux-ppc64-low.o): Remove rule.
15807
15808 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15809 (init_registers_powerpc_64): Likewise.
15810 (ppc_regmap): Conditionally define depending on __powerpc64__.
15811 (ppc_cannot_store_register): Do not special-case "fpscr" when
15812 compiled on __powerpc64__.
15813 (ppc_collect_ptrace_register): New function.
15814 (ppc_supply_ptrace_register): New function.
15815 (ppc_breakpoint): Change type to "unsigned int".
15816 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15817 (the_low_target): Conditionally provide initializers for the
889bf7c5 15818 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15819 collect_ptrace_register and supply_ptrace_register members.
15820
9b4b61c8
UW
158212008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15822
15823 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15824 * server.c (gdbserver_xmltarget): Define.
15825 (get_features_xml): Use it to replace "target.xml" and arch_string.
15826
15827 * configure.srv: Remove srv_xmltarget. Add XML files that were
15828 mentioned there to srv_xmlfiles instead. Remove conditional tests
15829 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15830 srv_xmlfiles and srv_regobj to include all possible choices.
15831 * configure.ac (srv_xmltarget): Remove.
15832 (srv_xmlfiles): Do not add "target.xml".
15833 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15834 checks for supplementary target information.
15835 * configure: Regenerate.
15836 * Makefile.in (XML_TARGET): Remove.
15837 (target.xml): Remove rule.
15838 (clean): Do not clean up target.xml.
15839 (.PRECIOUS): Do not mention target.xml.
15840
15841 * target.h (struct target_ops): Remove arch_string member.
15842 * linux-low.c (linux_arch_string): Remove.
15843 (linux_target_ops): Remove arch_string initializer.
15844 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15845 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15846 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15847 * spu-low.c (spu_arch_string): Remove.
15848 (spu_target_ops): Remove arch_string initializer.
15849 * win32-low.c (win32_arch_string): Remove.
15850 (win32_target_ops): Remove arch_string initializer.
15851 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15852 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15853 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15854
ee1a7ae4
UW
158552008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15856
15857 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15858 by collect_ptrace_register and supply_ptrace_register hooks.
15859 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15860 instead of checking for the_low_target.left_pad_xfer.
15861 (usr_store_inferior_registers): Use collect_ptrace_register callback
15862 instead of checking for the_low_target.left_pad_xfer.
15863
15864 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15865 (s390_supply_ptrace_register): Likewise.
15866 (s390_fill_gregset): Call s390_collect_ptrace_register.
15867 (the_low_target): Update.
15868
15869 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15870 (ppc_supply_ptrace_register): Likewise.
15871 (the_low_target): Update.
15872
15873 * linux-i386-low.c (the_low_target): Update.
15874 * linux-x86-64-low.c (the_low_target): Update.
15875
d61ddec4
UW
158762008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15877
15878 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15879 reg-s390.o and reg-s390x.o.
15880
15881 * linux-low.c (new_inferior): New global variable.
15882 (linux_create_inferior, linux_attach): Set it.
15883 (linux_wait_for_process): Call the_low_target.arch_setup after the
15884 target has stopped for the first time.
15885 (initialize_low): Do not call the_low_target.arch_setup.
15886
15887 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15888 (s390_set_pc): Likewise.
15889 (s390_arch_setup): New function.
15890 (the_low_target): Use s390_arch_setup as arch_setup routine.
15891
15892 * regcache.c (realloc_register_cache): New function.
15893 (set_register_cache): Call it for each existing regcache.
15894
d05b4ac3
UW
158952008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15896
15897 * server.h (init_registers): Remove prototype.
15898
15899 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15900 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15901 instead of init_registers ().
15902 * linux-arm-low.c (init_registers_arm): Add prototype.
15903 (init_registers_arm_with_iwmmxt): Likewise.
15904 (the_low_target): Add initializer for arch_setup field.
15905 * linux-cris-low.c (init_registers_cris): Add prototype.
15906 (the_low_target): Add initializer for arch_setup field.
15907 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15908 (the_low_target): Add initializer for arch_setup field.
15909 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15910 (the_low_target): Add initializer for arch_setup field.
15911 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15912 (the_low_target): Add initializer for arch_setup field.
15913 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15914 (the_low_target): Add initializer for arch_setup field.
15915 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15916 (the_low_target): Add initializer for arch_setup field.
15917 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15918 (init_registers_mips64_linux): Likewise.
15919 (the_low_target): Add initializer for arch_setup field.
15920 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15921 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15922 (the_low_target): Add initializer for arch_setup field.
15923 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15924 (init_registers_powerpc_64): Likewise.
15925 (the_low_target): Add initializer for arch_setup field.
15926 * linux-s390-low.c (init_registers_s390): Add prototype.
15927 (init_registers_s390x): Likewise.
15928 (the_low_target): Add initializer for arch_setup field.
15929 * linux-sh-low.c (init_registers_sh): Add prototype.
15930 (the_low_target): Add initializer for arch_setup field.
15931 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15932 (the_low_target): Add initializer for arch_setup field.
15933 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15934 (the_low_target): Add initializer for arch_setup field.
15935
15936 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15937 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15938 instead of init_registers ().
15939 * win32-arm-low.c (init_registers_arm): Add prototype.
15940 (the_low_target): Add initializer for arch_setup field.
15941 * win32-i386-low.c (init_registers_i386): Add prototype.
15942 (the_low_target): Add initializer for arch_setup field.
15943
15944 * spu-low.c (init_registers_spu): Add prototype.
15945 (initialize_low): Call initialie_registers_spu () instead of
15946 initialize_registers ().
15947
fd96d250
PA
159482008-02-19 Pedro Alves <pedro@codesourcery.com>
15949
15950 * server.c (handle_v_requests): When handling the vRun and vAttach
15951 packets, if already debugging a process, don't kill it. Return an
15952 error instead.
15953
d41b6bb4
DJ
159542008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15955
15956 * server.c (handle_query): Correct length check.
15957
5ac588cf
PA
159582008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15959
15960 * win32-low.c (do_initial_child_stuff): Add process handle
15961 parameter. Set current_process_handle and current_process_id from the
15962 parameters. Clear globals.
15963 (win32_create_inferior): Don't set current_process_handle and
15964 current_process_id here. Instead pass them on the call to
15965 do_initial_child_stuff.
15966 (win32_attach): Likewise.
15967 (win32_clear_inferiors): New.
15968 (win32_kill): Don't close the current process handle or the
15969 current thread handle here. Instead call win32_clear_inferiors.
15970 (win32_detach): Don't open a new handle to the process. Call
15971 win32_clear_inferiors.
15972 (win32_join): Don't rely on current_process_handle; open a new
15973 handle using the process id.
15974 (win32_wait): Call win32_clear_inferiors when the inferior process
15975 has exited.
15976
ecd7ecbc
DJ
159772008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15978
15979 * server.c (monitor_show_help): Add "exit".
15980
1525d545
MG
159812008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15982
ecd7ecbc 15983 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15984 (clean): Add reg-xtensa.c.
15985 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15986 * configure.srv (xtensa*-*-linux*) New target.
15987 * linux-xtensa-low.c: New.
15988 * xtensa-xtregs.c: New.
1525d545 15989
59a016f0
PA
159902008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15991
15992 * hostio.c: Don't include errno.h.
15993 (errno_to_fileio_errno): Move to hostio-errno.
15994 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15995 error number outputting to the target->hostio_last_error callback.
15996 (hostio_packet_error): Use FILEIO_EINVAL directly.
15997 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15998 calls to hostio_error.
15999 * hostio-errno.c: New.
16000 * server.h (hostio_last_error_from_errno): Declare.
16001 * target.h (target_ops): Add hostio_last_error member.
16002 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16003 as hostio_last_error handler.
889bf7c5 16004 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
16005 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16006 (wince_hostio_last_error): New functions.
16007 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16008 as hostio_last_error handler.
16009 (win32_target_ops) [!_WIN32_WCE]: Register
16010 hostio_last_error_from_errno as hostio_last_error handler.
16011 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16012 (hostio-errno.o): New rule.
16013 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16014 * configure.srv (srv_hostio_err_objs): New variable. Default to
16015 hostio-errno.o.
16016 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16017 * configure: Regenerate.
16018
2d717e4f
DJ
160192008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16020
16021 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16022 (linux_kill, linux_detach): Clean up the process list.
16023 * remote-utils.c (remote_open): Improve port number parsing.
16024 (putpkt_binary, input_interrupt): Only send interrupts if the target
16025 is running.
16026 * server.c (extended_protocol): Make static.
16027 (attached): Define earlier.
16028 (exit_requested, response_needed, program_argv): New variables.
16029 (target_running): New.
16030 (start_inferior): Clear attached here.
16031 (attach_inferior): Set attached here.
16032 (require_running): Define.
16033 (handle_query): Use require_running and target_running. Implement
16034 "monitor exit".
16035 (handle_v_attach, handle_v_run): New.
16036 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16037 (gdbserver_usage): Update.
16038 (main): Redo argument parsing. Handle --debug and --multi. Handle
16039 --attach along with other options or after the port. Save
16040 program_argv. Support no initial program. Resynchronize
16041 communication with GDB after an error. Handle "monitor exit".
16042 Use require_running and target_running. Always allow the extended
16043 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16044 restart in extended mode.
16045 * README: Refer to the GDB manual. Update --attach usage.
16046
7407e2de
AS
160472007-12-20 Andreas Schwab <schwab@suse.de>
16048
16049 * linux-low.c (STACK_SIZE): Define.
16050 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16051 (linux_test_for_tracefork): Likewise.
16052
b65d95c5
DJ
160532007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16054
16055 * linux-low.c (linux_wait_for_event): Update messages. Do not
16056 reinsert auto-delete breakpoints.
16057 * mem-break.c (struct breakpoint): Change return type of handler to
16058 int.
16059 (set_breakpoint_at): Update handler type.
16060 (reinsert_breakpoint_handler): Return 1 instead of calling
16061 delete_breakpoint.
16062 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16063 setting a new one.
16064 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16065 * mem-break.h (set_breakpoint_at): Update handler type.
16066 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16067 * win32-low.c (auto_delete_breakpoint): New.
16068 (get_child_debug_event): Use it.
16069
4e799345
DJ
160702007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16071
16072 * configure.ac: Check for pread and pwrite.
16073 * hostio.c (handle_pread): Fall back to lseek and read.
16074 (handle_pwrite): Fall back to lseek and write.
16075 * config.in, configure: Regenerated.
16076
27524b67
DJ
160772007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16078
16079 * server.c (myresume): Add own_buf argument.
16080 (main): Update calls.
16081
a20d5e98
DJ
160822007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16083
16084 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16085 * remote-utils.c (remote_open): Do not call disable_async_io.
16086 (block_async_io): Delete.
16087 (unblock_async_io): Make static.
16088 (initialize_async_io): New.
16089 * server.c (handle_v_cont): Handle async I/O here.
16090 (myresume): Likewise. Move other common resume tasks here...
16091 (main): ... from here. Call initialize_async_io. Disable async
16092 I/O before the main loop.
16093 * server.h (initialize_async_io): Declare.
16094 (block_async_io, unblock_async_io): Delete prototypes.
16095 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16096
b79d787e
DJ
160972007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16098
16099 * remote-utils.c (readchar): Allow binary data in received messages.
16100
d97903b2
PA
161012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16102
16103 * win32-low.c (attaching): New global.
16104 (win32_create_inferior): Clear the `attaching' global.
16105 (win32_attach): Set the `attaching' global.
16106 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16107 attaching. Only set a breakpoint at the entry point if not
16108 attaching.
16109
311de423
PA
161102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16111
16112 * server.c (main): Don't report dll events on the initial
16113 connection on attaches.
16114
6c2d16d2
PA
161152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16116
16117 * server.c (main): Relax numerical bases supported for the pid of
16118 the --attach command line argument.
16119
5ca906e6
PA
161202007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16121
16122 * win32-low.c (win32_attach): Call OpenProcess before
16123 DebugActiveProcess, not after. Add last error output to error
16124 call.
16125
9c6c8194
PA
161262007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16127
16128 * win32-low.c (win32_get_thread_context)
16129 (win32_set_thread_context): New functions.
16130 (thread_rec): Use win32_get_thread_context.
16131 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16132 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16133 field.
16134
4d5d1aaa
PA
161352007-12-03 Leo Zayas
16136 Pedro Alves <pedro_alves@portugalmail.pt>
16137
16138 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16139 global variables.
16140 (child_add_thread): Minor cleanup.
16141 (child_continue): Resume artificially suspended threads before
16142 calling ContinueDebugEvent.
16143 (suspend_one_thread): New.
16144 (fake_breakpoint_event): New.
16145 (get_child_debug_event): Change return type to int. Check here if
16146 gdb sent an interrupt request. If a soft interrupt was requested,
16147 fake a breakpoint event. Return 0 if there is no event to handle,
16148 and 1 otherwise.
16149 (win32_wait): Don't check here if gdb sent an interrupt request.
16150 Ensure there is a valid event to handle.
16151 (win32_request_interrupt): Add soft interruption method as last
16152 resort.
16153
c436e841
PA
161542007-12-03 Leo Zayas
16155 Pedro Alves <pedro_alves@portugalmail.pt>
16156
16157 * win32-low.h (win32_thread_info): Add descriptions to the
16158 structure members. Replace `suspend_count' counter by a
16159 `suspended' flag.
16160 * win32-low.c (thread_rec): Update condition of when to get the
16161 context from the inferior. Rely on ContextFlags being set if it
16162 has already been retrieved. Only suspend the inferior thread if
16163 we haven't already. Warn if that fails.
16164 (continue_one_thread): s/suspend_count/suspended/. Only call
16165 ResumeThread once. Warn if that fails.
16166
e7b5fa67
PA
161672007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16168
16169 * win32-low.c (win32_wait): Don't read from the inferior when it
16170 has already exited.
16171
a385171d
PA
161722007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16173
16174 * Makefile.in (win32_low_h): New variable.
16175 (win32-low.o): Add dependency on $(win32_low_h).
16176 (win32-arm-low.o, win32-i386-low.o): New rules.
16177
f80c84b3
DJ
161782007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16179
16180 * hostio.c: Correct copyright year.
16181
a6b151f1
DJ
161822007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16183
16184 * Makefile.in (OBS): Add hostio.o.
16185 (hostio.o): New rule.
16186 * server.h (handle_vFile): Declare.
16187 * hostio.c: New file.
16188 * server.c (handle_v_requests): Take packet_len and new_packet_len
16189 for binary packets. Call handle_vFile.
16190 (main): Update call to handle_v_requests.
16191
f9387fc3
DJ
161922007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16193
16194 * linux-low.c: Include <sched.h>.
16195
51c2684e
DJ
161962007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16197
16198 * linux-low.c (linux_tracefork_grandchild): New.
16199 (linux_tracefork_child): Use clone.
16200 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16201
75f83163
JB
162022007-10-31 Joel Brobecker <brobecker@adacore.com>
16203
16204 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16205
da5898ce
DJ
162062007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16207
16208 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16209
24a09b5f
DJ
162102007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16211
16212 * inferiors.c (change_inferior_id): Delete.
16213 (add_pid_to_list, pull_pid_from_list): New.
16214 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16215 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16216 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16217 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16218 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16219 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16220 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16221 (using_threads): Always set to 1.
16222 (handle_extended_wait): New.
16223 (add_process): Do not set TID.
16224 (linux_create_inferior): Set must_set_ptrace_flags.
16225 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16226 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16227 (linux_thread_alive): Rename TID argument to LWPID.
16228 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16229 (linux_wait_for_event): Do not use TID or check using_threads. Update
16230 call to dead_thread_notify. Call handle_extended_wait.
16231 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16232 (send_sigstop): Delete sigstop_sent.
16233 (wait_for_sigstop): Avoid TID.
16234 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16235 (linux_test_for_tracefork): New.
16236 (linux_lookup_signals): Use thread_db_active and
16237 linux_supports_tracefork_flag.
16238 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16239 * linux-low.h (get_process_thread): Avoid TID.
16240 (struct process_ifo): Move thread_known and tid to the end. Remove
16241 sigstop_sent.
16242 (linux_attach_lwp, thread_db_init): Update prototypes.
16243 * server.h (change_inferior_id): Delete prototype.
16244 (add_pid_to_list, pull_pid_from_list): New prototypes.
16245 * thread-db.c (thread_db_use_events): New.
16246 (find_first_thread): Rename to...
16247 (find_one_thread): ...this. Update callers and messages. Do not
16248 call fatal. Check thread_db_use_events. Do not call
16249 change_inferior_id or new_thread_notify.
16250 (maybe_attach_thread): Update. Do not call new_thread_notify.
16251 (thread_db_init): Set thread_db_use_events. Check use_events.
16252 * utils.c (fatal, warning): Correct message prefix.
16253
30ed0a8f
DJ
162542007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16255
16256 * Makefile.in (clean): Remove new files.
16257 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16258 (powerpc-64.o, powerpc-64.c): New rules.
16259 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16260 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16261 with SPE.
16262 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16263 SPE targets.
16264 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16265 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16266 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16267 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16268 (target_regsets): Add AltiVec and SPE register sets.
16269 * configure.ac: Check for AltiVec and SPE.
16270 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16271 (ppc_fill_vrregset, ppc_store_vrregset): New.
16272 (target_regsets): Add AltiVec register set.
16273 * configure: Regenerated.
16274
fd462a61
DJ
162752007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16276
16277 * linux-low.c (O_LARGEFILE): Define.
16278 (linux_read_memory): Use /proc/PID/mem.
16279 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16280 * configure, config.in: Regenerated.
16281
69f223ed
DJ
162822007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16283
16284 * linux-low.c (linux_wait_for_event): Do not pass signals while
16285 single-stepping.
16286
aec18585
PA
162872007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16288
16289 * win32-low.c (create_process): New.
16290 (win32_create_inferior): Use create_process instead of
16291 CreateProcess. If create_process failed retry appending an ".exe"
16292 suffix. Store the GetLastError result immediatelly after
16293 create_process calls and use it on the call to error.
16294
34d86ddd
PA
162952007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16296
16297 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16298
5a0e3bd0
JB
162992007-08-23 Joel Brobecker <brobecker@adacore.com>
16300
16301 * configure.ac: Switch license to GPLv3.
16302
f88c79e6
MS
163032007-08-01 Michael Snyder <msnyder@access-company.com>
16304
16305 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16306
6b3d9b83
PA
163072007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16308
16309 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16310 typedef.
16311 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16312 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16313 CloseToolhelp32Snapshot.
16314 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16315 CloseToolhelp32Snapshot.
16316
c588c53c
MS
163172007-07-27 Michael Snyder <michael.snyder@access-company.com>
16318
16319 * server.c (main): Check for inferior exit before main loop.
16320
aa0403d9
PA
163212007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16322
16323 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16324 instead of on tmp_desc.
16325
255e7678
DJ
163262007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16327 Daniel Jacobowitz <dan@codesourcery.com>
16328
16329 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16330 (add_thread): Minor cleanups.
16331 (clear_inferiors): Move lower in the file. Clear the DLL
16332 list.
16333 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16334 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16335 (xml_escape_text): New.
16336 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16337 for qSupported.
16338 (handle_v_cont): Report errors.
16339 (gdbserver_version): Update.
16340 (main): Correct size of own_buf. Do not report initial DLL events.
16341 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16342 (unloaded_dll, xml_escape_text): New.
16343 * win32-low.c (enum target_waitkind): Update comments.
16344 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16345 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16346 (win32_EnumProcessModules, win32_GetModuleInformation)
16347 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16348 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16349 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16350 (win32_Module32First, win32_Module32Next, load_toolhelp)
16351 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16352 (get_child_debug_event): Handle DLL events.
16353 (win32_wait): Likewise.
16354
0d37add9
DJ
163552007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16356
16357 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16358 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16359
45e2715e
PA
163602007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16361
16362 * win32-low.c (handle_output_debug_string): Ignore event if not
16363 waiting.
16364
c5674cf1
PA
163652007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16366
16367 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16368
2bbe3cc1
DJ
163692007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16370
16371 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16372
ae13219e
DJ
163732007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16374
16375 * inferiors.c (change_inferior_id): Add comment.
16376 * linux-low.c (check_removed_breakpoint): Add an early
16377 prototype. Improve debug output.
16378 (linux_attach): Doc update.
16379 (linux_detach_one_process, linux_detach): Clean up before releasing
16380 each process.
16381 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16382 * linux-low.h (struct process_info): Doc improvement.
16383 * mem-break.c (delete_all_breakpoints): New.
16384 * mem-break.h (delete_all_breakpoints): New prototype.
16385 * thread-db.c (find_first_thread): New.
16386 (thread_db_create_event): Call it instead of
16387 thread_db_find_new_threads. Clean up unused variables.
16388 (maybe_attach_thread): Remove first thread handling.
16389 (thread_db_find_new_threads): Use find_first_thread.
16390 (thread_db_get_tls_address): Likewise.
16391
4105de34
DJ
163922007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16393
16394 * thread-db.c (thread_db_find_new_threads): Add prototype.
16395 (thread_db_create_event): Check for the main thread before adding
16396 a new thread.
16397 (maybe_attach_thread): Only enable event reporting if TID == 0.
16398 (thread_db_get_tls_address): Check for new threads.
16399
2b876972
DJ
164002007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16401
16402 * linux-low.c (linux_create_inferior): Try execv before execvp.
16403 * spu-low.c (spu_create_inferior): Likewise.
16404
7a245884
DJ
164052007-06-13 Mike Frysinger <vapier@gentoo.org>
16406
16407 * linux-low.c (linux_create_inferior): Change execv to execvp.
16408 * spu-low.c (spu_create_inferior): Likewies.
16409
117ce543
DJ
164102007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16411
16412 * Makefile.in (clean): Clean new files instead of deleted ones.
16413 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16414 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16415 rules.
16416 * configure.srv: Specify XML files and new regformats for MIPS and
16417 MIPS64 GNU/Linux.
16418 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16419 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16420 an entry for the restart register.
16421 (mips_cannot_fetch_register, mips_cannot_store_register)
16422 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16423 register names to match the XML descriptions.
16424 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16425 restart register instead of $0.
16426
0e7f50da
UW
164272007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16428 Markus Deuling <deuling@de.ibm.com>
16429
16430 * remote-utils.c (decode_xfer_write): New function.
16431 * server.h (decode_xfer_write): Add prototype.
16432 * server.c (handle_query): Add PACKET_LEN argument. Support
16433 qXfer:spu:read and qXfer:spu:write packets.
16434 (main): Pass packet_len to handle_query.
16435 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16436 * target.h (target_ops): Add qxfer_spu.
16437
374c1d38
UW
164382007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16439
16440 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16441 accessing non-seekable spufs files.
16442
bb63802a
UW
164432007-05-16 Markus Deuling <deuling@de.ibm.com>
16444
889bf7c5 16445 * server.c (handle_query): Add reply for qC packet.
bb63802a 16446
7390519e
PA
164472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16448 Leo Zayas <lerele@champenstudios@com>
16449
16450 * server.h (check_remote_input_interrupt_request): New function.
16451 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16452 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16453 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16454 (check_remote_input_interrupt_request): New function.
16455 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16456 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16457 winapi_GenerateConsoleCtrlEvent): New typedefs.
16458 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16459 to 250 ms.
16460 (win32_wait): Check for remote interrupt request
16461 with check_remote_input_interrupt_request.
16462 (win32_request_interrupt): New function.
16463 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16464
34b34921
PA
164652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16466
16467 * win32-low.c (debug_registers_changed,
16468 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16469 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16470 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16471 (thread_rec): Get context using the low target.
16472 (child_add_thread): Call thread_added on the low target,
16473 which does the same thing.
16474 (regptr): Delete.
16475 (do_initial_child_stuff): Remove debug registers references.
16476 Set context using the low target. Resume threads after
16477 setting the contexts.
16478 (child_continue): Remove dead variable. Remove debug
16479 registers references.
16480 (child_fetch_inferior_registers): Go through the low target.
16481 (do_child_store_inferior_registers): Remove.
16482 (child_store_inferior_registers): Go through the low target.
16483 (win32_resume): Remove debug registers references.
16484 Set context using the low target.
16485 (handle_exception): Change return type to void. Don't record
16486 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16487 first chance exception.
889bf7c5 16488 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16489 goto loop. Always return after waiting for debug event.
16490 (win32_wait): Convert to switch statement. Handle spurious
16491 events.
16492
16493 * win32-i386-low.c (debug_registers_changed,
16494 debug_registers_used): New.
16495 (initial_stuff): Rename to ...
16496 (i386_initial_stuff): ... this. Clear debug registers
16497 state variables.
16498 (store_debug_registers): Delete.
16499 (i386_get_thread_context): New.
16500 (load_debug_registers): Delete.
16501 (i386_set_thread_context): New.
16502 (i386_thread_added): New.
16503 (single_step): Rename to ...
16504 (i386_single_step): ... this.
16505 (do_fetch_inferior_registers): Rename to ...
16506 (i386_fetch_inferior_register): ... this.
16507 (i386_store_inferior_register): New.
16508 (the_low_target): Adapt to new interface.
16509
16510 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16511 (arm_get_thread_context): New.
16512 (arm_set_thread_context): New.
16513 (regptr): New.
16514 (do_fetch_inferior_registers): Rename to ...
16515 (arm_fetch_inferior_register): ... this.
16516 (arm_store_inferior_register): New.
16517 (arm_wince_breakpoint): Reimplement as unsigned long.
16518 (arm_wince_breakpoint_len): Define.
16519 (the_low_target): Adapt to new interface.
16520
16521 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16522 load_debug_registers. Add get_thread_context, set_thread_context,
16523 thread_added and store_inferior_register. Rename
16524 fetch_inferior_registers to fetch_inferior_register.
16525 (regptr): Remove declaration.
16526
dd6953e1
PA
165272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16528
16529 * linux-low.c (linux_detach): Change return type to int. Return 0.
16530 * spu-low.c (spu_detach): Likewise.
16531
444d6139
PA
165322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16533
16534 * target.h (target_ops): Change return type of detach to int.
16535 Add join.
16536 (join_inferior): New.
16537 * server.c (main): Don't skip detach support on mingw32.
16538 If the inferior doesn't support detaching return error.
16539 Call join_inferior instead of using waitpid.
16540 * linux-low.c (linux_join): New.
16541 (linux_target_op): Add linux_join.
16542 * spu-low.c (spu_join): New.
16543 (spu_target_ops): Add spu_join.
16544 * win32-low.c (win32_detach): Adapt to new interface.
16545 Reopen current_process_handle before detaching. Issue a child
16546 resume before detaching.
16547 (win32_join): New.
16548 (win32_target_op): Add win32_join.
16549
1d5315fe
PA
165502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16551
16552 * win32-low.c (win32-attach): Fix return value.
16553 * target.h (target_ops): Describe ATTACH return values.
16554
bf914831
PA
165552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16556
16557 * win32-low.c (GETPROCADDRESS): Define.
16558 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16559 (winapi_DebugSetProcessKillOnExit): Likewise.
16560 (win32_create_inferior): Force usage of ansi CreateProcessA.
16561 (win32_attach): Use GETPROCADDRESS.
16562 (win32_detach): Likewise.
16563
f72f3e60
PA
165642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16565
16566 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16567
ed50f18f
PA
165682007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16569
16570 * win32-low.c: Commit leftover changes from 2007-03-29.
16571
0c2ead7e
DJ
165722007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16573
16574 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16575 fields short instead of int. Add explicit padding.
16576 (i387_cache_to_fsave): Remove unnecessary casts.
16577 (i387_fsave_to_cache): Doc fix.
16578 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16579
73725ff3
DJ
165802007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16581
16582 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16583 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16584
d99f33d8
PA
165852007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16586
16587 * configure.srv (arm*-*-mingw32ce*): Move near the other
16588 arm targets.
16589
68070c10
PA
165902007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16591
2482afc6 16592 * configure.ac: Add errno checking.
68070c10
PA
16593 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16594 sys/file.h and malloc.h.
16595 (AC_CHECK_DECLS): Add perror.
16596 (srv_mingwce): Handle.
2482afc6 16597 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16598 win32-i386-low.o to srv_tgtobj.
16599 (i[34567]86-*-mingw*): Likewise.
16600 (arm*-*-mingw32ce*): Add case.
16601 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16602 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16603 [__MINGW32CE__] (strerror): New function.
16604 [__MINGW32CE__] (errno): Define to GetLastError.
16605 [__MINGW32CE__] (COUNTOF): New macro.
16606 (remote_open): Remove extra close call.
16607 * mem-break.c (delete_breakpoint_at): New function.
16608 * mem-break.h (delete_breakpoint_at): Declare.
16609 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16610 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16611 [USE_WIN32API] (read, write): Add char* casts.
16612 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16613 * server.h: Include wincecompat.h on Windows CE.
16614 [HAVE_ERRNO_H]: Check.
16615 (perror): Declare if not declared.
16616 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16617 (perror_with_name): Remove errno declaration.
16618 * wincecompat.h: New.
16619 * wincecompat.c: New.
16620 * win32-low.h: New.
16621 * win32-arm-low.c: New.
16622 * win32-i386-low.c: New.
16623 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16624 (OUTMSG2): Make it safe.
16625 (_T): New macro.
16626 (COUNTOF): New macro.
16627 (NUM_REGS): Get it from the low target.
16628 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16629 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16630 (thread_rec): Let low target handle debug registers.
16631 (child_add_thread): Likewise.
16632 (child_init_thread_list): Likewise.
16633 (continue_one_thread): Likewise.
16634 (regptr): New.
16635 (do_child_fetch_inferior_registers): Move to ...
16636 * win32-i386-low.c: ... here, and rename to ...
16637 (do_fetch_inferior_registers): ... this.
889bf7c5 16638 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16639 Go through the low target.
16640 (do_child_store_inferior_registers): Use regptr.
16641 (strwinerror): New function.
16642 (win32_create_inferior): Handle Windows CE.
16643 Use strwinerror instead of strerror on Windows error
16644 codes. Add program to the error output.
16645 Don't close the main thread handle on Windows CE.
16646 (win32_attach): Use coredll.dll on Windows CE.
16647 (win32_kill): Close current process and current
16648 thread handles.
16649 (win32_detach): Use coredll.dll on Windows CE.
16650 (win32_resume): Let low target handle debug registers, and
16651 step request.
16652 (handle_exception): Add/Remove initial breakpoint. Avoid
16653 non-existant WSTOPSIG on Windows CE.
16654 (win32_read_inferior_memory): Cast to remove warning.
16655 (win32_arch_string): Go through the low target.
16656 (initialize_low): Call set_breakpoint_data with the low
16657 target's breakpoint.
16658 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16659 FOP_REGNUM, mappings): Move to ...
16660 * win32-i386-low.c: ... here.
16661 * win32-low.c (win32_thread_info): Move to ...
16662 * win32-low.h: ... here.
16663 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16664 win32-arm-low.c and wincecompat.c.
16665 (all:): Add $EXEEXT.
16666 (install-only:): Likewise.
16667 (gdbserver:): Likewise.
16668 (gdbreplay:): Likewise.
16669 * config.in: Regenerate.
16670 * configure: Regenerate.
16671
41093d81
PA
166722007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16673
16674 * win32-low.c: Rename typedef thread_info to
16675 win32_thread_info throughout.
16676
544afa54
PA
166772007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16678
16679 * win32-i386-low.c: Rename to ...
16680 * win32-low.c: ... this.
16681 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16682 * Makefile.in: Likewise.
16683
bce7165d
PA
166842007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16685
16686 * remote-utils.c (monitor_output): Constify msg parameter.
16687 * server.h (monitor_output): Likewise.
16688 * win32-i386-low.c (handle_output_debug_string): New.
16689 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16690 handle_output_debug_string.
16691 (get_child_debug_event): Likewise.
16692
506c7aa0
DJ
166932007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16694
16695 * server.c (main): Correct strtoul check.
16696
42c81e2a
DJ
166972007-03-27 Jon Ringle <jon@ringle.org>
16698
16699 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16700
9453113a
DJ
167012007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16702
16703 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16704
64a69107
DJ
167052007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16706
16707 * terminal.h: Check HAVE_SGTTY_H.
16708
167092007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16710
16711 * remote-utils.c (remote_open): Print out the assigned port number.
16712
c74d0ad8
DJ
167132007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16714
16715 * remote-utils.c (monitor_output): New function.
16716 * server.c (debug_threads): Define here.
16717 (monitor_show_help): New function.
16718 (handle_query): Handle qRcmd.
16719 (main): Do not handle 'd' packet.
16720 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16721 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16722 of debug_threads.
16723
de7c3b4a
PA
167242007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16725
16726 * Makefile.in (EXEEXT): New.
16727 (clean): Use $(EXEEXT).
16728
ef57601b
PA
167292007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16730
16731 * target.h (target_ops): Rename send_signal to request_interrupt,
16732 and remove enum target_signal parameter.
16733 * linux-low.c (linux_request_interrupt): Rename from
16734 linux_send_signal, and always send SIGINT.
16735 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16736 and always send SIGINT.
16737 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16738 of send_signal.
16739 (input_interrupt): Likewise.
16740
820f2bda
PA
167412007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16742
16743 * server.c (get_features_xml): Check if target implemented
16744 arch_string.
16745 * win32-i386-low.c (win32_arch_string): New.
16746 (win32_target_ops): Add win32_arch_string as arch_string member.
16747
ab39bf24
UW
167482007-02-22 Markus Deuling <deuling@de.ibm.com>
16749
16750 * spu-low.c (spu_arch_string): New.
16751 (spu_target_ops): Add spu_arch_string.
16752
61ff6e04
DJ
167532007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16754
16755 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16756 * configure.ac: Do not check for terminal.h.
16757 * configure, config.in: Regenerated.
16758
fb1e4ffc
DJ
167592007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16760
16761 * Makefile.in (OBS): Add $(XML_BUILTIN).
16762 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16763 (clean): Update.
16764 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16765 (arm-with-iwmmxt.c): New.
16766 * config.in, configure: Regenerate.
16767 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16768 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16769 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16770 (arm*-*-linux*): Add iWMMXt and regset support.
16771 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16772 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16773 (arm_store_wmmxregset, target_regsets): New.
16774 * server.c (get_features_xml): Take annex argument. Check builtin
16775 XML documents.
16776 (handle_query): Handle multiple annexes.
16777
0f48aa01
DJ
167782007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16779
16780 * remote-utils.c [USE_WIN32API] (read, write): Define.
16781 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16782 write.
16783
23181151
DJ
167842007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16785
16786 * linux-i386-low.c (the_low_target): Set arch_string.
16787 * linux-x86-64-low.c (the_low_target): Likewise.
16788 * linux-low.c (linux_arch_string): New.
16789 (linux_target_ops): Add it.
16790 * linux-low.h (struct linux_target_ops): Add arch_string.
16791 * server.c (write_qxfer_response): Use const void * for DATA.
16792 (get_features_xml): New.
16793 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16794 * target.h (struct target_ops): Add arch_string method.
16795
9d606399
DJ
167962007-01-03 Denis Pilat <denis.pilat@st.com>
16797 Daniel Jacobowitz <dan@codesourcery.com>
16798
16799 * linux-low.c (linux_kill): Handle being called with no threads.
16800 * win32-i386-low.c (win32_kill): Likewise.
16801 (get_child_debug_event): Clear current_process_handle.
16802
168032006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16804 Daniel Jacobowitz <dan@codesourcery.com>
16805
16806 * remote-utils.c (remote_open): Check the type of specified
16807 serial port devices before opening them.
16808 * server.c (main): Kill the inferior if an error occurs during
16809 the first remote_open.
16810
a5e13d24
DJ
168112006-12-05 Markus Deuling <deuling@de.ibm.com>
16812
16813 * README: Update supported targets.
16814
186947f7
DJ
168152006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16816
16817 * Makefile.in (clean): Remove reg-mips64.c.
16818 (reg-mips64.c, reg-mips64.o): New rules.
16819 * configure.srv: Handle mips64. Include regset support for mips.
16820 * linux-mips-low.c (union mips_register): New.
16821 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16822 (mips_breakpoint, mips_breakpoint_at): Use int.
16823 (mips_collect_register, mips_supply_register)
16824 (mips_collect_register_32bit, mips_supply_register_32bit)
16825 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16826 (mips_store_fpregset, target_regsets): New.
16827 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16828
a13e2c95
UW
168292006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16830
16831 * configure.srv: Add target "spu*-*-*".
16832 * Makefile.in (clean): Remove reg-spu.c.
16833 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16834 * spu-low.c: New file.
16835
cb7283db
DJ
168362006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16837
16838 * configure.ac: Correct td_thr_tls_get_addr test.
16839 * configure: Regenerated.
16840
89be2091
DJ
168412006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16842
16843 * linux-low.c (linux_wait_for_event): Reformat. Use the
16844 pass_signals array.
16845 * remote-utils.c (decode_address_to_semicolon): New.
16846 * server.c (pass_signals, handle_general_set): New.
16847 (handle_query): Mention QPassSignals for qSupported.
16848 (main): Call handle_general_set.
16849 * server.h (pass_signals, decode_address_to_semicolon): New.
16850
000ef4f0
DJ
168512006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16852
16853 * server.c (handle_query): Correct error handling for read_auxv.
16854
b7149293
UW
168552005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16856
16857 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16858 and srv_linux_thread_db to yes.
16859 * linux-s390-low.c (s390_fill_gregset): New function.
16860 (target_regsets): Define data structure.
16861
dae5f5cf
DJ
168622006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16863
16864 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16865 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16866 * config.in, configure: Regenerated.
16867 * inferiors.c (gdb_id_to_thread): New function.
16868 (gdb_id_to_thread_id): Use it.
16869 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16870 * linux-low.h (struct process_info): Add th member.
16871 (thread_db_get_tls_address): New prototype.
16872 * remote-utils.c (decode_address): Make non-static.
16873 * server.c (handle_query): Handle qGetTLSAddr.
16874 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16875 * target.h (struct target_ops): Add get_tls_address.
16876 * thread-db.c (maybe_attach_thread): Save the thread handle.
16877 (thread_db_get_tls_address): New.
16878
32ca6d61
DJ
168792006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16880
16881 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16882 (linux_resume_one_process): Take a siginfo_t *. Update all
16883 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16884 (struct pending_signals): Add a siginfo_t.
16885 (linux_wait_for_process): Always set last_status.
16886 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16887 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16888 * linux-low.h (struct process_info): Add last_status.
16889
5ffff7c1
DJ
168902006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16891
16892 * remote-utils.c (try_rle): New function.
16893 (putpkt_binary): Use it.
16894
8695c747
DJ
168952006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16896
16897 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16898 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16899 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16900 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16901 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16902 point registers.
16903
290fadea
RS
169042006-08-08 Richard Sandiford <richard@codesourcery.com>
16905
16906 * server.c (terminal_fd): New variable.
16907 (old_foreground_pgrp): Likewise.
16908 (restore_old_foreground_pgrp): New function.
16909 (start_inferior): Record the terminal file descriptor in terminal_fd
16910 and its original foreground group in old_foreground_pgrp. Register
16911 restore_old_foreground_pgrp with atexit().
16912
9f2e1e63
DJ
169132006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16914
16915 * server.c (handle_query): Correct qPart to qXfer.
16916
b80864fb
DJ
169172006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16918
16919 * configure.ac: Check for more headers which are missing on
16920 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16921 * configure.srv: Add Cygwin and mingw32.
16922 * remote-utils.c: Don't include headers unconditionally which
16923 are missing on mingw32. Include <winsock.h> for mingw32.
16924 (remote_open): Adjust for mingw32 support. Flush
16925 standard error after writing to it.
16926 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16927 (unblock_async_io, enable_async_io, disable_async_io)
16928 (readchar, getpkt): Update for Winsock support.
16929 (prepare_resume_reply): Expect a protocol signal number.
16930 * server.c: Disable <sys/wait.h> on mingw32.
16931 (start_inferior): Adjust for mingw32 support. Flush
16932 standard error after writing to it.
16933 (attach_inferior): Likewise. Use protocol signal
16934 numbers.
16935 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16936 and names.
16937 * win32-i386-low.c: New file.
16938 * Makefile.in (XM_CLIBS): Set.
16939 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16940 (win32-i386-low.o): New dependency rule.
16941 * linux-low.c (linux_wait): Use target signal numbers.
16942 * target.h (struct target_ops): Doc fix.
16943 * server.h (target_signal_to_name): New prototype.
16944 * gdbreplay.c: Don't include headers unconditionally which
16945 are missing on mingw32. Include <winsock.h> for mingw32.
16946 (remote_close, remote_open): Adjust for Winsock support.
16947 * configure, config.in: Regenerated.
16948
0876f84a
DJ
169492006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16950
16951 * server.c (decode_xfer_read, write_qxfer_response): New.
16952 (handle_query): Take a packet length argument. Handle
16953 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16954 the qSupported response.
16955 (main): Update call to handle_query.
16956
01f9e8fa
DJ
169572006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16958
16959 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16960 (putpkt_binary): Renamed from putpkt and adjusted for binary
16961 data.
16962 (putpkt): New wrapper for putpkt_binary.
16963 (readchar): Don't mask off the high bit.
16964 (decode_X_packet): New function.
16965 * server.c (main): Call putpkt_binary if a handler sets the packet
16966 length. Save the length of the incoming packet. Handle 'X'.
16967 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16968
be2a5f71
DJ
169692006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16970
16971 * server.c (handle_query): Handle qSupported.
16972
ea025f5f
DJ
169732006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16974
16975 * remote-utils.c (all_symbols_looked_up): New variable.
16976 (look_up_one_symbol): Check it.
16977 * server.h (look_up_one_symbol): New declaration.
16978 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16979
9308fc88
DJ
169802006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16981
16982 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16983 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16984 (PTRACE_GET_THREAD_AREA): Define.
16985 (ps_get_thread_area): New function.
16986
52fb6437
NS
169872006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16988
16989 * configure.srv (m68k*-*-uclinux*): New target.
16990 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16991 (linux_resume_one_process): Remove extraneous cast.
16992 (linux_read_offsets): New.
16993 (linux_target_op): Add linux_read_offsets on mmuless systems.
16994 * server.c (handle_query): Add qOffsets logic.
16995 * target.h (struct target_ops): Add read_offsets.
16996
21b0f40c
DJ
169972006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16998
16999 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17000 (PTRACE_GET_THREAD_AREA): Define.
17001 (ps_get_thread_area): New function.
17002 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17003 (linux-x86-64-low.o): Update.
17004
0050a760
DJ
170052006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17006
17007 * configure.ac: Remove checks for prfpregset_t.
17008 * gdb_proc_service.h: New file.
17009 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17010 new "gdb_proc_service.h".
17011 * proc-service.c: Likewise.
17012 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17013 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17014 * Makefile.in (gdb_proc_service_h): Updated.
17015 * configure, config.in: Regenerated.
17016
b92a518e
DJ
170172006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17018
17019 * remote-utils.c (prepare_resume_reply): Move declaration
17020 of gdb_id_from_wait to the top of the block.
17021
545587ee
DJ
170222006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17023
17024 * linux-low.c (regsets_store_inferior_registers): Read the regset
17025 from the target before filling it.
17026
9db87ebd
DJ
170272006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17028
17029 * server.c (attach_inferior): Return SIGTRAP for a successful
17030 attach.
17031
dd24457d
DJ
170322006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17033
17034 * Makefile.in (OBS): Add version.o.
17035 (STAGESTUFF): Delete.
17036 (version.o): Add dependencies.
17037 (version.c): Replace rule.
17038 (clean): Remove version.c.
17039 * server.c (gdbserver_version): New.
17040 (gdbserver_usage): Use printf.
17041 (main): Handle --version and --help.
17042 * server.h (version, host_name): Add declarations.
17043
6f0f660e
EZ
170442005-12-23 Eli Zaretskii <eliz@gnu.org>
17045
889bf7c5
PA
17046 * linux-arm-low.c:
17047 * linux-arm-low.c:
17048 * inferiors.c:
17049 * i387-fp.h:
17050 * i387-fp.c:
17051 * gdbreplay.c:
17052 * regcache.c:
17053 * proc-service.c:
17054 * mem-break.h:
17055 * mem-break.c:
17056 * linux-x86-64-low.c:
17057 * linux-sh-low.c:
17058 * linux-s390-low.c:
17059 * linux-ppc64-low.c:
17060 * linux-ppc-low.c:
17061 * linux-mips-low.c:
17062 * linux-m68k-low.c:
17063 * linux-m32r-low.c:
17064 * linux-low.h:
17065 * linux-low.c:
17066 * linux-ia64-low.c:
17067 * linux-i386-low.c:
17068 * linux-crisv32-low.c:
17069 * thread-db.c:
17070 * terminal.h:
17071 * target.h:
17072 * target.c:
17073 * server.h:
17074 * server.c:
17075 * remote-utils.c:
17076 * regcache.h:
17077 * utils.c:
17078 * Makefile.in:
17079 * configure.ac:
6f0f660e
EZ
17080 * gdbserver.1: Add (C) after Copyright. Update the FSF
17081 address.
17082
9d1fb177
DJ
170832005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17084
17085 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17086 (arm_breakpoint_at): Recognize both breakpoints.
17087 (the_low_target): Use the correct breakpoint instruction.
17088
011a70c2
DJ
170892005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17090
17091 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17092 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17093 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17094 (the_low_target): Update.
17095
7fb85e41
AS
170962005-10-25 Andreas Schwab <schwab@suse.de>
17097
17098 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17099
17100 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17101 (ia64_num_regs): Reduce to 462.
17102
3db0444b
DJ
171032005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17104
17105 * acinclude.m4: Correct quoting.
17106 * aclocal.m4: Regenerated.
17107
17108 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17109 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17110 (thread_db_init): Call thread_db_err_str.
17111 * configure.ac: Check for TD_VERSION.
17112 * config.in, configure: Regenerated.
17113
bee0189a
DJ
171142005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17115
17116 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17117
e9d25b98
DJ
171182005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17119
17120 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17121 is not available. Define HAVE_PTRACE_GETREGS if it is.
17122 * config.in, configure: Regenerated.
17123 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17124 * linux-i386-low.c, linux-m68k-low.c: Update to use
17125 HAVE_PTRACE_GETREGS.
17126 * linux-low.c (regsets_fetch_inferior_registers)
17127 (regsets_store_inferior_registers): Only return 0 if we processed
17128 GENERAL_REGS.
17129 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17130 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17131
a06660f7
DJ
171322005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17133
17134 * inferiors.c (struct thread_info): Add gdb_id.
17135 (add_thread): Add gdb_id argument.
17136 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17137 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17138 calls to add_thread.
17139 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17140 * server.c (handle_query): Use thread_to_gdb_id.
17141 (handle_v_cont, main): Use gdb_id_to_thread_id.
17142 * server.h (add_thread): Update prototype.
17143 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17144 prototypes.
17145
5a1f5858
DJ
171462005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17147
17148 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17149 left-padded registers.
17150 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17151 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17152
e122f1f5
SE
171532005-07-01 Steve Ellcey <sje@cup.hp.com>
17154
17155 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17156 * configure: Regenerate.
17157 * config.in: Regenerate.
17158 * server.h (NEED_DECLARATION_STRERROR):
17159 Replace with !HAVE_DECL_STRERROR.
17160
d592fa2f
DJ
171612005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17162
17163 * linux-low.c (linux_wait, linux_send_signal): Don't test
17164 an unsigned long variable for > 0 if it could be MAX_ULONG.
17165 * server.c (myresume): Likewise.
17166 * target.c (set_desired_inferior): Likewise.
17167
ccbd4912
MK
171682005-06-13 Mark Kettenis <kettenis@gnu.org>
17169
17170 * configure.ac: Simplify and improve check for socklen_t.
17171 * configure, config.in: Regenerate.
17172
f450004a
DJ
171732005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17174
17175 * acconfig.h: Remove.
17176 * configure.ac: Add a test for socklen_t. Use three-argument
17177 AC_DEFINE throughout.
17178 * config.in: Regenerated using autoheader 2.59.
17179 * configure: Regenerated.
17180
17181 * gdbreplay.c (socklen_t): Provide a default.
17182 (remote_open): Use socklen_t.
17183 * remote-utils.c (socklen_t): Provide a default.
17184 (remote_open): Use socklen_t.
17185 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17186 unsigned char.
17187
17188 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17189 char for buffers.
17190 * linux-low.c (linux_read_memory, linux_write_memory)
17191 (linux_read_auxv): Likewise.
17192 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17193 (check_mem_write): Likewise.
17194 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17195 Likewise.
17196 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17197 (registers_from_string, register_data): Likewise.
17198 * server.c (handle_query, main): Likewise.
17199 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17200 (decode_M_packet): Likewise.
17201 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17202 * target.h (struct target_ops): Update read_memory, write_memory,
17203 and read_auxv.
17204 (read_inferior_memory, write_inferior_memory): Update.
17205 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17206 to unsigned char *.
17207 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17208 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17209 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17210 linux-s390-low.c, linux-sh-low.c: Update for changes in
17211 read_inferior_memory and the_low_target->breakpoint.
17212
eee84df1
DJ
172132005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17214
17215 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17216 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17217 * configure.srv: Add powerpc64-*-linux*.
17218 * linux-ppc64-low.c: New file.
17219
45b134e5
OF
172202005-05-23 Orjan Friberg <orjanf@axis.com>
17221
17222 * linux-cris-low.c: New file with support for CRIS.
17223 * linux-crisv32-low.c: Ditto for CRISv32.
17224 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17225 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17226 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17227 reg-crisv32.o, and reg-crisv32.c to make rules.
17228 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17229 recognized targets.
17230
48d93c75
UW
172312005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17232
17233 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17234 of sizeof (PTRACE_XFER_TYPE).
17235 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17236
e013ee27
OF
172372005-05-12 Orjan Friberg <orjanf@axis.com>
17238
889bf7c5 17239 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17240 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17241 pointers for hardware watchpoint support.
17242 * linux-low.h (struct linux_target_ops): Ditto.
17243 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17244 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17245 to linux_target_ops.
17246 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17247 reply packet.
17248 * server.c (main): Recognize 'Z' and 'z' packets.
17249
b0ded00b
UW
172502005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17251
17252 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17253 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17254 (the_low_target): Add new members.
17255
8643e2ad
DJ
172562005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17257
17258 * proc-service.c (ps_lgetregs): Search all_processes instead of
17259 all_threads.
17260
fc620387
DJ
172612005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17262
17263 * server.c (start_inferior): Change return type to int.
17264 (attach_inferior): Change sigptr to int *.
17265 (handle_v_cont, handle_v_requests): Change signal to int *.
17266 (main): Change signal to int.
17267
172682005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17269
17270 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17271 * configure.srv: Add m32r*-*-linux*.
17272 * linux-m32r-low.c: New file.
17273
e0e76420
DJ
172742005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17275
17276 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17277
a1928bad
DJ
172782005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17279
17280 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17281 Take unsigned long arguments for PIDs.
17282 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17283 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17284 (wait_for_sigstop, linux_resume_one_process)
17285 (regsets_fetch_inferior_registers, linux_send_signal)
17286 (linux_read_auxv): Likewise. Update the types of variables holding
17287 PIDs. Update format string specifiers.
17288 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17289 * remote-utils.c (prepare_resume_reply): Likewise.
17290 * server.c (cont_thread, general_thread, step_thread)
17291 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17292 unsigned long.
17293 (handle_query): Update format specifiers.
17294 (handle_v_cont, main): Use strtoul for thread IDs.
17295 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17296 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17297 (general_thread, step_thread, thread_from_wait)
17298 (old_thread_from_wait): Update.
17299 * target.h (struct thread_resume): Use unsigned long for THREAD.
17300 (struct target_ops): Use unsigned long for arguments to attach and
17301 thread_alive.
17302
dcdb98d2
DJ
173032005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17304
17305 * acinclude.m4: Include bfd/bfd.m4 directly.
17306 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17307 <agriffis@toolchain.org>.
17308 * aclocal.m4, configure: Regenerated.
17309
bec39cab
AC
173102005-01-07 Andrew Cagney <cagney@gnu.org>
17311
17312 * configure.ac: Rename configure.in, require autoconf 2.59.
17313 * configure: Re-generate.
17314
434c4c77
DJ
173152004-12-08 Daniel Jacobowitz <dan@debian.org>
17316
17317 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17318 LIBS when finished.
17319 * aclocal.m4: Regenerated.
17320 * configure: Regenerated.
17321
db1d3e1b
AS
173222004-11-21 Andreas Schwab <schwab@suse.de>
17323
17324 * linux-m68k-low.c (m68k_num_gregs): Define.
17325 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17326 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17327 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17328 (m68k_breakpoint_at): New. Add to the_low_target.
17329
17330 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17331 srv_linux_thread_db to yes.
17332
43360365
JB
173332004-10-20 Joel Brobecker <brobecker@gnat.com>
17334
17335 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17336 (ARCH_SET_FS): Likewise.
17337 (ARCH_GET_FS): Likewise.
17338 (ARCH_GET_GS): Likewise.
17339
fd500816
DJ
173402004-10-16 Daniel Jacobowitz <dan@debian.org>
17341
17342 * linux-i386-low.c (ps_get_thread_area): New.
17343 * linux-x86-64-low.c (ps_get_thread_area): New.
17344 * linux-low.c: Include <sys/syscall.h>.
17345 (linux_kill_one_process): Don't kill the first thread here.
17346 (linux_kill): Kill the first thread here.
17347 (kill_lwp): New function.
17348 (send_sigstop, linux_send_signal): Use it.
17349 * proc-service.c: Clean up #ifdefs.
17350 (fpregset_info): Delete.
17351 (ps_lgetregs): Update and enable implementation.
17352 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17353 implementations.
17354 * remote-utils.c (struct sym_cache, symbol_cache): New.
17355 (input_interrupt): Print a clearer message.
17356 (async_io_enabled): New variable.
17357 (enable_async_io, disable_async_io): Use it. Update comments.
17358 (look_up_one_symbol): Use the symbol cache.
17359 * thread-db.c (thread_db_look_up_symbols): New function.
17360 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17361
f6de3c42
DJ
173622004-10-16 Daniel Jacobowitz <dan@debian.org>
17363
17364 * configure.in: Test for -rdynamic.
17365 * configure: Regenerated.
17366 * Makefile (INTERNAL_LDFLAGS): New.
17367 (gdbserver, gdbreplay): Use it.
17368
2c0fc042
AC
173692004-09-02 Andrew Cagney <cagney@gnu.org>
17370
17371 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17372
075b3282
DJ
173732004-03-23 Daniel Jacobowitz <drow@mvista.com>
17374
17375 * linux-low.c (linux_wait): Clear all_processes list also.
17376
fa6a77dc
DJ
173772004-03-12 Daniel Jacobowitz <drow@mvista.com>
17378
17379 * linux-low.c: Include <errno.h>. Remove extern declaration of
17380 errno.
17381
6d782a97
DJ
173822004-03-12 Daniel Jacobowitz <drow@mvista.com>
17383
17384 * gdbreplay.c, server.h, utils.c: Update copyright years.
17385
3a7fb99b
DJ
173862004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17387
17388 * server.c (main): Print child status or termination signal from
17389 variable 'signal', not 'sig'.
17390
c3e735a6
DJ
173912004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17392
17393 * linux-low.c (linux_read_memory): Change return type to
17394 int. Check for and return error from ptrace().
17395 * target.c (read_inferior_memory): Change return type to int. Pass
17396 back return status from the_target->read_memory().
17397 * target.h (struct target_ops): Adapt *read_memory() prototype.
17398 Update comment.
17399 (read_inferior_memory): Adapt prototype.
17400 * server.c (main): Return an error packet if
17401 read_inferior_memory() returns an error.
17402
a59d1c82
DJ
174032004-03-04 Daniel Jacobowitz <drow@mvista.com>
17404
17405 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17406 Unify with other clean targets.
17407
dc3f8883
DJ
174082004-02-29 Daniel Jacobowitz <drow@mvista.com>
17409
17410 * server.c (handle_v_cont): Call set_desired_inferior.
17411
89a208da
DJ
174122004-02-29 Daniel Jacobowitz <drow@mvista.com>
17413
17414 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17415
62ea82f5
DJ
174162004-02-29 Daniel Jacobowitz <drow@mvista.com>
17417
17418 * linux-low.c (linux_wait): Unblock async I/O.
17419 (linux_resume): Block and enable async I/O.
17420 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17421 * server.h (block_async_io, unblock_async_io): Add prototypes.
17422
6910d122
DJ
174232004-02-29 Daniel Jacobowitz <drow@mvista.com>
17424
17425 * remote-utils.c (remote_open): Print a status notice after
17426 opening a TCP port.
17427 * server.c (attach_inferior): Print a status notice after
17428 attaching.
17429
174302004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17431
17432 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17433
c89dc5d4
DJ
174342004-02-26 Daniel Jacobowitz <drow@mvista.com>
17435
17436 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17437 error packet.
17438 * server.c, target.h: Update copyright years.
17439
4b8dad4a
RM
174402004-02-25 Roland McGrath <roland@redhat.com>
17441
17442 * target.h (struct target_ops): New member `read_auxv'.
17443 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17444 * linux-low.c (linux_read_auxv): New function.
17445 (linux_target_ops): Initialize `read_auxv' member to that.
17446
d7446758
JB
174472004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17448
17449 Committed by Jim Blandy <jimb@redhat.com>.
17450
17451 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17452 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17453 instead of GPR_SIZE to distiguish s390 and s390x targets.
17454
5544ad89
DJ
174552004-01-31 Daniel Jacobowitz <drow@mvista.com>
17456
17457 * linux-low.c: Update copyright year.
17458 (check_removed_breakpoint): Clear pending_is_breakpoint.
17459 (linux_set_resume_request, linux_queue_one_thread)
17460 (resume_status_pending_p): New functions.
17461 (linux_continue_one_thread): Use process->resume.
17462 (linux_resume): Only resume threads if there are no pending events.
17463 * linux-low.h (struct process_info): Add resume request
17464 pointer.
17465
2a68b70e
DJ
174662004-01-30 Daniel Jacobowitz <drow@mvista.com>
17467
17468 * regcache.c (new_register_cache): Clear the allocated register
17469 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17470
64386c31
DJ
174712003-10-13 Daniel Jacobowitz <drow@mvista.com>
17472
17473 * linux-low.c (linux_resume): Take a struct thread_resume *
17474 argument.
17475 (linux_wait): Update call.
17476 (resume_ptr): New static variable.
17477 (linux_continue_one_thread): Renamed from
17478 linux_continue_one_process. Use resume_ptr.
17479 (linux_resume): Use linux_continue_one_thread.
17480 * server.c (handle_v_cont, handle_v_requests): New functions.
17481 (myresume): New function.
17482 (main): Handle 'v' case.
17483 * target.h (struct thread_resume): New type.
17484 (struct target_ops): Change argument of "resume" to struct
17485 thread_resume *.
17486 (myresume): Delete macro.
17487
c938e9b0
L
174882003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17489
17490 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17491 (uninstall): Support DESTDIR.
17492
7f313d07
BC
17493Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17494
17495 * configure.srv: Add xscale*linux copy of arm*linux entry.
17496
3b2fc2ea
DJ
174972003-07-24 Daniel Jacobowitz <drow@mvista.com>
17498
17499 * linux-arm-low.c (arm_reinsert_addr): New function.
17500 (the_low_target): Add arm_reinsert_addr.
17501
1c0a559e
MK
175022003-07-08 Mark Kettenis <kettenis@gnu.org>
17503
17504 * mem-break.c: Remove whitespace at end of file.
17505
43d5792c
DJ
175062003-06-28 Daniel Jacobowitz <drow@mvista.com>
17507
17508 * configure.in: Check whether we need to prototype strerror.
17509 * server.h: Optionally prototype strerror.
17510 * gdbreplay.c (perror_with_name): Use strerror.
17511 * linux-low.c (linux_attach_lwp): Use strerror.
17512 * utils.c (perror_with_name): Use strerror.
17513 * config.in, configure: Regenerated.
17514
c8a86edf
DJ
175152003-06-28 Daniel Jacobowitz <drow@mvista.com>
17516
17517 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17518 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17519
73d37363
DJ
175202003-06-20 Daniel Jacobowitz <drow@mvista.com>
17521
17522 * Makefile.in (SFILES): Update.
17523 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17524 low-sun3.c: Remove files.
17525
6ad8ae5c
DJ
175262003-06-17 Daniel Jacobowitz <drow@mvista.com>
17527
17528 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17529 (linux_detach_one_process, linux_detach): New functions.
17530 (linux_target_ops): Add linux_detach.
17531 * server.c (main): Handle 'D' packet.
17532 * target.h (struct target_ops): Add "detach" member.
17533 (detach_inferior): Define.
17534
1581182a
MK
175352003-06-13 Mark Kettenis <kettenis@gnu.org>
17536
17537 From Kelley Cook <kelleycook@wideopenwest.com>:
17538 * configure.srv: Accept i[34567]86 variants.
17539
e5379b03
DJ
175402003-06-05 Daniel Jacobowitz <drow@mvista.com>
17541
17542 * linux-low.c (linux_wait_for_event): Correct comment typos.
17543 (linux_resume_one_process): Call check_removed_breakpoint.
17544 (linux_send_signal): New function.
17545 (linux_target_ops): Add linux_send_signal.
17546 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17547 of kill.
17548 * target.h (struct target_ops): Add send_signal.
17549
2ff29de4
JB
175502003-05-29 Jim Blandy <jimb@redhat.com>
17551
17552 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17553 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17554 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17555 away part of the register's value.
17556
254787d4
DJ
175572003-03-26 Daniel Jacobowitz <drow@mvista.com>
17558
17559 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17560 (linux_wait_for_event, linux_init_signals): Likewise.
17561
94e10508
DJ
175622003-03-17 Daniel Jacobowitz <drow@mvista.com>
17563
17564 * configure.in: Check for stdlib.h.
17565 * configure: Regenerated.
17566 * config.in: Regenerated.
17567
4c0711e0
DJ
175682003-01-04 Andreas Schwab <schwab@suse.de>
17569
17570 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17571
ef66e766
AC
175722003-01-02 Andrew Cagney <ac131313@redhat.com>
17573
17574 * Makefile.in: Remove obsolete code.
17575
a1358604
DJ
175762002-11-20 Daniel Jacobowitz <drow@mvista.com>
17577
17578 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17579 defined(PT_FPR0_HI).
17580
23ce3b1c
DJ
175812002-11-17 Stuart Hughes <seh@zee2.com>
17582
17583 * linux-arm-low.c (arm_num_regs): Increase.
17584 (arm_regmap): Include status register.
17585
175862002-11-17 Daniel Jacobowitz <drow@mvista.com>
17587
17588 * linux-low.c (register_addr): Remove incorrect -1 check.
17589
a9fa9f7d
DJ
175902002-08-29 Daniel Jacobowitz <drow@mvista.com>
17591
17592 * linux-low.c (linux_create_inferior): Call setpgid. Return
17593 the new PID.
17594 (unstopped_p, linux_signal_pid): Remove.
17595 (linux_target_ops): Remove linux_signal_pid.
17596 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17597 global instead of target method.
17598 * target.h (struct target_ops): Remove signal_pid. Update comment
17599 for create_inferior.
17600 * server.c (signal_pid): New variable.
17601 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17602 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17603 (attach_inferior): Set signal_pid.
17604
17574093
DJ
176052002-08-23 Daniel Jacobowitz <drow@mvista.com>
17606
17607 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17608
176092002-08-20 Jim Blandy <jimb@redhat.com>
17610
17611 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17612 default for this.
17613
176142002-08-01 Andrew Cagney <cagney@redhat.com>
17615
17616 * Makefile.in: Make chill references obsolete.
17617
176182002-07-24 Kevin Buettner <kevinb@redhat.com>
17619
17620 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17621 * configure: Regenerate.
17622 * config.in: Regenerate.
17623
176242002-07-09 David O'Brien <obrien@FreeBSD.org>
17625
17626 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17627 (perror_with_name, remote_close, remote_open, expect, play): Static.
17628
176292002-07-04 Michal Ludvig <mludvig@suse.cz>
17630
4b8dad4a 17631 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17632 byte offsets instead of an array of indexes.
17633 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17634
176352002-06-13 Daniel Jacobowitz <drow@mvista.com>
17636
17637 * regcache.c: Add comment.
17638
176392002-06-11 Daniel Jacobowitz <drow@mvista.com>
17640
17641 * thread-db.c: New file.
17642 * proc-service.c: New file.
17643 * acinclude.m4: New file.
17644 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17645 proc-service.o, and thread-db.o.
17646 (linux-low.o): Add USE_THREAD_DB.
17647 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17648 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17649 * aclocal.m4: Regenerated.
17650 * config.in: Regenerated.
17651 * configure: Regenerated.
17652 * configure.in: Check for proc_service.h, sys/procfs.h,
17653 thread_db.h, and linux/elf.h headrs.
17654 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17655 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17656 Check for -lthread_db and thread support.
17657 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17658 PowerPC, and SuperH.
17659 * i387-fp.c: Constify arguments.
17660 * i387-fp.h: Likewise.
17661 * inferiors.c: (struct thread_info): Renamed from
17662 `struct inferior_info'. Remove PID member. Use generic inferior
17663 list header. All uses updated.
17664 (inferiors, signal_pid): Removed.
17665 (all_threads): New variable.
17666 (get_thread): Define.
17667 (add_inferior_to_list): New function.
17668 (for_each_inferior): New function.
17669 (change_inferior_id): New function.
17670 (add_inferior): Removed.
17671 (remove_inferior): New function.
17672 (add_thread): New function.
17673 (free_one_thread): New function.
17674 (remove_thread): New function.
17675 (clear_inferiors): Use for_each_inferior and free_one_thread.
17676 (find_inferior): New function.
17677 (find_inferior_id): New function.
17678 (inferior_target_data): Update argument type.
17679 (set_inferior_target_data): Likewise.
17680 (inferior_regcache_data): Likewise.
17681 (set_inferior_regcache_data): Likewise.
17682 * linux-low.c (linux_bp_reinsert): Remove.
17683 (all_processes, stopping_threads, using_thrads)
17684 (struct pending_signals, debug_threads, pid_of): New.
17685 (inferior_pid): Replace with macro.
17686 (struct inferior_linux_data): Remove.
17687 (get_stop_pc, add_process): New functions.
17688 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17689 Use add_process and add_thread.
17690 (linux_attach_lwp): New function, based on old linux_attach. Use
17691 add_process and add_thread. Set stop_expected for new threads.
17692 (linux_attach): New function.
17693 (linux_kill_one_process): New function.
17694 (linux_kill): Kill all LWPs.
17695 (linux_thread_alive): Use find_inferior_id.
17696 (check_removed_breakpoints, status_pending_p): New functions.
17697 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17698 Update. Use WNOHANG. Wait for cloned processes also. Update process
17699 struct for the found process.
17700 (linux_wait_for_event): New function.
17701 (linux_wait): Use it. Support LWPs.
17702 (send_sigstop, wait_for_sigstop, stop_all_processes)
17703 (linux_resume_one_process, linux_continue_one_process): New functions.
17704 (linux_resume): Support LWPs.
17705 (REGISTER_RAW_SIZE): Remove.
17706 (fetch_register): Use register_size instead. Call supply_register.
17707 (usr_store_inferior_registers): Likewise. Call collect_register.
17708 Fix recursive case.
17709 (regsets_fetch_inferior_registers): Improve error message.
17710 (regsets_store_inferior_registers): Add debugging.
17711 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17712 (unstopped_p, linux_signal_pid): New functions.
17713 (linux_target_ops): Add linux_signal_pid.
17714 (linux_init_signals): New function.
17715 (initialize_low): Call it. Initialize using_threads.
17716 * regcache.c (inferior_regcache_data): Add valid
17717 flag.
17718 (get_regcache): Fetch registers lazily. Add fetch argument
17719 and update all callers.
17720 (regcache_invalidate_one, regcache_invalidate): New
17721 functions.
17722 (new_register_cache): Renamed from create_register_cache.
17723 Return the new regcache.
17724 (free_register_cache): Change argument to a void *.
17725 (registers_to_string, registers_from_string): Call get_regcache
17726 with fetch flag set.
17727 (register_data): Make static. Pass fetch flag to get_regcache.
17728 (supply_register): Call get_regcache with fetch flag clear.
17729 (collect_register): Call get_regcache with fetch flag set.
17730 (collect_register_as_string): New function.
17731 * regcache.h: Update.
17732 * remote-utils.c (putpkt): Flush after debug output and use
17733 stderr.
17734 Handle input interrupts while waiting for an ACK.
17735 (input_interrupt): Use signal_pid method.
17736 (getpkt): Flush after debug output and use stderr.
17737 (outreg): Use collect_register_as_string.
17738 (new_thread_notify, dead_thread_notify): New functions.
17739 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17740 and general_thread.
17741 (look_up_one_symbol): Flush after debug output.
17742 * server.c (step_thread, server_waiting): New variables.
17743 (start_inferior): Don't use signal_pid. Update call to mywait.
17744 (attach_inferior): Update call to mywait.
17745 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17746 (main): Don't fetch/store registers explicitly. Use
17747 set_desired_inferior. Support proposed ``Hs'' packet. Update
17748 calls to mywait.
17749 * server.h: Update.
17750 (struct inferior_list, struct_inferior_list_entry): New.
17751 * target.c (set_desired_inferior): New.
17752 (write_inferior_memory): Constify.
17753 (mywait): New function.
17754 * target.h: Update.
17755 (struct target_ops): New signal_pid method.
17756 (mywait): Removed macro, added prototype.
17757
17758 * linux-low.h (regset_func): Removed.
17759 (regset_fill_func, regset_store_func): New.
17760 (enum regset_type): New.
17761 (struct regset_info): Add type field. Use new operation types.
17762 (struct linux_target_ops): stop_pc renamed to get_pc.
17763 Add decr_pc_after_break and breakpoint_at.
17764 (get_process, get_thread_proess, get_process_thread)
17765 (strut process_info, all_processes, linux_attach_lwp)
17766 (thread_db_init): New.
17767
17768 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17769 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17770 (the_low_target): Add new members.
17771 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17772 (i386_store_fpxregset): Constify.
17773 (target_regsets): Add new kind identifier.
17774 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17775 (i386_set_pc): Add debugging.
17776 (i386_breakpoint_at): New function.
17777 (the_low_target): Add new members.
17778 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17779 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17780 (mips_breakpoint_at): New.
17781 (the_low_target): Add new members.
17782 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17783 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17784 (the_low_target): Add new members.
17785 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17786 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17787 (the_low_target): Add new members.
17788 * linux-x86-64-low.c (target_regsets): Add new kind
17789 identifier.
17790
177912002-05-15 Daniel Jacobowitz <drow@mvista.com>
17792
17793 From Martin Pool <mbp@samba.org>:
17794 * server.c (gdbserver_usage): New function.
17795 (main): Call it.
17796
177972002-05-14 Daniel Jacobowitz <drow@mvista.com>
17798
17799 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17800 stop_at -> stop_pc.
17801
178022002-05-04 Andrew Cagney <ac131313@redhat.com>
17803
17804 * Makefile.in: Remove obsolete code.
17805
178062002-04-24 Michal Ludvig <mludvig@suse.cz>
17807
17808 * linux-low.c (regsets_fetch_inferior_registers),
17809 (regsets_store_inferior_registers): Removed cast to int from
17810 ptrace() calls.
17811 * regcache.h: Added declaration of struct inferior_info.
17812
178132002-04-20 Daniel Jacobowitz <drow@mvista.com>
17814
17815 * inferiors.c (struct inferior_info): Add regcache_data.
17816 (add_inferior): Call create_register_cache.
17817 (clear_inferiors): Call free_register_cache.
17818 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17819 * regcache.c (struct inferior_regcache_data): New.
17820 (registers): Remove.
17821 (get_regcache): New function.
17822 (create_register_cache, free_register_cache): New functions.
17823 (set_register_cache): Don't initialize the register cache here.
17824 (registers_to_string, registers_from_string, register_data): Call
17825 get_regcache.
17826 * regcache.h: Add prototypes.
17827 * server.h: Likewise.
17828
178292002-04-20 Daniel Jacobowitz <drow@mvista.com>
17830
17831 * mem-break.c: New file.
17832 * mem-break.h: New file.
17833 * Makefile.in: Add mem-break.o rule; update server.h
17834 dependencies.
17835 * inferiors.c (struct inferior_info): Add target_data
17836 member.
17837 (clear_inferiors): Free target_data member if set.
17838 (inferior_target_data, set_inferior_target_data): New functions.
17839 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17840 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17841 * linux-low.c (linux_bp_reinsert): New variable.
17842 (struct inferior_linux_data): New.
17843 (linux_create_inferior): Use set_inferior_target_data.
17844 (linux_attach): Likewise. Call add_inferior.
17845 (linux_wait_for_one_inferior): New function.
17846 (linux_wait): Call it.
17847 (linux_write_memory): Add const.
17848 (initialize_low): Call set_breakpoint_data.
17849 * linux-low.h (struct linux_target_ops): Add breakpoint
17850 handling members.
17851 * server.c (attach_inferior): Remove extra add_inferior
17852 call.
17853 * server.h: Include mem-break.h. Update inferior.c
17854 prototypes.
17855 * target.c (read_inferior_memory)
17856 (write_inferior_memory): New functions.
17857 * target.h (read_inferior_memory)
17858 (write_inferior_memory): Change macros to prototypes.
17859 (struct target_ops): Update comments. Add const to write_memory
17860 definition.
17861
178622002-04-11 Daniel Jacobowitz <drow@mvista.com>
17863
17864 * linux-low.c (usr_store_inferior_registers): Support
17865 registers which are allowed to fail to store.
17866 * linux-low.h (linux_target_ops): Likewise.
17867 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17868 (ppc_cannot_store_register): FPSCR may not be storable.
17869
178702002-04-09 Daniel Jacobowitz <drow@mvista.com>
17871
17872 * server.h: Include <string.h> if HAVE_STRING_H.
17873 * ChangeLog: Correct paths in last ChangeLog entry.
17874
178752002-04-09 Daniel Jacobowitz <drow@mvista.com>
17876
17877 * linux-low.h: Remove obsolete prototypes.
17878 (struct linux_target_ops): New.
17879 (extern the_low_target): New.
17880 * linux-low.c (num_regs, regmap): Remove declarations.
17881 (register_addr): Use the_low_target explicitly.
17882 (fetch_register): Likewise.
17883 (usr_fetch_inferior_registers): Likewise.
17884 (usr_store_inferior_registers): Likewise.
17885 * linux-arm-low.c (num_regs): Remove.
17886 (arm_num_regs): Define.
17887 (arm_regmap): Renamed from regmap, made static.
17888 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17889 made static.
17890 (arm_cannot_store_register): Renamed from cannot_store_register,
17891 made static.
17892 (the_low_target): New.
17893 * linux-i386-low.c (num_regs): Remove.
17894 (i386_num_regs): Define.
17895 (i386_regmap): Renamed from regmap, made static.
17896 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17897 made static.
17898 (i386_cannot_store_register): Renamed from cannot_store_register,
17899 made static.
17900 (the_low_target): New.
17901 * linux-ia64-low.c (num_regs): Remove.
17902 (ia64_num_regs): Define.
17903 (ia64_regmap): Renamed from regmap, made static.
17904 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17905 made static.
17906 (ia64_cannot_store_register): Renamed from cannot_store_register,
17907 made static.
17908 (the_low_target): New.
17909 * linux-m68k-low.c (num_regs): Remove.
17910 (m68k_num_regs): Define.
17911 (m68k_regmap): Renamed from regmap, made static.
17912 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17913 made static.
17914 (m68k_cannot_store_register): Renamed from cannot_store_register,
17915 made static.
17916 (the_low_target): New.
17917 * linux-mips-low.c (num_regs): Remove.
17918 (mips_num_regs): Define.
17919 (mips_regmap): Renamed from regmap, made static.
17920 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17921 made static.
17922 (mips_cannot_store_register): Renamed from cannot_store_register,
17923 made static.
17924 (the_low_target): New.
17925 * linux-ppc-low.c (num_regs): Remove.
17926 (ppc_num_regs): Define.
17927 (ppc_regmap): Renamed from regmap, made static.
17928 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17929 made static.
17930 (ppc_cannot_store_register): Renamed from cannot_store_register,
17931 made static.
17932 (the_low_target): New.
17933 * linux-s390-low.c (num_regs): Remove.
17934 (s390_num_regs): Define.
17935 (s390_regmap): Renamed from regmap, made static.
17936 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17937 made static.
17938 (s390_cannot_store_register): Renamed from cannot_store_register,
17939 made static.
17940 (the_low_target): New.
17941 * linux-sh-low.c (num_regs): Remove.
17942 (sh_num_regs): Define.
17943 (sh_regmap): Renamed from regmap, made static.
17944 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17945 made static.
17946 (sh_cannot_store_register): Renamed from cannot_store_register,
17947 made static.
17948 (the_low_target): New.
17949 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17950 (the_low_target): New.
17951
179522002-04-09 Daniel Jacobowitz <drow@mvista.com>
17953
17954 * Makefile.in: Add stamp-h target.
17955 * configure.in: Create stamp-h.
17956 * configure: Regenerated.
17957
179582002-04-09 Daniel Jacobowitz <drow@mvista.com>
17959
17960 * inferiors.c: New file.
17961 * target.c: New file.
17962 * target.h: New file.
17963 * Makefile.in: Add target.o and inferiors.o. Update
17964 dependencies.
17965 * linux-low.c (inferior_pid): New static variable,
17966 moved from server.c.
17967 (linux_create_inferior): Renamed from create_inferior.
17968 Call add_inferior. Return 0 on success instead of a PID.
17969 (linux_attach): Renamed from myattach.
17970 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17971 (linux_thread_alive): Renamed from mythread_alive.
17972 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17973 child dies.
17974 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17975 (regsets_store_inferior_registers): Correct error message.
17976 Add missing ``return 0''.
17977 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17978 (linux_store_registers): Renamed from store_inferior_registers.
17979 (linux_read_memory): Renamed from read_inferior_memory.
17980 (linux_write_memory): Renamed from write_inferior_memory.
17981 (linux_target_ops): New structure.
17982 (initialize_low): Call set_target_ops ().
17983 * remote-utils.c (unhexify): New function.
17984 (hexify): New function.
17985 (input_interrupt): Send signals to ``signal_pid''.
17986 * server.c (inferior_pid): Remove.
17987 (start_inferior): Update create_inferior call.
17988 (attach_inferior): Call add_inferior.
17989 (handle_query): New function.
17990 (main): Call handle_query for `q' packets.
17991 * server.h: Include "target.h". Remove obsolete prototypes.
17992 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17993
179942002-04-09 Daniel Jacobowitz <drow@mvista.com>
17995
17996 * Makefile.in: Add WARN_CFLAGS. Update configury
17997 dependencies.
17998 * configure.in: Check for <string.h>
17999 * configure: Regenerate.
18000 * config.in: Regenerate.
18001 * gdbreplay.c: Include needed system headers.
18002 (remote_open): Remove strchr prototype.
18003 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18004 * regcache.c (supply_register): Change buf argument to const void *.
18005 (supply_register_by_name): Likewise.
18006 (collect_register): Change buf argument to void *.
18007 (collect_register_by_name): Likewise.
18008 * regcache.h: Add missing prototypes.
18009 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18010 * server.c (handle_query): New function.
18011 (attached): New static variable, moved out of main.
18012 (main): Quiet longjmp clobber warnings.
18013 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18014 * utils.c (error): Remove NORETURN.
18015 (fatal): Likewise.
This page took 2.542123 seconds and 4 git commands to generate.