update copyright year in version output of gdb, gdbserver and gdbreplay
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
5dd8bf88
JB
12020-01-01 Joel Brobecker <brobecker@adacore.com>
2
3 * server.c (gdbserver_version): Change copyright year to 2020.
4 * gdbreplay.c (gdbreplay_version): Likewise.
5
0ad6b8ee
CB
62019-12-19 Christian Biesinger <cbiesinger@google.com>
7
8 * configure: Regenerate.
9 * configure.ac: Quote variable arguments of test.
10
1ee7b812
BE
112019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
12
13 * Makefile.in: Fix build with GNU Make 3.81
14
d9fa87f4
TT
152019-12-16 Tom Tromey <tromey@adacore.com>
16
17 * server.c (get_exec_file): Constify result.
18
ab7d13f0
CB
192019-12-10 Christian Biesinger <cbiesinger@google.com>
20
21 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
22 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
23 * config.in: Regenerate.
24 * configure: Regenerate.
25 * configure.ac: Don't check for strerror.
26 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
27 Call safe_strerror instead of strerror.
28 * server.h (strerror): Remove this now-unnecessary declaration.
29 * tracepoint.c (init_named_socket): Call safe_strerror instead of
30 strerror.
31 (gdb_agent_helper_thread): Likewise.
32 * utils.c (perror_with_name): Likewise.
33
4da8c3a8
TT
342019-11-26 Tom Tromey <tom@tromey.com>
35
36 * configure, config.in: Rebuild.
37
21987b9c
TT
382019-11-26 Tom Tromey <tom@tromey.com>
39
40 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
41 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
42 gdb_sigmask.
43 * configure, config.in: Rebuild.
44
5e030278
TT
452019-11-26 Tom Tromey <tom@tromey.com>
46
47 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
48 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
49 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
50 * acinclude.m4: Include ax_pthread.m4.
51 * config.in, configure: Rebuild.
52
6d91ce9a
CB
532019-11-26 Christian Biesinger <cbiesinger@google.com>
54
55 * debug.c (debug_set_output): Call safe_strerror instead of
56 strerror.
57 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
58 (linux_kill_one_lwp): Likewise.
59 (linux_detach_one_lwp): Likewise.
60 (linux_wait_for_event_filtered): Likewise.
61 (store_register): Likewise.
62 * lynx-low.c (lynx_attach): Likewise.
63 * mem-break.c (insert_memory_breakpoint): Likewise.
64 (remove_memory_breakpoint): Likewise.
65 (delete_fast_tracepoint_jump): Likewise.
66 (set_fast_tracepoint_jump): Likewise.
67 (uninsert_fast_tracepoint_jumps_at): Likewise.
68 (reinsert_fast_tracepoint_jumps_at): Likewise.
69 * nto-low.c (nto_xfer_memory): Likewise.
70 (nto_resume): Likewise.
71
6cdd651f
LM
722019-11-20 Luis Machado <luis.machado@linaro.org>
73
74 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
75 instead of register count.
76 * tdesc.c (tdesc_contains_feature): New function.
77 * tdesc.h (tdesc_contains_feature): New prototype.
78
cd850b40
CB
792019-11-15 Christian Biesinger <cbiesinger@google.com>
80
81 * Makefile.in: Add safe-strerror.c.
82 * configure: Regenerate.
83 * configure.ac: Don't source common.host.
84
5abebf3c
CB
852019-11-15 Christian Biesinger <cbiesinger@google.com>
86
87 * config.in: Regenerate.
88 * configure: Regenerate.
89
e06f3d6e
AB
902019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
91
92 * ax.c (ax_printf): Handle size_t_arg.
93
ca3a04f6
CB
942019-11-06 Christian Biesinger <cbiesinger@google.com>
95
96 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
97 * mi/mi-main.c (output_cores): Likewise.
98 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
99 (linux_xfer_osdata_modules): Likewise.
100 * remote.c (register_remote_support_xml): Likewise.
101 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
102 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
103
e48f6033
CB
1042019-11-01 Christian Biesinger <cbiesinger@google.com>
105
106 * configure: Regenerate.
107 * configure.ac: Remove check for strerror_r.
108
e7e97a2e
CB
1092019-10-31 Christian Biesinger <cbiesinger@google.com>
110
111 * config.in: Regenerate.
112 * configure: Regenerate.
113 * configure.ac: Also check for strerror_r.
114
75cafaa6
CB
1152019-10-31 Christian Biesinger <cbiesinger@google.com>
116
117 * ax.h (debug_agent): Remove duplicate declaration.
118
30baf67b
TV
1192019-10-26 Tom de Vries <tdevries@suse.de>
120
121 * linux-aarch64-low.c: Fix typos in comments.
122 * linux-arm-low.c: Same.
123 * linux-low.c: Same.
124 * linux-ppc-low.c: Same.
125 * proc-service.c: Same.
126 * regcache.h: Same.
127 * server.c: Same.
128 * tracepoint.c: Same.
129 * win32-low.c: Same.
130
52c64cf7
TT
1312019-10-25 Tom Tromey <tromey@adacore.com>
132
133 * utils.c (xstrdup): Remove.
134
c12d372d
TT
1352019-10-23 Tom Tromey <tom@tromey.com>
136
137 * configure, config.in: Rebuild.
138
4d0b984b
TT
1392019-10-23 Tom Tromey <tom@tromey.com>
140
141 * configure: Rebuild.
142 * acinclude.m4: Use m4_include, not sinclude.
143
c5adaa19
TT
1442019-10-17 Tom Tromey <tromey@adacore.com>
145
146 * configure: Rebuild.
147 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
148 in AC_CONFIG_FILES invocation.
149 * Makefile.in (stamp-h, Makefile): Use new-style config.status
150 invocation.
151
fec4e896
CB
1522019-10-16 Christian Biesinger <cbiesinger@google.com>
153
154 * server.c: Include xml-builtin.h.
155 (get_xml_features): Don't declare xml_builtins here.
156
00975ff6
AB
1572019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
158
159 * Makefile.in: Remove references to vec-ipa.o.
160
0dc32745
AB
1612019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
162
163 * Makefile.in: Remove references to vec.c.
164
3e6ec53a
CB
1652019-10-02 Christian Biesinger <cbiesinger@google.com>
166
167 * server.c (server_waiting): Change to bool.
168 (extended_protocol): Likewise.
169 (response_needed): Likewise.
170 (exit_requested): Likewise.
171 (run_once): Likewise.
172 (report_no_resumed): Likewise.
173 (non_stop): Likewise.
174 (disable_packet_vCont): Likewise.
175 (disable_packet_Tthread): Likewise.
176 (disable_packet_qC): Likewise.
177 (disable_packet_qfThreadInfo): Likewise.
178 (handle_general_set): Update.
179 (handle_detach): Update.
180 (handle_monitor_command): Update.
181 (handle_query): Update.
182 (captured_main): Update.
183 (process_serial_event): Update.
184 * server.h (server_waiting): Change to bool.
185 (disable_packet_vCont): Likewise.
186 (disable_packet_Tthread): Likewise.
187 (disable_packet_qC): Likewise.
188 (disable_packet_qfThreadInfo): Likewise.
189 (run_once): Likewise.
190 (non_stop): Likewise.
191 * target.c (target_stop_and_wait): Update.
192
80fd2826
TT
1932019-10-02 Tom Tromey <tromey@adacore.com>
194
195 * Makefile.in (SFILES): Add common-inferior.c.
196 (OBS): Add common-inferior.o.
197 * server.c (startup_with_shell): Don't define.
198
46f29a9a
AB
1992019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
200
201 * linux-low.c (linux_low_read_btrace): Update for change to
202 std::vector.
203
f9d949fb
CB
2042019-09-20 Christian Biesinger <cbiesinger@google.com>
205
206 * debug.c (debug_threads): Remove comment in favor of the header.
207 * debug.h (using_threads): Add declaration.
208 (debug_threads): Add comment.
209 * linux-aarch64-low.c: Include debug.h and remove declaration of
210 debug_threads.
211 * nto-low.c: Likewise.
212 * remote-utils.c: Likewise.
213 * thread-db.c: Likewise.
214
abf516c6
UW
2152019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
216
217 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
218 and powerpc-cell64l-ipa.o.
219 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
220 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
221 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
222 (spu*-*-*): Remove.
223
224 * spu-low.c: Remove file.
225
226 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
227 (parse_spufs_run): Remove.
228 (ppc_get_pc): Remove Cell/B.E. support.
229 (ppc_set_pc): Likewise.
230 (ppc_breakpoint_at): Likewise.
231 (ppc_arch_setup): Likewise.
232 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
233 tdesc_powerpc_cell32l.
234 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
235 or init_registers_powerpc_cell32l.
236 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
237 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
238 or init_registers_powerpc_cell32l.
239 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
240 (init_registers_powerpc_cell32l): Remove prototype.
241 (init_registers_powerpc_cell64l): Likewise.
242
243 * target.h (struct target_ops): Remove qxfer_spu member.
244 * server.c (handle_qxfer_spu): Remove.
245 (qxfer_packets): Remove entry for "spu".
246 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
247 * linux-low.c (SPUFS_MAGIC): Remove.
248 (spu_enumerate_spu_ids): Remove.
249 (linux_qxfer_spu): Remove.
250 (linux_target_ops): Remove qxfer_spu member.
251 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
252 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
253 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
254
2d41fa11
SDJ
2552019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
256
257 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
258 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
259 * config.in: Regenerate.
260 * configure: Regenerate.
261
d59b55f0
TT
2622019-08-15 Tom Tromey <tromey@adacore.com>
263
264 * target.c (target_write_memory): Use gdb::byte_vector.
265
4196ab2a
TT
2662019-08-15 Tom Tromey <tromey@adacore.com>
267
268 * tracepoint.c (write_inferior_data_pointer)
269 (write_inferior_integer, write_inferior_int8)
270 (write_inferior_uinteger, m_tracepoint_action_download)
271 (r_tracepoint_action_download, x_tracepoint_action_download)
272 (l_tracepoint_action_download, clear_inferior_trace_buffer)
273 (download_agent_expr, download_tracepoint_1)
274 (download_trace_state_variables, upload_fast_traceframes): Update.
275 * server.c (gdb_write_memory): Update.
276 * remote-utils.c (relocate_instruction): Update.
277 * proc-service.c (ps_pdwrite): Update.
278 * mem-break.c (remove_memory_breakpoint)
279 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
280 (uninsert_fast_tracepoint_jumps_at)
281 (reinsert_fast_tracepoint_jumps_at): Update.
282 * linux-x86-low.c (append_insns)
283 (i386_install_fast_tracepoint_jump_pad)
284 (amd64_write_goto_address, i386_write_goto_address): Update.
285 * linux-s390-low.c (append_insns, s390_write_goto_address):
286 Update.
287 * linux-ppc-low.c (ppc_relocate_instruction)
288 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
289 (ppc_write_goto_address): Update.
290 * linux-aarch64-low.c (append_insns): Update.
291 * target.h (struct target_ops): Update.
292 (write_inferior_memory): Don't declare.
293 * target.c (target_write_memory): Rename from
294 write_inferior_memory. Remove old target_write_memory.
295
c6778d00
TT
2962019-08-15 Tom Tromey <tromey@adacore.com>
297
298 * target.c (write_inferior_memory): Use std::vector.
299
404f2902
FCE
3002019-08-06 Frank Ch. Eigler <fche@redhat.com>
301
302 PR build/24886
303 * configure.ac: Drop enable-libmcheck support.
304 * configure, config.in: Rebuild.
305 * acinclude.m4: Don't include it.
306
4c5aa8e0
AH
3072019-07-19 Alan Hayward <alan.hayward@arm.com>
308
309 * configure.srv: Remove Arm xml files.
310
7cc17433
AH
3112019-07-19 Alan Hayward <alan.hayward@arm.com>
312
313 * configure.srv: Add new files. Remove xml generated files.
314 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
315 registers.
316 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
317 * linux-aarch32-tdesc.c: New file.
318 * linux-aarch32-tdesc.h: New file.
319 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
320 * linux-arm-low.c (init_registers_arm, tdesc_arm)
321 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
322 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
323 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
324 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
325 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
326 (arm_read_description): Call arm_linux_read_description.
327 (initialize_low_arch): Don't init registers.
328 * linux-arm-tdesc.c: New file.
329 * linux-arm-tdesc.h: New file.
330
166a82be
AH
3312019-07-10 Alan Hayward <alan.hayward@arm.com>
332
333 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
334 Move counter inside for.
335 (arm_read_description): Check ptrace earlier.
336 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
337
268a13a5
TT
3382019-07-09 Tom Tromey <tom@tromey.com>
339
340 * configure: Rebuild.
341 * configure.ac: Change common to gdbsupport.
342 * acinclude.m4: Change common to gdbsupport.
343 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
344 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
345 common to gdbsupport.
346 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
347 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
348 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
349 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
350 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
351 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
352 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
353 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
354 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
355 common to gdbsupport.
356
350fab54
AH
3572019-07-04 Alan Hayward <alan.hayward@arm.com>
358
359 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
360 defines.
361 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
362
2b40fda7
AH
3632019-07-04 Alan Hayward <alan.hayward@arm.com>
364
365 * configure.srv: Remove legacy xml.
366 * linux-aarch64-low.c (initialize_low_arch): Remove
367 initialize_low_tdesc call.
368 * linux-aarch64-tdesc-selftest.c: Remove file.
369 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
370 * linux-x86-low.c (initialize_low_arch): Remove
371 initialize_low_tdesc call.
372 * linux-x86-tdesc-selftest.c: Remove file.
373 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
374
7d10623d
TV
3752019-06-20 Tom de Vries <tdevries@suse.de>
376
377 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
378 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
379
8d6a48df
TV
3802019-06-19 Tom de Vries <tdevries@suse.de>
381
382 * debug.h (debug_write): Change return type to ssize_t.
383 * debug.c (debug_write): Same.
384
73cc7272
TT
3852019-06-14 Tom Tromey <tom@tromey.com>
386
387 * configure.ac: Use new path to gnulib.
388 * configure: Rebuild.
389 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
390 to gnulib.
391
08f10e02
TT
3922019-06-11 Tom Tromey <tom@tromey.com>
393
394 * Makefile.in (SFILES): Add alloc.c.
395 (OBS): Add alloc.o.
396 (IPA_OBJS): Add alloc-ipa.o.
397 (alloc-ipa.o): New target.
398 (%.o: ../%.c): New pattern rule.
399
422186a9
TT
4002019-06-10 Tom Tromey <tromey@adacore.com>
401
402 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
403 end warning with a newline.
404 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
405 newline.
406 * thread-db.c (attach_thread): Don't end warning with a newline.
407 (thread_db_notice_clone): Likewise.
408 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
409 newline.
410 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
411 end warning with a newline.
412
b02f78f9
PA
4132019-06-04 Pedro Alves <palves@redhat.com>
414
415 * server.c (captured_main): Use make_unique_xstrdup.
416
88ed7edb
TT
4172019-06-02 Tom Tromey <tom@tromey.com>
418
419 * gdbreplay.c (fromhex): Remove.
420 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
421
33a6bc35
TT
4222019-05-29 Tom Tromey <tromey@adacore.com>
423
424 * configure: Rebuild.
425
e90a813d
KB
4262019-05-06 Kevin Buettner <kevinb@redhat.com>
427
428 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
429 sign extension code on 32-bit builds.
430
353ea2d1
EZ
4312019-05-03 Eli Zaretskii <eliz@gnu.org>
432
433 * remote-utils.c:
434 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
435
b494cdff
TT
4362019-04-19 Tom Tromey <tom@tromey.com>
437
438 * server.c (struct vstop_notif): Derive from notif_event.
439 <base>: Remove.
440 (queue_stop_reply): Update.
441 (remove_all_on_match_ptid): Change type. Rewrite.
442 (discard_queued_stop_replies): Rewrite.
443 (in_queued_stop_replies_ptid): Change type.
444 (in_queued_stop_replies): Rewrite.
445 (notif_stop): Update.
446 (queue_stop_reply_callback): Update.
447 (captured_main): Don't call initialize_notif.
448 (push_stop_notification): Update.
449 * notif.c (notif_write_event, handle_notif_ack)
450 (notif_event_enque, notif_push): Update.
451 (notif_event_xfree, initialize_notif): Remove.
452 * notif.h (struct notif_event): Include <list>, not
453 "common/queue.h".
454 (struct notif_server) <queue>: Now a std::list.
455 (notif_event_p): Remove typedef.
456 (initialize_notif): Don't declare.
457 (struct notif_event): Add virtual destructor.
458
a7e559cc
AH
4592019-04-17 Alan Hayward <alan.hayward@arm.com>
460
461 * ax.c (ax_vdebug): Call debug_printf.
462 * debug.c (debug_write): New function.
463 * debug.h (debug_write): New declaration.
464 * linux-low.c (sigchld_handler): Call debug_write.
465
aeb2e706
AH
4662019-04-17 Alan Hayward <alan.hayward@arm.com>
467
468 * debug.c (debug_set_output): New function.
469 (debug_vprintf): Send output to debug_file.
470 (debug_flush): Likewise.
471 * debug.h (debug_set_output): New declaration.
472 * server.c (handle_monitor_command): Add debug-file option.
473 (captured_main): Likewise.
474
c1bc0935
AH
4752019-04-17 Alan Hayward <alan.hayward@arm.com>
476
477 * debug.c (remote_debug): Add definition.
478 * debug.h (remote_debug): Add declaration.
479 * hostio.c (remote_debug): Remove declaration.
480 * remote-utils.c (struct ui_file): Likewise.
481 (remote_debug): Likewise.
482 * remote-utils.h (remote_debug): Likewise,
483 * server.c (remote_debug): Remove definition.
484
3f52fdbc
KB
4852019-04-10 Kevin Buettner <kevinb@redhat.com>
486
487 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
488 when using a 64-bit gdbserver.
489
b0319eaa
TT
4902019-04-09 Tom Tromey <tromey@adacore.com>
491
492 * linux-low.c (select_event_lwp): Use find_thread_in_random.
493
eedc3f4f
TT
4942019-04-08 Tom Tromey <tom@tromey.com>
495
496 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
497 throw.
498 (linux_resume_one_lwp): Likewise.
499
230d2906
TT
5002019-04-08 Tom Tromey <tom@tromey.com>
501
502 * gdbreplay.c: Update.
503 * linux-low.c: Update.
504 * server.c: Update.
505
a70b8144
TT
5062019-04-08 Tom Tromey <tom@tromey.com>
507
508 * server.c: Use C++ exception handling.
509 * linux-low.c: Use C++ exception handling.
510 * gdbreplay.c: Use C++ exception handling.
511
3d6e9d23
TT
5122019-04-08 Tom Tromey <tom@tromey.com>
513
514 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
515 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
516 (captured_main, main): Update.
517 * gdbreplay.c (main): Update.
518
0570503d
PFC
5192019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
520
521 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
522 value in argument pointer, return 1 if the entry is found and 0
523 otherwise. Move comment.
524 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
525 * linux-low.h (linux_get_auxv): Declare.
526 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
527
227a9e65
TT
5282019-04-05 Tom Tromey <tromey@adacore.com>
529
530 * server.c (gdbserver_usage): Use upper-case for metasyntactic
531 variables.
532
69f4c9cc
AH
5332019-03-28 Alan Hayward <alan.hayward@arm.com>
534
535 * linux-low.c (AT_HWCAP2): Add define if not already included.
536
974c89e0
AH
5372019-03-26 Alan Hayward <alan.hayward@arm.com>
538
539 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
540 (aarch64_arch_setup): Call linux_get_hwcap.
541 * linux-arm-low.c (arm_get_hwcap): Remove function.
542 (arm_read_description): Call linux_get_hwcap.
543 * linux-low.c (linux_get_auxv): New function.
544 (linux_get_hwcap): Likewise.
545 (linux_get_hwcap2): Likewise.
546 * linux-low.h (linux_get_hwcap): New declaration.
547 (linux_get_hwcap2): Likewise.
548 * linux-ppc-low.c (ppc_get_auxv): Remove function.
549 (ppc_arch_setup): Call linux_get_hwcap.
550 * linux-s390-low.c (s390_get_hwcap): Remove function.
551 (s390_arch_setup): Call linux_get_hwcap.
552
1ef53e6b
AH
5532019-03-22 Alan Hayward <alan.hayward@arm.com>
554 Jiong Wang <jiong.wang@arm.com>
555
556 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
557 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
558 to fail.
559 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
560
ee4fbcfa
AH
5612019-03-22 Alan Hayward <alan.hayward@arm.com>
562 Jiong Wang <jiong.wang@arm.com>
563
564 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
565 (aarch64_get_hwcap): New function.
566 (aarch64_arch_setup): Read APIA hwcap.
567
6dc0ebde
AH
5682019-03-22 Alan Hayward <alan.hayward@arm.com>
569 Jiong Wang <jiong.wang@arm.com>
570
571 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
572 (initialize_low_tracepoint): Likewise.
573 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
574 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
575 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
576 (aarch64_linux_read_description): Likewise.
577 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
578
1163a4b7
JB
5792019-03-12 John Baldwin <jhb@FreeBSD.org>
580
581 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
582 i386_create_target_description for 'segments' parameter.
583 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
584 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
585 * win32-i386-low.c (i386_arch_setup): Likewise.
586
d3a70e03
TT
5872019-03-12 Tom Tromey <tromey@adacore.com>
588
589 * linux-low.c (iterate_over_lwps): Update.
590
37991b4f
TT
5912019-03-06 Tom Tromey <tom@tromey.com>
592
593 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
594 (captured_main): Use SCOPE_EXIT.
595
45950eb6
SDJ
5962019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
597
598 * configure.srv: Use '$enable_unittest' instead of '$development'
599 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
600 case.
601
43ac54fc
TT
6022019-02-27 Tom Tromey <tromey@adacore.com>
603
604 * gdbreplay.c (logchar): Handle \r\n.
605
df0da8a2
AH
6062019-02-07 Alan Hayward <alan.hayward@arm.com>
607
608 * linux-low.c (linux_attach): Add process before lwp.
609 * server.c (attach_inferior): Check if already attached.
610
1a5c2598
TT
6112019-02-07 Tom Tromey <tom@tromey.com>
612
613 * x86-tdesc.h: Rename include guard.
614 * x86-low.h: Add include guard.
615 * wincecompat.h: Rename include guard.
616 * win32-low.h: Add include guard.
617 * utils.h: Rename include guard.
618 * tracepoint.h: Rename include guard.
619 * tdesc.h: Rename include guard.
620 * target.h: Rename include guard.
621 * server.h: Rename include guard.
622 * remote-utils.h: Rename include guard.
623 * regcache.h: Rename include guard.
624 * nto-low.h: Rename include guard.
625 * notif.h: Add include guard.
626 * mem-break.h: Rename include guard.
627 * lynx-low.h: Add include guard.
628 * linux-x86-tdesc.h: Add include guard.
629 * linux-s390-tdesc.h: Add include guard.
630 * linux-ppc-tdesc-init.h: Add include guard.
631 * linux-low.h: Add include guard.
632 * linux-aarch64-tdesc.h: Add include guard.
633 * linux-aarch32-low.h: Add include guard.
634 * inferiors.h: Rename include guard.
635 * i387-fp.h: Rename include guard.
636 * hostio.h: Rename include guard.
637 * gdbthread.h: Rename include guard.
638 * gdb_proc_service.h: Rename include guard.
639 * event-loop.h: Rename include guard.
640 * dll.h: Rename include guard.
641 * debug.h: Rename include guard.
642 * ax.h: Rename include guard.
643
956cc47c
SN
6442018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
645
646 PR gdb/23985
647 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
648 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
649
a0707f3c
TT
6502019-01-25 Tom Tromey <tom@tromey.com>
651
652 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
653
0747795c
TT
6542019-01-25 Tom Tromey <tom@tromey.com>
655
656 * win32-low.c: Fix common/ includes.
657 * win32-i386-low.c: Fix common/ includes.
658 * tracepoint.c: Fix common/ includes.
659 * thread-db.c: Fix common/ includes.
660 * target.h: Fix common/ includes.
661 * symbol.c: Fix common/ includes.
662 * spu-low.c: Fix common/ includes.
663 * server.h: Fix common/ includes.
664 * server.c: Fix common/ includes.
665 * remote-utils.c: Fix common/ includes.
666 * regcache.h: Fix common/ includes.
667 * regcache.c: Fix common/ includes.
668 * nto-x86-low.c: Fix common/ includes.
669 * notif.h: Fix common/ includes.
670 * mem-break.h: Fix common/ includes.
671 * lynx-low.c: Fix common/ includes.
672 * lynx-i386-low.c: Fix common/ includes.
673 * linux-x86-tdesc-selftest.c: Fix common/ includes.
674 * linux-x86-low.c: Fix common/ includes.
675 * linux-low.c: Fix common/ includes.
676 * inferiors.h: Fix common/ includes.
677 * i387-fp.c: Fix common/ includes.
678 * hostio.c: Fix common/ includes.
679 * hostio-errno.c: Fix common/ includes.
680 * gdbthread.h: Fix common/ includes.
681 * gdbreplay.c: Fix common/ includes.
682 * fork-child.c: Fix common/ includes.
683 * event-loop.c: Fix common/ includes.
684 * ax.c:
685 (enum gdb_agent_op): Fix common/ includes.
686
be6d4f74
TT
6872019-01-21 Tom Tromey <tom@tromey.com>
688
689 * tracepoint.c: Fix includes.
690 * remote-utils.c: Fix includes.
691 * linux-x86-low.c: Fix includes.
692
66d91b39
JB
6932019-01-01 Joel Brobecker <brobecker@adacore.com>
694
695 * gdbreplay.c (gdbreplay_version): Update copyright year in
696 version message.
697 * server.c (gdbserver_version): Likewise.
698
754e3168
AH
6992018-12-05 Alan Hayward <alan.hayward@arm.com>
700
701 * linux-low.c (add_lwp): Switch ordering.
702
d105de22
TT
7032018-11-29 Tom Tromey <tom@tromey.com>
704
705 * win32-low.c (win32_join): Take pid, not process.
706 * target.h (struct target_ops) <join>: Change argument type.
707 (join_inferior): Change argument name.
708 * spu-low.c (spu_join): Take pid, not process.
709 * server.c (handle_detach): Preserve pid before destroying
710 process.
711 * lynx-low.c (lynx_join): Take pid, not process.
712 * linux-low.c (linux_join): Take pid, not process.
713
50138245
AH
7142018-11-23 Alan Hayward <alan.hayward@arm.com>
715
716 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
717 (aarch64_cannot_fetch_register): Likewise.
718 (struct linux_target_ops): Update references.
719
64f57f3d
PFC
7202018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
721
722 * linux-ppc-low.c: Include nat/linux-ptrace.h.
723
8d619c01
EBM
7242018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
725
726 * configure.srv (ipa_ppc_linux_regobj): Add
727 powerpc-isa207-htm-vsx32l-ipa.o and
728 powerpc-isa207-htm-vsx64l-ipa.o.
729 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
730 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
731 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
732 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
733 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
734 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
735 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
736 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
737 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
738 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
739 (init_registers_powerpc_isa207_htm_vsx32l)
740 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
741 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
742 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
743 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
744 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
745 (ppc_store_tm_ctarregset): New functions.
746 (ppc_regsets): Add entries for HTM regsets.
747 (ppc_arch_setup): Set htm in features struct when needed. Set
748 sizes for the HTM regsets.
749 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
750 (initialize_low_arch): Call
751 init_registers_powerpc_isa207_htm_vsx32l and
752 init_registers_powerpc_isa207_htm_vsx64l.
753 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
754 PPC_TDESC_ISA207_HTM_VSX.
755 (initialize_low_tracepoint): Call
756 init_registers_powerpc_isa207_htm_vsx32l and
757 init_registers_powerpc_isa207_htm_vsx64l.
758
232bfb86
EBM
7592018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
760
761 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
762 rs6000/power-linux-pmu.xml to srv_xmlfiles.
763 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
764 (ppc_store_pmuregset): New functions.
765 (ppc_regsets): Add entries for ebb and pmu regsets.
766 (ppc_arch_setup): Set isa207 in features struct if the ebb and
767 pmu regsets are available. Set sizes for these regsets.
768
f2cf6173
EBM
7692018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
770
771 * configure.srv (ipa_ppc_linux_regobj): Add
772 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
773 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
774 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
775 rs6000/powerpc-isa207-vsx32l.xml, and
776 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
777 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
778 <PPC_TDESC_ISA207_VSX>: New enum value.
779 (init_registers_powerpc_isa207_vsx32l): Declare.
780 (init_registers_powerpc_isa207_vsx64l): Declare.
781 * linux-ppc-low.c (ppc_fill_tarregset): New function.
782 (ppc_store_tarregset): New function.
783 (ppc_regsets): Add entry for the TAR regset.
784 (ppc_arch_setup): Set isa207 in features struct when needed. Set
785 size for the TAR regsets.
786 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
787 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
788 and init_registers_powerpc_isa207_vsx64l.
789 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
790 (initialize_low_tracepoint): Call
791 init_registers_powerpc_isa207_vsx32l and
792 init_registers_powerpc_isa207_vsx64l.
793
7ca18ed6
EBM
7942018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
795 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
796
797 * configure.srv (ipa_ppc_linux_regobj): Add
798 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
799 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
800 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
801 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
802 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
803 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
804 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
805 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
806 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
807 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
808 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
809 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
810 (ppc_hwcap): Add comment.
811 (ppc_hwcap2): New global.
812 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
813 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
814 (ppc_regsets): Add entries for the DSCR and PPR regsets.
815 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
816 when needed. Set sizes for the the DSCR and PPR regsets.
817 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
818 (initialize_low_arch): Call
819 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
820 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
821 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
822 PPC_TDESC_ISA205_PPR_DSCR_VSX.
823 (initialize_low_tracepoint): Call
824 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
825 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
826
5c849b22
PFC
8272018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
828
829 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
830
8ecfd7bd
SDJ
8312018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
832 Simon Marchi <simark@simark.ca>
833
834 * acinclude.m4: Include "../selftest.m4".
835 * configure: Regenerate.
836 * configure.ac: Use "GDB_AC_SELFTEST".
837 * configure.srv: Use "$enable_unittests" instead of
838 "$development" when checking whether unit tests have been
839 enabled.
840 * server.c (captured_main): Update message informing that
841 selftests have been disabled.
842
96643e35
TT
8432018-10-04 Tom Tromey <tom@tromey.com>
844
845 * configure: Rebuild.
846
da4ae14a
TT
8472018-10-04 Tom Tromey <tom@tromey.com>
848
849 * server.c (handle_status): Rename inner "thread".
850 (process_serial_event): Declare "res" in 'm' case.
851 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
852 (iterate_over_lwps): Rename inner "thread".
853 (linux_qxfer_libraries_svr4): Rename inner "len".
854 * gdbthread.h (find_thread_in_random): Rename inner "thread".
855
7c619dbd
GB
8562018-10-01 Gary Benson <gbenson@redhat.com>
857
858 * gdb_proc_service.h: Moved common code to
859 common/gdb_proc_service.h.
860
3795e814
GB
8612018-10-01 Gary Benson <gbenson@redhat.com>
862
863 * gdb_proc_service.h: Synchronize comments and whitespace with
864 GDB's version of this file.
865
49b036f1
TT
8662018-09-25 Tom Tromey <tom@tromey.com>
867
868 * configure: Rebuild.
869 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
870
8ff03f0b
SM
8712018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
872
873 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
874 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
875 ($(IPA_LIB)): Sort IPA_OBJS.
876
a1cd91dc
SM
8772018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
878
879 * Makefile.in: Remove references to $(ADD_DEPS).
880
752312ba
TT
8812018-09-16 Tom Tromey <tom@tromey.com>
882
883 * remote-utils.c (remote_open): Use GNU style for metasyntactic
884 variables.
885 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
886 variables.
887
f1628857
TT
8882018-09-05 Tom Tromey <tom@tromey.com>
889
890 * configure: Rebuild.
891
ad202fcc
SM
8922018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
893
894 PR build/23399
895 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
896
d3d8724a
TT
8972018-08-27 Tom Tromey <tom@tromey.com>
898
899 PR build/23087:
900 * configure: Rebuild.
901
b4f183d2
TT
9022018-08-27 Tom Tromey <tom@tromey.com>
903
904 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
905 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
906 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
907 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
908 (s390x_emit_stack_adjust): Add casts to unsigned char.
909
4e2aa472
SM
9102018-08-22 Simon Marchi <simon.marchi@ericsson.com>
911
912 PR gdb/23374
913 PR gdb/23375
914 * server.h (struct client_state) <disable_randomization>:
915 Initialize to 1.
916
cf4088a9
SM
9172018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
918
919 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
920 variable.
921 (mips_supply_ptrace_register): Likewise.
922
a0de763e
TT
9232018-07-22 Tom Tromey <tom@tromey.com>
924
925 * configure: Rebuild.
926
b0a7723d
TT
9272018-07-22 Tom Tromey <tom@tromey.com>
928
929 * win32-low.c (win32_create_inferior): Remove unused variables.
930 * gdbreplay.c (remote_open): Remove unused variable.
931 * remote-utils.c (remote_prepare): Remove unused variable.
932 * x86-tdesc.h (X86_TDESC_H): Define.
933 (amd64_expedite_regs): Define conditionally.
934 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
935 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
936 * remote-utils.c (readchar): Remove unused variable.
937
a780ef4f
PA
9382018-07-13 Pedro Alves <palves@redhat.com>
939
940 * linux-low.c (linux_kill): Change parameter to process_info
941 pointer instead of pid. Adjust.
942 * lynx-low.c (lynx_kill): Likewise.
943 * nto-low.c (nto_kill): Likewise.
944 * spu-low.c (spu_kill): Likewise.
945 * win32-low.c (win32_kill): Likewise.
946 * server.c (handle_v_kill, kill_inferior_callback)
947 (detach_or_kill_for_exit): Adjust.
948 * target.c (kill_inferior): Change parameter to process_info
949 pointer instead of pid. Adjust.
950 * target.h (struct target_ops) <kill>: Change parameter to
951 process_info pointer instead of pid. Adjust all implementations
952 and callers.
953 (kill_inferior): Likewise.
954
ef2ddb33
PA
9552018-07-13 Pedro Alves <palves@redhat.com>
956
957 * linux-low.c (linux_detach, linux_join): Change parameter to
958 process_info pointer instead of pid. Adjust.
959 * lynx-low.c (lynx_detach, lynx_join): Likewise.
960 * nto-low.c (nto_detach): Likewise.
961 * spu-low.c (spu_detach, spu_join): Likewise.
962 * win32-low.c (win32_detach, win32_join): Likewise.
963 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
964 * target.h (struct target_ops) <detach, join>: Change parameter to
965 process_info pointer instead of pid. Adjust all implementations
966 and callers.
967 (detach_inferior, join_inferior): Rename 'pid' parameter to
968 'proc'.
969
c7ab0aef
SDJ
9702018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
971 Jan Kratochvil <jan.kratochvil@redhat.com>
972 Paul Fertser <fercerpav@gmail.com>
973 Tsutomu Seki <sekiriki@gmail.com>
974
975 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
976 (OBS): Add 'common/netstuff.o'.
977 (GDBREPLAY_OBS): Likewise.
978 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
979 (remote_open): Implement support for IPv6
980 connections.
981 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
982 and 'wspiapi.h'.
983 (handle_accept_event): Accept connections from IPv6 sources.
984 (remote_prepare): Handle IPv6-style hostnames; implement
985 support for IPv6 connections.
986 (remote_open): Implement support for printing connections from
987 IPv6 sources.
988
31445d10
PA
9892018-07-11 Pedro Alves <palves@redhat.com>
990
991 PR gdb/23377
992 * mem-break.c (any_persistent_commands): Add process_info
993 parameter and use it instead of relying on the current process.
994 Change return type to bool.
995 * mem-break.h (any_persistent_commands): Add process_info
996 parameter and change return type to bool.
997 * server.c (handle_detach): Remove require_running_or_return call.
998 Look up the process_info for the process we're about to detach.
999 If not found, return back error to GDB. Adjust
1000 any_persistent_commands call to pass down a process pointer.
1001
cb197132
PA
10022018-07-11 Pedro Alves <palves@redhat.com>
1003
1004 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1005 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1006 instead of collect_register_by_name.
1007 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1008 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1009
1b919490
VB
10102018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1011 Pedro Alves <palves@redhat.com>
1012
1013 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1014
d7e15655
TT
10152018-07-03 Tom Tromey <tom@tromey.com>
1016
1017 * linux-low.c: Update.
1018 * lynx-low.c: Update.
1019 * mem-break.c: Update.
1020 * nto-low.c: Update.
1021 * remote-utils.c: Update.
1022 * server.c: Update.
1023 * spu-low.c: Update.
1024 * target.c: Update.
1025 * win32-low.c: Update.
1026
26a57c92
TT
10272018-07-03 Tom Tromey <tom@tromey.com>
1028
1029 * server.c: Update.
1030
0e998d96
TT
10312018-07-03 Tom Tromey <tom@tromey.com>
1032
1033 * linux-low.c: Update.
1034
cc6bcb54
TT
10352018-07-03 Tom Tromey <tom@tromey.com>
1036
1037 * target.c: Update.
1038
e38504b3
TT
10392018-07-03 Tom Tromey <tom@tromey.com>
1040
1041 * linux-low.c: Update.
1042 * linux-mips-low.c: Update.
1043 * lynx-low.c: Update.
1044 * nto-low.c: Update.
1045 * remote-utils.c: Update.
1046 * server.c: Update.
1047 * spu-low.c: Update.
1048 * target.c: Update.
1049 * thread-db.c: Update.
1050
e99b03dc
TT
10512018-07-03 Tom Tromey <tom@tromey.com>
1052
1053 * linux-low.c: Update.
1054 * linux-mips-low.c: Update.
1055 * lynx-low.c: Update.
1056 * mem-break.c: Update.
1057 * nto-low.c: Update.
1058 * remote-utils.c: Update.
1059 * server.c: Update.
1060 * spu-low.c: Update.
1061 * target.c: Update.
1062 * tracepoint.c: Update.
1063
f2907e49
TT
10642018-07-03 Tom Tromey <tom@tromey.com>
1065
1066 * linux-low.c: Update.
1067 * linux-ppc-low.c: Update.
1068 * linux-x86-low.c: Update.
1069 * proc-service.c: Update.
1070 * server.c: Update.
1071 * spu-low.c: Update.
1072 * thread-db.c: Update.
1073 * win32-low.c: Update.
1074
fd79271b
TT
10752018-07-03 Tom Tromey <tom@tromey.com>
1076
1077 * linux-low.c: Update.
1078 * lynx-low.c: Update.
1079 * nto-low.c: Update.
1080 * remote-utils.c: Update.
1081 * spu-low.c: Update.
1082 * thread-db.c: Update.
1083 * win32-low.c: Update.
1084
c0867626
SDJ
10852018-06-29 Joel Brobecker <brobecker@adacore.com>
1086
1087 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1088 parameter in call to 'amd64_create_target_description'.
1089
2512d7ef
JK
10902018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1091
1092 * x86-tdesc.h: Remove executable permission flag.
1093
d0ac1c44
SM
10942018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1095
1096 * configure.ac: Remove AC_PREREQ, add missing quoting.
1097 * configure: Re-generate.
1098 * config.in: Re-generate.
1099 * aclocal.m4: Re-generate.
1100
c4eb05ff
SM
11012018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1102
1103 * tracepoint.h (current_traceframe): Remove declaration.
1104
02895270
AH
11052018-06-18 Alan Hayward <alan.hayward@arm.com>
1106
1107 * linux-aarch64-low.c (is_sve_tdesc): New function.
1108 (aarch64_sve_regs_copy_to_regcache): Likewise.
1109 (aarch64_sve_regs_copy_from_regcache): Likewise.
1110 (aarch64_regs_info): Add SVE checks.
1111 (initialize_low_arch): Initialize SVE.
1112
e9902bfc
AH
11132018-06-18 Alan Hayward <alan.hayward@arm.com>
1114
1115 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1116
fefa175e
AH
11172018-06-11 Alan Hayward <alan.hayward@arm.com>
1118
1119 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1120 (initialize_low_tracepoint): Likewise
1121 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1122 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1123 param.
1124 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1125 checks.
1126 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1127
b91ad3ff
AH
11282018-06-11 Alan Hayward <alan.hayward@arm.com>
1129
1130 * server.h (PBUFSIZ): Increase size
1131
f868386e
AH
11322018-06-11 Alan Hayward <alan.hayward@arm.com>
1133
1134 * regcache.c (regcache::raw_compare): New function.
1135 * regcache.h (regcache::raw_compare): New declaration.
1136
9c861883
AH
11372018-06-11 Alan Hayward <alan.hayward@arm.com>
1138
1139 * regcache.c (new_register_cache): Use new.
1140 (free_register_cache): Use delete.
1141 (register_data): Use const.
1142 (supply_register): Move body inside regcache.
1143 (regcache::raw_supply): New override function.
1144 (collect_register): Move body inside regcache.
1145 (regcache::raw_collect): New override function.
1146 (regcache::get_register_status): New override function.
1147 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1148
40591844
TT
11492018-06-09 Tom Tromey <tom@tromey.com>
1150
1151 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1152 declare queue.
1153 (event_queue): Use std::queue.
1154 (gdb_event_xfree): Remove.
1155 (initialize_event_loop, process_event, wait_for_event): Update.
1156
6341380d
SC
11572018-06-08 Stan Cox <scox@redhat.com>
1158
1159 * win32-low.c (win32_create_inferior): last_ptid and last_status
1160 moved to client_state.
1161
03349c93
PA
11622018-06-08 Pedro Alves <palves@redhat.com>
1163
1164 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1165 common/common-exceptions.o, common/common-utils.o,
1166 common/errors.o, common/print-utils.o and utils.o.
1167 * gdbreplay.c: Include "common-defs.h" instead of the two
1168 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1169 string.h or alloca.h.
1170 (perror_with_name): Delete.
1171 (remote_open): Use xstrdup instead of strdup.
1172 (main): Rename to ...
1173 (captured_main): ... this.
1174 (main): New.
1175
8dcc53b3
TT
11762018-06-08 Tom Tromey <tom@tromey.com>
1177
1178 * linux-low.c (linux_low_read_btrace): Update.
1179
c12a5089
SC
11802018-06-04 Stan Cox <scox@redhat.com>
1181
1182 * server.h (struct client_state): New.
1183 * server.c (cont_thread, general_thread, multi_process)
1184 (report_fork_events, report_vfork_events, report_exec_events)
1185 (report_thread_events, swbreak_feature, hwbreak_feature)
1186 (vCont_supported, disable_randomization, pass_signals)
1187 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1188 Moved to client_state.
1189 * remote-utils.c (remote_debug, noack_mode)
1190 (transport_is_reliable): Moved to client_state.
1191 * tracepoint.c (current_traceframe): Moved to client_state.
1192
1193 Update all callers.
1194 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1195 linux-low.c, remote-utils.h, target.c: Use client_state.
1196
122394f1
AH
11972018-05-31 Alan Hayward <alan.hayward@arm.com>
1198
1199 * configure.srv: Add new c/h file.
1200
95228a0d
AH
12012018-05-31 Alan Hayward <alan.hayward@arm.com>
1202
1203 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1204 null VQ.
1205
d8dab6c3
MR
12062018-05-25 Maciej W. Rozycki <macro@mips.com>
1207
1208 * gdb.arch/mips-fpregset-core.exp: New test.
1209 * gdb.arch/mips-fpregset-core.c: New test source.
1210
81e25b7c
EK
12112018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1212
1213 PR server/23198
1214 * hostio.c (require_int): Do not report overflow for integers
1215 between 0xfffffff and 0x7fffffff.
1216
7e947ad3
MR
12172018-05-22 Maciej W. Rozycki <macro@mips.com>
1218
1219 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1220 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1221 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1222 functions.
1223 (the_low_target): Wire them.
1224
1d75a658
PFC
12252018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1226
1227 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1228 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1229 mode. Call collect_register_by_name with vscr using
1230 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1231 (ppc_store_vrregset): Add and set vscr_offset variable as in
1232 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1233 vscr_offset.
1234
d078308a
PFC
12352018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1236
1237 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1238 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1239 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1240
7273b5fc
PFC
12412018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1242
1243 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1244 (ppc_store_vsxregset): Likewise.
1245 (ppc_fill_vrregset): Likewise.
1246 (ppc_store_vrregset): Likewise.
1247 (ppc_fill_evrregset): Likewise.
1248 (ppc_store_evrregset): Likewise.
1249 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1250 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1251 needed.
1252
2e077f5e
PFC
12532018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1254
1255 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1256 wordsize of the inferior. Call ppc_linux_target_wordsize.
1257
bd64614e
PFC
12582018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1259
1260 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1261 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1262 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1263 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1264 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1265 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1266 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1267 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1268 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1269 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1270 (tdesc_powerpc_e500l): Remove.
1271 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1272 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1273 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1274 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1275 linux-ppc-tdesc.h.
1276 (ppc_arch_setup): Remove target description matching code. Fill a
1277 ppc_linux_features struct and call ppc_linux_match_description
1278 with it.
1279
75d74cca
MR
12802018-05-22 Maciej W. Rozycki <macro@mips.com>
1281
1282 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1283 width of the requested register exceeds the width of the
1284 `ptrace' data type.
1285 (mips_cannot_store_register): Likewise.
1286
e4439e43
MR
12872018-05-21 Maciej W. Rozycki <macro@mips.com>
1288
1289 * linux-mips-low.c (mips_fetch_register): New function. Update
1290 preceding comment.
1291 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1292 (the_low_target): Wire `mips_fetch_register'.
1293
55271bf9
JB
12942018-05-10 Joel Brobecker <brobecker@adacore.com>
1295
1296 * lynx-i386-low.c (LYNXOS_178): New macro.
1297 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1298 the layout on LynxOS-178.
1299 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1300 handle floating point registers that are not supported by
1301 LynxOS-178.
1302
1a34f210
TT
13032018-05-10 Tom Tromey <tom@tromey.com>
1304
1305 * configure: Rebuild.
1306
190852c8
JB
13072018-05-10 Joel Brobecker <brobecker@adacore.com>
1308
1309 PR server/23158:
1310 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1311 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1312 Use it to set the expedite_regs field in the given tdesc.
1313 * x86-tdesc.h: New file.
1314 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1315 Adjust following the addition of the new expedite_regs parameter
1316 to init_target_desc.
1317 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1318 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1319 (i386_linux_read_description, amd64_linux_read_description):
1320 Adjust following the addition of the new expedite_regs parameter
1321 to init_target_desc.
1322 * lynx-i386-low.c: #include "x86-tdesc.h".
1323 (lynx_i386_arch_setup): Adjust following the addition of the new
1324 expedite_regs parameter to init_target_desc.
1325 * nto-x86-low.c: #include "x86-tdesc.h".
1326 (nto_x86_arch_setup): Adjust following the addition of the new
1327 expedite_regs parameter to init_target_desc.
1328 * win32-i386-low.c: #include "x86-tdesc.h".
1329 (i386_arch_setup): Adjust following the addition of the new
1330 expedite_regs parameter to init_target_desc.
1331
7dbac825
JB
13322018-05-10 Joel Brobecker <brobecker@adacore.com>
1333
1334 PR server/23158:
1335 * win32-low.c (win32_create_inferior): Add call to my_wait
1336 setting last_status global.
1337
906994d9
JB
13382018-05-10 Joel Brobecker <brobecker@adacore.com>
1339
1340 PR server/23158:
1341 * win32-low.c (create_process): Only call gdb_tilde_expand if
1342 inferior_cwd is not NULL.
1343
8ee22052
AB
13442018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1345
1346 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1347 registers to the cache if their values have changed.
1348 (i387_xsave_to_cache): Provide default values for x87 control
1349 registers when these features are available, but disabled.
1350 * regcache.c (supply_register_by_name_zeroed): New function.
1351 * regcache.h (supply_register_by_name_zeroed): Declare new
1352 function.
1353
aff689d3
TT
13542018-05-07 Tom Tromey <tom@tromey.com>
1355
1356 * configure: Rebuild.
1357
85e26832
TT
13582018-05-04 Tom Tromey <tom@tromey.com>
1359
1360 * configure: Rebuild.
1361
a3b60e45
JK
13622018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1363 Pedro Alves <palves@redhat.com>
1364
1365 * linux-aarch64-low.c (aarch64_stopped_data_address):
1366 Likewise.
1367
632e107b
TT
13682018-04-27 Tom Tromey <tom@tromey.com>
1369
1370 * configure: Rebuild.
1371
458412c3
TT
13722018-04-23 Tom Tromey <tom@tromey.com>
1373
1374 * configure: Rebuild.
1375
f31c089e
SM
13762018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1377
1378 * Makefile.in (depcomp): Add "..".
1379 (all_deps_files): New and use it.
1380
b319b098
AH
13812018-04-18 Alan Hayward <alan.hayward@arm.com>
1382
1383 * configure.srv (aarch64*-*-linux*): Don't include xml.
1384 (i[34567]86-*-cygwin*): Likewise.
1385 (i[34567]86-*-linux*): Likewise.
1386 (i[34567]86-*-lynxos*): Likewise.
1387 (i[34567]86-*-mingw32ce*): Likewise.
1388 (i[34567]86-*-mingw*): Likewise.
1389 (i[34567]86-*-nto*): Likewise.
1390 (tic6x-*-uclinux): Likewise.
1391 (x86_64-*-linux*): Likewise.
1392 (x86_64-*-mingw*): Likewise.
1393 (x86_64-*-cygwin*): Likewise.
1394
3b74854b
AH
13952018-04-18 Alan Hayward <alan.hayward@arm.com>
1396
1397 * tdesc.c: Remove xml parameter.
1398
e98577a9
AH
13992018-04-18 Alan Hayward <alan.hayward@arm.com>
1400
1401 * server.c (get_features_xml): Remove cast.
1402 * tdesc.c (void target_desc::accept): Fill in function.
1403 (tdesc_get_features_xml): Remove old xml creation.
1404 (print_xml_feature::visit_pre): Add xml vistor.
1405 * tdesc.h (struct target_desc): Make xmltarget mutable.
1406 (tdesc_get_features_xml): Remove declaration.
1407
d278f585
AH
14082018-04-18 Alan Hayward <alan.hayward@arm.com>
1409
1410 * tdesc.c (tdesc_architecture_name): Add new function.
1411 (tdesc_osabi_name): Likewise.
1412 (tdesc_get_features_xml): Use new functions.
1413
eee8a18d
AH
14142018-04-18 Alan Hayward <alan.hayward@arm.com>
1415
1416 * tdesc.c (tdesc_create_flags): Remove.
1417 (tdesc_add_flag): Likewise.
1418 (tdesc_named_type): Likewise.
1419 (tdesc_create_union): Likewise.
1420 (tdesc_create_struct): Likewise.
1421 (tdesc_create_vector): Likewise.
1422 (tdesc_add_bitfield): Likewise.
1423 (tdesc_add_field): Likewise.
1424 (tdesc_set_struct_size): Likewise.
1425
82ec9bc7
AH
14262018-04-18 Alan Hayward <alan.hayward@arm.com>
1427
1428 * tdesc.c (~target_desc): Remove implictly deleted items.
1429 (init_target_desc): Iterate all features.
1430 (tdesc_get_features_xml): Use vector.
1431 (tdesc_create_feature): Create feature.
1432 * tdesc.h (tdesc_feature) Remove
1433 (target_desc): Add features.
1434
ea3e7d71
AH
14352018-04-18 Alan Hayward <alan.hayward@arm.com>
1436
1437 * Makefile.in: Add common/tdesc.c
1438 * tdesc.c (init_target_desc): init all reg_defs from register
1439 vector.
1440 (tdesc_create_reg): Create tdesc_reg.
1441 * tdesc.h (tdesc_feature): Add register vector.
1442
17d08cd4
SM
14432018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1444
1445 * tdesc.h (struct target_desc) <features>: Change type to
1446 std::vector<std::string>.
1447 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1448 changes.
1449 (tdesc_get_features_xml): Likewise.
1450 (tdesc_create_feature): Likewise.
1451
5cd3e386
AH
14522018-03-26 Alan Hayward <alan.hayward@arm.com>
1453
1454 * regcache.c (find_register_by_number): Return a ref.
1455 (find_regno): Use references.
1456 (register_size): Likewise.
1457 (register_data): Likewise.
1458 * tdesc.c (target_desc::~target_desc): Remove free calls.
1459 (target_desc::operator==): Use std::vector compare.
1460 (init_target_desc): Use reference.
1461 (tdesc_create_reg): Use reg constructors.
1462 * tdesc.h (struct target_desc): Replace pointer with object.
1463
dff7492c
AH
14642018-03-23 Alan Hayward <alan.hayward@arm.com>
1465
1466 * regcache.c (find_register_by_number): Make static.
1467 (find_regno): Use find_register_by_number
1468 * regcache.h (struct reg): Remove declaration.
1469
d80e5242
AH
14702018-03-23 Alan Hayward <alan.hayward@arm.com>
1471
1472 * tdesc.c (target_desc::~target_desc): Move to here.
1473 (target_desc::operator==): Likewise.
1474 * tdesc.h (target_desc::~target_desc): Move from here.
1475 (target_desc::operator==): Likewise.
1476
f69c5afb
AA
14772018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1478
1479 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1480
ce29f843
AA
14812018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1482
1483 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1484 S390_TDESC_GS.
1485 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1486 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1487 and init_registers_s390_gs_linux64.
1488
c49bd90b
AA
14892018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1490
1491 * linux-s390-low.c (s390_fill_gs): Remove function.
1492 (s390_fill_gsbc): Remove function.
1493 (s390_regsets): Set fill functions for the guarded storage regsets
1494 to NULL.
1495
7edb9bd3
AA
14962018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1497
1498 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1499 the word size. Add comment.
1500 (s390_get_wordsize): New function.
1501 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1502 pswm with it. Instead, use s390_get_wordsize to determine the
1503 word size first and derive the correct tdesc from that directly.
1504
39be3c7e
SM
15052018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1506
1507 * Makefile.in: Include silent-rules.mk.
1508 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1509 (COMPILE): Add ECHO_CXX.
1510 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1511 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1512 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1513 (version-generated.c): Add ECHO_GEN.
1514 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1515 (IPAGENT_COMPILE): Add ECHO_CXX.
1516 (%-generated.c): Add ECHO_REGDAT.
1517
3ae9ce5d
TT
15182018-03-14 Tom Tromey <tom@tromey.com>
1519
1520 PR cli/14977:
1521 * ax.c (ax_printf): Special case for NULL.
1522
e6a58aa8
SM
15232018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1524
1525 * linux-low.c (linux_qxfer_libraries_svr4): Use
1526 xml_escape_text_append.
1527
f6e8a41e
SM
15282018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1529
1530 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1531
b9671caf
SM
15322018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1533
1534 * server.c (handle_general_set): Remove unnecessary xstrdup.
1535
e80aaf61
SM
15362018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1537
1538 * server.c (parse_debug_format_options): Adjust to
1539 delim_string_to_char_ptr_vec changes.
1540 * thread-db.c (thread_db_load_search): Adjust to
1541 dirnames_to_char_ptr_vec changes.
1542
b1223e78
MM
15432018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1544
1545 * target.h (target_enable_btrace, target_disable_btrace)
1546 (target_read_btrace, target_read_btrace_conf): Turn macro into
1547 inline function. Throw error if target method is not defined.
1548 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1549 check for btrace target method. Be prepared to handle exceptions
1550 from btrace target methods.
1551
81561546
SDJ
15522018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1553
1554 * server.c (captured_main): Change order of error message printed
1555 when the current working directory cannot be found.
1556
25e3c82c
SDJ
15572018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1558
1559 * server.c: Include "filenames.h" and "pathstuff.h".
1560 (program_name): Delete variable.
1561 (program_path): New anonymous class.
1562 (get_exec_wrapper): Use "program_path" instead of
1563 "program_name".
1564 (handle_v_run): Likewise.
1565 (captured_main): Likewise.
1566 (process_serial_event): Likewise.
1567
b4987c95
SDJ
15682018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1569
1570 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1571 (OBJS): Add "pathstuff.o".
1572 * server.c (current_directory): New global variable.
1573 (captured_main): Initialize "current_directory".
1574
f46cd62a
AH
15752018-02-26 Alan Hayward <alan.hayward@arm.com>
1576
1577 * tdesc.c: Use common/tdesc.h.
1578 * tdesc.h: Likewise.
1579
a543c5ca
AH
15802018-02-20 Alan Hayward <alan.hayward@arm.com>
1581 Simon Marchi <simon.marchi@ericsson.com>
1582
1583 * Makefile.in: Switch order of make rules.
1584
b5884fa7
AH
15852018-02-19 Alan Hayward <alan.hayward@arm.com>
1586
1587 * Makefile.in: Add common directory in build.
1588 * configure.ac: Add common reference.
1589 * configure: Regenerate.
1590
de6242d3
MM
15912018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1592
1593 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1594 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1595 * spu-low.c (spu_target_ops): Likewise.
1596 * win32-low.c (win32_target_ops): Likewise.
1597 * server.c (supported_btrace_packets): Report packets unconditionally.
1598 * target.h (target_ops) <supports_btrace>: Remove.
1599 (target_supports_btrace): Remove.
1600
9ee23a85
MM
16012018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1602
1603 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1604 (handle_btrace_disable): Change return type to void. Use exceptions
1605 to report errors.
1606 (handle_btrace_general_set): Catch exception and copy message to
1607 return message.
1608
8ce47547
TT
16092018-02-08 Tom Tromey <tom@tromey.com>
1610
1611 * linux-low.c (install_software_single_step_breakpoints): Use
1612 make_scoped_restore.
1613 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1614 (do_restore_current_thread_cleanup): Remove.
1615 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1616 declare.
1617
45dd3607
TT
16182018-02-08 Tom Tromey <tom@tromey.com>
1619
1620 * mem-break.c (set_raw_breakpoint_at): Use
1621 gdb::unique_xmalloc_ptr.
1622
e671cd59
PA
16232018-01-30 Pedro Alves <palves@redhat.com>
1624
1625 PR gdb/13211
1626 * target.c (target_terminal::terminal_state): Rename to ...
1627 (target_terminal::m_terminal_state): ... this.
1628
a0aad537
JC
16292018-01-19 James Clarke <jrtc27@jrtc27.com>
1630
1631 * linux-low.c (handle_extended_wait): Surround call to
1632 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1633
4d9b86e1
SM
16342018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1635
1636 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1637 linux_ptrace_attach_fail_reason_string now returning an
1638 std::string.
1639 (linux_attach): Likewise.
1640 * thread-db.c (attach_thread): Likewise.
1641
f517c180
EA
16422018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1643
1644 PR gdb/21559
1645 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1646 checking for fs_base/gs_base fields in struct user_regs_struct.
1647 * configure: Regenerate.
1648
9a70f35c
YQ
16492018-01-16 Yao Qi <yao.qi@linaro.org>
1650
1651 PR gdb/18749
1652 * linux-low.c (fetch_register): Call supply_register instead of
1653 error.
1654
605fd3c6
YQ
16552018-01-08 Yao Qi <yao.qi@linaro.org>
1656 Simon Marchi <simon.marchi@ericsson.com>
1657
1658 * Makefile.in (OBS): Remove selftest.o.
1659 * configure.ac: Set srv_selftest_objs if $development is true.
1660 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1661 * configure: Re-generated.
1662 * server.c (captured_main): Wrap variable selftest_filter with
1663 GDB_SELF_TEST.
1664
2cc05030
SM
16652018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1666
1667 * server.c (parse_debug_format_options): Return std::string.
1668 (handle_monitor_command, captured_main): Adjust.
1669
e379cee6
PA
16702018-01-05 Pedro Alves <palves@redhat.com>
1671
1672 PR gdb/18653
1673 * server.c (captured_main): Pass quiet=false to
1674 save_original_signals_state.
1675
82e1e79a
JB
16762018-01-01 Joel Brobecker <brobecker@adacore.com>
1677
1678 * gdbreplay.c (gdbreplay_version): Update copyright year in
1679 version message.
1680 * server.c (gdbserver_version): Likewise.
1681
8e481c3b
TT
16822017-12-08 Tom Tromey <tom@tromey.com>
1683
1684 * ax.c (ax_printf): Update.
1685
a8806230
YQ
16862017-12-07 Yao Qi <yao.qi@linaro.org>
1687
1688 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1689 aarch64_linux_read_description.
1690 * linux-amd64-ipa.c (idx2mask): New array.
1691 (get_ipa_tdesc): Move idx2mask out.
1692 (initialize_low_tracepoint): Initialize target descriptions.
1693 * linux-i386-ipa.c (idx2mask): New array.
1694 (get_ipa_tdesc): Move idx2mask out.
1695 (initialize_low_tracepoint): Initialize target descriptions.
1696
d4a0e8b5
SM
16972017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1698
1699 * tdesc.c (struct tdesc_type): Change return type.
1700 (tdesc_add_flag): Change parameter type.
1701 (tdesc_add_bitfield): Likewise.
1702 (tdesc_add_field): Likewise.
1703 (tdesc_set_struct_size): Likewise.
1704
798a7429
SM
17052017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1706
1707 * regcache.c (registers_to_string): Remove unused variable.
1708
c0e15c9b
SM
17092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1710
1711 * inferiors.c (for_each_inferior_with_data): Remove.
1712 * inferiors.h (for_each_inferior_with_data): Remove.
1713 * server.c (handle_qxfer_threads_worker): Change parameter type.
1714 (handle_qxfer_threads_proper): Use for_each_thread.
1715
f0045347
SM
17162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1717
1718 * inferiors.c (for_each_inferior): Remove.
1719 (clear_inferiors): Use for_each_thread.
1720 * inferiors.h (for_each_inferior): Remove.
1721 * linux-low.c (linux_wait_for_event_filtered): Use
1722 for_each_thread.
1723 (linux_stabilize_threads): Likewise.
1724 * regcache.c (regcache_release): Likewise.
1725 * server.c (gdb_wants_all_threads_stopped): Likewise.
1726 (clear_pending_status_callback): Remove.
1727 (handle_status): Use for_each_thread.
1728 (captured_main): Likewise.
1729 * win32-low.c (child_init_thread_list): Likewise.
1730 (win32_clear_inferiors): Likewise.
1731 (fake_breakpoint_event): Likewise.
1732
9521758b
SM
17332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1734
1735 * inferiors.h (find_inferior): Remove.
1736 * inferiors.c (find_inferior): Remove.
1737
8f86d7aa
SM
17382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1739
1740 * linux-low.c (resume_status_pending_p): Update comment.
1741 (need_step_over_p): Update comment.
1742
e2b44075
SM
17432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1744
1745 * linux-low.c (proceed_one_lwp): Return void, change parameter
1746 type.
1747 (unsuspend_and_proceed_one_lwp): Likewise.
1748 (proceed_all_lwps): Use for_each_thread.
1749 (unstop_all_lwps): Likewise.
1750
c80825ff
SM
17512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1752
1753 * linux-low.c (linux_resume_one_thread): Return void, take
1754 parameter directly.
1755 (linux_resume): Use for_each_thread.
1756
df3e4dbe
SM
17572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1758
1759 * linux-low.c (send_sigstop_callback): Return void, change
1760 parameter type. Rename to...
1761 (send_sigstop): ... this.
1762 (suspend_and_send_sigstop_callback): Return void, change parameter
1763 type. Rename to...
1764 (suspend_and_send_sigstop): ... this.
1765 (stop_all_lwps): Use for_each_thread.
1766
5a6b0a41
SM
17672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1768
1769 * linux-low.c (lwp_running): Return bool, remove unused
1770 argument.
1771 (linux_stabilize_threads): Use find_thread.
1772
39a64da5
SM
17732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1774
1775 * linux-low.c (select_singlestep_lwp_callback): Remove.
1776 (count_events_callback): Remove.
1777 (select_event_lwp_callback): Remove.
1778 (select_event_lwp): Use find_thread/for_each_thread.
1779
a1385b7b
SM
17802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1781
1782 * linux-low.c (not_stopped_callback): Return bool, take filter
1783 argument directly.
1784 (linux_wait_for_event_filtered): Use find_thread.
1785 (linux_wait_1): Likewise.
1786
454296a2
SM
17872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1788
1789 * linux-low.c (same_lwp): Remove.
1790 (find_lwp_pid): Use find_thread.
1791
6b2a85da
SM
17922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1793
1794 * linux-low.c (delete_lwp_callback): Remove.
1795 (linux_mourn): Use for_each_thread.
1796
798a38e8
SM
17972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1798
1799 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1800 args parameter, don't check for pid.
1801 (linux_detach): Use for_each_thread.
1802
e4eb0dec
SM
18032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1804
1805 * linux-low.c (struct counter): Remove.
1806 (second_thread_of_pid_p): Remove.
1807 (last_thread_of_process_p): Use find_thread.
1808
83e1b6c1
SM
18092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1810
1811 * inferiors.c (find_inferior_in_random): Remove.
1812 * inferiors.h (find_inferior_in_random): Remove.
1813 * linux-low.c (status_pending_p_callback): Return bool, accept
1814 parameter ptid directly.
1815 (linux_wait_for_event_filtered): Use find_thread_in_random.
1816 (linux_wait_1): Likewise.
1817
8dc7b443
SM
18182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1819
1820 * inferiors.c (find_inferior_id): Remove.
1821 (find_thread_ptid): Move implemention from find_inferior_id to
1822 here.
1823 * inferiors.h (find_inferior_id): Remove.
1824 * server.c (handle_status): Use find_thread_ptid.
1825 (process_serial_event): Likewise.
1826 * thread-db.c (find_one_thread): Likewise.
1827 (thread_db_thread_handle): Likewise.
1828 * win32-low.c (thread_rec): Likewise.
1829 (child_delete_thread): Likewise.
1830 (win32_thread_alive): Likewise.
1831 (get_child_debug_event): Likewise.
1832
da25033c
SM
18332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1834
1835 * linux-mips-low.c (update_watch_registers_callback): Return
1836 void, remove pid_p parameter, don't check for pid.
1837 (mips_insert_point, mips_remove_point): Use for_each_thread.
1838
c91bb56b
SM
18392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1840
1841 * lynx.low (lynx_delete_thread_callback): Remove.
1842 (lynx_mourn): Use for_each_thread.
1843
634a3254
SM
18442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1845
1846 * regcache.c (regcache_invalidate_one): Remove.
1847 (regcache_invalidate_pid): use for_each_thread.
1848
41272101
TT
18492017-11-26 Tom Tromey <tom@tromey.com>
1850
1851 * linux-low.c (linux_create_inferior): Update.
1852
f5291a6f
UW
18532017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1854
1855 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1856
6654d750
AH
18572017-11-24 Alan Hayward <alan.hayward@arm.com>
1858
1859 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1860 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1861 * linux-aarch64-tdesc-selftest.c: New file.
1862 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1863
18642017-11-24 Alan Hayward <alan.hayward@arm.com>
1865
1866 * configure.srv: Add new file.
1867 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1868 * linux-aarch64-tdesc-selftest.c: New file.
1869 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1870
49bdb7ee
AH
18712017-11-24 Alan Hayward <alan.hayward@arm.com>
1872
1873 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1874 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1875 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1876
d6d7ce56
AH
18772017-11-24 Alan Hayward <alan.hayward@arm.com>
1878
1879 * configure.srv: Add new files.
1880 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1881 aarch64_linux_read_description.
1882 * linux-aarch64-low.c (aarch64_linux_read_description):
1883 Merge with aarch64_arch_setup.
1884 (aarch64_arch_setup): Call aarch64_linux_read_description.
1885 * linux-aarch64-tdesc.c: New file.
1886 * linux-aarch64-tdesc.h: New file.
1887
506fe5f4
YQ
18882017-11-24 Yao Qi <yao.qi@linaro.org>
1889
1890 * configure.srv: Set $srv_regobj for tic6x-linux.
1891 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1892 (tic6x_read_description): Move some code to tic6x_arch_setup.
1893 (tic6x_tdesc_test): New function.
1894 (initialize_low_arch): Call selftests::register_test.
1895
29f9a567
YQ
18962017-11-22 Yao Qi <yao.qi@linaro.org>
1897
1898 * remote-utils.c (prepare_resume_reply): Use memcpy.
1899
578290ec
SM
19002017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1901
1902 * linux-low.c (kill_one_lwp_callback): Return void, take
1903 argument directly, don't filter on pid.
1904 (linux_kill): Use for_each_thread.
1905
eca55aec
SM
19062017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1907
1908 * linux-low.c (need_step_over_p): Return bool, remove dummy
1909 argument.
1910 (linux_resume, proceed_all_lwps): Use find_thread.
1911
25c28b4d
SM
19122017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1913
1914 * linux-low.c (resume_status_pending_p): Return bool, remove
1915 flag_p argument.
1916 (linux_resume): Use find_thread.
1917
5fdda392
SM
19182017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1919
1920 * linux-low.c (struct thread_resume_array): Remove.
1921 (linux_set_resume_request): Return void, take arguments
1922 directly.
1923 (linux_resume): Use for_each_thread.
1924
fcb056a5
SM
19252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1926
1927 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1928 return bool, remove data argument.
1929 (linux_stabilize_threads): Use find_thread.
1930
139720c5
SM
19312017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1932
1933 * linux-low.c (unsuspend_one_lwp): Remove.
1934 (unsuspend_all_lwps): Use for_each_thread, inline code from
1935 unsuspend_one_lwp.
1936
6d1e5673
SM
19372017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1938
1939 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1940 * linux-low.c (struct iterate_over_lwps_args): Remove.
1941 (iterate_over_lwps_filter): Remove.
1942 (iterate_over_lwps): Use find_thread.
1943
bbf550d5
SM
19442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1945
1946 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1947 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1948 code from reset_lwp_ptrace_options_callback.
1949
00192f77
SM
19502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1951
1952 * linux-arm-low.c (struct update_registers_data): Remove.
1953 (update_registers_callback): Return void, take arguments
1954 directly, don't check thread's pid.
1955 (arm_insert_point, arm_remove_point): Use for_each_thread.
1956
2bee2b6c
SM
19572017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1958
1959 * win32-low.c (continue_one_thread): Return void, take argument
1960 directly.
1961 (child_continue): Use for_each_thread.
1962
0b360f19
SM
19632017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1964
1965 * win32-i386-low.c (update_debug_registers_callback): Rename
1966 to ...
1967 (update_debug_registers): ... this, return void, remove pid_p arg.
1968 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1969
f27866ba
SM
19702017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1971
1972 * inferiors.h (struct process_info): Add constructor, initialize
1973 fields..
1974 <syscalls_to_catch>: Change type to std::vector<int>.
1975 * inferiors.c (add_process): Allocate process_info with new.
1976 (remove_process): Free process_info with delete.
1977 * linux-low.c (handle_extended_wait): Adjust.
1978 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1979 * server.c (handle_general_set): Adjust.
1980
e849ea89
PA
19812017-11-16 Pedro Alves <palves@redhat.com>
1982
1983 * remote-utils.c (remote_close): Block SIGIO signals instead of
1984 uninstalling the SIGIO handler.
1985
1d0aa65c
AH
19862017-11-16 Alan Hayward <alan.hayward@arm.com>
1987
1988 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1989
3491a34c
YQ
19902017-11-16 Yao Qi <yao.qi@linaro.org>
1991
1992 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1993 (tic6x_store_gregset): Likewise.
1994 (tic6x_usrregs_info): Move it up.
1995
a602f924
AH
19962017-11-15 Alan Hayward <alan.hayward@arm.com>
1997
1998 * Makefile.in: Update arch rules.
1999 * configure.srv: Explicitly mark arch/ files.
2000
5616b6c3
AS
20012017-11-13 Andreas Schwab <schwab@suse.de>
2002
2003 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2004 function.
2005 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2006
d1928160
PA
20072017-11-06 Pedro Alves <palves@redhat.com>
2008
2009 * config.in, configure: Regenerate.
2010
bac608e7
SM
20112017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2012
2013 * target.c (struct thread_search): Remove.
2014 (thread_search_callback): Remove.
2015 (prepare_to_access_memory): Use for_each_thread instead of
2016 find_inferior. Inline code from thread_search_callback.
2017
eaddb425
SM
20182017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2019
2020 * server.c (struct visit_actioned_threads_data): Remove.
2021 (visit_actioned_threads): Change prototype to take arguments
2022 directly.
2023 (resume): Use find_thread instead of find_inferior.
2024
99078d34
SM
20252017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2026
2027 * server.c (queue_stop_reply_callback): Change prototype, return
2028 void.
2029 (find_status_pending_thread_callback): Remove.
2030 (handle_status): Replace find_inferior with find_thread and
2031 for_each_thread.
2032
cc628f3d
AH
20332017-10-25 Alan Hayward <alan.hayward@arm.com>
2034
2035 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2036 with REGNO.
2037 (aarch64_store_gregset): Likewise.
2038 (aarch64_fill_fpregset): Likewise.
2039 (aarch64_store_fpregset): Likewise.
2040
4d3bb80e
SM
20412017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2042
2043 * gdbthread.h (find_thread, for_each_thread): New functions.
2044 * inferiors.c (thread_of_pid): Remove.
2045 (find_any_thread_of_pid): Use find_thread.
2046 * linux-low.c (num_lwps): Use for_each_thread.
2047
7a7cdfa0
YQ
20482017-10-17 Yao Qi <yao.qi@linaro.org>
2049
2050 * Makefile.in: Remove one rule.
2051 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2052
e675d170
YQ
20532017-10-17 Yao Qi <yao.qi@linaro.org>
2054
2055 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2056 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2057
7eb4e0f9
YQ
20582017-10-17 Yao Qi <yao.qi@linaro.org>
2059
2060 * configure.srv: Rename arm.o with arch/arm.o.
2061
60d6cfc9
YQ
20622017-10-17 Yao Qi <yao.qi@linaro.org>
2063
2064 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2065 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2066 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2067 (arch-i386.o, arch-amd64.o): Remove rules.
2068 (arch/%.o): New rule.
2069 Update POSTCOMPILE and COMPILE.pre.
2070 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2071 * configure: Re-generated.
2072 * configure.srv: Replace arch-i386.o with arch/i386.o.
2073 Replace arch-amd64.o with arch/amd64.o.
2074
5bfda255
YQ
20752017-10-16 Yao Qi <yao.qi@linaro.org>
2076
2077 * configure: Regenerated.
2078
9c80ecd6
SM
20792017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2080
2081 * inferiors.h: (struct inferior_list): Remove.
2082 (struct inferior_list_entry); Remove.
2083 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2084 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2085 get_first_inferior): Remove.
2086 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2087 find_inferior_id, find_inferior_in_random): Change signature.
2088 * inferiors.c (all_threads): Change type to
2089 std::list<thread_info *>.
2090 (get_thread): Remove macro.
2091 (find_inferior, find_inferior_id): Change signature, implement
2092 using find_thread.
2093 (find_inferior_in_random): Change signature, implement using
2094 find_thread_in_random.
2095 (for_each_inferior, for_each_inferior_with_data): Change
2096 signature, implement using for_each_thread.
2097 (add_inferior_to_list, remove_inferior): Remove.
2098 (add_thread, get_first_thread, thread_of_pid,
2099 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2100 (get_first_inferior, one_inferior_p, clear_inferior_list):
2101 Remove.
2102 (clear_inferiors, get_thread_process): Update.
2103 * gdbthread.h: Include <list>.
2104 (struct thread_info) <entry>: Remove field.
2105 <id>: New field.
2106 (all_threads): Change type to std::list<thread_info *>.
2107 (get_first_inferior): Add doc.
2108 (find_thread, for_each_thread, find_thread_in_random): New
2109 functions.
2110 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2111 * linux-arm-low.c (update_registers_callback): Update.
2112 * linux-low.c (second_thread_of_pid_p): Update.
2113 (kill_one_lwp_callback, linux_detach_lwp_callback,
2114 delete_lwp_callback, status_pending_p_callback, same_lwp,
2115 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2116 iterate_over_lwps, not_stopped_callback,
2117 resume_stopped_resumed_lwps, count_events_callback,
2118 select_singlestep_lwp_callback, select_event_lwp_callback,
2119 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2120 suspend_and_send_sigstop_callback, wait_for_sigstop,
2121 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2122 lwp_running, linux_set_resume_request, resume_status_pending_p,
2123 need_step_over_p, start_step_over, linux_resume_one_thread,
2124 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2125 reset_lwp_ptrace_options_callback): Update.
2126 * linux-mips-low.c (update_watch_registers_callback): Update.
2127 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2128 Update.
2129 (free_register_cache_thread_one): Remove.
2130 (regcache_release): Update.
2131 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2132 handle_qxfer_threads_worker): Update.
2133 (handle_query): Update, use list iterator.
2134 (visit_actioned_threads, handle_pending_status,
2135 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2136 clear_pending_status_callback, set_pending_status_callback,
2137 find_status_pending_thread_callback, handle_status,
2138 process_serial_event): Update.
2139 * target.c (thread_search_callback): Update.
2140 * thread-db.c (thread_db_get_tls_address): Update.
2141 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2142 Update.
2143 * win32-i386-low.c (update_debug_registers_callback): Update.
2144 * win32-low.c (delete_thread_info, child_delete_thread,
2145 continue_one_thread, suspend_one_thread,
2146 get_child_debug_event): Adjust.
2147
9179355e
SM
21482017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2149
2150 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2151 * inferiors.h: Include <list>.
2152 (struct process_info) <entry>: Remove field.
2153 <pid>: New field.
2154 (pid_of): Change macro to function.
2155 (ptid_of, lwpid_of): Remove macro.
2156 (all_processes): Change type to std::list<process_info *>.
2157 (ALL_PROCESSES): Remove macro.
2158 (for_each_process, find_process): New function.
2159 * inferiors.c (all_processes): Change type to
2160 std::list<process_info *>.
2161 (find_thread_process): Adjust.
2162 (add_process): Likewise.
2163 (remove_process): Likewise.
2164 (find_process_pid): Likewise.
2165 (get_first_process): Likewise.
2166 (started_inferior_callback): Remove.
2167 (have_started_inferiors_p): Adjust.
2168 (attached_inferior_callback): Remove.
2169 (have_attached_inferiors_p): Adjust.
2170 * linux-low.c (check_zombie_leaders): Likewise.
2171 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2172 (x86_linux_update_xmltarget): Adjust.
2173 * server.c (handle_query): Likewise.
2174 (gdb_reattached_process): Remove.
2175 (handle_status): Adjust.
2176 (kill_inferior_callback): Likewise.
2177 (detach_or_kill_inferior): Remove.
2178 (print_started_pid): Likewise.
2179 (print_attached_pid): Likewise.
2180 (detach_or_kill_for_exit): Update.
2181 (process_serial_event): Likewise.
2182 * linux-arm-low.c (arm_new_fork): Likewise.
2183
c9cb8905
SM
21842017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2185
2186 * dll.h: Include <list>.
2187 (struct dll_info): Add constructor.
2188 <entry>: Remove field.
2189 (all_dlls): Change type to std::list<dll_info>.
2190 * dll.c: Include <algorithm>.
2191 (get_dll): Remove macro.
2192 (all_dlls): Change type to std::list<dll_info *>.
2193 (free_one_dll): Remove.
2194 (match_dll): Likewise.
2195 (loaded_dll): Adjust.
2196 (unloaded_dll): Adjust to all_dlls type change, use
2197 std::find_if. Inline code from match_dll.
2198 (clear_dlls): Adjust to all_dlls type change.
2199 * server.c (emit_dll_description): Remove.
2200 (handle_qxfer_libraries): Adjust to all_dlls type change,
2201 integrate emit_dll_description's functionality.
2202
04ec7890
SM
22032017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2204
2205 * linux-low.h (struct linux_target_ops) <delete_process>: New
2206 field.
2207 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2208 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2209 (struct linux_target_ops): Add delete_process callback.
2210 * linux-arm-low.c (arm_delete_process): New.
2211 (struct linux_target_ops): Add delete_process callback.
2212 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2213 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2214 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2215 * linux-mips-low.c (mips_linux_delete_process): New.
2216 (struct linux_target_ops): Add delete_process callback.
2217 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2218 * linux-s390-low.c (struct linux_target_ops): Likewise.
2219 * linux-sh-low.c (struct linux_target_ops): Likewise.
2220 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2221 * linux-tile-low.c (struct linux_target_ops): Likewise.
2222 * linux-x86-low.c (x86_linux_delete_process): New.
2223 (struct linux_target_ops): Add delete_process callback.
2224 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2225
466eecee
SM
22262017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2227
2228 * linux-aarch64-low.c (the_low_target): Add thread delete
2229 callback.
2230 * linux-arm-low.c (arm_delete_thread): New function.
2231 (the_low_target): Add thread delete callback.
2232 * linux-bfin-low.c (the_low_target): Likewise.
2233 * linux-crisv32-low.c (the_low_target): Likewise.
2234 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2235 set.
2236 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2237 field.
2238 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2239 * linux-mips-low.c (mips_linux_delete_thread): New function.
2240 (the_low_target): Add thread delete callback.
2241 * linux-ppc-low.c (the_low_target): Likewise.
2242 * linux-s390-low.c (the_low_target): Likewise.
2243 * linux-sh-low.c (the_low_target): Likewise.
2244 * linux-tic6x-low.c (the_low_target): Likewise.
2245 * linux-tile-low.c (the_low_target): Likewise.
2246 * linux-x86-low.c (the_low_target): Likewise.
2247 * linux-xtensa-low.c (the_low_target): Likewise.
2248
b79f7801
YZ
22492017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2250
2251 * win32-low.c: Include "common-inferior.h".
2252
bc3b087d
SDJ
22532017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2254
2255 * inferiors.c (set_inferior_cwd): New function.
2256 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2257 (handle_query): Inform that QSetWorkingDir is supported.
2258 * win32-low.c (create_process): Pass the inferior's cwd to
2259 CreateProcess.
2260
d092c5a2
SDJ
22612017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2262
2263 * inferiors.c (current_inferior_cwd): New global variable.
2264 (get_inferior_cwd): New function.
2265 * inferiors.h (struct process_info) <cwd>: New field.
2266
7da0a886
SDJ
22672017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2268
2269 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2270 (OBS): Add gdb_tilde_expand.o.
2271
289a6840
SM
22722017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2273
2274 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2275 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2276
256642e8
PA
22772017-09-29 Pedro Alves <palves@redhat.com>
2278
2279 * ax.c (gdb_parse_agent_expr): Constify.
2280 * ax.h (gdb_parse_agent_expr): Constify.
2281 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2282 Constify.
2283 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2284 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2285 * remote-utils.h (read_ptid): Constify.
2286 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2287 (process_point_options, process_serial_event): Constify.
2288 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2289 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2290 (cmd_qtbuffer): Constify.
2291
5b9ca4d4
PA
22922017-09-29 Pedro Alves <palves@redhat.com>
2293
2294 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2295 fails.
2296
94c207e0
PA
22972017-09-29 Pedro Alves <palves@redhat.com>
2298
2299 * linux-low.c (handle_extended_wait): Pass parent thread instead
2300 of process to thread_db_notice_clone.
2301 * linux-low.h (thread_db_notice_clone): Replace parent process
2302 parameter with parent thread parameter.
2303 * thread-db.c (find_one_thread): Add comment.
2304 (thread_db_notice_clone): Replace parent process parameter with
2305 parent thread parameter. Temporarily switch to the parent thread.
2306
75352e28
SDJ
23072017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2308
2309 * gdbthread.h: Include "common-gdbthread.h".
2310 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2311 "if" when validating the ptid.
2312 * remote-utils.c: Include "gdbthread.h".
2313 (prepare_resume_reply): Use "switch_to_thread".
2314 * target.c (done_accessing_memory): Likewise.
2315
ad339634
AA
23162017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2317
2318 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2319 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2320 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2321 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2322 s390x-gs-linux64-ipa.o to ipa_obj.
2323 * linux-s390-low.c (HWCAP_S390_GS): New define.
2324 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2325 New functions.
2326 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2327 (s390_arch_setup): Check for guarded-storage support and choose
2328 appropriate tdesc.
2329 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2330 init_registers_s390x_gs_linux64.
2331 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2332 enum value.
2333 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2334 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2335
cc4d742f
SM
23362017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2337
2338 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2339
f6327dcb
KB
23402017-09-21 Kevin Buettner <kevinb@redhat.com>
2341
2342 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2343 (thread_db_thread_handle): Declare.
2344 * linux-low.c (linux_target_ops): Initialize thread_handle.
2345 * server.c (handle_qxfer_threads_worker): Add support for
2346 "handle" attribute.
2347 * target.h (struct target_ops): Add new function pointer,
2348 thread_handle.
2349 (target_thread_handle): Define.
2350 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2351 field in lwp.
2352 (thread_db_thread_handle): New function.
2353
86299109
KB
23542017-09-21 Kevin Buettner <kevinb@redhat.com>
2355
2356 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2357 * linux-low.h (thread_db_notice_clone): Declare.
2358 * thread-db.c (thread_db_notice_clone): New function.
2359
f557a88a
PA
23602017-09-21 Pedro Alves <palves@redhat.com>
2361
2362 * server.c (gdb_read_memory, handle_status, process_serial_event)
2363 (handle_serial_event, handle_target_event): Adjust to
2364 set_desired_thread prototype change.
2365 * target.c (set_desired_thread): Remove 'use_general' parameter
2366 and adjust.
2367 * target.h (set_desired_thread): Remove 'use_general' parameter.
2368
223ffa71
TT
23692017-09-20 Tom Tromey <tom@tromey.com>
2370
2371 * target.c (target_terminal::terminal_state): Define.
2372 (target_terminal::init): Rename from target_terminal_init.
2373 (target_terminal::inferior): Rename from
2374 target_terminal_inferior.
2375 (target_terminal::ours): Rename from target_terminal_ours.
2376 (target_terminal::ours_for_output, target_terminal::info): New.
2377
04fd3ba9
SM
23782017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2379
2380 * server.c (accumulate_file_name_length): Remove.
2381 (emit_dll_description): Adjust to std::string change.
2382 (handle_qxfer_libraries): Use std::string to hold document.
2383
5e187554
SM
23842017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2385
2386 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2387 return type of xml_escape_text.
2388 * server.c (emit_dll_description): Likewise.
2389
1526853e
SM
23902017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2391
2392 * server.c (captured_main): Accept argument for --selftest.
2393 Update run_tests call.
2394 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2395 when registering selftests.
2396
c4dfafab
SDJ
23972017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2398
2399 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2400 instead of "VEC" for "target_desc.reg_defs".
2401 (regcache_cpy): Likewise.
2402 (registers_to_string): Likewise.
2403 (registers_from_string): Likewise.
2404 (find_regno): Likewise.
2405 (supply_regblock): Likewise.
2406 (regcache_raw_read_unsigned): Likewise.
2407 * tdesc.c (init_target_desc): Likewise.
2408 (tdesc_create_reg): Likewise.
2409 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2410 (struct target_desc) <reg_defs>: Convert to "std::vector".
2411 (target_desc): Do not initialize "reg_defs".
2412 (~target_desc): Update code to use "std::vector" instead of "VEC"
2413 for "target_desc.reg_defs".
2414 (operator==): Likewise.
2415
124aceb4
SM
24162017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2417
2418 * inferiors.h (thread_to_gdb_id): Remove.
2419 * inferiors.c (thread_to_gdb_id): Remove.
2420 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2421 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2422 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2423 Likewise.
2424 * nto-low.c (nto_fetch_registers, nto_store_registers,
2425 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2426
96cde54f
SM
24272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2428
2429 * inferiors.h (gdb_id_to_thread_id): Remove.
2430 * inferiors.c (gdb_id_to_thread_id): Remove.
2431 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2432 removal. Move pid declaration closer to where it's used.
2433
e8ca139e
SM
24342017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2435
2436 * server.c (handle_detach): New function.
2437 (process_serial_event): Move code out, call handle_detach.
2438
f8a4e119
SM
24392017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2440
2441 * server.c (require_running): Rename to ...
2442 (require_running_or_return): ... this ...
2443 (require_running_or_break): ... and this.
2444 (handle_query, process_serial_event): Adjust.
2445
0eb0a407
SM
24462017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2447
2448 * linux-low.c (linux_set_resume_request): Remove unused
2449 variables.
2450
785922a5
SM
24512017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2452
2453 * server.c (first_thread_of): Remove.
2454 (process_serial_event): Replace usage of first_thread_of with
2455 find_any_thread_of_pid.
2456 * tracepoint.c (same_process_p): Remove.
2457 (gdb_agent_about_to_close): Replace usage of same_process_p with
2458 find_any_thread_of_pid.
2459 * linux-x86-low.c (same_process_callback): Remove.
2460 (x86_arch_setup_process_callback): Replace usage of
2461 same_process_callback with find_any_thread_of_pid.
2462 * thread-db.c (any_thread_of): Remove.
2463 (switch_to_process): Replace usage of any_thread_of with
2464 find_any_thread_of_pid.
2465 * inferiors.c (thread_pid_matches_callback): Remove.
2466 (find_thread_process): Adjust to use find_any_thread_of_pid.
2467
a059f00c
SDJ
24682017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2469
2470 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2471 with "!VEC_empty".
a059f00c 2472
cc397f3a
SDJ
24732017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2474
2475 * linux-low.c (handle_extended_wait): Use
2476 "allocate_target_description" instead of "XNEW".
2477 * linux-x86-low.c (initialize_low_arch): Likewise.
2478
22916b07
YQ
24792017-09-05 Yao Qi <yao.qi@linaro.org>
2480
2481 * configure.srv (srv_i386_regobj): Remove.
2482 (srv_amd64_regobj): Remove.
2483 (srv_regobj): Set it to "" for x86 non-linux targets.
2484 * linux-x86-tdesc.c (i386_linux_read_description):
2485 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2486 (init_registers_i386): Remove the declaration.
2487 (tdesc_i386): Remove the declaration.
2488 (lynx_i386_arch_setup): Call i386_create_target_description.
2489 * nto-x86-low.c: Likewise.
2490 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2491 [!__x86_64__]: include arch/i386.h.
2492 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2493
38602d55
YQ
24942017-09-05 Yao Qi <yao.qi@linaro.org>
2495
2496 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2497 i386/amd64-XXX-linux from it.
2498
44b886ff
YQ
24992017-09-05 Yao Qi <yao.qi@linaro.org>
2500
2501 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2502 false.
2503 (ipa_amd64_linux_regobj): Remove.
2504 (ipa_x32_linux_regobj): Remove.
2505
b4570e4b
YQ
25062017-09-05 Yao Qi <yao.qi@linaro.org>
2507
2508 * Makefile.in (arch-amd64.o): New rule.
2509 * configure.srv: Append arch-amd64.o.
2510 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2511 (get_ipa_tdesc): Call amd64_linux_read_description.
2512 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2513 and init_registers_amd64_XXX.
2514 * linux-x86-low.c (x86_linux_read_description): Call
2515 amd64_linux_read_description.
2516 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2517 (initialize_low_arch): Don't call init_registers_x32_XXX and
2518 init_registers_amd64_XXX.
2519 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2520 and tdesc_amd64_XXX.
2521 [__x86_64__] (amd64_tdesc_test): New function.
2522 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2523 and init_registers_amd64_XXX.
2524 * linux-x86-tdesc.c: Include arch/amd64.h.
2525 (xcr0_to_tdesc_idx): New function.
2526 (i386_linux_read_description): New function.
2527 (amd64_get_ipa_tdesc_idx): New function.
2528 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2529 (amd64_get_ipa_tdesc): Declare.
2530
d1f28ea2
YQ
25312017-09-05 Yao Qi <yao.qi@linaro.org>
2532
2533 * configure.srv (srv_i386_linux_xmlfiles): Remove
2534 i386/i386-XXX-linux.xml from it.
2535
25a93583
YQ
25362017-09-05 Yao Qi <yao.qi@linaro.org>
2537
2538 * configure.srv: Set srv_i386_linux_regobj empty if $development
2539 is false.
2540 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2541 initialize_low_tdesc.
2542 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2543 with #if initialize_low_tdesc.
2544 * linux-x86-tdesc-selftest.c: New file.
2545 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2546
5f035c07
YQ
25472017-09-05 Yao Qi <yao.qi@linaro.org>
2548
2549 * Makefile.in (arch-i386.o): New rule.
2550 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2551 (x86_64-*-linux*): Likewise.
2552 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2553 include arch/i386.h.
2554 (i386_linux_read_description): Remove code and call
2555 i386_create_target_description.
2556 * tdesc.c (allocate_target_description): New function.
2557 * tdesc.h (set_tdesc_architecture): Remove declaration.
2558 (set_tdesc_osabi): Likewise.
2559
0abe8a89
YQ
25602017-09-05 Yao Qi <yao.qi@linaro.org>
2561
2562 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2563 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2564 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2565 .xmltarget.
2566 * server.c (get_features_xml): Call tdesc_get_features_xml.
2567 * tdesc.c (set_tdesc_architecture): New function.
2568 (set_tdesc_osabi): New function.
2569 (tdesc_get_features_xml): New function.
2570 (tdesc_create_feature): Add an argument.
2571 * tdesc.h (struct target_desc) <features>: New field.
2572 <arch, osabi>: New field.
2573 (~target_desc): xfree features, arch, and osabi.
2574 (target_desc::oerator==): Don't compare .xmltarget.
2575 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2576 (set_tdesc_osabi): Likewise.
2577 (tdesc_get_features_xml): Likewise.
2578
0a188386
YQ
25792017-09-05 Yao Qi <yao.qi@linaro.org>
2580
2581 * linux-x86-tdesc.c: Include selftest.h.
2582 (i386_tdesc_test): New function.
2583 (initialize_low_tdesc): Call selftests::register_test.
2584 * tdesc.h: Include regdef.h.
2585 (target_desc): Override operator == and !=.
2586
f49ff000
YQ
25872017-09-05 Yao Qi <yao.qi@linaro.org>
2588
2589 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2590 (ipa_obj): Likewise.
2591 * linux-i386-ipa.c: Include common/x86-xstate.h
2592 (get_ipa_tdesc): Call i386_linux_read_description.
2593 (initialize_low_tracepoint): Don't call init_registers_XXX
2594 functions, call initialize_low_tdesc instead.
2595 * linux-x86-low.c (x86_linux_read_description): Call
2596 i386_linux_read_description.
2597 (initialize_low_arch): Don't call init_registers_i386_XXX
2598 functions, call initialize_low_tdesc.
2599 * linux-x86-tdesc.c: New file.
2600 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2601 (i386_get_ipa_tdesc_idx): Declare.
2602 (i386_get_ipa_tdesc): Declare.
2603 (initialize_low_tdesc): Declare.
2604
2b68ef2f
YQ
26052017-09-05 Yao Qi <yao.qi@linaro.org>
2606
2607 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2608 instead of 0.
2609
f7000548
YQ
26102017-09-05 Yao Qi <yao.qi@linaro.org>
2611
2612 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2613 * regcache.c (get_thread_regcache): Use VEC_length.
2614 (init_register_cache): Likewise.
2615 (regcache_cpy): Likewise.
2616 (registers_to_string): Iterate reg_defs via VEC_iterate.
2617 (find_regno): Likewise.
2618 (find_register_by_number): Use VEC_index.
2619 (register_size): Call find_register_by_number.
2620 (register_data): Call find_register_by_number.
2621 (supply_regblock): Use VEC_length.
2622 (regcache_raw_read_unsigned): Likewise.
2623 * tdesc.c (init_target_desc): Iterate reg_defs via
2624 VEC_iterate.
2625 (default_description): Update initializer.
2626 (copy_target_description): Don't update field num_registers.
2627 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2628 <num_registers>: Remove.
2629
50a421ac
SM
26302017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2631
2632 * Makefile.in (.SECONDARY): Define target.
2633
23fdd69e
SM
26342017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2635
2636 * linux-low.c (linux_wait_1): Adjust.
2637 * server.c (queue_stop_reply_callback): Adjust.
2638
0a2dde4a
SDJ
26392017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2640
2641 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2642 QEnvironmentUnset and QEnvironmentReset packets.
2643 (handle_query): Inform remote that QEnvironmentHexEncoded,
2644 QEnvironmentUnset and QEnvironmentReset are supported.
2645
6afd337d
SM
26462017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2647
2648 * inferiors.h (inferior_target_data): Rename to ...
2649 (thread_target_data): ... this.
2650 (inferior_regcache_data): Rename to ...
2651 (thread_regcache_data): ... this.
2652 (set_inferior_regcache_data): Rename to ...
2653 (set_thread_regcache_data): ... this.
2654 * inferiors.c (inferior_target_data): Rename to ...
2655 (thread_target_data): ... this.
2656 (inferior_regcache_data): Rename to ...
2657 (thread_regcache_data): ... this.
2658 (set_inferior_regcache_data): Rename to ...
2659 (set_thread_regcache_data): ... this.
2660 (free_one_thread): Update.
2661 * linux-low.h (get_thread_lwp): Update.
2662 * regcache.c (get_thread_regcache): Update.
2663 (regcache_invalidate_thread): Update.
2664 (free_register_cache_thread): Update.
2665 * win32-i386-low.c (update_debug_registers_callback): Update.
2666 (win32_get_current_dr): Update.
2667 * win32-low.c (thread_rec): Update.
2668 (delete_thread_info): Update.
2669 (continue_one_thread): Update.
2670 (suspend_one_thread): Update.
2671
a160cc46
SM
26722017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2673
2674 * inferiors.c (set_inferior_target_data): Remove.
2675 * inferiors.h (set_inferior_target_data): Remove.
2676
6d580b63
YQ
26772017-08-18 Yao Qi <yao.qi@linaro.org>
2678
2679 * Makefile.in (OBS): Add selftest.o.
2680 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2681 * configure, config.in: Re-generated.
2682 * server.c: Include common/sefltest.h.
2683 (captured_main): Handle option --selftest.
2684
f5a29eb0
YQ
26852017-08-09 Yao Qi <yao.qi@linaro.org>
2686
2687 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2688 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2689 i386-avx-mpx.o and i386-mmx.o.
2690 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2691 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2692 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2693 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2694 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2695 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2696 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2697 i386/amd64-avx-mpx.xml.
2698
57757c2f
YQ
26992017-08-09 Yao Qi <yao.qi@linaro.org>
2700
2701 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2702 and x32-avx-avx512.o.
2703 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2704 i386/x32-avx-avx512.xml.
2705
229d26fc
SM
27062017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2707
2708 * tracepoint.h (enum class fast_tpoint_collect_result): New
2709 enumeration.
2710 (fast_tracepoint_collecting): Change return type to
2711 fast_tpoint_collect_result.
2712 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2713 * linux-low.h: Include tracepoint.h.
2714 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2715 fast_tpoint_collect_result.
2716 * linux-low.c (handle_tracepoints): Adjust.
2717 (linux_fast_tracepoint_collecting): Change return type to
2718 fast_tpoint_collect_result.
2719 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2720 linux_wait_1, stuck_in_jump_pad_callback,
2721 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2722 proceed_one_lwp): Adjust to type change.
2723
2e1e43e1
YQ
27242017-07-10 Yao Qi <yao.qi@linaro.org>
2725
2726 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2727
adc764e7
YQ
27282017-06-29 Yao Qi <yao.qi@linaro.org>
2729
2730 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2731 Remove.
2732 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2733
a206891a
SM
27342017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2735
2736 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2737
9a6c7d9c
SDJ
27382017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2739
2740 * linux-low.c (linux_create_inferior): Adjust code to access the
2741 environment information via 'gdb_environ' class.
2742 * lynx-low.c (lynx_create_inferior): Likewise.
2743 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2744 (get_environ): Return a pointer to 'our_environ'.
2745 (captured_main): Initialize 'our_environ'.
2746 * server.h (get_environ): Adjust prototype.
2747 * spu-low.c (spu_create_inferior): Adjust code to access the
2748 environment information via 'gdb_environ' class.
2749
ae3e2ccf
SM
27502017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2751
2752 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2753 usage of "register" keyword.
2754
3e019bdc
SM
27552017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2756
2757 * configure: Re-generate.
2758
8465943a
SM
27592017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2760
2761 * configure: Re-generate.
2762
cf0dd6f0
SM
27632017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2764
2765 * Makefile.in (COMPILE.pre): Add "-x c++".
2766
9845682b
SDJ
27672017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2768
2769 * fork-child.c: Conditionally include <signal.h>.
2770
aefd8b33
SDJ
27712017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2772
2773 * server.c (handle_general_set): Handle new packet
2774 "QStartupWithShell".
2775 (handle_query): Add "QStartupWithShell" to the list of supported
2776 packets.
2777 (gdbserver_usage): Add help text explaining the
2778 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2779 options.
2780 (captured_main): Recognize and act upon the presence of the new
2781 CLI options.
2782
2090129c
SDJ
27832017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2784 Pedro Alves <palves@redhat.com>
2785
2786 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2787 * configure: Regenerate.
2788 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2789 "fork-inferior.o".
2790 (i[34567]86-*-lynxos*): Likewise.
2791 (spu*-*-*): Likewise.
2792 * fork-child.c: New file.
2793 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2794 and "environ.h".
2795 (linux_ptrace_fun): New function.
2796 (linux_create_inferior): Adjust function prototype to reflect
2797 change on "target.h". Adjust function code to use
2798 "fork_inferior".
2799 (linux_request_interrupt): Delete "signal_pid".
2800 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2801 (lynx_ptrace_fun): New function.
2802 (lynx_create_inferior): Adjust function prototype to reflect
2803 change on "target.h". Adjust function code to use
2804 "fork_inferior".
2805 * nto-low.c (nto_create_inferior): Adjust function prototype and
2806 code to reflect change on "target.h". Update comments.
2807 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2808 "common-terminal.h" and "environ.h".
2809 (terminal_fd): Moved to fork-child.c.
2810 (old_foreground_pgrp): Likewise.
2811 (restore_old_foreground_pgrp): Likewise.
2812 (last_status): Make it global.
2813 (last_ptid): Likewise.
2814 (our_environ): New variable.
2815 (startup_with_shell): Likewise.
2816 (program_name): Likewise.
2817 (program_argv): Rename to...
2818 (program_args): ...this.
2819 (wrapper_argv): New variable.
2820 (start_inferior): Delete function.
2821 (get_exec_wrapper): New function.
2822 (get_exec_file): Likewise.
2823 (get_environ): Likewise.
2824 (prefork_hook): Likewise.
2825 (post_fork_inferior): Likewise.
2826 (postfork_hook): Likewise.
2827 (postfork_child_hook): Likewise.
2828 (handle_v_run): Update code to deal with arguments coming from the
2829 remote host. Update calls from "start_inferior" to
2830 "create_inferior".
2831 (captured_main): Likewise. Initialize environment variable. Call
2832 "have_job_control".
2833 * server.h (post_fork_inferior): New prototype.
2834 (get_environ): Likewise.
2835 (last_status): Declare.
2836 (last_ptid): Likewise.
2837 (signal_pid): Likewise.
2838 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2839 (spu_ptrace_fun): New function.
2840 (spu_create_inferior): Adjust function prototype to reflect change
2841 on "target.h". Adjust function code to use "fork_inferior".
2842 * target.c (target_terminal_init): New function.
2843 (target_terminal_inferior): Likewise.
2844 (target_terminal_ours): Likewise.
2845 * target.h: Include <vector>.
2846 (struct target_ops) <create_inferior>: Update prototype.
2847 (create_inferior): Update macro.
2848 * utils.c (gdb_flush_out_err): New function.
2849 * win32-low.c (win32_create_inferior): Adjust function prototype
2850 and code to reflect change on "target.h".
2851
043a4934
SDJ
28522017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2853
2854 * inferiors.c (switch_to_thread): New function.
2855
15652511
SDJ
28562017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2857
2858 * Makefile.in (SFILE): Add "common/job-control.c".
2859 (OBS): Add "job-control.o".
2860
21ea5acd
SDJ
28612017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2862
2863 * Makefile: Remove "@host_makefile_frag@".
2864
e13cb306
PA
28652017-05-05 Pedro Alves <palves@redhat.com>
2866
2867 * configure: Regenerate.
2868
c94fee56
SDJ
28692017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2870
2871 * configure: Regenerate.
2872
a0ff9e1a
SM
28732017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2874
2875 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2876 software_single_step change of return type to
2877 std::vector<CORE_ADDR>.
2878 * linux-low.c (install_software_single_step_breakpoints):
2879 Likewise.
2880 * linux-low.h (install_software_single_step_breakpoints):
2881 Likewise.
2882
be628ab8
SDJ
28832017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2884
2885 * remote-utils.c: Include "gdb_termios.h" instead of
2886 "terminal.h".
2887 * terminal.h: Delete file.
2888
7c5ded6a
SDJ
28892017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2890
2891 * server.c: Include <vector>.
2892 <program_argv, wrapper_argv>: Convert to std::vector.
2893 (start_inferior): Rewrite function to use C++.
2894 (handle_v_run): Likewise. Update code that calculates the argv
2895 based on the vRun packet; use C++.
2896 (captured_main): Likewise.
2897
436252de
SM
28982017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2899
2900 * server.c (handle_v_cont): Initialize thread_resume::thread
2901 with null_ptid.
2902
9bf2a700
PA
29032017-04-05 Pedro Alves <palves@redhat.com>
2904
2905 * configure: Regenerate.
2906
a121b7c1
PA
29072017-04-05 Pedro Alves <palves@redhat.com>
2908
2909 * gdbreplay.c (sync_error): Constify.
2910 * linux-x86-low.c (push_opcode): Constify.
2911
21c8a587
PA
29122017-04-05 Pedro Alves <palves@redhat.com>
2913
2914 * win32-low.c (get_child_debug_event)
2915 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2916 Report TARGET_WAITKIND_SPURIOUS instead.
2917
fb32b4f7
PA
29182017-04-05 Pedro Alves <palves@redhat.com>
2919
e79be6e5
SM
2920 * remote-utils.c (remote_prepare, remote_open): Constify.
2921 * remote-utils.h (remote_prepare, remote_open): Constify.
2922 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2923
65dd1e59
SM
29242017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2925
2926 * Makefile.in (clean): Clear .deps.
2927
8fa5b777
SM
29282017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2929
2930 * .gitignore: Remove generated files, replace with wildcard.
2931 * (clean): Replace removal of generated files with wildcard.
2932 (version.c): Replace with...
2933 (version-generated.c): ...this.
2934 (xml-builtin.c): Replace with...
2935 (xml-builtin-generated.c): ...this.
2936 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2937 (%.c: *regformats*): Replace with...
2938 (%-generated.c: *regformats*): ...this.
2939
a12e714b
MF
29402017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2941
2942 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2943 (xtensa_fill_gregset): Call collect_register_by_name for
2944 threadptr register.
2945 (xtensa_store_gregset): Call supply_register_by_name for
2946 threadptr register.
2947
1a09b50a
MF
29482017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2949
2950 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2951 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2952 (xtensa_store_gregset): Call supply_register for all registers in
2953 a0_regnum..a0_regnum + C0_NREGS range.
2954
1a01e7c6
SM
29552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2956
2957 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2958 (ax-ipa.o: ax.c): Remove.
2959 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2960 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2961 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2962 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2963 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2964
36bc18a8
SM
29652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2966
2967 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2968 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2969 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2970 (errors-ipa.o: ../common/errors.c): Remove.
2971 (format-ipa.o: ../common/format.c): Remove.
2972 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2973
a8ebe3d5
SM
29742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2975
2976 * Makefile.in (%-ipa.o: %.c): New rule.
2977 (tracepoint-ipa.o: tracepoint.c): Remove.
2978 (utils-ipa.o: utils.c): Remove.
2979 (remote-utils-ipa.o: remote-utils.c): Remove.
2980 (regcache-ipa.o: regcache.c): Remove.
2981 (i386-linux-ipa.o: i386-linux.c): Remove.
2982 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2983 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2984 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2985 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2986 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2987 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2988 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2989 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2990 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2991 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2992 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2993 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2994 (aarch64-ipa.o: aarch64.c): Remove.
2995 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2996 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2997 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2998 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2999 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3000 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3001 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3002 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3003 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3004 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3005 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3006 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3007 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3008 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3009 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3010 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3011 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3012 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3013 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3014 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3015 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3016 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3017 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3018 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3019 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3020 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3021 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3022 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3023 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3024 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3025 (tdesc-ipa.o: tdesc.c): Remove.
3026 (x32-linux-ipa.o: x32-linux.c): Remove.
3027 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3028 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3029
50cfacb7
SM
30302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3031
3032 * Makefile.in (%.o: ../arch/%.c): New rule.
3033 (arm.o: ../arch/arm.c): Remove.
3034 (arm-linux.o: ../arch/arm-linux.c): Remove.
3035 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3036 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3037
c5a22423
SM
30382017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3039
3040 * Makefile.in (%.o: ../nat/%.c): New rule.
3041 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3042 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3043 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3044 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3045 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3046 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3047 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3048 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3049 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3050 (linux-personality.o: ../nat/linux-personality.c): Remove.
3051 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3052 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3053 (x86-linux.o: ../nat/x86-linux.c): Remove.
3054 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3055 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3056
6bda016b
SM
30572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3058
3059 * Makefile.in (%.o: ../common/%.c): New rule.
3060 (signals.o: ../common/signals.c): Remove.
3061 (print-utils.o: ../common/print-utils.c): Remove.
3062 (rsp-low.o: ../common/rsp-low.c): Remove.
3063 (common-utils.o: ../common/common-utils.c): Remove.
3064 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3065 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3066 (vec.o: ../common/vec.c): Remove.
3067 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3068 (xml-utils.o: ../common/xml-utils.c): Remove.
3069 (ptid.o: ../common/ptid.c): Remove.
3070 (buffer.o: ../common/buffer.c): Remove.
3071 (format.o: ../common/format.c): Remove.
3072 (filestuff.o: ../common/filestuff.c): Remove.
3073 (agent.o: ../common/agent.c): Remove.
3074 (errors.o: ../common/errors.c): Remove.
3075 (environ.o: ../common/environ.c): Remove.
3076 (common-debug.o: ../common/common-debug.c): Remove.
3077 (cleanups.o: ../common/cleanups.c): Remove.
3078 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3079 (fileio.o: ../common/fileio.c): Remove.
3080 (common-regcache.o: ../common/common-regcache.c): Remove.
3081 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3082 (new-op.o: ../common/new-op.c): Remove.
3083 (btrace-common.o: ../common/btrace-common.c): Remove.
3084
21122961
SM
30852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3086
3087 * Makefile.in (%.o: ../target/%.c): New rule.
3088 (waitstatus.o: ../target/waitstatus.c): Remove.
3089
c362e621
SM
30902017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3091
3092 * Makefile.in
3093 (%.c: ../regformats/%.dat,
3094 (%.c: ../regformats/arm/%.dat,
3095 (%.c: ../regformats/i386/%.dat,
3096 (%.c: ../regformats/rs6000/%.dat): New rules.
3097 (aarch64.c): Remove.
3098 (reg-arm.c): Remove.
3099 (arm-with-iwmmxt.c): Remove.
3100 (arm-with-vfpv2.c): Remove.
3101 (arm-with-vfpv3.c): Remove.
3102 (arm-with-neon.c): Remove.
3103 (reg-bfin.c): Remove.
3104 (reg-cris.c): Remove.
3105 (reg-crisv32.c): Remove.
3106 (i386.c): Remove.
3107 (i386-linux.c): Remove.
3108 (i386-avx.c): Remove.
3109 (i386-avx-linux.c): Remove.
3110 (i386-avx-avx512.c): Remove.
3111 (i386-avx-avx512-linux.c): Remove.
3112 (i386-mpx.c): Remove.
3113 (i386-mpx-linux.c): Remove.
3114 (i386-avx-mpx-avx512-pku.c): Remove.
3115 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3116 (i386-avx-mpx.c): Remove.
3117 (i386-avx-mpx-linux.c): Remove.
3118 (i386-mmx.c): Remove.
3119 (i386-mmx-linux.c): Remove.
3120 (reg-ia64.c): Remove.
3121 (reg-m32r.c): Remove.
3122 (reg-m68k.c): Remove.
3123 (reg-cf.c): Remove.
3124 (mips-linux.c): Remove.
3125 (mips-dsp-linux.c): Remove.
3126 (mips64-linux.c): Remove.
3127 (mips64-dsp-linux.c): Remove.
3128 (nios2-linux.c): Remove.
3129 (powerpc-32.c): Remove.
3130 (powerpc-32l.c): Remove.
3131 (powerpc-altivec32l.c): Remove.
3132 (powerpc-cell32l.c): Remove.
3133 (powerpc-vsx32l.c): Remove.
3134 (powerpc-isa205-32l.c): Remove.
3135 (powerpc-isa205-altivec32l.c): Remove.
3136 (powerpc-isa205-vsx32l.c): Remove.
3137 (powerpc-e500l.c): Remove.
3138 (powerpc-64l.c): Remove.
3139 (powerpc-altivec64l.c): Remove.
3140 (powerpc-cell64l.c): Remove.
3141 (powerpc-vsx64l.c): Remove.
3142 (powerpc-isa205-64l.c): Remove.
3143 (powerpc-isa205-altivec64l.c): Remove.
3144 (powerpc-isa205-vsx64l.c): Remove.
3145 (s390-linux32.c): Remove.
3146 (s390-linux32v1.c): Remove.
3147 (s390-linux32v2.c): Remove.
3148 (s390-linux64.c): Remove.
3149 (s390-linux64v1.c): Remove.
3150 (s390-linux64v2.c): Remove.
3151 (s390-te-linux64.c): Remove.
3152 (s390-vx-linux64.c): Remove.
3153 (s390-tevx-linux64.c): Remove.
3154 (s390x-linux64.c): Remove.
3155 (s390x-linux64v1.c): Remove.
3156 (s390x-linux64v2.c): Remove.
3157 (s390x-te-linux64.c): Remove.
3158 (s390x-vx-linux64.c): Remove.
3159 (s390x-tevx-linux64.c): Remove.
3160 (tic6x-c64xp-linux.c): Remove.
3161 (tic6x-c64x-linux.c): Remove.
3162 (tic6x-c62x-linux.c): Remove.
3163 (reg-sh.c): Remove.
3164 (reg-sparc64.c): Remove.
3165 (reg-spu.c): Remove.
3166 (amd64.c): Remove.
3167 (amd64-linux.c): Remove.
3168 (amd64-avx.c): Remove.
3169 (amd64-avx-linux.c): Remove.
3170 (amd64-avx-avx512.c): Remove.
3171 (amd64-avx-avx512-linux.c): Remove.
3172 (amd64-mpx.c): Remove.
3173 (amd64-mpx-linux.c): Remove.
3174 (amd64-avx-mpx-avx512-pku.c): Remove.
3175 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3176 (amd64-avx-mpx.c): Remove.
3177 (amd64-avx-mpx-linux.c): Remove.
3178 (x32.c): Remove.
3179 (x32-linux.c): Remove.
3180 (x32-avx.c): Remove.
3181 (x32-avx-linux.c): Remove.
3182 (x32-avx-avx512.c): Remove.
3183 (x32-avx-avx512-linux.c): Remove.
3184 (reg-xtensa.c): Remove.
3185 (reg-tilegx.c): Remove.
3186 (reg-tilegx32.c): Remove.
3187
1672e0d9
SDJ
31882017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3189
3190 * Makefile.in (SFILES): Add "common/environ.c".
3191 (OBJS): Add "common/environ.h".
3192
239b6d10
WT
31932017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3194
3195 * configure.ac: Check if the fs_base and gs_base members of
3196 `struct user_regs_struct' exist.
3197 * config.in: Regenerated.
3198 * configure: Likewise.
3199
694b382c
AT
32002017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3201
3202 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3203 target_read_memory.
3204 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3205 (get_next_pcs_syscall_next_pc): Likewise.
3206
7dc53023
LM
32072016-12-23 Luis Machado <lgustavo@codesourcery.com>
3208
3209 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3210 * nto-x86-low.c: Likewise.
3211
ad02e4fe
SM
32122016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3213
3214 * Makefile.in: Include disable-implicit-rules.mk.
3215
dcb07cfa
PA
32162016-11-23 Pedro Alves <palves@redhat.com>
3217
3218 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3219 (debug_vprintf): Use std::chrono::steady_clock instead of
3220 gettimeofday. Use '.' instead of ':'.
3221 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3222 (get_timestamp): Use std::chrono::steady_clock instead of
3223 gettimeofday.
3224
8629c02c
SM
32252016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3226
3227 * Makefile.in: Fix whitespace formatting.
3228
b593ecca
SM
32292016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3230
3231 * Makefile.in (SFILES, OBS): Flatten list and order
3232 alphabetically.
3233
9986ba08
PA
32342016-11-23 Pedro Alves <palves@redhat.com>
3235
3236 * event-loop.c (handle_file_event): Use warning.
3237 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3238 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3239 Use warning.
3240
4eefa7bc
PA
32412016-11-23 Pedro Alves <palves@redhat.com>
3242
3243 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3244 output.
3245 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3246 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3247 debug_printf and debug_flush for debug output.
3248 * server.c (handle_general_set): Likewise.
3249 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3250 output.
3251
5443506e
SM
32522016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3253
3254 * Makefile.in (.c.o): Replace rule with ...
3255 (%.o: %.c): ... this one.
3256
3b165252
SM
32572016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3258
3259 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3260 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3261 make.
3262 * configure.ac: Remove checks for the make program.
3263 * configure: Re-generate.
3264
0bcda685
PA
32652016-10-28 Pedro Alves <palves@redhat.com>
3266
3267 * Makefile.in (CXX_DIALECT): Get from configure.
3268 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3269 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3270 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3271 * config.in: Regenerate.
3272 * configure: Regenerate.
3273
c3805894
YQ
32742016-10-27 Yao Qi <yao.qi@linaro.org>
3275
3276 * linux-low.c (linux_supports_range_stepping): Return true if
3277 can_software_single_step return true.
3278
89342618
YQ
32792016-10-27 Yao Qi <yao.qi@linaro.org>
3280
3281 * inferiors.c (find_inferior_in_random): New function.
3282 * inferiors.h (find_inferior_in_random): Declare.
3283 * linux-low.c (linux_wait_for_event_filtered): Call
3284 find_inferior_in_random instead of find_inferior.
3285
e3652c84
YQ
32862016-10-27 Yao Qi <yao.qi@linaro.org>
3287
3288 * linux-low.c (linux_wait_1): If single-step breakpoints are
3289 inserted, remove them.
3290
5a04c4cf
PA
32912016-10-26 Pedro Alves <palves@redhat.com>
3292
3293 * linux-low.c (handle_extended_wait): Link parent/child fork
3294 threads.
3295 (linux_wait_1): Unlink them.
3296 (linux_set_resume_request): Ignore resume requests for
3297 already-resumed and unhandled fork child threads.
3298 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3299 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3300 New functions.
3301 (handle_v_requests) <vCont>: Don't call require_running.
3302 * server.h (in_queued_stop_replies): New declaration.
3303
cb93dc7f
YQ
33042016-10-24 Yao Qi <yao.qi@linaro.org>
3305
3306 PR server/20733
3307 * linux-aarch64-low.c (append_insns): Cast the return value to
3308 'uint32_t *'.
3309
a1078bea
YQ
33102016-10-10 Yao Qi <yao.qi@linaro.org>
3311
3312 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3313
1fb77080
SDJ
33142016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3315
3316 * target.c (target_supports_multi_process): New function, moved
3317 from...
3318 * target.h (target_supports_multi_process): ... here. Remove
3319 macro.
3320
39b5a3b9
TT
33212016-10-05 Tom Tromey <tom@tromey.com>
3322
3323 PR remote/20655:
3324 * tracepoint.c (handle_tracepoint_bkpts): Check
3325 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3326
c1d0b70a
YQ
33272016-10-05 Yao Qi <yao.qi@linaro.org>
3328
3329 * configure.srv: Update the path of arm-*.xml files.
3330
0a69eedb
YQ
33312016-10-05 Terry Guo <terry.guo@arm.com>
3332 Yao Qi <yao.qi@linaro.org>
3333
3334 * Makefile.in: Adjust the path of rules.
3335 * configure.srv: Update the path of xml files.
3336 * regformats/arm-with-iwmmxt.dat: Regenerated.
3337 * regformats/arm-with-neon.dat: Likewise.
3338 * regformats/arm-with-vfpv2.dat: Likewise.
3339 * regformats/arm-with-vfpv3.dat Likewise.
3340
17e16485
YQ
33412016-09-30 Yao Qi <yao.qi@linaro.org>
3342
3343 PR gdbserver/20627
3344 * target.c (target_stop_and_wait): Don't call
3345 target_continue_no_signal, use resume_stop instead.
3346
edeeb602
YQ
33472016-09-26 Yao Qi <yao.qi@linaro.org>
3348
3349 * linux-low.c (linux_wait_1): Call debug_exit.
3350
503b1c39
PA
33512016-09-23 Pedro Alves <palves@redhat.com>
3352
3353 * Makefile.in (SFILES): Add common/new-op.c.
3354 (OBS): Add common/new-op.o.
3355 (new-op.o): New rule.
3356
74172ecf
SM
33572016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3358
3359 * .gitinore: Ignore more files.
3360
fc6cda2e
YQ
33612016-09-21 Yao Qi <yao.qi@linaro.org>
3362
3363 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3364 23.
3365
bc1e6c81
SDJ
33662016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3367
3368 * server.c (start_inferior): Call target_mourn_inferior instead of
3369 mourn_inferior; pass ptid_t argument to it.
3370 (resume): Likewise.
3371 (handle_target_event): Likewise.
3372 * target.c (target_mourn_inferior): New function.
3373 * target.h (mourn_inferior): Delete macro.
3374
0e00e962
AA
33752016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3376
3377 * linux-low.c (lwp_is_stepping): New function.
3378
1d8cb77d
CL
33792016-09-06 Carl Love <cel@us.ibm.com>
3380
3381 * server.c (start_inferior): Fixed comment, requested comment change
3382 didn't get updated correctly. Removed reference to ptrace () call as
3383 it is only true on Linux systems.
3384
7313bced
CL
33852016-09-06 Carl Love <cel@us.ibm.com>
3386
3387 * server.c (start_inferior): Do not call
3388 function target_post_create_inferior () if the
3389 inferior process has already exited.
3390
cf6de44d
PA
33912016-09-05 Pedro Alves <palves@redhat.com>
3392
3393 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3394 (COMPILE.pre, CC_LD): Use CXX directly.
3395 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3396 * acinclude.m4: Don't include build-with-cxx.m4.
3397 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3398 * configure: Regenerate.
3399
c1da6748
AT
34002016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3401
3402 PR gdb/19495
3403 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3404 call writing data to own_buf.
3405
f2b9e3df
SDJ
34062016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3407
3408 * target.c (mywait): Call target_wait instead of
3409 the_target->wait.
3410 (target_wait): New function.
3411
049a8570
SDJ
34122016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3413
3414 * server.c (start_inferior): New variable 'ptid'. Replace calls
3415 to the_target->resume by target_continue{,_no_signal}, depending
3416 on the case.
3417 * target.c (target_stop_and_wait): Call target_continue_no_signal
3418 instead of the_target->resume.
3419 (target_continue): New function.
3420
3aa5cfa0
AT
34212016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3422
3423 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3424
754653a7
AZ
34252016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3426
3427 PR server/20491
3428 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3429 ps_prochandle.
3430 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3431 * linux-arm-low.c (ps_get_thread_area): Likewise.
3432 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3433 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3434 * linux-mips-low.c (ps_get_thread_area): Likewise.
3435 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3436 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3437 * linux-x86-low.c (ps_get_thread_area): Likewise.
3438 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3439
ed036b40
PA
34402016-08-19 Pedro Alves <palves@redhat.com>
3441
3442 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3443
c8ef42ee
PA
34442016-08-19 Pedro Alves <palves@redhat.com>
3445
3446 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3447 comment. Use memcpy instead of casting through unsigned long.
3448
9c235a72
PA
34492016-08-19 Pedro Alves <palves@redhat.com>
3450
3451 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3452 allocating around 0x80000000.
3453
201506da
PA
34542016-08-19 Pedro Alves <palves@redhat.com>
3455
3456 PR gdb/20415
3457 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3458 (x32-avx512-linux-ipa.o): New rules.
3459 * configure.ac (x86_64-*-linux*): New x32 check.
3460 * configure.srv (ipa_x32_linux_regobj): New.
3461 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3462 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3463 descriptions.
3464 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3465 descriptions.
3466 * configure: Regenerate.
3467
f348d89a
PA
34682016-08-09 Pedro Alves <palves@redhat.com>
3469
3470 PR gdb/18653
3471 * Makefile.in (OBS): Add signals-state-save-restore.o.
3472 (signals-state-save-restore.o): New rule.
3473 * config.in: Regenerate.
3474 * configure: Regenerate.
3475 * linux-low.c: Include "signals-state-save-restore.h".
3476 (linux_create_inferior): Call
3477 restore_original_signals_state.
3478 * server.c: Include "dispositions-save-restore.h".
3479 (captured_main): Call save_original_signals_state.
3480
1baf5149
PA
34812016-08-05 Pedro Alves <palves@redhat.com>
3482
3483 * configure: Regenerate.
3484
fcd4a73d
YQ
34852016-08-04 Yao Qi <yao.qi@linaro.org>
3486
3487 * linux-low.c (regsets_fetch_inferior_registers): Check
3488 errno is ESRCH or not.
3489
979659d0
YQ
34902016-08-02 Yao Qi <yao.qi@linaro.org>
3491
3492 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3493 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3494 (thread_db_load_search): Update.
3495 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3496 td_ta_set_event and td_ta_event_getmsg.
3497
6598661d
PA
34982016-07-26 Pedro Alves <palves@redhat.com>
3499
3500 PR server/20414
3501 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3502 of unsigned long for 64-bit registers and use uint32_t instead of
3503 unsigned int for 32-bit registers.
3504
9cf12d57
PA
35052016-07-26 Pedro Alves <palves@redhat.com>
3506
3507 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3508 to 'ptrace'.
3509
305450ed
TT
35102016-07-21 Tom Tromey <tom@tromey.com>
3511
3512 * configure: Rebuild.
3513
2583da7c
YQ
35142016-07-21 Yao Qi <yao.qi@linaro.org>
3515
3516 * mem-break.c (find_gdb_breakpoint): Cast bp to
3517 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3518
21536b36
YQ
35192016-07-21 Yao Qi <yao.qi@linaro.org>
3520
3521 * server.c (handle_v_requests): Support s and S actions
3522 if target_supports_software_single_step return true.
3523
8901d193
YQ
35242016-07-21 Yao Qi <yao.qi@linaro.org>
3525
3526 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3527 is resume_step, call maybe_hw_step.
3528 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3529 and unstop them.
3530 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3531 breakpoints or not.
3532 (proceed_one_lwp): If resume request is resume_step, install
3533 reinsert breakpoints and call maybe_hw_step.
3534
0e9a339e
YQ
35352016-07-21 Yao Qi <yao.qi@linaro.org>
3536
3537 * linux-low.c (proceed_one_lwp): Declare.
3538 (linux_resume_one_thread): Remove local variable 'step'.
3539 Lift code enqueue signal. Call proceed_one_lwp instead of
3540 linux_resume_one_lwp.
3541
4281b351
YQ
35422016-07-21 Yao Qi <yao.qi@linaro.org>
3543
3544 * linux-low.c (linux_resume_one_thread): Call
3545 enqueue_pending_signal.
3546
984a2c04
YQ
35472016-07-21 Yao Qi <yao.qi@linaro.org>
3548
3549 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3550 * inferiors.c (do_restore_current_thread_cleanup): New function.
3551 (make_cleanup_restore_current_thread): Likewise.
3552 * linux-low.c (install_software_single_step_breakpoints): Call
3553 make_cleanup_restore_current_thread. Switch current_thread to
3554 thread.
3555
bec903c9
YQ
35562016-07-21 Yao Qi <yao.qi@linaro.org>
3557
3558 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3559 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3560 (clone_one_breakpoint): Likewise.
3561 (delete_reinsert_breakpoints): Change parameter to thread.
3562 Callers updated.
3563 (has_reinsert_breakpoints): Likewise.
3564 (uninsert_reinsert_breakpoints): Likewise.
3565 (reinsert_reinsert_breakpoints): Likewise.
3566 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3567 (delete_reinsert_breakpoints): Likewise.
3568 (reinsert_reinsert_breakpoints): Likewise.
3569 (uninsert_reinsert_breakpoints): Likewise.
3570 (has_reinsert_breakpoints): Likewise.
3571
63c40ec7
YQ
35722016-07-21 Yao Qi <yao.qi@linaro.org>
3573
3574 * inferiors.c (get_thread_process): Make parameter const.
3575 * inferiors.h (get_thread_process): Update declaration.
3576 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3577 Add new parameters child_thread and parent_thread. Callers
3578 updated.
3579 * mem-break.h (clone_all_breakpoints): Update declaration.
3580
9aa76cd0
YQ
35812016-07-21 Yao Qi <yao.qi@linaro.org>
3582
3583 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3584 <command_list, handler>: Remove.
3585 (struct gdb_breakpoint): New.
3586 (struct other_breakpoint): New.
3587 (struct reinsert_breakpoint): New.
3588 (is_gdb_breakpoint): New function.
3589 (any_persistent_commands): Update command_list if
3590 is_gdb_breakpoint returns true.
3591 (set_breakpoint): Create breakpoints according to their types.
3592 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3593 (set_gdb_breakpoint_1): Likewise.
3594 (set_gdb_breakpoint): Likewise.
3595 (clear_breakpoint_conditions): Change parameter type to
3596 'struct gdb_breakpoint *'.
3597 (clear_breakpoint_commands): Likewise.
3598 (clear_breakpoint_conditions_and_commands): Likewise.
3599 (add_condition_to_breakpoint): Likewise.
3600 (add_breakpoint_condition): Likewise.
3601 (add_commands_to_breakpoint): Likewise.
3602 (check_breakpoints): Check other_breakpoint.
3603 (clone_one_breakpoint): Clone breakpopint according to its type.
3604 * mem-break.h (struct gdb_breakpoint): Declare.
3605 (set_gdb_breakpoint): Update declaration.
3606 (clear_breakpoint_conditions_and_commands): Likewise.
3607 (add_breakpoint_condition): Likewise.
3608 (add_breakpoint_commands): Likewise.
3609 * server.c (process_point_options): Change parameter type to
3610 'struct gdb_breakpoint *'.
3611
811f8301
YQ
36122016-07-21 Yao Qi <yao.qi@linaro.org>
3613
3614 * mem-break.c (set_breakpoint_at): Rename it to ...
3615 (set_breakpoint_type_at): ... it.
3616 (set_breakpoint_at): Call set_breakpoint_type_at.
3617 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3618 * mem-break.h (set_breakpoint_at): Update comments.
3619
b1c51e36
CLT
36202016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3621
3622 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3623 to buf parameter.
3624 (nios2_store_gregset): Likewise.
3625
ced2dffb
PA
36262016-07-01 Pedro Alves <palves@redhat.com>
3627 Antoine Tremblay <antoine.tremblay@ericsson.com>
3628
3629 * linux-low.c: Change interface to take the target lwp_info
3630 pointer directly and return void. Handle detaching from a zombie
3631 thread.
3632 (linux_detach_lwp_callback): New function.
3633 (linux_detach): Detach from the leader thread after detaching from
3634 the clone threads.
3635
2ac09a5b
YQ
36362016-06-28 Yao Qi <yao.qi@linaro.org>
3637
3638 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3639 for variable new_offset.
3640 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3641 (aarch64_ftrace_insn_reloc_cb): Likewise.
3642 (aarch64_ftrace_insn_reloc_tb): Likewise.
3643 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3644 PRIx64 instead of PRIx32.
3645
79e7fd4f
YQ
36462016-06-28 Yao Qi <yao.qi@linaro.org>
3647
3648 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3649 (the_low_target): Install arm_get_syscall_trapinfo.
3650
061fc021
YQ
36512016-06-28 Yao Qi <yao.qi@linaro.org>
3652
3653 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3654 function.
3655 (the_low_target): Install aarch64_get_syscall_trapinfo.
3656
4cc32bec
YQ
36572016-06-28 Yao Qi <yao.qi@linaro.org>
3658
3659 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3660 Callers updated.
3661 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3662 Remove parameter sysno.
3663 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3664 sysret.
3665
782c1122
AA
36662016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3667
3668 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3669 (s390_emit_ne_goto): Likewise.
3670 (s390_emit_lt_goto): Likewise.
3671 (s390_emit_le_goto): Likewise.
3672 (s390_emit_gt_goto): Likewise.
3673 (s390_emit_ge_goto): Likewise.
3674 (s390x_emit_eq_goto): Likewise.
3675 (s390x_emit_ne_goto): Likewise.
3676 (s390x_emit_lt_goto): Likewise.
3677 (s390x_emit_le_goto): Likewise.
3678 (s390x_emit_gt_goto): Likewise.
3679 (s390x_emit_ge_goto): Likewise.
3680 (s390_emit_ops_impl): Mark variable static.
3681 (s390x_emit_ops): Likewise.
3682
2e7b624b
YQ
36832016-06-17 Yao Qi <yao.qi@linaro.org>
3684
3685 * linux-low.c (handle_extended_wait): Call
3686 uninsert_reinsert_breakpoints for the parent process. Remove
3687 reinsert breakpoints from the child process. Reinsert them to
3688 the parent process when vfork is done.
3689 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3690 (reinsert_reinsert_breakpoints): New function.
3691 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3692 (reinsert_reinsert_breakpoints): Declare.
3693
8a81c5d7
YQ
36942016-06-17 Yao Qi <yao.qi@linaro.org>
3695
3696 * linux-low.c (handle_extended_wait): If the parent is doing
3697 step-over, remove the reinsert breakpoints from the forked child.
3698
f50bf8e5
YQ
36992016-06-17 Yao Qi <yao.qi@linaro.org>
3700
3701 * linux-low.c (unsuspend_all_lwps): Declare.
3702 (linux_low_filter_event): If thread exited, call finish_step_over.
3703 If step-over is finished, unsuspend other threads.
3704
8376a3cb
YQ
37052016-06-17 Yao Qi <yao.qi@linaro.org>
3706
3707 * linux-low.c (linux_resume_one_lwp_throw): Assert
3708 has_reinsert_breakpoints returns false.
3709 * mem-break.c (delete_disabled_breakpoints): Assert
3710 bp type isn't reinsert_breakpoint.
3711
f79b145d
YQ
37122016-06-17 Yao Qi <yao.qi@linaro.org>
3713
3714 * linux-low.c (maybe_hw_step): New function.
3715 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3716 (finish_step_over): Switch current_thread to lwp temporarily,
3717 and assert has_reinsert_breakpoints returns true.
3718 (proceed_one_lwp): Call maybe_hw_step.
3719 * mem-break.c (has_reinsert_breakpoints): New function.
3720 * mem-break.h (has_reinsert_breakpoints): Declare.
3721
0ae534d2
JT
37222016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3723
3724 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3725
fcdad592
YQ
37262016-05-17 Yao Qi <yao.qi@linaro.org>
3727
3728 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3729 instead of find_inferior.
3730
9e784964
YQ
37312016-05-05 Yao Qi <yao.qi@linaro.org>
3732
3733 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3734 Initialize res to zero.
3735
cf2ebb6e
YQ
37362016-05-05 Yao Qi <yao.qi@linaro.org>
3737
3738 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3739 to uint32_t.
3740
c1aebf87
UW
37412016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3742
3743 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3744 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3745 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3746
35fd2deb 37472016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3748 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3749
3750 * tracepoint.c (write_inferior_int8): New function.
3751 (cmd_qtenable_disable): Write enable flag using
3752 write_inferior_int8.
3753
484b3c32
YQ
37542016-04-25 Yao Qi <yao.qi@linaro.org>
3755
3756 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3757 (need_step_over_p): Return zero if the LWP has pending signals
3758 can be delivered on software single step target.
3759
85ba7d86
YQ
37602016-04-25 Yao Qi <yao.qi@linaro.org>
3761
3762 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3763 return instead of error.
3764
3539aa13
YQ
37652016-04-22 Yao Qi <yao.qi@linaro.org>
3766
3767 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3768 to 23.
3769
5b061e98
YQ
37702016-04-22 Yao Qi <yao.qi@linaro.org>
3771
3772 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3773 signal when stepping over breakpoint with software single
3774 step.
3775
3451269c
PA
37762016-04-21 Pedro Alves <palves@redhat.com>
3777
3778 * linux-s390-low.c (s390_collect_ptrace_register)
3779 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3780 add casts.
3781 (s390_check_regset): Use void * instead of gdb_byte *.
3782
a2358508
PA
37832016-04-20 Pedro Alves <palves@redhat.com>
3784
3785 * configure: Renegerate.
3786
6885166d
YQ
37872016-04-20 Yao Qi <yao.qi@linaro.org>
3788
3789 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3790 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3791 number 16.
3792 (arm_store_gregset): Likewise.
3793
2b863f51
WT
37942016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3795
3796 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3797 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3798 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3799 (amd64-avx-mpx-linux.c): New rules.
3800 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3801 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3802 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3803 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3804 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3805 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3806 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3807 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3808 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3809 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3810 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3811 * linux-x86-low.c (x86_linux_read_description): Add case for
3812 X86_XSTATE_AVX_MPX_MASK.
3813 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3814 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3815 init_registers_i386_avx_mpx_linux.
3816 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3817 (initialize_low_tracepoint): Call
3818 init_registers_i386_avx_mpx_linux.
3819 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3820 (initialize_low_tracepoint): Call
3821 init_registers_amd64_avx_mpx_linux.
3822 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3823 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3824 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3825 declarations.
3826
9b30624b
PA
38272016-04-18 Pedro Alves <palves@redhat.com>
3828
3829 * configure: Regenerate.
3830
45e3745e
AT
38312016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3832
3833 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3834 (aarch64_emit_sub): Likewise.
3835
2afc13ff
PA
38362016-04-12 Pedro Alves <palves@redhat.com>
3837
3838 * utils.c (prepare_to_throw_exception): Delete.
3839
6e774b13
SM
38402016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3841
3842 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3843
4dca19f8
MK
38442016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3845
3846 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3847
d0a9981f
MK
38482016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3849
3850 * linux-aarch64-ipa.c: Add <elf.h> include.
3851 * linux-ppc-ipa.c: Add <elf.h> include.
3852 * linux-s390-ipa.c: Add <elf.h> include.
3853
252db07e
MK
38542016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3855
3856 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3857 (get_raw_reg_ptr): Likewise.
3858 (get_trace_state_variable_value_ptr): Likewise.
3859 (set_trace_state_variable_value_ptr): Likewise.
3860 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3861 char *.
3862
14e2b6d9
MK
38632016-03-31 Wei-cheng Wang <cole945@gmail.com>
3864 Marcin Kościelnicki <koriakin@0x04.net>
3865
3866 PR/17221
3867 * linux-ppc-low.c (emit_insns): New function.
3868 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3869 (ppc_emit_prologue): New function.
3870 (ppc_emit_epilogue): New function.
3871 (ppc_emit_add): New function.
3872 (ppc_emit_sub): New function.
3873 (ppc_emit_mul): New function.
3874 (ppc_emit_lsh): New function.
3875 (ppc_emit_rsh_signed): New function.
3876 (ppc_emit_rsh_unsigned): New function.
3877 (ppc_emit_ext): New function.
3878 (ppc_emit_zero_ext): New function.
3879 (ppc_emit_log_not): New function.
3880 (ppc_emit_bit_and): New function.
3881 (ppc_emit_bit_or): New function.
3882 (ppc_emit_bit_xor): New function.
3883 (ppc_emit_bit_not): New function.
3884 (ppc_emit_equal): New function.
3885 (ppc_emit_less_signed): New function.
3886 (ppc_emit_less_unsigned): New function.
3887 (ppc_emit_ref): New function.
3888 (ppc_emit_const): New function.
3889 (ppc_emit_reg): New function.
3890 (ppc_emit_pop): New function.
3891 (ppc_emit_stack_flush): New function.
3892 (ppc_emit_swap): New function.
3893 (ppc_emit_stack_adjust): New function.
3894 (ppc_emit_call): New function.
3895 (ppc_emit_int_call_1): New function.
3896 (ppc_emit_void_call_2): New function.
3897 (ppc_emit_if_goto): New function.
3898 (ppc_emit_goto): New function.
3899 (ppc_emit_eq_goto): New function.
3900 (ppc_emit_ne_goto): New function.
3901 (ppc_emit_lt_goto): New function.
3902 (ppc_emit_le_goto): New function.
3903 (ppc_emit_gt_goto): New function.
3904 (ppc_emit_ge_goto): New function.
3905 (ppc_write_goto_address): New function.
3906 (ppc_emit_ops_impl): New static variable.
3907 (ppc64v1_emit_prologue): New function.
3908 (ppc64v2_emit_prologue): New function.
3909 (ppc64_emit_epilogue): New function.
3910 (ppc64_emit_add): New function.
3911 (ppc64_emit_sub): New function.
3912 (ppc64_emit_mul): New function.
3913 (ppc64_emit_lsh): New function.
3914 (ppc64_emit_rsh_signed): New function.
3915 (ppc64_emit_rsh_unsigned): New function.
3916 (ppc64_emit_ext): New function.
3917 (ppc64_emit_zero_ext): New function.
3918 (ppc64_emit_log_not): New function.
3919 (ppc64_emit_bit_and): New function.
3920 (ppc64_emit_bit_or): New function.
3921 (ppc64_emit_bit_xor): New function.
3922 (ppc64_emit_bit_not): New function.
3923 (ppc64_emit_equal): New function.
3924 (ppc64_emit_less_signed): New function.
3925 (ppc64_emit_less_unsigned): New function.
3926 (ppc64_emit_ref): New function.
3927 (ppc64_emit_const): New function.
3928 (ppc64v1_emit_reg): New function.
3929 (ppc64v2_emit_reg): New function.
3930 (ppc64_emit_pop): New function.
3931 (ppc64_emit_stack_flush): New function.
3932 (ppc64_emit_swap): New function.
3933 (ppc64v1_emit_call): New function.
3934 (ppc64v2_emit_call): New function.
3935 (ppc64v1_emit_int_call_1): New function.
3936 (ppc64v2_emit_int_call_1): New function.
3937 (ppc64v1_emit_void_call_2): New function.
3938 (ppc64v2_emit_void_call_2): New function.
3939 (ppc64_emit_if_goto): New function.
3940 (ppc64_emit_eq_goto): New function.
3941 (ppc64_emit_ne_goto): New function.
3942 (ppc64_emit_lt_goto): New function.
3943 (ppc64_emit_le_goto): New function.
3944 (ppc64_emit_gt_goto): New function.
3945 (ppc64_emit_ge_goto): New function.
3946 (ppc64v1_emit_ops_impl): New static variable.
3947 (ppc64v2_emit_ops_impl): New static variable.
3948 (ppc_emit_ops): New function.
3949 (linux_low_target): Wire in ppc_emit_ops.
3950
a2174ba4
MK
39512016-03-31 Wei-cheng Wang <cole945@gmail.com>
3952 Marcin Kościelnicki <koriakin@0x04.net>
3953
3954 PR/17221
3955 * Makefile.in: Add powerpc-*-ipa.o
3956 * configure.srv: Add ipa_obj for powerpc*-linux.
3957 * linux-ppc-ipa.c: New file.
3958 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3959 includes.
3960 (PPC_FIELD): New macro.
3961 (PPC_SEXT): New macro.
3962 (PPC_OP6): New macro.
3963 (PPC_BO): New macro.
3964 (PPC_LI): New macro.
3965 (PPC_BD): New macro.
3966 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3967 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3968 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3969 (ppc_get_thread_area): New function.
3970 (is_elfv2_inferior): New function.
3971 (gen_ds_form): New function.
3972 (GEN_STD): New macro.
3973 (GEN_STDU): New macro.
3974 (GEN_LD): New macro.
3975 (GEN_LDU): New macro.
3976 (gen_d_form): New function.
3977 (GEN_ADDI): New macro.
3978 (GEN_ADDIS): New macro.
3979 (GEN_LI): New macro.
3980 (GEN_LIS): New macro.
3981 (GEN_ORI): New macro.
3982 (GEN_ORIS): New macro.
3983 (GEN_LWZ): New macro.
3984 (GEN_STW): New macro.
3985 (GEN_STWU): New macro.
3986 (gen_xfx_form): New function.
3987 (GEN_MFSPR): New macro.
3988 (GEN_MTSPR): New macro.
3989 (GEN_MFCR): New macro.
3990 (GEN_MTCR): New macro.
3991 (GEN_SYNC): New macro.
3992 (GEN_LWSYNC): New macro.
3993 (gen_x_form): New function.
3994 (GEN_OR): New macro.
3995 (GEN_MR): New macro.
3996 (GEN_LWARX): New macro.
3997 (GEN_STWCX): New macro.
3998 (GEN_CMPW): New macro.
3999 (gen_md_form): New function.
4000 (GEN_RLDICL): New macro.
4001 (GEN_RLDICR): New macro.
4002 (gen_i_form): New function.
4003 (GEN_B): New macro.
4004 (GEN_BL): New macro.
4005 (gen_b_form): New function.
4006 (GEN_BNE): New macro.
4007 (GEN_LOAD): New macro.
4008 (GEN_STORE): New macro.
4009 (gen_limm): New function.
4010 (gen_atomic_xchg): New function.
4011 (gen_call): New function.
4012 (ppc_relocate_instruction): New function.
4013 (ppc_install_fast_tracepoint_jump_pad): New function.
4014 (ppc_get_min_fast_tracepoint_insn_len): New function.
4015 (ppc_get_ipa_tdesc_idx): New function.
4016 (the_low_target): Wire in the new functions.
4017 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4018 tdescs.
4019 * linux-ppc-tdesc.h: New file.
4020
a13c4696
MK
40212016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4022
4023 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4024 (alloc_jump_pad_buffer): New function.
4025 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4026 (alloc_jump_pad_buffer): New function.
4027 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4028 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4029 (alloc_jump_pad_buffer): New function.
4030 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4031 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4032 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4033 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4034
1cda1512
MK
40352016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4036
4037 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4038 * linux-amd64-ipa.c: Likewise.
4039 * linux-i386-ipa.c: Likewise.
4040 * linux-s390-ipa.c: Likewise.
4041 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4042 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4043 set_trace_state_variable_value_ptr.
4044 (struct ipa_sym_addresses): Likewise.
4045 (symbol_list): Likewise.
4046 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4047 accessing gdb_collect directly.
4048 (gdb_collect_ptr_type): New typedef.
4049 (get_raw_reg_ptr_type): New typedef.
4050 (get_trace_state_variable_value_ptr_type): New typedef.
4051 (set_trace_state_variable_value_ptr_type): New typedef.
4052 (gdb_collect_ptr): New global.
4053 (get_raw_reg_ptr): New global.
4054 (get_trace_state_variable_value_ptr): New global.
4055 (set_trace_state_variable_value_ptr): New global.
4056 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4057 accessing get_raw_reg directly.
4058 (get_get_tsv_func_addr): Likewise for
4059 get_trace_state_variable_value_ptr.
4060 (get_set_tsv_func_addr): Likewise for
4061 set_trace_state_variable_value_ptr.
4062 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4063
72fb5488
SM
40642016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4065
4066 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4067
28170b88
MK
40682016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4069
4070 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4071 packets.
4072 (relocate_instruction): Remove own_buf.
4073 * server.c (own_buf): Make global.
4074 (handle_v_requests): Make global.
4075 * server.h (own_buf): New declaration.
4076 (handle_v_requests): New prototype.
4077
f39e8743
MK
40782016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4079
4080 PR 18377
4081 * linux-s390-low.c (add_insns): New function.
4082 (s390_emit_prologue): New function.
4083 (s390_emit_epilogue): New function.
4084 (s390_emit_add): New function.
4085 (s390_emit_sub): New function.
4086 (s390_emit_mul): New function.
4087 (s390_emit_lsh): New function.
4088 (s390_emit_rsh_signed): New function.
4089 (s390_emit_rsh_unsigned): New function.
4090 (s390_emit_ext): New function.
4091 (s390_emit_log_not): New function.
4092 (s390_emit_bit_and): New function.
4093 (s390_emit_bit_or): New function.
4094 (s390_emit_bit_xor): New function.
4095 (s390_emit_bit_not): New function.
4096 (s390_emit_equal): New function.
4097 (s390_emit_less_signed): New function.
4098 (s390_emit_less_unsigned): New function.
4099 (s390_emit_ref): New function.
4100 (s390_emit_if_goto): New function.
4101 (s390_emit_goto): New function.
4102 (s390_write_goto_address): New function.
4103 (s390_emit_litpool): New function.
4104 (s390_emit_const): New function.
4105 (s390_emit_call): New function.
4106 (s390_emit_reg): New function.
4107 (s390_emit_pop): New function.
4108 (s390_emit_stack_flush): New function.
4109 (s390_emit_zero_ext): New function.
4110 (s390_emit_swap): New function.
4111 (s390_emit_stack_adjust): New function.
4112 (s390_emit_set_r2): New function.
4113 (s390_emit_int_call_1): New function.
4114 (s390_emit_void_call_2): New function.
4115 (s390_emit_eq_goto): New function.
4116 (s390_emit_ne_goto): New function.
4117 (s390_emit_lt_goto): New function.
4118 (s390_emit_le_goto): New function.
4119 (s390_emit_gt_goto): New function.
4120 (s390_emit_ge_goto): New function.
4121 (s390x_emit_prologue): New function.
4122 (s390x_emit_epilogue): New function.
4123 (s390x_emit_add): New function.
4124 (s390x_emit_sub): New function.
4125 (s390x_emit_mul): New function.
4126 (s390x_emit_lsh): New function.
4127 (s390x_emit_rsh_signed): New function.
4128 (s390x_emit_rsh_unsigned): New function.
4129 (s390x_emit_ext): New function.
4130 (s390x_emit_log_not): New function.
4131 (s390x_emit_bit_and): New function.
4132 (s390x_emit_bit_or): New function.
4133 (s390x_emit_bit_xor): New function.
4134 (s390x_emit_bit_not): New function.
4135 (s390x_emit_equal): New function.
4136 (s390x_emit_less_signed): New function.
4137 (s390x_emit_less_unsigned): New function.
4138 (s390x_emit_ref): New function.
4139 (s390x_emit_if_goto): New function.
4140 (s390x_emit_const): New function.
4141 (s390x_emit_call): New function.
4142 (s390x_emit_reg): New function.
4143 (s390x_emit_pop): New function.
4144 (s390x_emit_stack_flush): New function.
4145 (s390x_emit_zero_ext): New function.
4146 (s390x_emit_swap): New function.
4147 (s390x_emit_stack_adjust): New function.
4148 (s390x_emit_int_call_1): New function.
4149 (s390x_emit_void_call_2): New function.
4150 (s390x_emit_eq_goto): New function.
4151 (s390x_emit_ne_goto): New function.
4152 (s390x_emit_lt_goto): New function.
4153 (s390x_emit_le_goto): New function.
4154 (s390x_emit_gt_goto): New function.
4155 (s390x_emit_ge_goto): New function.
4156 (s390_emit_ops): New function.
4157 (struct linux_target_ops): Fill in emit_ops hook.
4158
abd9baf9
MK
41592016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4160
4161 PR 18377
4162 * Makefile.in: Add s390 IPA files.
4163 * configure.srv: Build IPA for s390.
4164 * linux-s390-ipa.c: New file.
4165 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4166 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4167 (tdesc_s390_linux32): Likewise.
4168 (init_registers_s390_linux32v1): Likewise.
4169 (tdesc_s390_linux32v1): Likewise.
4170 (init_registers_s390_linux32v2): Likewise.
4171 (tdesc_s390_linux32v2): Likewise.
4172 (init_registers_s390_linux64): Likewise.
4173 (tdesc_s390_linux64): Likewise.
4174 (init_registers_s390_linux64v1): Likewise.
4175 (tdesc_s390_linux64v1): Likewise.
4176 (init_registers_s390_linux64v2): Likewise.
4177 (tdesc_s390_linux64v2): Likewise.
4178 (init_registers_s390_te_linux64): Likewise.
4179 (tdesc_s390_te_linux64): Likewise.
4180 (init_registers_s390_vx_linux64): Likewise.
4181 (tdesc_s390_vx_linux64): Likewise.
4182 (init_registers_s390_tevx_linux64): Likewise.
4183 (tdesc_s390_tevx_linux64): Likewise.
4184 (init_registers_s390x_linux64): Likewise.
4185 (tdesc_s390x_linux64): Likewise.
4186 (init_registers_s390x_linux64v1): Likewise.
4187 (tdesc_s390x_linux64v1): Likewise.
4188 (init_registers_s390x_linux64v2): Likewise.
4189 (tdesc_s390x_linux64v2): Likewise.
4190 (init_registers_s390x_te_linux64): Likewise.
4191 (tdesc_s390x_te_linux64): Likewise.
4192 (init_registers_s390x_vx_linux64): Likewise.
4193 (tdesc_s390x_vx_linux64): Likewise.
4194 (init_registers_s390x_tevx_linux64): Likewise.
4195 (tdesc_s390x_tevx_linux64): Likewise.
4196 (have_hwcap_s390_vx): New static variable.
4197 (s390_arch_setup): Fill have_hwcap_s390_vx.
4198 (s390_get_thread_area): New function.
4199 (s390_ft_entry_gpr_esa): New const.
4200 (s390_ft_entry_gpr_zarch): New const.
4201 (s390_ft_entry_misc): New const.
4202 (s390_ft_entry_fr): New const.
4203 (s390_ft_entry_vr): New const.
4204 (s390_ft_main_31): New const.
4205 (s390_ft_main_64): New const.
4206 (s390_ft_exit_fr): New const.
4207 (s390_ft_exit_vr): New const.
4208 (s390_ft_exit_misc): New const.
4209 (s390_ft_exit_gpr_esa): New const.
4210 (s390_ft_exit_gpr_zarch): New const.
4211 (append_insns): New function.
4212 (s390_relocate_instruction): New function.
4213 (s390_install_fast_tracepoint_jump_pad): New function.
4214 (s390_get_min_fast_tracepoint_insn_len): New function.
4215 (s390_get_ipa_tdesc_idx): New function.
4216 (struct linux_target_ops): Wire in the above functions.
4217 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4218 * linux-s390-tdesc.h: New file.
4219
a4105d04
MK
42202016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4221
4222 * linux-s390-low.c (s390_supports_tracepoints): New function.
4223 (struct linux_target_ops): Fill supports_tracepoints hook.
4224
35ac8b3e
YQ
42252016-03-18 Yao Qi <yao.qi@linaro.org>
4226
4227 * linux-low.c (lwp_signal_can_be_delivered): New function.
4228 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4229
94610ec4
YQ
42302016-03-18 Yao Qi <yao.qi@linaro.org>
4231
4232 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4233 0 if signal is enqueued. Remove 'signal' from one debugging
4234 message. Move one debugging message to some lines below.
4235 Remove code setting 'signal' to 0.
4236
80aea927
YQ
42372016-03-18 Yao Qi <yao.qi@linaro.org>
4238
4239 * linux-low.c (linux_low_filter_event): Remove redundant
4240 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4241
b04fd3be
MK
42422016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4243
4244 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4245 (struct linux_target_ops): Wire in the above.
4246
c40c8d4b
YQ
42472016-03-03 Yao Qi <yao.qi@linaro.org>
4248
4249 * linux-low.c: Update comments to start_step_over.
4250
0f8288ae
YQ
42512016-03-03 Yao Qi <yao.qi@linaro.org>
4252
4253 PR server/19736
4254 * linux-low.c (handle_extended_wait): Set child suspended
4255 if event_lwp->bp_reinsert isn't zero.
4256
fdbd04a8
YQ
42572016-03-02 Yao Qi <yao.qi@linaro.org>
4258
4259 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4260 enqueue_pending_signal.
4261
6896a8fa
MK
42622016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4263
4264 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4265 is actually loaded.
4266
ab503087
MK
42672016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4268
4269 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4270 (s390_regmap_3264) [!__s390x__]: New global.
4271 (s390_collect_ptrace_register): Skip map entries containing -1.
4272 (s390_supply_ptrace_register): Ditto.
4273 (s390_fill_gprs_high): New function.
4274 (s390_store_gprs_high): New function.
4275 (s390_regsets): Add NT_S390_HIGH_GPRS.
4276 (s390_get_hwcap): Enable on 31-bit.
4277 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4278 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4279 Detect NT_S390_HIGH_GPRS.
4280 (s390_usrregs_info_3264): Enable on 31-bit.
4281 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4282 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4283
ae91f625
MK
42842016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4285
4286 PR gdb/13808
4287 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4288 * configure.srv: Ditto.
4289 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4290 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4291 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4292 (init_registers_amd64_linux): Remove prototype.
4293 (tdesc_amd64_linux): Remove declaration.
4294 (get_ipa_tdesc): New function.
4295 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4296 initialize remaining tdescs.
4297 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4298 (init_registers_i386_linux): Remove prototype.
4299 (tdesc_i386_linux): Remove declaration.
4300 (get_ipa_tdesc): New function.
4301 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4302 initialize remaining tdescs.
4303 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4304 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4305 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4306 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4307 (x86_get_ipa_tdesc_idx): New function.
4308 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4309 * linux-x86-tdesc.h: New file.
4310 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4311 (target_get_ipa_tdesc_idx): New macro.
4312 * tracepoint.c (ipa_tdesc_idx): New macro.
4313 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4314 (symbol_list): Add ipa_tdesc_idx.
4315 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4316 (ipa_tdesc): Remove.
4317 (ipa_tdesc_idx): New variable.
4318 (get_context_regcache): Use get_ipa_tdesc.
4319 (gdb_collect): Ditto.
4320 (gdb_probe): Ditto.
4321 * tracepoint.h (get_ipa_tdesc): New prototype.
4322 (ipa_tdesc): Remove.
4323
e7ad2f14
PA
43242016-02-24 Pedro Alves <palves@redhat.com>
4325
4326 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4327 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4328 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4329 Factor out common code between the USE_SIGTRAP_SIGINFO and
4330 !USE_SIGTRAP_SIGINFO blocks.
4331 (linux_low_filter_event): Call save_stop_reason instead of
4332 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4333 Update comments.
4334 (linux_wait_1): Update comments.
4335
657f9cde
WW
43362016-02-24 Wei-cheng Wang <cole945@gmail.com>
4337
4338 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4339 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4340 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4341 ppc_insert_point, ppc_remove_point.
4342
b00b61e1
MK
43432016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4344
4345 * linux-s390-low.c (s390_supports_z_point_type): New function.
4346 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4347
553cb527
YQ
43482016-02-16 Yao Qi <yao.qi@linaro.org>
4349
4350 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4351 PC. Get pc from regcache_read_pc.
4352
a5652c21
YQ
43532016-02-12 Yao Qi <yao.qi@linaro.org>
4354
4355 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4356 or linux_get_pc_32bit.
4357 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4358
ed443b61
YQ
43592016-02-12 Yao Qi <yao.qi@linaro.org>
4360
4361 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4362 arm_linux_get_next_pcs_fixup.
4363
020ecd38
MK
43642016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4365
4366 * tracepoint.c (x_tracepoint_action_download): Change
4367 write_inferior_data_ptr to write_inferior_data_pointer.
4368 (cmd_qtstart): Likewise.
4369 (write_inferior_data_ptr): Remove.
4370 (download_agent_expr): Change write_inferior_data_ptr to
4371 write_inferior_data_pointer.
4372 (download_tracepoint_1): Likewise.
4373 (download_tracepoint): Likewise.
4374 (download_trace_state_variables): Likewise.
4375
7cae9051
WW
43762016-02-11 Wei-cheng Wang <cole945@gmail.com>
4377 Marcin Kościelnicki <koriakin@0x04.net>
4378
4379 * tracepoint.c (struct tracepoint_action_ops): Remove.
4380 (struct tracepoint_action): Remove ops.
4381 (m_tracepoint_action_download, r_tracepoint_action_download)
4382 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4383 size and offset accordingly.
4384 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4385 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4386 (tracepoint_action_send, tracepoint_action_download): New functions.
4387 Helpers for trace action handlers.
4388 (add_tracepoint_action): Remove setup actions ops.
4389 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4390
9f6a71b4
YQ
43912016-02-10 Yao Qi <yao.qi@linaro.org>
4392
4393 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4394
1e94266c
SM
43952016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4396
4397 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4398 to AC_OUTPUT.
4399 * configure: Regenerate.
4400
8adce034
SM
44012016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4402
4403 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4404 void * to gdb_byte *.
4405 * linux-low.c (siginfo_fixup): Likewise.
4406 (linux_xfer_siginfo): Likewise.
4407 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4408 Likewise.
4409 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4410
93813b37
WT
44112016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4412
4413 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4414 to srv_tgtobj.
4415 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4416 to srv_tgtobj.
4417 * linux-x86-low.c [__x86_64__]: Include
4418 "nat/amd64-linux-siginfo.h".
4419 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4420 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4421 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4422 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4423 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4424 (cpt_si_fd, si_timerid, si_overrun): Move from
4425 nat/amd64-linux-siginfo.c.
4426 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4427
8424cc97
SM
44282016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4429
4430 * server.c (skip_to_semicolon): Remove.
4431 (process_point_options): Use strchrnul instead of
4432 skip_to_semicolon.
4433
4d18591b
YQ
44342016-01-26 Yao Qi <yao.qi@linaro.org>
4435
4436 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4437 * linux-low.c (install_software_single_step_breakpoints): Don't
4438 call regcache_read_pc.
4439 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4440 argument pc.
4441
d8020970
YQ
44422016-01-26 Yao Qi <yao.qi@linaro.org>
4443
4444 * linux-low.c (install_software_single_step_breakpoints): Call
4445 regcache_read_pc instead of get_pc.
4446
8b207339
YQ
44472016-01-26 Yao Qi <yao.qi@linaro.org>
4448
4449 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4450 (unblock_async_io): Rename to ...
4451 (block_unblock_async_io): ... it. New function.
4452 (enable_async_io): Don't install SIGIO handler. Unblock it
4453 instead.
4454 (disable_async_io): Don't ignore SIGIO. Block it instead.
4455 (initialize_async_io): Install SIGIO handler. Don't call
4456 unblock_async_io.
4457
18879fef
YQ
44582016-01-26 Yao Qi <yao.qi@linaro.org>
4459
4460 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4461 first character is '\003', call *the_target->request_interrupt.
4462
a0f8e08a
YQ
44632016-01-25 Yao Qi <yao.qi@linaro.org>
4464
4465 * remote-utils.c (new_thread_notify): Remove.
4466 (dead_thread_notify): Likewise.
4467 * remote-utils.h (new_thread_notify): Remove declaration.
4468 (dead_thread_notify): Likewise.
4469
cc5fd9ab
MK
44702016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4471
4472 * gdb.trace/pending.exp: Fix expected message on continue.
4473
99e8eb11
MK
44742016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4475
4476 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4477 it works properly on big-endian machines where sizeof (CORE_ADDR)
4478 != sizeof (void *).
4479
a994041d
PA
44802016-01-21 Pedro Alves <palves@redhat.com>
4481
4482 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4483 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4484 * configure: Regenerate.
4485
f7a6a40d
YQ
44862016-01-21 Yao Qi <yao.qi@linaro.org>
4487
4488 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4489 is_thumb and set it according to CPSR saved on the stack.
4490 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4491 arm_sigreturn_next_pc.
4492
6f69e520
YQ
44932016-01-18 Yao Qi <yao.qi@linaro.org>
4494
4495 * linux-low.c (linux_set_pc_64bit): New function.
4496 (linux_get_pc_64bit): New function.
4497 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4498 Declare.
4499 * linux-sparc-low.c (debug_threads): Remove declaration.
4500 (sparc_get_pc): Remove.
4501 (the_low_target): Use linux_get_pc_64bit instead of
4502 sparc_get_pc.
4503 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4504 (the_low_target): Use linux_get_pc_64bit and
4505 linux_set_pc_64bit.
4506
276d4552
YQ
45072016-01-18 Yao Qi <yao.qi@linaro.org>
4508
4509 * linux-arm-low.c (debug_threads): Remove declaration.
4510 (arm_get_pc, arm_set_pc): Remove.
4511 (the_low_target): Use linux_get_pc_32bit and
4512 linux_set_pc_32bit.
4513 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4514 (the_low_target): Use linux_get_pc_32bit and
4515 linux_set_pc_32bit.
4516 * linux-cris-low.c (debug_threads): Remove declaration.
4517 (cris_get_pc, cris_set_pc,): Remove.
4518 (the_low_target): Use linux_get_pc_32bit and
4519 linux_set_pc_32bit.
4520 * linux-crisv32-low.c (debug_threads): Remove declaration.
4521 (cris_get_pc, cris_set_pc): Remove.
4522 (the_low_target): Use linux_get_pc_32bit and
4523 linux_set_pc_32bit.
4524 * linux-low.c: Include inttypes.h.
4525 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4526 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4527 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4528 (the_low_target): Use linux_get_pc_32bit and
4529 linux_set_pc_32bit.
4530 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4531 (the_low_target): Use linux_get_pc_32bit and
4532 linux_set_pc_32bit.
4533 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4534 (the_low_target): Use linux_get_pc_32bit and
4535 linux_set_pc_32bit.
4536 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4537 (the_low_target): Use linux_get_pc_32bit and
4538 linux_set_pc_32bit.
4539 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4540 (the_low_target): Use linux_get_pc_32bit and
4541 linux_set_pc_32bit.
4542
eb0edac8
GB
45432016-01-18 Gary Benson <gbenson@redhat.com>
4544
4545 * configure.ac (AC_FUNC_FORK): New check.
4546 * config.in: Regenerate.
4547 * configure: Likewise.
4548
1b451dda
YQ
45492016-01-14 Yao Qi <yao.qi@linaro.org>
4550
4551 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4552 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4553 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4554 arm_get_next_pcs_ctor.
4555
82075af2
JS
45562016-01-12 Josh Stone <jistone@redhat.com>
4557 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4558
4559 * inferiors.h: Include "gdb_vecs.h".
4560 (struct process_info): Add syscalls_to_catch.
4561 * inferiors.c (remove_process): Free syscalls_to_catch.
4562 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4563 syscall_return stops.
4564 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4565 * server.c (handle_general_set): Handle QCatchSyscalls.
4566 (handle_query): Report support for QCatchSyscalls.
4567 * target.h (struct target_ops): Add supports_catch_syscall.
4568 (target_supports_catch_syscall): New macro.
4569 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4570 (struct lwp_info): Add syscall_state.
4571 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4572 Maintain syscall_state and syscalls_to_catch across exec.
4573 (get_syscall_trapinfo): New function, proxy to the_low_target.
4574 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4575 (linux_low_filter_event): Toggle syscall_state entry/return for
4576 syscall traps, and set it ignored for all others.
4577 (gdb_catching_syscalls_p): New function.
4578 (gdb_catch_this_syscall_p): New function.
4579 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4580 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4581 (linux_supports_catch_syscall): New function.
4582 (linux_target_ops): Install it.
4583 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4584 (the_low_target): Install it.
4585
8f13a3ce
MF
45862016-01-12 Mike Frysinger <vapier@gentoo.org>
4587
4588 * acinclude.m4: Include new ../warning.m4 file.
4589 * configure: Regenerated.
4590 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4591
5b3da067
MF
45922016-01-12 Mike Frysinger <vapier@gentoo.org>
4593
4594 * ax.c (is_goto_target): Mark static.
4595 * linux-low.c (register_addr): Likewise.
4596 (linux_fetch_registers, linux_store_registers): Likewise.
4597 * mem-break.c (any_persistent_commands): Fix old prototype.
4598 (add_commands_to_breakpoint): Mark static.
4599 * regcache.c (find_register_by_name): Delete unused func.
4600 * remote-utils.c (hex_or_minus_one): Mark static.
4601 * server.c (monitor_show_help): Mark static.
4602 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4603 handle_v_requests): Likewise.
4604
bc504a31
PA
46052016-01-12 Pedro Alves <palves@redhat.com>
4606
4607 Remove use of the registered trademark symbol throughout.
4608
5a0dd67a
YQ
46092016-01-08 Yao Qi <yao.qi@linaro.org>
4610
4611 * remote-utils.c (getpkt): If c is '\003', call target hook
4612 request_interrupt.
4613
b2ca446f
YQ
46142016-01-06 Yao Qi <yao.qi@linaro.org>
4615
4616 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4617 linux-aarch32-low.c.
4618 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4619 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4620 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4621 (thumb2_breakpoint): Declare.
4622 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4623 linux-aarch32-low.h.
4624 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4625 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4626 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4627
edd88788
JB
46282016-01-01 Joel Brobecker <brobecker@adacore.com>
4629
4630 * gdbreplay.c (gdbreplay_version): Change copyright year in
4631 version message.
4632 * server.c (gdbserver_version): Likewise.
4633
65da7f14
PP
46342015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4635
4636 * server.c (crc32_table): Delete.
4637 (crc32): Use libiberty's xcrc32 function.
4638
4abd5ed2
JB
46392015-12-22 Joel Brobecker <brobecker@adacore.com>
4640
4641 * lynx-low.c (lynx_delete_thread_callback): New function.
4642 (lynx_mourn): Properly delete our process and all of its
4643 threads. Remove call to clear_inferiors.
4644
0e50fe5c
JB
46452015-12-22 Joel Brobecker <brobecker@adacore.com>
4646
4647 * target.c (thread_search_callback): Add check that
4648 the thread_stopped target callback is not NULL before
4649 calling it.
4650
35adc03f
YQ
46512015-12-21 Yao Qi <yao.qi@linaro.org>
4652
4653 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4654 arm breakpoint.
4655
bd2b2909
AT
46562015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4657
4658 * server.c (handle_query): Call target_supports_software_single_step.
4659
7fe5e27e
AT
46602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4661
4662 * linux-low.c (single_step): New function.
4663 (linux_resume_one_lwp_throw): Call single_step.
4664 (start_step_over): Likewise.
4665
d9311bfa
AT
46662015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4667
4668 * Makefile.in (SFILES): Append arch/arm-linux.c,
4669 arch/arm-get-next-pcs.c.
4670 (arm-linux.o): New rule.
4671 (arm-get-next-pcs.o): New rule.
4672 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4673 arm-linux.o.
4674 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4675 to linux-aarch32-low.c.
4676 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4677 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4678 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4679 (thumb2_breakpoint_len): Likewise.
4680 (arm_is_thumb_mode): Make non-static.
4681 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4682 from linux-aarch32-low.c.
4683 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4684 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4685 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4686 (thumb2_breakpoint_len): Likewise.
4687 (arm_is_thumb_mode): New declaration.
4688 * linux-arm-low.c: Include arch/arm-linux.h
4689 aarch/arm-get-next-pcs.h, sys/syscall.h.
4690 (get_next_pcs_ops): New struct.
4691 (get_next_pcs_addr_bits_remove): New function.
4692 (get_next_pcs_is_thumb): New function.
4693 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4694 (arm_sigreturn_next_pc): Likewise.
4695 (get_next_pcs_syscall_next_pc): Likewise.
4696 (arm_gdbserver_get_next_pcs): Likewise.
4697 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4698 Initialize.
4699 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4700 * server.h: Include gdb_vecs.h.
4701
68ce2059
AT
47022015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4703
4704 * Makefile.in (SFILES): Append common/common-regcache.c.
4705 (OBS): Append common-regcache.o.
4706 (common-regcache.o): New rule.
4707 * regcache.c (init_register_cache): Initialize cache to
4708 REG_UNAVAILABLE.
4709 (regcache_raw_read_unsigned): New function.
4710 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4711 register_status enum.
4712
fa5308bd
AT
47132015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4714
4715 * linux-aarch64-low.c (the_low_targets): Rename
4716 breakpoint_reinsert_addr to get_next_pcs.
4717 * linux-arm-low.c (the_low_targets): Likewise.
4718 * linux-bfin-low.c (the_low_targets): Likewise.
4719 * linux-cris-low.c (the_low_targets): Likewise.
4720 * linux-crisv32-low.c (the_low_targets): Likewise.
4721 * linux-low.c (can_software_single_step): Likewise.
4722 (install_software_single_step_breakpoints): New function.
4723 (start_step_over): Use install_software_single_step_breakpoints.
4724 * linux-low.h: New CORE_ADDR vector.
4725 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4726 get_next_pcs.
4727 * linux-mips-low.c (the_low_targets): Likewise.
4728 * linux-nios2-low.c (the_low_targets): Likewise.
4729 * linux-sparc-low.c (the_low_targets): Likewise.
4730
4a6ed09b
PA
47312015-12-17 Pedro Alves <palves@redhat.com>
4732
4733 * linux-low.c (linux_kill_one_lwp): Remove references to
4734 LinuxThreads.
4735 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4736 to 'kill'.
4737 (linux_init_signals): Delete.
4738 (initialize_low): Adjust.
4739 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4740
7544db95
PA
47412015-12-16 Pedro Alves <palves@redhat.com>
4742
4743 * configure.ac (compiler warning flags): When testing a
4744 -Wno-foo option, check whether -Wfoo works instead.
4745 * configure: Regenerate.
4746
8020350c
DB
47472015-12-11 Don Breazeal <donb@codesourcery.com>
4748
4749 * server.c (process_serial_event): Don't exit from gdbserver
4750 in remote mode if there are still active inferiors.
4751
db91f502
YQ
47522015-12-11 Yao Qi <yao.qi@linaro.org>
4753
4754 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4755 arm_breakpoint_at if the process is 32-bit.
4756
b37a6290
YQ
47572015-12-11 Yao Qi <yao.qi@linaro.org>
4758
4759 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4760 arm breakpoint.
4761
17b1509a
YQ
47622015-12-07 Yao Qi <yao.qi@linaro.org>
4763
4764 * configure.srv: Append arm.o to srv_tgtobj for
4765 aarch64*-*-linux* target.
4766 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4767 from linux-arm-low.c.
4768 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4769 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4770 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4771 (thumb2_breakpoint_len): Likewise.
4772 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4773 (arm_breakpoint_kinds): Likewise.
4774 (arm_breakpoint_kind_from_pc): Likewise.
4775 (arm_sw_breakpoint_from_kind): Likewise.
4776 (arm_breakpoint_kind_from_current_state): Likewise.
4777 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4778 (arm_sw_breakpoint_from_kind): Declare.
4779 (arm_breakpoint_kind_from_current_state): Declare.
4780 (arm_breakpoint_at): Declare.
4781 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4782 arm_sw_breakpoint_from_kind if process is 32-bit.
4783 (aarch64_breakpoint_kind_from_pc): New function.
4784 (aarch64_breakpoint_kind_from_current_state): New function.
4785 (the_low_target): Initialize fields breakpoint_kind_from_pc
4786 and breakpoint_kind_from_current_state.
4787 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4788 linux-aarch32-low.c.
4789 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4790 (arm_breakpoint, arm_breakpoint_len): Likewise.
4791 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4792 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4793 (arm_is_thumb_mode): Likewise.
4794 (arm_breakpoint_at): Likewise.
4795 (arm_breakpoint_kind_from_pc): Likewise.
4796 (arm_sw_breakpoint_from_kind): Likewise.
4797 (arm_breakpoint_kind_from_current_state): Likewise.
4798
4799 Revert:
4800 2015-08-04 Yao Qi <yao.qi@linaro.org>
4801
4802 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4803 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4804 * server.c (extended_protocol): Remove "static".
4805 * server.h (extended_protocol): Declare it.
4806
ece66d65
JS
48072015-12-04 Josh Stone <jistone@redhat.com>
4808
4809 * target.h (struct target_ops) <arch_setup>: Rename to ...
4810 (struct target_ops) <post_create_inferior>: ... this.
4811 (target_arch_setup): Rename to ...
4812 (target_post_create_inferior): ... this, calling post_create_inferior.
4813 * server.c (start_inferior): Update target_arch_setup calls to
4814 target_post_create_inferior.
4815 * linux-low.c (linux_low_ptrace_options): Forward declare.
4816 (linux_arch_setup): Update its comment for general use.
4817 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4818 (struct linux_target_ops): Use linux_post_create_inferior.
4819 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4820 to post_create_inferior.
4821 * nto-low.c (struct nto_target_ops): Likewise.
4822 * spu-low.c (struct spu_target_ops): Likewise.
4823 * win32-low.c (struct win32_target_ops): Likewise.
4824
e58c48b4
AT
48252015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4826
4827 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4828
fbec8956
AT
48292015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4830
4831 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4832 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4833 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4834 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4835 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4836 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4837 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4838 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4839 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4840 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4841 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4842 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4843
9b4c5f87
AT
48442015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4845
4846 * linux-low.c (linux_look_up_symbols): Don't call
4847 linux_supports_traceclone.
4848 * linux-low.h (thread_db_init): Remove use_events argument.
4849 * thread-db.c (thread_db_use_event): Remove global variable.
4850 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4851 (struct thread_db) <td_create_bp>: Remove field.
4852 (thread_db_create_event): Remove function.
4853 (thread_db_enable_reporting): Likewise.
4854 (find_one_thread): Don't check for thread_db_use_events.
4855 (attach_thread): Likewise.
4856 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4857 (try_thread_db_load_1): Don't check for thread_db_use_events.
4858 (thread_db_init): Remove use_events argument and thread events
4859 handling.
4860 (remove_thread_event_breakpoints): Remove function.
4861 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4862
7d00775e
AT
48632015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4864
4865 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4866 New function.
4867 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4868 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4869 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4870 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4871 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4872 Initialize.
4873 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4874 New function.
4875 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4876 * linux-low.c (can_hardware_single_step): Use
4877 supports_hardware_single_step.
4878 (can_software_single_step): New function.
4879 (start_step_over): Call can_software_single_step.
4880 (linux_supports_hardware_single_step): New function.
4881 (struct target_ops) <supports_software_single_step>: Initialize.
4882 * linux-low.h (struct linux_target_ops)
4883 <supports_hardware_single_step>: Initialize.
4884 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4885 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4886 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4887 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4888 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4889 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4890 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4891 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4892 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4893 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4894 Initialize.
4895 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4896 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4897 Initialize.
4898 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4899 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4900 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4901 New function.
4902 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4903 * target.h (struct target_ops): <supports_software_single_step>:
4904 New field.
4905 (target_supports_software_single_step): New macro.
4906
2d97cd35
AT
49072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4908
4909 * linux-low.c (linux_wait_1): Fix pc advance condition.
4910 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4911 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4912
769ef81f
AT
49132015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4914
4915 * linux-arm-low.c (arm_is_thumb_mode): New function.
4916 (arm_breakpoint_at): Use arm_is_thumb_mode.
4917 (arm_breakpoint_kind_from_current_state): New function.
4918 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4919 Initialize.
4920 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4921 (linux_breakpoint_kind_from_current_state): New function.
4922 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4923 * linux-low.h (struct linux_target_ops)
4924 <breakpoint_kind_from_current_state>: New field.
4925 * target.h (struct target_ops): Likewise.
4926 (target_breakpoint_kind_from_current_state): New macro.
4927
1bebeeca
PA
49282015-11-30 Pedro Alves <palves@redhat.com>
4929
4930 * linux-low.c (linux_resume): Wake up the event loop before
4931 returning.
4932
a67a9fae
PA
49332015-11-30 Pedro Alves <palves@redhat.com>
4934
4935 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4936 check.
4937 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4938 to -1.
4939 * target.c (struct thread_search): New structure.
4940 (thread_search_callback): New function.
4941 (prev_general_thread): New global.
4942 (prepare_to_access_memory, done_accessing_memory): New functions.
4943 * target.h (prepare_to_access_memory, done_accessing_memory):
4944 Replace macros with function declarations.
4945
f2faf941
PA
49462015-11-30 Pedro Alves <palves@redhat.com>
4947
4948 PR 14618
4949 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4950 report TARGET_WAITKIND_NO_RESUMED.
4951 * remote-utils.c (prepare_resume_reply): Handle
4952 TARGET_WAITKIND_NO_RESUMED.
4953 * server.c (report_no_resumed): New global.
4954 (handle_query) <qSupported>: Handle "no-resumed+". Report
4955 "no-resumed+" support.
4956 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4957 return error if the client doesn't support no-resumed events.
4958 (push_stop_notification): New function.
4959 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4960 events if the client supports them.
4961
a681f9c9
PA
49622015-11-30 Pedro Alves <palves@redhat.com>
4963
4964 * linux-low.c (thread_still_has_status_pending_p): Don't check
4965 vCont;t here.
4966 (lwp_resumed): New function.
4967 (status_pending_p_callback): Return early if the LWP is not
4968 supposed to be resumed.
4969
65706a29
PA
49702015-11-30 Pedro Alves <palves@redhat.com>
4971
4972 * linux-low.c (handle_extended_wait): Assert that the LWP's
4973 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4974 thread create events, leave the new child's status pending.
4975 (linux_low_filter_event): If GDB wants to hear about thread exit
4976 events, leave the LWP marked dead and don't delete it.
4977 (linux_wait_for_event_filtered): Don't check for thread exit.
4978 (filter_exit_event): New function.
4979 (linux_wait_1): Use it, when returning an exit event.
4980 (linux_resume_one_lwp_throw): Assert that the LWP's
4981 waitstatus is TARGET_WAITKIND_IGNORE.
4982 * remote-utils.c (prepare_resume_reply): Handle
4983 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4984 * server.c (report_thread_events): New global.
4985 (handle_general_set): Handle QThreadEvents.
4986 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4987 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4988 TARGET_WAITKIND_THREAD_EXITED.
4989 * server.h (report_thread_events): Declare.
4990
56cf4bed
PA
49912015-11-30 Pedro Alves <palves@redhat.com>
4992
4993 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4994 the thread's last_resume_kind was resume_stop.
4995
500c1d85
PA
49962015-11-30 Pedro Alves <palves@redhat.com>
4997
4998 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4999 before returning.
5000
de979965
PA
50012015-11-30 Pedro Alves <palves@redhat.com>
5002
5003 * server.c (handle_v_requests): Handle vCtrlC.
5004
34c65914
PA
50052015-11-30 Pedro Alves <palves@redhat.com>
5006
5007 * gdbthread.h (find_any_thread_of_pid): Declare.
5008 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5009 functions.
5010 * server.c (handle_query): If current_thread is NULL, look for
5011 another thread of the selected process.
5012
79efa585 50132015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5014 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5015
5016 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5017 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5018 name in reply.
5019 * target.h (struct target_ops) <thread_name>: New field.
5020 (target_thread_name): New macro.
5021
80d82c19
JB
50222015-11-23 Joel Brobecker <brobecker@adacore.com>
5023
5024 * regcache.h (regcache_invalidate_pid): Add declaration.
5025 * regcache.c (regcache_invalidate_pid): New function, extracted
5026 from regcache_invalidate.
5027 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5028 Add trivial documentation comment.
5029 * lynx-low.c: Use regcache_invalidate_pid instead of
5030 regcache_invalidate.
5031
64da5dd5
JB
50322015-11-23 Joel Brobecker <brobecker@adacore.com>
5033
5034 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5035 and Elf64_auxv_t if the target is Android.
5036
37ce4055
DE
50372015-11-22 Doug Evans <xdje42@gmail.com>
5038
5039 * target.h: #include <sys/types.h>.
5040
06e03fff
PA
50412015-11-19 Pedro Alves <palves@redhat.com>
5042
5043 * linux-low.c (linux_process_qsupported): Change prototype.
5044 Adjust.
5045 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5046 Change prototype.
5047 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5048 and adjust to loop over all features.
5049 * server.c (handle_query) <qSupported>: Adjust to call
5050 target_process_qsupported once, passing it a vector of unprocessed
5051 features.
5052 * target.h (struct target_ops) <process_qsupported>: Change
5053 prototype.
5054 (target_process_qsupported): Adjust.
5055
9a084706
PA
50562015-11-19 Pedro Alves <palves@redhat.com>
5057
5058 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5059 mode.
5060 * configure: Regenerate.
5061
dad44a1f
PA
50622015-11-19 Pedro Alves <palves@redhat.com>
5063
5064 * configure: Regenerate.
5065
231c0592
YQ
50662015-11-19 Yao Qi <yao.qi@linaro.org>
5067
5068 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5069 type to uint32_t.
5070
6c1c9a8b
YQ
50712015-11-19 Yao Qi <yao.qi@linaro.org>
5072
5073 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5074 (struct aarch64_operand): Move enum out.
5075
9caa3311
YQ
50762015-11-19 Yao Qi <yao.qi@linaro.org>
5077
5078 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5079 struct user_fpsimd_state *.
5080 (aarch64_store_fpregset): Likewise.
5081
6a69a054
YQ
50822015-11-19 Yao Qi <yao.qi@linaro.org>
5083
5084 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5085 struct user_pt_regs *.
5086 (aarch64_store_gregset): Likewise.
5087
1798301e
PA
50882015-11-18 Pedro Alves <palves@redhat.com>
5089
5090 * Makefile.in (all_object_files): Add $IPA_OBJS.
5091
ce7715e2
PA
50922015-11-17 Pedro Alves <palves@redhat.com>
5093
5094 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5095 GDB_SIGNAL_0 and gdb_signal_to_string.
5096
c0879059
PA
50972015-11-17 Pedro Alves <palves@redhat.com>
5098
5099 * win32-low.c (handle_output_debug_string): Remove parameter.
5100 (win32_kill): Remove our_status local and adjust call to
5101 handle_output_debug_string.
5102 (get_child_debug_event): Adjust call to
5103 handle_output_debug_string.
5104
1996e237
SM
51052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5106
5107 * linux-mips-low.c (mips_fill_gregset): Add cast.
5108 (mips_store_gregset): Likewise.
5109 (mips_fill_fpregset): Likewise.
5110 (mips_store_fpregset): Likewise.
5111
cbec665b
SM
51122015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5113
5114 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5115 priv.
5116
eb3e3c67
SM
51172015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5118
5119 * linux-mips-low.c (mips_linux_new_thread): Change type of
5120 watch_type to enum target_hw_bp_type.
5121
171de4b8
SM
51222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5123
5124 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5125 Change return type to arm_hwbp_type.
5126
04248ead
SM
51272015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5128
5129 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5130 (arm_store_gregset): Likewise.
5131 * linux-arm-low.c (arm_get_hwcap): Likewise.
5132 (arm_read_description): Likewise.
5133
04b3479c
SM
51342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5135
5136 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5137
2bc84e8a
SM
51382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5139
5140 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5141 (ppc_fill_vsxregset): Likewise.
5142 (ppc_store_vsxregset): Likewise.
5143 (ppc_fill_vrregset): Likewise.
5144 (ppc_store_vrregset): Likewise.
5145 (ppc_fill_evrregset): Likewise.
5146 (ppc_store_evrregset): Likewise.
5147
e6c5bb05
SM
51482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5149
5150 * linux-ppc-low.c (ppc_usrregs_info): Remove
5151 forward-declaration.
5152 (ppc_arch_setup): Move lower in file.
5153
7ea45d72
SM
51542015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5155
5156 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5157 (ps_pdwrite): Likewise.
5158
69291610
HW
51592015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5160
5161 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5162 to after assert checks.
5163
b42945fd
SM
51642015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5165
5166 * proc-service.c (ps_pdread): Add/adjust casts.
5167 (ps_pdwrite): Add/adjust casts.
5168
d6f85c84
SM
51692015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5170
5171 * server.c (handle_search_memory_1): Cast return value of
5172 memmem.
5173
f98cd059
SM
51742015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5175
5176 * server.c (write_qxfer_response): Change type of data to
5177 gdb_byte *.
5178
d2412fa5
PA
51792015-10-29 Pedro Alves <palves@redhat.com>
5180
5181 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5182
c17414a2
PA
51832015-10-29 Pedro Alves <palves@redhat.com>
5184
5185 * tracepoint.c (clear_installed_tracepoints): Add casts.
5186
e053fbc4
PA
51872015-10-29 Pedro Alves <palves@redhat.com>
5188
5189 * server.c (handle_v_cont, process_serial_event): Add enum
5190 gdb_signal casts to signal parsing code.
5191
add67df8
PA
51922015-10-29 Pedro Alves <palves@redhat.com>
5193
5194 * linux-low.h (NULL_REGSET): Define.
5195 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5196 * linux-arm-low.c (arm_regsets): Likewise.
5197 * linux-crisv32-low.c (cris_regsets): Likewise.
5198 * linux-m68k-low.c (m68k_regsets): Likewise.
5199 * linux-mips-low.c (mips_regsets): Likewise.
5200 * linux-nios2-low.c (nios2_regsets): Likewise.
5201 * linux-ppc-low.c (ppc_regsets): Likewise.
5202 * linux-s390-low.c (s390_regsets): Likewise.
5203 * linux-sh-low.c (sh_regsets): Likewise.
5204 * linux-sparc-low.c (sparc_regsets): Likewise.
5205 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5206 * linux-tile-low.c (tile_regsets): Likewise.
5207 * linux-x86-low.c (x86_regsets): Likewise.
5208 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5209
50bc912a
PA
52102015-10-29 Pedro Alves <palves@redhat.com>
5211
5212 * linux-low.h (NULL_REGSET): Define.
5213 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5214 * linux-arm-low.c (arm_regsets): Likewise.
5215 * linux-crisv32-low.c (cris_regsets): Likewise.
5216 * linux-m68k-low.c (m68k_regsets): Likewise.
5217 * linux-mips-low.c (mips_regsets): Likewise.
5218 * linux-nios2-low.c (nios2_regsets): Likewise.
5219 * linux-ppc-low.c (ppc_regsets): Likewise.
5220 * linux-s390-low.c (s390_regsets): Likewise.
5221 * linux-sh-low.c (sh_regsets): Likewise.
5222 * linux-sparc-low.c (sparc_regsets): Likewise.
5223 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5224 * linux-tile-low.c (tile_regsets): Likewise.
5225 * linux-x86-low.c (x86_regsets): Likewise.
5226 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5227
682b2546
DE
52282015-10-26 Doug Evans <dje@google.com>
5229
5230 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5231
963843d4
DE
52322015-10-26 Doug Evans <dje@google.com>
5233
5234 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5235
d41401ac
DE
52362015-10-26 Doug Evans <dje@google.com>
5237
5238 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5239 for debug_printf.
5240 (attach_thread, find_new_threads_callback): Ditto.
5241
3db28855
AT
52422015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5243
5244 * mem-break.h (set_breakpoint_data): Remove.
5245
fb78e89c
AT
52462015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5247
5248 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5249 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5250 (initialize_low): Remove set_breakpoint_data call.
5251 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5252 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5253 (initialize_low): Remove set_breakpoint_data call.
5254 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5255 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5256 (initialize_low): Remove set_breakpoint_data call.
5257
2e6ee069
AT
52582015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5259
5260 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5261 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5262 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5263 * target.h (target_breakpoint_kind_from_pc): New macro.
5264
1652a986
AT
52652015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5266
5267 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5268 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5269 the default breakpoint kind.
5270
abeead09
AT
52712015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5272
5273 * linux-arm-low.c (arm_supports_z_point_type): Add software
5274 breakpoint support.
5275
b0b4b501
AT
52762015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5277
5278 * linux-arm-low.c: Refactor breakpoint definitions.
5279 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5280 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5281
8689682c
AT
52822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5283
5284 * Makefile.in: Add arm.c/o.
5285 * configure.srv: Likewise.
5286 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5287 (arm_breakpoint_kind_from_pc): New function.
5288 (arm_sw_breakpoint_from_kind): Return proper kind.
5289 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5290
27165294
AT
52912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5292
5293 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5294 removal.
5295 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5296 (struct raw_breakpoint) <size>: Remove.
5297 (struct raw_breakpoint) <kind>: Add.
5298 (bp_size): New function.
5299 (bp_opcode): Likewise.
5300 (find_raw_breakpoint_at): Adjust for kind.
5301 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5302 (remove_memory_breakpoint): Adjust for kind call bp_size.
5303 (set_raw_breakpoint_at): Adjust for kind.
5304 (set_breakpoint): Likewise.
5305 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5306 (delete_raw_breakpoint): Adjust for kind.
5307 (delete_breakpoint): Likewise.
5308 (find_gdb_breakpoint): Likewise.
5309 (set_gdb_breakpoint_1): Likewise.
5310 (set_gdb_breakpoint): Likewise.
5311 (delete_gdb_breakpoint_1): Likewise.
5312 (delete_gdb_breakpoint): Likewise.
5313 (uninsert_raw_breakpoint): Likewise.
5314 (reinsert_raw_breakpoint): Likewise.
5315 (set_breakpoint_data): Remove.
5316 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5317 (check_mem_read): Adjust for kind call bp_size.
5318 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5319 (clone_one_breakpoint): Adjust for kind.
5320 * mem-break.h (set_gdb_breakpoint): Likewise.
5321 (delete_gdb_breakpoint): Likewise.
5322 * server.c (process_serial_event): Likewise.
5323
dd373349
AT
53242015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5325
5326 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5327 (struct linux_target_ops) <breakpoint>: Remove.
5328 (struct linux_target_ops) <breakpoint_len>: Remove.
5329 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5330 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5331 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5332 (arm_sw_breakpoint_from_kind): New function.
5333 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5334 (struct linux_target_ops) <breakpoint>: Remove.
5335 (struct linux_target_ops) <breakpoint_len>: Remove.
5336 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5337 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5338 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5339 (struct linux_target_ops) <breakpoint>: Remove.
5340 (struct linux_target_ops) <breakpoint_len>: Remove.
5341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5342 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5343 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5344 (struct linux_target_ops) <breakpoint>: Remove.
5345 (struct linux_target_ops) <breakpoint_len>: Remove.
5346 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5347 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5348 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5349 and sw_breakpoint_from_kind to increment the pc.
5350 (linux_breakpoint_kind_from_pc): New function.
5351 (linux_sw_breakpoint_from_kind): New function.
5352 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5353 (initialize_low): Call breakpoint_kind_from_pc and
5354 sw_breakpoint_from_kind to replace breakpoint_data/len.
5355 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5356 New field.
5357 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5358 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5359 (struct linux_target_ops) <breakpoint>: Remove.
5360 (struct linux_target_ops) <breakpoint_len>: Remove.
5361 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5362 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5363 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5364 (struct linux_target_ops) <breakpoint>: Remove.
5365 (struct linux_target_ops) <breakpoint_len>: Remove.
5366 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5367 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5368 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5369 (struct linux_target_ops) <breakpoint>: Remove.
5370 (struct linux_target_ops) <breakpoint_len>: Remove.
5371 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5372 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5373 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5374 (struct linux_target_ops) <breakpoint>: Remove.
5375 (struct linux_target_ops) <breakpoint_len>: Remove.
5376 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5377 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5378 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5379 (struct linux_target_ops) <breakpoint>: Remove.
5380 (struct linux_target_ops) <breakpoint_len>: Remove.
5381 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5382 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5383 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5384 (struct linux_target_ops) <breakpoint>: Remove.
5385 (struct linux_target_ops) <breakpoint_len>: Remove.
5386 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5387 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5388 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5389 (struct linux_target_ops) <breakpoint>: Remove.
5390 (struct linux_target_ops) <breakpoint_len>: Remove.
5391 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5392 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5393 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5394 (struct linux_target_ops) <breakpoint>: Remove.
5395 (struct linux_target_ops) <breakpoint_len>: Remove.
5396 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5397 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5398 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5399 (struct linux_target_ops) <breakpoint>: Remove.
5400 (struct linux_target_ops) <breakpoint_len>: Remove.
5401 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5402 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5403 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5404 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5405 (struct linux_target_ops) <breakpoint>: Remove.
5406 (struct linux_target_ops) <breakpoint_len>: Remove.
5407 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5408 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5409 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5410 (struct linux_target_ops) <breakpoint>: Remove.
5411 (struct linux_target_ops) <breakpoint_len>: Remove.
5412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5414
4cd98a19
AT
54152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5416
5417 * linux-cris-low.c (cris_get_pc): Remove void arg.
5418
774ee6d2
AR
54192015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5420
5421 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5422 variable name.
5423
833dcd29
AR
54242015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5425
5426 * inferiors.c (thread_pid_matches_callback): New function.
5427 (find_thread_process): New function.
5428 (remove_thread): Reset current_thread.
5429 (remove_process): Assert threads have been removed first.
5430
8d689ee5
YQ
54312015-10-15 Yao Qi <yao.qi@linaro.org>
5432
5433 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5434 if it is 3.
5435 (aarch64_remove_point): Likewise.
5436 * regcache.c (regcache_register_size): New function.
5437
1c2e1515
YQ
54382015-10-12 Yao Qi <yao.qi@linaro.org>
5439
5440 * linux-aarch64-low.c: Update all callers as emit_load_store
5441 is renamed to aarch64_emit_load_store.
5442
e1c587c3
YQ
54432015-10-12 Yao Qi <yao.qi@linaro.org>
5444
5445 * linux-aarch64-low.c: Update all callers of function renaming
5446 from emit_insn to aarch64_emit_insn.
5447
b6542f81
YQ
54482015-10-12 Yao Qi <yao.qi@linaro.org>
5449
5450 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5451 arch/aarch64-insn.h.
5452 (struct aarch64_memory_operand): Likewise.
5453 (ENCODE): Likewise.
5454 (emit_insn): Move to arch/aarch64-insn.c.
5455 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5456 (emit_load_store): Move to arch/aarch64-insn.c.
5457 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5458 (can_encode_int32): Remove.
5459
246994ce
YQ
54602015-10-12 Yao Qi <yao.qi@linaro.org>
5461
5462 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5463 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5464 (aarch64_relocate_instruction): Likewise.
5465 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5466 (struct aarch64_insn_visitor): Likewise.
5467
0badd99f
YQ
54682015-10-12 Yao Qi <yao.qi@linaro.org>
5469
5470 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5471 (struct aarch64_insn_visitor): New.
5472 (struct aarch64_insn_relocation_data): New.
5473 (aarch64_ftrace_insn_reloc_b): New function.
5474 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5475 (aarch64_ftrace_insn_reloc_cb): Likewise.
5476 (aarch64_ftrace_insn_reloc_tb): Likewise.
5477 (aarch64_ftrace_insn_reloc_adr): Likewise.
5478 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5479 (aarch64_ftrace_insn_reloc_others): Likewise.
5480 (visitor): New.
5481 (aarch64_relocate_instruction): Use visitor.
5482
dfaffe9d
YQ
54832015-10-12 Yao Qi <yao.qi@linaro.org>
5484
5485 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5486 int. Add argument buf.
5487 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5488 aarch64_relocate_instruction.
5489
70b439f0
YQ
54902015-10-12 Yao Qi <yao.qi@linaro.org>
5491
5492 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5493 argument insn. Remove local variable insn. Don't call
5494 target_read_uint32.
5495 (aarch64_install_fast_tracepoint_jump_pad): Call
5496 target_read_uint32.
5497
7781c06f
YQ
54982015-09-30 Yao Qi <yao.qi@linaro.org>
5499
5500 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5501 (emit_load_store_pair): Likewise.
5502
9a3c8263
SM
55032015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5504
5505 * dll.c (match_dll): Add cast(s).
5506 (unloaded_dll): Likewise.
5507 * linux-low.c (second_thread_of_pid_p): Likewise.
5508 (delete_lwp_callback): Likewise.
5509 (count_events_callback): Likewise.
5510 (select_event_lwp_callback): Likewise.
5511 (linux_set_resume_request): Likewise.
5512 * server.c (accumulate_file_name_length): Likewise.
5513 (emit_dll_description): Likewise.
5514 (handle_qxfer_threads_worker): Likewise.
5515 (visit_actioned_threads): Likewise.
5516 * thread-db.c (any_thread_of): Likewise.
5517 * tracepoint.c (same_process_p): Likewise.
5518 (match_blocktype): Likewise.
5519 (build_traceframe_info_xml): Likewise.
5520
224c3ddb
SM
55212015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5522
5523 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5524 assignment.
5525 (gdb_unparse_agent_expr): Likewise.
5526 * hostio.c (require_data): Likewise.
5527 (handle_pread): Likewise.
5528 * linux-low.c (disable_regset): Likewise.
5529 (fetch_register): Likewise.
5530 (store_register): Likewise.
5531 (get_dynamic): Likewise.
5532 (linux_qxfer_libraries_svr4): Likewise.
5533 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5534 (set_fast_tracepoint_jump): Likewise.
5535 (uninsert_fast_tracepoint_jumps_at): Likewise.
5536 (reinsert_fast_tracepoint_jumps_at): Likewise.
5537 (validate_inserted_breakpoint): Likewise.
5538 (clone_agent_expr): Likewise.
5539 * regcache.c (init_register_cache): Likewise.
5540 * remote-utils.c (putpkt_binary_1): Likewise.
5541 (decode_M_packet): Likewise.
5542 (decode_X_packet): Likewise.
5543 (look_up_one_symbol): Likewise.
5544 (relocate_instruction): Likewise.
5545 (monitor_output): Likewise.
5546 * server.c (handle_search_memory): Likewise.
5547 (handle_qxfer_exec_file): Likewise.
5548 (handle_qxfer_libraries): Likewise.
5549 (handle_qxfer): Likewise.
5550 (handle_query): Likewise.
5551 (handle_v_cont): Likewise.
5552 (handle_v_run): Likewise.
5553 (captured_main): Likewise.
5554 * target.c (write_inferior_memory): Likewise.
5555 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5556 * tracepoint.c (init_trace_buffer): Likewise.
5557 (add_tracepoint_action): Likewise.
5558 (add_traceframe): Likewise.
5559 (add_traceframe_block): Likewise.
5560 (cmd_qtdpsrc): Likewise.
5561 (cmd_qtdv): Likewise.
5562 (cmd_qtstatus): Likewise.
5563 (response_source): Likewise.
5564 (response_tsv): Likewise.
5565 (cmd_qtnotes): Likewise.
5566 (gdb_collect): Likewise.
5567 (initialize_tracepoint): Likewise.
5568
afbe19f8
PL
55692015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5570
5571 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5572 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5573 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5574 <NOP>: New.
5575 (enum aarch64_condition_codes): New enum.
5576 (w0): New static global.
5577 (fp): Likewise.
5578 (lr): Likewise.
5579 (struct aarch64_memory_operand) <type>: New
5580 MEMORY_OPERAND_POSTINDEX type.
5581 (postindex_memory_operand): New helper function.
5582 (emit_ret): New function.
5583 (emit_load_store_pair): New function, factored out of emit_stp
5584 with support for MEMORY_OPERAND_POSTINDEX.
5585 (emit_stp): Rewrite using emit_load_store_pair.
5586 (emit_ldp): New function.
5587 (emit_load_store): Likewise.
5588 (emit_ldr): Mention post-index instruction in comment.
5589 (emit_ldrh): New function.
5590 (emit_ldrb): New function.
5591 (emit_ldrsw): Mention post-index instruction in comment.
5592 (emit_str): Likewise.
5593 (emit_subs): New function.
5594 (emit_cmp): Likewise.
5595 (emit_and): Likewise.
5596 (emit_orr): Likewise.
5597 (emit_orn): Likewise.
5598 (emit_eor): Likewise.
5599 (emit_mvn): Likewise.
5600 (emit_lslv): Likewise.
5601 (emit_lsrv): Likewise.
5602 (emit_asrv): Likewise.
5603 (emit_mul): Likewise.
5604 (emit_sbfm): Likewise.
5605 (emit_sbfx): Likewise.
5606 (emit_ubfm): Likewise.
5607 (emit_ubfx): Likewise.
5608 (emit_csinc): Likewise.
5609 (emit_cset): Likewise.
5610 (emit_nop): Likewise.
5611 (emit_ops_insns): New helper function.
5612 (emit_pop): Likewise.
5613 (emit_push): Likewise.
5614 (aarch64_emit_prologue): New function.
5615 (aarch64_emit_epilogue): Likewise.
5616 (aarch64_emit_add): Likewise.
5617 (aarch64_emit_sub): Likewise.
5618 (aarch64_emit_mul): Likewise.
5619 (aarch64_emit_lsh): Likewise.
5620 (aarch64_emit_rsh_signed): Likewise.
5621 (aarch64_emit_rsh_unsigned): Likewise.
5622 (aarch64_emit_ext): Likewise.
5623 (aarch64_emit_log_not): Likewise.
5624 (aarch64_emit_bit_and): Likewise.
5625 (aarch64_emit_bit_or): Likewise.
5626 (aarch64_emit_bit_xor): Likewise.
5627 (aarch64_emit_bit_not): Likewise.
5628 (aarch64_emit_equal): Likewise.
5629 (aarch64_emit_less_signed): Likewise.
5630 (aarch64_emit_less_unsigned): Likewise.
5631 (aarch64_emit_ref): Likewise.
5632 (aarch64_emit_if_goto): Likewise.
5633 (aarch64_emit_goto): Likewise.
5634 (aarch64_write_goto_address): Likewise.
5635 (aarch64_emit_const): Likewise.
5636 (aarch64_emit_call): Likewise.
5637 (aarch64_emit_reg): Likewise.
5638 (aarch64_emit_pop): Likewise.
5639 (aarch64_emit_stack_flush): Likewise.
5640 (aarch64_emit_zero_ext): Likewise.
5641 (aarch64_emit_swap): Likewise.
5642 (aarch64_emit_stack_adjust): Likewise.
5643 (aarch64_emit_int_call_1): Likewise.
5644 (aarch64_emit_void_call_2): Likewise.
5645 (aarch64_emit_eq_goto): Likewise.
5646 (aarch64_emit_ne_goto): Likewise.
5647 (aarch64_emit_lt_goto): Likewise.
5648 (aarch64_emit_le_goto): Likewise.
5649 (aarch64_emit_gt_goto): Likewise.
5650 (aarch64_emit_ge_got): Likewise.
5651 (aarch64_emit_ops_impl): New static global variable.
5652 (aarch64_emit_ops): New target function, return
5653 &aarch64_emit_ops_impl.
5654 (struct linux_target_ops): Install it.
5655
bb903df0
PL
56562015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5657
5658 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5659 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5660 aarch64-ipa.o.
5661 * linux-aarch64-ipa.c: New file.
5662 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5663 and endian.h.
5664 (aarch64_get_thread_area): New target method.
5665 (extract_signed_bitfield): New helper function.
5666 (aarch64_decode_ldr_literal): New function.
5667 (enum aarch64_opcodes): New enum.
5668 (struct aarch64_register): New struct.
5669 (struct aarch64_operand): New struct.
5670 (x0): New static global.
5671 (x1): Likewise.
5672 (x2): Likewise.
5673 (x3): Likewise.
5674 (x4): Likewise.
5675 (w2): Likewise.
5676 (ip0): Likewise.
5677 (sp): Likewise.
5678 (xzr): Likewise.
5679 (aarch64_register): New helper function.
5680 (register_operand): Likewise.
5681 (immediate_operand): Likewise.
5682 (struct aarch64_memory_operand): New struct.
5683 (offset_memory_operand): New helper function.
5684 (preindex_memory_operand): Likewise.
5685 (enum aarch64_system_control_registers): New enum.
5686 (ENCODE): New macro.
5687 (emit_insn): New helper function.
5688 (emit_b): New function.
5689 (emit_bcond): Likewise.
5690 (emit_cb): Likewise.
5691 (emit_tb): Likewise.
5692 (emit_blr): Likewise.
5693 (emit_stp): Likewise.
5694 (emit_ldp_q_offset): Likewise.
5695 (emit_stp_q_offset): Likewise.
5696 (emit_load_store): Likewise.
5697 (emit_ldr): Likewise.
5698 (emit_ldrsw): Likewise.
5699 (emit_str): Likewise.
5700 (emit_ldaxr): Likewise.
5701 (emit_stxr): Likewise.
5702 (emit_stlr): Likewise.
5703 (emit_data_processing_reg): Likewise.
5704 (emit_data_processing): Likewise.
5705 (emit_add): Likewise.
5706 (emit_sub): Likewise.
5707 (emit_mov): Likewise.
5708 (emit_movk): Likewise.
5709 (emit_mov_addr): Likewise.
5710 (emit_mrs): Likewise.
5711 (emit_msr): Likewise.
5712 (emit_sevl): Likewise.
5713 (emit_wfe): Likewise.
5714 (append_insns): Likewise.
5715 (can_encode_int32_in): New helper function.
5716 (aarch64_relocate_instruction): New function.
5717 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5718 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5719 (struct linux_target_ops): Install aarch64_get_thread_area,
5720 aarch64_install_fast_tracepoint_jump_pad and
5721 aarch64_get_min_fast_tracepoint_insn_len.
5722
787749ea
PL
57232015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5724
5725 * Makefile.in (aarch64-insn.o): New rule.
5726 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5727
9812b2e6
YQ
57282015-09-21 Yao Qi <yao.qi@linaro.org>
5729
5730 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5731
18fe412b
YQ
57322015-09-21 Yao Qi <yao.qi@linaro.org>
5733
5734 * tracepoint.c (max_jump_pad_size): Remove.
5735
a0cc84cd
YQ
57362015-09-18 Yao Qi <yao.qi@linaro.org>
5737
5738 * linux-aarch64-low.c: Don't include sys/uio.h.
5739 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5740
d78908cf
WW
57412015-09-16 Wei-cheng Wang <cole945@gmail.com>
5742
5743 * tracepoint.c (eval_result_type): Change prototype.
5744 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5745
d57e0d50
PA
57462015-09-15 Pedro Alves <palves@redhat.com>
5747
5748 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5749 Check whether to report exec events instead of checking whether
5750 multiprocess is enabled.
5751
5a676acc
PA
57522015-09-15 Pedro Alves <palves@redhat.com>
5753
5754 PR remote/18965
5755 * remote-utils.c (prepare_resume_reply): Merge
5756 TARGET_WAITKIND_VFORK_DONE switch case with the
5757 TARGET_WAITKIND_FORKED case.
5758
7c5d0fad
YQ
57592015-09-15 Yao Qi <yao.qi@linaro.org>
5760
5761 * server.c (handle_query): Check string comparison using
5762 "else if" instead of "if".
5763
750ce8d1
YQ
57642015-09-15 Yao Qi <yao.qi@linaro.org>
5765
5766 * server.c (vCont_supported): New global variable.
5767 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5768 matches. Append ";vContSupported+" to own_buf.
5769 (handle_v_requests): Append ";s;S" to own_buf if target supports
5770 hardware single step or vCont_supported is false.
5771 (capture_main): Set vCont_supported to zero.
5772
70b90b91
YQ
57732015-09-15 Yao Qi <yao.qi@linaro.org>
5774
5775 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5776 it to ...
5777 (linux_supports_hardware_single_step): ... New function.
5778 (linux_target_ops): Update.
5779 * lynx-low.c (lynx_target_ops): Set field
5780 supports_hardware_single_step to target_can_do_hardware_single_step.
5781 * nto-low.c (nto_target_ops): Likewise.
5782 * spu-low.c (spu_target_ops): Likewise.
5783 * win32-low.c (win32_target_ops): Likewise.
5784 * target.c (target_can_do_hardware_single_step): New function.
5785 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5786 Remove. <supports_hardware_single_step>: New field.
5787 (target_supports_conditional_breakpoints): Remove.
5788 (target_supports_hardware_single_step): New macro.
5789 (target_can_do_hardware_single_step): Declare.
5790 * server.c (handle_query): Use target_supports_hardware_single_step
5791 instead of target_supports_conditional_breakpoints.
5792
ade90bde
YQ
57932015-09-15 Yao Qi <yao.qi@linaro.org>
5794
5795 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5796 function.
5797 (struct linux_target_ops the_low_target): Install
5798 aarch64_linux_siginfo_fixup.
5799
94585166
DB
58002015-09-11 Don Breazeal <donb@codesourcery.com>
5801 Luis Machado <lgustavo@codesourcery.com>
5802
5803 * linux-low.c (linux_mourn): Static declaration.
5804 (linux_arch_setup): Move in front of
5805 handle_extended_wait.
5806 (linux_arch_setup_thread): New function.
5807 (handle_extended_wait): Handle exec events. Call
5808 linux_arch_setup_thread. Make event_lwp argument a
5809 pointer-to-a-pointer.
5810 (check_zombie_leaders): Do not check stopped threads.
5811 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5812 (linux_low_filter_event): Add lwp and thread for exec'ing
5813 non-leader thread if leader thread has been deleted.
5814 Refactor code into linux_arch_setup_thread and call it.
5815 Pass child lwp pointer by reference to handle_extended_wait.
5816 (linux_wait_for_event_filtered): Update comment.
5817 (linux_wait_1): Prevent clobbering exec event status.
5818 (linux_supports_exec_events): New function.
5819 (linux_target_ops) <supports_exec_events>: Initialize new member.
5820 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5821 new member.
5822 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5823 * server.c (report_exec_events): New global variable.
5824 (handle_query): Handle qSupported query for exec-events feature.
5825 (captured_main): Initialize report_exec_events.
5826 * server.h (report_exec_events): Declare new global variable.
5827 * target.h (struct target_ops) <supports_exec_events>: New
5828 member.
5829 (target_supports_exec_events): New macro.
5830 * win32-low.c (win32_target_ops) <supports_exec_events>:
5831 Initialize new member.
5832
0568462b
MM
58332015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5834
5835 * linux-low.c (linux_low_enable_btrace): Remove.
5836 (linux_target_ops): Replace linux_low_enable_btrace with
5837 linux_enable_btrace.
5838
39edd165
YQ
58392015-09-03 Yao Qi <yao.qi@linaro.org>
5840
5841 * linux-aarch64-low.c (aarch64_insert_point): Call
5842 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5843 returns true.
5844
1db33b5a
UW
58452015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5846
5847 * linux-low.c (check_stopped_by_breakpoint): Use
5848 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5849
ab290430
PA
58502015-08-27 Pedro Alves <palves@redhat.com>
5851
5852 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5853
8d749320
SM
58542015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5855
6711b7f8
SM
5856 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5857 the XNEW-family equivalent.
8d749320
SM
5858 (compile_bytecodes): Likewise.
5859 * dll.c (loaded_dll): Likewise.
5860 * event-loop.c (append_callback_event): Likewise.
5861 (create_file_handler): Likewise.
5862 (create_file_event): Likewise.
5863 * hostio.c (handle_open): Likewise.
5864 * inferiors.c (add_thread): Likewise.
5865 (add_process): Likewise.
5866 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5867 * linux-arm-low.c (arm_new_process): Likewise.
5868 (arm_new_thread): Likewise.
5869 * linux-low.c (add_to_pid_list): Likewise.
5870 (linux_add_process): Likewise.
5871 (handle_extended_wait): Likewise.
5872 (add_lwp): Likewise.
5873 (enqueue_one_deferred_signal): Likewise.
5874 (enqueue_pending_signal): Likewise.
5875 (linux_resume_one_lwp_throw): Likewise.
5876 (linux_resume_one_thread): Likewise.
5877 (linux_read_memory): Likewise.
5878 (linux_write_memory): Likewise.
5879 * linux-mips-low.c (mips_linux_new_process): Likewise.
5880 (mips_linux_new_thread): Likewise.
5881 (mips_add_watchpoint): Likewise.
5882 * linux-x86-low.c (initialize_low_arch): Likewise.
5883 * lynx-low.c (lynx_add_process): Likewise.
5884 * mem-break.c (set_raw_breakpoint_at): Likewise.
5885 (set_breakpoint): Likewise.
5886 (add_condition_to_breakpoint): Likewise.
5887 (add_commands_to_breakpoint): Likewise.
5888 (clone_agent_expr): Likewise.
5889 (clone_one_breakpoint): Likewise.
5890 * regcache.c (new_register_cache): Likewise.
5891 * remote-utils.c (look_up_one_symbol): Likewise.
5892 * server.c (queue_stop_reply): Likewise.
5893 (start_inferior): Likewise.
5894 (queue_stop_reply_callback): Likewise.
5895 (handle_target_event): Likewise.
5896 * spu-low.c (fetch_ppc_memory): Likewise.
5897 (store_ppc_memory): Likewise.
5898 * target.c (set_target_ops): Likewise.
5899 * thread-db.c (thread_db_load_search): Likewise.
5900 (try_thread_db_load_1): Likewise.
5901 * tracepoint.c (add_tracepoint): Likewise.
5902 (add_tracepoint_action): Likewise.
5903 (create_trace_state_variable): Likewise.
5904 (cmd_qtdpsrc): Likewise.
5905 (cmd_qtro): Likewise.
5906 (add_while_stepping_state): Likewise.
5907 * win32-low.c (child_add_thread): Likewise.
5908 (get_image_name): Likewise.
5909
ed8b7b42
YQ
59102015-08-25 Yao Qi <yao.qi@linaro.org>
5911
5912 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5913
db3cb7cb
YQ
59142015-08-25 Yao Qi <yao.qi@linaro.org>
5915
5916 * Makefile.in (aarch64-linux.o): New rule.
5917 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5918 srv_tgtobj.
5919 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5920 (aarch64_init_debug_reg_state): Make it extern.
5921 (aarch64_linux_prepare_to_resume): Remove.
5922
f6011a1c
YQ
59232015-08-25 Yao Qi <yao.qi@linaro.org>
5924
5925 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5926 lwp_arch_private_info and ptid_of_lwp.
5927
88e2cf7e
YQ
59282015-08-25 Yao Qi <yao.qi@linaro.org>
5929
5930 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5931 Find proc_info by find_process_pid. All callers updated.
5932
5e35436e
YQ
59332015-08-25 Yao Qi <yao.qi@linaro.org>
5934
5935 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5936 Remove.
5937 (debug_reg_change_callback): Remove.
5938 (aarch64_notify_debug_reg_change): Remove.
5939
4a8a7965
YQ
59402015-08-25 Yao Qi <yao.qi@linaro.org>
5941
5942 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5943 Call current_lwp_ptid.
5944
32a271ee
YQ
59452015-08-25 Yao Qi <yao.qi@linaro.org>
5946
5947 * linux-aarch64-low.c (debug_reg_change_callback): Use
5948 debug_printf.
5949
0d51c8d7
YQ
59502015-08-25 Yao Qi <yao.qi@linaro.org>
5951
5952 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5953
31a43dd5
YQ
59542015-08-25 Yao Qi <yao.qi@linaro.org>
5955
5956 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5957
8ee52567
YQ
59582015-08-25 Yao Qi <yao.qi@linaro.org>
5959
5960 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5961 the code.
5962
ff3f0f45
YQ
59632015-08-25 Yao Qi <yao.qi@linaro.org>
5964
5965 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5966 Remove.
5967 (debug_reg_change_callback): Remove argument entry and add argument
5968 lwp. Remove local variable thread. Don't print thread id in the
5969 debugging output. Don't check whether pid of thread equals to pid.
5970 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5971 iterate_over_lwps instead find_inferior.
5972
3d40fbb5
PA
59732015-08-24 Pedro Alves <palves@redhat.com>
5974
5975 * inferiors.c (get_first_process): New function.
5976 * inferiors.h (get_first_process): New declaration.
5977 * remote-utils.c (read_ptid): Default to the first process in the
5978 list, instead of to the current thread's process.
5979
438e1e42
PA
59802015-08-24 Pedro Alves <palves@redhat.com>
5981
5982 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5983 * event-loop.c: Likewise.
5984 * remote-utils.c: Likewise.
5985 * tracepoint.c: Likewise.
5986
a8c6d4fc
PA
59872015-08-24 Pedro Alves <palves@redhat.com>
5988
5989 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5990 ptid_get_lwp.
5991
99b0bb12
PA
59922015-08-21 Pedro Alves <palves@redhat.com>
5993
5994 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5995 instead of literal 1.
5996
f8904751
PA
59972015-08-21 Pedro Alves <palves@redhat.com>
5998
5999 * tdesc.c (default_description): Explicitly zero-initialize.
6000
465a859e
PA
60012015-08-21 Pedro Alves <palves@redhat.com>
6002
6003 PR gdb/18749
6004 * inferiors.c (remove_thread): Discard any pending stop reply for
6005 this thread.
6006 * server.c (remove_all_on_match_pid): Rename to ...
6007 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6008 instead of a pid.
6009 (discard_queued_stop_replies): Change parameter to a ptid. Now
6010 extern.
6011 (handle_v_kill, kill_inferior_callback, captured_main)
6012 (process_serial_event): Adjust.
6013 * server.h (discard_queued_stop_replies): Declare.
6014
f0db101d
PA
60152015-08-21 Pedro Alves <palves@redhat.com>
6016
6017 * linux-low.c (wait_for_sigstop): Always switch to no thread
6018 selected if the previously current thread dies.
6019 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6020 process instead of the current thread's.
6021 * remote-utils.c (input_interrupt): Don't check if there's no
6022 current thread.
6023 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6024 current thread to the general thread fails, error out.
6025 (handle_qxfer_auxv, handle_qxfer_libraries)
6026 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6027 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6028 (handle_query): Check if there's a thread selected instead of
6029 checking whether there's any thread in the thread list.
6030 (handle_qxfer_threads, handle_qxfer_btrace)
6031 (handle_qxfer_btrace_conf): Don't error out early if there's no
6032 thread in the thread list.
6033 (handle_v_cont, myresume): Don't set the current thread to the
6034 continue thread.
6035 (process_serial_event) <Hg handling>: Also set thread_id if the
6036 previous general thread is still alive.
6037 (process_serial_event) <g/G handling>: If setting the current
6038 thread to the general thread fails, error out.
6039 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6040 thread's lwp instead of the current thread's.
6041 * target.c (set_desired_thread): If the desired thread was not
6042 found, leave the current thread pointing to NULL. Return an int
6043 (boolean) indicating success.
6044 * target.h (set_desired_thread): Change return type to int.
6045
40045d91
MF
60462015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6047
6048 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6049 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6050 #includes.
6051 (ps_get_thread_area): New function.
6052
45face3b
GB
60532015-08-19 Gary Benson <gbenson@redhat.com>
6054
6055 * hostio.c (handle_pread): Do not attempt to read more data
6056 than hostio_reply_with_data can fit in a packet.
6057
16d5f642
JB
60582015-08-18 Joel Brobecker <brobecker@adacore.com>
6059
6060 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6061
a738da3a
MF
60622015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6063
6064 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6065
33ebda9d
PA
60662015-08-06 Pedro Alves <palves@redhat.com>
6067
6068 * tracepoint.c (expr_eval_result): Now an int.
6069
a44892be
PA
60702015-08-06 Pedro Alves <palves@redhat.com>
6071
6072 * gdbthread.h (struct regcache): Forward declare.
6073 (struct thread_info) <regcache_data>: Now a struct regcache
6074 pointer.
6075 * inferiors.c (inferior_regcache_data)
6076 (set_inferior_regcache_data): Now work with struct regcache
6077 pointers.
6078 * inferiors.h (struct regcache): Forward declare.
6079 (inferior_regcache_data, set_inferior_regcache_data): Now work
6080 with struct regcache pointers.
6081 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6082 (free_register_cache_thread): Remove struct regcache pointer
6083 casts.
6084
608a1e46
PA
60852015-08-06 Pedro Alves <palves@redhat.com>
6086
6087 * server.c (captured_main): On error, print the exception message
6088 to stderr, and if run_once is set, throw a quit.
6089
f0ce0d3a
PA
60902015-08-06 Pedro Alves <palves@redhat.com>
6091
6092 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6093 the current thread.
6094
bf47e248
PA
60952015-08-06 Pedro Alves <palves@redhat.com>
6096
6097 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6098 reading beyond the passed in buffer length.
6099
b6b9ffcc
PL
61002015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6101
6102 * tracepoint.c (symbol_list) <required>: Remove.
6103
863d01bd
PA
61042015-08-06 Pedro Alves <palves@redhat.com>
6105
6106 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6107 count if stopping and suspending threads.
6108 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6109 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6110 (linux_detach): Complete an ongoing step-over.
6111 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6112 throughout.
6113 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6114 (linux_wait_1): If passing a signal to the inferior after
6115 finishing a step-over, unsuspend and re-resume all lwps. If we
6116 see a single-step event but the thread should be continuing, don't
6117 pass the trap to gdb.
6118 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6119 internal_error instead of gdb_assert.
6120 (enqueue_pending_signal): New function.
6121 (check_ptrace_stopped_lwp_gone): Add debug output.
6122 (start_step_over): Use internal_error instead of gdb_assert.
6123 (complete_ongoing_step_over): New function.
6124 (linux_resume_one_thread): Don't resume a suspended thread.
6125 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6126 it stepping.
6127
00db26fa
PA
61282015-08-06 Pedro Alves <palves@redhat.com>
6129
6130 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6131 (linux_thread_alive): Use lwp_is_marked_dead.
6132 (extended_event_reported): Delete.
6133 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6134 instead of extended_event_reported.
6135 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6136 as well.
6137 (lwp_is_marked_dead): New function.
6138 (lwp_running): Use lwp_is_marked_dead.
6139 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6140 comment.
6141
ad071a30
PA
61422015-08-06 Pedro Alves <palves@redhat.com>
6143
6144 * linux-low.c (linux_wait_1): Move fork event output out of the
6145 !report_to_gdb check. Pass event_child->waitstatus to
6146 target_waitstatus_to_string instead of ourstatus.
6147
524b57e6
YQ
61482015-08-04 Yao Qi <yao.qi@linaro.org>
6149
6150 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6151 if current_thread is 32 bit.
6152
6085d6f6
YQ
61532015-08-04 Yao Qi <yao.qi@linaro.org>
6154
6155 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6156 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6157 * server.c (extended_protocol): Remove "static".
6158 * server.h (extended_protocol): Declare it.
6159
8a7e4587
YQ
61602015-08-04 Yao Qi <yao.qi@linaro.org>
6161
6162 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6163 both aarch64 and aarch32.
6164 (aarch64_set_pc): Likewise.
6165
3b53ae99
YQ
61662015-08-04 Yao Qi <yao.qi@linaro.org>
6167
6168 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6169 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6170 arm-with-neon.xml to srv_xmlfiles.
6171 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6172 (is_64bit_tdesc): New function.
6173 (aarch64_linux_read_description): New function.
6174 (aarch64_arch_setup): Call aarch64_linux_read_description.
6175 (regs_info): Rename to regs_info_aarch64.
6176 (aarch64_regs_info): Return right regs_info.
6177 (initialize_low_arch): Call initialize_low_arch_aarch32.
6178
bd9e6534
YQ
61792015-08-04 Yao Qi <yao.qi@linaro.org>
6180
6181 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6182 * linux-aarch32-low.c: New file.
6183 * linux-aarch32-low.h: New file.
6184 * linux-arm-low.c (arm_fill_gregset): Move it to
6185 linux-aarch32-low.c.
6186 (arm_store_gregset): Likewise.
6187 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6188 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6189 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6190 (regs_info): Rename to regs_info_arm.
6191 (arm_regs_info): Return regs_info_aarch32 if
6192 have_ptrace_getregset is 1 and target description is
6193 arm_with_neon or arm_with_vfpv3.
6194 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6195 Call initialize_low_arch_aarch32 instead.
6196
ded48a5e
YQ
61972015-08-04 Yao Qi <yao.qi@linaro.org>
6198
6199 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6200 * linux-low.c: ... here.
6201 * linux-low.h (have_ptrace_getregset): Declare it.
6202
96e9210f
PA
62032015-08-04 Pedro Alves <palves@redhat.com>
6204
6205 * thread-db.c (struct thread_db): Use new typedefs.
6206 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6207 CHK calls.
6208 (disable_thread_event_reporting): Cast result of dlsym to
6209 destination function pointer type.
6210 (thread_db_mourn): Use td_ta_delete_ftype.
6211
af60a1ef
SL
62122015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6213
6214 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6215 arch variant.
6216 (CDX_BREAKPOINT): Define for R2.
6217 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6218 (the_low_target): Add comments.
6219
e8b41681
YQ
62202015-07-30 Yao Qi <yao.qi@linaro.org>
6221
6222 * linux-arm-low.c (arm_hwcap): Remove it.
6223 (arm_read_description): New local variable arm_hwcap. Don't
6224 set arm_hwcap to zero.
6225
89abb039
YQ
62262015-07-30 Yao Qi <yao.qi@linaro.org>
6227
6228 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6229 Use regcache->tdesc instead.
6230 (arm_store_wmmxregset): Likewise.
6231 (arm_fill_vfpregset): Likewise.
6232 (arm_store_vfpregset): Likewise.
6233
deca266c
YQ
62342015-07-30 Yao Qi <yao.qi@linaro.org>
6235
6236 * linux-arm-low.c: Include arch/arm.h.
6237 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6238 (arm_store_gregset): Likewise.
6239
aa58a496
SM
62402015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6241
6242 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6243 ptrace's 4th parameter.
6244
50904b25
YQ
62452015-07-27 Yao Qi <yao.qi@linaro.org>
6246
6247 * configure.srv (case aarch64*-*-linux*): Don't set
6248 srv_linux_usrregs.
6249
5826e159
PA
62502015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6251
6252 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6253 sys/ptrace.h.
6254 * linux-arm-low.c: Likewise.
6255 * linux-cris-low.c: Likewise.
6256 * linux-crisv32-low.c: Likewise.
6257 * linux-low.c: Likewise.
6258 * linux-m68k-low.c: Likewise.
6259 * linux-mips-low.c: Likewise.
6260 * linux-nios2-low.c: Likewise.
6261 * linux-s390-low.c: Likewise.
6262 * linux-sparc-low.c: Likewise.
6263 * linux-tic6x-low.c: Likewise.
6264 * linux-tile-low.c: Likewise.
6265 * linux-x86-low.c: Likewise.
6266
54019719
PA
62672015-07-24 Pedro Alves <palves@redhat.com>
6268
6269 * config.in: Regenerate.
6270 * configure: Regenerate.
6271
eb7aa561
PA
62722015-07-24 Pedro Alves <palves@redhat.com>
6273
6274 * acinclude.m4: Include ../ptrace.m4.
6275 * configure.ac: Call GDB_AC_PTRACE.
6276 * config.in, configure: Regenerate.
6277
55d7b841
YQ
62782015-07-24 Yao Qi <yao.qi@linaro.org>
6279
6280 * linux-low.c (linux_create_inferior): Remove setting to
6281 proc->priv->new_inferior.
6282 (linux_attach): Likewise.
6283 (linux_low_filter_event): Likewise.
6284 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6285
c06cbd92
YQ
62862015-07-24 Yao Qi <yao.qi@linaro.org>
6287
6288 * linux-low.c (linux_arch_setup): New function.
6289 (linux_low_filter_event): If proc->tdesc is NULL and
6290 proc->attached is true, call the_low_target.arch_setup.
6291 Otherwise, keep status pending, and return.
6292 (linux_resume_one_lwp_throw): Don't call get_pc if
6293 thread->while_stepping isn't NULL. Don't call
6294 get_thread_regcache if proc->tdesc is NULL.
6295 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6296 (linux_target_ops): Install arch_setup.
6297 * server.c (start_inferior): Call the_target->arch_setup.
6298 * target.h (struct target_ops) <arch_setup>: New field.
6299 (target_arch_setup): New marco.
6300 * lynx-low.c (lynx_target_ops): Update.
6301 * nto-low.c (nto_target_ops): Update.
6302 * spu-low.c (spu_target_ops): Update.
6303 * win32-low.c (win32_target_ops): Update.
6304
5ae3ebba
YQ
63052015-07-24 Yao Qi <yao.qi@linaro.org>
6306
6307 * linux-low.c (linux_add_process): Don't set
6308 proc->priv->new_inferior.
6309 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6310 (linux_attach): Likewise.
6311
eb97750b
YQ
63122015-07-24 Yao Qi <yao.qi@linaro.org>
6313
6314 * server.c (start_inferior): Code refactor.
6315
51aee833
YQ
63162015-07-24 Yao Qi <yao.qi@linaro.org>
6317
6318 * server.c (process_serial_event): Set general_thread.
6319
af1b22f3
YQ
63202015-07-21 Yao Qi <yao.qi@linaro.org>
6321
6322 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6323 aarch64_linux_get_debug_reg_capacity.
6324
554717a3
YQ
63252015-07-17 Yao Qi <yao.qi@linaro.org>
6326
6327 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6328 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6329 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6330 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6331 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6332 (AARCH64_HWP_ALIGNMENT): Likewise.
6333 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6334 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6335 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6336 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6337 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6338 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6339 (struct aarch64_debug_reg_state): Likewise.
6340 (struct arch_lwp_info): Likewise.
6341 (aarch64_align_watchpoint): Likewise.
6342 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6343 (aarch64_watchpoint_length): Likewise.
6344 (aarch64_point_encode_ctrl_reg): Likewise
6345 (aarch64_point_is_aligned): Likewise.
6346 (aarch64_align_watchpoint): Likewise.
6347 (aarch64_linux_set_debug_regs):
6348 (aarch64_dr_state_insert_one_point): Likewise.
6349 (aarch64_dr_state_remove_one_point): Likewise.
6350 (aarch64_handle_breakpoint): Likewise.
6351 (aarch64_handle_aligned_watchpoint): Likewise.
6352 (aarch64_handle_unaligned_watchpoint): Likewise.
6353 (aarch64_handle_watchpoint): Likewise.
6354
c67ca4de
YQ
63552015-07-17 Yao Qi <yao.qi@linaro.org>
6356
6357 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6358 and don't aarch64_get_debug_reg_state. All callers update.
6359 (aarch64_handle_aligned_watchpoint): Likewise.
6360 (aarch64_handle_unaligned_watchpoint): Likewise.
6361 (aarch64_handle_watchpoint): Likewise.
6362 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6363 (aarch64_remove_point): Likewise.
6364
25abf979
YQ
63652015-07-17 Yao Qi <yao.qi@linaro.org>
6366
6367 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6368 debug_printf.
6369 (aarch64_handle_unaligned_watchpoint): Likewise.
6370
db1ff28b
JK
63712015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6372
6373 Revert the previous 3 commits:
6374 Move gdb_regex* to common/
6375 Move linux_find_memory_regions_full & co.
6376 gdbserver build-id attribute generator
6377
700ca40f
JK
63782015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6379 Jan Kratochvil <jan.kratochvil@redhat.com>
6380
6381 gdbserver build-id attribute generator.
6382 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6383 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6384 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6385 (find_phdr): New.
6386 (get_dynamic): Use find_pdhr to traverse program headers.
6387 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6388 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6389 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6390 (get_hex_build_id): New.
6391 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6392 to reply XML document.
6393
9904185c
JK
63942015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6395 Jan Kratochvil <jan.kratochvil@redhat.com>
6396
6397 * target.c: Include target/target-utils.h and fcntl.h.
6398 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6399 (target_fileio_read_stralloc): New functions.
6400
6e5b4429
JK
64012015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6402
6403 * Makefile.in (OBS): Add gdb_regex.o.
6404 (gdb_regex.o): New.
6405 * config.in: Rebuilt.
6406 * configure: Rebuilt.
6407
ddc98fbf
JK
64082015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6409 Jan Kratochvil <jan.kratochvil@redhat.com>
6410
6411 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6412 * Makefile.in (OBS): Add target-utils.o.
6413 (linux-maps.o, target-utils.o): New.
6414 * configure.srv (srv_linux_obj): Add linux-maps.o.
6415
e57bb7a0
PL
64162015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6417
6418 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6419 function, return 1.
6420 (the_low_target): Install it.
6421
586b02a9
PA
64222015-07-14 Pedro Alves <palves@redhat.com>
6423
6424 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6425 Instead, ignore ECHILD, and throw an error for other errnos.
6426
58c1b36c
PA
64272015-07-10 Pedro Alves <palves@redhat.com>
6428
6429 * event-loop.c (struct callback_event) <data>: Change type to
6430 gdb_client_data instance instead of gdb_client_data pointer.
6431 (append_callback_event): Adjust.
6432
421530db
PL
64332015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6434
6435 * linux-aarch64-low.c: Add comments for each linux_target_ops
6436 method. Remove comments already covered in target_ops and
6437 linux_target_ops definitions.
6438 (the_low_target): Add comments for each unimplemented method.
6439
c2d65f38
YQ
64402015-07-09 Yao Qi <yao.qi@linaro.org>
6441
6442 * linux-aarch64-low.c (aarch64_regmap): Remove.
6443 (aarch64_usrregs_info): Remove.
6444 (regs_info): Set field usrregs to NULL.
6445
b20a6524
MM
64462015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6447
6448 * linux-low.c: Include "rsp-low.h"
6449 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6450 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6451 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6452 (handle_btrace_enable_pt): New.
6453 (handle_btrace_general_set): Support "pt".
6454 (handle_btrace_conf_general_set): Support "pt:size".
6455
96c97461
PL
64562015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6457
6458 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6459 Z_PACKET_SW_BP.
6460
37d66942
PL
64612015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6462
6463 * linux-aarch64-low.c: Remove comment about endianness.
6464 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6465 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6466 memcmp.
6467
dc06243f
GB
64682015-06-24 Gary Benson <gbenson@redhat.com>
6469
6470 * linux-i386-ipa.c (stdint.h): Do not include.
6471 * lynx-i386-low.c (stdint.h): Likewise.
6472 * lynx-ppc-low.c (stdint.h): Likewise.
6473 * mem-break.c (stdint.h): Likewise.
6474 * thread-db.c (stdint.h): Likewise.
6475 * tracepoint.c (stdint.h): Likewise.
6476 * win32-low.c (stdint.h): Likewise.
6477
124e13d9
SM
64782015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6479
6480 * server.c (write_qxfer_response): Update call to
6481 remote_escape_output.
6482
909c2cda
JK
64832015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6484 Jan Kratochvil <jan.kratochvil@redhat.com>
6485
6486 Merge multiple hex conversions.
6487 * gdbreplay.c (tohex): Rename to 'fromhex'.
6488 (logchar): Use fromhex.
6489
24c05f46
JK
64902015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6491
6492 * server.c (handle_qxfer_libraries): Set `version' attribute for
6493 <library-list>.
6494
14d2069a
GB
64952015-06-10 Gary Benson <gbenson@redhat.com>
6496
6497 * target.h (struct target_ops) <multifs_open>: New field.
6498 <multifs_unlink>: Likewise.
6499 <multifs_readlink>: Likewise.
6500 * linux-low.c (nat/linux-namespaces.h): New include.
6501 (linux_target_ops): Initialize the_target->multifs_open,
6502 the_target->multifs_unlink and the_target->multifs_readlink.
6503 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6504 * hostio.c (hostio_fs_pid): New static variable.
6505 (hostio_handle_new_gdb_connection): New function.
6506 (handle_setfs): Likewise.
6507 (handle_open): Use the_target->multifs_open as appropriate.
6508 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6509 (handle_readlink): Use the_target->multifs_readlink as
6510 appropriate.
6511 (handle_vFile): Handle vFile:setfs packets.
6512 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6513 after target_handle_new_gdb_connection.
6514
4b8b5e72
GB
65152015-06-10 Gary Benson <gbenson@redhat.com>
6516
6517 * configure.ac (AC_CHECK_FUNCS): Add setns.
6518 * config.in: Regenerate.
6519 * configure: Likewise.
6520 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6521 (linux-namespaces.o): New rule.
6522 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6523
3ac2e371
GB
65242015-06-09 Gary Benson <gbenson@redhat.com>
6525
6526 * hostio.c (handle_open): Process mode argument with
6527 fileio_to_host_mode.
6528
ca9b78ce
YQ
65292015-06-01 Yao Qi <yao.qi@linaro.org>
6530
6531 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6532 * linux-x86-low.c: Likewise.
6533
bfacd19d
DB
65342015-05-28 Don Breazeal <donb@codesourcery.com>
6535
6536 * linux-low.c (handle_extended_wait): Initialize
6537 thread_info.last_resume_kind for new fork children.
6538
452003ef
PA
65392015-05-15 Pedro Alves <palves@redhat.com>
6540
6541 * target.h (target_handle_new_gdb_connection): Rewrite using if
6542 wrapped in do/while.
6543
1041a03c
JB
65442015-05-14 Joel Brobecker <brobecker@adacore.com>
6545
6546 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6547 * configure, config.in: Regenerate.
6548 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6549 Declare typedef.
6550
c269dbdb
DB
65512015-05-12 Don Breazeal <donb@codesourcery.com>
6552
6553 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6554 PTRACE_EVENT_VFORK_DONE.
6555 (linux_low_ptrace_options, extended_event_reported): Add vfork
6556 events.
6557 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6558 and "vforkdone" for RSP 'T' Stop Reply Packet.
6559 * server.h (report_vfork_events): Declare
6560 global variable.
6561
3a8a0396
DB
65622015-05-12 Don Breazeal <donb@codesourcery.com>
6563
6564 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6565 (the_low_target) <new_fork>: Initialize new member.
6566 * linux-arm-low.c (arm_new_fork): New function.
6567 (the_low_target) <new_fork>: Initialize new member.
6568 * linux-low.c (handle_extended_wait): Call new target function
6569 new_fork.
6570 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6571 * linux-mips-low.c (mips_add_watchpoint): New function
6572 extracted from mips_insert_point.
6573 (the_low_target) <new_fork>: Initialize new member.
6574 (mips_linux_new_fork): New function.
6575 (mips_insert_point): Call mips_add_watchpoint.
6576 * linux-x86-low.c (x86_linux_new_fork): New function.
6577 (the_low_target) <new_fork>: Initialize new member.
6578
de0d863e
DB
65792015-05-12 Don Breazeal <donb@codesourcery.com>
6580
6581 * linux-low.c (handle_extended_wait): Implement return value,
6582 rename argument 'event_child' to 'event_lwp', handle
6583 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6584 (linux_low_ptrace_options): New function.
6585 (linux_low_filter_event): Call linux_low_ptrace_options,
6586 use different argument fo linux_enable_event_reporting,
6587 use return value from handle_extended_wait.
6588 (extended_event_reported): New function.
6589 (linux_wait_1): Call extended_event_reported and set
6590 status to report fork events.
6591 (linux_write_memory): Add pid to debug message.
6592 (reset_lwp_ptrace_options_callback): New function.
6593 (linux_handle_new_gdb_connection): New function.
6594 (linux_target_ops): Initialize new structure member.
6595 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6596 * lynx-low.c: Initialize new structure member.
6597 * remote-utils.c (prepare_resume_reply): Implement stop reason
6598 "fork" for "T" stop message.
6599 * server.c (handle_query): Call handle_new_gdb_connection.
6600 * server.h (report_fork_events): Declare global flag.
6601 * target.h (struct target_ops) <handle_new_gdb_connection>:
6602 New member.
6603 (target_handle_new_gdb_connection): New macro.
6604 * win32-low.c: Initialize new structure member.
6605
ddcbc397
DB
66062015-05-12 Don Breazeal <donb@codesourcery.com>
6607
6608 * mem-break.c (APPEND_TO_LIST): Define macro.
6609 (clone_agent_expr): New function.
6610 (clone_one_breakpoint): New function.
6611 (clone_all_breakpoints): New function.
6612 * mem-break.h: Declare new functions.
6613
89245bc0
DB
66142015-05-12 Don Breazeal <donb@codesourcery.com>
6615
6616 * linux-low.c (linux_supports_fork_events): New function.
6617 (linux_supports_vfork_events): New function.
6618 (linux_target_ops): Initialize new structure members.
6619 (initialize_low): Call linux_check_ptrace_features.
6620 * lynx-low.c (lynx_target_ops): Initialize new structure
6621 members.
6622 * server.c (report_fork_events, report_vfork_events):
6623 New global flags.
6624 (handle_query): Add new features to qSupported packet and
6625 response.
6626 (captured_main): Initialize new global variables.
6627 * target.h (struct target_ops) <supports_fork_events>:
6628 New member.
6629 <supports_vfork_events>: New member.
6630 (target_supports_fork_events): New macro.
6631 (target_supports_vfork_events): New macro.
6632 * win32-low.c (win32_target_ops): Initialize new structure
6633 members.
6634
835205d0
GB
66352015-05-12 Gary Benson <gbenson@redhat.com>
6636
6637 * server.c (handle_qxfer_exec_file): Use current process
6638 if annex is empty.
6639
21e94bd9
SL
66402015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6641
6642 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6643 Remove HAVE_PTRACE_GETREGS conditionals.
6644 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6645 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6646
45614f15
YQ
66472015-05-08 Yao Qi <yao.qi@linaro.org>
6648
6649 * linux-low.c (linux_supports_conditional_breakpoints): New
6650 function.
6651 (linux_target_ops): Install new target method.
6652 * lynx-low.c (lynx_target_ops): Install NULL hook for
6653 supports_conditional_breakpoints.
6654 * nto-low.c (nto_target_ops): Likewise.
6655 * spu-low.c (spu_target_ops): Likewise.
6656 * win32-low.c (win32_target_ops): Likewise.
6657 * server.c (handle_query): Check
6658 target_supports_conditional_breakpoints.
6659 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6660 New field.
6661 (target_supports_conditional_breakpoints): New macro.
6662
80ad801e
PA
66632015-05-06 Pedro Alves <palves@redhat.com>
6664
6665 PR server/18081
6666 * server.c (start_inferior): If the process exits, mourn it.
6667
819843c7
GB
66682015-04-21 Gary Benson <gbenson@redhat.com>
6669
6670 * hostio.c (fileio_open_flags_to_host): Factored out to
6671 fileio_to_host_openflags in common/fileio.c. Single use
6672 updated.
6673
a2d5a9d7
MF
66742015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6675
6676 * linux-xtensa-low.c (xtensa_fill_gregset)
6677 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6678 XCHAL_HAVE_LOOP.
6679
deb44829
MF
66802015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6681
6682 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6683 (regs_info): Replace usrregs pointer with NULL.
6684
e57f1de3
GB
66852015-04-17 Gary Benson <gbenson@redhat.com>
6686
6687 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6688 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6689 * server.c (handle_qxfer_exec_file): New function.
6690 (qxfer_packets): Add exec-file entry.
6691 (handle_query): Report qXfer:exec-file:read as supported packet.
6692
62828379
RN
66932015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6694
6695 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6696
b88bb450
GB
66972015-04-09 Gary Benson <gbenson@redhat.com>
6698
6699 * hostio-errno.c (errno_to_fileio_error): Remove function.
6700 Update caller to use remote_fileio_to_fio_error.
6701
c8f4bfdd
YQ
67022015-04-09 Yao Qi <yao.qi@linaro.org>
6703
6704 * linux-low.c (linux_insert_point): Call
6705 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6706 (linux_remove_point): Call remove_memory_breakpoint if type is
6707 raw_bkpt_type_sw.
6708 * linux-x86-low.c (x86_insert_point): Don't call
6709 insert_memory_breakpoint.
6710 (x86_remove_point): Don't call remove_memory_breakpoint.
6711
41f98f02
PA
67122015-04-01 Pedro Alves <palves@redhat.com>
6713 Cleber Rosa <crosa@redhat.com>
6714
6715 * server.c (gdbserver_usage): Reorganize and extend the usage
6716 message.
6717
2bf6fb9d
PA
67182015-03-24 Pedro Alves <palves@redhat.com>
6719
6720 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6721 output. Also dump TRAP_TRACE.
6722 (linux_low_filter_event): In debug output, distinguish a
6723 resume_stop SIGSTOP from a delayed SIGSTOP.
6724
369f6daa
GB
67252015-03-24 Gary Benson <gbenson@redhat.com>
6726
6727 * linux-x86-low.c (x86_linux_new_thread): Moved to
6728 nat/x86-linux.c.
6729 (x86_linux_prepare_to_resume): Likewise.
6730
8e5d4070
GB
67312015-03-24 Gary Benson <gbenson@redhat.com>
6732
6733 * Makefile.in (x86-linux-dregs.o): New rule.
6734 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6735 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6736 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6737 (x86_linux_dr_get): Likewise.
6738 (x86_linux_dr_set): Likewise.
6739 (update_debug_registers_callback): Likewise.
6740 (x86_linux_dr_set_addr): Likewise.
6741 (x86_linux_dr_get_addr): Likewise.
6742 (x86_linux_dr_set_control): Likewise.
6743 (x86_linux_dr_get_control): Likewise.
6744 (x86_linux_dr_get_status): Likewise.
6745 (x86_linux_update_debug_registers): Likewise.
6746
2b95d440
GB
67472015-03-24 Gary Benson <gbenson@redhat.com>
6748
6749 * linux-x86-low.c (x86_linux_update_debug_registers):
6750 New function, factored out from...
6751 (x86_linux_prepare_to_resume): ...this.
6752
14b0bc68
GB
67532015-03-24 Gary Benson <gbenson@redhat.com>
6754
6755 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6756 (x86_linux_dr_set): Likewise.
6757 (update_debug_registers_callback): Likewise.
6758 (x86_linux_dr_set_addr): Likewise.
6759 (x86_linux_dr_get_addr): Likewise.
6760 (x86_linux_dr_set_control): Likewise.
6761 (x86_linux_dr_get_control): Likewise.
6762 (x86_linux_dr_get_status): Likewise.
6763 (x86_linux_prepare_to_resume): Likewise.
6764
5dfe6ca8
GB
67652015-03-24 Gary Benson <gbenson@redhat.com>
6766
6767 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6768 Use perror_with_name. Pass string through gettext.
6769 (x86_linux_dr_set): Likewise.
6770
d33472ad
GB
67712015-03-24 Gary Benson <gbenson@redhat.com>
6772
6773 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6774 (x86_linux_dr_set_addr): ...this.
6775 (x86_dr_low_get_addr): Rename to...
6776 (x86_linux_dr_get_addr): ...this.
6777 (x86_dr_low_set_control): Rename to...
6778 (x86_linux_dr_set_control): ...this.
6779 (x86_dr_low_get_control): Rename to...
6780 (x86_linux_dr_get_control): ...this.
6781 (x86_dr_low_get_status): Rename to...
6782 (x86_linux_dr_get_status): ...this.
6783 (x86_dr_low): Update with new function names.
6784
4b134ca1
GB
67852015-03-24 Gary Benson <gbenson@redhat.com>
6786
6787 * Makefile.in (x86-linux.o): New rule.
6788 * configure.srv: Add x86-linux.o to relevant targets.
6789 * linux-low.c (lwp_set_arch_private_info): New function.
6790 (lwp_arch_private_info): Likewise.
6791 * linux-x86-low.c: Include nat/x86-linux.h.
6792 (arch_lwp_info): Removed structure.
6793 (update_debug_registers_callback):
6794 Use lwp_set_debug_registers_changed.
6795 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6796 and lwp_set_debug_registers_changed.
6797 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6798
34c703da
GB
67992015-03-24 Gary Benson <gbenson@redhat.com>
6800
6801 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6802 * linux-arm-low.c (arm_new_thread): Likewise.
6803 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6804 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6805 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6806 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6807
cff068da
GB
68082015-03-24 Gary Benson <gbenson@redhat.com>
6809
6810 * linux-low.c (ptid_of_lwp): New function.
6811 (lwp_is_stopped): Likewise.
6812 (lwp_stop_reason): Likewise.
6813 * linux-x86-low.c (update_debug_registers_callback):
6814 Use lwp_is_stopped.
6815 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6816 lwp_stop_reason.
6817
b2f7c7e8
GB
68182015-03-24 Gary Benson <gbenson@redhat.com>
6819
6820 * linux-low.h (linux_stop_lwp): Remove declaration.
6821
6d4ee8c6
GB
68222015-03-24 Gary Benson <gbenson@redhat.com>
6823
6824 * linux-low.h: Include nat/linux-nat.h.
6825 * linux-low.c (iterate_over_lwps_args): New structure.
6826 (iterate_over_lwps_filter): New function.
6827 (iterate_over_lwps): Likewise.
6828 * linux-x86-low.c (update_debug_registers_callback):
6829 Update signature to what iterate_over_lwps expects.
6830 Remove PID check that iterate_over_lwps now performs.
6831 (x86_dr_low_set_addr): Use iterate_over_lwps.
6832 (x86_dr_low_set_control): Likewise.
6833
70a0bb6b
GB
68342015-03-24 Gary Benson <gbenson@redhat.com>
6835
6836 * linux-x86-low.c (x86_debug_reg_state): New function.
6837 (x86_linux_prepare_to_resume): Use the above.
6838
7b669087
GB
68392015-03-24 Gary Benson <gbenson@redhat.com>
6840
6841 * linux-low.c (current_lwp_ptid): New function.
6842 * linux-x86-low.c: Include nat/linux-nat.h.
6843 (x86_dr_low_get_addr): Use current_lwp_ptid.
6844 (x86_dr_low_get_control): Likewise.
6845 (x86_dr_low_get_status): Likewise.
6846
eef49a3d
PA
68472015-03-20 Pedro Alves <palves@redhat.com>
6848
6849 * tracepoint.c (cmd_qtstatus): Make "str" const.
6850
b2333d22
PA
68512015-03-20 Pedro Alves <palves@redhat.com>
6852
6853 * server.c (handle_general_set): Make "req_str" const.
6854
23f238d3
PA
68552015-03-19 Pedro Alves <palves@redhat.com>
6856
6857 * linux-low.c (linux_resume_one_lwp): Rename to ...
6858 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6859 instead call perror_with_name.
6860 (check_ptrace_stopped_lwp_gone): New function.
6861 (linux_resume_one_lwp): Reimplement as wrapper around
6862 linux_resume_one_lwp_throw that swallows errors if the LWP is
6863 gone.
6864
91baf43f
PA
68652015-03-19 Pedro Alves <palves@redhat.com>
6866
6867 * linux-low.c (count_events_callback, select_event_lwp_callback):
6868 No longer check whether the thread has resume_stop as last resume
6869 kind.
6870
8bf3b159
PA
68712015-03-19 Pedro Alves <palves@redhat.com>
6872
6873 * linux-low.c (count_events_callback, select_event_lwp_callback):
6874 Use the lwp's status_pending_p field, not the thread's.
6875
b90fc188
PA
68762015-03-19 Pedro Alves <palves@redhat.com>
6877
6878 * linux-low.c (select_event_lwp_callback): Update comments to
6879 no longer mention SIGTRAP.
6880
464b0089
GB
68812015-03-18 Gary Benson <gbenson@redhat.com>
6882
6883 * server.c (handle_query): Do not report vFile:fstat as supported.
6884
aa9e327f
GB
68852015-03-11 Gary Benson <gbenson@redhat.com>
6886
6887 * hostio.c (sys/types.h): New include.
6888 (sys/stat.h): Likewise.
6889 (common-remote-fileio.h): Likewise.
6890 (handle_fstat): New function.
6891 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6892
791c0056
GB
68932015-03-11 Gary Benson <gbenson@redhat.com>
6894
6895 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6896 struct stat.st_blocks and struct stat.st_blksize.
6897 * configure: Regenerate.
6898 * config.in: Likewise.
6899 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6900 (OBS): Add common-remote-fileio.o.
6901 (common-remote-fileio.o): New rule.
6902
9a9df970
PA
69032015-03-09 Pedro Alves <palves@redhat.com>
6904
6905 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6906 'struct sockaddr' pointer in 'accept' call.
6907
9eb1356e
PA
69082015-03-09 Pedro Alves <palves@redhat.com>
6909
6910 Revert:
6911 2015-03-07 Pedro Alves <palves@redhat.com>
6912 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6913 or <winsock2.h> here. Instead include "gdb_socket.h".
6914 (remote_open): Use union gdb_sockaddr_u.
6915 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6916 or <winsock2.h> here. Instead include "gdb_socket.h".
6917 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6918 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6919 or <sys/un.h>.
6920 (init_named_socket, gdb_agent_helper_thread): Use union
6921 gdb_sockaddr_u.
6922
aac331e4
PA
69232015-03-07 Pedro Alves <palves@redhat.com>
6924
6925 * configure.ac (build_warnings): Move
6926 -Wdeclaration-after-statement to the C-specific set.
6927 * configure: Regenerate.
6928
366c75fc
PA
69292015-03-07 Pedro Alves <palves@redhat.com>
6930
6931 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6932 or <winsock2.h> here. Instead include "gdb_socket.h".
6933 (remote_open): Use union gdb_sockaddr_u.
6934 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6935 or <winsock2.h> here. Instead include "gdb_socket.h".
6936 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6937 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6938 or <sys/un.h>.
6939 (init_named_socket, gdb_agent_helper_thread): Use union
6940 gdb_sockaddr_u.
6941
492d29ea
PA
69422015-03-07 Pedro Alves <palves@redhat.com>
6943
6944 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6945 instead.
6946
60a191ed
YQ
69472015-03-06 Yao Qi <yao.qi@linaro.org>
6948
6949 * linux-aarch64-low.c (aarch64_insert_point): Use
6950 show_debug_regs as a boolean.
6951 (aarch64_remove_point): Likewise.
6952
f5771b1d
PA
69532015-03-05 Pedro Alves <palves@redhat.com>
6954
6955 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6956 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6957 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6958 * nto-low.c (nto_target_ops): Likewise.
6959 * spu-low.c (spu_target_ops): Likewise.
6960 * win32-low.c (win32_target_ops): Likewise.
6961
3e572f71
PA
69622015-03-04 Pedro Alves <palves@redhat.com>
6963
72f4393d 6964 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6965 Decide whether a breakpoint triggered based on the SIGTRAP's
6966 siginfo.si_code.
72f4393d
L
6967 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6968 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6969 (linux_low_filter_event): Check for breakpoints before checking
6970 watchpoints.
6971 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6972 siginfo.si_code.
72f4393d
L
6973 (linux_stopped_by_sw_breakpoint)
6974 (linux_supports_stopped_by_sw_breakpoint)
6975 (linux_stopped_by_hw_breakpoint)
6976 (linux_supports_stopped_by_hw_breakpoint): New functions.
6977 (linux_target_ops): Install new target methods.
3e572f71 6978
1ec68e26
PA
69792015-03-04 Pedro Alves <palves@redhat.com>
6980
6981 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6982 * server.c (swbreak_feature, hwbreak_feature): New globals.
6983 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6984 (captured_main): Clear swbreak_feature and hwbreak_feature.
6985 * server.h (swbreak_feature, hwbreak_feature): Declare.
6986 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6987 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6988 supports_stopped_by_hw_breakpoint>: New fields.
6989 (target_supports_stopped_by_sw_breakpoint)
6990 (target_stopped_by_sw_breakpoint)
6991 (target_supports_stopped_by_hw_breakpoint)
6992 (target_stopped_by_hw_breakpoint): Declare.
6993
15c66dd6
PA
69942015-03-04 Pedro Alves <palves@redhat.com>
6995
6996 enum lwp_stop_reason -> enum target_stop_reason
6997 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6998 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6999 (linux_wait_1, stuck_in_jump_pad_callback)
7000 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7001 (linux_stopped_by_watchpoint):
7002 * linux-low.h (enum lwp_stop_reason): Delete.
7003 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7004 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7005
98fc70d6
YQ
70062015-03-04 Yao Qi <yao.qi@linaro.org>
7007
7008 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7009
dd2ac174
GB
70102015-03-03 Gary Benson <gbenson@redhat.com>
7011
7012 * hostio.c (handle_vFile): Fix prefix lengths.
7013
d68e53f4
MM
70142015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7015
7016 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7017 ptr_bits.
7018
bf2d68ab
AA
70192015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7020
7021 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7022 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7023 (clean): Add "rm -f" for above C files.
7024 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7025 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7026 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7027 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7028 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7029 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7030 (init_registers_s390x_vx_linux64)
7031 (init_registers_s390x_tevx_linux64)
7032 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7033 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7034 declarations.
7035 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7036 (s390_store_vxrs_high): New functions.
7037 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7038 NT_S390_VXRS_HIGH.
7039 (s390_arch_setup): Add logic for selecting one of the new target
7040 descriptions. Activate the new vector regsets if applicable.
7041 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7042 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7043 and init_registers_s390x_tevx_linux64.
7044
c966a859
PA
70452015-03-01 Pedro Alves <palves@redhat.com>
7046
7047 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7048 parameter.
7049
4180215b
PA
70502015-02-27 Pedro Alves <palves@redhat.com>
7051
7052 * linux-x86-low.c (u_debugreg_offset): New function.
7053 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7054
749bab01
PA
70552015-02-27 Pedro Alves <palves@redhat.com>
7056
7057 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7058 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7059 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7060 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7061 (ps_lsetfpregs, ps_getpid)
7062 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7063 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7064 (ps_lsetxregs, ps_plog): Declare.
7065
3c14e5a3
PA
70662015-02-27 Pedro Alves <palves@redhat.com>
7067
7068 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7069 IP_AGENT_EXPORT_FUNC.
7070 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7071 IP_AGENT_EXPORT_FUNC.
7072 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7073 (IP_AGENT_EXPORT): Delete.
7074 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7075 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7076 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7077 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7078 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7079 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7080 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7081 (traceframe_read_count, traceframe_write_count)
7082 (traceframes_created, trace_state_variables, get_raw_reg)
7083 (get_trace_state_variable_value, set_trace_state_variable_value)
7084 (ust_loaded, helper_thread_id, cmd_buf): Use
7085 IPA_SYM_EXPORTED_NAME.
7086 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7087 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7088 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7089 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7090 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7091 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7092 EXTERN_C_PUSH/EXTERN_C_POP.
7093 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7094 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7095 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7096 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7097 (traceframe_write_count, traceframe_read_count)
7098 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7099 (about_to_request_buffer_space, get_trace_state_variable_value)
7100 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7101 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7102 EXTERN_C_PUSH/EXTERN_C_POP.
7103 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7104 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7105 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7106 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7107 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7108 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7109 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7110 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7111 Define.
7112 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7113 (IP_AGENT_EXPORT_VAR_DECL): Define.
7114 (tracing): Declare.
7115 (gdb_agent_get_raw_reg): Declare.
7116
fe978cb0
PA
71172015-02-27 Tom Tromey <tromey@redhat.com>
7118 Pedro Alves <palves@redhat.com>
7119
7120 Rename symbols whose names are reserved C++ keywords throughout.
7121
3bc3d82a
PA
71222015-02-27 Pedro Alves <palves@redhat.com>
7123
7124 * Makefile.in (COMPILER): New, get it from autoconf.
7125 (CXX): Get from autoconf instead.
7126 (COMPILE.pre): Use COMPILER.
7127 (CC-LD): Rename to ...
7128 (CC_LD): ... this. Use COMPILER.
7129 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7130 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7131 * acinclude.m4: Include build-with-cxx.m4.
7132 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7133 Disable -Werror by default if building in C++ mode.
7134 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7135 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7136 the C++ compiler. Save/restore CXXFLAGS too.
7137 * configure: Regenerate.
7138
07697489
PA
71392015-02-27 Pedro Alves <palves@redhat.com>
7140
7141 * acinclude.m4: Include libiberty.m4.
7142 * configure.ac: Call libiberty_INIT.
7143 * config.in, configure: Regenerate.
7144
9beb7c4e
PA
71452015-02-26 Pedro Alves <palves@redhat.com>
7146
7147 * linux-low.c (linux_wait_1): When incrementing the PC past a
7148 program breakpoint always use the_low_target.breakpoint_len as
7149 increment, rather than the maximum between that and
7150 the_low_target.decr_pc_after_break.
7151
8090aef2
PA
71522015-02-23 Pedro Alves <palves@redhat.com>
7153
7154 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7155 thread was doing a step-over; always adjust the PC if
7156 we stepped over a permanent breakpoint.
7157 (linux_wait_1): If we stepped over breakpoint that was on top of a
7158 permanent breakpoint, manually advance the PC past it.
7159
bc9540e8
PA
71602015-02-23 Pedro Alves <palves@redhat.com>
7161
7162 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7163 modes.
7164 (x86_fill_gregset, x86_store_gregset): Use it when handling
7165 $orig_eax.
7166
2db9a427
PA
71672015-02-20 Pedro Alves <palves@redhat.com>
7168
7169 * thread-db.c: Include "nat/linux-procfs.h".
7170 (thread_db_init): Skip listing new threads if the kernel supports
7171 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7172
afa8d396
PA
71732015-02-20 Pedro Alves <palves@redhat.com>
7174
7175 * linux-low.c (status_pending_p_callback): Use ptid_match.
7176
c9587f88
AT
71772015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7178
7179 PR breakpoints/16812
7180 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7181 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7182 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7183
b05ec7a5
AT
71842015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7185
7186 PR breakpoints/15956
7187 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7188
d33501a5
MM
71892015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7190
7191 * linux-low.c (linux_low_btrace_conf): Print size.
7192 * server.c (handle_btrace_conf_general_set): New.
7193 (hanle_general_set): Call handle_btrace_conf_general_set.
7194 (handle_query): Report Qbtrace-conf:bts:size as supported.
7195
f4abbc16
MM
71962015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7197
7198 * linux-low.c (linux_low_enable_btrace): Update parameters.
7199 (linux_low_btrace_conf): New.
7200 (linux_target_ops)<to_btrace_conf>: Initialize.
7201 * server.c (current_btrace_conf): New.
7202 (handle_btrace_enable): Rename to ...
7203 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7204 to target_enable_btrace. Update comment. Update users.
7205 (handle_qxfer_btrace_conf): New.
7206 (qxfer_packets): Add btrace-conf entry.
7207 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7208 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7209 (target_ops)<read_btrace_conf>: New.
7210 (target_enable_btrace): Update parameters.
7211 (target_read_btrace_conf): New.
7212
043c3577
MM
72132015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7214
7215 * server.c (handle_btrace_general_set): Remove call to
7216 target_supports_btrace.
7217 (supported_btrace_packets): New.
7218 (handle_query): Call supported_btrace_packets.
7219 * target.h: include btrace-common.h.
7220 (btrace_target_info): Removed.
7221 (supports_btrace, target_supports_btrace): Update parameters.
7222
734b0e4b
MM
72232015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7224
7225 * Makefile.in (SFILES): Add common/btrace-common.c.
7226 (OBS): Add common/btrace-common.o.
7227 (btrace-common.o): Add build rules.
7228 * linux-low: Include btrace-common.h.
7229 (linux_low_read_btrace): Use struct btrace_data. Call
7230 btrace_data_init and btrace_data_fini.
7231
d6c146e9
PA
72322015-02-06 Pedro Alves <palves@redhat.com>
7233
7234 * thread-db.c (find_new_threads_callback): Add debug output.
7235
20ba1ce6
PA
72362015-02-04 Pedro Alves <palves@redhat.com>
7237
7238 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7239 (resume_stopped_resumed_lwps): New function.
7240 (linux_wait_for_event_filtered): Use it.
7241
8cc73a39
SDJ
72422015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7243
7244 * Makefile.in (SFILES): Add linux-personality.c.
7245 (linux-personality.o): New rule.
7246 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7247 list of objects to be built.
7248 * linux-low.c: Include nat/linux-personality.h.
7249 (linux_create_inferior): Remove code to disable address space
7250 randomization (moved to ../nat/linux-personality.c). Create
7251 cleanup to disable address space randomization.
7252
fb23d554
SDJ
72532015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7254
7255 * Makefile.in (posix-strerror.o): New rule.
7256 (mingw-strerror.o): Likewise.
7257 * configure: Regenerated.
7258 * configure.ac: Source file ../common/common.host. Initialize new
7259 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7260
cdf43629
YQ
72612015-01-14 Yao Qi <yao@codesourcery.com>
7262
7263 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7264 (ppc-linux.o): New rule.
7265 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7266 * configure.ac: AC_CHECK_FUNCS(getauxval).
7267 * config.in: Re-generated.
7268 * configure: Re-generated.
7269 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7270 ppc64_64bit_inferior_p
7271
514c5338
YQ
72722015-01-14 Yao Qi <yao@codesourcery.com>
7273
7274 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7275 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7276 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7277 (PT_ORIG_R3, PT_TRAP): Likewise.
7278 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7279 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7280 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7281
3368c1e5
JB
72822015-01-10 Joel Brobecker <brobecker@adacore.com>
7283
7284 * i387-fp.c (i387_cache_to_xsave): In look over
7285 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7286 zmmh_low_space field by use of zmmh_high_space.
7287
582511be
PA
72882015-01-09 Pedro Alves <palves@redhat.com>
7289
7290 * linux-low.c (step_over_bkpt): Move higher up in the file.
7291 (handle_extended_wait): Don't store the stop_pc here.
7292 (get_stop_pc): Adjust comments and rename to ...
7293 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7294 stopped for a software breakpoint or hardware breakpoint.
7295 (thread_still_has_status_pending_p): New function.
7296 (status_pending_p_callback): Use
7297 thread_still_has_status_pending_p. If the event is no longer
7298 interesting, resume the LWP.
7299 (handle_tracepoints): Add assert.
7300 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7301 (wstatus_maybe_breakpoint): New function.
7302 (cancel_breakpoint): Delete function.
7303 (check_stopped_by_watchpoint): New function, factored out from
7304 linux_low_filter_event.
7305 (lp_status_maybe_breakpoint): Delete function.
7306 (linux_low_filter_event): Remove filter_ptid argument.
7307 Leave thread group exits pending here. Store the LWP's stop PC.
7308 Always leave events pending.
7309 (linux_wait_for_event_filtered): Pull all events out of the
7310 kernel, and leave them all pending.
7311 (count_events_callback, select_event_lwp_callback): Consider all
7312 events.
7313 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7314 (select_event_lwp): Only give preference to the stepping LWP in
7315 all-stop mode. Adjust comments.
7316 (ignore_event): New function.
7317 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7318 references to cancel_breakpoints. Adjust to renames. Also give
7319 equal priority to all LWPs that have had events in non-stop mode.
7320 If reporting a software breakpoint event, unadjust the LWP's PC.
7321 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7322 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7323 Adjust.
7324 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7325 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7326 (linux_stopped_by_watchpoint): Adjust.
7327 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7328 * linux-low.h (enum lwp_stop_reason): New.
7329 (struct lwp_info) <stop_pc>: Adjust comment.
7330 <stopped_by_watchpoint>: Delete field.
7331 <stop_reason>: New field.
7332 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7333 * mem-break.c (software_breakpoint_inserted_here)
7334 (hardware_breakpoint_inserted_here): New function.
7335 * mem-break.h (software_breakpoint_inserted_here)
7336 (hardware_breakpoint_inserted_here): Declare.
7337 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7338 (cancel_breakpoints): Delete.
7339 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7340 (upload_fast_traceframes): Remove references to
7341 cancel_breakpoints.
7342
a33e3959
PA
73432015-01-09 Pedro Alves <palves@redhat.com>
7344
7345 * thread-db.c (find_new_threads_callback): Ignore thread if the
7346 kernel thread ID is -1.
7347
8784d563
PA
73482015-01-09 Pedro Alves <palves@redhat.com>
7349
7350 * linux-low.c (linux_attach_fail_reason_string): Move to
7351 nat/linux-ptrace.c, and rename.
7352 (linux_attach_lwp): Update comment.
7353 (attach_proc_task_lwp_callback): New function.
7354 (linux_attach): Adjust to rename and use
7355 linux_proc_attach_tgid_threads.
7356 (linux_attach_fail_reason_string): Delete declaration.
7357
76f2b779
JB
73582015-01-01 Joel Brobecker <brobecker@adacore.com>
7359
7360 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7361 * server.c (gdbserver_version): Likewise.
7362
fafcc06a
SDJ
73632014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7364
7365 * remote-utils.c: Include ctype.h.
7366 (input_interrupt): Explicitly handle the case when the char
7367 received is the NUL byte. Improve the printing of non-ASCII
7368 characters.
7369
beed38b8
JB
73702014-12-16 Joel Brobecker <brobecker@adacore.com>
7371
7372 * linux-low.c (linux_low_filter_event): Update call to
7373 linux_enable_event_reporting following the addition of
7374 a new parameter to that function.
7375
bf330350
CU
73762014-12-16 Catalin Udma <catalin.udma@freescale.com>
7377
7378 PR server/17457
7379 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7380 (AARCH64_FPCR_REGNO): Likewise.
7381 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7382 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7383 (aarch64_store_fpregset): Likewise.
7384
5227d625
JB
73852014-12-15 Joel Brobecker <brobecker@adacore.com>
7386
7387 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7388 Remove FIXME comment about assumption about N.
7389
f93b65a0
JB
73902014-12-13 Joel Brobecker <brobecker@adacore.com>
7391
7392 * configure.ac: If large-file support is disabled in GDBserver,
7393 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7394 * configure: Regenerate.
7395
e5a9158d
AA
73962014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7397
7398 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7399 warning upon ENODATA from ptrace.
7400 * linux-s390-low.c (s390_store_tdb): New.
7401 (s390_regsets): Add regset for NT_S390_TDB.
7402
feea5f36
AA
74032014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7404
7405 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7406 without a fill_function.
7407 * linux-s390-low.c (s390_fill_last_break): Remove.
7408 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7409 (s390_arch_setup): Use regset's size instead of fill_function for
7410 loop end condition.
7411
098dbe61
AA
74122014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7413
7414 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7415 the regset's store function when ptrace returned an error.
7416 * regcache.c (get_thread_regcache): Invalidate register cache
7417 before fetching inferior's registers.
7418
28eef672
AA
74192014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7420
7421 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7422 while-loop as for-loop.
7423 (regsets_store_inferior_registers): Likewise.
7424
bdca27a2
YQ
74252014-11-28 Yao Qi <yao@codesourcery.com>
7426
7427 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7428 * config.in, configure: Re-generate.
7429 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7430 is defined.
7431
9c232dda
YQ
74322014-11-21 Yao Qi <yao@codesourcery.com>
7433
7434 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7435 (AC_CHECK_HEADERS): Remove malloc.h.
7436 * configure: Re-generated.
7437 * config.in: Re-generated.
7438 * server.h: Don't include alloca.h and malloc.h.
7439 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7440 Don't include malloc.h.
7441
43968415
JB
74422014-11-17 Joel Brobecker <brobecker@adacore.com>
7443
7444 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7445 corresponding ERRNO check in same block.
7446
40e91bc7
PA
74472014-11-12 Pedro Alves <palves@redhat.com>
7448
7449 * server.c (cont_thread): Update comment.
7450 (start_inferior, attach_inferior): No longer clear cont_thread.
7451 (handle_v_cont): No longer set cont_thread.
7452 (captured_main): Clear cont_thread each time a GDB connects.
7453
c2c118cf
PA
74542014-11-12 Pedro Alves <palves@redhat.com>
7455
7456 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7457 thread, and don't resume all threads if the Hc thread has exited.
7458
78708b7c
PA
74592014-11-12 Pedro Alves <palves@redhat.com>
7460
7461 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7462 the process group instead of to a specific LWP.
7463
a2abc7de
PA
74642014-10-15 Pedro Alves <palves@redhat.com>
7465
7466 PR server/17487
7467 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7468 parameter.
7469 (arm_set_thread_context): Delete.
7470 (the_low_target): Adjust.
7471 * win32-i386-low.c (debug_registers_changed)
7472 (debug_registers_used): Delete.
7473 (update_debug_registers_callback): New function.
7474 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7475 needing to update their debug registers.
7476 (win32_get_current_dr): New function.
7477 (x86_dr_low_get_addr, x86_dr_low_get_control)
7478 (x86_dr_low_get_status): Fetch the debug register from the thread
7479 record's context.
7480 (i386_initial_stuff): Adjust.
7481 (i386_get_thread_context): Remove current_event parameter. Don't
7482 clear debug_registers_changed nor copy DR values to
7483 debug_reg_state.
7484 (i386_set_thread_context): Delete.
7485 (i386_prepare_to_resume): New function.
7486 (i386_thread_added): Mark the thread as needing to update irs
7487 debug registers.
7488 (the_low_target): Remove i386_set_thread_context and install
7489 i386_prepare_to_resume.
7490 * win32-low.c (win32_get_thread_context): Adjust.
7491 (win32_set_thread_context): Use SetThreadContext
7492 directly.
7493 (win32_prepare_to_resume): New function.
7494 (win32_require_context): New function, factored out from ...
7495 (thread_rec): ... this.
7496 (continue_one_thread): Call win32_prepare_to_resume on each thread
7497 we're about to continue.
7498 (win32_resume): Call win32_prepare_to_resume on the event thread.
7499 * win32-low.h (struct win32_thread_info)
7500 <debug_registers_changed>: New field.
7501 (struct win32_target_ops): Change prototype of set_thread_context,
7502 delete set_thread_context and add prepare_to_resume.
7503 (win32_require_context): New declaration.
7504
a442d071
GB
75052014-10-08 Gary Benson <gbenson@redhat.com>
7506
7507 * server.h: Do not include common-exceptions.h.
7508
6f1947e8
GB
75092014-10-08 Gary Benson <gbenson@redhat.com>
7510
7511 * server.h: Do not include cleanups.h.
7512
63b434a4
JH
75132014-09-30 James Hogan <james.hogan@imgtec.com>
7514
7515 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7516 mips64-dsp-linux.c.
7517
c4d9ceb6
YQ
75182014-09-23 Yao Qi <yao@codesourcery.com>
7519
7520 * linux-low.c (lp_status_maybe_breakpoint): New function.
7521 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7522 (count_events_callback): Likewise.
7523 (select_event_lwp_callback): Likewise.
7524 (cancel_breakpoints_callback): Likewise.
7525
89a5711c
DB
75262014-09-19 Don Breazeal <donb@codesourcery.com>
7527
7528 * linux-low.c (handle_extended_wait): Call
7529 linux_ptrace_get_extended_event.
7530 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7531 linux_is_extended_waitstatus.
7532
bffc0964
JB
75332014-09-16 Joel Brobecker <brobecker@adacore.com>
7534
7535 * Makefile.in (CPPFLAGS): Define.
7536 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7537 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7538
0bfdf32f
GB
75392014-09-16 Gary Benson <gbenson@redhat.com>
7540
7541 * inferiors.h (current_inferior): Renamed as...
7542 (current_thread): New variable. All uses updated.
7543 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7544 (maybe_move_out_of_jump_pad): Likewise.
7545 (cancel_breakpoint): Likewise.
7546 (linux_low_filter_event): Likewise.
7547 (wait_for_sigstop): Likewise.
7548 (linux_resume_one_lwp): Likewise.
7549 (need_step_over_p): Likewise.
7550 (start_step_over): Likewise.
7551 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7552 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7553 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7554 and save_inferior as saved_thread.
7555 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7556 saved_thread.
7557 (regcache_invalidate_thread): Likewise.
7558 * remote-utils.c (prepare_resume_reply): Likewise.
7559 * thread-db.c (thread_db_get_tls_address): Likewise.
7560 (disable_thread_event_reporting): Likewise.
7561 (remove_thread_event_breakpoints): Likewise.
7562 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7563 as saved_thread.
7564 * target.h (set_desired_inferior): Renamed as...
7565 (set_desired_thread): New declaration. All uses updated.
7566 * server.c (myresume): Updated comment to reference thread instead
7567 of inferior.
7568 (handle_serial_event): Likewise.
7569 (handle_target_event): Likewise.
7570
361c8ade
GB
75712014-09-12 Tom Tromey <tromey@redhat.com>
7572 Gary Benson <gbenson@redhat.com>
7573
7574 * regcache.h: Include common-regcache.h.
7575 (regcache_read_pc): Don't declare.
7576 * regcache.c (get_thread_regcache_for_ptid): New function.
7577
bd9269f7
GB
75782014-09-11 Tom Tromey <tromey@redhat.com>
7579 Gary Benson <gbenson@redhat.com>
7580
7581 * symbol.c: New file.
7582 * Makefile.in (SFILES): Add symbol.c.
7583 (OBS): Add symbol.o.
7584
f8c1d06b
GB
75852014-09-11 Gary Benson <gbenson@redhat.com>
7586
7587 * target.c (target_stop_ptid, target_continue_ptid): New
7588 functions.
7589
721ec300
GB
75902014-09-11 Tom Tromey <tromey@redhat.com>
7591 Gary Benson <gbenson@redhat.com>
7592
7593 * target.h: Include target/target.h.
7594 * target.c (target_read_memory, target_read_uint32)
7595 (target_write_memory): New functions.
7596
c5e92cca
GB
75972014-09-11 Gary Benson <gbenson@redhat.com>
7598
7599 * server.h (debug_hw_points): Don't declare.
7600 * server.c (debug_hw_points): Don't define. Replace all uses
7601 with show_debug_regs.
7602 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7603 all uses with show_debug_regs.
7604
2e4bb98a
EBM
76052014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7606
7607 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7608 endianness into account.
7609 (ppc_supply_ptrace_register): Likewise.
7610
ac740bc7
JH
76112014-09-03 James Hogan <james.hogan@imgtec.com>
7612
7613 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7614 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7615
97ea6506
GB
76162014-09-03 Gary Benson <gbenson@redhat.com>
7617
7618 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7619 ALL_DEBUG_ADDRESS_REGISTERS.
7620
df7e5265
GB
76212014-09-02 Gary Benson <gbenson@redhat.com>
7622
7623 * i386-low.h: Renamed as...
7624 * x86-low.h: New file. All type, function and variable name
7625 prefixes changed from "i386_" to "x86_". All references updated.
7626 * i386-low.c: Renamed as...
7627 * x86-low.c: New file. All type, function and variable name
7628 prefixes changed from "i386_" to "x86_". All references updated.
7629
ed859da7
GB
76302014-09-02 Gary Benson <gbenson@redhat.com>
7631
7632 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7633 (x86_linux_new_thread): Likewise.
7634
860789c7
GB
76352014-08-29 Gary Benson <gbenson@redhat.com>
7636
7637 * server.h (setjmp.h): Do not include.
7638 (toplevel): Do not declare.
7639 (common-exceptions.h): Include.
7640 (cleanups.h): Likewise.
7641 * server.c (toplevel): Do not define.
7642 (exit_code): New static global.
7643 (detach_or_kill_for_exit_cleanup): New function.
7644 (main): New function. Original main renamed to...
7645 (captured_main): New function.
7646 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7647
ff55e1b5
GB
76482014-08-29 Gary Benson <gbenson@redhat.com>
7649
7650 * Makefile.in (SFILES): Add common/common-exceptions.c.
7651 (OBS): Add common-exceptions.o.
7652 (common-exceptions.o): New rule.
7653 * utils.c (prepare_to_throw_exception): New function.
7654
e9bcb658
GB
76552014-08-29 Gary Benson <gbenson@redhat.com>
7656
7657 * config.in: Regenerate.
7658 * configure: Likewise.
7659
e3180625
GB
76602014-08-29 Gary Benson <gbenson@redhat.com>
7661
7662 * Makefile.in (SFILES): Add common/cleanups.c.
7663 (OBS): cleanups.o.
7664 (cleanups.o): New rule.
7665
e3d6ba5d
GB
76662014-08-29 Gary Benson <gbenson@redhat.com>
7667
7668 * utils.c (internal_vwarning): New function.
7669
7096e886
GB
76702014-08-28 Gary Benson <gbenson@redhat.com>
7671
7672 * utils.h (fatal): Remove declaration.
7673 * utils.c (fatal): Remove function.
7674
14ce3192
GB
76752014-08-28 Gary Benson <gbenson@redhat.com>
7676
7677 * tracepoint.c (gdb_agent_init): Replace fatal with
7678 perror_with_name.
7679 (initialize_tracepoint): Likewise.
7680
50278d59
GB
76812014-08-28 Gary Benson <gbenson@redhat.com>
7682
7683 * remote-utils.c (remote_prepare): Replace fatal with error.
7684
aa96c426
GB
76852014-08-28 Gary Benson <gbenson@redhat.com>
7686
7687 * linux-low.c (linux_async): Replace fatal with warning.
7688 Tidy up and return.
7689 (linux_start_non_stop): Return -1 if linux_async failed.
7690
f7160e97
GB
76912014-08-28 Gary Benson <gbenson@redhat.com>
7692
7693 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7694 gdb_assert.
7695 (i386_dr_low_get_addr): Remove vague comment.
7696 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7697 gdb_assert.
7698
38e08fca
GB
76992014-08-28 Gary Benson <gbenson@redhat.com>
7700
7701 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7702 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7703 internal_error.
7704 (linux_resume_one_lwp): Likewise.
7705 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7706 gdb_assert.
7707 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7708 with internal_error.
7709 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7710 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7711 (find_register_by_name): Replace fatal with internal_error.
7712 (find_regno): Likewise.
7713 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7714 * thread-db.c (thread_db_create_event): Likewise.
7715 (thread_db_load_search): Likewise.
7716 (try_thread_db_load_1): Likewise.
7717 * tracepoint.c (get_jump_space_head): Replace fatal with
7718 internal_error.
7719 (claim_trampoline_space): Likewise.
7720 (have_fast_tracepoint_trampoline_buffer): Likewise.
7721 (cmd_qtstart): Likewise.
7722 (stop_tracing): Likewise.
7723 (fast_tracepoint_collecting): Likewise.
7724 (target_malloc): Likewise.
7725 (download_tracepoint): Likewise.
7726 (download_trace_state_variables): Replace check with gdb_assert.
7727 (upload_fast_traceframes): Replace fatal with internal_error.
7728
34abf635
GB
77292014-08-19 Tom Tromey <tromey@redhat.com>
7730 Gary Benson <gbenson@redhat.com>
7731
7732 * Makefile.in (SFILES): Add common/common-debug.c.
7733 (OBS): Add common-debug.o.
7734 (common-debug.o): New rule.
7735 * debug.h (debug_printf): Don't declare.
7736 * debug.c (debug_printf): Renamed and rewritten as...
7737 (debug_vprintf): New function.
7738
f6e94d78
GB
77392014-08-19 Gary Benson <gbenson@redhat.com>
7740
7741 * utils.h: Do not include print-utils.h.
7742
9239eeab
GB
77432014-08-19 Tom Tromey <tromey@redhat.com>
7744 Gary Benson <gbenson@redhat.com>
7745
7746 * server.h: Add static assertion.
7747 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7748
ef87c8bb
GB
77492014-08-19 Tom Tromey <tromey@redhat.com>
7750 Gary Benson <gbenson@redhat.com>
7751
7752 * Makefile.in (SFILES): Add common/errors.c.
7753 (OBS): Add errors.o.
7754 (IPA_OBS): Add errors-ipa.o.
7755 (errors.o): New rule.
7756 (errors-ipa.o): Likewise.
7757 * utils.h (perror_with_name, error, warning): Don't declare.
7758 * utils.c (warning): Renamed and rewritten as...
7759 (vwarning): New function.
7760 (error): Renamed and rewritten as...
7761 (verror): New function.
7762 (internal_error): Renamed and rewritten as...
7763 (internal_verror): New function.
7764
bb974a24
GB
77652014-08-07 Gary Benson <gbenson@redhat.com>
7766
7767 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7768 * configure: Regenerate.
7769 * config.in: Likewise.
7770 * server.h: Do not include errno.h.
7771 * event-loop.c: Likewise.
7772 * hostio-errno.c: Likewise.
7773 * linux-low.c: Likewise.
7774 * remote-utils.c: Likewise.
7775 * spu-low.c: Likewise.
7776 * utils.c: Likewise.
7777 * gdbreplay.c: Unconditionally include errno.h.
7778
6d3d12eb
GB
77792014-08-07 Gary Benson <gbenson@redhat.com>
7780
7781 * server.h: Do not include string.h.
7782 * event-loop.c: Likewise.
7783 * linux-low.c: Likewise.
7784 * regcache.c: Likewise.
7785 * remote-utils.c: Likewise.
7786 * spu-low.c: Likewise.
7787 * utils.c: Likewise.
7788
dccbb609
GB
77892014-08-07 Gary Benson <gbenson@redhat.com>
7790
7791 * server.h: Do not include gdb_assert.h.
7792
e76df0d0
GB
77932014-08-07 Gary Benson <gbenson@redhat.com>
7794
7795 * server.h: Do not include common-utils.h.
7796
4cb9c816
GB
77972014-08-07 Gary Benson <gbenson@redhat.com>
7798
7799 * server.h: Do not include ptid.h.
7800 * notif.h: Likewise.
7801
3995eeee
GB
78022014-08-07 Gary Benson <gbenson@redhat.com>
7803
7804 * server.h: Do not include gdb_locale.h.
7805
cb9f1a9b
GB
78062014-08-07 Gary Benson <gbenson@redhat.com>
7807
7808 * server.h: Do not include gdb/signals.h.
7809 * win32-low.c: Likewise.
7810
a5fceff8
GB
78112014-08-07 Gary Benson <gbenson@redhat.com>
7812
7813 * server.h: Do not include pathmax.h.
7814
b9391142
GB
78152014-08-07 Gary Benson <gbenson@redhat.com>
7816
7817 * server.h: Do not include libiberty.h.
7818 * linux-bfin-low.c: Likewise.
7819
0e443c87
GB
78202014-08-07 Gary Benson <gbenson@redhat.com>
7821
7822 * server.h: Do not include ansidecl.h.
7823
8ebb3f56
GB
78242014-08-07 Gary Benson <gbenson@redhat.com>
7825
7826 * linux-x86-low.c: Do not include stddef.h.
7827 * lynx-ppc-low.c: Likewise.
7828 * tracepoint.c: Likewise.
7829
8980bdf6
GB
78302014-08-07 Gary Benson <gbenson@redhat.com>
7831
7832 * server.h: Do not include stdarg.h.
7833 * nto-low.c: Likewise.
7834
d7096f71
GB
78352014-08-07 Gary Benson <gbenson@redhat.com>
7836
7837 * server.h: Do not include stdlib.h.
7838 * inferiors.c: Likewise.
7839 * linux-low.c: Likewise.
7840 * regcache.c: Likewise.
7841 * spu-low.c: Likewise.
7842 * tracepoint.c: Likewise.
7843 * utils.c: Likewise.
7844
d02f550d
GB
78452014-08-07 Gary Benson <gbenson@redhat.com>
7846
7847 * server.h: Do not include stdio.h.
7848 * linux-low.c: Likewise.
7849 * remote-utils.c: Likewise.
7850 * spu-low.c: Likewise.
7851 * utils.c: Likewise.
7852 * wincecompat.c: Likewise.
7853
87f6c4e3
GB
78542014-08-06 Gary Benson <gbenson@redhat.com>
7855
7856 * regcache.c (init_register_cache): Move conditionals inside if.
7857
7089dca4
GB
78582014-08-06 Gary Benson <gbenson@redhat.com>
7859
7860 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7861
462f517e
GB
78622014-07-31 Gary Benson <gbenson@redhat.com>
7863
7864 * ax.h: Do not include server.h.
7865 * gdbthread.h: Likewise.
7866 * lynx-low.h: Likewise.
7867 * notif.h: Likewise.
7868
976411d6
GB
78692014-07-30 Gary Benson <gbenson@redhat.com>
7870
7871 * server.h: Include common-defs.h.
7872 Do not include config.h or build-gnulib-gdbserver/config.h.
7873
d41f6d8e
GB
78742014-07-30 Gary Benson <gbenson@redhat.com>
7875
7876 * hostio-errno.c: Move server.h to top of includes list.
7877 * inferiors.c: Likewise.
7878 * linux-x86-low.c: Likewise.
7879 * notif.c: Include server.h.
7880
314c6a35
TT
78812014-07-24 Tom Tromey <tromey@redhat.com>
7882 Gary Benson <gbenson@redhat.com>
7883
7884 * server.h (CORE_ADDR): Now unsigned.
7885
69ff6be5
PA
78862014-07-16 Pedro Alves <palves@redhat.com>
7887
7888 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7889
ce9e3fe7
PA
78902014-07-15 Pedro Alves <palves@redhat.com>
7891
7892 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7893 copy.
7894
e76126e8
PA
78952014-07-11 Pedro Alves <palves@redhat.com>
7896
7897 * linux-low.c (kill_wait_lwp): New function, based on
7898 kill_one_lwp_callback, but use my_waitpid directly.
7899 (kill_one_lwp_callback, linux_kill): Use it.
7900
8e9db26e
PA
79012014-06-23 Pedro Alves <palves@redhat.com>
7902
7903 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7904 before setting DR0..DR3.
7905
698b3e08
GB
79062014-06-20 Gary Benson <gbenson@redhat.com>
7907
7908 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7909 * configure: Regenerated.
7910 * config.in: Likewise.
7911
125f8a3d
GB
79122014-06-20 Gary Benson <gbenson@redhat.com>
7913
7914 * Makefile.in (SFILES): Update locations for files moved
7915 from common to nat.
7916 (object file files): Reordered.
7917
42995dbd
GB
79182014-06-20 Gary Benson <gbenson@redhat.com>
7919
7920 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7921 (i386_dr_low_set_addr): Likewise.
7922 (i386_dr_low_get_addr): Likewise.
7923 (i386_dr_low_can_set_control): Likewise.
7924 (i386_dr_low_set_control): Likewise.
7925 (i386_dr_low_get_control): Likewise.
7926 (i386_dr_low_get_status): Likewise.
7927 (i386_get_debug_register_length): Likewise.
7928 * linux-x86-low.c (i386_dr_low_set_addr):
7929 Changed signature. Made static.
7930 (i386_dr_low_get_addr): Likewise.
7931 (i386_dr_low_set_control): Likewise.
7932 (i386_dr_low_get_control): Likewise.
7933 (i386_dr_low_get_status): Likewise.
7934 (i386_dr_low): New global variable.
7935 * win32-i386-low.c (i386_dr_low_set_addr):
7936 Changed signature. Made static.
7937 (i386_dr_low_get_addr): Likewise.
7938 (i386_dr_low_set_control): Likewise.
7939 (i386_dr_low_get_control): Likewise.
7940 (i386_dr_low_get_status): Likewise.
7941 (i386_dr_low): New global variable.
7942
e1d2394b
MS
79432014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7944
7945 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7946 * Makefile.in (AR, AR_FLAGS): Define.
7947 * configure: Regenerate.
7948
3a8ee006
GB
79492014-06-19 Gary Benson <gbenson@redhat.com>
7950
7951 * Makefile.in (i386-dregs.o): New rule.
7952 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7953 * i386-low.c (target.h): Remove include.
7954 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7955 (DR_CONTROL_SHIFT): Likewise.
7956 (DR_CONTROL_SIZE): Likewise.
7957 (DR_RW_EXECUTE): Likewise.
7958 (DR_RW_WRITE): Likewise.
7959 (DR_RW_READ): Likewise.
7960 (DR_RW_IORW): Likewise.
7961 (DR_LEN_1): Likewise.
7962 (DR_LEN_2): Likewise.
7963 (DR_LEN_4): Likewise.
7964 (DR_LEN_8): Likewise.
7965 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7966 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7967 (DR_ENABLE_SIZE): Likewise.
7968 (DR_LOCAL_SLOWDOWN): Likewise.
7969 (DR_GLOBAL_SLOWDOWN): Likewise.
7970 (DR_CONTROL_RESERVED): Likewise.
7971 (I386_DR_CONTROL_MASK): Likewise.
7972 (I386_DR_VACANT): Likewise.
7973 (I386_DR_LOCAL_ENABLE): Likewise.
7974 (I386_DR_GLOBAL_ENABLE): Likewise.
7975 (I386_DR_DISABLE): Likewise.
7976 (I386_DR_SET_RW_LEN): Likewise.
7977 (I386_DR_GET_RW_LEN): Likewise.
7978 (I386_DR_WATCH_HIT): Likewise.
7979 (i386_wp_op_t): Likewise.
7980 (i386_show_dr): Likewise.
7981 (i386_length_and_rw_bits): Likewise.
7982 (i386_insert_aligned_watchpoint): Likewise.
7983 (i386_remove_aligned_watchpoint): Likewise.
7984 (i386_handle_nonaligned_watchpoint): Likewise.
7985 i386_update_inferior_debug_regs(): Likewise.
7986 (i386_dr_insert_watchpoint): Likewise.
7987 (i386_dr_remove_watchpoint): Likewise.
7988 (i386_dr_region_ok_for_watchpoint): Likewise.
7989 (i386_dr_stopped_data_address): Likewise.
7990 (i386_dr_stopped_by_watchpoint): Likewise.
7991
8f26655c
GB
79922014-06-19 Gary Benson <gbenson@redhat.com>
7993
7994 * i386-low.c (i386_dr_show): Renamed to
7995 i386_show_dr and made static. All uses updated.
7996 (i386_dr_length_and_rw_bits): Renamed to
7997 i386_length_and_rw_bits and made static.
7998 All uses updated.
7999 (i386_dr_insert_aligned_watchpoint): Renamed to
8000 i386_insert_aligned_watchpoint and made static.
8001 All uses updated.
8002 (i386_dr_remove_aligned_watchpoint): Renamed to
8003 i386_remove_aligned_watchpoint and made static.
8004 All uses updated.
8005 (i386_dr_update_inferior_debug_regs): Renamed to
8006 i386_update_inferior_debug_regs and made static.
8007 All uses updated.
8008
b9228891
GB
80092014-06-18 Gary Benson <gbenson@redhat.com>
8010
5171def3
GB
8011 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8012 (i386_dr_low_can_set_control): Likewise.
8013 (i386_get_debug_register_length): Likewise.
8014 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8015 (i386_dr_low_can_set_control): Likewise.
8016 (i386_get_debug_register_length): Likewise.
8017
80182014-06-17 Gary Benson <gbenson@redhat.com>
8019
b9228891
GB
8020 * i386-low.h (i386-dregs.h): New include.
8021 (DR_FIRSTADDR): Now in i386-dregs.h.
8022 (DR_LASTADDR): Likewise.
8023 (DR_NADDR): Likewise.
8024 (DR_STATUS): Likewise.
8025 (DR_CONTROL): Likewise.
8026 (i386_debug_reg_state): Likewise.
8027 (i386_dr_insert_watchpoint): Likewise.
8028 (i386_dr_remove_watchpoint): Likewise.
8029 (i386_dr_region_ok_for_watchpoint): Likewise.
8030 (i386_dr_stopped_data_address): Likewise.
8031 (i386_dr_stopped_by_watchpoint): Likewise.
8032 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8033
4be83cc2
GB
80342014-06-18 Gary Benson <gbenson@redhat.com>
8035
8036 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8037 i386_dr_insert_watchpoint.
8038 (i386_low_remove_watchpoint): Renamed to
8039 i386_dr_remove_watchpoint.
8040 (i386_low_region_ok_for_watchpoint): Renamed to
8041 i386_dr_region_ok_for_watchpoint.
8042 (i386_low_stopped_data_address): Renamed to
8043 i386_dr_stopped_data_address.
8044 (i386_low_stopped_by_watchpoint): Renamed to
8045 i386_dr_stopped_by_watchpoint.
8046 * i386-low.c (i386_show_dr): Renamed to
8047 i386_dr_show and made nonstatic. All uses updated.
8048 (i386_length_and_rw_bits): Renamed to
8049 i386_dr_length_and_rw_bits and made nonstatic.
8050 All uses updated.
8051 (i386_insert_aligned_watchpoint): Renamed to
8052 i386_dr_insert_aligned_watchpoint and made nonstatic.
8053 All uses updated.
8054 (i386_remove_aligned_watchpoint): Renamed to
8055 i386_dr_remove_aligned_watchpoint and made nonstatic.
8056 All uses updated.
8057 (i386_update_inferior_debug_regs): Renamed to
8058 i386_dr_update_inferior_debug_regs and made nonstatic.
8059 All uses updated.
8060 (i386_low_insert_watchpoint): Renamed to
8061 i386_dr_insert_watchpoint. All uses updated.
8062 (i386_low_remove_watchpoint): Renamed to
8063 i386_dr_remove_watchpoint. All uses updated.
8064 (i386_low_region_ok_for_watchpoint): Renamed to
8065 i386_dr_region_ok_for_watchpoint. All uses updated.
8066 (i386_low_stopped_data_address): Renamed to
8067 i386_dr_stopped_data_address. All uses updated.
8068 (i386_low_stopped_by_watchpoint): Renamed to
8069 i386_dr_stopped_by_watchpoint. All uses updated.
8070
131aa0d4
GB
80712014-06-18 Gary Benson <gbenson@redhat.com>
8072
8073 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8074 (i386_dr_low_can_set_control): Likewise.
8075 (i386_insert_aligned_watchpoint): New check.
8076
d9305f7f
GB
80772014-06-18 Gary Benson <gbenson@redhat.com>
8078
8079 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8080 Renamed to state.
8081
e927c9fc
GB
80822014-06-18 Gary Benson <gbenson@redhat.com>
8083
8084 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8085 instead of fatal and error.
8086 (i386_handle_nonaligned_watchpoint): Likewise.
8087
1b6d4134
GB
80882014-06-18 Gary Benson <gbenson@redhat.com>
8089
8090 * i386-low.c (i386_get_debug_register_length): New macro.
8091 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8092 (i386_show_dr): Use debug_printf instead of fprintf. Use
8093 phex to format values.
8094
6e62758f
GB
80952014-06-18 Gary Benson <gbenson@redhat.com>
8096
8097 * i386-low.h: Comment changes.
8098 * i386-low.c: Likewise.
8099
fc6e2f03
GB
81002014-06-18 Gary Benson <gbenson@redhat.com>
8101
8102 * i386-low.c: Whitespace changes.
8103
f9d1eeed
TT
81042014-06-12 Tom Tromey <tromey@redhat.com>
8105
8106 * utils.c (freeargv): Remove.
8107
0b04e523
TT
81082014-06-12 Tom Tromey <tromey@redhat.com>
8109
8110 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8111 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8112 (parse_debug_format_options): Likewise.
8113 (gdbserver_usage): Likewise.
8114 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8115 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8116 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8117 against libiberty.
8118 ($(LIBGNU)): Depend on libiberty.
8119 (all-lib): Recurse into all subdirs.
8120 (install-only): Invoke "install" target in subdirs.
8121 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8122 targets.
8123 * configure: Rebuild.
8124 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8125 for vasprintf, vsnprintf, or gettimeofday.
8126 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8127 srv_tgtobj.
8128
270c9937
JB
81292014-06-05 Joel Brobecker <brobecker@adacore.com>
8130
8131 * development.sh: Delete.
8132 * Makefile.in (config.status): Adjust dependency on development.sh.
8133 * configure.ac: Adjust development.sh source call.
8134 * configure: Regenerate.
8135
0a261ed8
PA
81362014-06-02 Pedro Alves <palves@redhat.com>
8137
8138 * ax.c (gdb_free_agent_expr): New function.
8139 * ax.h (gdb_free_agent_expr): New declaration.
8140 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8141 list.
8142 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8143 static.
8144 (clear_breakpoint_conditions_and_commands): New function.
8145 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8146 (clear_breakpoint_conditions_and_commands): New declaration.
8147
e9dae05e
RR
81482014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8149
8150 * linux-aarch64-low.c (asm/ptrace.h): Include.
8151
5876f503
JK
81522014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8153
8154 Fix TLS access for -static -pthread.
8155 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8156 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8157 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8158
802e8e6d
PA
81592014-05-20 Pedro Alves <palves@redhat.com>
8160
8161 * linux-aarch64-low.c (aarch64_insert_point)
8162 (aarch64_remove_point): No longer check whether the type is
8163 supported here. Adjust to new interface.
8164 (the_low_target): Install aarch64_supports_z_point_type as
8165 supports_z_point_type method.
8166 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8167 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8168 instead of a Z packet char. Adjust.
8169 (arm_supports_z_point_type): New function.
8170 (arm_insert_point, arm_remove_point): Adjust to new interface.
8171 (the_low_target): Install arm_supports_z_point_type.
8172 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8173 (cris_insert_point, cris_remove_point): Adjust to new interface.
8174 Don't check whether the type is supported here.
8175 (the_low_target): Install cris_supports_z_point_type.
8176 * linux-low.c (linux_supports_z_point_type): New function.
8177 (linux_insert_point, linux_remove_point): Adjust to new interface.
8178 * linux-low.h (struct linux_target_ops) <insert_point,
8179 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8180 raw_breakpoint pointer parameter.
8181 <supports_z_point_type>: New method.
8182 * linux-mips-low.c (mips_supports_z_point_type): New function.
8183 (mips_insert_point, mips_remove_point): Adjust to new interface.
8184 Use mips_supports_z_point_type.
8185 (the_low_target): Install mips_supports_z_point_type.
8186 * linux-ppc-low.c (the_low_target): Install NULL as
8187 supports_z_point_type method.
8188 * linux-s390-low.c (the_low_target): Install NULL as
8189 supports_z_point_type method.
8190 * linux-sparc-low.c (the_low_target): Install NULL as
8191 supports_z_point_type method.
8192 * linux-x86-low.c (x86_supports_z_point_type): New function.
8193 (x86_insert_point): Adjust to new insert_point interface. Use
8194 insert_memory_breakpoint. Adjust to new
8195 i386_low_insert_watchpoint interface.
8196 (x86_remove_point): Adjust to remove_point interface. Use
8197 remove_memory_breakpoint. Adjust to new
8198 i386_low_remove_watchpoint interface.
8199 (the_low_target): Install x86_supports_z_point_type.
8200 * lynx-low.c (lynx_target_ops): Install NULL as
8201 supports_z_point_type callback.
8202 * nto-low.c (nto_supports_z_point_type): New.
8203 (nto_insert_point, nto_remove_point): Adjust to new interface.
8204 (nto_target_ops): Install nto_supports_z_point_type.
8205 * mem-break.c: Adjust intro comment.
8206 (struct raw_breakpoint) <raw_type, size>: New fields.
8207 <inserted>: Update comment.
8208 <shlib_disabled>: Delete field.
8209 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8210 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8211 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8212 (raw_bkpt_type_to_target_hw_bp_type): New function.
8213 (find_enabled_raw_code_breakpoint_at): New function.
8214 (find_raw_breakpoint_at): New type and size parameters. Use them.
8215 (insert_memory_breakpoint): New function, based off
8216 set_raw_breakpoint_at.
8217 (remove_memory_breakpoint): New function.
8218 (set_raw_breakpoint_at): Reimplement.
8219 (set_breakpoint): New, based on set_breakpoint_at.
8220 (set_breakpoint_at): Reimplement.
8221 (delete_raw_breakpoint): Go through the_target->remove_point
8222 instead of assuming memory breakpoints.
8223 (find_gdb_breakpoint_at): Delete.
8224 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8225 (find_gdb_breakpoint): New function.
8226 (set_gdb_breakpoint_at): Delete.
8227 (z_type_supported): New function.
8228 (set_gdb_breakpoint_1): New function, loosely based off
8229 set_gdb_breakpoint_at.
8230 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8231 (delete_gdb_breakpoint_at): Delete.
8232 (delete_gdb_breakpoint_1): New function, loosely based off
8233 delete_gdb_breakpoint_at.
8234 (delete_gdb_breakpoint): New function.
8235 (clear_gdb_breakpoint_conditions): Rename to ...
8236 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8237 breakpoint.
8238 (add_condition_to_breakpoint): Make static.
8239 (add_breakpoint_condition): Take a struct breakpoint pointer
8240 instead of an address. Adjust.
8241 (gdb_condition_true_at_breakpoint): Rename to ...
8242 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8243 z_type parameter.
8244 (gdb_condition_true_at_breakpoint): Reimplement.
8245 (add_breakpoint_commands): Take a struct breakpoint pointer
8246 instead of an address. Adjust.
8247 (gdb_no_commands_at_breakpoint): Rename to ...
8248 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8249 parameter. Return true if no breakpoint was found. Change debug
8250 output.
8251 (gdb_no_commands_at_breakpoint): Reimplement.
8252 (run_breakpoint_commands): Rename to ...
8253 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8254 and change return type to boolean.
8255 (run_breakpoint_commands): New function.
8256 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8257 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8258 breakpoint. Go through the_target->remove_point instead of
8259 assuming memory breakpoint.
8260 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8261 software and hardware breakpoints.
8262 (reinsert_raw_breakpoint): Go through the_target->insert_point
8263 instead of assuming memory breakpoint.
8264 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8265 software and hardware breakpoints.
8266 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8267 Check both software and hardware breakpoints.
8268 (validate_inserted_breakpoint): Assert the breakpoint is a
8269 software breakpoint. Set the inserted flag to -1 instead of
8270 setting shlib_disabled.
8271 (delete_disabled_breakpoints): Adjust.
8272 (validate_breakpoints): Only validate software breakpoints.
8273 Adjust to inserted flag change.
8274 (check_mem_read, check_mem_write): Skip breakpoint types other
8275 than software breakpoints. Adjust to inserted flag change.
8276 * mem-break.h (enum raw_bkpt_type): New enum.
8277 (raw_breakpoint, struct process_info): Forward declare.
8278 (Z_packet_to_target_hw_bp_type): Delete declaration.
8279 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8280 (set_gdb_breakpoint, delete_gdb_breakpoint)
8281 (clear_breakpoint_conditions): New declarations.
8282 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8283 (breakpoint_inserted_here): Update comment.
8284 (add_breakpoint_condition, add_breakpoint_commands): Replace
8285 address parameter with a breakpoint pointer parameter.
8286 (gdb_breakpoint_here): Update comment.
8287 (delete_gdb_breakpoint_at): Delete.
8288 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8289 * server.c (process_point_options): Take a struct breakpoint
8290 pointer instead of an address. Adjust.
8291 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8292 delete_gdb_breakpoint.
8293 * spu-low.c (spu_target_ops): Install NULL as
8294 supports_z_point_type method.
8295 * target.h: Include mem-break.h.
8296 (struct target_ops) <prepare_to_access_memory>: Update comment.
8297 <supports_z_point_type>: New field.
8298 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8299 instead of a char. Also take a raw breakpoint pointer.
8300 * win32-arm-low.c (the_low_target): Install NULL as
8301 supports_z_point_type.
8302 * win32-i386-low.c (i386_supports_z_point_type): New function.
8303 (i386_insert_point, i386_remove_point): Adjust to new interface.
8304 (the_low_target): Install i386_supports_z_point_type.
8305 * win32-low.c (win32_supports_z_point_type): New function.
8306 (win32_insert_point, win32_remove_point): Adjust to new interface.
8307 (win32_target_ops): Install win32_supports_z_point_type.
8308 * win32-low.h (struct win32_target_ops):
8309 <supports_z_point_type>: New method.
8310 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8311 instead of a char. Also take a raw breakpoint pointer.
8312
932539e3
PA
83132014-05-20 Pedro Alves <palves@redhat.com>
8314
8315 * mem-break.h: Include break-common.h.
8316 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8317 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8318 (Z_packet_to_target_hw_bp_type): New declaration.
8319 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8320 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8321 (Z_PACKET_ACCESS_WP): Delete macros.
8322 (Z_packet_to_hw_type): Delete function.
8323 * i386-low.h: Don't include break-common.h here.
8324 (Z_packet_to_hw_type): Delete declaration.
8325 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8326 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8327 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8328 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8329 * linux-aarch64-low.c: Don't include break-common.h here.
8330 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8331 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8332 (Z_packet_to_target_hw_bp_type): Delete function.
8333 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8334 function.
8335 (mips_insert_point, mips_remove_point): Use
8336 Z_packet_to_target_hw_bp_type.
8337
4ff0d3d8
PA
83382014-05-20 Pedro Alves <palves@redhat.com>
8339
8340 * linux-aarch64-low.c: Include break-common.h.
8341 (enum target_point_type): Delete.
8342 (Z_packet_to_point_type): Rename to ...
8343 (Z_packet_to_target_hw_bp_type): ... this, and return a
8344 target_hw_bp_type instead.
8345 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8346 instead of an enum target_point_type.
8347 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8348 breakpoint type.
8349 (aarch64_dr_state_insert_one_point)
8350 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8351 (aarch64_handle_aligned_watchpoint)
8352 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8353 Take an enum target_hw_bp_type instead of an enum
8354 target_point_type.
8355 (aarch64_supports_z_point_type): New function.
8356 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8357 use Z_packet_to_target_hw_bp_type.
8358
786dc519
JB
83592014-05-20 Joel Brobecker <brobecker@adacore.com>
8360
8361 * configure.ac: Only use -Werror by default when DEVELOPMENT
8362 is true.
8363 * configure: Regenerate.
8364
9e0aa64f
JK
83652014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8366
8367 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8368 * linux-x86-low.c (X86_64_USER_REGS): New.
8369 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8370
2b577b92
YQ
83712014-04-28 Yao Qi <yao@codesourcery.com>
8372
8373 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8374 name.
8375
94611da2
PA
83762014-04-25 Pedro Alves <palves@redhat.com>
8377
8378 PR server/16255
8379 * linux-low.c (linux_attach_fail_reason_string): New function.
8380 (linux_attach_lwp): Delete.
8381 (linux_attach_lwp_1): Rename to ...
8382 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8383 argument. Remove "initial" parameter. Return int instead of
8384 void. Don't error or warn here.
8385 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8386 failure to attach to the tgid. Call warning when failing to
8387 attach to an lwp.
8388 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8389 argument. Remove "initial" parameter. Return int instead of
8390 void. Don't error or warn here.
8391 (linux_attach_fail_reason_string): New declaration.
8392 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8393 interface change. Use linux_attach_fail_reason_string.
8394
01f9f808
MS
83952014-04-24 Michael Sturm <michael.sturm@mintel.com>
8396 Walfred Tedeschi <walfred.tedeschi@intel.com>
8397
8398 * Makefile.in: Added rules to handle new files
8399 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8400 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8401 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8402 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8403 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8404 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8405 x32-avx512-linux.o.
8406 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8407 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8408 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8409 i386/x32-avx512.xml.
8410 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8411 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8412 i386/x32-avx512-linux.xml.
8413 * i387-fp.c (num_avx512_k_registers): New constant for number
8414 of K registers.
8415 (num_avx512_zmmh_low_registers): New constant for number of
8416 lower ZMM registers (0-15).
8417 (num_avx512_zmmh_high_registers): New constant for number of
8418 higher ZMM registers (16-31).
8419 (num_avx512_ymmh_registers): New contant for number of higher
8420 YMM registers (ymm16-31 added by avx521 on x86_64).
8421 (num_avx512_xmm_registers): New constant for number of higher
8422 XMM registers (xmm16-31 added by AVX512 on x86_64).
8423 (struct i387_xsave): Add space for AVX512 registers.
8424 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8425 Add code to handle AVX512 registers.
8426 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8427 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8428 prototypei from generated file.
8429 (tdesc_amd64_avx512_linux): Likewise.
8430 (init_registers_x32_avx512_linux): Likewise.
8431 (tdesc_x32_avx512_linux): Likewise.
8432 (init_registers_i386_avx512_linux): Likewise.
8433 (tdesc_i386_avx512_linux): Likewise.
8434 (x86_64_regmap): Add AVX512 registers.
8435 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8436 mask.
8437 (initialize_low_arch): Add code to initialize AVX512 registers.
8438
51aa91f9
PA
84392014-04-23 Pedro Alves <palves@redhat.com>
8440
8441 * mem-break.c (find_gdb_breakpoint_at): Make static.
8442 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8443
a4165e94
PA
84442014-04-23 Pedro Alves <palves@redhat.com>
8445
8446 * i386-low.c: Don't include break-common.h here.
8447 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8448 prototype to take target_hw_bp_type as argument instead of a Z
8449 packet char.
8450 * i386-low.h: Include break-common.h here.
8451 (Z_packet_to_hw_type): Declare.
8452 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8453 prototypes.
8454 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8455 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8456 (x86_remove_point): Convert the packet number to a
8457 target_hw_bp_type before calling i386_low_remove_watchpoint.
8458 * win32-i386-low.c (i386_insert_point): Convert the packet number
8459 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8460 (i386_remove_point): Convert the packet number to a
8461 target_hw_bp_type before calling i386_low_remove_watchpoint.
8462
b8acf843
PA
84632014-04-23 Pedro Alves <palves@redhat.com>
8464
8465 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8466
d708bcd1
PA
84672014-04-10 Pedro Alves <palves@redhat.com>
8468
8469 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8470 Check if the condition or command is NULL before checking if the
8471 breakpoint is known. On success, return true.
8472 * mem-break.h (add_breakpoint_condition): Document return.
8473 (add_breakpoint_commands): Add describing comment.
8474 * server.c (skip_to_semicolon): New function.
8475 (process_point_options): Use it.
8476
2eec7d5b
PA
84772014-04-09 Pedro Alves <palves@redhat.com>
8478
8479 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8480 to lwpid_of.
8481
fa96cb38
PA
84822014-02-27 Pedro Alves <palves@redhat.com>
8483
8484 PR 12702
8485 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8486 macros.
8487 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8488 output.
8489 (last_thread_of_process_p): Take a PID argument instead of a
8490 thread pointer.
8491 (linux_wait_for_lwp): Delete.
8492 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8493 functions.
8494 (linux_low_filter_event): New function, party factored out from
8495 linux_wait_for_event.
8496 (linux_wait_for_event): Rename to ...
8497 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8498 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8499 sigsuspend. Check for zombie leaders.
8500 (linux_wait_for_event): Reimplement as wrapper around
8501 linux_wait_for_event_filtered.
8502 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8503 a normal or signal exit is seen, it's the whole process exiting.
8504 (wait_for_sigstop): No longer a for_each_inferior callback.
8505 Rewrite on top of linux_wait_for_event_filtered.
8506 (stop_all_lwps): Call wait_for_sigstop directly.
8507 * server.c (resume, handle_target_event): Handle
8508 TARGET_WAITKIND_NO_RESUMED.
8509
d763de10
JB
85102014-02-26 Joel Brobecker <brobecker@adacore.com>
8511
8512 * win32-low.c (psapi_get_dll_name,
8513 * win32_CreateToolhelp32Snapshot): Delete.
8514 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8515 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8516 Delete.
8517 (handle_load_dll): Add function description.
8518 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8519
850a0f76
JB
85202014-02-26 Joel Brobecker <brobecker@adacore.com>
8521
8522 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8523 Add comment.
8524 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8525 base address when calling win32_add_one_solib.
8526 (handle_load_dll): Delete local variable load_addr.
8527 Remove 0x1000 offset applied to DLL base address when calling
8528 win32_add_one_solib.
8529 (handle_unload_dll): Add comment.
8530
f25b3fc3
JB
85312014-02-26 Joel Brobecker <brobecker@adacore.com>
8532
8533 * win32-low.c (win32_add_all_dlls): Renames
8534 win32_ensure_ntdll_loaded. Rewrite function documentation.
8535 Adjust implementation to always load all DLLs.
8536 Add 0x1000 offset to DLL base address when calling
8537 win32_add_one_solib.
8538 (child_initialization_done): New static global.
8539 (do_initial_child_stuff): Set child_initialization_done to
8540 zero during child initialization, and 1 after. Replace call
8541 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8542 Add comment.
8543 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8544 (handle_unload_dll): Add function documentation.
8545 (get_child_debug_event): Ignore load and unload DLL events
8546 during child initialization.
8547
d86d4aaf
DE
85482014-02-20 Doug Evans <dje@google.com>
8549
3bc32da3 8550 Remove global all_lwps.
d86d4aaf
DE
8551 * inferiors.h (ptid_of): Move here from linux-low.h.
8552 (pid_of, lwpid_of): Ditto.
8553 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8554 parameter is a struct thread_info * now.
8555 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8556 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8557 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8558 directly.
8559 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8560 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8561 * linux-arm-low.c (update_registers_callback): Update, "entry"
8562 parameter is a struct thread_info * now.
8563 Fetch lwpid from current_inferior directly.
8564 (arm_insert_point): Pass &all_threads to find_inferior instead of
8565 &all_lwps.
8566 (arm_remove_point): Ditto.
8567 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8568 (arm_prepare_to_resume): Fetch pid from thread.
8569 (arm_read_description): Fetch lwpid from current_inferior directly.
8570 * linux-low.c (all_lwps): Delete.
8571 (delete_lwp): Delete call to remove_inferior.
8572 (handle_extended_wait): Fetch lwpid from thread.
8573 (add_lwp): Don't set lwp->entry.id. Remove call to
8574 add_inferior_to_list.
8575 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8576 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8577 (kill_one_lwp_callback): Ditto.
8578 (linux_kill): Don't dereference NULL pointer.
8579 Fetch ptid,lwpid from thread.
8580 (get_detach_signal): Fetch ptid from thread.
8581 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8582 Simplify call to regcache_invalidate_thread.
8583 (delete_lwp_callback): Update, "entry" parameter is a
8584 struct thread_info * now. Fetch pid from thread.
8585 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8586 (status_pending_p_callback): Update, "entry" parameter is a
8587 struct thread_info * now. Fetch ptid from thread.
8588 (find_lwp_pid): Update, "entry" parameter is a
8589 struct thread_info * now.
8590 (linux_wait_for_lwp): Fetch pid from thread.
8591 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8592 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8593 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8594 (dequeue_one_deferred_signal): Ditto.
8595 (cancel_breakpoint): Fetch ptid from current_inferior.
8596 (linux_wait_for_event): Pass &all_threads to find_inferior,
8597 not &all_lwps. Fetch ptid, lwpid from thread.
8598 (count_events_callback): Update, "entry" parameter is a
8599 struct thread_info * now.
8600 (select_singlestep_lwp_callback): Ditto.
8601 (select_event_lwp_callback): Ditto.
8602 (cancel_breakpoints_callback): Ditto.
8603 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8604 not &all_lwps.
8605 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8606 (unsuspend_one_lwp): Update, "entry" parameter is a
8607 struct thread_info * now.
8608 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8609 not &all_lwps.
8610 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8611 Fetch lwpid from thread, not lwp.
8612 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8613 Pass &all_threads to find_inferior, not &all_lwps.
8614 (send_sigstop): Fetch lwpid from thread, not lwp.
8615 (send_sigstop_callback): Update, "entry" parameter is a
8616 struct thread_info * now.
8617 (suspend_and_send_sigstop_callback): Ditto.
8618 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8619 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8620 struct thread_info * now.
8621 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8622 from thread, lwp.
8623 (lwp_running): Update, "entry" parameter is a
8624 struct thread_info * now.
8625 (stop_all_lwps): Fetch ptid from thread.
8626 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8627 (linux_resume_one_lwp): Fetch lwpid from thread.
8628 (linux_set_resume_request): Update, "entry" parameter is a
8629 struct thread_info * now. Fetch pid, lwpid from thread.
8630 (resume_status_pending_p): Update, "entry" parameter is a
8631 struct thread_info * now.
8632 (need_step_over_p): Ditto. Fetch lwpid from thread.
8633 (start_step_over): Fetch lwpid from thread.
8634 (linux_resume_one_thread): Update, "entry" parameter is a
8635 struct thread_info * now. Fetch lwpid from thread.
8636 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8637 (proceed_one_lwp): Update, "entry" parameter is a
8638 struct thread_info * now. Fetch lwpid from thread.
8639 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8640 struct thread_info * now.
8641 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8642 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8643 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8644 directly.
8645 (regsets_store_inferior_registers): Ditto.
8646 (fetch_register, store_register): Ditto.
8647 (linux_read_memory, linux_write_memory): Ditto.
8648 (linux_request_interrupt): Ditto.
8649 (linux_read_auxv): Ditto.
8650 (linux_xfer_siginfo): Ditto.
8651 (linux_qxfer_spu): Ditto.
8652 (linux_qxfer_libraries_svr4): Ditto.
8653 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8654 moved to inferiors.h.
8655 (get_lwp): Delete.
8656 (get_thread_lwp): Update.
8657 (struct lwp_info): Delete member "entry". Simplify comment for
8658 member "thread".
8659 (all_lwps): Delete.
8660 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8661 current_inferior directly.
8662 (update_watch_registers_callback): Update, "entry" parameter is a
8663 struct thread_info * now. Fetch pid from thread.
8664 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8665 (mips_insert_point): Fetch lwpid from current_inferior.
8666 Pass &all_threads to find_inferior, not &all_lwps.
8667 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8668 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8669 directly.
8670 (mips_stopped_data_address): Ditto.
8671 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8672 directly.
8673 * linux-tile-low.c (tile_arch_setup): Ditto.
8674 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8675 (update_debug_registers_callback): Update, "entry" parameter is a
8676 struct thread_info * now. Fetch pid from thread.
8677 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8678 Pass &all_threads to find_inferior, not &all_lwps.
8679 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8680 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8681 Pass &all_threads to find_inferior, not &all_lwps.
8682 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8683 (i386_dr_low_get_status): Ditto.
8684 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8685 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8686 (x86_linux_read_description): Ditto.
8687 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8688
3b8361aa
DE
86892014-02-20 Doug Evans <dje@google.com>
8690
8691 * inferiors.c (get_first_inferior): Fix buglet.
8692
f7667f0d
DE
86932014-02-19 Doug Evans <dje@google.com>
8694
8695 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8696 * inferiors.c (add_thread): Change result type to struct thread_info *.
8697 All callers updated.
8698 (add_lwp): Call add_thread here instead of in callers.
8699 All callers updated.
8700 * linux-low.h (get_lwp_thread): Rewrite.
8701 (struct lwp_info): New member "thread".
8702
b3312d80
DE
87032014-02-19 Doug Evans <dje@google.com>
8704
8705 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8706 All callers updated.
8707
ecc6f45c
DE
87082014-02-19 Doug Evans <dje@google.com>
8709
8710 * inferiors.c (add_thread): Fix whitespace.
8711
649ebbca
DE
87122014-02-19 Doug Evans <dje@google.com>
8713
8714 * dll.c (clear_dlls): Replace accessing list implemention details
8715 with API function.
8716 * gdbthread.h (get_first_thread): Declare.
8717 * inferiors.c (for_each_inferior_with_data): New function.
8718 (get_first_thread): New function.
8719 (find_thread_ptid): Simplify.
8720 (get_first_inferior): New function.
8721 (clear_list): Delete.
8722 (one_inferior_p): New function.
8723 (clear_inferior_list): New function.
8724 (clear_inferiors): Update.
8725 * inferiors.h (for_each_inferior_with_data): Declare.
8726 (clear_inferior_list): Declare.
8727 (one_inferior_p): Declare.
8728 (get_first_inferior): Declare.
8729 * linux-low.c (linux_wait_for_event): Replace accessing list
8730 implemention details with API function.
8731 * server.c (target_running): Ditto.
8732 (accumulate_file_name_length): New function.
8733 (emit_dll_description): New function.
8734 (handle_qxfer_libraries): Replace accessing list implemention
8735 details with API function.
8736 (handle_qxfer_threads_worker): New function.
8737 (handle_qxfer_threads_proper): Replace accessing list implemention
8738 details with API function.
8739 (handle_query): Ditto.
8740 (visit_actioned_threads_callback_ftype): New typedef.
8741 (visit_actioned_threads_data): New struct.
8742 (visit_actioned_threads): Rewrite to be find_inferior callback.
8743 (resume): Call find_inferior.
8744 (handle_status): Replace accessing list implemention
8745 details with API function.
8746 (process_serial_event): Replace accessing list implemention details
8747 with API function.
8748 * target.c (set_desired_inferior): Replace accessing list implemention
8749 details with API function.
8750 * tracepoint.c (same_process_p): New function.
8751 (gdb_agent_about_to_close): Replace accessing list implemention
8752 details with API function.
8753 * win32-low.c (child_delete_thread): Replace accessing list
8754 implemention details with API function.
8755 (match_dll_by_basename): New function.
8756 (dll_is_loaded_by_basename): New function.
8757 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8758 details call to dll_is_loaded_by_basename.
8759
80894984
DE
87602014-02-19 Doug Evans <dje@google.com>
8761
8762 * dll.h (struct dll_info): Add comment.
8763 * gdbthread.h (struct thread_info): Add comment.
8764 (current_ptid): Simplify.
8765 * inferiors.c (add_process): Update.
8766 (remove_process): Update.
8767 * inferiors.h (struct process_info): Rename member "head" to "entry".
8768 * linux-low.c (delete_lwp): Update.
8769 (add_lwp): Update.
8770 (last_thread_of_process_p): Update.
8771 (kill_one_lwp_callback, linux_kill): Update.
8772 (status_pending_p_callback): Update.
8773 (wait_for_sigstop): Update. Simplify read of ptid.
8774 (start_step_over): Update.
8775 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8776 (get_lwp_thread): Update.
8777 (struct lwp_info): Rename member "head" to "entry".
8778 * regcache.h (inferior_list_entry): Delete.
8779 * server.c (kill_inferior_callback): Update.
8780 (detach_or_kill_inferior_callback): Update.
8781 (print_started_pid): Update.
8782 (print_attached_pid): Update.
8783 (process_serial_event): Simplify read of ptid.
8784 * thread-db.c (thread_db_create_event): Update.
8785 (thread_db_get_tls_address): Update.
8786 * win32-low.c (current_inferior_ptid): Simplify.
8787
46917d26
TT
87882014-02-19 Tom Tromey <tromey@redhat.com>
8789
8790 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8791 argument.
8792 (target_supports_btrace): Update.
8793
0759a81e
YQ
87942014-02-14 Yao Qi <yao@codesourcery.com>
8795
8796 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8797 (rsp-low-ipa.o): New target.
8798
a7191e8b
TT
87992014-02-12 Tom Tromey <tromey@redhat.com>
8800
8801 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8802 convert_ascii_to_int.
8803 * regcache.c (registers_to_string): Likewise.
8804 * remote-utils.c (decode_M_packet): Likewise.
8805 * server.c (process_serial_event): Likewise.
8806
ff0e980e
TT
88072014-02-12 Tom Tromey <tromey@redhat.com>
8808
8809 * server.c (handle_query, handle_v_run): Use hex2bin, not
8810 unhexify.
8811 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8812
e9371aff
TT
88132014-02-12 Tom Tromey <tromey@redhat.com>
8814
8815 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8816 convert_int_to_ascii.
8817 * regcache.c (registers_to_string, collect_register_as_string):
8818 Likewise.
8819 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8820 Likewise.
8821 * server.c (process_serial_event): Likewise.
8822 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8823 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8824
971dc0b8
TT
88252014-02-12 Tom Tromey <tromey@redhat.com>
8826
8827 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8828 bin2hex, not hexify.
8829 * tracepoint.c (cmd_qtstatus): Likewise.
8830
0a822afb
TT
88312014-02-12 Tom Tromey <tromey@redhat.com>
8832
8833 * remote-utils.c (monitor_output): Pass explicit length to
8834 hexify.
8835
9c3d6531
TT
88362014-02-12 Tom Tromey <tromey@redhat.com>
8837
8838 * tracepoint.c: Include rsp-low.h.
8839 * server.c: Include rsp-low.h.
8840 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8841 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8842 declare.
8843 * remote-utils.c: Include rsp-low.h.
8844 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8845 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8846 (convert_int_to_ascii, convert_ascii_to_int): Move to
8847 common/rsp-low.c.
8848 * regcache.c: Include rsp-low.h.
8849 * ax.c: Include rsp-low.h.
8850 * Makefile.in (SFILES): Add common/rsp-low.c.
8851 (OBS): Add rsp-low.o.
8852 (rsp-low.o): New target.
8853
01fd3ea5
TT
88542014-02-12 Tom Tromey <tromey@redhat.com>
8855
8856 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8857 Include print-utils.h.
8858 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8859 (plongest, thirty_two, phex_nz): Remove.
8860 * Makefile.in (SFILES): Add common/print-utils.c.
8861 (OBS): Add print-utils.o.
8862 (print-utils-ipa.o): New target.
8863 (print-utils.o): New target.
8864 (IPA_OBJS): Add print-utils-ipa.o.
8865
e99dc820
TT
88662014-02-06 Tom Tromey <tromey@redhat.com>
8867
8868 * Makefile.in (SFILES): Fix indentation.
8869
ee1e2d4f
DE
88702014-02-05 Doug Evans <dje@google.com>
8871
8872 * linux-low.c (linux_wait_for_event): Improve comment.
8873 (linux_wait_1): Keep current_inferior in sync with event_child.
8874
f5a02773
DE
88752014-01-22 Doug Evans <dje@google.com>
8876
8877 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8878
87ce2a04
DE
88792014-01-22 Doug Evans <dje@google.com>
8880
8881 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8882 * configure: Regenerate.
8883 * config.in: Regenerate.
8884 * Makefile.in (SFILES): Add debug.c.
8885 (OBS): Add debug.o.
8886 * debug.c: New file.
8887 * debug.h: New file.
8888 * linux-aarch64-low.c (*): Update all debugging printfs to use
8889 debug_printf instead of fprintf.
8890 * linux-arm-low.c (*): Ditto.
8891 * linux-cris-low.c (*): Ditto.
8892 * linux-crisv32-low.c (*): Ditto.
8893 * linux-m32r-low.c (*): Ditto.
8894 * linux-sparc-low.c (*): Ditto.
8895 * linux-x86.c (*): Ditto.
8896 * linux-low.c (*): Ditto.
8897 (linux_wait_1): Add calls to debug_enter, debug_exit.
8898 (linux_wait): Remove redundant debugging printf.
8899 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8900 (linux_resume, unstop_all_lwps): Ditto.
8901 * mem-break.c (*): Update all debugging printfs to use
8902 debug_printf instead of fprintf.
8903 * remote-utils.c (*): Ditto.
8904 * thread-db.c (*): Ditto.
8905 * server.c #include <ctype.h>, "gdb_vecs.h".
8906 (debug_threads): Moved to debug.c.
8907 (*): Update all debugging printfs to use debug_printf instead of
8908 fprintf.
8909 (start_inferior): Replace call to fflush with call to debug_flush.
8910 (monitor_show_help): Mention set debug-format.
8911 (parse_debug_format_options): New function.
8912 (handle_monitor_command): Handle "monitor set debug-format".
8913 (gdbserver_usage): Mention --debug-format.
8914 (main): Parse --debug-format.
8915 * server.h (debug_threads): Declaration moved to debug.h.
8916 #include "debug.h".
8917 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8918 trace_debug_1 that uses debug_printf.
8919 (tracepoint_look_up_symbols): Update all debugging printfs to use
8920 debug_printf instead of fprintf.
8921
e671835b
BS
89222014-01-20 Baruch Siach <baruch@tkos.co.il>
8923
8924 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8925 sys/ptrace.h.
8926
b5737fa9
PA
89272014-01-17 Pedro Alves <palves@redhat.com>
8928
ea38d2a9 8929 PR build/16445
c7faa97a
PA
8930 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8931 defined after including gdb_proc_service.h.
b5737fa9 8932
40ed484e
DE
89332014-01-16 Doug Evans <dje@google.com>
8934
8935 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8936 (match_dll): Use it.
8937
969c39fb
MM
89382014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8939
8940 * target.h (target_ops) <read_btrace>: Change parameters and
8941 return type to allow error reporting.
8942 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8943 trace reading errors on.
8944 * linux-low.c (linux_low_read_btrace): Pass trace reading
8945 errors on.
8946 (linux_low_disable_btrace): New.
8947
ab7f45ba
DE
89482014-01-15 Doug Evans <dje@google.com>
8949
8950 * inferiors.c (thread_id_to_gdb_id): Delete.
8951 * inferiors.h (thread_id_to_gdb_id): Delete.
8952
66af0f44
EZ
89532014-01-13 Eli Zaretskii <eliz@gnu.org>
8954
8955 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8956 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8957 versions.
8958
9939e131
PA
89592014-01-08 Pedro Alves <palves@redhat.com>
8960
8961 * server.c (handle_status): Don't discard previous queued stop
8962 replies or thread's pending status here.
8963 (main) <disconnection>: Do it here instead.
8964
b7ea362b
PA
89652014-01-08 Pedro Alves <palves@redhat.com>
8966
8967 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8968 * server.c (visit_actioned_threads, handle_pending_status): New
8969 function.
8970 (handle_v_cont): Factor out parts to ...
8971 (resume): ... this new function. If in all-stop, and a thread
8972 being resumed has a pending status, report it without actually
8973 resuming.
8974 (myresume): Adjust to use the new 'resume' function.
8975 (clear_pending_status_callback, set_pending_status_callback)
8976 (find_status_pending_thread_callback): New functions.
8977 (handle_status): Handle the case of multiple threads having
8978 interesting statuses to report. Report threads' real last signal
8979 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8980 with an interesting thread to report the status for, instead of
8981 always reporting the status of the first thread.
8982
28498c42
JB
89832014-01-01 Joel Brobecker <brobecker@adacore.com>
8984
8985 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8986 * gdbreplay.c (gdbreplay_version): Likewise.
8987
f45c82da
YZ
89882013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8989
8990 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8991 iov.iov_len with the real length in use.
8992
379a5e2d
JB
89932013-12-13 Joel Brobecker <brobecker@adacore.com>
8994
8995 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8996 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8997 for all targets that use win32-low.c.
8998 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8999 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9000
4210d83e
PA
90012013-12-13 Pedro Alves <palves@redhat.com>
9002
9003 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9004 if equal to TARGET_WAITKIND_LOADED.
9005 * win32-low.c (cached_status): New static global.
9006 (win32_wait): Add declaration.
9007 (do_initial_child_stuff): Flush all initial pending debug events
9008 up to the initial breakpoint.
9009 (win32_wait): If CACHED_STATUS was set, return that instead
9010 of doing a real wait. Remove the code resuming the execution
9011 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9012 during the initial phase. Also remove the code changing
9013 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9014 TARGET_WAITKIND_STOPPED.
9015
e7f0d979
YQ
90162013-12-11 Yao Qi <yao@codesourcery.com>
9017
9018 * notif.c (handle_notif_ack): Return 0 if no notification
9019 matches.
9020
ebcf782c
DE
90212013-11-20 Doug Evans <dje@google.com>
9022
9023 * linux-low.c (linux_set_resume_request): Fix comment.
9024
20ad9378
DE
90252013-11-20 Doug Evans <dje@google.com>
9026
9027 * linux-low.c (resume_status_pending_p): Tweak comment.
9028
a196ebeb
WT
90292013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9030
9031 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9032 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9033 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9034 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9035 (srv_amd64_regobj): Add amd64-mpx.o.
9036 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9037 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9038 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9039 * i387-fp.c (num_pl_bnd_register) Added constant.
9040 (num_pl_bnd_cfg_registers) Added constant.
9041 (struct i387_xsave) Added reserved area and MPX fields.
9042 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9043 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9044 function.
9045 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9046 (init_registers_amd64_mpx_linux): Declare new function.
9047 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9048 (x86_64_regmap): Add MPX registers.
9049 (x86_linux_read_description): Add MPX case.
9050 (initialize_low_arch): Initialize MPX targets.
9051
0080a2f6
TT
90522013-11-18 Tom Tromey <tromey@redhat.com>
9053
9054 * configure: Rebuild.
9055 * configure.ac: Don't check for stdlib.h.
9056 * gdbreplay.c: Unconditionally include stdlib.h.
9057
2978b111
TT
90582013-11-18 Tom Tromey <tromey@redhat.com>
9059
9060 * config.in: Rebuild.
9061 * configure: Rebuild.
9062 * configure.ac: Don't use AC_HEADER_DIRENT.
9063
a3d08894
TT
90642013-11-18 Tom Tromey <tromey@redhat.com>
9065
9066 * server.h: Don't check HAVE_STRING_H.
9067 * gdbreplay.c: Don't check HAVE_STRING_H.
9068 * configure: Rebuild.
9069
0a5dd17d
TT
90702013-11-18 Tom Tromey <tromey@redhat.com>
9071
9072 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9073 LIBGNU.
9074
1bd2f0ba
TT
90752013-11-08 Tom Tromey <tromey@redhat.com>
9076
9077 * configure, config.in: Rebuild.
9078 * configure.ac: Remove unused configury.
9079
3266f10b
TT
90802013-11-08 Tom Tromey <tromey@redhat.com>
9081
9082 * acinclude.m4: Include common.m4, codeset.m4.
9083 * configure, config.in: Rebuild.
9084 * configure.ac: Use GDB_AC_COMMON.
9085
6682d959
AA
90862013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9087
9088 * linux-s390-low.c (HWCAP_S390_TE): New define.
9089 (s390_arch_setup): Consider the TE field in the HWCAP for
9090 determining 'have_regset_tdb'.
9091
fd0a4d76
SDJ
90922013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9093
9094 PR gdb/16014
9095 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9096 call to sizeof.
9097
1a3d890b
PA
90982013-10-02 Pedro Alves <palves@redhat.com>
9099
9100 * server.c (process_serial_event): Don't output "GDBserver
9101 exiting" if GDB is connected through stdio.
9102 * target.c (mywait): Likewise, be silent if GDB is connected
9103 through stdio.
9104
97ad4581
JB
91052013-10-01 Joel Brobecker <brobecker@adacore.com>
9106
9107 * lynx-low.c (lynx_add_threads_after_attach): New function.
9108 (lynx_attach): Remove call to add_thread. Add call to
9109 lynx_add_threads_after_attach instead.
9110
5b4e221c
MF
91112013-09-28 Mike Frysinger <vapier@gentoo.org>
9112
9113 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9114 * config.in, configure: Regenerated.
9115
ee47b2f8
YQ
91162013-09-18 Yao Qi <yao@codesourcery.com>
9117
9118 PR server/15959
9119 * server.c (start_inferior): Clear 'resume_info'.
9120
d6707650 91212013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9122
d6707650
JW
9123 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9124 for each register.
9125
9243dd0e 91262013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9127
9243dd0e
JW
9128 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9129 linux-tile-low.o to srv_tgtobj.
9130
c623a6ef
WN
91312013-09-16 Will Newton <will.newton@linaro.org>
9132
9133 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9134 out regs.
9135
fb71d39e
PA
91362013-09-06 Pedro Alves <palves@redhat.com>
9137
9138 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9139 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9140 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9141 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9142 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9143 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9144
8e7e9910
PA
91452013-09-06 Pedro Alves <palves@redhat.com>
9146
9147 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9148 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9149
7c3a12ca
PA
91502013-09-06 Pedro Alves <palves@redhat.com>
9151
9152 * linux-amd64-ipa.c: Include tracepoint.h.
9153 * linux-i386-ipa.c: Include tracepoint.h.
9154
8eb3d7b6
RW
91552013-09-06 Ricard Wanderlof <ricardw@axis.com>
9156
9157 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9158 (ps_get_thread_area): New function.
9159
eddddb9d
RW
91602013-09-06 Ricard Wanderlof <ricardw@axis.com>
9161
9162 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9163 (initialize_low_arch): Call init_registers_crisv32 rather than
9164 init_register_crisv32.
9165
533b0600
PA
91662013-09-05 Pedro Alves <palves@redhat.com>
9167
9168 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9169 to ...
9170 * hostio.h: ... this new file.
9171 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9172 win32-low.c: Include hostio.h.
9173
0ce3d3b5
PA
91742013-09-05 Pedro Alves <palves@redhat.com>
9175
9176 * server.h (gdb_client_data, handler_func, callback_handler_func)
9177 (delete_file_handler, add_file_handler, append_callback_event)
9178 (delete_callback_event, start_event_loop, initialize_event_loop):
9179 Move to event-loop.h and include it.
9180 * event-loop.h: New file.
9181
799cdc37
PA
91822013-09-05 Pedro Alves <palves@redhat.com>
9183
9184 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9185 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9186 (loaded_dll, unloaded_dll): Move to ...
9187 * dll.h: ... this new file.
9188 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9189
6a6bbd9d
PA
91902013-09-05 Pedro Alves <palves@redhat.com>
9191
9192 * server.h (current_process, get_thread_process, all_processes)
9193 (add_inferior_to_list, for_each_inferior, current_inferior)
9194 (remove_inferior, add_process, remove_process, find_process_pid)
9195 (have_started_inferiors_p, have_attached_inferiors_p)
9196 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9197 (clear_inferiors, find_inferior, find_inferior_id)
9198 (inferior_target_data, set_inferior_target_data)
9199 (inferior_regcache_data, set_inferior_regcache_data): Move to
9200 inferiors.h, and include it.
9201 * inferiors.h: New file.
9202
f699aaba
PA
92032013-09-05 Pedro Alves <palves@redhat.com>
9204
9205 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9206 Move ...
72f4393d 9207 * ax.h: ... here.
f699aaba 9208
c144c7a0
PA
92092013-09-05 Pedro Alves <palves@redhat.com>
9210
9211 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9212 tracepoint.h.
9213 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9214 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9215 (handle_tracepoint_general_set, handle_tracepoint_query)
9216 (tracepoint_finished_step, tracepoint_was_hit)
9217 (release_while_stepping_state_list, current_traceframe)
9218 (in_readonly_region, traceframe_read_mem)
9219 (fetch_traceframe_registers, traceframe_read_sdata)
9220 (traceframe_read_info, struct fast_tpoint_collect_status)
9221 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9222 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9223 (supply_fast_tracepoint_registers)
9224 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9225 (ipa_tdesc, claim_trampoline_space)
9226 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9227 (agent_mem_read, agent_get_trace_state_variable_value)
9228 (agent_set_trace_state_variable_value, agent_tsv_read)
9229 (agent_mem_read_string, get_raw_reg_func_addr)
9230 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9231 * tracepoint.h: ... this new file.
9232
ff42e6ab
PA
92332013-09-05 Pedro Alves <palves@redhat.com>
9234
9235 * server.h (perror_with_name, error, fatal, warning, paddress)
9236 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9237 include it.
9238 * utils.h: New file.
9239
541af0f4
PA
92402013-09-05 Pedro Alves <palves@redhat.com>
9241
9242 * server.h (remote_debug, noack_mode, transport_is_reliable)
9243 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9244 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9245 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9246 (write_enn, initialize_async_io, enable_async_io)
9247 (disable_async_io, check_remote_input_interrupt_request)
9248 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9249 (dead_thread_notify, prepare_resume_reply)
9250 (decode_address_to_semicolon, decode_address, decode_m_packet)
9251 (decode_M_packet, decode_X_packet, decode_xfer_write)
9252 (decode_search_memory_packet, unhexify, hexify)
9253 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9254 (look_up_one_symbol, relocate_instruction)
9255 (monitor_output): Move to remote-utils.h, and include it.
9256 * remote-utils.h: New file.
9257
eebdf26b
PA
92582013-09-05 Pedro Alves <palves@redhat.com>
9259
9260 * server.h (_): Delete.
9261
3aafd2ff
PA
92622013-09-02 Pedro Alves <palves@redhat.com>
9263
9264 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9265 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9266 allocated.
9267 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9268
cee83bcb
PM
92692013-09-02 Pierre Muller <muller@sourceware.org>
9270
9271 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9272 or WriteProcessMemory complete successfully and handle
9273 ERROR_PARTIAL_COPY error.
9274
9a13b2fa
PA
92752013-09-02 Pedro Alves <palves@redhat.com>
9276
9277 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9278 error instead of EIO.
9279
602e3198
JK
92802013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9281
9282 PR server/15604
9283 * linux-low.c: Include filestuff.h.
9284 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9285 * lynx-low.c: Include filestuff.h.
9286 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9287 * server.c: Include filestuff.h.
9288 (main): Call notice_open_fds.
9289 * spu-low.c: Include filestuff.h.
9290 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9291
96d7229d
LM
92922013-08-22 Luis Machado <lgustavo@codesourcery.com>
9293
9294 * Makefile.in: Explain why ../target and ../nat are not
9295 listed as include file search paths.
9296 (linux-waitpid.o): New object file rule.
9297 * configure.srv (srv_native_linux_obj): New variable.
9298 Replace all occurrences of linux native object files with
9299 $srv_native_linux_obj.
9300 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9301 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9302 (linux_enable_event_reporting): Remove declaration.
9303 (my_waitpid): Moved to common/linux-waitpid.c.
9304 (linux_wait_for_event): Pass ptid when calling
9305 linux_enable_event_reporting.
9306 (linux_supports_tracefork_flag): Remove.
9307 (linux_enable_event_reporting): Likewise.
9308 (linux_tracefork_grandchild): Remove.
9309 (STACK_SIZE): Moved to common/linux-ptrace.c.
9310 (linux_tracefork_child): Remove.
9311 (linux_test_for_tracefork): Remove.
9312 (linux_look_up_symbols): Call linux_supports_traceclone.
9313 (initialize_low): Remove call to linux_test_for_tracefork.
9314 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9315 common/linux-ptrace.h.
9316 (PTRACE_TYPE_ARG4): Likewise.
9317 Include linux-ptrace.h.
9318
32940073
PA
93192013-08-21 Pedro Alves <palves@redhat.com>
9320
9321 * config.in: Renegerate.
9322
33b60d58 93232013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9324
33b60d58
LM
9325 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9326 (SFILES): Remove $(srcdir)/common/target-common.c and
9327 add $(srcdir)/target/waitstatus.c.
9328 (OBS): Remove target-common.o and add waitstatus.o.
9329 (server_h): Remove $(srcdir)/../common/target-common.h and
9330 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9331 and $(srcdir)/../target/waitstatus.h.
9332 (target-common.o): Remove.
9333 (waitstatus.o): New target object file.
9334 * target.h: Do not include target-common.h and
9335 include target/resume.h, target/wait.h and
9336 target/waitstatus.h.
9337
b8e1b30e
LM
93382013-08-13 Luis Machado <lgustavo@codesourcery.com>
9339
9340 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9341 to PTRACE_TYPE_ARG3.
9342 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9343 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9344 PTRACE_TYPE_ARG4.
9345 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9346 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9347
7a60ad40
YQ
93482013-07-27 Jie Zhang <jie@codesourcery.com>
9349 Daniel Jacobowitz <dan@codesourcery.com>
9350 Yao Qi <yao@codesourcery.com>
9351
9352 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9353 (mips-linux-watch.o): New rule.
9354 (mips_linux_watch_h): New variable.
9355 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9356 srv_tgtobj.
9357 * linux-mips-low.c: Include mips-linux-watch.h.
9358 (struct arch_process_info, struct arch_lwp_info): New.
9359 (update_watch_registers_callback): New function.
9360 (mips_linux_new_process, mips_linux_new_thread) New functions.
9361 (mips_linux_prepare_to_resume, mips_insert_point): New
9362 functions.
9363 (mips_remove_point, mips_stopped_by_watchpoint): New
9364 functions.
9365 (rsp_bp_type_to_target_hw_bp_type): New function.
9366 (mips_stopped_data_address): New function.
9367 (the_low_target): Add watchpoint support functions.
9368
de6f69ad
YQ
93692013-07-27 Yao Qi <yao@codesourcery.com>
9370
9371 * i386-low.c: Include break-common.h.
9372 (enum target_hw_bp_type): Remove.
9373
3360c0bf
LM
93742013-07-24 Luis Machado <lgustavo@codesourcery.com>
9375
9376 * Makefile.in (SFILES): /common/target-common.c.
9377 (OBS): Add target-common.o.
9378 (server_h): Add $(srcdir)/../common/target-common.h.
9379 (target-common.o): New target.
9380 * server.c (queue_stop_reply_callback): Free
9381 status string after use.
9382 * target.c (target_waitstatus_to_string): Remove.
9383 * target.h: Include target-common.h.
9384 (resume_kind): Likewise.
9385 (target_waitkind): Likewise.
9386 (target_waitstatus): Likewise.
9387 (TARGET_WNOHANG): Likewise.
9388
bd885420
YQ
93892013-07-04 Yao Qi <yao@codesourcery.com>
9390
9391 * Makefile.in (host_alias): Use @host_noncanonical@.
9392 (target_alias): Use @target_noncanonical@.
9393 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9394 ACX_NONCANONICAL_HOST.
9395 * configure: Regenerated.
9396
9397 Revert:
9398 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9399
9400 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9401 * configure: Rebuild.
9402 * Makefile.in (version_host, version_target): Get from configure.
9403 (version.c): Use $(version_host) and $(version_target).
9404
17ef446e
PA
94052013-07-03 Pedro Alves <palves@redhat.com>
9406
9407 * Makefile.in (config.status): Depend on development.sh.
9408 * acinclude.m4: Include libmcheck.m4.
9409 * configure: Regenerate.
9410
7a9a7487
MG
94112013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9412
9413 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9414 attribute inside the parentheses.
9415 (winapi_DebugSetProcessKillOnExit): Ditto.
9416 (winapi_DebugBreakProcess): Ditto.
9417 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9418
49b64de6
MG
94192013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9420
9421 * notif.h (notif_event): Add a dummy member to avoid compiler
9422 errors.
9423
d5749ee7
PA
94242013-07-01 Pedro Alves <palves@redhat.com>
9425
9426 * hostio.c (HOSTIO_PATH_MAX): Define.
9427 (require_filename, handle_open, handle_unlink, handle_readlink):
9428 Use it.
9429
d8d2a3ee
PA
94302013-07-01 Pedro Alves <palves@redhat.com>
9431
9432 * server.h: Include "pathmax.h".
9433 * linux-low.c: Don't include sys/param.h.
9434 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9435 MAXPATHLEN.
9436 * win32-low.c: Don't include sys/param.h.
9437 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9438
bc7dea8d
PA
94392013-07-01 Pedro Alves <palves@redhat.com>
9440
9441 * event-loop.c: Don't check HAVE_UNISTD_H before including
9442 <unistd.h>.
9443 * gdbreplay.c: Likewise.
9444 * remote-utils.c: Likewise.
9445 * server.c: Likewise.
9446 * configure.ac: Don't check for unistd.h.
9447 * configure: Regenerate.
9448
d6c2da54
TT
94492013-06-28 Tom Tromey <tromey@redhat.com>
9450
9451 * Makefile.in (version.c): Use version.in, not
9452 common/version.in.
9453
257b6bec
MG
94542013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9455
9456 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9457 * configure: Rebuild.
9458 * Makefile.in (version_host, version_target): Get from configure.
9459 (version.c): Use $(version_host) and $(version_target).
9460
86ebe149
DK
94612013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9462
9463 Fix trace-status to output user name without trailing colon.
9464 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9465
f30aa5af
DK
94662013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9467
9468 Fix trace-status to output proper start-time and stop-time.
9469 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9470 output start time and stop time in hex as gdb expects.
9471
28a93511
YQ
94722013-06-26 Pedro Alves <pedro@codesourcery.com>
9473
9474 * tracepoint.c (build_traceframe_info_xml): Output trace state
9475 variables present in the trace buffer.
9476
01208463
TT
94772013-06-24 Tom Tromey <tromey@redhat.com>
9478
9479 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9480 create-version.sh.
9481 (version.o): Remove.
9482 * gdbreplay.c: Include version.h.
9483 (version, host_name): Don't declare.
9484 * server.h: Include version.h.
9485 (version, host_name): Don't declare.
9486
760256f9
PA
94872013-06-12 Pedro Alves <palves@redhat.com>
9488
9489 * linux-x86-low.c (linux_is_elf64): Delete global.
9490 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9491 with local linux_pid_exe_is_elf_64_file use.
9492
030031ee
PA
94932013-06-11 Pedro Alves <palves@redhat.com>
9494
9495 * linux-low.c (regset_disabled, disable_regset): New functions.
9496 (regsets_fetch_inferior_registers)
9497 (regsets_store_inferior_registers): Use them.
9498 (initialize_regsets_info); Don't allocate the disabled_regsets
9499 array here.
9500 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9501 comment.
9502
5da6eb0a
PA
95032013-06-11 Pedro Alves <palves@redhat.com>
9504
9505 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9506 xmalloc.
9507
7e5aaa09
PA
95082013-06-11 Pedro Alves <palves@redhat.com>
9509
9510 * linux-x86-low.c (initialize_low_arch): Call
9511 init_registers_x32_avx_linux.
9512
d878444c
JK
95132013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9514
9515 Fix compatibility with Android Bionic.
9516 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9517 it is not empty.
9518
3aee8918
PA
95192013-06-07 Pedro Alves <palves@redhat.com>
9520
5f2b57b5 9521 PR server/14823
3aee8918
PA
9522 * Makefile.in (OBS): Add tdesc.o.
9523 (IPA_OBJS): Add tdesc-ipa.o.
9524 (tdesc-ipa.o): New rule.
9525 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9526 interface.
9527 * linux-low.c (new_inferior): Delete.
9528 (disabled_regsets, num_regsets): Delete.
9529 (linux_add_process): Adjust to set the new per-process
9530 new_inferior flag.
9531 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9532 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9533 was a stop. When calling arch_setup, switch the current inferior
9534 to the thread that got an event.
9535 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9536 (regsets_fetch_inferior_registers)
9537 (regsets_store_inferior_registers): New regsets_info parameter.
9538 Adjust to use it.
9539 (linux_register_in_regsets): New regs_info parameter. Adjust to
9540 use it.
9541 (register_addr, fetch_register, store_register): New usrregs_info
9542 parameter. Adjust to use it.
9543 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9544 parameter regs_info. Adjust to use it.
9545 (linux_fetch_registers): Get the current inferior's regs_info, and
9546 adjust to use it.
9547 (linux_store_registers): Ditto.
9548 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9549 (initialize_low): Don't initialize the target_regsets here. Call
9550 initialize_low_arch.
9551 * linux-low.h (target_regsets): Delete declaration.
9552 (struct regsets_info): New.
9553 (struct usrregs_info): New.
9554 (struct regs_info): New.
9555 (struct process_info_private) <new_inferior>: New field.
9556 (struct linux_target_ops): Delete the num_regs, regmap, and
9557 regset_bitmap fields. New field regs_info.
9558 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9559 * i387-fp.c (num_xmm_registers): Delete.
9560 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9561 calls to new interface.
9562 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9563 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9564 Infer the number of xmm registers from the regcache's target
9565 description.
9566 * i387-fp.h (num_xmm_registers): Delete.
9567 * inferiors.c (add_thread): Don't install the thread's regcache
9568 here.
9569 * proc-service.c (gregset_info): Fetch the current inferior's
9570 regs_info. Adjust to use it.
9571 * regcache.c: Include tdesc.h.
9572 (register_bytes, reg_defs, num_registers)
9573 (gdbserver_expedite_regs): Delete.
9574 (get_thread_regcache): If the thread doesn't have a regcache yet,
9575 create one, instead of aborting gdbserver.
9576 (regcache_invalidate_one): Rename to ...
9577 (regcache_invalidate_thread): ... this.
9578 (regcache_invalidate_one): New.
9579 (regcache_invalidate): Only invalidate registers of the current
9580 process.
9581 (init_register_cache): Add target_desc parameter, and use it.
9582 (new_register_cache): Ditto. Assert the target description has a
9583 non zero registers_size.
9584 (regcache_cpy): Add assertions. Adjust.
9585 (realloc_register_cache, set_register_cache): Delete.
9586 (registers_to_string, registers_from_string): Adjust.
9587 (find_register_by_name, find_regno, find_register_by_number)
9588 (register_cache_size): Add target_desc parameter, and use it.
9589 (free_register_cache_thread, free_register_cache_thread_one)
9590 (regcache_release, register_cache_size): New.
9591 (register_size): Add target_desc parameter, and use it.
9592 (register_data, supply_register, supply_register_zeroed)
9593 (supply_regblock, supply_register_by_name, collect_register)
9594 (collect_register_as_string, collect_register_by_name): Adjust.
9595 * regcache.h (struct target_desc): Forward declare.
9596 (struct regcache) <tdesc>: New field.
9597 (init_register_cache, new_register_cache): Add target_desc
9598 parameter.
9599 (regcache_invalidate_thread): Declare.
9600 (regcache_invalidate_one): Delete declaration.
9601 (regcache_release): Declare.
9602 (find_register_by_number, register_cache_size, register_size)
9603 (find_regno): Add target_desc parameter.
9604 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9605 declarations.
9606 * remote-utils.c: Include tdesc.h.
9607 (outreg, prepare_resume_reply): Adjust.
9608 * server.c: Include tdesc.h.
9609 (gdbserver_xmltarget): Delete declaration.
9610 (get_features_xml, process_serial_event): Adjust.
9611 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9612 declare.
9613 (struct process_info) <tdesc>: New field.
9614 (ipa_tdesc): Declare.
9615 * tdesc.c: New file.
9616 * tdesc.h: New file.
9617 * tracepoint.c: Include tdesc.h.
9618 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9619 (get_context_regcache): Adjust to pass ipa_tdesc down.
9620 (do_action_at_tracepoint): Adjust to get the register cache size
9621 from the context regcache's description.
9622 (traceframe_walk_blocks): Adjust to get the register cache size
9623 from the current trace frame's description.
9624 (traceframe_get_pc): Adjust to get current trace frame's
9625 description and pass it down.
9626 (gdb_collect): Adjust to get the register cache size from the
9627 IPA's description.
9628 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9629 (gdbserver_xmltarget): Delete.
9630 (initialize_low_tracepoint): Set the ipa's target description.
9631 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9632 (initialize_low_tracepoint): Set the ipa's target description.
9633 * linux-x86-low.c: Include tdesc.h.
9634 [__x86_64__] (is_64bit_tdesc): New.
9635 (ps_get_thread_area, x86_get_thread_area): Use it.
9636 (i386_cannot_store_register): Rename to ...
9637 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9638 (i386_cannot_fetch_register): Rename to ...
9639 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9640 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9641 to new interface.
9642 (target_regsets): Rename to ...
9643 (x86_regsets): ... this.
9644 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9645 interface.
9646 (x86_siginfo_fixup): Use is_64bit_tdesc.
9647 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9648 (tdesc_x32_avx_linux, tdesc_x32_linux)
9649 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9650 Declare.
9651 (x86_linux_update_xmltarget): Delete.
9652 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9653 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9654 (AMD64_LINUX_USER64_CS): New.
9655 (x86_linux_read_description): New, based on
9656 x86_linux_update_xmltarget.
9657 (same_process_callback): New.
9658 (x86_arch_setup_process_callback): New.
9659 (x86_linux_update_xmltarget): New.
9660 (x86_regsets_info): New.
9661 (amd64_linux_regs_info): New.
9662 (i386_linux_usrregs_info): New.
9663 (i386_linux_regs_info): New.
9664 (x86_linux_regs_info): New.
9665 (x86_arch_setup): Reimplement.
9666 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9667 (x86_emit_ops): Ditto.
9668 (the_low_target): Adjust. Install x86_linux_regs_info,
9669 x86_cannot_fetch_register, and x86_cannot_store_register.
9670 (initialize_low_arch): New.
9671 * linux-ia64-low.c (tdesc_ia64): Declare.
9672 (ia64_fetch_register): Adjust.
9673 (ia64_usrregs_info, regs_info): New globals.
9674 (ia64_regs_info): New function.
9675 (the_low_target): Adjust.
9676 (initialize_low_arch): New function.
9677 * linux-sparc-low.c (tdesc_sparc64): Declare.
9678 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9679 Adjust.
9680 (sparc_arch_setup): New function.
9681 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9682 (the_low_target): Adjust.
9683 (initialize_low_arch): New function.
9684 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9685 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9686 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9687 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9688 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9689 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9690 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9691 (tdesc_powerpc_isa205_vsx64l): Declare.
9692 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9693 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9694 (ppc_set_pc, ppc_get_hwcap): Adjust.
9695 (ppc_usrregs_info): Forward declare.
9696 (!__powerpc64__) ppc_regmap_adjusted: New global.
9697 (ppc_arch_setup): Adjust to the current process'es target
9698 description.
9699 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9700 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9701 (ppc_store_evrregset): Adjust.
9702 (target_regsets): Rename to ...
9703 (ppc_regsets): ... this, and make static.
9704 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9705 (ppc_regs_info): New function.
9706 (the_low_target): Adjust.
9707 (initialize_low_arch): New function.
9708 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9709 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9710 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9711 (tdesc_s390x_linux64v2): Declare.
9712 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9713 (s390_fill_gregset, s390_store_last_break): Adjust.
9714 (target_regsets): Rename to ...
9715 (s390_regsets): ... this, and make static.
9716 (s390_get_pc, s390_set_pc): Adjust.
9717 (s390_get_hwcap): New target_desc parameter, and use it.
9718 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9719 (s390_arch_setup): Adjust to set the current process'es target
9720 description. Don't adjust the regmap.
9721 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9722 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9723 (regs_info_3264): New globals.
9724 (s390_regs_info): New function.
9725 (the_low_target): Adjust.
9726 (initialize_low_arch): New function.
9727 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9728 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9729 [__mips64] (init_registers_mips_linux)
9730 (init_registers_mips_dsp_linux): Delete defines.
9731 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9732 (have_dsp): New global.
9733 (mips_read_description): New, based on mips_arch_setup.
9734 (mips_arch_setup): Reimplement.
9735 (get_usrregs_info): New function.
9736 (mips_cannot_fetch_register, mips_cannot_store_register)
9737 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9738 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9739 (target_regsets): Rename to ...
9740 (mips_regsets): ... this, and make static.
9741 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9742 (dsp_regs_info, regs_info): New globals.
9743 (mips_regs_info): New function.
9744 (the_low_target): Adjust.
9745 (initialize_low_arch): New function.
9746 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9747 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9748 Declare.
9749 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9750 (arm_read_description): New, with bits factored from
9751 arm_arch_setup.
9752 (arm_arch_setup): Reimplement.
9753 (target_regsets): Rename to ...
9754 (arm_regsets): ... this, and make static.
9755 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9756 (arm_regs_info): New function.
9757 (the_low_target): Adjust.
9758 (initialize_low_arch): New function.
9759 * linux-m68k-low.c (tdesc_m68k): Declare.
9760 (target_regsets): Rename to ...
9761 (m68k_regsets): ... this, and make static.
9762 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9763 (m68k_regs_info): New function.
9764 (m68k_arch_setup): New function.
9765 (the_low_target): Adjust.
9766 (initialize_low_arch): New function.
9767 * linux-sh-low.c (tdesc_sharch): Declare.
9768 (target_regsets): Rename to ...
9769 (sh_regsets): ... this, and make static.
9770 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9771 (sh_regs_info, sh_arch_setup): New functions.
9772 (the_low_target): Adjust.
9773 (initialize_low_arch): New function.
9774 * linux-bfin-low.c (tdesc_bfin): Declare.
9775 (bfin_arch_setup): New function.
9776 (bfin_usrregs_info, regs_info): New globals.
9777 (bfin_regs_info): New function.
9778 (the_low_target): Adjust.
9779 (initialize_low_arch): New function.
9780 * linux-cris-low.c (tdesc_cris): Declare.
9781 (cris_arch_setup): New function.
9782 (cris_usrregs_info, regs_info): New globals.
9783 (cris_regs_info): New function.
9784 (the_low_target): Adjust.
9785 (initialize_low_arch): New function.
9786 * linux-cris-low.c (tdesc_crisv32): Declare.
9787 (cris_arch_setup): New function.
9788 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9789 (cris_regs_info): New function.
9790 (the_low_target): Adjust.
9791 (initialize_low_arch): New function.
9792 * linux-m32r-low.c (tdesc_m32r): Declare.
9793 (m32r_arch_setup): New function.
9794 (m32r_usrregs_info, regs_info): New globals.
9795 (m32r_regs_info): Adjust.
9796 (initialize_low_arch): New function.
9797 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9798 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9799 (tic6x_usrregs_info): Forward declare.
9800 (tic6x_read_description): New function, based on ...
9801 (tic6x_arch_setup): ... this. Reimplement.
9802 (target_regsets): Rename to ...
9803 (tic6x_regsets): ... this, and make static.
9804 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9805 (tic6x_regs_info): New function.
9806 (the_low_target): Adjust.
9807 (initialize_low_arch): New function.
9808 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9809 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9810 (target_regsets): Rename to ...
9811 (xtensa_regsets): ... this, and make static.
9812 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9813 globals.
9814 (xtensa_arch_setup, xtensa_regs_info): New functions.
9815 (the_low_target): Adjust.
9816 (initialize_low_arch): New function.
9817 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9818 (nios2_arch_setup): Set the current process'es tdesc.
9819 (target_regsets): Rename to ...
9820 (nios2_regsets): ... this.
9821 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9822 (nios2_regs_info): New function.
9823 (the_low_target): Adjust.
9824 (initialize_low_arch): New function.
a261b8f5
PA
9825 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9826 (aarch64_arch_setup): Set the current process'es tdesc.
9827 (target_regsets): Rename to ...
9828 (aarch64_regsets): ... this.
9829 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9830 (aarch64_regs_info): New function.
9831 (the_low_target): Adjust.
9832 (initialize_low_arch): New function.
3aee8918
PA
9833 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9834 globals.
9835 (target_regsets): Rename to ...
9836 (tile_regsets): ... this.
9837 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9838 (tile_regs_info): New function.
9839 (tile_arch_setup): Set the current process'es tdesc.
9840 (the_low_target): Adjust.
9841 (initialize_low_arch): New function.
9842 * spu-low.c (tdesc_spu): Declare.
9843 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9844 * win32-arm-low.c (tdesc_arm): Declare.
9845 (arm_arch_setup): New function.
9846 (the_low_target): Install arm_arch_setup instead of
9847 init_registers_arm.
9848 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9849 (init_windows_x86): Rename to ...
9850 (i386_arch_setup): ... this. Set `win32_tdesc'.
9851 (the_low_target): Adjust.
9852 * win32-low.c (win32_tdesc): New global.
9853 (child_add_thread): Don't create the thread cache here.
9854 (do_initial_child_stuff): Set the new process'es tdesc.
9855 * win32-low.h (struct target_desc): Forward declare.
9856 (win32_tdesc): Declare.
9857 * lynx-i386-low.c (tdesc_i386): Declare global.
9858 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9859 * lynx-low.c (lynx_tdesc): New global.
9860 (lynx_add_process): Set the new process'es tdesc.
9861 * lynx-low.h (struct target_desc): Forward declare.
9862 (lynx_tdesc): Declare global.
9863 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9864 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9865 * nto-low.c (nto_tdesc): New global.
9866 (do_attach): Set the new process'es tdesc.
9867 * nto-low.h (struct target_desc): Forward declare.
9868 (nto_tdesc): Declare.
9869 * nto-x86-low.c (tdesc_i386): Declare.
9870 (nto_x86_arch_setup): Set `nto_tdesc'.
9871
b1fbec62
GB
98722013-06-04 Gary Benson <gbenson@redhat.com>
9873
9874 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9875 to qSupported response when appropriate.
9876 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9877 with nonzero-length annex.
9878 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9879 arguments supplied in annex.
9880
d1ec4ce7
DE
98812013-05-31 Doug Evans <dje@google.com>
9882
ac44adcb 9883 PR server/15594
d1ec4ce7
DE
9884 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9885 64 bits in 64-cross-32 environment.
9886
9b25f2d3
PA
98872013-05-28 Pedro Alves <palves@redhat.com>
9888
9889 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9890 (aarch64-without-fpu.c): Delete rule.
9891 * configure.srv (aarch64*-*-linux*): Remove references to
9892 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9893 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9894 declaration.
9895
6740dc9c
PA
98962013-05-24 Pedro Alves <palves@redhat.com>
9897
9898 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9899 instead of strchr/decode_address. Error if the range isn't split
9900 with a ','. Don't assume there's be a ':' in the action.
9901
c2d6af84
PA
99022013-05-23 Yao Qi <yao@codesourcery.com>
9903 Pedro Alves <palves@redhat.com>
9904
9905 * linux-low.c (lwp_in_step_range): New function.
9906 (linux_wait_1): If the thread was range stepping and stopped
9907 outside the stepping range, report the stop to GDB. Otherwise,
9908 continue stepping. Add range stepping debug output.
9909 (linux_set_resume_request): Copy the step range from the resume
9910 request to the lwp.
9911 (linux_supports_range_stepping): New.
9912 (linux_target_ops) <supports_range_stepping>: Set to
9913 linux_supports_range_stepping.
9914 * linux-low.h (struct linux_target_ops)
9915 <supports_range_stepping>: New field.
9916 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9917 * linux-x86-low.c (x86_supports_range_stepping): New.
9918 (the_low_target) <supports_range_stepping>: Set to
9919 x86_supports_range_stepping.
9920 * server.c (handle_v_cont): Handle 'r' action.
9921 (handle_v_requests): Append ";r" if the target supports range
9922 stepping.
9923 * target.h (struct thread_resume) <step_range_start,
9924 step_range_end>: New fields.
9925 (struct target_ops) <supports_range_stepping>:
9926 New field.
9927 (target_supports_range_stepping): New macro.
9928
58794e1a
JB
99292013-05-17 Joel Brobecker <brobecker@adacore.com>
9930
9931 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9932 confusion in comment.
9933
d631c5a7
JB
99342013-05-17 Joel Brobecker <brobecker@adacore.com>
9935
9936 * lynx-low.c (struct process_info_private): New type.
9937 (lynx_add_process): New function.
9938 (lynx_create_inferior, lynx_attach): Replace calls to
9939 add_process by calls to lynx_add_process.
9940 (lynx_resume): If PTID is null, then try using
9941 current_process()->private->last_wait_event_ptid.
9942 Add comments.
9943 (lynx_clear_inferiors): Delete. The contents of that function
9944 has been inlined in lynx_mourn;
9945 (lynx_wait_1): Save the ptid in the process's private data.
9946 (lynx_mourn): Free the process' private data. Replace call
9947 to lynx_clear_inferiors by call to clear_inferiors.
9948
96f7a20f
YQ
99492013-05-17 Yao Qi <yao@codesourcery.com>
9950
9951 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9952 the right place.
9953
db0dfaa0
LM
99542013-05-16 Luis Machado <lgustavo@codesourcery.com>
9955
9956 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9957 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9958 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9959 PT_TEXT_END_ADDR guards. Update comments.
9960 (linux_target_op) <read_offsets>: Conditionally define to
9961 linux_read_offsets if the target is UCLIBC and if it defines
9962 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9963
68f5f838
SL
99642013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9965 Andrew Jenner <andrew@codesourcery.com>
9966
9967 * Makefile.in (SFILES): Add linux-nios2-low.c.
9968 (clean): Add action to delete nios2-linux.c.
9969 (nios2-linux.c): New rule.
9970 * configure.srv: Add nios2*-*-linux*.
9971 * linux-nios2-low.c: New.
9972
1ebff1fd
HAQ
99732013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9974
9975 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9976
f6150862
HZ
99772013-04-25 Hui Zhu <hui@codesourcery.com>
9978
9979 PR gdb/15186
f6150862
HZ
9980 * ax.c (ax_printf): Add fflush.
9981
614c279d
TT
99822013-04-22 Tom Tromey <tromey@redhat.com>
9983
9984 * Makefile.in (SFILES): Add filestuff.c.
9985 (OBS): Add filestuff.o.
9986 (filestuff.o): New target.
9987 * config.in, configure: Rebuild.
9988 * configure.ac: Check for fdwalk, pipe2.
9989
7d4e5717
PA
99902013-04-17 Pedro Alves <palves@redhat.com>
9991
9992 * configure.ac (USE_THREAD_DB): Delete variable.
9993 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9994 Don't AC_SUBST USE_THREAD_DB.
9995 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9996 * config.in, configure: Regenerate.
9997
d5c93e41
PA
99982013-04-16 Pedro Alves <palves@redhat.com>
9999
10000 * linux-low.h (struct lwp_info) <thread_known>: Move under
10001 the USE_THREAD_DB #ifdef.
10002
04f5fe89
PA
100032013-04-16 Pedro Alves <palves@redhat.com>
10004
10005 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10006 (linux-low.o): Delete rule.
10007 * linux-low.h: Always include "gdb_thread_db.h" instead of
10008 conditionally including thread_db.h.
10009 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10010 HAVE_THREAD_DB_H.
10011
480b27bf
JK
100122013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10013
10014 * Makefile.in (install-only): Fix make install regression.
10015
43662968
JK
100162013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10017
10018 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10019 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10020 installation.
10021 * gdbserver.1: Remove.
10022
3e74e146
PA
100232013-03-22 Pedro Alves <palves@redhat.com>
10024
10025 * linux-low.c (handle_extended_wait): Don't call
10026 linux_enable_event_reporting.
10027
a8347a2a
TT
100282013-03-15 Tony Theodore <tonyt@logyst.com>
10029
10030 PR build/9098:
10031 * Makefile.in (SHELL): Use @SHELL@.
10032
eeb56fa7
SDJ
100332013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10034
10035 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10036 compiler warning.
10037
4fa7e2ff
JB
100382013-03-13 Joel Brobecker <brobecker@adacore.com>
10039
10040 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10041 Remove extraneous NULL element.
10042
8ddb1965
YQ
100432013-03-13 Yao Qi <yao@codesourcery.com>
10044
10045 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10046 'V' block in trace frame.
10047
9accd112
MM
100482013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10049
10050 * target.h (struct target_ops): Add btrace ops.
10051 (target_supports_btrace): New macro.
10052 (target_enable_btrace): New macro.
10053 (target_disable_btrace): New macro.
10054 (target_read_btrace): New macro.
10055 * gdbthread.h (struct thread_info): Add btrace field.
10056 * server.c: Include btrace-common.h.
10057 (handle_btrace_general_set): New function.
10058 (handle_btrace_enable): New function.
10059 (handle_btrace_disable): New function.
10060 (handle_general_set): Call handle_btrace_general_set.
10061 (handle_qxfer_btrace): New function.
10062 (struct qxfer qxfer_packets[]): Add btrace entry.
10063 * inferiors.c (remove_thread): Disable btrace.
10064 * linux-low: Include linux-btrace.h.
10065 (linux_low_enable_btrace): New function.
10066 (linux_low_read_btrace): New function.
10067 (linux_target_ops): Add btrace ops.
10068 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10069 Add srv_linux_btrace=yes.
10070 (x86_64-*-linux*): Add linux-btrace.o.
10071 Add srv_linux_btrace=yes.
10072 * configure.ac: Define HAVE_LINUX_BTRACE.
10073 * config.in: Regenerated.
10074 * configure: Regenerated.
10075
5cc22e4c
MM
100762013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10077
10078 * server.c (handle_qxfer): Preserve error message if -3 is
10079 returned.
10080 (qxfer): Document the -3 return value.
10081
7c97f91e
MM
100822013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10083
10084 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10085 (linux_btrace_h): New variable.
10086 (linux-btrace.o): New rule.
10087
be9a119c 100882013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10089 Hafiz Abid Qadeer <abidh@codesourcery.com>
10090
10091 * tracepoint.c (trace_buffer_size): New global.
10092 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10093 (init_trace_buffer): Change to one-argument function. Allocate
10094 trace buffer memory.
10095 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10096 handle QTBuffer:size packet.
10097 (cmd_bigqtbuffer_size): New function.
10098 (initialize_tracepoint): Call init_trace_buffer with
10099 DEFAULT_TRACE_BUFFER_SIZE.
10100 * server.c (handle_query): Add QTBuffer:size in the
10101 supported packets.
10102
e64f7499
YQ
101032013-03-07 Yao Qi <yao@codesourcery.com>
10104
10105 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10106 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10107 of -1.
10108 (cmd_qtsp): Adjust condition. Do post increment.
10109 Set cur_action and cur_step_action back to 0.
10110
f0ae6fc3
PA
101112013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10112
10113 PR server/15236
10114 * linux-low.c (linux_write_memory): Return early success if LEN is
10115 zero.
10116
b5b0b0af
CV
101172013-03-05 Corinna Vinschen <vinschen@redhat.de>
10118
334ad4a8 10119 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10120
589bc927
TT
101212013-02-28 Tom Tromey <tromey@redhat.com>
10122
10123 * configure.ac: Invoke AC_SYS_LARGEFILE.
10124 * configure, config.in: Rebuild.
10125
dfe07582
CV
101262013-02-28 Corinna Vinschen <vinschen@redhat.com>
10127
10128 * win32-low.c: Throughout, fix format strings and casts of
10129 printf-like functions to avoid type related warnings on all
10130 platforms.
10131 (get_child_debug_event): Print dwDebugEventCode as hex since
10132 that's how it's usually documented.
10133
736cd585
YQ
101342013-02-28 Yao Qi <yao@codesourcery.com>
10135
10136 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10137 pulongest.
10138
e1f58301
JW
101392013-02-27 Jiong Wang <jiwang@tilera.com>
10140
10141 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10142 (reg-tilegx32.c): New rule.
10143 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10144 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10145 different register info initializer according to elf class.
10146 (init_registers_tilgx32): New function. The tilegx32 register info
10147 initializer.
10148 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10149 (tile_store_gregset): Likewise.
10150
d171ca78
YQ
101512013-02-27 Yao Qi <yao@codesourcery.com>
10152
10153 * server.c (process_point_options): Print debug message when
10154 debug_threads is true.
10155
282bbdf3
YQ
101562013-02-26 Yao Qi <yao@codesourcery.com>
10157
10158 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10159
aca22551
PA
101602013-02-19 Pedro Alves <palves@redhat.com>
10161 Kai Tietz <ktietz@redhat.com>
10162
10163 PR gdb/15161
10164
10165 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10166 instead of strtoul to extract address from packet.
10167 (process_serial_event) <'z'>: Likewise.
10168
4f3cee1c
YQ
101692013-02-18 Yao Qi <yao@codesourcery.com>
10170
10171 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10172
8e1d55a3
PA
101732013-02-14 Pedro Alves <palves@redhat.com>
10174
10175 Plug memory leak.
10176
10177 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10178 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10179
458820da
PA
101802013-02-14 Pedro Alves <palves@redhat.com>
10181
10182 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10183
baea0dae
PA
101842013-02-14 Pedro Alves <palves@redhat.com>
10185
10186 * tracepoint.c (save_string): Delete.
10187 (add_tracepoint_action): Use savestring instead of save_string.
10188
0b1afbb3
PA
101892013-02-12 Pedro Alves <palves@redhat.com>
10190
10191 * linux-xtensa-low.c: Ditto.
10192 * xtensa-xtregs.c: Ditto.
10193
8a4ac37e
PA
101942013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10195
10196 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10197 thread_db.
10198
148de6bb
MS
101992013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10200
10201 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10202 aarch64_num_wp_regs and aarch64_num_bp_regs to
10203 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10204
55fac6e0
MS
102052013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10206
10207 * linux-aarch64-low.c (ps_get_thread_area): Replace
10208 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10209
176eb98c
MS
102102013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10211 Marcus Shawcroft <marcus.shawcroft@arm.com>
10212 Nigel Stephens <nigel.stephens@arm.com>
10213 Yufeng Zhang <yufeng.zhang@arm.com>
10214
10215 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10216 (aarch64.c, aarch64-without-fpu.c): New targets.
10217 * configure.srv (aarch64*-*-linux*): New.
10218 * linux-aarch64-low.c: New file.
10219
56f7af9c
MS
102202013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10221
43aaf8b6 10222 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10223 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10224 (dequeue_one_deferred_signal, linux_resume_one_thread)
10225 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10226 (linux_tracefork_grandchild, linux_test_for_tracefork)
10227 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10228 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10229 where the argument is 0.
10230
60f662b0
YQ
102312013-01-25 Yao Qi <yao@codesourcery.com>
10232
10233 * event-loop.c: Include "queue.h".
10234 (gdb_event_p): New typedef.
10235 (struct gdb_event) <next_event>: Remove.
10236 (event_queue): Change to QUEUE(gdb_event_p).
10237 (async_queue_event): Remove.
10238 (gdb_event_xfree): New.
10239 (initialize_event_loop): New.
10240 (process_event): Use API from QUEUE.
10241 (wait_for_event): Likewise.
10242 * server.c (main): Call initialize_event_loop.
10243 * server.h (initialize_event_loop): Declare.
10244
5ae4861a
YQ
102452013-01-18 Yao Qi <yao@codesourcery.com>
10246
10247 * ax.h (struct eval_agent_expr_context): New.
10248 (gdb_eval_agent_expr): Update declaration.
10249 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10250 TFRAME. Add new argument CTX.
10251 * server.h (struct eval_agent_expr_context): Declare.
10252 (agent_mem_read, agent_tsv_read): Update declaration.
10253 (agent_mem_read_string): Likewise.
10254 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10255 (add_traceframe_block): Add new argument TPOINT.
10256 Increase TPOINT->traceframe_usage.
10257 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10258 eval_tracepoint_agent_expr.
10259 (condition_true_at_tracepoint): Likewise.
10260 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10261 (agent_mem_read_string, agent_tsv_read): Likewise.
10262
85e00e85
YQ
102632013-01-16 Yao Qi <yao@codesourcery.com>
10264
10265 * linux-low.c (linux_resume_one_lwp): Don't check
10266 'lwp->bp_reinsert != 0'.
10267
4039cf45
JB
102682013-01-07 Joel Brobecker <brobecker@adacore.com>
10269 Pedro Alves <palves@redhat.com>
10270
10271 * lynx-low.c (ptrace_request_to_str): Define a temporary
10272 macro and use it to simplify this function's implementation.
10273
9044dee2
JB
102742013-01-07 Joel Brobecker <brobecker@adacore.com>
10275
10276 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10277 sets errno.
10278
e6352c8f
JB
102792013-01-07 Joel Brobecker <brobecker@adacore.com>
10280
10281 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10282
50681a27
JB
102832013-01-07 Joel Brobecker <brobecker@adacore.com>
10284
10285 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10286
3f6e77ef
JB
102872013-01-07 Joel Brobecker <brobecker@adacore.com>
10288
10289 * lynx-low.c (lynx_resume): Use the resume_info parameter
10290 to determine the ptid for the lynx_ptrace call, unless
10291 it is equal to minus_one_ptid, in which case we use the
10292 ptid of the current_inferior.
10293 (lynx_wait_1): After having received a thread create/exit
10294 event, resume the inferior's execution using the signaling
10295 thread's ptid, rather than the old ptid.
10296
7fda33ae
JB
102972013-01-07 Joel Brobecker <brobecker@adacore.com>
10298
10299 * lynx-low.c (lynx_resume): Delete variable ret.
10300
b9786c74
JB
103012013-01-01 Joel Brobecker <brobecker@adacore.com>
10302
10303 * gdbreplay.c (gdbreplay_version): Update copyright year.
10304 * server.c (gdbserver_version): Likewise.
10305
8b93d60f
JB
103062012-12-17 Joel Brobecker <brobecker@adacore.com>
10307
10308 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10309 new thread.
10310
037335a7
JB
103112012-12-17 Joel Brobecker <brobecker@adacore.com>
10312
10313 * lynx-low.c (ptrace_request_to_str): Add handling for
10314 PTRACE_GETTRACESIG.
10315
52d4cbd8
JB
103162012-12-17 Joel Brobecker <brobecker@adacore.com>
10317
10318 * lynx-low.c (lynx_attach): Delete variable new_process.
10319
ab8f6ca9
JB
103202012-12-17 Joel Brobecker <brobecker@adacore.com>
10321
10322 * lynx-low.c (lynx_create_inferior): Delete variable
10323 new_process.
10324
78cbc024
JB
103252012-12-17 Joel Brobecker <brobecker@adacore.com>
10326
10327 * lynx-low.c (ptrace_request_to_str): Do not handle
10328 PTRACE_GETTHREADLIST if this macro does not exist.
10329
14a00470
YQ
103302012-12-15 Yao Qi <yao@codesourcery.com>
10331
10332 * Makefile.in (OBS): Add notif.o.
10333 * notif.c, notif.h: New.
10334 * server.c: Include "notif.h".
10335 (struct vstop_notif) <next>: Remove.
10336 <base>: New field.
10337 (queue_stop_reply): Update.
10338 (push_event, send_next_stop_reply): Remove.
10339 (discard_queued_stop_replies): Update.
10340 (notif_stop): New variable.
10341 (handle_v_stopped): Remove.
10342 (handle_v_requests): Don't call handle_v_stopped. Call
10343 handle_ack_notif instead.
10344 (queue_stop_reply_callback): Call notif_event_enque instead
10345 of queue_stop_reply.
10346 (handle_status): Don't call send_next_stop_reply, call
10347 notif_write_event instead.
10348 (kill_inferior_callback): Likewise.
10349 (detach_or_kill_inferior_callback): Likewise.
10350 (main): Call initialize_notif.
10351 (process_serial_event): Call QUEUE_is_empty.
10352 (handle_target_event): Call notif_push instead of push event.
10353 * server.h (push_event): Remove declaration.
10354
61c125b9
TT
103552012-12-10 Tom Tromey <tromey@redhat.com>
10356
10357 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10358 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10359 macros.
10360 (.c.o): Rewrite.
10361 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10362 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10363 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10364 (amd64-linux-ipa.o, ax.o): Rewrite.
10365 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10366 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10367 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10368 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10369 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10370 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10371 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10372 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10373 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10374 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10375 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10376 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10377 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10378 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10379 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10380 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10381 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10382 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10383 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10384 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10385 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10386 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10387 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10388 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10389 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10390 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10391 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10392 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10393 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10394 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10395 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10396 (reg-tilegx.o): Remove.
10397 (all_object_files): New macro.
10398 Include .deps files.
10399 * aclocal.m4, configure: Rebuild.
10400 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10401 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10402 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10403
e90e9ad9
TT
104042012-12-05 Tom Tromey <tromey@redhat.com>
10405
10406 PR gdb/14917:
10407 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10408
02d403bf 104092012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10410
10411 * configure.ac: Check for linux/perf_event.h.
10412 * config.in: Regenerated.
10413 * configure: Regenerated.
10414
0270a750
PA
104152012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10416
10417 * hostio.c (handle_readlink): Decrease buffer size
10418 parameter passed to readlink by one byte.
10419
8c29b58e
YQ
104202012-11-26 Yao Qi <yao@codesourcery.com>
10421
10422 * configure.ac (build_warnings): Append '-Wempty-body'.
10423 * configure: Regenerated.
10424 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10425 body.
10426
8bdce1ff
PM
104272012-11-15 Pierre Muller <muller@sourceware.org>
10428
10429 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10430 * config.in: Regenerate.
10431 * configure: Regenerate.
10432 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10433 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10434 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10435 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10436 header.
10437 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10438 instead of <sys/wait.h> header.
10439 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10440
02d403bf 104412012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10442
10443 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10444 (various make rules): Remove -DGDBSERVER
10445
fbd5db48
YQ
104462012-11-09 Yao Qi <yao@codesourcery.com>
10447
10448 * spu-low.c (current_ptid): Move it to ..
10449 * gdbthread.h: ... here. New.
10450 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10451 * server.c (myresume, process_serial_event): Likewise.
10452 * thread-db.c (thread_db_find_new_threads): Likewise.
10453 * tracepoint.c (run_inferior_command): Likewise.
10454
b3dc46ff
AB
104552012-10-01 Andrew Burgess <aburgess@broadcom.com>
10456
10457 * server.c (handle_search_memory_1): Include access length in
10458 warning message.
10459
07c04788
HPN
104602012-09-05 Michael Brandt <michael.brandt@axis.com>
10461
10462 * linux-crisv32-low.c: Fix compile errors.
10463
918d227b
YQ
104642012-09-04 Yao Qi <yao@codesourcery.com>
10465
10466 * tracepoint.c (cmd_qtsv): Adjust debug message.
10467 Don't check CUR_TPOINT.
10468
18c1b81a
YQ
104692012-08-28 Yao Qi <yao@codesourcery.com>
10470
10471 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10472 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10473 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10474 Remove declarations of xmalloc, xreallloc, xstrdup and
10475 freeargv.
10476 * Makefile.in (libiberty_h): New.
10477 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10478 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10479
dc82f37b
YQ
104802012-08-23 Yao Qi <yao@codesourcery.com>
10481
10482 * server.h: Remove declaration of 'xsnprintf'.
10483
406b1477
KS
104842012-08-22 Keith Seitz <keiths@redhat.com>
10485
10486 * server.h: Include build-gnulib-gbserver/config.h.
10487 * gdbreplay.c: Likewise.
10488
e6712ff1
DE
104892012-08-08 Doug Evans <dje@google.com>
10490
10491 * Makefile.in (SFILES): Add gdb_vecs.c.
10492 (OBS): Add gdb_vecs.o.
10493 (gdb_vecs_h, host_defs_h): New variables.
10494 (thread-db.o): Add $(gdb_vecs_h) dependency.
10495 (gdb_vecs.o): New rule.
10496 * thread-db.c: #include "gdb_vecs.h".
10497 (thread_db_load_search): Use a vector to iterate over path elements.
10498 Handle text appearing after "$pdir".
10499
10500 * configure.ac: Add check for strstr.
10501 * config.in: Regenerate.
10502 * configure: Regenerate.
10503
7c3270ae
UW
105042012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10505
10506 * hostio.c (handle_pread): If pread fails, fall back to attempting
10507 lseek/read.
10508 (handle_pwrite): Likewise for pwrite.
10509
b62e2b27
UW
105102012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10511
10512 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10513 between unsupported TYPE and unimplementable ADDR/LEN combination.
10514 (arm_insert_point): Act on new return value.
10515
78a99e91
PA
105162012-07-31 Pedro Alves <palves@redhat.com>
10517
10518 * server.c (process_point_options): Only skip tokens if we find
10519 one that is unrecognized. Don't treat 'X' specially while
10520 skipping unrecognized tokens.
10521
fcf303ab
UW
105222012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10523
10524 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10525 to 4-byte-align HW breakpoint addresses for Thumb.
10526
7255706c
YQ
105272012-07-27 Yao Qi <yao@codesourcery.com>
10528
10529 PR remote/14161.
10530
10531 * server.h: Declare gdb_agent_about_to_close.
10532 * target.c (kill_inferior): Include "agent.h".
10533 New. Send command 'kill'.
10534 * target.h (kill_inferior): Removed macro.
10535 * tracepoint.c (gdb_agent_about_to_close): New.
10536 (gdb_agent_helper_thread): Handle command 'close'.
10537 Wait endlessly until the inferior stops.
10538 Install gdb_agent_remove_socket to atexit hook.
10539 (agent_socket_name): New static variable.
10540 (gdb_agent_socket_init): Replace local variable 'name' with
10541 'agent_socket_name'.
10542 (gdb_agent_remove_socket): New.
10543
5a3f286f
YQ
105442012-07-27 Yao Qi <yao@codesourcery.com>
10545
10546 * server.c (process_point_options): Stop at 'X' when parsing.
10547
961bd387
ME
105482012-07-19 Michael Eager <eager@eagercon.com>
10549
a261b8f5 10550 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10551 to hw_execute.
10552 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10553 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10554 hardware breakpoint.
10555
aa7c7447
JK
105562012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10557
10558 * gdbserver/linux-low.c (initialize_low): Call
10559 linux_ptrace_init_warnings.
10560
7f216e7c
DE
105612012-07-02 Doug Evans <dje@google.com>
10562
10563 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10564 pointer to int.
10565
d3ce09f5
SS
105662012-07-02 Stan Shebs <stan@codesourcery.com>
10567
10568 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10569 (ax.o): Add it to build rule.
10570 (ax-ipa.o): Ditto.
10571 (OBS): Add format.o.
10572 (IPA_OBS): Add format.o.
10573 * server.c (handle_query): Claim support for breakpoint commands.
10574 (process_point_options): Add command case.
10575 (process_serial_event): Leave running if there are printfs in
10576 effect.
10577 * mem-break.h (any_persistent_commands): Declare.
10578 (add_breakpoint_commands): Declare.
10579 (gdb_no_commands_at_breakpoint): Declare.
10580 (run_breakpoint_commands): Declare.
10581 * mem-break.c (struct point_command_list): New struct.
10582 (struct breakpoint): New field command_list.
10583 (any_persistent_commands): New function.
10584 (add_commands_to_breakpoint): New function.
10585 (add_breakpoint_commands): New function.
10586 (gdb_no_commands_at_breakpoint): New function.
10587 (run_breakpoint_commands): New function.
10588 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10589 locally.
10590 * ax.c: Include format.h.
10591 (ax_printf): New function.
10592 (gdb_eval_agent_expr): Add printf opcode.
10593
2f8f6aed
YQ
105942012-06-13 Yao Qi <yao@codesourcery.com>
10595
10596 * server.c (start_inferior): Remove duplicated writes to fields
10597 'last_resume_kind' and 'last_status' of 'current_inferior'.
10598
0c9070b3
YQ
105992012-06-12 Yao Qi <yao@codesourcery.com>
10600 Pedro Alves <palves@redhat.com>
10601
10602 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10603 comment.
10604 * server.c (handle_v_cont): Extend comment.
10605
c52daf70
YQ
106062012-06-11 Yao Qi <yao@codesourcery.com>
10607
10608 * linux-low.c (linux_attach): Add 'static'.
10609
d38bbb0a
YQ
106102012-06-06 Yao Qi <yao@codesourcery.com>
10611
10612 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10613
89dc0afd
JK
106142012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10615
10616 Fix gcc -flto compilation warning.
10617 * server.c (main): Make variable multi_mode and attach volatile.
10618
75f62ce7
TJB
106192012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10620
10621 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10622 if the platform doesn't know about it.
10623
65f479b6
PA
106242012-05-30 Jeff Kenton <jkenton@tilera.com>
10625
10626 * Makefile.in (SFILES): Add linux-tile-low.c.
10627 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10628 * configure.srv: Handle tilegx-*-linux*.
10629 * linux-tile-low.c: New file.
10630
0c5bf5a9
JK
106312012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10632
10633 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10634
a493e3e2
PA
106352012-05-24 Pedro Alves <palves@redhat.com>
10636
10637 PR gdb/7205
10638
43aaf8b6 10639 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10640
2ea28649
PA
106412012-05-24 Pedro Alves <palves@redhat.com>
10642
10643 PR gdb/7205
10644
10645 Replace target_signal with gdb_signal throughout.
10646
8d409d16
MR
106472012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10648
10649 * linux-low.c (linux_store_registers): Avoid the copying sequence
10650 when no data has been retrieved by ptrace.
10651
23512c01
MGD
106522012-05-22 Will Deacon <will.deacon@arm.com>
10653
10654 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10655 Include asm/ptrace.h.
10656 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10657 already defined.
10658
4934b29e
MR
106592012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10660
10661 * linux-low.c (linux_store_registers): Don't re-retrieve data
10662 with ptrace that has already been obtained from /proc. Always
10663 copy any data retrieved with ptrace to the buffer supplied.
10664
bde24c0a
PA
106652012-05-11 Yao Qi <yao@codesourcery.com>
10666 Pedro Alves <palves@redhat.com>
10667
10668 * linux-low.c (enum stopping_threads_kind): New.
10669 (stopping_threads): Change type to `enum stopping_threads_kind'.
10670 (handle_extended_wait): If stopping and suspending threads, leave
10671 the new_lwp suspended too.
10672 (linux_wait_for_event): Adjust.
10673 (stop_all_lwps): Set `stopping_threads' to
10674 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10675 whether we're suspending threads or just stopping them. Assert no
10676 recursion happens.
10677
623b6bdf
YQ
106782012-04-29 Yao Qi <yao@codesourcery.com>
10679
10680 * server.h: Move some code to ...
10681 * gdbthread.h: ... here. New.
10682 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10683 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10684 (nto-low.o, win32-low.o): Likewise.
10685 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10686 * regcache.c, remote-utils.c, server.c: Likewise.
10687 * target.c, tracepoint.c, win32-low.c: Likewise.
10688
f15f9948
TJB
106892012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10690
10691 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10692 (PTRACE_ARG4_TYPE): Likewise.
10693 (PTRACE_XFER_TYPE): Likewise.
10694 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10695 ptrace to PTRACE_ARG3_TYPE.
10696 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10697 (PTRACE_ARG4_TYPE): Likewise.
10698 (PTRACE_XFER_TYPE): Likewise.
10699 (linux_detach_one_lwp): Cast fourth argument of
10700 ptrace to long then PTRACE_ARG4_TYPE.
10701 (regsets_fetch_inferior_registers): Cast third argument of
10702 ptrace to long then PTRACE_ARG3_TYPE.
10703 (regsets_store_inferior_registers): Likewise.
10704
38ea300a
PA
107052012-04-20 Pedro Alves <palves@redhat.com>
10706
10707 * configure: Regenerate.
10708
c971b7fa
PA
107092012-04-19 Pedro Alves <palves@redhat.com>
10710
43aaf8b6 10711 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10712 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10713 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10714 (all, install-only, uninstall, clean-info, all-lib, clean): No
10715 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10716 (maintainer-clean realclean distclean): Use subdir_do.
10717 (subdir_do): New.
10718 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10719 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10720 * acinclude.m4: Include acx_configure_dir.m4.
10721 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10722 calls. Call AC_PROG_RANLIB. Configure gnulib using
10723 ACX_CONFIGURE_DIR.
10724 (GNULIB): New.
10725 (GNULIB_STDINT_H): Adjust.
10726 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10727 * gdbreplay.c: Include build-gnulib/config.h.
10728 * server.h: Likewise.
10729 * aclocal.m4: Regenerate.
10730 * config.in: Regenerate.
10731 * configure: Regenerate.
c971b7fa 10732
809277f8
PA
107332012-04-19 Pedro Alves <palves@redhat.com>
10734
10735 * Makefile.in (LIBGNU, INCGNU): Adjust.
10736 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10737 (all, install-only, uninstall, clean-info, all-lib, clean)
10738 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10739 * configure.ac: Adjust AC_OUTPUT output.
10740 * aclocal.m4: Regenerate.
10741 * configure: Regenerate.
10742
fd9bb8b8
PA
107432012-04-19 Pedro Alves <palves@redhat.com>
10744
10745 * Makefile.in (generated_files): New.
10746 (server_h): Remove the explicit dependency on config.h, and depend
10747 on $generated_files.
10748
1c298c66
PA
107492012-04-19 Pedro Alves <palves@redhat.com>
10750
10751 * Makefile.in (INCGNU): Add -Ignulib.
10752
57c4b50b
PA
107532012-04-19 Pedro Alves <palves@redhat.com>
10754
10755 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10756 (INCGNU): ... this, and spell out -I here.
10757 (GNULIB_LIB): Rename to ...
10758 (LIBGNU): ... this.
10759 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10760
1030e047
PA
107612012-04-19 Pedro Alves <palves@redhat.com>
10762
10763 * config.in: Regenerate.
10764
447d4319
PA
107652012-04-19 Pedro Alves <palves@redhat.com>
10766
10767 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10768 * server.h (memmem): Remove declaration.
10769 * config.in: Regenerate.
10770 * configure: Regenerate.
10771
aad9eab9
YQ
107722012-04-19 Yao Qi <yao@codesourcery.com>
10773
10774 * Makefile.in (SFILES): Add common/vec.c.
10775 (OBS): Add vec.o.
10776 (vec.o): New rule.
10777
3e10640f
YQ
107782012-04-19 Yao Qi <yao@codesourcery.com>
10779
10780 * remote-utils.c (prepare_resume_reply): Replace with macro
10781 target_core_of_thread.
10782 * server.c (handle_qxfer_threads_proper): Likewise.
10783 * target.h (traget_core_of_thread): New macro.
10784
71622373
PA
107852012-04-18 Pedro Alves <palves@redhat.com>
10786
10787 * aclocal.m4: Regenerate.
10788 * configure: Regenerate.
10789
80d26939
YQ
107902012-04-16 Yao Qi <yao@codesourcery.com>
10791
10792 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10793 duplicated on address.
10794
42476b70
YQ
107952012-04-16 Yao Qi <yao@codesourcery.com>
10796
10797 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10798 (struct tracepoint_action_ops) <send>: New field.
10799 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10800 (agent_expr_send, x_tracepoint_action_send): New.
10801 (l_tracepoint_action_send): New.
10802 (cmd_qtdp): Download and install tracepoint
10803 according to `use_agent'.
10804 (run_inferior_command): Add one more parameter `len'.
10805 Update callers.
10806 (tracepoint_send_agent): New.
10807 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10808
7bc83639
YQ
108092012-04-16 Yao Qi <yao@codesourcery.com>
10810
10811 * tracepoint.c (download_tracepoints): Moved to ...
10812 (cmd_qtstart): ... here.
10813
5f18041e
YQ
108142012-04-14 Yao Qi <yao@codesourcery.com>
10815
10816 * tracepoint.c: Include inttypes.h.
10817 (struct collect_memory_action): Use sized types.
10818 (struct tracepoint): Likewise.
10819 (cmd_qtdp, stop_tracing): Update print specifiers.
10820 (cmd_qtp, response_tracepoint): Likewise.
10821 (collect_data_at_tracepoint): Likewise.
10822 (collect_data_at_step): Likewise.
10823
55a8c076
YQ
108242012-04-14 Yao Qi <yao@codesourcery.com>
10825
10826 Import gnulib module inttypes.
10827 * aclocal.m4, config.in, configure: Regenerated.
10828
dc750257
YQ
108292012-04-14 Yao Qi <yao@codesourcery.com>
10830
10831 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10832 Makefile and config.status at last.
10833
0ab5faf9
YQ
108342012-04-13 Yao Qi <yao@codesourcery.com>
10835
10836 * tracepoint.c: Include stdint.h unconditionally.
10837
18f5fd81
TJB
108382012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10839
10840 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10841 on BFD_HAVE_SYS_PROCFS_TYPE.
10842 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10843 * configure: Regenerate.
10844 * config.in: Likewise.
10845
4d47af5c
L
108462012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10847
10848 * Makefile.in (clean): Also remove x32.c x32-linux.c
10849 x32-avx.c x32-avx-linux.c.
10850 (x32.o): New target.
10851 (x32.c): Likewise.
10852 (x32-linux.o): Likewise.
10853 (x32-linux.c): Likewise.
10854 (x32-avx.o): Likewise.
10855 (x32-avx.c): Likewise.
10856 (x32-avx-linux.o): Likewise.
10857 (x32-avx-linux.c): Likewise.
10858
10859 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10860 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10861 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10862 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10863 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10864 i386/x32-avx-linux.xml.
10865
10866 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10867 (init_registers_x32_avx_linux): Likwise.
10868 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10869 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10870
ecedbe58
PA
108712012-04-13 Pedro Alves <palves@redhat.com>
10872
10873 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10874 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10875 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10876 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10877 the sub-make.
10878
c92b5177
L
108792012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10880
10881 * linux-x86-low.c (compat_x32_clock_t): New.
10882 (compat_x32_siginfo_t): Likewise.
10883 (compat_x32_siginfo_from_siginfo): Likewise.
10884 (siginfo_from_compat_x32_siginfo): Likewise.
10885 (linux_is_elf64): Likewise.
10886 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10887 and siginfo_from_compat_x32_siginfo for x32.
10888 (x86_arch_setup): Set linux_is_elf64.
10889
214d508e
L
108902012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10891
10892 PR gdb/13969
10893 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10894 e_machine field.
10895 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10896 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10897 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10898 compatible with process.
10899
c9a1864a
YQ
109002012-04-12 Yao Qi <yao@codesourcery.com>
10901
10902 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10903 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10904 (install-only, install-info, clean): Handle sub dir gnulib.
10905 (all-lib, am--refresh): New targets.
10906 (memmem.o): Remove target.
10907 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10908 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10909 (AC_REPLACE_FUNCS): Remove memmem.
10910 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10911 (AC_OUTPUT): Generate Makefile in gnulib/.
10912 * aclocal.m4, config.in, configure: Regenerated.
10913
367ba2c2
MR
109142012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10915
10916 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10917
9d236627
PA
109182012-04-05 Pedro Alves <palves@redhat.com>
10919
10920 -Werror=strict-aliasing
10921
10922 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10923 pointer.
10924
111217b3
PA
109252012-04-04 Pedro Alves <palves@redhat.com>
10926
10927 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10928 (sparc_store_gregset_from_stack, sparc_store_gregset)
10929 (sparc_breakpoint_at): Fix formatting.
10930
8365dcf5
TJB
109312012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10932
10933 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10934 are available.
10935 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10936 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10937 * config.in: Regenerate.
10938 * configure: Likewise.
10939
689cc2ae
PA
109402012-03-29 Pedro Alves <palves@redhat.com>
10941
10942 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10943 Correct ptrace arguments.
10944
c14dfd32
PA
109452012-03-28 Pedro Alves <palves@redhat.com>
10946
10947 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10948 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10949 (IA64_FR1_REGNUM): New defines.
10950 (ia64_fetch_register): New.
10951 (the_low_target): Install it.
10952 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10953 field.
10954 * linux-low.c (linux_fetch_registers): Try the
10955 the_low_target.fetch_register hook first.
10956
10957 * linux-arm-low.c (the_low_target): Adjust.
10958 * linux-bfin-low.c (the_low_target): Adjust.
10959 * linux-cris-low.c (the_low_target): Adjust.
10960 * linux-crisv32-low.c (the_low_target): Adjust.
10961 * linux-m32r-low.c (the_low_target): Adjust.
10962 * linux-m68k-low.c (the_low_target): Adjust.
10963 * linux-mips-low.c (the_low_target): Adjust.
10964 * linux-ppc-low.c (the_low_target): Adjust.
10965 * linux-s390-low.c (the_low_target): Adjust.
10966 * linux-sh-low.c (the_low_target): Adjust.
10967 * linux-sparc-low.c (the_low_target): Adjust.
10968 * linux-tic6x-low.c (the_low_target): Adjust.
10969 * linux-x86-low.c (the_low_target): Adjust.
10970 * linux-xtensa-low.c (the_low_target): Adjust.
10971
63c88e13
PA
109722012-03-26 Pedro Alves <palves@redhat.com>
10973
10974 * server.c (handle_qxfer_libraries): Don't bail early if
10975 the_target->qxfer_libraries_svr4 is not NULL.
10976
fb723180
PA
109772012-03-26 Pedro Alves <palves@redhat.com>
10978
10979 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10980
0afae3cf
PA
109812012-03-23 Pedro Alves <palves@redhat.com>
10982
10983 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10984 "library-list-svr4" element's start tag when the the DSO list is
10985 empty.
10986
485f1ee4
PA
109872012-03-23 Pedro Alves <palves@redhat.com>
10988
10989 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10990 a variable whose type size is the same as the inferior's pointer
10991 size.
10992
a5362b9a
TS
109932012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10994
10995 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10996 struct siginfo.
10997 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10998 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10999 * linux-low.h: Include <signal.h>.
11000 (struct siginfo): Remove forward declaration.
11001 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11002 struct siginfo.
11003
d226c142
MF
110042012-03-21 Mike Frysinger <vapier@gentoo.org>
11005
11006 * .gitignore: Ignore more files.
11007
122f36ef
PA
110082012-03-19 Pedro Alves <palves@redhat.com>
11009 Jan Kratochvil <jan.kratochvil@redhat.com>
11010
11011 * server.c (cont_thread, general_thread): Add describing comments.
11012 (start_inferior): Clear `cont_thread'.
11013 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11014 of a process.
11015
fc3e5175
YQ
110162012-03-15 Yao Qi <yao@codesourcery.com>
11017
11018 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11019 handling to ...
11020 (cmd_qtdp): ... here.
11021
8d0d92cd
YQ
110222012-03-15 Yao Qi <yao@codesourcery.com>
11023
11024 * tracepoint.c (struct tracepoint_action_ops): New.
11025 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11026 (m_tracepoint_action_download): New.
11027 (r_tracepoint_action_download): New.
11028 (x_tracepoint_action_download): New.
11029 (l_tracepoint_action_download): New.
11030 (add_tracepoint_action): Install `action->ops' according type.
11031 (download_tracepoint_1): Move code `download' function pointer
11032 of various tracepoint_action_ops.
11033
87b0bb13
JK
110342012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11035
11036 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11037 linux_ptrace_attach_warnings.
11038
5f572dec
JK
110392012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11040
11041 * Makefile.in (linux-ptrace.o): New.
11042 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11043 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11044 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11045 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11046 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11047 of these targets.
11048 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11049
f4647387
YQ
110502012-03-08 Yao Qi <yao@codesourcery.com>
11051 Pedro Alves <palves@redhat.com>
11052
11053 Fix PR server/13392.
11054 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11055 offset of JMP insn.
11056 * tracepoint.c (remove_tracepoint): New.
11057 (cmd_qtdp): Call remove_tracepoint when failed to install.
11058
9b224c5e
PA
110592012-03-07 Pedro Alves <palves@redhat.com>
11060
11061 * linux-low.c (get_detach_signal): New.
11062 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11063 Pass on pending signals to PTRACE_DETACH. Check the result of the
11064 ptrace call.
11065 * server.c (program_signals, program_signals_p): New.
11066 (handle_general_set): Handle QProgramSignals.
11067 * server.h (program_signals, program_signals_p): Declare.
11068
e237a7e2
JK
110692012-03-05 Pedro Alves <palves@redhat.com>
11070 Jan Kratochvil <jan.kratochvil@redhat.com>
11071
11072 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11073 New comment why.
11074
5808517f
YQ
110752012-03-03 Yao Qi <yao@codesourcery.com>
11076
11077 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11078 agent_look_up_symbols.
11079
58b4daa5
YQ
110802012-03-03 Yao Qi <yao@codesourcery.com>
11081
11082 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11083 (linux-x86-low.o): Likewise.
11084 * server.h: Remove in_process_agent_loaded.
11085 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11086 common/agent.c.
11087 Update callers.
11088
8ffcbaaf
YQ
110892012-03-03 Yao Qi <yao@codesourcery.com>
11090
11091 * tracepoint.c (gdb_agent_capability): New global.
11092 (in_process_agent_loaded_ust): Renamed to
11093 `in_process_agent_supports_ust'.
11094 Update callers.
11095 (in_process_agent_supports_ust): Call agent_capability_check.
11096 (clear_installed_tracepoints): Assert that agent supports
11097 agent.
11098
d1feda86
YQ
110992012-03-03 Yao Qi <yao@codesourcery.com>
11100
11101 * linux-low.c (linux_supports_agent): New.
11102 (linux_target_ops): Initialize field `supports_agent' with
11103 linux_supports_agent.
11104 * target.h (struct target_ops) <supports_agent>: New.
11105 (target_supports_agent): New macro.
11106 * server.c (handle_general_set): Handle packet 'QAgent'.
11107 (handle_query): Send `QAgent+'.
11108 * Makefile.in (server.o): Depends on agent.h.
11109
2fa291ac
YQ
111102012-03-03 Yao Qi <yao@codesourcery.com>
11111
11112 * Makefile.in (OBS): Add agent.o.
11113 Add new rule for agent.o.
11114 Track dependence of tracepoint.c on agent.h.
11115 * tracepoint.c (run_inferior_command_1):
11116 (run_inferior_command): Call agent_run_command.
11117 (gdb_ust_connect_sync_socket): Deleted. Move it to
11118 common/agent.c.
11119 (resume_thread, stop_thread): Likewise.
11120 (gdb_ust_socket_init): Renamed to ...
11121 (gdb_agent_socket_init): ... New.
11122 (gdb_ust_thread): Renamed to ...
11123 (gdb_agent_helper_thread): ... New.
11124 (gdb_ust_init): Move some code to ...
11125 (gdb_agent_init): ... here. New.
11126 [HAVE_UST]: Call gdb_ust_init.
11127 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11128 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11129 * config.in, configure: Regenerated.
11130
05044653
PA
111312012-03-02 Pedro Alves <palves@redhat.com>
11132
11133 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11134 * linux-low.c (struct simple_pid_list): New.
11135 (stopped_pids): New a struct simple_pid_list pointer.
11136 (add_to_pid_list, pull_pid_from_list): New.
11137 (handle_extended_wait): Don't assume the first signal new children
11138 report is SIGSTOP. Adjust call to pull_pid_from_list.
11139 (linux_wait_for_lwp): Adjust.
11140
8d00225b
YQ
111412012-03-02 Yao Qi <yao@codesourcery.com>
11142
11143 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11144 debug log.
11145
19560ba5
YQ
111462012-03-02 Yao Qi <yao@codesourcery.com>
11147
11148 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11149 `stop_pc' and `tpoint'. Update caller.
11150
1faeff08
MR
111512012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11152
11153 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11154 * linux-low.c (use_linux_regsets): New macro.
11155 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11156 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11157 (linux_register_in_regsets): New function.
11158 (usr_fetch_inferior_registers): Skip registers covered by
11159 regsets.
11160 (usr_store_inferior_registers): Likewise.
11161 (usr_fetch_inferior_registers): New macro.
11162 (usr_store_inferior_registers): Likewise.
11163 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11164 (linux_store_registers): Likewise.
11165 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11166 prototype.
11167 (init_registers_mips64_dsp_linux): Likewise.
11168 (init_registers_mips_linux): New macro.
11169 (init_registers_mips_dsp_linux): Likewise.
11170 (mips_dsp_num_regs): Likewise.
11171 (DSP_BASE, DSP_CONTROL): New fallback macros.
11172 (mips_base_regs): New macro.
11173 (mips_regmap): Use it. Fix the size.
11174 (mips_dsp_regmap): New variable.
11175 (mips_dsp_regset_bitmap): Likewise.
11176 (mips_arch_setup): New function.
11177 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11178 than mips_regmap.
11179 (mips_cannot_store_register): Likewise.
11180 (the_low_target): Update .arch_setup, .num_regs and .regmap
11181 initializers. Add .regset_bitmap initializer.
11182 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11183 initializer.
11184 * linux-bfin-low.c (the_low_target): Likewise.
11185 * linux-cris-low.c (the_low_target): Likewise.
11186 * linux-crisv32-low.c (the_low_target): Likewise.
11187 * linux-ia64-low.c (the_low_target): Likewise.
11188 * linux-m32r-low.c (the_low_target): Likewise.
11189 * linux-m68k-low.c (the_low_target): Likewise.
11190 * linux-ppc-low.c (the_low_target): Likewise.
11191 * linux-s390-low.c (the_low_target): Likewise.
11192 * linux-sh-low.c (the_low_target): Likewise.
11193 * linux-sparc-low.c (the_low_target): Likewise.
11194 * linux-tic6x-low.c (the_low_target): Likewise.
11195 * linux-x86-low.c (the_low_target): Likewise.
11196 * linux-xtensa-low.c (the_low_target): Likewise.
11197 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11198 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11199 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11200 srv_xmlfiles.
11201 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11202 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11203
c03e6ccc
YQ
112042012-02-29 Yao Qi <yao@codesourcery.com>
11205 Pedro Alves <palves@redhat.com>
11206
11207 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11208 `step_over_finished' is true.
11209
644cebc9
PA
112102012-02-27 Pedro Alves <palves@redhat.com>
11211
11212 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11213 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11214
c14d7ab2
PA
112152012-02-27 Pedro Alves <palves@redhat.com>
11216
11217 PR server/9684
11218 * linux-low.c (pid_is_stopped): New.
11219 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11220
412c89dd
LM
112212012-02-25 Luis Machado <lgustavo@codesourcery.com>
11222
11223 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11224 of conditions.
11225
b745defe
MR
112262012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11227
11228 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11229
9f3a5c85
LM
112302012-02-24 Luis Machado <lgustavo@codesourcery>
11231
11232 * server.c (handle_query): Advertise support for target-side
11233 breakpoint condition evaluation.
11234 (process_point_options): New function.
11235 (process_serial_event): When inserting a breakpoint, check for
11236 a target-side condition that should be evaluated.
11237
11238 * mem-break.c: Include regcache.h and ax.h.
11239 (point_cond_list_t): New data structure.
11240 (breakpoint) <cond_list>: New field.
11241 (find_gdb_breakpoint_at): Make non-static.
11242 (delete_gdb_breakpoint_at): Clear any target-side
11243 conditions.
11244 (clear_gdb_breakpoint_conditions): New function.
11245 (add_condition_to_breakpoint): Likewise.
11246 (add_breakpoint_condition): Likewise.
11247 (gdb_condition_true_at_breakpoint): Likewise.
11248 (gdb_breakpoint_here): Return result directly instead
11249 of going through a local variable.
11250
11251 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11252 (clear_gdb_breakpoint_conditions): Likewise.
11253 (add_breakpoint_condition): Likewise.
11254 (gdb_condition_true_at_breakpoint): Likewise.
11255
11256 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11257 (need_step_over_p): Take target-side breakpoint condition into
11258 consideration.
11259
5e1dc496
LM
112602012-02-24 Luis Machado <lgustavo@codesourcery>
11261
11262 * server.h: Include tracepoint.h.
11263 (agent_mem_read, agent_get_trace_state_variable_value,
11264 agent_set_trace_state_variable_value,
11265 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11266 get_set_tsv_func_addr): New prototypes.
11267
11268 * ax.h: New include file.
11269 * ax.c: New source file.
11270
11271 * tracepoint.c: Include ax.h.
11272 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11273 agent_expr, eval_result_type): Move to ax.h.
11274 (parse_agent_expr): Rename to ...
11275 (gdb_parse_agent_expr): ... this, make it non-static and move
11276 to ax.h.
11277 (unparse_agent_expr) Rename to ...
11278 (gdb_unparse_agent_expr): ... this, make it non-static and move
11279 to ax.h.
11280 (eval_agent_expr): Rename to ...
11281 (eval_tracepoint_agent_expr): ... this.
11282 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11283 forward declarations.
11284 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11285 (agent_get_trace_state_variable_value): New function.
11286 (agent_set_trace_state_variable_value): New function.
11287 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11288 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11289 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11290 (condition_true_at_tracepoint): Likewise.
11291 (parse_agent_expr): Rename to ...
11292 (gdb_parse_agent_expr): ... this and move to ax.c.
11293 (unparse_agent_expr): Rename to ...
11294 (gdb_unparse_agent_expr): ... this and move to ax.c.
11295 (gdb_agent_op_name): Move to ax.c.
11296 (eval_agent_expr): Rename to ...
11297 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11298 and move to ax.c.
11299 (eval_tracepoint_agent_expr): New function.
11300 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11301 non-static.
5e1dc496
LM
11302 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11303 ax.c.
11304 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11305 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11306 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11307 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11308 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11309 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11310 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11311 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11312 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11313 (compile_bytecodes): Remove forward declaration.
11314 (is_goto_target): Move to ax.c.
11315 (compile_bytecodes): Move to ax.c and call
11316 agent_get_trace_state_variable_value (...) and
11317 agent_set_trace_state_variable_value (...).
11318
11319 * Makefile.in: Update ax.c and IPA dependencies.
11320
277e4e52
PA
113212012-02-24 Pedro Alves <palves@redhat.com>
11322
11323 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11324 (cmd_bigqtbuffer_circular): ... this. Only handle
11325 'QTBuffer:circular:'.
11326 (handle_tracepoint_general_set): Adjust.
11327
bf4c19f7
YQ
113282012-02-16 Yao Qi <yao@codesourcery.com>
11329
11330 * inferiors.c: Move code to ...
11331 * dll.c: .... here. New.
11332 * server.h: Declare clear_dlls.
11333 * Makefile.in (SFILES): Add dll.c.
11334 (OBS): Add dll.o
11335 (dll.o): New rule.
11336
d73f2619
YQ
113372012-02-11 Yao Qi <yao@codesourcery.com>
11338
11339 * server.c: (handle_monitor_command): Add a new parameter
11340 `own_buf'.
11341 (handle_query): Update caller.
11342
f8255c2a
JB
113432012-02-09 Joel Brobecker <brobecker@adacore.com>
11344
11345 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11346 * configure, config.in: Regenerate.
11347 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11348 is not defined.
11349
da84f473
PA
113502012-02-02 Pedro Alves <palves@redhat.com>
11351
11352 Try SIGKILL first, then PTRACE_KILL.
11353 * linux-low.c (linux_kill_one_lwp): New.
11354 (linux_kill_one_lwp): Rename to ...
11355 (kill_one_lwp_callback): ... this. Use the new
11356 linux_kill_one_lwp.
11357
e886a173
PA
113582012-02-02 Pedro Alves <palves@redhat.com>
11359
11360 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11361 inferior.
11362
be07f1a2
PA
113632012-01-27 Pedro Alves <palves@redhat.com>
11364
11365 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11366 (elf_64_file_p): Make static.
11367 (linux_pid_exe_is_elf_64_file): New.
11368 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11369 Delete declarations.
11370 (linux_pid_exe_is_elf_64_file): Declare.
11371 * linux-x86-low.c (x86_arch_setup): Use
11372 linux_pid_exe_is_elf_64_file.
11373
d8301ad1
JK
113742012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11375
11376 * linux-low.c (linux_wait_for_event_1): Rename to ...
11377 (linux_wait_for_event): ... here and merge it with former
11378 linux_wait_for_event - new variable wait_ptid, use it.
11379 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11380
01b17894
PA
113812012-01-23 Pedro Alves <palves@redhat.com>
11382
11383 * server.c (main): Avoid yet another case of infinite loop while
11384 detaching/killing after a longjmp.
11385
e825046f
JK
113862012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11387
11388 Code cleanup.
11389 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11390
b9e7b9c3
UW
113912012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11392
11393 * hostio.c (handle_readlink): New function.
11394 (handle_vFile): Call it to handle "vFile:readlink" packets.
11395
901f9912
UW
113962012-01-20 Pedro Alves <palves@redhat.com>
11397 Ulrich Weigand <ulrich.weigand@linaro.org>
11398
11399 * server.c (handle_v_requests): Only support vAttach and vRun to
11400 start multiple processes when in extended protocol mode.
11401
fc1ab1a0
PA
114022012-01-17 Pedro Alves <palves@redhat.com>
11403
11404 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11405 memalign plus mprotect to allocate the scratch buffer.
11406
7d5d4e98
PA
114072012-01-13 Pedro Alves <palves@redhat.com>
11408
11409 * server.c (attach_inferior): Clear `cont_thread'.
11410
f128d5e9
PA
114112012-01-13 Pedro Alves <palves@redhat.com>
11412
11413 * server.c (main): Avoid infinite loop while detaching/killing
11414 after a longjmp.
11415
06db92f0
DE
114162012-01-09 Doug Evans <dje@google.com>
11417
11418 * server.c (start_inferior): Set last_ptid in --wrapper case.
11419
32d92999
YQ
114202012-01-06 Yao Qi <yao@codesourcery.com>
11421
11422 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11423 defined.
11424 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11425
5e0a92a9
YQ
114262012-01-04 Yao Qi <yao@codesourcery.com>
11427
11428 * tracepoint.c (cmd_qtdp): Print debug message
11429 for static tracepoint.
11430
ae639e8c
YQ
114312012-01-04 Yao Qi <yao@codesourcery.com>
11432
11433 * tracepoint.c (trace_vdebug): Differentiate debug message
11434 between gdbserver and IPA.
11435
f72429c5
YQ
114362012-01-03 Yao Qi <yao@codesourcery.com>
11437
11438 * tracepoint.c (tracepoint_was_hit): Don't collect for
11439 static tracepoint.
11440
12c3e59c
JB
114412012-01-02 Joel Brobecker <brobecker@adacore.com>
11442
11443 * terminal.h: Reformat copyright header.
11444
67827812
JB
114452012-01-02 Joel Brobecker <brobecker@adacore.com>
11446
11447 * server.c (gdbserver_version): Update copyright year.
11448 * gdbreplay.c (gdbreplay_version): Likewise.
11449
3e52c33d
JK
114502011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11451
11452 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11453
11454 Revert:
11455 2011-12-18 Hui Zhu <teawater@gmail.com>
11456 * linux-low.c (linux_create_inferior): Save return value to ret.
11457
66f1260e
HZ
114582011-12-18 Hui Zhu <teawater@gmail.com>
11459
11460 * linux-low.c (linux_create_inferior): Save return value to ret.
11461
e77616d7
DE
114622011-12-16 Doug Evans <dje@google.com>
11463
e7b06c57
DE
11464 * linux-low.c (linux_create_inferior): If stdio connection,
11465 redirect stdin from /dev/null, stdout to stderr.
11466 * remote-utils.c (remote_is_stdio): New static global.
11467 (remote_connection_is_stdio): New function.
11468 (remote_prepare): Handle stdio connection.
11469 (remote_open): Ditto.
11470 (remote_close): Don't close stdin for stdio connections.
11471 (read_prim,write_prim): New functions. Replace all calls to
11472 read/write to these.
11473 * server.c (main): Watch for "-" argument. Move call to
11474 remote_prepare before start_inferior.
11475 * server.h (STDIO_CONNECTION_NAME): New macro.
11476 (remote_connection_is_stdio): Declare.
11477
e77616d7
DE
11478 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11479 in debugging output.
11480
82067193
YQ
114812011-12-15 Yao Qi <yao@codesourcery.com>
11482
11483 * tracepoint.c: Include sys/syscall.h.
11484 (gdb_ust_thread): Remove preprocessor conditional.
11485
82bfbe7e
PA
114862011-12-14 Pedro Alves <pedro@codesourcery.com>
11487
11488 * linux-low.c (linux_detach_one_lwp): Call
11489 the_low_target.prepare_to_resume before detaching.
11490
712c6575
YQ
114912011-12-14 Yao Qi <yao@codesourcery.com>
11492
11493 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11494 of write.
11495
d54d1edf
YQ
114962011-12-14 Yao Qi <yao@codesourcery.com>
11497
11498 * i386-low.c (i386_low_stopped_data_address): Initialize local
11499 variable `control'.
11500
6210a125
PA
115012011-12-13 Pedro Alves <pedro@codesourcery.com>
11502
11503 PR remote/13492
11504
11505 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11506 DR_CONTROL unless necessary. Extend comments.
11507 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11508 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11509
2ece8244
YQ
115102011-12-13 Yao Qi <yao@codesourcery.com>
11511
11512 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11513 macros.
11514 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11515
784867a5
JK
115162011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11517
11518 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11519 Print new debug message for such case.
11520
6bf36717
JK
115212011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11522
11523 Fix overlapping memcpy.
11524 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11525 the read_inferior_memory transfer.
11526 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11527 write_inferior_memory transfer.
11528 (set_fast_tracepoint_jump): New variable buf. Use it for the
11529 read_inferior_memory and write_inferior_memory transfers.
11530 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11531 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11532 Use it for the write_inferior_memory transfer.
11533 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11534 buffers.
11535
50275556
MR
115362011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11537
11538 * linux-low.c (fetch_register, store_register): Make code
11539 consistent, fix formatting.
11540
7325beb4
MR
115412011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11542
11543 * linux-low.c (usr_store_inferior_registers): Factor out code
11544 to handle individual registers into...
11545 (store_register): ... this new function.
11546
c642a434
UW
115472011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11548
11549 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11550 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11551 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11552 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11553 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11554 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11555 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11556 (srv_xmlfiles): Add new XML files.
11557
11558 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11559 and <sys/uio.h>.
11560 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11561 (init_registers_s390_linux32v1): Add prototype.
11562 (init_registers_s390_linux32v2): Likewise.
11563 (init_registers_s390_linux64v1): Likewise.
11564 (init_registers_s390_linux64v2): Likewise.
11565 (init_registers_s390x_linux64v1): Likewise.
11566 (init_registers_s390x_linux64v2): Likewise.
11567 (s390_num_regs): Increment to 52.
11568 (s390_regmap): Add orig_r2 register.
11569 (s390_num_regs_3264): Increment to 68.
11570 (s390_regmap_3264): Add orig_r2 register.
11571 (s390_collect_ptrace_register): Handle orig_r2 register.
11572 (s390_supply_ptrace_register): Likewise.
11573 (s390_fill_last_break): New function.
11574 (s390_store_last_break): Likewise.
11575 (s390_fill_system_call): New function.
11576 (s390_store_system_call): Likewise.
11577 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11578 register sets.
11579 (s390_check_regset): New function.
11580 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11581 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11582 Update target_regsets for available register sets.
11583
2268b414
JK
115842011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11585 Jan Kratochvil <jan.kratochvil@redhat.com>
11586
11587 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11588 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11589 New.
11590 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11591 * linux-low.h (struct process_info_private): New member r_debug.
11592 * server.c (handle_qxfer_libraries): Call
11593 the_target->qxfer_libraries_svr4.
11594 (handle_qxfer_libraries_svr4): New function.
11595 (qxfer_packets): New entry "libraries-svr4".
11596 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11597 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11598 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11599 PACKET_qXfer_libraries_svr4.
11600
d6db1fab
UW
116012011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11602
11603 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11604 PSW address/mask between 8-byte and 16-byte formats.
11605 (s390_supply_ptrace_register): Likewise.
11606 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11607 basic addressing mode bit.
11608
242f5f1c
SS
116092011-11-24 Stan Shebs <stan@codesourcery.com>
11610
11611 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11612
f196051f
SS
116132011-11-17 Stan Shebs <stan@codesourcery.com>
11614
11615 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11616 (tracing_start_time): New global.
11617 (tracing_stop_time): New global.
11618 (tracing_user_name): New global.
11619 (tracing_notes): New global.
11620 (tracing_stop_note): New global.
11621 (cmd_qtstart): Set traceframe_usage, start_time.
11622 (stop_tracing): Set stop_time.
11623 (cmd_qtstatus): Report additional status.
11624 (cmd_qtp): New function.
11625 (handle_tracepoint_query): Call it.
11626 (cmd_qtnotes): New function.
11627 (handle_tracepoint_general_set): Call it.
11628 (get_timestamp): Rename from tsv_get_timestamp.
11629
405f8e94
SS
116302011-11-14 Stan Shebs <stan@codesourcery.com>
11631 Kwok Cheung Yeung <kcy@codesourcery.com>
11632
11633 * linux-x86-low.c (small_jump_insn): New.
11634 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11635 trampoline and error message, build a trampoline and issue a small
11636 jump instruction to it.
11637 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11638 trampoline and error message.
11639 (x86_get_min_fast_tracepoint_insn_len): New.
11640 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11641 * linux-low.h (struct linux_target_ops): Add arguments to
11642 install_fast_tracepoint_jump_pad operation, add new operation.
11643 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11644 arguments.
11645 (linux_get_min_fast_tracepoint_insn_len): New function.
11646 (linux_target_op): Add new operation.
11647 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11648 (gdb_trampoline_buffer_end): Ditto.
11649 (gdb_trampoline_buffer_error): Ditto.
11650 (struct ipa_sym_addresses): Add fields for new IPA variables.
11651 (symbol_list): Add entries for new IPA variables.
11652 (struct tracepoint): Add fields to hold the address range of the
11653 trampoline used by the tracepoint.
11654 (trampoline_buffer_head): New static variable.
11655 (trampoline_buffer_tail): Ditto.
11656 (claim_trampoline_space): New function.
11657 (have_fast_tracepoint_trampoline_buffer): New function.
11658 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11659 structure.
11660 (install_fast_tracepoint): Ditto, also add error buffer argument.
11661 (cmd_qtminftpilen): New function.
11662 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11663 (fast_tracepoint_from_trampoline_address): New function.
11664 (fast_tracepoint_collecting): Handle trampoline as part of jump
11665 pad space.
11666 (set_trampoline_buffer_space): New function.
11667 (initialize_tracepoint): Initialize new IPA variables.
11668 * target.h (struct target_ops): Add arguments to
11669 install_fast_tracepoint_jump_pad operation, add new
11670 get_min_fast_tracepoint_insn_len operation.
11671 (target_get_min_fast_tracepoint_insn_len): New.
11672 (install_fast_tracepoint_jump_pad): Add arguments.
11673 * server.h (IPA_BUFSIZ): Define.
11674 * linux-i386-ipa.c: Include extra header files.
11675 (initialize_fast_tracepoint_trampoline_buffer): New function.
11676 (initialize_low_tracepoint): Call it.
11677 * server.h (set_trampoline_buffer_space): Declare.
11678 (claim_trampoline_space): Ditto.
11679 (have_fast_tracepoint_trampoline_buffer): Ditto.
11680
1e4d1764
YQ
116812011-11-14 Yao Qi <yao@codesourcery.com>
11682
11683 * server.c (handle_query): Handle InstallInTrace for qSupported.
11684 * tracepoint.c (add_tracepoint): Sort list.
11685 (install_tracepoint, download_tracepoint): New.
11686 (cmd_qtdp): Call them to install and download tracepoints.
11687 (sort_tracepoints): Removed.
11688 (cmd_qtstart): Update.
11689
5c73ff4e
YQ
116902011-11-14 Yao Qi <yao@codesourcery.com>
11691
11692 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11693 * mem-break.h: Declare.
11694 * tracepoint.c (cmd_qtstart): Move some code to ...
11695 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11696 New.
11697 (download_tracepoints): Move some code to ...
11698 (download_tracepoint_1): ... here. New.
11699
86a30030
YQ
117002011-11-08 Yao Qi <yao@codesourcery.com>
11701
11702 * remote-utils.c (relocate_instruction): A comment fix.
11703
8d26e50c
JB
117042011-11-07 Joel Brobecker <brobecker@adacore.com>
11705
11706 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11707 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11708 dr_status_mirror and dr_control_mirror from debug_reg_state.
11709 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11710 (i386_initial_stuff): Remove use of deleted globals.
11711 (i386_get_thread_context, i386_set_thread_context,
11712 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11713 from debug_reg_state.
11714
a59306a3
YQ
117152011-11-05 Yao Qi <yao@codesourcery.com>
11716
11717 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11718 address as TPOINT's.
11719
3065dfb6
SS
117202011-11-02 Stan Shebs <stan@codesourcery.com>
11721
11722 * tracepoint.c (agent_mem_read_string): New function.
11723 (eval_agent_expr): Call it for tracenz.
11724 * server.c (handle_query): Report support for tracenz.
11725
fd0d8c7c
YQ
117262011-11-02 Yao Qi <yao@codesourcery.com>
11727
11728 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11729
609086b1
YQ
117302011-11-02 Yao Qi <yao@codesourcery.com>
11731
11732 * target.h: Fix a typo in comment.
11733
b9fd1791
PA
117342011-10-31 Pedro Alves <pedro@codesourcery.com>
11735
11736 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11737 clobber the breakpoints' shadows with fast tracepoint jumps.
11738 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11739 * target.c (write_inferior_memory): Also pass MYADDR down to
11740 check_mem_write.
11741
03583c20
UW
117422011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11743
11744 * configure.ac: Check support for personality routine.
11745 * configure: Regenerate.
11746 * config.in: Likewise.
11747 * linux-low.c: Include <sys/personality.h>.
11748 Define ADDR_NO_RANDOMIZE if necessary.
11749 (linux_create_inferior): Disable address space randomization when
11750 forking inferior, if requested.
11751 (linux_supports_disable_randomization): New function.
11752 (linux_target_ops): Install it.
11753 * server.h (disable_randomization): Declare.
11754 * server.c (disable_randomization): New global variable.
11755 (handle_general_set): Handle QDisableRandomization.
11756 (handle_query): Likewise for qSupported.
11757 (main): Support --disable-randomization and --no-disable-randomization
11758 command line arguments.
11759 * target.h (struct target_ops): Add supports_disable_randomization.
11760 (target_supports_disable_randomization): New macro.
11761
723b724b
MF
117622011-09-29 Mike Frysinger <vapier@gentoo.org>
11763
11764 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11765 ifdef check.
11766 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11767 [!PT_GETDSBT] (target_loadmap): New definition.
11768 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11769 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11770 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11771 and PT_GETDSBT to LINUX_LOADMAP.
11772 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11773 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11774
55329a5c 117752011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11776
11777 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11778 (arm_linux_hwbp_cap): New static variable.
11779 (arm_linux_get_hwbp_cap): Replace by ...
11780 (arm_linux_init_hwbp_cap): ... this new function.
11781 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11782 (arm_linux_get_hw_watchpoint_count): Likewise.
11783 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11784 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11785 (arm_prepare_to_resume): Use perror_with_name instead of error.
11786
55329a5c 117872011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11788
11789 * linux-arm-low.c: Include <signal.h>.
11790 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11791 (struct arm_linux_hwbp_cap): New data type.
11792 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11793 (struct arm_linux_hw_breakpoint): New data type.
11794 (MAX_BPTS, MAX_WPTS): Define.
11795 (struct arch_process_info, struct arch_lwp_info): New data types.
11796 (arm_linux_get_hwbp_cap): New function.
11797 (arm_linux_get_hw_breakpoint_count): Likewise.
11798 (arm_linux_get_hw_watchpoint_count): Likewise.
11799 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11800 (arm_hwbp_control_initialize): Likewise.
11801 (arm_hwbp_control_is_enabled): Likewise.
11802 (arm_hwbp_control_is_initialized): Likewise.
11803 (arm_hwbp_control_disable): Likewise.
11804 (arm_linux_hw_breakpoint_equal): Likewise.
11805 (arm_linux_hw_point_initialize): Likewise.
11806 (struct update_registers_data): New data structure.
11807 (update_registers_callback: New function.
11808 (arm_insert_point): Likewise.
11809 (arm_remove_point): Likewise.
11810 (arm_stopped_by_watchpoint): Likewise.
11811 (arm_stopped_data_address): Likewise.
11812 (arm_new_process): Likewise.
11813 (arm_new_thread): Likewise.
11814 (arm_prepare_to_resume): Likewise.
11815 (the_low_target): Register arm_insert_point, arm_remove_point,
11816 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11817 arm_new_thread, and arm_prepare_to_resume.
11818
6b9801d4
SS
118192011-09-15 Stan Shebs <stan@codesourcery.com>
11820
11821 * server.h (struct emit_ops): Add compare-goto fields.
11822 * tracepoint.c (gdb_agent_op_sizes): New table.
11823 (emit_eq_goto): New function.
11824 (emit_ne_goto): New function.
11825 (emit_lt_goto): New function.
11826 (emit_le_goto): New function.
11827 (emit_gt_goto): New function.
11828 (emit_ge_goto): New function.
11829 (is_goto_target): New function.
11830 (compile_bytecodes): Recognize special cases of compare-goto
11831 combinations and call specialized emitters for them.
11832 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11833 (amd64_emit_ne_goto): New function.
11834 (amd64_emit_lt_goto): New function.
11835 (amd64_emit_le_goto): New function.
11836 (amd64_emit_gt_goto): New function.
11837 (amd64_emit_ge_goto): New function.
11838 (amd64_emit_ops): Add the new functions.
11839 (i386_emit_eq_goto): New function.
11840 (i386_emit_ne_goto): New function.
11841 (i386_emit_lt_goto): New function.
11842 (i386_emit_le_goto): New function.
11843 (i386_emit_gt_goto): New function.
11844 (i386_emit_ge_goto): New function.
11845 (i386_emit_ops): Add the new functions.
11846
bf15cbda
SS
118472011-09-08 Stan Shebs <stan@codesourcery.com>
11848
11849 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11850 (i386_emit_epilogue): Restore %ebx.
11851
943ca1dd
JZ
118522011-08-31 Jie Zhang <jzhang918@gmail.com>
11853
11854 * server.c (step_thread): Remove definition.
11855 (process_serial_event): Don't handle Hs.
11856 * server.h (step_thread): Remove declaration.
11857 * target.c (set_desired_inferior): Remove use of step_thread.
11858
e3deef73
LM
118592011-08-24 Luis Machado <lgustavo@codesourcery.com>
11860
11861 * linux-low.c: Include linux-procfs.h.
11862 (linux_attach_lwp_1): Update comments.
11863 (linux_attach): Scan for existing threads when attaching to a
11864 process that is the tgid.
11865 * Makefile.in: Update dependencies.
11866
13da1c97
LM
118672011-08-24 Luis Machado <lgustavo@codesourcery.com>
11868
11869 * configure.srv: Add linux-procfs.o dependencies.
11870
881127c9
YQ
118712011-08-14 Yao Qi <yao@codesourcery.com>
11872
11873 * target.h (struct target_ops): Fix indent.
11874 * win32-low.c (win32_target_ops): Fix comment.
11875
58dbd541
YQ
118762011-08-14 Andrew Jenner <andrew@codesourcery.com>
11877 Yao Qi <yao@codesourcery.com>
11878
11879 * Makefile.in (clean): Remove tic6x-*.c files.
11880 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11881 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11882 (tic6x-c64xp-linux.c): Likewise.
11883 * configure.srv: Add support for tic6x-*-uclinux.
11884 * linux-tic6x-low.c: New.
11885 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11886
78d85199
YQ
118872011-08-14 Andrew Stubbs <ams@codesourcery.com>
11888 Yao Qi <yao@codesourcery.com>
11889
11890 * target.h (struct target_ops): Add read_loadmap.
11891 * linux-low.c (struct target_loadseg): New type.
11892 (struct target_loadmap): New type.
11893 (linux_read_loadmap): New function.
11894 (linux_target_ops): Add linux_read_loadmap.
11895 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11896 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11897 to NULL.
78d85199 11898
a959a88d
EZ
118992011-08-05 Eli Zaretskii <eliz@gnu.org>
11900
11901 * win32-low.c: Include <stdint.h>.
11902
1ced966e
PA
119032011-07-22 Pedro Alves <pedro@codesourcery.com>
11904
11905 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11906 to the inferior here.
11907 (i386_remove_aligned_watchpoint): Ditto.
11908 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11909 fit part of the watchpoint in the debug registers.
11910 (i386_update_inferior_debug_regs): New.
11911 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11912 registers, and only update the inferior on success.
11913 (i386_low_remove_watchpoint): Ditto.
11914
d26e3629
KY
119152011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11916
11917 * linux-low.c (compare_ints, unique, list_threads, show_process,
11918 linux_core_of_thread): Delete.
11919 (linux_target_ops): Change linux_core_of_thread to
11920 linux_common_core_of_thread.
11921 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11922 * utils.c (malloc_failure): Change type of argument.
11923 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11924 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11925 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11926 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11927 (IPA_OBJS): Add common-utils-ipa.o.
11928 (ptid_h, linux_osdata_h): New macros.
11929 (server_h): Add common/common-utils.h, common/xml-utils.h,
11930 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11931 common/ptid.h.
11932 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11933 ptid.o, buffer.o): New rules.
11934 (linux-low.o): Add common/linux-osdata.h as a dependency.
11935 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11936 * configure.ac: Add AC_HEADER_DIRENT check.
11937 * config.in: Regenerate.
11938 * configure: Regenerate.
11939 * remote-utils.c (xml_escape_text): Delete.
11940 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11941 buffer_xml_printf): Move to common/buffer.c.
11942 * server.c (main): Remove call to initialize_inferiors.
11943 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11944 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11945 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11946 internal_error, gdb_assert, gdb_assert_fail): Delete.
11947 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11948 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11949 common/buffer.h.
11950 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11951 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11952 initialize_inferiors): Delete.
11953
2275a1a7
PA
119542011-07-20 Pedro Alves <pedro@codesourcery.com>
11955
11956 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11957 symbol error.
11958
0a5b1e09
PA
119592011-05-31 Pedro Alves <pedro@codesourcery.com>
11960
11961 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11962 assertion.
11963 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11964
6938fd34
YQ
119652011-05-26 Yao Qi <yao@codesourcery.com>
11966
11967 * Makefile.in (thread-db.o): Track dependence to
11968 common/gdb_thread_db.h.
11969 * thread-db.c: include gdb_thread_db.h from right place.
11970
b481f9e0
TT
119712011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11972
11973 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11974 __FILE__ and __LINE__ to internal_error.
11975
98a5dd13
DE
119762011-05-13 Doug Evans <dje@google.com>
11977
11978 * thread-db.c (try_thread_db_load_from_sdir): New function.
11979 (try_thread_db_load_from_dir): New function.
11980 (thread_db_load_search): Handle $sdir, ignore $pdir.
11981 Remove trying of system directories if search of
11982 libthread-db-search-path fails, that is now done via $sdir.
11983
d248b706
KY
119842011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11985
11986 * server.c (handle_query): Add EnableDisableTracepoints to the list
11987 of supported features.
43aaf8b6 11988 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11989 tracepoints.
43aaf8b6
PA
11990 (cmd_qtenable_disable): New.
11991 (cmd_qtstart): Install tracepoints even if disabled.
11992 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11993 receiving a QTEnable or QTDisable packet.
11994 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11995 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11996 tracepoints.
11997 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11998
84e578fb
DE
119992011-05-10 Doug Evans <dje@google.com>
12000
12001 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12002
71f55dd8
DE
120032011-05-04 Doug Evans <dje@google.com>
12004
12005 * linux-low.c (linux_join): Skip process lookup.
12006 * spu-low.c (spu_join): Ditto.
12007 * server.c (join_inferiors_callback): Delete.
12008 (process_serial_event): For 'D' packet (detach) call join_inferior
12009 directly.
12010
4d393d60
JM
120112011-05-04 Joseph Myers <joseph@codesourcery.com>
12012
12013 * README: Don't mention xscale*-*-linux*.
12014 * configure.srv (xscale*-*-linux*): Don't handle target.
12015
b00ad6ff
NF
120162011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12017
12018 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12019 casting pointers.
12020 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12021 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12022 (i386_emit_void_call_2): Likewise.
12023
af96c192
YQ
120242011-04-26 Yao Qi <yao@codesourcery.com>
12025
43aaf8b6
PA
12026 * linux-low.c: Move common macros to linux-ptrace.h.
12027 Include linux-ptrace.h.
af96c192
YQ
12028 * Makefile.in (linux_ptrace_h): New.
12029 (linux-low.o): Depends on linux-ptrace.h.
12030
03f2bd59
JK
120312011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12032
12033 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12034 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12035 (remote_prepare): New function with most of the TCP code from ...
12036 (remote_open): ... here. Detect PORT here unconditionally. Move also
12037 setting transport_is_reliable.
12038 * server.c (run_once): New variable.
12039 (gdbserver_usage): Document it.
12040 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12041 the first run if RUN_ONCE.
12042 * server.h (run_once, remote_prepare): New declarations.
12043
7a9dd1b2
TT
120442011-04-19 Tom Tromey <tromey@redhat.com>
12045
12046 * win32-low.c (handle_load_dll): Remove duplicate "the".
12047
81239425
PM
120482011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12049
12050 Remove support for old Cygwin 1.5 versions.
12051 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12052 function to avoid warning.
12053 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12054 warning.
12055
9e0627f1
PM
120562011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12057
12058 * gdbserver/server.h (Macro _): Define it if not available.
12059
588eebee
MS
120602011-03-14 Michael Snyder <msnyder@vmware.com>
12061
348af9f7 12062 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12063
43f70d4c
JB
120642011-03-10 Joel Brobecker <brobecker@adacore.com>
12065
12066 * Makefile.in (maintainer-clean realclean distclean): Remove
12067 "make ... subdir_do" command.
12068
348af9f7
MS
120692011-03-10 Michael Snyder <msnyder@vmware.com>
12070
12071 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12072
12073 * server.c (handle_v_run): Free alloced buffer on early return.
12074
e637a4f5
YQ
120752011-03-09 Yao Qi <yao@codesourcery.com>
12076
12077 Revert:
12078 2011-03-04 Yao Qi <yao@codesourcery.com>
12079
12080 * Makefile.in: Remove GNU make feature --directory.
12081
12082 2011-03-05 Yao Qi <yao@codesourcery.com>
12083
12084 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12085 (subdir_do): New make target. Copied from gdb/Makefile.
12086 (maintainer-clean, realclean, distclean, clean): Call corresponding
12087 make targets in common/Makefile.
12088
12089 2011-02-11 Yao Qi <yao@codesourcery.com>
12090
12091 * configure.ac: Call AC_PROG_RANLIB.
12092 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12093 * configure: Regenerate.
12094
e6edda56
JK
120952011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12096
12097 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12098
e5141119
JB
120992011-03-06 Yao Qi <yao@codesourcery.com>
12100
12101 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12102
64794aa4
JB
121032011-03-05 Yao Qi <yao@codesourcery.com>
12104
12105 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12106 (subdir_do): New make target. Copied from gdb/Makefile.
12107 (maintainer-clean, realclean, distclean, clean): Call corresponding
12108 make targets in common/Makefile.
12109
7a762829
YQ
121102011-03-04 Yao Qi <yao@codesourcery.com>
12111
12112 * Makefile.in: Remove GNU make feature --directory.
12113
348af9f7
MS
121142011-03-04 Michael Snyder <msnyder@vmware.com>
12115
12116 * server.c (queue_stop_reply): Call xmalloc not malloc.
12117
121182011-03-02 Michael Snyder <msnyder@vmware.com>
12119
12120 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12121
9f72fee2
MS
121222011-02-28 Michael Snyder <msnyder@vmware.com>
12123
588eebee
MS
12124 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12125 (cmd_qtframe): Ditto.
12126 (cmd_qtbuffer): Ditto.
12127 (cmd_bigqtbuffer): Ditto.
12128
9f72fee2
MS
12129 * utils.c (decimal2str): Initialize 'width' to nine, then
12130 don't mess with it.
12131
8040bd49
UW
121322011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12133
12134 * hostio.c (require_data): Free *data, not data.
12135
7e52cbd0
JK
121362011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12137
12138 * hostio.c (require_data): Use free, not xfree.
12139
9130f83e
MS
121402011-02-27 Michael Snyder <msnyder@vmware.com>
12141
4b812f4e
MS
12142 * server.c (handle_query): Discard unused value.
12143
9130f83e
MS
12144 * hostio.c (require_data): Free malloc memory before returning
12145 error.
12146
69d37113
MS
121472011-02-26 Michael Snyder <msnyder@vmware.com>
12148
12149 * linux-low.c (list_threads): Call closedir for dirent.
12150
35f5825a
MS
121512011-02-27 Michael Snyder <msnyder@vmware.com>
12152
2a589cef
MS
12153 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12154 a case statement falls through.
12155
0adea5f7
MS
12156 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12157
35f5825a
MS
12158 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12159 in comparison.
12160
238f1c74
MS
121612011-02-26 Michael Snyder <msnyder@vmware.com>
12162
12163 * utils.c (decimal2str): Eliminate dead code and dead param.
12164 (pulongest): Drop dead param from call to decimal2str.
12165 (plongest): Ditto.
12166
633ff500
JB
121672011-02-24 Joel Brobecker <brobecker@adacore.com>
12168
12169 Revert the following patch (not approved yet):
12170 2011-02-21 Hui Zhu <teawater@gmail.com>
12171 * tracepoint.c (tp_printf): New function.
12172 (eval_agent_expr): Handle gdb_agent_op_printf.
12173
f9c6ff72
HZ
121742011-02-21 Hui Zhu <teawater@gmail.com>
12175
12176 * tracepoint.c (tp_printf): New function.
12177 (eval_agent_expr): Handle gdb_agent_op_printf.
12178
94d5e490
TT
121792011-02-18 Tom Tromey <tromey@redhat.com>
12180
12181 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12182 (tracepoint.o): Likewise.
12183 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12184 (gdb_agent_op_names): Likewise.
12185
c7f96d2b
TT
121862011-02-18 Tom Tromey <tromey@redhat.com>
12187
12188 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12189 gdb_agent_op_rot>: New constants.
12190 (gdb_agent_op_names): Add pick and roll.
12191 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12192 cases.
12193
0feedb2c
JK
121942011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12195
12196 * aclocal.m4: Regenerated with aclocal-1.11.1.
12197
b3b9301e
PA
121982011-02-14 Pedro Alves <pedro@codesourcery.com>
12199
12200 * server.c (handle_qxfer_traceframe_info): New.
12201 (qxfer_packets): Register "traceframe-info".
12202 (handle_query): Report support for qXfer:traceframe-info:read+.
12203 * tracepoint.c (match_blocktype): New.
12204 (traceframe_find_block_type): Rename to ...
12205 (traceframe_walk_blocks): ... this. Add callback filter argument,
12206 and use it.
12207 (traceframe_find_block_type): New, reimplemented on top of
12208 traceframe_walk_blocks.
12209 (build_traceframe_info_xml): New.
12210 (traceframe_read_info): New.
12211 * server.h (traceframe_read_info): Declare.
12212
4f3e6fb7
YQ
122132011-02-11 Yao Qi <yao@codesourcery.com>
12214
12215 * configure.ac: Call AC_PROG_RANLIB.
12216 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12217 * configure: Regenerate.
12218
764880b7
PA
122192011-02-07 Pedro Alves <pedro@codesourcery.com>
12220
12221 * server.c (gdb_read_memory): Change return semantics to allow
12222 partial transfers.
12223 (handle_search_memory_1): Adjust.
12224 (process_serial_event) <'m' packet>: Handle partial transfers.
12225 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12226
1c79eb8a
PA
122272011-01-28 Pedro Alves <pedro@codesourcery.com>
12228
12229 * regcache.c (init_register_cache): Initialize
12230 regcache->register_status.
12231 (free_register_cache): Release regcache->register_status.
12232 (regcache_cpy): Copy register_status.
12233 (registers_to_string): Print 'x's for unavailable registers.
12234 (supply_register): Mark the register's status valid or
12235 unavailable, depending on whether a buffer was passed in or not.
12236 (supply_register_zeroed): New.
12237 (supply_regblock): Mark the registers' status valid or
12238 unavailable, depending on whether a buffer was passed in or not.
12239 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12240 (struct regcache): New `register_status' field.
12241 (supply_register_zeroed): Declare.
12242 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12243 supply_register_zeroed, rather than passing a NULL buffer to
12244 supply_register.
12245 * tracepoint.c (fetch_traceframe_registers): Update comment.
12246
85724a0e
PA
122472011-01-28 Pedro Alves <pedro@codesourcery.com>
12248
12249 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12250 buffer explicit.
12251
d08aafef
PA
122522011-01-25 Pedro Alves <pedro@codesourcery.com>
12253
12254 * server.h (decode_xfer_write): Change prototype.
12255 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12256 and don't extract the annex here.
12257 * server.c (decode_xfer_read): Remove `annex' parameter,
12258 and don't extract the annex here.
12259 (decode_xfer): New.
12260 (struct qxfer): New.
12261 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12262 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12263 (handle_qxfer_statictrace): New functions, abstracted out from
12264 handle_query, and made to use the struct qxfer interface.
12265 (handle_threads_qxfer_proper): Rename to ...
12266 (handle_qxfer_threads_proper): ... this.
12267 (handle_threads_qxfer): Rename to ...
12268 (handle_qxfer_threads): ... this. Adjust.
12269 (qxfer_packets): New array.
12270 (handle_qxfer): New function.
12271 (handle_query): Use handle_qxfer.
12272
493e2a69
MS
122732011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12274
12275 * gdbreplay.c: Shorten lines of >= 80 columns.
12276 * linux-low.c: Ditto.
12277 * linux-ppc-low.c: Ditto.
12278 * linux-s390-low.c: Ditto.
12279 * linux-sparc-low.c: Ditto.
12280 * linux-x86-low.c: Ditto.
12281 * linux-xtensa-low.c: Ditto.
12282 * mem-break.c: Ditto.
12283 * nto-low.c: Ditto.
12284 * regcache.h: Ditto.
12285 * remote-utils.c: Ditto.
12286 * server.c: Ditto.
12287 * server.h: Ditto.
12288 * thread-db.c: Ditto.
12289 * tracepoint.c: Ditto.
12290 * utils.c: Ditto.
12291 * win32-low.h: Ditto.
12292
44944448
JB
122932011-01-05 Joel Brobecker <brobecker@adacore.com>
12294
12295 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12296 update.
12297
71ce852c
JB
122982011-01-01 Joel Brobecker <brobecker@adacore.com>
12299
12300 * server.c (gdbserver_version): Update copyright year in version
12301 output.
12302 * gdbreplay.c (gdbreplay_version): Ditto.
12303
eb826dc6
MF
123042010-12-29 Jie Zhang <jie.zhang@analog.com>
12305
12306 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12307 * linux-bfin-low.c: New file.
12308 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12309 PT_DATA_ADDR for BFIN targets.
12310 * Makefile.in (SFILES): Add linux-bfin-low.c.
12311 (clean): Remove reg-bfin.c.
12312 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12313 * README: Mention supported Blackfin targets.
12314
39ab222a
MF
123152010-12-23 Mike Frysinger <vapier@gentoo.org>
12316
12317 * .gitignore: New file.
12318
a1f2ce7d
MF
123192010-11-16 Mike Frysinger <vapier@gentoo.org>
12320
12321 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12322
f474844c
JZ
123232010-10-22 Jie Zhang <jie@codesourcery.com>
12324
12325 * Makefile.in: Add FLAGS_TO_PASS variable.
12326 (install): Remove dependency of install-only and recursively
12327 invoke make for install-only.
12328
f1048712
DE
123292010-10-04 Doug Evans <dje@google.com>
12330
12331 * Makefile.in (uninstall): Use $(DESTDIR).
12332
b53a1623
PA
123332010-09-24 Pedro Alves <pedro@codesourcery.com>
12334
e6ee044d
PA
12335 PR gdb/11842
12336
b53a1623
PA
12337 * linux-x86-low.c (compat_siginfo_from_siginfo)
12338 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12339 si_code is < 0. Check for si_code == SI_TIMER before checking for
12340 si_code < 0.
12341
fa1bd1e4
JB
123422010-09-13 Joel Brobecker <brobecker@adacore.com>
12343
12344 * lynx-i386-low.c: New file.
12345 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12346
47fac8f8
JB
123472010-09-13 Joel Brobecker <brobecker@adacore.com>
12348
12349 * lynx-low.c (ptrace_request_to_str): Remove handling for
12350 request values that have been removed in LynxOS 5.x.
12351
1adfc54d
JB
123522010-09-13 Joel Brobecker <brobecker@adacore.com>
12353
12354 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12355 <ptrace.h>
12356
c2a66c29
NS
123572010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12358
12359 * configure.ac: Add --enable-inprocess-agent option.
12360 * configure: Rebuilt.
12361
32fcada3
YQ
123622010-09-06 Yao Qi <yao@codesourcery.com>
12363
12364 * linux-low.c (linux_kill): Remove unused variable.
12365 (linux_stabilize_threads): Likewise.
12366 * server.c (start_inferior): Likewise.
12367 (queue_stop_reply_callback): Likewise.
12368 * tracepoint.c (do_action_at_tracepoint): Likewise.
12369
0cccb683
YQ
123702010-09-06 Yao Qi <yao@codesourcery.com>
12371
12372 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12373 on return.
12374
423ec54c
JK
123752010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12376
12377 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12378
12ac6819
PA
123792010-09-06 Pedro Alves <pedro@codesourcery.com>
12380
12381 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12382 "$(IPA_DEPFILES)".
12383
8ed54b31
JB
123842010-09-01 Joel Brobecker <brobecker@adacore.com>
12385
12386 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12387 gdbserver/lynx-ppc-low.c: New files.
12388 * Makefile.in (lynx_low_h): New variable.
12389 (lynx-low.o, lynx-ppc-low.o): New rules.
12390 * configure.ac: On LynxOS, link with -lnetinet.
12391 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12392 * configure: regenerate.
12393
bb0116a4
JB
123942010-09-01 Joel Brobecker <brobecker@adacore.com>
12395
12396 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12397 * configure.ac: Add check for vasprintf and vsnprintf.
12398 * configure, config.in: Regenerate.
12399 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12400
a778ab81 124012010-09-01 Joel Brobecker <brobecker@adacore.com>
12402
12403 * gdbreplay.c: Move include of alloca.h up, next to include of
12404 malloc.h.
12405 * server.h: Add include of malloc.h.
12406 * mem-break.c: Remove include of malloc.h.
12407 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12408
8b034a19 124092010-09-01 Joel Brobecker <brobecker@adacore.com>
12410
12411 * Makefile.in (memmem.o): Build with -Wno-error.
12412
124132010-09-01 Joel Brobecker <brobecker@adacore.com>
12414
12415 * utils.c (xsnprintf): Make non-static.
12416 * server.h: Add xsnprintf declaration.
12417 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12418 replace calls to snprintf by calls to xsnprintf throughout.
12419
124202010-09-01 Joel Brobecker <brobecker@adacore.com>
12421
12422 * configure.ac: Add configure check for alloca.
12423 * configure, config.in: Regenerate.
12424 * server.h: Include alloca.h if it exists.
12425 * gdbreplay.c: Include alloca.h if it exists.
12426
1a981360
PA
124272010-08-28 Pedro Alves <pedro@codesourcery.com>
12428
12429 * linux-low.c (__SIGRTMIN): Define if not already defined.
12430 (linux_create_inferior): Check for __ANDROID__ rather than
12431 __SIGRTMIN.
12432 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12433 are already deferred.
12434 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12435 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12436 stopped and already has a pending signal to report.
12437 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12438 a pending signal to report or is moving out of a jump pad.
12439 (linux_init_signals): Check for __ANDROID__ rather than
12440 __SIGRTMIN.
12441
b4d51a55
PA
124422010-08-28 Pedro Alves <pedro@codesourcery.com>
12443
12444 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12445 debug_threads check. Avoid a linear search when not doing debug
12446 output.
12447
ec48365d
PA
124482010-08-27 Pedro Alves <pedro@codesourcery.com>
12449
12450 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12451 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12452 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12453 (process_event): Change local fd's type to gdb_fildes_t.
12454 (create_file_handler): Adjust prototype.
12455 (delete_file_handler): Adjust prototype.
12456 (handle_file_event): Adjust prototype. Use pfildes.
12457 (create_file_event): Adjsut prototype.
12458 * remote-utils.c (remote_desc, listen_desc): Change type to
12459 gdb_fildes_t.
12460 * server.h: New gdb_fildes_t typedef.
12461 [USE_WIN32API]: Include winsock2.h.
12462 (delete_file_handler, add_file_handler): Adjust prototypes.
12463 (pfildes): Declare.
12464 * utils.c (pfildes): New.
12465
854d88f0
PA
124662010-08-27 Pedro Alves <pedro@codesourcery.com>
12467
12468 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12469 * configure: Regenerate.
12470
0146f85b
PA
124712010-08-27 Pedro Alves <pedro@codesourcery.com>
12472
12473 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12474 (linux_done_accessing_memory): ... this.
12475 (linux_target_ops): Adjust.
12476 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12477 * nto-low.c (nto_target_ops): Adjust comment.
12478 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12479 * spu-low.c (spu_target_ops): Adjust comment.
12480 * target.h (target_ops): Rename unprepare_to_access_memory field
12481 to done_accessing_memory.
12482 (unprepare_to_access_memory): Rename to ...
12483 (done_accessing_memory): ... this.
12484
90d74c30
PA
124852010-08-26 Pedro Alves <pedro@codesourcery.com>
12486
12487 * linux-low.c (linux_prepare_to_access_memory): New.
12488 (linux_unprepare_to_access_memory): New.
12489 (linux_target_ops): Install them.
12490 * server.c (read_memory): Rename to ...
12491 (gdb_read_memory): ... this. Use
12492 prepare_to_access_memory/prepare_to_access_memory.
12493 (write_memory): Rename to ...
12494 (gdb_write_memory): ... this. Use
12495 prepare_to_access_memory/prepare_to_access_memory.
12496 (handle_search_memory_1): Adjust.
12497 (process_serial_event): Adjust.
12498 * target.h (struct target_ops): New fields
12499 prepare_to_access_memory and unprepare_to_access_memory.
12500 (prepare_to_access_memory, unprepare_to_access_memory): New.
12501 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12502 prepare_to_access_memory/prepare_to_access_memory.
12503 * nto-low.c (nto_target_ops): Adjust.
12504 * spu-low.c (spu_target_ops): Adjust.
12505 * win32-low.c (win32_target_ops): Adjust.
12506
fd467969
PA
125072010-08-26 Pedro Alves <pedro@codesourcery.com>
12508
12509 * Makefile.in (WARN_CFLAGS): Get it from configure.
12510 (WERROR_CFLAGS): New.
12511 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12512 * configure.ac: Introduce --enable-werror, which adds -Werror to
12513 the compiler command line. Enabled by default. Disable with
12514 --disable-werror. Add -Wdeclaration-after-statement
12515 Wpointer-arith and -Wformat-nonliteral to warning flags.
12516 * configure: Regenerate.
12517
331e2f5f
PA
125182010-08-26 Pedro Alves <pedro@codesourcery.com>
12519
12520 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12521
e581f2b4
PA
125222010-08-26 Pedro Alves <pedro@codesourcery.com>
12523
12524 * gdbreplay.c (remote_error): New.
12525 (gdbchar): New.
12526 (expect): Use gdbchar. Check for error reading from GDB.
12527 Clarify sync error output.
12528 (play): Check for errors writing to GDB.
12529 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12530 * remote-utils.c (getpkt): Check for errors writing to the remote
12531 descriptor.
12532
3c11dd79
PA
125332010-08-25 Pedro Alves <pedro@codesourcery.com>
12534
12535 * linux-low.c (linux_wait_1): Move non-debugging code out of
12536 `debug_threads' control.
12537
d20a8ad9
PA
125382010-08-25 Pedro Alves <pedro@codesourcery.com>
12539
12540 * linux-low.c (linux_wait_1): Don't set last_status here.
12541 * server.c (push_event, queue_stop_reply_callback): Assert we're
12542 not pushing a TARGET_WAITKIND_IGNORE event.
12543 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12544 (myresume, handle_target_event): Set the thread's last_resume_kind
12545 and last_status from the target returned status.
12546
964e4306
PA
125472010-08-25 Pedro Alves <pedro@codesourcery.com>
12548
12549 PR threads/10729
12550
12551 * linux-x86-low.c (update_debug_registers_callback): New.
12552 (i386_dr_low_set_addr): Use it.
12553 (i386_dr_low_get_addr): New.
12554 (i386_dr_low_set_control): Use update_debug_registers_callback.
12555 (i386_dr_low_get_control): New.
12556 (i386_dr_low_get_status): Adjust.
12557 * linux-low.c (linux_stop_lwp): New.
12558 * linux-low.h (linux_stop_lwp): Declare.
12559
12560 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12561 argument instead of a i386_debug_reg_state.
12562 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12563 a i386_debug_reg_state.
12564 (i386_insert_aligned_watchpoint): Adjust.
12565 (i386_remove_aligned_watchpoint): Adjust.
12566 (i386_low_stopped_data_address): Read the debug registers from the
12567 inferior instead of from the mirrors.
12568 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12569 (i386_dr_low_get_addr): Declare.
12570 (i386_dr_low_get_control): Declare.
12571 (i386_dr_low_get_status): Change prototype.
12572
12573 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12574 (i386_dr_low_get_addr): New.
12575 (i386_dr_low_get_control): New.
12576 (i386_dr_low_get_status): Adjust prototype. Return
12577 dr_status_mirror.
12578 (i386_initial_stuff): Clear dr_status_mirror and
12579 dr_control_mirror.
12580 (i386_get_thread_context): Adjust.
12581 (i386_set_thread_context): Adjust.
12582 (i386_thread_added): Adjust.
12583
5f21a75b
PA
125842010-08-24 Pedro Alves <pedro@codesourcery.com>
12585
12586 * linux-low.h (linux_thread_area): Delete declaration.
12587
3e4c1235
TS
125882010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12589
12590 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12591 after its termination.
12592
1971b033
PA
125932010-08-09 Pedro Alves <pedro@codesourcery.com>
12594
12595 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12596 (gdb_wants_all_stopped): Delete.
12597 (linux_wait_1): Don't call them.
12598 * server.c (handle_v_cont): Tag all threads as want-stopped.
12599 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12600 stopped as "client-wants-stopped".
12601
310444ac
PA
126022010-07-31 Pedro Alves <pedro@codesourcery.com>
12603
12604 * Makefile.in (signals_h): New.
12605 (server_h): Depend on it.
12606 (server.o): Don't depend on $(signals_def).
12607 (signals.o): Depend on $(signals_def).
12608
a19cae16
JK
126092010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12610
12611 * Makefile.in (signals_def): New.
12612 (server_h): Append include/gdb/signals.h and signals_def.
12613 (server.o): Append signals_def.
12614
30d50328
JK
126152010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12616
12617 * server.c (handle_target_event): Use target_signal_to_host for
12618 resume_info.sig initialization.
12619 * target.h (struct thread_resume) <sig>: New comment.
12620
5c3216e2
OS
126212010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12622
c6f46ca0
OS
12623 * server.c (handle_query): strcpy() the returned string from paddress()
12624 instead of sprintf().
5c3216e2
OS
12625 * utils.c (paddress): Return phex_nz().
12626
6bd31874
JB
126272010-07-07 Joel Brobecker <brobecker@adacore.com>
12628
12629 * server.c (handle_v_cont): Call mourn_inferior if process
12630 just exited.
12631 (myresume): Likewise.
12632
0fb4aa4b
PA
126332010-07-01 Pedro Alves <pedro@codesourcery.com>
12634
12635 Static tracepoints, and integration with UST.
12636
12637 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12638 * mem-break.c (uninsert_all_breakpoints)
12639 (reinsert_all_breakpoints): New.
12640 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12641 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12642 (gdb_agent_ust_loaded, helper_thread_id)
12643 (gdb_agent_helper_thread_id): New macros.
12644 (struct ipa_sym_addresses): Add addr_ust_loaded,
12645 addr_helper_thread_id, addr_cmd_buf.
12646 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12647 (in_process_agent_loaded_ust): New.
12648 (write_e_ust_not_loaded): New.
12649 (maybe_write_ipa_ust_not_loaded): New.
12650 (struct collect_static_trace_data_action): New.
12651 (enum tracepoint_type) <static_tracepoint>: New.
12652 (struct tracepoint) <handle>: Mention static tracepoints.
12653 (struct static_tracepoint_ctx): New.
12654 (CMD_BUF_SIZE): New.
12655 (add_tracepoint_action): Handle static tracepoint actions.
12656 (unprobe_marker_at): New.
12657 (clear_installed_tracepoints): Handle static tracepoints.
12658 (cmd_qtdp): Handle static tracepoints.
12659 (probe_marker_at): New.
12660 (cmd_qtstart): Handle static tracepoints.
12661 (response_tracepoint): Handle static tracepoints.
12662 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12663 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12664 (get_context_regcache): Handle static tracepoints.
12665 (do_action_at_tracepoint): Handle static tracepoint actions.
12666 (traceframe_find_block_type): Handle static trace data blocks.
12667 (traceframe_read_sdata): New.
12668 (download_tracepoints): Download static tracepoint actions.
12669 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12670 (GDB_PROBE_NAME): New.
12671 (ust_ops): New.
12672 (GET_UST_SYM): New.
12673 (USTF): New.
12674 (dlsym_ust): New.
12675 (ust_marker_to_static_tracepoint): New.
12676 (gdb_probe): New.
12677 (collect_ust_data_at_tracepoint): New.
12678 (gdb_ust_probe): New.
12679 (UNIX_PATH_MAX, SOCK_DIR): New.
12680 (gdb_ust_connect_sync_socket): New.
12681 (resume_thread, stop_thread): New.
12682 (run_inferior_command): New.
12683 (init_named_socket): New.
12684 (gdb_ust_socket_init): New.
12685 (cstr_to_hexstr): New.
12686 (next_st): New.
12687 (first_marker, next_marker): New.
12688 (response_ust_marker): New.
12689 (cmd_qtfstm, cmd_qtsstm): New.
12690 (unprobe_marker_at, probe_marker_at): New.
12691 (cmd_qtstmat, gdb_ust_thread): New.
12692 (gdb_ust_init): New.
12693 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12694 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12695 (ST_REGENTRY): New.
12696 (x86_64_st_collect_regmap): New.
12697 (X86_64_NUM_ST_COLLECT_GREGS): New.
12698 (AMD64_RIP_REGNUM): New.
12699 (supply_static_tracepoint_registers): New.
12700 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12701 (ST_REGENTRY): New.
12702 (i386_st_collect_regmap): New.
12703 (i386_NUM_ST_COLLECT_GREGS): New.
12704 (supply_static_tracepoint_registers): New.
12705 * server.c (handle_query): Handle qXfer:statictrace:read.
12706 <qSupported>: Report support for StaticTracepoints, and
12707 qXfer:statictrace:read features.
12708 * server.h (traceframe_read_sdata)
12709 (supply_static_tracepoint_registers): Declare.
12710 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12711 (unpack_varlen_hex): Include in IPA build.
12712 * Makefile.in (ustlibs, ustinc): New.
12713 (IPA_OBJS): Add remote-utils-ipa.o.
12714 ($(IPA_LIB)): Link -ldl and -lpthread.
12715 (UST_CFLAGS): New.
12716 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12717 * config.in, configure: Regenerate.
12718
9e4344e5
PA
127192010-06-20 Ian Lance Taylor <iant@google.com>
12720 Pedro Alves <pedro@codesourcery.com>
12721
12722 * linux-x86-low.c (always_true): Delete.
12723 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12724 trying to fool the compiler with always_true.
12725
c6beb2cb
PA
127262010-06-20 Pedro Alves <pedro@codesourcery.com>
12727
12728 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12729 conditions in gdbserver.
12730
d2ed6730
UW
127312010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12732
12733 * spu-low.c (spu_read_memory): Wrap around local store limit.
12734 (spu_write_memory): Likewise.
12735
4e29fb54
PA
127362010-06-15 Pedro Alves <pedro@codesourcery.com>
12737
12738 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12739 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12740 LONGEST uses.
12741 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12742 uses.
12743 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12744 uses with LONGEST uses.
12745
6a271cae
PA
127462010-06-14 Stan Shebs <stan@codesourcery.com>
12747 Pedro Alves <pedro@codesourcery.com>
12748
12749 Bytecode compiler.
12750
12751 * linux-x86-low.c: Include limits.h.
12752 (add_insns): New.
12753 (always_true): New.
12754 (EMIT_ASM): New.
12755 (EMIT_ASM32): New.
12756 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12757 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12758 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12759 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12760 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12761 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12762 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12763 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12764 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12765 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12766 (amd64_emit_void_call_2): New.
12767 (amd64_emit_ops): New.
12768 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12769 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12770 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12771 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12772 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12773 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12774 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12775 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12776 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12777 (i386_emit_stack_adjust, i386_emit_int_call_1)
12778 (i386_emit_void_call_2): New.
12779 (i386_emit_ops): New.
12780 (x86_emit_ops): New.
12781 (the_low_target): Install x86_emit_ops.
12782 * server.h (struct emit_ops): New.
12783 (get_raw_reg_func_addr): Declare.
12784 (current_insn_ptr, emit_error): Declare.
12785 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12786 (set_trace_state_variable_value): New defines.
12787 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12788 addr_get_trace_state_variable_value and
12789 addr_set_trace_state_variable_value.
12790 (symbol_list): New fields for get_raw_reg,
12791 get_trace_state_variable_value and set_trace_state_variable_value.
12792 (condfn): New typedef.
12793 (struct tracepoint): New field `compiled_cond'.
12794 (do_action_at_tracepoint): Clear compiled_cond.
12795 (get_trace_state_variable_value, set_trace_state_variable_value):
12796 Export in the IPA.
12797 (condition_true_at_tracepoint): If there's a compiled condition,
12798 run that.
12799 (current_insn_ptr, emit_error): New globals.
12800 (struct bytecode_address): New.
12801 (get_raw_reg_func_addr): New.
12802 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12803 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12804 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12805 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12806 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12807 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12808 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12809 (compile_tracepoint_condition, compile_bytecodes): New.
12810 * target.h (emit_ops): Forward declare.
12811 (struct target_ops): New field emit_ops.
12812 (target_emit_ops): New.
12813 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12814 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12815 * linux-low.c (linux_emit_ops): New.
12816 (linux_target_ops): Install it.
12817 * linux-low.h (struct linux_target_ops): New field emit_ops.
12818
92b72907
UW
128192010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12820
12821 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12822 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12823
fa593d66
PA
128242010-06-01 Pedro Alves <pedro@codesourcery.com>
12825 Stan Shebs <stan@codesourcery.com>
12826
12827 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12828 (all): Depend on $(extra_libraries).
12829 (install-only): Install the IPA.
12830 (IPA_OBJS, IPA_LIB): New.
12831 (clean): Remove the IPA lib.
12832 (IPAGENT_CFLAGS): New.
12833 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12834 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12835 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12836 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12837 * configure.ac: Check for atomic builtins support in the compiler.
12838 (IPA_DEPFILES, extra_libraries): Define.
12839 * configure.srv (ipa_obj): Add description.
12840 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12841 (i[34567]86-*-linux*): Set ipa_obj.
12842 (x86_64-*-linux*): Set ipa_obj.
12843 * linux-low.c (stabilizing_threads): New.
12844 (supports_fast_tracepoints): New.
12845 (linux_detach): Stabilize threads before detaching.
12846 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12847 the lwp is either not stabilizing, or is moving out of a jump pad.
12848 (linux_fast_tracepoint_collecting): New.
12849 (maybe_move_out_of_jump_pad): New.
12850 (enqueue_one_deferred_signal): New.
12851 (dequeue_one_deferred_signal): New.
12852 (linux_wait_for_event_1): If moving out of a jump pad, defer
12853 pending signals to later.
12854 (linux_stabilize_threads): New.
12855 (linux_wait_1): Check if threads need moving out of jump pads, and
12856 do it if so.
12857 (stuck_in_jump_pad_callback): New.
12858 (move_out_of_jump_pad_callback): New.
12859 (lwp_running): New.
12860 (linux_resume_one_lwp): Handle moving out of jump pads.
12861 (linux_set_resume_request): Dequeue deferred signals.
12862 (need_step_over_p): Also step over fast tracepoint jumps.
12863 (start_step_over): Also uninsert fast tracepoint jumps.
12864 (finish_step_over): Also reinsert fast tracepoint jumps.
12865 (linux_install_fast_tracepoint_jump): New.
12866 (linux_target_ops): Install linux_stabilize_threads and
12867 linux_install_fast_tracepoint_jump_pad.
12868 * linux-low.h (linux_target_ops) <get_thread_area,
12869 install_fast_tracepoint_jump_pad>: New fields.
12870 (struct lwp_info) <collecting_fast_tracepoint,
12871 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12872 (linux_get_thread_area): Declare.
12873 * linux-x86-low.c (jump_insn): New.
12874 (x86_get_thread_area): New.
12875 (append_insns): New.
12876 (push_opcode): New.
12877 (amd64_install_fast_tracepoint_jump_pad): New.
12878 (i386_install_fast_tracepoint_jump_pad): New.
12879 (x86_install_fast_tracepoint_jump_pad): New.
12880 (the_low_target): Install x86_get_thread_area and
12881 x86_install_fast_tracepoint_jump_pad.
12882 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12883 (struct fast_tracepoint_jump): New.
12884 (fast_tracepoint_jump_insn): New.
12885 (fast_tracepoint_jump_shadow): New.
12886 (find_fast_tracepoint_jump_at): New.
12887 (fast_tracepoint_jump_here): New.
12888 (delete_fast_tracepoint_jump): New.
12889 (set_fast_tracepoint_jump): New.
12890 (uninsert_fast_tracepoint_jumps_at): New.
12891 (reinsert_fast_tracepoint_jumps_at): New.
12892 (set_breakpoint_at): Use write_inferior_memory.
12893 (uninsert_raw_breakpoint): Use write_inferior_memory.
12894 (check_mem_read): Mask out fast tracepoint jumps.
12895 (check_mem_write): Mask out fast tracepoint jumps.
12896 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12897 (set_fast_tracepoint_jump): Declare.
12898 (delete_fast_tracepoint_jump)
12899 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12900 (reinsert_fast_tracepoint_jumps_at): Declare.
12901 * regcache.c: Don't compile many functions when building the
12902 in-process agent library.
12903 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12904 the register buffer in the heap.
12905 (free_register_cache): If the register buffer isn't owned by the
12906 regcache, don't free it.
12907 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12908 pre-existing register caches.
12909 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12910 type.
12911 (convert_ascii_to_int): : Constify `from' parameter type.
12912 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12913 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12914 the needed buffer in-place.
12915 (relocate_instruction): New.
12916 * server.c (handle_query) <qSymbols>: If the target supports
12917 tracepoints, give it a chance of looking up symbols. Report
12918 support for fast tracepoints.
12919 (handle_status): Stabilize threads.
12920 (process_serial_event): Adjust.
12921 * server.h (struct fast_tracepoint_jump): Forward declare.
12922 (struct process_info) <fast_tracepoint_jumps>: New field.
12923 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12924 (decode_X_packet, decode_M_packet): Adjust.
12925 (relocate_instruction): Declare.
12926 (in_process_agent_loaded): Declare.
12927 (tracepoint_look_up_symbols): Declare.
12928 (struct fast_tpoint_collect_status): Declare.
12929 (fast_tracepoint_collecting): Declare.
12930 (force_unlock_trace_buffer): Declare.
12931 (handle_tracepoint_bkpts): Declare.
12932 (initialize_low_tracepoint)
12933 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12934 * target.h (struct target_ops) <stabilize_threads,
12935 install_fast_tracepoint_jump_pad>: New fields.
12936 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12937 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12938 [HAVE_STDINT_H]: Include stdint.h.
12939 (trace_debug_1): Rename to ...
12940 (trace_vdebug): ... this.
12941 (trace_debug): Rename to ...
12942 (trace_debug_1): ... this. Add `level' parameter.
12943 (trace_debug): New.
12944 (ATTR_USED, ATTR_NOINLINE): New.
12945 (IP_AGENT_EXPORT): New.
12946 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12947 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12948 (about_to_request_buffer_space, trace_buffer_is_full)
12949 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12950 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12951 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12952 (traceframe_write_count, traceframes_created)
12953 (trace_state_variables)
12954 New renaming defines.
12955 (struct ipa_sym_addresses): New.
12956 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12957 (symbol_list): New.
12958 (ipa_sym_addrs): New.
12959 (all_tracepoint_symbols_looked_up): New.
12960 (in_process_agent_loaded): New.
12961 (write_e_ipa_not_loaded): New.
12962 (maybe_write_ipa_not_loaded): New.
12963 (tracepoint_look_up_symbols): New.
12964 (debug_threads) [IN_PROCESS_AGENT]: New.
12965 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12966 (UNKNOWN_SIDE_EFFECTS): New.
12967 (stop_tracing): New.
12968 (flush_trace_buffer): New.
12969 (stop_tracing_bkpt): New.
12970 (flush_trace_buffer_bkpt): New.
12971 (read_inferior_integer): New.
12972 (read_inferior_uinteger): New.
12973 (read_inferior_data_pointer): New.
12974 (write_inferior_data_pointer): New.
12975 (write_inferior_integer): New.
12976 (write_inferior_uinteger): New.
12977 (struct collect_static_trace_data_action): Delete.
12978 (enum tracepoint_type): New.
12979 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12980 <actions_str, step_actions, step_actions_str>: Only include in
12981 GDBserver.
fa593d66
PA
12982 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12983 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12984 (tracepoints): Use IP_AGENT_EXPORT.
12985 (last_tracepoint): Don't include in the IPA.
12986 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12987 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12988 (alloced_trace_state_variables): New.
12989 (trace_state_variables): Use IP_AGENT_EXPORT.
12990 (traceframe_t): Delete unused variable.
12991 (circular_trace_buffer): Don't include in the IPA.
12992 (trace_buffer_start): Delete.
12993 (struct trace_buffer_control): New.
12994 (trace_buffer_free): Delete.
12995 (struct ipa_trace_buffer_control): New.
12996 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12997 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12998 New.
12999 (trace_buffer_ctrl): New.
13000 (TRACE_BUFFER_CTRL_CURR): New.
13001 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13002 Reimplement as macros.
13003 (trace_buffer_wrap): Delete.
13004 (traceframe_write_count, traceframe_read_count)
13005 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13006 (struct tracepoint_hit_ctx) <type>: New field.
13007 (struct fast_tracepoint_ctx): New.
13008 (memory_barrier): New.
13009 (cmpxchg): New.
13010 (record_tracepoint_error): Update atomically in the IPA.
13011 (clear_inferior_trace_buffer): New.
13012 (about_to_request_buffer_space): New.
13013 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13014 updating the same buffer.
13015 (add_tracepoint): Default the tracepoint's type to trap
13016 tracepoint, and orig_size to -1.
13017 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13018 internal variables.
13019 (create_trace_state_variable): New parameter `gdb'. Handle it.
13020 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13021 (cmd_qtdp): Handle fast tracepoints.
13022 (cmd_qtdv): Adjust.
13023 (max_jump_pad_size): New.
13024 (gdb_jump_pad_head): New.
13025 (get_jump_space_head): New.
13026 (claim_jump_space): New.
13027 (sort_tracepoints): New.
13028 (MAX_JUMP_SIZE): New.
13029 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13030 IPA.
13031 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13032 support. Upload fast traceframes, and delete internal IPA
13033 breakpoints.
13034 (stop_tracing_handler): New.
13035 (flush_trace_buffer_handler): New.
13036 (cmd_qtstop): Upload fast tracepoints.
13037 (response_tracepoint): Handle fast tracepoints.
13038 (tracepoint_finished_step): Upload fast traceframes. Set the
13039 tracepoint hit context's tracepoint type.
13040 (handle_tracepoint_bkpts): New.
13041 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13042 type. Add comment about fast tracepoints.
13043 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13044 non-existing action_str field.
13045 (get_context_regcache): Handle fast tracepoints.
13046 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13047 to the regcache.
13048 (fast_tracepoint_from_jump_pad_address): New.
13049 (fast_tracepoint_from_ipa_tpoint_address): New.
13050 (collecting_t): New.
13051 (force_unlock_trace_buffer): New.
13052 (fast_tracepoint_collecting): New.
13053 (collecting): New.
13054 (gdb_collect): New.
13055 (write_inferior_data_ptr): New.
13056 (target_tp_heap): New.
13057 (target_malloc): New.
13058 (download_agent_expr): New.
13059 (UALIGN): New.
13060 (download_tracepoints): New.
13061 (download_trace_state_variables): New.
13062 (upload_fast_traceframes): New.
13063 (IPA_FIRST_TRACEFRAME): New.
13064 (IPA_NEXT_TRACEFRAME_1): New.
13065 (IPA_NEXT_TRACEFRAME): New.
13066 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13067 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13068 (gdb_jump_pad_buffer_end): New.
13069 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13070 (initialize_tracepoint): Adjust.
13071 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13072 buffer. Initialize the low module.
13073 * utils.c (PREFIX, TOOLNAME): New.
13074 (malloc_failure): Use PREFIX.
13075 (error): In the IPA, an error causes an exit.
13076 (fatal, warning): Use PREFIX.
13077 (internal_error): Use TOOLNAME.
13078 (NUMCELLS): Increase to 10.
13079 * configure, config.in: Regenerate.
13080
d149dd1d
PA
130812010-06-01 Pedro Alves <pedro@codesourcery.com>
13082
13083 * server.c (handle_query) <qSupported>: Do two passes over the
13084 qSupported string to avoid nesting strtok.
13085
f6528abd
JK
130862010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13087
13088 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13089 (CDEPS): New.
13090 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13091 -Wl,--dynamic-list.
13092 * configure: Regenerate.
13093 * proc-service.list: New.
13094
ca2a87a0
JK
130952010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13096
13097 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13098 New comment.
13099
363a6e9f
OS
131002010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13101
13102 * gdbreplay.c (remote_open): Check error return from socket() call by
13103 its equality to -1 not by it being negative.
13104 * remote-utils.c (remote_open): Likewise.
13105
d23b6cb1
PA
131062010-05-23 Pedro Alves <pedro@codesourcery.com>
13107
13108 * config.h: Regenerate.
13109
28d3cf85
MK
131102010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13111
13112 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13113 doesn't provide PTRACE_GET_THREAD_AREA.
13114
fea36a59
MK
131152010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13116
13117 * linux-m68k-low.c: Include <asm/ptrace.h>
13118 (ps_get_thread_area): Implement.
13119
24b066ba
DE
131202010-05-03 Doug Evans <dje@google.com>
13121
13122 * event-loop.c (struct callback_event): New struct.
13123 (callback_list): New global.
13124 (append_callback_event, delete_callback_event): New functions.
13125 (process_callback): New function.
13126 (start_event_loop): Call it.
13127 * remote-utils.c (NOT_SCHEDULED): Define.
13128 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13129 moved out of readchar.
13130 (readchar): Rewrite. Call reschedule before returning.
13131 (reset_readchar): New function.
13132 (remote_close): Call it.
13133 (process_remaining, reschedule): New functions.
13134 * server.h (callback_handler_func): New typedef.
13135 (append_callback_event, delete_callback_event): Declare.
13136
9836d6ea
PA
131372010-05-03 Pedro Alves <pedro@codesourcery.com>
13138
13139 * proc-service.c (ps_pglobal_lookup): Use
13140 thread_db_look_up_one_symbol.
13141 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13142 parameter. Use it instead of all_symbols_looked_up.
13143 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13144 field.
13145 (all_symbols_looked_up): Don't declare.
13146 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13147 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13148 field.
13149 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13150 Set all_symbols_looked_up here.
13151 (thread_db_look_up_one_symbol): New.
13152 (thread_db_get_tls_address): Adjust.
13153 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13154 thread_db object on the heap, and tentatively set it in the
13155 process structure.
13156 (thread_db_init): Don't set all_symbols_looked_up here.
13157 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13158
7984d532
PA
131592010-05-03 Pedro Alves <pedro@codesourcery.com>
13160
13161 * linux-low.c (linux_kill, linux_detach): Adjust.
13162 (status_pending_p_callback): Remove redundant statement. Check
13163 for !TARGET_WAITIKIND_IGNORE, instead of
13164 TARGET_WAITKIND_STOPPED.
13165 (handle_tracepoints): Make sure LWP is locked. Adjust.
13166 (linux_wait_for_event_1): Adjust.
13167 (linux_cancel_breakpoints): New.
13168 (unsuspend_one_lwp): New.
13169 (unsuspend_all_lwps): New.
13170 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13171 (send_sigstop_callback): Change return type to int, add new
13172 `except' parameter and handle it.
13173 (suspend_and_send_sigstop_callback): New.
13174 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13175 pass them down. If SUSPEND, also increment the lwp's suspend
13176 count.
13177 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13178 (need_step_over_p): Don't consider suspended LWPs.
13179 (start_step_over): Adjust.
13180 (proceed_one_lwp): Change return type to int, add new `except'
13181 parameter and handle it.
13182 (unsuspend_and_proceed_one_lwp): New.
13183 (proceed_all_lwps): Use find_inferior instead of
13184 for_each_inferior.
13185 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13186 also decrement the suspend count of LWPs. Pass `except' down,
13187 instead of hacking its suspend count.
13188 (linux_pause_all): Add `freeze' parameter. Adjust.
13189 (linux_unpause_all): New.
13190 (linux_target_ops): Install linux_unpause_all.
13191 * server.c (handle_status): Adjust.
13192 * target.h (struct target_ops): New fields `unpause_all' and
13193 `cancel_breakpoints'. Add new parameter to `pause_all'.
13194 (pause_all): Add new `freeze' parameter.
13195 (unpause_all): New.
13196 (cancel_breakpoints): New.
13197 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13198 cancel breakpoints.
13199 (cmd_qtstart): Pause threads.
13200 (stop_tracing): Pause threads, and cancel breakpoints.
13201 * win32-low.c (win32_target_ops): Adjust.
13202
e471f25b
PA
132032010-05-03 Pedro Alves <pedro@codesourcery.com>
13204
13205 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13206 the inferior right away from here...
13207 (linux_wait_1): ... to here, and adjust to check the thread's
13208 last_resume_kind instead of the lwp's step or stop_expected flags.
13209
1915ef4f
PA
132102010-05-02 Pedro Alves <pedro@codesourcery.com>
13211
13212 * README: Use consistent `GDB' and `GDBserver' spellings.
13213
f9e39928
PA
132142010-05-02 Pedro Alves <pedro@codesourcery.com>
13215
13216 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13217 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13218 (linux_detach_one_lwp): Assume the lwp is stopped.
13219 (any_thread_of): Delete.
13220 (linux_detach): Stop all lwps here. Don't blindly delete all
13221 breakpoints.
13222 (delete_lwp_callback): New.
13223 (linux_mourn): Delete all lwps of the process that is gone.
13224 (linux_wait_1): Don't delete the last lwp of the process here.
13225 * mem-break.h (mark_breakpoints_out): Declare.
13226 * mem-break.c (mark_breakpoints_out): New.
13227 (free_all_breakpoints): Use it.
13228 * server.c (handle_target_event): If the process is gone, mark
13229 breakpoints out.
13230 * thread-db.c (struct thread_db) <create_bp>: New field.
13231 (thread_db_enable_reporting): Fix prototype. Store a thread event
13232 breakpoint reference in the thread_db struct.
13233 (thread_db_load_search): Clear the thread_db object.
13234 (try_thread_db_load_1): Ditto.
13235 (switch_to_process): New.
13236 (disable_thread_event_reporting): Use it.
13237 (remove_thread_event_breakpoints): New.
13238 (thread_db_detach, thread_db_mourn): Use it.
13239
1e7fc18c
PA
132402010-05-01 Pedro Alves <pedro@codesourcery.com>
13241
13242 * linux-low.c (linux_enable_event_reporting): New.
13243 (linux_wait_for_event_1, handle_extended_wait): Use it.
13244
02fc4de7
PA
132452010-04-30 Pedro Alves <pedro@codesourcery.com>
13246
13247 * linux-low.c (linux_kill_one_lwp, linux_kill)
13248 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13249 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13250 SIGSTOP even if the LWP is stopped.
13251 (send_sigstop_callback): New.
13252 (stop_all_lwps): Use send_sigstop_callback instead.
13253 (linux_resume_one_thread): Adjust.
13254 (proceed_one_lwp): Still proceed an LWP that the client has
13255 requested to stop, if we haven't reported it as stopped yet. Make
13256 sure that LWPs the client want stopped, have a pending SIGSTOP.
13257
bc3b5632
DE
132582010-04-26 Doug Evans <dje@google.com>
13259
ae1ada35
DE
13260 * server.c (handle_general_set): Make static.
13261
bc3b5632
DE
13262 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13263 Print received char after testing for error/eof instead of before.
13264 (input_interrupt): Tweak comment.
13265
65730243
DE
132662010-04-23 Doug Evans <dje@google.com>
13267
13268 * server.c (start_inferior): Print inferior argv if --debug.
13269
a8ae7dc0
AR
132702010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13271
13272 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13273 * nto-x86-low.c: Include server.h
13274
1c07cc19
PM
132752010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13276
13277 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13278 be consistent with other sources of this directory.
13279 (init_registers_amd64): Correct name of source file of this function
13280 in the comment.
13281
e0a61e09
PM
132822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13283
13284 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13285 64-bit executables.
13286
54709339
PM
132872010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13288
13289 * win32-i386-low.c: Add 64-bit support.
13290 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13291 (init_registers_amd64): Declare.
13292 (mappings): Add 64-bit version of array.
13293 (init_windows_x86): New function.
13294 (the_low_target): Change init_arch field to init_windows_x86.
13295
e8f0053d
PM
132962010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13297
13298 * win32-low.c: Adapt to support also 64-bit architecture.
13299 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13300 (get_image_name): Use SIZE_T type for local variable `done'.
13301 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13302 (toolhelp_get_dll_name): Idem.
13303 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13304 Use uintptr_t typecast to avoid warning.
13305 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13306 (handle_exception): Use phex_nz to avoid warning.
13307 (win32_wait): Remove unused local variable `process'.
13308
c481e77e
PM
133092010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13310
13311 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13312 `amd64-avx.o'.
13313
12ea4b69
PM
133142010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13315
13316 * configure.ac: Use `ws2_32' library for srv_mingw.
13317 * configure: Regenerate.
13318 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13319 * remote-utils.c: Likewise.
13320
f6d1620c
L
133212010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13322
13323 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13324 if __x86_64__ is defined.
13325
8e642873
PM
133262010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13327
13328 * configure: Regenerate.
13329
711e434b
PM
133302010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13331
13332 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13333 * target.h (target_ops): New get_tib_address field.
13334 * win32-low.h (win32_thread_info): Add thread_local_base field.
13335 * win32-low.c (child_add_thread): Add tlb argument.
13336 Set thread_local_base field to TLB.
13337 (get_child_debug_event): Adapt to child_add_thread change.
13338 (win32_get_tib_address): New function.
13339 (win32_target_ops): Set get_tib_address field to
13340 win32_get_tib_address.
13341 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13342
505106cd
PA
133432010-04-12 Pedro Alves <pedro@codesourcery.com>
13344
505106cd
PA
13345 * linux-low.c (linux_mourn): Also remove the process.
13346 * server.c (handle_target_event): Don't remove the process here.
13347 * nto-low.c (nto_mourn): New.
13348 (nto_target_ops): Install it.
13349 * spu-low.c (spu_mourn): New.
13350 (spu_target_ops): Install it.
13351 * win32-low.c (win32_mourn): New.
13352 (win32_target_ops): Install it.
13353
e8470a06
PA
133542010-04-12 Pedro Alves <pedro@codesourcery.com>
13355
13356 * server.h (buffer_xml_printf): Remove redundant `;'.
13357
45ba0d02
PA
133582010-04-12 Pedro Alves <pedro@codesourcery.com>
13359
13360 * regcache.c (set_register_cache): Invalidate regcaches before
13361 changing the register cache layout.
13362 (regcache_invalidate_one): Allow a NULL regcache.
13363 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13364 regcaches before changing the register cache layout or the target
13365 regsets.
13366
59e04013
L
133672010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13368
13369 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13370 variable warning on Linux/x86-64.
13371
8336d594
PA
133722010-04-11 Pedro Alves <pedro@codesourcery.com>
13373
13374 GDBserver disconnected tracing support.
13375
13376 * linux-low.c (linux_remove_process): Delete.
13377 (add_lwp): Don't set last_resume_kind here.
13378 (linux_kill): Use `mourn'.
13379 (linux_detach): Use `thread_db_detach', and `mourn'.
13380 (linux_mourn): New.
13381 (linux_attach_lwp_1): Adjust comment.
13382 (linux_attach): last_resume_kind moved the thread_info; adjust.
13383 (status_pending_p_callback): Adjust.
13384 (linux_wait_for_event_1): Adjust.
13385 (count_events_callback, select_singlestep_lwp_callback)
13386 (select_event_lwp_callback, cancel_breakpoints_callback)
13387 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13388 (proceed_one_lwp): Adjust.
13389 (linux_async): Add debug output.
13390 (linux_thread_stopped): New.
13391 (linux_pause_all): New.
13392 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13393 linux_pause_all.
13394 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13395 (thread_db_free): Delete declaration.
13396 (thread_db_detach, thread_db_mourn): Declare.
13397 * thread-db.c (thread_db_init): Use thread_db_mourn.
13398 (thread_db_free): Delete, split in two.
13399 (disable_thread_event_reporting): New.
13400 (thread_db_detach): New.
13401 (thread_db_mourn): New.
13402
13403 * server.h (struct thread_info) <last_resume_kind>: New field.
13404 <attached>: Add comment.
13405 <gdb_detached>: New field.
13406 (handler_func): Change return type to int.
13407 (handle_serial_event, handle_target_event): Ditto.
13408 (gdb_connected): Declare.
13409 (tracing): Delete.
13410 (disconnected_tracing): Declare.
13411 (stop_tracing): Declare.
13412
13413 * server.c (handle_query) <qSupported>: Report support for
13414 disconnected tracing.
13415 (queue_stop_reply_callback): Account for running threads.
13416 (gdb_wants_thread_stopped): New.
13417 (gdb_wants_all_threads_stopped): New.
13418 (gdb_reattached_process): New.
13419 (handle_status): Clear the `gdb_detached' flag of all processes.
13420 In all-stop, stop all threads.
13421 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13422 (process_serial_event): If the remote connection breaks, or if an
13423 exit was forced with "monitor exit", force an event loop exit.
13424 Handle disconnected tracing on detach.
13425 (handle_serial_event): Adjust.
13426 (handle_target_event): If GDB isn't connected, forward events back
13427 to the inferior, unless the last process exited, in which case,
13428 exit gdbserver. Adjust interface.
13429
13430 * remote-utils.c (remote_open): Don't block in accept. Instead
13431 register an event loop source on the listen socket file
13432 descriptor. Refactor bits into ...
13433 (listen_desc): ... this new global.
13434 (gdb_connected): ... this new function.
13435 (enable_async_notification): ... this new function.
13436 (handle_accept_event): ... this new function.
13437 (remote_close): Clear remote_desc.
13438
13439 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13440
13441 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13442 New fields.
13443 (mourn_inferior): Define.
13444 (target_process_qsupported): Avoid the dangling else problem.
13445 (thread_stopped): Define.
13446 (pause_all): Define.
13447 (target_waitstatus_to_string): Declare.
13448 * target.c (target_waitstatus_to_string): New.
13449
13450 * tracepoint.c (tracing): Make extern.
13451 (disconnected_tracing): New.
13452 (stop_tracing): Make extern. Handle tracing stops due to GDB
13453 disconnecting.
13454 (cmd_qtdisconnected): New.
13455 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13456 (handle_tracepoint_general_set): Handle QTDisconnected.
13457
13458 * event-loop.c (event_handler_func): Change return type to int.
13459 (process_event): Bail out if the event handler wants the event
13460 loop to stop.
13461 (handle_file_event): Ditto.
13462 (start_event_loop): Bail out if the event handler wants the event
13463 loop to stop.
13464
13465 * nto-low.c (nto_target_ops): Adjust.
13466 * spu-low.c (spu_wait): Don't remove the process here.
13467 (spu_target_ops): Adjust.
13468 * win32-low.c (win32_wait): Don't remove the process here.
13469 (win32_target_ops): Adjust.
13470
5d267c4c
PA
134712010-04-11 Pedro Alves <pedro@codesourcery.com>
13472
13473 * regcache.c (realloc_register_cache): Invalidate inferior's
13474 regcache before recreating it.
13475
623ccd72
PA
134762010-04-09 Pedro Alves <pedro@codesourcery.com>
13477
13478 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13479
219f2f23
PA
134802010-04-09 Stan Shebs <stan@codesourcery.com>
13481 Pedro Alves <pedro@codesourcery.com>
13482
13483 * server.h (LONGEST): New.
13484 (struct thread_info) <while_stepping>: New field.
13485 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13486 Declare.
13487 (initialize_tracepoint, handle_tracepoint_general_set)
13488 (handle_tracepoint_query, tracepoint_finished_step)
13489 (tracepoint_was_hit, release_while_stepping_state_list):
13490 (current_traceframe): Declare.
13491 * server.c (handle_general_set): Handle tracepoint packets.
13492 (read_memory): New.
13493 (write_memory): New.
13494 (handle_search_memory_1): Use read_memory.
13495 (handle_query): Report support for conditional tracepoints, trace
13496 state variables, and tracepoint sources. Handle tracepoint
13497 queries.
13498 (main): Initialize the tracepoints module.
13499 (process_serial_event): Handle traceframe reads/writes.
13500
13501 * linux-low.c (handle_tracepoints): New.
13502 (linux_wait_1): Call it.
13503 (linux_resume_one_lwp): Handle while-stepping.
13504 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13505 (linux_target_ops): Install them.
13506 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13507 New field.
13508 * linux-x86-low.c (x86_supports_tracepoints): New.
13509 (the_low_target). Install it.
13510
13511 * mem-break.h (delete_breakpoint): Declare.
13512 * mem-break.c (delete_breakpoint): Make external.
13513
13514 * target.h (struct target_ops): Add `supports_tracepoints',
13515 `read_pc', and `write_pc' fields.
13516 (target_supports_tracepoints): Define.
13517 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13518 (phex_nz): New.
13519
13520 * regcache.h (struct regcache) <registers_owned>: New field.
13521 (init_register_cache, regcache_cpy): Declare.
13522 (regcache_read_pc, regcache_write_pc): Declare.
13523 (register_cache_size): Declare.
13524 (supply_regblock): Declare.
13525 * regcache.c (init_register_cache): New.
13526 (new_register_cache): Use it.
13527 (regcache_cpy): New.
13528 (register_cache_size): New.
13529 (supply_regblock): New.
13530 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13531
219f2f23
PA
13532 * tracepoint.c: New.
13533
13534 * Makefile.in (OBS): Add tracepoint.o.
13535 (tracepoint.o): New rule.
13536
3a13a53b
L
135372010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13538
13539 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13540 (i386-mmx.o): New.
13541 (i386-mmx.c): Likewise.
13542 (i386-mmx-linux.o): Likewise.
13543 (i386-mmx-linux.c): Likewise.
13544
13545 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13546 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13547 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13548 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13549
13550 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13551 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13552 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13553
1570b33e
L
135542010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13555
13556 * Makefile.in (clean): Updated.
13557 (i386-avx.o): New.
13558 (i386-avx.c): Likewise.
13559 (i386-avx-linux.o): Likewise.
13560 (i386-avx-linux.c): Likewise.
13561 (amd64-avx.o): Likewise.
13562 (amd64-avx.c): Likewise.
13563 (amd64-avx-linux.o): Likewise.
13564 (amd64-avx-linux.c): Likewise.
13565
13566 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13567 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13568 (srv_amd64_regobj): Add amd64-avx.o.
13569 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13570 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13571 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13572 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13573 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13574 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13575 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13576
13577 * i387-fp.c: Include "i386-xstate.h".
13578 (i387_xsave): New.
13579 (i387_cache_to_xsave): Likewise.
13580 (i387_xsave_to_cache): Likewise.
13581 (x86_xcr0): Likewise.
13582
13583 * i387-fp.h (i387_cache_to_xsave): Likewise.
13584 (i387_xsave_to_cache): Likewise.
13585 (x86_xcr0): Likewise.
13586
13587 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13588 * linux-crisv32-low.c (target_regsets): Likewise.
13589 * linux-m68k-low.c (target_regsets): Likewise.
13590 * linux-mips-low.c (target_regsets): Likewise.
13591 * linux-ppc-low.c (target_regsets): Likewise.
13592 * linux-s390-low.c (target_regsets): Likewise.
13593 * linux-sh-low.c (target_regsets): Likewise.
13594 * linux-sparc-low.c (target_regsets): Likewise.
13595 * linux-xtensa-low.c (target_regsets): Likewise.
13596
13597 * linux-low.c: Include <sys/uio.h>.
13598 (regsets_fetch_inferior_registers): Support nt_type.
13599 (regsets_store_inferior_registers): Likewise.
13600 (linux_process_qsupported): New.
13601 (linux_target_ops): Add linux_process_qsupported.
13602
13603 * linux-low.h (regset_info): Add nt_type.
13604 (linux_target_ops): Add process_qsupported.
13605
13606 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13607 and <sys/uio.h>.
13608 (init_registers_i386_avx_linux): New.
13609 (init_registers_amd64_avx_linux): Likewise.
13610 (xmltarget_i386_linux_no_xml): Likewise.
13611 (xmltarget_amd64_linux_no_xml): Likewise.
13612 (PTRACE_GETREGSET): Likewise.
13613 (PTRACE_SETREGSET): Likewise.
13614 (x86_fill_xstateregset): Likewise.
13615 (x86_store_xstateregset): Likewise.
13616 (use_xml): Likewise.
13617 (x86_linux_update_xmltarget): Likewise.
13618 (x86_linux_process_qsupported): Likewise.
13619 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13620 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13621 init_registers_i386_linux here. Call
13622 x86_linux_update_xmltarget.
13623 (the_low_target): Add x86_linux_process_qsupported.
13624
13625 * server.c (handle_query): Call target_process_qsupported.
13626
13627 * target.h (target_ops): Add process_qsupported.
13628 (target_process_qsupported): New.
13629
fc7238bb
PA
136302010-04-03 Pedro Alves <pedro@codesourcery.com>
13631
13632 * inferiors.c (add_thread): Set last_status kind to
13633 TARGET_WAITKIND_IGNORE.
13634 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13635 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13636 (linux_wait_1): Move `thread' local definition to block that uses
13637 it. Don't NULL initialize `event_child'.
13638 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13639 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13640 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13641
bdabb078
PA
136422010-04-01 Pedro Alves <pedro@codesourcery.com>
13643
13644 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13645 an extended waitstatus, or by a watchpoint.
13646 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13647 thread was stepping or has been stopped by a watchpoint.
13648
d3bbe7a0
PA
136492010-04-01 Pedro Alves <pedro@codesourcery.com>
13650
13651 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13652 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13653 of another, then delete the previous, and validate all
13654 breakpoints.
13655 (validate_inserted_breakpoint): New.
13656 (delete_disabled_breakpoints): New.
13657 (validate_breakpoints): New.
13658 (check_mem_read): Validate breakpoints before trusting their
13659 shadow. Delete disabled breakpoints.
13660 (check_mem_write): Validate breakpoints before trusting they
13661 should be inserted. Delete disabled breakpoints.
13662 * mem-break.h (validate_breakpoints):
13663 * server.c (handle_query): Validate breakpoints when we see a
13664 qSymbol query.
13665
8b07ae33
PA
136662010-04-01 Pedro Alves <pedro@codesourcery.com>
13667
13668 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13669 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13670 if we could tell there's a GDB breakpoint at stop_pc.
13671 (need_step_over_p): Don't do a step over if we find a GDB
13672 breakpoint at the resume PC.
13673
13674 * mem-break.c (struct raw_breakpoint): New.
13675 (enum bkpt_type): New type `gdb_breakpoint'.
13676 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13677 fields. New field `raw'.
13678 (find_raw_breakpoint_at): New.
13679 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13680 breakpoint instead.
13681 (set_breakpoint_at): Adjust.
13682 (delete_raw_breakpoint): New.
13683 (release_breakpoint): New.
13684 (delete_breakpoint): Rename to...
13685 (delete_breakpoint_1): ... this. Add proc parameter. Use
13686 release_breakpoint. Return ENOENT.
13687 (delete_breakpoint): Reimplement.
13688 (find_breakpoint_at): Delete.
13689 (find_gdb_breakpoint_at): New.
13690 (delete_breakpoint_at): Delete.
13691 (set_gdb_breakpoint_at): New.
13692 (delete_gdb_breakpoint_at): New.
13693 (gdb_breakpoint_here): New.
13694 (set_reinsert_breakpoint): Use release_breakpoint.
13695 (uninsert_breakpoint): Rename to ...
13696 (uninsert_raw_breakpoint): ... this.
13697 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13698 (reinsert_raw_breakpoint): Change parameter type to
13699 raw_breakpoint.
13700 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13701 instead.
13702 (check_breakpoints): Adjust. Use release_breakpoint.
13703 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13704 (breakpoint_inserted_here): Ditto.
13705 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13706 Don't trust the breakpoint's shadow if it is not inserted.
13707 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13708 (delete_all_breakpoints): Adjust.
13709 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13710 use delete_breakpoint_1.
13711
13712 * mem-break.h (breakpoints_supported): Delete declaration.
13713 (set_gdb_breakpoint_at): Declare.
13714 (gdb_breakpoint_here): Declare.
13715 (delete_breakpoint_at): Delete.
13716 (delete_gdb_breakpoint_at): Declare.
13717
13718 * server.h (struct raw_breakpoint): Forward declare.
13719 (struct process_info): New field `raw_breakpoints'.
13720
13721 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13722 breakpoints.
13723
6bf5e0ba
PA
137242010-03-24 Pedro Alves <pedro@codesourcery.com>
13725
13726 * linux-low.c (status_pending_p_callback): Fix comment.
13727 (linux_wait_for_event_1): Move most of the internal breakpoint
13728 handling from here...
13729 (linux_wait_1): ... to here.
13730 (count_events_callback): New.
13731 (select_singlestep_lwp_callback): New.
13732 (select_event_lwp_callback): New.
13733 (cancel_breakpoints_callback): New.
13734 (select_event_lwp): New.
13735 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13736 priority to all LWPs that have had events that should be reported
13737 to the client. Cancel breakpoints when about to reporting the
13738 event to the client, not while stopping lwps. No longer cancel
13739 finished single-steps here.
13740 (cancel_finished_single_step): Delete.
13741 (cancel_finished_single_steps): Delete.
13742
414a389f
PA
137432010-03-24 Pedro Alves <pedro@codesourcery.com>
13744
13745 * mem-break.c (enum bkpt_type): New.
13746 (struct breakpoint): New field `type'.
13747 (set_breakpoint_at): Change return type to struct breakpoint
13748 pointer. Set type to `other_breakpoint' by default.
13749 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13750 in the breakpoint list.
13751 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13752 (reinsert_breakpoint): Rename to ...
13753 (reinsert_raw_breakpoint): ... this.
13754 (reinsert_breakpoints_at): Adjust.
13755 * mem-break.h (struct breakpoint): Declare.
13756 (set_breakpoint_at): Change return type to struct breakpoint
13757 pointer.
13758
2280c721
PA
137592010-03-24 Pedro Alves <pedro@codesourcery.com>
13760
13761 * server.c (handle_query): Assign, not compare.
13762
d50171e4
PA
137632010-03-24 Pedro Alves <pedro@codesourcery.com>
13764
13765 Teach linux gdbserver to step-over-breakpoints.
13766
13767 * linux-low.c (can_hardware_single_step): New.
13768 (supports_breakpoints): New.
13769 (handle_extended_wait): If stopping threads, read the stop pc of
13770 the new cloned LWP.
13771 (get_pc): New.
13772 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13773 low target doesn't support retrieving the PC.
13774 (add_lwp): Set last_resume_kind to resume_continue.
13775 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13776 (linux_attach): Don't clear stop_expected. Set the lwp's
13777 last_resume_kind to resume_stop.
13778 (linux_detach_one_lwp): Don't check for removed breakpoints.
13779 (check_removed_breakpoint): Delete.
13780 (status_pending_p): Rename to ...
13781 (status_pending_p_callback): ... this. Don't check for removed
13782 breakpoints. Don't consider threads that are stopped from GDB's
13783 perspective.
13784 (linux_wait_for_lwp): Always read the stop_pc here.
13785 (cancel_breakpoint): New.
13786 (step_over_bkpt): New global.
13787 (linux_wait_for_event_1): Implement stepping over breakpoints.
13788 (gdb_wants_lwp_stopped): New.
13789 (gdb_wants_all_stopped): New.
13790 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13791 single-step traps here. Store the thread's last reported target
13792 wait status.
13793 (send_sigstop): Don't clear stop_expected. Always set it,
13794 instead.
13795 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13796 (cancel_finished_single_step): New.
13797 (cancel_finished_single_steps): New.
13798 (wait_for_sigstop): Don't cancel finished single-step traps here.
13799 (linux_resume_one_lwp): Don't check for removed breakpoints.
13800 Don't set `step' on non-hardware step archs.
13801 (linux_set_resume_request): Ignore resume_stop requests if already
13802 stopping or stopped. Set the lwp's last_resume_kind.
13803 (resume_status_pending_p): Don't check for removed breakpoints.
13804 (need_step_over_p): New.
13805 (start_step_over): New.
13806 (finish_step_over): New.
13807 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13808 requests. Clear the thread's last reported target waitstatus.
13809 Don't use the `suspended' flag. Don't consider pending breakpoints.
13810 (linux_resume): Start a step-over if necessary.
13811 (proceed_one_lwp): New.
13812 (proceed_all_lwps): New.
13813 (unstop_all_lwps): New.
13814 * linux-low.h (struct lwp_info): Rewrite comment for the
13815 `suspended' flag. Add the `stop_pc' field. Delete the
13816 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13817 Add `'last_resume_kind' and `need_step_over' fields.
13818 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13819 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13820 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13821 (set_raw_breakpoint_at): New.
13822 (set_breakpoint_at): Rewrite to use it.
13823 (reinsert_breakpoint_handler): Delete.
13824 (set_reinsert_breakpoint): New.
13825 (reinsert_breakpoint_by_bp): Delete.
13826 (delete_reinsert_breakpoints): New.
13827 (uninsert_breakpoint): Rewrite.
13828 (uninsert_breakpoints_at): New.
13829 (reinsert_breakpoint): Rewrite.
13830 (reinsert_breakpoints_at): New.
13831 (check_breakpoints): Rewrite.
13832 (breakpoint_here): New.
13833 (breakpoint_inserted_here): New.
13834 (check_mem_read): Adjust.
13835 * mem-break.h (breakpoints_supported, breakpoint_here)
13836 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13837 (reinsert_breakpoint_by_bp): Delete declaration.
13838 (delete_reinsert_breakpoints): Declare.
13839 (reinsert_breakpoint): Delete declaration.
13840 (reinsert_breakpoints_at): Declare.
13841 (uninsert_breakpoint): Delete declaration.
13842 (uninsert_breakpoints_at): Declare.
13843 (check_breakpoints): Adjust prototype.
13844 * server.h: Adjust include order.
13845 (struct thread_info): Declare here. Add a `last_status' field.
13846
30ba68cb
MS
138472010-03-23 Michael Snyder <msnyder@vmware.com>
13848
13849 * server.c (crc32): New function.
13850 (handle_query): Add handling for 'qCRC:' request.
13851
b9a881c2
PA
138522010-03-23 Pedro Alves <pedro@codesourcery.com>
13853
13854 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13855 lwp had been stopped by a watchpoint.
13856
e92d13d5
PA
138572010-03-16 Pedro Alves <pedro@codesourcery.com>
13858
13859 * server.h (internal_error): Declare.
13860 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13861 * utils.c (internal_error): New function.
13862
64daa791
AS
138632010-03-15 Andreas Schwab <schwab@redhat.com>
13864
13865 * configure.srv: Fix typo setting srv_regobj.
13866
f52cd8cd
PA
138672010-03-15 Pedro Alves <pedro@codesourcery.com>
13868
13869 * linux-low.c (fetch_register): Avoid passing a non string literal
13870 format to `error'.
13871 (usr_store_inferior_registers): Ditto.
13872
93ae6fdc
PA
138732010-03-14 Pedro Alves <pedro@codesourcery.com>
13874
13875 * linux-low.c (linux_write_memory): Bail out early if peeking
13876 memory failed.
13877
c3adc08c
PA
138782010-03-14 Pedro Alves <pedro@codesourcery.com>
13879
13880 * linux-low.h (struct lwp_info): New fields
13881 `stopped_by_watchpoint' and `stopped_data_address'.
13882 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13883 here, and cache them in the lwp object.
13884 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13885 directly.
13886 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13887 field.
13888 (linux_stopped_by_watchpoint): Rewrite.
13889 (linux_stopped_data_address): Rewrite.
13890
bce522a2
PA
138912010-03-06 Simo Melenius <simo.melenius@iki.fi>
13892
13893 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13894 switching the current inferior, not before.
13895
90884b2b
L
138962010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13897
13898 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13899 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13900 i386-linux.c and amd64-linux.c.
13901 (reg-i386.o): Removed.
13902 (reg-i386.c): Likewise.
13903 (reg-i386-linux.o): Likewise.
13904 (reg-i386-linux.c): Likewise.
13905 (reg-x86-64.o): Likewise.
13906 (reg-x86-64.c): Likewise.
13907 (reg-x86-64-linux.o): Likewise.
13908 (reg-x86-64-linux.c): Likewise.
13909 (i386.o): New.
13910 (i386.c): Likewise.
13911 (i386-linux.o): Likewise.
13912 (i386-linux.c): Likewise.
13913 (amd64.o): Likewise.
13914 (amd64.c): Likewise.
13915 (amd64-linux.o): Likewise.
13916 (amd64-linux.c): Likewise.
13917
13918 * configure.srv (srv_i386_regobj): New.
13919 (srv_i386_linux_regobj): Likewise.
13920 (srv_amd64_regobj): Likewise.
13921 (srv_amd64_linux_regobj): Likewise.
13922 (srv_i386_32bit_xmlfiles): Likewise.
13923 (srv_i386_64bit_xmlfiles): Likewise.
13924 (srv_i386_xmlfiles): Likewise.
13925 (srv_amd64_xmlfiles): Likewise.
13926 (srv_i386_linux_xmlfiles): Likewise.
13927 (srv_amd64_linux_xmlfiles): Likewise.
13928 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13929 srv_xmlfiles to $srv_i386_xmlfiles.
13930 (i[34567]86-*-mingw32ce*): Likewise.
13931 (i[34567]86-*-mingw*): Likewise.
13932 (i[34567]86-*-nto*): Likewise.
13933 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13934 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13935 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13936 (x86_64-*-linux*): Likewise.
13937
13938 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13939 (init_registers_amd64_linux): New.
13940 (x86_arch_setup): Replace init_registers_x86_64_linux with
13941 init_registers_amd64_linux.
13942
193f13e6
MK
139432010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13944
13945 * configure.ac: Check for libdl. If it is not available link against
13946 static libthread_db.
13947 * configure: Regenerate.
13948
85d721b8
PA
139492010-02-22 Pedro Alves <pedro@codesourcery.com>
13950
13951 PR9605
13952
13953 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13954 handing a read watchpoint.
13955 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13956
6076632b
DE
139572010-02-12 Doug Evans <dje@google.com>
13958
13959 * linux-low.c (linux_supports_tracefork_flag): Document.
13960 (linux_look_up_symbols): Add comment.
13961
3327ccf7
L
139622010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13963
13964 * regcache.c (supply_register): Clear regcache if buf is NULL.
13965
0718675c 139662010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13967 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13968
13969 * inferiors.c (find_inferior): Add function documentation.
13970 (unloaded_dll): Handle the case where the unloaded dll has not
13971 been previously registered in the dll list.
13972
177321bd
DJ
139732010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13974
13975 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13976 (thumb2_breakpoint): New.
13977 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13978
2b009048
DJ
139792010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13980
13981 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13982 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13983 breakpoints.
13984
3be029c7
PA
139852010-01-21 Pedro Alves <pedro@codesourcery.com>
13986
13987 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13988
18f5de3b
JK
139892010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13990
13991 * linux-s390-low.c (s390_collect_ptrace_register)
13992 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13993
3743bb4f
DE
139942010-01-21 Doug Evans <dje@google.com>
13995
14ce3065
DE
13996 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13997 (PTRACE_ARG4_TYPE): New macro.
13998 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13999 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14000 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14001 (usr_store_inferior_registers): Ditto.
14002 (linux_read_memory, linux_write_memory): Ditto.
14003 (linux_test_for_tracefork): Ditto.
14004
3743bb4f
DE
14005 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14006 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14007
8b315be5
PA
140082010-01-21 Pedro Alves <pedro@codesourcery.com>
14009
14010 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14011 target.
14012
85492558
PA
140132010-01-21 Pedro Alves <pedro@codesourcery.com>
14014
14015 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14016 prototype to take a regcache. Adjust.
14017
442ea881
PA
140182010-01-20 Pedro Alves <pedro@codesourcery.com>
14019
14020 * regcache.h (struct thread_info): Forward declare.
14021 (struct regcache): New.
14022 (new_register_cache): Adjust prototype.
14023 (get_thread_regcache): Declare.
14024 (free_register_cache): Adjust prototype.
14025 (registers_to_string, registers_from_string): Ditto.
14026 (supply_register, supply_register_by_name, collect_register)
14027 (collect_register_as_string, collect_register_by_name): Ditto.
14028 * regcache.c (struct inferior_regcache_data): Delete.
14029 (get_regcache): Rename to ...
14030 (get_thread_regcache): ... this. Adjust. Switch inferior before
14031 fetching registers.
14032 (regcache_invalidate_one): Adjust.
14033 (regcache_invalidate): Fix prototype.
14034 (new_register_cache): Return the new register cache.
14035 (free_register_cache): Change prototype.
14036 (realloc_register_cache): Adjust.
14037 (registers_to_string): Change prototype to take a regcache. Adjust.
14038 (registers_from_string): Ditto.
14039 (register_data): Ditto.
14040 (supply_register): Ditto.
14041 (supply_register_by_name): Ditto.
14042 (collect_register): Ditto.
14043 (collect_register_as_string): Ditto.
14044 (collect_register_by_name): Ditto.
14045 * server.c (process_serial_event): Adjust.
14046 * linux-low.h (regset_fill_func, regset_store_func): Change
14047 prototype.
14048 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14049 Change prototype.
14050 * linux-low.c (get_stop_pc): Adjust.
14051 (check_removed_breakpoint): Adjust.
14052 (linux_wait_for_event): Adjust.
14053 (linux_resume_one_lwp): Adjust.
14054 (fetch_register): Add regcache parameter. Adjust.
14055 (usr_store_inferior_registers): Ditto.
14056 (regsets_fetch_inferior_registers): Ditto.
14057 (regsets_store_inferior_registers): Ditto.
14058 (linux_fetch_registers, linux_store_registers): Ditto.
14059 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14060 regcache. Adjust.
43aaf8b6
PA
14061 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14062 Ditto.
442ea881
PA
14063 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14064 prototype to take a regcache.
14065 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14066 * remote-utils.c (convert_ascii_to_int, outreg)
14067 (prepare_resume_reply): Change prototype to take a regcache.
14068 Adjust.
14069 * target.h (struct target_ops) <fetch_registers, store_registers>:
14070 Change prototype to take a regcache.
14071 (fetch_inferior_registers, store_inferior_registers): Change
14072 prototype to take a regcache. Adjust.
14073 * proc-service.c (ps_lgetregs): Adjust.
14074 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14075 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14076 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14077 take a regcache. Adjust.
14078 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14079 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14080 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14081 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14082 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14083 (cris_cannot_fetch_register):
14084 (cris_breakpoint_at): Change prototype to take a regcache.
14085 Adjust.
14086 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14087 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14088 to take a regcache. Adjust.
14089 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14090 Adjust.
14091 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14092 take a regcache. Adjust.
14093 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14094 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14095 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14096 * linux-mips-low.c (mips_get_pc):
14097 (mips_set_pc): Change prototype to take a regcache. Adjust.
14098 (mips_reinsert_addr): Adjust.
14099 (mips_collect_register): Change prototype to take a regcache.
14100 Adjust.
14101 (mips_supply_register):
14102 (mips_collect_register_32bit, mips_supply_register_32bit)
14103 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14104 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14105 * linux-ppc-low.c (ppc_supply_ptrace_register)
14106 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14107 (parse_spufs_run): Adjust.
14108 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14109 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14110 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14111 take a regcache. Adjust.
14112 * linux-s390-low.c (s390_collect_ptrace_register)
14113 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14114 (s390_set_pc): Change prototype to take a regcache. Adjust.
14115 (s390_arch_setup): Adjust.
14116 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14117 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14118 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14119 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14120 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14121 regcache. Adjust.
14122 (sparc_breakpoint_at): Adjust.
14123 * linux-xtensa-low.c (xtensa_fill_gregset):
14124 (xtensa_store_gregset):
14125 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14126 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14127 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14128 prototype to take a regcache. Adjust.
14129 * win32-arm-low.c (arm_fetch_inferior_register)
14130 (arm_store_inferior_register): Change prototype to take a
14131 regcache. Adjust.
14132 * win32-i386-low.c (i386_fetch_inferior_register)
14133 (i386_store_inferior_register): Change prototype to take a
14134 regcache. Adjust.
14135 * win32-low.c (child_fetch_inferior_registers)
14136 (child_store_inferior_registers): Change prototype to take a
14137 regcache. Adjust.
14138 (win32_wait): Adjust.
14139 (win32_fetch_inferior_registers): Change prototype to take a
14140 regcache. Adjust.
14141 (win32_store_inferior_registers): Adjust.
14142 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14143 store_inferior_register>: Change prototype to take a regcache.
14144
60c3d7b0
DE
141452010-01-20 Doug Evans <dje@google.com>
14146
14147 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14148 #ifdef.
14149 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14150 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14151
dc146f7c
VP
141522010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14153
14154 * linux-low.c (linux_core_of_thread): New.
14155 (compare_ints, show_process, list_threads): New.
14156 (linux_qxfer_osdata): Report threads and cores.
14157 (linux_target_op): Register linux_core_of_thread.
14158 * remote-utils.c (prepare_resume_reply): Report the core.
14159 (buffer_xml_printf): Support %d specifier.
14160 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14161 New.
14162 (handle_query): Handle qXfer:threads. Announce availability
14163 thereof.
14164 * target.h (struct target_ops): New field core_of_thread.
14165
7803799a
UW
141662010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14167
14168 * Makefile.in (clean): Remove new generated files.
14169 (reg-s390.o, reg-s390.c): Remove rules.
14170 (reg-s390x.o, reg-s390x.c): Likewise.
14171 (s390-linux32.o, s390-linux32.c): Add rules.
14172 (s390-linux64.o, s390-linux64.c): Likewise.
14173 (s390x-linux64.o, s390x-linux64.c): Likewise.
14174 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14175 * linux-s390-low.c: Include <elf.h>.
14176 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14177 (init_registers_s390): Remove prototype.
14178 (init_registers_s390x): Likewise.
14179 (init_registers_s390_linux32): Add prototype.
14180 (init_registers_s390_linux64): Likewise.
14181 (init_registers_s390x_linux64): Likewise.
14182 (s390_num_regs_3264): New define.
14183 (s390_regmap_3264): New global variable.
14184 (s390_cannot_fetch_register): Remove obsolete check.
14185 (s390_cannot_store_register): Likewise.
14186 (s390_collect_ptrace_register): Handle upper/lower register halves.
14187 (s390_supply_ptrace_register): Likewise.
14188 (s390_fill_gregset): Update to register number changes.
14189 (s390_get_hwcap): New routine.
14190 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14191 Install appropriate regmap and register set.
14192
6e7ffa39
JB
141932010-01-01 Joel Brobecker <brobecker@adacore.com>
14194
14195 * server.c (gdbserver_version): Update copyright year to 2010.
14196 * gdbreplay.c (gdbreplay_version): Likewise.
14197
957f3f49
DE
141982009-12-28 Doug Evans <dje@google.com>
14199
14200 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14201 elf/external.h. Include <elf.h> instead but only if necessary.
14202
ca5c370d
PA
142032009-12-28 Pedro Alves <pedro@codesourcery.com>
14204
14205 * linux-low.c (linux_remove_process): Remove `detaching'
14206 parameter. Don't release/detach from thread_db here.
14207 (linux_kill): Release/detach from thread_db here, ...
14208 (linux_detach): ... and here, before actually detaching.
14209 (linux_wait_1): ... and here, when a process exits.
14210 * thread-db.c (any_thread_of): New.
14211 (thread_db_free): Switch the current inferior to a thread of the
14212 passed in process.
14213
4ee62156
DE
142142009-12-21 Doug Evans <dje@google.com>
14215
d90e6a88
DE
14216 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14217
c5f62d5f
DE
14218 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14219 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14220 warning ifndef __NR_tkill. Move setting of errno there too.
14221 Delete unnecessary resetting of errno after syscall.
14222 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14223
10e86dd7
DE
14224 * configure.ac: Check for dladdr.
14225 * config.in: Regenerate.
14226 * configure: Regenerate.
14227 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14228 (try_thread_db_load): Update.
14229
4ee62156
DE
14230 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14231
00f515da
DE
142322009-12-18 Doug Evans <dje@google.com>
14233
e9464885
DE
14234 * event-loop.c: Include unistd.h if it exists.
14235
07d4f67e
DE
14236 * linux-low.c (my_waitpid): Move definition away from being in
14237 between linux_tracefork_child/linux_test_for_tracefork.
14238
00f515da
DE
14239 * gdb_proc_service.h (psaddr_t): Fix type.
14240 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14241 signature to match glibc.
14242
1de1badb
DE
142432009-12-16 Doug Evans <dje@google.com>
14244
14245 * linux-low.c (linux_read_memory): Fix argument to read.
14246
aeeb81d1
PA
142472009-11-26 Pedro Alves <pedro@codesourcery.com>
14248
14249 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14250 events, don't leave current_inferior pointing at null.
14251
10357975
PA
142522009-11-26 Pedro Alves <pedro@codesourcery.com>
14253
14254 * win32-low.c (LOG): Delete.
14255 (OUTMSG): Output to stderr.
14256 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14257 on compile time LOG macro.
14258 (win32_wait): Fix debug output.
14259
cf6e3471
PA
142602009-11-26 Pedro Alves <pedro@codesourcery.com>
14261
14262 * win32-low.c (win32_add_one_solib): If the dll name is
14263 "ntdll.dll", prepend the system directory to the dll path.
14264
0c85e18e
MK
142652009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14266
14267 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14268
9ac544ce 142692009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14270 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14271
14272 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14273 * configure.ac: Check for __mcoldfire__ and set
14274 gdb_cv_m68k_is_coldfire.
14275 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14276 reg-cf.o and reg-m68k.o.
14277 * configure: Regenerated.
14278
fd7dd3e6
PA
142792009-11-16 Pedro Alves <pedro@codesourcery.com>
14280
14281 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14282 Pass it to thread_db_free.
14283 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14284 proper `detaching' argument to linux_remove_process.
14285 * linux-low.h (thread_db_free): Add `detaching' parameter.
14286 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14287 to thread_db_free.
14288 (thread_db_free): Add `detaching' parameter. Only
14289 call td_ta_clear_event if detaching from process.
14290
75aa492e
MK
142912009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14292
14293 * thread-db.c (thread_db_free): Fix typo.
14294
21e1bee4
PP
142952009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14296
14297 PR gdb/10838
14298 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14299
8838b45e
NS
143002009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14301
14302 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14303 with an i686 compiler.
14304 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14305 needed.
14306 * configure: Rebuilt.
14307
8a35fb51
SL
143082009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14309
14310 PR gdb/10783
14311
14312 * server.c (handle_search_memory_1): Correct read_addr initialization
14313 in loop for searching subsequent chunks.
14314
96f15937
PP
143152009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14316
14317 * configure.ac: New --with-libthread-db option.
14318 * thread-db.c: Allow direct dependence on libthread_db.
14319 (thread_db_free): Adjust.
14320 * config.in: Regenerate.
14321 * configure: Likewise.
889bf7c5 14322
5f7d1694
PP
143232009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14324
14325 PR gdb/10757
14326 * thread-db.c (attach_thread): New function.
14327 (maybe_attach_thread): Return success/failure.
14328 (find_new_threads_callback): Adjust.
889bf7c5
PA
14329 (thread_db_find_new_threads): Loop until no new threads.
14330
88e3b899
PA
143312009-10-13 Pedro Alves <pedro@codesourcery.com>
14332
14333 * proc-service.c (ps_lgetregs): Formatting.
14334
cdbfd419
PP
143352009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14336
14337 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14338 * configure.ac: Adjust.
14339 * linux-low.h (struct process_info_private): Move members to struct
14340 thread_db.
14341 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14342 * linux-low.c (linux_remove_process): Adjust.
14343 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14344 * server.c (handle_query): Move code ...
14345 (handle_monitor_command): ... here. New function.
14346 * target.h (struct target_ops): New member.
14347 * thread-db.c (struct thread_db): New.
14348 (libthread_db_search_path): New variable.
14349 (thread_db_create_event, thread_db_enable_reporting)
14350 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14351 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14352 (try_thread_db_load_1, dladdr_to_soname): New functions.
14353 (try_thread_db_load, thread_db_load_search): New functions.
14354 (thread_db_init): Search for libthread_db.
14355 (thread_db_free): New function.
14356 (thread_db_handle_monitor_command): Likewise.
14357 * config.in: Regenerate.
14358 * configure: Regenerate.
889bf7c5 14359
4168d2d6
UW
143602009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14361
14362 * spu-low.c (spu_kill): Wait for inferior to terminate.
14363 Call clear_inferiors.
14364 (spu_detach): Call clear_inferiors.
14365
81ecdfbb
RW
143662009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14367
14368 * aclocal.m4: Regenerate.
14369 * config.in: Likewise.
14370 * configure: Likewise.
14371
0b9ff2c0
UW
143722009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14373
14374 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14375 (parse_spufs_run): New function.
14376 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14377 (ppc_breakpoint_at): Handle SPU breakpoints.
14378
efcbbd14
UW
143792009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14380
14381 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14382 (SPUFS_MAGIC): Define.
14383 (spu_enumerate_spu_ids): New function.
14384 (linux_qxfer_spu): New function.
14385 (linux_target_ops): Install linux_qxfer_spu.
14386
f4d9bade
UW
143872009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14388
14389 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14390 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14391 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14392 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14393 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14394 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14395 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14396 (init_registers_powerpc_cell32l): Add prototype.
14397 (init_registers_powerpc_cell64l): Likewise.
14398 (ppc_arch_setup): Detect Cell/B.E. architecture.
14399
96e946ca
RW
144002009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14401
14402 * Makefile.in (datarootdir): New variable.
14403
58d6951d
DJ
144042009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14405
14406 * linux-low.c (linux_write_memory): Update debugging output.
14407 * Makefile.in (clean): Add new descriptions.
14408 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14409 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14410 * configure.srv: Add new files for arm*-*-linux*.
14411 * linux-arm-low.c: Add new declarations.
14412 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14413 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14414 (HWCAP_VFPv3D16): New.
14415 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14416 instead of __IWMMXT__.
14417 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14418 (arm_arch_setup): New.
14419 (target_regsets): Remove #ifdef. Add VFP regset.
14420 (the_low_target): Use arm_arch_setup.
14421
12b42a12
DJ
144222009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14423
14424 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14425 the main thread again.
14426
ac8c974e
AR
144272009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14428
14429 Adding Neutrino gdbserver.
14430 * configure: Regenerated.
14431 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14432 * configure.srv (i[34567]86-*-nto*): New target.
14433 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14434 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14435 (nto_comctrl) [__QNX__]: New function.
14436 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14437
4424e0c3 144382009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14439
14440 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14441 srv_tgtobj.
14442
912cf4ba
PA
144432009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14444 Pedro Alves <pedro@codesourcery.com>
14445
14446 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14447 don't support CONTEXT_EXTENDED_REGISTERS.
14448 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14449 (the_low_target): Install them.
14450 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14451 failing with ERROR_PIPE_NOT_CONNECTED.
14452
aa5ca48f
DE
144532009-06-30 Doug Evans <dje@google.com>
14454 Pierre Muller <muller@ics.u-strasbg.fr>
14455
14456 Add h/w watchpoint support to x86-linux, win32-i386.
14457 * Makefile.in (SFILES): Add i386-low.c
14458 (i386_low_h): Define.
14459 (i386-low.o): Add dependencies.
14460 (linux-x86-low.o): Add i386-low.h dependency.
14461 (win32-i386-low.o): Ditto.
14462 * i386-low.c: New file.
14463 * i386-low.h: New file.
14464 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14465 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14466 * linux-low.c (linux_add_process): Initialize arch_private.
14467 (linux_remove_process): Free arch_private.
14468 (add_lwp): Initialize arch_private.
14469 (delete_lwp): Free arch_private.
14470 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14471 provided.
14472 * linux-low.h (process_info_private): New member arch_private.
14473 (lwp_info): New member arch_private.
14474 (linux_target_ops): New members new_process, new_thread,
14475 prepare_to_resume.
14476 (ptid_of): New macro.
14477 * linux-x86-low.c: Include stddef.h, i386-low.h.
14478 (arch_process_info): New struct.
14479 (arch_lwp_info): New struct.
14480 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14481 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14482 (i386_dr_low_get_status): New function.
14483 (x86_insert_point, x86_remove_point): New functions.
14484 (x86_stopped_by_watchpoint): New function.
14485 (x86_stopped_data_address): New function.
14486 (x86_linux_new_process, x86_linux_new_thread): New functions.
14487 (x86_linux_prepare_to_resume): New function.
14488 (the_low_target): Add entries for insert_point, remove_point,
14489 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14490 prepare_to_resume.
14491 * server.c (debug_hw_points): New global.
14492 (monitor_show_help): Document set debug-hw-points.
14493 (handle_query): Process "set debug-hw-points".
14494 * server.h (debug_hw_points): Declare.
14495 (paddress): Declare.
14496 * utils.c (NUMCELLS, CELLSIZE): New macros.
14497 (get_sell, xsnprintf, paddress): New functions.
14498 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14499 remove_point, stopped_by_watchpoint, stopped_data_address.
14500 * win32-i386-low.c: Include i386-low.h.
14501 (debug_reg_state): Replaces dr.
14502 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14503 (i386_dr_low_get_status): New function.
14504 (i386_insert_point, i386_remove_point): New functions.
14505 (i386_stopped_by_watchpoint): New function.
14506 (i386_stopped_data_address): New function.
14507 (i386_initial_stuff): Update.
14508 (get_thread_context,set_thread_context,i386_thread_added): Update.
14509 (the_low_target): Add entries for insert_point,
14510 remove_point, stopped_by_watchpoint, stopped_data_address.
14511 * win32-low.c (win32_insert_watchpoint): New function.
14512 (win32_remove_watchpoint): New function.
14513 (win32_stopped_by_watchpoint): New function.
14514 (win32_stopped_data_address): New function.
14515 (win32_target_ops): Add entries for insert_watchpoint,
14516 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14517 * win32-low.h (win32_target_ops): New members insert_point,
14518 remove_point, stopped_by_watchpoint, stopped_data_address.
14519
d993e290
PA
145202009-06-25 Pedro Alves <pedro@codesourcery.com>
14521
14522 * server.c (process_serial_event): Re-return unsupported, not
14523 error, if the type isn't recognized. Re-allow supporting only
14524 insert or remove packets. Also call require_running for
14525 breakpoints. Add missing break statement to default case. Tidy.
14526 * target.h (struct target_ops): Rename insert_watchpoint to
14527 insert_point, and remove_watchpoint to remove_point.
14528
14529 * linux-low.h (struct linux_target_ops): Likewise.
14530 * linux-low.c (linux_insert_watchpoint): Rename to ...
14531 (linux_insert_point): ... this. Adjust.
14532 (linux_remove_watchpoint): Rename to ...
14533 (linux_remove_point): ... this. Adjust.
14534 (linux_target_ops): Adjust.
14535 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14536 (cris_insert_point): ... this.
14537 (cris_remove_watchpoint): Rename to ...
14538 (cris_remove_point): ... this.
14539 (the_low_target): Adjust.
14540
0f54c268
PM
145412009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14542
14543 * server.c (handle_v_kill): Pass signal_pid to
14544 kill_inferior if multi_process is zero.
14545
c6314022
AR
145462009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14547
14548 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14549 * target.h (target_ops): Comment for *_watchpoint to make it clear
14550 the functions can get types '0' and '1'.
14551
4463ce24
AR
145522009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14553
14554 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14555 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14556 * regcache.c (get_regcache): Likewise.
14557 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14558 * win32-low.c (child_fetch_inferior_registers): Remove check for
14559 regno 0.
14560
cf8fd78b
PA
145612009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14562 Pedro Alves <pedro@codesourcery.com>
14563
14564 * target.h (struct target_ops) <supports_multi_process>: New
14565 callback.
14566 (target_supports_multi_process): New.
14567 * server.c (handle_query): Even if GDB reports support, only
14568 enable multi-process if the target also supports it. Report
14569 multi-process support only if the target backend supports it.
14570 * linux-low.c (linux_supports_multi_process): New function.
14571 (linux_target_ops): Install it as target_supports_multi_process
14572 callback.
14573
47c0c975
DE
145742009-05-24 Doug Evans <dje@google.com>
14575
e09875d4
DE
14576 Global renaming of find_thread_pid to find_thread_ptid.
14577 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14578 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14579 All callers updated.
14580
e27d73f6
DE
14581 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14582 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14583 directly.
14584
47c0c975
DE
14585 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14586 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14587 (linux_resume_one_lwp): Ditto.
14588
2acc282a
DE
145892009-05-23 Doug Evans <dje@google.com>
14590
14591 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14592 from struct inferior_list_entry * to struct lwp_info *.
14593 All callers updated.
14594
9f1036c1
DE
145952009-05-13 Doug Evans <dje@google.com>
14596
14597 * linux-x86-low.c: Don't include assert.h.
14598 (x86_siginfo_fixup): Use fatal, not assert.
14599 (x86_arch_setup): Fix comment.
14600
d0722149
DE
146012009-05-12 Doug Evans <dje@google.com>
14602
14603 Biarch support for i386/amd64 gdbserver.
14604 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14605 Add linux-x86-low.c.
14606 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14607 (linux-x86-low.o): Add.
14608 * linux-x86-64-low.c: Delete.
14609 * linux-i386-low.c: Delete.
14610 * linux-x86-low.c: New file.
14611 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14612 linux-x86-low.o.
14613 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14614 linux-x86-low.o.
14615 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14616 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14617 (linux_child_pid_to_exec_file): New function.
14618 (elf_64_header_p, elf_64_file_p): New functions.
14619 (siginfo_fixup): New function.
14620 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14621 give target a chance to convert layout.
14622 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14623 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14624
fdeb2a12
DE
146252009-05-07 Doug Evans <dje@google.com>
14626
14627 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14628 (regsets_store_inferior_registers): Ditto.
14629
a6dbe5df
PA
146302009-05-06 Pedro Alves <pedro@codesourcery.com>
14631
14632 PR server/10048
14633
14634 * linux-low.c (must_set_ptrace_flags): Delete.
14635 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14636 of the global.
14637 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14638 `lwp->must_set_ptrace_flags' instead.
ba42693b 14639 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14640 (linux_wait_1): ... not here.
14641
5091eb23
DE
146422009-04-30 Doug Evans <dje@google.com>
14643
9f767825
DE
14644 * inferiors.c (started_inferior_callback): New function.
14645 (attached_inferior_callback): New function.
14646 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14647 * server.c (print_started_pid, print_attached_pid): New functions.
14648 (detach_or_kill_for_exit): New function.
14649 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14650 * server.h (have_started_inferiors_p): Declare.
14651 (have_attached_inferiors_p): Declare.
14652
5091eb23
DE
14653 * inferiors.c (remove_process): Fix memory leak, free process.
14654 * linux-low.c (linux_remove_process): New function.
14655 (linux_kill): Call it instead of remove_process.
14656 (linux_detach, linux_wait_1): Ditto.
14657
155c8968
PA
146582009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14659
14660 * configure.srv: Add x86 Windows CE target.
14661
7fe519cb
UW
146622009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14663
14664 * inferiors.c (get_thread_process): Make global.
14665 * server.h (get_thread_process): Add prototype.
14666 * thread-db.c (find_one_thread): Use get_thread_process
14667 instead of current_process.
14668 (thread_db_get_tls_address): Do not crash if called when
14669 thread layer is not yet initialized.
14670
5472f405
UW
146712009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14672
14673 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14674 * spu-low.c (current_tid): Rename to ...
14675 (current_ptid): ... this.
14676 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14677 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14678 ptid_get_lwp (current_ptid) instead of current_tid.
14679 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14680 instead of current_tid. Use find_process_pid to verify pid
14681 argument is valid. Pass proper argument to remove_process.
14682 (spu_thread_alive): Compare current_ptid instead of current_tid.
14683 (spu_resume): Likewise.
14684
55ac2b99
PA
146852009-04-02 Pedro Alves <pedro@codesourcery.com>
14686
14687 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14688 variable.
14689
95954743
PA
146902009-04-01 Pedro Alves <pedro@codesourcery.com>
14691
14692 Implement the multiprocess extensions, and add linux multiprocess
14693 support.
14694
14695 * server.h (ULONGEST): Declare.
14696 (struct ptid, ptid_t): New.
14697 (minus_one_ptid, null_ptid): Declare.
14698 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14699 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14700 (struct inferior_list_entry): Change `id' type from unsigned from
14701 to ptid_t.
14702 (struct sym_cache, struct breakpoint, struct
14703 process_info_private): Forward declare.
14704 (struct process_info): Declare.
14705 (current_process): Declare.
14706 (all_processes): Declare.
14707 (initialize_inferiors): Declare.
14708 (add_thread): Adjust to use ptid_t.
14709 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14710 (add_process, remove_process, find_thread_pid): Declare.
14711 (find_inferior_id): Adjust to use ptid_t.
14712 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14713 (multi_process): Declare.
14714 (push_event): Adjust to use ptid_t.
14715 (read_ptid, write_ptid): Declare.
14716 (prepare_resume_reply): Adjust to use ptid_t.
14717 (clear_symbol_cache): Declare.
14718 * inferiors.c (all_processes): New.
14719 (null_ptid, minus_one_ptid): New.
14720 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14721 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14722 (add_thread): Change unsigned long to ptid. Remove gdb_id
14723 parameter. Adjust.
14724 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14725 (gdb_id_to_thread): Rename to ...
14726 (find_thread_pid): ... this. Change unsigned long to ptid.
14727 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14728 (loaded_dll, pull_pid_from_list): Adjust.
14729 (add_process, remove_process, find_process_pid)
14730 (get_thread_process, current_process, initialize_inferiors): New.
14731 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14732 (struct target_waitstatus) <related_pid>: Ditto.
14733 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14734 return type to int.
14735 (struct target_ops) <join>: Add `pid' argument.
14736 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14737 (struct target_ops) <wait>: Add `ptid' field. Change return type
14738 to ptid.
14739 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14740 (mywait): Add `ptid' argument. Change return type to ptid_t.
14741 (target_pid_to_str): Declare.
14742 * target.c (set_desired_inferior): Adjust to use ptids.
14743 (mywait): Add new `ptid' argument. Adjust.
14744 (target_pid_to_str): New.
14745 * mem-break.h (free_all_breakpoints): Declare.
14746 * mem-break.c (breakpoints): Delelete.
14747 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14748 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14749 to use per-process breakpoint list.
14750 (free_all_breakpoints): New.
14751 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14752 (symbol_cache, all_symbols_looked_up): Delete.
14753 (hexchars): New.
14754 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14755 read_ptid): New.
14756 (prepare_resume_reply): Change ptid argument's type from unsigned
14757 long to ptid_t. Adjust. Implement W;process and X;process.
14758 (free_sym_cache, clear_symbol_cache): New.
14759 (look_up_one_symbol): Adjust to per-process symbol cache. *
14760 * server.c (cont_thread, general_thread, step_thread): Change type
14761 to ptid_t.
14762 (attached): Delete.
14763 (multi_process): New.
14764 (last_ptid): Change type to ptid_t.
14765 (struct vstop_notif) <ptid>: Change type to ptid_t.
14766 (queue_stop_reply, push_event): Change `ptid' argument's type to
14767 ptid_t.
14768 (discard_queued_stop_replies): Add `pid' argument.
14769 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14770 changes. Don't reference the `attached' global.
14771 (attach_inferior): Adjust to mywait interface changes.
14772 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14773 features. Handle and report "multiprocess+". Handle
14774 "qAttached:PID".
14775 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14776 changes.
14777 (handle_v_kill): New.
14778 (handle_v_stopped): Adjust to use target_pid_to_str.
14779 (handle_v_requests): Allow multiple attaches and runs when
14780 multiprocess extensions are in effect. Handle "vKill".
14781 (myresume): Adjust to use ptids.
14782 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14783 (handle_status): Adjust to discard_queued_stop_replies interface
14784 change.
14785 (first_thread_of, kill_inferior_callback)
14786 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14787 (main): Call initialize_inferiors. Adjust to use ptids, killing
14788 and detaching from all inferiors. Handle multiprocess packet
14789 variants.
14790 * linux-low.h: Include gdb_proc_service.h.
14791 (struct process_info_private): New.
14792 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14793 <lwpid_of>: Use ptid_get_lwp.
14794 (get_lwp_thread): Adjust.
14795 (struct lwp_info): Add `dead' member.
14796 (find_lwp_pid): Declare.
14797 * linux-low.c (thread_db_active): Delete.
14798 (new_inferior): Adjust comment.
14799 (inferior_pid): Delete.
14800 (linux_add_process): New.
14801 (handle_extended_wait): Adjust.
14802 (add_lwp): Change unsigned long to ptid.
14803 (linux_create_inferior): Add process to processes table. Adjust
14804 to use ptids. Don't set new_inferior here.
14805 (linux_attach_lwp): Rename to ...
14806 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14807 it. Adjust to use ptids.
14808 (linux_attach_lwp): New.
14809 (linux_attach): Add process to processes table. Don't set
14810 new_inferior here.
14811 (struct counter): New.
14812 (second_thread_of_pid_p, last_thread_of_process_p): New.
14813 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14814 multiple processes.
14815 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14816 processes. Remove process from process table.
14817 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14818 to multiple processes.
14819 (any_thread_of): New.
14820 (linux_detach): Add `pid' argument, and handle it. Remove process
14821 from processes table.
14822 (linux_join): Add `pid' argument. Handle it.
14823 (linux_thread_alive): Change unsighed long argument to ptid_t.
14824 Consider dead lwps as not being alive.
14825 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14826 threads we're not interested in.
14827 (same_lwp, find_lwp_pid): New.
14828 (linux_wait_for_lwp): Change `pid' argument's type from int to
14829 ptid_t. Adjust.
14830 (linux_wait_for_event): Rename to ...
14831 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14832 from int to ptid_t. Adjust.
14833 (linux_wait_for_event): New.
14834 (linux_wait_1): Add `ptid' argument. Change return type to
14835 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14836 that exit from the process table.
14837 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14838 Adjust.
14839 (mark_lwp_dead): New.
14840 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14841 stopping all threads, mark its main lwp as dead.
14842 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14843 ptids.
14844 (fetch_register, usr_store_inferior_registers)
14845 (regsets_fetch_inferior_registers)
14846 (regsets_store_inferior_registers, linux_read_memory)
14847 (linux_write_memory): Inline `inferior_pid'.
14848 (linux_look_up_symbols): Adjust to use per-process
14849 `thread_db_active'.
14850 (linux_request_interrupt): Adjust to use ptids.
14851 (linux_read_auxv): Inline `inferior_pid'.
14852 (initialize_low): Don't reference thread_db_active.
14853 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14854 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14855 (ps_getpid): Return the pid of the current inferior.
14856 * thread-db.c (proc_handle, thread_agent): Delete.
14857 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14858 per-process data.
14859 (find_one_thread): Change argument type to ptid_t. Adjust to
14860 per-process data.
14861 (maybe_attach_thread): Adjust to per-process data and ptids.
14862 (thread_db_find_new_threads): Ditto.
14863 (thread_db_init): Ditto.
14864 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14865 processes table. Adjust to use ptids.
14866 (spu_kill, spu_detach): Adjust interface. Remove process from
14867 processes table.
14868 (spu_join, spu_thread_alive): Adjust interface.
14869 (spu_wait): Adjust interface. Remove process from processes
14870 table. Adjust to use ptids.
14871 * win32-low.c (current_inferior_tid): Delete.
14872 (current_inferior_ptid): New.
14873 (debug_event_ptid): New.
14874 (thread_rec): Take a ptid. Adjust.
14875 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14876 (child_delete_thread): Ditto.
14877 (do_initial_child_stuff): Add `attached' argument. Add process to
14878 processes table.
14879 (child_fetch_inferior_registers, child_store_inferior_registers):
14880 Adjust.
14881 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14882 (win32_attach): Pass 1 to do_initial_child_stuff.
14883 (win32_kill): Adjust interface. Remove process from processes
14884 table.
14885 (win32_detach): Ditto.
14886 (win32_join): Adjust interface.
14887 (win32_thread_alive): Take a ptid.
14888 (win32_resume): Adjust to use ptids.
14889 (get_child_debug_event): Ditto.
14890 (win32_wait): Adjust interface. Remove exiting process from
14891 processes table.
14892
bd99dc85
PA
148932009-04-01 Pedro Alves <pedro@codesourcery.com>
14894
14895 Non-stop mode support.
14896
14897 * server.h (non_stop): Declare.
14898 (gdb_client_data, handler_func): Declare.
14899 (delete_file_handler, add_file_handler, start_event_loop):
14900 Declare.
14901 (handle_serial_event, handle_target_event, push_event)
14902 (putpkt_notif): Declare.
14903 * target.h (enum resume_kind): New.
14904 (struct thread_resume): Replace `step' field by `kind' field.
14905 (TARGET_WNOHANG): Define.
14906 (struct target_ops) <wait>: Add `options' argument.
14907 <supports_non_stop, async, start_non_stop>: New fields.
14908 (target_supports_non_stop, target_async): New.
14909 (start_non_stop): Declare.
14910 (mywait): Add `options' argument.
14911 * target.c (mywait): Add `options' argument. Print child exit
14912 notifications here.
14913 (start_non_stop): New.
14914 * server.c (non_stop, own_buf, mem_buf): New globals.
14915 (struct vstop_notif): New.
14916 (notif_queue): New global.
14917 (queue_stop_reply, push_event, discard_queued_stop_replies)
14918 (send_next_stop_reply): New.
14919 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14920 interface changes.
14921 (attach_inferior): In non-stop mode, don't wait for the target
14922 here.
14923 (handle_general_set): Handle QNonStop.
14924 (handle_query): When handling qC, return the current general
14925 thread, instead of the first thread of the list.
14926 (handle_query): If the backend supports non-stop mode, include
14927 QNonStop+ in the qSupported query response.
14928 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14929 and non-stop mode.
14930 (handle_v_attach, handle_v_run): Handle non-stop mode.
14931 (handle_v_stopped): New.
14932 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14933 (myresume): Adjust to use resume_kind. Handle non-stop.
14934 (queue_stop_reply_callback): New.
14935 (handle_status): Handle non-stop mode.
14936 (main): Clear non_stop flag on reconnection. Use the event-loop.
14937 Refactor serial protocol handling from here ...
14938 (process_serial_event): ... to this new function. When GDB
14939 selects any thread, select one here. In non-stop mode, wait until
14940 GDB acks all pending events before exiting.
14941 (handle_serial_event, handle_target_event): New.
14942 * remote-utils.c (remote_open): Install remote_desc in the event
14943 loop.
14944 (remote_close): Remove remote_desc from the event loop.
14945 (putpkt_binary): Rename to...
14946 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14947 (putpkt_binary): New as wrapper around putpkt_binary_1.
14948 (putpkt_notif): New.
14949 (prepare_resume_reply): In non-stop mode, don't change the
14950 general_thread.
14951 * event-loop.c: New.
14952 * Makefile.in (OBJ): Add event-loop.o.
14953 (event-loop.o): New rule.
14954
14955 * linux-low.h (pid_of): Moved here.
14956 (lwpid_of): New.
14957 (get_lwp_thread): Use lwpid_of.
14958 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14959 * linux-low.c (pid_of): Delete.
14960 (inferior_pid): Use lwpid_of.
14961 (linux_event_pipe): New.
14962 (target_is_async_p): New.
14963 (delete_lwp): New.
14964 (handle_extended_wait): Use lwpid_of.
14965 (add_lwp): Don't set lwpid field.
14966 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14967 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14968 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14969 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14970 first. Adjust to linux_wait_for_event interface changes. Use
14971 lwpid_of.
14972 (linux_detach): Don't delete the main lwp here.
14973 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14974 (status_pending_p): Don't consider explicitly suspended lwps.
14975 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14976 pointer. Add OPTIONS argument. Change return type to int. Use
14977 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14978 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14979 pointer. Add status pointer argument. Return a pid instead of a
14980 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14981 changes. In non-stop mode, don't switch to a random thread.
14982 (linux_wait): Rename to...
14983 (linux_wait_1): ... this. Add target_options argument, and handle
14984 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14985 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14986 clean exit and signal exit code. Don't stop all threads in
14987 non-stop mode. In all-stop mode, only stop all threads when
14988 reporting a stop to GDB. Handle explicit thread stop requests.
14989 (async_file_flush, async_file_mark): New.
14990 (linux_wait): New.
14991 (send_sigstop): Use lwpid_of.
14992 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14993 interface changes. In non-stop mode, don't switch to a random
14994 thread.
14995 (linux_resume_one_lwp): Use lwpid_of.
14996 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14997 (linux_resume_one_thread): ... this. Handle resume_stop. In
14998 non-stop mode, don't look for pending flag in all threads.
14999 (resume_status_pending_p): Don't consider explicitly suspended
15000 threads.
15001 (my_waitpid): Reimplement. Emulate __WALL.
15002 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15003 Use lwpid_of.
15004 (sigchld_handler, linux_supports_non_stop, linux_async)
15005 (linux_start_non_stop): New.
15006 (linux_target_ops): Register linux_supports_non_stop, linux_async
15007 and linux_start_non_stop.
15008 (initialize_low): Install SIGCHLD handler.
15009 * thread-db.c (thread_db_create_event, find_one_thread)
15010 (thread_db_get_tls_address): Use lwpid_of.
15011 * win32-low.c (win32_detach): Adjust to use resume_kind.
15012 (win32_wait): Add `options' argument.
15013 * spu-low.c (spu_resume): Adjust to use resume_kind.
15014 (spu_wait): Add `options' argument.
15015
5b1c542e
PA
150162009-04-01 Pedro Alves <pedro@codesourcery.com>
15017
15018 Decouple target code from remote protocol.
15019
15020 * target.h (enum target_waitkind): New.
15021 (struct target_waitstatus): New.
15022 (struct target_ops) <wait>: Return an unsigned long. Take a
15023 target_waitstatus pointer instead of a char pointer.
15024 (mywait): Likewise.
15025 * target.c (mywait): Change prototype to return an unsigned long.
15026 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15027 * server.h (thread_from_wait, old_thread_from_wait): Delete
15028 declarations.
15029 (prepare_resume_reply): Change prototype to take a
15030 target_waitstatus.
15031 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15032 (last_status, last_ptid): New.
15033 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15034 pid instead of a signal.
15035 (attach_inferior): Remove "status" and "signal" parameters.
15036 Adjust.
15037 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15038 not as an address.
15039 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15040 (handle_v_requests, myresume): Remove "status" and "signal"
15041 parameters. Adjust.
15042 (handle_status): New.
15043 (main): Delete local `status'. Adjust.
15044 * remote-utils.c: Include target.h.
15045 (prepare_resume_reply): Change prototype to take a
15046 target_waitstatus. Adjust.
15047
15048 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15049 interface.
15050 * spu-low.c (spu_wait): Adjust.
15051 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15052 Delete.
15053 (win32_wait): Adjust.
15054
2bd7c093
PA
150552009-04-01 Pedro Alves <pedro@codesourcery.com>
15056
15057 * target.h (struct thread_resume): Delete leave_stopped member.
15058 (struct target_ops): Add a `n' argument to the `resume' callback.
15059 * server.c (start_inferior): Adjust.
15060 (handle_v_cont, myresume): Adjust.
15061 * linux-low.c (check_removed_breakpoint): Adjust to resume
15062 interface change, and to removed leave_stopped field.
15063 (resume_ptr): Delete.
15064 (struct thread_resume_array): New.
15065 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15066 resume interface change.
15067 (linux_continue_one_thread, linux_queue_one_thread)
15068 (resume_status_pending_p): Check if the resume field is NULL
15069 instead of checking the leave_stopped member.
15070 (linux_resume): Adjust to the target resume interface change.
15071 * spu-low.c (spu_resume): Adjust to the target resume interface
15072 change.
15073 * win32-low.c (win32_detach, win32_resume): Ditto.
15074
c35fafde
PA
150752009-04-01 Pedro Alves <pedro@codesourcery.com>
15076
15077 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15078 flag.
15079 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15080 pending.
15081 (linux_continue_one_thread): Only preserve the stepping flag if
15082 there's a pending breakpoint.
15083
0a59d50b
PA
150842009-03-31 Pedro Alves <pedro@codesourcery.com>
15085
15086 * server.c (main): After the inferior having exited, call
15087 remote_close before exiting gdbserver.
15088
f04c6d38
TJB
150892009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15090
15091 Fix size of FPSCR in Power 7 processors.
15092 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15093 (PPC_FEATURE_HAS_DFP): New #define.
15094 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15095 size of the FPSCR.
15096
78e5cee6
PA
150972009-03-23 Pedro Alves <pedro@codesourcery.com>
15098
15099 * server.c (handle_query) Whitespace and formatting.
15100
1b3f6016
PA
151012009-03-22 Pedro Alves <pedro@codesourcery.com>
15102
15103 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15104 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15105 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15106 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15107 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15108 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15109 Makefile.in, configure.ac: Fix whitespace throughout.
15110 * configure: Regenerate.
15111
a07b2135
PA
151122009-03-22 Pedro Alves <pedro@codesourcery.com>
15113
15114 * inferiors.c (find_inferior): Make it safe for the callback
15115 function to delete the currently iterated inferior.
15116
67cc2626
PA
151172009-03-22 Pedro Alves <pedro@codesourcery.com>
15118
15119 * Makefile.in (linuw_low_h): Move higher.
15120 (thread-db.o): Depend on $(linux_low_h).
15121
54a0b537
PA
151222009-03-17 Pedro Alves <pedro@codesourcery.com>
15123
15124 Rename "process" to "lwp" throughout.
15125
15126 * linux-low.c (all_processes): Rename to...
15127 (all_lwps): ... this.
15128 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15129 (add_process): Rename to ...
15130 (add_lwp): ... this. Adjust.
15131 (linux_create_inferior): Adjust.
15132 (linux_attach_lwp): Adjust.
15133 (linux_attach): Adjust.
15134 (linux_kill_one_process): Rename to ...
15135 (linux_kill_one_lwp): ... this. Adjust.
15136 (linux_kill): Adjust.
15137 (linux_detach_one_process): Rename to ...
15138 (linux_detach_one_lwp): ... this. Adjust.
15139 (linux_detach): Adjust.
15140 (check_removed_breakpoint): Adjust.
15141 (status_pending_p): Adjust.
15142 (linux_wait_for_process): Rename to ...
15143 (linux_wait_for_lwp): ... this. Adjust.
15144 (linux_wait_for_event): Adjust.
15145 (send_sigstop): Adjust.
15146 (wait_for_sigstop): Adjust.
15147 (stop_all_processes): Rename to ...
15148 (stop_all_lwps): ... this.
15149 (linux_resume_one_process): Rename to ...
15150 (linux_resume_one_lwp): ... this. Adjust.
15151 (linux_set_resume_request, linux_continue_one_thread)
15152 (linux_queue_one_thread, resume_status_pending_p)
15153 (usr_store_inferior_registers, regsets_store_inferior_registers)
15154 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15155 Adjust.
15156 * linux-low.h (get_process): Rename to ...
15157 (get_lwp): ... this. Adjust.
15158 (get_thread_process): Rename to ...
15159 (get_thread_lwp): ... this. Adjust.
15160 (get_process_thread): Rename to ...
15161 (get_lwp_thread): ... this. Adjust.
15162 (struct process_info): Rename to ...
15163 (struct lwp_info): ... this.
15164 (all_processes): Rename to ...
15165 (all_lwps): ... this.
15166 * proc-service.c (ps_lgetregs): Adjust.
15167 * thread-db.c (thread_db_create_event, find_one_thread)
15168 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15169
0b16c5cf
PA
151702009-03-14 Pedro Alves <pedro@codesourcery.com>
15171
15172 * server.c (handle_query): Handle "qAttached".
15173
32de4b9d
NS
151742009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15175
15176 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15177 GPLv3, update license URL.
15178
2aecd87f
DE
151792009-03-01 Doug Evans <dje@google.com>
15180
93efd302 15181 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15182 (server_h): Add gdb_signals.h.
15183 (signals.o): Update.
15184 * server.h (target_signal_from_host,target_signal_to_host_p)
15185 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15186
86b1f9c5
PM
151872009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15188
15189 * remote-utils.c (getpkt): Also generate remote-debug
15190 information if noack_mode is set.
15191
4aa995e1
PA
151922009-02-06 Pedro Alves <pedro@codesourcery.com>
15193
15194 * server.c (handle_query): Report qXfer:siginfo:read and
15195 qXfer:siginfo:write as supported and handle them.
15196 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15197 * linux-low.c (linux_xfer_siginfo): New.
15198 (linux_target_ops): Set it.
15199
62709adf
PA
152002009-01-26 Pedro Alves <pedro@codesourcery.com>
15201
15202 * server.c (gdbserver_usage): Mention --remote-debug.
15203 (main): Accept '--remote-debug' switch.
15204
aef93bd7
DE
152052009-01-18 Doug Evans <dje@google.com>
15206
15207 * regcache.c (new_register_cache): No need to check result of xcalloc.
15208 * server.c (handle_search_memory): Back out calls to xmalloc,
15209 result is checked and error is returned to user upon failure.
15210 (handle_query): Ditto. Add more checks for result of malloc.
15211 (handle_v_cont): Check result of malloc, report error back to
15212 user upon failure.
15213 (handle_v_run): Ditto. Call freeargv.
15214 * server.h (freeargv): Declare.
15215 * utils.c (freeargv): New fn.
15216
54363045
DE
152172009-01-15 Doug Evans <dje@google.com>
15218
f626972c
DE
15219 * gdbreplay.c (perror_with_name): Make arg const char *.
15220 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15221 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15222 * utils.c (perror_with_name): Make arg const char *.
54363045 15223
18aae699
PA
152242009-01-14 Pedro Alves <pedro@codesourcery.com>
15225
15226 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15227 when handling a EXIT_PROCESS_DEBUG_EVENT.
15228
ff703abe
JB
152292009-01-06 Joel Brobecker <brobecker@adacore.com>
15230
15231 * gdbreplay.c (gdbreplay_version): Update copyright year.
15232 * server.c (gdbserver_version): Likewise.
15233
f21cc1a2 152342009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15235
15236 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15237 (handle_extended_wait): Improve comment.
0e21c1ec 15238
bca929d3
DE
152392008-12-13 Doug Evans <dje@google.com>
15240
15241 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15242 * server.h (ATTR_MALLOC): New macro.
15243 (xmalloc,xcalloc,xstrdup): Declare.
15244 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15245 * inferiors.c: Ditto.
15246 * linux-low.c: Ditto.
15247 * mem-break.c: Ditto.
15248 * regcache.c: Ditto.
15249 * remote-utils.c: Ditto.
15250 * server.c: Ditto.
15251 * target.c: Ditto.
15252 * win32-low.c: Ditto.
15253
97438e3f
DE
152542008-12-12 Doug Evans <dje@google.com>
15255
896c7fbb
DE
15256 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15257 in debugging printf.
15258
97438e3f
DE
15259 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15260
e3b886f8
DE
152612008-12-09 Doug Evans <dje@google.com>
15262
15263 * linux-low.h (struct process_info): Delete member tid, unused.
15264 * thread-db.c (find_one_thread): Update.
15265 (maybe_attach_thread): Update.
15266
07e059b5
VP
152672008-12-02 Pedro Alves <pedro@codesourcery.com>
15268
889bf7c5
PA
15269 * target.h (struct target_ops): Add qxfer_osdata member.
15270 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15271 and dirent.h.
15272 (linux_qxfer_osdata): New functions.
15273 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15274 callback.
15275 * server.c (handle_query): Handle "qXfer:osdata:read:".
15276 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15277 (buffer_xml_printf): New functions.
15278 * server.h (struct buffer): New.
15279 (buffer_grow_str, buffer_grow_str0): New macros.
15280 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15281 (buffer_xml_printf): Declare.
07e059b5 15282
4cab47ab
DE
152832008-11-24 Doug Evans <dje@google.com>
15284
15285 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15286
f142445f
DJ
152872008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15288
15289 * server.c (handle_v_run): Always use the supplied argument list.
15290
d0107bb6 152912008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15292
d0107bb6
BW
15293 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15294 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15295
2c4ad781
TJB
152962008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15297
15298 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15299 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15300 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15301 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15302 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15303 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15304 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15305 XML target descriptions.
15306 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15307 when inferior is running on an ISA 2.05 or later processor. Add
15308 special case to return offset for full 64-bit slot of FPSCR when
15309 in 32-bits.
15310
dfb64f85
DJ
153112008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15312
15313 * Makefile.in (SFILES, clean): Added sparc64 files.
15314 (reg-sparc64.o, reg-sparc64.c): New.
15315 * configure.srv (sparc*-*-linux*): New configuration.
15316 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15317 syscall arguments for SPARC.
15318 (regsets_store_inferior_registers): Likewise.
15319 * linux-sparc-low.c: New file.
15320
66b6e1dd
DE
153212008-10-21 Doug Evans <dje@google.com>
15322
15323 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15324 (READLINE_DIR,READLINE_DEP): Delete.
15325 (INTERNAL_CFLAGS): Update.
15326 (LINTFLAGS): Update.
15327
9b710a42
PA
153282008-10-10 Pedro Alves <pedro@codesourcery.com>
15329
15330 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15331 whole argv from the last run, not just argv[0].
15332
5822d809
PA
153332008-09-08 Pedro Alves <pedro@codesourcery.com>
15334
15335 * regcache.c (new_register_cache): Return NULL if the register
15336 cache size isn't known yet.
15337 (free_register_cache): Avoid dereferencing a NULL regcache.
15338
74aac56f
DJ
153392008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15340
15341 * configure.srv: Merge MIPS and MIPS64.
15342
400b20f5
MR
153432008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15344
15345 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15346
677c5bb1
LM
153472008-08-18 Luis Machado <luisgpm@br.ibm.com>
15348
15349 * Makefile.in: Add required vsx dependencies.
15350
15351 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15352 Declare init_registers_powerpc_vsx32l.
15353 Declare init_registers_powerpc_vsx64l.
15354 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15355 (ppc_arch_setup): Check for VSX in hwcap.
15356 (ppc_fill_vsxregset): New function.
15357 (ppc_store_vsxregset): New function.
15358 Add new VSX entry in regset_info target_regsets.
15359
15360 * configure.srv: Add new VSX dependencies.
15361
a6f3e723
SL
153622008-08-12 Pedro Alves <pedro@codesourcery.com>
15363
15364 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15365 (remote_open): Set or clear transport_is_reliable.
15366 (putpkt_binary): Don't expect acks in noack mode.
15367 (getpkt): Don't send ack/nac in noack mode.
15368 * server.c (handle_general_set): Handle QStartNoAckMode.
15369 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15370 qSupported.
15371 (main): Reset noack_mode on every connection.
15372 * server.h (noack_mode): Declare.
15373
a417dc56
RW
153742008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15375
15376 * Makefile.in (GDBREPLAY_OBS): New variable.
15377 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15378
3221518c
UW
153792008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15380 Daniel Jacobowitz <dan@codesourcery.com>
15381
15382 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15383 (usr_store_inferior_registers): Likewise.
15384 (regsets_store_inferior_registers): Likewise.
15385
ec56be1b
PA
153862008-07-31 Rolf Jansen <rj@surtec.com>
15387 Pedro Alves <pedro@codesourcery.com>
15388
15389 * configure.ac: Check for memmem declaration.
15390 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15391 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15392 (disable_packet_qfThreadInfo): Unconditionally compile.
15393 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15394 * configure, config.in: Regenerate.
15395
2fe5e3ff
DE
153962008-07-28 Doug Kwan <dougkwan@google.com>
15397
15398 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15399 (linux_write_memory): Remove declaration of errno.
15400
836acd6d
UW
154012008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15402
15403 * linux-low.c (handle_extended_wait): Do not use "status"
15404 variable uninitialized.
15405
aeba519e
PA
154062008-07-07 Pedro Alves <pedro@codesourcery.com>
15407
15408 * server.c (handle_v_attach): Inhibit reporting dll changes.
15409
db42f210
PA
154102008-06-27 Pedro Alves <pedro@codesourcery.com>
15411
15412 * remote-utils.c (prepare_resume_reply): If requested, don't
15413 output "thread:TID" in the T stop reply.
15414
15415 * server.c (disable_packet_vCont, disable_packet_Tthread)
15416 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15417 (handle_query): If requested, disable support for qC, qfThreadInfo
15418 and qsThreadInfo.
15419 (handle_v_requests): If requested, disable support for vCont.
15420 (gdbserver_show_disableable): New.
15421 (main): Handle --disable-packet and --disable-packet=LIST.
15422
15423 * server.h (disable_packet_vCont, disable_packet_Tthread)
15424 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15425
8e4c5421
CD
154262008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15427
15428 * server.c (gdbserver_usage): Mention --version.
15429
6e23a804
DJ
154302008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15431
15432 * Makefile.in (gdbreplay.o): New rule.
15433
90aa6a40
JM
154342008-06-06 Joseph Myers <joseph@codesourcery.com>
15435
15436 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15437 message, not gdbserver.
15438
c16158bc 154392008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15440 Nathan Sidwell <nathan@codesourcery.com>
15441 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15442
15443 * acinclude.m4: Include ../../config/acx.m4.
15444 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15445 * configure, config.in: Regenerate.
15446 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15447 * server.c (gdbserver_version): Print PKGVERSION.
15448 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15449 (main): Adjust gdbserver_usage calls.
15450 * gdbreplay.c (version, host_name): Add declarations.
15451 (gdbreplay_version, gdbreplay_usage): New.
15452 (main): Accept --version and --help options.
15453
aeb75bf5
DJ
154542008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15455
15456 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15457 (arm_breakpoint_at): Handle Thumb.
15458 (the_low_target): Add comment.
15459
76b233dd
UW
154602008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15461
15462 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15463
08388c79
DE
154642008-05-09 Doug Evans <dje@google.com>
15465
a3c83fae
DE
15466 * server.h (decode_search_memory_packet): Declare.
15467 * remote-utils.c (decode_search_memory_packet): New fn.
15468 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15469 (handle_search_memory): New fn.
15470 (handle_query): Process qSearch:memory packets.
15471
bb9c3d36
UW
154722008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15473
15474 * regcache.c (registers_length): Remove.
15475 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15476 full register packet.
15477 * regcache.h (registers_length): Remove prototype.
15478 * server.h (PBUFSIZ): Define to 16384.
15479
7284e1be
UW
154802008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15481
15482 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15483 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15484 powerpc-64l.o, and powerpc-altivec64l.o.
15485 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15486 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15487 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15488 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15489 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15490 to srv_xmlfiles.
15491
15492 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15493 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15494 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15495 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15496 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15497 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15498 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15499 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15500 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15501 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15502 (clean): Update.
15503
15504 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15505 (init_registers_powerpc_32l): ... this new prototype.
15506 (init_registers_powerpc_32): Remove, replace by ...
15507 (init_registers_powerpc_altivec32l): ... this new prototype.
15508 (init_registers_powerpc_e500): Remove, replace by ...
15509 (init_registers_powerpc_e500l): ... this new prototype.
15510 (init_registers_ppc64): Remove, replace by ...
15511 (init_registers_powerpc_64l): ... this new prototype.
15512 (init_registers_powerpc_64): Remove, replace by ...
15513 (init_registers_powerpc_altivec64l): ... this new prototype.
15514 (ppc_num_regs): Set to 73.
15515 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15516 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15517 (ppc_cannot_store_register): Handle orig_r3 and trap.
15518 (ppc_arch_setup): Update init_registers_... calls.
15519 (ppc_fill_gregset): Handle orig_r3 and trap.
15520
15521 * inferiors.c (clear_inferiors): Reset current_inferior.
15522
fdc59709
PB
155232008-04-23 Paolo Bonzini <bonzini@gnu.org>
15524
889bf7c5
PA
15525 * acinclude.m4: Add override.m4.
15526 * configure: Regenerate.
fdc59709 15527
c9b2f845
UW
155282008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15529
15530 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15531 initial call to init_register_ppc64.
15532
550512b8
UW
155332008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15534
43aaf8b6
PA
15535 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15536 single powerpc*-*-linux* case.
550512b8
UW
15537 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15538
b6430ec3
UW
155392008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15540
15541 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15542 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15543 from reg_xmlfiles.
15544 * linux-ppc-low.c: Include <elf.h>.
15545 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15546 (ppc_hwcap): New global variable.
15547 (ppc_regmap): Remove __SPE__ #ifdef sections.
15548 (ppc_regmap_e500): New global variable.
15549 (ppc_cannot_store_register): Update __SPE__ special case.
15550 (ppc_get_hwcap): New function.
15551 (ppc_arch_setup): Use it to determine whether inferior supports
15552 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15553 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15554 Do not access registers if target does not support AltiVec.
15555 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15556 Do not access registers if target does not support SPE.
15557 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15558
52fa2412
UW
155592008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * linux-low.c (disabled_regsets, num_regsets): New.
15562 (use_regsets_p): Delete.
15563 (linux_wait_for_process): Clear disabled_regsets.
15564 (regsets_fetch_inferior_registers): Check and set it.
15565 (regsets_store_inferior_registers): Likewise.
15566 (linux_fetch_registers, linux_store_registers): Do not use
15567 use_regsets_p.
15568 (initialize_low): Allocate disabled_regsets.
15569
e28b3332
DJ
155702008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15571
15572 * Makefile.in (LIBOBJS): New.
15573 (OBS): Use LIBOBJS.
15574 (memmem.o): New rule.
15575 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15576 * configure: Regenerated.
15577
4536995d
UW
155782008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15579
15580 * server.c (handle_query): Never return "unsupported" for
15581 qXfer:features:read queries.
15582
221c031f
UW
155832008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15584
15585 * server.c (get_features_xml): Fix inverted condition.
15586 (handle_query): Always support qXfer:feature:read.
15587
ccd213ac
DJ
155882008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15589
15590 * server.c (wrapper_argv): New.
15591 (start_inferior): Handle wrapper_argv. If set, expect an extra
15592 trap.
15593 (gdbserver_usage): Document --wrapper.
15594 (main): Parse --wrapper.
15595
6fe305f7
UW
155962008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15597
15598 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15599 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15600 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15601 (ppc_set_pc): Likewise.
15602 (ppc_arch_setup): New function.
15603 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15604 of collect_register.
889bf7c5 15605 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15606
5b0a002e
UW
156072008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15608
15609 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15610 instead of linux-ppc64-low.o.
15611 * linux-ppc64-low.c: Remove file.
15612 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15613 (linux-ppc64-low.o): Remove rule.
15614
15615 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15616 (init_registers_powerpc_64): Likewise.
15617 (ppc_regmap): Conditionally define depending on __powerpc64__.
15618 (ppc_cannot_store_register): Do not special-case "fpscr" when
15619 compiled on __powerpc64__.
15620 (ppc_collect_ptrace_register): New function.
15621 (ppc_supply_ptrace_register): New function.
15622 (ppc_breakpoint): Change type to "unsigned int".
15623 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15624 (the_low_target): Conditionally provide initializers for the
889bf7c5 15625 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15626 collect_ptrace_register and supply_ptrace_register members.
15627
9b4b61c8
UW
156282008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15629
15630 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15631 * server.c (gdbserver_xmltarget): Define.
15632 (get_features_xml): Use it to replace "target.xml" and arch_string.
15633
15634 * configure.srv: Remove srv_xmltarget. Add XML files that were
15635 mentioned there to srv_xmlfiles instead. Remove conditional tests
15636 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15637 srv_xmlfiles and srv_regobj to include all possible choices.
15638 * configure.ac (srv_xmltarget): Remove.
15639 (srv_xmlfiles): Do not add "target.xml".
15640 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15641 checks for supplementary target information.
15642 * configure: Regenerate.
15643 * Makefile.in (XML_TARGET): Remove.
15644 (target.xml): Remove rule.
15645 (clean): Do not clean up target.xml.
15646 (.PRECIOUS): Do not mention target.xml.
15647
15648 * target.h (struct target_ops): Remove arch_string member.
15649 * linux-low.c (linux_arch_string): Remove.
15650 (linux_target_ops): Remove arch_string initializer.
15651 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15652 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15653 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15654 * spu-low.c (spu_arch_string): Remove.
15655 (spu_target_ops): Remove arch_string initializer.
15656 * win32-low.c (win32_arch_string): Remove.
15657 (win32_target_ops): Remove arch_string initializer.
15658 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15659 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15660 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15661
ee1a7ae4
UW
156622008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15663
15664 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15665 by collect_ptrace_register and supply_ptrace_register hooks.
15666 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15667 instead of checking for the_low_target.left_pad_xfer.
15668 (usr_store_inferior_registers): Use collect_ptrace_register callback
15669 instead of checking for the_low_target.left_pad_xfer.
15670
15671 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15672 (s390_supply_ptrace_register): Likewise.
15673 (s390_fill_gregset): Call s390_collect_ptrace_register.
15674 (the_low_target): Update.
15675
15676 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15677 (ppc_supply_ptrace_register): Likewise.
15678 (the_low_target): Update.
15679
15680 * linux-i386-low.c (the_low_target): Update.
15681 * linux-x86-64-low.c (the_low_target): Update.
15682
d61ddec4
UW
156832008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15684
15685 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15686 reg-s390.o and reg-s390x.o.
15687
15688 * linux-low.c (new_inferior): New global variable.
15689 (linux_create_inferior, linux_attach): Set it.
15690 (linux_wait_for_process): Call the_low_target.arch_setup after the
15691 target has stopped for the first time.
15692 (initialize_low): Do not call the_low_target.arch_setup.
15693
15694 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15695 (s390_set_pc): Likewise.
15696 (s390_arch_setup): New function.
15697 (the_low_target): Use s390_arch_setup as arch_setup routine.
15698
15699 * regcache.c (realloc_register_cache): New function.
15700 (set_register_cache): Call it for each existing regcache.
15701
d05b4ac3
UW
157022008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15703
15704 * server.h (init_registers): Remove prototype.
15705
15706 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15707 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15708 instead of init_registers ().
15709 * linux-arm-low.c (init_registers_arm): Add prototype.
15710 (init_registers_arm_with_iwmmxt): Likewise.
15711 (the_low_target): Add initializer for arch_setup field.
15712 * linux-cris-low.c (init_registers_cris): Add prototype.
15713 (the_low_target): Add initializer for arch_setup field.
15714 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15715 (the_low_target): Add initializer for arch_setup field.
15716 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15717 (the_low_target): Add initializer for arch_setup field.
15718 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15719 (the_low_target): Add initializer for arch_setup field.
15720 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15721 (the_low_target): Add initializer for arch_setup field.
15722 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15723 (the_low_target): Add initializer for arch_setup field.
15724 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15725 (init_registers_mips64_linux): Likewise.
15726 (the_low_target): Add initializer for arch_setup field.
15727 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15728 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15729 (the_low_target): Add initializer for arch_setup field.
15730 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15731 (init_registers_powerpc_64): Likewise.
15732 (the_low_target): Add initializer for arch_setup field.
15733 * linux-s390-low.c (init_registers_s390): Add prototype.
15734 (init_registers_s390x): Likewise.
15735 (the_low_target): Add initializer for arch_setup field.
15736 * linux-sh-low.c (init_registers_sh): Add prototype.
15737 (the_low_target): Add initializer for arch_setup field.
15738 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15739 (the_low_target): Add initializer for arch_setup field.
15740 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15741 (the_low_target): Add initializer for arch_setup field.
15742
15743 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15744 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15745 instead of init_registers ().
15746 * win32-arm-low.c (init_registers_arm): Add prototype.
15747 (the_low_target): Add initializer for arch_setup field.
15748 * win32-i386-low.c (init_registers_i386): Add prototype.
15749 (the_low_target): Add initializer for arch_setup field.
15750
15751 * spu-low.c (init_registers_spu): Add prototype.
15752 (initialize_low): Call initialie_registers_spu () instead of
15753 initialize_registers ().
15754
fd96d250
PA
157552008-02-19 Pedro Alves <pedro@codesourcery.com>
15756
15757 * server.c (handle_v_requests): When handling the vRun and vAttach
15758 packets, if already debugging a process, don't kill it. Return an
15759 error instead.
15760
d41b6bb4
DJ
157612008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15762
15763 * server.c (handle_query): Correct length check.
15764
5ac588cf
PA
157652008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15766
15767 * win32-low.c (do_initial_child_stuff): Add process handle
15768 parameter. Set current_process_handle and current_process_id from the
15769 parameters. Clear globals.
15770 (win32_create_inferior): Don't set current_process_handle and
15771 current_process_id here. Instead pass them on the call to
15772 do_initial_child_stuff.
15773 (win32_attach): Likewise.
15774 (win32_clear_inferiors): New.
15775 (win32_kill): Don't close the current process handle or the
15776 current thread handle here. Instead call win32_clear_inferiors.
15777 (win32_detach): Don't open a new handle to the process. Call
15778 win32_clear_inferiors.
15779 (win32_join): Don't rely on current_process_handle; open a new
15780 handle using the process id.
15781 (win32_wait): Call win32_clear_inferiors when the inferior process
15782 has exited.
15783
ecd7ecbc
DJ
157842008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15785
15786 * server.c (monitor_show_help): Add "exit".
15787
1525d545
MG
157882008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15789
ecd7ecbc 15790 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15791 (clean): Add reg-xtensa.c.
15792 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15793 * configure.srv (xtensa*-*-linux*) New target.
15794 * linux-xtensa-low.c: New.
15795 * xtensa-xtregs.c: New.
1525d545 15796
59a016f0
PA
157972008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15798
15799 * hostio.c: Don't include errno.h.
15800 (errno_to_fileio_errno): Move to hostio-errno.
15801 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15802 error number outputting to the target->hostio_last_error callback.
15803 (hostio_packet_error): Use FILEIO_EINVAL directly.
15804 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15805 calls to hostio_error.
15806 * hostio-errno.c: New.
15807 * server.h (hostio_last_error_from_errno): Declare.
15808 * target.h (target_ops): Add hostio_last_error member.
15809 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15810 as hostio_last_error handler.
889bf7c5 15811 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15812 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15813 (wince_hostio_last_error): New functions.
15814 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15815 as hostio_last_error handler.
15816 (win32_target_ops) [!_WIN32_WCE]: Register
15817 hostio_last_error_from_errno as hostio_last_error handler.
15818 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15819 (hostio-errno.o): New rule.
15820 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15821 * configure.srv (srv_hostio_err_objs): New variable. Default to
15822 hostio-errno.o.
15823 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15824 * configure: Regenerate.
15825
2d717e4f
DJ
158262008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15827
15828 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15829 (linux_kill, linux_detach): Clean up the process list.
15830 * remote-utils.c (remote_open): Improve port number parsing.
15831 (putpkt_binary, input_interrupt): Only send interrupts if the target
15832 is running.
15833 * server.c (extended_protocol): Make static.
15834 (attached): Define earlier.
15835 (exit_requested, response_needed, program_argv): New variables.
15836 (target_running): New.
15837 (start_inferior): Clear attached here.
15838 (attach_inferior): Set attached here.
15839 (require_running): Define.
15840 (handle_query): Use require_running and target_running. Implement
15841 "monitor exit".
15842 (handle_v_attach, handle_v_run): New.
15843 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15844 (gdbserver_usage): Update.
15845 (main): Redo argument parsing. Handle --debug and --multi. Handle
15846 --attach along with other options or after the port. Save
15847 program_argv. Support no initial program. Resynchronize
15848 communication with GDB after an error. Handle "monitor exit".
15849 Use require_running and target_running. Always allow the extended
15850 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15851 restart in extended mode.
15852 * README: Refer to the GDB manual. Update --attach usage.
15853
7407e2de
AS
158542007-12-20 Andreas Schwab <schwab@suse.de>
15855
15856 * linux-low.c (STACK_SIZE): Define.
15857 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15858 (linux_test_for_tracefork): Likewise.
15859
b65d95c5
DJ
158602007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15861
15862 * linux-low.c (linux_wait_for_event): Update messages. Do not
15863 reinsert auto-delete breakpoints.
15864 * mem-break.c (struct breakpoint): Change return type of handler to
15865 int.
15866 (set_breakpoint_at): Update handler type.
15867 (reinsert_breakpoint_handler): Return 1 instead of calling
15868 delete_breakpoint.
15869 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15870 setting a new one.
15871 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15872 * mem-break.h (set_breakpoint_at): Update handler type.
15873 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15874 * win32-low.c (auto_delete_breakpoint): New.
15875 (get_child_debug_event): Use it.
15876
4e799345
DJ
158772007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15878
15879 * configure.ac: Check for pread and pwrite.
15880 * hostio.c (handle_pread): Fall back to lseek and read.
15881 (handle_pwrite): Fall back to lseek and write.
15882 * config.in, configure: Regenerated.
15883
27524b67
DJ
158842007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15885
15886 * server.c (myresume): Add own_buf argument.
15887 (main): Update calls.
15888
a20d5e98
DJ
158892007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15890
15891 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15892 * remote-utils.c (remote_open): Do not call disable_async_io.
15893 (block_async_io): Delete.
15894 (unblock_async_io): Make static.
15895 (initialize_async_io): New.
15896 * server.c (handle_v_cont): Handle async I/O here.
15897 (myresume): Likewise. Move other common resume tasks here...
15898 (main): ... from here. Call initialize_async_io. Disable async
15899 I/O before the main loop.
15900 * server.h (initialize_async_io): Declare.
15901 (block_async_io, unblock_async_io): Delete prototypes.
15902 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15903
b79d787e
DJ
159042007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15905
15906 * remote-utils.c (readchar): Allow binary data in received messages.
15907
d97903b2
PA
159082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15909
15910 * win32-low.c (attaching): New global.
15911 (win32_create_inferior): Clear the `attaching' global.
15912 (win32_attach): Set the `attaching' global.
15913 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15914 attaching. Only set a breakpoint at the entry point if not
15915 attaching.
15916
311de423
PA
159172007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15918
15919 * server.c (main): Don't report dll events on the initial
15920 connection on attaches.
15921
6c2d16d2
PA
159222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15923
15924 * server.c (main): Relax numerical bases supported for the pid of
15925 the --attach command line argument.
15926
5ca906e6
PA
159272007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15928
15929 * win32-low.c (win32_attach): Call OpenProcess before
15930 DebugActiveProcess, not after. Add last error output to error
15931 call.
15932
9c6c8194
PA
159332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15934
15935 * win32-low.c (win32_get_thread_context)
15936 (win32_set_thread_context): New functions.
15937 (thread_rec): Use win32_get_thread_context.
15938 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15939 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15940 field.
15941
4d5d1aaa
PA
159422007-12-03 Leo Zayas
15943 Pedro Alves <pedro_alves@portugalmail.pt>
15944
15945 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15946 global variables.
15947 (child_add_thread): Minor cleanup.
15948 (child_continue): Resume artificially suspended threads before
15949 calling ContinueDebugEvent.
15950 (suspend_one_thread): New.
15951 (fake_breakpoint_event): New.
15952 (get_child_debug_event): Change return type to int. Check here if
15953 gdb sent an interrupt request. If a soft interrupt was requested,
15954 fake a breakpoint event. Return 0 if there is no event to handle,
15955 and 1 otherwise.
15956 (win32_wait): Don't check here if gdb sent an interrupt request.
15957 Ensure there is a valid event to handle.
15958 (win32_request_interrupt): Add soft interruption method as last
15959 resort.
15960
c436e841
PA
159612007-12-03 Leo Zayas
15962 Pedro Alves <pedro_alves@portugalmail.pt>
15963
15964 * win32-low.h (win32_thread_info): Add descriptions to the
15965 structure members. Replace `suspend_count' counter by a
15966 `suspended' flag.
15967 * win32-low.c (thread_rec): Update condition of when to get the
15968 context from the inferior. Rely on ContextFlags being set if it
15969 has already been retrieved. Only suspend the inferior thread if
15970 we haven't already. Warn if that fails.
15971 (continue_one_thread): s/suspend_count/suspended/. Only call
15972 ResumeThread once. Warn if that fails.
15973
e7b5fa67
PA
159742007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15975
15976 * win32-low.c (win32_wait): Don't read from the inferior when it
15977 has already exited.
15978
a385171d
PA
159792007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15980
15981 * Makefile.in (win32_low_h): New variable.
15982 (win32-low.o): Add dependency on $(win32_low_h).
15983 (win32-arm-low.o, win32-i386-low.o): New rules.
15984
f80c84b3
DJ
159852007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15986
15987 * hostio.c: Correct copyright year.
15988
a6b151f1
DJ
159892007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15990
15991 * Makefile.in (OBS): Add hostio.o.
15992 (hostio.o): New rule.
15993 * server.h (handle_vFile): Declare.
15994 * hostio.c: New file.
15995 * server.c (handle_v_requests): Take packet_len and new_packet_len
15996 for binary packets. Call handle_vFile.
15997 (main): Update call to handle_v_requests.
15998
f9387fc3
DJ
159992007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16000
16001 * linux-low.c: Include <sched.h>.
16002
51c2684e
DJ
160032007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16004
16005 * linux-low.c (linux_tracefork_grandchild): New.
16006 (linux_tracefork_child): Use clone.
16007 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16008
75f83163
JB
160092007-10-31 Joel Brobecker <brobecker@adacore.com>
16010
16011 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16012
da5898ce
DJ
160132007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16014
16015 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16016
24a09b5f
DJ
160172007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16018
16019 * inferiors.c (change_inferior_id): Delete.
16020 (add_pid_to_list, pull_pid_from_list): New.
16021 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16022 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16023 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16024 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16025 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16026 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16027 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16028 (using_threads): Always set to 1.
16029 (handle_extended_wait): New.
16030 (add_process): Do not set TID.
16031 (linux_create_inferior): Set must_set_ptrace_flags.
16032 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16033 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16034 (linux_thread_alive): Rename TID argument to LWPID.
16035 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16036 (linux_wait_for_event): Do not use TID or check using_threads. Update
16037 call to dead_thread_notify. Call handle_extended_wait.
16038 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16039 (send_sigstop): Delete sigstop_sent.
16040 (wait_for_sigstop): Avoid TID.
16041 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16042 (linux_test_for_tracefork): New.
16043 (linux_lookup_signals): Use thread_db_active and
16044 linux_supports_tracefork_flag.
16045 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16046 * linux-low.h (get_process_thread): Avoid TID.
16047 (struct process_ifo): Move thread_known and tid to the end. Remove
16048 sigstop_sent.
16049 (linux_attach_lwp, thread_db_init): Update prototypes.
16050 * server.h (change_inferior_id): Delete prototype.
16051 (add_pid_to_list, pull_pid_from_list): New prototypes.
16052 * thread-db.c (thread_db_use_events): New.
16053 (find_first_thread): Rename to...
16054 (find_one_thread): ...this. Update callers and messages. Do not
16055 call fatal. Check thread_db_use_events. Do not call
16056 change_inferior_id or new_thread_notify.
16057 (maybe_attach_thread): Update. Do not call new_thread_notify.
16058 (thread_db_init): Set thread_db_use_events. Check use_events.
16059 * utils.c (fatal, warning): Correct message prefix.
16060
30ed0a8f
DJ
160612007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16062
16063 * Makefile.in (clean): Remove new files.
16064 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16065 (powerpc-64.o, powerpc-64.c): New rules.
16066 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16067 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16068 with SPE.
16069 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16070 SPE targets.
16071 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16072 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16073 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16074 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16075 (target_regsets): Add AltiVec and SPE register sets.
16076 * configure.ac: Check for AltiVec and SPE.
16077 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16078 (ppc_fill_vrregset, ppc_store_vrregset): New.
16079 (target_regsets): Add AltiVec register set.
16080 * configure: Regenerated.
16081
fd462a61
DJ
160822007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16083
16084 * linux-low.c (O_LARGEFILE): Define.
16085 (linux_read_memory): Use /proc/PID/mem.
16086 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16087 * configure, config.in: Regenerated.
16088
69f223ed
DJ
160892007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16090
16091 * linux-low.c (linux_wait_for_event): Do not pass signals while
16092 single-stepping.
16093
aec18585
PA
160942007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16095
16096 * win32-low.c (create_process): New.
16097 (win32_create_inferior): Use create_process instead of
16098 CreateProcess. If create_process failed retry appending an ".exe"
16099 suffix. Store the GetLastError result immediatelly after
16100 create_process calls and use it on the call to error.
16101
34d86ddd
PA
161022007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16103
16104 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16105
5a0e3bd0
JB
161062007-08-23 Joel Brobecker <brobecker@adacore.com>
16107
16108 * configure.ac: Switch license to GPLv3.
16109
f88c79e6
MS
161102007-08-01 Michael Snyder <msnyder@access-company.com>
16111
16112 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16113
6b3d9b83
PA
161142007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16115
16116 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16117 typedef.
16118 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16119 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16120 CloseToolhelp32Snapshot.
16121 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16122 CloseToolhelp32Snapshot.
16123
c588c53c
MS
161242007-07-27 Michael Snyder <michael.snyder@access-company.com>
16125
16126 * server.c (main): Check for inferior exit before main loop.
16127
aa0403d9
PA
161282007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16129
16130 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16131 instead of on tmp_desc.
16132
255e7678
DJ
161332007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16134 Daniel Jacobowitz <dan@codesourcery.com>
16135
16136 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16137 (add_thread): Minor cleanups.
16138 (clear_inferiors): Move lower in the file. Clear the DLL
16139 list.
16140 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16141 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16142 (xml_escape_text): New.
16143 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16144 for qSupported.
16145 (handle_v_cont): Report errors.
16146 (gdbserver_version): Update.
16147 (main): Correct size of own_buf. Do not report initial DLL events.
16148 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16149 (unloaded_dll, xml_escape_text): New.
16150 * win32-low.c (enum target_waitkind): Update comments.
16151 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16152 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16153 (win32_EnumProcessModules, win32_GetModuleInformation)
16154 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16155 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16156 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16157 (win32_Module32First, win32_Module32Next, load_toolhelp)
16158 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16159 (get_child_debug_event): Handle DLL events.
16160 (win32_wait): Likewise.
16161
0d37add9
DJ
161622007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16163
16164 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16165 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16166
45e2715e
PA
161672007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16168
16169 * win32-low.c (handle_output_debug_string): Ignore event if not
16170 waiting.
16171
c5674cf1
PA
161722007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16173
16174 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16175
2bbe3cc1
DJ
161762007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16177
16178 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16179
ae13219e
DJ
161802007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16181
16182 * inferiors.c (change_inferior_id): Add comment.
16183 * linux-low.c (check_removed_breakpoint): Add an early
16184 prototype. Improve debug output.
16185 (linux_attach): Doc update.
16186 (linux_detach_one_process, linux_detach): Clean up before releasing
16187 each process.
16188 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16189 * linux-low.h (struct process_info): Doc improvement.
16190 * mem-break.c (delete_all_breakpoints): New.
16191 * mem-break.h (delete_all_breakpoints): New prototype.
16192 * thread-db.c (find_first_thread): New.
16193 (thread_db_create_event): Call it instead of
16194 thread_db_find_new_threads. Clean up unused variables.
16195 (maybe_attach_thread): Remove first thread handling.
16196 (thread_db_find_new_threads): Use find_first_thread.
16197 (thread_db_get_tls_address): Likewise.
16198
4105de34
DJ
161992007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16200
16201 * thread-db.c (thread_db_find_new_threads): Add prototype.
16202 (thread_db_create_event): Check for the main thread before adding
16203 a new thread.
16204 (maybe_attach_thread): Only enable event reporting if TID == 0.
16205 (thread_db_get_tls_address): Check for new threads.
16206
2b876972
DJ
162072007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16208
16209 * linux-low.c (linux_create_inferior): Try execv before execvp.
16210 * spu-low.c (spu_create_inferior): Likewise.
16211
7a245884
DJ
162122007-06-13 Mike Frysinger <vapier@gentoo.org>
16213
16214 * linux-low.c (linux_create_inferior): Change execv to execvp.
16215 * spu-low.c (spu_create_inferior): Likewies.
16216
117ce543
DJ
162172007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16218
16219 * Makefile.in (clean): Clean new files instead of deleted ones.
16220 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16221 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16222 rules.
16223 * configure.srv: Specify XML files and new regformats for MIPS and
16224 MIPS64 GNU/Linux.
16225 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16226 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16227 an entry for the restart register.
16228 (mips_cannot_fetch_register, mips_cannot_store_register)
16229 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16230 register names to match the XML descriptions.
16231 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16232 restart register instead of $0.
16233
0e7f50da
UW
162342007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16235 Markus Deuling <deuling@de.ibm.com>
16236
16237 * remote-utils.c (decode_xfer_write): New function.
16238 * server.h (decode_xfer_write): Add prototype.
16239 * server.c (handle_query): Add PACKET_LEN argument. Support
16240 qXfer:spu:read and qXfer:spu:write packets.
16241 (main): Pass packet_len to handle_query.
16242 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16243 * target.h (target_ops): Add qxfer_spu.
16244
374c1d38
UW
162452007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16246
16247 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16248 accessing non-seekable spufs files.
16249
bb63802a
UW
162502007-05-16 Markus Deuling <deuling@de.ibm.com>
16251
889bf7c5 16252 * server.c (handle_query): Add reply for qC packet.
bb63802a 16253
7390519e
PA
162542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16255 Leo Zayas <lerele@champenstudios@com>
16256
16257 * server.h (check_remote_input_interrupt_request): New function.
16258 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16259 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16260 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16261 (check_remote_input_interrupt_request): New function.
16262 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16263 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16264 winapi_GenerateConsoleCtrlEvent): New typedefs.
16265 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16266 to 250 ms.
16267 (win32_wait): Check for remote interrupt request
16268 with check_remote_input_interrupt_request.
16269 (win32_request_interrupt): New function.
16270 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16271
34b34921
PA
162722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16273
16274 * win32-low.c (debug_registers_changed,
16275 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16276 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16277 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16278 (thread_rec): Get context using the low target.
16279 (child_add_thread): Call thread_added on the low target,
16280 which does the same thing.
16281 (regptr): Delete.
16282 (do_initial_child_stuff): Remove debug registers references.
16283 Set context using the low target. Resume threads after
16284 setting the contexts.
16285 (child_continue): Remove dead variable. Remove debug
16286 registers references.
16287 (child_fetch_inferior_registers): Go through the low target.
16288 (do_child_store_inferior_registers): Remove.
16289 (child_store_inferior_registers): Go through the low target.
16290 (win32_resume): Remove debug registers references.
16291 Set context using the low target.
16292 (handle_exception): Change return type to void. Don't record
16293 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16294 first chance exception.
889bf7c5 16295 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16296 goto loop. Always return after waiting for debug event.
16297 (win32_wait): Convert to switch statement. Handle spurious
16298 events.
16299
16300 * win32-i386-low.c (debug_registers_changed,
16301 debug_registers_used): New.
16302 (initial_stuff): Rename to ...
16303 (i386_initial_stuff): ... this. Clear debug registers
16304 state variables.
16305 (store_debug_registers): Delete.
16306 (i386_get_thread_context): New.
16307 (load_debug_registers): Delete.
16308 (i386_set_thread_context): New.
16309 (i386_thread_added): New.
16310 (single_step): Rename to ...
16311 (i386_single_step): ... this.
16312 (do_fetch_inferior_registers): Rename to ...
16313 (i386_fetch_inferior_register): ... this.
16314 (i386_store_inferior_register): New.
16315 (the_low_target): Adapt to new interface.
16316
16317 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16318 (arm_get_thread_context): New.
16319 (arm_set_thread_context): New.
16320 (regptr): New.
16321 (do_fetch_inferior_registers): Rename to ...
16322 (arm_fetch_inferior_register): ... this.
16323 (arm_store_inferior_register): New.
16324 (arm_wince_breakpoint): Reimplement as unsigned long.
16325 (arm_wince_breakpoint_len): Define.
16326 (the_low_target): Adapt to new interface.
16327
16328 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16329 load_debug_registers. Add get_thread_context, set_thread_context,
16330 thread_added and store_inferior_register. Rename
16331 fetch_inferior_registers to fetch_inferior_register.
16332 (regptr): Remove declaration.
16333
dd6953e1
PA
163342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16335
16336 * linux-low.c (linux_detach): Change return type to int. Return 0.
16337 * spu-low.c (spu_detach): Likewise.
16338
444d6139
PA
163392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16340
16341 * target.h (target_ops): Change return type of detach to int.
16342 Add join.
16343 (join_inferior): New.
16344 * server.c (main): Don't skip detach support on mingw32.
16345 If the inferior doesn't support detaching return error.
16346 Call join_inferior instead of using waitpid.
16347 * linux-low.c (linux_join): New.
16348 (linux_target_op): Add linux_join.
16349 * spu-low.c (spu_join): New.
16350 (spu_target_ops): Add spu_join.
16351 * win32-low.c (win32_detach): Adapt to new interface.
16352 Reopen current_process_handle before detaching. Issue a child
16353 resume before detaching.
16354 (win32_join): New.
16355 (win32_target_op): Add win32_join.
16356
1d5315fe
PA
163572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16358
16359 * win32-low.c (win32-attach): Fix return value.
16360 * target.h (target_ops): Describe ATTACH return values.
16361
bf914831
PA
163622007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16363
16364 * win32-low.c (GETPROCADDRESS): Define.
16365 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16366 (winapi_DebugSetProcessKillOnExit): Likewise.
16367 (win32_create_inferior): Force usage of ansi CreateProcessA.
16368 (win32_attach): Use GETPROCADDRESS.
16369 (win32_detach): Likewise.
16370
f72f3e60
PA
163712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16372
16373 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16374
ed50f18f
PA
163752007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16376
16377 * win32-low.c: Commit leftover changes from 2007-03-29.
16378
0c2ead7e
DJ
163792007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16380
16381 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16382 fields short instead of int. Add explicit padding.
16383 (i387_cache_to_fsave): Remove unnecessary casts.
16384 (i387_fsave_to_cache): Doc fix.
16385 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16386
73725ff3
DJ
163872007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16388
16389 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16390 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16391
d99f33d8
PA
163922007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16393
16394 * configure.srv (arm*-*-mingw32ce*): Move near the other
16395 arm targets.
16396
68070c10
PA
163972007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16398
2482afc6 16399 * configure.ac: Add errno checking.
68070c10
PA
16400 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16401 sys/file.h and malloc.h.
16402 (AC_CHECK_DECLS): Add perror.
16403 (srv_mingwce): Handle.
2482afc6 16404 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16405 win32-i386-low.o to srv_tgtobj.
16406 (i[34567]86-*-mingw*): Likewise.
16407 (arm*-*-mingw32ce*): Add case.
16408 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16409 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16410 [__MINGW32CE__] (strerror): New function.
16411 [__MINGW32CE__] (errno): Define to GetLastError.
16412 [__MINGW32CE__] (COUNTOF): New macro.
16413 (remote_open): Remove extra close call.
16414 * mem-break.c (delete_breakpoint_at): New function.
16415 * mem-break.h (delete_breakpoint_at): Declare.
16416 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16417 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16418 [USE_WIN32API] (read, write): Add char* casts.
16419 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16420 * server.h: Include wincecompat.h on Windows CE.
16421 [HAVE_ERRNO_H]: Check.
16422 (perror): Declare if not declared.
16423 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16424 (perror_with_name): Remove errno declaration.
16425 * wincecompat.h: New.
16426 * wincecompat.c: New.
16427 * win32-low.h: New.
16428 * win32-arm-low.c: New.
16429 * win32-i386-low.c: New.
16430 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16431 (OUTMSG2): Make it safe.
16432 (_T): New macro.
16433 (COUNTOF): New macro.
16434 (NUM_REGS): Get it from the low target.
16435 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16436 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16437 (thread_rec): Let low target handle debug registers.
16438 (child_add_thread): Likewise.
16439 (child_init_thread_list): Likewise.
16440 (continue_one_thread): Likewise.
16441 (regptr): New.
16442 (do_child_fetch_inferior_registers): Move to ...
16443 * win32-i386-low.c: ... here, and rename to ...
16444 (do_fetch_inferior_registers): ... this.
889bf7c5 16445 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16446 Go through the low target.
16447 (do_child_store_inferior_registers): Use regptr.
16448 (strwinerror): New function.
16449 (win32_create_inferior): Handle Windows CE.
16450 Use strwinerror instead of strerror on Windows error
16451 codes. Add program to the error output.
16452 Don't close the main thread handle on Windows CE.
16453 (win32_attach): Use coredll.dll on Windows CE.
16454 (win32_kill): Close current process and current
16455 thread handles.
16456 (win32_detach): Use coredll.dll on Windows CE.
16457 (win32_resume): Let low target handle debug registers, and
16458 step request.
16459 (handle_exception): Add/Remove initial breakpoint. Avoid
16460 non-existant WSTOPSIG on Windows CE.
16461 (win32_read_inferior_memory): Cast to remove warning.
16462 (win32_arch_string): Go through the low target.
16463 (initialize_low): Call set_breakpoint_data with the low
16464 target's breakpoint.
16465 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16466 FOP_REGNUM, mappings): Move to ...
16467 * win32-i386-low.c: ... here.
16468 * win32-low.c (win32_thread_info): Move to ...
16469 * win32-low.h: ... here.
16470 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16471 win32-arm-low.c and wincecompat.c.
16472 (all:): Add $EXEEXT.
16473 (install-only:): Likewise.
16474 (gdbserver:): Likewise.
16475 (gdbreplay:): Likewise.
16476 * config.in: Regenerate.
16477 * configure: Regenerate.
16478
41093d81
PA
164792007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16480
16481 * win32-low.c: Rename typedef thread_info to
16482 win32_thread_info throughout.
16483
544afa54
PA
164842007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16485
16486 * win32-i386-low.c: Rename to ...
16487 * win32-low.c: ... this.
16488 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16489 * Makefile.in: Likewise.
16490
bce7165d
PA
164912007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16492
16493 * remote-utils.c (monitor_output): Constify msg parameter.
16494 * server.h (monitor_output): Likewise.
16495 * win32-i386-low.c (handle_output_debug_string): New.
16496 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16497 handle_output_debug_string.
16498 (get_child_debug_event): Likewise.
16499
506c7aa0
DJ
165002007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16501
16502 * server.c (main): Correct strtoul check.
16503
42c81e2a
DJ
165042007-03-27 Jon Ringle <jon@ringle.org>
16505
16506 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16507
9453113a
DJ
165082007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16509
16510 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16511
64a69107
DJ
165122007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16513
16514 * terminal.h: Check HAVE_SGTTY_H.
16515
165162007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16517
16518 * remote-utils.c (remote_open): Print out the assigned port number.
16519
c74d0ad8
DJ
165202007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16521
16522 * remote-utils.c (monitor_output): New function.
16523 * server.c (debug_threads): Define here.
16524 (monitor_show_help): New function.
16525 (handle_query): Handle qRcmd.
16526 (main): Do not handle 'd' packet.
16527 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16528 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16529 of debug_threads.
16530
de7c3b4a
PA
165312007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16532
16533 * Makefile.in (EXEEXT): New.
16534 (clean): Use $(EXEEXT).
16535
ef57601b
PA
165362007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16537
16538 * target.h (target_ops): Rename send_signal to request_interrupt,
16539 and remove enum target_signal parameter.
16540 * linux-low.c (linux_request_interrupt): Rename from
16541 linux_send_signal, and always send SIGINT.
16542 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16543 and always send SIGINT.
16544 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16545 of send_signal.
16546 (input_interrupt): Likewise.
16547
820f2bda
PA
165482007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16549
16550 * server.c (get_features_xml): Check if target implemented
16551 arch_string.
16552 * win32-i386-low.c (win32_arch_string): New.
16553 (win32_target_ops): Add win32_arch_string as arch_string member.
16554
ab39bf24
UW
165552007-02-22 Markus Deuling <deuling@de.ibm.com>
16556
16557 * spu-low.c (spu_arch_string): New.
16558 (spu_target_ops): Add spu_arch_string.
16559
61ff6e04
DJ
165602007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16561
16562 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16563 * configure.ac: Do not check for terminal.h.
16564 * configure, config.in: Regenerated.
16565
fb1e4ffc
DJ
165662007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16567
16568 * Makefile.in (OBS): Add $(XML_BUILTIN).
16569 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16570 (clean): Update.
16571 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16572 (arm-with-iwmmxt.c): New.
16573 * config.in, configure: Regenerate.
16574 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16575 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16576 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16577 (arm*-*-linux*): Add iWMMXt and regset support.
16578 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16579 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16580 (arm_store_wmmxregset, target_regsets): New.
16581 * server.c (get_features_xml): Take annex argument. Check builtin
16582 XML documents.
16583 (handle_query): Handle multiple annexes.
16584
0f48aa01
DJ
165852007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16586
16587 * remote-utils.c [USE_WIN32API] (read, write): Define.
16588 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16589 write.
16590
23181151
DJ
165912007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16592
16593 * linux-i386-low.c (the_low_target): Set arch_string.
16594 * linux-x86-64-low.c (the_low_target): Likewise.
16595 * linux-low.c (linux_arch_string): New.
16596 (linux_target_ops): Add it.
16597 * linux-low.h (struct linux_target_ops): Add arch_string.
16598 * server.c (write_qxfer_response): Use const void * for DATA.
16599 (get_features_xml): New.
16600 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16601 * target.h (struct target_ops): Add arch_string method.
16602
9d606399
DJ
166032007-01-03 Denis Pilat <denis.pilat@st.com>
16604 Daniel Jacobowitz <dan@codesourcery.com>
16605
16606 * linux-low.c (linux_kill): Handle being called with no threads.
16607 * win32-i386-low.c (win32_kill): Likewise.
16608 (get_child_debug_event): Clear current_process_handle.
16609
166102006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16611 Daniel Jacobowitz <dan@codesourcery.com>
16612
16613 * remote-utils.c (remote_open): Check the type of specified
16614 serial port devices before opening them.
16615 * server.c (main): Kill the inferior if an error occurs during
16616 the first remote_open.
16617
a5e13d24
DJ
166182006-12-05 Markus Deuling <deuling@de.ibm.com>
16619
16620 * README: Update supported targets.
16621
186947f7
DJ
166222006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16623
16624 * Makefile.in (clean): Remove reg-mips64.c.
16625 (reg-mips64.c, reg-mips64.o): New rules.
16626 * configure.srv: Handle mips64. Include regset support for mips.
16627 * linux-mips-low.c (union mips_register): New.
16628 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16629 (mips_breakpoint, mips_breakpoint_at): Use int.
16630 (mips_collect_register, mips_supply_register)
16631 (mips_collect_register_32bit, mips_supply_register_32bit)
16632 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16633 (mips_store_fpregset, target_regsets): New.
16634 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16635
a13e2c95
UW
166362006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16637
16638 * configure.srv: Add target "spu*-*-*".
16639 * Makefile.in (clean): Remove reg-spu.c.
16640 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16641 * spu-low.c: New file.
16642
cb7283db
DJ
166432006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16644
16645 * configure.ac: Correct td_thr_tls_get_addr test.
16646 * configure: Regenerated.
16647
89be2091
DJ
166482006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16649
16650 * linux-low.c (linux_wait_for_event): Reformat. Use the
16651 pass_signals array.
16652 * remote-utils.c (decode_address_to_semicolon): New.
16653 * server.c (pass_signals, handle_general_set): New.
16654 (handle_query): Mention QPassSignals for qSupported.
16655 (main): Call handle_general_set.
16656 * server.h (pass_signals, decode_address_to_semicolon): New.
16657
000ef4f0
DJ
166582006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16659
16660 * server.c (handle_query): Correct error handling for read_auxv.
16661
b7149293
UW
166622005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16663
16664 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16665 and srv_linux_thread_db to yes.
16666 * linux-s390-low.c (s390_fill_gregset): New function.
16667 (target_regsets): Define data structure.
16668
dae5f5cf
DJ
166692006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16670
16671 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16672 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16673 * config.in, configure: Regenerated.
16674 * inferiors.c (gdb_id_to_thread): New function.
16675 (gdb_id_to_thread_id): Use it.
16676 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16677 * linux-low.h (struct process_info): Add th member.
16678 (thread_db_get_tls_address): New prototype.
16679 * remote-utils.c (decode_address): Make non-static.
16680 * server.c (handle_query): Handle qGetTLSAddr.
16681 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16682 * target.h (struct target_ops): Add get_tls_address.
16683 * thread-db.c (maybe_attach_thread): Save the thread handle.
16684 (thread_db_get_tls_address): New.
16685
32ca6d61
DJ
166862006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16687
16688 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16689 (linux_resume_one_process): Take a siginfo_t *. Update all
16690 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16691 (struct pending_signals): Add a siginfo_t.
16692 (linux_wait_for_process): Always set last_status.
16693 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16694 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16695 * linux-low.h (struct process_info): Add last_status.
16696
5ffff7c1
DJ
166972006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16698
16699 * remote-utils.c (try_rle): New function.
16700 (putpkt_binary): Use it.
16701
8695c747
DJ
167022006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16703
16704 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16705 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16706 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16707 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16708 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16709 point registers.
16710
290fadea
RS
167112006-08-08 Richard Sandiford <richard@codesourcery.com>
16712
16713 * server.c (terminal_fd): New variable.
16714 (old_foreground_pgrp): Likewise.
16715 (restore_old_foreground_pgrp): New function.
16716 (start_inferior): Record the terminal file descriptor in terminal_fd
16717 and its original foreground group in old_foreground_pgrp. Register
16718 restore_old_foreground_pgrp with atexit().
16719
9f2e1e63
DJ
167202006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16721
16722 * server.c (handle_query): Correct qPart to qXfer.
16723
b80864fb
DJ
167242006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16725
16726 * configure.ac: Check for more headers which are missing on
16727 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16728 * configure.srv: Add Cygwin and mingw32.
16729 * remote-utils.c: Don't include headers unconditionally which
16730 are missing on mingw32. Include <winsock.h> for mingw32.
16731 (remote_open): Adjust for mingw32 support. Flush
16732 standard error after writing to it.
16733 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16734 (unblock_async_io, enable_async_io, disable_async_io)
16735 (readchar, getpkt): Update for Winsock support.
16736 (prepare_resume_reply): Expect a protocol signal number.
16737 * server.c: Disable <sys/wait.h> on mingw32.
16738 (start_inferior): Adjust for mingw32 support. Flush
16739 standard error after writing to it.
16740 (attach_inferior): Likewise. Use protocol signal
16741 numbers.
16742 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16743 and names.
16744 * win32-i386-low.c: New file.
16745 * Makefile.in (XM_CLIBS): Set.
16746 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16747 (win32-i386-low.o): New dependency rule.
16748 * linux-low.c (linux_wait): Use target signal numbers.
16749 * target.h (struct target_ops): Doc fix.
16750 * server.h (target_signal_to_name): New prototype.
16751 * gdbreplay.c: Don't include headers unconditionally which
16752 are missing on mingw32. Include <winsock.h> for mingw32.
16753 (remote_close, remote_open): Adjust for Winsock support.
16754 * configure, config.in: Regenerated.
16755
0876f84a
DJ
167562006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16757
16758 * server.c (decode_xfer_read, write_qxfer_response): New.
16759 (handle_query): Take a packet length argument. Handle
16760 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16761 the qSupported response.
16762 (main): Update call to handle_query.
16763
01f9e8fa
DJ
167642006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16765
16766 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16767 (putpkt_binary): Renamed from putpkt and adjusted for binary
16768 data.
16769 (putpkt): New wrapper for putpkt_binary.
16770 (readchar): Don't mask off the high bit.
16771 (decode_X_packet): New function.
16772 * server.c (main): Call putpkt_binary if a handler sets the packet
16773 length. Save the length of the incoming packet. Handle 'X'.
16774 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16775
be2a5f71
DJ
167762006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16777
16778 * server.c (handle_query): Handle qSupported.
16779
ea025f5f
DJ
167802006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16781
16782 * remote-utils.c (all_symbols_looked_up): New variable.
16783 (look_up_one_symbol): Check it.
16784 * server.h (look_up_one_symbol): New declaration.
16785 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16786
9308fc88
DJ
167872006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16788
16789 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16790 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16791 (PTRACE_GET_THREAD_AREA): Define.
16792 (ps_get_thread_area): New function.
16793
52fb6437
NS
167942006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16795
16796 * configure.srv (m68k*-*-uclinux*): New target.
16797 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16798 (linux_resume_one_process): Remove extraneous cast.
16799 (linux_read_offsets): New.
16800 (linux_target_op): Add linux_read_offsets on mmuless systems.
16801 * server.c (handle_query): Add qOffsets logic.
16802 * target.h (struct target_ops): Add read_offsets.
16803
21b0f40c
DJ
168042006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16805
16806 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16807 (PTRACE_GET_THREAD_AREA): Define.
16808 (ps_get_thread_area): New function.
16809 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16810 (linux-x86-64-low.o): Update.
16811
0050a760
DJ
168122006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16813
16814 * configure.ac: Remove checks for prfpregset_t.
16815 * gdb_proc_service.h: New file.
16816 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16817 new "gdb_proc_service.h".
16818 * proc-service.c: Likewise.
16819 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16820 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16821 * Makefile.in (gdb_proc_service_h): Updated.
16822 * configure, config.in: Regenerated.
16823
b92a518e
DJ
168242006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16825
16826 * remote-utils.c (prepare_resume_reply): Move declaration
16827 of gdb_id_from_wait to the top of the block.
16828
545587ee
DJ
168292006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16830
16831 * linux-low.c (regsets_store_inferior_registers): Read the regset
16832 from the target before filling it.
16833
9db87ebd
DJ
168342006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16835
16836 * server.c (attach_inferior): Return SIGTRAP for a successful
16837 attach.
16838
dd24457d
DJ
168392006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16840
16841 * Makefile.in (OBS): Add version.o.
16842 (STAGESTUFF): Delete.
16843 (version.o): Add dependencies.
16844 (version.c): Replace rule.
16845 (clean): Remove version.c.
16846 * server.c (gdbserver_version): New.
16847 (gdbserver_usage): Use printf.
16848 (main): Handle --version and --help.
16849 * server.h (version, host_name): Add declarations.
16850
6f0f660e
EZ
168512005-12-23 Eli Zaretskii <eliz@gnu.org>
16852
889bf7c5
PA
16853 * linux-arm-low.c:
16854 * linux-arm-low.c:
16855 * inferiors.c:
16856 * i387-fp.h:
16857 * i387-fp.c:
16858 * gdbreplay.c:
16859 * regcache.c:
16860 * proc-service.c:
16861 * mem-break.h:
16862 * mem-break.c:
16863 * linux-x86-64-low.c:
16864 * linux-sh-low.c:
16865 * linux-s390-low.c:
16866 * linux-ppc64-low.c:
16867 * linux-ppc-low.c:
16868 * linux-mips-low.c:
16869 * linux-m68k-low.c:
16870 * linux-m32r-low.c:
16871 * linux-low.h:
16872 * linux-low.c:
16873 * linux-ia64-low.c:
16874 * linux-i386-low.c:
16875 * linux-crisv32-low.c:
16876 * thread-db.c:
16877 * terminal.h:
16878 * target.h:
16879 * target.c:
16880 * server.h:
16881 * server.c:
16882 * remote-utils.c:
16883 * regcache.h:
16884 * utils.c:
16885 * Makefile.in:
16886 * configure.ac:
6f0f660e
EZ
16887 * gdbserver.1: Add (C) after Copyright. Update the FSF
16888 address.
16889
9d1fb177
DJ
168902005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16891
16892 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16893 (arm_breakpoint_at): Recognize both breakpoints.
16894 (the_low_target): Use the correct breakpoint instruction.
16895
011a70c2
DJ
168962005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16897
16898 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16899 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16900 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16901 (the_low_target): Update.
16902
7fb85e41
AS
169032005-10-25 Andreas Schwab <schwab@suse.de>
16904
16905 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16906
16907 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16908 (ia64_num_regs): Reduce to 462.
16909
3db0444b
DJ
169102005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16911
16912 * acinclude.m4: Correct quoting.
16913 * aclocal.m4: Regenerated.
16914
16915 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16916 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16917 (thread_db_init): Call thread_db_err_str.
16918 * configure.ac: Check for TD_VERSION.
16919 * config.in, configure: Regenerated.
16920
bee0189a
DJ
169212005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16922
16923 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16924
e9d25b98
DJ
169252005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16926
16927 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16928 is not available. Define HAVE_PTRACE_GETREGS if it is.
16929 * config.in, configure: Regenerated.
16930 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16931 * linux-i386-low.c, linux-m68k-low.c: Update to use
16932 HAVE_PTRACE_GETREGS.
16933 * linux-low.c (regsets_fetch_inferior_registers)
16934 (regsets_store_inferior_registers): Only return 0 if we processed
16935 GENERAL_REGS.
16936 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16937 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16938
a06660f7
DJ
169392005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16940
16941 * inferiors.c (struct thread_info): Add gdb_id.
16942 (add_thread): Add gdb_id argument.
16943 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16944 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16945 calls to add_thread.
16946 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16947 * server.c (handle_query): Use thread_to_gdb_id.
16948 (handle_v_cont, main): Use gdb_id_to_thread_id.
16949 * server.h (add_thread): Update prototype.
16950 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16951 prototypes.
16952
5a1f5858
DJ
169532005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16954
16955 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16956 left-padded registers.
16957 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16958 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16959
e122f1f5
SE
169602005-07-01 Steve Ellcey <sje@cup.hp.com>
16961
16962 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16963 * configure: Regenerate.
16964 * config.in: Regenerate.
16965 * server.h (NEED_DECLARATION_STRERROR):
16966 Replace with !HAVE_DECL_STRERROR.
16967
d592fa2f
DJ
169682005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16969
16970 * linux-low.c (linux_wait, linux_send_signal): Don't test
16971 an unsigned long variable for > 0 if it could be MAX_ULONG.
16972 * server.c (myresume): Likewise.
16973 * target.c (set_desired_inferior): Likewise.
16974
ccbd4912
MK
169752005-06-13 Mark Kettenis <kettenis@gnu.org>
16976
16977 * configure.ac: Simplify and improve check for socklen_t.
16978 * configure, config.in: Regenerate.
16979
f450004a
DJ
169802005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16981
16982 * acconfig.h: Remove.
16983 * configure.ac: Add a test for socklen_t. Use three-argument
16984 AC_DEFINE throughout.
16985 * config.in: Regenerated using autoheader 2.59.
16986 * configure: Regenerated.
16987
16988 * gdbreplay.c (socklen_t): Provide a default.
16989 (remote_open): Use socklen_t.
16990 * remote-utils.c (socklen_t): Provide a default.
16991 (remote_open): Use socklen_t.
16992 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16993 unsigned char.
16994
16995 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16996 char for buffers.
16997 * linux-low.c (linux_read_memory, linux_write_memory)
16998 (linux_read_auxv): Likewise.
16999 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17000 (check_mem_write): Likewise.
17001 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17002 Likewise.
17003 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17004 (registers_from_string, register_data): Likewise.
17005 * server.c (handle_query, main): Likewise.
17006 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17007 (decode_M_packet): Likewise.
17008 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17009 * target.h (struct target_ops): Update read_memory, write_memory,
17010 and read_auxv.
17011 (read_inferior_memory, write_inferior_memory): Update.
17012 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17013 to unsigned char *.
17014 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17015 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17016 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17017 linux-s390-low.c, linux-sh-low.c: Update for changes in
17018 read_inferior_memory and the_low_target->breakpoint.
17019
eee84df1
DJ
170202005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17021
17022 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17023 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17024 * configure.srv: Add powerpc64-*-linux*.
17025 * linux-ppc64-low.c: New file.
17026
45b134e5
OF
170272005-05-23 Orjan Friberg <orjanf@axis.com>
17028
17029 * linux-cris-low.c: New file with support for CRIS.
17030 * linux-crisv32-low.c: Ditto for CRISv32.
17031 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17032 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17033 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17034 reg-crisv32.o, and reg-crisv32.c to make rules.
17035 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17036 recognized targets.
17037
48d93c75
UW
170382005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17039
17040 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17041 of sizeof (PTRACE_XFER_TYPE).
17042 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17043
e013ee27
OF
170442005-05-12 Orjan Friberg <orjanf@axis.com>
17045
889bf7c5 17046 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17047 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17048 pointers for hardware watchpoint support.
17049 * linux-low.h (struct linux_target_ops): Ditto.
17050 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17051 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17052 to linux_target_ops.
17053 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17054 reply packet.
17055 * server.c (main): Recognize 'Z' and 'z' packets.
17056
b0ded00b
UW
170572005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17058
17059 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17060 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17061 (the_low_target): Add new members.
17062
8643e2ad
DJ
170632005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17064
17065 * proc-service.c (ps_lgetregs): Search all_processes instead of
17066 all_threads.
17067
fc620387
DJ
170682005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17069
17070 * server.c (start_inferior): Change return type to int.
17071 (attach_inferior): Change sigptr to int *.
17072 (handle_v_cont, handle_v_requests): Change signal to int *.
17073 (main): Change signal to int.
17074
170752005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17076
17077 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17078 * configure.srv: Add m32r*-*-linux*.
17079 * linux-m32r-low.c: New file.
17080
e0e76420
DJ
170812005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17082
17083 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17084
a1928bad
DJ
170852005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17086
17087 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17088 Take unsigned long arguments for PIDs.
17089 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17090 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17091 (wait_for_sigstop, linux_resume_one_process)
17092 (regsets_fetch_inferior_registers, linux_send_signal)
17093 (linux_read_auxv): Likewise. Update the types of variables holding
17094 PIDs. Update format string specifiers.
17095 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17096 * remote-utils.c (prepare_resume_reply): Likewise.
17097 * server.c (cont_thread, general_thread, step_thread)
17098 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17099 unsigned long.
17100 (handle_query): Update format specifiers.
17101 (handle_v_cont, main): Use strtoul for thread IDs.
17102 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17103 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17104 (general_thread, step_thread, thread_from_wait)
17105 (old_thread_from_wait): Update.
17106 * target.h (struct thread_resume): Use unsigned long for THREAD.
17107 (struct target_ops): Use unsigned long for arguments to attach and
17108 thread_alive.
17109
dcdb98d2
DJ
171102005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17111
17112 * acinclude.m4: Include bfd/bfd.m4 directly.
17113 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17114 <agriffis@toolchain.org>.
17115 * aclocal.m4, configure: Regenerated.
17116
bec39cab
AC
171172005-01-07 Andrew Cagney <cagney@gnu.org>
17118
17119 * configure.ac: Rename configure.in, require autoconf 2.59.
17120 * configure: Re-generate.
17121
434c4c77
DJ
171222004-12-08 Daniel Jacobowitz <dan@debian.org>
17123
17124 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17125 LIBS when finished.
17126 * aclocal.m4: Regenerated.
17127 * configure: Regenerated.
17128
db1d3e1b
AS
171292004-11-21 Andreas Schwab <schwab@suse.de>
17130
17131 * linux-m68k-low.c (m68k_num_gregs): Define.
17132 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17133 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17134 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17135 (m68k_breakpoint_at): New. Add to the_low_target.
17136
17137 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17138 srv_linux_thread_db to yes.
17139
43360365
JB
171402004-10-20 Joel Brobecker <brobecker@gnat.com>
17141
17142 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17143 (ARCH_SET_FS): Likewise.
17144 (ARCH_GET_FS): Likewise.
17145 (ARCH_GET_GS): Likewise.
17146
fd500816
DJ
171472004-10-16 Daniel Jacobowitz <dan@debian.org>
17148
17149 * linux-i386-low.c (ps_get_thread_area): New.
17150 * linux-x86-64-low.c (ps_get_thread_area): New.
17151 * linux-low.c: Include <sys/syscall.h>.
17152 (linux_kill_one_process): Don't kill the first thread here.
17153 (linux_kill): Kill the first thread here.
17154 (kill_lwp): New function.
17155 (send_sigstop, linux_send_signal): Use it.
17156 * proc-service.c: Clean up #ifdefs.
17157 (fpregset_info): Delete.
17158 (ps_lgetregs): Update and enable implementation.
17159 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17160 implementations.
17161 * remote-utils.c (struct sym_cache, symbol_cache): New.
17162 (input_interrupt): Print a clearer message.
17163 (async_io_enabled): New variable.
17164 (enable_async_io, disable_async_io): Use it. Update comments.
17165 (look_up_one_symbol): Use the symbol cache.
17166 * thread-db.c (thread_db_look_up_symbols): New function.
17167 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17168
f6de3c42
DJ
171692004-10-16 Daniel Jacobowitz <dan@debian.org>
17170
17171 * configure.in: Test for -rdynamic.
17172 * configure: Regenerated.
17173 * Makefile (INTERNAL_LDFLAGS): New.
17174 (gdbserver, gdbreplay): Use it.
17175
2c0fc042
AC
171762004-09-02 Andrew Cagney <cagney@gnu.org>
17177
17178 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17179
075b3282
DJ
171802004-03-23 Daniel Jacobowitz <drow@mvista.com>
17181
17182 * linux-low.c (linux_wait): Clear all_processes list also.
17183
fa6a77dc
DJ
171842004-03-12 Daniel Jacobowitz <drow@mvista.com>
17185
17186 * linux-low.c: Include <errno.h>. Remove extern declaration of
17187 errno.
17188
6d782a97
DJ
171892004-03-12 Daniel Jacobowitz <drow@mvista.com>
17190
17191 * gdbreplay.c, server.h, utils.c: Update copyright years.
17192
3a7fb99b
DJ
171932004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17194
17195 * server.c (main): Print child status or termination signal from
17196 variable 'signal', not 'sig'.
17197
c3e735a6
DJ
171982004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17199
17200 * linux-low.c (linux_read_memory): Change return type to
17201 int. Check for and return error from ptrace().
17202 * target.c (read_inferior_memory): Change return type to int. Pass
17203 back return status from the_target->read_memory().
17204 * target.h (struct target_ops): Adapt *read_memory() prototype.
17205 Update comment.
17206 (read_inferior_memory): Adapt prototype.
17207 * server.c (main): Return an error packet if
17208 read_inferior_memory() returns an error.
17209
a59d1c82
DJ
172102004-03-04 Daniel Jacobowitz <drow@mvista.com>
17211
17212 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17213 Unify with other clean targets.
17214
dc3f8883
DJ
172152004-02-29 Daniel Jacobowitz <drow@mvista.com>
17216
17217 * server.c (handle_v_cont): Call set_desired_inferior.
17218
89a208da
DJ
172192004-02-29 Daniel Jacobowitz <drow@mvista.com>
17220
17221 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17222
62ea82f5
DJ
172232004-02-29 Daniel Jacobowitz <drow@mvista.com>
17224
17225 * linux-low.c (linux_wait): Unblock async I/O.
17226 (linux_resume): Block and enable async I/O.
17227 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17228 * server.h (block_async_io, unblock_async_io): Add prototypes.
17229
6910d122
DJ
172302004-02-29 Daniel Jacobowitz <drow@mvista.com>
17231
17232 * remote-utils.c (remote_open): Print a status notice after
17233 opening a TCP port.
17234 * server.c (attach_inferior): Print a status notice after
17235 attaching.
17236
172372004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17238
17239 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17240
c89dc5d4
DJ
172412004-02-26 Daniel Jacobowitz <drow@mvista.com>
17242
17243 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17244 error packet.
17245 * server.c, target.h: Update copyright years.
17246
4b8dad4a
RM
172472004-02-25 Roland McGrath <roland@redhat.com>
17248
17249 * target.h (struct target_ops): New member `read_auxv'.
17250 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17251 * linux-low.c (linux_read_auxv): New function.
17252 (linux_target_ops): Initialize `read_auxv' member to that.
17253
d7446758
JB
172542004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17255
17256 Committed by Jim Blandy <jimb@redhat.com>.
17257
17258 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17259 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17260 instead of GPR_SIZE to distiguish s390 and s390x targets.
17261
5544ad89
DJ
172622004-01-31 Daniel Jacobowitz <drow@mvista.com>
17263
17264 * linux-low.c: Update copyright year.
17265 (check_removed_breakpoint): Clear pending_is_breakpoint.
17266 (linux_set_resume_request, linux_queue_one_thread)
17267 (resume_status_pending_p): New functions.
17268 (linux_continue_one_thread): Use process->resume.
17269 (linux_resume): Only resume threads if there are no pending events.
17270 * linux-low.h (struct process_info): Add resume request
17271 pointer.
17272
2a68b70e
DJ
172732004-01-30 Daniel Jacobowitz <drow@mvista.com>
17274
17275 * regcache.c (new_register_cache): Clear the allocated register
17276 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17277
64386c31
DJ
172782003-10-13 Daniel Jacobowitz <drow@mvista.com>
17279
17280 * linux-low.c (linux_resume): Take a struct thread_resume *
17281 argument.
17282 (linux_wait): Update call.
17283 (resume_ptr): New static variable.
17284 (linux_continue_one_thread): Renamed from
17285 linux_continue_one_process. Use resume_ptr.
17286 (linux_resume): Use linux_continue_one_thread.
17287 * server.c (handle_v_cont, handle_v_requests): New functions.
17288 (myresume): New function.
17289 (main): Handle 'v' case.
17290 * target.h (struct thread_resume): New type.
17291 (struct target_ops): Change argument of "resume" to struct
17292 thread_resume *.
17293 (myresume): Delete macro.
17294
c938e9b0
L
172952003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17296
17297 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17298 (uninstall): Support DESTDIR.
17299
7f313d07
BC
17300Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17301
17302 * configure.srv: Add xscale*linux copy of arm*linux entry.
17303
3b2fc2ea
DJ
173042003-07-24 Daniel Jacobowitz <drow@mvista.com>
17305
17306 * linux-arm-low.c (arm_reinsert_addr): New function.
17307 (the_low_target): Add arm_reinsert_addr.
17308
1c0a559e
MK
173092003-07-08 Mark Kettenis <kettenis@gnu.org>
17310
17311 * mem-break.c: Remove whitespace at end of file.
17312
43d5792c
DJ
173132003-06-28 Daniel Jacobowitz <drow@mvista.com>
17314
17315 * configure.in: Check whether we need to prototype strerror.
17316 * server.h: Optionally prototype strerror.
17317 * gdbreplay.c (perror_with_name): Use strerror.
17318 * linux-low.c (linux_attach_lwp): Use strerror.
17319 * utils.c (perror_with_name): Use strerror.
17320 * config.in, configure: Regenerated.
17321
c8a86edf
DJ
173222003-06-28 Daniel Jacobowitz <drow@mvista.com>
17323
17324 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17325 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17326
73d37363
DJ
173272003-06-20 Daniel Jacobowitz <drow@mvista.com>
17328
17329 * Makefile.in (SFILES): Update.
17330 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17331 low-sun3.c: Remove files.
17332
6ad8ae5c
DJ
173332003-06-17 Daniel Jacobowitz <drow@mvista.com>
17334
17335 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17336 (linux_detach_one_process, linux_detach): New functions.
17337 (linux_target_ops): Add linux_detach.
17338 * server.c (main): Handle 'D' packet.
17339 * target.h (struct target_ops): Add "detach" member.
17340 (detach_inferior): Define.
17341
1581182a
MK
173422003-06-13 Mark Kettenis <kettenis@gnu.org>
17343
17344 From Kelley Cook <kelleycook@wideopenwest.com>:
17345 * configure.srv: Accept i[34567]86 variants.
17346
e5379b03
DJ
173472003-06-05 Daniel Jacobowitz <drow@mvista.com>
17348
17349 * linux-low.c (linux_wait_for_event): Correct comment typos.
17350 (linux_resume_one_process): Call check_removed_breakpoint.
17351 (linux_send_signal): New function.
17352 (linux_target_ops): Add linux_send_signal.
17353 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17354 of kill.
17355 * target.h (struct target_ops): Add send_signal.
17356
2ff29de4
JB
173572003-05-29 Jim Blandy <jimb@redhat.com>
17358
17359 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17360 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17361 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17362 away part of the register's value.
17363
254787d4
DJ
173642003-03-26 Daniel Jacobowitz <drow@mvista.com>
17365
17366 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17367 (linux_wait_for_event, linux_init_signals): Likewise.
17368
94e10508
DJ
173692003-03-17 Daniel Jacobowitz <drow@mvista.com>
17370
17371 * configure.in: Check for stdlib.h.
17372 * configure: Regenerated.
17373 * config.in: Regenerated.
17374
4c0711e0
DJ
173752003-01-04 Andreas Schwab <schwab@suse.de>
17376
17377 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17378
ef66e766
AC
173792003-01-02 Andrew Cagney <ac131313@redhat.com>
17380
17381 * Makefile.in: Remove obsolete code.
17382
a1358604
DJ
173832002-11-20 Daniel Jacobowitz <drow@mvista.com>
17384
17385 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17386 defined(PT_FPR0_HI).
17387
23ce3b1c
DJ
173882002-11-17 Stuart Hughes <seh@zee2.com>
17389
17390 * linux-arm-low.c (arm_num_regs): Increase.
17391 (arm_regmap): Include status register.
17392
173932002-11-17 Daniel Jacobowitz <drow@mvista.com>
17394
17395 * linux-low.c (register_addr): Remove incorrect -1 check.
17396
a9fa9f7d
DJ
173972002-08-29 Daniel Jacobowitz <drow@mvista.com>
17398
17399 * linux-low.c (linux_create_inferior): Call setpgid. Return
17400 the new PID.
17401 (unstopped_p, linux_signal_pid): Remove.
17402 (linux_target_ops): Remove linux_signal_pid.
17403 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17404 global instead of target method.
17405 * target.h (struct target_ops): Remove signal_pid. Update comment
17406 for create_inferior.
17407 * server.c (signal_pid): New variable.
17408 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17409 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17410 (attach_inferior): Set signal_pid.
17411
17574093
DJ
174122002-08-23 Daniel Jacobowitz <drow@mvista.com>
17413
17414 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17415
174162002-08-20 Jim Blandy <jimb@redhat.com>
17417
17418 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17419 default for this.
17420
174212002-08-01 Andrew Cagney <cagney@redhat.com>
17422
17423 * Makefile.in: Make chill references obsolete.
17424
174252002-07-24 Kevin Buettner <kevinb@redhat.com>
17426
17427 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17428 * configure: Regenerate.
17429 * config.in: Regenerate.
17430
174312002-07-09 David O'Brien <obrien@FreeBSD.org>
17432
17433 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17434 (perror_with_name, remote_close, remote_open, expect, play): Static.
17435
174362002-07-04 Michal Ludvig <mludvig@suse.cz>
17437
4b8dad4a 17438 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17439 byte offsets instead of an array of indexes.
17440 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17441
174422002-06-13 Daniel Jacobowitz <drow@mvista.com>
17443
17444 * regcache.c: Add comment.
17445
174462002-06-11 Daniel Jacobowitz <drow@mvista.com>
17447
17448 * thread-db.c: New file.
17449 * proc-service.c: New file.
17450 * acinclude.m4: New file.
17451 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17452 proc-service.o, and thread-db.o.
17453 (linux-low.o): Add USE_THREAD_DB.
17454 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17455 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17456 * aclocal.m4: Regenerated.
17457 * config.in: Regenerated.
17458 * configure: Regenerated.
17459 * configure.in: Check for proc_service.h, sys/procfs.h,
17460 thread_db.h, and linux/elf.h headrs.
17461 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17462 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17463 Check for -lthread_db and thread support.
17464 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17465 PowerPC, and SuperH.
17466 * i387-fp.c: Constify arguments.
17467 * i387-fp.h: Likewise.
17468 * inferiors.c: (struct thread_info): Renamed from
17469 `struct inferior_info'. Remove PID member. Use generic inferior
17470 list header. All uses updated.
17471 (inferiors, signal_pid): Removed.
17472 (all_threads): New variable.
17473 (get_thread): Define.
17474 (add_inferior_to_list): New function.
17475 (for_each_inferior): New function.
17476 (change_inferior_id): New function.
17477 (add_inferior): Removed.
17478 (remove_inferior): New function.
17479 (add_thread): New function.
17480 (free_one_thread): New function.
17481 (remove_thread): New function.
17482 (clear_inferiors): Use for_each_inferior and free_one_thread.
17483 (find_inferior): New function.
17484 (find_inferior_id): New function.
17485 (inferior_target_data): Update argument type.
17486 (set_inferior_target_data): Likewise.
17487 (inferior_regcache_data): Likewise.
17488 (set_inferior_regcache_data): Likewise.
17489 * linux-low.c (linux_bp_reinsert): Remove.
17490 (all_processes, stopping_threads, using_thrads)
17491 (struct pending_signals, debug_threads, pid_of): New.
17492 (inferior_pid): Replace with macro.
17493 (struct inferior_linux_data): Remove.
17494 (get_stop_pc, add_process): New functions.
17495 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17496 Use add_process and add_thread.
17497 (linux_attach_lwp): New function, based on old linux_attach. Use
17498 add_process and add_thread. Set stop_expected for new threads.
17499 (linux_attach): New function.
17500 (linux_kill_one_process): New function.
17501 (linux_kill): Kill all LWPs.
17502 (linux_thread_alive): Use find_inferior_id.
17503 (check_removed_breakpoints, status_pending_p): New functions.
17504 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17505 Update. Use WNOHANG. Wait for cloned processes also. Update process
17506 struct for the found process.
17507 (linux_wait_for_event): New function.
17508 (linux_wait): Use it. Support LWPs.
17509 (send_sigstop, wait_for_sigstop, stop_all_processes)
17510 (linux_resume_one_process, linux_continue_one_process): New functions.
17511 (linux_resume): Support LWPs.
17512 (REGISTER_RAW_SIZE): Remove.
17513 (fetch_register): Use register_size instead. Call supply_register.
17514 (usr_store_inferior_registers): Likewise. Call collect_register.
17515 Fix recursive case.
17516 (regsets_fetch_inferior_registers): Improve error message.
17517 (regsets_store_inferior_registers): Add debugging.
17518 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17519 (unstopped_p, linux_signal_pid): New functions.
17520 (linux_target_ops): Add linux_signal_pid.
17521 (linux_init_signals): New function.
17522 (initialize_low): Call it. Initialize using_threads.
17523 * regcache.c (inferior_regcache_data): Add valid
17524 flag.
17525 (get_regcache): Fetch registers lazily. Add fetch argument
17526 and update all callers.
17527 (regcache_invalidate_one, regcache_invalidate): New
17528 functions.
17529 (new_register_cache): Renamed from create_register_cache.
17530 Return the new regcache.
17531 (free_register_cache): Change argument to a void *.
17532 (registers_to_string, registers_from_string): Call get_regcache
17533 with fetch flag set.
17534 (register_data): Make static. Pass fetch flag to get_regcache.
17535 (supply_register): Call get_regcache with fetch flag clear.
17536 (collect_register): Call get_regcache with fetch flag set.
17537 (collect_register_as_string): New function.
17538 * regcache.h: Update.
17539 * remote-utils.c (putpkt): Flush after debug output and use
17540 stderr.
17541 Handle input interrupts while waiting for an ACK.
17542 (input_interrupt): Use signal_pid method.
17543 (getpkt): Flush after debug output and use stderr.
17544 (outreg): Use collect_register_as_string.
17545 (new_thread_notify, dead_thread_notify): New functions.
17546 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17547 and general_thread.
17548 (look_up_one_symbol): Flush after debug output.
17549 * server.c (step_thread, server_waiting): New variables.
17550 (start_inferior): Don't use signal_pid. Update call to mywait.
17551 (attach_inferior): Update call to mywait.
17552 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17553 (main): Don't fetch/store registers explicitly. Use
17554 set_desired_inferior. Support proposed ``Hs'' packet. Update
17555 calls to mywait.
17556 * server.h: Update.
17557 (struct inferior_list, struct_inferior_list_entry): New.
17558 * target.c (set_desired_inferior): New.
17559 (write_inferior_memory): Constify.
17560 (mywait): New function.
17561 * target.h: Update.
17562 (struct target_ops): New signal_pid method.
17563 (mywait): Removed macro, added prototype.
17564
17565 * linux-low.h (regset_func): Removed.
17566 (regset_fill_func, regset_store_func): New.
17567 (enum regset_type): New.
17568 (struct regset_info): Add type field. Use new operation types.
17569 (struct linux_target_ops): stop_pc renamed to get_pc.
17570 Add decr_pc_after_break and breakpoint_at.
17571 (get_process, get_thread_proess, get_process_thread)
17572 (strut process_info, all_processes, linux_attach_lwp)
17573 (thread_db_init): New.
17574
17575 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17576 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17577 (the_low_target): Add new members.
17578 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17579 (i386_store_fpxregset): Constify.
17580 (target_regsets): Add new kind identifier.
17581 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17582 (i386_set_pc): Add debugging.
17583 (i386_breakpoint_at): New function.
17584 (the_low_target): Add new members.
17585 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17586 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17587 (mips_breakpoint_at): New.
17588 (the_low_target): Add new members.
17589 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17590 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17591 (the_low_target): Add new members.
17592 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17593 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17594 (the_low_target): Add new members.
17595 * linux-x86-64-low.c (target_regsets): Add new kind
17596 identifier.
17597
175982002-05-15 Daniel Jacobowitz <drow@mvista.com>
17599
17600 From Martin Pool <mbp@samba.org>:
17601 * server.c (gdbserver_usage): New function.
17602 (main): Call it.
17603
176042002-05-14 Daniel Jacobowitz <drow@mvista.com>
17605
17606 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17607 stop_at -> stop_pc.
17608
176092002-05-04 Andrew Cagney <ac131313@redhat.com>
17610
17611 * Makefile.in: Remove obsolete code.
17612
176132002-04-24 Michal Ludvig <mludvig@suse.cz>
17614
17615 * linux-low.c (regsets_fetch_inferior_registers),
17616 (regsets_store_inferior_registers): Removed cast to int from
17617 ptrace() calls.
17618 * regcache.h: Added declaration of struct inferior_info.
17619
176202002-04-20 Daniel Jacobowitz <drow@mvista.com>
17621
17622 * inferiors.c (struct inferior_info): Add regcache_data.
17623 (add_inferior): Call create_register_cache.
17624 (clear_inferiors): Call free_register_cache.
17625 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17626 * regcache.c (struct inferior_regcache_data): New.
17627 (registers): Remove.
17628 (get_regcache): New function.
17629 (create_register_cache, free_register_cache): New functions.
17630 (set_register_cache): Don't initialize the register cache here.
17631 (registers_to_string, registers_from_string, register_data): Call
17632 get_regcache.
17633 * regcache.h: Add prototypes.
17634 * server.h: Likewise.
17635
176362002-04-20 Daniel Jacobowitz <drow@mvista.com>
17637
17638 * mem-break.c: New file.
17639 * mem-break.h: New file.
17640 * Makefile.in: Add mem-break.o rule; update server.h
17641 dependencies.
17642 * inferiors.c (struct inferior_info): Add target_data
17643 member.
17644 (clear_inferiors): Free target_data member if set.
17645 (inferior_target_data, set_inferior_target_data): New functions.
17646 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17647 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17648 * linux-low.c (linux_bp_reinsert): New variable.
17649 (struct inferior_linux_data): New.
17650 (linux_create_inferior): Use set_inferior_target_data.
17651 (linux_attach): Likewise. Call add_inferior.
17652 (linux_wait_for_one_inferior): New function.
17653 (linux_wait): Call it.
17654 (linux_write_memory): Add const.
17655 (initialize_low): Call set_breakpoint_data.
17656 * linux-low.h (struct linux_target_ops): Add breakpoint
17657 handling members.
17658 * server.c (attach_inferior): Remove extra add_inferior
17659 call.
17660 * server.h: Include mem-break.h. Update inferior.c
17661 prototypes.
17662 * target.c (read_inferior_memory)
17663 (write_inferior_memory): New functions.
17664 * target.h (read_inferior_memory)
17665 (write_inferior_memory): Change macros to prototypes.
17666 (struct target_ops): Update comments. Add const to write_memory
17667 definition.
17668
176692002-04-11 Daniel Jacobowitz <drow@mvista.com>
17670
17671 * linux-low.c (usr_store_inferior_registers): Support
17672 registers which are allowed to fail to store.
17673 * linux-low.h (linux_target_ops): Likewise.
17674 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17675 (ppc_cannot_store_register): FPSCR may not be storable.
17676
176772002-04-09 Daniel Jacobowitz <drow@mvista.com>
17678
17679 * server.h: Include <string.h> if HAVE_STRING_H.
17680 * ChangeLog: Correct paths in last ChangeLog entry.
17681
176822002-04-09 Daniel Jacobowitz <drow@mvista.com>
17683
17684 * linux-low.h: Remove obsolete prototypes.
17685 (struct linux_target_ops): New.
17686 (extern the_low_target): New.
17687 * linux-low.c (num_regs, regmap): Remove declarations.
17688 (register_addr): Use the_low_target explicitly.
17689 (fetch_register): Likewise.
17690 (usr_fetch_inferior_registers): Likewise.
17691 (usr_store_inferior_registers): Likewise.
17692 * linux-arm-low.c (num_regs): Remove.
17693 (arm_num_regs): Define.
17694 (arm_regmap): Renamed from regmap, made static.
17695 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17696 made static.
17697 (arm_cannot_store_register): Renamed from cannot_store_register,
17698 made static.
17699 (the_low_target): New.
17700 * linux-i386-low.c (num_regs): Remove.
17701 (i386_num_regs): Define.
17702 (i386_regmap): Renamed from regmap, made static.
17703 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17704 made static.
17705 (i386_cannot_store_register): Renamed from cannot_store_register,
17706 made static.
17707 (the_low_target): New.
17708 * linux-ia64-low.c (num_regs): Remove.
17709 (ia64_num_regs): Define.
17710 (ia64_regmap): Renamed from regmap, made static.
17711 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17712 made static.
17713 (ia64_cannot_store_register): Renamed from cannot_store_register,
17714 made static.
17715 (the_low_target): New.
17716 * linux-m68k-low.c (num_regs): Remove.
17717 (m68k_num_regs): Define.
17718 (m68k_regmap): Renamed from regmap, made static.
17719 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17720 made static.
17721 (m68k_cannot_store_register): Renamed from cannot_store_register,
17722 made static.
17723 (the_low_target): New.
17724 * linux-mips-low.c (num_regs): Remove.
17725 (mips_num_regs): Define.
17726 (mips_regmap): Renamed from regmap, made static.
17727 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17728 made static.
17729 (mips_cannot_store_register): Renamed from cannot_store_register,
17730 made static.
17731 (the_low_target): New.
17732 * linux-ppc-low.c (num_regs): Remove.
17733 (ppc_num_regs): Define.
17734 (ppc_regmap): Renamed from regmap, made static.
17735 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17736 made static.
17737 (ppc_cannot_store_register): Renamed from cannot_store_register,
17738 made static.
17739 (the_low_target): New.
17740 * linux-s390-low.c (num_regs): Remove.
17741 (s390_num_regs): Define.
17742 (s390_regmap): Renamed from regmap, made static.
17743 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17744 made static.
17745 (s390_cannot_store_register): Renamed from cannot_store_register,
17746 made static.
17747 (the_low_target): New.
17748 * linux-sh-low.c (num_regs): Remove.
17749 (sh_num_regs): Define.
17750 (sh_regmap): Renamed from regmap, made static.
17751 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17752 made static.
17753 (sh_cannot_store_register): Renamed from cannot_store_register,
17754 made static.
17755 (the_low_target): New.
17756 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17757 (the_low_target): New.
17758
177592002-04-09 Daniel Jacobowitz <drow@mvista.com>
17760
17761 * Makefile.in: Add stamp-h target.
17762 * configure.in: Create stamp-h.
17763 * configure: Regenerated.
17764
177652002-04-09 Daniel Jacobowitz <drow@mvista.com>
17766
17767 * inferiors.c: New file.
17768 * target.c: New file.
17769 * target.h: New file.
17770 * Makefile.in: Add target.o and inferiors.o. Update
17771 dependencies.
17772 * linux-low.c (inferior_pid): New static variable,
17773 moved from server.c.
17774 (linux_create_inferior): Renamed from create_inferior.
17775 Call add_inferior. Return 0 on success instead of a PID.
17776 (linux_attach): Renamed from myattach.
17777 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17778 (linux_thread_alive): Renamed from mythread_alive.
17779 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17780 child dies.
17781 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17782 (regsets_store_inferior_registers): Correct error message.
17783 Add missing ``return 0''.
17784 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17785 (linux_store_registers): Renamed from store_inferior_registers.
17786 (linux_read_memory): Renamed from read_inferior_memory.
17787 (linux_write_memory): Renamed from write_inferior_memory.
17788 (linux_target_ops): New structure.
17789 (initialize_low): Call set_target_ops ().
17790 * remote-utils.c (unhexify): New function.
17791 (hexify): New function.
17792 (input_interrupt): Send signals to ``signal_pid''.
17793 * server.c (inferior_pid): Remove.
17794 (start_inferior): Update create_inferior call.
17795 (attach_inferior): Call add_inferior.
17796 (handle_query): New function.
17797 (main): Call handle_query for `q' packets.
17798 * server.h: Include "target.h". Remove obsolete prototypes.
17799 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17800
178012002-04-09 Daniel Jacobowitz <drow@mvista.com>
17802
17803 * Makefile.in: Add WARN_CFLAGS. Update configury
17804 dependencies.
17805 * configure.in: Check for <string.h>
17806 * configure: Regenerate.
17807 * config.in: Regenerate.
17808 * gdbreplay.c: Include needed system headers.
17809 (remote_open): Remove strchr prototype.
17810 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17811 * regcache.c (supply_register): Change buf argument to const void *.
17812 (supply_register_by_name): Likewise.
17813 (collect_register): Change buf argument to void *.
17814 (collect_register_by_name): Likewise.
17815 * regcache.h: Add missing prototypes.
17816 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17817 * server.c (handle_query): New function.
17818 (attached): New static variable, moved out of main.
17819 (main): Quiet longjmp clobber warnings.
17820 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17821 * utils.c (error): Remove NORETURN.
17822 (fatal): Likewise.
This page took 2.213702 seconds and 4 git commands to generate.