gdb/gdbserver: Remove reference to vec-ipa.o
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * Makefile.in: Remove references to vec-ipa.o.
4
5 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
6
7 * Makefile.in: Remove references to vec.c.
8
9 2019-10-02 Christian Biesinger <cbiesinger@google.com>
10
11 * server.c (server_waiting): Change to bool.
12 (extended_protocol): Likewise.
13 (response_needed): Likewise.
14 (exit_requested): Likewise.
15 (run_once): Likewise.
16 (report_no_resumed): Likewise.
17 (non_stop): Likewise.
18 (disable_packet_vCont): Likewise.
19 (disable_packet_Tthread): Likewise.
20 (disable_packet_qC): Likewise.
21 (disable_packet_qfThreadInfo): Likewise.
22 (handle_general_set): Update.
23 (handle_detach): Update.
24 (handle_monitor_command): Update.
25 (handle_query): Update.
26 (captured_main): Update.
27 (process_serial_event): Update.
28 * server.h (server_waiting): Change to bool.
29 (disable_packet_vCont): Likewise.
30 (disable_packet_Tthread): Likewise.
31 (disable_packet_qC): Likewise.
32 (disable_packet_qfThreadInfo): Likewise.
33 (run_once): Likewise.
34 (non_stop): Likewise.
35 * target.c (target_stop_and_wait): Update.
36
37 2019-10-02 Tom Tromey <tromey@adacore.com>
38
39 * Makefile.in (SFILES): Add common-inferior.c.
40 (OBS): Add common-inferior.o.
41 * server.c (startup_with_shell): Don't define.
42
43 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
44
45 * linux-low.c (linux_low_read_btrace): Update for change to
46 std::vector.
47
48 2019-09-20 Christian Biesinger <cbiesinger@google.com>
49
50 * debug.c (debug_threads): Remove comment in favor of the header.
51 * debug.h (using_threads): Add declaration.
52 (debug_threads): Add comment.
53 * linux-aarch64-low.c: Include debug.h and remove declaration of
54 debug_threads.
55 * nto-low.c: Likewise.
56 * remote-utils.c: Likewise.
57 * thread-db.c: Likewise.
58
59 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
60
61 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
62 and powerpc-cell64l-ipa.o.
63 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
64 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
65 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
66 (spu*-*-*): Remove.
67
68 * spu-low.c: Remove file.
69
70 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
71 (parse_spufs_run): Remove.
72 (ppc_get_pc): Remove Cell/B.E. support.
73 (ppc_set_pc): Likewise.
74 (ppc_breakpoint_at): Likewise.
75 (ppc_arch_setup): Likewise.
76 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
77 tdesc_powerpc_cell32l.
78 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
79 or init_registers_powerpc_cell32l.
80 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
81 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
82 or init_registers_powerpc_cell32l.
83 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
84 (init_registers_powerpc_cell32l): Remove prototype.
85 (init_registers_powerpc_cell64l): Likewise.
86
87 * target.h (struct target_ops): Remove qxfer_spu member.
88 * server.c (handle_qxfer_spu): Remove.
89 (qxfer_packets): Remove entry for "spu".
90 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
91 * linux-low.c (SPUFS_MAGIC): Remove.
92 (spu_enumerate_spu_ids): Remove.
93 (linux_qxfer_spu): Remove.
94 (linux_target_ops): Remove qxfer_spu member.
95 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
96 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
97 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
98
99 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
100
101 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
102 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
103 * config.in: Regenerate.
104 * configure: Regenerate.
105
106 2019-08-15 Tom Tromey <tromey@adacore.com>
107
108 * target.c (target_write_memory): Use gdb::byte_vector.
109
110 2019-08-15 Tom Tromey <tromey@adacore.com>
111
112 * tracepoint.c (write_inferior_data_pointer)
113 (write_inferior_integer, write_inferior_int8)
114 (write_inferior_uinteger, m_tracepoint_action_download)
115 (r_tracepoint_action_download, x_tracepoint_action_download)
116 (l_tracepoint_action_download, clear_inferior_trace_buffer)
117 (download_agent_expr, download_tracepoint_1)
118 (download_trace_state_variables, upload_fast_traceframes): Update.
119 * server.c (gdb_write_memory): Update.
120 * remote-utils.c (relocate_instruction): Update.
121 * proc-service.c (ps_pdwrite): Update.
122 * mem-break.c (remove_memory_breakpoint)
123 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
124 (uninsert_fast_tracepoint_jumps_at)
125 (reinsert_fast_tracepoint_jumps_at): Update.
126 * linux-x86-low.c (append_insns)
127 (i386_install_fast_tracepoint_jump_pad)
128 (amd64_write_goto_address, i386_write_goto_address): Update.
129 * linux-s390-low.c (append_insns, s390_write_goto_address):
130 Update.
131 * linux-ppc-low.c (ppc_relocate_instruction)
132 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
133 (ppc_write_goto_address): Update.
134 * linux-aarch64-low.c (append_insns): Update.
135 * target.h (struct target_ops): Update.
136 (write_inferior_memory): Don't declare.
137 * target.c (target_write_memory): Rename from
138 write_inferior_memory. Remove old target_write_memory.
139
140 2019-08-15 Tom Tromey <tromey@adacore.com>
141
142 * target.c (write_inferior_memory): Use std::vector.
143
144 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
145
146 PR build/24886
147 * configure.ac: Drop enable-libmcheck support.
148 * configure, config.in: Rebuild.
149 * acinclude.m4: Don't include it.
150
151 2019-07-19 Alan Hayward <alan.hayward@arm.com>
152
153 * configure.srv: Remove Arm xml files.
154
155 2019-07-19 Alan Hayward <alan.hayward@arm.com>
156
157 * configure.srv: Add new files. Remove xml generated files.
158 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
159 registers.
160 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
161 * linux-aarch32-tdesc.c: New file.
162 * linux-aarch32-tdesc.h: New file.
163 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
164 * linux-arm-low.c (init_registers_arm, tdesc_arm)
165 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
166 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
167 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
168 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
169 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
170 (arm_read_description): Call arm_linux_read_description.
171 (initialize_low_arch): Don't init registers.
172 * linux-arm-tdesc.c: New file.
173 * linux-arm-tdesc.h: New file.
174
175 2019-07-10 Alan Hayward <alan.hayward@arm.com>
176
177 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
178 Move counter inside for.
179 (arm_read_description): Check ptrace earlier.
180 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
181
182 2019-07-09 Tom Tromey <tom@tromey.com>
183
184 * configure: Rebuild.
185 * configure.ac: Change common to gdbsupport.
186 * acinclude.m4: Change common to gdbsupport.
187 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
188 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
189 common to gdbsupport.
190 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
191 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
192 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
193 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
194 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
195 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
196 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
197 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
198 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
199 common to gdbsupport.
200
201 2019-07-04 Alan Hayward <alan.hayward@arm.com>
202
203 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
204 defines.
205 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
206
207 2019-07-04 Alan Hayward <alan.hayward@arm.com>
208
209 * configure.srv: Remove legacy xml.
210 * linux-aarch64-low.c (initialize_low_arch): Remove
211 initialize_low_tdesc call.
212 * linux-aarch64-tdesc-selftest.c: Remove file.
213 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
214 * linux-x86-low.c (initialize_low_arch): Remove
215 initialize_low_tdesc call.
216 * linux-x86-tdesc-selftest.c: Remove file.
217 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
218
219 2019-06-20 Tom de Vries <tdevries@suse.de>
220
221 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
222 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
223
224 2019-06-19 Tom de Vries <tdevries@suse.de>
225
226 * debug.h (debug_write): Change return type to ssize_t.
227 * debug.c (debug_write): Same.
228
229 2019-06-14 Tom Tromey <tom@tromey.com>
230
231 * configure.ac: Use new path to gnulib.
232 * configure: Rebuild.
233 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
234 to gnulib.
235
236 2019-06-11 Tom Tromey <tom@tromey.com>
237
238 * Makefile.in (SFILES): Add alloc.c.
239 (OBS): Add alloc.o.
240 (IPA_OBJS): Add alloc-ipa.o.
241 (alloc-ipa.o): New target.
242 (%.o: ../%.c): New pattern rule.
243
244 2019-06-10 Tom Tromey <tromey@adacore.com>
245
246 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
247 end warning with a newline.
248 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
249 newline.
250 * thread-db.c (attach_thread): Don't end warning with a newline.
251 (thread_db_notice_clone): Likewise.
252 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
253 newline.
254 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
255 end warning with a newline.
256
257 2019-06-04 Pedro Alves <palves@redhat.com>
258
259 * server.c (captured_main): Use make_unique_xstrdup.
260
261 2019-06-02 Tom Tromey <tom@tromey.com>
262
263 * gdbreplay.c (fromhex): Remove.
264 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
265
266 2019-05-29 Tom Tromey <tromey@adacore.com>
267
268 * configure: Rebuild.
269
270 2019-05-06 Kevin Buettner <kevinb@redhat.com>
271
272 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
273 sign extension code on 32-bit builds.
274
275 2019-05-03 Eli Zaretskii <eliz@gnu.org>
276
277 * remote-utils.c:
278 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
279
280 2019-04-19 Tom Tromey <tom@tromey.com>
281
282 * server.c (struct vstop_notif): Derive from notif_event.
283 <base>: Remove.
284 (queue_stop_reply): Update.
285 (remove_all_on_match_ptid): Change type. Rewrite.
286 (discard_queued_stop_replies): Rewrite.
287 (in_queued_stop_replies_ptid): Change type.
288 (in_queued_stop_replies): Rewrite.
289 (notif_stop): Update.
290 (queue_stop_reply_callback): Update.
291 (captured_main): Don't call initialize_notif.
292 (push_stop_notification): Update.
293 * notif.c (notif_write_event, handle_notif_ack)
294 (notif_event_enque, notif_push): Update.
295 (notif_event_xfree, initialize_notif): Remove.
296 * notif.h (struct notif_event): Include <list>, not
297 "common/queue.h".
298 (struct notif_server) <queue>: Now a std::list.
299 (notif_event_p): Remove typedef.
300 (initialize_notif): Don't declare.
301 (struct notif_event): Add virtual destructor.
302
303 2019-04-17 Alan Hayward <alan.hayward@arm.com>
304
305 * ax.c (ax_vdebug): Call debug_printf.
306 * debug.c (debug_write): New function.
307 * debug.h (debug_write): New declaration.
308 * linux-low.c (sigchld_handler): Call debug_write.
309
310 2019-04-17 Alan Hayward <alan.hayward@arm.com>
311
312 * debug.c (debug_set_output): New function.
313 (debug_vprintf): Send output to debug_file.
314 (debug_flush): Likewise.
315 * debug.h (debug_set_output): New declaration.
316 * server.c (handle_monitor_command): Add debug-file option.
317 (captured_main): Likewise.
318
319 2019-04-17 Alan Hayward <alan.hayward@arm.com>
320
321 * debug.c (remote_debug): Add definition.
322 * debug.h (remote_debug): Add declaration.
323 * hostio.c (remote_debug): Remove declaration.
324 * remote-utils.c (struct ui_file): Likewise.
325 (remote_debug): Likewise.
326 * remote-utils.h (remote_debug): Likewise,
327 * server.c (remote_debug): Remove definition.
328
329 2019-04-10 Kevin Buettner <kevinb@redhat.com>
330
331 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
332 when using a 64-bit gdbserver.
333
334 2019-04-09 Tom Tromey <tromey@adacore.com>
335
336 * linux-low.c (select_event_lwp): Use find_thread_in_random.
337
338 2019-04-08 Tom Tromey <tom@tromey.com>
339
340 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
341 throw.
342 (linux_resume_one_lwp): Likewise.
343
344 2019-04-08 Tom Tromey <tom@tromey.com>
345
346 * gdbreplay.c: Update.
347 * linux-low.c: Update.
348 * server.c: Update.
349
350 2019-04-08 Tom Tromey <tom@tromey.com>
351
352 * server.c: Use C++ exception handling.
353 * linux-low.c: Use C++ exception handling.
354 * gdbreplay.c: Use C++ exception handling.
355
356 2019-04-08 Tom Tromey <tom@tromey.com>
357
358 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
359 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
360 (captured_main, main): Update.
361 * gdbreplay.c (main): Update.
362
363 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
364
365 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
366 value in argument pointer, return 1 if the entry is found and 0
367 otherwise. Move comment.
368 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
369 * linux-low.h (linux_get_auxv): Declare.
370 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
371
372 2019-04-05 Tom Tromey <tromey@adacore.com>
373
374 * server.c (gdbserver_usage): Use upper-case for metasyntactic
375 variables.
376
377 2019-03-28 Alan Hayward <alan.hayward@arm.com>
378
379 * linux-low.c (AT_HWCAP2): Add define if not already included.
380
381 2019-03-26 Alan Hayward <alan.hayward@arm.com>
382
383 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
384 (aarch64_arch_setup): Call linux_get_hwcap.
385 * linux-arm-low.c (arm_get_hwcap): Remove function.
386 (arm_read_description): Call linux_get_hwcap.
387 * linux-low.c (linux_get_auxv): New function.
388 (linux_get_hwcap): Likewise.
389 (linux_get_hwcap2): Likewise.
390 * linux-low.h (linux_get_hwcap): New declaration.
391 (linux_get_hwcap2): Likewise.
392 * linux-ppc-low.c (ppc_get_auxv): Remove function.
393 (ppc_arch_setup): Call linux_get_hwcap.
394 * linux-s390-low.c (s390_get_hwcap): Remove function.
395 (s390_arch_setup): Call linux_get_hwcap.
396
397 2019-03-22 Alan Hayward <alan.hayward@arm.com>
398 Jiong Wang <jiong.wang@arm.com>
399
400 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
401 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
402 to fail.
403 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
404
405 2019-03-22 Alan Hayward <alan.hayward@arm.com>
406 Jiong Wang <jiong.wang@arm.com>
407
408 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
409 (aarch64_get_hwcap): New function.
410 (aarch64_arch_setup): Read APIA hwcap.
411
412 2019-03-22 Alan Hayward <alan.hayward@arm.com>
413 Jiong Wang <jiong.wang@arm.com>
414
415 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
416 (initialize_low_tracepoint): Likewise.
417 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
418 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
419 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
420 (aarch64_linux_read_description): Likewise.
421 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
422
423 2019-03-12 John Baldwin <jhb@FreeBSD.org>
424
425 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
426 i386_create_target_description for 'segments' parameter.
427 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
428 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
429 * win32-i386-low.c (i386_arch_setup): Likewise.
430
431 2019-03-12 Tom Tromey <tromey@adacore.com>
432
433 * linux-low.c (iterate_over_lwps): Update.
434
435 2019-03-06 Tom Tromey <tom@tromey.com>
436
437 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
438 (captured_main): Use SCOPE_EXIT.
439
440 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
441
442 * configure.srv: Use '$enable_unittest' instead of '$development'
443 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
444 case.
445
446 2019-02-27 Tom Tromey <tromey@adacore.com>
447
448 * gdbreplay.c (logchar): Handle \r\n.
449
450 2019-02-07 Alan Hayward <alan.hayward@arm.com>
451
452 * linux-low.c (linux_attach): Add process before lwp.
453 * server.c (attach_inferior): Check if already attached.
454
455 2019-02-07 Tom Tromey <tom@tromey.com>
456
457 * x86-tdesc.h: Rename include guard.
458 * x86-low.h: Add include guard.
459 * wincecompat.h: Rename include guard.
460 * win32-low.h: Add include guard.
461 * utils.h: Rename include guard.
462 * tracepoint.h: Rename include guard.
463 * tdesc.h: Rename include guard.
464 * target.h: Rename include guard.
465 * server.h: Rename include guard.
466 * remote-utils.h: Rename include guard.
467 * regcache.h: Rename include guard.
468 * nto-low.h: Rename include guard.
469 * notif.h: Add include guard.
470 * mem-break.h: Rename include guard.
471 * lynx-low.h: Add include guard.
472 * linux-x86-tdesc.h: Add include guard.
473 * linux-s390-tdesc.h: Add include guard.
474 * linux-ppc-tdesc-init.h: Add include guard.
475 * linux-low.h: Add include guard.
476 * linux-aarch64-tdesc.h: Add include guard.
477 * linux-aarch32-low.h: Add include guard.
478 * inferiors.h: Rename include guard.
479 * i387-fp.h: Rename include guard.
480 * hostio.h: Rename include guard.
481 * gdbthread.h: Rename include guard.
482 * gdb_proc_service.h: Rename include guard.
483 * event-loop.h: Rename include guard.
484 * dll.h: Rename include guard.
485 * debug.h: Rename include guard.
486 * ax.h: Rename include guard.
487
488 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
489
490 PR gdb/23985
491 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
492 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
493
494 2019-01-25 Tom Tromey <tom@tromey.com>
495
496 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
497
498 2019-01-25 Tom Tromey <tom@tromey.com>
499
500 * win32-low.c: Fix common/ includes.
501 * win32-i386-low.c: Fix common/ includes.
502 * tracepoint.c: Fix common/ includes.
503 * thread-db.c: Fix common/ includes.
504 * target.h: Fix common/ includes.
505 * symbol.c: Fix common/ includes.
506 * spu-low.c: Fix common/ includes.
507 * server.h: Fix common/ includes.
508 * server.c: Fix common/ includes.
509 * remote-utils.c: Fix common/ includes.
510 * regcache.h: Fix common/ includes.
511 * regcache.c: Fix common/ includes.
512 * nto-x86-low.c: Fix common/ includes.
513 * notif.h: Fix common/ includes.
514 * mem-break.h: Fix common/ includes.
515 * lynx-low.c: Fix common/ includes.
516 * lynx-i386-low.c: Fix common/ includes.
517 * linux-x86-tdesc-selftest.c: Fix common/ includes.
518 * linux-x86-low.c: Fix common/ includes.
519 * linux-low.c: Fix common/ includes.
520 * inferiors.h: Fix common/ includes.
521 * i387-fp.c: Fix common/ includes.
522 * hostio.c: Fix common/ includes.
523 * hostio-errno.c: Fix common/ includes.
524 * gdbthread.h: Fix common/ includes.
525 * gdbreplay.c: Fix common/ includes.
526 * fork-child.c: Fix common/ includes.
527 * event-loop.c: Fix common/ includes.
528 * ax.c:
529 (enum gdb_agent_op): Fix common/ includes.
530
531 2019-01-21 Tom Tromey <tom@tromey.com>
532
533 * tracepoint.c: Fix includes.
534 * remote-utils.c: Fix includes.
535 * linux-x86-low.c: Fix includes.
536
537 2019-01-01 Joel Brobecker <brobecker@adacore.com>
538
539 * gdbreplay.c (gdbreplay_version): Update copyright year in
540 version message.
541 * server.c (gdbserver_version): Likewise.
542
543 2018-12-05 Alan Hayward <alan.hayward@arm.com>
544
545 * linux-low.c (add_lwp): Switch ordering.
546
547 2018-11-29 Tom Tromey <tom@tromey.com>
548
549 * win32-low.c (win32_join): Take pid, not process.
550 * target.h (struct target_ops) <join>: Change argument type.
551 (join_inferior): Change argument name.
552 * spu-low.c (spu_join): Take pid, not process.
553 * server.c (handle_detach): Preserve pid before destroying
554 process.
555 * lynx-low.c (lynx_join): Take pid, not process.
556 * linux-low.c (linux_join): Take pid, not process.
557
558 2018-11-23 Alan Hayward <alan.hayward@arm.com>
559
560 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
561 (aarch64_cannot_fetch_register): Likewise.
562 (struct linux_target_ops): Update references.
563
564 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
565
566 * linux-ppc-low.c: Include nat/linux-ptrace.h.
567
568 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
569
570 * configure.srv (ipa_ppc_linux_regobj): Add
571 powerpc-isa207-htm-vsx32l-ipa.o and
572 powerpc-isa207-htm-vsx64l-ipa.o.
573 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
574 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
575 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
576 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
577 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
578 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
579 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
580 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
581 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
582 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
583 (init_registers_powerpc_isa207_htm_vsx32l)
584 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
585 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
586 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
587 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
588 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
589 (ppc_store_tm_ctarregset): New functions.
590 (ppc_regsets): Add entries for HTM regsets.
591 (ppc_arch_setup): Set htm in features struct when needed. Set
592 sizes for the HTM regsets.
593 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
594 (initialize_low_arch): Call
595 init_registers_powerpc_isa207_htm_vsx32l and
596 init_registers_powerpc_isa207_htm_vsx64l.
597 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
598 PPC_TDESC_ISA207_HTM_VSX.
599 (initialize_low_tracepoint): Call
600 init_registers_powerpc_isa207_htm_vsx32l and
601 init_registers_powerpc_isa207_htm_vsx64l.
602
603 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
604
605 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
606 rs6000/power-linux-pmu.xml to srv_xmlfiles.
607 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
608 (ppc_store_pmuregset): New functions.
609 (ppc_regsets): Add entries for ebb and pmu regsets.
610 (ppc_arch_setup): Set isa207 in features struct if the ebb and
611 pmu regsets are available. Set sizes for these regsets.
612
613 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
614
615 * configure.srv (ipa_ppc_linux_regobj): Add
616 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
617 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
618 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
619 rs6000/powerpc-isa207-vsx32l.xml, and
620 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
621 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
622 <PPC_TDESC_ISA207_VSX>: New enum value.
623 (init_registers_powerpc_isa207_vsx32l): Declare.
624 (init_registers_powerpc_isa207_vsx64l): Declare.
625 * linux-ppc-low.c (ppc_fill_tarregset): New function.
626 (ppc_store_tarregset): New function.
627 (ppc_regsets): Add entry for the TAR regset.
628 (ppc_arch_setup): Set isa207 in features struct when needed. Set
629 size for the TAR regsets.
630 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
631 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
632 and init_registers_powerpc_isa207_vsx64l.
633 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
634 (initialize_low_tracepoint): Call
635 init_registers_powerpc_isa207_vsx32l and
636 init_registers_powerpc_isa207_vsx64l.
637
638 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
639 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
640
641 * configure.srv (ipa_ppc_linux_regobj): Add
642 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
643 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
644 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
645 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
646 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
647 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
648 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
649 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
650 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
651 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
652 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
653 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
654 (ppc_hwcap): Add comment.
655 (ppc_hwcap2): New global.
656 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
657 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
658 (ppc_regsets): Add entries for the DSCR and PPR regsets.
659 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
660 when needed. Set sizes for the the DSCR and PPR regsets.
661 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
662 (initialize_low_arch): Call
663 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
664 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
665 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
666 PPC_TDESC_ISA205_PPR_DSCR_VSX.
667 (initialize_low_tracepoint): Call
668 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
669 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
670
671 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
672
673 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
674
675 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
676 Simon Marchi <simark@simark.ca>
677
678 * acinclude.m4: Include "../selftest.m4".
679 * configure: Regenerate.
680 * configure.ac: Use "GDB_AC_SELFTEST".
681 * configure.srv: Use "$enable_unittests" instead of
682 "$development" when checking whether unit tests have been
683 enabled.
684 * server.c (captured_main): Update message informing that
685 selftests have been disabled.
686
687 2018-10-04 Tom Tromey <tom@tromey.com>
688
689 * configure: Rebuild.
690
691 2018-10-04 Tom Tromey <tom@tromey.com>
692
693 * server.c (handle_status): Rename inner "thread".
694 (process_serial_event): Declare "res" in 'm' case.
695 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
696 (iterate_over_lwps): Rename inner "thread".
697 (linux_qxfer_libraries_svr4): Rename inner "len".
698 * gdbthread.h (find_thread_in_random): Rename inner "thread".
699
700 2018-10-01 Gary Benson <gbenson@redhat.com>
701
702 * gdb_proc_service.h: Moved common code to
703 common/gdb_proc_service.h.
704
705 2018-10-01 Gary Benson <gbenson@redhat.com>
706
707 * gdb_proc_service.h: Synchronize comments and whitespace with
708 GDB's version of this file.
709
710 2018-09-25 Tom Tromey <tom@tromey.com>
711
712 * configure: Rebuild.
713 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
714
715 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
716
717 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
718 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
719 ($(IPA_LIB)): Sort IPA_OBJS.
720
721 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
722
723 * Makefile.in: Remove references to $(ADD_DEPS).
724
725 2018-09-16 Tom Tromey <tom@tromey.com>
726
727 * remote-utils.c (remote_open): Use GNU style for metasyntactic
728 variables.
729 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
730 variables.
731
732 2018-09-05 Tom Tromey <tom@tromey.com>
733
734 * configure: Rebuild.
735
736 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
737
738 PR build/23399
739 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
740
741 2018-08-27 Tom Tromey <tom@tromey.com>
742
743 PR build/23087:
744 * configure: Rebuild.
745
746 2018-08-27 Tom Tromey <tom@tromey.com>
747
748 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
749 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
750 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
751 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
752 (s390x_emit_stack_adjust): Add casts to unsigned char.
753
754 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
755
756 PR gdb/23374
757 PR gdb/23375
758 * server.h (struct client_state) <disable_randomization>:
759 Initialize to 1.
760
761 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
762
763 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
764 variable.
765 (mips_supply_ptrace_register): Likewise.
766
767 2018-07-22 Tom Tromey <tom@tromey.com>
768
769 * configure: Rebuild.
770
771 2018-07-22 Tom Tromey <tom@tromey.com>
772
773 * win32-low.c (win32_create_inferior): Remove unused variables.
774 * gdbreplay.c (remote_open): Remove unused variable.
775 * remote-utils.c (remote_prepare): Remove unused variable.
776 * x86-tdesc.h (X86_TDESC_H): Define.
777 (amd64_expedite_regs): Define conditionally.
778 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
779 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
780 * remote-utils.c (readchar): Remove unused variable.
781
782 2018-07-13 Pedro Alves <palves@redhat.com>
783
784 * linux-low.c (linux_kill): Change parameter to process_info
785 pointer instead of pid. Adjust.
786 * lynx-low.c (lynx_kill): Likewise.
787 * nto-low.c (nto_kill): Likewise.
788 * spu-low.c (spu_kill): Likewise.
789 * win32-low.c (win32_kill): Likewise.
790 * server.c (handle_v_kill, kill_inferior_callback)
791 (detach_or_kill_for_exit): Adjust.
792 * target.c (kill_inferior): Change parameter to process_info
793 pointer instead of pid. Adjust.
794 * target.h (struct target_ops) <kill>: Change parameter to
795 process_info pointer instead of pid. Adjust all implementations
796 and callers.
797 (kill_inferior): Likewise.
798
799 2018-07-13 Pedro Alves <palves@redhat.com>
800
801 * linux-low.c (linux_detach, linux_join): Change parameter to
802 process_info pointer instead of pid. Adjust.
803 * lynx-low.c (lynx_detach, lynx_join): Likewise.
804 * nto-low.c (nto_detach): Likewise.
805 * spu-low.c (spu_detach, spu_join): Likewise.
806 * win32-low.c (win32_detach, win32_join): Likewise.
807 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
808 * target.h (struct target_ops) <detach, join>: Change parameter to
809 process_info pointer instead of pid. Adjust all implementations
810 and callers.
811 (detach_inferior, join_inferior): Rename 'pid' parameter to
812 'proc'.
813
814 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
815 Jan Kratochvil <jan.kratochvil@redhat.com>
816 Paul Fertser <fercerpav@gmail.com>
817 Tsutomu Seki <sekiriki@gmail.com>
818
819 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
820 (OBS): Add 'common/netstuff.o'.
821 (GDBREPLAY_OBS): Likewise.
822 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
823 (remote_open): Implement support for IPv6
824 connections.
825 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
826 and 'wspiapi.h'.
827 (handle_accept_event): Accept connections from IPv6 sources.
828 (remote_prepare): Handle IPv6-style hostnames; implement
829 support for IPv6 connections.
830 (remote_open): Implement support for printing connections from
831 IPv6 sources.
832
833 2018-07-11 Pedro Alves <palves@redhat.com>
834
835 PR gdb/23377
836 * mem-break.c (any_persistent_commands): Add process_info
837 parameter and use it instead of relying on the current process.
838 Change return type to bool.
839 * mem-break.h (any_persistent_commands): Add process_info
840 parameter and change return type to bool.
841 * server.c (handle_detach): Remove require_running_or_return call.
842 Look up the process_info for the process we're about to detach.
843 If not found, return back error to GDB. Adjust
844 any_persistent_commands call to pass down a process pointer.
845
846 2018-07-11 Pedro Alves <palves@redhat.com>
847
848 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
849 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
850 instead of collect_register_by_name.
851 * regcache.c (regcache_raw_get_unsigned_by_name): New.
852 * regcache.h (regcache_raw_get_unsigned_by_name): New.
853
854 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
855 Pedro Alves <palves@redhat.com>
856
857 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
858
859 2018-07-03 Tom Tromey <tom@tromey.com>
860
861 * linux-low.c: Update.
862 * lynx-low.c: Update.
863 * mem-break.c: Update.
864 * nto-low.c: Update.
865 * remote-utils.c: Update.
866 * server.c: Update.
867 * spu-low.c: Update.
868 * target.c: Update.
869 * win32-low.c: Update.
870
871 2018-07-03 Tom Tromey <tom@tromey.com>
872
873 * server.c: Update.
874
875 2018-07-03 Tom Tromey <tom@tromey.com>
876
877 * linux-low.c: Update.
878
879 2018-07-03 Tom Tromey <tom@tromey.com>
880
881 * target.c: Update.
882
883 2018-07-03 Tom Tromey <tom@tromey.com>
884
885 * linux-low.c: Update.
886 * linux-mips-low.c: Update.
887 * lynx-low.c: Update.
888 * nto-low.c: Update.
889 * remote-utils.c: Update.
890 * server.c: Update.
891 * spu-low.c: Update.
892 * target.c: Update.
893 * thread-db.c: Update.
894
895 2018-07-03 Tom Tromey <tom@tromey.com>
896
897 * linux-low.c: Update.
898 * linux-mips-low.c: Update.
899 * lynx-low.c: Update.
900 * mem-break.c: Update.
901 * nto-low.c: Update.
902 * remote-utils.c: Update.
903 * server.c: Update.
904 * spu-low.c: Update.
905 * target.c: Update.
906 * tracepoint.c: Update.
907
908 2018-07-03 Tom Tromey <tom@tromey.com>
909
910 * linux-low.c: Update.
911 * linux-ppc-low.c: Update.
912 * linux-x86-low.c: Update.
913 * proc-service.c: Update.
914 * server.c: Update.
915 * spu-low.c: Update.
916 * thread-db.c: Update.
917 * win32-low.c: Update.
918
919 2018-07-03 Tom Tromey <tom@tromey.com>
920
921 * linux-low.c: Update.
922 * lynx-low.c: Update.
923 * nto-low.c: Update.
924 * remote-utils.c: Update.
925 * spu-low.c: Update.
926 * thread-db.c: Update.
927 * win32-low.c: Update.
928
929 2018-06-29 Joel Brobecker <brobecker@adacore.com>
930
931 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
932 parameter in call to 'amd64_create_target_description'.
933
934 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
935
936 * x86-tdesc.h: Remove executable permission flag.
937
938 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
939
940 * configure.ac: Remove AC_PREREQ, add missing quoting.
941 * configure: Re-generate.
942 * config.in: Re-generate.
943 * aclocal.m4: Re-generate.
944
945 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
946
947 * tracepoint.h (current_traceframe): Remove declaration.
948
949 2018-06-18 Alan Hayward <alan.hayward@arm.com>
950
951 * linux-aarch64-low.c (is_sve_tdesc): New function.
952 (aarch64_sve_regs_copy_to_regcache): Likewise.
953 (aarch64_sve_regs_copy_from_regcache): Likewise.
954 (aarch64_regs_info): Add SVE checks.
955 (initialize_low_arch): Initialize SVE.
956
957 2018-06-18 Alan Hayward <alan.hayward@arm.com>
958
959 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
960
961 2018-06-11 Alan Hayward <alan.hayward@arm.com>
962
963 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
964 (initialize_low_tracepoint): Likewise
965 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
966 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
967 param.
968 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
969 checks.
970 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
971
972 2018-06-11 Alan Hayward <alan.hayward@arm.com>
973
974 * server.h (PBUFSIZ): Increase size
975
976 2018-06-11 Alan Hayward <alan.hayward@arm.com>
977
978 * regcache.c (regcache::raw_compare): New function.
979 * regcache.h (regcache::raw_compare): New declaration.
980
981 2018-06-11 Alan Hayward <alan.hayward@arm.com>
982
983 * regcache.c (new_register_cache): Use new.
984 (free_register_cache): Use delete.
985 (register_data): Use const.
986 (supply_register): Move body inside regcache.
987 (regcache::raw_supply): New override function.
988 (collect_register): Move body inside regcache.
989 (regcache::raw_collect): New override function.
990 (regcache::get_register_status): New override function.
991 * regcache.h (struct regcache): Inherit from reg_buffer_common.
992
993 2018-06-09 Tom Tromey <tom@tromey.com>
994
995 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
996 declare queue.
997 (event_queue): Use std::queue.
998 (gdb_event_xfree): Remove.
999 (initialize_event_loop, process_event, wait_for_event): Update.
1000
1001 2018-06-08 Stan Cox <scox@redhat.com>
1002
1003 * win32-low.c (win32_create_inferior): last_ptid and last_status
1004 moved to client_state.
1005
1006 2018-06-08 Pedro Alves <palves@redhat.com>
1007
1008 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1009 common/common-exceptions.o, common/common-utils.o,
1010 common/errors.o, common/print-utils.o and utils.o.
1011 * gdbreplay.c: Include "common-defs.h" instead of the two
1012 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1013 string.h or alloca.h.
1014 (perror_with_name): Delete.
1015 (remote_open): Use xstrdup instead of strdup.
1016 (main): Rename to ...
1017 (captured_main): ... this.
1018 (main): New.
1019
1020 2018-06-08 Tom Tromey <tom@tromey.com>
1021
1022 * linux-low.c (linux_low_read_btrace): Update.
1023
1024 2018-06-04 Stan Cox <scox@redhat.com>
1025
1026 * server.h (struct client_state): New.
1027 * server.c (cont_thread, general_thread, multi_process)
1028 (report_fork_events, report_vfork_events, report_exec_events)
1029 (report_thread_events, swbreak_feature, hwbreak_feature)
1030 (vCont_supported, disable_randomization, pass_signals)
1031 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1032 Moved to client_state.
1033 * remote-utils.c (remote_debug, noack_mode)
1034 (transport_is_reliable): Moved to client_state.
1035 * tracepoint.c (current_traceframe): Moved to client_state.
1036
1037 Update all callers.
1038 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1039 linux-low.c, remote-utils.h, target.c: Use client_state.
1040
1041 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1042
1043 * configure.srv: Add new c/h file.
1044
1045 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1046
1047 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1048 null VQ.
1049
1050 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1051
1052 * gdb.arch/mips-fpregset-core.exp: New test.
1053 * gdb.arch/mips-fpregset-core.c: New test source.
1054
1055 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1056
1057 PR server/23198
1058 * hostio.c (require_int): Do not report overflow for integers
1059 between 0xfffffff and 0x7fffffff.
1060
1061 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1062
1063 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1064 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1065 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1066 functions.
1067 (the_low_target): Wire them.
1068
1069 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1070
1071 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1072 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1073 mode. Call collect_register_by_name with vscr using
1074 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1075 (ppc_store_vrregset): Add and set vscr_offset variable as in
1076 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1077 vscr_offset.
1078
1079 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1080
1081 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1082 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1083 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1084
1085 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1086
1087 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1088 (ppc_store_vsxregset): Likewise.
1089 (ppc_fill_vrregset): Likewise.
1090 (ppc_store_vrregset): Likewise.
1091 (ppc_fill_evrregset): Likewise.
1092 (ppc_store_evrregset): Likewise.
1093 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1094 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1095 needed.
1096
1097 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1098
1099 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1100 wordsize of the inferior. Call ppc_linux_target_wordsize.
1101
1102 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1103
1104 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1105 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1106 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1107 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1108 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1109 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1110 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1111 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1112 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1113 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1114 (tdesc_powerpc_e500l): Remove.
1115 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1116 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1117 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1118 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1119 linux-ppc-tdesc.h.
1120 (ppc_arch_setup): Remove target description matching code. Fill a
1121 ppc_linux_features struct and call ppc_linux_match_description
1122 with it.
1123
1124 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1125
1126 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1127 width of the requested register exceeds the width of the
1128 `ptrace' data type.
1129 (mips_cannot_store_register): Likewise.
1130
1131 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1132
1133 * linux-mips-low.c (mips_fetch_register): New function. Update
1134 preceding comment.
1135 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1136 (the_low_target): Wire `mips_fetch_register'.
1137
1138 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1139
1140 * lynx-i386-low.c (LYNXOS_178): New macro.
1141 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1142 the layout on LynxOS-178.
1143 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1144 handle floating point registers that are not supported by
1145 LynxOS-178.
1146
1147 2018-05-10 Tom Tromey <tom@tromey.com>
1148
1149 * configure: Rebuild.
1150
1151 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1152
1153 PR server/23158:
1154 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1155 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1156 Use it to set the expedite_regs field in the given tdesc.
1157 * x86-tdesc.h: New file.
1158 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1159 Adjust following the addition of the new expedite_regs parameter
1160 to init_target_desc.
1161 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1162 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1163 (i386_linux_read_description, amd64_linux_read_description):
1164 Adjust following the addition of the new expedite_regs parameter
1165 to init_target_desc.
1166 * lynx-i386-low.c: #include "x86-tdesc.h".
1167 (lynx_i386_arch_setup): Adjust following the addition of the new
1168 expedite_regs parameter to init_target_desc.
1169 * nto-x86-low.c: #include "x86-tdesc.h".
1170 (nto_x86_arch_setup): Adjust following the addition of the new
1171 expedite_regs parameter to init_target_desc.
1172 * win32-i386-low.c: #include "x86-tdesc.h".
1173 (i386_arch_setup): Adjust following the addition of the new
1174 expedite_regs parameter to init_target_desc.
1175
1176 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1177
1178 PR server/23158:
1179 * win32-low.c (win32_create_inferior): Add call to my_wait
1180 setting last_status global.
1181
1182 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1183
1184 PR server/23158:
1185 * win32-low.c (create_process): Only call gdb_tilde_expand if
1186 inferior_cwd is not NULL.
1187
1188 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1189
1190 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1191 registers to the cache if their values have changed.
1192 (i387_xsave_to_cache): Provide default values for x87 control
1193 registers when these features are available, but disabled.
1194 * regcache.c (supply_register_by_name_zeroed): New function.
1195 * regcache.h (supply_register_by_name_zeroed): Declare new
1196 function.
1197
1198 2018-05-07 Tom Tromey <tom@tromey.com>
1199
1200 * configure: Rebuild.
1201
1202 2018-05-04 Tom Tromey <tom@tromey.com>
1203
1204 * configure: Rebuild.
1205
1206 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1207 Pedro Alves <palves@redhat.com>
1208
1209 * linux-aarch64-low.c (aarch64_stopped_data_address):
1210 Likewise.
1211
1212 2018-04-27 Tom Tromey <tom@tromey.com>
1213
1214 * configure: Rebuild.
1215
1216 2018-04-23 Tom Tromey <tom@tromey.com>
1217
1218 * configure: Rebuild.
1219
1220 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1221
1222 * Makefile.in (depcomp): Add "..".
1223 (all_deps_files): New and use it.
1224
1225 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1226
1227 * configure.srv (aarch64*-*-linux*): Don't include xml.
1228 (i[34567]86-*-cygwin*): Likewise.
1229 (i[34567]86-*-linux*): Likewise.
1230 (i[34567]86-*-lynxos*): Likewise.
1231 (i[34567]86-*-mingw32ce*): Likewise.
1232 (i[34567]86-*-mingw*): Likewise.
1233 (i[34567]86-*-nto*): Likewise.
1234 (tic6x-*-uclinux): Likewise.
1235 (x86_64-*-linux*): Likewise.
1236 (x86_64-*-mingw*): Likewise.
1237 (x86_64-*-cygwin*): Likewise.
1238
1239 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1240
1241 * tdesc.c: Remove xml parameter.
1242
1243 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1244
1245 * server.c (get_features_xml): Remove cast.
1246 * tdesc.c (void target_desc::accept): Fill in function.
1247 (tdesc_get_features_xml): Remove old xml creation.
1248 (print_xml_feature::visit_pre): Add xml vistor.
1249 * tdesc.h (struct target_desc): Make xmltarget mutable.
1250 (tdesc_get_features_xml): Remove declaration.
1251
1252 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1253
1254 * tdesc.c (tdesc_architecture_name): Add new function.
1255 (tdesc_osabi_name): Likewise.
1256 (tdesc_get_features_xml): Use new functions.
1257
1258 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1259
1260 * tdesc.c (tdesc_create_flags): Remove.
1261 (tdesc_add_flag): Likewise.
1262 (tdesc_named_type): Likewise.
1263 (tdesc_create_union): Likewise.
1264 (tdesc_create_struct): Likewise.
1265 (tdesc_create_vector): Likewise.
1266 (tdesc_add_bitfield): Likewise.
1267 (tdesc_add_field): Likewise.
1268 (tdesc_set_struct_size): Likewise.
1269
1270 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1271
1272 * tdesc.c (~target_desc): Remove implictly deleted items.
1273 (init_target_desc): Iterate all features.
1274 (tdesc_get_features_xml): Use vector.
1275 (tdesc_create_feature): Create feature.
1276 * tdesc.h (tdesc_feature) Remove
1277 (target_desc): Add features.
1278
1279 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1280
1281 * Makefile.in: Add common/tdesc.c
1282 * tdesc.c (init_target_desc): init all reg_defs from register
1283 vector.
1284 (tdesc_create_reg): Create tdesc_reg.
1285 * tdesc.h (tdesc_feature): Add register vector.
1286
1287 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1288
1289 * tdesc.h (struct target_desc) <features>: Change type to
1290 std::vector<std::string>.
1291 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1292 changes.
1293 (tdesc_get_features_xml): Likewise.
1294 (tdesc_create_feature): Likewise.
1295
1296 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1297
1298 * regcache.c (find_register_by_number): Return a ref.
1299 (find_regno): Use references.
1300 (register_size): Likewise.
1301 (register_data): Likewise.
1302 * tdesc.c (target_desc::~target_desc): Remove free calls.
1303 (target_desc::operator==): Use std::vector compare.
1304 (init_target_desc): Use reference.
1305 (tdesc_create_reg): Use reg constructors.
1306 * tdesc.h (struct target_desc): Replace pointer with object.
1307
1308 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1309
1310 * regcache.c (find_register_by_number): Make static.
1311 (find_regno): Use find_register_by_number
1312 * regcache.h (struct reg): Remove declaration.
1313
1314 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1315
1316 * tdesc.c (target_desc::~target_desc): Move to here.
1317 (target_desc::operator==): Likewise.
1318 * tdesc.h (target_desc::~target_desc): Move from here.
1319 (target_desc::operator==): Likewise.
1320
1321 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1322
1323 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1324
1325 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1326
1327 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1328 S390_TDESC_GS.
1329 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1330 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1331 and init_registers_s390_gs_linux64.
1332
1333 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1334
1335 * linux-s390-low.c (s390_fill_gs): Remove function.
1336 (s390_fill_gsbc): Remove function.
1337 (s390_regsets): Set fill functions for the guarded storage regsets
1338 to NULL.
1339
1340 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1341
1342 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1343 the word size. Add comment.
1344 (s390_get_wordsize): New function.
1345 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1346 pswm with it. Instead, use s390_get_wordsize to determine the
1347 word size first and derive the correct tdesc from that directly.
1348
1349 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1350
1351 * Makefile.in: Include silent-rules.mk.
1352 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1353 (COMPILE): Add ECHO_CXX.
1354 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1355 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1356 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1357 (version-generated.c): Add ECHO_GEN.
1358 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1359 (IPAGENT_COMPILE): Add ECHO_CXX.
1360 (%-generated.c): Add ECHO_REGDAT.
1361
1362 2018-03-14 Tom Tromey <tom@tromey.com>
1363
1364 PR cli/14977:
1365 * ax.c (ax_printf): Special case for NULL.
1366
1367 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1368
1369 * linux-low.c (linux_qxfer_libraries_svr4): Use
1370 xml_escape_text_append.
1371
1372 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1373
1374 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1375
1376 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1377
1378 * server.c (handle_general_set): Remove unnecessary xstrdup.
1379
1380 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1381
1382 * server.c (parse_debug_format_options): Adjust to
1383 delim_string_to_char_ptr_vec changes.
1384 * thread-db.c (thread_db_load_search): Adjust to
1385 dirnames_to_char_ptr_vec changes.
1386
1387 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1388
1389 * target.h (target_enable_btrace, target_disable_btrace)
1390 (target_read_btrace, target_read_btrace_conf): Turn macro into
1391 inline function. Throw error if target method is not defined.
1392 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1393 check for btrace target method. Be prepared to handle exceptions
1394 from btrace target methods.
1395
1396 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1397
1398 * server.c (captured_main): Change order of error message printed
1399 when the current working directory cannot be found.
1400
1401 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1402
1403 * server.c: Include "filenames.h" and "pathstuff.h".
1404 (program_name): Delete variable.
1405 (program_path): New anonymous class.
1406 (get_exec_wrapper): Use "program_path" instead of
1407 "program_name".
1408 (handle_v_run): Likewise.
1409 (captured_main): Likewise.
1410 (process_serial_event): Likewise.
1411
1412 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1413
1414 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1415 (OBJS): Add "pathstuff.o".
1416 * server.c (current_directory): New global variable.
1417 (captured_main): Initialize "current_directory".
1418
1419 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1420
1421 * tdesc.c: Use common/tdesc.h.
1422 * tdesc.h: Likewise.
1423
1424 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1425 Simon Marchi <simon.marchi@ericsson.com>
1426
1427 * Makefile.in: Switch order of make rules.
1428
1429 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1430
1431 * Makefile.in: Add common directory in build.
1432 * configure.ac: Add common reference.
1433 * configure: Regenerate.
1434
1435 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1436
1437 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1438 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1439 * spu-low.c (spu_target_ops): Likewise.
1440 * win32-low.c (win32_target_ops): Likewise.
1441 * server.c (supported_btrace_packets): Report packets unconditionally.
1442 * target.h (target_ops) <supports_btrace>: Remove.
1443 (target_supports_btrace): Remove.
1444
1445 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1446
1447 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1448 (handle_btrace_disable): Change return type to void. Use exceptions
1449 to report errors.
1450 (handle_btrace_general_set): Catch exception and copy message to
1451 return message.
1452
1453 2018-02-08 Tom Tromey <tom@tromey.com>
1454
1455 * linux-low.c (install_software_single_step_breakpoints): Use
1456 make_scoped_restore.
1457 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1458 (do_restore_current_thread_cleanup): Remove.
1459 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1460 declare.
1461
1462 2018-02-08 Tom Tromey <tom@tromey.com>
1463
1464 * mem-break.c (set_raw_breakpoint_at): Use
1465 gdb::unique_xmalloc_ptr.
1466
1467 2018-01-30 Pedro Alves <palves@redhat.com>
1468
1469 PR gdb/13211
1470 * target.c (target_terminal::terminal_state): Rename to ...
1471 (target_terminal::m_terminal_state): ... this.
1472
1473 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1474
1475 * linux-low.c (handle_extended_wait): Surround call to
1476 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1477
1478 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1479
1480 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1481 linux_ptrace_attach_fail_reason_string now returning an
1482 std::string.
1483 (linux_attach): Likewise.
1484 * thread-db.c (attach_thread): Likewise.
1485
1486 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1487
1488 PR gdb/21559
1489 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1490 checking for fs_base/gs_base fields in struct user_regs_struct.
1491 * configure: Regenerate.
1492
1493 2018-01-16 Yao Qi <yao.qi@linaro.org>
1494
1495 PR gdb/18749
1496 * linux-low.c (fetch_register): Call supply_register instead of
1497 error.
1498
1499 2018-01-08 Yao Qi <yao.qi@linaro.org>
1500 Simon Marchi <simon.marchi@ericsson.com>
1501
1502 * Makefile.in (OBS): Remove selftest.o.
1503 * configure.ac: Set srv_selftest_objs if $development is true.
1504 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1505 * configure: Re-generated.
1506 * server.c (captured_main): Wrap variable selftest_filter with
1507 GDB_SELF_TEST.
1508
1509 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1510
1511 * server.c (parse_debug_format_options): Return std::string.
1512 (handle_monitor_command, captured_main): Adjust.
1513
1514 2018-01-05 Pedro Alves <palves@redhat.com>
1515
1516 PR gdb/18653
1517 * server.c (captured_main): Pass quiet=false to
1518 save_original_signals_state.
1519
1520 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1521
1522 * gdbreplay.c (gdbreplay_version): Update copyright year in
1523 version message.
1524 * server.c (gdbserver_version): Likewise.
1525
1526 2017-12-08 Tom Tromey <tom@tromey.com>
1527
1528 * ax.c (ax_printf): Update.
1529
1530 2017-12-07 Yao Qi <yao.qi@linaro.org>
1531
1532 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1533 aarch64_linux_read_description.
1534 * linux-amd64-ipa.c (idx2mask): New array.
1535 (get_ipa_tdesc): Move idx2mask out.
1536 (initialize_low_tracepoint): Initialize target descriptions.
1537 * linux-i386-ipa.c (idx2mask): New array.
1538 (get_ipa_tdesc): Move idx2mask out.
1539 (initialize_low_tracepoint): Initialize target descriptions.
1540
1541 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1542
1543 * tdesc.c (struct tdesc_type): Change return type.
1544 (tdesc_add_flag): Change parameter type.
1545 (tdesc_add_bitfield): Likewise.
1546 (tdesc_add_field): Likewise.
1547 (tdesc_set_struct_size): Likewise.
1548
1549 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1550
1551 * regcache.c (registers_to_string): Remove unused variable.
1552
1553 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1554
1555 * inferiors.c (for_each_inferior_with_data): Remove.
1556 * inferiors.h (for_each_inferior_with_data): Remove.
1557 * server.c (handle_qxfer_threads_worker): Change parameter type.
1558 (handle_qxfer_threads_proper): Use for_each_thread.
1559
1560 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1561
1562 * inferiors.c (for_each_inferior): Remove.
1563 (clear_inferiors): Use for_each_thread.
1564 * inferiors.h (for_each_inferior): Remove.
1565 * linux-low.c (linux_wait_for_event_filtered): Use
1566 for_each_thread.
1567 (linux_stabilize_threads): Likewise.
1568 * regcache.c (regcache_release): Likewise.
1569 * server.c (gdb_wants_all_threads_stopped): Likewise.
1570 (clear_pending_status_callback): Remove.
1571 (handle_status): Use for_each_thread.
1572 (captured_main): Likewise.
1573 * win32-low.c (child_init_thread_list): Likewise.
1574 (win32_clear_inferiors): Likewise.
1575 (fake_breakpoint_event): Likewise.
1576
1577 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1578
1579 * inferiors.h (find_inferior): Remove.
1580 * inferiors.c (find_inferior): Remove.
1581
1582 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1583
1584 * linux-low.c (resume_status_pending_p): Update comment.
1585 (need_step_over_p): Update comment.
1586
1587 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1588
1589 * linux-low.c (proceed_one_lwp): Return void, change parameter
1590 type.
1591 (unsuspend_and_proceed_one_lwp): Likewise.
1592 (proceed_all_lwps): Use for_each_thread.
1593 (unstop_all_lwps): Likewise.
1594
1595 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1596
1597 * linux-low.c (linux_resume_one_thread): Return void, take
1598 parameter directly.
1599 (linux_resume): Use for_each_thread.
1600
1601 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1602
1603 * linux-low.c (send_sigstop_callback): Return void, change
1604 parameter type. Rename to...
1605 (send_sigstop): ... this.
1606 (suspend_and_send_sigstop_callback): Return void, change parameter
1607 type. Rename to...
1608 (suspend_and_send_sigstop): ... this.
1609 (stop_all_lwps): Use for_each_thread.
1610
1611 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1612
1613 * linux-low.c (lwp_running): Return bool, remove unused
1614 argument.
1615 (linux_stabilize_threads): Use find_thread.
1616
1617 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1618
1619 * linux-low.c (select_singlestep_lwp_callback): Remove.
1620 (count_events_callback): Remove.
1621 (select_event_lwp_callback): Remove.
1622 (select_event_lwp): Use find_thread/for_each_thread.
1623
1624 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1625
1626 * linux-low.c (not_stopped_callback): Return bool, take filter
1627 argument directly.
1628 (linux_wait_for_event_filtered): Use find_thread.
1629 (linux_wait_1): Likewise.
1630
1631 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1632
1633 * linux-low.c (same_lwp): Remove.
1634 (find_lwp_pid): Use find_thread.
1635
1636 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1637
1638 * linux-low.c (delete_lwp_callback): Remove.
1639 (linux_mourn): Use for_each_thread.
1640
1641 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1642
1643 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1644 args parameter, don't check for pid.
1645 (linux_detach): Use for_each_thread.
1646
1647 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1648
1649 * linux-low.c (struct counter): Remove.
1650 (second_thread_of_pid_p): Remove.
1651 (last_thread_of_process_p): Use find_thread.
1652
1653 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1654
1655 * inferiors.c (find_inferior_in_random): Remove.
1656 * inferiors.h (find_inferior_in_random): Remove.
1657 * linux-low.c (status_pending_p_callback): Return bool, accept
1658 parameter ptid directly.
1659 (linux_wait_for_event_filtered): Use find_thread_in_random.
1660 (linux_wait_1): Likewise.
1661
1662 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1663
1664 * inferiors.c (find_inferior_id): Remove.
1665 (find_thread_ptid): Move implemention from find_inferior_id to
1666 here.
1667 * inferiors.h (find_inferior_id): Remove.
1668 * server.c (handle_status): Use find_thread_ptid.
1669 (process_serial_event): Likewise.
1670 * thread-db.c (find_one_thread): Likewise.
1671 (thread_db_thread_handle): Likewise.
1672 * win32-low.c (thread_rec): Likewise.
1673 (child_delete_thread): Likewise.
1674 (win32_thread_alive): Likewise.
1675 (get_child_debug_event): Likewise.
1676
1677 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1678
1679 * linux-mips-low.c (update_watch_registers_callback): Return
1680 void, remove pid_p parameter, don't check for pid.
1681 (mips_insert_point, mips_remove_point): Use for_each_thread.
1682
1683 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1684
1685 * lynx.low (lynx_delete_thread_callback): Remove.
1686 (lynx_mourn): Use for_each_thread.
1687
1688 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1689
1690 * regcache.c (regcache_invalidate_one): Remove.
1691 (regcache_invalidate_pid): use for_each_thread.
1692
1693 2017-11-26 Tom Tromey <tom@tromey.com>
1694
1695 * linux-low.c (linux_create_inferior): Update.
1696
1697 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1698
1699 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1700
1701 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1702
1703 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1704 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1705 * linux-aarch64-tdesc-selftest.c: New file.
1706 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1707
1708 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1709
1710 * configure.srv: Add new file.
1711 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1712 * linux-aarch64-tdesc-selftest.c: New file.
1713 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1714
1715 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1716
1717 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1718 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1719 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1720
1721 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1722
1723 * configure.srv: Add new files.
1724 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1725 aarch64_linux_read_description.
1726 * linux-aarch64-low.c (aarch64_linux_read_description):
1727 Merge with aarch64_arch_setup.
1728 (aarch64_arch_setup): Call aarch64_linux_read_description.
1729 * linux-aarch64-tdesc.c: New file.
1730 * linux-aarch64-tdesc.h: New file.
1731
1732 2017-11-24 Yao Qi <yao.qi@linaro.org>
1733
1734 * configure.srv: Set $srv_regobj for tic6x-linux.
1735 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1736 (tic6x_read_description): Move some code to tic6x_arch_setup.
1737 (tic6x_tdesc_test): New function.
1738 (initialize_low_arch): Call selftests::register_test.
1739
1740 2017-11-22 Yao Qi <yao.qi@linaro.org>
1741
1742 * remote-utils.c (prepare_resume_reply): Use memcpy.
1743
1744 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1745
1746 * linux-low.c (kill_one_lwp_callback): Return void, take
1747 argument directly, don't filter on pid.
1748 (linux_kill): Use for_each_thread.
1749
1750 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1751
1752 * linux-low.c (need_step_over_p): Return bool, remove dummy
1753 argument.
1754 (linux_resume, proceed_all_lwps): Use find_thread.
1755
1756 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1757
1758 * linux-low.c (resume_status_pending_p): Return bool, remove
1759 flag_p argument.
1760 (linux_resume): Use find_thread.
1761
1762 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1763
1764 * linux-low.c (struct thread_resume_array): Remove.
1765 (linux_set_resume_request): Return void, take arguments
1766 directly.
1767 (linux_resume): Use for_each_thread.
1768
1769 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1770
1771 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1772 return bool, remove data argument.
1773 (linux_stabilize_threads): Use find_thread.
1774
1775 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1776
1777 * linux-low.c (unsuspend_one_lwp): Remove.
1778 (unsuspend_all_lwps): Use for_each_thread, inline code from
1779 unsuspend_one_lwp.
1780
1781 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1782
1783 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1784 * linux-low.c (struct iterate_over_lwps_args): Remove.
1785 (iterate_over_lwps_filter): Remove.
1786 (iterate_over_lwps): Use find_thread.
1787
1788 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1789
1790 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1791 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1792 code from reset_lwp_ptrace_options_callback.
1793
1794 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1795
1796 * linux-arm-low.c (struct update_registers_data): Remove.
1797 (update_registers_callback): Return void, take arguments
1798 directly, don't check thread's pid.
1799 (arm_insert_point, arm_remove_point): Use for_each_thread.
1800
1801 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1802
1803 * win32-low.c (continue_one_thread): Return void, take argument
1804 directly.
1805 (child_continue): Use for_each_thread.
1806
1807 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1808
1809 * win32-i386-low.c (update_debug_registers_callback): Rename
1810 to ...
1811 (update_debug_registers): ... this, return void, remove pid_p arg.
1812 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1813
1814 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1815
1816 * inferiors.h (struct process_info): Add constructor, initialize
1817 fields..
1818 <syscalls_to_catch>: Change type to std::vector<int>.
1819 * inferiors.c (add_process): Allocate process_info with new.
1820 (remove_process): Free process_info with delete.
1821 * linux-low.c (handle_extended_wait): Adjust.
1822 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1823 * server.c (handle_general_set): Adjust.
1824
1825 2017-11-16 Pedro Alves <palves@redhat.com>
1826
1827 * remote-utils.c (remote_close): Block SIGIO signals instead of
1828 uninstalling the SIGIO handler.
1829
1830 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1831
1832 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1833
1834 2017-11-16 Yao Qi <yao.qi@linaro.org>
1835
1836 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1837 (tic6x_store_gregset): Likewise.
1838 (tic6x_usrregs_info): Move it up.
1839
1840 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1841
1842 * Makefile.in: Update arch rules.
1843 * configure.srv: Explicitly mark arch/ files.
1844
1845 2017-11-13 Andreas Schwab <schwab@suse.de>
1846
1847 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1848 function.
1849 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1850
1851 2017-11-06 Pedro Alves <palves@redhat.com>
1852
1853 * config.in, configure: Regenerate.
1854
1855 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1856
1857 * target.c (struct thread_search): Remove.
1858 (thread_search_callback): Remove.
1859 (prepare_to_access_memory): Use for_each_thread instead of
1860 find_inferior. Inline code from thread_search_callback.
1861
1862 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1863
1864 * server.c (struct visit_actioned_threads_data): Remove.
1865 (visit_actioned_threads): Change prototype to take arguments
1866 directly.
1867 (resume): Use find_thread instead of find_inferior.
1868
1869 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1870
1871 * server.c (queue_stop_reply_callback): Change prototype, return
1872 void.
1873 (find_status_pending_thread_callback): Remove.
1874 (handle_status): Replace find_inferior with find_thread and
1875 for_each_thread.
1876
1877 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1878
1879 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1880 with REGNO.
1881 (aarch64_store_gregset): Likewise.
1882 (aarch64_fill_fpregset): Likewise.
1883 (aarch64_store_fpregset): Likewise.
1884
1885 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1886
1887 * gdbthread.h (find_thread, for_each_thread): New functions.
1888 * inferiors.c (thread_of_pid): Remove.
1889 (find_any_thread_of_pid): Use find_thread.
1890 * linux-low.c (num_lwps): Use for_each_thread.
1891
1892 2017-10-17 Yao Qi <yao.qi@linaro.org>
1893
1894 * Makefile.in: Remove one rule.
1895 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1896
1897 2017-10-17 Yao Qi <yao.qi@linaro.org>
1898
1899 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1900 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1901
1902 2017-10-17 Yao Qi <yao.qi@linaro.org>
1903
1904 * configure.srv: Rename arm.o with arch/arm.o.
1905
1906 2017-10-17 Yao Qi <yao.qi@linaro.org>
1907
1908 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1909 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1910 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1911 (arch-i386.o, arch-amd64.o): Remove rules.
1912 (arch/%.o): New rule.
1913 Update POSTCOMPILE and COMPILE.pre.
1914 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1915 * configure: Re-generated.
1916 * configure.srv: Replace arch-i386.o with arch/i386.o.
1917 Replace arch-amd64.o with arch/amd64.o.
1918
1919 2017-10-16 Yao Qi <yao.qi@linaro.org>
1920
1921 * configure: Regenerated.
1922
1923 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1924
1925 * inferiors.h: (struct inferior_list): Remove.
1926 (struct inferior_list_entry); Remove.
1927 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1928 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1929 get_first_inferior): Remove.
1930 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1931 find_inferior_id, find_inferior_in_random): Change signature.
1932 * inferiors.c (all_threads): Change type to
1933 std::list<thread_info *>.
1934 (get_thread): Remove macro.
1935 (find_inferior, find_inferior_id): Change signature, implement
1936 using find_thread.
1937 (find_inferior_in_random): Change signature, implement using
1938 find_thread_in_random.
1939 (for_each_inferior, for_each_inferior_with_data): Change
1940 signature, implement using for_each_thread.
1941 (add_inferior_to_list, remove_inferior): Remove.
1942 (add_thread, get_first_thread, thread_of_pid,
1943 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1944 (get_first_inferior, one_inferior_p, clear_inferior_list):
1945 Remove.
1946 (clear_inferiors, get_thread_process): Update.
1947 * gdbthread.h: Include <list>.
1948 (struct thread_info) <entry>: Remove field.
1949 <id>: New field.
1950 (all_threads): Change type to std::list<thread_info *>.
1951 (get_first_inferior): Add doc.
1952 (find_thread, for_each_thread, find_thread_in_random): New
1953 functions.
1954 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1955 * linux-arm-low.c (update_registers_callback): Update.
1956 * linux-low.c (second_thread_of_pid_p): Update.
1957 (kill_one_lwp_callback, linux_detach_lwp_callback,
1958 delete_lwp_callback, status_pending_p_callback, same_lwp,
1959 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1960 iterate_over_lwps, not_stopped_callback,
1961 resume_stopped_resumed_lwps, count_events_callback,
1962 select_singlestep_lwp_callback, select_event_lwp_callback,
1963 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1964 suspend_and_send_sigstop_callback, wait_for_sigstop,
1965 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1966 lwp_running, linux_set_resume_request, resume_status_pending_p,
1967 need_step_over_p, start_step_over, linux_resume_one_thread,
1968 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1969 reset_lwp_ptrace_options_callback): Update.
1970 * linux-mips-low.c (update_watch_registers_callback): Update.
1971 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1972 Update.
1973 (free_register_cache_thread_one): Remove.
1974 (regcache_release): Update.
1975 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1976 handle_qxfer_threads_worker): Update.
1977 (handle_query): Update, use list iterator.
1978 (visit_actioned_threads, handle_pending_status,
1979 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1980 clear_pending_status_callback, set_pending_status_callback,
1981 find_status_pending_thread_callback, handle_status,
1982 process_serial_event): Update.
1983 * target.c (thread_search_callback): Update.
1984 * thread-db.c (thread_db_get_tls_address): Update.
1985 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1986 Update.
1987 * win32-i386-low.c (update_debug_registers_callback): Update.
1988 * win32-low.c (delete_thread_info, child_delete_thread,
1989 continue_one_thread, suspend_one_thread,
1990 get_child_debug_event): Adjust.
1991
1992 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1993
1994 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1995 * inferiors.h: Include <list>.
1996 (struct process_info) <entry>: Remove field.
1997 <pid>: New field.
1998 (pid_of): Change macro to function.
1999 (ptid_of, lwpid_of): Remove macro.
2000 (all_processes): Change type to std::list<process_info *>.
2001 (ALL_PROCESSES): Remove macro.
2002 (for_each_process, find_process): New function.
2003 * inferiors.c (all_processes): Change type to
2004 std::list<process_info *>.
2005 (find_thread_process): Adjust.
2006 (add_process): Likewise.
2007 (remove_process): Likewise.
2008 (find_process_pid): Likewise.
2009 (get_first_process): Likewise.
2010 (started_inferior_callback): Remove.
2011 (have_started_inferiors_p): Adjust.
2012 (attached_inferior_callback): Remove.
2013 (have_attached_inferiors_p): Adjust.
2014 * linux-low.c (check_zombie_leaders): Likewise.
2015 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2016 (x86_linux_update_xmltarget): Adjust.
2017 * server.c (handle_query): Likewise.
2018 (gdb_reattached_process): Remove.
2019 (handle_status): Adjust.
2020 (kill_inferior_callback): Likewise.
2021 (detach_or_kill_inferior): Remove.
2022 (print_started_pid): Likewise.
2023 (print_attached_pid): Likewise.
2024 (detach_or_kill_for_exit): Update.
2025 (process_serial_event): Likewise.
2026 * linux-arm-low.c (arm_new_fork): Likewise.
2027
2028 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2029
2030 * dll.h: Include <list>.
2031 (struct dll_info): Add constructor.
2032 <entry>: Remove field.
2033 (all_dlls): Change type to std::list<dll_info>.
2034 * dll.c: Include <algorithm>.
2035 (get_dll): Remove macro.
2036 (all_dlls): Change type to std::list<dll_info *>.
2037 (free_one_dll): Remove.
2038 (match_dll): Likewise.
2039 (loaded_dll): Adjust.
2040 (unloaded_dll): Adjust to all_dlls type change, use
2041 std::find_if. Inline code from match_dll.
2042 (clear_dlls): Adjust to all_dlls type change.
2043 * server.c (emit_dll_description): Remove.
2044 (handle_qxfer_libraries): Adjust to all_dlls type change,
2045 integrate emit_dll_description's functionality.
2046
2047 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2048
2049 * linux-low.h (struct linux_target_ops) <delete_process>: New
2050 field.
2051 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2052 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2053 (struct linux_target_ops): Add delete_process callback.
2054 * linux-arm-low.c (arm_delete_process): New.
2055 (struct linux_target_ops): Add delete_process callback.
2056 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2057 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2058 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2059 * linux-mips-low.c (mips_linux_delete_process): New.
2060 (struct linux_target_ops): Add delete_process callback.
2061 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2062 * linux-s390-low.c (struct linux_target_ops): Likewise.
2063 * linux-sh-low.c (struct linux_target_ops): Likewise.
2064 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2065 * linux-tile-low.c (struct linux_target_ops): Likewise.
2066 * linux-x86-low.c (x86_linux_delete_process): New.
2067 (struct linux_target_ops): Add delete_process callback.
2068 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2069
2070 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2071
2072 * linux-aarch64-low.c (the_low_target): Add thread delete
2073 callback.
2074 * linux-arm-low.c (arm_delete_thread): New function.
2075 (the_low_target): Add thread delete callback.
2076 * linux-bfin-low.c (the_low_target): Likewise.
2077 * linux-crisv32-low.c (the_low_target): Likewise.
2078 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2079 set.
2080 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2081 field.
2082 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2083 * linux-mips-low.c (mips_linux_delete_thread): New function.
2084 (the_low_target): Add thread delete callback.
2085 * linux-ppc-low.c (the_low_target): Likewise.
2086 * linux-s390-low.c (the_low_target): Likewise.
2087 * linux-sh-low.c (the_low_target): Likewise.
2088 * linux-tic6x-low.c (the_low_target): Likewise.
2089 * linux-tile-low.c (the_low_target): Likewise.
2090 * linux-x86-low.c (the_low_target): Likewise.
2091 * linux-xtensa-low.c (the_low_target): Likewise.
2092
2093 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2094
2095 * win32-low.c: Include "common-inferior.h".
2096
2097 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2098
2099 * inferiors.c (set_inferior_cwd): New function.
2100 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2101 (handle_query): Inform that QSetWorkingDir is supported.
2102 * win32-low.c (create_process): Pass the inferior's cwd to
2103 CreateProcess.
2104
2105 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2106
2107 * inferiors.c (current_inferior_cwd): New global variable.
2108 (get_inferior_cwd): New function.
2109 * inferiors.h (struct process_info) <cwd>: New field.
2110
2111 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2112
2113 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2114 (OBS): Add gdb_tilde_expand.o.
2115
2116 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2117
2118 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2119 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2120
2121 2017-09-29 Pedro Alves <palves@redhat.com>
2122
2123 * ax.c (gdb_parse_agent_expr): Constify.
2124 * ax.h (gdb_parse_agent_expr): Constify.
2125 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2126 Constify.
2127 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2128 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2129 * remote-utils.h (read_ptid): Constify.
2130 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2131 (process_point_options, process_serial_event): Constify.
2132 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2133 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2134 (cmd_qtbuffer): Constify.
2135
2136 2017-09-29 Pedro Alves <palves@redhat.com>
2137
2138 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2139 fails.
2140
2141 2017-09-29 Pedro Alves <palves@redhat.com>
2142
2143 * linux-low.c (handle_extended_wait): Pass parent thread instead
2144 of process to thread_db_notice_clone.
2145 * linux-low.h (thread_db_notice_clone): Replace parent process
2146 parameter with parent thread parameter.
2147 * thread-db.c (find_one_thread): Add comment.
2148 (thread_db_notice_clone): Replace parent process parameter with
2149 parent thread parameter. Temporarily switch to the parent thread.
2150
2151 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2152
2153 * gdbthread.h: Include "common-gdbthread.h".
2154 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2155 "if" when validating the ptid.
2156 * remote-utils.c: Include "gdbthread.h".
2157 (prepare_resume_reply): Use "switch_to_thread".
2158 * target.c (done_accessing_memory): Likewise.
2159
2160 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2161
2162 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2163 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2164 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2165 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2166 s390x-gs-linux64-ipa.o to ipa_obj.
2167 * linux-s390-low.c (HWCAP_S390_GS): New define.
2168 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2169 New functions.
2170 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2171 (s390_arch_setup): Check for guarded-storage support and choose
2172 appropriate tdesc.
2173 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2174 init_registers_s390x_gs_linux64.
2175 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2176 enum value.
2177 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2178 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2179
2180 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2181
2182 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2183
2184 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2185
2186 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2187 (thread_db_thread_handle): Declare.
2188 * linux-low.c (linux_target_ops): Initialize thread_handle.
2189 * server.c (handle_qxfer_threads_worker): Add support for
2190 "handle" attribute.
2191 * target.h (struct target_ops): Add new function pointer,
2192 thread_handle.
2193 (target_thread_handle): Define.
2194 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2195 field in lwp.
2196 (thread_db_thread_handle): New function.
2197
2198 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2199
2200 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2201 * linux-low.h (thread_db_notice_clone): Declare.
2202 * thread-db.c (thread_db_notice_clone): New function.
2203
2204 2017-09-21 Pedro Alves <palves@redhat.com>
2205
2206 * server.c (gdb_read_memory, handle_status, process_serial_event)
2207 (handle_serial_event, handle_target_event): Adjust to
2208 set_desired_thread prototype change.
2209 * target.c (set_desired_thread): Remove 'use_general' parameter
2210 and adjust.
2211 * target.h (set_desired_thread): Remove 'use_general' parameter.
2212
2213 2017-09-20 Tom Tromey <tom@tromey.com>
2214
2215 * target.c (target_terminal::terminal_state): Define.
2216 (target_terminal::init): Rename from target_terminal_init.
2217 (target_terminal::inferior): Rename from
2218 target_terminal_inferior.
2219 (target_terminal::ours): Rename from target_terminal_ours.
2220 (target_terminal::ours_for_output, target_terminal::info): New.
2221
2222 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2223
2224 * server.c (accumulate_file_name_length): Remove.
2225 (emit_dll_description): Adjust to std::string change.
2226 (handle_qxfer_libraries): Use std::string to hold document.
2227
2228 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2229
2230 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2231 return type of xml_escape_text.
2232 * server.c (emit_dll_description): Likewise.
2233
2234 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2235
2236 * server.c (captured_main): Accept argument for --selftest.
2237 Update run_tests call.
2238 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2239 when registering selftests.
2240
2241 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2242
2243 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2244 instead of "VEC" for "target_desc.reg_defs".
2245 (regcache_cpy): Likewise.
2246 (registers_to_string): Likewise.
2247 (registers_from_string): Likewise.
2248 (find_regno): Likewise.
2249 (supply_regblock): Likewise.
2250 (regcache_raw_read_unsigned): Likewise.
2251 * tdesc.c (init_target_desc): Likewise.
2252 (tdesc_create_reg): Likewise.
2253 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2254 (struct target_desc) <reg_defs>: Convert to "std::vector".
2255 (target_desc): Do not initialize "reg_defs".
2256 (~target_desc): Update code to use "std::vector" instead of "VEC"
2257 for "target_desc.reg_defs".
2258 (operator==): Likewise.
2259
2260 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2261
2262 * inferiors.h (thread_to_gdb_id): Remove.
2263 * inferiors.c (thread_to_gdb_id): Remove.
2264 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2265 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2266 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2267 Likewise.
2268 * nto-low.c (nto_fetch_registers, nto_store_registers,
2269 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2270
2271 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2272
2273 * inferiors.h (gdb_id_to_thread_id): Remove.
2274 * inferiors.c (gdb_id_to_thread_id): Remove.
2275 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2276 removal. Move pid declaration closer to where it's used.
2277
2278 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2279
2280 * server.c (handle_detach): New function.
2281 (process_serial_event): Move code out, call handle_detach.
2282
2283 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2284
2285 * server.c (require_running): Rename to ...
2286 (require_running_or_return): ... this ...
2287 (require_running_or_break): ... and this.
2288 (handle_query, process_serial_event): Adjust.
2289
2290 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2291
2292 * linux-low.c (linux_set_resume_request): Remove unused
2293 variables.
2294
2295 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2296
2297 * server.c (first_thread_of): Remove.
2298 (process_serial_event): Replace usage of first_thread_of with
2299 find_any_thread_of_pid.
2300 * tracepoint.c (same_process_p): Remove.
2301 (gdb_agent_about_to_close): Replace usage of same_process_p with
2302 find_any_thread_of_pid.
2303 * linux-x86-low.c (same_process_callback): Remove.
2304 (x86_arch_setup_process_callback): Replace usage of
2305 same_process_callback with find_any_thread_of_pid.
2306 * thread-db.c (any_thread_of): Remove.
2307 (switch_to_process): Replace usage of any_thread_of with
2308 find_any_thread_of_pid.
2309 * inferiors.c (thread_pid_matches_callback): Remove.
2310 (find_thread_process): Adjust to use find_any_thread_of_pid.
2311
2312 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2313
2314 * regcache.c (get_thread_regcache): Guard calls to "memset"
2315 with "!VEC_empty".
2316
2317 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2318
2319 * linux-low.c (handle_extended_wait): Use
2320 "allocate_target_description" instead of "XNEW".
2321 * linux-x86-low.c (initialize_low_arch): Likewise.
2322
2323 2017-09-05 Yao Qi <yao.qi@linaro.org>
2324
2325 * configure.srv (srv_i386_regobj): Remove.
2326 (srv_amd64_regobj): Remove.
2327 (srv_regobj): Set it to "" for x86 non-linux targets.
2328 * linux-x86-tdesc.c (i386_linux_read_description):
2329 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2330 (init_registers_i386): Remove the declaration.
2331 (tdesc_i386): Remove the declaration.
2332 (lynx_i386_arch_setup): Call i386_create_target_description.
2333 * nto-x86-low.c: Likewise.
2334 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2335 [!__x86_64__]: include arch/i386.h.
2336 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2337
2338 2017-09-05 Yao Qi <yao.qi@linaro.org>
2339
2340 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2341 i386/amd64-XXX-linux from it.
2342
2343 2017-09-05 Yao Qi <yao.qi@linaro.org>
2344
2345 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2346 false.
2347 (ipa_amd64_linux_regobj): Remove.
2348 (ipa_x32_linux_regobj): Remove.
2349
2350 2017-09-05 Yao Qi <yao.qi@linaro.org>
2351
2352 * Makefile.in (arch-amd64.o): New rule.
2353 * configure.srv: Append arch-amd64.o.
2354 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2355 (get_ipa_tdesc): Call amd64_linux_read_description.
2356 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2357 and init_registers_amd64_XXX.
2358 * linux-x86-low.c (x86_linux_read_description): Call
2359 amd64_linux_read_description.
2360 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2361 (initialize_low_arch): Don't call init_registers_x32_XXX and
2362 init_registers_amd64_XXX.
2363 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2364 and tdesc_amd64_XXX.
2365 [__x86_64__] (amd64_tdesc_test): New function.
2366 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2367 and init_registers_amd64_XXX.
2368 * linux-x86-tdesc.c: Include arch/amd64.h.
2369 (xcr0_to_tdesc_idx): New function.
2370 (i386_linux_read_description): New function.
2371 (amd64_get_ipa_tdesc_idx): New function.
2372 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2373 (amd64_get_ipa_tdesc): Declare.
2374
2375 2017-09-05 Yao Qi <yao.qi@linaro.org>
2376
2377 * configure.srv (srv_i386_linux_xmlfiles): Remove
2378 i386/i386-XXX-linux.xml from it.
2379
2380 2017-09-05 Yao Qi <yao.qi@linaro.org>
2381
2382 * configure.srv: Set srv_i386_linux_regobj empty if $development
2383 is false.
2384 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2385 initialize_low_tdesc.
2386 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2387 with #if initialize_low_tdesc.
2388 * linux-x86-tdesc-selftest.c: New file.
2389 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2390
2391 2017-09-05 Yao Qi <yao.qi@linaro.org>
2392
2393 * Makefile.in (arch-i386.o): New rule.
2394 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2395 (x86_64-*-linux*): Likewise.
2396 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2397 include arch/i386.h.
2398 (i386_linux_read_description): Remove code and call
2399 i386_create_target_description.
2400 * tdesc.c (allocate_target_description): New function.
2401 * tdesc.h (set_tdesc_architecture): Remove declaration.
2402 (set_tdesc_osabi): Likewise.
2403
2404 2017-09-05 Yao Qi <yao.qi@linaro.org>
2405
2406 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2407 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2408 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2409 .xmltarget.
2410 * server.c (get_features_xml): Call tdesc_get_features_xml.
2411 * tdesc.c (set_tdesc_architecture): New function.
2412 (set_tdesc_osabi): New function.
2413 (tdesc_get_features_xml): New function.
2414 (tdesc_create_feature): Add an argument.
2415 * tdesc.h (struct target_desc) <features>: New field.
2416 <arch, osabi>: New field.
2417 (~target_desc): xfree features, arch, and osabi.
2418 (target_desc::oerator==): Don't compare .xmltarget.
2419 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2420 (set_tdesc_osabi): Likewise.
2421 (tdesc_get_features_xml): Likewise.
2422
2423 2017-09-05 Yao Qi <yao.qi@linaro.org>
2424
2425 * linux-x86-tdesc.c: Include selftest.h.
2426 (i386_tdesc_test): New function.
2427 (initialize_low_tdesc): Call selftests::register_test.
2428 * tdesc.h: Include regdef.h.
2429 (target_desc): Override operator == and !=.
2430
2431 2017-09-05 Yao Qi <yao.qi@linaro.org>
2432
2433 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2434 (ipa_obj): Likewise.
2435 * linux-i386-ipa.c: Include common/x86-xstate.h
2436 (get_ipa_tdesc): Call i386_linux_read_description.
2437 (initialize_low_tracepoint): Don't call init_registers_XXX
2438 functions, call initialize_low_tdesc instead.
2439 * linux-x86-low.c (x86_linux_read_description): Call
2440 i386_linux_read_description.
2441 (initialize_low_arch): Don't call init_registers_i386_XXX
2442 functions, call initialize_low_tdesc.
2443 * linux-x86-tdesc.c: New file.
2444 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2445 (i386_get_ipa_tdesc_idx): Declare.
2446 (i386_get_ipa_tdesc): Declare.
2447 (initialize_low_tdesc): Declare.
2448
2449 2017-09-05 Yao Qi <yao.qi@linaro.org>
2450
2451 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2452 instead of 0.
2453
2454 2017-09-05 Yao Qi <yao.qi@linaro.org>
2455
2456 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2457 * regcache.c (get_thread_regcache): Use VEC_length.
2458 (init_register_cache): Likewise.
2459 (regcache_cpy): Likewise.
2460 (registers_to_string): Iterate reg_defs via VEC_iterate.
2461 (find_regno): Likewise.
2462 (find_register_by_number): Use VEC_index.
2463 (register_size): Call find_register_by_number.
2464 (register_data): Call find_register_by_number.
2465 (supply_regblock): Use VEC_length.
2466 (regcache_raw_read_unsigned): Likewise.
2467 * tdesc.c (init_target_desc): Iterate reg_defs via
2468 VEC_iterate.
2469 (default_description): Update initializer.
2470 (copy_target_description): Don't update field num_registers.
2471 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2472 <num_registers>: Remove.
2473
2474 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2475
2476 * Makefile.in (.SECONDARY): Define target.
2477
2478 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2479
2480 * linux-low.c (linux_wait_1): Adjust.
2481 * server.c (queue_stop_reply_callback): Adjust.
2482
2483 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2484
2485 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2486 QEnvironmentUnset and QEnvironmentReset packets.
2487 (handle_query): Inform remote that QEnvironmentHexEncoded,
2488 QEnvironmentUnset and QEnvironmentReset are supported.
2489
2490 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2491
2492 * inferiors.h (inferior_target_data): Rename to ...
2493 (thread_target_data): ... this.
2494 (inferior_regcache_data): Rename to ...
2495 (thread_regcache_data): ... this.
2496 (set_inferior_regcache_data): Rename to ...
2497 (set_thread_regcache_data): ... this.
2498 * inferiors.c (inferior_target_data): Rename to ...
2499 (thread_target_data): ... this.
2500 (inferior_regcache_data): Rename to ...
2501 (thread_regcache_data): ... this.
2502 (set_inferior_regcache_data): Rename to ...
2503 (set_thread_regcache_data): ... this.
2504 (free_one_thread): Update.
2505 * linux-low.h (get_thread_lwp): Update.
2506 * regcache.c (get_thread_regcache): Update.
2507 (regcache_invalidate_thread): Update.
2508 (free_register_cache_thread): Update.
2509 * win32-i386-low.c (update_debug_registers_callback): Update.
2510 (win32_get_current_dr): Update.
2511 * win32-low.c (thread_rec): Update.
2512 (delete_thread_info): Update.
2513 (continue_one_thread): Update.
2514 (suspend_one_thread): Update.
2515
2516 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2517
2518 * inferiors.c (set_inferior_target_data): Remove.
2519 * inferiors.h (set_inferior_target_data): Remove.
2520
2521 2017-08-18 Yao Qi <yao.qi@linaro.org>
2522
2523 * Makefile.in (OBS): Add selftest.o.
2524 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2525 * configure, config.in: Re-generated.
2526 * server.c: Include common/sefltest.h.
2527 (captured_main): Handle option --selftest.
2528
2529 2017-08-09 Yao Qi <yao.qi@linaro.org>
2530
2531 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2532 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2533 i386-avx-mpx.o and i386-mmx.o.
2534 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2535 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2536 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2537 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2538 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2539 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2540 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2541 i386/amd64-avx-mpx.xml.
2542
2543 2017-08-09 Yao Qi <yao.qi@linaro.org>
2544
2545 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2546 and x32-avx-avx512.o.
2547 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2548 i386/x32-avx-avx512.xml.
2549
2550 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2551
2552 * tracepoint.h (enum class fast_tpoint_collect_result): New
2553 enumeration.
2554 (fast_tracepoint_collecting): Change return type to
2555 fast_tpoint_collect_result.
2556 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2557 * linux-low.h: Include tracepoint.h.
2558 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2559 fast_tpoint_collect_result.
2560 * linux-low.c (handle_tracepoints): Adjust.
2561 (linux_fast_tracepoint_collecting): Change return type to
2562 fast_tpoint_collect_result.
2563 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2564 linux_wait_1, stuck_in_jump_pad_callback,
2565 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2566 proceed_one_lwp): Adjust to type change.
2567
2568 2017-07-10 Yao Qi <yao.qi@linaro.org>
2569
2570 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2571
2572 2017-06-29 Yao Qi <yao.qi@linaro.org>
2573
2574 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2575 Remove.
2576 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2577
2578 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2579
2580 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2581
2582 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2583
2584 * linux-low.c (linux_create_inferior): Adjust code to access the
2585 environment information via 'gdb_environ' class.
2586 * lynx-low.c (lynx_create_inferior): Likewise.
2587 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2588 (get_environ): Return a pointer to 'our_environ'.
2589 (captured_main): Initialize 'our_environ'.
2590 * server.h (get_environ): Adjust prototype.
2591 * spu-low.c (spu_create_inferior): Adjust code to access the
2592 environment information via 'gdb_environ' class.
2593
2594 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2595
2596 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2597 usage of "register" keyword.
2598
2599 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2600
2601 * configure: Re-generate.
2602
2603 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2604
2605 * configure: Re-generate.
2606
2607 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2608
2609 * Makefile.in (COMPILE.pre): Add "-x c++".
2610
2611 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2612
2613 * fork-child.c: Conditionally include <signal.h>.
2614
2615 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2616
2617 * server.c (handle_general_set): Handle new packet
2618 "QStartupWithShell".
2619 (handle_query): Add "QStartupWithShell" to the list of supported
2620 packets.
2621 (gdbserver_usage): Add help text explaining the
2622 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2623 options.
2624 (captured_main): Recognize and act upon the presence of the new
2625 CLI options.
2626
2627 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2628 Pedro Alves <palves@redhat.com>
2629
2630 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2631 * configure: Regenerate.
2632 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2633 "fork-inferior.o".
2634 (i[34567]86-*-lynxos*): Likewise.
2635 (spu*-*-*): Likewise.
2636 * fork-child.c: New file.
2637 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2638 and "environ.h".
2639 (linux_ptrace_fun): New function.
2640 (linux_create_inferior): Adjust function prototype to reflect
2641 change on "target.h". Adjust function code to use
2642 "fork_inferior".
2643 (linux_request_interrupt): Delete "signal_pid".
2644 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2645 (lynx_ptrace_fun): New function.
2646 (lynx_create_inferior): Adjust function prototype to reflect
2647 change on "target.h". Adjust function code to use
2648 "fork_inferior".
2649 * nto-low.c (nto_create_inferior): Adjust function prototype and
2650 code to reflect change on "target.h". Update comments.
2651 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2652 "common-terminal.h" and "environ.h".
2653 (terminal_fd): Moved to fork-child.c.
2654 (old_foreground_pgrp): Likewise.
2655 (restore_old_foreground_pgrp): Likewise.
2656 (last_status): Make it global.
2657 (last_ptid): Likewise.
2658 (our_environ): New variable.
2659 (startup_with_shell): Likewise.
2660 (program_name): Likewise.
2661 (program_argv): Rename to...
2662 (program_args): ...this.
2663 (wrapper_argv): New variable.
2664 (start_inferior): Delete function.
2665 (get_exec_wrapper): New function.
2666 (get_exec_file): Likewise.
2667 (get_environ): Likewise.
2668 (prefork_hook): Likewise.
2669 (post_fork_inferior): Likewise.
2670 (postfork_hook): Likewise.
2671 (postfork_child_hook): Likewise.
2672 (handle_v_run): Update code to deal with arguments coming from the
2673 remote host. Update calls from "start_inferior" to
2674 "create_inferior".
2675 (captured_main): Likewise. Initialize environment variable. Call
2676 "have_job_control".
2677 * server.h (post_fork_inferior): New prototype.
2678 (get_environ): Likewise.
2679 (last_status): Declare.
2680 (last_ptid): Likewise.
2681 (signal_pid): Likewise.
2682 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2683 (spu_ptrace_fun): New function.
2684 (spu_create_inferior): Adjust function prototype to reflect change
2685 on "target.h". Adjust function code to use "fork_inferior".
2686 * target.c (target_terminal_init): New function.
2687 (target_terminal_inferior): Likewise.
2688 (target_terminal_ours): Likewise.
2689 * target.h: Include <vector>.
2690 (struct target_ops) <create_inferior>: Update prototype.
2691 (create_inferior): Update macro.
2692 * utils.c (gdb_flush_out_err): New function.
2693 * win32-low.c (win32_create_inferior): Adjust function prototype
2694 and code to reflect change on "target.h".
2695
2696 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2697
2698 * inferiors.c (switch_to_thread): New function.
2699
2700 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2701
2702 * Makefile.in (SFILE): Add "common/job-control.c".
2703 (OBS): Add "job-control.o".
2704
2705 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2706
2707 * Makefile: Remove "@host_makefile_frag@".
2708
2709 2017-05-05 Pedro Alves <palves@redhat.com>
2710
2711 * configure: Regenerate.
2712
2713 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2714
2715 * configure: Regenerate.
2716
2717 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2718
2719 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2720 software_single_step change of return type to
2721 std::vector<CORE_ADDR>.
2722 * linux-low.c (install_software_single_step_breakpoints):
2723 Likewise.
2724 * linux-low.h (install_software_single_step_breakpoints):
2725 Likewise.
2726
2727 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2728
2729 * remote-utils.c: Include "gdb_termios.h" instead of
2730 "terminal.h".
2731 * terminal.h: Delete file.
2732
2733 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2734
2735 * server.c: Include <vector>.
2736 <program_argv, wrapper_argv>: Convert to std::vector.
2737 (start_inferior): Rewrite function to use C++.
2738 (handle_v_run): Likewise. Update code that calculates the argv
2739 based on the vRun packet; use C++.
2740 (captured_main): Likewise.
2741
2742 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2743
2744 * server.c (handle_v_cont): Initialize thread_resume::thread
2745 with null_ptid.
2746
2747 2017-04-05 Pedro Alves <palves@redhat.com>
2748
2749 * configure: Regenerate.
2750
2751 2017-04-05 Pedro Alves <palves@redhat.com>
2752
2753 * gdbreplay.c (sync_error): Constify.
2754 * linux-x86-low.c (push_opcode): Constify.
2755
2756 2017-04-05 Pedro Alves <palves@redhat.com>
2757
2758 * win32-low.c (get_child_debug_event)
2759 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2760 Report TARGET_WAITKIND_SPURIOUS instead.
2761
2762 2017-04-05 Pedro Alves <palves@redhat.com>
2763
2764 * remote-utils.c (remote_prepare, remote_open): Constify.
2765 * remote-utils.h (remote_prepare, remote_open): Constify.
2766 * server.c (captured_main): Constify 'port' handling.
2767
2768 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2769
2770 * Makefile.in (clean): Clear .deps.
2771
2772 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2773
2774 * .gitignore: Remove generated files, replace with wildcard.
2775 * (clean): Replace removal of generated files with wildcard.
2776 (version.c): Replace with...
2777 (version-generated.c): ...this.
2778 (xml-builtin.c): Replace with...
2779 (xml-builtin-generated.c): ...this.
2780 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2781 (%.c: *regformats*): Replace with...
2782 (%-generated.c: *regformats*): ...this.
2783
2784 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2785
2786 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2787 (xtensa_fill_gregset): Call collect_register_by_name for
2788 threadptr register.
2789 (xtensa_store_gregset): Call supply_register_by_name for
2790 threadptr register.
2791
2792 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2793
2794 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2795 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2796 (xtensa_store_gregset): Call supply_register for all registers in
2797 a0_regnum..a0_regnum + C0_NREGS range.
2798
2799 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2800
2801 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2802 (ax-ipa.o: ax.c): Remove.
2803 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2804 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2805 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2806 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2807 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2808
2809 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2810
2811 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2812 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2813 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2814 (errors-ipa.o: ../common/errors.c): Remove.
2815 (format-ipa.o: ../common/format.c): Remove.
2816 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2817
2818 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2819
2820 * Makefile.in (%-ipa.o: %.c): New rule.
2821 (tracepoint-ipa.o: tracepoint.c): Remove.
2822 (utils-ipa.o: utils.c): Remove.
2823 (remote-utils-ipa.o: remote-utils.c): Remove.
2824 (regcache-ipa.o: regcache.c): Remove.
2825 (i386-linux-ipa.o: i386-linux.c): Remove.
2826 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2827 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2828 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2829 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2830 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2831 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2832 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2833 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2834 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2835 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2836 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2837 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2838 (aarch64-ipa.o: aarch64.c): Remove.
2839 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2840 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2841 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2842 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2843 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2844 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2845 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2846 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2847 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2848 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2849 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2850 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2851 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2852 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2853 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2854 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2855 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2856 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2857 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2858 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2859 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2860 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2861 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2862 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2863 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2864 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2865 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2866 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2867 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2868 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2869 (tdesc-ipa.o: tdesc.c): Remove.
2870 (x32-linux-ipa.o: x32-linux.c): Remove.
2871 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2872 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2873
2874 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2875
2876 * Makefile.in (%.o: ../arch/%.c): New rule.
2877 (arm.o: ../arch/arm.c): Remove.
2878 (arm-linux.o: ../arch/arm-linux.c): Remove.
2879 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2880 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2881
2882 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2883
2884 * Makefile.in (%.o: ../nat/%.c): New rule.
2885 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2886 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2887 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2888 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2889 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2890 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2891 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2892 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2893 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2894 (linux-personality.o: ../nat/linux-personality.c): Remove.
2895 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2896 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2897 (x86-linux.o: ../nat/x86-linux.c): Remove.
2898 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2899 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2900
2901 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2902
2903 * Makefile.in (%.o: ../common/%.c): New rule.
2904 (signals.o: ../common/signals.c): Remove.
2905 (print-utils.o: ../common/print-utils.c): Remove.
2906 (rsp-low.o: ../common/rsp-low.c): Remove.
2907 (common-utils.o: ../common/common-utils.c): Remove.
2908 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2909 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2910 (vec.o: ../common/vec.c): Remove.
2911 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2912 (xml-utils.o: ../common/xml-utils.c): Remove.
2913 (ptid.o: ../common/ptid.c): Remove.
2914 (buffer.o: ../common/buffer.c): Remove.
2915 (format.o: ../common/format.c): Remove.
2916 (filestuff.o: ../common/filestuff.c): Remove.
2917 (agent.o: ../common/agent.c): Remove.
2918 (errors.o: ../common/errors.c): Remove.
2919 (environ.o: ../common/environ.c): Remove.
2920 (common-debug.o: ../common/common-debug.c): Remove.
2921 (cleanups.o: ../common/cleanups.c): Remove.
2922 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2923 (fileio.o: ../common/fileio.c): Remove.
2924 (common-regcache.o: ../common/common-regcache.c): Remove.
2925 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2926 (new-op.o: ../common/new-op.c): Remove.
2927 (btrace-common.o: ../common/btrace-common.c): Remove.
2928
2929 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2930
2931 * Makefile.in (%.o: ../target/%.c): New rule.
2932 (waitstatus.o: ../target/waitstatus.c): Remove.
2933
2934 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2935
2936 * Makefile.in
2937 (%.c: ../regformats/%.dat,
2938 (%.c: ../regformats/arm/%.dat,
2939 (%.c: ../regformats/i386/%.dat,
2940 (%.c: ../regformats/rs6000/%.dat): New rules.
2941 (aarch64.c): Remove.
2942 (reg-arm.c): Remove.
2943 (arm-with-iwmmxt.c): Remove.
2944 (arm-with-vfpv2.c): Remove.
2945 (arm-with-vfpv3.c): Remove.
2946 (arm-with-neon.c): Remove.
2947 (reg-bfin.c): Remove.
2948 (reg-cris.c): Remove.
2949 (reg-crisv32.c): Remove.
2950 (i386.c): Remove.
2951 (i386-linux.c): Remove.
2952 (i386-avx.c): Remove.
2953 (i386-avx-linux.c): Remove.
2954 (i386-avx-avx512.c): Remove.
2955 (i386-avx-avx512-linux.c): Remove.
2956 (i386-mpx.c): Remove.
2957 (i386-mpx-linux.c): Remove.
2958 (i386-avx-mpx-avx512-pku.c): Remove.
2959 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2960 (i386-avx-mpx.c): Remove.
2961 (i386-avx-mpx-linux.c): Remove.
2962 (i386-mmx.c): Remove.
2963 (i386-mmx-linux.c): Remove.
2964 (reg-ia64.c): Remove.
2965 (reg-m32r.c): Remove.
2966 (reg-m68k.c): Remove.
2967 (reg-cf.c): Remove.
2968 (mips-linux.c): Remove.
2969 (mips-dsp-linux.c): Remove.
2970 (mips64-linux.c): Remove.
2971 (mips64-dsp-linux.c): Remove.
2972 (nios2-linux.c): Remove.
2973 (powerpc-32.c): Remove.
2974 (powerpc-32l.c): Remove.
2975 (powerpc-altivec32l.c): Remove.
2976 (powerpc-cell32l.c): Remove.
2977 (powerpc-vsx32l.c): Remove.
2978 (powerpc-isa205-32l.c): Remove.
2979 (powerpc-isa205-altivec32l.c): Remove.
2980 (powerpc-isa205-vsx32l.c): Remove.
2981 (powerpc-e500l.c): Remove.
2982 (powerpc-64l.c): Remove.
2983 (powerpc-altivec64l.c): Remove.
2984 (powerpc-cell64l.c): Remove.
2985 (powerpc-vsx64l.c): Remove.
2986 (powerpc-isa205-64l.c): Remove.
2987 (powerpc-isa205-altivec64l.c): Remove.
2988 (powerpc-isa205-vsx64l.c): Remove.
2989 (s390-linux32.c): Remove.
2990 (s390-linux32v1.c): Remove.
2991 (s390-linux32v2.c): Remove.
2992 (s390-linux64.c): Remove.
2993 (s390-linux64v1.c): Remove.
2994 (s390-linux64v2.c): Remove.
2995 (s390-te-linux64.c): Remove.
2996 (s390-vx-linux64.c): Remove.
2997 (s390-tevx-linux64.c): Remove.
2998 (s390x-linux64.c): Remove.
2999 (s390x-linux64v1.c): Remove.
3000 (s390x-linux64v2.c): Remove.
3001 (s390x-te-linux64.c): Remove.
3002 (s390x-vx-linux64.c): Remove.
3003 (s390x-tevx-linux64.c): Remove.
3004 (tic6x-c64xp-linux.c): Remove.
3005 (tic6x-c64x-linux.c): Remove.
3006 (tic6x-c62x-linux.c): Remove.
3007 (reg-sh.c): Remove.
3008 (reg-sparc64.c): Remove.
3009 (reg-spu.c): Remove.
3010 (amd64.c): Remove.
3011 (amd64-linux.c): Remove.
3012 (amd64-avx.c): Remove.
3013 (amd64-avx-linux.c): Remove.
3014 (amd64-avx-avx512.c): Remove.
3015 (amd64-avx-avx512-linux.c): Remove.
3016 (amd64-mpx.c): Remove.
3017 (amd64-mpx-linux.c): Remove.
3018 (amd64-avx-mpx-avx512-pku.c): Remove.
3019 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3020 (amd64-avx-mpx.c): Remove.
3021 (amd64-avx-mpx-linux.c): Remove.
3022 (x32.c): Remove.
3023 (x32-linux.c): Remove.
3024 (x32-avx.c): Remove.
3025 (x32-avx-linux.c): Remove.
3026 (x32-avx-avx512.c): Remove.
3027 (x32-avx-avx512-linux.c): Remove.
3028 (reg-xtensa.c): Remove.
3029 (reg-tilegx.c): Remove.
3030 (reg-tilegx32.c): Remove.
3031
3032 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3033
3034 * Makefile.in (SFILES): Add "common/environ.c".
3035 (OBJS): Add "common/environ.h".
3036
3037 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3038
3039 * configure.ac: Check if the fs_base and gs_base members of
3040 `struct user_regs_struct' exist.
3041 * config.in: Regenerated.
3042 * configure: Likewise.
3043
3044 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3045
3046 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3047 target_read_memory.
3048 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3049 (get_next_pcs_syscall_next_pc): Likewise.
3050
3051 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3052
3053 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3054 * nto-x86-low.c: Likewise.
3055
3056 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3057
3058 * Makefile.in: Include disable-implicit-rules.mk.
3059
3060 2016-11-23 Pedro Alves <palves@redhat.com>
3061
3062 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3063 (debug_vprintf): Use std::chrono::steady_clock instead of
3064 gettimeofday. Use '.' instead of ':'.
3065 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3066 (get_timestamp): Use std::chrono::steady_clock instead of
3067 gettimeofday.
3068
3069 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3070
3071 * Makefile.in: Fix whitespace formatting.
3072
3073 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3074
3075 * Makefile.in (SFILES, OBS): Flatten list and order
3076 alphabetically.
3077
3078 2016-11-23 Pedro Alves <palves@redhat.com>
3079
3080 * event-loop.c (handle_file_event): Use warning.
3081 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3082 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3083 Use warning.
3084
3085 2016-11-23 Pedro Alves <palves@redhat.com>
3086
3087 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3088 output.
3089 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3090 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3091 debug_printf and debug_flush for debug output.
3092 * server.c (handle_general_set): Likewise.
3093 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3094 output.
3095
3096 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3097
3098 * Makefile.in (.c.o): Replace rule with ...
3099 (%.o: %.c): ... this one.
3100
3101 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3102
3103 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3104 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3105 make.
3106 * configure.ac: Remove checks for the make program.
3107 * configure: Re-generate.
3108
3109 2016-10-28 Pedro Alves <palves@redhat.com>
3110
3111 * Makefile.in (CXX_DIALECT): Get from configure.
3112 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3113 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3114 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3115 * config.in: Regenerate.
3116 * configure: Regenerate.
3117
3118 2016-10-27 Yao Qi <yao.qi@linaro.org>
3119
3120 * linux-low.c (linux_supports_range_stepping): Return true if
3121 can_software_single_step return true.
3122
3123 2016-10-27 Yao Qi <yao.qi@linaro.org>
3124
3125 * inferiors.c (find_inferior_in_random): New function.
3126 * inferiors.h (find_inferior_in_random): Declare.
3127 * linux-low.c (linux_wait_for_event_filtered): Call
3128 find_inferior_in_random instead of find_inferior.
3129
3130 2016-10-27 Yao Qi <yao.qi@linaro.org>
3131
3132 * linux-low.c (linux_wait_1): If single-step breakpoints are
3133 inserted, remove them.
3134
3135 2016-10-26 Pedro Alves <palves@redhat.com>
3136
3137 * linux-low.c (handle_extended_wait): Link parent/child fork
3138 threads.
3139 (linux_wait_1): Unlink them.
3140 (linux_set_resume_request): Ignore resume requests for
3141 already-resumed and unhandled fork child threads.
3142 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3143 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3144 New functions.
3145 (handle_v_requests) <vCont>: Don't call require_running.
3146 * server.h (in_queued_stop_replies): New declaration.
3147
3148 2016-10-24 Yao Qi <yao.qi@linaro.org>
3149
3150 PR server/20733
3151 * linux-aarch64-low.c (append_insns): Cast the return value to
3152 'uint32_t *'.
3153
3154 2016-10-10 Yao Qi <yao.qi@linaro.org>
3155
3156 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3157
3158 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3159
3160 * target.c (target_supports_multi_process): New function, moved
3161 from...
3162 * target.h (target_supports_multi_process): ... here. Remove
3163 macro.
3164
3165 2016-10-05 Tom Tromey <tom@tromey.com>
3166
3167 PR remote/20655:
3168 * tracepoint.c (handle_tracepoint_bkpts): Check
3169 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3170
3171 2016-10-05 Yao Qi <yao.qi@linaro.org>
3172
3173 * configure.srv: Update the path of arm-*.xml files.
3174
3175 2016-10-05 Terry Guo <terry.guo@arm.com>
3176 Yao Qi <yao.qi@linaro.org>
3177
3178 * Makefile.in: Adjust the path of rules.
3179 * configure.srv: Update the path of xml files.
3180 * regformats/arm-with-iwmmxt.dat: Regenerated.
3181 * regformats/arm-with-neon.dat: Likewise.
3182 * regformats/arm-with-vfpv2.dat: Likewise.
3183 * regformats/arm-with-vfpv3.dat Likewise.
3184
3185 2016-09-30 Yao Qi <yao.qi@linaro.org>
3186
3187 PR gdbserver/20627
3188 * target.c (target_stop_and_wait): Don't call
3189 target_continue_no_signal, use resume_stop instead.
3190
3191 2016-09-26 Yao Qi <yao.qi@linaro.org>
3192
3193 * linux-low.c (linux_wait_1): Call debug_exit.
3194
3195 2016-09-23 Pedro Alves <palves@redhat.com>
3196
3197 * Makefile.in (SFILES): Add common/new-op.c.
3198 (OBS): Add common/new-op.o.
3199 (new-op.o): New rule.
3200
3201 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3202
3203 * .gitinore: Ignore more files.
3204
3205 2016-09-21 Yao Qi <yao.qi@linaro.org>
3206
3207 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3208 23.
3209
3210 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3211
3212 * server.c (start_inferior): Call target_mourn_inferior instead of
3213 mourn_inferior; pass ptid_t argument to it.
3214 (resume): Likewise.
3215 (handle_target_event): Likewise.
3216 * target.c (target_mourn_inferior): New function.
3217 * target.h (mourn_inferior): Delete macro.
3218
3219 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3220
3221 * linux-low.c (lwp_is_stepping): New function.
3222
3223 2016-09-06 Carl Love <cel@us.ibm.com>
3224
3225 * server.c (start_inferior): Fixed comment, requested comment change
3226 didn't get updated correctly. Removed reference to ptrace () call as
3227 it is only true on Linux systems.
3228
3229 2016-09-06 Carl Love <cel@us.ibm.com>
3230
3231 * server.c (start_inferior): Do not call
3232 function target_post_create_inferior () if the
3233 inferior process has already exited.
3234
3235 2016-09-05 Pedro Alves <palves@redhat.com>
3236
3237 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3238 (COMPILE.pre, CC_LD): Use CXX directly.
3239 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3240 * acinclude.m4: Don't include build-with-cxx.m4.
3241 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3242 * configure: Regenerate.
3243
3244 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3245
3246 PR gdb/19495
3247 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3248 call writing data to own_buf.
3249
3250 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3251
3252 * target.c (mywait): Call target_wait instead of
3253 the_target->wait.
3254 (target_wait): New function.
3255
3256 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3257
3258 * server.c (start_inferior): New variable 'ptid'. Replace calls
3259 to the_target->resume by target_continue{,_no_signal}, depending
3260 on the case.
3261 * target.c (target_stop_and_wait): Call target_continue_no_signal
3262 instead of the_target->resume.
3263 (target_continue): New function.
3264
3265 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3266
3267 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3268
3269 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3270
3271 PR server/20491
3272 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3273 ps_prochandle.
3274 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3275 * linux-arm-low.c (ps_get_thread_area): Likewise.
3276 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3277 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3278 * linux-mips-low.c (ps_get_thread_area): Likewise.
3279 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3280 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3281 * linux-x86-low.c (ps_get_thread_area): Likewise.
3282 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3283
3284 2016-08-19 Pedro Alves <palves@redhat.com>
3285
3286 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3287
3288 2016-08-19 Pedro Alves <palves@redhat.com>
3289
3290 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3291 comment. Use memcpy instead of casting through unsigned long.
3292
3293 2016-08-19 Pedro Alves <palves@redhat.com>
3294
3295 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3296 allocating around 0x80000000.
3297
3298 2016-08-19 Pedro Alves <palves@redhat.com>
3299
3300 PR gdb/20415
3301 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3302 (x32-avx512-linux-ipa.o): New rules.
3303 * configure.ac (x86_64-*-linux*): New x32 check.
3304 * configure.srv (ipa_x32_linux_regobj): New.
3305 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3306 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3307 descriptions.
3308 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3309 descriptions.
3310 * configure: Regenerate.
3311
3312 2016-08-09 Pedro Alves <palves@redhat.com>
3313
3314 PR gdb/18653
3315 * Makefile.in (OBS): Add signals-state-save-restore.o.
3316 (signals-state-save-restore.o): New rule.
3317 * config.in: Regenerate.
3318 * configure: Regenerate.
3319 * linux-low.c: Include "signals-state-save-restore.h".
3320 (linux_create_inferior): Call
3321 restore_original_signals_state.
3322 * server.c: Include "dispositions-save-restore.h".
3323 (captured_main): Call save_original_signals_state.
3324
3325 2016-08-05 Pedro Alves <palves@redhat.com>
3326
3327 * configure: Regenerate.
3328
3329 2016-08-04 Yao Qi <yao.qi@linaro.org>
3330
3331 * linux-low.c (regsets_fetch_inferior_registers): Check
3332 errno is ESRCH or not.
3333
3334 2016-08-02 Yao Qi <yao.qi@linaro.org>
3335
3336 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3337 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3338 (thread_db_load_search): Update.
3339 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3340 td_ta_set_event and td_ta_event_getmsg.
3341
3342 2016-07-26 Pedro Alves <palves@redhat.com>
3343
3344 PR server/20414
3345 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3346 of unsigned long for 64-bit registers and use uint32_t instead of
3347 unsigned int for 32-bit registers.
3348
3349 2016-07-26 Pedro Alves <palves@redhat.com>
3350
3351 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3352 to 'ptrace'.
3353
3354 2016-07-21 Tom Tromey <tom@tromey.com>
3355
3356 * configure: Rebuild.
3357
3358 2016-07-21 Yao Qi <yao.qi@linaro.org>
3359
3360 * mem-break.c (find_gdb_breakpoint): Cast bp to
3361 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3362
3363 2016-07-21 Yao Qi <yao.qi@linaro.org>
3364
3365 * server.c (handle_v_requests): Support s and S actions
3366 if target_supports_software_single_step return true.
3367
3368 2016-07-21 Yao Qi <yao.qi@linaro.org>
3369
3370 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3371 is resume_step, call maybe_hw_step.
3372 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3373 and unstop them.
3374 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3375 breakpoints or not.
3376 (proceed_one_lwp): If resume request is resume_step, install
3377 reinsert breakpoints and call maybe_hw_step.
3378
3379 2016-07-21 Yao Qi <yao.qi@linaro.org>
3380
3381 * linux-low.c (proceed_one_lwp): Declare.
3382 (linux_resume_one_thread): Remove local variable 'step'.
3383 Lift code enqueue signal. Call proceed_one_lwp instead of
3384 linux_resume_one_lwp.
3385
3386 2016-07-21 Yao Qi <yao.qi@linaro.org>
3387
3388 * linux-low.c (linux_resume_one_thread): Call
3389 enqueue_pending_signal.
3390
3391 2016-07-21 Yao Qi <yao.qi@linaro.org>
3392
3393 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3394 * inferiors.c (do_restore_current_thread_cleanup): New function.
3395 (make_cleanup_restore_current_thread): Likewise.
3396 * linux-low.c (install_software_single_step_breakpoints): Call
3397 make_cleanup_restore_current_thread. Switch current_thread to
3398 thread.
3399
3400 2016-07-21 Yao Qi <yao.qi@linaro.org>
3401
3402 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3403 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3404 (clone_one_breakpoint): Likewise.
3405 (delete_reinsert_breakpoints): Change parameter to thread.
3406 Callers updated.
3407 (has_reinsert_breakpoints): Likewise.
3408 (uninsert_reinsert_breakpoints): Likewise.
3409 (reinsert_reinsert_breakpoints): Likewise.
3410 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3411 (delete_reinsert_breakpoints): Likewise.
3412 (reinsert_reinsert_breakpoints): Likewise.
3413 (uninsert_reinsert_breakpoints): Likewise.
3414 (has_reinsert_breakpoints): Likewise.
3415
3416 2016-07-21 Yao Qi <yao.qi@linaro.org>
3417
3418 * inferiors.c (get_thread_process): Make parameter const.
3419 * inferiors.h (get_thread_process): Update declaration.
3420 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3421 Add new parameters child_thread and parent_thread. Callers
3422 updated.
3423 * mem-break.h (clone_all_breakpoints): Update declaration.
3424
3425 2016-07-21 Yao Qi <yao.qi@linaro.org>
3426
3427 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3428 <command_list, handler>: Remove.
3429 (struct gdb_breakpoint): New.
3430 (struct other_breakpoint): New.
3431 (struct reinsert_breakpoint): New.
3432 (is_gdb_breakpoint): New function.
3433 (any_persistent_commands): Update command_list if
3434 is_gdb_breakpoint returns true.
3435 (set_breakpoint): Create breakpoints according to their types.
3436 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3437 (set_gdb_breakpoint_1): Likewise.
3438 (set_gdb_breakpoint): Likewise.
3439 (clear_breakpoint_conditions): Change parameter type to
3440 'struct gdb_breakpoint *'.
3441 (clear_breakpoint_commands): Likewise.
3442 (clear_breakpoint_conditions_and_commands): Likewise.
3443 (add_condition_to_breakpoint): Likewise.
3444 (add_breakpoint_condition): Likewise.
3445 (add_commands_to_breakpoint): Likewise.
3446 (check_breakpoints): Check other_breakpoint.
3447 (clone_one_breakpoint): Clone breakpopint according to its type.
3448 * mem-break.h (struct gdb_breakpoint): Declare.
3449 (set_gdb_breakpoint): Update declaration.
3450 (clear_breakpoint_conditions_and_commands): Likewise.
3451 (add_breakpoint_condition): Likewise.
3452 (add_breakpoint_commands): Likewise.
3453 * server.c (process_point_options): Change parameter type to
3454 'struct gdb_breakpoint *'.
3455
3456 2016-07-21 Yao Qi <yao.qi@linaro.org>
3457
3458 * mem-break.c (set_breakpoint_at): Rename it to ...
3459 (set_breakpoint_type_at): ... it.
3460 (set_breakpoint_at): Call set_breakpoint_type_at.
3461 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3462 * mem-break.h (set_breakpoint_at): Update comments.
3463
3464 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3465
3466 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3467 to buf parameter.
3468 (nios2_store_gregset): Likewise.
3469
3470 2016-07-01 Pedro Alves <palves@redhat.com>
3471 Antoine Tremblay <antoine.tremblay@ericsson.com>
3472
3473 * linux-low.c: Change interface to take the target lwp_info
3474 pointer directly and return void. Handle detaching from a zombie
3475 thread.
3476 (linux_detach_lwp_callback): New function.
3477 (linux_detach): Detach from the leader thread after detaching from
3478 the clone threads.
3479
3480 2016-06-28 Yao Qi <yao.qi@linaro.org>
3481
3482 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3483 for variable new_offset.
3484 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3485 (aarch64_ftrace_insn_reloc_cb): Likewise.
3486 (aarch64_ftrace_insn_reloc_tb): Likewise.
3487 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3488 PRIx64 instead of PRIx32.
3489
3490 2016-06-28 Yao Qi <yao.qi@linaro.org>
3491
3492 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3493 (the_low_target): Install arm_get_syscall_trapinfo.
3494
3495 2016-06-28 Yao Qi <yao.qi@linaro.org>
3496
3497 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3498 function.
3499 (the_low_target): Install aarch64_get_syscall_trapinfo.
3500
3501 2016-06-28 Yao Qi <yao.qi@linaro.org>
3502
3503 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3504 Callers updated.
3505 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3506 Remove parameter sysno.
3507 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3508 sysret.
3509
3510 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3511
3512 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3513 (s390_emit_ne_goto): Likewise.
3514 (s390_emit_lt_goto): Likewise.
3515 (s390_emit_le_goto): Likewise.
3516 (s390_emit_gt_goto): Likewise.
3517 (s390_emit_ge_goto): Likewise.
3518 (s390x_emit_eq_goto): Likewise.
3519 (s390x_emit_ne_goto): Likewise.
3520 (s390x_emit_lt_goto): Likewise.
3521 (s390x_emit_le_goto): Likewise.
3522 (s390x_emit_gt_goto): Likewise.
3523 (s390x_emit_ge_goto): Likewise.
3524 (s390_emit_ops_impl): Mark variable static.
3525 (s390x_emit_ops): Likewise.
3526
3527 2016-06-17 Yao Qi <yao.qi@linaro.org>
3528
3529 * linux-low.c (handle_extended_wait): Call
3530 uninsert_reinsert_breakpoints for the parent process. Remove
3531 reinsert breakpoints from the child process. Reinsert them to
3532 the parent process when vfork is done.
3533 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3534 (reinsert_reinsert_breakpoints): New function.
3535 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3536 (reinsert_reinsert_breakpoints): Declare.
3537
3538 2016-06-17 Yao Qi <yao.qi@linaro.org>
3539
3540 * linux-low.c (handle_extended_wait): If the parent is doing
3541 step-over, remove the reinsert breakpoints from the forked child.
3542
3543 2016-06-17 Yao Qi <yao.qi@linaro.org>
3544
3545 * linux-low.c (unsuspend_all_lwps): Declare.
3546 (linux_low_filter_event): If thread exited, call finish_step_over.
3547 If step-over is finished, unsuspend other threads.
3548
3549 2016-06-17 Yao Qi <yao.qi@linaro.org>
3550
3551 * linux-low.c (linux_resume_one_lwp_throw): Assert
3552 has_reinsert_breakpoints returns false.
3553 * mem-break.c (delete_disabled_breakpoints): Assert
3554 bp type isn't reinsert_breakpoint.
3555
3556 2016-06-17 Yao Qi <yao.qi@linaro.org>
3557
3558 * linux-low.c (maybe_hw_step): New function.
3559 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3560 (finish_step_over): Switch current_thread to lwp temporarily,
3561 and assert has_reinsert_breakpoints returns true.
3562 (proceed_one_lwp): Call maybe_hw_step.
3563 * mem-break.c (has_reinsert_breakpoints): New function.
3564 * mem-break.h (has_reinsert_breakpoints): Declare.
3565
3566 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3567
3568 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3569
3570 2016-05-17 Yao Qi <yao.qi@linaro.org>
3571
3572 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3573 instead of find_inferior.
3574
3575 2016-05-05 Yao Qi <yao.qi@linaro.org>
3576
3577 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3578 Initialize res to zero.
3579
3580 2016-05-05 Yao Qi <yao.qi@linaro.org>
3581
3582 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3583 to uint32_t.
3584
3585 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3586
3587 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3588 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3589 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3590
3591 2016-04-28 Par Olsson <par.olsson@windriver.com>
3592 Simon Marchi <simon.marchi@ericsson.com>
3593
3594 * tracepoint.c (write_inferior_int8): New function.
3595 (cmd_qtenable_disable): Write enable flag using
3596 write_inferior_int8.
3597
3598 2016-04-25 Yao Qi <yao.qi@linaro.org>
3599
3600 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3601 (need_step_over_p): Return zero if the LWP has pending signals
3602 can be delivered on software single step target.
3603
3604 2016-04-25 Yao Qi <yao.qi@linaro.org>
3605
3606 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3607 return instead of error.
3608
3609 2016-04-22 Yao Qi <yao.qi@linaro.org>
3610
3611 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3612 to 23.
3613
3614 2016-04-22 Yao Qi <yao.qi@linaro.org>
3615
3616 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3617 signal when stepping over breakpoint with software single
3618 step.
3619
3620 2016-04-21 Pedro Alves <palves@redhat.com>
3621
3622 * linux-s390-low.c (s390_collect_ptrace_register)
3623 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3624 add casts.
3625 (s390_check_regset): Use void * instead of gdb_byte *.
3626
3627 2016-04-20 Pedro Alves <palves@redhat.com>
3628
3629 * configure: Renegerate.
3630
3631 2016-04-20 Yao Qi <yao.qi@linaro.org>
3632
3633 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3634 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3635 number 16.
3636 (arm_store_gregset): Likewise.
3637
3638 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3639
3640 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3641 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3642 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3643 (amd64-avx-mpx-linux.c): New rules.
3644 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3645 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3646 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3647 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3648 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3649 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3650 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3651 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3652 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3653 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3654 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3655 * linux-x86-low.c (x86_linux_read_description): Add case for
3656 X86_XSTATE_AVX_MPX_MASK.
3657 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3658 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3659 init_registers_i386_avx_mpx_linux.
3660 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3661 (initialize_low_tracepoint): Call
3662 init_registers_i386_avx_mpx_linux.
3663 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3664 (initialize_low_tracepoint): Call
3665 init_registers_amd64_avx_mpx_linux.
3666 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3667 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3668 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3669 declarations.
3670
3671 2016-04-18 Pedro Alves <palves@redhat.com>
3672
3673 * configure: Regenerate.
3674
3675 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3676
3677 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3678 (aarch64_emit_sub): Likewise.
3679
3680 2016-04-12 Pedro Alves <palves@redhat.com>
3681
3682 * utils.c (prepare_to_throw_exception): Delete.
3683
3684 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3685
3686 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3687
3688 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3689
3690 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3691
3692 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3693
3694 * linux-aarch64-ipa.c: Add <elf.h> include.
3695 * linux-ppc-ipa.c: Add <elf.h> include.
3696 * linux-s390-ipa.c: Add <elf.h> include.
3697
3698 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3699
3700 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3701 (get_raw_reg_ptr): Likewise.
3702 (get_trace_state_variable_value_ptr): Likewise.
3703 (set_trace_state_variable_value_ptr): Likewise.
3704 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3705 char *.
3706
3707 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3708 Marcin Kościelnicki <koriakin@0x04.net>
3709
3710 PR/17221
3711 * linux-ppc-low.c (emit_insns): New function.
3712 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3713 (ppc_emit_prologue): New function.
3714 (ppc_emit_epilogue): New function.
3715 (ppc_emit_add): New function.
3716 (ppc_emit_sub): New function.
3717 (ppc_emit_mul): New function.
3718 (ppc_emit_lsh): New function.
3719 (ppc_emit_rsh_signed): New function.
3720 (ppc_emit_rsh_unsigned): New function.
3721 (ppc_emit_ext): New function.
3722 (ppc_emit_zero_ext): New function.
3723 (ppc_emit_log_not): New function.
3724 (ppc_emit_bit_and): New function.
3725 (ppc_emit_bit_or): New function.
3726 (ppc_emit_bit_xor): New function.
3727 (ppc_emit_bit_not): New function.
3728 (ppc_emit_equal): New function.
3729 (ppc_emit_less_signed): New function.
3730 (ppc_emit_less_unsigned): New function.
3731 (ppc_emit_ref): New function.
3732 (ppc_emit_const): New function.
3733 (ppc_emit_reg): New function.
3734 (ppc_emit_pop): New function.
3735 (ppc_emit_stack_flush): New function.
3736 (ppc_emit_swap): New function.
3737 (ppc_emit_stack_adjust): New function.
3738 (ppc_emit_call): New function.
3739 (ppc_emit_int_call_1): New function.
3740 (ppc_emit_void_call_2): New function.
3741 (ppc_emit_if_goto): New function.
3742 (ppc_emit_goto): New function.
3743 (ppc_emit_eq_goto): New function.
3744 (ppc_emit_ne_goto): New function.
3745 (ppc_emit_lt_goto): New function.
3746 (ppc_emit_le_goto): New function.
3747 (ppc_emit_gt_goto): New function.
3748 (ppc_emit_ge_goto): New function.
3749 (ppc_write_goto_address): New function.
3750 (ppc_emit_ops_impl): New static variable.
3751 (ppc64v1_emit_prologue): New function.
3752 (ppc64v2_emit_prologue): New function.
3753 (ppc64_emit_epilogue): New function.
3754 (ppc64_emit_add): New function.
3755 (ppc64_emit_sub): New function.
3756 (ppc64_emit_mul): New function.
3757 (ppc64_emit_lsh): New function.
3758 (ppc64_emit_rsh_signed): New function.
3759 (ppc64_emit_rsh_unsigned): New function.
3760 (ppc64_emit_ext): New function.
3761 (ppc64_emit_zero_ext): New function.
3762 (ppc64_emit_log_not): New function.
3763 (ppc64_emit_bit_and): New function.
3764 (ppc64_emit_bit_or): New function.
3765 (ppc64_emit_bit_xor): New function.
3766 (ppc64_emit_bit_not): New function.
3767 (ppc64_emit_equal): New function.
3768 (ppc64_emit_less_signed): New function.
3769 (ppc64_emit_less_unsigned): New function.
3770 (ppc64_emit_ref): New function.
3771 (ppc64_emit_const): New function.
3772 (ppc64v1_emit_reg): New function.
3773 (ppc64v2_emit_reg): New function.
3774 (ppc64_emit_pop): New function.
3775 (ppc64_emit_stack_flush): New function.
3776 (ppc64_emit_swap): New function.
3777 (ppc64v1_emit_call): New function.
3778 (ppc64v2_emit_call): New function.
3779 (ppc64v1_emit_int_call_1): New function.
3780 (ppc64v2_emit_int_call_1): New function.
3781 (ppc64v1_emit_void_call_2): New function.
3782 (ppc64v2_emit_void_call_2): New function.
3783 (ppc64_emit_if_goto): New function.
3784 (ppc64_emit_eq_goto): New function.
3785 (ppc64_emit_ne_goto): New function.
3786 (ppc64_emit_lt_goto): New function.
3787 (ppc64_emit_le_goto): New function.
3788 (ppc64_emit_gt_goto): New function.
3789 (ppc64_emit_ge_goto): New function.
3790 (ppc64v1_emit_ops_impl): New static variable.
3791 (ppc64v2_emit_ops_impl): New static variable.
3792 (ppc_emit_ops): New function.
3793 (linux_low_target): Wire in ppc_emit_ops.
3794
3795 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3796 Marcin Kościelnicki <koriakin@0x04.net>
3797
3798 PR/17221
3799 * Makefile.in: Add powerpc-*-ipa.o
3800 * configure.srv: Add ipa_obj for powerpc*-linux.
3801 * linux-ppc-ipa.c: New file.
3802 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3803 includes.
3804 (PPC_FIELD): New macro.
3805 (PPC_SEXT): New macro.
3806 (PPC_OP6): New macro.
3807 (PPC_BO): New macro.
3808 (PPC_LI): New macro.
3809 (PPC_BD): New macro.
3810 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3811 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3812 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3813 (ppc_get_thread_area): New function.
3814 (is_elfv2_inferior): New function.
3815 (gen_ds_form): New function.
3816 (GEN_STD): New macro.
3817 (GEN_STDU): New macro.
3818 (GEN_LD): New macro.
3819 (GEN_LDU): New macro.
3820 (gen_d_form): New function.
3821 (GEN_ADDI): New macro.
3822 (GEN_ADDIS): New macro.
3823 (GEN_LI): New macro.
3824 (GEN_LIS): New macro.
3825 (GEN_ORI): New macro.
3826 (GEN_ORIS): New macro.
3827 (GEN_LWZ): New macro.
3828 (GEN_STW): New macro.
3829 (GEN_STWU): New macro.
3830 (gen_xfx_form): New function.
3831 (GEN_MFSPR): New macro.
3832 (GEN_MTSPR): New macro.
3833 (GEN_MFCR): New macro.
3834 (GEN_MTCR): New macro.
3835 (GEN_SYNC): New macro.
3836 (GEN_LWSYNC): New macro.
3837 (gen_x_form): New function.
3838 (GEN_OR): New macro.
3839 (GEN_MR): New macro.
3840 (GEN_LWARX): New macro.
3841 (GEN_STWCX): New macro.
3842 (GEN_CMPW): New macro.
3843 (gen_md_form): New function.
3844 (GEN_RLDICL): New macro.
3845 (GEN_RLDICR): New macro.
3846 (gen_i_form): New function.
3847 (GEN_B): New macro.
3848 (GEN_BL): New macro.
3849 (gen_b_form): New function.
3850 (GEN_BNE): New macro.
3851 (GEN_LOAD): New macro.
3852 (GEN_STORE): New macro.
3853 (gen_limm): New function.
3854 (gen_atomic_xchg): New function.
3855 (gen_call): New function.
3856 (ppc_relocate_instruction): New function.
3857 (ppc_install_fast_tracepoint_jump_pad): New function.
3858 (ppc_get_min_fast_tracepoint_insn_len): New function.
3859 (ppc_get_ipa_tdesc_idx): New function.
3860 (the_low_target): Wire in the new functions.
3861 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3862 tdescs.
3863 * linux-ppc-tdesc.h: New file.
3864
3865 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3866
3867 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3868 (alloc_jump_pad_buffer): New function.
3869 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3870 (alloc_jump_pad_buffer): New function.
3871 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3872 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3873 (alloc_jump_pad_buffer): New function.
3874 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3875 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3876 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3877 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3878
3879 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3880
3881 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3882 * linux-amd64-ipa.c: Likewise.
3883 * linux-i386-ipa.c: Likewise.
3884 * linux-s390-ipa.c: Likewise.
3885 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3886 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3887 set_trace_state_variable_value_ptr.
3888 (struct ipa_sym_addresses): Likewise.
3889 (symbol_list): Likewise.
3890 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3891 accessing gdb_collect directly.
3892 (gdb_collect_ptr_type): New typedef.
3893 (get_raw_reg_ptr_type): New typedef.
3894 (get_trace_state_variable_value_ptr_type): New typedef.
3895 (set_trace_state_variable_value_ptr_type): New typedef.
3896 (gdb_collect_ptr): New global.
3897 (get_raw_reg_ptr): New global.
3898 (get_trace_state_variable_value_ptr): New global.
3899 (set_trace_state_variable_value_ptr): New global.
3900 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3901 accessing get_raw_reg directly.
3902 (get_get_tsv_func_addr): Likewise for
3903 get_trace_state_variable_value_ptr.
3904 (get_set_tsv_func_addr): Likewise for
3905 set_trace_state_variable_value_ptr.
3906 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3907
3908 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3909
3910 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3911
3912 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3913
3914 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3915 packets.
3916 (relocate_instruction): Remove own_buf.
3917 * server.c (own_buf): Make global.
3918 (handle_v_requests): Make global.
3919 * server.h (own_buf): New declaration.
3920 (handle_v_requests): New prototype.
3921
3922 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3923
3924 PR 18377
3925 * linux-s390-low.c (add_insns): New function.
3926 (s390_emit_prologue): New function.
3927 (s390_emit_epilogue): New function.
3928 (s390_emit_add): New function.
3929 (s390_emit_sub): New function.
3930 (s390_emit_mul): New function.
3931 (s390_emit_lsh): New function.
3932 (s390_emit_rsh_signed): New function.
3933 (s390_emit_rsh_unsigned): New function.
3934 (s390_emit_ext): New function.
3935 (s390_emit_log_not): New function.
3936 (s390_emit_bit_and): New function.
3937 (s390_emit_bit_or): New function.
3938 (s390_emit_bit_xor): New function.
3939 (s390_emit_bit_not): New function.
3940 (s390_emit_equal): New function.
3941 (s390_emit_less_signed): New function.
3942 (s390_emit_less_unsigned): New function.
3943 (s390_emit_ref): New function.
3944 (s390_emit_if_goto): New function.
3945 (s390_emit_goto): New function.
3946 (s390_write_goto_address): New function.
3947 (s390_emit_litpool): New function.
3948 (s390_emit_const): New function.
3949 (s390_emit_call): New function.
3950 (s390_emit_reg): New function.
3951 (s390_emit_pop): New function.
3952 (s390_emit_stack_flush): New function.
3953 (s390_emit_zero_ext): New function.
3954 (s390_emit_swap): New function.
3955 (s390_emit_stack_adjust): New function.
3956 (s390_emit_set_r2): New function.
3957 (s390_emit_int_call_1): New function.
3958 (s390_emit_void_call_2): New function.
3959 (s390_emit_eq_goto): New function.
3960 (s390_emit_ne_goto): New function.
3961 (s390_emit_lt_goto): New function.
3962 (s390_emit_le_goto): New function.
3963 (s390_emit_gt_goto): New function.
3964 (s390_emit_ge_goto): New function.
3965 (s390x_emit_prologue): New function.
3966 (s390x_emit_epilogue): New function.
3967 (s390x_emit_add): New function.
3968 (s390x_emit_sub): New function.
3969 (s390x_emit_mul): New function.
3970 (s390x_emit_lsh): New function.
3971 (s390x_emit_rsh_signed): New function.
3972 (s390x_emit_rsh_unsigned): New function.
3973 (s390x_emit_ext): New function.
3974 (s390x_emit_log_not): New function.
3975 (s390x_emit_bit_and): New function.
3976 (s390x_emit_bit_or): New function.
3977 (s390x_emit_bit_xor): New function.
3978 (s390x_emit_bit_not): New function.
3979 (s390x_emit_equal): New function.
3980 (s390x_emit_less_signed): New function.
3981 (s390x_emit_less_unsigned): New function.
3982 (s390x_emit_ref): New function.
3983 (s390x_emit_if_goto): New function.
3984 (s390x_emit_const): New function.
3985 (s390x_emit_call): New function.
3986 (s390x_emit_reg): New function.
3987 (s390x_emit_pop): New function.
3988 (s390x_emit_stack_flush): New function.
3989 (s390x_emit_zero_ext): New function.
3990 (s390x_emit_swap): New function.
3991 (s390x_emit_stack_adjust): New function.
3992 (s390x_emit_int_call_1): New function.
3993 (s390x_emit_void_call_2): New function.
3994 (s390x_emit_eq_goto): New function.
3995 (s390x_emit_ne_goto): New function.
3996 (s390x_emit_lt_goto): New function.
3997 (s390x_emit_le_goto): New function.
3998 (s390x_emit_gt_goto): New function.
3999 (s390x_emit_ge_goto): New function.
4000 (s390_emit_ops): New function.
4001 (struct linux_target_ops): Fill in emit_ops hook.
4002
4003 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4004
4005 PR 18377
4006 * Makefile.in: Add s390 IPA files.
4007 * configure.srv: Build IPA for s390.
4008 * linux-s390-ipa.c: New file.
4009 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4010 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4011 (tdesc_s390_linux32): Likewise.
4012 (init_registers_s390_linux32v1): Likewise.
4013 (tdesc_s390_linux32v1): Likewise.
4014 (init_registers_s390_linux32v2): Likewise.
4015 (tdesc_s390_linux32v2): Likewise.
4016 (init_registers_s390_linux64): Likewise.
4017 (tdesc_s390_linux64): Likewise.
4018 (init_registers_s390_linux64v1): Likewise.
4019 (tdesc_s390_linux64v1): Likewise.
4020 (init_registers_s390_linux64v2): Likewise.
4021 (tdesc_s390_linux64v2): Likewise.
4022 (init_registers_s390_te_linux64): Likewise.
4023 (tdesc_s390_te_linux64): Likewise.
4024 (init_registers_s390_vx_linux64): Likewise.
4025 (tdesc_s390_vx_linux64): Likewise.
4026 (init_registers_s390_tevx_linux64): Likewise.
4027 (tdesc_s390_tevx_linux64): Likewise.
4028 (init_registers_s390x_linux64): Likewise.
4029 (tdesc_s390x_linux64): Likewise.
4030 (init_registers_s390x_linux64v1): Likewise.
4031 (tdesc_s390x_linux64v1): Likewise.
4032 (init_registers_s390x_linux64v2): Likewise.
4033 (tdesc_s390x_linux64v2): Likewise.
4034 (init_registers_s390x_te_linux64): Likewise.
4035 (tdesc_s390x_te_linux64): Likewise.
4036 (init_registers_s390x_vx_linux64): Likewise.
4037 (tdesc_s390x_vx_linux64): Likewise.
4038 (init_registers_s390x_tevx_linux64): Likewise.
4039 (tdesc_s390x_tevx_linux64): Likewise.
4040 (have_hwcap_s390_vx): New static variable.
4041 (s390_arch_setup): Fill have_hwcap_s390_vx.
4042 (s390_get_thread_area): New function.
4043 (s390_ft_entry_gpr_esa): New const.
4044 (s390_ft_entry_gpr_zarch): New const.
4045 (s390_ft_entry_misc): New const.
4046 (s390_ft_entry_fr): New const.
4047 (s390_ft_entry_vr): New const.
4048 (s390_ft_main_31): New const.
4049 (s390_ft_main_64): New const.
4050 (s390_ft_exit_fr): New const.
4051 (s390_ft_exit_vr): New const.
4052 (s390_ft_exit_misc): New const.
4053 (s390_ft_exit_gpr_esa): New const.
4054 (s390_ft_exit_gpr_zarch): New const.
4055 (append_insns): New function.
4056 (s390_relocate_instruction): New function.
4057 (s390_install_fast_tracepoint_jump_pad): New function.
4058 (s390_get_min_fast_tracepoint_insn_len): New function.
4059 (s390_get_ipa_tdesc_idx): New function.
4060 (struct linux_target_ops): Wire in the above functions.
4061 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4062 * linux-s390-tdesc.h: New file.
4063
4064 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4065
4066 * linux-s390-low.c (s390_supports_tracepoints): New function.
4067 (struct linux_target_ops): Fill supports_tracepoints hook.
4068
4069 2016-03-18 Yao Qi <yao.qi@linaro.org>
4070
4071 * linux-low.c (lwp_signal_can_be_delivered): New function.
4072 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4073
4074 2016-03-18 Yao Qi <yao.qi@linaro.org>
4075
4076 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4077 0 if signal is enqueued. Remove 'signal' from one debugging
4078 message. Move one debugging message to some lines below.
4079 Remove code setting 'signal' to 0.
4080
4081 2016-03-18 Yao Qi <yao.qi@linaro.org>
4082
4083 * linux-low.c (linux_low_filter_event): Remove redundant
4084 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4085
4086 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4087
4088 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4089 (struct linux_target_ops): Wire in the above.
4090
4091 2016-03-03 Yao Qi <yao.qi@linaro.org>
4092
4093 * linux-low.c: Update comments to start_step_over.
4094
4095 2016-03-03 Yao Qi <yao.qi@linaro.org>
4096
4097 PR server/19736
4098 * linux-low.c (handle_extended_wait): Set child suspended
4099 if event_lwp->bp_reinsert isn't zero.
4100
4101 2016-03-02 Yao Qi <yao.qi@linaro.org>
4102
4103 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4104 enqueue_pending_signal.
4105
4106 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4107
4108 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4109 is actually loaded.
4110
4111 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4112
4113 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4114 (s390_regmap_3264) [!__s390x__]: New global.
4115 (s390_collect_ptrace_register): Skip map entries containing -1.
4116 (s390_supply_ptrace_register): Ditto.
4117 (s390_fill_gprs_high): New function.
4118 (s390_store_gprs_high): New function.
4119 (s390_regsets): Add NT_S390_HIGH_GPRS.
4120 (s390_get_hwcap): Enable on 31-bit.
4121 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4122 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4123 Detect NT_S390_HIGH_GPRS.
4124 (s390_usrregs_info_3264): Enable on 31-bit.
4125 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4126 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4127
4128 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4129
4130 PR gdb/13808
4131 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4132 * configure.srv: Ditto.
4133 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4134 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4135 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4136 (init_registers_amd64_linux): Remove prototype.
4137 (tdesc_amd64_linux): Remove declaration.
4138 (get_ipa_tdesc): New function.
4139 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4140 initialize remaining tdescs.
4141 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4142 (init_registers_i386_linux): Remove prototype.
4143 (tdesc_i386_linux): Remove declaration.
4144 (get_ipa_tdesc): New function.
4145 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4146 initialize remaining tdescs.
4147 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4148 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4149 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4150 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4151 (x86_get_ipa_tdesc_idx): New function.
4152 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4153 * linux-x86-tdesc.h: New file.
4154 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4155 (target_get_ipa_tdesc_idx): New macro.
4156 * tracepoint.c (ipa_tdesc_idx): New macro.
4157 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4158 (symbol_list): Add ipa_tdesc_idx.
4159 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4160 (ipa_tdesc): Remove.
4161 (ipa_tdesc_idx): New variable.
4162 (get_context_regcache): Use get_ipa_tdesc.
4163 (gdb_collect): Ditto.
4164 (gdb_probe): Ditto.
4165 * tracepoint.h (get_ipa_tdesc): New prototype.
4166 (ipa_tdesc): Remove.
4167
4168 2016-02-24 Pedro Alves <palves@redhat.com>
4169
4170 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4171 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4172 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4173 Factor out common code between the USE_SIGTRAP_SIGINFO and
4174 !USE_SIGTRAP_SIGINFO blocks.
4175 (linux_low_filter_event): Call save_stop_reason instead of
4176 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4177 Update comments.
4178 (linux_wait_1): Update comments.
4179
4180 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4181
4182 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4183 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4184 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4185 ppc_insert_point, ppc_remove_point.
4186
4187 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4188
4189 * linux-s390-low.c (s390_supports_z_point_type): New function.
4190 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4191
4192 2016-02-16 Yao Qi <yao.qi@linaro.org>
4193
4194 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4195 PC. Get pc from regcache_read_pc.
4196
4197 2016-02-12 Yao Qi <yao.qi@linaro.org>
4198
4199 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4200 or linux_get_pc_32bit.
4201 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4202
4203 2016-02-12 Yao Qi <yao.qi@linaro.org>
4204
4205 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4206 arm_linux_get_next_pcs_fixup.
4207
4208 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4209
4210 * tracepoint.c (x_tracepoint_action_download): Change
4211 write_inferior_data_ptr to write_inferior_data_pointer.
4212 (cmd_qtstart): Likewise.
4213 (write_inferior_data_ptr): Remove.
4214 (download_agent_expr): Change write_inferior_data_ptr to
4215 write_inferior_data_pointer.
4216 (download_tracepoint_1): Likewise.
4217 (download_tracepoint): Likewise.
4218 (download_trace_state_variables): Likewise.
4219
4220 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4221 Marcin Kościelnicki <koriakin@0x04.net>
4222
4223 * tracepoint.c (struct tracepoint_action_ops): Remove.
4224 (struct tracepoint_action): Remove ops.
4225 (m_tracepoint_action_download, r_tracepoint_action_download)
4226 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4227 size and offset accordingly.
4228 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4229 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4230 (tracepoint_action_send, tracepoint_action_download): New functions.
4231 Helpers for trace action handlers.
4232 (add_tracepoint_action): Remove setup actions ops.
4233 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4234
4235 2016-02-10 Yao Qi <yao.qi@linaro.org>
4236
4237 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4238
4239 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4240
4241 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4242 to AC_OUTPUT.
4243 * configure: Regenerate.
4244
4245 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4246
4247 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4248 void * to gdb_byte *.
4249 * linux-low.c (siginfo_fixup): Likewise.
4250 (linux_xfer_siginfo): Likewise.
4251 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4252 Likewise.
4253 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4254
4255 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4256
4257 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4258 to srv_tgtobj.
4259 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4260 to srv_tgtobj.
4261 * linux-x86-low.c [__x86_64__]: Include
4262 "nat/amd64-linux-siginfo.h".
4263 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4264 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4265 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4266 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4267 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4268 (cpt_si_fd, si_timerid, si_overrun): Move from
4269 nat/amd64-linux-siginfo.c.
4270 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4271
4272 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4273
4274 * server.c (skip_to_semicolon): Remove.
4275 (process_point_options): Use strchrnul instead of
4276 skip_to_semicolon.
4277
4278 2016-01-26 Yao Qi <yao.qi@linaro.org>
4279
4280 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4281 * linux-low.c (install_software_single_step_breakpoints): Don't
4282 call regcache_read_pc.
4283 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4284 argument pc.
4285
4286 2016-01-26 Yao Qi <yao.qi@linaro.org>
4287
4288 * linux-low.c (install_software_single_step_breakpoints): Call
4289 regcache_read_pc instead of get_pc.
4290
4291 2016-01-26 Yao Qi <yao.qi@linaro.org>
4292
4293 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4294 (unblock_async_io): Rename to ...
4295 (block_unblock_async_io): ... it. New function.
4296 (enable_async_io): Don't install SIGIO handler. Unblock it
4297 instead.
4298 (disable_async_io): Don't ignore SIGIO. Block it instead.
4299 (initialize_async_io): Install SIGIO handler. Don't call
4300 unblock_async_io.
4301
4302 2016-01-26 Yao Qi <yao.qi@linaro.org>
4303
4304 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4305 first character is '\003', call *the_target->request_interrupt.
4306
4307 2016-01-25 Yao Qi <yao.qi@linaro.org>
4308
4309 * remote-utils.c (new_thread_notify): Remove.
4310 (dead_thread_notify): Likewise.
4311 * remote-utils.h (new_thread_notify): Remove declaration.
4312 (dead_thread_notify): Likewise.
4313
4314 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4315
4316 * gdb.trace/pending.exp: Fix expected message on continue.
4317
4318 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4319
4320 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4321 it works properly on big-endian machines where sizeof (CORE_ADDR)
4322 != sizeof (void *).
4323
4324 2016-01-21 Pedro Alves <palves@redhat.com>
4325
4326 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4327 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4328 * configure: Regenerate.
4329
4330 2016-01-21 Yao Qi <yao.qi@linaro.org>
4331
4332 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4333 is_thumb and set it according to CPSR saved on the stack.
4334 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4335 arm_sigreturn_next_pc.
4336
4337 2016-01-18 Yao Qi <yao.qi@linaro.org>
4338
4339 * linux-low.c (linux_set_pc_64bit): New function.
4340 (linux_get_pc_64bit): New function.
4341 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4342 Declare.
4343 * linux-sparc-low.c (debug_threads): Remove declaration.
4344 (sparc_get_pc): Remove.
4345 (the_low_target): Use linux_get_pc_64bit instead of
4346 sparc_get_pc.
4347 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4348 (the_low_target): Use linux_get_pc_64bit and
4349 linux_set_pc_64bit.
4350
4351 2016-01-18 Yao Qi <yao.qi@linaro.org>
4352
4353 * linux-arm-low.c (debug_threads): Remove declaration.
4354 (arm_get_pc, arm_set_pc): Remove.
4355 (the_low_target): Use linux_get_pc_32bit and
4356 linux_set_pc_32bit.
4357 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4358 (the_low_target): Use linux_get_pc_32bit and
4359 linux_set_pc_32bit.
4360 * linux-cris-low.c (debug_threads): Remove declaration.
4361 (cris_get_pc, cris_set_pc,): Remove.
4362 (the_low_target): Use linux_get_pc_32bit and
4363 linux_set_pc_32bit.
4364 * linux-crisv32-low.c (debug_threads): Remove declaration.
4365 (cris_get_pc, cris_set_pc): Remove.
4366 (the_low_target): Use linux_get_pc_32bit and
4367 linux_set_pc_32bit.
4368 * linux-low.c: Include inttypes.h.
4369 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4370 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4371 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4372 (the_low_target): Use linux_get_pc_32bit and
4373 linux_set_pc_32bit.
4374 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4375 (the_low_target): Use linux_get_pc_32bit and
4376 linux_set_pc_32bit.
4377 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4378 (the_low_target): Use linux_get_pc_32bit and
4379 linux_set_pc_32bit.
4380 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4381 (the_low_target): Use linux_get_pc_32bit and
4382 linux_set_pc_32bit.
4383 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4384 (the_low_target): Use linux_get_pc_32bit and
4385 linux_set_pc_32bit.
4386
4387 2016-01-18 Gary Benson <gbenson@redhat.com>
4388
4389 * configure.ac (AC_FUNC_FORK): New check.
4390 * config.in: Regenerate.
4391 * configure: Likewise.
4392
4393 2016-01-14 Yao Qi <yao.qi@linaro.org>
4394
4395 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4396 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4397 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4398 arm_get_next_pcs_ctor.
4399
4400 2016-01-12 Josh Stone <jistone@redhat.com>
4401 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4402
4403 * inferiors.h: Include "gdb_vecs.h".
4404 (struct process_info): Add syscalls_to_catch.
4405 * inferiors.c (remove_process): Free syscalls_to_catch.
4406 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4407 syscall_return stops.
4408 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4409 * server.c (handle_general_set): Handle QCatchSyscalls.
4410 (handle_query): Report support for QCatchSyscalls.
4411 * target.h (struct target_ops): Add supports_catch_syscall.
4412 (target_supports_catch_syscall): New macro.
4413 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4414 (struct lwp_info): Add syscall_state.
4415 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4416 Maintain syscall_state and syscalls_to_catch across exec.
4417 (get_syscall_trapinfo): New function, proxy to the_low_target.
4418 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4419 (linux_low_filter_event): Toggle syscall_state entry/return for
4420 syscall traps, and set it ignored for all others.
4421 (gdb_catching_syscalls_p): New function.
4422 (gdb_catch_this_syscall_p): New function.
4423 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4424 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4425 (linux_supports_catch_syscall): New function.
4426 (linux_target_ops): Install it.
4427 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4428 (the_low_target): Install it.
4429
4430 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4431
4432 * acinclude.m4: Include new ../warning.m4 file.
4433 * configure: Regenerated.
4434 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4435
4436 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4437
4438 * ax.c (is_goto_target): Mark static.
4439 * linux-low.c (register_addr): Likewise.
4440 (linux_fetch_registers, linux_store_registers): Likewise.
4441 * mem-break.c (any_persistent_commands): Fix old prototype.
4442 (add_commands_to_breakpoint): Mark static.
4443 * regcache.c (find_register_by_name): Delete unused func.
4444 * remote-utils.c (hex_or_minus_one): Mark static.
4445 * server.c (monitor_show_help): Mark static.
4446 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4447 handle_v_requests): Likewise.
4448
4449 2016-01-12 Pedro Alves <palves@redhat.com>
4450
4451 Remove use of the registered trademark symbol throughout.
4452
4453 2016-01-08 Yao Qi <yao.qi@linaro.org>
4454
4455 * remote-utils.c (getpkt): If c is '\003', call target hook
4456 request_interrupt.
4457
4458 2016-01-06 Yao Qi <yao.qi@linaro.org>
4459
4460 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4461 linux-aarch32-low.c.
4462 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4463 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4464 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4465 (thumb2_breakpoint): Declare.
4466 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4467 linux-aarch32-low.h.
4468 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4469 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4470 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4471
4472 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4473
4474 * gdbreplay.c (gdbreplay_version): Change copyright year in
4475 version message.
4476 * server.c (gdbserver_version): Likewise.
4477
4478 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4479
4480 * server.c (crc32_table): Delete.
4481 (crc32): Use libiberty's xcrc32 function.
4482
4483 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4484
4485 * lynx-low.c (lynx_delete_thread_callback): New function.
4486 (lynx_mourn): Properly delete our process and all of its
4487 threads. Remove call to clear_inferiors.
4488
4489 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4490
4491 * target.c (thread_search_callback): Add check that
4492 the thread_stopped target callback is not NULL before
4493 calling it.
4494
4495 2015-12-21 Yao Qi <yao.qi@linaro.org>
4496
4497 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4498 arm breakpoint.
4499
4500 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4501
4502 * server.c (handle_query): Call target_supports_software_single_step.
4503
4504 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4505
4506 * linux-low.c (single_step): New function.
4507 (linux_resume_one_lwp_throw): Call single_step.
4508 (start_step_over): Likewise.
4509
4510 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4511
4512 * Makefile.in (SFILES): Append arch/arm-linux.c,
4513 arch/arm-get-next-pcs.c.
4514 (arm-linux.o): New rule.
4515 (arm-get-next-pcs.o): New rule.
4516 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4517 arm-linux.o.
4518 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4519 to linux-aarch32-low.c.
4520 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4521 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4522 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4523 (thumb2_breakpoint_len): Likewise.
4524 (arm_is_thumb_mode): Make non-static.
4525 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4526 from linux-aarch32-low.c.
4527 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4528 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4529 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4530 (thumb2_breakpoint_len): Likewise.
4531 (arm_is_thumb_mode): New declaration.
4532 * linux-arm-low.c: Include arch/arm-linux.h
4533 aarch/arm-get-next-pcs.h, sys/syscall.h.
4534 (get_next_pcs_ops): New struct.
4535 (get_next_pcs_addr_bits_remove): New function.
4536 (get_next_pcs_is_thumb): New function.
4537 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4538 (arm_sigreturn_next_pc): Likewise.
4539 (get_next_pcs_syscall_next_pc): Likewise.
4540 (arm_gdbserver_get_next_pcs): Likewise.
4541 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4542 Initialize.
4543 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4544 * server.h: Include gdb_vecs.h.
4545
4546 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4547
4548 * Makefile.in (SFILES): Append common/common-regcache.c.
4549 (OBS): Append common-regcache.o.
4550 (common-regcache.o): New rule.
4551 * regcache.c (init_register_cache): Initialize cache to
4552 REG_UNAVAILABLE.
4553 (regcache_raw_read_unsigned): New function.
4554 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4555 register_status enum.
4556
4557 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4558
4559 * linux-aarch64-low.c (the_low_targets): Rename
4560 breakpoint_reinsert_addr to get_next_pcs.
4561 * linux-arm-low.c (the_low_targets): Likewise.
4562 * linux-bfin-low.c (the_low_targets): Likewise.
4563 * linux-cris-low.c (the_low_targets): Likewise.
4564 * linux-crisv32-low.c (the_low_targets): Likewise.
4565 * linux-low.c (can_software_single_step): Likewise.
4566 (install_software_single_step_breakpoints): New function.
4567 (start_step_over): Use install_software_single_step_breakpoints.
4568 * linux-low.h: New CORE_ADDR vector.
4569 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4570 get_next_pcs.
4571 * linux-mips-low.c (the_low_targets): Likewise.
4572 * linux-nios2-low.c (the_low_targets): Likewise.
4573 * linux-sparc-low.c (the_low_targets): Likewise.
4574
4575 2015-12-17 Pedro Alves <palves@redhat.com>
4576
4577 * linux-low.c (linux_kill_one_lwp): Remove references to
4578 LinuxThreads.
4579 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4580 to 'kill'.
4581 (linux_init_signals): Delete.
4582 (initialize_low): Adjust.
4583 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4584
4585 2015-12-16 Pedro Alves <palves@redhat.com>
4586
4587 * configure.ac (compiler warning flags): When testing a
4588 -Wno-foo option, check whether -Wfoo works instead.
4589 * configure: Regenerate.
4590
4591 2015-12-11 Don Breazeal <donb@codesourcery.com>
4592
4593 * server.c (process_serial_event): Don't exit from gdbserver
4594 in remote mode if there are still active inferiors.
4595
4596 2015-12-11 Yao Qi <yao.qi@linaro.org>
4597
4598 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4599 arm_breakpoint_at if the process is 32-bit.
4600
4601 2015-12-11 Yao Qi <yao.qi@linaro.org>
4602
4603 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4604 arm breakpoint.
4605
4606 2015-12-07 Yao Qi <yao.qi@linaro.org>
4607
4608 * configure.srv: Append arm.o to srv_tgtobj for
4609 aarch64*-*-linux* target.
4610 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4611 from linux-arm-low.c.
4612 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4613 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4614 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4615 (thumb2_breakpoint_len): Likewise.
4616 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4617 (arm_breakpoint_kinds): Likewise.
4618 (arm_breakpoint_kind_from_pc): Likewise.
4619 (arm_sw_breakpoint_from_kind): Likewise.
4620 (arm_breakpoint_kind_from_current_state): Likewise.
4621 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4622 (arm_sw_breakpoint_from_kind): Declare.
4623 (arm_breakpoint_kind_from_current_state): Declare.
4624 (arm_breakpoint_at): Declare.
4625 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4626 arm_sw_breakpoint_from_kind if process is 32-bit.
4627 (aarch64_breakpoint_kind_from_pc): New function.
4628 (aarch64_breakpoint_kind_from_current_state): New function.
4629 (the_low_target): Initialize fields breakpoint_kind_from_pc
4630 and breakpoint_kind_from_current_state.
4631 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4632 linux-aarch32-low.c.
4633 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4634 (arm_breakpoint, arm_breakpoint_len): Likewise.
4635 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4636 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4637 (arm_is_thumb_mode): Likewise.
4638 (arm_breakpoint_at): Likewise.
4639 (arm_breakpoint_kind_from_pc): Likewise.
4640 (arm_sw_breakpoint_from_kind): Likewise.
4641 (arm_breakpoint_kind_from_current_state): Likewise.
4642
4643 Revert:
4644 2015-08-04 Yao Qi <yao.qi@linaro.org>
4645
4646 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4647 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4648 * server.c (extended_protocol): Remove "static".
4649 * server.h (extended_protocol): Declare it.
4650
4651 2015-12-04 Josh Stone <jistone@redhat.com>
4652
4653 * target.h (struct target_ops) <arch_setup>: Rename to ...
4654 (struct target_ops) <post_create_inferior>: ... this.
4655 (target_arch_setup): Rename to ...
4656 (target_post_create_inferior): ... this, calling post_create_inferior.
4657 * server.c (start_inferior): Update target_arch_setup calls to
4658 target_post_create_inferior.
4659 * linux-low.c (linux_low_ptrace_options): Forward declare.
4660 (linux_arch_setup): Update its comment for general use.
4661 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4662 (struct linux_target_ops): Use linux_post_create_inferior.
4663 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4664 to post_create_inferior.
4665 * nto-low.c (struct nto_target_ops): Likewise.
4666 * spu-low.c (struct spu_target_ops): Likewise.
4667 * win32-low.c (struct win32_target_ops): Likewise.
4668
4669 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4670
4671 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4672
4673 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4674
4675 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4676 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4677 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4678 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4679 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4680 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4681 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4682 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4683 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4684 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4685 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4686 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4687
4688 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4689
4690 * linux-low.c (linux_look_up_symbols): Don't call
4691 linux_supports_traceclone.
4692 * linux-low.h (thread_db_init): Remove use_events argument.
4693 * thread-db.c (thread_db_use_event): Remove global variable.
4694 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4695 (struct thread_db) <td_create_bp>: Remove field.
4696 (thread_db_create_event): Remove function.
4697 (thread_db_enable_reporting): Likewise.
4698 (find_one_thread): Don't check for thread_db_use_events.
4699 (attach_thread): Likewise.
4700 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4701 (try_thread_db_load_1): Don't check for thread_db_use_events.
4702 (thread_db_init): Remove use_events argument and thread events
4703 handling.
4704 (remove_thread_event_breakpoints): Remove function.
4705 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4706
4707 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4708
4709 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4710 New function.
4711 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4712 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4713 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4714 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4715 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4716 Initialize.
4717 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4718 New function.
4719 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4720 * linux-low.c (can_hardware_single_step): Use
4721 supports_hardware_single_step.
4722 (can_software_single_step): New function.
4723 (start_step_over): Call can_software_single_step.
4724 (linux_supports_hardware_single_step): New function.
4725 (struct target_ops) <supports_software_single_step>: Initialize.
4726 * linux-low.h (struct linux_target_ops)
4727 <supports_hardware_single_step>: Initialize.
4728 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4729 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4730 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4731 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4732 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4733 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4734 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4735 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4736 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4737 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4738 Initialize.
4739 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4740 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4741 Initialize.
4742 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4743 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4744 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4745 New function.
4746 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4747 * target.h (struct target_ops): <supports_software_single_step>:
4748 New field.
4749 (target_supports_software_single_step): New macro.
4750
4751 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4752
4753 * linux-low.c (linux_wait_1): Fix pc advance condition.
4754 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4755 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4756
4757 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4758
4759 * linux-arm-low.c (arm_is_thumb_mode): New function.
4760 (arm_breakpoint_at): Use arm_is_thumb_mode.
4761 (arm_breakpoint_kind_from_current_state): New function.
4762 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4763 Initialize.
4764 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4765 (linux_breakpoint_kind_from_current_state): New function.
4766 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4767 * linux-low.h (struct linux_target_ops)
4768 <breakpoint_kind_from_current_state>: New field.
4769 * target.h (struct target_ops): Likewise.
4770 (target_breakpoint_kind_from_current_state): New macro.
4771
4772 2015-11-30 Pedro Alves <palves@redhat.com>
4773
4774 * linux-low.c (linux_resume): Wake up the event loop before
4775 returning.
4776
4777 2015-11-30 Pedro Alves <palves@redhat.com>
4778
4779 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4780 check.
4781 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4782 to -1.
4783 * target.c (struct thread_search): New structure.
4784 (thread_search_callback): New function.
4785 (prev_general_thread): New global.
4786 (prepare_to_access_memory, done_accessing_memory): New functions.
4787 * target.h (prepare_to_access_memory, done_accessing_memory):
4788 Replace macros with function declarations.
4789
4790 2015-11-30 Pedro Alves <palves@redhat.com>
4791
4792 PR 14618
4793 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4794 report TARGET_WAITKIND_NO_RESUMED.
4795 * remote-utils.c (prepare_resume_reply): Handle
4796 TARGET_WAITKIND_NO_RESUMED.
4797 * server.c (report_no_resumed): New global.
4798 (handle_query) <qSupported>: Handle "no-resumed+". Report
4799 "no-resumed+" support.
4800 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4801 return error if the client doesn't support no-resumed events.
4802 (push_stop_notification): New function.
4803 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4804 events if the client supports them.
4805
4806 2015-11-30 Pedro Alves <palves@redhat.com>
4807
4808 * linux-low.c (thread_still_has_status_pending_p): Don't check
4809 vCont;t here.
4810 (lwp_resumed): New function.
4811 (status_pending_p_callback): Return early if the LWP is not
4812 supposed to be resumed.
4813
4814 2015-11-30 Pedro Alves <palves@redhat.com>
4815
4816 * linux-low.c (handle_extended_wait): Assert that the LWP's
4817 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4818 thread create events, leave the new child's status pending.
4819 (linux_low_filter_event): If GDB wants to hear about thread exit
4820 events, leave the LWP marked dead and don't delete it.
4821 (linux_wait_for_event_filtered): Don't check for thread exit.
4822 (filter_exit_event): New function.
4823 (linux_wait_1): Use it, when returning an exit event.
4824 (linux_resume_one_lwp_throw): Assert that the LWP's
4825 waitstatus is TARGET_WAITKIND_IGNORE.
4826 * remote-utils.c (prepare_resume_reply): Handle
4827 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4828 * server.c (report_thread_events): New global.
4829 (handle_general_set): Handle QThreadEvents.
4830 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4831 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4832 TARGET_WAITKIND_THREAD_EXITED.
4833 * server.h (report_thread_events): Declare.
4834
4835 2015-11-30 Pedro Alves <palves@redhat.com>
4836
4837 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4838 the thread's last_resume_kind was resume_stop.
4839
4840 2015-11-30 Pedro Alves <palves@redhat.com>
4841
4842 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4843 before returning.
4844
4845 2015-11-30 Pedro Alves <palves@redhat.com>
4846
4847 * server.c (handle_v_requests): Handle vCtrlC.
4848
4849 2015-11-30 Pedro Alves <palves@redhat.com>
4850
4851 * gdbthread.h (find_any_thread_of_pid): Declare.
4852 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4853 functions.
4854 * server.c (handle_query): If current_thread is NULL, look for
4855 another thread of the selected process.
4856
4857 2015-11-26 Daniel Colascione <dancol@dancol.org>
4858 Simon Marchi <simon.marchi@ericsson.com>
4859
4860 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4861 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4862 name in reply.
4863 * target.h (struct target_ops) <thread_name>: New field.
4864 (target_thread_name): New macro.
4865
4866 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4867
4868 * regcache.h (regcache_invalidate_pid): Add declaration.
4869 * regcache.c (regcache_invalidate_pid): New function, extracted
4870 from regcache_invalidate.
4871 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4872 Add trivial documentation comment.
4873 * lynx-low.c: Use regcache_invalidate_pid instead of
4874 regcache_invalidate.
4875
4876 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4877
4878 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4879 and Elf64_auxv_t if the target is Android.
4880
4881 2015-11-22 Doug Evans <xdje42@gmail.com>
4882
4883 * target.h: #include <sys/types.h>.
4884
4885 2015-11-19 Pedro Alves <palves@redhat.com>
4886
4887 * linux-low.c (linux_process_qsupported): Change prototype.
4888 Adjust.
4889 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4890 Change prototype.
4891 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4892 and adjust to loop over all features.
4893 * server.c (handle_query) <qSupported>: Adjust to call
4894 target_process_qsupported once, passing it a vector of unprocessed
4895 features.
4896 * target.h (struct target_ops) <process_qsupported>: Change
4897 prototype.
4898 (target_process_qsupported): Adjust.
4899
4900 2015-11-19 Pedro Alves <palves@redhat.com>
4901
4902 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4903 mode.
4904 * configure: Regenerate.
4905
4906 2015-11-19 Pedro Alves <palves@redhat.com>
4907
4908 * configure: Regenerate.
4909
4910 2015-11-19 Yao Qi <yao.qi@linaro.org>
4911
4912 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4913 type to uint32_t.
4914
4915 2015-11-19 Yao Qi <yao.qi@linaro.org>
4916
4917 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4918 (struct aarch64_operand): Move enum out.
4919
4920 2015-11-19 Yao Qi <yao.qi@linaro.org>
4921
4922 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4923 struct user_fpsimd_state *.
4924 (aarch64_store_fpregset): Likewise.
4925
4926 2015-11-19 Yao Qi <yao.qi@linaro.org>
4927
4928 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4929 struct user_pt_regs *.
4930 (aarch64_store_gregset): Likewise.
4931
4932 2015-11-18 Pedro Alves <palves@redhat.com>
4933
4934 * Makefile.in (all_object_files): Add $IPA_OBJS.
4935
4936 2015-11-17 Pedro Alves <palves@redhat.com>
4937
4938 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4939 GDB_SIGNAL_0 and gdb_signal_to_string.
4940
4941 2015-11-17 Pedro Alves <palves@redhat.com>
4942
4943 * win32-low.c (handle_output_debug_string): Remove parameter.
4944 (win32_kill): Remove our_status local and adjust call to
4945 handle_output_debug_string.
4946 (get_child_debug_event): Adjust call to
4947 handle_output_debug_string.
4948
4949 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4950
4951 * linux-mips-low.c (mips_fill_gregset): Add cast.
4952 (mips_store_gregset): Likewise.
4953 (mips_fill_fpregset): Likewise.
4954 (mips_store_fpregset): Likewise.
4955
4956 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4957
4958 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4959 priv.
4960
4961 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4962
4963 * linux-mips-low.c (mips_linux_new_thread): Change type of
4964 watch_type to enum target_hw_bp_type.
4965
4966 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4967
4968 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4969 Change return type to arm_hwbp_type.
4970
4971 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4972
4973 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4974 (arm_store_gregset): Likewise.
4975 * linux-arm-low.c (arm_get_hwcap): Likewise.
4976 (arm_read_description): Likewise.
4977
4978 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4979
4980 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4981
4982 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4983
4984 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4985 (ppc_fill_vsxregset): Likewise.
4986 (ppc_store_vsxregset): Likewise.
4987 (ppc_fill_vrregset): Likewise.
4988 (ppc_store_vrregset): Likewise.
4989 (ppc_fill_evrregset): Likewise.
4990 (ppc_store_evrregset): Likewise.
4991
4992 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4993
4994 * linux-ppc-low.c (ppc_usrregs_info): Remove
4995 forward-declaration.
4996 (ppc_arch_setup): Move lower in file.
4997
4998 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4999
5000 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5001 (ps_pdwrite): Likewise.
5002
5003 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5004
5005 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5006 to after assert checks.
5007
5008 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5009
5010 * proc-service.c (ps_pdread): Add/adjust casts.
5011 (ps_pdwrite): Add/adjust casts.
5012
5013 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5014
5015 * server.c (handle_search_memory_1): Cast return value of
5016 memmem.
5017
5018 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5019
5020 * server.c (write_qxfer_response): Change type of data to
5021 gdb_byte *.
5022
5023 2015-10-29 Pedro Alves <palves@redhat.com>
5024
5025 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5026
5027 2015-10-29 Pedro Alves <palves@redhat.com>
5028
5029 * tracepoint.c (clear_installed_tracepoints): Add casts.
5030
5031 2015-10-29 Pedro Alves <palves@redhat.com>
5032
5033 * server.c (handle_v_cont, process_serial_event): Add enum
5034 gdb_signal casts to signal parsing code.
5035
5036 2015-10-29 Pedro Alves <palves@redhat.com>
5037
5038 * linux-low.h (NULL_REGSET): Define.
5039 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5040 * linux-arm-low.c (arm_regsets): Likewise.
5041 * linux-crisv32-low.c (cris_regsets): Likewise.
5042 * linux-m68k-low.c (m68k_regsets): Likewise.
5043 * linux-mips-low.c (mips_regsets): Likewise.
5044 * linux-nios2-low.c (nios2_regsets): Likewise.
5045 * linux-ppc-low.c (ppc_regsets): Likewise.
5046 * linux-s390-low.c (s390_regsets): Likewise.
5047 * linux-sh-low.c (sh_regsets): Likewise.
5048 * linux-sparc-low.c (sparc_regsets): Likewise.
5049 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5050 * linux-tile-low.c (tile_regsets): Likewise.
5051 * linux-x86-low.c (x86_regsets): Likewise.
5052 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5053
5054 2015-10-29 Pedro Alves <palves@redhat.com>
5055
5056 * linux-low.h (NULL_REGSET): Define.
5057 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5058 * linux-arm-low.c (arm_regsets): Likewise.
5059 * linux-crisv32-low.c (cris_regsets): Likewise.
5060 * linux-m68k-low.c (m68k_regsets): Likewise.
5061 * linux-mips-low.c (mips_regsets): Likewise.
5062 * linux-nios2-low.c (nios2_regsets): Likewise.
5063 * linux-ppc-low.c (ppc_regsets): Likewise.
5064 * linux-s390-low.c (s390_regsets): Likewise.
5065 * linux-sh-low.c (sh_regsets): Likewise.
5066 * linux-sparc-low.c (sparc_regsets): Likewise.
5067 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5068 * linux-tile-low.c (tile_regsets): Likewise.
5069 * linux-x86-low.c (x86_regsets): Likewise.
5070 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5071
5072 2015-10-26 Doug Evans <dje@google.com>
5073
5074 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5075
5076 2015-10-26 Doug Evans <dje@google.com>
5077
5078 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5079
5080 2015-10-26 Doug Evans <dje@google.com>
5081
5082 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5083 for debug_printf.
5084 (attach_thread, find_new_threads_callback): Ditto.
5085
5086 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5087
5088 * mem-break.h (set_breakpoint_data): Remove.
5089
5090 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5091
5092 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5093 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5094 (initialize_low): Remove set_breakpoint_data call.
5095 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5096 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5097 (initialize_low): Remove set_breakpoint_data call.
5098 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5099 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5100 (initialize_low): Remove set_breakpoint_data call.
5101
5102 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5103
5104 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5105 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5106 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5107 * target.h (target_breakpoint_kind_from_pc): New macro.
5108
5109 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5110
5111 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5112 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5113 the default breakpoint kind.
5114
5115 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5116
5117 * linux-arm-low.c (arm_supports_z_point_type): Add software
5118 breakpoint support.
5119
5120 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5121
5122 * linux-arm-low.c: Refactor breakpoint definitions.
5123 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5124 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5125
5126 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5127
5128 * Makefile.in: Add arm.c/o.
5129 * configure.srv: Likewise.
5130 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5131 (arm_breakpoint_kind_from_pc): New function.
5132 (arm_sw_breakpoint_from_kind): Return proper kind.
5133 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5134
5135 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5136
5137 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5138 removal.
5139 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5140 (struct raw_breakpoint) <size>: Remove.
5141 (struct raw_breakpoint) <kind>: Add.
5142 (bp_size): New function.
5143 (bp_opcode): Likewise.
5144 (find_raw_breakpoint_at): Adjust for kind.
5145 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5146 (remove_memory_breakpoint): Adjust for kind call bp_size.
5147 (set_raw_breakpoint_at): Adjust for kind.
5148 (set_breakpoint): Likewise.
5149 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5150 (delete_raw_breakpoint): Adjust for kind.
5151 (delete_breakpoint): Likewise.
5152 (find_gdb_breakpoint): Likewise.
5153 (set_gdb_breakpoint_1): Likewise.
5154 (set_gdb_breakpoint): Likewise.
5155 (delete_gdb_breakpoint_1): Likewise.
5156 (delete_gdb_breakpoint): Likewise.
5157 (uninsert_raw_breakpoint): Likewise.
5158 (reinsert_raw_breakpoint): Likewise.
5159 (set_breakpoint_data): Remove.
5160 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5161 (check_mem_read): Adjust for kind call bp_size.
5162 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5163 (clone_one_breakpoint): Adjust for kind.
5164 * mem-break.h (set_gdb_breakpoint): Likewise.
5165 (delete_gdb_breakpoint): Likewise.
5166 * server.c (process_serial_event): Likewise.
5167
5168 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5169
5170 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5171 (struct linux_target_ops) <breakpoint>: Remove.
5172 (struct linux_target_ops) <breakpoint_len>: Remove.
5173 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5174 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5175 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5176 (arm_sw_breakpoint_from_kind): New function.
5177 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5178 (struct linux_target_ops) <breakpoint>: Remove.
5179 (struct linux_target_ops) <breakpoint_len>: Remove.
5180 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5181 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5182 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5183 (struct linux_target_ops) <breakpoint>: Remove.
5184 (struct linux_target_ops) <breakpoint_len>: Remove.
5185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5186 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5187 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5188 (struct linux_target_ops) <breakpoint>: Remove.
5189 (struct linux_target_ops) <breakpoint_len>: Remove.
5190 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5191 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5192 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5193 and sw_breakpoint_from_kind to increment the pc.
5194 (linux_breakpoint_kind_from_pc): New function.
5195 (linux_sw_breakpoint_from_kind): New function.
5196 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5197 (initialize_low): Call breakpoint_kind_from_pc and
5198 sw_breakpoint_from_kind to replace breakpoint_data/len.
5199 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5200 New field.
5201 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5202 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5203 (struct linux_target_ops) <breakpoint>: Remove.
5204 (struct linux_target_ops) <breakpoint_len>: Remove.
5205 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5206 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5207 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5208 (struct linux_target_ops) <breakpoint>: Remove.
5209 (struct linux_target_ops) <breakpoint_len>: Remove.
5210 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5211 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5212 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5213 (struct linux_target_ops) <breakpoint>: Remove.
5214 (struct linux_target_ops) <breakpoint_len>: Remove.
5215 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5216 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5217 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5218 (struct linux_target_ops) <breakpoint>: Remove.
5219 (struct linux_target_ops) <breakpoint_len>: Remove.
5220 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5221 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5222 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5223 (struct linux_target_ops) <breakpoint>: Remove.
5224 (struct linux_target_ops) <breakpoint_len>: Remove.
5225 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5226 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5227 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5228 (struct linux_target_ops) <breakpoint>: Remove.
5229 (struct linux_target_ops) <breakpoint_len>: Remove.
5230 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5231 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5232 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5233 (struct linux_target_ops) <breakpoint>: Remove.
5234 (struct linux_target_ops) <breakpoint_len>: Remove.
5235 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5236 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5237 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5238 (struct linux_target_ops) <breakpoint>: Remove.
5239 (struct linux_target_ops) <breakpoint_len>: Remove.
5240 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5241 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5242 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5243 (struct linux_target_ops) <breakpoint>: Remove.
5244 (struct linux_target_ops) <breakpoint_len>: Remove.
5245 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5246 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5247 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5248 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5249 (struct linux_target_ops) <breakpoint>: Remove.
5250 (struct linux_target_ops) <breakpoint_len>: Remove.
5251 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5252 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5253 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5254 (struct linux_target_ops) <breakpoint>: Remove.
5255 (struct linux_target_ops) <breakpoint_len>: Remove.
5256 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5257 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5258
5259 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5260
5261 * linux-cris-low.c (cris_get_pc): Remove void arg.
5262
5263 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5264
5265 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5266 variable name.
5267
5268 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5269
5270 * inferiors.c (thread_pid_matches_callback): New function.
5271 (find_thread_process): New function.
5272 (remove_thread): Reset current_thread.
5273 (remove_process): Assert threads have been removed first.
5274
5275 2015-10-15 Yao Qi <yao.qi@linaro.org>
5276
5277 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5278 if it is 3.
5279 (aarch64_remove_point): Likewise.
5280 * regcache.c (regcache_register_size): New function.
5281
5282 2015-10-12 Yao Qi <yao.qi@linaro.org>
5283
5284 * linux-aarch64-low.c: Update all callers as emit_load_store
5285 is renamed to aarch64_emit_load_store.
5286
5287 2015-10-12 Yao Qi <yao.qi@linaro.org>
5288
5289 * linux-aarch64-low.c: Update all callers of function renaming
5290 from emit_insn to aarch64_emit_insn.
5291
5292 2015-10-12 Yao Qi <yao.qi@linaro.org>
5293
5294 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5295 arch/aarch64-insn.h.
5296 (struct aarch64_memory_operand): Likewise.
5297 (ENCODE): Likewise.
5298 (emit_insn): Move to arch/aarch64-insn.c.
5299 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5300 (emit_load_store): Move to arch/aarch64-insn.c.
5301 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5302 (can_encode_int32): Remove.
5303
5304 2015-10-12 Yao Qi <yao.qi@linaro.org>
5305
5306 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5307 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5308 (aarch64_relocate_instruction): Likewise.
5309 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5310 (struct aarch64_insn_visitor): Likewise.
5311
5312 2015-10-12 Yao Qi <yao.qi@linaro.org>
5313
5314 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5315 (struct aarch64_insn_visitor): New.
5316 (struct aarch64_insn_relocation_data): New.
5317 (aarch64_ftrace_insn_reloc_b): New function.
5318 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5319 (aarch64_ftrace_insn_reloc_cb): Likewise.
5320 (aarch64_ftrace_insn_reloc_tb): Likewise.
5321 (aarch64_ftrace_insn_reloc_adr): Likewise.
5322 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5323 (aarch64_ftrace_insn_reloc_others): Likewise.
5324 (visitor): New.
5325 (aarch64_relocate_instruction): Use visitor.
5326
5327 2015-10-12 Yao Qi <yao.qi@linaro.org>
5328
5329 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5330 int. Add argument buf.
5331 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5332 aarch64_relocate_instruction.
5333
5334 2015-10-12 Yao Qi <yao.qi@linaro.org>
5335
5336 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5337 argument insn. Remove local variable insn. Don't call
5338 target_read_uint32.
5339 (aarch64_install_fast_tracepoint_jump_pad): Call
5340 target_read_uint32.
5341
5342 2015-09-30 Yao Qi <yao.qi@linaro.org>
5343
5344 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5345 (emit_load_store_pair): Likewise.
5346
5347 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5348
5349 * dll.c (match_dll): Add cast(s).
5350 (unloaded_dll): Likewise.
5351 * linux-low.c (second_thread_of_pid_p): Likewise.
5352 (delete_lwp_callback): Likewise.
5353 (count_events_callback): Likewise.
5354 (select_event_lwp_callback): Likewise.
5355 (linux_set_resume_request): Likewise.
5356 * server.c (accumulate_file_name_length): Likewise.
5357 (emit_dll_description): Likewise.
5358 (handle_qxfer_threads_worker): Likewise.
5359 (visit_actioned_threads): Likewise.
5360 * thread-db.c (any_thread_of): Likewise.
5361 * tracepoint.c (same_process_p): Likewise.
5362 (match_blocktype): Likewise.
5363 (build_traceframe_info_xml): Likewise.
5364
5365 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5366
5367 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5368 assignment.
5369 (gdb_unparse_agent_expr): Likewise.
5370 * hostio.c (require_data): Likewise.
5371 (handle_pread): Likewise.
5372 * linux-low.c (disable_regset): Likewise.
5373 (fetch_register): Likewise.
5374 (store_register): Likewise.
5375 (get_dynamic): Likewise.
5376 (linux_qxfer_libraries_svr4): Likewise.
5377 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5378 (set_fast_tracepoint_jump): Likewise.
5379 (uninsert_fast_tracepoint_jumps_at): Likewise.
5380 (reinsert_fast_tracepoint_jumps_at): Likewise.
5381 (validate_inserted_breakpoint): Likewise.
5382 (clone_agent_expr): Likewise.
5383 * regcache.c (init_register_cache): Likewise.
5384 * remote-utils.c (putpkt_binary_1): Likewise.
5385 (decode_M_packet): Likewise.
5386 (decode_X_packet): Likewise.
5387 (look_up_one_symbol): Likewise.
5388 (relocate_instruction): Likewise.
5389 (monitor_output): Likewise.
5390 * server.c (handle_search_memory): Likewise.
5391 (handle_qxfer_exec_file): Likewise.
5392 (handle_qxfer_libraries): Likewise.
5393 (handle_qxfer): Likewise.
5394 (handle_query): Likewise.
5395 (handle_v_cont): Likewise.
5396 (handle_v_run): Likewise.
5397 (captured_main): Likewise.
5398 * target.c (write_inferior_memory): Likewise.
5399 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5400 * tracepoint.c (init_trace_buffer): Likewise.
5401 (add_tracepoint_action): Likewise.
5402 (add_traceframe): Likewise.
5403 (add_traceframe_block): Likewise.
5404 (cmd_qtdpsrc): Likewise.
5405 (cmd_qtdv): Likewise.
5406 (cmd_qtstatus): Likewise.
5407 (response_source): Likewise.
5408 (response_tsv): Likewise.
5409 (cmd_qtnotes): Likewise.
5410 (gdb_collect): Likewise.
5411 (initialize_tracepoint): Likewise.
5412
5413 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5414
5415 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5416 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5417 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5418 <NOP>: New.
5419 (enum aarch64_condition_codes): New enum.
5420 (w0): New static global.
5421 (fp): Likewise.
5422 (lr): Likewise.
5423 (struct aarch64_memory_operand) <type>: New
5424 MEMORY_OPERAND_POSTINDEX type.
5425 (postindex_memory_operand): New helper function.
5426 (emit_ret): New function.
5427 (emit_load_store_pair): New function, factored out of emit_stp
5428 with support for MEMORY_OPERAND_POSTINDEX.
5429 (emit_stp): Rewrite using emit_load_store_pair.
5430 (emit_ldp): New function.
5431 (emit_load_store): Likewise.
5432 (emit_ldr): Mention post-index instruction in comment.
5433 (emit_ldrh): New function.
5434 (emit_ldrb): New function.
5435 (emit_ldrsw): Mention post-index instruction in comment.
5436 (emit_str): Likewise.
5437 (emit_subs): New function.
5438 (emit_cmp): Likewise.
5439 (emit_and): Likewise.
5440 (emit_orr): Likewise.
5441 (emit_orn): Likewise.
5442 (emit_eor): Likewise.
5443 (emit_mvn): Likewise.
5444 (emit_lslv): Likewise.
5445 (emit_lsrv): Likewise.
5446 (emit_asrv): Likewise.
5447 (emit_mul): Likewise.
5448 (emit_sbfm): Likewise.
5449 (emit_sbfx): Likewise.
5450 (emit_ubfm): Likewise.
5451 (emit_ubfx): Likewise.
5452 (emit_csinc): Likewise.
5453 (emit_cset): Likewise.
5454 (emit_nop): Likewise.
5455 (emit_ops_insns): New helper function.
5456 (emit_pop): Likewise.
5457 (emit_push): Likewise.
5458 (aarch64_emit_prologue): New function.
5459 (aarch64_emit_epilogue): Likewise.
5460 (aarch64_emit_add): Likewise.
5461 (aarch64_emit_sub): Likewise.
5462 (aarch64_emit_mul): Likewise.
5463 (aarch64_emit_lsh): Likewise.
5464 (aarch64_emit_rsh_signed): Likewise.
5465 (aarch64_emit_rsh_unsigned): Likewise.
5466 (aarch64_emit_ext): Likewise.
5467 (aarch64_emit_log_not): Likewise.
5468 (aarch64_emit_bit_and): Likewise.
5469 (aarch64_emit_bit_or): Likewise.
5470 (aarch64_emit_bit_xor): Likewise.
5471 (aarch64_emit_bit_not): Likewise.
5472 (aarch64_emit_equal): Likewise.
5473 (aarch64_emit_less_signed): Likewise.
5474 (aarch64_emit_less_unsigned): Likewise.
5475 (aarch64_emit_ref): Likewise.
5476 (aarch64_emit_if_goto): Likewise.
5477 (aarch64_emit_goto): Likewise.
5478 (aarch64_write_goto_address): Likewise.
5479 (aarch64_emit_const): Likewise.
5480 (aarch64_emit_call): Likewise.
5481 (aarch64_emit_reg): Likewise.
5482 (aarch64_emit_pop): Likewise.
5483 (aarch64_emit_stack_flush): Likewise.
5484 (aarch64_emit_zero_ext): Likewise.
5485 (aarch64_emit_swap): Likewise.
5486 (aarch64_emit_stack_adjust): Likewise.
5487 (aarch64_emit_int_call_1): Likewise.
5488 (aarch64_emit_void_call_2): Likewise.
5489 (aarch64_emit_eq_goto): Likewise.
5490 (aarch64_emit_ne_goto): Likewise.
5491 (aarch64_emit_lt_goto): Likewise.
5492 (aarch64_emit_le_goto): Likewise.
5493 (aarch64_emit_gt_goto): Likewise.
5494 (aarch64_emit_ge_got): Likewise.
5495 (aarch64_emit_ops_impl): New static global variable.
5496 (aarch64_emit_ops): New target function, return
5497 &aarch64_emit_ops_impl.
5498 (struct linux_target_ops): Install it.
5499
5500 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5501
5502 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5503 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5504 aarch64-ipa.o.
5505 * linux-aarch64-ipa.c: New file.
5506 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5507 and endian.h.
5508 (aarch64_get_thread_area): New target method.
5509 (extract_signed_bitfield): New helper function.
5510 (aarch64_decode_ldr_literal): New function.
5511 (enum aarch64_opcodes): New enum.
5512 (struct aarch64_register): New struct.
5513 (struct aarch64_operand): New struct.
5514 (x0): New static global.
5515 (x1): Likewise.
5516 (x2): Likewise.
5517 (x3): Likewise.
5518 (x4): Likewise.
5519 (w2): Likewise.
5520 (ip0): Likewise.
5521 (sp): Likewise.
5522 (xzr): Likewise.
5523 (aarch64_register): New helper function.
5524 (register_operand): Likewise.
5525 (immediate_operand): Likewise.
5526 (struct aarch64_memory_operand): New struct.
5527 (offset_memory_operand): New helper function.
5528 (preindex_memory_operand): Likewise.
5529 (enum aarch64_system_control_registers): New enum.
5530 (ENCODE): New macro.
5531 (emit_insn): New helper function.
5532 (emit_b): New function.
5533 (emit_bcond): Likewise.
5534 (emit_cb): Likewise.
5535 (emit_tb): Likewise.
5536 (emit_blr): Likewise.
5537 (emit_stp): Likewise.
5538 (emit_ldp_q_offset): Likewise.
5539 (emit_stp_q_offset): Likewise.
5540 (emit_load_store): Likewise.
5541 (emit_ldr): Likewise.
5542 (emit_ldrsw): Likewise.
5543 (emit_str): Likewise.
5544 (emit_ldaxr): Likewise.
5545 (emit_stxr): Likewise.
5546 (emit_stlr): Likewise.
5547 (emit_data_processing_reg): Likewise.
5548 (emit_data_processing): Likewise.
5549 (emit_add): Likewise.
5550 (emit_sub): Likewise.
5551 (emit_mov): Likewise.
5552 (emit_movk): Likewise.
5553 (emit_mov_addr): Likewise.
5554 (emit_mrs): Likewise.
5555 (emit_msr): Likewise.
5556 (emit_sevl): Likewise.
5557 (emit_wfe): Likewise.
5558 (append_insns): Likewise.
5559 (can_encode_int32_in): New helper function.
5560 (aarch64_relocate_instruction): New function.
5561 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5562 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5563 (struct linux_target_ops): Install aarch64_get_thread_area,
5564 aarch64_install_fast_tracepoint_jump_pad and
5565 aarch64_get_min_fast_tracepoint_insn_len.
5566
5567 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5568
5569 * Makefile.in (aarch64-insn.o): New rule.
5570 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5571
5572 2015-09-21 Yao Qi <yao.qi@linaro.org>
5573
5574 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5575
5576 2015-09-21 Yao Qi <yao.qi@linaro.org>
5577
5578 * tracepoint.c (max_jump_pad_size): Remove.
5579
5580 2015-09-18 Yao Qi <yao.qi@linaro.org>
5581
5582 * linux-aarch64-low.c: Don't include sys/uio.h.
5583 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5584
5585 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5586
5587 * tracepoint.c (eval_result_type): Change prototype.
5588 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5589
5590 2015-09-15 Pedro Alves <palves@redhat.com>
5591
5592 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5593 Check whether to report exec events instead of checking whether
5594 multiprocess is enabled.
5595
5596 2015-09-15 Pedro Alves <palves@redhat.com>
5597
5598 PR remote/18965
5599 * remote-utils.c (prepare_resume_reply): Merge
5600 TARGET_WAITKIND_VFORK_DONE switch case with the
5601 TARGET_WAITKIND_FORKED case.
5602
5603 2015-09-15 Yao Qi <yao.qi@linaro.org>
5604
5605 * server.c (handle_query): Check string comparison using
5606 "else if" instead of "if".
5607
5608 2015-09-15 Yao Qi <yao.qi@linaro.org>
5609
5610 * server.c (vCont_supported): New global variable.
5611 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5612 matches. Append ";vContSupported+" to own_buf.
5613 (handle_v_requests): Append ";s;S" to own_buf if target supports
5614 hardware single step or vCont_supported is false.
5615 (capture_main): Set vCont_supported to zero.
5616
5617 2015-09-15 Yao Qi <yao.qi@linaro.org>
5618
5619 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5620 it to ...
5621 (linux_supports_hardware_single_step): ... New function.
5622 (linux_target_ops): Update.
5623 * lynx-low.c (lynx_target_ops): Set field
5624 supports_hardware_single_step to target_can_do_hardware_single_step.
5625 * nto-low.c (nto_target_ops): Likewise.
5626 * spu-low.c (spu_target_ops): Likewise.
5627 * win32-low.c (win32_target_ops): Likewise.
5628 * target.c (target_can_do_hardware_single_step): New function.
5629 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5630 Remove. <supports_hardware_single_step>: New field.
5631 (target_supports_conditional_breakpoints): Remove.
5632 (target_supports_hardware_single_step): New macro.
5633 (target_can_do_hardware_single_step): Declare.
5634 * server.c (handle_query): Use target_supports_hardware_single_step
5635 instead of target_supports_conditional_breakpoints.
5636
5637 2015-09-15 Yao Qi <yao.qi@linaro.org>
5638
5639 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5640 function.
5641 (struct linux_target_ops the_low_target): Install
5642 aarch64_linux_siginfo_fixup.
5643
5644 2015-09-11 Don Breazeal <donb@codesourcery.com>
5645 Luis Machado <lgustavo@codesourcery.com>
5646
5647 * linux-low.c (linux_mourn): Static declaration.
5648 (linux_arch_setup): Move in front of
5649 handle_extended_wait.
5650 (linux_arch_setup_thread): New function.
5651 (handle_extended_wait): Handle exec events. Call
5652 linux_arch_setup_thread. Make event_lwp argument a
5653 pointer-to-a-pointer.
5654 (check_zombie_leaders): Do not check stopped threads.
5655 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5656 (linux_low_filter_event): Add lwp and thread for exec'ing
5657 non-leader thread if leader thread has been deleted.
5658 Refactor code into linux_arch_setup_thread and call it.
5659 Pass child lwp pointer by reference to handle_extended_wait.
5660 (linux_wait_for_event_filtered): Update comment.
5661 (linux_wait_1): Prevent clobbering exec event status.
5662 (linux_supports_exec_events): New function.
5663 (linux_target_ops) <supports_exec_events>: Initialize new member.
5664 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5665 new member.
5666 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5667 * server.c (report_exec_events): New global variable.
5668 (handle_query): Handle qSupported query for exec-events feature.
5669 (captured_main): Initialize report_exec_events.
5670 * server.h (report_exec_events): Declare new global variable.
5671 * target.h (struct target_ops) <supports_exec_events>: New
5672 member.
5673 (target_supports_exec_events): New macro.
5674 * win32-low.c (win32_target_ops) <supports_exec_events>:
5675 Initialize new member.
5676
5677 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5678
5679 * linux-low.c (linux_low_enable_btrace): Remove.
5680 (linux_target_ops): Replace linux_low_enable_btrace with
5681 linux_enable_btrace.
5682
5683 2015-09-03 Yao Qi <yao.qi@linaro.org>
5684
5685 * linux-aarch64-low.c (aarch64_insert_point): Call
5686 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5687 returns true.
5688
5689 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5690
5691 * linux-low.c (check_stopped_by_breakpoint): Use
5692 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5693
5694 2015-08-27 Pedro Alves <palves@redhat.com>
5695
5696 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5697
5698 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5699
5700 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5701 the XNEW-family equivalent.
5702 (compile_bytecodes): Likewise.
5703 * dll.c (loaded_dll): Likewise.
5704 * event-loop.c (append_callback_event): Likewise.
5705 (create_file_handler): Likewise.
5706 (create_file_event): Likewise.
5707 * hostio.c (handle_open): Likewise.
5708 * inferiors.c (add_thread): Likewise.
5709 (add_process): Likewise.
5710 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5711 * linux-arm-low.c (arm_new_process): Likewise.
5712 (arm_new_thread): Likewise.
5713 * linux-low.c (add_to_pid_list): Likewise.
5714 (linux_add_process): Likewise.
5715 (handle_extended_wait): Likewise.
5716 (add_lwp): Likewise.
5717 (enqueue_one_deferred_signal): Likewise.
5718 (enqueue_pending_signal): Likewise.
5719 (linux_resume_one_lwp_throw): Likewise.
5720 (linux_resume_one_thread): Likewise.
5721 (linux_read_memory): Likewise.
5722 (linux_write_memory): Likewise.
5723 * linux-mips-low.c (mips_linux_new_process): Likewise.
5724 (mips_linux_new_thread): Likewise.
5725 (mips_add_watchpoint): Likewise.
5726 * linux-x86-low.c (initialize_low_arch): Likewise.
5727 * lynx-low.c (lynx_add_process): Likewise.
5728 * mem-break.c (set_raw_breakpoint_at): Likewise.
5729 (set_breakpoint): Likewise.
5730 (add_condition_to_breakpoint): Likewise.
5731 (add_commands_to_breakpoint): Likewise.
5732 (clone_agent_expr): Likewise.
5733 (clone_one_breakpoint): Likewise.
5734 * regcache.c (new_register_cache): Likewise.
5735 * remote-utils.c (look_up_one_symbol): Likewise.
5736 * server.c (queue_stop_reply): Likewise.
5737 (start_inferior): Likewise.
5738 (queue_stop_reply_callback): Likewise.
5739 (handle_target_event): Likewise.
5740 * spu-low.c (fetch_ppc_memory): Likewise.
5741 (store_ppc_memory): Likewise.
5742 * target.c (set_target_ops): Likewise.
5743 * thread-db.c (thread_db_load_search): Likewise.
5744 (try_thread_db_load_1): Likewise.
5745 * tracepoint.c (add_tracepoint): Likewise.
5746 (add_tracepoint_action): Likewise.
5747 (create_trace_state_variable): Likewise.
5748 (cmd_qtdpsrc): Likewise.
5749 (cmd_qtro): Likewise.
5750 (add_while_stepping_state): Likewise.
5751 * win32-low.c (child_add_thread): Likewise.
5752 (get_image_name): Likewise.
5753
5754 2015-08-25 Yao Qi <yao.qi@linaro.org>
5755
5756 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5757
5758 2015-08-25 Yao Qi <yao.qi@linaro.org>
5759
5760 * Makefile.in (aarch64-linux.o): New rule.
5761 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5762 srv_tgtobj.
5763 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5764 (aarch64_init_debug_reg_state): Make it extern.
5765 (aarch64_linux_prepare_to_resume): Remove.
5766
5767 2015-08-25 Yao Qi <yao.qi@linaro.org>
5768
5769 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5770 lwp_arch_private_info and ptid_of_lwp.
5771
5772 2015-08-25 Yao Qi <yao.qi@linaro.org>
5773
5774 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5775 Find proc_info by find_process_pid. All callers updated.
5776
5777 2015-08-25 Yao Qi <yao.qi@linaro.org>
5778
5779 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5780 Remove.
5781 (debug_reg_change_callback): Remove.
5782 (aarch64_notify_debug_reg_change): Remove.
5783
5784 2015-08-25 Yao Qi <yao.qi@linaro.org>
5785
5786 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5787 Call current_lwp_ptid.
5788
5789 2015-08-25 Yao Qi <yao.qi@linaro.org>
5790
5791 * linux-aarch64-low.c (debug_reg_change_callback): Use
5792 debug_printf.
5793
5794 2015-08-25 Yao Qi <yao.qi@linaro.org>
5795
5796 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5797
5798 2015-08-25 Yao Qi <yao.qi@linaro.org>
5799
5800 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5801
5802 2015-08-25 Yao Qi <yao.qi@linaro.org>
5803
5804 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5805 the code.
5806
5807 2015-08-25 Yao Qi <yao.qi@linaro.org>
5808
5809 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5810 Remove.
5811 (debug_reg_change_callback): Remove argument entry and add argument
5812 lwp. Remove local variable thread. Don't print thread id in the
5813 debugging output. Don't check whether pid of thread equals to pid.
5814 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5815 iterate_over_lwps instead find_inferior.
5816
5817 2015-08-24 Pedro Alves <palves@redhat.com>
5818
5819 * inferiors.c (get_first_process): New function.
5820 * inferiors.h (get_first_process): New declaration.
5821 * remote-utils.c (read_ptid): Default to the first process in the
5822 list, instead of to the current thread's process.
5823
5824 2015-08-24 Pedro Alves <palves@redhat.com>
5825
5826 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5827 * event-loop.c: Likewise.
5828 * remote-utils.c: Likewise.
5829 * tracepoint.c: Likewise.
5830
5831 2015-08-24 Pedro Alves <palves@redhat.com>
5832
5833 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5834 ptid_get_lwp.
5835
5836 2015-08-21 Pedro Alves <palves@redhat.com>
5837
5838 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5839 instead of literal 1.
5840
5841 2015-08-21 Pedro Alves <palves@redhat.com>
5842
5843 * tdesc.c (default_description): Explicitly zero-initialize.
5844
5845 2015-08-21 Pedro Alves <palves@redhat.com>
5846
5847 PR gdb/18749
5848 * inferiors.c (remove_thread): Discard any pending stop reply for
5849 this thread.
5850 * server.c (remove_all_on_match_pid): Rename to ...
5851 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5852 instead of a pid.
5853 (discard_queued_stop_replies): Change parameter to a ptid. Now
5854 extern.
5855 (handle_v_kill, kill_inferior_callback, captured_main)
5856 (process_serial_event): Adjust.
5857 * server.h (discard_queued_stop_replies): Declare.
5858
5859 2015-08-21 Pedro Alves <palves@redhat.com>
5860
5861 * linux-low.c (wait_for_sigstop): Always switch to no thread
5862 selected if the previously current thread dies.
5863 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5864 process instead of the current thread's.
5865 * remote-utils.c (input_interrupt): Don't check if there's no
5866 current thread.
5867 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5868 current thread to the general thread fails, error out.
5869 (handle_qxfer_auxv, handle_qxfer_libraries)
5870 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5871 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5872 (handle_query): Check if there's a thread selected instead of
5873 checking whether there's any thread in the thread list.
5874 (handle_qxfer_threads, handle_qxfer_btrace)
5875 (handle_qxfer_btrace_conf): Don't error out early if there's no
5876 thread in the thread list.
5877 (handle_v_cont, myresume): Don't set the current thread to the
5878 continue thread.
5879 (process_serial_event) <Hg handling>: Also set thread_id if the
5880 previous general thread is still alive.
5881 (process_serial_event) <g/G handling>: If setting the current
5882 thread to the general thread fails, error out.
5883 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5884 thread's lwp instead of the current thread's.
5885 * target.c (set_desired_thread): If the desired thread was not
5886 found, leave the current thread pointing to NULL. Return an int
5887 (boolean) indicating success.
5888 * target.h (set_desired_thread): Change return type to int.
5889
5890 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5891
5892 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5893 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5894 #includes.
5895 (ps_get_thread_area): New function.
5896
5897 2015-08-19 Gary Benson <gbenson@redhat.com>
5898
5899 * hostio.c (handle_pread): Do not attempt to read more data
5900 than hostio_reply_with_data can fit in a packet.
5901
5902 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5903
5904 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5905
5906 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5907
5908 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5909
5910 2015-08-06 Pedro Alves <palves@redhat.com>
5911
5912 * tracepoint.c (expr_eval_result): Now an int.
5913
5914 2015-08-06 Pedro Alves <palves@redhat.com>
5915
5916 * gdbthread.h (struct regcache): Forward declare.
5917 (struct thread_info) <regcache_data>: Now a struct regcache
5918 pointer.
5919 * inferiors.c (inferior_regcache_data)
5920 (set_inferior_regcache_data): Now work with struct regcache
5921 pointers.
5922 * inferiors.h (struct regcache): Forward declare.
5923 (inferior_regcache_data, set_inferior_regcache_data): Now work
5924 with struct regcache pointers.
5925 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5926 (free_register_cache_thread): Remove struct regcache pointer
5927 casts.
5928
5929 2015-08-06 Pedro Alves <palves@redhat.com>
5930
5931 * server.c (captured_main): On error, print the exception message
5932 to stderr, and if run_once is set, throw a quit.
5933
5934 2015-08-06 Pedro Alves <palves@redhat.com>
5935
5936 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5937 the current thread.
5938
5939 2015-08-06 Pedro Alves <palves@redhat.com>
5940
5941 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5942 reading beyond the passed in buffer length.
5943
5944 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5945
5946 * tracepoint.c (symbol_list) <required>: Remove.
5947
5948 2015-08-06 Pedro Alves <palves@redhat.com>
5949
5950 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5951 count if stopping and suspending threads.
5952 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5953 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5954 (linux_detach): Complete an ongoing step-over.
5955 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5956 throughout.
5957 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5958 (linux_wait_1): If passing a signal to the inferior after
5959 finishing a step-over, unsuspend and re-resume all lwps. If we
5960 see a single-step event but the thread should be continuing, don't
5961 pass the trap to gdb.
5962 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5963 internal_error instead of gdb_assert.
5964 (enqueue_pending_signal): New function.
5965 (check_ptrace_stopped_lwp_gone): Add debug output.
5966 (start_step_over): Use internal_error instead of gdb_assert.
5967 (complete_ongoing_step_over): New function.
5968 (linux_resume_one_thread): Don't resume a suspended thread.
5969 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5970 it stepping.
5971
5972 2015-08-06 Pedro Alves <palves@redhat.com>
5973
5974 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5975 (linux_thread_alive): Use lwp_is_marked_dead.
5976 (extended_event_reported): Delete.
5977 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5978 instead of extended_event_reported.
5979 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5980 as well.
5981 (lwp_is_marked_dead): New function.
5982 (lwp_running): Use lwp_is_marked_dead.
5983 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5984 comment.
5985
5986 2015-08-06 Pedro Alves <palves@redhat.com>
5987
5988 * linux-low.c (linux_wait_1): Move fork event output out of the
5989 !report_to_gdb check. Pass event_child->waitstatus to
5990 target_waitstatus_to_string instead of ourstatus.
5991
5992 2015-08-04 Yao Qi <yao.qi@linaro.org>
5993
5994 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5995 if current_thread is 32 bit.
5996
5997 2015-08-04 Yao Qi <yao.qi@linaro.org>
5998
5999 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6000 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6001 * server.c (extended_protocol): Remove "static".
6002 * server.h (extended_protocol): Declare it.
6003
6004 2015-08-04 Yao Qi <yao.qi@linaro.org>
6005
6006 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6007 both aarch64 and aarch32.
6008 (aarch64_set_pc): Likewise.
6009
6010 2015-08-04 Yao Qi <yao.qi@linaro.org>
6011
6012 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6013 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6014 arm-with-neon.xml to srv_xmlfiles.
6015 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6016 (is_64bit_tdesc): New function.
6017 (aarch64_linux_read_description): New function.
6018 (aarch64_arch_setup): Call aarch64_linux_read_description.
6019 (regs_info): Rename to regs_info_aarch64.
6020 (aarch64_regs_info): Return right regs_info.
6021 (initialize_low_arch): Call initialize_low_arch_aarch32.
6022
6023 2015-08-04 Yao Qi <yao.qi@linaro.org>
6024
6025 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6026 * linux-aarch32-low.c: New file.
6027 * linux-aarch32-low.h: New file.
6028 * linux-arm-low.c (arm_fill_gregset): Move it to
6029 linux-aarch32-low.c.
6030 (arm_store_gregset): Likewise.
6031 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6032 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6033 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6034 (regs_info): Rename to regs_info_arm.
6035 (arm_regs_info): Return regs_info_aarch32 if
6036 have_ptrace_getregset is 1 and target description is
6037 arm_with_neon or arm_with_vfpv3.
6038 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6039 Call initialize_low_arch_aarch32 instead.
6040
6041 2015-08-04 Yao Qi <yao.qi@linaro.org>
6042
6043 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6044 * linux-low.c: ... here.
6045 * linux-low.h (have_ptrace_getregset): Declare it.
6046
6047 2015-08-04 Pedro Alves <palves@redhat.com>
6048
6049 * thread-db.c (struct thread_db): Use new typedefs.
6050 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6051 CHK calls.
6052 (disable_thread_event_reporting): Cast result of dlsym to
6053 destination function pointer type.
6054 (thread_db_mourn): Use td_ta_delete_ftype.
6055
6056 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6057
6058 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6059 arch variant.
6060 (CDX_BREAKPOINT): Define for R2.
6061 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6062 (the_low_target): Add comments.
6063
6064 2015-07-30 Yao Qi <yao.qi@linaro.org>
6065
6066 * linux-arm-low.c (arm_hwcap): Remove it.
6067 (arm_read_description): New local variable arm_hwcap. Don't
6068 set arm_hwcap to zero.
6069
6070 2015-07-30 Yao Qi <yao.qi@linaro.org>
6071
6072 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6073 Use regcache->tdesc instead.
6074 (arm_store_wmmxregset): Likewise.
6075 (arm_fill_vfpregset): Likewise.
6076 (arm_store_vfpregset): Likewise.
6077
6078 2015-07-30 Yao Qi <yao.qi@linaro.org>
6079
6080 * linux-arm-low.c: Include arch/arm.h.
6081 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6082 (arm_store_gregset): Likewise.
6083
6084 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6085
6086 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6087 ptrace's 4th parameter.
6088
6089 2015-07-27 Yao Qi <yao.qi@linaro.org>
6090
6091 * configure.srv (case aarch64*-*-linux*): Don't set
6092 srv_linux_usrregs.
6093
6094 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6095
6096 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6097 sys/ptrace.h.
6098 * linux-arm-low.c: Likewise.
6099 * linux-cris-low.c: Likewise.
6100 * linux-crisv32-low.c: Likewise.
6101 * linux-low.c: Likewise.
6102 * linux-m68k-low.c: Likewise.
6103 * linux-mips-low.c: Likewise.
6104 * linux-nios2-low.c: Likewise.
6105 * linux-s390-low.c: Likewise.
6106 * linux-sparc-low.c: Likewise.
6107 * linux-tic6x-low.c: Likewise.
6108 * linux-tile-low.c: Likewise.
6109 * linux-x86-low.c: Likewise.
6110
6111 2015-07-24 Pedro Alves <palves@redhat.com>
6112
6113 * config.in: Regenerate.
6114 * configure: Regenerate.
6115
6116 2015-07-24 Pedro Alves <palves@redhat.com>
6117
6118 * acinclude.m4: Include ../ptrace.m4.
6119 * configure.ac: Call GDB_AC_PTRACE.
6120 * config.in, configure: Regenerate.
6121
6122 2015-07-24 Yao Qi <yao.qi@linaro.org>
6123
6124 * linux-low.c (linux_create_inferior): Remove setting to
6125 proc->priv->new_inferior.
6126 (linux_attach): Likewise.
6127 (linux_low_filter_event): Likewise.
6128 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6129
6130 2015-07-24 Yao Qi <yao.qi@linaro.org>
6131
6132 * linux-low.c (linux_arch_setup): New function.
6133 (linux_low_filter_event): If proc->tdesc is NULL and
6134 proc->attached is true, call the_low_target.arch_setup.
6135 Otherwise, keep status pending, and return.
6136 (linux_resume_one_lwp_throw): Don't call get_pc if
6137 thread->while_stepping isn't NULL. Don't call
6138 get_thread_regcache if proc->tdesc is NULL.
6139 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6140 (linux_target_ops): Install arch_setup.
6141 * server.c (start_inferior): Call the_target->arch_setup.
6142 * target.h (struct target_ops) <arch_setup>: New field.
6143 (target_arch_setup): New marco.
6144 * lynx-low.c (lynx_target_ops): Update.
6145 * nto-low.c (nto_target_ops): Update.
6146 * spu-low.c (spu_target_ops): Update.
6147 * win32-low.c (win32_target_ops): Update.
6148
6149 2015-07-24 Yao Qi <yao.qi@linaro.org>
6150
6151 * linux-low.c (linux_add_process): Don't set
6152 proc->priv->new_inferior.
6153 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6154 (linux_attach): Likewise.
6155
6156 2015-07-24 Yao Qi <yao.qi@linaro.org>
6157
6158 * server.c (start_inferior): Code refactor.
6159
6160 2015-07-24 Yao Qi <yao.qi@linaro.org>
6161
6162 * server.c (process_serial_event): Set general_thread.
6163
6164 2015-07-21 Yao Qi <yao.qi@linaro.org>
6165
6166 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6167 aarch64_linux_get_debug_reg_capacity.
6168
6169 2015-07-17 Yao Qi <yao.qi@linaro.org>
6170
6171 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6172 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6173 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6174 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6175 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6176 (AARCH64_HWP_ALIGNMENT): Likewise.
6177 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6178 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6179 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6180 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6181 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6182 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6183 (struct aarch64_debug_reg_state): Likewise.
6184 (struct arch_lwp_info): Likewise.
6185 (aarch64_align_watchpoint): Likewise.
6186 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6187 (aarch64_watchpoint_length): Likewise.
6188 (aarch64_point_encode_ctrl_reg): Likewise
6189 (aarch64_point_is_aligned): Likewise.
6190 (aarch64_align_watchpoint): Likewise.
6191 (aarch64_linux_set_debug_regs):
6192 (aarch64_dr_state_insert_one_point): Likewise.
6193 (aarch64_dr_state_remove_one_point): Likewise.
6194 (aarch64_handle_breakpoint): Likewise.
6195 (aarch64_handle_aligned_watchpoint): Likewise.
6196 (aarch64_handle_unaligned_watchpoint): Likewise.
6197 (aarch64_handle_watchpoint): Likewise.
6198
6199 2015-07-17 Yao Qi <yao.qi@linaro.org>
6200
6201 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6202 and don't aarch64_get_debug_reg_state. All callers update.
6203 (aarch64_handle_aligned_watchpoint): Likewise.
6204 (aarch64_handle_unaligned_watchpoint): Likewise.
6205 (aarch64_handle_watchpoint): Likewise.
6206 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6207 (aarch64_remove_point): Likewise.
6208
6209 2015-07-17 Yao Qi <yao.qi@linaro.org>
6210
6211 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6212 debug_printf.
6213 (aarch64_handle_unaligned_watchpoint): Likewise.
6214
6215 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6216
6217 Revert the previous 3 commits:
6218 Move gdb_regex* to common/
6219 Move linux_find_memory_regions_full & co.
6220 gdbserver build-id attribute generator
6221
6222 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6223 Jan Kratochvil <jan.kratochvil@redhat.com>
6224
6225 gdbserver build-id attribute generator.
6226 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6227 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6228 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6229 (find_phdr): New.
6230 (get_dynamic): Use find_pdhr to traverse program headers.
6231 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6232 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6233 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6234 (get_hex_build_id): New.
6235 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6236 to reply XML document.
6237
6238 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6239 Jan Kratochvil <jan.kratochvil@redhat.com>
6240
6241 * target.c: Include target/target-utils.h and fcntl.h.
6242 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6243 (target_fileio_read_stralloc): New functions.
6244
6245 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6246
6247 * Makefile.in (OBS): Add gdb_regex.o.
6248 (gdb_regex.o): New.
6249 * config.in: Rebuilt.
6250 * configure: Rebuilt.
6251
6252 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6253 Jan Kratochvil <jan.kratochvil@redhat.com>
6254
6255 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6256 * Makefile.in (OBS): Add target-utils.o.
6257 (linux-maps.o, target-utils.o): New.
6258 * configure.srv (srv_linux_obj): Add linux-maps.o.
6259
6260 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6261
6262 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6263 function, return 1.
6264 (the_low_target): Install it.
6265
6266 2015-07-14 Pedro Alves <palves@redhat.com>
6267
6268 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6269 Instead, ignore ECHILD, and throw an error for other errnos.
6270
6271 2015-07-10 Pedro Alves <palves@redhat.com>
6272
6273 * event-loop.c (struct callback_event) <data>: Change type to
6274 gdb_client_data instance instead of gdb_client_data pointer.
6275 (append_callback_event): Adjust.
6276
6277 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6278
6279 * linux-aarch64-low.c: Add comments for each linux_target_ops
6280 method. Remove comments already covered in target_ops and
6281 linux_target_ops definitions.
6282 (the_low_target): Add comments for each unimplemented method.
6283
6284 2015-07-09 Yao Qi <yao.qi@linaro.org>
6285
6286 * linux-aarch64-low.c (aarch64_regmap): Remove.
6287 (aarch64_usrregs_info): Remove.
6288 (regs_info): Set field usrregs to NULL.
6289
6290 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6291
6292 * linux-low.c: Include "rsp-low.h"
6293 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6294 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6295 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6296 (handle_btrace_enable_pt): New.
6297 (handle_btrace_general_set): Support "pt".
6298 (handle_btrace_conf_general_set): Support "pt:size".
6299
6300 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6301
6302 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6303 Z_PACKET_SW_BP.
6304
6305 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6306
6307 * linux-aarch64-low.c: Remove comment about endianness.
6308 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6309 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6310 memcmp.
6311
6312 2015-06-24 Gary Benson <gbenson@redhat.com>
6313
6314 * linux-i386-ipa.c (stdint.h): Do not include.
6315 * lynx-i386-low.c (stdint.h): Likewise.
6316 * lynx-ppc-low.c (stdint.h): Likewise.
6317 * mem-break.c (stdint.h): Likewise.
6318 * thread-db.c (stdint.h): Likewise.
6319 * tracepoint.c (stdint.h): Likewise.
6320 * win32-low.c (stdint.h): Likewise.
6321
6322 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6323
6324 * server.c (write_qxfer_response): Update call to
6325 remote_escape_output.
6326
6327 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6328 Jan Kratochvil <jan.kratochvil@redhat.com>
6329
6330 Merge multiple hex conversions.
6331 * gdbreplay.c (tohex): Rename to 'fromhex'.
6332 (logchar): Use fromhex.
6333
6334 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6335
6336 * server.c (handle_qxfer_libraries): Set `version' attribute for
6337 <library-list>.
6338
6339 2015-06-10 Gary Benson <gbenson@redhat.com>
6340
6341 * target.h (struct target_ops) <multifs_open>: New field.
6342 <multifs_unlink>: Likewise.
6343 <multifs_readlink>: Likewise.
6344 * linux-low.c (nat/linux-namespaces.h): New include.
6345 (linux_target_ops): Initialize the_target->multifs_open,
6346 the_target->multifs_unlink and the_target->multifs_readlink.
6347 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6348 * hostio.c (hostio_fs_pid): New static variable.
6349 (hostio_handle_new_gdb_connection): New function.
6350 (handle_setfs): Likewise.
6351 (handle_open): Use the_target->multifs_open as appropriate.
6352 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6353 (handle_readlink): Use the_target->multifs_readlink as
6354 appropriate.
6355 (handle_vFile): Handle vFile:setfs packets.
6356 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6357 after target_handle_new_gdb_connection.
6358
6359 2015-06-10 Gary Benson <gbenson@redhat.com>
6360
6361 * configure.ac (AC_CHECK_FUNCS): Add setns.
6362 * config.in: Regenerate.
6363 * configure: Likewise.
6364 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6365 (linux-namespaces.o): New rule.
6366 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6367
6368 2015-06-09 Gary Benson <gbenson@redhat.com>
6369
6370 * hostio.c (handle_open): Process mode argument with
6371 fileio_to_host_mode.
6372
6373 2015-06-01 Yao Qi <yao.qi@linaro.org>
6374
6375 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6376 * linux-x86-low.c: Likewise.
6377
6378 2015-05-28 Don Breazeal <donb@codesourcery.com>
6379
6380 * linux-low.c (handle_extended_wait): Initialize
6381 thread_info.last_resume_kind for new fork children.
6382
6383 2015-05-15 Pedro Alves <palves@redhat.com>
6384
6385 * target.h (target_handle_new_gdb_connection): Rewrite using if
6386 wrapped in do/while.
6387
6388 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6389
6390 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6391 * configure, config.in: Regenerate.
6392 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6393 Declare typedef.
6394
6395 2015-05-12 Don Breazeal <donb@codesourcery.com>
6396
6397 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6398 PTRACE_EVENT_VFORK_DONE.
6399 (linux_low_ptrace_options, extended_event_reported): Add vfork
6400 events.
6401 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6402 and "vforkdone" for RSP 'T' Stop Reply Packet.
6403 * server.h (report_vfork_events): Declare
6404 global variable.
6405
6406 2015-05-12 Don Breazeal <donb@codesourcery.com>
6407
6408 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6409 (the_low_target) <new_fork>: Initialize new member.
6410 * linux-arm-low.c (arm_new_fork): New function.
6411 (the_low_target) <new_fork>: Initialize new member.
6412 * linux-low.c (handle_extended_wait): Call new target function
6413 new_fork.
6414 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6415 * linux-mips-low.c (mips_add_watchpoint): New function
6416 extracted from mips_insert_point.
6417 (the_low_target) <new_fork>: Initialize new member.
6418 (mips_linux_new_fork): New function.
6419 (mips_insert_point): Call mips_add_watchpoint.
6420 * linux-x86-low.c (x86_linux_new_fork): New function.
6421 (the_low_target) <new_fork>: Initialize new member.
6422
6423 2015-05-12 Don Breazeal <donb@codesourcery.com>
6424
6425 * linux-low.c (handle_extended_wait): Implement return value,
6426 rename argument 'event_child' to 'event_lwp', handle
6427 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6428 (linux_low_ptrace_options): New function.
6429 (linux_low_filter_event): Call linux_low_ptrace_options,
6430 use different argument fo linux_enable_event_reporting,
6431 use return value from handle_extended_wait.
6432 (extended_event_reported): New function.
6433 (linux_wait_1): Call extended_event_reported and set
6434 status to report fork events.
6435 (linux_write_memory): Add pid to debug message.
6436 (reset_lwp_ptrace_options_callback): New function.
6437 (linux_handle_new_gdb_connection): New function.
6438 (linux_target_ops): Initialize new structure member.
6439 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6440 * lynx-low.c: Initialize new structure member.
6441 * remote-utils.c (prepare_resume_reply): Implement stop reason
6442 "fork" for "T" stop message.
6443 * server.c (handle_query): Call handle_new_gdb_connection.
6444 * server.h (report_fork_events): Declare global flag.
6445 * target.h (struct target_ops) <handle_new_gdb_connection>:
6446 New member.
6447 (target_handle_new_gdb_connection): New macro.
6448 * win32-low.c: Initialize new structure member.
6449
6450 2015-05-12 Don Breazeal <donb@codesourcery.com>
6451
6452 * mem-break.c (APPEND_TO_LIST): Define macro.
6453 (clone_agent_expr): New function.
6454 (clone_one_breakpoint): New function.
6455 (clone_all_breakpoints): New function.
6456 * mem-break.h: Declare new functions.
6457
6458 2015-05-12 Don Breazeal <donb@codesourcery.com>
6459
6460 * linux-low.c (linux_supports_fork_events): New function.
6461 (linux_supports_vfork_events): New function.
6462 (linux_target_ops): Initialize new structure members.
6463 (initialize_low): Call linux_check_ptrace_features.
6464 * lynx-low.c (lynx_target_ops): Initialize new structure
6465 members.
6466 * server.c (report_fork_events, report_vfork_events):
6467 New global flags.
6468 (handle_query): Add new features to qSupported packet and
6469 response.
6470 (captured_main): Initialize new global variables.
6471 * target.h (struct target_ops) <supports_fork_events>:
6472 New member.
6473 <supports_vfork_events>: New member.
6474 (target_supports_fork_events): New macro.
6475 (target_supports_vfork_events): New macro.
6476 * win32-low.c (win32_target_ops): Initialize new structure
6477 members.
6478
6479 2015-05-12 Gary Benson <gbenson@redhat.com>
6480
6481 * server.c (handle_qxfer_exec_file): Use current process
6482 if annex is empty.
6483
6484 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6485
6486 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6487 Remove HAVE_PTRACE_GETREGS conditionals.
6488 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6489 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6490
6491 2015-05-08 Yao Qi <yao.qi@linaro.org>
6492
6493 * linux-low.c (linux_supports_conditional_breakpoints): New
6494 function.
6495 (linux_target_ops): Install new target method.
6496 * lynx-low.c (lynx_target_ops): Install NULL hook for
6497 supports_conditional_breakpoints.
6498 * nto-low.c (nto_target_ops): Likewise.
6499 * spu-low.c (spu_target_ops): Likewise.
6500 * win32-low.c (win32_target_ops): Likewise.
6501 * server.c (handle_query): Check
6502 target_supports_conditional_breakpoints.
6503 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6504 New field.
6505 (target_supports_conditional_breakpoints): New macro.
6506
6507 2015-05-06 Pedro Alves <palves@redhat.com>
6508
6509 PR server/18081
6510 * server.c (start_inferior): If the process exits, mourn it.
6511
6512 2015-04-21 Gary Benson <gbenson@redhat.com>
6513
6514 * hostio.c (fileio_open_flags_to_host): Factored out to
6515 fileio_to_host_openflags in common/fileio.c. Single use
6516 updated.
6517
6518 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6519
6520 * linux-xtensa-low.c (xtensa_fill_gregset)
6521 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6522 XCHAL_HAVE_LOOP.
6523
6524 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6525
6526 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6527 (regs_info): Replace usrregs pointer with NULL.
6528
6529 2015-04-17 Gary Benson <gbenson@redhat.com>
6530
6531 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6532 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6533 * server.c (handle_qxfer_exec_file): New function.
6534 (qxfer_packets): Add exec-file entry.
6535 (handle_query): Report qXfer:exec-file:read as supported packet.
6536
6537 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6538
6539 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6540
6541 2015-04-09 Gary Benson <gbenson@redhat.com>
6542
6543 * hostio-errno.c (errno_to_fileio_error): Remove function.
6544 Update caller to use remote_fileio_to_fio_error.
6545
6546 2015-04-09 Yao Qi <yao.qi@linaro.org>
6547
6548 * linux-low.c (linux_insert_point): Call
6549 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6550 (linux_remove_point): Call remove_memory_breakpoint if type is
6551 raw_bkpt_type_sw.
6552 * linux-x86-low.c (x86_insert_point): Don't call
6553 insert_memory_breakpoint.
6554 (x86_remove_point): Don't call remove_memory_breakpoint.
6555
6556 2015-04-01 Pedro Alves <palves@redhat.com>
6557 Cleber Rosa <crosa@redhat.com>
6558
6559 * server.c (gdbserver_usage): Reorganize and extend the usage
6560 message.
6561
6562 2015-03-24 Pedro Alves <palves@redhat.com>
6563
6564 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6565 output. Also dump TRAP_TRACE.
6566 (linux_low_filter_event): In debug output, distinguish a
6567 resume_stop SIGSTOP from a delayed SIGSTOP.
6568
6569 2015-03-24 Gary Benson <gbenson@redhat.com>
6570
6571 * linux-x86-low.c (x86_linux_new_thread): Moved to
6572 nat/x86-linux.c.
6573 (x86_linux_prepare_to_resume): Likewise.
6574
6575 2015-03-24 Gary Benson <gbenson@redhat.com>
6576
6577 * Makefile.in (x86-linux-dregs.o): New rule.
6578 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6579 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6580 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6581 (x86_linux_dr_get): Likewise.
6582 (x86_linux_dr_set): Likewise.
6583 (update_debug_registers_callback): Likewise.
6584 (x86_linux_dr_set_addr): Likewise.
6585 (x86_linux_dr_get_addr): Likewise.
6586 (x86_linux_dr_set_control): Likewise.
6587 (x86_linux_dr_get_control): Likewise.
6588 (x86_linux_dr_get_status): Likewise.
6589 (x86_linux_update_debug_registers): Likewise.
6590
6591 2015-03-24 Gary Benson <gbenson@redhat.com>
6592
6593 * linux-x86-low.c (x86_linux_update_debug_registers):
6594 New function, factored out from...
6595 (x86_linux_prepare_to_resume): ...this.
6596
6597 2015-03-24 Gary Benson <gbenson@redhat.com>
6598
6599 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6600 (x86_linux_dr_set): Likewise.
6601 (update_debug_registers_callback): Likewise.
6602 (x86_linux_dr_set_addr): Likewise.
6603 (x86_linux_dr_get_addr): Likewise.
6604 (x86_linux_dr_set_control): Likewise.
6605 (x86_linux_dr_get_control): Likewise.
6606 (x86_linux_dr_get_status): Likewise.
6607 (x86_linux_prepare_to_resume): Likewise.
6608
6609 2015-03-24 Gary Benson <gbenson@redhat.com>
6610
6611 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6612 Use perror_with_name. Pass string through gettext.
6613 (x86_linux_dr_set): Likewise.
6614
6615 2015-03-24 Gary Benson <gbenson@redhat.com>
6616
6617 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6618 (x86_linux_dr_set_addr): ...this.
6619 (x86_dr_low_get_addr): Rename to...
6620 (x86_linux_dr_get_addr): ...this.
6621 (x86_dr_low_set_control): Rename to...
6622 (x86_linux_dr_set_control): ...this.
6623 (x86_dr_low_get_control): Rename to...
6624 (x86_linux_dr_get_control): ...this.
6625 (x86_dr_low_get_status): Rename to...
6626 (x86_linux_dr_get_status): ...this.
6627 (x86_dr_low): Update with new function names.
6628
6629 2015-03-24 Gary Benson <gbenson@redhat.com>
6630
6631 * Makefile.in (x86-linux.o): New rule.
6632 * configure.srv: Add x86-linux.o to relevant targets.
6633 * linux-low.c (lwp_set_arch_private_info): New function.
6634 (lwp_arch_private_info): Likewise.
6635 * linux-x86-low.c: Include nat/x86-linux.h.
6636 (arch_lwp_info): Removed structure.
6637 (update_debug_registers_callback):
6638 Use lwp_set_debug_registers_changed.
6639 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6640 and lwp_set_debug_registers_changed.
6641 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6642
6643 2015-03-24 Gary Benson <gbenson@redhat.com>
6644
6645 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6646 * linux-arm-low.c (arm_new_thread): Likewise.
6647 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6648 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6649 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6650 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6651
6652 2015-03-24 Gary Benson <gbenson@redhat.com>
6653
6654 * linux-low.c (ptid_of_lwp): New function.
6655 (lwp_is_stopped): Likewise.
6656 (lwp_stop_reason): Likewise.
6657 * linux-x86-low.c (update_debug_registers_callback):
6658 Use lwp_is_stopped.
6659 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6660 lwp_stop_reason.
6661
6662 2015-03-24 Gary Benson <gbenson@redhat.com>
6663
6664 * linux-low.h (linux_stop_lwp): Remove declaration.
6665
6666 2015-03-24 Gary Benson <gbenson@redhat.com>
6667
6668 * linux-low.h: Include nat/linux-nat.h.
6669 * linux-low.c (iterate_over_lwps_args): New structure.
6670 (iterate_over_lwps_filter): New function.
6671 (iterate_over_lwps): Likewise.
6672 * linux-x86-low.c (update_debug_registers_callback):
6673 Update signature to what iterate_over_lwps expects.
6674 Remove PID check that iterate_over_lwps now performs.
6675 (x86_dr_low_set_addr): Use iterate_over_lwps.
6676 (x86_dr_low_set_control): Likewise.
6677
6678 2015-03-24 Gary Benson <gbenson@redhat.com>
6679
6680 * linux-x86-low.c (x86_debug_reg_state): New function.
6681 (x86_linux_prepare_to_resume): Use the above.
6682
6683 2015-03-24 Gary Benson <gbenson@redhat.com>
6684
6685 * linux-low.c (current_lwp_ptid): New function.
6686 * linux-x86-low.c: Include nat/linux-nat.h.
6687 (x86_dr_low_get_addr): Use current_lwp_ptid.
6688 (x86_dr_low_get_control): Likewise.
6689 (x86_dr_low_get_status): Likewise.
6690
6691 2015-03-20 Pedro Alves <palves@redhat.com>
6692
6693 * tracepoint.c (cmd_qtstatus): Make "str" const.
6694
6695 2015-03-20 Pedro Alves <palves@redhat.com>
6696
6697 * server.c (handle_general_set): Make "req_str" const.
6698
6699 2015-03-19 Pedro Alves <palves@redhat.com>
6700
6701 * linux-low.c (linux_resume_one_lwp): Rename to ...
6702 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6703 instead call perror_with_name.
6704 (check_ptrace_stopped_lwp_gone): New function.
6705 (linux_resume_one_lwp): Reimplement as wrapper around
6706 linux_resume_one_lwp_throw that swallows errors if the LWP is
6707 gone.
6708
6709 2015-03-19 Pedro Alves <palves@redhat.com>
6710
6711 * linux-low.c (count_events_callback, select_event_lwp_callback):
6712 No longer check whether the thread has resume_stop as last resume
6713 kind.
6714
6715 2015-03-19 Pedro Alves <palves@redhat.com>
6716
6717 * linux-low.c (count_events_callback, select_event_lwp_callback):
6718 Use the lwp's status_pending_p field, not the thread's.
6719
6720 2015-03-19 Pedro Alves <palves@redhat.com>
6721
6722 * linux-low.c (select_event_lwp_callback): Update comments to
6723 no longer mention SIGTRAP.
6724
6725 2015-03-18 Gary Benson <gbenson@redhat.com>
6726
6727 * server.c (handle_query): Do not report vFile:fstat as supported.
6728
6729 2015-03-11 Gary Benson <gbenson@redhat.com>
6730
6731 * hostio.c (sys/types.h): New include.
6732 (sys/stat.h): Likewise.
6733 (common-remote-fileio.h): Likewise.
6734 (handle_fstat): New function.
6735 (handle_vFile): Handle vFile:fstat packets.
6736
6737 2015-03-11 Gary Benson <gbenson@redhat.com>
6738
6739 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6740 struct stat.st_blocks and struct stat.st_blksize.
6741 * configure: Regenerate.
6742 * config.in: Likewise.
6743 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6744 (OBS): Add common-remote-fileio.o.
6745 (common-remote-fileio.o): New rule.
6746
6747 2015-03-09 Pedro Alves <palves@redhat.com>
6748
6749 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6750 'struct sockaddr' pointer in 'accept' call.
6751
6752 2015-03-09 Pedro Alves <palves@redhat.com>
6753
6754 Revert:
6755 2015-03-07 Pedro Alves <palves@redhat.com>
6756 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6757 or <winsock2.h> here. Instead include "gdb_socket.h".
6758 (remote_open): Use union gdb_sockaddr_u.
6759 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6760 or <winsock2.h> here. Instead include "gdb_socket.h".
6761 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6762 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6763 or <sys/un.h>.
6764 (init_named_socket, gdb_agent_helper_thread): Use union
6765 gdb_sockaddr_u.
6766
6767 2015-03-07 Pedro Alves <palves@redhat.com>
6768
6769 * configure.ac (build_warnings): Move
6770 -Wdeclaration-after-statement to the C-specific set.
6771 * configure: Regenerate.
6772
6773 2015-03-07 Pedro Alves <palves@redhat.com>
6774
6775 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6776 or <winsock2.h> here. Instead include "gdb_socket.h".
6777 (remote_open): Use union gdb_sockaddr_u.
6778 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6779 or <winsock2.h> here. Instead include "gdb_socket.h".
6780 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6781 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6782 or <sys/un.h>.
6783 (init_named_socket, gdb_agent_helper_thread): Use union
6784 gdb_sockaddr_u.
6785
6786 2015-03-07 Pedro Alves <palves@redhat.com>
6787
6788 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6789 instead.
6790
6791 2015-03-06 Yao Qi <yao.qi@linaro.org>
6792
6793 * linux-aarch64-low.c (aarch64_insert_point): Use
6794 show_debug_regs as a boolean.
6795 (aarch64_remove_point): Likewise.
6796
6797 2015-03-05 Pedro Alves <palves@redhat.com>
6798
6799 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6800 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6801 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6802 * nto-low.c (nto_target_ops): Likewise.
6803 * spu-low.c (spu_target_ops): Likewise.
6804 * win32-low.c (win32_target_ops): Likewise.
6805
6806 2015-03-04 Pedro Alves <palves@redhat.com>
6807
6808 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6809 Decide whether a breakpoint triggered based on the SIGTRAP's
6810 siginfo.si_code.
6811 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6812 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6813 (linux_low_filter_event): Check for breakpoints before checking
6814 watchpoints.
6815 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6816 siginfo.si_code.
6817 (linux_stopped_by_sw_breakpoint)
6818 (linux_supports_stopped_by_sw_breakpoint)
6819 (linux_stopped_by_hw_breakpoint)
6820 (linux_supports_stopped_by_hw_breakpoint): New functions.
6821 (linux_target_ops): Install new target methods.
6822
6823 2015-03-04 Pedro Alves <palves@redhat.com>
6824
6825 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6826 * server.c (swbreak_feature, hwbreak_feature): New globals.
6827 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6828 (captured_main): Clear swbreak_feature and hwbreak_feature.
6829 * server.h (swbreak_feature, hwbreak_feature): Declare.
6830 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6831 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6832 supports_stopped_by_hw_breakpoint>: New fields.
6833 (target_supports_stopped_by_sw_breakpoint)
6834 (target_stopped_by_sw_breakpoint)
6835 (target_supports_stopped_by_hw_breakpoint)
6836 (target_stopped_by_hw_breakpoint): Declare.
6837
6838 2015-03-04 Pedro Alves <palves@redhat.com>
6839
6840 enum lwp_stop_reason -> enum target_stop_reason
6841 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6842 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6843 (linux_wait_1, stuck_in_jump_pad_callback)
6844 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6845 (linux_stopped_by_watchpoint):
6846 * linux-low.h (enum lwp_stop_reason): Delete.
6847 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6848 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6849
6850 2015-03-04 Yao Qi <yao.qi@linaro.org>
6851
6852 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6853
6854 2015-03-03 Gary Benson <gbenson@redhat.com>
6855
6856 * hostio.c (handle_vFile): Fix prefix lengths.
6857
6858 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6859
6860 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6861 ptr_bits.
6862
6863 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6864
6865 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6866 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6867 (clean): Add "rm -f" for above C files.
6868 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6869 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6870 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6871 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6872 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6873 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6874 (init_registers_s390x_vx_linux64)
6875 (init_registers_s390x_tevx_linux64)
6876 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6877 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6878 declarations.
6879 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6880 (s390_store_vxrs_high): New functions.
6881 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6882 NT_S390_VXRS_HIGH.
6883 (s390_arch_setup): Add logic for selecting one of the new target
6884 descriptions. Activate the new vector regsets if applicable.
6885 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6886 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6887 and init_registers_s390x_tevx_linux64.
6888
6889 2015-03-01 Pedro Alves <palves@redhat.com>
6890
6891 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6892 parameter.
6893
6894 2015-02-27 Pedro Alves <palves@redhat.com>
6895
6896 * linux-x86-low.c (u_debugreg_offset): New function.
6897 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6898
6899 2015-02-27 Pedro Alves <palves@redhat.com>
6900
6901 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6902 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6903 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6904 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6905 (ps_lsetfpregs, ps_getpid)
6906 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6907 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6908 (ps_lsetxregs, ps_plog): Declare.
6909
6910 2015-02-27 Pedro Alves <palves@redhat.com>
6911
6912 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6913 IP_AGENT_EXPORT_FUNC.
6914 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6915 IP_AGENT_EXPORT_FUNC.
6916 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6917 (IP_AGENT_EXPORT): Delete.
6918 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6919 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6920 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6921 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6922 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6923 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6924 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6925 (traceframe_read_count, traceframe_write_count)
6926 (traceframes_created, trace_state_variables, get_raw_reg)
6927 (get_trace_state_variable_value, set_trace_state_variable_value)
6928 (ust_loaded, helper_thread_id, cmd_buf): Use
6929 IPA_SYM_EXPORTED_NAME.
6930 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6931 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6932 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6933 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6934 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6935 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6936 EXTERN_C_PUSH/EXTERN_C_POP.
6937 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6938 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6939 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6940 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6941 (traceframe_write_count, traceframe_read_count)
6942 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6943 (about_to_request_buffer_space, get_trace_state_variable_value)
6944 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6945 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6946 EXTERN_C_PUSH/EXTERN_C_POP.
6947 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6948 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6949 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6950 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6951 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6952 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6953 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6954 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6955 Define.
6956 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6957 (IP_AGENT_EXPORT_VAR_DECL): Define.
6958 (tracing): Declare.
6959 (gdb_agent_get_raw_reg): Declare.
6960
6961 2015-02-27 Tom Tromey <tromey@redhat.com>
6962 Pedro Alves <palves@redhat.com>
6963
6964 Rename symbols whose names are reserved C++ keywords throughout.
6965
6966 2015-02-27 Pedro Alves <palves@redhat.com>
6967
6968 * Makefile.in (COMPILER): New, get it from autoconf.
6969 (CXX): Get from autoconf instead.
6970 (COMPILE.pre): Use COMPILER.
6971 (CC-LD): Rename to ...
6972 (CC_LD): ... this. Use COMPILER.
6973 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6974 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6975 * acinclude.m4: Include build-with-cxx.m4.
6976 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6977 Disable -Werror by default if building in C++ mode.
6978 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6979 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6980 the C++ compiler. Save/restore CXXFLAGS too.
6981 * configure: Regenerate.
6982
6983 2015-02-27 Pedro Alves <palves@redhat.com>
6984
6985 * acinclude.m4: Include libiberty.m4.
6986 * configure.ac: Call libiberty_INIT.
6987 * config.in, configure: Regenerate.
6988
6989 2015-02-26 Pedro Alves <palves@redhat.com>
6990
6991 * linux-low.c (linux_wait_1): When incrementing the PC past a
6992 program breakpoint always use the_low_target.breakpoint_len as
6993 increment, rather than the maximum between that and
6994 the_low_target.decr_pc_after_break.
6995
6996 2015-02-23 Pedro Alves <palves@redhat.com>
6997
6998 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6999 thread was doing a step-over; always adjust the PC if
7000 we stepped over a permanent breakpoint.
7001 (linux_wait_1): If we stepped over breakpoint that was on top of a
7002 permanent breakpoint, manually advance the PC past it.
7003
7004 2015-02-23 Pedro Alves <palves@redhat.com>
7005
7006 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7007 modes.
7008 (x86_fill_gregset, x86_store_gregset): Use it when handling
7009 $orig_eax.
7010
7011 2015-02-20 Pedro Alves <palves@redhat.com>
7012
7013 * thread-db.c: Include "nat/linux-procfs.h".
7014 (thread_db_init): Skip listing new threads if the kernel supports
7015 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7016
7017 2015-02-20 Pedro Alves <palves@redhat.com>
7018
7019 * linux-low.c (status_pending_p_callback): Use ptid_match.
7020
7021 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7022
7023 PR breakpoints/16812
7024 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7025 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7026 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7027
7028 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7029
7030 PR breakpoints/15956
7031 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7032
7033 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7034
7035 * linux-low.c (linux_low_btrace_conf): Print size.
7036 * server.c (handle_btrace_conf_general_set): New.
7037 (hanle_general_set): Call handle_btrace_conf_general_set.
7038 (handle_query): Report Qbtrace-conf:bts:size as supported.
7039
7040 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7041
7042 * linux-low.c (linux_low_enable_btrace): Update parameters.
7043 (linux_low_btrace_conf): New.
7044 (linux_target_ops)<to_btrace_conf>: Initialize.
7045 * server.c (current_btrace_conf): New.
7046 (handle_btrace_enable): Rename to ...
7047 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7048 to target_enable_btrace. Update comment. Update users.
7049 (handle_qxfer_btrace_conf): New.
7050 (qxfer_packets): Add btrace-conf entry.
7051 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7052 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7053 (target_ops)<read_btrace_conf>: New.
7054 (target_enable_btrace): Update parameters.
7055 (target_read_btrace_conf): New.
7056
7057 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7058
7059 * server.c (handle_btrace_general_set): Remove call to
7060 target_supports_btrace.
7061 (supported_btrace_packets): New.
7062 (handle_query): Call supported_btrace_packets.
7063 * target.h: include btrace-common.h.
7064 (btrace_target_info): Removed.
7065 (supports_btrace, target_supports_btrace): Update parameters.
7066
7067 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7068
7069 * Makefile.in (SFILES): Add common/btrace-common.c.
7070 (OBS): Add common/btrace-common.o.
7071 (btrace-common.o): Add build rules.
7072 * linux-low: Include btrace-common.h.
7073 (linux_low_read_btrace): Use struct btrace_data. Call
7074 btrace_data_init and btrace_data_fini.
7075
7076 2015-02-06 Pedro Alves <palves@redhat.com>
7077
7078 * thread-db.c (find_new_threads_callback): Add debug output.
7079
7080 2015-02-04 Pedro Alves <palves@redhat.com>
7081
7082 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7083 (resume_stopped_resumed_lwps): New function.
7084 (linux_wait_for_event_filtered): Use it.
7085
7086 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7087
7088 * Makefile.in (SFILES): Add linux-personality.c.
7089 (linux-personality.o): New rule.
7090 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7091 list of objects to be built.
7092 * linux-low.c: Include nat/linux-personality.h.
7093 (linux_create_inferior): Remove code to disable address space
7094 randomization (moved to ../nat/linux-personality.c). Create
7095 cleanup to disable address space randomization.
7096
7097 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7098
7099 * Makefile.in (posix-strerror.o): New rule.
7100 (mingw-strerror.o): Likewise.
7101 * configure: Regenerated.
7102 * configure.ac: Source file ../common/common.host. Initialize new
7103 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7104
7105 2015-01-14 Yao Qi <yao@codesourcery.com>
7106
7107 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7108 (ppc-linux.o): New rule.
7109 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7110 * configure.ac: AC_CHECK_FUNCS(getauxval).
7111 * config.in: Re-generated.
7112 * configure: Re-generated.
7113 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7114 ppc64_64bit_inferior_p
7115
7116 2015-01-14 Yao Qi <yao@codesourcery.com>
7117
7118 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7119 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7120 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7121 (PT_ORIG_R3, PT_TRAP): Likewise.
7122 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7123 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7124 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7125
7126 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7127
7128 * i387-fp.c (i387_cache_to_xsave): In look over
7129 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7130 zmmh_low_space field by use of zmmh_high_space.
7131
7132 2015-01-09 Pedro Alves <palves@redhat.com>
7133
7134 * linux-low.c (step_over_bkpt): Move higher up in the file.
7135 (handle_extended_wait): Don't store the stop_pc here.
7136 (get_stop_pc): Adjust comments and rename to ...
7137 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7138 stopped for a software breakpoint or hardware breakpoint.
7139 (thread_still_has_status_pending_p): New function.
7140 (status_pending_p_callback): Use
7141 thread_still_has_status_pending_p. If the event is no longer
7142 interesting, resume the LWP.
7143 (handle_tracepoints): Add assert.
7144 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7145 (wstatus_maybe_breakpoint): New function.
7146 (cancel_breakpoint): Delete function.
7147 (check_stopped_by_watchpoint): New function, factored out from
7148 linux_low_filter_event.
7149 (lp_status_maybe_breakpoint): Delete function.
7150 (linux_low_filter_event): Remove filter_ptid argument.
7151 Leave thread group exits pending here. Store the LWP's stop PC.
7152 Always leave events pending.
7153 (linux_wait_for_event_filtered): Pull all events out of the
7154 kernel, and leave them all pending.
7155 (count_events_callback, select_event_lwp_callback): Consider all
7156 events.
7157 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7158 (select_event_lwp): Only give preference to the stepping LWP in
7159 all-stop mode. Adjust comments.
7160 (ignore_event): New function.
7161 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7162 references to cancel_breakpoints. Adjust to renames. Also give
7163 equal priority to all LWPs that have had events in non-stop mode.
7164 If reporting a software breakpoint event, unadjust the LWP's PC.
7165 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7166 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7167 Adjust.
7168 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7169 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7170 (linux_stopped_by_watchpoint): Adjust.
7171 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7172 * linux-low.h (enum lwp_stop_reason): New.
7173 (struct lwp_info) <stop_pc>: Adjust comment.
7174 <stopped_by_watchpoint>: Delete field.
7175 <stop_reason>: New field.
7176 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7177 * mem-break.c (software_breakpoint_inserted_here)
7178 (hardware_breakpoint_inserted_here): New function.
7179 * mem-break.h (software_breakpoint_inserted_here)
7180 (hardware_breakpoint_inserted_here): Declare.
7181 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7182 (cancel_breakpoints): Delete.
7183 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7184 (upload_fast_traceframes): Remove references to
7185 cancel_breakpoints.
7186
7187 2015-01-09 Pedro Alves <palves@redhat.com>
7188
7189 * thread-db.c (find_new_threads_callback): Ignore thread if the
7190 kernel thread ID is -1.
7191
7192 2015-01-09 Pedro Alves <palves@redhat.com>
7193
7194 * linux-low.c (linux_attach_fail_reason_string): Move to
7195 nat/linux-ptrace.c, and rename.
7196 (linux_attach_lwp): Update comment.
7197 (attach_proc_task_lwp_callback): New function.
7198 (linux_attach): Adjust to rename and use
7199 linux_proc_attach_tgid_threads.
7200 (linux_attach_fail_reason_string): Delete declaration.
7201
7202 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7203
7204 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7205 * server.c (gdbserver_version): Likewise.
7206
7207 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7208
7209 * remote-utils.c: Include ctype.h.
7210 (input_interrupt): Explicitly handle the case when the char
7211 received is the NUL byte. Improve the printing of non-ASCII
7212 characters.
7213
7214 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7215
7216 * linux-low.c (linux_low_filter_event): Update call to
7217 linux_enable_event_reporting following the addition of
7218 a new parameter to that function.
7219
7220 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7221
7222 PR server/17457
7223 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7224 (AARCH64_FPCR_REGNO): Likewise.
7225 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7226 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7227 (aarch64_store_fpregset): Likewise.
7228
7229 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7230
7231 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7232 Remove FIXME comment about assumption about N.
7233
7234 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7235
7236 * configure.ac: If large-file support is disabled in GDBserver,
7237 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7238 * configure: Regenerate.
7239
7240 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7241
7242 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7243 warning upon ENODATA from ptrace.
7244 * linux-s390-low.c (s390_store_tdb): New.
7245 (s390_regsets): Add regset for NT_S390_TDB.
7246
7247 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7248
7249 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7250 without a fill_function.
7251 * linux-s390-low.c (s390_fill_last_break): Remove.
7252 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7253 (s390_arch_setup): Use regset's size instead of fill_function for
7254 loop end condition.
7255
7256 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7257
7258 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7259 the regset's store function when ptrace returned an error.
7260 * regcache.c (get_thread_regcache): Invalidate register cache
7261 before fetching inferior's registers.
7262
7263 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7264
7265 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7266 while-loop as for-loop.
7267 (regsets_store_inferior_registers): Likewise.
7268
7269 2014-11-28 Yao Qi <yao@codesourcery.com>
7270
7271 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7272 * config.in, configure: Re-generate.
7273 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7274 is defined.
7275
7276 2014-11-21 Yao Qi <yao@codesourcery.com>
7277
7278 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7279 (AC_CHECK_HEADERS): Remove malloc.h.
7280 * configure: Re-generated.
7281 * config.in: Re-generated.
7282 * server.h: Don't include alloca.h and malloc.h.
7283 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7284 Don't include malloc.h.
7285
7286 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7287
7288 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7289 corresponding ERRNO check in same block.
7290
7291 2014-11-12 Pedro Alves <palves@redhat.com>
7292
7293 * server.c (cont_thread): Update comment.
7294 (start_inferior, attach_inferior): No longer clear cont_thread.
7295 (handle_v_cont): No longer set cont_thread.
7296 (captured_main): Clear cont_thread each time a GDB connects.
7297
7298 2014-11-12 Pedro Alves <palves@redhat.com>
7299
7300 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7301 thread, and don't resume all threads if the Hc thread has exited.
7302
7303 2014-11-12 Pedro Alves <palves@redhat.com>
7304
7305 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7306 the process group instead of to a specific LWP.
7307
7308 2014-10-15 Pedro Alves <palves@redhat.com>
7309
7310 PR server/17487
7311 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7312 parameter.
7313 (arm_set_thread_context): Delete.
7314 (the_low_target): Adjust.
7315 * win32-i386-low.c (debug_registers_changed)
7316 (debug_registers_used): Delete.
7317 (update_debug_registers_callback): New function.
7318 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7319 needing to update their debug registers.
7320 (win32_get_current_dr): New function.
7321 (x86_dr_low_get_addr, x86_dr_low_get_control)
7322 (x86_dr_low_get_status): Fetch the debug register from the thread
7323 record's context.
7324 (i386_initial_stuff): Adjust.
7325 (i386_get_thread_context): Remove current_event parameter. Don't
7326 clear debug_registers_changed nor copy DR values to
7327 debug_reg_state.
7328 (i386_set_thread_context): Delete.
7329 (i386_prepare_to_resume): New function.
7330 (i386_thread_added): Mark the thread as needing to update irs
7331 debug registers.
7332 (the_low_target): Remove i386_set_thread_context and install
7333 i386_prepare_to_resume.
7334 * win32-low.c (win32_get_thread_context): Adjust.
7335 (win32_set_thread_context): Use SetThreadContext
7336 directly.
7337 (win32_prepare_to_resume): New function.
7338 (win32_require_context): New function, factored out from ...
7339 (thread_rec): ... this.
7340 (continue_one_thread): Call win32_prepare_to_resume on each thread
7341 we're about to continue.
7342 (win32_resume): Call win32_prepare_to_resume on the event thread.
7343 * win32-low.h (struct win32_thread_info)
7344 <debug_registers_changed>: New field.
7345 (struct win32_target_ops): Change prototype of set_thread_context,
7346 delete set_thread_context and add prepare_to_resume.
7347 (win32_require_context): New declaration.
7348
7349 2014-10-08 Gary Benson <gbenson@redhat.com>
7350
7351 * server.h: Do not include common-exceptions.h.
7352
7353 2014-10-08 Gary Benson <gbenson@redhat.com>
7354
7355 * server.h: Do not include cleanups.h.
7356
7357 2014-09-30 James Hogan <james.hogan@imgtec.com>
7358
7359 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7360 mips64-dsp-linux.c.
7361
7362 2014-09-23 Yao Qi <yao@codesourcery.com>
7363
7364 * linux-low.c (lp_status_maybe_breakpoint): New function.
7365 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7366 (count_events_callback): Likewise.
7367 (select_event_lwp_callback): Likewise.
7368 (cancel_breakpoints_callback): Likewise.
7369
7370 2014-09-19 Don Breazeal <donb@codesourcery.com>
7371
7372 * linux-low.c (handle_extended_wait): Call
7373 linux_ptrace_get_extended_event.
7374 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7375 linux_is_extended_waitstatus.
7376
7377 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7378
7379 * Makefile.in (CPPFLAGS): Define.
7380 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7381 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7382
7383 2014-09-16 Gary Benson <gbenson@redhat.com>
7384
7385 * inferiors.h (current_inferior): Renamed as...
7386 (current_thread): New variable. All uses updated.
7387 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7388 (maybe_move_out_of_jump_pad): Likewise.
7389 (cancel_breakpoint): Likewise.
7390 (linux_low_filter_event): Likewise.
7391 (wait_for_sigstop): Likewise.
7392 (linux_resume_one_lwp): Likewise.
7393 (need_step_over_p): Likewise.
7394 (start_step_over): Likewise.
7395 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7396 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7397 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7398 and save_inferior as saved_thread.
7399 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7400 saved_thread.
7401 (regcache_invalidate_thread): Likewise.
7402 * remote-utils.c (prepare_resume_reply): Likewise.
7403 * thread-db.c (thread_db_get_tls_address): Likewise.
7404 (disable_thread_event_reporting): Likewise.
7405 (remove_thread_event_breakpoints): Likewise.
7406 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7407 as saved_thread.
7408 * target.h (set_desired_inferior): Renamed as...
7409 (set_desired_thread): New declaration. All uses updated.
7410 * server.c (myresume): Updated comment to reference thread instead
7411 of inferior.
7412 (handle_serial_event): Likewise.
7413 (handle_target_event): Likewise.
7414
7415 2014-09-12 Tom Tromey <tromey@redhat.com>
7416 Gary Benson <gbenson@redhat.com>
7417
7418 * regcache.h: Include common-regcache.h.
7419 (regcache_read_pc): Don't declare.
7420 * regcache.c (get_thread_regcache_for_ptid): New function.
7421
7422 2014-09-11 Tom Tromey <tromey@redhat.com>
7423 Gary Benson <gbenson@redhat.com>
7424
7425 * symbol.c: New file.
7426 * Makefile.in (SFILES): Add symbol.c.
7427 (OBS): Add symbol.o.
7428
7429 2014-09-11 Gary Benson <gbenson@redhat.com>
7430
7431 * target.c (target_stop_ptid, target_continue_ptid): New
7432 functions.
7433
7434 2014-09-11 Tom Tromey <tromey@redhat.com>
7435 Gary Benson <gbenson@redhat.com>
7436
7437 * target.h: Include target/target.h.
7438 * target.c (target_read_memory, target_read_uint32)
7439 (target_write_memory): New functions.
7440
7441 2014-09-11 Gary Benson <gbenson@redhat.com>
7442
7443 * server.h (debug_hw_points): Don't declare.
7444 * server.c (debug_hw_points): Don't define. Replace all uses
7445 with show_debug_regs.
7446 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7447 all uses with show_debug_regs.
7448
7449 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7450
7451 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7452 endianness into account.
7453 (ppc_supply_ptrace_register): Likewise.
7454
7455 2014-09-03 James Hogan <james.hogan@imgtec.com>
7456
7457 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7458 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7459
7460 2014-09-03 Gary Benson <gbenson@redhat.com>
7461
7462 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7463 ALL_DEBUG_ADDRESS_REGISTERS.
7464
7465 2014-09-02 Gary Benson <gbenson@redhat.com>
7466
7467 * i386-low.h: Renamed as...
7468 * x86-low.h: New file. All type, function and variable name
7469 prefixes changed from "i386_" to "x86_". All references updated.
7470 * i386-low.c: Renamed as...
7471 * x86-low.c: New file. All type, function and variable name
7472 prefixes changed from "i386_" to "x86_". All references updated.
7473
7474 2014-09-02 Gary Benson <gbenson@redhat.com>
7475
7476 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7477 (x86_linux_new_thread): Likewise.
7478
7479 2014-08-29 Gary Benson <gbenson@redhat.com>
7480
7481 * server.h (setjmp.h): Do not include.
7482 (toplevel): Do not declare.
7483 (common-exceptions.h): Include.
7484 (cleanups.h): Likewise.
7485 * server.c (toplevel): Do not define.
7486 (exit_code): New static global.
7487 (detach_or_kill_for_exit_cleanup): New function.
7488 (main): New function. Original main renamed to...
7489 (captured_main): New function.
7490 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7491
7492 2014-08-29 Gary Benson <gbenson@redhat.com>
7493
7494 * Makefile.in (SFILES): Add common/common-exceptions.c.
7495 (OBS): Add common-exceptions.o.
7496 (common-exceptions.o): New rule.
7497 * utils.c (prepare_to_throw_exception): New function.
7498
7499 2014-08-29 Gary Benson <gbenson@redhat.com>
7500
7501 * config.in: Regenerate.
7502 * configure: Likewise.
7503
7504 2014-08-29 Gary Benson <gbenson@redhat.com>
7505
7506 * Makefile.in (SFILES): Add common/cleanups.c.
7507 (OBS): cleanups.o.
7508 (cleanups.o): New rule.
7509
7510 2014-08-29 Gary Benson <gbenson@redhat.com>
7511
7512 * utils.c (internal_vwarning): New function.
7513
7514 2014-08-28 Gary Benson <gbenson@redhat.com>
7515
7516 * utils.h (fatal): Remove declaration.
7517 * utils.c (fatal): Remove function.
7518
7519 2014-08-28 Gary Benson <gbenson@redhat.com>
7520
7521 * tracepoint.c (gdb_agent_init): Replace fatal with
7522 perror_with_name.
7523 (initialize_tracepoint): Likewise.
7524
7525 2014-08-28 Gary Benson <gbenson@redhat.com>
7526
7527 * remote-utils.c (remote_prepare): Replace fatal with error.
7528
7529 2014-08-28 Gary Benson <gbenson@redhat.com>
7530
7531 * linux-low.c (linux_async): Replace fatal with warning.
7532 Tidy up and return.
7533 (linux_start_non_stop): Return -1 if linux_async failed.
7534
7535 2014-08-28 Gary Benson <gbenson@redhat.com>
7536
7537 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7538 gdb_assert.
7539 (i386_dr_low_get_addr): Remove vague comment.
7540 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7541 gdb_assert.
7542
7543 2014-08-28 Gary Benson <gbenson@redhat.com>
7544
7545 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7546 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7547 internal_error.
7548 (linux_resume_one_lwp): Likewise.
7549 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7550 gdb_assert.
7551 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7552 with internal_error.
7553 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7554 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7555 (find_register_by_name): Replace fatal with internal_error.
7556 (find_regno): Likewise.
7557 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7558 * thread-db.c (thread_db_create_event): Likewise.
7559 (thread_db_load_search): Likewise.
7560 (try_thread_db_load_1): Likewise.
7561 * tracepoint.c (get_jump_space_head): Replace fatal with
7562 internal_error.
7563 (claim_trampoline_space): Likewise.
7564 (have_fast_tracepoint_trampoline_buffer): Likewise.
7565 (cmd_qtstart): Likewise.
7566 (stop_tracing): Likewise.
7567 (fast_tracepoint_collecting): Likewise.
7568 (target_malloc): Likewise.
7569 (download_tracepoint): Likewise.
7570 (download_trace_state_variables): Replace check with gdb_assert.
7571 (upload_fast_traceframes): Replace fatal with internal_error.
7572
7573 2014-08-19 Tom Tromey <tromey@redhat.com>
7574 Gary Benson <gbenson@redhat.com>
7575
7576 * Makefile.in (SFILES): Add common/common-debug.c.
7577 (OBS): Add common-debug.o.
7578 (common-debug.o): New rule.
7579 * debug.h (debug_printf): Don't declare.
7580 * debug.c (debug_printf): Renamed and rewritten as...
7581 (debug_vprintf): New function.
7582
7583 2014-08-19 Gary Benson <gbenson@redhat.com>
7584
7585 * utils.h: Do not include print-utils.h.
7586
7587 2014-08-19 Tom Tromey <tromey@redhat.com>
7588 Gary Benson <gbenson@redhat.com>
7589
7590 * server.h: Add static assertion.
7591 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7592
7593 2014-08-19 Tom Tromey <tromey@redhat.com>
7594 Gary Benson <gbenson@redhat.com>
7595
7596 * Makefile.in (SFILES): Add common/errors.c.
7597 (OBS): Add errors.o.
7598 (IPA_OBS): Add errors-ipa.o.
7599 (errors.o): New rule.
7600 (errors-ipa.o): Likewise.
7601 * utils.h (perror_with_name, error, warning): Don't declare.
7602 * utils.c (warning): Renamed and rewritten as...
7603 (vwarning): New function.
7604 (error): Renamed and rewritten as...
7605 (verror): New function.
7606 (internal_error): Renamed and rewritten as...
7607 (internal_verror): New function.
7608
7609 2014-08-07 Gary Benson <gbenson@redhat.com>
7610
7611 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7612 * configure: Regenerate.
7613 * config.in: Likewise.
7614 * server.h: Do not include errno.h.
7615 * event-loop.c: Likewise.
7616 * hostio-errno.c: Likewise.
7617 * linux-low.c: Likewise.
7618 * remote-utils.c: Likewise.
7619 * spu-low.c: Likewise.
7620 * utils.c: Likewise.
7621 * gdbreplay.c: Unconditionally include errno.h.
7622
7623 2014-08-07 Gary Benson <gbenson@redhat.com>
7624
7625 * server.h: Do not include string.h.
7626 * event-loop.c: Likewise.
7627 * linux-low.c: Likewise.
7628 * regcache.c: Likewise.
7629 * remote-utils.c: Likewise.
7630 * spu-low.c: Likewise.
7631 * utils.c: Likewise.
7632
7633 2014-08-07 Gary Benson <gbenson@redhat.com>
7634
7635 * server.h: Do not include gdb_assert.h.
7636
7637 2014-08-07 Gary Benson <gbenson@redhat.com>
7638
7639 * server.h: Do not include common-utils.h.
7640
7641 2014-08-07 Gary Benson <gbenson@redhat.com>
7642
7643 * server.h: Do not include ptid.h.
7644 * notif.h: Likewise.
7645
7646 2014-08-07 Gary Benson <gbenson@redhat.com>
7647
7648 * server.h: Do not include gdb_locale.h.
7649
7650 2014-08-07 Gary Benson <gbenson@redhat.com>
7651
7652 * server.h: Do not include gdb/signals.h.
7653 * win32-low.c: Likewise.
7654
7655 2014-08-07 Gary Benson <gbenson@redhat.com>
7656
7657 * server.h: Do not include pathmax.h.
7658
7659 2014-08-07 Gary Benson <gbenson@redhat.com>
7660
7661 * server.h: Do not include libiberty.h.
7662 * linux-bfin-low.c: Likewise.
7663
7664 2014-08-07 Gary Benson <gbenson@redhat.com>
7665
7666 * server.h: Do not include ansidecl.h.
7667
7668 2014-08-07 Gary Benson <gbenson@redhat.com>
7669
7670 * linux-x86-low.c: Do not include stddef.h.
7671 * lynx-ppc-low.c: Likewise.
7672 * tracepoint.c: Likewise.
7673
7674 2014-08-07 Gary Benson <gbenson@redhat.com>
7675
7676 * server.h: Do not include stdarg.h.
7677 * nto-low.c: Likewise.
7678
7679 2014-08-07 Gary Benson <gbenson@redhat.com>
7680
7681 * server.h: Do not include stdlib.h.
7682 * inferiors.c: Likewise.
7683 * linux-low.c: Likewise.
7684 * regcache.c: Likewise.
7685 * spu-low.c: Likewise.
7686 * tracepoint.c: Likewise.
7687 * utils.c: Likewise.
7688
7689 2014-08-07 Gary Benson <gbenson@redhat.com>
7690
7691 * server.h: Do not include stdio.h.
7692 * linux-low.c: Likewise.
7693 * remote-utils.c: Likewise.
7694 * spu-low.c: Likewise.
7695 * utils.c: Likewise.
7696 * wincecompat.c: Likewise.
7697
7698 2014-08-06 Gary Benson <gbenson@redhat.com>
7699
7700 * regcache.c (init_register_cache): Move conditionals inside if.
7701
7702 2014-08-06 Gary Benson <gbenson@redhat.com>
7703
7704 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7705
7706 2014-07-31 Gary Benson <gbenson@redhat.com>
7707
7708 * ax.h: Do not include server.h.
7709 * gdbthread.h: Likewise.
7710 * lynx-low.h: Likewise.
7711 * notif.h: Likewise.
7712
7713 2014-07-30 Gary Benson <gbenson@redhat.com>
7714
7715 * server.h: Include common-defs.h.
7716 Do not include config.h or build-gnulib-gdbserver/config.h.
7717
7718 2014-07-30 Gary Benson <gbenson@redhat.com>
7719
7720 * hostio-errno.c: Move server.h to top of includes list.
7721 * inferiors.c: Likewise.
7722 * linux-x86-low.c: Likewise.
7723 * notif.c: Include server.h.
7724
7725 2014-07-24 Tom Tromey <tromey@redhat.com>
7726 Gary Benson <gbenson@redhat.com>
7727
7728 * server.h (CORE_ADDR): Now unsigned.
7729
7730 2014-07-16 Pedro Alves <palves@redhat.com>
7731
7732 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7733
7734 2014-07-15 Pedro Alves <palves@redhat.com>
7735
7736 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7737 copy.
7738
7739 2014-07-11 Pedro Alves <palves@redhat.com>
7740
7741 * linux-low.c (kill_wait_lwp): New function, based on
7742 kill_one_lwp_callback, but use my_waitpid directly.
7743 (kill_one_lwp_callback, linux_kill): Use it.
7744
7745 2014-06-23 Pedro Alves <palves@redhat.com>
7746
7747 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7748 before setting DR0..DR3.
7749
7750 2014-06-20 Gary Benson <gbenson@redhat.com>
7751
7752 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7753 * configure: Regenerated.
7754 * config.in: Likewise.
7755
7756 2014-06-20 Gary Benson <gbenson@redhat.com>
7757
7758 * Makefile.in (SFILES): Update locations for files moved
7759 from common to nat.
7760 (object file files): Reordered.
7761
7762 2014-06-20 Gary Benson <gbenson@redhat.com>
7763
7764 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7765 (i386_dr_low_set_addr): Likewise.
7766 (i386_dr_low_get_addr): Likewise.
7767 (i386_dr_low_can_set_control): Likewise.
7768 (i386_dr_low_set_control): Likewise.
7769 (i386_dr_low_get_control): Likewise.
7770 (i386_dr_low_get_status): Likewise.
7771 (i386_get_debug_register_length): Likewise.
7772 * linux-x86-low.c (i386_dr_low_set_addr):
7773 Changed signature. Made static.
7774 (i386_dr_low_get_addr): Likewise.
7775 (i386_dr_low_set_control): Likewise.
7776 (i386_dr_low_get_control): Likewise.
7777 (i386_dr_low_get_status): Likewise.
7778 (i386_dr_low): New global variable.
7779 * win32-i386-low.c (i386_dr_low_set_addr):
7780 Changed signature. Made static.
7781 (i386_dr_low_get_addr): Likewise.
7782 (i386_dr_low_set_control): Likewise.
7783 (i386_dr_low_get_control): Likewise.
7784 (i386_dr_low_get_status): Likewise.
7785 (i386_dr_low): New global variable.
7786
7787 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7788
7789 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7790 * Makefile.in (AR, AR_FLAGS): Define.
7791 * configure: Regenerate.
7792
7793 2014-06-19 Gary Benson <gbenson@redhat.com>
7794
7795 * Makefile.in (i386-dregs.o): New rule.
7796 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7797 * i386-low.c (target.h): Remove include.
7798 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7799 (DR_CONTROL_SHIFT): Likewise.
7800 (DR_CONTROL_SIZE): Likewise.
7801 (DR_RW_EXECUTE): Likewise.
7802 (DR_RW_WRITE): Likewise.
7803 (DR_RW_READ): Likewise.
7804 (DR_RW_IORW): Likewise.
7805 (DR_LEN_1): Likewise.
7806 (DR_LEN_2): Likewise.
7807 (DR_LEN_4): Likewise.
7808 (DR_LEN_8): Likewise.
7809 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7810 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7811 (DR_ENABLE_SIZE): Likewise.
7812 (DR_LOCAL_SLOWDOWN): Likewise.
7813 (DR_GLOBAL_SLOWDOWN): Likewise.
7814 (DR_CONTROL_RESERVED): Likewise.
7815 (I386_DR_CONTROL_MASK): Likewise.
7816 (I386_DR_VACANT): Likewise.
7817 (I386_DR_LOCAL_ENABLE): Likewise.
7818 (I386_DR_GLOBAL_ENABLE): Likewise.
7819 (I386_DR_DISABLE): Likewise.
7820 (I386_DR_SET_RW_LEN): Likewise.
7821 (I386_DR_GET_RW_LEN): Likewise.
7822 (I386_DR_WATCH_HIT): Likewise.
7823 (i386_wp_op_t): Likewise.
7824 (i386_show_dr): Likewise.
7825 (i386_length_and_rw_bits): Likewise.
7826 (i386_insert_aligned_watchpoint): Likewise.
7827 (i386_remove_aligned_watchpoint): Likewise.
7828 (i386_handle_nonaligned_watchpoint): Likewise.
7829 i386_update_inferior_debug_regs(): Likewise.
7830 (i386_dr_insert_watchpoint): Likewise.
7831 (i386_dr_remove_watchpoint): Likewise.
7832 (i386_dr_region_ok_for_watchpoint): Likewise.
7833 (i386_dr_stopped_data_address): Likewise.
7834 (i386_dr_stopped_by_watchpoint): Likewise.
7835
7836 2014-06-19 Gary Benson <gbenson@redhat.com>
7837
7838 * i386-low.c (i386_dr_show): Renamed to
7839 i386_show_dr and made static. All uses updated.
7840 (i386_dr_length_and_rw_bits): Renamed to
7841 i386_length_and_rw_bits and made static.
7842 All uses updated.
7843 (i386_dr_insert_aligned_watchpoint): Renamed to
7844 i386_insert_aligned_watchpoint and made static.
7845 All uses updated.
7846 (i386_dr_remove_aligned_watchpoint): Renamed to
7847 i386_remove_aligned_watchpoint and made static.
7848 All uses updated.
7849 (i386_dr_update_inferior_debug_regs): Renamed to
7850 i386_update_inferior_debug_regs and made static.
7851 All uses updated.
7852
7853 2014-06-18 Gary Benson <gbenson@redhat.com>
7854
7855 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7856 (i386_dr_low_can_set_control): Likewise.
7857 (i386_get_debug_register_length): Likewise.
7858 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7859 (i386_dr_low_can_set_control): Likewise.
7860 (i386_get_debug_register_length): Likewise.
7861
7862 2014-06-17 Gary Benson <gbenson@redhat.com>
7863
7864 * i386-low.h (i386-dregs.h): New include.
7865 (DR_FIRSTADDR): Now in i386-dregs.h.
7866 (DR_LASTADDR): Likewise.
7867 (DR_NADDR): Likewise.
7868 (DR_STATUS): Likewise.
7869 (DR_CONTROL): Likewise.
7870 (i386_debug_reg_state): Likewise.
7871 (i386_dr_insert_watchpoint): Likewise.
7872 (i386_dr_remove_watchpoint): Likewise.
7873 (i386_dr_region_ok_for_watchpoint): Likewise.
7874 (i386_dr_stopped_data_address): Likewise.
7875 (i386_dr_stopped_by_watchpoint): Likewise.
7876 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7877
7878 2014-06-18 Gary Benson <gbenson@redhat.com>
7879
7880 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7881 i386_dr_insert_watchpoint.
7882 (i386_low_remove_watchpoint): Renamed to
7883 i386_dr_remove_watchpoint.
7884 (i386_low_region_ok_for_watchpoint): Renamed to
7885 i386_dr_region_ok_for_watchpoint.
7886 (i386_low_stopped_data_address): Renamed to
7887 i386_dr_stopped_data_address.
7888 (i386_low_stopped_by_watchpoint): Renamed to
7889 i386_dr_stopped_by_watchpoint.
7890 * i386-low.c (i386_show_dr): Renamed to
7891 i386_dr_show and made nonstatic. All uses updated.
7892 (i386_length_and_rw_bits): Renamed to
7893 i386_dr_length_and_rw_bits and made nonstatic.
7894 All uses updated.
7895 (i386_insert_aligned_watchpoint): Renamed to
7896 i386_dr_insert_aligned_watchpoint and made nonstatic.
7897 All uses updated.
7898 (i386_remove_aligned_watchpoint): Renamed to
7899 i386_dr_remove_aligned_watchpoint and made nonstatic.
7900 All uses updated.
7901 (i386_update_inferior_debug_regs): Renamed to
7902 i386_dr_update_inferior_debug_regs and made nonstatic.
7903 All uses updated.
7904 (i386_low_insert_watchpoint): Renamed to
7905 i386_dr_insert_watchpoint. All uses updated.
7906 (i386_low_remove_watchpoint): Renamed to
7907 i386_dr_remove_watchpoint. All uses updated.
7908 (i386_low_region_ok_for_watchpoint): Renamed to
7909 i386_dr_region_ok_for_watchpoint. All uses updated.
7910 (i386_low_stopped_data_address): Renamed to
7911 i386_dr_stopped_data_address. All uses updated.
7912 (i386_low_stopped_by_watchpoint): Renamed to
7913 i386_dr_stopped_by_watchpoint. All uses updated.
7914
7915 2014-06-18 Gary Benson <gbenson@redhat.com>
7916
7917 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7918 (i386_dr_low_can_set_control): Likewise.
7919 (i386_insert_aligned_watchpoint): New check.
7920
7921 2014-06-18 Gary Benson <gbenson@redhat.com>
7922
7923 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7924 Renamed to state.
7925
7926 2014-06-18 Gary Benson <gbenson@redhat.com>
7927
7928 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7929 instead of fatal and error.
7930 (i386_handle_nonaligned_watchpoint): Likewise.
7931
7932 2014-06-18 Gary Benson <gbenson@redhat.com>
7933
7934 * i386-low.c (i386_get_debug_register_length): New macro.
7935 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7936 (i386_show_dr): Use debug_printf instead of fprintf. Use
7937 phex to format values.
7938
7939 2014-06-18 Gary Benson <gbenson@redhat.com>
7940
7941 * i386-low.h: Comment changes.
7942 * i386-low.c: Likewise.
7943
7944 2014-06-18 Gary Benson <gbenson@redhat.com>
7945
7946 * i386-low.c: Whitespace changes.
7947
7948 2014-06-12 Tom Tromey <tromey@redhat.com>
7949
7950 * utils.c (freeargv): Remove.
7951
7952 2014-06-12 Tom Tromey <tromey@redhat.com>
7953
7954 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7955 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7956 (parse_debug_format_options): Likewise.
7957 (gdbserver_usage): Likewise.
7958 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7959 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7960 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7961 against libiberty.
7962 ($(LIBGNU)): Depend on libiberty.
7963 (all-lib): Recurse into all subdirs.
7964 (install-only): Invoke "install" target in subdirs.
7965 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7966 targets.
7967 * configure: Rebuild.
7968 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7969 for vasprintf, vsnprintf, or gettimeofday.
7970 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7971 srv_tgtobj.
7972
7973 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7974
7975 * development.sh: Delete.
7976 * Makefile.in (config.status): Adjust dependency on development.sh.
7977 * configure.ac: Adjust development.sh source call.
7978 * configure: Regenerate.
7979
7980 2014-06-02 Pedro Alves <palves@redhat.com>
7981
7982 * ax.c (gdb_free_agent_expr): New function.
7983 * ax.h (gdb_free_agent_expr): New declaration.
7984 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7985 list.
7986 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7987 static.
7988 (clear_breakpoint_conditions_and_commands): New function.
7989 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7990 (clear_breakpoint_conditions_and_commands): New declaration.
7991
7992 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7993
7994 * linux-aarch64-low.c (asm/ptrace.h): Include.
7995
7996 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7997
7998 Fix TLS access for -static -pthread.
7999 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8000 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8001 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8002
8003 2014-05-20 Pedro Alves <palves@redhat.com>
8004
8005 * linux-aarch64-low.c (aarch64_insert_point)
8006 (aarch64_remove_point): No longer check whether the type is
8007 supported here. Adjust to new interface.
8008 (the_low_target): Install aarch64_supports_z_point_type as
8009 supports_z_point_type method.
8010 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8011 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8012 instead of a Z packet char. Adjust.
8013 (arm_supports_z_point_type): New function.
8014 (arm_insert_point, arm_remove_point): Adjust to new interface.
8015 (the_low_target): Install arm_supports_z_point_type.
8016 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8017 (cris_insert_point, cris_remove_point): Adjust to new interface.
8018 Don't check whether the type is supported here.
8019 (the_low_target): Install cris_supports_z_point_type.
8020 * linux-low.c (linux_supports_z_point_type): New function.
8021 (linux_insert_point, linux_remove_point): Adjust to new interface.
8022 * linux-low.h (struct linux_target_ops) <insert_point,
8023 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8024 raw_breakpoint pointer parameter.
8025 <supports_z_point_type>: New method.
8026 * linux-mips-low.c (mips_supports_z_point_type): New function.
8027 (mips_insert_point, mips_remove_point): Adjust to new interface.
8028 Use mips_supports_z_point_type.
8029 (the_low_target): Install mips_supports_z_point_type.
8030 * linux-ppc-low.c (the_low_target): Install NULL as
8031 supports_z_point_type method.
8032 * linux-s390-low.c (the_low_target): Install NULL as
8033 supports_z_point_type method.
8034 * linux-sparc-low.c (the_low_target): Install NULL as
8035 supports_z_point_type method.
8036 * linux-x86-low.c (x86_supports_z_point_type): New function.
8037 (x86_insert_point): Adjust to new insert_point interface. Use
8038 insert_memory_breakpoint. Adjust to new
8039 i386_low_insert_watchpoint interface.
8040 (x86_remove_point): Adjust to remove_point interface. Use
8041 remove_memory_breakpoint. Adjust to new
8042 i386_low_remove_watchpoint interface.
8043 (the_low_target): Install x86_supports_z_point_type.
8044 * lynx-low.c (lynx_target_ops): Install NULL as
8045 supports_z_point_type callback.
8046 * nto-low.c (nto_supports_z_point_type): New.
8047 (nto_insert_point, nto_remove_point): Adjust to new interface.
8048 (nto_target_ops): Install nto_supports_z_point_type.
8049 * mem-break.c: Adjust intro comment.
8050 (struct raw_breakpoint) <raw_type, size>: New fields.
8051 <inserted>: Update comment.
8052 <shlib_disabled>: Delete field.
8053 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8054 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8055 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8056 (raw_bkpt_type_to_target_hw_bp_type): New function.
8057 (find_enabled_raw_code_breakpoint_at): New function.
8058 (find_raw_breakpoint_at): New type and size parameters. Use them.
8059 (insert_memory_breakpoint): New function, based off
8060 set_raw_breakpoint_at.
8061 (remove_memory_breakpoint): New function.
8062 (set_raw_breakpoint_at): Reimplement.
8063 (set_breakpoint): New, based on set_breakpoint_at.
8064 (set_breakpoint_at): Reimplement.
8065 (delete_raw_breakpoint): Go through the_target->remove_point
8066 instead of assuming memory breakpoints.
8067 (find_gdb_breakpoint_at): Delete.
8068 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8069 (find_gdb_breakpoint): New function.
8070 (set_gdb_breakpoint_at): Delete.
8071 (z_type_supported): New function.
8072 (set_gdb_breakpoint_1): New function, loosely based off
8073 set_gdb_breakpoint_at.
8074 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8075 (delete_gdb_breakpoint_at): Delete.
8076 (delete_gdb_breakpoint_1): New function, loosely based off
8077 delete_gdb_breakpoint_at.
8078 (delete_gdb_breakpoint): New function.
8079 (clear_gdb_breakpoint_conditions): Rename to ...
8080 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8081 breakpoint.
8082 (add_condition_to_breakpoint): Make static.
8083 (add_breakpoint_condition): Take a struct breakpoint pointer
8084 instead of an address. Adjust.
8085 (gdb_condition_true_at_breakpoint): Rename to ...
8086 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8087 z_type parameter.
8088 (gdb_condition_true_at_breakpoint): Reimplement.
8089 (add_breakpoint_commands): Take a struct breakpoint pointer
8090 instead of an address. Adjust.
8091 (gdb_no_commands_at_breakpoint): Rename to ...
8092 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8093 parameter. Return true if no breakpoint was found. Change debug
8094 output.
8095 (gdb_no_commands_at_breakpoint): Reimplement.
8096 (run_breakpoint_commands): Rename to ...
8097 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8098 and change return type to boolean.
8099 (run_breakpoint_commands): New function.
8100 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8101 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8102 breakpoint. Go through the_target->remove_point instead of
8103 assuming memory breakpoint.
8104 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8105 software and hardware breakpoints.
8106 (reinsert_raw_breakpoint): Go through the_target->insert_point
8107 instead of assuming memory breakpoint.
8108 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8109 software and hardware breakpoints.
8110 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8111 Check both software and hardware breakpoints.
8112 (validate_inserted_breakpoint): Assert the breakpoint is a
8113 software breakpoint. Set the inserted flag to -1 instead of
8114 setting shlib_disabled.
8115 (delete_disabled_breakpoints): Adjust.
8116 (validate_breakpoints): Only validate software breakpoints.
8117 Adjust to inserted flag change.
8118 (check_mem_read, check_mem_write): Skip breakpoint types other
8119 than software breakpoints. Adjust to inserted flag change.
8120 * mem-break.h (enum raw_bkpt_type): New enum.
8121 (raw_breakpoint, struct process_info): Forward declare.
8122 (Z_packet_to_target_hw_bp_type): Delete declaration.
8123 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8124 (set_gdb_breakpoint, delete_gdb_breakpoint)
8125 (clear_breakpoint_conditions): New declarations.
8126 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8127 (breakpoint_inserted_here): Update comment.
8128 (add_breakpoint_condition, add_breakpoint_commands): Replace
8129 address parameter with a breakpoint pointer parameter.
8130 (gdb_breakpoint_here): Update comment.
8131 (delete_gdb_breakpoint_at): Delete.
8132 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8133 * server.c (process_point_options): Take a struct breakpoint
8134 pointer instead of an address. Adjust.
8135 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8136 delete_gdb_breakpoint.
8137 * spu-low.c (spu_target_ops): Install NULL as
8138 supports_z_point_type method.
8139 * target.h: Include mem-break.h.
8140 (struct target_ops) <prepare_to_access_memory>: Update comment.
8141 <supports_z_point_type>: New field.
8142 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8143 instead of a char. Also take a raw breakpoint pointer.
8144 * win32-arm-low.c (the_low_target): Install NULL as
8145 supports_z_point_type.
8146 * win32-i386-low.c (i386_supports_z_point_type): New function.
8147 (i386_insert_point, i386_remove_point): Adjust to new interface.
8148 (the_low_target): Install i386_supports_z_point_type.
8149 * win32-low.c (win32_supports_z_point_type): New function.
8150 (win32_insert_point, win32_remove_point): Adjust to new interface.
8151 (win32_target_ops): Install win32_supports_z_point_type.
8152 * win32-low.h (struct win32_target_ops):
8153 <supports_z_point_type>: New method.
8154 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8155 instead of a char. Also take a raw breakpoint pointer.
8156
8157 2014-05-20 Pedro Alves <palves@redhat.com>
8158
8159 * mem-break.h: Include break-common.h.
8160 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8161 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8162 (Z_packet_to_target_hw_bp_type): New declaration.
8163 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8164 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8165 (Z_PACKET_ACCESS_WP): Delete macros.
8166 (Z_packet_to_hw_type): Delete function.
8167 * i386-low.h: Don't include break-common.h here.
8168 (Z_packet_to_hw_type): Delete declaration.
8169 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8170 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8171 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8172 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8173 * linux-aarch64-low.c: Don't include break-common.h here.
8174 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8175 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8176 (Z_packet_to_target_hw_bp_type): Delete function.
8177 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8178 function.
8179 (mips_insert_point, mips_remove_point): Use
8180 Z_packet_to_target_hw_bp_type.
8181
8182 2014-05-20 Pedro Alves <palves@redhat.com>
8183
8184 * linux-aarch64-low.c: Include break-common.h.
8185 (enum target_point_type): Delete.
8186 (Z_packet_to_point_type): Rename to ...
8187 (Z_packet_to_target_hw_bp_type): ... this, and return a
8188 target_hw_bp_type instead.
8189 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8190 instead of an enum target_point_type.
8191 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8192 breakpoint type.
8193 (aarch64_dr_state_insert_one_point)
8194 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8195 (aarch64_handle_aligned_watchpoint)
8196 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8197 Take an enum target_hw_bp_type instead of an enum
8198 target_point_type.
8199 (aarch64_supports_z_point_type): New function.
8200 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8201 use Z_packet_to_target_hw_bp_type.
8202
8203 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8204
8205 * configure.ac: Only use -Werror by default when DEVELOPMENT
8206 is true.
8207 * configure: Regenerate.
8208
8209 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8210
8211 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8212 * linux-x86-low.c (X86_64_USER_REGS): New.
8213 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8214
8215 2014-04-28 Yao Qi <yao@codesourcery.com>
8216
8217 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8218 name.
8219
8220 2014-04-25 Pedro Alves <palves@redhat.com>
8221
8222 PR server/16255
8223 * linux-low.c (linux_attach_fail_reason_string): New function.
8224 (linux_attach_lwp): Delete.
8225 (linux_attach_lwp_1): Rename to ...
8226 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8227 argument. Remove "initial" parameter. Return int instead of
8228 void. Don't error or warn here.
8229 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8230 failure to attach to the tgid. Call warning when failing to
8231 attach to an lwp.
8232 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8233 argument. Remove "initial" parameter. Return int instead of
8234 void. Don't error or warn here.
8235 (linux_attach_fail_reason_string): New declaration.
8236 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8237 interface change. Use linux_attach_fail_reason_string.
8238
8239 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8240 Walfred Tedeschi <walfred.tedeschi@intel.com>
8241
8242 * Makefile.in: Added rules to handle new files
8243 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8244 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8245 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8246 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8247 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8248 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8249 x32-avx512-linux.o.
8250 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8251 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8252 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8253 i386/x32-avx512.xml.
8254 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8255 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8256 i386/x32-avx512-linux.xml.
8257 * i387-fp.c (num_avx512_k_registers): New constant for number
8258 of K registers.
8259 (num_avx512_zmmh_low_registers): New constant for number of
8260 lower ZMM registers (0-15).
8261 (num_avx512_zmmh_high_registers): New constant for number of
8262 higher ZMM registers (16-31).
8263 (num_avx512_ymmh_registers): New contant for number of higher
8264 YMM registers (ymm16-31 added by avx521 on x86_64).
8265 (num_avx512_xmm_registers): New constant for number of higher
8266 XMM registers (xmm16-31 added by AVX512 on x86_64).
8267 (struct i387_xsave): Add space for AVX512 registers.
8268 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8269 Add code to handle AVX512 registers.
8270 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8271 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8272 prototypei from generated file.
8273 (tdesc_amd64_avx512_linux): Likewise.
8274 (init_registers_x32_avx512_linux): Likewise.
8275 (tdesc_x32_avx512_linux): Likewise.
8276 (init_registers_i386_avx512_linux): Likewise.
8277 (tdesc_i386_avx512_linux): Likewise.
8278 (x86_64_regmap): Add AVX512 registers.
8279 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8280 mask.
8281 (initialize_low_arch): Add code to initialize AVX512 registers.
8282
8283 2014-04-23 Pedro Alves <palves@redhat.com>
8284
8285 * mem-break.c (find_gdb_breakpoint_at): Make static.
8286 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8287
8288 2014-04-23 Pedro Alves <palves@redhat.com>
8289
8290 * i386-low.c: Don't include break-common.h here.
8291 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8292 prototype to take target_hw_bp_type as argument instead of a Z
8293 packet char.
8294 * i386-low.h: Include break-common.h here.
8295 (Z_packet_to_hw_type): Declare.
8296 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8297 prototypes.
8298 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8299 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8300 (x86_remove_point): Convert the packet number to a
8301 target_hw_bp_type before calling i386_low_remove_watchpoint.
8302 * win32-i386-low.c (i386_insert_point): Convert the packet number
8303 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8304 (i386_remove_point): Convert the packet number to a
8305 target_hw_bp_type before calling i386_low_remove_watchpoint.
8306
8307 2014-04-23 Pedro Alves <palves@redhat.com>
8308
8309 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8310
8311 2014-04-10 Pedro Alves <palves@redhat.com>
8312
8313 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8314 Check if the condition or command is NULL before checking if the
8315 breakpoint is known. On success, return true.
8316 * mem-break.h (add_breakpoint_condition): Document return.
8317 (add_breakpoint_commands): Add describing comment.
8318 * server.c (skip_to_semicolon): New function.
8319 (process_point_options): Use it.
8320
8321 2014-04-09 Pedro Alves <palves@redhat.com>
8322
8323 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8324 to lwpid_of.
8325
8326 2014-02-27 Pedro Alves <palves@redhat.com>
8327
8328 PR 12702
8329 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8330 macros.
8331 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8332 output.
8333 (last_thread_of_process_p): Take a PID argument instead of a
8334 thread pointer.
8335 (linux_wait_for_lwp): Delete.
8336 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8337 functions.
8338 (linux_low_filter_event): New function, party factored out from
8339 linux_wait_for_event.
8340 (linux_wait_for_event): Rename to ...
8341 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8342 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8343 sigsuspend. Check for zombie leaders.
8344 (linux_wait_for_event): Reimplement as wrapper around
8345 linux_wait_for_event_filtered.
8346 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8347 a normal or signal exit is seen, it's the whole process exiting.
8348 (wait_for_sigstop): No longer a for_each_inferior callback.
8349 Rewrite on top of linux_wait_for_event_filtered.
8350 (stop_all_lwps): Call wait_for_sigstop directly.
8351 * server.c (resume, handle_target_event): Handle
8352 TARGET_WAITKIND_NO_RESUMED.
8353
8354 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8355
8356 * win32-low.c (psapi_get_dll_name,
8357 * win32_CreateToolhelp32Snapshot): Delete.
8358 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8359 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8360 Delete.
8361 (handle_load_dll): Add function description.
8362 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8363
8364 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8365
8366 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8367 Add comment.
8368 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8369 base address when calling win32_add_one_solib.
8370 (handle_load_dll): Delete local variable load_addr.
8371 Remove 0x1000 offset applied to DLL base address when calling
8372 win32_add_one_solib.
8373 (handle_unload_dll): Add comment.
8374
8375 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8376
8377 * win32-low.c (win32_add_all_dlls): Renames
8378 win32_ensure_ntdll_loaded. Rewrite function documentation.
8379 Adjust implementation to always load all DLLs.
8380 Add 0x1000 offset to DLL base address when calling
8381 win32_add_one_solib.
8382 (child_initialization_done): New static global.
8383 (do_initial_child_stuff): Set child_initialization_done to
8384 zero during child initialization, and 1 after. Replace call
8385 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8386 Add comment.
8387 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8388 (handle_unload_dll): Add function documentation.
8389 (get_child_debug_event): Ignore load and unload DLL events
8390 during child initialization.
8391
8392 2014-02-20 Doug Evans <dje@google.com>
8393
8394 Remove global all_lwps.
8395 * inferiors.h (ptid_of): Move here from linux-low.h.
8396 (pid_of, lwpid_of): Ditto.
8397 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8398 parameter is a struct thread_info * now.
8399 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8400 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8401 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8402 directly.
8403 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8404 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8405 * linux-arm-low.c (update_registers_callback): Update, "entry"
8406 parameter is a struct thread_info * now.
8407 Fetch lwpid from current_inferior directly.
8408 (arm_insert_point): Pass &all_threads to find_inferior instead of
8409 &all_lwps.
8410 (arm_remove_point): Ditto.
8411 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8412 (arm_prepare_to_resume): Fetch pid from thread.
8413 (arm_read_description): Fetch lwpid from current_inferior directly.
8414 * linux-low.c (all_lwps): Delete.
8415 (delete_lwp): Delete call to remove_inferior.
8416 (handle_extended_wait): Fetch lwpid from thread.
8417 (add_lwp): Don't set lwp->entry.id. Remove call to
8418 add_inferior_to_list.
8419 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8420 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8421 (kill_one_lwp_callback): Ditto.
8422 (linux_kill): Don't dereference NULL pointer.
8423 Fetch ptid,lwpid from thread.
8424 (get_detach_signal): Fetch ptid from thread.
8425 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8426 Simplify call to regcache_invalidate_thread.
8427 (delete_lwp_callback): Update, "entry" parameter is a
8428 struct thread_info * now. Fetch pid from thread.
8429 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8430 (status_pending_p_callback): Update, "entry" parameter is a
8431 struct thread_info * now. Fetch ptid from thread.
8432 (find_lwp_pid): Update, "entry" parameter is a
8433 struct thread_info * now.
8434 (linux_wait_for_lwp): Fetch pid from thread.
8435 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8436 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8437 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8438 (dequeue_one_deferred_signal): Ditto.
8439 (cancel_breakpoint): Fetch ptid from current_inferior.
8440 (linux_wait_for_event): Pass &all_threads to find_inferior,
8441 not &all_lwps. Fetch ptid, lwpid from thread.
8442 (count_events_callback): Update, "entry" parameter is a
8443 struct thread_info * now.
8444 (select_singlestep_lwp_callback): Ditto.
8445 (select_event_lwp_callback): Ditto.
8446 (cancel_breakpoints_callback): Ditto.
8447 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8448 not &all_lwps.
8449 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8450 (unsuspend_one_lwp): Update, "entry" parameter is a
8451 struct thread_info * now.
8452 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8453 not &all_lwps.
8454 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8455 Fetch lwpid from thread, not lwp.
8456 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8457 Pass &all_threads to find_inferior, not &all_lwps.
8458 (send_sigstop): Fetch lwpid from thread, not lwp.
8459 (send_sigstop_callback): Update, "entry" parameter is a
8460 struct thread_info * now.
8461 (suspend_and_send_sigstop_callback): Ditto.
8462 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8463 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8464 struct thread_info * now.
8465 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8466 from thread, lwp.
8467 (lwp_running): Update, "entry" parameter is a
8468 struct thread_info * now.
8469 (stop_all_lwps): Fetch ptid from thread.
8470 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8471 (linux_resume_one_lwp): Fetch lwpid from thread.
8472 (linux_set_resume_request): Update, "entry" parameter is a
8473 struct thread_info * now. Fetch pid, lwpid from thread.
8474 (resume_status_pending_p): Update, "entry" parameter is a
8475 struct thread_info * now.
8476 (need_step_over_p): Ditto. Fetch lwpid from thread.
8477 (start_step_over): Fetch lwpid from thread.
8478 (linux_resume_one_thread): Update, "entry" parameter is a
8479 struct thread_info * now. Fetch lwpid from thread.
8480 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8481 (proceed_one_lwp): Update, "entry" parameter is a
8482 struct thread_info * now. Fetch lwpid from thread.
8483 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8484 struct thread_info * now.
8485 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8486 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8487 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8488 directly.
8489 (regsets_store_inferior_registers): Ditto.
8490 (fetch_register, store_register): Ditto.
8491 (linux_read_memory, linux_write_memory): Ditto.
8492 (linux_request_interrupt): Ditto.
8493 (linux_read_auxv): Ditto.
8494 (linux_xfer_siginfo): Ditto.
8495 (linux_qxfer_spu): Ditto.
8496 (linux_qxfer_libraries_svr4): Ditto.
8497 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8498 moved to inferiors.h.
8499 (get_lwp): Delete.
8500 (get_thread_lwp): Update.
8501 (struct lwp_info): Delete member "entry". Simplify comment for
8502 member "thread".
8503 (all_lwps): Delete.
8504 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8505 current_inferior directly.
8506 (update_watch_registers_callback): Update, "entry" parameter is a
8507 struct thread_info * now. Fetch pid from thread.
8508 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8509 (mips_insert_point): Fetch lwpid from current_inferior.
8510 Pass &all_threads to find_inferior, not &all_lwps.
8511 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8512 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8513 directly.
8514 (mips_stopped_data_address): Ditto.
8515 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8516 directly.
8517 * linux-tile-low.c (tile_arch_setup): Ditto.
8518 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8519 (update_debug_registers_callback): Update, "entry" parameter is a
8520 struct thread_info * now. Fetch pid from thread.
8521 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8522 Pass &all_threads to find_inferior, not &all_lwps.
8523 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8524 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8525 Pass &all_threads to find_inferior, not &all_lwps.
8526 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8527 (i386_dr_low_get_status): Ditto.
8528 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8529 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8530 (x86_linux_read_description): Ditto.
8531 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8532
8533 2014-02-20 Doug Evans <dje@google.com>
8534
8535 * inferiors.c (get_first_inferior): Fix buglet.
8536
8537 2014-02-19 Doug Evans <dje@google.com>
8538
8539 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8540 * inferiors.c (add_thread): Change result type to struct thread_info *.
8541 All callers updated.
8542 (add_lwp): Call add_thread here instead of in callers.
8543 All callers updated.
8544 * linux-low.h (get_lwp_thread): Rewrite.
8545 (struct lwp_info): New member "thread".
8546
8547 2014-02-19 Doug Evans <dje@google.com>
8548
8549 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8550 All callers updated.
8551
8552 2014-02-19 Doug Evans <dje@google.com>
8553
8554 * inferiors.c (add_thread): Fix whitespace.
8555
8556 2014-02-19 Doug Evans <dje@google.com>
8557
8558 * dll.c (clear_dlls): Replace accessing list implemention details
8559 with API function.
8560 * gdbthread.h (get_first_thread): Declare.
8561 * inferiors.c (for_each_inferior_with_data): New function.
8562 (get_first_thread): New function.
8563 (find_thread_ptid): Simplify.
8564 (get_first_inferior): New function.
8565 (clear_list): Delete.
8566 (one_inferior_p): New function.
8567 (clear_inferior_list): New function.
8568 (clear_inferiors): Update.
8569 * inferiors.h (for_each_inferior_with_data): Declare.
8570 (clear_inferior_list): Declare.
8571 (one_inferior_p): Declare.
8572 (get_first_inferior): Declare.
8573 * linux-low.c (linux_wait_for_event): Replace accessing list
8574 implemention details with API function.
8575 * server.c (target_running): Ditto.
8576 (accumulate_file_name_length): New function.
8577 (emit_dll_description): New function.
8578 (handle_qxfer_libraries): Replace accessing list implemention
8579 details with API function.
8580 (handle_qxfer_threads_worker): New function.
8581 (handle_qxfer_threads_proper): Replace accessing list implemention
8582 details with API function.
8583 (handle_query): Ditto.
8584 (visit_actioned_threads_callback_ftype): New typedef.
8585 (visit_actioned_threads_data): New struct.
8586 (visit_actioned_threads): Rewrite to be find_inferior callback.
8587 (resume): Call find_inferior.
8588 (handle_status): Replace accessing list implemention
8589 details with API function.
8590 (process_serial_event): Replace accessing list implemention details
8591 with API function.
8592 * target.c (set_desired_inferior): Replace accessing list implemention
8593 details with API function.
8594 * tracepoint.c (same_process_p): New function.
8595 (gdb_agent_about_to_close): Replace accessing list implemention
8596 details with API function.
8597 * win32-low.c (child_delete_thread): Replace accessing list
8598 implemention details with API function.
8599 (match_dll_by_basename): New function.
8600 (dll_is_loaded_by_basename): New function.
8601 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8602 details call to dll_is_loaded_by_basename.
8603
8604 2014-02-19 Doug Evans <dje@google.com>
8605
8606 * dll.h (struct dll_info): Add comment.
8607 * gdbthread.h (struct thread_info): Add comment.
8608 (current_ptid): Simplify.
8609 * inferiors.c (add_process): Update.
8610 (remove_process): Update.
8611 * inferiors.h (struct process_info): Rename member "head" to "entry".
8612 * linux-low.c (delete_lwp): Update.
8613 (add_lwp): Update.
8614 (last_thread_of_process_p): Update.
8615 (kill_one_lwp_callback, linux_kill): Update.
8616 (status_pending_p_callback): Update.
8617 (wait_for_sigstop): Update. Simplify read of ptid.
8618 (start_step_over): Update.
8619 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8620 (get_lwp_thread): Update.
8621 (struct lwp_info): Rename member "head" to "entry".
8622 * regcache.h (inferior_list_entry): Delete.
8623 * server.c (kill_inferior_callback): Update.
8624 (detach_or_kill_inferior_callback): Update.
8625 (print_started_pid): Update.
8626 (print_attached_pid): Update.
8627 (process_serial_event): Simplify read of ptid.
8628 * thread-db.c (thread_db_create_event): Update.
8629 (thread_db_get_tls_address): Update.
8630 * win32-low.c (current_inferior_ptid): Simplify.
8631
8632 2014-02-19 Tom Tromey <tromey@redhat.com>
8633
8634 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8635 argument.
8636 (target_supports_btrace): Update.
8637
8638 2014-02-14 Yao Qi <yao@codesourcery.com>
8639
8640 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8641 (rsp-low-ipa.o): New target.
8642
8643 2014-02-12 Tom Tromey <tromey@redhat.com>
8644
8645 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8646 convert_ascii_to_int.
8647 * regcache.c (registers_to_string): Likewise.
8648 * remote-utils.c (decode_M_packet): Likewise.
8649 * server.c (process_serial_event): Likewise.
8650
8651 2014-02-12 Tom Tromey <tromey@redhat.com>
8652
8653 * server.c (handle_query, handle_v_run): Use hex2bin, not
8654 unhexify.
8655 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8656
8657 2014-02-12 Tom Tromey <tromey@redhat.com>
8658
8659 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8660 convert_int_to_ascii.
8661 * regcache.c (registers_to_string, collect_register_as_string):
8662 Likewise.
8663 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8664 Likewise.
8665 * server.c (process_serial_event): Likewise.
8666 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8667 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8668
8669 2014-02-12 Tom Tromey <tromey@redhat.com>
8670
8671 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8672 bin2hex, not hexify.
8673 * tracepoint.c (cmd_qtstatus): Likewise.
8674
8675 2014-02-12 Tom Tromey <tromey@redhat.com>
8676
8677 * remote-utils.c (monitor_output): Pass explicit length to
8678 hexify.
8679
8680 2014-02-12 Tom Tromey <tromey@redhat.com>
8681
8682 * tracepoint.c: Include rsp-low.h.
8683 * server.c: Include rsp-low.h.
8684 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8685 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8686 declare.
8687 * remote-utils.c: Include rsp-low.h.
8688 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8689 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8690 (convert_int_to_ascii, convert_ascii_to_int): Move to
8691 common/rsp-low.c.
8692 * regcache.c: Include rsp-low.h.
8693 * ax.c: Include rsp-low.h.
8694 * Makefile.in (SFILES): Add common/rsp-low.c.
8695 (OBS): Add rsp-low.o.
8696 (rsp-low.o): New target.
8697
8698 2014-02-12 Tom Tromey <tromey@redhat.com>
8699
8700 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8701 Include print-utils.h.
8702 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8703 (plongest, thirty_two, phex_nz): Remove.
8704 * Makefile.in (SFILES): Add common/print-utils.c.
8705 (OBS): Add print-utils.o.
8706 (print-utils-ipa.o): New target.
8707 (print-utils.o): New target.
8708 (IPA_OBJS): Add print-utils-ipa.o.
8709
8710 2014-02-06 Tom Tromey <tromey@redhat.com>
8711
8712 * Makefile.in (SFILES): Fix indentation.
8713
8714 2014-02-05 Doug Evans <dje@google.com>
8715
8716 * linux-low.c (linux_wait_for_event): Improve comment.
8717 (linux_wait_1): Keep current_inferior in sync with event_child.
8718
8719 2014-01-22 Doug Evans <dje@google.com>
8720
8721 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8722
8723 2014-01-22 Doug Evans <dje@google.com>
8724
8725 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8726 * configure: Regenerate.
8727 * config.in: Regenerate.
8728 * Makefile.in (SFILES): Add debug.c.
8729 (OBS): Add debug.o.
8730 * debug.c: New file.
8731 * debug.h: New file.
8732 * linux-aarch64-low.c (*): Update all debugging printfs to use
8733 debug_printf instead of fprintf.
8734 * linux-arm-low.c (*): Ditto.
8735 * linux-cris-low.c (*): Ditto.
8736 * linux-crisv32-low.c (*): Ditto.
8737 * linux-m32r-low.c (*): Ditto.
8738 * linux-sparc-low.c (*): Ditto.
8739 * linux-x86.c (*): Ditto.
8740 * linux-low.c (*): Ditto.
8741 (linux_wait_1): Add calls to debug_enter, debug_exit.
8742 (linux_wait): Remove redundant debugging printf.
8743 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8744 (linux_resume, unstop_all_lwps): Ditto.
8745 * mem-break.c (*): Update all debugging printfs to use
8746 debug_printf instead of fprintf.
8747 * remote-utils.c (*): Ditto.
8748 * thread-db.c (*): Ditto.
8749 * server.c #include <ctype.h>, "gdb_vecs.h".
8750 (debug_threads): Moved to debug.c.
8751 (*): Update all debugging printfs to use debug_printf instead of
8752 fprintf.
8753 (start_inferior): Replace call to fflush with call to debug_flush.
8754 (monitor_show_help): Mention set debug-format.
8755 (parse_debug_format_options): New function.
8756 (handle_monitor_command): Handle "monitor set debug-format".
8757 (gdbserver_usage): Mention --debug-format.
8758 (main): Parse --debug-format.
8759 * server.h (debug_threads): Declaration moved to debug.h.
8760 #include "debug.h".
8761 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8762 trace_debug_1 that uses debug_printf.
8763 (tracepoint_look_up_symbols): Update all debugging printfs to use
8764 debug_printf instead of fprintf.
8765
8766 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8767
8768 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8769 sys/ptrace.h.
8770
8771 2014-01-17 Pedro Alves <palves@redhat.com>
8772
8773 PR build/16445
8774 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8775 defined after including gdb_proc_service.h.
8776
8777 2014-01-16 Doug Evans <dje@google.com>
8778
8779 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8780 (match_dll): Use it.
8781
8782 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8783
8784 * target.h (target_ops) <read_btrace>: Change parameters and
8785 return type to allow error reporting.
8786 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8787 trace reading errors on.
8788 * linux-low.c (linux_low_read_btrace): Pass trace reading
8789 errors on.
8790 (linux_low_disable_btrace): New.
8791
8792 2014-01-15 Doug Evans <dje@google.com>
8793
8794 * inferiors.c (thread_id_to_gdb_id): Delete.
8795 * inferiors.h (thread_id_to_gdb_id): Delete.
8796
8797 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8798
8799 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8800 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8801 versions.
8802
8803 2014-01-08 Pedro Alves <palves@redhat.com>
8804
8805 * server.c (handle_status): Don't discard previous queued stop
8806 replies or thread's pending status here.
8807 (main) <disconnection>: Do it here instead.
8808
8809 2014-01-08 Pedro Alves <palves@redhat.com>
8810
8811 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8812 * server.c (visit_actioned_threads, handle_pending_status): New
8813 function.
8814 (handle_v_cont): Factor out parts to ...
8815 (resume): ... this new function. If in all-stop, and a thread
8816 being resumed has a pending status, report it without actually
8817 resuming.
8818 (myresume): Adjust to use the new 'resume' function.
8819 (clear_pending_status_callback, set_pending_status_callback)
8820 (find_status_pending_thread_callback): New functions.
8821 (handle_status): Handle the case of multiple threads having
8822 interesting statuses to report. Report threads' real last signal
8823 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8824 with an interesting thread to report the status for, instead of
8825 always reporting the status of the first thread.
8826
8827 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8828
8829 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8830 * gdbreplay.c (gdbreplay_version): Likewise.
8831
8832 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8833
8834 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8835 iov.iov_len with the real length in use.
8836
8837 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8838
8839 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8840 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8841 for all targets that use win32-low.c.
8842 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8843 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8844
8845 2013-12-13 Pedro Alves <palves@redhat.com>
8846
8847 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8848 if equal to TARGET_WAITKIND_LOADED.
8849 * win32-low.c (cached_status): New static global.
8850 (win32_wait): Add declaration.
8851 (do_initial_child_stuff): Flush all initial pending debug events
8852 up to the initial breakpoint.
8853 (win32_wait): If CACHED_STATUS was set, return that instead
8854 of doing a real wait. Remove the code resuming the execution
8855 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8856 during the initial phase. Also remove the code changing
8857 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8858 TARGET_WAITKIND_STOPPED.
8859
8860 2013-12-11 Yao Qi <yao@codesourcery.com>
8861
8862 * notif.c (handle_notif_ack): Return 0 if no notification
8863 matches.
8864
8865 2013-11-20 Doug Evans <dje@google.com>
8866
8867 * linux-low.c (linux_set_resume_request): Fix comment.
8868
8869 2013-11-20 Doug Evans <dje@google.com>
8870
8871 * linux-low.c (resume_status_pending_p): Tweak comment.
8872
8873 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8874
8875 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8876 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8877 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8878 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8879 (srv_amd64_regobj): Add amd64-mpx.o.
8880 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8881 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8882 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8883 * i387-fp.c (num_pl_bnd_register) Added constant.
8884 (num_pl_bnd_cfg_registers) Added constant.
8885 (struct i387_xsave) Added reserved area and MPX fields.
8886 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8887 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8888 function.
8889 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8890 (init_registers_amd64_mpx_linux): Declare new function.
8891 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8892 (x86_64_regmap): Add MPX registers.
8893 (x86_linux_read_description): Add MPX case.
8894 (initialize_low_arch): Initialize MPX targets.
8895
8896 2013-11-18 Tom Tromey <tromey@redhat.com>
8897
8898 * configure: Rebuild.
8899 * configure.ac: Don't check for stdlib.h.
8900 * gdbreplay.c: Unconditionally include stdlib.h.
8901
8902 2013-11-18 Tom Tromey <tromey@redhat.com>
8903
8904 * config.in: Rebuild.
8905 * configure: Rebuild.
8906 * configure.ac: Don't use AC_HEADER_DIRENT.
8907
8908 2013-11-18 Tom Tromey <tromey@redhat.com>
8909
8910 * server.h: Don't check HAVE_STRING_H.
8911 * gdbreplay.c: Don't check HAVE_STRING_H.
8912 * configure: Rebuild.
8913
8914 2013-11-18 Tom Tromey <tromey@redhat.com>
8915
8916 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8917 LIBGNU.
8918
8919 2013-11-08 Tom Tromey <tromey@redhat.com>
8920
8921 * configure, config.in: Rebuild.
8922 * configure.ac: Remove unused configury.
8923
8924 2013-11-08 Tom Tromey <tromey@redhat.com>
8925
8926 * acinclude.m4: Include common.m4, codeset.m4.
8927 * configure, config.in: Rebuild.
8928 * configure.ac: Use GDB_AC_COMMON.
8929
8930 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8931
8932 * linux-s390-low.c (HWCAP_S390_TE): New define.
8933 (s390_arch_setup): Consider the TE field in the HWCAP for
8934 determining 'have_regset_tdb'.
8935
8936 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8937
8938 PR gdb/16014
8939 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8940 call to sizeof.
8941
8942 2013-10-02 Pedro Alves <palves@redhat.com>
8943
8944 * server.c (process_serial_event): Don't output "GDBserver
8945 exiting" if GDB is connected through stdio.
8946 * target.c (mywait): Likewise, be silent if GDB is connected
8947 through stdio.
8948
8949 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8950
8951 * lynx-low.c (lynx_add_threads_after_attach): New function.
8952 (lynx_attach): Remove call to add_thread. Add call to
8953 lynx_add_threads_after_attach instead.
8954
8955 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8956
8957 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8958 * config.in, configure: Regenerated.
8959
8960 2013-09-18 Yao Qi <yao@codesourcery.com>
8961
8962 PR server/15959
8963 * server.c (start_inferior): Clear 'resume_info'.
8964
8965 2013-09-16 Jiong Wang <jiwang@tilera.com>
8966
8967 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8968 for each register.
8969
8970 2013-09-16 Jiong Wang <jiwang@tilera.com>
8971
8972 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8973 linux-tile-low.o to srv_tgtobj.
8974
8975 2013-09-16 Will Newton <will.newton@linaro.org>
8976
8977 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8978 out regs.
8979
8980 2013-09-06 Pedro Alves <palves@redhat.com>
8981
8982 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8983 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8984 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8985 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8986 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8987 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8988
8989 2013-09-06 Pedro Alves <palves@redhat.com>
8990
8991 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8992 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8993
8994 2013-09-06 Pedro Alves <palves@redhat.com>
8995
8996 * linux-amd64-ipa.c: Include tracepoint.h.
8997 * linux-i386-ipa.c: Include tracepoint.h.
8998
8999 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9000
9001 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9002 (ps_get_thread_area): New function.
9003
9004 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9005
9006 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9007 (initialize_low_arch): Call init_registers_crisv32 rather than
9008 init_register_crisv32.
9009
9010 2013-09-05 Pedro Alves <palves@redhat.com>
9011
9012 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9013 to ...
9014 * hostio.h: ... this new file.
9015 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9016 win32-low.c: Include hostio.h.
9017
9018 2013-09-05 Pedro Alves <palves@redhat.com>
9019
9020 * server.h (gdb_client_data, handler_func, callback_handler_func)
9021 (delete_file_handler, add_file_handler, append_callback_event)
9022 (delete_callback_event, start_event_loop, initialize_event_loop):
9023 Move to event-loop.h and include it.
9024 * event-loop.h: New file.
9025
9026 2013-09-05 Pedro Alves <palves@redhat.com>
9027
9028 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9029 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9030 (loaded_dll, unloaded_dll): Move to ...
9031 * dll.h: ... this new file.
9032 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9033
9034 2013-09-05 Pedro Alves <palves@redhat.com>
9035
9036 * server.h (current_process, get_thread_process, all_processes)
9037 (add_inferior_to_list, for_each_inferior, current_inferior)
9038 (remove_inferior, add_process, remove_process, find_process_pid)
9039 (have_started_inferiors_p, have_attached_inferiors_p)
9040 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9041 (clear_inferiors, find_inferior, find_inferior_id)
9042 (inferior_target_data, set_inferior_target_data)
9043 (inferior_regcache_data, set_inferior_regcache_data): Move to
9044 inferiors.h, and include it.
9045 * inferiors.h: New file.
9046
9047 2013-09-05 Pedro Alves <palves@redhat.com>
9048
9049 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9050 Move ...
9051 * ax.h: ... here.
9052
9053 2013-09-05 Pedro Alves <palves@redhat.com>
9054
9055 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9056 tracepoint.h.
9057 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9058 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9059 (handle_tracepoint_general_set, handle_tracepoint_query)
9060 (tracepoint_finished_step, tracepoint_was_hit)
9061 (release_while_stepping_state_list, current_traceframe)
9062 (in_readonly_region, traceframe_read_mem)
9063 (fetch_traceframe_registers, traceframe_read_sdata)
9064 (traceframe_read_info, struct fast_tpoint_collect_status)
9065 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9066 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9067 (supply_fast_tracepoint_registers)
9068 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9069 (ipa_tdesc, claim_trampoline_space)
9070 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9071 (agent_mem_read, agent_get_trace_state_variable_value)
9072 (agent_set_trace_state_variable_value, agent_tsv_read)
9073 (agent_mem_read_string, get_raw_reg_func_addr)
9074 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9075 * tracepoint.h: ... this new file.
9076
9077 2013-09-05 Pedro Alves <palves@redhat.com>
9078
9079 * server.h (perror_with_name, error, fatal, warning, paddress)
9080 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9081 include it.
9082 * utils.h: New file.
9083
9084 2013-09-05 Pedro Alves <palves@redhat.com>
9085
9086 * server.h (remote_debug, noack_mode, transport_is_reliable)
9087 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9088 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9089 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9090 (write_enn, initialize_async_io, enable_async_io)
9091 (disable_async_io, check_remote_input_interrupt_request)
9092 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9093 (dead_thread_notify, prepare_resume_reply)
9094 (decode_address_to_semicolon, decode_address, decode_m_packet)
9095 (decode_M_packet, decode_X_packet, decode_xfer_write)
9096 (decode_search_memory_packet, unhexify, hexify)
9097 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9098 (look_up_one_symbol, relocate_instruction)
9099 (monitor_output): Move to remote-utils.h, and include it.
9100 * remote-utils.h: New file.
9101
9102 2013-09-05 Pedro Alves <palves@redhat.com>
9103
9104 * server.h (_): Delete.
9105
9106 2013-09-02 Pedro Alves <palves@redhat.com>
9107
9108 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9109 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9110 allocated.
9111 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9112
9113 2013-09-02 Pierre Muller <muller@sourceware.org>
9114
9115 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9116 or WriteProcessMemory complete successfully and handle
9117 ERROR_PARTIAL_COPY error.
9118
9119 2013-09-02 Pedro Alves <palves@redhat.com>
9120
9121 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9122 error instead of EIO.
9123
9124 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9125
9126 PR server/15604
9127 * linux-low.c: Include filestuff.h.
9128 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9129 * lynx-low.c: Include filestuff.h.
9130 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9131 * server.c: Include filestuff.h.
9132 (main): Call notice_open_fds.
9133 * spu-low.c: Include filestuff.h.
9134 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9135
9136 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9137
9138 * Makefile.in: Explain why ../target and ../nat are not
9139 listed as include file search paths.
9140 (linux-waitpid.o): New object file rule.
9141 * configure.srv (srv_native_linux_obj): New variable.
9142 Replace all occurrences of linux native object files with
9143 $srv_native_linux_obj.
9144 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9145 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9146 (linux_enable_event_reporting): Remove declaration.
9147 (my_waitpid): Moved to common/linux-waitpid.c.
9148 (linux_wait_for_event): Pass ptid when calling
9149 linux_enable_event_reporting.
9150 (linux_supports_tracefork_flag): Remove.
9151 (linux_enable_event_reporting): Likewise.
9152 (linux_tracefork_grandchild): Remove.
9153 (STACK_SIZE): Moved to common/linux-ptrace.c.
9154 (linux_tracefork_child): Remove.
9155 (linux_test_for_tracefork): Remove.
9156 (linux_look_up_symbols): Call linux_supports_traceclone.
9157 (initialize_low): Remove call to linux_test_for_tracefork.
9158 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9159 common/linux-ptrace.h.
9160 (PTRACE_TYPE_ARG4): Likewise.
9161 Include linux-ptrace.h.
9162
9163 2013-08-21 Pedro Alves <palves@redhat.com>
9164
9165 * config.in: Renegerate.
9166
9167 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9168
9169 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9170 (SFILES): Remove $(srcdir)/common/target-common.c and
9171 add $(srcdir)/target/waitstatus.c.
9172 (OBS): Remove target-common.o and add waitstatus.o.
9173 (server_h): Remove $(srcdir)/../common/target-common.h and
9174 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9175 and $(srcdir)/../target/waitstatus.h.
9176 (target-common.o): Remove.
9177 (waitstatus.o): New target object file.
9178 * target.h: Do not include target-common.h and
9179 include target/resume.h, target/wait.h and
9180 target/waitstatus.h.
9181
9182 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9183
9184 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9185 to PTRACE_TYPE_ARG3.
9186 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9187 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9188 PTRACE_TYPE_ARG4.
9189 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9190 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9191
9192 2013-07-27 Jie Zhang <jie@codesourcery.com>
9193 Daniel Jacobowitz <dan@codesourcery.com>
9194 Yao Qi <yao@codesourcery.com>
9195
9196 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9197 (mips-linux-watch.o): New rule.
9198 (mips_linux_watch_h): New variable.
9199 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9200 srv_tgtobj.
9201 * linux-mips-low.c: Include mips-linux-watch.h.
9202 (struct arch_process_info, struct arch_lwp_info): New.
9203 (update_watch_registers_callback): New function.
9204 (mips_linux_new_process, mips_linux_new_thread) New functions.
9205 (mips_linux_prepare_to_resume, mips_insert_point): New
9206 functions.
9207 (mips_remove_point, mips_stopped_by_watchpoint): New
9208 functions.
9209 (rsp_bp_type_to_target_hw_bp_type): New function.
9210 (mips_stopped_data_address): New function.
9211 (the_low_target): Add watchpoint support functions.
9212
9213 2013-07-27 Yao Qi <yao@codesourcery.com>
9214
9215 * i386-low.c: Include break-common.h.
9216 (enum target_hw_bp_type): Remove.
9217
9218 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9219
9220 * Makefile.in (SFILES): /common/target-common.c.
9221 (OBS): Add target-common.o.
9222 (server_h): Add $(srcdir)/../common/target-common.h.
9223 (target-common.o): New target.
9224 * server.c (queue_stop_reply_callback): Free
9225 status string after use.
9226 * target.c (target_waitstatus_to_string): Remove.
9227 * target.h: Include target-common.h.
9228 (resume_kind): Likewise.
9229 (target_waitkind): Likewise.
9230 (target_waitstatus): Likewise.
9231 (TARGET_WNOHANG): Likewise.
9232
9233 2013-07-04 Yao Qi <yao@codesourcery.com>
9234
9235 * Makefile.in (host_alias): Use @host_noncanonical@.
9236 (target_alias): Use @target_noncanonical@.
9237 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9238 ACX_NONCANONICAL_HOST.
9239 * configure: Regenerated.
9240
9241 Revert:
9242 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9243
9244 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9245 * configure: Rebuild.
9246 * Makefile.in (version_host, version_target): Get from configure.
9247 (version.c): Use $(version_host) and $(version_target).
9248
9249 2013-07-03 Pedro Alves <palves@redhat.com>
9250
9251 * Makefile.in (config.status): Depend on development.sh.
9252 * acinclude.m4: Include libmcheck.m4.
9253 * configure: Regenerate.
9254
9255 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9256
9257 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9258 attribute inside the parentheses.
9259 (winapi_DebugSetProcessKillOnExit): Ditto.
9260 (winapi_DebugBreakProcess): Ditto.
9261 (winapi_GenerateConsoleCtrlEvent): Ditto.
9262
9263 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9264
9265 * notif.h (notif_event): Add a dummy member to avoid compiler
9266 errors.
9267
9268 2013-07-01 Pedro Alves <palves@redhat.com>
9269
9270 * hostio.c (HOSTIO_PATH_MAX): Define.
9271 (require_filename, handle_open, handle_unlink, handle_readlink):
9272 Use it.
9273
9274 2013-07-01 Pedro Alves <palves@redhat.com>
9275
9276 * server.h: Include "pathmax.h".
9277 * linux-low.c: Don't include sys/param.h.
9278 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9279 MAXPATHLEN.
9280 * win32-low.c: Don't include sys/param.h.
9281 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9282
9283 2013-07-01 Pedro Alves <palves@redhat.com>
9284
9285 * event-loop.c: Don't check HAVE_UNISTD_H before including
9286 <unistd.h>.
9287 * gdbreplay.c: Likewise.
9288 * remote-utils.c: Likewise.
9289 * server.c: Likewise.
9290 * configure.ac: Don't check for unistd.h.
9291 * configure: Regenerate.
9292
9293 2013-06-28 Tom Tromey <tromey@redhat.com>
9294
9295 * Makefile.in (version.c): Use version.in, not
9296 common/version.in.
9297
9298 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9299
9300 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9301 * configure: Rebuild.
9302 * Makefile.in (version_host, version_target): Get from configure.
9303 (version.c): Use $(version_host) and $(version_target).
9304
9305 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9306
9307 Fix trace-status to output user name without trailing colon.
9308 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9309
9310 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9311
9312 Fix trace-status to output proper start-time and stop-time.
9313 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9314 output start time and stop time in hex as gdb expects.
9315
9316 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9317
9318 * tracepoint.c (build_traceframe_info_xml): Output trace state
9319 variables present in the trace buffer.
9320
9321 2013-06-24 Tom Tromey <tromey@redhat.com>
9322
9323 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9324 create-version.sh.
9325 (version.o): Remove.
9326 * gdbreplay.c: Include version.h.
9327 (version, host_name): Don't declare.
9328 * server.h: Include version.h.
9329 (version, host_name): Don't declare.
9330
9331 2013-06-12 Pedro Alves <palves@redhat.com>
9332
9333 * linux-x86-low.c (linux_is_elf64): Delete global.
9334 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9335 with local linux_pid_exe_is_elf_64_file use.
9336
9337 2013-06-11 Pedro Alves <palves@redhat.com>
9338
9339 * linux-low.c (regset_disabled, disable_regset): New functions.
9340 (regsets_fetch_inferior_registers)
9341 (regsets_store_inferior_registers): Use them.
9342 (initialize_regsets_info); Don't allocate the disabled_regsets
9343 array here.
9344 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9345 comment.
9346
9347 2013-06-11 Pedro Alves <palves@redhat.com>
9348
9349 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9350 xmalloc.
9351
9352 2013-06-11 Pedro Alves <palves@redhat.com>
9353
9354 * linux-x86-low.c (initialize_low_arch): Call
9355 init_registers_x32_avx_linux.
9356
9357 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9358
9359 Fix compatibility with Android Bionic.
9360 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9361 it is not empty.
9362
9363 2013-06-07 Pedro Alves <palves@redhat.com>
9364
9365 PR server/14823
9366 * Makefile.in (OBS): Add tdesc.o.
9367 (IPA_OBJS): Add tdesc-ipa.o.
9368 (tdesc-ipa.o): New rule.
9369 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9370 interface.
9371 * linux-low.c (new_inferior): Delete.
9372 (disabled_regsets, num_regsets): Delete.
9373 (linux_add_process): Adjust to set the new per-process
9374 new_inferior flag.
9375 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9376 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9377 was a stop. When calling arch_setup, switch the current inferior
9378 to the thread that got an event.
9379 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9380 (regsets_fetch_inferior_registers)
9381 (regsets_store_inferior_registers): New regsets_info parameter.
9382 Adjust to use it.
9383 (linux_register_in_regsets): New regs_info parameter. Adjust to
9384 use it.
9385 (register_addr, fetch_register, store_register): New usrregs_info
9386 parameter. Adjust to use it.
9387 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9388 parameter regs_info. Adjust to use it.
9389 (linux_fetch_registers): Get the current inferior's regs_info, and
9390 adjust to use it.
9391 (linux_store_registers): Ditto.
9392 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9393 (initialize_low): Don't initialize the target_regsets here. Call
9394 initialize_low_arch.
9395 * linux-low.h (target_regsets): Delete declaration.
9396 (struct regsets_info): New.
9397 (struct usrregs_info): New.
9398 (struct regs_info): New.
9399 (struct process_info_private) <new_inferior>: New field.
9400 (struct linux_target_ops): Delete the num_regs, regmap, and
9401 regset_bitmap fields. New field regs_info.
9402 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9403 * i387-fp.c (num_xmm_registers): Delete.
9404 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9405 calls to new interface.
9406 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9407 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9408 Infer the number of xmm registers from the regcache's target
9409 description.
9410 * i387-fp.h (num_xmm_registers): Delete.
9411 * inferiors.c (add_thread): Don't install the thread's regcache
9412 here.
9413 * proc-service.c (gregset_info): Fetch the current inferior's
9414 regs_info. Adjust to use it.
9415 * regcache.c: Include tdesc.h.
9416 (register_bytes, reg_defs, num_registers)
9417 (gdbserver_expedite_regs): Delete.
9418 (get_thread_regcache): If the thread doesn't have a regcache yet,
9419 create one, instead of aborting gdbserver.
9420 (regcache_invalidate_one): Rename to ...
9421 (regcache_invalidate_thread): ... this.
9422 (regcache_invalidate_one): New.
9423 (regcache_invalidate): Only invalidate registers of the current
9424 process.
9425 (init_register_cache): Add target_desc parameter, and use it.
9426 (new_register_cache): Ditto. Assert the target description has a
9427 non zero registers_size.
9428 (regcache_cpy): Add assertions. Adjust.
9429 (realloc_register_cache, set_register_cache): Delete.
9430 (registers_to_string, registers_from_string): Adjust.
9431 (find_register_by_name, find_regno, find_register_by_number)
9432 (register_cache_size): Add target_desc parameter, and use it.
9433 (free_register_cache_thread, free_register_cache_thread_one)
9434 (regcache_release, register_cache_size): New.
9435 (register_size): Add target_desc parameter, and use it.
9436 (register_data, supply_register, supply_register_zeroed)
9437 (supply_regblock, supply_register_by_name, collect_register)
9438 (collect_register_as_string, collect_register_by_name): Adjust.
9439 * regcache.h (struct target_desc): Forward declare.
9440 (struct regcache) <tdesc>: New field.
9441 (init_register_cache, new_register_cache): Add target_desc
9442 parameter.
9443 (regcache_invalidate_thread): Declare.
9444 (regcache_invalidate_one): Delete declaration.
9445 (regcache_release): Declare.
9446 (find_register_by_number, register_cache_size, register_size)
9447 (find_regno): Add target_desc parameter.
9448 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9449 declarations.
9450 * remote-utils.c: Include tdesc.h.
9451 (outreg, prepare_resume_reply): Adjust.
9452 * server.c: Include tdesc.h.
9453 (gdbserver_xmltarget): Delete declaration.
9454 (get_features_xml, process_serial_event): Adjust.
9455 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9456 declare.
9457 (struct process_info) <tdesc>: New field.
9458 (ipa_tdesc): Declare.
9459 * tdesc.c: New file.
9460 * tdesc.h: New file.
9461 * tracepoint.c: Include tdesc.h.
9462 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9463 (get_context_regcache): Adjust to pass ipa_tdesc down.
9464 (do_action_at_tracepoint): Adjust to get the register cache size
9465 from the context regcache's description.
9466 (traceframe_walk_blocks): Adjust to get the register cache size
9467 from the current trace frame's description.
9468 (traceframe_get_pc): Adjust to get current trace frame's
9469 description and pass it down.
9470 (gdb_collect): Adjust to get the register cache size from the
9471 IPA's description.
9472 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9473 (gdbserver_xmltarget): Delete.
9474 (initialize_low_tracepoint): Set the ipa's target description.
9475 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9476 (initialize_low_tracepoint): Set the ipa's target description.
9477 * linux-x86-low.c: Include tdesc.h.
9478 [__x86_64__] (is_64bit_tdesc): New.
9479 (ps_get_thread_area, x86_get_thread_area): Use it.
9480 (i386_cannot_store_register): Rename to ...
9481 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9482 (i386_cannot_fetch_register): Rename to ...
9483 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9484 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9485 to new interface.
9486 (target_regsets): Rename to ...
9487 (x86_regsets): ... this.
9488 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9489 interface.
9490 (x86_siginfo_fixup): Use is_64bit_tdesc.
9491 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9492 (tdesc_x32_avx_linux, tdesc_x32_linux)
9493 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9494 Declare.
9495 (x86_linux_update_xmltarget): Delete.
9496 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9497 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9498 (AMD64_LINUX_USER64_CS): New.
9499 (x86_linux_read_description): New, based on
9500 x86_linux_update_xmltarget.
9501 (same_process_callback): New.
9502 (x86_arch_setup_process_callback): New.
9503 (x86_linux_update_xmltarget): New.
9504 (x86_regsets_info): New.
9505 (amd64_linux_regs_info): New.
9506 (i386_linux_usrregs_info): New.
9507 (i386_linux_regs_info): New.
9508 (x86_linux_regs_info): New.
9509 (x86_arch_setup): Reimplement.
9510 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9511 (x86_emit_ops): Ditto.
9512 (the_low_target): Adjust. Install x86_linux_regs_info,
9513 x86_cannot_fetch_register, and x86_cannot_store_register.
9514 (initialize_low_arch): New.
9515 * linux-ia64-low.c (tdesc_ia64): Declare.
9516 (ia64_fetch_register): Adjust.
9517 (ia64_usrregs_info, regs_info): New globals.
9518 (ia64_regs_info): New function.
9519 (the_low_target): Adjust.
9520 (initialize_low_arch): New function.
9521 * linux-sparc-low.c (tdesc_sparc64): Declare.
9522 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9523 Adjust.
9524 (sparc_arch_setup): New function.
9525 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9526 (the_low_target): Adjust.
9527 (initialize_low_arch): New function.
9528 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9529 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9530 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9531 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9532 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9533 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9534 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9535 (tdesc_powerpc_isa205_vsx64l): Declare.
9536 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9537 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9538 (ppc_set_pc, ppc_get_hwcap): Adjust.
9539 (ppc_usrregs_info): Forward declare.
9540 (!__powerpc64__) ppc_regmap_adjusted: New global.
9541 (ppc_arch_setup): Adjust to the current process'es target
9542 description.
9543 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9544 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9545 (ppc_store_evrregset): Adjust.
9546 (target_regsets): Rename to ...
9547 (ppc_regsets): ... this, and make static.
9548 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9549 (ppc_regs_info): New function.
9550 (the_low_target): Adjust.
9551 (initialize_low_arch): New function.
9552 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9553 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9554 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9555 (tdesc_s390x_linux64v2): Declare.
9556 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9557 (s390_fill_gregset, s390_store_last_break): Adjust.
9558 (target_regsets): Rename to ...
9559 (s390_regsets): ... this, and make static.
9560 (s390_get_pc, s390_set_pc): Adjust.
9561 (s390_get_hwcap): New target_desc parameter, and use it.
9562 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9563 (s390_arch_setup): Adjust to set the current process'es target
9564 description. Don't adjust the regmap.
9565 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9566 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9567 (regs_info_3264): New globals.
9568 (s390_regs_info): New function.
9569 (the_low_target): Adjust.
9570 (initialize_low_arch): New function.
9571 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9572 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9573 [__mips64] (init_registers_mips_linux)
9574 (init_registers_mips_dsp_linux): Delete defines.
9575 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9576 (have_dsp): New global.
9577 (mips_read_description): New, based on mips_arch_setup.
9578 (mips_arch_setup): Reimplement.
9579 (get_usrregs_info): New function.
9580 (mips_cannot_fetch_register, mips_cannot_store_register)
9581 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9582 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9583 (target_regsets): Rename to ...
9584 (mips_regsets): ... this, and make static.
9585 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9586 (dsp_regs_info, regs_info): New globals.
9587 (mips_regs_info): New function.
9588 (the_low_target): Adjust.
9589 (initialize_low_arch): New function.
9590 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9591 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9592 Declare.
9593 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9594 (arm_read_description): New, with bits factored from
9595 arm_arch_setup.
9596 (arm_arch_setup): Reimplement.
9597 (target_regsets): Rename to ...
9598 (arm_regsets): ... this, and make static.
9599 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9600 (arm_regs_info): New function.
9601 (the_low_target): Adjust.
9602 (initialize_low_arch): New function.
9603 * linux-m68k-low.c (tdesc_m68k): Declare.
9604 (target_regsets): Rename to ...
9605 (m68k_regsets): ... this, and make static.
9606 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9607 (m68k_regs_info): New function.
9608 (m68k_arch_setup): New function.
9609 (the_low_target): Adjust.
9610 (initialize_low_arch): New function.
9611 * linux-sh-low.c (tdesc_sharch): Declare.
9612 (target_regsets): Rename to ...
9613 (sh_regsets): ... this, and make static.
9614 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9615 (sh_regs_info, sh_arch_setup): New functions.
9616 (the_low_target): Adjust.
9617 (initialize_low_arch): New function.
9618 * linux-bfin-low.c (tdesc_bfin): Declare.
9619 (bfin_arch_setup): New function.
9620 (bfin_usrregs_info, regs_info): New globals.
9621 (bfin_regs_info): New function.
9622 (the_low_target): Adjust.
9623 (initialize_low_arch): New function.
9624 * linux-cris-low.c (tdesc_cris): Declare.
9625 (cris_arch_setup): New function.
9626 (cris_usrregs_info, regs_info): New globals.
9627 (cris_regs_info): New function.
9628 (the_low_target): Adjust.
9629 (initialize_low_arch): New function.
9630 * linux-cris-low.c (tdesc_crisv32): Declare.
9631 (cris_arch_setup): New function.
9632 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9633 (cris_regs_info): New function.
9634 (the_low_target): Adjust.
9635 (initialize_low_arch): New function.
9636 * linux-m32r-low.c (tdesc_m32r): Declare.
9637 (m32r_arch_setup): New function.
9638 (m32r_usrregs_info, regs_info): New globals.
9639 (m32r_regs_info): Adjust.
9640 (initialize_low_arch): New function.
9641 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9642 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9643 (tic6x_usrregs_info): Forward declare.
9644 (tic6x_read_description): New function, based on ...
9645 (tic6x_arch_setup): ... this. Reimplement.
9646 (target_regsets): Rename to ...
9647 (tic6x_regsets): ... this, and make static.
9648 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9649 (tic6x_regs_info): New function.
9650 (the_low_target): Adjust.
9651 (initialize_low_arch): New function.
9652 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9653 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9654 (target_regsets): Rename to ...
9655 (xtensa_regsets): ... this, and make static.
9656 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9657 globals.
9658 (xtensa_arch_setup, xtensa_regs_info): New functions.
9659 (the_low_target): Adjust.
9660 (initialize_low_arch): New function.
9661 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9662 (nios2_arch_setup): Set the current process'es tdesc.
9663 (target_regsets): Rename to ...
9664 (nios2_regsets): ... this.
9665 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9666 (nios2_regs_info): New function.
9667 (the_low_target): Adjust.
9668 (initialize_low_arch): New function.
9669 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9670 (aarch64_arch_setup): Set the current process'es tdesc.
9671 (target_regsets): Rename to ...
9672 (aarch64_regsets): ... this.
9673 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9674 (aarch64_regs_info): New function.
9675 (the_low_target): Adjust.
9676 (initialize_low_arch): New function.
9677 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9678 globals.
9679 (target_regsets): Rename to ...
9680 (tile_regsets): ... this.
9681 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9682 (tile_regs_info): New function.
9683 (tile_arch_setup): Set the current process'es tdesc.
9684 (the_low_target): Adjust.
9685 (initialize_low_arch): New function.
9686 * spu-low.c (tdesc_spu): Declare.
9687 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9688 * win32-arm-low.c (tdesc_arm): Declare.
9689 (arm_arch_setup): New function.
9690 (the_low_target): Install arm_arch_setup instead of
9691 init_registers_arm.
9692 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9693 (init_windows_x86): Rename to ...
9694 (i386_arch_setup): ... this. Set `win32_tdesc'.
9695 (the_low_target): Adjust.
9696 * win32-low.c (win32_tdesc): New global.
9697 (child_add_thread): Don't create the thread cache here.
9698 (do_initial_child_stuff): Set the new process'es tdesc.
9699 * win32-low.h (struct target_desc): Forward declare.
9700 (win32_tdesc): Declare.
9701 * lynx-i386-low.c (tdesc_i386): Declare global.
9702 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9703 * lynx-low.c (lynx_tdesc): New global.
9704 (lynx_add_process): Set the new process'es tdesc.
9705 * lynx-low.h (struct target_desc): Forward declare.
9706 (lynx_tdesc): Declare global.
9707 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9708 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9709 * nto-low.c (nto_tdesc): New global.
9710 (do_attach): Set the new process'es tdesc.
9711 * nto-low.h (struct target_desc): Forward declare.
9712 (nto_tdesc): Declare.
9713 * nto-x86-low.c (tdesc_i386): Declare.
9714 (nto_x86_arch_setup): Set `nto_tdesc'.
9715
9716 2013-06-04 Gary Benson <gbenson@redhat.com>
9717
9718 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9719 to qSupported response when appropriate.
9720 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9721 with nonzero-length annex.
9722 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9723 arguments supplied in annex.
9724
9725 2013-05-31 Doug Evans <dje@google.com>
9726
9727 PR server/15594
9728 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9729 64 bits in 64-cross-32 environment.
9730
9731 2013-05-28 Pedro Alves <palves@redhat.com>
9732
9733 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9734 (aarch64-without-fpu.c): Delete rule.
9735 * configure.srv (aarch64*-*-linux*): Remove references to
9736 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9737 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9738 declaration.
9739
9740 2013-05-24 Pedro Alves <palves@redhat.com>
9741
9742 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9743 instead of strchr/decode_address. Error if the range isn't split
9744 with a ','. Don't assume there's be a ':' in the action.
9745
9746 2013-05-23 Yao Qi <yao@codesourcery.com>
9747 Pedro Alves <palves@redhat.com>
9748
9749 * linux-low.c (lwp_in_step_range): New function.
9750 (linux_wait_1): If the thread was range stepping and stopped
9751 outside the stepping range, report the stop to GDB. Otherwise,
9752 continue stepping. Add range stepping debug output.
9753 (linux_set_resume_request): Copy the step range from the resume
9754 request to the lwp.
9755 (linux_supports_range_stepping): New.
9756 (linux_target_ops) <supports_range_stepping>: Set to
9757 linux_supports_range_stepping.
9758 * linux-low.h (struct linux_target_ops)
9759 <supports_range_stepping>: New field.
9760 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9761 * linux-x86-low.c (x86_supports_range_stepping): New.
9762 (the_low_target) <supports_range_stepping>: Set to
9763 x86_supports_range_stepping.
9764 * server.c (handle_v_cont): Handle 'r' action.
9765 (handle_v_requests): Append ";r" if the target supports range
9766 stepping.
9767 * target.h (struct thread_resume) <step_range_start,
9768 step_range_end>: New fields.
9769 (struct target_ops) <supports_range_stepping>:
9770 New field.
9771 (target_supports_range_stepping): New macro.
9772
9773 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9774
9775 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9776 confusion in comment.
9777
9778 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9779
9780 * lynx-low.c (struct process_info_private): New type.
9781 (lynx_add_process): New function.
9782 (lynx_create_inferior, lynx_attach): Replace calls to
9783 add_process by calls to lynx_add_process.
9784 (lynx_resume): If PTID is null, then try using
9785 current_process()->private->last_wait_event_ptid.
9786 Add comments.
9787 (lynx_clear_inferiors): Delete. The contents of that function
9788 has been inlined in lynx_mourn;
9789 (lynx_wait_1): Save the ptid in the process's private data.
9790 (lynx_mourn): Free the process' private data. Replace call
9791 to lynx_clear_inferiors by call to clear_inferiors.
9792
9793 2013-05-17 Yao Qi <yao@codesourcery.com>
9794
9795 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9796 the right place.
9797
9798 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9799
9800 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9801 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9802 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9803 PT_TEXT_END_ADDR guards. Update comments.
9804 (linux_target_op) <read_offsets>: Conditionally define to
9805 linux_read_offsets if the target is UCLIBC and if it defines
9806 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9807
9808 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9809 Andrew Jenner <andrew@codesourcery.com>
9810
9811 * Makefile.in (SFILES): Add linux-nios2-low.c.
9812 (clean): Add action to delete nios2-linux.c.
9813 (nios2-linux.c): New rule.
9814 * configure.srv: Add nios2*-*-linux*.
9815 * linux-nios2-low.c: New.
9816
9817 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9818
9819 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9820
9821 2013-04-25 Hui Zhu <hui@codesourcery.com>
9822
9823 PR gdb/15186
9824 * ax.c (ax_printf): Add fflush.
9825
9826 2013-04-22 Tom Tromey <tromey@redhat.com>
9827
9828 * Makefile.in (SFILES): Add filestuff.c.
9829 (OBS): Add filestuff.o.
9830 (filestuff.o): New target.
9831 * config.in, configure: Rebuild.
9832 * configure.ac: Check for fdwalk, pipe2.
9833
9834 2013-04-17 Pedro Alves <palves@redhat.com>
9835
9836 * configure.ac (USE_THREAD_DB): Delete variable.
9837 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9838 Don't AC_SUBST USE_THREAD_DB.
9839 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9840 * config.in, configure: Regenerate.
9841
9842 2013-04-16 Pedro Alves <palves@redhat.com>
9843
9844 * linux-low.h (struct lwp_info) <thread_known>: Move under
9845 the USE_THREAD_DB #ifdef.
9846
9847 2013-04-16 Pedro Alves <palves@redhat.com>
9848
9849 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9850 (linux-low.o): Delete rule.
9851 * linux-low.h: Always include "gdb_thread_db.h" instead of
9852 conditionally including thread_db.h.
9853 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9854 HAVE_THREAD_DB_H.
9855
9856 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9857
9858 * Makefile.in (install-only): Fix make install regression.
9859
9860 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9861
9862 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9863 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9864 installation.
9865 * gdbserver.1: Remove.
9866
9867 2013-03-22 Pedro Alves <palves@redhat.com>
9868
9869 * linux-low.c (handle_extended_wait): Don't call
9870 linux_enable_event_reporting.
9871
9872 2013-03-15 Tony Theodore <tonyt@logyst.com>
9873
9874 PR build/9098:
9875 * Makefile.in (SHELL): Use @SHELL@.
9876
9877 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9878
9879 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9880 compiler warning.
9881
9882 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9883
9884 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9885 Remove extraneous NULL element.
9886
9887 2013-03-13 Yao Qi <yao@codesourcery.com>
9888
9889 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9890 'V' block in trace frame.
9891
9892 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9893
9894 * target.h (struct target_ops): Add btrace ops.
9895 (target_supports_btrace): New macro.
9896 (target_enable_btrace): New macro.
9897 (target_disable_btrace): New macro.
9898 (target_read_btrace): New macro.
9899 * gdbthread.h (struct thread_info): Add btrace field.
9900 * server.c: Include btrace-common.h.
9901 (handle_btrace_general_set): New function.
9902 (handle_btrace_enable): New function.
9903 (handle_btrace_disable): New function.
9904 (handle_general_set): Call handle_btrace_general_set.
9905 (handle_qxfer_btrace): New function.
9906 (struct qxfer qxfer_packets[]): Add btrace entry.
9907 * inferiors.c (remove_thread): Disable btrace.
9908 * linux-low: Include linux-btrace.h.
9909 (linux_low_enable_btrace): New function.
9910 (linux_low_read_btrace): New function.
9911 (linux_target_ops): Add btrace ops.
9912 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9913 Add srv_linux_btrace=yes.
9914 (x86_64-*-linux*): Add linux-btrace.o.
9915 Add srv_linux_btrace=yes.
9916 * configure.ac: Define HAVE_LINUX_BTRACE.
9917 * config.in: Regenerated.
9918 * configure: Regenerated.
9919
9920 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9921
9922 * server.c (handle_qxfer): Preserve error message if -3 is
9923 returned.
9924 (qxfer): Document the -3 return value.
9925
9926 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9927
9928 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9929 (linux_btrace_h): New variable.
9930 (linux-btrace.o): New rule.
9931
9932 2013-03-08 Stan Shebs <stan@codesourcery.com>
9933 Hafiz Abid Qadeer <abidh@codesourcery.com>
9934
9935 * tracepoint.c (trace_buffer_size): New global.
9936 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9937 (init_trace_buffer): Change to one-argument function. Allocate
9938 trace buffer memory.
9939 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9940 handle QTBuffer:size packet.
9941 (cmd_bigqtbuffer_size): New function.
9942 (initialize_tracepoint): Call init_trace_buffer with
9943 DEFAULT_TRACE_BUFFER_SIZE.
9944 * server.c (handle_query): Add QTBuffer:size in the
9945 supported packets.
9946
9947 2013-03-07 Yao Qi <yao@codesourcery.com>
9948
9949 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9950 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9951 of -1.
9952 (cmd_qtsp): Adjust condition. Do post increment.
9953 Set cur_action and cur_step_action back to 0.
9954
9955 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9956
9957 PR server/15236
9958 * linux-low.c (linux_write_memory): Return early success if LEN is
9959 zero.
9960
9961 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9962
9963 * configure.srv: Add x86_64-*-cygwin* as target.
9964
9965 2013-02-28 Tom Tromey <tromey@redhat.com>
9966
9967 * configure.ac: Invoke AC_SYS_LARGEFILE.
9968 * configure, config.in: Rebuild.
9969
9970 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9971
9972 * win32-low.c: Throughout, fix format strings and casts of
9973 printf-like functions to avoid type related warnings on all
9974 platforms.
9975 (get_child_debug_event): Print dwDebugEventCode as hex since
9976 that's how it's usually documented.
9977
9978 2013-02-28 Yao Qi <yao@codesourcery.com>
9979
9980 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9981 pulongest.
9982
9983 2013-02-27 Jiong Wang <jiwang@tilera.com>
9984
9985 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9986 (reg-tilegx32.c): New rule.
9987 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9988 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9989 different register info initializer according to elf class.
9990 (init_registers_tilgx32): New function. The tilegx32 register info
9991 initializer.
9992 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9993 (tile_store_gregset): Likewise.
9994
9995 2013-02-27 Yao Qi <yao@codesourcery.com>
9996
9997 * server.c (process_point_options): Print debug message when
9998 debug_threads is true.
9999
10000 2013-02-26 Yao Qi <yao@codesourcery.com>
10001
10002 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10003
10004 2013-02-19 Pedro Alves <palves@redhat.com>
10005 Kai Tietz <ktietz@redhat.com>
10006
10007 PR gdb/15161
10008
10009 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10010 instead of strtoul to extract address from packet.
10011 (process_serial_event) <'z'>: Likewise.
10012
10013 2013-02-18 Yao Qi <yao@codesourcery.com>
10014
10015 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10016
10017 2013-02-14 Pedro Alves <palves@redhat.com>
10018
10019 Plug memory leak.
10020
10021 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10022 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10023
10024 2013-02-14 Pedro Alves <palves@redhat.com>
10025
10026 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10027
10028 2013-02-14 Pedro Alves <palves@redhat.com>
10029
10030 * tracepoint.c (save_string): Delete.
10031 (add_tracepoint_action): Use savestring instead of save_string.
10032
10033 2013-02-12 Pedro Alves <palves@redhat.com>
10034
10035 * linux-xtensa-low.c: Ditto.
10036 * xtensa-xtregs.c: Ditto.
10037
10038 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10039
10040 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10041 thread_db.
10042
10043 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10044
10045 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10046 aarch64_num_wp_regs and aarch64_num_bp_regs to
10047 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10048
10049 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10050
10051 * linux-aarch64-low.c (ps_get_thread_area): Replace
10052 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10053
10054 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10055 Marcus Shawcroft <marcus.shawcroft@arm.com>
10056 Nigel Stephens <nigel.stephens@arm.com>
10057 Yufeng Zhang <yufeng.zhang@arm.com>
10058
10059 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10060 (aarch64.c, aarch64-without-fpu.c): New targets.
10061 * configure.srv (aarch64*-*-linux*): New.
10062 * linux-aarch64-low.c: New file.
10063
10064 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10065
10066 * linux-low.c (handle_extended_wait, linux_create_inferior)
10067 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10068 (dequeue_one_deferred_signal, linux_resume_one_thread)
10069 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10070 (linux_tracefork_grandchild, linux_test_for_tracefork)
10071 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10072 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10073 where the argument is 0.
10074
10075 2013-01-25 Yao Qi <yao@codesourcery.com>
10076
10077 * event-loop.c: Include "queue.h".
10078 (gdb_event_p): New typedef.
10079 (struct gdb_event) <next_event>: Remove.
10080 (event_queue): Change to QUEUE(gdb_event_p).
10081 (async_queue_event): Remove.
10082 (gdb_event_xfree): New.
10083 (initialize_event_loop): New.
10084 (process_event): Use API from QUEUE.
10085 (wait_for_event): Likewise.
10086 * server.c (main): Call initialize_event_loop.
10087 * server.h (initialize_event_loop): Declare.
10088
10089 2013-01-18 Yao Qi <yao@codesourcery.com>
10090
10091 * ax.h (struct eval_agent_expr_context): New.
10092 (gdb_eval_agent_expr): Update declaration.
10093 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10094 TFRAME. Add new argument CTX.
10095 * server.h (struct eval_agent_expr_context): Declare.
10096 (agent_mem_read, agent_tsv_read): Update declaration.
10097 (agent_mem_read_string): Likewise.
10098 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10099 (add_traceframe_block): Add new argument TPOINT.
10100 Increase TPOINT->traceframe_usage.
10101 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10102 eval_tracepoint_agent_expr.
10103 (condition_true_at_tracepoint): Likewise.
10104 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10105 (agent_mem_read_string, agent_tsv_read): Likewise.
10106
10107 2013-01-16 Yao Qi <yao@codesourcery.com>
10108
10109 * linux-low.c (linux_resume_one_lwp): Don't check
10110 'lwp->bp_reinsert != 0'.
10111
10112 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10113 Pedro Alves <palves@redhat.com>
10114
10115 * lynx-low.c (ptrace_request_to_str): Define a temporary
10116 macro and use it to simplify this function's implementation.
10117
10118 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10119
10120 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10121 sets errno.
10122
10123 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10124
10125 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10126
10127 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10128
10129 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10130
10131 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10132
10133 * lynx-low.c (lynx_resume): Use the resume_info parameter
10134 to determine the ptid for the lynx_ptrace call, unless
10135 it is equal to minus_one_ptid, in which case we use the
10136 ptid of the current_inferior.
10137 (lynx_wait_1): After having received a thread create/exit
10138 event, resume the inferior's execution using the signaling
10139 thread's ptid, rather than the old ptid.
10140
10141 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10142
10143 * lynx-low.c (lynx_resume): Delete variable ret.
10144
10145 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10146
10147 * gdbreplay.c (gdbreplay_version): Update copyright year.
10148 * server.c (gdbserver_version): Likewise.
10149
10150 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10151
10152 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10153 new thread.
10154
10155 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10156
10157 * lynx-low.c (ptrace_request_to_str): Add handling for
10158 PTRACE_GETTRACESIG.
10159
10160 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10161
10162 * lynx-low.c (lynx_attach): Delete variable new_process.
10163
10164 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10165
10166 * lynx-low.c (lynx_create_inferior): Delete variable
10167 new_process.
10168
10169 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10170
10171 * lynx-low.c (ptrace_request_to_str): Do not handle
10172 PTRACE_GETTHREADLIST if this macro does not exist.
10173
10174 2012-12-15 Yao Qi <yao@codesourcery.com>
10175
10176 * Makefile.in (OBS): Add notif.o.
10177 * notif.c, notif.h: New.
10178 * server.c: Include "notif.h".
10179 (struct vstop_notif) <next>: Remove.
10180 <base>: New field.
10181 (queue_stop_reply): Update.
10182 (push_event, send_next_stop_reply): Remove.
10183 (discard_queued_stop_replies): Update.
10184 (notif_stop): New variable.
10185 (handle_v_stopped): Remove.
10186 (handle_v_requests): Don't call handle_v_stopped. Call
10187 handle_ack_notif instead.
10188 (queue_stop_reply_callback): Call notif_event_enque instead
10189 of queue_stop_reply.
10190 (handle_status): Don't call send_next_stop_reply, call
10191 notif_write_event instead.
10192 (kill_inferior_callback): Likewise.
10193 (detach_or_kill_inferior_callback): Likewise.
10194 (main): Call initialize_notif.
10195 (process_serial_event): Call QUEUE_is_empty.
10196 (handle_target_event): Call notif_push instead of push event.
10197 * server.h (push_event): Remove declaration.
10198
10199 2012-12-10 Tom Tromey <tromey@redhat.com>
10200
10201 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10202 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10203 macros.
10204 (.c.o): Rewrite.
10205 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10206 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10207 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10208 (amd64-linux-ipa.o, ax.o): Rewrite.
10209 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10210 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10211 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10212 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10213 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10214 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10215 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10216 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10217 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10218 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10219 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10220 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10221 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10222 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10223 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10224 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10225 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10226 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10227 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10228 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10229 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10230 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10231 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10232 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10233 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10234 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10235 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10236 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10237 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10238 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10239 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10240 (reg-tilegx.o): Remove.
10241 (all_object_files): New macro.
10242 Include .deps files.
10243 * aclocal.m4, configure: Rebuild.
10244 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10245 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10246 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10247
10248 2012-12-05 Tom Tromey <tromey@redhat.com>
10249
10250 PR gdb/14917:
10251 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10252
10253 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10254
10255 * configure.ac: Check for linux/perf_event.h.
10256 * config.in: Regenerated.
10257 * configure: Regenerated.
10258
10259 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10260
10261 * hostio.c (handle_readlink): Decrease buffer size
10262 parameter passed to readlink by one byte.
10263
10264 2012-11-26 Yao Qi <yao@codesourcery.com>
10265
10266 * configure.ac (build_warnings): Append '-Wempty-body'.
10267 * configure: Regenerated.
10268 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10269 body.
10270
10271 2012-11-15 Pierre Muller <muller@sourceware.org>
10272
10273 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10274 * config.in: Regenerate.
10275 * configure: Regenerate.
10276 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10277 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10278 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10279 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10280 header.
10281 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10282 instead of <sys/wait.h> header.
10283 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10284
10285 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10286
10287 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10288 (various make rules): Remove -DGDBSERVER
10289
10290 2012-11-09 Yao Qi <yao@codesourcery.com>
10291
10292 * spu-low.c (current_ptid): Move it to ..
10293 * gdbthread.h: ... here. New.
10294 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10295 * server.c (myresume, process_serial_event): Likewise.
10296 * thread-db.c (thread_db_find_new_threads): Likewise.
10297 * tracepoint.c (run_inferior_command): Likewise.
10298
10299 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10300
10301 * server.c (handle_search_memory_1): Include access length in
10302 warning message.
10303
10304 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10305
10306 * linux-crisv32-low.c: Fix compile errors.
10307
10308 2012-09-04 Yao Qi <yao@codesourcery.com>
10309
10310 * tracepoint.c (cmd_qtsv): Adjust debug message.
10311 Don't check CUR_TPOINT.
10312
10313 2012-08-28 Yao Qi <yao@codesourcery.com>
10314
10315 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10316 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10317 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10318 Remove declarations of xmalloc, xreallloc, xstrdup and
10319 freeargv.
10320 * Makefile.in (libiberty_h): New.
10321 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10322 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10323
10324 2012-08-23 Yao Qi <yao@codesourcery.com>
10325
10326 * server.h: Remove declaration of 'xsnprintf'.
10327
10328 2012-08-22 Keith Seitz <keiths@redhat.com>
10329
10330 * server.h: Include build-gnulib-gbserver/config.h.
10331 * gdbreplay.c: Likewise.
10332
10333 2012-08-08 Doug Evans <dje@google.com>
10334
10335 * Makefile.in (SFILES): Add gdb_vecs.c.
10336 (OBS): Add gdb_vecs.o.
10337 (gdb_vecs_h, host_defs_h): New variables.
10338 (thread-db.o): Add $(gdb_vecs_h) dependency.
10339 (gdb_vecs.o): New rule.
10340 * thread-db.c: #include "gdb_vecs.h".
10341 (thread_db_load_search): Use a vector to iterate over path elements.
10342 Handle text appearing after "$pdir".
10343
10344 * configure.ac: Add check for strstr.
10345 * config.in: Regenerate.
10346 * configure: Regenerate.
10347
10348 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10349
10350 * hostio.c (handle_pread): If pread fails, fall back to attempting
10351 lseek/read.
10352 (handle_pwrite): Likewise for pwrite.
10353
10354 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10355
10356 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10357 between unsupported TYPE and unimplementable ADDR/LEN combination.
10358 (arm_insert_point): Act on new return value.
10359
10360 2012-07-31 Pedro Alves <palves@redhat.com>
10361
10362 * server.c (process_point_options): Only skip tokens if we find
10363 one that is unrecognized. Don't treat 'X' specially while
10364 skipping unrecognized tokens.
10365
10366 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10367
10368 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10369 to 4-byte-align HW breakpoint addresses for Thumb.
10370
10371 2012-07-27 Yao Qi <yao@codesourcery.com>
10372
10373 PR remote/14161.
10374
10375 * server.h: Declare gdb_agent_about_to_close.
10376 * target.c (kill_inferior): Include "agent.h".
10377 New. Send command 'kill'.
10378 * target.h (kill_inferior): Removed macro.
10379 * tracepoint.c (gdb_agent_about_to_close): New.
10380 (gdb_agent_helper_thread): Handle command 'close'.
10381 Wait endlessly until the inferior stops.
10382 Install gdb_agent_remove_socket to atexit hook.
10383 (agent_socket_name): New static variable.
10384 (gdb_agent_socket_init): Replace local variable 'name' with
10385 'agent_socket_name'.
10386 (gdb_agent_remove_socket): New.
10387
10388 2012-07-27 Yao Qi <yao@codesourcery.com>
10389
10390 * server.c (process_point_options): Stop at 'X' when parsing.
10391
10392 2012-07-19 Michael Eager <eager@eagercon.com>
10393
10394 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10395 to hw_execute.
10396 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10397 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10398 hardware breakpoint.
10399
10400 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10401
10402 * gdbserver/linux-low.c (initialize_low): Call
10403 linux_ptrace_init_warnings.
10404
10405 2012-07-02 Doug Evans <dje@google.com>
10406
10407 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10408 pointer to int.
10409
10410 2012-07-02 Stan Shebs <stan@codesourcery.com>
10411
10412 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10413 (ax.o): Add it to build rule.
10414 (ax-ipa.o): Ditto.
10415 (OBS): Add format.o.
10416 (IPA_OBS): Add format.o.
10417 * server.c (handle_query): Claim support for breakpoint commands.
10418 (process_point_options): Add command case.
10419 (process_serial_event): Leave running if there are printfs in
10420 effect.
10421 * mem-break.h (any_persistent_commands): Declare.
10422 (add_breakpoint_commands): Declare.
10423 (gdb_no_commands_at_breakpoint): Declare.
10424 (run_breakpoint_commands): Declare.
10425 * mem-break.c (struct point_command_list): New struct.
10426 (struct breakpoint): New field command_list.
10427 (any_persistent_commands): New function.
10428 (add_commands_to_breakpoint): New function.
10429 (add_breakpoint_commands): New function.
10430 (gdb_no_commands_at_breakpoint): New function.
10431 (run_breakpoint_commands): New function.
10432 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10433 locally.
10434 * ax.c: Include format.h.
10435 (ax_printf): New function.
10436 (gdb_eval_agent_expr): Add printf opcode.
10437
10438 2012-06-13 Yao Qi <yao@codesourcery.com>
10439
10440 * server.c (start_inferior): Remove duplicated writes to fields
10441 'last_resume_kind' and 'last_status' of 'current_inferior'.
10442
10443 2012-06-12 Yao Qi <yao@codesourcery.com>
10444 Pedro Alves <palves@redhat.com>
10445
10446 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10447 comment.
10448 * server.c (handle_v_cont): Extend comment.
10449
10450 2012-06-11 Yao Qi <yao@codesourcery.com>
10451
10452 * linux-low.c (linux_attach): Add 'static'.
10453
10454 2012-06-06 Yao Qi <yao@codesourcery.com>
10455
10456 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10457
10458 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10459
10460 Fix gcc -flto compilation warning.
10461 * server.c (main): Make variable multi_mode and attach volatile.
10462
10463 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10464
10465 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10466 if the platform doesn't know about it.
10467
10468 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10469
10470 * Makefile.in (SFILES): Add linux-tile-low.c.
10471 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10472 * configure.srv: Handle tilegx-*-linux*.
10473 * linux-tile-low.c: New file.
10474
10475 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10476
10477 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10478
10479 2012-05-24 Pedro Alves <palves@redhat.com>
10480
10481 PR gdb/7205
10482
10483 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10484
10485 2012-05-24 Pedro Alves <palves@redhat.com>
10486
10487 PR gdb/7205
10488
10489 Replace target_signal with gdb_signal throughout.
10490
10491 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10492
10493 * linux-low.c (linux_store_registers): Avoid the copying sequence
10494 when no data has been retrieved by ptrace.
10495
10496 2012-05-22 Will Deacon <will.deacon@arm.com>
10497
10498 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10499 Include asm/ptrace.h.
10500 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10501 already defined.
10502
10503 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10504
10505 * linux-low.c (linux_store_registers): Don't re-retrieve data
10506 with ptrace that has already been obtained from /proc. Always
10507 copy any data retrieved with ptrace to the buffer supplied.
10508
10509 2012-05-11 Yao Qi <yao@codesourcery.com>
10510 Pedro Alves <palves@redhat.com>
10511
10512 * linux-low.c (enum stopping_threads_kind): New.
10513 (stopping_threads): Change type to `enum stopping_threads_kind'.
10514 (handle_extended_wait): If stopping and suspending threads, leave
10515 the new_lwp suspended too.
10516 (linux_wait_for_event): Adjust.
10517 (stop_all_lwps): Set `stopping_threads' to
10518 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10519 whether we're suspending threads or just stopping them. Assert no
10520 recursion happens.
10521
10522 2012-04-29 Yao Qi <yao@codesourcery.com>
10523
10524 * server.h: Move some code to ...
10525 * gdbthread.h: ... here. New.
10526 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10527 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10528 (nto-low.o, win32-low.o): Likewise.
10529 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10530 * regcache.c, remote-utils.c, server.c: Likewise.
10531 * target.c, tracepoint.c, win32-low.c: Likewise.
10532
10533 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10534
10535 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10536 (PTRACE_ARG4_TYPE): Likewise.
10537 (PTRACE_XFER_TYPE): Likewise.
10538 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10539 ptrace to PTRACE_ARG3_TYPE.
10540 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10541 (PTRACE_ARG4_TYPE): Likewise.
10542 (PTRACE_XFER_TYPE): Likewise.
10543 (linux_detach_one_lwp): Cast fourth argument of
10544 ptrace to long then PTRACE_ARG4_TYPE.
10545 (regsets_fetch_inferior_registers): Cast third argument of
10546 ptrace to long then PTRACE_ARG3_TYPE.
10547 (regsets_store_inferior_registers): Likewise.
10548
10549 2012-04-20 Pedro Alves <palves@redhat.com>
10550
10551 * configure: Regenerate.
10552
10553 2012-04-19 Pedro Alves <palves@redhat.com>
10554
10555 * Makefile.in (GNULIB_BUILDDIR): New.
10556 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10557 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10558 (all, install-only, uninstall, clean-info, all-lib, clean): No
10559 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10560 (maintainer-clean realclean distclean): Use subdir_do.
10561 (subdir_do): New.
10562 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10563 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10564 * acinclude.m4: Include acx_configure_dir.m4.
10565 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10566 calls. Call AC_PROG_RANLIB. Configure gnulib using
10567 ACX_CONFIGURE_DIR.
10568 (GNULIB): New.
10569 (GNULIB_STDINT_H): Adjust.
10570 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10571 * gdbreplay.c: Include build-gnulib/config.h.
10572 * server.h: Likewise.
10573 * aclocal.m4: Regenerate.
10574 * config.in: Regenerate.
10575 * configure: Regenerate.
10576
10577 2012-04-19 Pedro Alves <palves@redhat.com>
10578
10579 * Makefile.in (LIBGNU, INCGNU): Adjust.
10580 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10581 (all, install-only, uninstall, clean-info, all-lib, clean)
10582 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10583 * configure.ac: Adjust AC_OUTPUT output.
10584 * aclocal.m4: Regenerate.
10585 * configure: Regenerate.
10586
10587 2012-04-19 Pedro Alves <palves@redhat.com>
10588
10589 * Makefile.in (generated_files): New.
10590 (server_h): Remove the explicit dependency on config.h, and depend
10591 on $generated_files.
10592
10593 2012-04-19 Pedro Alves <palves@redhat.com>
10594
10595 * Makefile.in (INCGNU): Add -Ignulib.
10596
10597 2012-04-19 Pedro Alves <palves@redhat.com>
10598
10599 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10600 (INCGNU): ... this, and spell out -I here.
10601 (GNULIB_LIB): Rename to ...
10602 (LIBGNU): ... this.
10603 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10604
10605 2012-04-19 Pedro Alves <palves@redhat.com>
10606
10607 * config.in: Regenerate.
10608
10609 2012-04-19 Pedro Alves <palves@redhat.com>
10610
10611 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10612 * server.h (memmem): Remove declaration.
10613 * config.in: Regenerate.
10614 * configure: Regenerate.
10615
10616 2012-04-19 Yao Qi <yao@codesourcery.com>
10617
10618 * Makefile.in (SFILES): Add common/vec.c.
10619 (OBS): Add vec.o.
10620 (vec.o): New rule.
10621
10622 2012-04-19 Yao Qi <yao@codesourcery.com>
10623
10624 * remote-utils.c (prepare_resume_reply): Replace with macro
10625 target_core_of_thread.
10626 * server.c (handle_qxfer_threads_proper): Likewise.
10627 * target.h (traget_core_of_thread): New macro.
10628
10629 2012-04-18 Pedro Alves <palves@redhat.com>
10630
10631 * aclocal.m4: Regenerate.
10632 * configure: Regenerate.
10633
10634 2012-04-16 Yao Qi <yao@codesourcery.com>
10635
10636 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10637 duplicated on address.
10638
10639 2012-04-16 Yao Qi <yao@codesourcery.com>
10640
10641 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10642 (struct tracepoint_action_ops) <send>: New field.
10643 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10644 (agent_expr_send, x_tracepoint_action_send): New.
10645 (l_tracepoint_action_send): New.
10646 (cmd_qtdp): Download and install tracepoint
10647 according to `use_agent'.
10648 (run_inferior_command): Add one more parameter `len'.
10649 Update callers.
10650 (tracepoint_send_agent): New.
10651 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10652
10653 2012-04-16 Yao Qi <yao@codesourcery.com>
10654
10655 * tracepoint.c (download_tracepoints): Moved to ...
10656 (cmd_qtstart): ... here.
10657
10658 2012-04-14 Yao Qi <yao@codesourcery.com>
10659
10660 * tracepoint.c: Include inttypes.h.
10661 (struct collect_memory_action): Use sized types.
10662 (struct tracepoint): Likewise.
10663 (cmd_qtdp, stop_tracing): Update print specifiers.
10664 (cmd_qtp, response_tracepoint): Likewise.
10665 (collect_data_at_tracepoint): Likewise.
10666 (collect_data_at_step): Likewise.
10667
10668 2012-04-14 Yao Qi <yao@codesourcery.com>
10669
10670 Import gnulib module inttypes.
10671 * aclocal.m4, config.in, configure: Regenerated.
10672
10673 2012-04-14 Yao Qi <yao@codesourcery.com>
10674
10675 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10676 Makefile and config.status at last.
10677
10678 2012-04-13 Yao Qi <yao@codesourcery.com>
10679
10680 * tracepoint.c: Include stdint.h unconditionally.
10681
10682 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10683
10684 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10685 on BFD_HAVE_SYS_PROCFS_TYPE.
10686 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10687 * configure: Regenerate.
10688 * config.in: Likewise.
10689
10690 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10691
10692 * Makefile.in (clean): Also remove x32.c x32-linux.c
10693 x32-avx.c x32-avx-linux.c.
10694 (x32.o): New target.
10695 (x32.c): Likewise.
10696 (x32-linux.o): Likewise.
10697 (x32-linux.c): Likewise.
10698 (x32-avx.o): Likewise.
10699 (x32-avx.c): Likewise.
10700 (x32-avx-linux.o): Likewise.
10701 (x32-avx-linux.c): Likewise.
10702
10703 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10704 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10705 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10706 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10707 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10708 i386/x32-avx-linux.xml.
10709
10710 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10711 (init_registers_x32_avx_linux): Likwise.
10712 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10713 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10714
10715 2012-04-13 Pedro Alves <palves@redhat.com>
10716
10717 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10718 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10719 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10720 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10721 the sub-make.
10722
10723 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10724
10725 * linux-x86-low.c (compat_x32_clock_t): New.
10726 (compat_x32_siginfo_t): Likewise.
10727 (compat_x32_siginfo_from_siginfo): Likewise.
10728 (siginfo_from_compat_x32_siginfo): Likewise.
10729 (linux_is_elf64): Likewise.
10730 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10731 and siginfo_from_compat_x32_siginfo for x32.
10732 (x86_arch_setup): Set linux_is_elf64.
10733
10734 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10735
10736 PR gdb/13969
10737 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10738 e_machine field.
10739 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10740 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10741 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10742 compatible with process.
10743
10744 2012-04-12 Yao Qi <yao@codesourcery.com>
10745
10746 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10747 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10748 (install-only, install-info, clean): Handle sub dir gnulib.
10749 (all-lib, am--refresh): New targets.
10750 (memmem.o): Remove target.
10751 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10752 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10753 (AC_REPLACE_FUNCS): Remove memmem.
10754 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10755 (AC_OUTPUT): Generate Makefile in gnulib/.
10756 * aclocal.m4, config.in, configure: Regenerated.
10757
10758 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10759
10760 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10761
10762 2012-04-05 Pedro Alves <palves@redhat.com>
10763
10764 -Werror=strict-aliasing
10765
10766 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10767 pointer.
10768
10769 2012-04-04 Pedro Alves <palves@redhat.com>
10770
10771 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10772 (sparc_store_gregset_from_stack, sparc_store_gregset)
10773 (sparc_breakpoint_at): Fix formatting.
10774
10775 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10776
10777 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10778 are available.
10779 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10780 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10781 * config.in: Regenerate.
10782 * configure: Likewise.
10783
10784 2012-03-29 Pedro Alves <palves@redhat.com>
10785
10786 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10787 Correct ptrace arguments.
10788
10789 2012-03-28 Pedro Alves <palves@redhat.com>
10790
10791 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10792 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10793 (IA64_FR1_REGNUM): New defines.
10794 (ia64_fetch_register): New.
10795 (the_low_target): Install it.
10796 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10797 field.
10798 * linux-low.c (linux_fetch_registers): Try the
10799 the_low_target.fetch_register hook first.
10800
10801 * linux-arm-low.c (the_low_target): Adjust.
10802 * linux-bfin-low.c (the_low_target): Adjust.
10803 * linux-cris-low.c (the_low_target): Adjust.
10804 * linux-crisv32-low.c (the_low_target): Adjust.
10805 * linux-m32r-low.c (the_low_target): Adjust.
10806 * linux-m68k-low.c (the_low_target): Adjust.
10807 * linux-mips-low.c (the_low_target): Adjust.
10808 * linux-ppc-low.c (the_low_target): Adjust.
10809 * linux-s390-low.c (the_low_target): Adjust.
10810 * linux-sh-low.c (the_low_target): Adjust.
10811 * linux-sparc-low.c (the_low_target): Adjust.
10812 * linux-tic6x-low.c (the_low_target): Adjust.
10813 * linux-x86-low.c (the_low_target): Adjust.
10814 * linux-xtensa-low.c (the_low_target): Adjust.
10815
10816 2012-03-26 Pedro Alves <palves@redhat.com>
10817
10818 * server.c (handle_qxfer_libraries): Don't bail early if
10819 the_target->qxfer_libraries_svr4 is not NULL.
10820
10821 2012-03-26 Pedro Alves <palves@redhat.com>
10822
10823 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10824
10825 2012-03-23 Pedro Alves <palves@redhat.com>
10826
10827 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10828 "library-list-svr4" element's start tag when the the DSO list is
10829 empty.
10830
10831 2012-03-23 Pedro Alves <palves@redhat.com>
10832
10833 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10834 a variable whose type size is the same as the inferior's pointer
10835 size.
10836
10837 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10838
10839 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10840 struct siginfo.
10841 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10842 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10843 * linux-low.h: Include <signal.h>.
10844 (struct siginfo): Remove forward declaration.
10845 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10846 struct siginfo.
10847
10848 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10849
10850 * .gitignore: Ignore more files.
10851
10852 2012-03-19 Pedro Alves <palves@redhat.com>
10853 Jan Kratochvil <jan.kratochvil@redhat.com>
10854
10855 * server.c (cont_thread, general_thread): Add describing comments.
10856 (start_inferior): Clear `cont_thread'.
10857 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10858 of a process.
10859
10860 2012-03-15 Yao Qi <yao@codesourcery.com>
10861
10862 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10863 handling to ...
10864 (cmd_qtdp): ... here.
10865
10866 2012-03-15 Yao Qi <yao@codesourcery.com>
10867
10868 * tracepoint.c (struct tracepoint_action_ops): New.
10869 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10870 (m_tracepoint_action_download): New.
10871 (r_tracepoint_action_download): New.
10872 (x_tracepoint_action_download): New.
10873 (l_tracepoint_action_download): New.
10874 (add_tracepoint_action): Install `action->ops' according type.
10875 (download_tracepoint_1): Move code `download' function pointer
10876 of various tracepoint_action_ops.
10877
10878 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10879
10880 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10881 linux_ptrace_attach_warnings.
10882
10883 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10884
10885 * Makefile.in (linux-ptrace.o): New.
10886 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10887 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10888 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10889 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10890 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10891 of these targets.
10892 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10893
10894 2012-03-08 Yao Qi <yao@codesourcery.com>
10895 Pedro Alves <palves@redhat.com>
10896
10897 Fix PR server/13392.
10898 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10899 offset of JMP insn.
10900 * tracepoint.c (remove_tracepoint): New.
10901 (cmd_qtdp): Call remove_tracepoint when failed to install.
10902
10903 2012-03-07 Pedro Alves <palves@redhat.com>
10904
10905 * linux-low.c (get_detach_signal): New.
10906 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10907 Pass on pending signals to PTRACE_DETACH. Check the result of the
10908 ptrace call.
10909 * server.c (program_signals, program_signals_p): New.
10910 (handle_general_set): Handle QProgramSignals.
10911 * server.h (program_signals, program_signals_p): Declare.
10912
10913 2012-03-05 Pedro Alves <palves@redhat.com>
10914 Jan Kratochvil <jan.kratochvil@redhat.com>
10915
10916 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10917 New comment why.
10918
10919 2012-03-03 Yao Qi <yao@codesourcery.com>
10920
10921 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10922 agent_look_up_symbols.
10923
10924 2012-03-03 Yao Qi <yao@codesourcery.com>
10925
10926 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10927 (linux-x86-low.o): Likewise.
10928 * server.h: Remove in_process_agent_loaded.
10929 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10930 common/agent.c.
10931 Update callers.
10932
10933 2012-03-03 Yao Qi <yao@codesourcery.com>
10934
10935 * tracepoint.c (gdb_agent_capability): New global.
10936 (in_process_agent_loaded_ust): Renamed to
10937 `in_process_agent_supports_ust'.
10938 Update callers.
10939 (in_process_agent_supports_ust): Call agent_capability_check.
10940 (clear_installed_tracepoints): Assert that agent supports
10941 agent.
10942
10943 2012-03-03 Yao Qi <yao@codesourcery.com>
10944
10945 * linux-low.c (linux_supports_agent): New.
10946 (linux_target_ops): Initialize field `supports_agent' with
10947 linux_supports_agent.
10948 * target.h (struct target_ops) <supports_agent>: New.
10949 (target_supports_agent): New macro.
10950 * server.c (handle_general_set): Handle packet 'QAgent'.
10951 (handle_query): Send `QAgent+'.
10952 * Makefile.in (server.o): Depends on agent.h.
10953
10954 2012-03-03 Yao Qi <yao@codesourcery.com>
10955
10956 * Makefile.in (OBS): Add agent.o.
10957 Add new rule for agent.o.
10958 Track dependence of tracepoint.c on agent.h.
10959 * tracepoint.c (run_inferior_command_1):
10960 (run_inferior_command): Call agent_run_command.
10961 (gdb_ust_connect_sync_socket): Deleted. Move it to
10962 common/agent.c.
10963 (resume_thread, stop_thread): Likewise.
10964 (gdb_ust_socket_init): Renamed to ...
10965 (gdb_agent_socket_init): ... New.
10966 (gdb_ust_thread): Renamed to ...
10967 (gdb_agent_helper_thread): ... New.
10968 (gdb_ust_init): Move some code to ...
10969 (gdb_agent_init): ... here. New.
10970 [HAVE_UST]: Call gdb_ust_init.
10971 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10972 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10973 * config.in, configure: Regenerated.
10974
10975 2012-03-02 Pedro Alves <palves@redhat.com>
10976
10977 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10978 * linux-low.c (struct simple_pid_list): New.
10979 (stopped_pids): New a struct simple_pid_list pointer.
10980 (add_to_pid_list, pull_pid_from_list): New.
10981 (handle_extended_wait): Don't assume the first signal new children
10982 report is SIGSTOP. Adjust call to pull_pid_from_list.
10983 (linux_wait_for_lwp): Adjust.
10984
10985 2012-03-02 Yao Qi <yao@codesourcery.com>
10986
10987 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10988 debug log.
10989
10990 2012-03-02 Yao Qi <yao@codesourcery.com>
10991
10992 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10993 `stop_pc' and `tpoint'. Update caller.
10994
10995 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10996
10997 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10998 * linux-low.c (use_linux_regsets): New macro.
10999 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11000 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11001 (linux_register_in_regsets): New function.
11002 (usr_fetch_inferior_registers): Skip registers covered by
11003 regsets.
11004 (usr_store_inferior_registers): Likewise.
11005 (usr_fetch_inferior_registers): New macro.
11006 (usr_store_inferior_registers): Likewise.
11007 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11008 (linux_store_registers): Likewise.
11009 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11010 prototype.
11011 (init_registers_mips64_dsp_linux): Likewise.
11012 (init_registers_mips_linux): New macro.
11013 (init_registers_mips_dsp_linux): Likewise.
11014 (mips_dsp_num_regs): Likewise.
11015 (DSP_BASE, DSP_CONTROL): New fallback macros.
11016 (mips_base_regs): New macro.
11017 (mips_regmap): Use it. Fix the size.
11018 (mips_dsp_regmap): New variable.
11019 (mips_dsp_regset_bitmap): Likewise.
11020 (mips_arch_setup): New function.
11021 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11022 than mips_regmap.
11023 (mips_cannot_store_register): Likewise.
11024 (the_low_target): Update .arch_setup, .num_regs and .regmap
11025 initializers. Add .regset_bitmap initializer.
11026 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11027 initializer.
11028 * linux-bfin-low.c (the_low_target): Likewise.
11029 * linux-cris-low.c (the_low_target): Likewise.
11030 * linux-crisv32-low.c (the_low_target): Likewise.
11031 * linux-ia64-low.c (the_low_target): Likewise.
11032 * linux-m32r-low.c (the_low_target): Likewise.
11033 * linux-m68k-low.c (the_low_target): Likewise.
11034 * linux-ppc-low.c (the_low_target): Likewise.
11035 * linux-s390-low.c (the_low_target): Likewise.
11036 * linux-sh-low.c (the_low_target): Likewise.
11037 * linux-sparc-low.c (the_low_target): Likewise.
11038 * linux-tic6x-low.c (the_low_target): Likewise.
11039 * linux-x86-low.c (the_low_target): Likewise.
11040 * linux-xtensa-low.c (the_low_target): Likewise.
11041 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11042 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11043 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11044 srv_xmlfiles.
11045 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11046 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11047
11048 2012-02-29 Yao Qi <yao@codesourcery.com>
11049 Pedro Alves <palves@redhat.com>
11050
11051 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11052 `step_over_finished' is true.
11053
11054 2012-02-27 Pedro Alves <palves@redhat.com>
11055
11056 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11057 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11058
11059 2012-02-27 Pedro Alves <palves@redhat.com>
11060
11061 PR server/9684
11062 * linux-low.c (pid_is_stopped): New.
11063 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11064
11065 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11066
11067 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11068 of conditions.
11069
11070 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11071
11072 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11073
11074 2012-02-24 Luis Machado <lgustavo@codesourcery>
11075
11076 * server.c (handle_query): Advertise support for target-side
11077 breakpoint condition evaluation.
11078 (process_point_options): New function.
11079 (process_serial_event): When inserting a breakpoint, check for
11080 a target-side condition that should be evaluated.
11081
11082 * mem-break.c: Include regcache.h and ax.h.
11083 (point_cond_list_t): New data structure.
11084 (breakpoint) <cond_list>: New field.
11085 (find_gdb_breakpoint_at): Make non-static.
11086 (delete_gdb_breakpoint_at): Clear any target-side
11087 conditions.
11088 (clear_gdb_breakpoint_conditions): New function.
11089 (add_condition_to_breakpoint): Likewise.
11090 (add_breakpoint_condition): Likewise.
11091 (gdb_condition_true_at_breakpoint): Likewise.
11092 (gdb_breakpoint_here): Return result directly instead
11093 of going through a local variable.
11094
11095 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11096 (clear_gdb_breakpoint_conditions): Likewise.
11097 (add_breakpoint_condition): Likewise.
11098 (gdb_condition_true_at_breakpoint): Likewise.
11099
11100 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11101 (need_step_over_p): Take target-side breakpoint condition into
11102 consideration.
11103
11104 2012-02-24 Luis Machado <lgustavo@codesourcery>
11105
11106 * server.h: Include tracepoint.h.
11107 (agent_mem_read, agent_get_trace_state_variable_value,
11108 agent_set_trace_state_variable_value,
11109 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11110 get_set_tsv_func_addr): New prototypes.
11111
11112 * ax.h: New include file.
11113 * ax.c: New source file.
11114
11115 * tracepoint.c: Include ax.h.
11116 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11117 agent_expr, eval_result_type): Move to ax.h.
11118 (parse_agent_expr): Rename to ...
11119 (gdb_parse_agent_expr): ... this, make it non-static and move
11120 to ax.h.
11121 (unparse_agent_expr) Rename to ...
11122 (gdb_unparse_agent_expr): ... this, make it non-static and move
11123 to ax.h.
11124 (eval_agent_expr): Rename to ...
11125 (eval_tracepoint_agent_expr): ... this.
11126 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11127 forward declarations.
11128 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11129 (agent_get_trace_state_variable_value): New function.
11130 (agent_set_trace_state_variable_value): New function.
11131 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11132 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11133 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11134 (condition_true_at_tracepoint): Likewise.
11135 (parse_agent_expr): Rename to ...
11136 (gdb_parse_agent_expr): ... this and move to ax.c.
11137 (unparse_agent_expr): Rename to ...
11138 (gdb_unparse_agent_expr): ... this and move to ax.c.
11139 (gdb_agent_op_name): Move to ax.c.
11140 (eval_agent_expr): Rename to ...
11141 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11142 and move to ax.c.
11143 (eval_tracepoint_agent_expr): New function.
11144 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11145 non-static.
11146 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11147 ax.c.
11148 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11149 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11150 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11151 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11152 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11153 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11154 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11155 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11156 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11157 (compile_bytecodes): Remove forward declaration.
11158 (is_goto_target): Move to ax.c.
11159 (compile_bytecodes): Move to ax.c and call
11160 agent_get_trace_state_variable_value (...) and
11161 agent_set_trace_state_variable_value (...).
11162
11163 * Makefile.in: Update ax.c and IPA dependencies.
11164
11165 2012-02-24 Pedro Alves <palves@redhat.com>
11166
11167 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11168 (cmd_bigqtbuffer_circular): ... this. Only handle
11169 'QTBuffer:circular:'.
11170 (handle_tracepoint_general_set): Adjust.
11171
11172 2012-02-16 Yao Qi <yao@codesourcery.com>
11173
11174 * inferiors.c: Move code to ...
11175 * dll.c: .... here. New.
11176 * server.h: Declare clear_dlls.
11177 * Makefile.in (SFILES): Add dll.c.
11178 (OBS): Add dll.o
11179 (dll.o): New rule.
11180
11181 2012-02-11 Yao Qi <yao@codesourcery.com>
11182
11183 * server.c: (handle_monitor_command): Add a new parameter
11184 `own_buf'.
11185 (handle_query): Update caller.
11186
11187 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11188
11189 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11190 * configure, config.in: Regenerate.
11191 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11192 is not defined.
11193
11194 2012-02-02 Pedro Alves <palves@redhat.com>
11195
11196 Try SIGKILL first, then PTRACE_KILL.
11197 * linux-low.c (linux_kill_one_lwp): New.
11198 (linux_kill_one_lwp): Rename to ...
11199 (kill_one_lwp_callback): ... this. Use the new
11200 linux_kill_one_lwp.
11201
11202 2012-02-02 Pedro Alves <palves@redhat.com>
11203
11204 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11205 inferior.
11206
11207 2012-01-27 Pedro Alves <palves@redhat.com>
11208
11209 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11210 (elf_64_file_p): Make static.
11211 (linux_pid_exe_is_elf_64_file): New.
11212 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11213 Delete declarations.
11214 (linux_pid_exe_is_elf_64_file): Declare.
11215 * linux-x86-low.c (x86_arch_setup): Use
11216 linux_pid_exe_is_elf_64_file.
11217
11218 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11219
11220 * linux-low.c (linux_wait_for_event_1): Rename to ...
11221 (linux_wait_for_event): ... here and merge it with former
11222 linux_wait_for_event - new variable wait_ptid, use it.
11223 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11224
11225 2012-01-23 Pedro Alves <palves@redhat.com>
11226
11227 * server.c (main): Avoid yet another case of infinite loop while
11228 detaching/killing after a longjmp.
11229
11230 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11231
11232 Code cleanup.
11233 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11234
11235 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11236
11237 * hostio.c (handle_readlink): New function.
11238 (handle_vFile): Call it to handle "vFile:readlink" packets.
11239
11240 2012-01-20 Pedro Alves <palves@redhat.com>
11241 Ulrich Weigand <ulrich.weigand@linaro.org>
11242
11243 * server.c (handle_v_requests): Only support vAttach and vRun to
11244 start multiple processes when in extended protocol mode.
11245
11246 2012-01-17 Pedro Alves <palves@redhat.com>
11247
11248 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11249 memalign plus mprotect to allocate the scratch buffer.
11250
11251 2012-01-13 Pedro Alves <palves@redhat.com>
11252
11253 * server.c (attach_inferior): Clear `cont_thread'.
11254
11255 2012-01-13 Pedro Alves <palves@redhat.com>
11256
11257 * server.c (main): Avoid infinite loop while detaching/killing
11258 after a longjmp.
11259
11260 2012-01-09 Doug Evans <dje@google.com>
11261
11262 * server.c (start_inferior): Set last_ptid in --wrapper case.
11263
11264 2012-01-06 Yao Qi <yao@codesourcery.com>
11265
11266 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11267 defined.
11268 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11269
11270 2012-01-04 Yao Qi <yao@codesourcery.com>
11271
11272 * tracepoint.c (cmd_qtdp): Print debug message
11273 for static tracepoint.
11274
11275 2012-01-04 Yao Qi <yao@codesourcery.com>
11276
11277 * tracepoint.c (trace_vdebug): Differentiate debug message
11278 between gdbserver and IPA.
11279
11280 2012-01-03 Yao Qi <yao@codesourcery.com>
11281
11282 * tracepoint.c (tracepoint_was_hit): Don't collect for
11283 static tracepoint.
11284
11285 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11286
11287 * terminal.h: Reformat copyright header.
11288
11289 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11290
11291 * server.c (gdbserver_version): Update copyright year.
11292 * gdbreplay.c (gdbreplay_version): Likewise.
11293
11294 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11295
11296 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11297
11298 Revert:
11299 2011-12-18 Hui Zhu <teawater@gmail.com>
11300 * linux-low.c (linux_create_inferior): Save return value to ret.
11301
11302 2011-12-18 Hui Zhu <teawater@gmail.com>
11303
11304 * linux-low.c (linux_create_inferior): Save return value to ret.
11305
11306 2011-12-16 Doug Evans <dje@google.com>
11307
11308 * linux-low.c (linux_create_inferior): If stdio connection,
11309 redirect stdin from /dev/null, stdout to stderr.
11310 * remote-utils.c (remote_is_stdio): New static global.
11311 (remote_connection_is_stdio): New function.
11312 (remote_prepare): Handle stdio connection.
11313 (remote_open): Ditto.
11314 (remote_close): Don't close stdin for stdio connections.
11315 (read_prim,write_prim): New functions. Replace all calls to
11316 read/write to these.
11317 * server.c (main): Watch for "-" argument. Move call to
11318 remote_prepare before start_inferior.
11319 * server.h (STDIO_CONNECTION_NAME): New macro.
11320 (remote_connection_is_stdio): Declare.
11321
11322 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11323 in debugging output.
11324
11325 2011-12-15 Yao Qi <yao@codesourcery.com>
11326
11327 * tracepoint.c: Include sys/syscall.h.
11328 (gdb_ust_thread): Remove preprocessor conditional.
11329
11330 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11331
11332 * linux-low.c (linux_detach_one_lwp): Call
11333 the_low_target.prepare_to_resume before detaching.
11334
11335 2011-12-14 Yao Qi <yao@codesourcery.com>
11336
11337 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11338 of write.
11339
11340 2011-12-14 Yao Qi <yao@codesourcery.com>
11341
11342 * i386-low.c (i386_low_stopped_data_address): Initialize local
11343 variable `control'.
11344
11345 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11346
11347 PR remote/13492
11348
11349 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11350 DR_CONTROL unless necessary. Extend comments.
11351 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11352 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11353
11354 2011-12-13 Yao Qi <yao@codesourcery.com>
11355
11356 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11357 macros.
11358 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11359
11360 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11361
11362 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11363 Print new debug message for such case.
11364
11365 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11366
11367 Fix overlapping memcpy.
11368 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11369 the read_inferior_memory transfer.
11370 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11371 write_inferior_memory transfer.
11372 (set_fast_tracepoint_jump): New variable buf. Use it for the
11373 read_inferior_memory and write_inferior_memory transfers.
11374 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11375 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11376 Use it for the write_inferior_memory transfer.
11377 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11378 buffers.
11379
11380 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11381
11382 * linux-low.c (fetch_register, store_register): Make code
11383 consistent, fix formatting.
11384
11385 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11386
11387 * linux-low.c (usr_store_inferior_registers): Factor out code
11388 to handle individual registers into...
11389 (store_register): ... this new function.
11390
11391 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11392
11393 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11394 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11395 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11396 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11397 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11398 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11399 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11400 (srv_xmlfiles): Add new XML files.
11401
11402 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11403 and <sys/uio.h>.
11404 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11405 (init_registers_s390_linux32v1): Add prototype.
11406 (init_registers_s390_linux32v2): Likewise.
11407 (init_registers_s390_linux64v1): Likewise.
11408 (init_registers_s390_linux64v2): Likewise.
11409 (init_registers_s390x_linux64v1): Likewise.
11410 (init_registers_s390x_linux64v2): Likewise.
11411 (s390_num_regs): Increment to 52.
11412 (s390_regmap): Add orig_r2 register.
11413 (s390_num_regs_3264): Increment to 68.
11414 (s390_regmap_3264): Add orig_r2 register.
11415 (s390_collect_ptrace_register): Handle orig_r2 register.
11416 (s390_supply_ptrace_register): Likewise.
11417 (s390_fill_last_break): New function.
11418 (s390_store_last_break): Likewise.
11419 (s390_fill_system_call): New function.
11420 (s390_store_system_call): Likewise.
11421 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11422 register sets.
11423 (s390_check_regset): New function.
11424 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11425 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11426 Update target_regsets for available register sets.
11427
11428 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11429 Jan Kratochvil <jan.kratochvil@redhat.com>
11430
11431 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11432 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11433 New.
11434 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11435 * linux-low.h (struct process_info_private): New member r_debug.
11436 * server.c (handle_qxfer_libraries): Call
11437 the_target->qxfer_libraries_svr4.
11438 (handle_qxfer_libraries_svr4): New function.
11439 (qxfer_packets): New entry "libraries-svr4".
11440 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11441 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11442 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11443 PACKET_qXfer_libraries_svr4.
11444
11445 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11446
11447 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11448 PSW address/mask between 8-byte and 16-byte formats.
11449 (s390_supply_ptrace_register): Likewise.
11450 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11451 basic addressing mode bit.
11452
11453 2011-11-24 Stan Shebs <stan@codesourcery.com>
11454
11455 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11456
11457 2011-11-17 Stan Shebs <stan@codesourcery.com>
11458
11459 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11460 (tracing_start_time): New global.
11461 (tracing_stop_time): New global.
11462 (tracing_user_name): New global.
11463 (tracing_notes): New global.
11464 (tracing_stop_note): New global.
11465 (cmd_qtstart): Set traceframe_usage, start_time.
11466 (stop_tracing): Set stop_time.
11467 (cmd_qtstatus): Report additional status.
11468 (cmd_qtp): New function.
11469 (handle_tracepoint_query): Call it.
11470 (cmd_qtnotes): New function.
11471 (handle_tracepoint_general_set): Call it.
11472 (get_timestamp): Rename from tsv_get_timestamp.
11473
11474 2011-11-14 Stan Shebs <stan@codesourcery.com>
11475 Kwok Cheung Yeung <kcy@codesourcery.com>
11476
11477 * linux-x86-low.c (small_jump_insn): New.
11478 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11479 trampoline and error message, build a trampoline and issue a small
11480 jump instruction to it.
11481 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11482 trampoline and error message.
11483 (x86_get_min_fast_tracepoint_insn_len): New.
11484 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11485 * linux-low.h (struct linux_target_ops): Add arguments to
11486 install_fast_tracepoint_jump_pad operation, add new operation.
11487 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11488 arguments.
11489 (linux_get_min_fast_tracepoint_insn_len): New function.
11490 (linux_target_op): Add new operation.
11491 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11492 (gdb_trampoline_buffer_end): Ditto.
11493 (gdb_trampoline_buffer_error): Ditto.
11494 (struct ipa_sym_addresses): Add fields for new IPA variables.
11495 (symbol_list): Add entries for new IPA variables.
11496 (struct tracepoint): Add fields to hold the address range of the
11497 trampoline used by the tracepoint.
11498 (trampoline_buffer_head): New static variable.
11499 (trampoline_buffer_tail): Ditto.
11500 (claim_trampoline_space): New function.
11501 (have_fast_tracepoint_trampoline_buffer): New function.
11502 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11503 structure.
11504 (install_fast_tracepoint): Ditto, also add error buffer argument.
11505 (cmd_qtminftpilen): New function.
11506 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11507 (fast_tracepoint_from_trampoline_address): New function.
11508 (fast_tracepoint_collecting): Handle trampoline as part of jump
11509 pad space.
11510 (set_trampoline_buffer_space): New function.
11511 (initialize_tracepoint): Initialize new IPA variables.
11512 * target.h (struct target_ops): Add arguments to
11513 install_fast_tracepoint_jump_pad operation, add new
11514 get_min_fast_tracepoint_insn_len operation.
11515 (target_get_min_fast_tracepoint_insn_len): New.
11516 (install_fast_tracepoint_jump_pad): Add arguments.
11517 * server.h (IPA_BUFSIZ): Define.
11518 * linux-i386-ipa.c: Include extra header files.
11519 (initialize_fast_tracepoint_trampoline_buffer): New function.
11520 (initialize_low_tracepoint): Call it.
11521 * server.h (set_trampoline_buffer_space): Declare.
11522 (claim_trampoline_space): Ditto.
11523 (have_fast_tracepoint_trampoline_buffer): Ditto.
11524
11525 2011-11-14 Yao Qi <yao@codesourcery.com>
11526
11527 * server.c (handle_query): Handle InstallInTrace for qSupported.
11528 * tracepoint.c (add_tracepoint): Sort list.
11529 (install_tracepoint, download_tracepoint): New.
11530 (cmd_qtdp): Call them to install and download tracepoints.
11531 (sort_tracepoints): Removed.
11532 (cmd_qtstart): Update.
11533
11534 2011-11-14 Yao Qi <yao@codesourcery.com>
11535
11536 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11537 * mem-break.h: Declare.
11538 * tracepoint.c (cmd_qtstart): Move some code to ...
11539 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11540 New.
11541 (download_tracepoints): Move some code to ...
11542 (download_tracepoint_1): ... here. New.
11543
11544 2011-11-08 Yao Qi <yao@codesourcery.com>
11545
11546 * remote-utils.c (relocate_instruction): A comment fix.
11547
11548 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11549
11550 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11551 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11552 dr_status_mirror and dr_control_mirror from debug_reg_state.
11553 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11554 (i386_initial_stuff): Remove use of deleted globals.
11555 (i386_get_thread_context, i386_set_thread_context,
11556 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11557 from debug_reg_state.
11558
11559 2011-11-05 Yao Qi <yao@codesourcery.com>
11560
11561 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11562 address as TPOINT's.
11563
11564 2011-11-02 Stan Shebs <stan@codesourcery.com>
11565
11566 * tracepoint.c (agent_mem_read_string): New function.
11567 (eval_agent_expr): Call it for tracenz.
11568 * server.c (handle_query): Report support for tracenz.
11569
11570 2011-11-02 Yao Qi <yao@codesourcery.com>
11571
11572 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11573
11574 2011-11-02 Yao Qi <yao@codesourcery.com>
11575
11576 * target.h: Fix a typo in comment.
11577
11578 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11579
11580 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11581 clobber the breakpoints' shadows with fast tracepoint jumps.
11582 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11583 * target.c (write_inferior_memory): Also pass MYADDR down to
11584 check_mem_write.
11585
11586 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11587
11588 * configure.ac: Check support for personality routine.
11589 * configure: Regenerate.
11590 * config.in: Likewise.
11591 * linux-low.c: Include <sys/personality.h>.
11592 Define ADDR_NO_RANDOMIZE if necessary.
11593 (linux_create_inferior): Disable address space randomization when
11594 forking inferior, if requested.
11595 (linux_supports_disable_randomization): New function.
11596 (linux_target_ops): Install it.
11597 * server.h (disable_randomization): Declare.
11598 * server.c (disable_randomization): New global variable.
11599 (handle_general_set): Handle QDisableRandomization.
11600 (handle_query): Likewise for qSupported.
11601 (main): Support --disable-randomization and --no-disable-randomization
11602 command line arguments.
11603 * target.h (struct target_ops): Add supports_disable_randomization.
11604 (target_supports_disable_randomization): New macro.
11605
11606 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11607
11608 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11609 ifdef check.
11610 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11611 [!PT_GETDSBT] (target_loadmap): New definition.
11612 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11613 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11614 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11615 and PT_GETDSBT to LINUX_LOADMAP.
11616 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11617 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11618
11619 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11620
11621 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11622 (arm_linux_hwbp_cap): New static variable.
11623 (arm_linux_get_hwbp_cap): Replace by ...
11624 (arm_linux_init_hwbp_cap): ... this new function.
11625 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11626 (arm_linux_get_hw_watchpoint_count): Likewise.
11627 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11628 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11629 (arm_prepare_to_resume): Use perror_with_name instead of error.
11630
11631 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11632
11633 * linux-arm-low.c: Include <signal.h>.
11634 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11635 (struct arm_linux_hwbp_cap): New data type.
11636 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11637 (struct arm_linux_hw_breakpoint): New data type.
11638 (MAX_BPTS, MAX_WPTS): Define.
11639 (struct arch_process_info, struct arch_lwp_info): New data types.
11640 (arm_linux_get_hwbp_cap): New function.
11641 (arm_linux_get_hw_breakpoint_count): Likewise.
11642 (arm_linux_get_hw_watchpoint_count): Likewise.
11643 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11644 (arm_hwbp_control_initialize): Likewise.
11645 (arm_hwbp_control_is_enabled): Likewise.
11646 (arm_hwbp_control_is_initialized): Likewise.
11647 (arm_hwbp_control_disable): Likewise.
11648 (arm_linux_hw_breakpoint_equal): Likewise.
11649 (arm_linux_hw_point_initialize): Likewise.
11650 (struct update_registers_data): New data structure.
11651 (update_registers_callback: New function.
11652 (arm_insert_point): Likewise.
11653 (arm_remove_point): Likewise.
11654 (arm_stopped_by_watchpoint): Likewise.
11655 (arm_stopped_data_address): Likewise.
11656 (arm_new_process): Likewise.
11657 (arm_new_thread): Likewise.
11658 (arm_prepare_to_resume): Likewise.
11659 (the_low_target): Register arm_insert_point, arm_remove_point,
11660 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11661 arm_new_thread, and arm_prepare_to_resume.
11662
11663 2011-09-15 Stan Shebs <stan@codesourcery.com>
11664
11665 * server.h (struct emit_ops): Add compare-goto fields.
11666 * tracepoint.c (gdb_agent_op_sizes): New table.
11667 (emit_eq_goto): New function.
11668 (emit_ne_goto): New function.
11669 (emit_lt_goto): New function.
11670 (emit_le_goto): New function.
11671 (emit_gt_goto): New function.
11672 (emit_ge_goto): New function.
11673 (is_goto_target): New function.
11674 (compile_bytecodes): Recognize special cases of compare-goto
11675 combinations and call specialized emitters for them.
11676 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11677 (amd64_emit_ne_goto): New function.
11678 (amd64_emit_lt_goto): New function.
11679 (amd64_emit_le_goto): New function.
11680 (amd64_emit_gt_goto): New function.
11681 (amd64_emit_ge_goto): New function.
11682 (amd64_emit_ops): Add the new functions.
11683 (i386_emit_eq_goto): New function.
11684 (i386_emit_ne_goto): New function.
11685 (i386_emit_lt_goto): New function.
11686 (i386_emit_le_goto): New function.
11687 (i386_emit_gt_goto): New function.
11688 (i386_emit_ge_goto): New function.
11689 (i386_emit_ops): Add the new functions.
11690
11691 2011-09-08 Stan Shebs <stan@codesourcery.com>
11692
11693 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11694 (i386_emit_epilogue): Restore %ebx.
11695
11696 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11697
11698 * server.c (step_thread): Remove definition.
11699 (process_serial_event): Don't handle Hs.
11700 * server.h (step_thread): Remove declaration.
11701 * target.c (set_desired_inferior): Remove use of step_thread.
11702
11703 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11704
11705 * linux-low.c: Include linux-procfs.h.
11706 (linux_attach_lwp_1): Update comments.
11707 (linux_attach): Scan for existing threads when attaching to a
11708 process that is the tgid.
11709 * Makefile.in: Update dependencies.
11710
11711 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11712
11713 * configure.srv: Add linux-procfs.o dependencies.
11714
11715 2011-08-14 Yao Qi <yao@codesourcery.com>
11716
11717 * target.h (struct target_ops): Fix indent.
11718 * win32-low.c (win32_target_ops): Fix comment.
11719
11720 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11721 Yao Qi <yao@codesourcery.com>
11722
11723 * Makefile.in (clean): Remove tic6x-*.c files.
11724 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11725 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11726 (tic6x-c64xp-linux.c): Likewise.
11727 * configure.srv: Add support for tic6x-*-uclinux.
11728 * linux-tic6x-low.c: New.
11729 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11730
11731 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11732 Yao Qi <yao@codesourcery.com>
11733
11734 * target.h (struct target_ops): Add read_loadmap.
11735 * linux-low.c (struct target_loadseg): New type.
11736 (struct target_loadmap): New type.
11737 (linux_read_loadmap): New function.
11738 (linux_target_ops): Add linux_read_loadmap.
11739 * server.c (handle_query): Support qXfer:fdpic:read packet.
11740 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11741 to NULL.
11742
11743 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11744
11745 * win32-low.c: Include <stdint.h>.
11746
11747 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11748
11749 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11750 to the inferior here.
11751 (i386_remove_aligned_watchpoint): Ditto.
11752 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11753 fit part of the watchpoint in the debug registers.
11754 (i386_update_inferior_debug_regs): New.
11755 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11756 registers, and only update the inferior on success.
11757 (i386_low_remove_watchpoint): Ditto.
11758
11759 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11760
11761 * linux-low.c (compare_ints, unique, list_threads, show_process,
11762 linux_core_of_thread): Delete.
11763 (linux_target_ops): Change linux_core_of_thread to
11764 linux_common_core_of_thread.
11765 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11766 * utils.c (malloc_failure): Change type of argument.
11767 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11768 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11769 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11770 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11771 (IPA_OBJS): Add common-utils-ipa.o.
11772 (ptid_h, linux_osdata_h): New macros.
11773 (server_h): Add common/common-utils.h, common/xml-utils.h,
11774 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11775 common/ptid.h.
11776 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11777 ptid.o, buffer.o): New rules.
11778 (linux-low.o): Add common/linux-osdata.h as a dependency.
11779 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11780 * configure.ac: Add AC_HEADER_DIRENT check.
11781 * config.in: Regenerate.
11782 * configure: Regenerate.
11783 * remote-utils.c (xml_escape_text): Delete.
11784 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11785 buffer_xml_printf): Move to common/buffer.c.
11786 * server.c (main): Remove call to initialize_inferiors.
11787 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11788 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11789 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11790 internal_error, gdb_assert, gdb_assert_fail): Delete.
11791 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11792 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11793 common/buffer.h.
11794 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11795 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11796 initialize_inferiors): Delete.
11797
11798 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11799
11800 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11801 symbol error.
11802
11803 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11804
11805 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11806 assertion.
11807 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11808
11809 2011-05-26 Yao Qi <yao@codesourcery.com>
11810
11811 * Makefile.in (thread-db.o): Track dependence to
11812 common/gdb_thread_db.h.
11813 * thread-db.c: include gdb_thread_db.h from right place.
11814
11815 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11816
11817 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11818 __FILE__ and __LINE__ to internal_error.
11819
11820 2011-05-13 Doug Evans <dje@google.com>
11821
11822 * thread-db.c (try_thread_db_load_from_sdir): New function.
11823 (try_thread_db_load_from_dir): New function.
11824 (thread_db_load_search): Handle $sdir, ignore $pdir.
11825 Remove trying of system directories if search of
11826 libthread-db-search-path fails, that is now done via $sdir.
11827
11828 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11829
11830 * server.c (handle_query): Add EnableDisableTracepoints to the list
11831 of supported features.
11832 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11833 tracepoints.
11834 (cmd_qtenable_disable): New.
11835 (cmd_qtstart): Install tracepoints even if disabled.
11836 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11837 receiving a QTEnable or QTDisable packet.
11838 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11839 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11840 tracepoints.
11841 (gdb_probe): Skip data collection if static tracepoint is disabled.
11842
11843 2011-05-10 Doug Evans <dje@google.com>
11844
11845 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11846
11847 2011-05-04 Doug Evans <dje@google.com>
11848
11849 * linux-low.c (linux_join): Skip process lookup.
11850 * spu-low.c (spu_join): Ditto.
11851 * server.c (join_inferiors_callback): Delete.
11852 (process_serial_event): For 'D' packet (detach) call join_inferior
11853 directly.
11854
11855 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11856
11857 * README: Don't mention xscale*-*-linux*.
11858 * configure.srv (xscale*-*-linux*): Don't handle target.
11859
11860 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11861
11862 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11863 casting pointers.
11864 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11865 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11866 (i386_emit_void_call_2): Likewise.
11867
11868 2011-04-26 Yao Qi <yao@codesourcery.com>
11869
11870 * linux-low.c: Move common macros to linux-ptrace.h.
11871 Include linux-ptrace.h.
11872 * Makefile.in (linux_ptrace_h): New.
11873 (linux-low.o): Depends on linux-ptrace.h.
11874
11875 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11876
11877 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11878 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11879 (remote_prepare): New function with most of the TCP code from ...
11880 (remote_open): ... here. Detect PORT here unconditionally. Move also
11881 setting transport_is_reliable.
11882 * server.c (run_once): New variable.
11883 (gdbserver_usage): Document it.
11884 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11885 the first run if RUN_ONCE.
11886 * server.h (run_once, remote_prepare): New declarations.
11887
11888 2011-04-19 Tom Tromey <tromey@redhat.com>
11889
11890 * win32-low.c (handle_load_dll): Remove duplicate "the".
11891
11892 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11893
11894 Remove support for old Cygwin 1.5 versions.
11895 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11896 function to avoid warning.
11897 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11898 warning.
11899
11900 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11901
11902 * gdbserver/server.h (Macro _): Define it if not available.
11903
11904 2011-03-14 Michael Snyder <msnyder@vmware.com>
11905
11906 * hostio.c (handle_close): Remove unnecessary null test.
11907
11908 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11909
11910 * Makefile.in (maintainer-clean realclean distclean): Remove
11911 "make ... subdir_do" command.
11912
11913 2011-03-10 Michael Snyder <msnyder@vmware.com>
11914
11915 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11916
11917 * server.c (handle_v_run): Free alloced buffer on early return.
11918
11919 2011-03-09 Yao Qi <yao@codesourcery.com>
11920
11921 Revert:
11922 2011-03-04 Yao Qi <yao@codesourcery.com>
11923
11924 * Makefile.in: Remove GNU make feature --directory.
11925
11926 2011-03-05 Yao Qi <yao@codesourcery.com>
11927
11928 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11929 (subdir_do): New make target. Copied from gdb/Makefile.
11930 (maintainer-clean, realclean, distclean, clean): Call corresponding
11931 make targets in common/Makefile.
11932
11933 2011-02-11 Yao Qi <yao@codesourcery.com>
11934
11935 * configure.ac: Call AC_PROG_RANLIB.
11936 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11937 * configure: Regenerate.
11938
11939 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11940
11941 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11942
11943 2011-03-06 Yao Qi <yao@codesourcery.com>
11944
11945 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11946
11947 2011-03-05 Yao Qi <yao@codesourcery.com>
11948
11949 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11950 (subdir_do): New make target. Copied from gdb/Makefile.
11951 (maintainer-clean, realclean, distclean, clean): Call corresponding
11952 make targets in common/Makefile.
11953
11954 2011-03-04 Yao Qi <yao@codesourcery.com>
11955
11956 * Makefile.in: Remove GNU make feature --directory.
11957
11958 2011-03-04 Michael Snyder <msnyder@vmware.com>
11959
11960 * server.c (queue_stop_reply): Call xmalloc not malloc.
11961
11962 2011-03-02 Michael Snyder <msnyder@vmware.com>
11963
11964 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11965
11966 2011-02-28 Michael Snyder <msnyder@vmware.com>
11967
11968 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11969 (cmd_qtframe): Ditto.
11970 (cmd_qtbuffer): Ditto.
11971 (cmd_bigqtbuffer): Ditto.
11972
11973 * utils.c (decimal2str): Initialize 'width' to nine, then
11974 don't mess with it.
11975
11976 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11977
11978 * hostio.c (require_data): Free *data, not data.
11979
11980 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11981
11982 * hostio.c (require_data): Use free, not xfree.
11983
11984 2011-02-27 Michael Snyder <msnyder@vmware.com>
11985
11986 * server.c (handle_query): Discard unused value.
11987
11988 * hostio.c (require_data): Free malloc memory before returning
11989 error.
11990
11991 2011-02-26 Michael Snyder <msnyder@vmware.com>
11992
11993 * linux-low.c (list_threads): Call closedir for dirent.
11994
11995 2011-02-27 Michael Snyder <msnyder@vmware.com>
11996
11997 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11998 a case statement falls through.
11999
12000 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12001
12002 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12003 in comparison.
12004
12005 2011-02-26 Michael Snyder <msnyder@vmware.com>
12006
12007 * utils.c (decimal2str): Eliminate dead code and dead param.
12008 (pulongest): Drop dead param from call to decimal2str.
12009 (plongest): Ditto.
12010
12011 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12012
12013 Revert the following patch (not approved yet):
12014 2011-02-21 Hui Zhu <teawater@gmail.com>
12015 * tracepoint.c (tp_printf): New function.
12016 (eval_agent_expr): Handle gdb_agent_op_printf.
12017
12018 2011-02-21 Hui Zhu <teawater@gmail.com>
12019
12020 * tracepoint.c (tp_printf): New function.
12021 (eval_agent_expr): Handle gdb_agent_op_printf.
12022
12023 2011-02-18 Tom Tromey <tromey@redhat.com>
12024
12025 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12026 (tracepoint.o): Likewise.
12027 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12028 (gdb_agent_op_names): Likewise.
12029
12030 2011-02-18 Tom Tromey <tromey@redhat.com>
12031
12032 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12033 gdb_agent_op_rot>: New constants.
12034 (gdb_agent_op_names): Add pick and roll.
12035 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12036 cases.
12037
12038 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12039
12040 * aclocal.m4: Regenerated with aclocal-1.11.1.
12041
12042 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12043
12044 * server.c (handle_qxfer_traceframe_info): New.
12045 (qxfer_packets): Register "traceframe-info".
12046 (handle_query): Report support for qXfer:traceframe-info:read+.
12047 * tracepoint.c (match_blocktype): New.
12048 (traceframe_find_block_type): Rename to ...
12049 (traceframe_walk_blocks): ... this. Add callback filter argument,
12050 and use it.
12051 (traceframe_find_block_type): New, reimplemented on top of
12052 traceframe_walk_blocks.
12053 (build_traceframe_info_xml): New.
12054 (traceframe_read_info): New.
12055 * server.h (traceframe_read_info): Declare.
12056
12057 2011-02-11 Yao Qi <yao@codesourcery.com>
12058
12059 * configure.ac: Call AC_PROG_RANLIB.
12060 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12061 * configure: Regenerate.
12062
12063 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12064
12065 * server.c (gdb_read_memory): Change return semantics to allow
12066 partial transfers.
12067 (handle_search_memory_1): Adjust.
12068 (process_serial_event) <'m' packet>: Handle partial transfers.
12069 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12070
12071 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12072
12073 * regcache.c (init_register_cache): Initialize
12074 regcache->register_status.
12075 (free_register_cache): Release regcache->register_status.
12076 (regcache_cpy): Copy register_status.
12077 (registers_to_string): Print 'x's for unavailable registers.
12078 (supply_register): Mark the register's status valid or
12079 unavailable, depending on whether a buffer was passed in or not.
12080 (supply_register_zeroed): New.
12081 (supply_regblock): Mark the registers' status valid or
12082 unavailable, depending on whether a buffer was passed in or not.
12083 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12084 (struct regcache): New `register_status' field.
12085 (supply_register_zeroed): Declare.
12086 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12087 supply_register_zeroed, rather than passing a NULL buffer to
12088 supply_register.
12089 * tracepoint.c (fetch_traceframe_registers): Update comment.
12090
12091 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12092
12093 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12094 buffer explicit.
12095
12096 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12097
12098 * server.h (decode_xfer_write): Change prototype.
12099 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12100 and don't extract the annex here.
12101 * server.c (decode_xfer_read): Remove `annex' parameter,
12102 and don't extract the annex here.
12103 (decode_xfer): New.
12104 (struct qxfer): New.
12105 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12106 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12107 (handle_qxfer_statictrace): New functions, abstracted out from
12108 handle_query, and made to use the struct qxfer interface.
12109 (handle_threads_qxfer_proper): Rename to ...
12110 (handle_qxfer_threads_proper): ... this.
12111 (handle_threads_qxfer): Rename to ...
12112 (handle_qxfer_threads): ... this. Adjust.
12113 (qxfer_packets): New array.
12114 (handle_qxfer): New function.
12115 (handle_query): Use handle_qxfer.
12116
12117 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12118
12119 * gdbreplay.c: Shorten lines of >= 80 columns.
12120 * linux-low.c: Ditto.
12121 * linux-ppc-low.c: Ditto.
12122 * linux-s390-low.c: Ditto.
12123 * linux-sparc-low.c: Ditto.
12124 * linux-x86-low.c: Ditto.
12125 * linux-xtensa-low.c: Ditto.
12126 * mem-break.c: Ditto.
12127 * nto-low.c: Ditto.
12128 * regcache.h: Ditto.
12129 * remote-utils.c: Ditto.
12130 * server.c: Ditto.
12131 * server.h: Ditto.
12132 * thread-db.c: Ditto.
12133 * tracepoint.c: Ditto.
12134 * utils.c: Ditto.
12135 * win32-low.h: Ditto.
12136
12137 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12138
12139 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12140 update.
12141
12142 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12143
12144 * server.c (gdbserver_version): Update copyright year in version
12145 output.
12146 * gdbreplay.c (gdbreplay_version): Ditto.
12147
12148 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12149
12150 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12151 * linux-bfin-low.c: New file.
12152 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12153 PT_DATA_ADDR for BFIN targets.
12154 * Makefile.in (SFILES): Add linux-bfin-low.c.
12155 (clean): Remove reg-bfin.c.
12156 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12157 * README: Mention supported Blackfin targets.
12158
12159 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12160
12161 * .gitignore: New file.
12162
12163 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12164
12165 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12166
12167 2010-10-22 Jie Zhang <jie@codesourcery.com>
12168
12169 * Makefile.in: Add FLAGS_TO_PASS variable.
12170 (install): Remove dependency of install-only and recursively
12171 invoke make for install-only.
12172
12173 2010-10-04 Doug Evans <dje@google.com>
12174
12175 * Makefile.in (uninstall): Use $(DESTDIR).
12176
12177 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12178
12179 PR gdb/11842
12180
12181 * linux-x86-low.c (compat_siginfo_from_siginfo)
12182 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12183 si_code is < 0. Check for si_code == SI_TIMER before checking for
12184 si_code < 0.
12185
12186 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12187
12188 * lynx-i386-low.c: New file.
12189 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12190
12191 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12192
12193 * lynx-low.c (ptrace_request_to_str): Remove handling for
12194 request values that have been removed in LynxOS 5.x.
12195
12196 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12197
12198 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12199 <ptrace.h>
12200
12201 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12202
12203 * configure.ac: Add --enable-inprocess-agent option.
12204 * configure: Rebuilt.
12205
12206 2010-09-06 Yao Qi <yao@codesourcery.com>
12207
12208 * linux-low.c (linux_kill): Remove unused variable.
12209 (linux_stabilize_threads): Likewise.
12210 * server.c (start_inferior): Likewise.
12211 (queue_stop_reply_callback): Likewise.
12212 * tracepoint.c (do_action_at_tracepoint): Likewise.
12213
12214 2010-09-06 Yao Qi <yao@codesourcery.com>
12215
12216 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12217 on return.
12218
12219 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12220
12221 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12222
12223 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12224
12225 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12226 "$(IPA_DEPFILES)".
12227
12228 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12229
12230 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12231 gdbserver/lynx-ppc-low.c: New files.
12232 * Makefile.in (lynx_low_h): New variable.
12233 (lynx-low.o, lynx-ppc-low.o): New rules.
12234 * configure.ac: On LynxOS, link with -lnetinet.
12235 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12236 * configure: regenerate.
12237
12238 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12239
12240 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12241 * configure.ac: Add check for vasprintf and vsnprintf.
12242 * configure, config.in: Regenerate.
12243 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12244
12245 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12246
12247 * gdbreplay.c: Move include of alloca.h up, next to include of
12248 malloc.h.
12249 * server.h: Add include of malloc.h.
12250 * mem-break.c: Remove include of malloc.h.
12251 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12252
12253 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12254
12255 * Makefile.in (memmem.o): Build with -Wno-error.
12256
12257 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12258
12259 * utils.c (xsnprintf): Make non-static.
12260 * server.h: Add xsnprintf declaration.
12261 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12262 replace calls to snprintf by calls to xsnprintf throughout.
12263
12264 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12265
12266 * configure.ac: Add configure check for alloca.
12267 * configure, config.in: Regenerate.
12268 * server.h: Include alloca.h if it exists.
12269 * gdbreplay.c: Include alloca.h if it exists.
12270
12271 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12272
12273 * linux-low.c (__SIGRTMIN): Define if not already defined.
12274 (linux_create_inferior): Check for __ANDROID__ rather than
12275 __SIGRTMIN.
12276 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12277 are already deferred.
12278 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12279 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12280 stopped and already has a pending signal to report.
12281 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12282 a pending signal to report or is moving out of a jump pad.
12283 (linux_init_signals): Check for __ANDROID__ rather than
12284 __SIGRTMIN.
12285
12286 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12287
12288 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12289 debug_threads check. Avoid a linear search when not doing debug
12290 output.
12291
12292 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12293
12294 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12295 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12296 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12297 (process_event): Change local fd's type to gdb_fildes_t.
12298 (create_file_handler): Adjust prototype.
12299 (delete_file_handler): Adjust prototype.
12300 (handle_file_event): Adjust prototype. Use pfildes.
12301 (create_file_event): Adjsut prototype.
12302 * remote-utils.c (remote_desc, listen_desc): Change type to
12303 gdb_fildes_t.
12304 * server.h: New gdb_fildes_t typedef.
12305 [USE_WIN32API]: Include winsock2.h.
12306 (delete_file_handler, add_file_handler): Adjust prototypes.
12307 (pfildes): Declare.
12308 * utils.c (pfildes): New.
12309
12310 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12311
12312 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12313 * configure: Regenerate.
12314
12315 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12316
12317 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12318 (linux_done_accessing_memory): ... this.
12319 (linux_target_ops): Adjust.
12320 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12321 * nto-low.c (nto_target_ops): Adjust comment.
12322 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12323 * spu-low.c (spu_target_ops): Adjust comment.
12324 * target.h (target_ops): Rename unprepare_to_access_memory field
12325 to done_accessing_memory.
12326 (unprepare_to_access_memory): Rename to ...
12327 (done_accessing_memory): ... this.
12328
12329 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12330
12331 * linux-low.c (linux_prepare_to_access_memory): New.
12332 (linux_unprepare_to_access_memory): New.
12333 (linux_target_ops): Install them.
12334 * server.c (read_memory): Rename to ...
12335 (gdb_read_memory): ... this. Use
12336 prepare_to_access_memory/prepare_to_access_memory.
12337 (write_memory): Rename to ...
12338 (gdb_write_memory): ... this. Use
12339 prepare_to_access_memory/prepare_to_access_memory.
12340 (handle_search_memory_1): Adjust.
12341 (process_serial_event): Adjust.
12342 * target.h (struct target_ops): New fields
12343 prepare_to_access_memory and unprepare_to_access_memory.
12344 (prepare_to_access_memory, unprepare_to_access_memory): New.
12345 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12346 prepare_to_access_memory/prepare_to_access_memory.
12347 * nto-low.c (nto_target_ops): Adjust.
12348 * spu-low.c (spu_target_ops): Adjust.
12349 * win32-low.c (win32_target_ops): Adjust.
12350
12351 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12352
12353 * Makefile.in (WARN_CFLAGS): Get it from configure.
12354 (WERROR_CFLAGS): New.
12355 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12356 * configure.ac: Introduce --enable-werror, which adds -Werror to
12357 the compiler command line. Enabled by default. Disable with
12358 --disable-werror. Add -Wdeclaration-after-statement
12359 Wpointer-arith and -Wformat-nonliteral to warning flags.
12360 * configure: Regenerate.
12361
12362 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12363
12364 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12365
12366 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12367
12368 * gdbreplay.c (remote_error): New.
12369 (gdbchar): New.
12370 (expect): Use gdbchar. Check for error reading from GDB.
12371 Clarify sync error output.
12372 (play): Check for errors writing to GDB.
12373 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12374 * remote-utils.c (getpkt): Check for errors writing to the remote
12375 descriptor.
12376
12377 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12378
12379 * linux-low.c (linux_wait_1): Move non-debugging code out of
12380 `debug_threads' control.
12381
12382 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12383
12384 * linux-low.c (linux_wait_1): Don't set last_status here.
12385 * server.c (push_event, queue_stop_reply_callback): Assert we're
12386 not pushing a TARGET_WAITKIND_IGNORE event.
12387 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12388 (myresume, handle_target_event): Set the thread's last_resume_kind
12389 and last_status from the target returned status.
12390
12391 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12392
12393 PR threads/10729
12394
12395 * linux-x86-low.c (update_debug_registers_callback): New.
12396 (i386_dr_low_set_addr): Use it.
12397 (i386_dr_low_get_addr): New.
12398 (i386_dr_low_set_control): Use update_debug_registers_callback.
12399 (i386_dr_low_get_control): New.
12400 (i386_dr_low_get_status): Adjust.
12401 * linux-low.c (linux_stop_lwp): New.
12402 * linux-low.h (linux_stop_lwp): Declare.
12403
12404 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12405 argument instead of a i386_debug_reg_state.
12406 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12407 a i386_debug_reg_state.
12408 (i386_insert_aligned_watchpoint): Adjust.
12409 (i386_remove_aligned_watchpoint): Adjust.
12410 (i386_low_stopped_data_address): Read the debug registers from the
12411 inferior instead of from the mirrors.
12412 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12413 (i386_dr_low_get_addr): Declare.
12414 (i386_dr_low_get_control): Declare.
12415 (i386_dr_low_get_status): Change prototype.
12416
12417 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12418 (i386_dr_low_get_addr): New.
12419 (i386_dr_low_get_control): New.
12420 (i386_dr_low_get_status): Adjust prototype. Return
12421 dr_status_mirror.
12422 (i386_initial_stuff): Clear dr_status_mirror and
12423 dr_control_mirror.
12424 (i386_get_thread_context): Adjust.
12425 (i386_set_thread_context): Adjust.
12426 (i386_thread_added): Adjust.
12427
12428 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12429
12430 * linux-low.h (linux_thread_area): Delete declaration.
12431
12432 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12433
12434 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12435 after its termination.
12436
12437 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12438
12439 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12440 (gdb_wants_all_stopped): Delete.
12441 (linux_wait_1): Don't call them.
12442 * server.c (handle_v_cont): Tag all threads as want-stopped.
12443 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12444 stopped as "client-wants-stopped".
12445
12446 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12447
12448 * Makefile.in (signals_h): New.
12449 (server_h): Depend on it.
12450 (server.o): Don't depend on $(signals_def).
12451 (signals.o): Depend on $(signals_def).
12452
12453 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12454
12455 * Makefile.in (signals_def): New.
12456 (server_h): Append include/gdb/signals.h and signals_def.
12457 (server.o): Append signals_def.
12458
12459 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12460
12461 * server.c (handle_target_event): Use target_signal_to_host for
12462 resume_info.sig initialization.
12463 * target.h (struct thread_resume) <sig>: New comment.
12464
12465 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12466
12467 * server.c (handle_query): strcpy() the returned string from paddress()
12468 instead of sprintf().
12469 * utils.c (paddress): Return phex_nz().
12470
12471 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12472
12473 * server.c (handle_v_cont): Call mourn_inferior if process
12474 just exited.
12475 (myresume): Likewise.
12476
12477 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12478
12479 Static tracepoints, and integration with UST.
12480
12481 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12482 * mem-break.c (uninsert_all_breakpoints)
12483 (reinsert_all_breakpoints): New.
12484 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12485 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12486 (gdb_agent_ust_loaded, helper_thread_id)
12487 (gdb_agent_helper_thread_id): New macros.
12488 (struct ipa_sym_addresses): Add addr_ust_loaded,
12489 addr_helper_thread_id, addr_cmd_buf.
12490 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12491 (in_process_agent_loaded_ust): New.
12492 (write_e_ust_not_loaded): New.
12493 (maybe_write_ipa_ust_not_loaded): New.
12494 (struct collect_static_trace_data_action): New.
12495 (enum tracepoint_type) <static_tracepoint>: New.
12496 (struct tracepoint) <handle>: Mention static tracepoints.
12497 (struct static_tracepoint_ctx): New.
12498 (CMD_BUF_SIZE): New.
12499 (add_tracepoint_action): Handle static tracepoint actions.
12500 (unprobe_marker_at): New.
12501 (clear_installed_tracepoints): Handle static tracepoints.
12502 (cmd_qtdp): Handle static tracepoints.
12503 (probe_marker_at): New.
12504 (cmd_qtstart): Handle static tracepoints.
12505 (response_tracepoint): Handle static tracepoints.
12506 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12507 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12508 (get_context_regcache): Handle static tracepoints.
12509 (do_action_at_tracepoint): Handle static tracepoint actions.
12510 (traceframe_find_block_type): Handle static trace data blocks.
12511 (traceframe_read_sdata): New.
12512 (download_tracepoints): Download static tracepoint actions.
12513 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12514 (GDB_PROBE_NAME): New.
12515 (ust_ops): New.
12516 (GET_UST_SYM): New.
12517 (USTF): New.
12518 (dlsym_ust): New.
12519 (ust_marker_to_static_tracepoint): New.
12520 (gdb_probe): New.
12521 (collect_ust_data_at_tracepoint): New.
12522 (gdb_ust_probe): New.
12523 (UNIX_PATH_MAX, SOCK_DIR): New.
12524 (gdb_ust_connect_sync_socket): New.
12525 (resume_thread, stop_thread): New.
12526 (run_inferior_command): New.
12527 (init_named_socket): New.
12528 (gdb_ust_socket_init): New.
12529 (cstr_to_hexstr): New.
12530 (next_st): New.
12531 (first_marker, next_marker): New.
12532 (response_ust_marker): New.
12533 (cmd_qtfstm, cmd_qtsstm): New.
12534 (unprobe_marker_at, probe_marker_at): New.
12535 (cmd_qtstmat, gdb_ust_thread): New.
12536 (gdb_ust_init): New.
12537 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12538 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12539 (ST_REGENTRY): New.
12540 (x86_64_st_collect_regmap): New.
12541 (X86_64_NUM_ST_COLLECT_GREGS): New.
12542 (AMD64_RIP_REGNUM): New.
12543 (supply_static_tracepoint_registers): New.
12544 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12545 (ST_REGENTRY): New.
12546 (i386_st_collect_regmap): New.
12547 (i386_NUM_ST_COLLECT_GREGS): New.
12548 (supply_static_tracepoint_registers): New.
12549 * server.c (handle_query): Handle qXfer:statictrace:read.
12550 <qSupported>: Report support for StaticTracepoints, and
12551 qXfer:statictrace:read features.
12552 * server.h (traceframe_read_sdata)
12553 (supply_static_tracepoint_registers): Declare.
12554 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12555 (unpack_varlen_hex): Include in IPA build.
12556 * Makefile.in (ustlibs, ustinc): New.
12557 (IPA_OBJS): Add remote-utils-ipa.o.
12558 ($(IPA_LIB)): Link -ldl and -lpthread.
12559 (UST_CFLAGS): New.
12560 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12561 * config.in, configure: Regenerate.
12562
12563 2010-06-20 Ian Lance Taylor <iant@google.com>
12564 Pedro Alves <pedro@codesourcery.com>
12565
12566 * linux-x86-low.c (always_true): Delete.
12567 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12568 trying to fool the compiler with always_true.
12569
12570 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12571
12572 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12573 conditions in gdbserver.
12574
12575 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12576
12577 * spu-low.c (spu_read_memory): Wrap around local store limit.
12578 (spu_write_memory): Likewise.
12579
12580 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12581
12582 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12583 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12584 LONGEST uses.
12585 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12586 uses.
12587 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12588 uses with LONGEST uses.
12589
12590 2010-06-14 Stan Shebs <stan@codesourcery.com>
12591 Pedro Alves <pedro@codesourcery.com>
12592
12593 Bytecode compiler.
12594
12595 * linux-x86-low.c: Include limits.h.
12596 (add_insns): New.
12597 (always_true): New.
12598 (EMIT_ASM): New.
12599 (EMIT_ASM32): New.
12600 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12601 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12602 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12603 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12604 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12605 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12606 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12607 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12608 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12609 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12610 (amd64_emit_void_call_2): New.
12611 (amd64_emit_ops): New.
12612 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12613 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12614 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12615 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12616 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12617 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12618 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12619 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12620 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12621 (i386_emit_stack_adjust, i386_emit_int_call_1)
12622 (i386_emit_void_call_2): New.
12623 (i386_emit_ops): New.
12624 (x86_emit_ops): New.
12625 (the_low_target): Install x86_emit_ops.
12626 * server.h (struct emit_ops): New.
12627 (get_raw_reg_func_addr): Declare.
12628 (current_insn_ptr, emit_error): Declare.
12629 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12630 (set_trace_state_variable_value): New defines.
12631 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12632 addr_get_trace_state_variable_value and
12633 addr_set_trace_state_variable_value.
12634 (symbol_list): New fields for get_raw_reg,
12635 get_trace_state_variable_value and set_trace_state_variable_value.
12636 (condfn): New typedef.
12637 (struct tracepoint): New field `compiled_cond'.
12638 (do_action_at_tracepoint): Clear compiled_cond.
12639 (get_trace_state_variable_value, set_trace_state_variable_value):
12640 Export in the IPA.
12641 (condition_true_at_tracepoint): If there's a compiled condition,
12642 run that.
12643 (current_insn_ptr, emit_error): New globals.
12644 (struct bytecode_address): New.
12645 (get_raw_reg_func_addr): New.
12646 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12647 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12648 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12649 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12650 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12651 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12652 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12653 (compile_tracepoint_condition, compile_bytecodes): New.
12654 * target.h (emit_ops): Forward declare.
12655 (struct target_ops): New field emit_ops.
12656 (target_emit_ops): New.
12657 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12658 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12659 * linux-low.c (linux_emit_ops): New.
12660 (linux_target_ops): Install it.
12661 * linux-low.h (struct linux_target_ops): New field emit_ops.
12662
12663 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12664
12665 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12666 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12667
12668 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12669 Stan Shebs <stan@codesourcery.com>
12670
12671 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12672 (all): Depend on $(extra_libraries).
12673 (install-only): Install the IPA.
12674 (IPA_OBJS, IPA_LIB): New.
12675 (clean): Remove the IPA lib.
12676 (IPAGENT_CFLAGS): New.
12677 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12678 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12679 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12680 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12681 * configure.ac: Check for atomic builtins support in the compiler.
12682 (IPA_DEPFILES, extra_libraries): Define.
12683 * configure.srv (ipa_obj): Add description.
12684 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12685 (i[34567]86-*-linux*): Set ipa_obj.
12686 (x86_64-*-linux*): Set ipa_obj.
12687 * linux-low.c (stabilizing_threads): New.
12688 (supports_fast_tracepoints): New.
12689 (linux_detach): Stabilize threads before detaching.
12690 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12691 the lwp is either not stabilizing, or is moving out of a jump pad.
12692 (linux_fast_tracepoint_collecting): New.
12693 (maybe_move_out_of_jump_pad): New.
12694 (enqueue_one_deferred_signal): New.
12695 (dequeue_one_deferred_signal): New.
12696 (linux_wait_for_event_1): If moving out of a jump pad, defer
12697 pending signals to later.
12698 (linux_stabilize_threads): New.
12699 (linux_wait_1): Check if threads need moving out of jump pads, and
12700 do it if so.
12701 (stuck_in_jump_pad_callback): New.
12702 (move_out_of_jump_pad_callback): New.
12703 (lwp_running): New.
12704 (linux_resume_one_lwp): Handle moving out of jump pads.
12705 (linux_set_resume_request): Dequeue deferred signals.
12706 (need_step_over_p): Also step over fast tracepoint jumps.
12707 (start_step_over): Also uninsert fast tracepoint jumps.
12708 (finish_step_over): Also reinsert fast tracepoint jumps.
12709 (linux_install_fast_tracepoint_jump): New.
12710 (linux_target_ops): Install linux_stabilize_threads and
12711 linux_install_fast_tracepoint_jump_pad.
12712 * linux-low.h (linux_target_ops) <get_thread_area,
12713 install_fast_tracepoint_jump_pad>: New fields.
12714 (struct lwp_info) <collecting_fast_tracepoint,
12715 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12716 (linux_get_thread_area): Declare.
12717 * linux-x86-low.c (jump_insn): New.
12718 (x86_get_thread_area): New.
12719 (append_insns): New.
12720 (push_opcode): New.
12721 (amd64_install_fast_tracepoint_jump_pad): New.
12722 (i386_install_fast_tracepoint_jump_pad): New.
12723 (x86_install_fast_tracepoint_jump_pad): New.
12724 (the_low_target): Install x86_get_thread_area and
12725 x86_install_fast_tracepoint_jump_pad.
12726 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12727 (struct fast_tracepoint_jump): New.
12728 (fast_tracepoint_jump_insn): New.
12729 (fast_tracepoint_jump_shadow): New.
12730 (find_fast_tracepoint_jump_at): New.
12731 (fast_tracepoint_jump_here): New.
12732 (delete_fast_tracepoint_jump): New.
12733 (set_fast_tracepoint_jump): New.
12734 (uninsert_fast_tracepoint_jumps_at): New.
12735 (reinsert_fast_tracepoint_jumps_at): New.
12736 (set_breakpoint_at): Use write_inferior_memory.
12737 (uninsert_raw_breakpoint): Use write_inferior_memory.
12738 (check_mem_read): Mask out fast tracepoint jumps.
12739 (check_mem_write): Mask out fast tracepoint jumps.
12740 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12741 (set_fast_tracepoint_jump): Declare.
12742 (delete_fast_tracepoint_jump)
12743 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12744 (reinsert_fast_tracepoint_jumps_at): Declare.
12745 * regcache.c: Don't compile many functions when building the
12746 in-process agent library.
12747 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12748 the register buffer in the heap.
12749 (free_register_cache): If the register buffer isn't owned by the
12750 regcache, don't free it.
12751 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12752 pre-existing register caches.
12753 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12754 type.
12755 (convert_ascii_to_int): : Constify `from' parameter type.
12756 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12757 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12758 the needed buffer in-place.
12759 (relocate_instruction): New.
12760 * server.c (handle_query) <qSymbols>: If the target supports
12761 tracepoints, give it a chance of looking up symbols. Report
12762 support for fast tracepoints.
12763 (handle_status): Stabilize threads.
12764 (process_serial_event): Adjust.
12765 * server.h (struct fast_tracepoint_jump): Forward declare.
12766 (struct process_info) <fast_tracepoint_jumps>: New field.
12767 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12768 (decode_X_packet, decode_M_packet): Adjust.
12769 (relocate_instruction): Declare.
12770 (in_process_agent_loaded): Declare.
12771 (tracepoint_look_up_symbols): Declare.
12772 (struct fast_tpoint_collect_status): Declare.
12773 (fast_tracepoint_collecting): Declare.
12774 (force_unlock_trace_buffer): Declare.
12775 (handle_tracepoint_bkpts): Declare.
12776 (initialize_low_tracepoint)
12777 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12778 * target.h (struct target_ops) <stabilize_threads,
12779 install_fast_tracepoint_jump_pad>: New fields.
12780 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12781 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12782 [HAVE_STDINT_H]: Include stdint.h.
12783 (trace_debug_1): Rename to ...
12784 (trace_vdebug): ... this.
12785 (trace_debug): Rename to ...
12786 (trace_debug_1): ... this. Add `level' parameter.
12787 (trace_debug): New.
12788 (ATTR_USED, ATTR_NOINLINE): New.
12789 (IP_AGENT_EXPORT): New.
12790 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12791 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12792 (about_to_request_buffer_space, trace_buffer_is_full)
12793 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12794 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12795 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12796 (traceframe_write_count, traceframes_created)
12797 (trace_state_variables)
12798 New renaming defines.
12799 (struct ipa_sym_addresses): New.
12800 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12801 (symbol_list): New.
12802 (ipa_sym_addrs): New.
12803 (all_tracepoint_symbols_looked_up): New.
12804 (in_process_agent_loaded): New.
12805 (write_e_ipa_not_loaded): New.
12806 (maybe_write_ipa_not_loaded): New.
12807 (tracepoint_look_up_symbols): New.
12808 (debug_threads) [IN_PROCESS_AGENT]: New.
12809 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12810 (UNKNOWN_SIDE_EFFECTS): New.
12811 (stop_tracing): New.
12812 (flush_trace_buffer): New.
12813 (stop_tracing_bkpt): New.
12814 (flush_trace_buffer_bkpt): New.
12815 (read_inferior_integer): New.
12816 (read_inferior_uinteger): New.
12817 (read_inferior_data_pointer): New.
12818 (write_inferior_data_pointer): New.
12819 (write_inferior_integer): New.
12820 (write_inferior_uinteger): New.
12821 (struct collect_static_trace_data_action): Delete.
12822 (enum tracepoint_type): New.
12823 (struct tracepoint) <type>: New field `type'.
12824 <actions_str, step_actions, step_actions_str>: Only include in
12825 GDBserver.
12826 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12827 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12828 (tracepoints): Use IP_AGENT_EXPORT.
12829 (last_tracepoint): Don't include in the IPA.
12830 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12831 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12832 (alloced_trace_state_variables): New.
12833 (trace_state_variables): Use IP_AGENT_EXPORT.
12834 (traceframe_t): Delete unused variable.
12835 (circular_trace_buffer): Don't include in the IPA.
12836 (trace_buffer_start): Delete.
12837 (struct trace_buffer_control): New.
12838 (trace_buffer_free): Delete.
12839 (struct ipa_trace_buffer_control): New.
12840 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12841 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12842 New.
12843 (trace_buffer_ctrl): New.
12844 (TRACE_BUFFER_CTRL_CURR): New.
12845 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12846 Reimplement as macros.
12847 (trace_buffer_wrap): Delete.
12848 (traceframe_write_count, traceframe_read_count)
12849 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12850 (struct tracepoint_hit_ctx) <type>: New field.
12851 (struct fast_tracepoint_ctx): New.
12852 (memory_barrier): New.
12853 (cmpxchg): New.
12854 (record_tracepoint_error): Update atomically in the IPA.
12855 (clear_inferior_trace_buffer): New.
12856 (about_to_request_buffer_space): New.
12857 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12858 updating the same buffer.
12859 (add_tracepoint): Default the tracepoint's type to trap
12860 tracepoint, and orig_size to -1.
12861 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12862 internal variables.
12863 (create_trace_state_variable): New parameter `gdb'. Handle it.
12864 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12865 (cmd_qtdp): Handle fast tracepoints.
12866 (cmd_qtdv): Adjust.
12867 (max_jump_pad_size): New.
12868 (gdb_jump_pad_head): New.
12869 (get_jump_space_head): New.
12870 (claim_jump_space): New.
12871 (sort_tracepoints): New.
12872 (MAX_JUMP_SIZE): New.
12873 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12874 IPA.
12875 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12876 support. Upload fast traceframes, and delete internal IPA
12877 breakpoints.
12878 (stop_tracing_handler): New.
12879 (flush_trace_buffer_handler): New.
12880 (cmd_qtstop): Upload fast tracepoints.
12881 (response_tracepoint): Handle fast tracepoints.
12882 (tracepoint_finished_step): Upload fast traceframes. Set the
12883 tracepoint hit context's tracepoint type.
12884 (handle_tracepoint_bkpts): New.
12885 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12886 type. Add comment about fast tracepoints.
12887 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12888 non-existing action_str field.
12889 (get_context_regcache): Handle fast tracepoints.
12890 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12891 to the regcache.
12892 (fast_tracepoint_from_jump_pad_address): New.
12893 (fast_tracepoint_from_ipa_tpoint_address): New.
12894 (collecting_t): New.
12895 (force_unlock_trace_buffer): New.
12896 (fast_tracepoint_collecting): New.
12897 (collecting): New.
12898 (gdb_collect): New.
12899 (write_inferior_data_ptr): New.
12900 (target_tp_heap): New.
12901 (target_malloc): New.
12902 (download_agent_expr): New.
12903 (UALIGN): New.
12904 (download_tracepoints): New.
12905 (download_trace_state_variables): New.
12906 (upload_fast_traceframes): New.
12907 (IPA_FIRST_TRACEFRAME): New.
12908 (IPA_NEXT_TRACEFRAME_1): New.
12909 (IPA_NEXT_TRACEFRAME): New.
12910 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12911 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12912 (gdb_jump_pad_buffer_end): New.
12913 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12914 (initialize_tracepoint): Adjust.
12915 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12916 buffer. Initialize the low module.
12917 * utils.c (PREFIX, TOOLNAME): New.
12918 (malloc_failure): Use PREFIX.
12919 (error): In the IPA, an error causes an exit.
12920 (fatal, warning): Use PREFIX.
12921 (internal_error): Use TOOLNAME.
12922 (NUMCELLS): Increase to 10.
12923 * configure, config.in: Regenerate.
12924
12925 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12926
12927 * server.c (handle_query) <qSupported>: Do two passes over the
12928 qSupported string to avoid nesting strtok.
12929
12930 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12931
12932 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12933 (CDEPS): New.
12934 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12935 -Wl,--dynamic-list.
12936 * configure: Regenerate.
12937 * proc-service.list: New.
12938
12939 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12940
12941 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12942 New comment.
12943
12944 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12945
12946 * gdbreplay.c (remote_open): Check error return from socket() call by
12947 its equality to -1 not by it being negative.
12948 * remote-utils.c (remote_open): Likewise.
12949
12950 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12951
12952 * config.h: Regenerate.
12953
12954 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12955
12956 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12957 doesn't provide PTRACE_GET_THREAD_AREA.
12958
12959 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12960
12961 * linux-m68k-low.c: Include <asm/ptrace.h>
12962 (ps_get_thread_area): Implement.
12963
12964 2010-05-03 Doug Evans <dje@google.com>
12965
12966 * event-loop.c (struct callback_event): New struct.
12967 (callback_list): New global.
12968 (append_callback_event, delete_callback_event): New functions.
12969 (process_callback): New function.
12970 (start_event_loop): Call it.
12971 * remote-utils.c (NOT_SCHEDULED): Define.
12972 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12973 moved out of readchar.
12974 (readchar): Rewrite. Call reschedule before returning.
12975 (reset_readchar): New function.
12976 (remote_close): Call it.
12977 (process_remaining, reschedule): New functions.
12978 * server.h (callback_handler_func): New typedef.
12979 (append_callback_event, delete_callback_event): Declare.
12980
12981 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12982
12983 * proc-service.c (ps_pglobal_lookup): Use
12984 thread_db_look_up_one_symbol.
12985 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12986 parameter. Use it instead of all_symbols_looked_up.
12987 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12988 field.
12989 (all_symbols_looked_up): Don't declare.
12990 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12991 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12992 field.
12993 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12994 Set all_symbols_looked_up here.
12995 (thread_db_look_up_one_symbol): New.
12996 (thread_db_get_tls_address): Adjust.
12997 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12998 thread_db object on the heap, and tentatively set it in the
12999 process structure.
13000 (thread_db_init): Don't set all_symbols_looked_up here.
13001 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13002
13003 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13004
13005 * linux-low.c (linux_kill, linux_detach): Adjust.
13006 (status_pending_p_callback): Remove redundant statement. Check
13007 for !TARGET_WAITIKIND_IGNORE, instead of
13008 TARGET_WAITKIND_STOPPED.
13009 (handle_tracepoints): Make sure LWP is locked. Adjust.
13010 (linux_wait_for_event_1): Adjust.
13011 (linux_cancel_breakpoints): New.
13012 (unsuspend_one_lwp): New.
13013 (unsuspend_all_lwps): New.
13014 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13015 (send_sigstop_callback): Change return type to int, add new
13016 `except' parameter and handle it.
13017 (suspend_and_send_sigstop_callback): New.
13018 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13019 pass them down. If SUSPEND, also increment the lwp's suspend
13020 count.
13021 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13022 (need_step_over_p): Don't consider suspended LWPs.
13023 (start_step_over): Adjust.
13024 (proceed_one_lwp): Change return type to int, add new `except'
13025 parameter and handle it.
13026 (unsuspend_and_proceed_one_lwp): New.
13027 (proceed_all_lwps): Use find_inferior instead of
13028 for_each_inferior.
13029 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13030 also decrement the suspend count of LWPs. Pass `except' down,
13031 instead of hacking its suspend count.
13032 (linux_pause_all): Add `freeze' parameter. Adjust.
13033 (linux_unpause_all): New.
13034 (linux_target_ops): Install linux_unpause_all.
13035 * server.c (handle_status): Adjust.
13036 * target.h (struct target_ops): New fields `unpause_all' and
13037 `cancel_breakpoints'. Add new parameter to `pause_all'.
13038 (pause_all): Add new `freeze' parameter.
13039 (unpause_all): New.
13040 (cancel_breakpoints): New.
13041 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13042 cancel breakpoints.
13043 (cmd_qtstart): Pause threads.
13044 (stop_tracing): Pause threads, and cancel breakpoints.
13045 * win32-low.c (win32_target_ops): Adjust.
13046
13047 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13048
13049 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13050 the inferior right away from here...
13051 (linux_wait_1): ... to here, and adjust to check the thread's
13052 last_resume_kind instead of the lwp's step or stop_expected flags.
13053
13054 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13055
13056 * README: Use consistent `GDB' and `GDBserver' spellings.
13057
13058 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13059
13060 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13061 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13062 (linux_detach_one_lwp): Assume the lwp is stopped.
13063 (any_thread_of): Delete.
13064 (linux_detach): Stop all lwps here. Don't blindly delete all
13065 breakpoints.
13066 (delete_lwp_callback): New.
13067 (linux_mourn): Delete all lwps of the process that is gone.
13068 (linux_wait_1): Don't delete the last lwp of the process here.
13069 * mem-break.h (mark_breakpoints_out): Declare.
13070 * mem-break.c (mark_breakpoints_out): New.
13071 (free_all_breakpoints): Use it.
13072 * server.c (handle_target_event): If the process is gone, mark
13073 breakpoints out.
13074 * thread-db.c (struct thread_db) <create_bp>: New field.
13075 (thread_db_enable_reporting): Fix prototype. Store a thread event
13076 breakpoint reference in the thread_db struct.
13077 (thread_db_load_search): Clear the thread_db object.
13078 (try_thread_db_load_1): Ditto.
13079 (switch_to_process): New.
13080 (disable_thread_event_reporting): Use it.
13081 (remove_thread_event_breakpoints): New.
13082 (thread_db_detach, thread_db_mourn): Use it.
13083
13084 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13085
13086 * linux-low.c (linux_enable_event_reporting): New.
13087 (linux_wait_for_event_1, handle_extended_wait): Use it.
13088
13089 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13090
13091 * linux-low.c (linux_kill_one_lwp, linux_kill)
13092 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13093 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13094 SIGSTOP even if the LWP is stopped.
13095 (send_sigstop_callback): New.
13096 (stop_all_lwps): Use send_sigstop_callback instead.
13097 (linux_resume_one_thread): Adjust.
13098 (proceed_one_lwp): Still proceed an LWP that the client has
13099 requested to stop, if we haven't reported it as stopped yet. Make
13100 sure that LWPs the client want stopped, have a pending SIGSTOP.
13101
13102 2010-04-26 Doug Evans <dje@google.com>
13103
13104 * server.c (handle_general_set): Make static.
13105
13106 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13107 Print received char after testing for error/eof instead of before.
13108 (input_interrupt): Tweak comment.
13109
13110 2010-04-23 Doug Evans <dje@google.com>
13111
13112 * server.c (start_inferior): Print inferior argv if --debug.
13113
13114 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13115
13116 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13117 * nto-x86-low.c: Include server.h
13118
13119 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13120
13121 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13122 be consistent with other sources of this directory.
13123 (init_registers_amd64): Correct name of source file of this function
13124 in the comment.
13125
13126 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13127
13128 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13129 64-bit executables.
13130
13131 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13132
13133 * win32-i386-low.c: Add 64-bit support.
13134 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13135 (init_registers_amd64): Declare.
13136 (mappings): Add 64-bit version of array.
13137 (init_windows_x86): New function.
13138 (the_low_target): Change init_arch field to init_windows_x86.
13139
13140 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13141
13142 * win32-low.c: Adapt to support also 64-bit architecture.
13143 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13144 (get_image_name): Use SIZE_T type for local variable `done'.
13145 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13146 (toolhelp_get_dll_name): Idem.
13147 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13148 Use uintptr_t typecast to avoid warning.
13149 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13150 (handle_exception): Use phex_nz to avoid warning.
13151 (win32_wait): Remove unused local variable `process'.
13152
13153 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13154
13155 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13156 `amd64-avx.o'.
13157
13158 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13159
13160 * configure.ac: Use `ws2_32' library for srv_mingw.
13161 * configure: Regenerate.
13162 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13163 * remote-utils.c: Likewise.
13164
13165 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13166
13167 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13168 if __x86_64__ is defined.
13169
13170 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13171
13172 * configure: Regenerate.
13173
13174 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13175
13176 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13177 * target.h (target_ops): New get_tib_address field.
13178 * win32-low.h (win32_thread_info): Add thread_local_base field.
13179 * win32-low.c (child_add_thread): Add tlb argument.
13180 Set thread_local_base field to TLB.
13181 (get_child_debug_event): Adapt to child_add_thread change.
13182 (win32_get_tib_address): New function.
13183 (win32_target_ops): Set get_tib_address field to
13184 win32_get_tib_address.
13185 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13186
13187 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13188
13189 * linux-low.c (linux_mourn): Also remove the process.
13190 * server.c (handle_target_event): Don't remove the process here.
13191 * nto-low.c (nto_mourn): New.
13192 (nto_target_ops): Install it.
13193 * spu-low.c (spu_mourn): New.
13194 (spu_target_ops): Install it.
13195 * win32-low.c (win32_mourn): New.
13196 (win32_target_ops): Install it.
13197
13198 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13199
13200 * server.h (buffer_xml_printf): Remove redundant `;'.
13201
13202 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13203
13204 * regcache.c (set_register_cache): Invalidate regcaches before
13205 changing the register cache layout.
13206 (regcache_invalidate_one): Allow a NULL regcache.
13207 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13208 regcaches before changing the register cache layout or the target
13209 regsets.
13210
13211 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13212
13213 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13214 variable warning on Linux/x86-64.
13215
13216 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13217
13218 GDBserver disconnected tracing support.
13219
13220 * linux-low.c (linux_remove_process): Delete.
13221 (add_lwp): Don't set last_resume_kind here.
13222 (linux_kill): Use `mourn'.
13223 (linux_detach): Use `thread_db_detach', and `mourn'.
13224 (linux_mourn): New.
13225 (linux_attach_lwp_1): Adjust comment.
13226 (linux_attach): last_resume_kind moved the thread_info; adjust.
13227 (status_pending_p_callback): Adjust.
13228 (linux_wait_for_event_1): Adjust.
13229 (count_events_callback, select_singlestep_lwp_callback)
13230 (select_event_lwp_callback, cancel_breakpoints_callback)
13231 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13232 (proceed_one_lwp): Adjust.
13233 (linux_async): Add debug output.
13234 (linux_thread_stopped): New.
13235 (linux_pause_all): New.
13236 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13237 linux_pause_all.
13238 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13239 (thread_db_free): Delete declaration.
13240 (thread_db_detach, thread_db_mourn): Declare.
13241 * thread-db.c (thread_db_init): Use thread_db_mourn.
13242 (thread_db_free): Delete, split in two.
13243 (disable_thread_event_reporting): New.
13244 (thread_db_detach): New.
13245 (thread_db_mourn): New.
13246
13247 * server.h (struct thread_info) <last_resume_kind>: New field.
13248 <attached>: Add comment.
13249 <gdb_detached>: New field.
13250 (handler_func): Change return type to int.
13251 (handle_serial_event, handle_target_event): Ditto.
13252 (gdb_connected): Declare.
13253 (tracing): Delete.
13254 (disconnected_tracing): Declare.
13255 (stop_tracing): Declare.
13256
13257 * server.c (handle_query) <qSupported>: Report support for
13258 disconnected tracing.
13259 (queue_stop_reply_callback): Account for running threads.
13260 (gdb_wants_thread_stopped): New.
13261 (gdb_wants_all_threads_stopped): New.
13262 (gdb_reattached_process): New.
13263 (handle_status): Clear the `gdb_detached' flag of all processes.
13264 In all-stop, stop all threads.
13265 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13266 (process_serial_event): If the remote connection breaks, or if an
13267 exit was forced with "monitor exit", force an event loop exit.
13268 Handle disconnected tracing on detach.
13269 (handle_serial_event): Adjust.
13270 (handle_target_event): If GDB isn't connected, forward events back
13271 to the inferior, unless the last process exited, in which case,
13272 exit gdbserver. Adjust interface.
13273
13274 * remote-utils.c (remote_open): Don't block in accept. Instead
13275 register an event loop source on the listen socket file
13276 descriptor. Refactor bits into ...
13277 (listen_desc): ... this new global.
13278 (gdb_connected): ... this new function.
13279 (enable_async_notification): ... this new function.
13280 (handle_accept_event): ... this new function.
13281 (remote_close): Clear remote_desc.
13282
13283 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13284
13285 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13286 New fields.
13287 (mourn_inferior): Define.
13288 (target_process_qsupported): Avoid the dangling else problem.
13289 (thread_stopped): Define.
13290 (pause_all): Define.
13291 (target_waitstatus_to_string): Declare.
13292 * target.c (target_waitstatus_to_string): New.
13293
13294 * tracepoint.c (tracing): Make extern.
13295 (disconnected_tracing): New.
13296 (stop_tracing): Make extern. Handle tracing stops due to GDB
13297 disconnecting.
13298 (cmd_qtdisconnected): New.
13299 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13300 (handle_tracepoint_general_set): Handle QTDisconnected.
13301
13302 * event-loop.c (event_handler_func): Change return type to int.
13303 (process_event): Bail out if the event handler wants the event
13304 loop to stop.
13305 (handle_file_event): Ditto.
13306 (start_event_loop): Bail out if the event handler wants the event
13307 loop to stop.
13308
13309 * nto-low.c (nto_target_ops): Adjust.
13310 * spu-low.c (spu_wait): Don't remove the process here.
13311 (spu_target_ops): Adjust.
13312 * win32-low.c (win32_wait): Don't remove the process here.
13313 (win32_target_ops): Adjust.
13314
13315 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13316
13317 * regcache.c (realloc_register_cache): Invalidate inferior's
13318 regcache before recreating it.
13319
13320 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13321
13322 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13323
13324 2010-04-09 Stan Shebs <stan@codesourcery.com>
13325 Pedro Alves <pedro@codesourcery.com>
13326
13327 * server.h (LONGEST): New.
13328 (struct thread_info) <while_stepping>: New field.
13329 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13330 Declare.
13331 (initialize_tracepoint, handle_tracepoint_general_set)
13332 (handle_tracepoint_query, tracepoint_finished_step)
13333 (tracepoint_was_hit, release_while_stepping_state_list):
13334 (current_traceframe): Declare.
13335 * server.c (handle_general_set): Handle tracepoint packets.
13336 (read_memory): New.
13337 (write_memory): New.
13338 (handle_search_memory_1): Use read_memory.
13339 (handle_query): Report support for conditional tracepoints, trace
13340 state variables, and tracepoint sources. Handle tracepoint
13341 queries.
13342 (main): Initialize the tracepoints module.
13343 (process_serial_event): Handle traceframe reads/writes.
13344
13345 * linux-low.c (handle_tracepoints): New.
13346 (linux_wait_1): Call it.
13347 (linux_resume_one_lwp): Handle while-stepping.
13348 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13349 (linux_target_ops): Install them.
13350 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13351 New field.
13352 * linux-x86-low.c (x86_supports_tracepoints): New.
13353 (the_low_target). Install it.
13354
13355 * mem-break.h (delete_breakpoint): Declare.
13356 * mem-break.c (delete_breakpoint): Make external.
13357
13358 * target.h (struct target_ops): Add `supports_tracepoints',
13359 `read_pc', and `write_pc' fields.
13360 (target_supports_tracepoints): Define.
13361 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13362 (phex_nz): New.
13363
13364 * regcache.h (struct regcache) <registers_owned>: New field.
13365 (init_register_cache, regcache_cpy): Declare.
13366 (regcache_read_pc, regcache_write_pc): Declare.
13367 (register_cache_size): Declare.
13368 (supply_regblock): Declare.
13369 * regcache.c (init_register_cache): New.
13370 (new_register_cache): Use it.
13371 (regcache_cpy): New.
13372 (register_cache_size): New.
13373 (supply_regblock): New.
13374 (regcache_read_pc, regcache_write_pc): New.
13375
13376 * tracepoint.c: New.
13377
13378 * Makefile.in (OBS): Add tracepoint.o.
13379 (tracepoint.o): New rule.
13380
13381 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13382
13383 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13384 (i386-mmx.o): New.
13385 (i386-mmx.c): Likewise.
13386 (i386-mmx-linux.o): Likewise.
13387 (i386-mmx-linux.c): Likewise.
13388
13389 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13390 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13391 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13392 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13393
13394 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13395 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13396 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13397
13398 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13399
13400 * Makefile.in (clean): Updated.
13401 (i386-avx.o): New.
13402 (i386-avx.c): Likewise.
13403 (i386-avx-linux.o): Likewise.
13404 (i386-avx-linux.c): Likewise.
13405 (amd64-avx.o): Likewise.
13406 (amd64-avx.c): Likewise.
13407 (amd64-avx-linux.o): Likewise.
13408 (amd64-avx-linux.c): Likewise.
13409
13410 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13411 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13412 (srv_amd64_regobj): Add amd64-avx.o.
13413 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13414 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13415 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13416 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13417 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13418 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13419 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13420
13421 * i387-fp.c: Include "i386-xstate.h".
13422 (i387_xsave): New.
13423 (i387_cache_to_xsave): Likewise.
13424 (i387_xsave_to_cache): Likewise.
13425 (x86_xcr0): Likewise.
13426
13427 * i387-fp.h (i387_cache_to_xsave): Likewise.
13428 (i387_xsave_to_cache): Likewise.
13429 (x86_xcr0): Likewise.
13430
13431 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13432 * linux-crisv32-low.c (target_regsets): Likewise.
13433 * linux-m68k-low.c (target_regsets): Likewise.
13434 * linux-mips-low.c (target_regsets): Likewise.
13435 * linux-ppc-low.c (target_regsets): Likewise.
13436 * linux-s390-low.c (target_regsets): Likewise.
13437 * linux-sh-low.c (target_regsets): Likewise.
13438 * linux-sparc-low.c (target_regsets): Likewise.
13439 * linux-xtensa-low.c (target_regsets): Likewise.
13440
13441 * linux-low.c: Include <sys/uio.h>.
13442 (regsets_fetch_inferior_registers): Support nt_type.
13443 (regsets_store_inferior_registers): Likewise.
13444 (linux_process_qsupported): New.
13445 (linux_target_ops): Add linux_process_qsupported.
13446
13447 * linux-low.h (regset_info): Add nt_type.
13448 (linux_target_ops): Add process_qsupported.
13449
13450 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13451 and <sys/uio.h>.
13452 (init_registers_i386_avx_linux): New.
13453 (init_registers_amd64_avx_linux): Likewise.
13454 (xmltarget_i386_linux_no_xml): Likewise.
13455 (xmltarget_amd64_linux_no_xml): Likewise.
13456 (PTRACE_GETREGSET): Likewise.
13457 (PTRACE_SETREGSET): Likewise.
13458 (x86_fill_xstateregset): Likewise.
13459 (x86_store_xstateregset): Likewise.
13460 (use_xml): Likewise.
13461 (x86_linux_update_xmltarget): Likewise.
13462 (x86_linux_process_qsupported): Likewise.
13463 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13464 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13465 init_registers_i386_linux here. Call
13466 x86_linux_update_xmltarget.
13467 (the_low_target): Add x86_linux_process_qsupported.
13468
13469 * server.c (handle_query): Call target_process_qsupported.
13470
13471 * target.h (target_ops): Add process_qsupported.
13472 (target_process_qsupported): New.
13473
13474 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13475
13476 * inferiors.c (add_thread): Set last_status kind to
13477 TARGET_WAITKIND_IGNORE.
13478 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13479 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13480 (linux_wait_1): Move `thread' local definition to block that uses
13481 it. Don't NULL initialize `event_child'.
13482 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13483 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13484 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13485
13486 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13487
13488 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13489 an extended waitstatus, or by a watchpoint.
13490 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13491 thread was stepping or has been stopped by a watchpoint.
13492
13493 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13494
13495 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13496 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13497 of another, then delete the previous, and validate all
13498 breakpoints.
13499 (validate_inserted_breakpoint): New.
13500 (delete_disabled_breakpoints): New.
13501 (validate_breakpoints): New.
13502 (check_mem_read): Validate breakpoints before trusting their
13503 shadow. Delete disabled breakpoints.
13504 (check_mem_write): Validate breakpoints before trusting they
13505 should be inserted. Delete disabled breakpoints.
13506 * mem-break.h (validate_breakpoints):
13507 * server.c (handle_query): Validate breakpoints when we see a
13508 qSymbol query.
13509
13510 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13511
13512 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13513 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13514 if we could tell there's a GDB breakpoint at stop_pc.
13515 (need_step_over_p): Don't do a step over if we find a GDB
13516 breakpoint at the resume PC.
13517
13518 * mem-break.c (struct raw_breakpoint): New.
13519 (enum bkpt_type): New type `gdb_breakpoint'.
13520 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13521 fields. New field `raw'.
13522 (find_raw_breakpoint_at): New.
13523 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13524 breakpoint instead.
13525 (set_breakpoint_at): Adjust.
13526 (delete_raw_breakpoint): New.
13527 (release_breakpoint): New.
13528 (delete_breakpoint): Rename to...
13529 (delete_breakpoint_1): ... this. Add proc parameter. Use
13530 release_breakpoint. Return ENOENT.
13531 (delete_breakpoint): Reimplement.
13532 (find_breakpoint_at): Delete.
13533 (find_gdb_breakpoint_at): New.
13534 (delete_breakpoint_at): Delete.
13535 (set_gdb_breakpoint_at): New.
13536 (delete_gdb_breakpoint_at): New.
13537 (gdb_breakpoint_here): New.
13538 (set_reinsert_breakpoint): Use release_breakpoint.
13539 (uninsert_breakpoint): Rename to ...
13540 (uninsert_raw_breakpoint): ... this.
13541 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13542 (reinsert_raw_breakpoint): Change parameter type to
13543 raw_breakpoint.
13544 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13545 instead.
13546 (check_breakpoints): Adjust. Use release_breakpoint.
13547 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13548 (breakpoint_inserted_here): Ditto.
13549 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13550 Don't trust the breakpoint's shadow if it is not inserted.
13551 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13552 (delete_all_breakpoints): Adjust.
13553 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13554 use delete_breakpoint_1.
13555
13556 * mem-break.h (breakpoints_supported): Delete declaration.
13557 (set_gdb_breakpoint_at): Declare.
13558 (gdb_breakpoint_here): Declare.
13559 (delete_breakpoint_at): Delete.
13560 (delete_gdb_breakpoint_at): Declare.
13561
13562 * server.h (struct raw_breakpoint): Forward declare.
13563 (struct process_info): New field `raw_breakpoints'.
13564
13565 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13566 breakpoints.
13567
13568 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13569
13570 * linux-low.c (status_pending_p_callback): Fix comment.
13571 (linux_wait_for_event_1): Move most of the internal breakpoint
13572 handling from here...
13573 (linux_wait_1): ... to here.
13574 (count_events_callback): New.
13575 (select_singlestep_lwp_callback): New.
13576 (select_event_lwp_callback): New.
13577 (cancel_breakpoints_callback): New.
13578 (select_event_lwp): New.
13579 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13580 priority to all LWPs that have had events that should be reported
13581 to the client. Cancel breakpoints when about to reporting the
13582 event to the client, not while stopping lwps. No longer cancel
13583 finished single-steps here.
13584 (cancel_finished_single_step): Delete.
13585 (cancel_finished_single_steps): Delete.
13586
13587 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13588
13589 * mem-break.c (enum bkpt_type): New.
13590 (struct breakpoint): New field `type'.
13591 (set_breakpoint_at): Change return type to struct breakpoint
13592 pointer. Set type to `other_breakpoint' by default.
13593 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13594 in the breakpoint list.
13595 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13596 (reinsert_breakpoint): Rename to ...
13597 (reinsert_raw_breakpoint): ... this.
13598 (reinsert_breakpoints_at): Adjust.
13599 * mem-break.h (struct breakpoint): Declare.
13600 (set_breakpoint_at): Change return type to struct breakpoint
13601 pointer.
13602
13603 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13604
13605 * server.c (handle_query): Assign, not compare.
13606
13607 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13608
13609 Teach linux gdbserver to step-over-breakpoints.
13610
13611 * linux-low.c (can_hardware_single_step): New.
13612 (supports_breakpoints): New.
13613 (handle_extended_wait): If stopping threads, read the stop pc of
13614 the new cloned LWP.
13615 (get_pc): New.
13616 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13617 low target doesn't support retrieving the PC.
13618 (add_lwp): Set last_resume_kind to resume_continue.
13619 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13620 (linux_attach): Don't clear stop_expected. Set the lwp's
13621 last_resume_kind to resume_stop.
13622 (linux_detach_one_lwp): Don't check for removed breakpoints.
13623 (check_removed_breakpoint): Delete.
13624 (status_pending_p): Rename to ...
13625 (status_pending_p_callback): ... this. Don't check for removed
13626 breakpoints. Don't consider threads that are stopped from GDB's
13627 perspective.
13628 (linux_wait_for_lwp): Always read the stop_pc here.
13629 (cancel_breakpoint): New.
13630 (step_over_bkpt): New global.
13631 (linux_wait_for_event_1): Implement stepping over breakpoints.
13632 (gdb_wants_lwp_stopped): New.
13633 (gdb_wants_all_stopped): New.
13634 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13635 single-step traps here. Store the thread's last reported target
13636 wait status.
13637 (send_sigstop): Don't clear stop_expected. Always set it,
13638 instead.
13639 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13640 (cancel_finished_single_step): New.
13641 (cancel_finished_single_steps): New.
13642 (wait_for_sigstop): Don't cancel finished single-step traps here.
13643 (linux_resume_one_lwp): Don't check for removed breakpoints.
13644 Don't set `step' on non-hardware step archs.
13645 (linux_set_resume_request): Ignore resume_stop requests if already
13646 stopping or stopped. Set the lwp's last_resume_kind.
13647 (resume_status_pending_p): Don't check for removed breakpoints.
13648 (need_step_over_p): New.
13649 (start_step_over): New.
13650 (finish_step_over): New.
13651 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13652 requests. Clear the thread's last reported target waitstatus.
13653 Don't use the `suspended' flag. Don't consider pending breakpoints.
13654 (linux_resume): Start a step-over if necessary.
13655 (proceed_one_lwp): New.
13656 (proceed_all_lwps): New.
13657 (unstop_all_lwps): New.
13658 * linux-low.h (struct lwp_info): Rewrite comment for the
13659 `suspended' flag. Add the `stop_pc' field. Delete the
13660 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13661 Add `'last_resume_kind' and `need_step_over' fields.
13662 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13663 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13664 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13665 (set_raw_breakpoint_at): New.
13666 (set_breakpoint_at): Rewrite to use it.
13667 (reinsert_breakpoint_handler): Delete.
13668 (set_reinsert_breakpoint): New.
13669 (reinsert_breakpoint_by_bp): Delete.
13670 (delete_reinsert_breakpoints): New.
13671 (uninsert_breakpoint): Rewrite.
13672 (uninsert_breakpoints_at): New.
13673 (reinsert_breakpoint): Rewrite.
13674 (reinsert_breakpoints_at): New.
13675 (check_breakpoints): Rewrite.
13676 (breakpoint_here): New.
13677 (breakpoint_inserted_here): New.
13678 (check_mem_read): Adjust.
13679 * mem-break.h (breakpoints_supported, breakpoint_here)
13680 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13681 (reinsert_breakpoint_by_bp): Delete declaration.
13682 (delete_reinsert_breakpoints): Declare.
13683 (reinsert_breakpoint): Delete declaration.
13684 (reinsert_breakpoints_at): Declare.
13685 (uninsert_breakpoint): Delete declaration.
13686 (uninsert_breakpoints_at): Declare.
13687 (check_breakpoints): Adjust prototype.
13688 * server.h: Adjust include order.
13689 (struct thread_info): Declare here. Add a `last_status' field.
13690
13691 2010-03-23 Michael Snyder <msnyder@vmware.com>
13692
13693 * server.c (crc32): New function.
13694 (handle_query): Add handling for 'qCRC:' request.
13695
13696 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13697
13698 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13699 lwp had been stopped by a watchpoint.
13700
13701 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13702
13703 * server.h (internal_error): Declare.
13704 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13705 * utils.c (internal_error): New function.
13706
13707 2010-03-15 Andreas Schwab <schwab@redhat.com>
13708
13709 * configure.srv: Fix typo setting srv_regobj.
13710
13711 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13712
13713 * linux-low.c (fetch_register): Avoid passing a non string literal
13714 format to `error'.
13715 (usr_store_inferior_registers): Ditto.
13716
13717 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13718
13719 * linux-low.c (linux_write_memory): Bail out early if peeking
13720 memory failed.
13721
13722 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13723
13724 * linux-low.h (struct lwp_info): New fields
13725 `stopped_by_watchpoint' and `stopped_data_address'.
13726 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13727 here, and cache them in the lwp object.
13728 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13729 directly.
13730 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13731 field.
13732 (linux_stopped_by_watchpoint): Rewrite.
13733 (linux_stopped_data_address): Rewrite.
13734
13735 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13736
13737 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13738 switching the current inferior, not before.
13739
13740 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13741
13742 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13743 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13744 i386-linux.c and amd64-linux.c.
13745 (reg-i386.o): Removed.
13746 (reg-i386.c): Likewise.
13747 (reg-i386-linux.o): Likewise.
13748 (reg-i386-linux.c): Likewise.
13749 (reg-x86-64.o): Likewise.
13750 (reg-x86-64.c): Likewise.
13751 (reg-x86-64-linux.o): Likewise.
13752 (reg-x86-64-linux.c): Likewise.
13753 (i386.o): New.
13754 (i386.c): Likewise.
13755 (i386-linux.o): Likewise.
13756 (i386-linux.c): Likewise.
13757 (amd64.o): Likewise.
13758 (amd64.c): Likewise.
13759 (amd64-linux.o): Likewise.
13760 (amd64-linux.c): Likewise.
13761
13762 * configure.srv (srv_i386_regobj): New.
13763 (srv_i386_linux_regobj): Likewise.
13764 (srv_amd64_regobj): Likewise.
13765 (srv_amd64_linux_regobj): Likewise.
13766 (srv_i386_32bit_xmlfiles): Likewise.
13767 (srv_i386_64bit_xmlfiles): Likewise.
13768 (srv_i386_xmlfiles): Likewise.
13769 (srv_amd64_xmlfiles): Likewise.
13770 (srv_i386_linux_xmlfiles): Likewise.
13771 (srv_amd64_linux_xmlfiles): Likewise.
13772 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13773 srv_xmlfiles to $srv_i386_xmlfiles.
13774 (i[34567]86-*-mingw32ce*): Likewise.
13775 (i[34567]86-*-mingw*): Likewise.
13776 (i[34567]86-*-nto*): Likewise.
13777 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13778 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13779 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13780 (x86_64-*-linux*): Likewise.
13781
13782 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13783 (init_registers_amd64_linux): New.
13784 (x86_arch_setup): Replace init_registers_x86_64_linux with
13785 init_registers_amd64_linux.
13786
13787 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13788
13789 * configure.ac: Check for libdl. If it is not available link against
13790 static libthread_db.
13791 * configure: Regenerate.
13792
13793 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13794
13795 PR9605
13796
13797 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13798 handing a read watchpoint.
13799 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13800
13801 2010-02-12 Doug Evans <dje@google.com>
13802
13803 * linux-low.c (linux_supports_tracefork_flag): Document.
13804 (linux_look_up_symbols): Add comment.
13805
13806 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13807
13808 * regcache.c (supply_register): Clear regcache if buf is NULL.
13809
13810 2010-02-02 Nicolas Roche <roche@sourceware.org>
13811 Joel Brobecker <brobecker@adacore.com>
13812
13813 * inferiors.c (find_inferior): Add function documentation.
13814 (unloaded_dll): Handle the case where the unloaded dll has not
13815 been previously registered in the dll list.
13816
13817 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13818
13819 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13820 (thumb2_breakpoint): New.
13821 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13822
13823 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13824
13825 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13826 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13827 breakpoints.
13828
13829 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13830
13831 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13832
13833 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13834
13835 * linux-s390-low.c (s390_collect_ptrace_register)
13836 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13837
13838 2010-01-21 Doug Evans <dje@google.com>
13839
13840 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13841 (PTRACE_ARG4_TYPE): New macro.
13842 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13843 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13844 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13845 (usr_store_inferior_registers): Ditto.
13846 (linux_read_memory, linux_write_memory): Ditto.
13847 (linux_test_for_tracefork): Ditto.
13848
13849 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13850 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13851
13852 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13853
13854 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13855 target.
13856
13857 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13858
13859 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13860 prototype to take a regcache. Adjust.
13861
13862 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13863
13864 * regcache.h (struct thread_info): Forward declare.
13865 (struct regcache): New.
13866 (new_register_cache): Adjust prototype.
13867 (get_thread_regcache): Declare.
13868 (free_register_cache): Adjust prototype.
13869 (registers_to_string, registers_from_string): Ditto.
13870 (supply_register, supply_register_by_name, collect_register)
13871 (collect_register_as_string, collect_register_by_name): Ditto.
13872 * regcache.c (struct inferior_regcache_data): Delete.
13873 (get_regcache): Rename to ...
13874 (get_thread_regcache): ... this. Adjust. Switch inferior before
13875 fetching registers.
13876 (regcache_invalidate_one): Adjust.
13877 (regcache_invalidate): Fix prototype.
13878 (new_register_cache): Return the new register cache.
13879 (free_register_cache): Change prototype.
13880 (realloc_register_cache): Adjust.
13881 (registers_to_string): Change prototype to take a regcache. Adjust.
13882 (registers_from_string): Ditto.
13883 (register_data): Ditto.
13884 (supply_register): Ditto.
13885 (supply_register_by_name): Ditto.
13886 (collect_register): Ditto.
13887 (collect_register_as_string): Ditto.
13888 (collect_register_by_name): Ditto.
13889 * server.c (process_serial_event): Adjust.
13890 * linux-low.h (regset_fill_func, regset_store_func): Change
13891 prototype.
13892 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13893 Change prototype.
13894 * linux-low.c (get_stop_pc): Adjust.
13895 (check_removed_breakpoint): Adjust.
13896 (linux_wait_for_event): Adjust.
13897 (linux_resume_one_lwp): Adjust.
13898 (fetch_register): Add regcache parameter. Adjust.
13899 (usr_store_inferior_registers): Ditto.
13900 (regsets_fetch_inferior_registers): Ditto.
13901 (regsets_store_inferior_registers): Ditto.
13902 (linux_fetch_registers, linux_store_registers): Ditto.
13903 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13904 regcache. Adjust.
13905 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13906 Ditto.
13907 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13908 prototype to take a regcache.
13909 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13910 * remote-utils.c (convert_ascii_to_int, outreg)
13911 (prepare_resume_reply): Change prototype to take a regcache.
13912 Adjust.
13913 * target.h (struct target_ops) <fetch_registers, store_registers>:
13914 Change prototype to take a regcache.
13915 (fetch_inferior_registers, store_inferior_registers): Change
13916 prototype to take a regcache. Adjust.
13917 * proc-service.c (ps_lgetregs): Adjust.
13918 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13919 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13920 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13921 take a regcache. Adjust.
13922 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13923 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13924 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13925 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13926 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13927 (cris_cannot_fetch_register):
13928 (cris_breakpoint_at): Change prototype to take a regcache.
13929 Adjust.
13930 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13931 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13932 to take a regcache. Adjust.
13933 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13934 Adjust.
13935 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13936 take a regcache. Adjust.
13937 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13938 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13939 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13940 * linux-mips-low.c (mips_get_pc):
13941 (mips_set_pc): Change prototype to take a regcache. Adjust.
13942 (mips_reinsert_addr): Adjust.
13943 (mips_collect_register): Change prototype to take a regcache.
13944 Adjust.
13945 (mips_supply_register):
13946 (mips_collect_register_32bit, mips_supply_register_32bit)
13947 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13948 (mips_store_fpregset): Ditto.
13949 * linux-ppc-low.c (ppc_supply_ptrace_register)
13950 (ppc_supply_ptrace_register): Ditto.
13951 (parse_spufs_run): Adjust.
13952 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13953 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13954 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13955 take a regcache. Adjust.
13956 * linux-s390-low.c (s390_collect_ptrace_register)
13957 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13958 (s390_set_pc): Change prototype to take a regcache. Adjust.
13959 (s390_arch_setup): Adjust.
13960 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13961 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13962 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13963 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13964 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13965 regcache. Adjust.
13966 (sparc_breakpoint_at): Adjust.
13967 * linux-xtensa-low.c (xtensa_fill_gregset):
13968 (xtensa_store_gregset):
13969 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13970 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13971 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13972 prototype to take a regcache. Adjust.
13973 * win32-arm-low.c (arm_fetch_inferior_register)
13974 (arm_store_inferior_register): Change prototype to take a
13975 regcache. Adjust.
13976 * win32-i386-low.c (i386_fetch_inferior_register)
13977 (i386_store_inferior_register): Change prototype to take a
13978 regcache. Adjust.
13979 * win32-low.c (child_fetch_inferior_registers)
13980 (child_store_inferior_registers): Change prototype to take a
13981 regcache. Adjust.
13982 (win32_wait): Adjust.
13983 (win32_fetch_inferior_registers): Change prototype to take a
13984 regcache. Adjust.
13985 (win32_store_inferior_registers): Adjust.
13986 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13987 store_inferior_register>: Change prototype to take a regcache.
13988
13989 2010-01-20 Doug Evans <dje@google.com>
13990
13991 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13992 #ifdef.
13993 (linux_wait_for_event1, linux_init_signals): Ditto.
13994 (W_STOPCODE): Provide definition if missing.
13995
13996 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13997
13998 * linux-low.c (linux_core_of_thread): New.
13999 (compare_ints, show_process, list_threads): New.
14000 (linux_qxfer_osdata): Report threads and cores.
14001 (linux_target_op): Register linux_core_of_thread.
14002 * remote-utils.c (prepare_resume_reply): Report the core.
14003 (buffer_xml_printf): Support %d specifier.
14004 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14005 New.
14006 (handle_query): Handle qXfer:threads. Announce availability
14007 thereof.
14008 * target.h (struct target_ops): New field core_of_thread.
14009
14010 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14011
14012 * Makefile.in (clean): Remove new generated files.
14013 (reg-s390.o, reg-s390.c): Remove rules.
14014 (reg-s390x.o, reg-s390x.c): Likewise.
14015 (s390-linux32.o, s390-linux32.c): Add rules.
14016 (s390-linux64.o, s390-linux64.c): Likewise.
14017 (s390x-linux64.o, s390x-linux64.c): Likewise.
14018 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14019 * linux-s390-low.c: Include <elf.h>.
14020 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14021 (init_registers_s390): Remove prototype.
14022 (init_registers_s390x): Likewise.
14023 (init_registers_s390_linux32): Add prototype.
14024 (init_registers_s390_linux64): Likewise.
14025 (init_registers_s390x_linux64): Likewise.
14026 (s390_num_regs_3264): New define.
14027 (s390_regmap_3264): New global variable.
14028 (s390_cannot_fetch_register): Remove obsolete check.
14029 (s390_cannot_store_register): Likewise.
14030 (s390_collect_ptrace_register): Handle upper/lower register halves.
14031 (s390_supply_ptrace_register): Likewise.
14032 (s390_fill_gregset): Update to register number changes.
14033 (s390_get_hwcap): New routine.
14034 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14035 Install appropriate regmap and register set.
14036
14037 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14038
14039 * server.c (gdbserver_version): Update copyright year to 2010.
14040 * gdbreplay.c (gdbreplay_version): Likewise.
14041
14042 2009-12-28 Doug Evans <dje@google.com>
14043
14044 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14045 elf/external.h. Include <elf.h> instead but only if necessary.
14046
14047 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14048
14049 * linux-low.c (linux_remove_process): Remove `detaching'
14050 parameter. Don't release/detach from thread_db here.
14051 (linux_kill): Release/detach from thread_db here, ...
14052 (linux_detach): ... and here, before actually detaching.
14053 (linux_wait_1): ... and here, when a process exits.
14054 * thread-db.c (any_thread_of): New.
14055 (thread_db_free): Switch the current inferior to a thread of the
14056 passed in process.
14057
14058 2009-12-21 Doug Evans <dje@google.com>
14059
14060 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14061
14062 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14063 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14064 warning ifndef __NR_tkill. Move setting of errno there too.
14065 Delete unnecessary resetting of errno after syscall.
14066 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14067
14068 * configure.ac: Check for dladdr.
14069 * config.in: Regenerate.
14070 * configure: Regenerate.
14071 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14072 (try_thread_db_load): Update.
14073
14074 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14075
14076 2009-12-18 Doug Evans <dje@google.com>
14077
14078 * event-loop.c: Include unistd.h if it exists.
14079
14080 * linux-low.c (my_waitpid): Move definition away from being in
14081 between linux_tracefork_child/linux_test_for_tracefork.
14082
14083 * gdb_proc_service.h (psaddr_t): Fix type.
14084 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14085 signature to match glibc.
14086
14087 2009-12-16 Doug Evans <dje@google.com>
14088
14089 * linux-low.c (linux_read_memory): Fix argument to read.
14090
14091 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14092
14093 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14094 events, don't leave current_inferior pointing at null.
14095
14096 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14097
14098 * win32-low.c (LOG): Delete.
14099 (OUTMSG): Output to stderr.
14100 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14101 on compile time LOG macro.
14102 (win32_wait): Fix debug output.
14103
14104 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14105
14106 * win32-low.c (win32_add_one_solib): If the dll name is
14107 "ntdll.dll", prepend the system directory to the dll path.
14108
14109 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14110
14111 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14112
14113 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14114 Vladimir Prus <vladimir@codesourcery.com>
14115
14116 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14117 * configure.ac: Check for __mcoldfire__ and set
14118 gdb_cv_m68k_is_coldfire.
14119 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14120 reg-cf.o and reg-m68k.o.
14121 * configure: Regenerated.
14122
14123 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14124
14125 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14126 Pass it to thread_db_free.
14127 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14128 proper `detaching' argument to linux_remove_process.
14129 * linux-low.h (thread_db_free): Add `detaching' parameter.
14130 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14131 to thread_db_free.
14132 (thread_db_free): Add `detaching' parameter. Only
14133 call td_ta_clear_event if detaching from process.
14134
14135 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14136
14137 * thread-db.c (thread_db_free): Fix typo.
14138
14139 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14140
14141 PR gdb/10838
14142 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14143
14144 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14145
14146 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14147 with an i686 compiler.
14148 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14149 needed.
14150 * configure: Rebuilt.
14151
14152 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14153
14154 PR gdb/10783
14155
14156 * server.c (handle_search_memory_1): Correct read_addr initialization
14157 in loop for searching subsequent chunks.
14158
14159 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14160
14161 * configure.ac: New --with-libthread-db option.
14162 * thread-db.c: Allow direct dependence on libthread_db.
14163 (thread_db_free): Adjust.
14164 * config.in: Regenerate.
14165 * configure: Likewise.
14166
14167 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14168
14169 PR gdb/10757
14170 * thread-db.c (attach_thread): New function.
14171 (maybe_attach_thread): Return success/failure.
14172 (find_new_threads_callback): Adjust.
14173 (thread_db_find_new_threads): Loop until no new threads.
14174
14175 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14176
14177 * proc-service.c (ps_lgetregs): Formatting.
14178
14179 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14180
14181 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14182 * configure.ac: Adjust.
14183 * linux-low.h (struct process_info_private): Move members to struct
14184 thread_db.
14185 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14186 * linux-low.c (linux_remove_process): Adjust.
14187 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14188 * server.c (handle_query): Move code ...
14189 (handle_monitor_command): ... here. New function.
14190 * target.h (struct target_ops): New member.
14191 * thread-db.c (struct thread_db): New.
14192 (libthread_db_search_path): New variable.
14193 (thread_db_create_event, thread_db_enable_reporting)
14194 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14195 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14196 (try_thread_db_load_1, dladdr_to_soname): New functions.
14197 (try_thread_db_load, thread_db_load_search): New functions.
14198 (thread_db_init): Search for libthread_db.
14199 (thread_db_free): New function.
14200 (thread_db_handle_monitor_command): Likewise.
14201 * config.in: Regenerate.
14202 * configure: Regenerate.
14203
14204 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14205
14206 * spu-low.c (spu_kill): Wait for inferior to terminate.
14207 Call clear_inferiors.
14208 (spu_detach): Call clear_inferiors.
14209
14210 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14211
14212 * aclocal.m4: Regenerate.
14213 * config.in: Likewise.
14214 * configure: Likewise.
14215
14216 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14217
14218 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14219 (parse_spufs_run): New function.
14220 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14221 (ppc_breakpoint_at): Handle SPU breakpoints.
14222
14223 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14224
14225 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14226 (SPUFS_MAGIC): Define.
14227 (spu_enumerate_spu_ids): New function.
14228 (linux_qxfer_spu): New function.
14229 (linux_target_ops): Install linux_qxfer_spu.
14230
14231 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14232
14233 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14234 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14235 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14236 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14237 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14238 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14239 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14240 (init_registers_powerpc_cell32l): Add prototype.
14241 (init_registers_powerpc_cell64l): Likewise.
14242 (ppc_arch_setup): Detect Cell/B.E. architecture.
14243
14244 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14245
14246 * Makefile.in (datarootdir): New variable.
14247
14248 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14249
14250 * linux-low.c (linux_write_memory): Update debugging output.
14251 * Makefile.in (clean): Add new descriptions.
14252 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14253 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14254 * configure.srv: Add new files for arm*-*-linux*.
14255 * linux-arm-low.c: Add new declarations.
14256 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14257 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14258 (HWCAP_VFPv3D16): New.
14259 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14260 instead of __IWMMXT__.
14261 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14262 (arm_arch_setup): New.
14263 (target_regsets): Remove #ifdef. Add VFP regset.
14264 (the_low_target): Use arm_arch_setup.
14265
14266 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14267
14268 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14269 the main thread again.
14270
14271 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14272
14273 Adding Neutrino gdbserver.
14274 * configure: Regenerated.
14275 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14276 * configure.srv (i[34567]86-*-nto*): New target.
14277 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14278 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14279 (nto_comctrl) [__QNX__]: New function.
14280 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14281
14282 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14283
14284 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14285 srv_tgtobj.
14286
14287 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14288 Pedro Alves <pedro@codesourcery.com>
14289
14290 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14291 don't support CONTEXT_EXTENDED_REGISTERS.
14292 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14293 (the_low_target): Install them.
14294 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14295 failing with ERROR_PIPE_NOT_CONNECTED.
14296
14297 2009-06-30 Doug Evans <dje@google.com>
14298 Pierre Muller <muller@ics.u-strasbg.fr>
14299
14300 Add h/w watchpoint support to x86-linux, win32-i386.
14301 * Makefile.in (SFILES): Add i386-low.c
14302 (i386_low_h): Define.
14303 (i386-low.o): Add dependencies.
14304 (linux-x86-low.o): Add i386-low.h dependency.
14305 (win32-i386-low.o): Ditto.
14306 * i386-low.c: New file.
14307 * i386-low.h: New file.
14308 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14309 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14310 * linux-low.c (linux_add_process): Initialize arch_private.
14311 (linux_remove_process): Free arch_private.
14312 (add_lwp): Initialize arch_private.
14313 (delete_lwp): Free arch_private.
14314 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14315 provided.
14316 * linux-low.h (process_info_private): New member arch_private.
14317 (lwp_info): New member arch_private.
14318 (linux_target_ops): New members new_process, new_thread,
14319 prepare_to_resume.
14320 (ptid_of): New macro.
14321 * linux-x86-low.c: Include stddef.h, i386-low.h.
14322 (arch_process_info): New struct.
14323 (arch_lwp_info): New struct.
14324 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14325 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14326 (i386_dr_low_get_status): New function.
14327 (x86_insert_point, x86_remove_point): New functions.
14328 (x86_stopped_by_watchpoint): New function.
14329 (x86_stopped_data_address): New function.
14330 (x86_linux_new_process, x86_linux_new_thread): New functions.
14331 (x86_linux_prepare_to_resume): New function.
14332 (the_low_target): Add entries for insert_point, remove_point,
14333 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14334 prepare_to_resume.
14335 * server.c (debug_hw_points): New global.
14336 (monitor_show_help): Document set debug-hw-points.
14337 (handle_query): Process "set debug-hw-points".
14338 * server.h (debug_hw_points): Declare.
14339 (paddress): Declare.
14340 * utils.c (NUMCELLS, CELLSIZE): New macros.
14341 (get_sell, xsnprintf, paddress): New functions.
14342 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14343 remove_point, stopped_by_watchpoint, stopped_data_address.
14344 * win32-i386-low.c: Include i386-low.h.
14345 (debug_reg_state): Replaces dr.
14346 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14347 (i386_dr_low_get_status): New function.
14348 (i386_insert_point, i386_remove_point): New functions.
14349 (i386_stopped_by_watchpoint): New function.
14350 (i386_stopped_data_address): New function.
14351 (i386_initial_stuff): Update.
14352 (get_thread_context,set_thread_context,i386_thread_added): Update.
14353 (the_low_target): Add entries for insert_point,
14354 remove_point, stopped_by_watchpoint, stopped_data_address.
14355 * win32-low.c (win32_insert_watchpoint): New function.
14356 (win32_remove_watchpoint): New function.
14357 (win32_stopped_by_watchpoint): New function.
14358 (win32_stopped_data_address): New function.
14359 (win32_target_ops): Add entries for insert_watchpoint,
14360 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14361 * win32-low.h (win32_target_ops): New members insert_point,
14362 remove_point, stopped_by_watchpoint, stopped_data_address.
14363
14364 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14365
14366 * server.c (process_serial_event): Re-return unsupported, not
14367 error, if the type isn't recognized. Re-allow supporting only
14368 insert or remove packets. Also call require_running for
14369 breakpoints. Add missing break statement to default case. Tidy.
14370 * target.h (struct target_ops): Rename insert_watchpoint to
14371 insert_point, and remove_watchpoint to remove_point.
14372
14373 * linux-low.h (struct linux_target_ops): Likewise.
14374 * linux-low.c (linux_insert_watchpoint): Rename to ...
14375 (linux_insert_point): ... this. Adjust.
14376 (linux_remove_watchpoint): Rename to ...
14377 (linux_remove_point): ... this. Adjust.
14378 (linux_target_ops): Adjust.
14379 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14380 (cris_insert_point): ... this.
14381 (cris_remove_watchpoint): Rename to ...
14382 (cris_remove_point): ... this.
14383 (the_low_target): Adjust.
14384
14385 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14386
14387 * server.c (handle_v_kill): Pass signal_pid to
14388 kill_inferior if multi_process is zero.
14389
14390 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14391
14392 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14393 * target.h (target_ops): Comment for *_watchpoint to make it clear
14394 the functions can get types '0' and '1'.
14395
14396 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14397
14398 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14399 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14400 * regcache.c (get_regcache): Likewise.
14401 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14402 * win32-low.c (child_fetch_inferior_registers): Remove check for
14403 regno 0.
14404
14405 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14406 Pedro Alves <pedro@codesourcery.com>
14407
14408 * target.h (struct target_ops) <supports_multi_process>: New
14409 callback.
14410 (target_supports_multi_process): New.
14411 * server.c (handle_query): Even if GDB reports support, only
14412 enable multi-process if the target also supports it. Report
14413 multi-process support only if the target backend supports it.
14414 * linux-low.c (linux_supports_multi_process): New function.
14415 (linux_target_ops): Install it as target_supports_multi_process
14416 callback.
14417
14418 2009-05-24 Doug Evans <dje@google.com>
14419
14420 Global renaming of find_thread_pid to find_thread_ptid.
14421 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14422 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14423 All callers updated.
14424
14425 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14426 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14427 directly.
14428
14429 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14430 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14431 (linux_resume_one_lwp): Ditto.
14432
14433 2009-05-23 Doug Evans <dje@google.com>
14434
14435 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14436 from struct inferior_list_entry * to struct lwp_info *.
14437 All callers updated.
14438
14439 2009-05-13 Doug Evans <dje@google.com>
14440
14441 * linux-x86-low.c: Don't include assert.h.
14442 (x86_siginfo_fixup): Use fatal, not assert.
14443 (x86_arch_setup): Fix comment.
14444
14445 2009-05-12 Doug Evans <dje@google.com>
14446
14447 Biarch support for i386/amd64 gdbserver.
14448 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14449 Add linux-x86-low.c.
14450 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14451 (linux-x86-low.o): Add.
14452 * linux-x86-64-low.c: Delete.
14453 * linux-i386-low.c: Delete.
14454 * linux-x86-low.c: New file.
14455 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14456 linux-x86-low.o.
14457 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14458 linux-x86-low.o.
14459 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14460 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14461 (linux_child_pid_to_exec_file): New function.
14462 (elf_64_header_p, elf_64_file_p): New functions.
14463 (siginfo_fixup): New function.
14464 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14465 give target a chance to convert layout.
14466 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14467 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14468
14469 2009-05-07 Doug Evans <dje@google.com>
14470
14471 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14472 (regsets_store_inferior_registers): Ditto.
14473
14474 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14475
14476 PR server/10048
14477
14478 * linux-low.c (must_set_ptrace_flags): Delete.
14479 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14480 of the global.
14481 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14482 `lwp->must_set_ptrace_flags' instead.
14483 (linux_wait_for_event_1): Set ptrace options here.
14484 (linux_wait_1): ... not here.
14485
14486 2009-04-30 Doug Evans <dje@google.com>
14487
14488 * inferiors.c (started_inferior_callback): New function.
14489 (attached_inferior_callback): New function.
14490 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14491 * server.c (print_started_pid, print_attached_pid): New functions.
14492 (detach_or_kill_for_exit): New function.
14493 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14494 * server.h (have_started_inferiors_p): Declare.
14495 (have_attached_inferiors_p): Declare.
14496
14497 * inferiors.c (remove_process): Fix memory leak, free process.
14498 * linux-low.c (linux_remove_process): New function.
14499 (linux_kill): Call it instead of remove_process.
14500 (linux_detach, linux_wait_1): Ditto.
14501
14502 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14503
14504 * configure.srv: Add x86 Windows CE target.
14505
14506 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14507
14508 * inferiors.c (get_thread_process): Make global.
14509 * server.h (get_thread_process): Add prototype.
14510 * thread-db.c (find_one_thread): Use get_thread_process
14511 instead of current_process.
14512 (thread_db_get_tls_address): Do not crash if called when
14513 thread layer is not yet initialized.
14514
14515 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14516
14517 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14518 * spu-low.c (current_tid): Rename to ...
14519 (current_ptid): ... this.
14520 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14521 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14522 ptid_get_lwp (current_ptid) instead of current_tid.
14523 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14524 instead of current_tid. Use find_process_pid to verify pid
14525 argument is valid. Pass proper argument to remove_process.
14526 (spu_thread_alive): Compare current_ptid instead of current_tid.
14527 (spu_resume): Likewise.
14528
14529 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14530
14531 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14532 variable.
14533
14534 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14535
14536 Implement the multiprocess extensions, and add linux multiprocess
14537 support.
14538
14539 * server.h (ULONGEST): Declare.
14540 (struct ptid, ptid_t): New.
14541 (minus_one_ptid, null_ptid): Declare.
14542 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14543 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14544 (struct inferior_list_entry): Change `id' type from unsigned from
14545 to ptid_t.
14546 (struct sym_cache, struct breakpoint, struct
14547 process_info_private): Forward declare.
14548 (struct process_info): Declare.
14549 (current_process): Declare.
14550 (all_processes): Declare.
14551 (initialize_inferiors): Declare.
14552 (add_thread): Adjust to use ptid_t.
14553 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14554 (add_process, remove_process, find_thread_pid): Declare.
14555 (find_inferior_id): Adjust to use ptid_t.
14556 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14557 (multi_process): Declare.
14558 (push_event): Adjust to use ptid_t.
14559 (read_ptid, write_ptid): Declare.
14560 (prepare_resume_reply): Adjust to use ptid_t.
14561 (clear_symbol_cache): Declare.
14562 * inferiors.c (all_processes): New.
14563 (null_ptid, minus_one_ptid): New.
14564 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14565 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14566 (add_thread): Change unsigned long to ptid. Remove gdb_id
14567 parameter. Adjust.
14568 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14569 (gdb_id_to_thread): Rename to ...
14570 (find_thread_pid): ... this. Change unsigned long to ptid.
14571 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14572 (loaded_dll, pull_pid_from_list): Adjust.
14573 (add_process, remove_process, find_process_pid)
14574 (get_thread_process, current_process, initialize_inferiors): New.
14575 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14576 (struct target_waitstatus) <related_pid>: Ditto.
14577 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14578 return type to int.
14579 (struct target_ops) <join>: Add `pid' argument.
14580 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14581 (struct target_ops) <wait>: Add `ptid' field. Change return type
14582 to ptid.
14583 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14584 (mywait): Add `ptid' argument. Change return type to ptid_t.
14585 (target_pid_to_str): Declare.
14586 * target.c (set_desired_inferior): Adjust to use ptids.
14587 (mywait): Add new `ptid' argument. Adjust.
14588 (target_pid_to_str): New.
14589 * mem-break.h (free_all_breakpoints): Declare.
14590 * mem-break.c (breakpoints): Delelete.
14591 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14592 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14593 to use per-process breakpoint list.
14594 (free_all_breakpoints): New.
14595 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14596 (symbol_cache, all_symbols_looked_up): Delete.
14597 (hexchars): New.
14598 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14599 read_ptid): New.
14600 (prepare_resume_reply): Change ptid argument's type from unsigned
14601 long to ptid_t. Adjust. Implement W;process and X;process.
14602 (free_sym_cache, clear_symbol_cache): New.
14603 (look_up_one_symbol): Adjust to per-process symbol cache. *
14604 * server.c (cont_thread, general_thread, step_thread): Change type
14605 to ptid_t.
14606 (attached): Delete.
14607 (multi_process): New.
14608 (last_ptid): Change type to ptid_t.
14609 (struct vstop_notif) <ptid>: Change type to ptid_t.
14610 (queue_stop_reply, push_event): Change `ptid' argument's type to
14611 ptid_t.
14612 (discard_queued_stop_replies): Add `pid' argument.
14613 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14614 changes. Don't reference the `attached' global.
14615 (attach_inferior): Adjust to mywait interface changes.
14616 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14617 features. Handle and report "multiprocess+". Handle
14618 "qAttached:PID".
14619 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14620 changes.
14621 (handle_v_kill): New.
14622 (handle_v_stopped): Adjust to use target_pid_to_str.
14623 (handle_v_requests): Allow multiple attaches and runs when
14624 multiprocess extensions are in effect. Handle "vKill".
14625 (myresume): Adjust to use ptids.
14626 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14627 (handle_status): Adjust to discard_queued_stop_replies interface
14628 change.
14629 (first_thread_of, kill_inferior_callback)
14630 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14631 (main): Call initialize_inferiors. Adjust to use ptids, killing
14632 and detaching from all inferiors. Handle multiprocess packet
14633 variants.
14634 * linux-low.h: Include gdb_proc_service.h.
14635 (struct process_info_private): New.
14636 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14637 <lwpid_of>: Use ptid_get_lwp.
14638 (get_lwp_thread): Adjust.
14639 (struct lwp_info): Add `dead' member.
14640 (find_lwp_pid): Declare.
14641 * linux-low.c (thread_db_active): Delete.
14642 (new_inferior): Adjust comment.
14643 (inferior_pid): Delete.
14644 (linux_add_process): New.
14645 (handle_extended_wait): Adjust.
14646 (add_lwp): Change unsigned long to ptid.
14647 (linux_create_inferior): Add process to processes table. Adjust
14648 to use ptids. Don't set new_inferior here.
14649 (linux_attach_lwp): Rename to ...
14650 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14651 it. Adjust to use ptids.
14652 (linux_attach_lwp): New.
14653 (linux_attach): Add process to processes table. Don't set
14654 new_inferior here.
14655 (struct counter): New.
14656 (second_thread_of_pid_p, last_thread_of_process_p): New.
14657 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14658 multiple processes.
14659 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14660 processes. Remove process from process table.
14661 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14662 to multiple processes.
14663 (any_thread_of): New.
14664 (linux_detach): Add `pid' argument, and handle it. Remove process
14665 from processes table.
14666 (linux_join): Add `pid' argument. Handle it.
14667 (linux_thread_alive): Change unsighed long argument to ptid_t.
14668 Consider dead lwps as not being alive.
14669 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14670 threads we're not interested in.
14671 (same_lwp, find_lwp_pid): New.
14672 (linux_wait_for_lwp): Change `pid' argument's type from int to
14673 ptid_t. Adjust.
14674 (linux_wait_for_event): Rename to ...
14675 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14676 from int to ptid_t. Adjust.
14677 (linux_wait_for_event): New.
14678 (linux_wait_1): Add `ptid' argument. Change return type to
14679 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14680 that exit from the process table.
14681 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14682 Adjust.
14683 (mark_lwp_dead): New.
14684 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14685 stopping all threads, mark its main lwp as dead.
14686 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14687 ptids.
14688 (fetch_register, usr_store_inferior_registers)
14689 (regsets_fetch_inferior_registers)
14690 (regsets_store_inferior_registers, linux_read_memory)
14691 (linux_write_memory): Inline `inferior_pid'.
14692 (linux_look_up_symbols): Adjust to use per-process
14693 `thread_db_active'.
14694 (linux_request_interrupt): Adjust to use ptids.
14695 (linux_read_auxv): Inline `inferior_pid'.
14696 (initialize_low): Don't reference thread_db_active.
14697 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14698 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14699 (ps_getpid): Return the pid of the current inferior.
14700 * thread-db.c (proc_handle, thread_agent): Delete.
14701 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14702 per-process data.
14703 (find_one_thread): Change argument type to ptid_t. Adjust to
14704 per-process data.
14705 (maybe_attach_thread): Adjust to per-process data and ptids.
14706 (thread_db_find_new_threads): Ditto.
14707 (thread_db_init): Ditto.
14708 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14709 processes table. Adjust to use ptids.
14710 (spu_kill, spu_detach): Adjust interface. Remove process from
14711 processes table.
14712 (spu_join, spu_thread_alive): Adjust interface.
14713 (spu_wait): Adjust interface. Remove process from processes
14714 table. Adjust to use ptids.
14715 * win32-low.c (current_inferior_tid): Delete.
14716 (current_inferior_ptid): New.
14717 (debug_event_ptid): New.
14718 (thread_rec): Take a ptid. Adjust.
14719 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14720 (child_delete_thread): Ditto.
14721 (do_initial_child_stuff): Add `attached' argument. Add process to
14722 processes table.
14723 (child_fetch_inferior_registers, child_store_inferior_registers):
14724 Adjust.
14725 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14726 (win32_attach): Pass 1 to do_initial_child_stuff.
14727 (win32_kill): Adjust interface. Remove process from processes
14728 table.
14729 (win32_detach): Ditto.
14730 (win32_join): Adjust interface.
14731 (win32_thread_alive): Take a ptid.
14732 (win32_resume): Adjust to use ptids.
14733 (get_child_debug_event): Ditto.
14734 (win32_wait): Adjust interface. Remove exiting process from
14735 processes table.
14736
14737 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14738
14739 Non-stop mode support.
14740
14741 * server.h (non_stop): Declare.
14742 (gdb_client_data, handler_func): Declare.
14743 (delete_file_handler, add_file_handler, start_event_loop):
14744 Declare.
14745 (handle_serial_event, handle_target_event, push_event)
14746 (putpkt_notif): Declare.
14747 * target.h (enum resume_kind): New.
14748 (struct thread_resume): Replace `step' field by `kind' field.
14749 (TARGET_WNOHANG): Define.
14750 (struct target_ops) <wait>: Add `options' argument.
14751 <supports_non_stop, async, start_non_stop>: New fields.
14752 (target_supports_non_stop, target_async): New.
14753 (start_non_stop): Declare.
14754 (mywait): Add `options' argument.
14755 * target.c (mywait): Add `options' argument. Print child exit
14756 notifications here.
14757 (start_non_stop): New.
14758 * server.c (non_stop, own_buf, mem_buf): New globals.
14759 (struct vstop_notif): New.
14760 (notif_queue): New global.
14761 (queue_stop_reply, push_event, discard_queued_stop_replies)
14762 (send_next_stop_reply): New.
14763 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14764 interface changes.
14765 (attach_inferior): In non-stop mode, don't wait for the target
14766 here.
14767 (handle_general_set): Handle QNonStop.
14768 (handle_query): When handling qC, return the current general
14769 thread, instead of the first thread of the list.
14770 (handle_query): If the backend supports non-stop mode, include
14771 QNonStop+ in the qSupported query response.
14772 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14773 and non-stop mode.
14774 (handle_v_attach, handle_v_run): Handle non-stop mode.
14775 (handle_v_stopped): New.
14776 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14777 (myresume): Adjust to use resume_kind. Handle non-stop.
14778 (queue_stop_reply_callback): New.
14779 (handle_status): Handle non-stop mode.
14780 (main): Clear non_stop flag on reconnection. Use the event-loop.
14781 Refactor serial protocol handling from here ...
14782 (process_serial_event): ... to this new function. When GDB
14783 selects any thread, select one here. In non-stop mode, wait until
14784 GDB acks all pending events before exiting.
14785 (handle_serial_event, handle_target_event): New.
14786 * remote-utils.c (remote_open): Install remote_desc in the event
14787 loop.
14788 (remote_close): Remove remote_desc from the event loop.
14789 (putpkt_binary): Rename to...
14790 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14791 (putpkt_binary): New as wrapper around putpkt_binary_1.
14792 (putpkt_notif): New.
14793 (prepare_resume_reply): In non-stop mode, don't change the
14794 general_thread.
14795 * event-loop.c: New.
14796 * Makefile.in (OBJ): Add event-loop.o.
14797 (event-loop.o): New rule.
14798
14799 * linux-low.h (pid_of): Moved here.
14800 (lwpid_of): New.
14801 (get_lwp_thread): Use lwpid_of.
14802 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14803 * linux-low.c (pid_of): Delete.
14804 (inferior_pid): Use lwpid_of.
14805 (linux_event_pipe): New.
14806 (target_is_async_p): New.
14807 (delete_lwp): New.
14808 (handle_extended_wait): Use lwpid_of.
14809 (add_lwp): Don't set lwpid field.
14810 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14811 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14812 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14813 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14814 first. Adjust to linux_wait_for_event interface changes. Use
14815 lwpid_of.
14816 (linux_detach): Don't delete the main lwp here.
14817 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14818 (status_pending_p): Don't consider explicitly suspended lwps.
14819 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14820 pointer. Add OPTIONS argument. Change return type to int. Use
14821 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14822 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14823 pointer. Add status pointer argument. Return a pid instead of a
14824 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14825 changes. In non-stop mode, don't switch to a random thread.
14826 (linux_wait): Rename to...
14827 (linux_wait_1): ... this. Add target_options argument, and handle
14828 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14829 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14830 clean exit and signal exit code. Don't stop all threads in
14831 non-stop mode. In all-stop mode, only stop all threads when
14832 reporting a stop to GDB. Handle explicit thread stop requests.
14833 (async_file_flush, async_file_mark): New.
14834 (linux_wait): New.
14835 (send_sigstop): Use lwpid_of.
14836 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14837 interface changes. In non-stop mode, don't switch to a random
14838 thread.
14839 (linux_resume_one_lwp): Use lwpid_of.
14840 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14841 (linux_resume_one_thread): ... this. Handle resume_stop. In
14842 non-stop mode, don't look for pending flag in all threads.
14843 (resume_status_pending_p): Don't consider explicitly suspended
14844 threads.
14845 (my_waitpid): Reimplement. Emulate __WALL.
14846 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14847 Use lwpid_of.
14848 (sigchld_handler, linux_supports_non_stop, linux_async)
14849 (linux_start_non_stop): New.
14850 (linux_target_ops): Register linux_supports_non_stop, linux_async
14851 and linux_start_non_stop.
14852 (initialize_low): Install SIGCHLD handler.
14853 * thread-db.c (thread_db_create_event, find_one_thread)
14854 (thread_db_get_tls_address): Use lwpid_of.
14855 * win32-low.c (win32_detach): Adjust to use resume_kind.
14856 (win32_wait): Add `options' argument.
14857 * spu-low.c (spu_resume): Adjust to use resume_kind.
14858 (spu_wait): Add `options' argument.
14859
14860 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14861
14862 Decouple target code from remote protocol.
14863
14864 * target.h (enum target_waitkind): New.
14865 (struct target_waitstatus): New.
14866 (struct target_ops) <wait>: Return an unsigned long. Take a
14867 target_waitstatus pointer instead of a char pointer.
14868 (mywait): Likewise.
14869 * target.c (mywait): Change prototype to return an unsigned long.
14870 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14871 * server.h (thread_from_wait, old_thread_from_wait): Delete
14872 declarations.
14873 (prepare_resume_reply): Change prototype to take a
14874 target_waitstatus.
14875 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14876 (last_status, last_ptid): New.
14877 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14878 pid instead of a signal.
14879 (attach_inferior): Remove "status" and "signal" parameters.
14880 Adjust.
14881 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14882 not as an address.
14883 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14884 (handle_v_requests, myresume): Remove "status" and "signal"
14885 parameters. Adjust.
14886 (handle_status): New.
14887 (main): Delete local `status'. Adjust.
14888 * remote-utils.c: Include target.h.
14889 (prepare_resume_reply): Change prototype to take a
14890 target_waitstatus. Adjust.
14891
14892 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14893 interface.
14894 * spu-low.c (spu_wait): Adjust.
14895 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14896 Delete.
14897 (win32_wait): Adjust.
14898
14899 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14900
14901 * target.h (struct thread_resume): Delete leave_stopped member.
14902 (struct target_ops): Add a `n' argument to the `resume' callback.
14903 * server.c (start_inferior): Adjust.
14904 (handle_v_cont, myresume): Adjust.
14905 * linux-low.c (check_removed_breakpoint): Adjust to resume
14906 interface change, and to removed leave_stopped field.
14907 (resume_ptr): Delete.
14908 (struct thread_resume_array): New.
14909 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14910 resume interface change.
14911 (linux_continue_one_thread, linux_queue_one_thread)
14912 (resume_status_pending_p): Check if the resume field is NULL
14913 instead of checking the leave_stopped member.
14914 (linux_resume): Adjust to the target resume interface change.
14915 * spu-low.c (spu_resume): Adjust to the target resume interface
14916 change.
14917 * win32-low.c (win32_detach, win32_resume): Ditto.
14918
14919 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14920
14921 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14922 flag.
14923 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14924 pending.
14925 (linux_continue_one_thread): Only preserve the stepping flag if
14926 there's a pending breakpoint.
14927
14928 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14929
14930 * server.c (main): After the inferior having exited, call
14931 remote_close before exiting gdbserver.
14932
14933 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14934
14935 Fix size of FPSCR in Power 7 processors.
14936 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14937 (PPC_FEATURE_HAS_DFP): New #define.
14938 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14939 size of the FPSCR.
14940
14941 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14942
14943 * server.c (handle_query) Whitespace and formatting.
14944
14945 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14946
14947 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14948 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14949 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14950 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14951 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14952 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14953 Makefile.in, configure.ac: Fix whitespace throughout.
14954 * configure: Regenerate.
14955
14956 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14957
14958 * inferiors.c (find_inferior): Make it safe for the callback
14959 function to delete the currently iterated inferior.
14960
14961 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14962
14963 * Makefile.in (linuw_low_h): Move higher.
14964 (thread-db.o): Depend on $(linux_low_h).
14965
14966 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14967
14968 Rename "process" to "lwp" throughout.
14969
14970 * linux-low.c (all_processes): Rename to...
14971 (all_lwps): ... this.
14972 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14973 (add_process): Rename to ...
14974 (add_lwp): ... this. Adjust.
14975 (linux_create_inferior): Adjust.
14976 (linux_attach_lwp): Adjust.
14977 (linux_attach): Adjust.
14978 (linux_kill_one_process): Rename to ...
14979 (linux_kill_one_lwp): ... this. Adjust.
14980 (linux_kill): Adjust.
14981 (linux_detach_one_process): Rename to ...
14982 (linux_detach_one_lwp): ... this. Adjust.
14983 (linux_detach): Adjust.
14984 (check_removed_breakpoint): Adjust.
14985 (status_pending_p): Adjust.
14986 (linux_wait_for_process): Rename to ...
14987 (linux_wait_for_lwp): ... this. Adjust.
14988 (linux_wait_for_event): Adjust.
14989 (send_sigstop): Adjust.
14990 (wait_for_sigstop): Adjust.
14991 (stop_all_processes): Rename to ...
14992 (stop_all_lwps): ... this.
14993 (linux_resume_one_process): Rename to ...
14994 (linux_resume_one_lwp): ... this. Adjust.
14995 (linux_set_resume_request, linux_continue_one_thread)
14996 (linux_queue_one_thread, resume_status_pending_p)
14997 (usr_store_inferior_registers, regsets_store_inferior_registers)
14998 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14999 Adjust.
15000 * linux-low.h (get_process): Rename to ...
15001 (get_lwp): ... this. Adjust.
15002 (get_thread_process): Rename to ...
15003 (get_thread_lwp): ... this. Adjust.
15004 (get_process_thread): Rename to ...
15005 (get_lwp_thread): ... this. Adjust.
15006 (struct process_info): Rename to ...
15007 (struct lwp_info): ... this.
15008 (all_processes): Rename to ...
15009 (all_lwps): ... this.
15010 * proc-service.c (ps_lgetregs): Adjust.
15011 * thread-db.c (thread_db_create_event, find_one_thread)
15012 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15013
15014 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15015
15016 * server.c (handle_query): Handle "qAttached".
15017
15018 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15019
15020 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15021 GPLv3, update license URL.
15022
15023 2009-03-01 Doug Evans <dje@google.com>
15024
15025 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15026 (server_h): Add gdb_signals.h.
15027 (signals.o): Update.
15028 * server.h (target_signal_from_host,target_signal_to_host_p)
15029 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15030
15031 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15032
15033 * remote-utils.c (getpkt): Also generate remote-debug
15034 information if noack_mode is set.
15035
15036 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15037
15038 * server.c (handle_query): Report qXfer:siginfo:read and
15039 qXfer:siginfo:write as supported and handle them.
15040 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15041 * linux-low.c (linux_xfer_siginfo): New.
15042 (linux_target_ops): Set it.
15043
15044 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15045
15046 * server.c (gdbserver_usage): Mention --remote-debug.
15047 (main): Accept '--remote-debug' switch.
15048
15049 2009-01-18 Doug Evans <dje@google.com>
15050
15051 * regcache.c (new_register_cache): No need to check result of xcalloc.
15052 * server.c (handle_search_memory): Back out calls to xmalloc,
15053 result is checked and error is returned to user upon failure.
15054 (handle_query): Ditto. Add more checks for result of malloc.
15055 (handle_v_cont): Check result of malloc, report error back to
15056 user upon failure.
15057 (handle_v_run): Ditto. Call freeargv.
15058 * server.h (freeargv): Declare.
15059 * utils.c (freeargv): New fn.
15060
15061 2009-01-15 Doug Evans <dje@google.com>
15062
15063 * gdbreplay.c (perror_with_name): Make arg const char *.
15064 * server.h (target_signal_to_name): Make return type const char *.
15065 * thread-db.c (thread_db_err_str): Make return type const char *.
15066 * utils.c (perror_with_name): Make arg const char *.
15067
15068 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15069
15070 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15071 when handling a EXIT_PROCESS_DEBUG_EVENT.
15072
15073 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15074
15075 * gdbreplay.c (gdbreplay_version): Update copyright year.
15076 * server.c (gdbserver_version): Likewise.
15077
15078 2009-01-05 Doug Evans <dje@google.com>
15079
15080 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15081 (handle_extended_wait): Improve comment.
15082
15083 2008-12-13 Doug Evans <dje@google.com>
15084
15085 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15086 * server.h (ATTR_MALLOC): New macro.
15087 (xmalloc,xcalloc,xstrdup): Declare.
15088 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15089 * inferiors.c: Ditto.
15090 * linux-low.c: Ditto.
15091 * mem-break.c: Ditto.
15092 * regcache.c: Ditto.
15093 * remote-utils.c: Ditto.
15094 * server.c: Ditto.
15095 * target.c: Ditto.
15096 * win32-low.c: Ditto.
15097
15098 2008-12-12 Doug Evans <dje@google.com>
15099
15100 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15101 in debugging printf.
15102
15103 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15104
15105 2008-12-09 Doug Evans <dje@google.com>
15106
15107 * linux-low.h (struct process_info): Delete member tid, unused.
15108 * thread-db.c (find_one_thread): Update.
15109 (maybe_attach_thread): Update.
15110
15111 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15112
15113 * target.h (struct target_ops): Add qxfer_osdata member.
15114 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15115 and dirent.h.
15116 (linux_qxfer_osdata): New functions.
15117 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15118 callback.
15119 * server.c (handle_query): Handle "qXfer:osdata:read:".
15120 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15121 (buffer_xml_printf): New functions.
15122 * server.h (struct buffer): New.
15123 (buffer_grow_str, buffer_grow_str0): New macros.
15124 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15125 (buffer_xml_printf): Declare.
15126
15127 2008-11-24 Doug Evans <dje@google.com>
15128
15129 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15130
15131 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15132
15133 * server.c (handle_v_run): Always use the supplied argument list.
15134
15135 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15136
15137 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15138 (xtensa_regmap_table): Add entry for scompare1.
15139
15140 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15141
15142 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15143 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15144 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15145 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15146 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15147 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15148 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15149 XML target descriptions.
15150 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15151 when inferior is running on an ISA 2.05 or later processor. Add
15152 special case to return offset for full 64-bit slot of FPSCR when
15153 in 32-bits.
15154
15155 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15156
15157 * Makefile.in (SFILES, clean): Added sparc64 files.
15158 (reg-sparc64.o, reg-sparc64.c): New.
15159 * configure.srv (sparc*-*-linux*): New configuration.
15160 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15161 syscall arguments for SPARC.
15162 (regsets_store_inferior_registers): Likewise.
15163 * linux-sparc-low.c: New file.
15164
15165 2008-10-21 Doug Evans <dje@google.com>
15166
15167 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15168 (READLINE_DIR,READLINE_DEP): Delete.
15169 (INTERNAL_CFLAGS): Update.
15170 (LINTFLAGS): Update.
15171
15172 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15173
15174 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15175 whole argv from the last run, not just argv[0].
15176
15177 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15178
15179 * regcache.c (new_register_cache): Return NULL if the register
15180 cache size isn't known yet.
15181 (free_register_cache): Avoid dereferencing a NULL regcache.
15182
15183 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15184
15185 * configure.srv: Merge MIPS and MIPS64.
15186
15187 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15188
15189 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15190
15191 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15192
15193 * Makefile.in: Add required vsx dependencies.
15194
15195 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15196 Declare init_registers_powerpc_vsx32l.
15197 Declare init_registers_powerpc_vsx64l.
15198 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15199 (ppc_arch_setup): Check for VSX in hwcap.
15200 (ppc_fill_vsxregset): New function.
15201 (ppc_store_vsxregset): New function.
15202 Add new VSX entry in regset_info target_regsets.
15203
15204 * configure.srv: Add new VSX dependencies.
15205
15206 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15207
15208 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15209 (remote_open): Set or clear transport_is_reliable.
15210 (putpkt_binary): Don't expect acks in noack mode.
15211 (getpkt): Don't send ack/nac in noack mode.
15212 * server.c (handle_general_set): Handle QStartNoAckMode.
15213 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15214 qSupported.
15215 (main): Reset noack_mode on every connection.
15216 * server.h (noack_mode): Declare.
15217
15218 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15219
15220 * Makefile.in (GDBREPLAY_OBS): New variable.
15221 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15222
15223 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15224 Daniel Jacobowitz <dan@codesourcery.com>
15225
15226 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15227 (usr_store_inferior_registers): Likewise.
15228 (regsets_store_inferior_registers): Likewise.
15229
15230 2008-07-31 Rolf Jansen <rj@surtec.com>
15231 Pedro Alves <pedro@codesourcery.com>
15232
15233 * configure.ac: Check for memmem declaration.
15234 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15235 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15236 (disable_packet_qfThreadInfo): Unconditionally compile.
15237 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15238 * configure, config.in: Regenerate.
15239
15240 2008-07-28 Doug Kwan <dougkwan@google.com>
15241
15242 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15243 (linux_write_memory): Remove declaration of errno.
15244
15245 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15246
15247 * linux-low.c (handle_extended_wait): Do not use "status"
15248 variable uninitialized.
15249
15250 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15251
15252 * server.c (handle_v_attach): Inhibit reporting dll changes.
15253
15254 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15255
15256 * remote-utils.c (prepare_resume_reply): If requested, don't
15257 output "thread:TID" in the T stop reply.
15258
15259 * server.c (disable_packet_vCont, disable_packet_Tthread)
15260 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15261 (handle_query): If requested, disable support for qC, qfThreadInfo
15262 and qsThreadInfo.
15263 (handle_v_requests): If requested, disable support for vCont.
15264 (gdbserver_show_disableable): New.
15265 (main): Handle --disable-packet and --disable-packet=LIST.
15266
15267 * server.h (disable_packet_vCont, disable_packet_Tthread)
15268 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15269
15270 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15271
15272 * server.c (gdbserver_usage): Mention --version.
15273
15274 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15275
15276 * Makefile.in (gdbreplay.o): New rule.
15277
15278 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15279
15280 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15281 message, not gdbserver.
15282
15283 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15284 Nathan Sidwell <nathan@codesourcery.com>
15285 Joseph Myers <joseph@codesourcery.com>
15286
15287 * acinclude.m4: Include ../../config/acx.m4.
15288 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15289 * configure, config.in: Regenerate.
15290 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15291 * server.c (gdbserver_version): Print PKGVERSION.
15292 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15293 (main): Adjust gdbserver_usage calls.
15294 * gdbreplay.c (version, host_name): Add declarations.
15295 (gdbreplay_version, gdbreplay_usage): New.
15296 (main): Accept --version and --help options.
15297
15298 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15299
15300 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15301 (arm_breakpoint_at): Handle Thumb.
15302 (the_low_target): Add comment.
15303
15304 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15305
15306 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15307
15308 2008-05-09 Doug Evans <dje@google.com>
15309
15310 * server.h (decode_search_memory_packet): Declare.
15311 * remote-utils.c (decode_search_memory_packet): New fn.
15312 * server.c (handle_search_memory_1): New fn.
15313 (handle_search_memory): New fn.
15314 (handle_query): Process qSearch:memory packets.
15315
15316 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15317
15318 * regcache.c (registers_length): Remove.
15319 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15320 full register packet.
15321 * regcache.h (registers_length): Remove prototype.
15322 * server.h (PBUFSIZ): Define to 16384.
15323
15324 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15325
15326 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15327 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15328 powerpc-64l.o, and powerpc-altivec64l.o.
15329 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15330 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15331 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15332 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15333 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15334 to srv_xmlfiles.
15335
15336 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15337 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15338 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15339 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15340 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15341 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15342 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15343 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15344 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15345 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15346 (clean): Update.
15347
15348 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15349 (init_registers_powerpc_32l): ... this new prototype.
15350 (init_registers_powerpc_32): Remove, replace by ...
15351 (init_registers_powerpc_altivec32l): ... this new prototype.
15352 (init_registers_powerpc_e500): Remove, replace by ...
15353 (init_registers_powerpc_e500l): ... this new prototype.
15354 (init_registers_ppc64): Remove, replace by ...
15355 (init_registers_powerpc_64l): ... this new prototype.
15356 (init_registers_powerpc_64): Remove, replace by ...
15357 (init_registers_powerpc_altivec64l): ... this new prototype.
15358 (ppc_num_regs): Set to 73.
15359 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15360 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15361 (ppc_cannot_store_register): Handle orig_r3 and trap.
15362 (ppc_arch_setup): Update init_registers_... calls.
15363 (ppc_fill_gregset): Handle orig_r3 and trap.
15364
15365 * inferiors.c (clear_inferiors): Reset current_inferior.
15366
15367 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15368
15369 * acinclude.m4: Add override.m4.
15370 * configure: Regenerate.
15371
15372 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15373
15374 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15375 initial call to init_register_ppc64.
15376
15377 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15378
15379 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15380 single powerpc*-*-linux* case.
15381 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15382
15383 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15384
15385 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15386 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15387 from reg_xmlfiles.
15388 * linux-ppc-low.c: Include <elf.h>.
15389 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15390 (ppc_hwcap): New global variable.
15391 (ppc_regmap): Remove __SPE__ #ifdef sections.
15392 (ppc_regmap_e500): New global variable.
15393 (ppc_cannot_store_register): Update __SPE__ special case.
15394 (ppc_get_hwcap): New function.
15395 (ppc_arch_setup): Use it to determine whether inferior supports
15396 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15397 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15398 Do not access registers if target does not support AltiVec.
15399 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15400 Do not access registers if target does not support SPE.
15401 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15402
15403 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15404
15405 * linux-low.c (disabled_regsets, num_regsets): New.
15406 (use_regsets_p): Delete.
15407 (linux_wait_for_process): Clear disabled_regsets.
15408 (regsets_fetch_inferior_registers): Check and set it.
15409 (regsets_store_inferior_registers): Likewise.
15410 (linux_fetch_registers, linux_store_registers): Do not use
15411 use_regsets_p.
15412 (initialize_low): Allocate disabled_regsets.
15413
15414 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15415
15416 * Makefile.in (LIBOBJS): New.
15417 (OBS): Use LIBOBJS.
15418 (memmem.o): New rule.
15419 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15420 * configure: Regenerated.
15421
15422 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15423
15424 * server.c (handle_query): Never return "unsupported" for
15425 qXfer:features:read queries.
15426
15427 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15428
15429 * server.c (get_features_xml): Fix inverted condition.
15430 (handle_query): Always support qXfer:feature:read.
15431
15432 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15433
15434 * server.c (wrapper_argv): New.
15435 (start_inferior): Handle wrapper_argv. If set, expect an extra
15436 trap.
15437 (gdbserver_usage): Document --wrapper.
15438 (main): Parse --wrapper.
15439
15440 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15441
15442 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15443 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15444 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15445 (ppc_set_pc): Likewise.
15446 (ppc_arch_setup): New function.
15447 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15448 of collect_register.
15449 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15450
15451 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15452
15453 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15454 instead of linux-ppc64-low.o.
15455 * linux-ppc64-low.c: Remove file.
15456 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15457 (linux-ppc64-low.o): Remove rule.
15458
15459 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15460 (init_registers_powerpc_64): Likewise.
15461 (ppc_regmap): Conditionally define depending on __powerpc64__.
15462 (ppc_cannot_store_register): Do not special-case "fpscr" when
15463 compiled on __powerpc64__.
15464 (ppc_collect_ptrace_register): New function.
15465 (ppc_supply_ptrace_register): New function.
15466 (ppc_breakpoint): Change type to "unsigned int".
15467 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15468 (the_low_target): Conditionally provide initializers for the
15469 arch_setup member depending on __powerpc64__. Install
15470 collect_ptrace_register and supply_ptrace_register members.
15471
15472 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15473
15474 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15475 * server.c (gdbserver_xmltarget): Define.
15476 (get_features_xml): Use it to replace "target.xml" and arch_string.
15477
15478 * configure.srv: Remove srv_xmltarget. Add XML files that were
15479 mentioned there to srv_xmlfiles instead. Remove conditional tests
15480 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15481 srv_xmlfiles and srv_regobj to include all possible choices.
15482 * configure.ac (srv_xmltarget): Remove.
15483 (srv_xmlfiles): Do not add "target.xml".
15484 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15485 checks for supplementary target information.
15486 * configure: Regenerate.
15487 * Makefile.in (XML_TARGET): Remove.
15488 (target.xml): Remove rule.
15489 (clean): Do not clean up target.xml.
15490 (.PRECIOUS): Do not mention target.xml.
15491
15492 * target.h (struct target_ops): Remove arch_string member.
15493 * linux-low.c (linux_arch_string): Remove.
15494 (linux_target_ops): Remove arch_string initializer.
15495 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15496 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15497 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15498 * spu-low.c (spu_arch_string): Remove.
15499 (spu_target_ops): Remove arch_string initializer.
15500 * win32-low.c (win32_arch_string): Remove.
15501 (win32_target_ops): Remove arch_string initializer.
15502 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15503 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15504 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15505
15506 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15507
15508 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15509 by collect_ptrace_register and supply_ptrace_register hooks.
15510 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15511 instead of checking for the_low_target.left_pad_xfer.
15512 (usr_store_inferior_registers): Use collect_ptrace_register callback
15513 instead of checking for the_low_target.left_pad_xfer.
15514
15515 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15516 (s390_supply_ptrace_register): Likewise.
15517 (s390_fill_gregset): Call s390_collect_ptrace_register.
15518 (the_low_target): Update.
15519
15520 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15521 (ppc_supply_ptrace_register): Likewise.
15522 (the_low_target): Update.
15523
15524 * linux-i386-low.c (the_low_target): Update.
15525 * linux-x86-64-low.c (the_low_target): Update.
15526
15527 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15528
15529 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15530 reg-s390.o and reg-s390x.o.
15531
15532 * linux-low.c (new_inferior): New global variable.
15533 (linux_create_inferior, linux_attach): Set it.
15534 (linux_wait_for_process): Call the_low_target.arch_setup after the
15535 target has stopped for the first time.
15536 (initialize_low): Do not call the_low_target.arch_setup.
15537
15538 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15539 (s390_set_pc): Likewise.
15540 (s390_arch_setup): New function.
15541 (the_low_target): Use s390_arch_setup as arch_setup routine.
15542
15543 * regcache.c (realloc_register_cache): New function.
15544 (set_register_cache): Call it for each existing regcache.
15545
15546 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15547
15548 * server.h (init_registers): Remove prototype.
15549
15550 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15551 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15552 instead of init_registers ().
15553 * linux-arm-low.c (init_registers_arm): Add prototype.
15554 (init_registers_arm_with_iwmmxt): Likewise.
15555 (the_low_target): Add initializer for arch_setup field.
15556 * linux-cris-low.c (init_registers_cris): Add prototype.
15557 (the_low_target): Add initializer for arch_setup field.
15558 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15559 (the_low_target): Add initializer for arch_setup field.
15560 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15561 (the_low_target): Add initializer for arch_setup field.
15562 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15563 (the_low_target): Add initializer for arch_setup field.
15564 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15565 (the_low_target): Add initializer for arch_setup field.
15566 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15567 (the_low_target): Add initializer for arch_setup field.
15568 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15569 (init_registers_mips64_linux): Likewise.
15570 (the_low_target): Add initializer for arch_setup field.
15571 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15572 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15573 (the_low_target): Add initializer for arch_setup field.
15574 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15575 (init_registers_powerpc_64): Likewise.
15576 (the_low_target): Add initializer for arch_setup field.
15577 * linux-s390-low.c (init_registers_s390): Add prototype.
15578 (init_registers_s390x): Likewise.
15579 (the_low_target): Add initializer for arch_setup field.
15580 * linux-sh-low.c (init_registers_sh): Add prototype.
15581 (the_low_target): Add initializer for arch_setup field.
15582 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15583 (the_low_target): Add initializer for arch_setup field.
15584 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15585 (the_low_target): Add initializer for arch_setup field.
15586
15587 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15588 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15589 instead of init_registers ().
15590 * win32-arm-low.c (init_registers_arm): Add prototype.
15591 (the_low_target): Add initializer for arch_setup field.
15592 * win32-i386-low.c (init_registers_i386): Add prototype.
15593 (the_low_target): Add initializer for arch_setup field.
15594
15595 * spu-low.c (init_registers_spu): Add prototype.
15596 (initialize_low): Call initialie_registers_spu () instead of
15597 initialize_registers ().
15598
15599 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15600
15601 * server.c (handle_v_requests): When handling the vRun and vAttach
15602 packets, if already debugging a process, don't kill it. Return an
15603 error instead.
15604
15605 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15606
15607 * server.c (handle_query): Correct length check.
15608
15609 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15610
15611 * win32-low.c (do_initial_child_stuff): Add process handle
15612 parameter. Set current_process_handle and current_process_id from the
15613 parameters. Clear globals.
15614 (win32_create_inferior): Don't set current_process_handle and
15615 current_process_id here. Instead pass them on the call to
15616 do_initial_child_stuff.
15617 (win32_attach): Likewise.
15618 (win32_clear_inferiors): New.
15619 (win32_kill): Don't close the current process handle or the
15620 current thread handle here. Instead call win32_clear_inferiors.
15621 (win32_detach): Don't open a new handle to the process. Call
15622 win32_clear_inferiors.
15623 (win32_join): Don't rely on current_process_handle; open a new
15624 handle using the process id.
15625 (win32_wait): Call win32_clear_inferiors when the inferior process
15626 has exited.
15627
15628 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15629
15630 * server.c (monitor_show_help): Add "exit".
15631
15632 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15633
15634 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15635 (clean): Add reg-xtensa.c.
15636 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15637 * configure.srv (xtensa*-*-linux*) New target.
15638 * linux-xtensa-low.c: New.
15639 * xtensa-xtregs.c: New.
15640
15641 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15642
15643 * hostio.c: Don't include errno.h.
15644 (errno_to_fileio_errno): Move to hostio-errno.
15645 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15646 error number outputting to the target->hostio_last_error callback.
15647 (hostio_packet_error): Use FILEIO_EINVAL directly.
15648 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15649 calls to hostio_error.
15650 * hostio-errno.c: New.
15651 * server.h (hostio_last_error_from_errno): Declare.
15652 * target.h (target_ops): Add hostio_last_error member.
15653 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15654 as hostio_last_error handler.
15655 * spu-low.c (spu_target_ops): Likewise.
15656 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15657 (wince_hostio_last_error): New functions.
15658 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15659 as hostio_last_error handler.
15660 (win32_target_ops) [!_WIN32_WCE]: Register
15661 hostio_last_error_from_errno as hostio_last_error handler.
15662 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15663 (hostio-errno.o): New rule.
15664 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15665 * configure.srv (srv_hostio_err_objs): New variable. Default to
15666 hostio-errno.o.
15667 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15668 * configure: Regenerate.
15669
15670 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15671
15672 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15673 (linux_kill, linux_detach): Clean up the process list.
15674 * remote-utils.c (remote_open): Improve port number parsing.
15675 (putpkt_binary, input_interrupt): Only send interrupts if the target
15676 is running.
15677 * server.c (extended_protocol): Make static.
15678 (attached): Define earlier.
15679 (exit_requested, response_needed, program_argv): New variables.
15680 (target_running): New.
15681 (start_inferior): Clear attached here.
15682 (attach_inferior): Set attached here.
15683 (require_running): Define.
15684 (handle_query): Use require_running and target_running. Implement
15685 "monitor exit".
15686 (handle_v_attach, handle_v_run): New.
15687 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15688 (gdbserver_usage): Update.
15689 (main): Redo argument parsing. Handle --debug and --multi. Handle
15690 --attach along with other options or after the port. Save
15691 program_argv. Support no initial program. Resynchronize
15692 communication with GDB after an error. Handle "monitor exit".
15693 Use require_running and target_running. Always allow the extended
15694 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15695 restart in extended mode.
15696 * README: Refer to the GDB manual. Update --attach usage.
15697
15698 2007-12-20 Andreas Schwab <schwab@suse.de>
15699
15700 * linux-low.c (STACK_SIZE): Define.
15701 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15702 (linux_test_for_tracefork): Likewise.
15703
15704 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15705
15706 * linux-low.c (linux_wait_for_event): Update messages. Do not
15707 reinsert auto-delete breakpoints.
15708 * mem-break.c (struct breakpoint): Change return type of handler to
15709 int.
15710 (set_breakpoint_at): Update handler type.
15711 (reinsert_breakpoint_handler): Return 1 instead of calling
15712 delete_breakpoint.
15713 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15714 setting a new one.
15715 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15716 * mem-break.h (set_breakpoint_at): Update handler type.
15717 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15718 * win32-low.c (auto_delete_breakpoint): New.
15719 (get_child_debug_event): Use it.
15720
15721 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15722
15723 * configure.ac: Check for pread and pwrite.
15724 * hostio.c (handle_pread): Fall back to lseek and read.
15725 (handle_pwrite): Fall back to lseek and write.
15726 * config.in, configure: Regenerated.
15727
15728 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15729
15730 * server.c (myresume): Add own_buf argument.
15731 (main): Update calls.
15732
15733 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15734
15735 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15736 * remote-utils.c (remote_open): Do not call disable_async_io.
15737 (block_async_io): Delete.
15738 (unblock_async_io): Make static.
15739 (initialize_async_io): New.
15740 * server.c (handle_v_cont): Handle async I/O here.
15741 (myresume): Likewise. Move other common resume tasks here...
15742 (main): ... from here. Call initialize_async_io. Disable async
15743 I/O before the main loop.
15744 * server.h (initialize_async_io): Declare.
15745 (block_async_io, unblock_async_io): Delete prototypes.
15746 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15747
15748 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15749
15750 * remote-utils.c (readchar): Allow binary data in received messages.
15751
15752 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15753
15754 * win32-low.c (attaching): New global.
15755 (win32_create_inferior): Clear the `attaching' global.
15756 (win32_attach): Set the `attaching' global.
15757 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15758 attaching. Only set a breakpoint at the entry point if not
15759 attaching.
15760
15761 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15762
15763 * server.c (main): Don't report dll events on the initial
15764 connection on attaches.
15765
15766 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15767
15768 * server.c (main): Relax numerical bases supported for the pid of
15769 the --attach command line argument.
15770
15771 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15772
15773 * win32-low.c (win32_attach): Call OpenProcess before
15774 DebugActiveProcess, not after. Add last error output to error
15775 call.
15776
15777 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15778
15779 * win32-low.c (win32_get_thread_context)
15780 (win32_set_thread_context): New functions.
15781 (thread_rec): Use win32_get_thread_context.
15782 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15783 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15784 field.
15785
15786 2007-12-03 Leo Zayas
15787 Pedro Alves <pedro_alves@portugalmail.pt>
15788
15789 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15790 global variables.
15791 (child_add_thread): Minor cleanup.
15792 (child_continue): Resume artificially suspended threads before
15793 calling ContinueDebugEvent.
15794 (suspend_one_thread): New.
15795 (fake_breakpoint_event): New.
15796 (get_child_debug_event): Change return type to int. Check here if
15797 gdb sent an interrupt request. If a soft interrupt was requested,
15798 fake a breakpoint event. Return 0 if there is no event to handle,
15799 and 1 otherwise.
15800 (win32_wait): Don't check here if gdb sent an interrupt request.
15801 Ensure there is a valid event to handle.
15802 (win32_request_interrupt): Add soft interruption method as last
15803 resort.
15804
15805 2007-12-03 Leo Zayas
15806 Pedro Alves <pedro_alves@portugalmail.pt>
15807
15808 * win32-low.h (win32_thread_info): Add descriptions to the
15809 structure members. Replace `suspend_count' counter by a
15810 `suspended' flag.
15811 * win32-low.c (thread_rec): Update condition of when to get the
15812 context from the inferior. Rely on ContextFlags being set if it
15813 has already been retrieved. Only suspend the inferior thread if
15814 we haven't already. Warn if that fails.
15815 (continue_one_thread): s/suspend_count/suspended/. Only call
15816 ResumeThread once. Warn if that fails.
15817
15818 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15819
15820 * win32-low.c (win32_wait): Don't read from the inferior when it
15821 has already exited.
15822
15823 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15824
15825 * Makefile.in (win32_low_h): New variable.
15826 (win32-low.o): Add dependency on $(win32_low_h).
15827 (win32-arm-low.o, win32-i386-low.o): New rules.
15828
15829 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15830
15831 * hostio.c: Correct copyright year.
15832
15833 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15834
15835 * Makefile.in (OBS): Add hostio.o.
15836 (hostio.o): New rule.
15837 * server.h (handle_vFile): Declare.
15838 * hostio.c: New file.
15839 * server.c (handle_v_requests): Take packet_len and new_packet_len
15840 for binary packets. Call handle_vFile.
15841 (main): Update call to handle_v_requests.
15842
15843 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15844
15845 * linux-low.c: Include <sched.h>.
15846
15847 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15848
15849 * linux-low.c (linux_tracefork_grandchild): New.
15850 (linux_tracefork_child): Use clone.
15851 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15852
15853 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15854
15855 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15856
15857 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15858
15859 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15860
15861 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15862
15863 * inferiors.c (change_inferior_id): Delete.
15864 (add_pid_to_list, pull_pid_from_list): New.
15865 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15866 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15867 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15868 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15869 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15870 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15871 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15872 (using_threads): Always set to 1.
15873 (handle_extended_wait): New.
15874 (add_process): Do not set TID.
15875 (linux_create_inferior): Set must_set_ptrace_flags.
15876 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15877 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15878 (linux_thread_alive): Rename TID argument to LWPID.
15879 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15880 (linux_wait_for_event): Do not use TID or check using_threads. Update
15881 call to dead_thread_notify. Call handle_extended_wait.
15882 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15883 (send_sigstop): Delete sigstop_sent.
15884 (wait_for_sigstop): Avoid TID.
15885 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15886 (linux_test_for_tracefork): New.
15887 (linux_lookup_signals): Use thread_db_active and
15888 linux_supports_tracefork_flag.
15889 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15890 * linux-low.h (get_process_thread): Avoid TID.
15891 (struct process_ifo): Move thread_known and tid to the end. Remove
15892 sigstop_sent.
15893 (linux_attach_lwp, thread_db_init): Update prototypes.
15894 * server.h (change_inferior_id): Delete prototype.
15895 (add_pid_to_list, pull_pid_from_list): New prototypes.
15896 * thread-db.c (thread_db_use_events): New.
15897 (find_first_thread): Rename to...
15898 (find_one_thread): ...this. Update callers and messages. Do not
15899 call fatal. Check thread_db_use_events. Do not call
15900 change_inferior_id or new_thread_notify.
15901 (maybe_attach_thread): Update. Do not call new_thread_notify.
15902 (thread_db_init): Set thread_db_use_events. Check use_events.
15903 * utils.c (fatal, warning): Correct message prefix.
15904
15905 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15906
15907 * Makefile.in (clean): Remove new files.
15908 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15909 (powerpc-64.o, powerpc-64.c): New rules.
15910 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15911 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15912 with SPE.
15913 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15914 SPE targets.
15915 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15916 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15917 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15918 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15919 (target_regsets): Add AltiVec and SPE register sets.
15920 * configure.ac: Check for AltiVec and SPE.
15921 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15922 (ppc_fill_vrregset, ppc_store_vrregset): New.
15923 (target_regsets): Add AltiVec register set.
15924 * configure: Regenerated.
15925
15926 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15927
15928 * linux-low.c (O_LARGEFILE): Define.
15929 (linux_read_memory): Use /proc/PID/mem.
15930 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15931 * configure, config.in: Regenerated.
15932
15933 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15934
15935 * linux-low.c (linux_wait_for_event): Do not pass signals while
15936 single-stepping.
15937
15938 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15939
15940 * win32-low.c (create_process): New.
15941 (win32_create_inferior): Use create_process instead of
15942 CreateProcess. If create_process failed retry appending an ".exe"
15943 suffix. Store the GetLastError result immediatelly after
15944 create_process calls and use it on the call to error.
15945
15946 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15947
15948 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15949
15950 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15951
15952 * configure.ac: Switch license to GPLv3.
15953
15954 2007-08-01 Michael Snyder <msnyder@access-company.com>
15955
15956 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15957
15958 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15959
15960 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15961 typedef.
15962 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15963 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15964 CloseToolhelp32Snapshot.
15965 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15966 CloseToolhelp32Snapshot.
15967
15968 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15969
15970 * server.c (main): Check for inferior exit before main loop.
15971
15972 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15973
15974 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15975 instead of on tmp_desc.
15976
15977 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15978 Daniel Jacobowitz <dan@codesourcery.com>
15979
15980 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15981 (add_thread): Minor cleanups.
15982 (clear_inferiors): Move lower in the file. Clear the DLL
15983 list.
15984 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15985 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15986 (xml_escape_text): New.
15987 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15988 for qSupported.
15989 (handle_v_cont): Report errors.
15990 (gdbserver_version): Update.
15991 (main): Correct size of own_buf. Do not report initial DLL events.
15992 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15993 (unloaded_dll, xml_escape_text): New.
15994 * win32-low.c (enum target_waitkind): Update comments.
15995 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15996 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15997 (win32_EnumProcessModules, win32_GetModuleInformation)
15998 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15999 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16000 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16001 (win32_Module32First, win32_Module32Next, load_toolhelp)
16002 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16003 (get_child_debug_event): Handle DLL events.
16004 (win32_wait): Likewise.
16005
16006 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16007
16008 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16009 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16010
16011 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16012
16013 * win32-low.c (handle_output_debug_string): Ignore event if not
16014 waiting.
16015
16016 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16017
16018 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16019
16020 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16021
16022 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16023
16024 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16025
16026 * inferiors.c (change_inferior_id): Add comment.
16027 * linux-low.c (check_removed_breakpoint): Add an early
16028 prototype. Improve debug output.
16029 (linux_attach): Doc update.
16030 (linux_detach_one_process, linux_detach): Clean up before releasing
16031 each process.
16032 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16033 * linux-low.h (struct process_info): Doc improvement.
16034 * mem-break.c (delete_all_breakpoints): New.
16035 * mem-break.h (delete_all_breakpoints): New prototype.
16036 * thread-db.c (find_first_thread): New.
16037 (thread_db_create_event): Call it instead of
16038 thread_db_find_new_threads. Clean up unused variables.
16039 (maybe_attach_thread): Remove first thread handling.
16040 (thread_db_find_new_threads): Use find_first_thread.
16041 (thread_db_get_tls_address): Likewise.
16042
16043 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16044
16045 * thread-db.c (thread_db_find_new_threads): Add prototype.
16046 (thread_db_create_event): Check for the main thread before adding
16047 a new thread.
16048 (maybe_attach_thread): Only enable event reporting if TID == 0.
16049 (thread_db_get_tls_address): Check for new threads.
16050
16051 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16052
16053 * linux-low.c (linux_create_inferior): Try execv before execvp.
16054 * spu-low.c (spu_create_inferior): Likewise.
16055
16056 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16057
16058 * linux-low.c (linux_create_inferior): Change execv to execvp.
16059 * spu-low.c (spu_create_inferior): Likewies.
16060
16061 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16062
16063 * Makefile.in (clean): Clean new files instead of deleted ones.
16064 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16065 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16066 rules.
16067 * configure.srv: Specify XML files and new regformats for MIPS and
16068 MIPS64 GNU/Linux.
16069 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16070 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16071 an entry for the restart register.
16072 (mips_cannot_fetch_register, mips_cannot_store_register)
16073 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16074 register names to match the XML descriptions.
16075 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16076 restart register instead of $0.
16077
16078 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16079 Markus Deuling <deuling@de.ibm.com>
16080
16081 * remote-utils.c (decode_xfer_write): New function.
16082 * server.h (decode_xfer_write): Add prototype.
16083 * server.c (handle_query): Add PACKET_LEN argument. Support
16084 qXfer:spu:read and qXfer:spu:write packets.
16085 (main): Pass packet_len to handle_query.
16086 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16087 * target.h (target_ops): Add qxfer_spu.
16088
16089 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16090
16091 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16092 accessing non-seekable spufs files.
16093
16094 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16095
16096 * server.c (handle_query): Add reply for qC packet.
16097
16098 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16099 Leo Zayas <lerele@champenstudios@com>
16100
16101 * server.h (check_remote_input_interrupt_request): New function.
16102 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16103 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16104 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16105 (check_remote_input_interrupt_request): New function.
16106 * server.h (check_remote_input_interrupt_request): Declare.
16107 * win32-low.c (winapi_DebugBreakProcess,
16108 winapi_GenerateConsoleCtrlEvent): New typedefs.
16109 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16110 to 250 ms.
16111 (win32_wait): Check for remote interrupt request
16112 with check_remote_input_interrupt_request.
16113 (win32_request_interrupt): New function.
16114 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16115
16116 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16117
16118 * win32-low.c (debug_registers_changed,
16119 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16120 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16121 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16122 (thread_rec): Get context using the low target.
16123 (child_add_thread): Call thread_added on the low target,
16124 which does the same thing.
16125 (regptr): Delete.
16126 (do_initial_child_stuff): Remove debug registers references.
16127 Set context using the low target. Resume threads after
16128 setting the contexts.
16129 (child_continue): Remove dead variable. Remove debug
16130 registers references.
16131 (child_fetch_inferior_registers): Go through the low target.
16132 (do_child_store_inferior_registers): Remove.
16133 (child_store_inferior_registers): Go through the low target.
16134 (win32_resume): Remove debug registers references.
16135 Set context using the low target.
16136 (handle_exception): Change return type to void. Don't record
16137 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16138 first chance exception.
16139 (get_child_debug_event): Change return type to void. Remove
16140 goto loop. Always return after waiting for debug event.
16141 (win32_wait): Convert to switch statement. Handle spurious
16142 events.
16143
16144 * win32-i386-low.c (debug_registers_changed,
16145 debug_registers_used): New.
16146 (initial_stuff): Rename to ...
16147 (i386_initial_stuff): ... this. Clear debug registers
16148 state variables.
16149 (store_debug_registers): Delete.
16150 (i386_get_thread_context): New.
16151 (load_debug_registers): Delete.
16152 (i386_set_thread_context): New.
16153 (i386_thread_added): New.
16154 (single_step): Rename to ...
16155 (i386_single_step): ... this.
16156 (do_fetch_inferior_registers): Rename to ...
16157 (i386_fetch_inferior_register): ... this.
16158 (i386_store_inferior_register): New.
16159 (the_low_target): Adapt to new interface.
16160
16161 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16162 (arm_get_thread_context): New.
16163 (arm_set_thread_context): New.
16164 (regptr): New.
16165 (do_fetch_inferior_registers): Rename to ...
16166 (arm_fetch_inferior_register): ... this.
16167 (arm_store_inferior_register): New.
16168 (arm_wince_breakpoint): Reimplement as unsigned long.
16169 (arm_wince_breakpoint_len): Define.
16170 (the_low_target): Adapt to new interface.
16171
16172 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16173 load_debug_registers. Add get_thread_context, set_thread_context,
16174 thread_added and store_inferior_register. Rename
16175 fetch_inferior_registers to fetch_inferior_register.
16176 (regptr): Remove declaration.
16177
16178 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16179
16180 * linux-low.c (linux_detach): Change return type to int. Return 0.
16181 * spu-low.c (spu_detach): Likewise.
16182
16183 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16184
16185 * target.h (target_ops): Change return type of detach to int.
16186 Add join.
16187 (join_inferior): New.
16188 * server.c (main): Don't skip detach support on mingw32.
16189 If the inferior doesn't support detaching return error.
16190 Call join_inferior instead of using waitpid.
16191 * linux-low.c (linux_join): New.
16192 (linux_target_op): Add linux_join.
16193 * spu-low.c (spu_join): New.
16194 (spu_target_ops): Add spu_join.
16195 * win32-low.c (win32_detach): Adapt to new interface.
16196 Reopen current_process_handle before detaching. Issue a child
16197 resume before detaching.
16198 (win32_join): New.
16199 (win32_target_op): Add win32_join.
16200
16201 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16202
16203 * win32-low.c (win32-attach): Fix return value.
16204 * target.h (target_ops): Describe ATTACH return values.
16205
16206 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16207
16208 * win32-low.c (GETPROCADDRESS): Define.
16209 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16210 (winapi_DebugSetProcessKillOnExit): Likewise.
16211 (win32_create_inferior): Force usage of ansi CreateProcessA.
16212 (win32_attach): Use GETPROCADDRESS.
16213 (win32_detach): Likewise.
16214
16215 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16216
16217 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16218
16219 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16220
16221 * win32-low.c: Commit leftover changes from 2007-03-29.
16222
16223 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16224
16225 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16226 fields short instead of int. Add explicit padding.
16227 (i387_cache_to_fsave): Remove unnecessary casts.
16228 (i387_fsave_to_cache): Doc fix.
16229 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16230
16231 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16232
16233 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16234 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16235
16236 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16237
16238 * configure.srv (arm*-*-mingw32ce*): Move near the other
16239 arm targets.
16240
16241 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16242
16243 * configure.ac: Add errno checking.
16244 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16245 sys/file.h and malloc.h.
16246 (AC_CHECK_DECLS): Add perror.
16247 (srv_mingwce): Handle.
16248 * configure.srv (i[34567]86-*-cygwin*): Add
16249 win32-i386-low.o to srv_tgtobj.
16250 (i[34567]86-*-mingw*): Likewise.
16251 (arm*-*-mingw32ce*): Add case.
16252 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16253 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16254 [__MINGW32CE__] (strerror): New function.
16255 [__MINGW32CE__] (errno): Define to GetLastError.
16256 [__MINGW32CE__] (COUNTOF): New macro.
16257 (remote_open): Remove extra close call.
16258 * mem-break.c (delete_breakpoint_at): New function.
16259 * mem-break.h (delete_breakpoint_at): Declare.
16260 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16261 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16262 [USE_WIN32API] (read, write): Add char* casts.
16263 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16264 * server.h: Include wincecompat.h on Windows CE.
16265 [HAVE_ERRNO_H]: Check.
16266 (perror): Declare if not declared.
16267 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16268 (perror_with_name): Remove errno declaration.
16269 * wincecompat.h: New.
16270 * wincecompat.c: New.
16271 * win32-low.h: New.
16272 * win32-arm-low.c: New.
16273 * win32-i386-low.c: New.
16274 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16275 (OUTMSG2): Make it safe.
16276 (_T): New macro.
16277 (COUNTOF): New macro.
16278 (NUM_REGS): Get it from the low target.
16279 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16280 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16281 (thread_rec): Let low target handle debug registers.
16282 (child_add_thread): Likewise.
16283 (child_init_thread_list): Likewise.
16284 (continue_one_thread): Likewise.
16285 (regptr): New.
16286 (do_child_fetch_inferior_registers): Move to ...
16287 * win32-i386-low.c: ... here, and rename to ...
16288 (do_fetch_inferior_registers): ... this.
16289 * win32-low.c (child_fetch_inferior_registers):
16290 Go through the low target.
16291 (do_child_store_inferior_registers): Use regptr.
16292 (strwinerror): New function.
16293 (win32_create_inferior): Handle Windows CE.
16294 Use strwinerror instead of strerror on Windows error
16295 codes. Add program to the error output.
16296 Don't close the main thread handle on Windows CE.
16297 (win32_attach): Use coredll.dll on Windows CE.
16298 (win32_kill): Close current process and current
16299 thread handles.
16300 (win32_detach): Use coredll.dll on Windows CE.
16301 (win32_resume): Let low target handle debug registers, and
16302 step request.
16303 (handle_exception): Add/Remove initial breakpoint. Avoid
16304 non-existant WSTOPSIG on Windows CE.
16305 (win32_read_inferior_memory): Cast to remove warning.
16306 (win32_arch_string): Go through the low target.
16307 (initialize_low): Call set_breakpoint_data with the low
16308 target's breakpoint.
16309 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16310 FOP_REGNUM, mappings): Move to ...
16311 * win32-i386-low.c: ... here.
16312 * win32-low.c (win32_thread_info): Move to ...
16313 * win32-low.h: ... here.
16314 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16315 win32-arm-low.c and wincecompat.c.
16316 (all:): Add $EXEEXT.
16317 (install-only:): Likewise.
16318 (gdbserver:): Likewise.
16319 (gdbreplay:): Likewise.
16320 * config.in: Regenerate.
16321 * configure: Regenerate.
16322
16323 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16324
16325 * win32-low.c: Rename typedef thread_info to
16326 win32_thread_info throughout.
16327
16328 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16329
16330 * win32-i386-low.c: Rename to ...
16331 * win32-low.c: ... this.
16332 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16333 * Makefile.in: Likewise.
16334
16335 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16336
16337 * remote-utils.c (monitor_output): Constify msg parameter.
16338 * server.h (monitor_output): Likewise.
16339 * win32-i386-low.c (handle_output_debug_string): New.
16340 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16341 handle_output_debug_string.
16342 (get_child_debug_event): Likewise.
16343
16344 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16345
16346 * server.c (main): Correct strtoul check.
16347
16348 2007-03-27 Jon Ringle <jon@ringle.org>
16349
16350 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16351
16352 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16353
16354 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16355
16356 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16357
16358 * terminal.h: Check HAVE_SGTTY_H.
16359
16360 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16361
16362 * remote-utils.c (remote_open): Print out the assigned port number.
16363
16364 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16365
16366 * remote-utils.c (monitor_output): New function.
16367 * server.c (debug_threads): Define here.
16368 (monitor_show_help): New function.
16369 (handle_query): Handle qRcmd.
16370 (main): Do not handle 'd' packet.
16371 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16372 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16373 of debug_threads.
16374
16375 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16376
16377 * Makefile.in (EXEEXT): New.
16378 (clean): Use $(EXEEXT).
16379
16380 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16381
16382 * target.h (target_ops): Rename send_signal to request_interrupt,
16383 and remove enum target_signal parameter.
16384 * linux-low.c (linux_request_interrupt): Rename from
16385 linux_send_signal, and always send SIGINT.
16386 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16387 and always send SIGINT.
16388 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16389 of send_signal.
16390 (input_interrupt): Likewise.
16391
16392 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16393
16394 * server.c (get_features_xml): Check if target implemented
16395 arch_string.
16396 * win32-i386-low.c (win32_arch_string): New.
16397 (win32_target_ops): Add win32_arch_string as arch_string member.
16398
16399 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16400
16401 * spu-low.c (spu_arch_string): New.
16402 (spu_target_ops): Add spu_arch_string.
16403
16404 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16405
16406 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16407 * configure.ac: Do not check for terminal.h.
16408 * configure, config.in: Regenerated.
16409
16410 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16411
16412 * Makefile.in (OBS): Add $(XML_BUILTIN).
16413 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16414 (clean): Update.
16415 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16416 (arm-with-iwmmxt.c): New.
16417 * config.in, configure: Regenerate.
16418 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16419 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16420 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16421 (arm*-*-linux*): Add iWMMXt and regset support.
16422 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16423 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16424 (arm_store_wmmxregset, target_regsets): New.
16425 * server.c (get_features_xml): Take annex argument. Check builtin
16426 XML documents.
16427 (handle_query): Handle multiple annexes.
16428
16429 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16430
16431 * remote-utils.c [USE_WIN32API] (read, write): Define.
16432 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16433 write.
16434
16435 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16436
16437 * linux-i386-low.c (the_low_target): Set arch_string.
16438 * linux-x86-64-low.c (the_low_target): Likewise.
16439 * linux-low.c (linux_arch_string): New.
16440 (linux_target_ops): Add it.
16441 * linux-low.h (struct linux_target_ops): Add arch_string.
16442 * server.c (write_qxfer_response): Use const void * for DATA.
16443 (get_features_xml): New.
16444 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16445 * target.h (struct target_ops): Add arch_string method.
16446
16447 2007-01-03 Denis Pilat <denis.pilat@st.com>
16448 Daniel Jacobowitz <dan@codesourcery.com>
16449
16450 * linux-low.c (linux_kill): Handle being called with no threads.
16451 * win32-i386-low.c (win32_kill): Likewise.
16452 (get_child_debug_event): Clear current_process_handle.
16453
16454 2006-12-30 Denis PILAT <denis.pilat@st.com>
16455 Daniel Jacobowitz <dan@codesourcery.com>
16456
16457 * remote-utils.c (remote_open): Check the type of specified
16458 serial port devices before opening them.
16459 * server.c (main): Kill the inferior if an error occurs during
16460 the first remote_open.
16461
16462 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16463
16464 * README: Update supported targets.
16465
16466 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16467
16468 * Makefile.in (clean): Remove reg-mips64.c.
16469 (reg-mips64.c, reg-mips64.o): New rules.
16470 * configure.srv: Handle mips64. Include regset support for mips.
16471 * linux-mips-low.c (union mips_register): New.
16472 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16473 (mips_breakpoint, mips_breakpoint_at): Use int.
16474 (mips_collect_register, mips_supply_register)
16475 (mips_collect_register_32bit, mips_supply_register_32bit)
16476 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16477 (mips_store_fpregset, target_regsets): New.
16478 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16479
16480 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16481
16482 * configure.srv: Add target "spu*-*-*".
16483 * Makefile.in (clean): Remove reg-spu.c.
16484 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16485 * spu-low.c: New file.
16486
16487 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16488
16489 * configure.ac: Correct td_thr_tls_get_addr test.
16490 * configure: Regenerated.
16491
16492 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16493
16494 * linux-low.c (linux_wait_for_event): Reformat. Use the
16495 pass_signals array.
16496 * remote-utils.c (decode_address_to_semicolon): New.
16497 * server.c (pass_signals, handle_general_set): New.
16498 (handle_query): Mention QPassSignals for qSupported.
16499 (main): Call handle_general_set.
16500 * server.h (pass_signals, decode_address_to_semicolon): New.
16501
16502 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16503
16504 * server.c (handle_query): Correct error handling for read_auxv.
16505
16506 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16507
16508 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16509 and srv_linux_thread_db to yes.
16510 * linux-s390-low.c (s390_fill_gregset): New function.
16511 (target_regsets): Define data structure.
16512
16513 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16514
16515 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16516 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16517 * config.in, configure: Regenerated.
16518 * inferiors.c (gdb_id_to_thread): New function.
16519 (gdb_id_to_thread_id): Use it.
16520 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16521 * linux-low.h (struct process_info): Add th member.
16522 (thread_db_get_tls_address): New prototype.
16523 * remote-utils.c (decode_address): Make non-static.
16524 * server.c (handle_query): Handle qGetTLSAddr.
16525 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16526 * target.h (struct target_ops): Add get_tls_address.
16527 * thread-db.c (maybe_attach_thread): Save the thread handle.
16528 (thread_db_get_tls_address): New.
16529
16530 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16531
16532 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16533 (linux_resume_one_process): Take a siginfo_t *. Update all
16534 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16535 (struct pending_signals): Add a siginfo_t.
16536 (linux_wait_for_process): Always set last_status.
16537 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16538 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16539 * linux-low.h (struct process_info): Add last_status.
16540
16541 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16542
16543 * remote-utils.c (try_rle): New function.
16544 (putpkt_binary): Use it.
16545
16546 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16547
16548 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16549 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16550 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16551 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16552 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16553 point registers.
16554
16555 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16556
16557 * server.c (terminal_fd): New variable.
16558 (old_foreground_pgrp): Likewise.
16559 (restore_old_foreground_pgrp): New function.
16560 (start_inferior): Record the terminal file descriptor in terminal_fd
16561 and its original foreground group in old_foreground_pgrp. Register
16562 restore_old_foreground_pgrp with atexit().
16563
16564 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16565
16566 * server.c (handle_query): Correct qPart to qXfer.
16567
16568 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16569
16570 * configure.ac: Check for more headers which are missing on
16571 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16572 * configure.srv: Add Cygwin and mingw32.
16573 * remote-utils.c: Don't include headers unconditionally which
16574 are missing on mingw32. Include <winsock.h> for mingw32.
16575 (remote_open): Adjust for mingw32 support. Flush
16576 standard error after writing to it.
16577 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16578 (unblock_async_io, enable_async_io, disable_async_io)
16579 (readchar, getpkt): Update for Winsock support.
16580 (prepare_resume_reply): Expect a protocol signal number.
16581 * server.c: Disable <sys/wait.h> on mingw32.
16582 (start_inferior): Adjust for mingw32 support. Flush
16583 standard error after writing to it.
16584 (attach_inferior): Likewise. Use protocol signal
16585 numbers.
16586 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16587 and names.
16588 * win32-i386-low.c: New file.
16589 * Makefile.in (XM_CLIBS): Set.
16590 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16591 (win32-i386-low.o): New dependency rule.
16592 * linux-low.c (linux_wait): Use target signal numbers.
16593 * target.h (struct target_ops): Doc fix.
16594 * server.h (target_signal_to_name): New prototype.
16595 * gdbreplay.c: Don't include headers unconditionally which
16596 are missing on mingw32. Include <winsock.h> for mingw32.
16597 (remote_close, remote_open): Adjust for Winsock support.
16598 * configure, config.in: Regenerated.
16599
16600 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16601
16602 * server.c (decode_xfer_read, write_qxfer_response): New.
16603 (handle_query): Take a packet length argument. Handle
16604 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16605 the qSupported response.
16606 (main): Update call to handle_query.
16607
16608 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16609
16610 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16611 (putpkt_binary): Renamed from putpkt and adjusted for binary
16612 data.
16613 (putpkt): New wrapper for putpkt_binary.
16614 (readchar): Don't mask off the high bit.
16615 (decode_X_packet): New function.
16616 * server.c (main): Call putpkt_binary if a handler sets the packet
16617 length. Save the length of the incoming packet. Handle 'X'.
16618 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16619
16620 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16621
16622 * server.c (handle_query): Handle qSupported.
16623
16624 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16625
16626 * remote-utils.c (all_symbols_looked_up): New variable.
16627 (look_up_one_symbol): Check it.
16628 * server.h (look_up_one_symbol): New declaration.
16629 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16630
16631 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16632
16633 * Makefile.in (linux-arm-low.o): Update dependencies.
16634 * linux-arm-low.c: Include "gdb_proc_service.h".
16635 (PTRACE_GET_THREAD_AREA): Define.
16636 (ps_get_thread_area): New function.
16637
16638 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16639
16640 * configure.srv (m68k*-*-uclinux*): New target.
16641 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16642 (linux_resume_one_process): Remove extraneous cast.
16643 (linux_read_offsets): New.
16644 (linux_target_op): Add linux_read_offsets on mmuless systems.
16645 * server.c (handle_query): Add qOffsets logic.
16646 * target.h (struct target_ops): Add read_offsets.
16647
16648 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16649
16650 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16651 (PTRACE_GET_THREAD_AREA): Define.
16652 (ps_get_thread_area): New function.
16653 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16654 (linux-x86-64-low.o): Update.
16655
16656 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16657
16658 * configure.ac: Remove checks for prfpregset_t.
16659 * gdb_proc_service.h: New file.
16660 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16661 new "gdb_proc_service.h".
16662 * proc-service.c: Likewise.
16663 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16664 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16665 * Makefile.in (gdb_proc_service_h): Updated.
16666 * configure, config.in: Regenerated.
16667
16668 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16669
16670 * remote-utils.c (prepare_resume_reply): Move declaration
16671 of gdb_id_from_wait to the top of the block.
16672
16673 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16674
16675 * linux-low.c (regsets_store_inferior_registers): Read the regset
16676 from the target before filling it.
16677
16678 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16679
16680 * server.c (attach_inferior): Return SIGTRAP for a successful
16681 attach.
16682
16683 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16684
16685 * Makefile.in (OBS): Add version.o.
16686 (STAGESTUFF): Delete.
16687 (version.o): Add dependencies.
16688 (version.c): Replace rule.
16689 (clean): Remove version.c.
16690 * server.c (gdbserver_version): New.
16691 (gdbserver_usage): Use printf.
16692 (main): Handle --version and --help.
16693 * server.h (version, host_name): Add declarations.
16694
16695 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16696
16697 * linux-arm-low.c:
16698 * linux-arm-low.c:
16699 * inferiors.c:
16700 * i387-fp.h:
16701 * i387-fp.c:
16702 * gdbreplay.c:
16703 * regcache.c:
16704 * proc-service.c:
16705 * mem-break.h:
16706 * mem-break.c:
16707 * linux-x86-64-low.c:
16708 * linux-sh-low.c:
16709 * linux-s390-low.c:
16710 * linux-ppc64-low.c:
16711 * linux-ppc-low.c:
16712 * linux-mips-low.c:
16713 * linux-m68k-low.c:
16714 * linux-m32r-low.c:
16715 * linux-low.h:
16716 * linux-low.c:
16717 * linux-ia64-low.c:
16718 * linux-i386-low.c:
16719 * linux-crisv32-low.c:
16720 * thread-db.c:
16721 * terminal.h:
16722 * target.h:
16723 * target.c:
16724 * server.h:
16725 * server.c:
16726 * remote-utils.c:
16727 * regcache.h:
16728 * utils.c:
16729 * Makefile.in:
16730 * configure.ac:
16731 * gdbserver.1: Add (C) after Copyright. Update the FSF
16732 address.
16733
16734 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16735
16736 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16737 (arm_breakpoint_at): Recognize both breakpoints.
16738 (the_low_target): Use the correct breakpoint instruction.
16739
16740 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16741
16742 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16743 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16744 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16745 (the_low_target): Update.
16746
16747 2005-10-25 Andreas Schwab <schwab@suse.de>
16748
16749 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16750
16751 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16752 (ia64_num_regs): Reduce to 462.
16753
16754 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16755
16756 * acinclude.m4: Correct quoting.
16757 * aclocal.m4: Regenerated.
16758
16759 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16760 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16761 (thread_db_init): Call thread_db_err_str.
16762 * configure.ac: Check for TD_VERSION.
16763 * config.in, configure: Regenerated.
16764
16765 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16766
16767 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16768
16769 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16770
16771 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16772 is not available. Define HAVE_PTRACE_GETREGS if it is.
16773 * config.in, configure: Regenerated.
16774 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16775 * linux-i386-low.c, linux-m68k-low.c: Update to use
16776 HAVE_PTRACE_GETREGS.
16777 * linux-low.c (regsets_fetch_inferior_registers)
16778 (regsets_store_inferior_registers): Only return 0 if we processed
16779 GENERAL_REGS.
16780 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16781 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16782
16783 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16784
16785 * inferiors.c (struct thread_info): Add gdb_id.
16786 (add_thread): Add gdb_id argument.
16787 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16788 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16789 calls to add_thread.
16790 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16791 * server.c (handle_query): Use thread_to_gdb_id.
16792 (handle_v_cont, main): Use gdb_id_to_thread_id.
16793 * server.h (add_thread): Update prototype.
16794 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16795 prototypes.
16796
16797 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16798
16799 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16800 left-padded registers.
16801 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16802 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16803
16804 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16805
16806 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16807 * configure: Regenerate.
16808 * config.in: Regenerate.
16809 * server.h (NEED_DECLARATION_STRERROR):
16810 Replace with !HAVE_DECL_STRERROR.
16811
16812 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16813
16814 * linux-low.c (linux_wait, linux_send_signal): Don't test
16815 an unsigned long variable for > 0 if it could be MAX_ULONG.
16816 * server.c (myresume): Likewise.
16817 * target.c (set_desired_inferior): Likewise.
16818
16819 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16820
16821 * configure.ac: Simplify and improve check for socklen_t.
16822 * configure, config.in: Regenerate.
16823
16824 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16825
16826 * acconfig.h: Remove.
16827 * configure.ac: Add a test for socklen_t. Use three-argument
16828 AC_DEFINE throughout.
16829 * config.in: Regenerated using autoheader 2.59.
16830 * configure: Regenerated.
16831
16832 * gdbreplay.c (socklen_t): Provide a default.
16833 (remote_open): Use socklen_t.
16834 * remote-utils.c (socklen_t): Provide a default.
16835 (remote_open): Use socklen_t.
16836 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16837 unsigned char.
16838
16839 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16840 char for buffers.
16841 * linux-low.c (linux_read_memory, linux_write_memory)
16842 (linux_read_auxv): Likewise.
16843 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16844 (check_mem_write): Likewise.
16845 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16846 Likewise.
16847 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16848 (registers_from_string, register_data): Likewise.
16849 * server.c (handle_query, main): Likewise.
16850 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16851 (decode_M_packet): Likewise.
16852 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16853 * target.h (struct target_ops): Update read_memory, write_memory,
16854 and read_auxv.
16855 (read_inferior_memory, write_inferior_memory): Update.
16856 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16857 to unsigned char *.
16858 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16859 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16860 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16861 linux-s390-low.c, linux-sh-low.c: Update for changes in
16862 read_inferior_memory and the_low_target->breakpoint.
16863
16864 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16865
16866 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16867 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16868 * configure.srv: Add powerpc64-*-linux*.
16869 * linux-ppc64-low.c: New file.
16870
16871 2005-05-23 Orjan Friberg <orjanf@axis.com>
16872
16873 * linux-cris-low.c: New file with support for CRIS.
16874 * linux-crisv32-low.c: Ditto for CRISv32.
16875 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16876 (clean): Add reg-cris.c and reg-crisv32.c.
16877 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16878 reg-crisv32.o, and reg-crisv32.c to make rules.
16879 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16880 recognized targets.
16881
16882 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16883
16884 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16885 of sizeof (PTRACE_XFER_TYPE).
16886 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16887
16888 2005-05-12 Orjan Friberg <orjanf@axis.com>
16889
16890 * target.h (struct target_ops): Add insert_watchpoint,
16891 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16892 pointers for hardware watchpoint support.
16893 * linux-low.h (struct linux_target_ops): Ditto.
16894 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16895 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16896 to linux_target_ops.
16897 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16898 reply packet.
16899 * server.c (main): Recognize 'Z' and 'z' packets.
16900
16901 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16902
16903 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16904 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16905 (the_low_target): Add new members.
16906
16907 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16908
16909 * proc-service.c (ps_lgetregs): Search all_processes instead of
16910 all_threads.
16911
16912 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16913
16914 * server.c (start_inferior): Change return type to int.
16915 (attach_inferior): Change sigptr to int *.
16916 (handle_v_cont, handle_v_requests): Change signal to int *.
16917 (main): Change signal to int.
16918
16919 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16920
16921 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16922 * configure.srv: Add m32r*-*-linux*.
16923 * linux-m32r-low.c: New file.
16924
16925 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16926
16927 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16928
16929 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16930
16931 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16932 Take unsigned long arguments for PIDs.
16933 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16934 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16935 (wait_for_sigstop, linux_resume_one_process)
16936 (regsets_fetch_inferior_registers, linux_send_signal)
16937 (linux_read_auxv): Likewise. Update the types of variables holding
16938 PIDs. Update format string specifiers.
16939 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16940 * remote-utils.c (prepare_resume_reply): Likewise.
16941 * server.c (cont_thread, general_thread, step_thread)
16942 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16943 unsigned long.
16944 (handle_query): Update format specifiers.
16945 (handle_v_cont, main): Use strtoul for thread IDs.
16946 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16947 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16948 (general_thread, step_thread, thread_from_wait)
16949 (old_thread_from_wait): Update.
16950 * target.h (struct thread_resume): Use unsigned long for THREAD.
16951 (struct target_ops): Use unsigned long for arguments to attach and
16952 thread_alive.
16953
16954 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16955
16956 * acinclude.m4: Include bfd/bfd.m4 directly.
16957 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16958 <agriffis@toolchain.org>.
16959 * aclocal.m4, configure: Regenerated.
16960
16961 2005-01-07 Andrew Cagney <cagney@gnu.org>
16962
16963 * configure.ac: Rename configure.in, require autoconf 2.59.
16964 * configure: Re-generate.
16965
16966 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16967
16968 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16969 LIBS when finished.
16970 * aclocal.m4: Regenerated.
16971 * configure: Regenerated.
16972
16973 2004-11-21 Andreas Schwab <schwab@suse.de>
16974
16975 * linux-m68k-low.c (m68k_num_gregs): Define.
16976 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16977 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16978 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16979 (m68k_breakpoint_at): New. Add to the_low_target.
16980
16981 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16982 srv_linux_thread_db to yes.
16983
16984 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16985
16986 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16987 (ARCH_SET_FS): Likewise.
16988 (ARCH_GET_FS): Likewise.
16989 (ARCH_GET_GS): Likewise.
16990
16991 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16992
16993 * linux-i386-low.c (ps_get_thread_area): New.
16994 * linux-x86-64-low.c (ps_get_thread_area): New.
16995 * linux-low.c: Include <sys/syscall.h>.
16996 (linux_kill_one_process): Don't kill the first thread here.
16997 (linux_kill): Kill the first thread here.
16998 (kill_lwp): New function.
16999 (send_sigstop, linux_send_signal): Use it.
17000 * proc-service.c: Clean up #ifdefs.
17001 (fpregset_info): Delete.
17002 (ps_lgetregs): Update and enable implementation.
17003 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17004 implementations.
17005 * remote-utils.c (struct sym_cache, symbol_cache): New.
17006 (input_interrupt): Print a clearer message.
17007 (async_io_enabled): New variable.
17008 (enable_async_io, disable_async_io): Use it. Update comments.
17009 (look_up_one_symbol): Use the symbol cache.
17010 * thread-db.c (thread_db_look_up_symbols): New function.
17011 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17012
17013 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17014
17015 * configure.in: Test for -rdynamic.
17016 * configure: Regenerated.
17017 * Makefile (INTERNAL_LDFLAGS): New.
17018 (gdbserver, gdbreplay): Use it.
17019
17020 2004-09-02 Andrew Cagney <cagney@gnu.org>
17021
17022 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17023
17024 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17025
17026 * linux-low.c (linux_wait): Clear all_processes list also.
17027
17028 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17029
17030 * linux-low.c: Include <errno.h>. Remove extern declaration of
17031 errno.
17032
17033 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17034
17035 * gdbreplay.c, server.h, utils.c: Update copyright years.
17036
17037 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17038
17039 * server.c (main): Print child status or termination signal from
17040 variable 'signal', not 'sig'.
17041
17042 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17043
17044 * linux-low.c (linux_read_memory): Change return type to
17045 int. Check for and return error from ptrace().
17046 * target.c (read_inferior_memory): Change return type to int. Pass
17047 back return status from the_target->read_memory().
17048 * target.h (struct target_ops): Adapt *read_memory() prototype.
17049 Update comment.
17050 (read_inferior_memory): Adapt prototype.
17051 * server.c (main): Return an error packet if
17052 read_inferior_memory() returns an error.
17053
17054 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17055
17056 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17057 Unify with other clean targets.
17058
17059 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17060
17061 * server.c (handle_v_cont): Call set_desired_inferior.
17062
17063 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17064
17065 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17066
17067 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17068
17069 * linux-low.c (linux_wait): Unblock async I/O.
17070 (linux_resume): Block and enable async I/O.
17071 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17072 * server.h (block_async_io, unblock_async_io): Add prototypes.
17073
17074 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17075
17076 * remote-utils.c (remote_open): Print a status notice after
17077 opening a TCP port.
17078 * server.c (attach_inferior): Print a status notice after
17079 attaching.
17080
17081 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17082
17083 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17084
17085 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17086
17087 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17088 error packet.
17089 * server.c, target.h: Update copyright years.
17090
17091 2004-02-25 Roland McGrath <roland@redhat.com>
17092
17093 * target.h (struct target_ops): New member `read_auxv'.
17094 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17095 * linux-low.c (linux_read_auxv): New function.
17096 (linux_target_ops): Initialize `read_auxv' member to that.
17097
17098 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17099
17100 Committed by Jim Blandy <jimb@redhat.com>.
17101
17102 * linux-s390-low.c (s390_num_regs): Update.
17103 (s390_regmap): Remove control registers. Use __s390x__ predefine
17104 instead of GPR_SIZE to distiguish s390 and s390x targets.
17105
17106 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17107
17108 * linux-low.c: Update copyright year.
17109 (check_removed_breakpoint): Clear pending_is_breakpoint.
17110 (linux_set_resume_request, linux_queue_one_thread)
17111 (resume_status_pending_p): New functions.
17112 (linux_continue_one_thread): Use process->resume.
17113 (linux_resume): Only resume threads if there are no pending events.
17114 * linux-low.h (struct process_info): Add resume request
17115 pointer.
17116
17117 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17118
17119 * regcache.c (new_register_cache): Clear the allocated register
17120 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17121
17122 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17123
17124 * linux-low.c (linux_resume): Take a struct thread_resume *
17125 argument.
17126 (linux_wait): Update call.
17127 (resume_ptr): New static variable.
17128 (linux_continue_one_thread): Renamed from
17129 linux_continue_one_process. Use resume_ptr.
17130 (linux_resume): Use linux_continue_one_thread.
17131 * server.c (handle_v_cont, handle_v_requests): New functions.
17132 (myresume): New function.
17133 (main): Handle 'v' case.
17134 * target.h (struct thread_resume): New type.
17135 (struct target_ops): Change argument of "resume" to struct
17136 thread_resume *.
17137 (myresume): Delete macro.
17138
17139 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17140
17141 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17142 (uninstall): Support DESTDIR.
17143
17144 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17145
17146 * configure.srv: Add xscale*linux copy of arm*linux entry.
17147
17148 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17149
17150 * linux-arm-low.c (arm_reinsert_addr): New function.
17151 (the_low_target): Add arm_reinsert_addr.
17152
17153 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17154
17155 * mem-break.c: Remove whitespace at end of file.
17156
17157 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17158
17159 * configure.in: Check whether we need to prototype strerror.
17160 * server.h: Optionally prototype strerror.
17161 * gdbreplay.c (perror_with_name): Use strerror.
17162 * linux-low.c (linux_attach_lwp): Use strerror.
17163 * utils.c (perror_with_name): Use strerror.
17164 * config.in, configure: Regenerated.
17165
17166 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17167
17168 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17169 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17170
17171 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17172
17173 * Makefile.in (SFILES): Update.
17174 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17175 low-sun3.c: Remove files.
17176
17177 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17178
17179 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17180 (linux_detach_one_process, linux_detach): New functions.
17181 (linux_target_ops): Add linux_detach.
17182 * server.c (main): Handle 'D' packet.
17183 * target.h (struct target_ops): Add "detach" member.
17184 (detach_inferior): Define.
17185
17186 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17187
17188 From Kelley Cook <kelleycook@wideopenwest.com>:
17189 * configure.srv: Accept i[34567]86 variants.
17190
17191 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17192
17193 * linux-low.c (linux_wait_for_event): Correct comment typos.
17194 (linux_resume_one_process): Call check_removed_breakpoint.
17195 (linux_send_signal): New function.
17196 (linux_target_ops): Add linux_send_signal.
17197 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17198 of kill.
17199 * target.h (struct target_ops): Add send_signal.
17200
17201 2003-05-29 Jim Blandy <jimb@redhat.com>
17202
17203 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17204 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17205 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17206 away part of the register's value.
17207
17208 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17209
17210 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17211 (linux_wait_for_event, linux_init_signals): Likewise.
17212
17213 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17214
17215 * configure.in: Check for stdlib.h.
17216 * configure: Regenerated.
17217 * config.in: Regenerated.
17218
17219 2003-01-04 Andreas Schwab <schwab@suse.de>
17220
17221 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17222
17223 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17224
17225 * Makefile.in: Remove obsolete code.
17226
17227 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17228
17229 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17230 defined(PT_FPR0_HI).
17231
17232 2002-11-17 Stuart Hughes <seh@zee2.com>
17233
17234 * linux-arm-low.c (arm_num_regs): Increase.
17235 (arm_regmap): Include status register.
17236
17237 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17238
17239 * linux-low.c (register_addr): Remove incorrect -1 check.
17240
17241 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17242
17243 * linux-low.c (linux_create_inferior): Call setpgid. Return
17244 the new PID.
17245 (unstopped_p, linux_signal_pid): Remove.
17246 (linux_target_ops): Remove linux_signal_pid.
17247 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17248 global instead of target method.
17249 * target.h (struct target_ops): Remove signal_pid. Update comment
17250 for create_inferior.
17251 * server.c (signal_pid): New variable.
17252 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17253 gdbserver. Set the child to be the foreground process group.
17254 (attach_inferior): Set signal_pid.
17255
17256 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17257
17258 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17259
17260 2002-08-20 Jim Blandy <jimb@redhat.com>
17261
17262 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17263 default for this.
17264
17265 2002-08-01 Andrew Cagney <cagney@redhat.com>
17266
17267 * Makefile.in: Make chill references obsolete.
17268
17269 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17270
17271 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17272 * configure: Regenerate.
17273 * config.in: Regenerate.
17274
17275 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17276
17277 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17278 (perror_with_name, remote_close, remote_open, expect, play): Static.
17279
17280 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17281
17282 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17283 byte offsets instead of an array of indexes.
17284 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17285
17286 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17287
17288 * regcache.c: Add comment.
17289
17290 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17291
17292 * thread-db.c: New file.
17293 * proc-service.c: New file.
17294 * acinclude.m4: New file.
17295 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17296 proc-service.o, and thread-db.o.
17297 (linux-low.o): Add USE_THREAD_DB.
17298 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17299 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17300 * aclocal.m4: Regenerated.
17301 * config.in: Regenerated.
17302 * configure: Regenerated.
17303 * configure.in: Check for proc_service.h, sys/procfs.h,
17304 thread_db.h, and linux/elf.h headrs.
17305 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17306 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17307 Check for -lthread_db and thread support.
17308 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17309 PowerPC, and SuperH.
17310 * i387-fp.c: Constify arguments.
17311 * i387-fp.h: Likewise.
17312 * inferiors.c: (struct thread_info): Renamed from
17313 `struct inferior_info'. Remove PID member. Use generic inferior
17314 list header. All uses updated.
17315 (inferiors, signal_pid): Removed.
17316 (all_threads): New variable.
17317 (get_thread): Define.
17318 (add_inferior_to_list): New function.
17319 (for_each_inferior): New function.
17320 (change_inferior_id): New function.
17321 (add_inferior): Removed.
17322 (remove_inferior): New function.
17323 (add_thread): New function.
17324 (free_one_thread): New function.
17325 (remove_thread): New function.
17326 (clear_inferiors): Use for_each_inferior and free_one_thread.
17327 (find_inferior): New function.
17328 (find_inferior_id): New function.
17329 (inferior_target_data): Update argument type.
17330 (set_inferior_target_data): Likewise.
17331 (inferior_regcache_data): Likewise.
17332 (set_inferior_regcache_data): Likewise.
17333 * linux-low.c (linux_bp_reinsert): Remove.
17334 (all_processes, stopping_threads, using_thrads)
17335 (struct pending_signals, debug_threads, pid_of): New.
17336 (inferior_pid): Replace with macro.
17337 (struct inferior_linux_data): Remove.
17338 (get_stop_pc, add_process): New functions.
17339 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17340 Use add_process and add_thread.
17341 (linux_attach_lwp): New function, based on old linux_attach. Use
17342 add_process and add_thread. Set stop_expected for new threads.
17343 (linux_attach): New function.
17344 (linux_kill_one_process): New function.
17345 (linux_kill): Kill all LWPs.
17346 (linux_thread_alive): Use find_inferior_id.
17347 (check_removed_breakpoints, status_pending_p): New functions.
17348 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17349 Update. Use WNOHANG. Wait for cloned processes also. Update process
17350 struct for the found process.
17351 (linux_wait_for_event): New function.
17352 (linux_wait): Use it. Support LWPs.
17353 (send_sigstop, wait_for_sigstop, stop_all_processes)
17354 (linux_resume_one_process, linux_continue_one_process): New functions.
17355 (linux_resume): Support LWPs.
17356 (REGISTER_RAW_SIZE): Remove.
17357 (fetch_register): Use register_size instead. Call supply_register.
17358 (usr_store_inferior_registers): Likewise. Call collect_register.
17359 Fix recursive case.
17360 (regsets_fetch_inferior_registers): Improve error message.
17361 (regsets_store_inferior_registers): Add debugging.
17362 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17363 (unstopped_p, linux_signal_pid): New functions.
17364 (linux_target_ops): Add linux_signal_pid.
17365 (linux_init_signals): New function.
17366 (initialize_low): Call it. Initialize using_threads.
17367 * regcache.c (inferior_regcache_data): Add valid
17368 flag.
17369 (get_regcache): Fetch registers lazily. Add fetch argument
17370 and update all callers.
17371 (regcache_invalidate_one, regcache_invalidate): New
17372 functions.
17373 (new_register_cache): Renamed from create_register_cache.
17374 Return the new regcache.
17375 (free_register_cache): Change argument to a void *.
17376 (registers_to_string, registers_from_string): Call get_regcache
17377 with fetch flag set.
17378 (register_data): Make static. Pass fetch flag to get_regcache.
17379 (supply_register): Call get_regcache with fetch flag clear.
17380 (collect_register): Call get_regcache with fetch flag set.
17381 (collect_register_as_string): New function.
17382 * regcache.h: Update.
17383 * remote-utils.c (putpkt): Flush after debug output and use
17384 stderr.
17385 Handle input interrupts while waiting for an ACK.
17386 (input_interrupt): Use signal_pid method.
17387 (getpkt): Flush after debug output and use stderr.
17388 (outreg): Use collect_register_as_string.
17389 (new_thread_notify, dead_thread_notify): New functions.
17390 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17391 and general_thread.
17392 (look_up_one_symbol): Flush after debug output.
17393 * server.c (step_thread, server_waiting): New variables.
17394 (start_inferior): Don't use signal_pid. Update call to mywait.
17395 (attach_inferior): Update call to mywait.
17396 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17397 (main): Don't fetch/store registers explicitly. Use
17398 set_desired_inferior. Support proposed ``Hs'' packet. Update
17399 calls to mywait.
17400 * server.h: Update.
17401 (struct inferior_list, struct_inferior_list_entry): New.
17402 * target.c (set_desired_inferior): New.
17403 (write_inferior_memory): Constify.
17404 (mywait): New function.
17405 * target.h: Update.
17406 (struct target_ops): New signal_pid method.
17407 (mywait): Removed macro, added prototype.
17408
17409 * linux-low.h (regset_func): Removed.
17410 (regset_fill_func, regset_store_func): New.
17411 (enum regset_type): New.
17412 (struct regset_info): Add type field. Use new operation types.
17413 (struct linux_target_ops): stop_pc renamed to get_pc.
17414 Add decr_pc_after_break and breakpoint_at.
17415 (get_process, get_thread_proess, get_process_thread)
17416 (strut process_info, all_processes, linux_attach_lwp)
17417 (thread_db_init): New.
17418
17419 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17420 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17421 (the_low_target): Add new members.
17422 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17423 (i386_store_fpxregset): Constify.
17424 (target_regsets): Add new kind identifier.
17425 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17426 (i386_set_pc): Add debugging.
17427 (i386_breakpoint_at): New function.
17428 (the_low_target): Add new members.
17429 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17430 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17431 (mips_breakpoint_at): New.
17432 (the_low_target): Add new members.
17433 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17434 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17435 (the_low_target): Add new members.
17436 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17437 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17438 (the_low_target): Add new members.
17439 * linux-x86-64-low.c (target_regsets): Add new kind
17440 identifier.
17441
17442 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17443
17444 From Martin Pool <mbp@samba.org>:
17445 * server.c (gdbserver_usage): New function.
17446 (main): Call it.
17447
17448 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17449
17450 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17451 stop_at -> stop_pc.
17452
17453 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17454
17455 * Makefile.in: Remove obsolete code.
17456
17457 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17458
17459 * linux-low.c (regsets_fetch_inferior_registers),
17460 (regsets_store_inferior_registers): Removed cast to int from
17461 ptrace() calls.
17462 * regcache.h: Added declaration of struct inferior_info.
17463
17464 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17465
17466 * inferiors.c (struct inferior_info): Add regcache_data.
17467 (add_inferior): Call create_register_cache.
17468 (clear_inferiors): Call free_register_cache.
17469 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17470 * regcache.c (struct inferior_regcache_data): New.
17471 (registers): Remove.
17472 (get_regcache): New function.
17473 (create_register_cache, free_register_cache): New functions.
17474 (set_register_cache): Don't initialize the register cache here.
17475 (registers_to_string, registers_from_string, register_data): Call
17476 get_regcache.
17477 * regcache.h: Add prototypes.
17478 * server.h: Likewise.
17479
17480 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17481
17482 * mem-break.c: New file.
17483 * mem-break.h: New file.
17484 * Makefile.in: Add mem-break.o rule; update server.h
17485 dependencies.
17486 * inferiors.c (struct inferior_info): Add target_data
17487 member.
17488 (clear_inferiors): Free target_data member if set.
17489 (inferior_target_data, set_inferior_target_data): New functions.
17490 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17491 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17492 * linux-low.c (linux_bp_reinsert): New variable.
17493 (struct inferior_linux_data): New.
17494 (linux_create_inferior): Use set_inferior_target_data.
17495 (linux_attach): Likewise. Call add_inferior.
17496 (linux_wait_for_one_inferior): New function.
17497 (linux_wait): Call it.
17498 (linux_write_memory): Add const.
17499 (initialize_low): Call set_breakpoint_data.
17500 * linux-low.h (struct linux_target_ops): Add breakpoint
17501 handling members.
17502 * server.c (attach_inferior): Remove extra add_inferior
17503 call.
17504 * server.h: Include mem-break.h. Update inferior.c
17505 prototypes.
17506 * target.c (read_inferior_memory)
17507 (write_inferior_memory): New functions.
17508 * target.h (read_inferior_memory)
17509 (write_inferior_memory): Change macros to prototypes.
17510 (struct target_ops): Update comments. Add const to write_memory
17511 definition.
17512
17513 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17514
17515 * linux-low.c (usr_store_inferior_registers): Support
17516 registers which are allowed to fail to store.
17517 * linux-low.h (linux_target_ops): Likewise.
17518 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17519 (ppc_cannot_store_register): FPSCR may not be storable.
17520
17521 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17522
17523 * server.h: Include <string.h> if HAVE_STRING_H.
17524 * ChangeLog: Correct paths in last ChangeLog entry.
17525
17526 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17527
17528 * linux-low.h: Remove obsolete prototypes.
17529 (struct linux_target_ops): New.
17530 (extern the_low_target): New.
17531 * linux-low.c (num_regs, regmap): Remove declarations.
17532 (register_addr): Use the_low_target explicitly.
17533 (fetch_register): Likewise.
17534 (usr_fetch_inferior_registers): Likewise.
17535 (usr_store_inferior_registers): Likewise.
17536 * linux-arm-low.c (num_regs): Remove.
17537 (arm_num_regs): Define.
17538 (arm_regmap): Renamed from regmap, made static.
17539 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17540 made static.
17541 (arm_cannot_store_register): Renamed from cannot_store_register,
17542 made static.
17543 (the_low_target): New.
17544 * linux-i386-low.c (num_regs): Remove.
17545 (i386_num_regs): Define.
17546 (i386_regmap): Renamed from regmap, made static.
17547 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17548 made static.
17549 (i386_cannot_store_register): Renamed from cannot_store_register,
17550 made static.
17551 (the_low_target): New.
17552 * linux-ia64-low.c (num_regs): Remove.
17553 (ia64_num_regs): Define.
17554 (ia64_regmap): Renamed from regmap, made static.
17555 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17556 made static.
17557 (ia64_cannot_store_register): Renamed from cannot_store_register,
17558 made static.
17559 (the_low_target): New.
17560 * linux-m68k-low.c (num_regs): Remove.
17561 (m68k_num_regs): Define.
17562 (m68k_regmap): Renamed from regmap, made static.
17563 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17564 made static.
17565 (m68k_cannot_store_register): Renamed from cannot_store_register,
17566 made static.
17567 (the_low_target): New.
17568 * linux-mips-low.c (num_regs): Remove.
17569 (mips_num_regs): Define.
17570 (mips_regmap): Renamed from regmap, made static.
17571 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17572 made static.
17573 (mips_cannot_store_register): Renamed from cannot_store_register,
17574 made static.
17575 (the_low_target): New.
17576 * linux-ppc-low.c (num_regs): Remove.
17577 (ppc_num_regs): Define.
17578 (ppc_regmap): Renamed from regmap, made static.
17579 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17580 made static.
17581 (ppc_cannot_store_register): Renamed from cannot_store_register,
17582 made static.
17583 (the_low_target): New.
17584 * linux-s390-low.c (num_regs): Remove.
17585 (s390_num_regs): Define.
17586 (s390_regmap): Renamed from regmap, made static.
17587 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17588 made static.
17589 (s390_cannot_store_register): Renamed from cannot_store_register,
17590 made static.
17591 (the_low_target): New.
17592 * linux-sh-low.c (num_regs): Remove.
17593 (sh_num_regs): Define.
17594 (sh_regmap): Renamed from regmap, made static.
17595 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17596 made static.
17597 (sh_cannot_store_register): Renamed from cannot_store_register,
17598 made static.
17599 (the_low_target): New.
17600 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17601 (the_low_target): New.
17602
17603 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17604
17605 * Makefile.in: Add stamp-h target.
17606 * configure.in: Create stamp-h.
17607 * configure: Regenerated.
17608
17609 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17610
17611 * inferiors.c: New file.
17612 * target.c: New file.
17613 * target.h: New file.
17614 * Makefile.in: Add target.o and inferiors.o. Update
17615 dependencies.
17616 * linux-low.c (inferior_pid): New static variable,
17617 moved from server.c.
17618 (linux_create_inferior): Renamed from create_inferior.
17619 Call add_inferior. Return 0 on success instead of a PID.
17620 (linux_attach): Renamed from myattach.
17621 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17622 (linux_thread_alive): Renamed from mythread_alive.
17623 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17624 child dies.
17625 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17626 (regsets_store_inferior_registers): Correct error message.
17627 Add missing ``return 0''.
17628 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17629 (linux_store_registers): Renamed from store_inferior_registers.
17630 (linux_read_memory): Renamed from read_inferior_memory.
17631 (linux_write_memory): Renamed from write_inferior_memory.
17632 (linux_target_ops): New structure.
17633 (initialize_low): Call set_target_ops ().
17634 * remote-utils.c (unhexify): New function.
17635 (hexify): New function.
17636 (input_interrupt): Send signals to ``signal_pid''.
17637 * server.c (inferior_pid): Remove.
17638 (start_inferior): Update create_inferior call.
17639 (attach_inferior): Call add_inferior.
17640 (handle_query): New function.
17641 (main): Call handle_query for `q' packets.
17642 * server.h: Include "target.h". Remove obsolete prototypes.
17643 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17644
17645 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17646
17647 * Makefile.in: Add WARN_CFLAGS. Update configury
17648 dependencies.
17649 * configure.in: Check for <string.h>
17650 * configure: Regenerate.
17651 * config.in: Regenerate.
17652 * gdbreplay.c: Include needed system headers.
17653 (remote_open): Remove strchr prototype.
17654 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17655 * regcache.c (supply_register): Change buf argument to const void *.
17656 (supply_register_by_name): Likewise.
17657 (collect_register): Change buf argument to void *.
17658 (collect_register_by_name): Likewise.
17659 * regcache.h: Add missing prototypes.
17660 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17661 * server.c (handle_query): New function.
17662 (attached): New static variable, moved out of main.
17663 (main): Quiet longjmp clobber warnings.
17664 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17665 * utils.c (error): Remove NORETURN.
17666 (fatal): Likewise.
This page took 0.387739 seconds and 5 git commands to generate.