PR25125, relaxation chooses wrong branch size
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
... / ...
CommitLineData
12019-10-23 Tom Tromey <tom@tromey.com>
2
3 * configure, config.in: Rebuild.
4
52019-10-23 Tom Tromey <tom@tromey.com>
6
7 * configure: Rebuild.
8 * acinclude.m4: Use m4_include, not sinclude.
9
102019-10-17 Tom Tromey <tromey@adacore.com>
11
12 * configure: Rebuild.
13 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
14 in AC_CONFIG_FILES invocation.
15 * Makefile.in (stamp-h, Makefile): Use new-style config.status
16 invocation.
17
182019-10-16 Christian Biesinger <cbiesinger@google.com>
19
20 * server.c: Include xml-builtin.h.
21 (get_xml_features): Don't declare xml_builtins here.
22
232019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
24
25 * Makefile.in: Remove references to vec-ipa.o.
26
272019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
28
29 * Makefile.in: Remove references to vec.c.
30
312019-10-02 Christian Biesinger <cbiesinger@google.com>
32
33 * server.c (server_waiting): Change to bool.
34 (extended_protocol): Likewise.
35 (response_needed): Likewise.
36 (exit_requested): Likewise.
37 (run_once): Likewise.
38 (report_no_resumed): Likewise.
39 (non_stop): Likewise.
40 (disable_packet_vCont): Likewise.
41 (disable_packet_Tthread): Likewise.
42 (disable_packet_qC): Likewise.
43 (disable_packet_qfThreadInfo): Likewise.
44 (handle_general_set): Update.
45 (handle_detach): Update.
46 (handle_monitor_command): Update.
47 (handle_query): Update.
48 (captured_main): Update.
49 (process_serial_event): Update.
50 * server.h (server_waiting): Change to bool.
51 (disable_packet_vCont): Likewise.
52 (disable_packet_Tthread): Likewise.
53 (disable_packet_qC): Likewise.
54 (disable_packet_qfThreadInfo): Likewise.
55 (run_once): Likewise.
56 (non_stop): Likewise.
57 * target.c (target_stop_and_wait): Update.
58
592019-10-02 Tom Tromey <tromey@adacore.com>
60
61 * Makefile.in (SFILES): Add common-inferior.c.
62 (OBS): Add common-inferior.o.
63 * server.c (startup_with_shell): Don't define.
64
652019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
66
67 * linux-low.c (linux_low_read_btrace): Update for change to
68 std::vector.
69
702019-09-20 Christian Biesinger <cbiesinger@google.com>
71
72 * debug.c (debug_threads): Remove comment in favor of the header.
73 * debug.h (using_threads): Add declaration.
74 (debug_threads): Add comment.
75 * linux-aarch64-low.c: Include debug.h and remove declaration of
76 debug_threads.
77 * nto-low.c: Likewise.
78 * remote-utils.c: Likewise.
79 * thread-db.c: Likewise.
80
812019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
82
83 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
84 and powerpc-cell64l-ipa.o.
85 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
86 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
87 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
88 (spu*-*-*): Remove.
89
90 * spu-low.c: Remove file.
91
92 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
93 (parse_spufs_run): Remove.
94 (ppc_get_pc): Remove Cell/B.E. support.
95 (ppc_set_pc): Likewise.
96 (ppc_breakpoint_at): Likewise.
97 (ppc_arch_setup): Likewise.
98 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
99 tdesc_powerpc_cell32l.
100 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
101 or init_registers_powerpc_cell32l.
102 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
103 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
104 or init_registers_powerpc_cell32l.
105 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
106 (init_registers_powerpc_cell32l): Remove prototype.
107 (init_registers_powerpc_cell64l): Likewise.
108
109 * target.h (struct target_ops): Remove qxfer_spu member.
110 * server.c (handle_qxfer_spu): Remove.
111 (qxfer_packets): Remove entry for "spu".
112 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
113 * linux-low.c (SPUFS_MAGIC): Remove.
114 (spu_enumerate_spu_ids): Remove.
115 (linux_qxfer_spu): Remove.
116 (linux_target_ops): Remove qxfer_spu member.
117 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
118 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
119 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
120
1212019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
122
123 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
124 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
125 * config.in: Regenerate.
126 * configure: Regenerate.
127
1282019-08-15 Tom Tromey <tromey@adacore.com>
129
130 * target.c (target_write_memory): Use gdb::byte_vector.
131
1322019-08-15 Tom Tromey <tromey@adacore.com>
133
134 * tracepoint.c (write_inferior_data_pointer)
135 (write_inferior_integer, write_inferior_int8)
136 (write_inferior_uinteger, m_tracepoint_action_download)
137 (r_tracepoint_action_download, x_tracepoint_action_download)
138 (l_tracepoint_action_download, clear_inferior_trace_buffer)
139 (download_agent_expr, download_tracepoint_1)
140 (download_trace_state_variables, upload_fast_traceframes): Update.
141 * server.c (gdb_write_memory): Update.
142 * remote-utils.c (relocate_instruction): Update.
143 * proc-service.c (ps_pdwrite): Update.
144 * mem-break.c (remove_memory_breakpoint)
145 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
146 (uninsert_fast_tracepoint_jumps_at)
147 (reinsert_fast_tracepoint_jumps_at): Update.
148 * linux-x86-low.c (append_insns)
149 (i386_install_fast_tracepoint_jump_pad)
150 (amd64_write_goto_address, i386_write_goto_address): Update.
151 * linux-s390-low.c (append_insns, s390_write_goto_address):
152 Update.
153 * linux-ppc-low.c (ppc_relocate_instruction)
154 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
155 (ppc_write_goto_address): Update.
156 * linux-aarch64-low.c (append_insns): Update.
157 * target.h (struct target_ops): Update.
158 (write_inferior_memory): Don't declare.
159 * target.c (target_write_memory): Rename from
160 write_inferior_memory. Remove old target_write_memory.
161
1622019-08-15 Tom Tromey <tromey@adacore.com>
163
164 * target.c (write_inferior_memory): Use std::vector.
165
1662019-08-06 Frank Ch. Eigler <fche@redhat.com>
167
168 PR build/24886
169 * configure.ac: Drop enable-libmcheck support.
170 * configure, config.in: Rebuild.
171 * acinclude.m4: Don't include it.
172
1732019-07-19 Alan Hayward <alan.hayward@arm.com>
174
175 * configure.srv: Remove Arm xml files.
176
1772019-07-19 Alan Hayward <alan.hayward@arm.com>
178
179 * configure.srv: Add new files. Remove xml generated files.
180 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
181 registers.
182 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
183 * linux-aarch32-tdesc.c: New file.
184 * linux-aarch32-tdesc.h: New file.
185 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
186 * linux-arm-low.c (init_registers_arm, tdesc_arm)
187 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
188 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
189 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
190 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
191 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
192 (arm_read_description): Call arm_linux_read_description.
193 (initialize_low_arch): Don't init registers.
194 * linux-arm-tdesc.c: New file.
195 * linux-arm-tdesc.h: New file.
196
1972019-07-10 Alan Hayward <alan.hayward@arm.com>
198
199 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
200 Move counter inside for.
201 (arm_read_description): Check ptrace earlier.
202 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
203
2042019-07-09 Tom Tromey <tom@tromey.com>
205
206 * configure: Rebuild.
207 * configure.ac: Change common to gdbsupport.
208 * acinclude.m4: Change common to gdbsupport.
209 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
210 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
211 common to gdbsupport.
212 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
213 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
214 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
215 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
216 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
217 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
218 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
219 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
220 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
221 common to gdbsupport.
222
2232019-07-04 Alan Hayward <alan.hayward@arm.com>
224
225 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
226 defines.
227 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
228
2292019-07-04 Alan Hayward <alan.hayward@arm.com>
230
231 * configure.srv: Remove legacy xml.
232 * linux-aarch64-low.c (initialize_low_arch): Remove
233 initialize_low_tdesc call.
234 * linux-aarch64-tdesc-selftest.c: Remove file.
235 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
236 * linux-x86-low.c (initialize_low_arch): Remove
237 initialize_low_tdesc call.
238 * linux-x86-tdesc-selftest.c: Remove file.
239 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
240
2412019-06-20 Tom de Vries <tdevries@suse.de>
242
243 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
244 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
245
2462019-06-19 Tom de Vries <tdevries@suse.de>
247
248 * debug.h (debug_write): Change return type to ssize_t.
249 * debug.c (debug_write): Same.
250
2512019-06-14 Tom Tromey <tom@tromey.com>
252
253 * configure.ac: Use new path to gnulib.
254 * configure: Rebuild.
255 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
256 to gnulib.
257
2582019-06-11 Tom Tromey <tom@tromey.com>
259
260 * Makefile.in (SFILES): Add alloc.c.
261 (OBS): Add alloc.o.
262 (IPA_OBJS): Add alloc-ipa.o.
263 (alloc-ipa.o): New target.
264 (%.o: ../%.c): New pattern rule.
265
2662019-06-10 Tom Tromey <tromey@adacore.com>
267
268 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
269 end warning with a newline.
270 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
271 newline.
272 * thread-db.c (attach_thread): Don't end warning with a newline.
273 (thread_db_notice_clone): Likewise.
274 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
275 newline.
276 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
277 end warning with a newline.
278
2792019-06-04 Pedro Alves <palves@redhat.com>
280
281 * server.c (captured_main): Use make_unique_xstrdup.
282
2832019-06-02 Tom Tromey <tom@tromey.com>
284
285 * gdbreplay.c (fromhex): Remove.
286 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
287
2882019-05-29 Tom Tromey <tromey@adacore.com>
289
290 * configure: Rebuild.
291
2922019-05-06 Kevin Buettner <kevinb@redhat.com>
293
294 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
295 sign extension code on 32-bit builds.
296
2972019-05-03 Eli Zaretskii <eliz@gnu.org>
298
299 * remote-utils.c:
300 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
301
3022019-04-19 Tom Tromey <tom@tromey.com>
303
304 * server.c (struct vstop_notif): Derive from notif_event.
305 <base>: Remove.
306 (queue_stop_reply): Update.
307 (remove_all_on_match_ptid): Change type. Rewrite.
308 (discard_queued_stop_replies): Rewrite.
309 (in_queued_stop_replies_ptid): Change type.
310 (in_queued_stop_replies): Rewrite.
311 (notif_stop): Update.
312 (queue_stop_reply_callback): Update.
313 (captured_main): Don't call initialize_notif.
314 (push_stop_notification): Update.
315 * notif.c (notif_write_event, handle_notif_ack)
316 (notif_event_enque, notif_push): Update.
317 (notif_event_xfree, initialize_notif): Remove.
318 * notif.h (struct notif_event): Include <list>, not
319 "common/queue.h".
320 (struct notif_server) <queue>: Now a std::list.
321 (notif_event_p): Remove typedef.
322 (initialize_notif): Don't declare.
323 (struct notif_event): Add virtual destructor.
324
3252019-04-17 Alan Hayward <alan.hayward@arm.com>
326
327 * ax.c (ax_vdebug): Call debug_printf.
328 * debug.c (debug_write): New function.
329 * debug.h (debug_write): New declaration.
330 * linux-low.c (sigchld_handler): Call debug_write.
331
3322019-04-17 Alan Hayward <alan.hayward@arm.com>
333
334 * debug.c (debug_set_output): New function.
335 (debug_vprintf): Send output to debug_file.
336 (debug_flush): Likewise.
337 * debug.h (debug_set_output): New declaration.
338 * server.c (handle_monitor_command): Add debug-file option.
339 (captured_main): Likewise.
340
3412019-04-17 Alan Hayward <alan.hayward@arm.com>
342
343 * debug.c (remote_debug): Add definition.
344 * debug.h (remote_debug): Add declaration.
345 * hostio.c (remote_debug): Remove declaration.
346 * remote-utils.c (struct ui_file): Likewise.
347 (remote_debug): Likewise.
348 * remote-utils.h (remote_debug): Likewise,
349 * server.c (remote_debug): Remove definition.
350
3512019-04-10 Kevin Buettner <kevinb@redhat.com>
352
353 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
354 when using a 64-bit gdbserver.
355
3562019-04-09 Tom Tromey <tromey@adacore.com>
357
358 * linux-low.c (select_event_lwp): Use find_thread_in_random.
359
3602019-04-08 Tom Tromey <tom@tromey.com>
361
362 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
363 throw.
364 (linux_resume_one_lwp): Likewise.
365
3662019-04-08 Tom Tromey <tom@tromey.com>
367
368 * gdbreplay.c: Update.
369 * linux-low.c: Update.
370 * server.c: Update.
371
3722019-04-08 Tom Tromey <tom@tromey.com>
373
374 * server.c: Use C++ exception handling.
375 * linux-low.c: Use C++ exception handling.
376 * gdbreplay.c: Use C++ exception handling.
377
3782019-04-08 Tom Tromey <tom@tromey.com>
379
380 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
381 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
382 (captured_main, main): Update.
383 * gdbreplay.c (main): Update.
384
3852019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
386
387 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
388 value in argument pointer, return 1 if the entry is found and 0
389 otherwise. Move comment.
390 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
391 * linux-low.h (linux_get_auxv): Declare.
392 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
393
3942019-04-05 Tom Tromey <tromey@adacore.com>
395
396 * server.c (gdbserver_usage): Use upper-case for metasyntactic
397 variables.
398
3992019-03-28 Alan Hayward <alan.hayward@arm.com>
400
401 * linux-low.c (AT_HWCAP2): Add define if not already included.
402
4032019-03-26 Alan Hayward <alan.hayward@arm.com>
404
405 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
406 (aarch64_arch_setup): Call linux_get_hwcap.
407 * linux-arm-low.c (arm_get_hwcap): Remove function.
408 (arm_read_description): Call linux_get_hwcap.
409 * linux-low.c (linux_get_auxv): New function.
410 (linux_get_hwcap): Likewise.
411 (linux_get_hwcap2): Likewise.
412 * linux-low.h (linux_get_hwcap): New declaration.
413 (linux_get_hwcap2): Likewise.
414 * linux-ppc-low.c (ppc_get_auxv): Remove function.
415 (ppc_arch_setup): Call linux_get_hwcap.
416 * linux-s390-low.c (s390_get_hwcap): Remove function.
417 (s390_arch_setup): Call linux_get_hwcap.
418
4192019-03-22 Alan Hayward <alan.hayward@arm.com>
420 Jiong Wang <jiong.wang@arm.com>
421
422 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
423 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
424 to fail.
425 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
426
4272019-03-22 Alan Hayward <alan.hayward@arm.com>
428 Jiong Wang <jiong.wang@arm.com>
429
430 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
431 (aarch64_get_hwcap): New function.
432 (aarch64_arch_setup): Read APIA hwcap.
433
4342019-03-22 Alan Hayward <alan.hayward@arm.com>
435 Jiong Wang <jiong.wang@arm.com>
436
437 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
438 (initialize_low_tracepoint): Likewise.
439 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
440 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
441 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
442 (aarch64_linux_read_description): Likewise.
443 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
444
4452019-03-12 John Baldwin <jhb@FreeBSD.org>
446
447 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
448 i386_create_target_description for 'segments' parameter.
449 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
450 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
451 * win32-i386-low.c (i386_arch_setup): Likewise.
452
4532019-03-12 Tom Tromey <tromey@adacore.com>
454
455 * linux-low.c (iterate_over_lwps): Update.
456
4572019-03-06 Tom Tromey <tom@tromey.com>
458
459 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
460 (captured_main): Use SCOPE_EXIT.
461
4622019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
463
464 * configure.srv: Use '$enable_unittest' instead of '$development'
465 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
466 case.
467
4682019-02-27 Tom Tromey <tromey@adacore.com>
469
470 * gdbreplay.c (logchar): Handle \r\n.
471
4722019-02-07 Alan Hayward <alan.hayward@arm.com>
473
474 * linux-low.c (linux_attach): Add process before lwp.
475 * server.c (attach_inferior): Check if already attached.
476
4772019-02-07 Tom Tromey <tom@tromey.com>
478
479 * x86-tdesc.h: Rename include guard.
480 * x86-low.h: Add include guard.
481 * wincecompat.h: Rename include guard.
482 * win32-low.h: Add include guard.
483 * utils.h: Rename include guard.
484 * tracepoint.h: Rename include guard.
485 * tdesc.h: Rename include guard.
486 * target.h: Rename include guard.
487 * server.h: Rename include guard.
488 * remote-utils.h: Rename include guard.
489 * regcache.h: Rename include guard.
490 * nto-low.h: Rename include guard.
491 * notif.h: Add include guard.
492 * mem-break.h: Rename include guard.
493 * lynx-low.h: Add include guard.
494 * linux-x86-tdesc.h: Add include guard.
495 * linux-s390-tdesc.h: Add include guard.
496 * linux-ppc-tdesc-init.h: Add include guard.
497 * linux-low.h: Add include guard.
498 * linux-aarch64-tdesc.h: Add include guard.
499 * linux-aarch32-low.h: Add include guard.
500 * inferiors.h: Rename include guard.
501 * i387-fp.h: Rename include guard.
502 * hostio.h: Rename include guard.
503 * gdbthread.h: Rename include guard.
504 * gdb_proc_service.h: Rename include guard.
505 * event-loop.h: Rename include guard.
506 * dll.h: Rename include guard.
507 * debug.h: Rename include guard.
508 * ax.h: Rename include guard.
509
5102018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
511
512 PR gdb/23985
513 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
514 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
515
5162019-01-25 Tom Tromey <tom@tromey.com>
517
518 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
519
5202019-01-25 Tom Tromey <tom@tromey.com>
521
522 * win32-low.c: Fix common/ includes.
523 * win32-i386-low.c: Fix common/ includes.
524 * tracepoint.c: Fix common/ includes.
525 * thread-db.c: Fix common/ includes.
526 * target.h: Fix common/ includes.
527 * symbol.c: Fix common/ includes.
528 * spu-low.c: Fix common/ includes.
529 * server.h: Fix common/ includes.
530 * server.c: Fix common/ includes.
531 * remote-utils.c: Fix common/ includes.
532 * regcache.h: Fix common/ includes.
533 * regcache.c: Fix common/ includes.
534 * nto-x86-low.c: Fix common/ includes.
535 * notif.h: Fix common/ includes.
536 * mem-break.h: Fix common/ includes.
537 * lynx-low.c: Fix common/ includes.
538 * lynx-i386-low.c: Fix common/ includes.
539 * linux-x86-tdesc-selftest.c: Fix common/ includes.
540 * linux-x86-low.c: Fix common/ includes.
541 * linux-low.c: Fix common/ includes.
542 * inferiors.h: Fix common/ includes.
543 * i387-fp.c: Fix common/ includes.
544 * hostio.c: Fix common/ includes.
545 * hostio-errno.c: Fix common/ includes.
546 * gdbthread.h: Fix common/ includes.
547 * gdbreplay.c: Fix common/ includes.
548 * fork-child.c: Fix common/ includes.
549 * event-loop.c: Fix common/ includes.
550 * ax.c:
551 (enum gdb_agent_op): Fix common/ includes.
552
5532019-01-21 Tom Tromey <tom@tromey.com>
554
555 * tracepoint.c: Fix includes.
556 * remote-utils.c: Fix includes.
557 * linux-x86-low.c: Fix includes.
558
5592019-01-01 Joel Brobecker <brobecker@adacore.com>
560
561 * gdbreplay.c (gdbreplay_version): Update copyright year in
562 version message.
563 * server.c (gdbserver_version): Likewise.
564
5652018-12-05 Alan Hayward <alan.hayward@arm.com>
566
567 * linux-low.c (add_lwp): Switch ordering.
568
5692018-11-29 Tom Tromey <tom@tromey.com>
570
571 * win32-low.c (win32_join): Take pid, not process.
572 * target.h (struct target_ops) <join>: Change argument type.
573 (join_inferior): Change argument name.
574 * spu-low.c (spu_join): Take pid, not process.
575 * server.c (handle_detach): Preserve pid before destroying
576 process.
577 * lynx-low.c (lynx_join): Take pid, not process.
578 * linux-low.c (linux_join): Take pid, not process.
579
5802018-11-23 Alan Hayward <alan.hayward@arm.com>
581
582 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
583 (aarch64_cannot_fetch_register): Likewise.
584 (struct linux_target_ops): Update references.
585
5862018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
587
588 * linux-ppc-low.c: Include nat/linux-ptrace.h.
589
5902018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
591
592 * configure.srv (ipa_ppc_linux_regobj): Add
593 powerpc-isa207-htm-vsx32l-ipa.o and
594 powerpc-isa207-htm-vsx64l-ipa.o.
595 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
596 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
597 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
598 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
599 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
600 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
601 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
602 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
603 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
604 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
605 (init_registers_powerpc_isa207_htm_vsx32l)
606 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
607 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
608 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
609 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
610 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
611 (ppc_store_tm_ctarregset): New functions.
612 (ppc_regsets): Add entries for HTM regsets.
613 (ppc_arch_setup): Set htm in features struct when needed. Set
614 sizes for the HTM regsets.
615 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
616 (initialize_low_arch): Call
617 init_registers_powerpc_isa207_htm_vsx32l and
618 init_registers_powerpc_isa207_htm_vsx64l.
619 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
620 PPC_TDESC_ISA207_HTM_VSX.
621 (initialize_low_tracepoint): Call
622 init_registers_powerpc_isa207_htm_vsx32l and
623 init_registers_powerpc_isa207_htm_vsx64l.
624
6252018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
626
627 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
628 rs6000/power-linux-pmu.xml to srv_xmlfiles.
629 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
630 (ppc_store_pmuregset): New functions.
631 (ppc_regsets): Add entries for ebb and pmu regsets.
632 (ppc_arch_setup): Set isa207 in features struct if the ebb and
633 pmu regsets are available. Set sizes for these regsets.
634
6352018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
636
637 * configure.srv (ipa_ppc_linux_regobj): Add
638 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
639 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
640 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
641 rs6000/powerpc-isa207-vsx32l.xml, and
642 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
643 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
644 <PPC_TDESC_ISA207_VSX>: New enum value.
645 (init_registers_powerpc_isa207_vsx32l): Declare.
646 (init_registers_powerpc_isa207_vsx64l): Declare.
647 * linux-ppc-low.c (ppc_fill_tarregset): New function.
648 (ppc_store_tarregset): New function.
649 (ppc_regsets): Add entry for the TAR regset.
650 (ppc_arch_setup): Set isa207 in features struct when needed. Set
651 size for the TAR regsets.
652 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
653 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
654 and init_registers_powerpc_isa207_vsx64l.
655 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
656 (initialize_low_tracepoint): Call
657 init_registers_powerpc_isa207_vsx32l and
658 init_registers_powerpc_isa207_vsx64l.
659
6602018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
661 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
662
663 * configure.srv (ipa_ppc_linux_regobj): Add
664 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
665 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
666 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
667 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
668 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
669 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
670 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
671 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
672 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
673 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
674 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
675 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
676 (ppc_hwcap): Add comment.
677 (ppc_hwcap2): New global.
678 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
679 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
680 (ppc_regsets): Add entries for the DSCR and PPR regsets.
681 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
682 when needed. Set sizes for the the DSCR and PPR regsets.
683 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
684 (initialize_low_arch): Call
685 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
686 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
687 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
688 PPC_TDESC_ISA205_PPR_DSCR_VSX.
689 (initialize_low_tracepoint): Call
690 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
691 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
692
6932018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
694
695 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
696
6972018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
698 Simon Marchi <simark@simark.ca>
699
700 * acinclude.m4: Include "../selftest.m4".
701 * configure: Regenerate.
702 * configure.ac: Use "GDB_AC_SELFTEST".
703 * configure.srv: Use "$enable_unittests" instead of
704 "$development" when checking whether unit tests have been
705 enabled.
706 * server.c (captured_main): Update message informing that
707 selftests have been disabled.
708
7092018-10-04 Tom Tromey <tom@tromey.com>
710
711 * configure: Rebuild.
712
7132018-10-04 Tom Tromey <tom@tromey.com>
714
715 * server.c (handle_status): Rename inner "thread".
716 (process_serial_event): Declare "res" in 'm' case.
717 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
718 (iterate_over_lwps): Rename inner "thread".
719 (linux_qxfer_libraries_svr4): Rename inner "len".
720 * gdbthread.h (find_thread_in_random): Rename inner "thread".
721
7222018-10-01 Gary Benson <gbenson@redhat.com>
723
724 * gdb_proc_service.h: Moved common code to
725 common/gdb_proc_service.h.
726
7272018-10-01 Gary Benson <gbenson@redhat.com>
728
729 * gdb_proc_service.h: Synchronize comments and whitespace with
730 GDB's version of this file.
731
7322018-09-25 Tom Tromey <tom@tromey.com>
733
734 * configure: Rebuild.
735 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
736
7372018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
738
739 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
740 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
741 ($(IPA_LIB)): Sort IPA_OBJS.
742
7432018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
744
745 * Makefile.in: Remove references to $(ADD_DEPS).
746
7472018-09-16 Tom Tromey <tom@tromey.com>
748
749 * remote-utils.c (remote_open): Use GNU style for metasyntactic
750 variables.
751 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
752 variables.
753
7542018-09-05 Tom Tromey <tom@tromey.com>
755
756 * configure: Rebuild.
757
7582018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
759
760 PR build/23399
761 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
762
7632018-08-27 Tom Tromey <tom@tromey.com>
764
765 PR build/23087:
766 * configure: Rebuild.
767
7682018-08-27 Tom Tromey <tom@tromey.com>
769
770 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
771 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
772 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
773 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
774 (s390x_emit_stack_adjust): Add casts to unsigned char.
775
7762018-08-22 Simon Marchi <simon.marchi@ericsson.com>
777
778 PR gdb/23374
779 PR gdb/23375
780 * server.h (struct client_state) <disable_randomization>:
781 Initialize to 1.
782
7832018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
784
785 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
786 variable.
787 (mips_supply_ptrace_register): Likewise.
788
7892018-07-22 Tom Tromey <tom@tromey.com>
790
791 * configure: Rebuild.
792
7932018-07-22 Tom Tromey <tom@tromey.com>
794
795 * win32-low.c (win32_create_inferior): Remove unused variables.
796 * gdbreplay.c (remote_open): Remove unused variable.
797 * remote-utils.c (remote_prepare): Remove unused variable.
798 * x86-tdesc.h (X86_TDESC_H): Define.
799 (amd64_expedite_regs): Define conditionally.
800 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
801 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
802 * remote-utils.c (readchar): Remove unused variable.
803
8042018-07-13 Pedro Alves <palves@redhat.com>
805
806 * linux-low.c (linux_kill): Change parameter to process_info
807 pointer instead of pid. Adjust.
808 * lynx-low.c (lynx_kill): Likewise.
809 * nto-low.c (nto_kill): Likewise.
810 * spu-low.c (spu_kill): Likewise.
811 * win32-low.c (win32_kill): Likewise.
812 * server.c (handle_v_kill, kill_inferior_callback)
813 (detach_or_kill_for_exit): Adjust.
814 * target.c (kill_inferior): Change parameter to process_info
815 pointer instead of pid. Adjust.
816 * target.h (struct target_ops) <kill>: Change parameter to
817 process_info pointer instead of pid. Adjust all implementations
818 and callers.
819 (kill_inferior): Likewise.
820
8212018-07-13 Pedro Alves <palves@redhat.com>
822
823 * linux-low.c (linux_detach, linux_join): Change parameter to
824 process_info pointer instead of pid. Adjust.
825 * lynx-low.c (lynx_detach, lynx_join): Likewise.
826 * nto-low.c (nto_detach): Likewise.
827 * spu-low.c (spu_detach, spu_join): Likewise.
828 * win32-low.c (win32_detach, win32_join): Likewise.
829 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
830 * target.h (struct target_ops) <detach, join>: Change parameter to
831 process_info pointer instead of pid. Adjust all implementations
832 and callers.
833 (detach_inferior, join_inferior): Rename 'pid' parameter to
834 'proc'.
835
8362018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
837 Jan Kratochvil <jan.kratochvil@redhat.com>
838 Paul Fertser <fercerpav@gmail.com>
839 Tsutomu Seki <sekiriki@gmail.com>
840
841 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
842 (OBS): Add 'common/netstuff.o'.
843 (GDBREPLAY_OBS): Likewise.
844 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
845 (remote_open): Implement support for IPv6
846 connections.
847 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
848 and 'wspiapi.h'.
849 (handle_accept_event): Accept connections from IPv6 sources.
850 (remote_prepare): Handle IPv6-style hostnames; implement
851 support for IPv6 connections.
852 (remote_open): Implement support for printing connections from
853 IPv6 sources.
854
8552018-07-11 Pedro Alves <palves@redhat.com>
856
857 PR gdb/23377
858 * mem-break.c (any_persistent_commands): Add process_info
859 parameter and use it instead of relying on the current process.
860 Change return type to bool.
861 * mem-break.h (any_persistent_commands): Add process_info
862 parameter and change return type to bool.
863 * server.c (handle_detach): Remove require_running_or_return call.
864 Look up the process_info for the process we're about to detach.
865 If not found, return back error to GDB. Adjust
866 any_persistent_commands call to pass down a process pointer.
867
8682018-07-11 Pedro Alves <palves@redhat.com>
869
870 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
871 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
872 instead of collect_register_by_name.
873 * regcache.c (regcache_raw_get_unsigned_by_name): New.
874 * regcache.h (regcache_raw_get_unsigned_by_name): New.
875
8762018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
877 Pedro Alves <palves@redhat.com>
878
879 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
880
8812018-07-03 Tom Tromey <tom@tromey.com>
882
883 * linux-low.c: Update.
884 * lynx-low.c: Update.
885 * mem-break.c: Update.
886 * nto-low.c: Update.
887 * remote-utils.c: Update.
888 * server.c: Update.
889 * spu-low.c: Update.
890 * target.c: Update.
891 * win32-low.c: Update.
892
8932018-07-03 Tom Tromey <tom@tromey.com>
894
895 * server.c: Update.
896
8972018-07-03 Tom Tromey <tom@tromey.com>
898
899 * linux-low.c: Update.
900
9012018-07-03 Tom Tromey <tom@tromey.com>
902
903 * target.c: Update.
904
9052018-07-03 Tom Tromey <tom@tromey.com>
906
907 * linux-low.c: Update.
908 * linux-mips-low.c: Update.
909 * lynx-low.c: Update.
910 * nto-low.c: Update.
911 * remote-utils.c: Update.
912 * server.c: Update.
913 * spu-low.c: Update.
914 * target.c: Update.
915 * thread-db.c: Update.
916
9172018-07-03 Tom Tromey <tom@tromey.com>
918
919 * linux-low.c: Update.
920 * linux-mips-low.c: Update.
921 * lynx-low.c: Update.
922 * mem-break.c: Update.
923 * nto-low.c: Update.
924 * remote-utils.c: Update.
925 * server.c: Update.
926 * spu-low.c: Update.
927 * target.c: Update.
928 * tracepoint.c: Update.
929
9302018-07-03 Tom Tromey <tom@tromey.com>
931
932 * linux-low.c: Update.
933 * linux-ppc-low.c: Update.
934 * linux-x86-low.c: Update.
935 * proc-service.c: Update.
936 * server.c: Update.
937 * spu-low.c: Update.
938 * thread-db.c: Update.
939 * win32-low.c: Update.
940
9412018-07-03 Tom Tromey <tom@tromey.com>
942
943 * linux-low.c: Update.
944 * lynx-low.c: Update.
945 * nto-low.c: Update.
946 * remote-utils.c: Update.
947 * spu-low.c: Update.
948 * thread-db.c: Update.
949 * win32-low.c: Update.
950
9512018-06-29 Joel Brobecker <brobecker@adacore.com>
952
953 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
954 parameter in call to 'amd64_create_target_description'.
955
9562018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
957
958 * x86-tdesc.h: Remove executable permission flag.
959
9602018-06-19 Simon Marchi <simon.marchi@ericsson.com>
961
962 * configure.ac: Remove AC_PREREQ, add missing quoting.
963 * configure: Re-generate.
964 * config.in: Re-generate.
965 * aclocal.m4: Re-generate.
966
9672018-06-18 Simon Marchi <simon.marchi@ericsson.com>
968
969 * tracepoint.h (current_traceframe): Remove declaration.
970
9712018-06-18 Alan Hayward <alan.hayward@arm.com>
972
973 * linux-aarch64-low.c (is_sve_tdesc): New function.
974 (aarch64_sve_regs_copy_to_regcache): Likewise.
975 (aarch64_sve_regs_copy_from_regcache): Likewise.
976 (aarch64_regs_info): Add SVE checks.
977 (initialize_low_arch): Initialize SVE.
978
9792018-06-18 Alan Hayward <alan.hayward@arm.com>
980
981 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
982
9832018-06-11 Alan Hayward <alan.hayward@arm.com>
984
985 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
986 (initialize_low_tracepoint): Likewise
987 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
988 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
989 param.
990 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
991 checks.
992 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
993
9942018-06-11 Alan Hayward <alan.hayward@arm.com>
995
996 * server.h (PBUFSIZ): Increase size
997
9982018-06-11 Alan Hayward <alan.hayward@arm.com>
999
1000 * regcache.c (regcache::raw_compare): New function.
1001 * regcache.h (regcache::raw_compare): New declaration.
1002
10032018-06-11 Alan Hayward <alan.hayward@arm.com>
1004
1005 * regcache.c (new_register_cache): Use new.
1006 (free_register_cache): Use delete.
1007 (register_data): Use const.
1008 (supply_register): Move body inside regcache.
1009 (regcache::raw_supply): New override function.
1010 (collect_register): Move body inside regcache.
1011 (regcache::raw_collect): New override function.
1012 (regcache::get_register_status): New override function.
1013 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1014
10152018-06-09 Tom Tromey <tom@tromey.com>
1016
1017 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1018 declare queue.
1019 (event_queue): Use std::queue.
1020 (gdb_event_xfree): Remove.
1021 (initialize_event_loop, process_event, wait_for_event): Update.
1022
10232018-06-08 Stan Cox <scox@redhat.com>
1024
1025 * win32-low.c (win32_create_inferior): last_ptid and last_status
1026 moved to client_state.
1027
10282018-06-08 Pedro Alves <palves@redhat.com>
1029
1030 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1031 common/common-exceptions.o, common/common-utils.o,
1032 common/errors.o, common/print-utils.o and utils.o.
1033 * gdbreplay.c: Include "common-defs.h" instead of the two
1034 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1035 string.h or alloca.h.
1036 (perror_with_name): Delete.
1037 (remote_open): Use xstrdup instead of strdup.
1038 (main): Rename to ...
1039 (captured_main): ... this.
1040 (main): New.
1041
10422018-06-08 Tom Tromey <tom@tromey.com>
1043
1044 * linux-low.c (linux_low_read_btrace): Update.
1045
10462018-06-04 Stan Cox <scox@redhat.com>
1047
1048 * server.h (struct client_state): New.
1049 * server.c (cont_thread, general_thread, multi_process)
1050 (report_fork_events, report_vfork_events, report_exec_events)
1051 (report_thread_events, swbreak_feature, hwbreak_feature)
1052 (vCont_supported, disable_randomization, pass_signals)
1053 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1054 Moved to client_state.
1055 * remote-utils.c (remote_debug, noack_mode)
1056 (transport_is_reliable): Moved to client_state.
1057 * tracepoint.c (current_traceframe): Moved to client_state.
1058
1059 Update all callers.
1060 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1061 linux-low.c, remote-utils.h, target.c: Use client_state.
1062
10632018-05-31 Alan Hayward <alan.hayward@arm.com>
1064
1065 * configure.srv: Add new c/h file.
1066
10672018-05-31 Alan Hayward <alan.hayward@arm.com>
1068
1069 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1070 null VQ.
1071
10722018-05-25 Maciej W. Rozycki <macro@mips.com>
1073
1074 * gdb.arch/mips-fpregset-core.exp: New test.
1075 * gdb.arch/mips-fpregset-core.c: New test source.
1076
10772018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1078
1079 PR server/23198
1080 * hostio.c (require_int): Do not report overflow for integers
1081 between 0xfffffff and 0x7fffffff.
1082
10832018-05-22 Maciej W. Rozycki <macro@mips.com>
1084
1085 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1086 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1087 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1088 functions.
1089 (the_low_target): Wire them.
1090
10912018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1092
1093 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1094 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1095 mode. Call collect_register_by_name with vscr using
1096 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1097 (ppc_store_vrregset): Add and set vscr_offset variable as in
1098 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1099 vscr_offset.
1100
11012018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1102
1103 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1104 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1105 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1106
11072018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1108
1109 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1110 (ppc_store_vsxregset): Likewise.
1111 (ppc_fill_vrregset): Likewise.
1112 (ppc_store_vrregset): Likewise.
1113 (ppc_fill_evrregset): Likewise.
1114 (ppc_store_evrregset): Likewise.
1115 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1116 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1117 needed.
1118
11192018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1120
1121 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1122 wordsize of the inferior. Call ppc_linux_target_wordsize.
1123
11242018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1125
1126 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1127 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1128 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1129 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1130 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1131 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1132 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1133 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1134 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1135 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1136 (tdesc_powerpc_e500l): Remove.
1137 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1138 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1139 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1140 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1141 linux-ppc-tdesc.h.
1142 (ppc_arch_setup): Remove target description matching code. Fill a
1143 ppc_linux_features struct and call ppc_linux_match_description
1144 with it.
1145
11462018-05-22 Maciej W. Rozycki <macro@mips.com>
1147
1148 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1149 width of the requested register exceeds the width of the
1150 `ptrace' data type.
1151 (mips_cannot_store_register): Likewise.
1152
11532018-05-21 Maciej W. Rozycki <macro@mips.com>
1154
1155 * linux-mips-low.c (mips_fetch_register): New function. Update
1156 preceding comment.
1157 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1158 (the_low_target): Wire `mips_fetch_register'.
1159
11602018-05-10 Joel Brobecker <brobecker@adacore.com>
1161
1162 * lynx-i386-low.c (LYNXOS_178): New macro.
1163 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1164 the layout on LynxOS-178.
1165 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1166 handle floating point registers that are not supported by
1167 LynxOS-178.
1168
11692018-05-10 Tom Tromey <tom@tromey.com>
1170
1171 * configure: Rebuild.
1172
11732018-05-10 Joel Brobecker <brobecker@adacore.com>
1174
1175 PR server/23158:
1176 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1177 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1178 Use it to set the expedite_regs field in the given tdesc.
1179 * x86-tdesc.h: New file.
1180 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1181 Adjust following the addition of the new expedite_regs parameter
1182 to init_target_desc.
1183 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1184 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1185 (i386_linux_read_description, amd64_linux_read_description):
1186 Adjust following the addition of the new expedite_regs parameter
1187 to init_target_desc.
1188 * lynx-i386-low.c: #include "x86-tdesc.h".
1189 (lynx_i386_arch_setup): Adjust following the addition of the new
1190 expedite_regs parameter to init_target_desc.
1191 * nto-x86-low.c: #include "x86-tdesc.h".
1192 (nto_x86_arch_setup): Adjust following the addition of the new
1193 expedite_regs parameter to init_target_desc.
1194 * win32-i386-low.c: #include "x86-tdesc.h".
1195 (i386_arch_setup): Adjust following the addition of the new
1196 expedite_regs parameter to init_target_desc.
1197
11982018-05-10 Joel Brobecker <brobecker@adacore.com>
1199
1200 PR server/23158:
1201 * win32-low.c (win32_create_inferior): Add call to my_wait
1202 setting last_status global.
1203
12042018-05-10 Joel Brobecker <brobecker@adacore.com>
1205
1206 PR server/23158:
1207 * win32-low.c (create_process): Only call gdb_tilde_expand if
1208 inferior_cwd is not NULL.
1209
12102018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1211
1212 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1213 registers to the cache if their values have changed.
1214 (i387_xsave_to_cache): Provide default values for x87 control
1215 registers when these features are available, but disabled.
1216 * regcache.c (supply_register_by_name_zeroed): New function.
1217 * regcache.h (supply_register_by_name_zeroed): Declare new
1218 function.
1219
12202018-05-07 Tom Tromey <tom@tromey.com>
1221
1222 * configure: Rebuild.
1223
12242018-05-04 Tom Tromey <tom@tromey.com>
1225
1226 * configure: Rebuild.
1227
12282018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1229 Pedro Alves <palves@redhat.com>
1230
1231 * linux-aarch64-low.c (aarch64_stopped_data_address):
1232 Likewise.
1233
12342018-04-27 Tom Tromey <tom@tromey.com>
1235
1236 * configure: Rebuild.
1237
12382018-04-23 Tom Tromey <tom@tromey.com>
1239
1240 * configure: Rebuild.
1241
12422018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1243
1244 * Makefile.in (depcomp): Add "..".
1245 (all_deps_files): New and use it.
1246
12472018-04-18 Alan Hayward <alan.hayward@arm.com>
1248
1249 * configure.srv (aarch64*-*-linux*): Don't include xml.
1250 (i[34567]86-*-cygwin*): Likewise.
1251 (i[34567]86-*-linux*): Likewise.
1252 (i[34567]86-*-lynxos*): Likewise.
1253 (i[34567]86-*-mingw32ce*): Likewise.
1254 (i[34567]86-*-mingw*): Likewise.
1255 (i[34567]86-*-nto*): Likewise.
1256 (tic6x-*-uclinux): Likewise.
1257 (x86_64-*-linux*): Likewise.
1258 (x86_64-*-mingw*): Likewise.
1259 (x86_64-*-cygwin*): Likewise.
1260
12612018-04-18 Alan Hayward <alan.hayward@arm.com>
1262
1263 * tdesc.c: Remove xml parameter.
1264
12652018-04-18 Alan Hayward <alan.hayward@arm.com>
1266
1267 * server.c (get_features_xml): Remove cast.
1268 * tdesc.c (void target_desc::accept): Fill in function.
1269 (tdesc_get_features_xml): Remove old xml creation.
1270 (print_xml_feature::visit_pre): Add xml vistor.
1271 * tdesc.h (struct target_desc): Make xmltarget mutable.
1272 (tdesc_get_features_xml): Remove declaration.
1273
12742018-04-18 Alan Hayward <alan.hayward@arm.com>
1275
1276 * tdesc.c (tdesc_architecture_name): Add new function.
1277 (tdesc_osabi_name): Likewise.
1278 (tdesc_get_features_xml): Use new functions.
1279
12802018-04-18 Alan Hayward <alan.hayward@arm.com>
1281
1282 * tdesc.c (tdesc_create_flags): Remove.
1283 (tdesc_add_flag): Likewise.
1284 (tdesc_named_type): Likewise.
1285 (tdesc_create_union): Likewise.
1286 (tdesc_create_struct): Likewise.
1287 (tdesc_create_vector): Likewise.
1288 (tdesc_add_bitfield): Likewise.
1289 (tdesc_add_field): Likewise.
1290 (tdesc_set_struct_size): Likewise.
1291
12922018-04-18 Alan Hayward <alan.hayward@arm.com>
1293
1294 * tdesc.c (~target_desc): Remove implictly deleted items.
1295 (init_target_desc): Iterate all features.
1296 (tdesc_get_features_xml): Use vector.
1297 (tdesc_create_feature): Create feature.
1298 * tdesc.h (tdesc_feature) Remove
1299 (target_desc): Add features.
1300
13012018-04-18 Alan Hayward <alan.hayward@arm.com>
1302
1303 * Makefile.in: Add common/tdesc.c
1304 * tdesc.c (init_target_desc): init all reg_defs from register
1305 vector.
1306 (tdesc_create_reg): Create tdesc_reg.
1307 * tdesc.h (tdesc_feature): Add register vector.
1308
13092018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1310
1311 * tdesc.h (struct target_desc) <features>: Change type to
1312 std::vector<std::string>.
1313 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1314 changes.
1315 (tdesc_get_features_xml): Likewise.
1316 (tdesc_create_feature): Likewise.
1317
13182018-03-26 Alan Hayward <alan.hayward@arm.com>
1319
1320 * regcache.c (find_register_by_number): Return a ref.
1321 (find_regno): Use references.
1322 (register_size): Likewise.
1323 (register_data): Likewise.
1324 * tdesc.c (target_desc::~target_desc): Remove free calls.
1325 (target_desc::operator==): Use std::vector compare.
1326 (init_target_desc): Use reference.
1327 (tdesc_create_reg): Use reg constructors.
1328 * tdesc.h (struct target_desc): Replace pointer with object.
1329
13302018-03-23 Alan Hayward <alan.hayward@arm.com>
1331
1332 * regcache.c (find_register_by_number): Make static.
1333 (find_regno): Use find_register_by_number
1334 * regcache.h (struct reg): Remove declaration.
1335
13362018-03-23 Alan Hayward <alan.hayward@arm.com>
1337
1338 * tdesc.c (target_desc::~target_desc): Move to here.
1339 (target_desc::operator==): Likewise.
1340 * tdesc.h (target_desc::~target_desc): Move from here.
1341 (target_desc::operator==): Likewise.
1342
13432018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1344
1345 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1346
13472018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1348
1349 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1350 S390_TDESC_GS.
1351 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1352 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1353 and init_registers_s390_gs_linux64.
1354
13552018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1356
1357 * linux-s390-low.c (s390_fill_gs): Remove function.
1358 (s390_fill_gsbc): Remove function.
1359 (s390_regsets): Set fill functions for the guarded storage regsets
1360 to NULL.
1361
13622018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1363
1364 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1365 the word size. Add comment.
1366 (s390_get_wordsize): New function.
1367 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1368 pswm with it. Instead, use s390_get_wordsize to determine the
1369 word size first and derive the correct tdesc from that directly.
1370
13712018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1372
1373 * Makefile.in: Include silent-rules.mk.
1374 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1375 (COMPILE): Add ECHO_CXX.
1376 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1377 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1378 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1379 (version-generated.c): Add ECHO_GEN.
1380 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1381 (IPAGENT_COMPILE): Add ECHO_CXX.
1382 (%-generated.c): Add ECHO_REGDAT.
1383
13842018-03-14 Tom Tromey <tom@tromey.com>
1385
1386 PR cli/14977:
1387 * ax.c (ax_printf): Special case for NULL.
1388
13892018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1390
1391 * linux-low.c (linux_qxfer_libraries_svr4): Use
1392 xml_escape_text_append.
1393
13942018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1395
1396 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1397
13982018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1399
1400 * server.c (handle_general_set): Remove unnecessary xstrdup.
1401
14022018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1403
1404 * server.c (parse_debug_format_options): Adjust to
1405 delim_string_to_char_ptr_vec changes.
1406 * thread-db.c (thread_db_load_search): Adjust to
1407 dirnames_to_char_ptr_vec changes.
1408
14092018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1410
1411 * target.h (target_enable_btrace, target_disable_btrace)
1412 (target_read_btrace, target_read_btrace_conf): Turn macro into
1413 inline function. Throw error if target method is not defined.
1414 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1415 check for btrace target method. Be prepared to handle exceptions
1416 from btrace target methods.
1417
14182018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1419
1420 * server.c (captured_main): Change order of error message printed
1421 when the current working directory cannot be found.
1422
14232018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1424
1425 * server.c: Include "filenames.h" and "pathstuff.h".
1426 (program_name): Delete variable.
1427 (program_path): New anonymous class.
1428 (get_exec_wrapper): Use "program_path" instead of
1429 "program_name".
1430 (handle_v_run): Likewise.
1431 (captured_main): Likewise.
1432 (process_serial_event): Likewise.
1433
14342018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1435
1436 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1437 (OBJS): Add "pathstuff.o".
1438 * server.c (current_directory): New global variable.
1439 (captured_main): Initialize "current_directory".
1440
14412018-02-26 Alan Hayward <alan.hayward@arm.com>
1442
1443 * tdesc.c: Use common/tdesc.h.
1444 * tdesc.h: Likewise.
1445
14462018-02-20 Alan Hayward <alan.hayward@arm.com>
1447 Simon Marchi <simon.marchi@ericsson.com>
1448
1449 * Makefile.in: Switch order of make rules.
1450
14512018-02-19 Alan Hayward <alan.hayward@arm.com>
1452
1453 * Makefile.in: Add common directory in build.
1454 * configure.ac: Add common reference.
1455 * configure: Regenerate.
1456
14572018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1458
1459 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1460 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1461 * spu-low.c (spu_target_ops): Likewise.
1462 * win32-low.c (win32_target_ops): Likewise.
1463 * server.c (supported_btrace_packets): Report packets unconditionally.
1464 * target.h (target_ops) <supports_btrace>: Remove.
1465 (target_supports_btrace): Remove.
1466
14672018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1468
1469 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1470 (handle_btrace_disable): Change return type to void. Use exceptions
1471 to report errors.
1472 (handle_btrace_general_set): Catch exception and copy message to
1473 return message.
1474
14752018-02-08 Tom Tromey <tom@tromey.com>
1476
1477 * linux-low.c (install_software_single_step_breakpoints): Use
1478 make_scoped_restore.
1479 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1480 (do_restore_current_thread_cleanup): Remove.
1481 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1482 declare.
1483
14842018-02-08 Tom Tromey <tom@tromey.com>
1485
1486 * mem-break.c (set_raw_breakpoint_at): Use
1487 gdb::unique_xmalloc_ptr.
1488
14892018-01-30 Pedro Alves <palves@redhat.com>
1490
1491 PR gdb/13211
1492 * target.c (target_terminal::terminal_state): Rename to ...
1493 (target_terminal::m_terminal_state): ... this.
1494
14952018-01-19 James Clarke <jrtc27@jrtc27.com>
1496
1497 * linux-low.c (handle_extended_wait): Surround call to
1498 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1499
15002018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1501
1502 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1503 linux_ptrace_attach_fail_reason_string now returning an
1504 std::string.
1505 (linux_attach): Likewise.
1506 * thread-db.c (attach_thread): Likewise.
1507
15082018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1509
1510 PR gdb/21559
1511 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1512 checking for fs_base/gs_base fields in struct user_regs_struct.
1513 * configure: Regenerate.
1514
15152018-01-16 Yao Qi <yao.qi@linaro.org>
1516
1517 PR gdb/18749
1518 * linux-low.c (fetch_register): Call supply_register instead of
1519 error.
1520
15212018-01-08 Yao Qi <yao.qi@linaro.org>
1522 Simon Marchi <simon.marchi@ericsson.com>
1523
1524 * Makefile.in (OBS): Remove selftest.o.
1525 * configure.ac: Set srv_selftest_objs if $development is true.
1526 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1527 * configure: Re-generated.
1528 * server.c (captured_main): Wrap variable selftest_filter with
1529 GDB_SELF_TEST.
1530
15312018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1532
1533 * server.c (parse_debug_format_options): Return std::string.
1534 (handle_monitor_command, captured_main): Adjust.
1535
15362018-01-05 Pedro Alves <palves@redhat.com>
1537
1538 PR gdb/18653
1539 * server.c (captured_main): Pass quiet=false to
1540 save_original_signals_state.
1541
15422018-01-01 Joel Brobecker <brobecker@adacore.com>
1543
1544 * gdbreplay.c (gdbreplay_version): Update copyright year in
1545 version message.
1546 * server.c (gdbserver_version): Likewise.
1547
15482017-12-08 Tom Tromey <tom@tromey.com>
1549
1550 * ax.c (ax_printf): Update.
1551
15522017-12-07 Yao Qi <yao.qi@linaro.org>
1553
1554 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1555 aarch64_linux_read_description.
1556 * linux-amd64-ipa.c (idx2mask): New array.
1557 (get_ipa_tdesc): Move idx2mask out.
1558 (initialize_low_tracepoint): Initialize target descriptions.
1559 * linux-i386-ipa.c (idx2mask): New array.
1560 (get_ipa_tdesc): Move idx2mask out.
1561 (initialize_low_tracepoint): Initialize target descriptions.
1562
15632017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1564
1565 * tdesc.c (struct tdesc_type): Change return type.
1566 (tdesc_add_flag): Change parameter type.
1567 (tdesc_add_bitfield): Likewise.
1568 (tdesc_add_field): Likewise.
1569 (tdesc_set_struct_size): Likewise.
1570
15712017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1572
1573 * regcache.c (registers_to_string): Remove unused variable.
1574
15752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1576
1577 * inferiors.c (for_each_inferior_with_data): Remove.
1578 * inferiors.h (for_each_inferior_with_data): Remove.
1579 * server.c (handle_qxfer_threads_worker): Change parameter type.
1580 (handle_qxfer_threads_proper): Use for_each_thread.
1581
15822017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1583
1584 * inferiors.c (for_each_inferior): Remove.
1585 (clear_inferiors): Use for_each_thread.
1586 * inferiors.h (for_each_inferior): Remove.
1587 * linux-low.c (linux_wait_for_event_filtered): Use
1588 for_each_thread.
1589 (linux_stabilize_threads): Likewise.
1590 * regcache.c (regcache_release): Likewise.
1591 * server.c (gdb_wants_all_threads_stopped): Likewise.
1592 (clear_pending_status_callback): Remove.
1593 (handle_status): Use for_each_thread.
1594 (captured_main): Likewise.
1595 * win32-low.c (child_init_thread_list): Likewise.
1596 (win32_clear_inferiors): Likewise.
1597 (fake_breakpoint_event): Likewise.
1598
15992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1600
1601 * inferiors.h (find_inferior): Remove.
1602 * inferiors.c (find_inferior): Remove.
1603
16042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1605
1606 * linux-low.c (resume_status_pending_p): Update comment.
1607 (need_step_over_p): Update comment.
1608
16092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1610
1611 * linux-low.c (proceed_one_lwp): Return void, change parameter
1612 type.
1613 (unsuspend_and_proceed_one_lwp): Likewise.
1614 (proceed_all_lwps): Use for_each_thread.
1615 (unstop_all_lwps): Likewise.
1616
16172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1618
1619 * linux-low.c (linux_resume_one_thread): Return void, take
1620 parameter directly.
1621 (linux_resume): Use for_each_thread.
1622
16232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1624
1625 * linux-low.c (send_sigstop_callback): Return void, change
1626 parameter type. Rename to...
1627 (send_sigstop): ... this.
1628 (suspend_and_send_sigstop_callback): Return void, change parameter
1629 type. Rename to...
1630 (suspend_and_send_sigstop): ... this.
1631 (stop_all_lwps): Use for_each_thread.
1632
16332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1634
1635 * linux-low.c (lwp_running): Return bool, remove unused
1636 argument.
1637 (linux_stabilize_threads): Use find_thread.
1638
16392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1640
1641 * linux-low.c (select_singlestep_lwp_callback): Remove.
1642 (count_events_callback): Remove.
1643 (select_event_lwp_callback): Remove.
1644 (select_event_lwp): Use find_thread/for_each_thread.
1645
16462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1647
1648 * linux-low.c (not_stopped_callback): Return bool, take filter
1649 argument directly.
1650 (linux_wait_for_event_filtered): Use find_thread.
1651 (linux_wait_1): Likewise.
1652
16532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1654
1655 * linux-low.c (same_lwp): Remove.
1656 (find_lwp_pid): Use find_thread.
1657
16582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1659
1660 * linux-low.c (delete_lwp_callback): Remove.
1661 (linux_mourn): Use for_each_thread.
1662
16632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1664
1665 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1666 args parameter, don't check for pid.
1667 (linux_detach): Use for_each_thread.
1668
16692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1670
1671 * linux-low.c (struct counter): Remove.
1672 (second_thread_of_pid_p): Remove.
1673 (last_thread_of_process_p): Use find_thread.
1674
16752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1676
1677 * inferiors.c (find_inferior_in_random): Remove.
1678 * inferiors.h (find_inferior_in_random): Remove.
1679 * linux-low.c (status_pending_p_callback): Return bool, accept
1680 parameter ptid directly.
1681 (linux_wait_for_event_filtered): Use find_thread_in_random.
1682 (linux_wait_1): Likewise.
1683
16842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1685
1686 * inferiors.c (find_inferior_id): Remove.
1687 (find_thread_ptid): Move implemention from find_inferior_id to
1688 here.
1689 * inferiors.h (find_inferior_id): Remove.
1690 * server.c (handle_status): Use find_thread_ptid.
1691 (process_serial_event): Likewise.
1692 * thread-db.c (find_one_thread): Likewise.
1693 (thread_db_thread_handle): Likewise.
1694 * win32-low.c (thread_rec): Likewise.
1695 (child_delete_thread): Likewise.
1696 (win32_thread_alive): Likewise.
1697 (get_child_debug_event): Likewise.
1698
16992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1700
1701 * linux-mips-low.c (update_watch_registers_callback): Return
1702 void, remove pid_p parameter, don't check for pid.
1703 (mips_insert_point, mips_remove_point): Use for_each_thread.
1704
17052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1706
1707 * lynx.low (lynx_delete_thread_callback): Remove.
1708 (lynx_mourn): Use for_each_thread.
1709
17102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1711
1712 * regcache.c (regcache_invalidate_one): Remove.
1713 (regcache_invalidate_pid): use for_each_thread.
1714
17152017-11-26 Tom Tromey <tom@tromey.com>
1716
1717 * linux-low.c (linux_create_inferior): Update.
1718
17192017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1720
1721 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1722
17232017-11-24 Alan Hayward <alan.hayward@arm.com>
1724
1725 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1726 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1727 * linux-aarch64-tdesc-selftest.c: New file.
1728 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1729
17302017-11-24 Alan Hayward <alan.hayward@arm.com>
1731
1732 * configure.srv: Add new file.
1733 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1734 * linux-aarch64-tdesc-selftest.c: New file.
1735 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1736
17372017-11-24 Alan Hayward <alan.hayward@arm.com>
1738
1739 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1740 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1741 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1742
17432017-11-24 Alan Hayward <alan.hayward@arm.com>
1744
1745 * configure.srv: Add new files.
1746 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1747 aarch64_linux_read_description.
1748 * linux-aarch64-low.c (aarch64_linux_read_description):
1749 Merge with aarch64_arch_setup.
1750 (aarch64_arch_setup): Call aarch64_linux_read_description.
1751 * linux-aarch64-tdesc.c: New file.
1752 * linux-aarch64-tdesc.h: New file.
1753
17542017-11-24 Yao Qi <yao.qi@linaro.org>
1755
1756 * configure.srv: Set $srv_regobj for tic6x-linux.
1757 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1758 (tic6x_read_description): Move some code to tic6x_arch_setup.
1759 (tic6x_tdesc_test): New function.
1760 (initialize_low_arch): Call selftests::register_test.
1761
17622017-11-22 Yao Qi <yao.qi@linaro.org>
1763
1764 * remote-utils.c (prepare_resume_reply): Use memcpy.
1765
17662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1767
1768 * linux-low.c (kill_one_lwp_callback): Return void, take
1769 argument directly, don't filter on pid.
1770 (linux_kill): Use for_each_thread.
1771
17722017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1773
1774 * linux-low.c (need_step_over_p): Return bool, remove dummy
1775 argument.
1776 (linux_resume, proceed_all_lwps): Use find_thread.
1777
17782017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1779
1780 * linux-low.c (resume_status_pending_p): Return bool, remove
1781 flag_p argument.
1782 (linux_resume): Use find_thread.
1783
17842017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1785
1786 * linux-low.c (struct thread_resume_array): Remove.
1787 (linux_set_resume_request): Return void, take arguments
1788 directly.
1789 (linux_resume): Use for_each_thread.
1790
17912017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1792
1793 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1794 return bool, remove data argument.
1795 (linux_stabilize_threads): Use find_thread.
1796
17972017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1798
1799 * linux-low.c (unsuspend_one_lwp): Remove.
1800 (unsuspend_all_lwps): Use for_each_thread, inline code from
1801 unsuspend_one_lwp.
1802
18032017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1804
1805 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1806 * linux-low.c (struct iterate_over_lwps_args): Remove.
1807 (iterate_over_lwps_filter): Remove.
1808 (iterate_over_lwps): Use find_thread.
1809
18102017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1811
1812 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1813 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1814 code from reset_lwp_ptrace_options_callback.
1815
18162017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1817
1818 * linux-arm-low.c (struct update_registers_data): Remove.
1819 (update_registers_callback): Return void, take arguments
1820 directly, don't check thread's pid.
1821 (arm_insert_point, arm_remove_point): Use for_each_thread.
1822
18232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1824
1825 * win32-low.c (continue_one_thread): Return void, take argument
1826 directly.
1827 (child_continue): Use for_each_thread.
1828
18292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1830
1831 * win32-i386-low.c (update_debug_registers_callback): Rename
1832 to ...
1833 (update_debug_registers): ... this, return void, remove pid_p arg.
1834 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1835
18362017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1837
1838 * inferiors.h (struct process_info): Add constructor, initialize
1839 fields..
1840 <syscalls_to_catch>: Change type to std::vector<int>.
1841 * inferiors.c (add_process): Allocate process_info with new.
1842 (remove_process): Free process_info with delete.
1843 * linux-low.c (handle_extended_wait): Adjust.
1844 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1845 * server.c (handle_general_set): Adjust.
1846
18472017-11-16 Pedro Alves <palves@redhat.com>
1848
1849 * remote-utils.c (remote_close): Block SIGIO signals instead of
1850 uninstalling the SIGIO handler.
1851
18522017-11-16 Alan Hayward <alan.hayward@arm.com>
1853
1854 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1855
18562017-11-16 Yao Qi <yao.qi@linaro.org>
1857
1858 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1859 (tic6x_store_gregset): Likewise.
1860 (tic6x_usrregs_info): Move it up.
1861
18622017-11-15 Alan Hayward <alan.hayward@arm.com>
1863
1864 * Makefile.in: Update arch rules.
1865 * configure.srv: Explicitly mark arch/ files.
1866
18672017-11-13 Andreas Schwab <schwab@suse.de>
1868
1869 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1870 function.
1871 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1872
18732017-11-06 Pedro Alves <palves@redhat.com>
1874
1875 * config.in, configure: Regenerate.
1876
18772017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1878
1879 * target.c (struct thread_search): Remove.
1880 (thread_search_callback): Remove.
1881 (prepare_to_access_memory): Use for_each_thread instead of
1882 find_inferior. Inline code from thread_search_callback.
1883
18842017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1885
1886 * server.c (struct visit_actioned_threads_data): Remove.
1887 (visit_actioned_threads): Change prototype to take arguments
1888 directly.
1889 (resume): Use find_thread instead of find_inferior.
1890
18912017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1892
1893 * server.c (queue_stop_reply_callback): Change prototype, return
1894 void.
1895 (find_status_pending_thread_callback): Remove.
1896 (handle_status): Replace find_inferior with find_thread and
1897 for_each_thread.
1898
18992017-10-25 Alan Hayward <alan.hayward@arm.com>
1900
1901 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1902 with REGNO.
1903 (aarch64_store_gregset): Likewise.
1904 (aarch64_fill_fpregset): Likewise.
1905 (aarch64_store_fpregset): Likewise.
1906
19072017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1908
1909 * gdbthread.h (find_thread, for_each_thread): New functions.
1910 * inferiors.c (thread_of_pid): Remove.
1911 (find_any_thread_of_pid): Use find_thread.
1912 * linux-low.c (num_lwps): Use for_each_thread.
1913
19142017-10-17 Yao Qi <yao.qi@linaro.org>
1915
1916 * Makefile.in: Remove one rule.
1917 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1918
19192017-10-17 Yao Qi <yao.qi@linaro.org>
1920
1921 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1922 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1923
19242017-10-17 Yao Qi <yao.qi@linaro.org>
1925
1926 * configure.srv: Rename arm.o with arch/arm.o.
1927
19282017-10-17 Yao Qi <yao.qi@linaro.org>
1929
1930 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1931 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1932 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1933 (arch-i386.o, arch-amd64.o): Remove rules.
1934 (arch/%.o): New rule.
1935 Update POSTCOMPILE and COMPILE.pre.
1936 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1937 * configure: Re-generated.
1938 * configure.srv: Replace arch-i386.o with arch/i386.o.
1939 Replace arch-amd64.o with arch/amd64.o.
1940
19412017-10-16 Yao Qi <yao.qi@linaro.org>
1942
1943 * configure: Regenerated.
1944
19452017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1946
1947 * inferiors.h: (struct inferior_list): Remove.
1948 (struct inferior_list_entry); Remove.
1949 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1950 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1951 get_first_inferior): Remove.
1952 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1953 find_inferior_id, find_inferior_in_random): Change signature.
1954 * inferiors.c (all_threads): Change type to
1955 std::list<thread_info *>.
1956 (get_thread): Remove macro.
1957 (find_inferior, find_inferior_id): Change signature, implement
1958 using find_thread.
1959 (find_inferior_in_random): Change signature, implement using
1960 find_thread_in_random.
1961 (for_each_inferior, for_each_inferior_with_data): Change
1962 signature, implement using for_each_thread.
1963 (add_inferior_to_list, remove_inferior): Remove.
1964 (add_thread, get_first_thread, thread_of_pid,
1965 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1966 (get_first_inferior, one_inferior_p, clear_inferior_list):
1967 Remove.
1968 (clear_inferiors, get_thread_process): Update.
1969 * gdbthread.h: Include <list>.
1970 (struct thread_info) <entry>: Remove field.
1971 <id>: New field.
1972 (all_threads): Change type to std::list<thread_info *>.
1973 (get_first_inferior): Add doc.
1974 (find_thread, for_each_thread, find_thread_in_random): New
1975 functions.
1976 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1977 * linux-arm-low.c (update_registers_callback): Update.
1978 * linux-low.c (second_thread_of_pid_p): Update.
1979 (kill_one_lwp_callback, linux_detach_lwp_callback,
1980 delete_lwp_callback, status_pending_p_callback, same_lwp,
1981 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1982 iterate_over_lwps, not_stopped_callback,
1983 resume_stopped_resumed_lwps, count_events_callback,
1984 select_singlestep_lwp_callback, select_event_lwp_callback,
1985 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1986 suspend_and_send_sigstop_callback, wait_for_sigstop,
1987 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1988 lwp_running, linux_set_resume_request, resume_status_pending_p,
1989 need_step_over_p, start_step_over, linux_resume_one_thread,
1990 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1991 reset_lwp_ptrace_options_callback): Update.
1992 * linux-mips-low.c (update_watch_registers_callback): Update.
1993 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1994 Update.
1995 (free_register_cache_thread_one): Remove.
1996 (regcache_release): Update.
1997 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1998 handle_qxfer_threads_worker): Update.
1999 (handle_query): Update, use list iterator.
2000 (visit_actioned_threads, handle_pending_status,
2001 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2002 clear_pending_status_callback, set_pending_status_callback,
2003 find_status_pending_thread_callback, handle_status,
2004 process_serial_event): Update.
2005 * target.c (thread_search_callback): Update.
2006 * thread-db.c (thread_db_get_tls_address): Update.
2007 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2008 Update.
2009 * win32-i386-low.c (update_debug_registers_callback): Update.
2010 * win32-low.c (delete_thread_info, child_delete_thread,
2011 continue_one_thread, suspend_one_thread,
2012 get_child_debug_event): Adjust.
2013
20142017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2015
2016 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2017 * inferiors.h: Include <list>.
2018 (struct process_info) <entry>: Remove field.
2019 <pid>: New field.
2020 (pid_of): Change macro to function.
2021 (ptid_of, lwpid_of): Remove macro.
2022 (all_processes): Change type to std::list<process_info *>.
2023 (ALL_PROCESSES): Remove macro.
2024 (for_each_process, find_process): New function.
2025 * inferiors.c (all_processes): Change type to
2026 std::list<process_info *>.
2027 (find_thread_process): Adjust.
2028 (add_process): Likewise.
2029 (remove_process): Likewise.
2030 (find_process_pid): Likewise.
2031 (get_first_process): Likewise.
2032 (started_inferior_callback): Remove.
2033 (have_started_inferiors_p): Adjust.
2034 (attached_inferior_callback): Remove.
2035 (have_attached_inferiors_p): Adjust.
2036 * linux-low.c (check_zombie_leaders): Likewise.
2037 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2038 (x86_linux_update_xmltarget): Adjust.
2039 * server.c (handle_query): Likewise.
2040 (gdb_reattached_process): Remove.
2041 (handle_status): Adjust.
2042 (kill_inferior_callback): Likewise.
2043 (detach_or_kill_inferior): Remove.
2044 (print_started_pid): Likewise.
2045 (print_attached_pid): Likewise.
2046 (detach_or_kill_for_exit): Update.
2047 (process_serial_event): Likewise.
2048 * linux-arm-low.c (arm_new_fork): Likewise.
2049
20502017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2051
2052 * dll.h: Include <list>.
2053 (struct dll_info): Add constructor.
2054 <entry>: Remove field.
2055 (all_dlls): Change type to std::list<dll_info>.
2056 * dll.c: Include <algorithm>.
2057 (get_dll): Remove macro.
2058 (all_dlls): Change type to std::list<dll_info *>.
2059 (free_one_dll): Remove.
2060 (match_dll): Likewise.
2061 (loaded_dll): Adjust.
2062 (unloaded_dll): Adjust to all_dlls type change, use
2063 std::find_if. Inline code from match_dll.
2064 (clear_dlls): Adjust to all_dlls type change.
2065 * server.c (emit_dll_description): Remove.
2066 (handle_qxfer_libraries): Adjust to all_dlls type change,
2067 integrate emit_dll_description's functionality.
2068
20692017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2070
2071 * linux-low.h (struct linux_target_ops) <delete_process>: New
2072 field.
2073 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2074 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2075 (struct linux_target_ops): Add delete_process callback.
2076 * linux-arm-low.c (arm_delete_process): New.
2077 (struct linux_target_ops): Add delete_process callback.
2078 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2079 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2080 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2081 * linux-mips-low.c (mips_linux_delete_process): New.
2082 (struct linux_target_ops): Add delete_process callback.
2083 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2084 * linux-s390-low.c (struct linux_target_ops): Likewise.
2085 * linux-sh-low.c (struct linux_target_ops): Likewise.
2086 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2087 * linux-tile-low.c (struct linux_target_ops): Likewise.
2088 * linux-x86-low.c (x86_linux_delete_process): New.
2089 (struct linux_target_ops): Add delete_process callback.
2090 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2091
20922017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2093
2094 * linux-aarch64-low.c (the_low_target): Add thread delete
2095 callback.
2096 * linux-arm-low.c (arm_delete_thread): New function.
2097 (the_low_target): Add thread delete callback.
2098 * linux-bfin-low.c (the_low_target): Likewise.
2099 * linux-crisv32-low.c (the_low_target): Likewise.
2100 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2101 set.
2102 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2103 field.
2104 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2105 * linux-mips-low.c (mips_linux_delete_thread): New function.
2106 (the_low_target): Add thread delete callback.
2107 * linux-ppc-low.c (the_low_target): Likewise.
2108 * linux-s390-low.c (the_low_target): Likewise.
2109 * linux-sh-low.c (the_low_target): Likewise.
2110 * linux-tic6x-low.c (the_low_target): Likewise.
2111 * linux-tile-low.c (the_low_target): Likewise.
2112 * linux-x86-low.c (the_low_target): Likewise.
2113 * linux-xtensa-low.c (the_low_target): Likewise.
2114
21152017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2116
2117 * win32-low.c: Include "common-inferior.h".
2118
21192017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2120
2121 * inferiors.c (set_inferior_cwd): New function.
2122 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2123 (handle_query): Inform that QSetWorkingDir is supported.
2124 * win32-low.c (create_process): Pass the inferior's cwd to
2125 CreateProcess.
2126
21272017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2128
2129 * inferiors.c (current_inferior_cwd): New global variable.
2130 (get_inferior_cwd): New function.
2131 * inferiors.h (struct process_info) <cwd>: New field.
2132
21332017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2134
2135 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2136 (OBS): Add gdb_tilde_expand.o.
2137
21382017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2139
2140 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2141 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2142
21432017-09-29 Pedro Alves <palves@redhat.com>
2144
2145 * ax.c (gdb_parse_agent_expr): Constify.
2146 * ax.h (gdb_parse_agent_expr): Constify.
2147 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2148 Constify.
2149 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2150 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2151 * remote-utils.h (read_ptid): Constify.
2152 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2153 (process_point_options, process_serial_event): Constify.
2154 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2155 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2156 (cmd_qtbuffer): Constify.
2157
21582017-09-29 Pedro Alves <palves@redhat.com>
2159
2160 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2161 fails.
2162
21632017-09-29 Pedro Alves <palves@redhat.com>
2164
2165 * linux-low.c (handle_extended_wait): Pass parent thread instead
2166 of process to thread_db_notice_clone.
2167 * linux-low.h (thread_db_notice_clone): Replace parent process
2168 parameter with parent thread parameter.
2169 * thread-db.c (find_one_thread): Add comment.
2170 (thread_db_notice_clone): Replace parent process parameter with
2171 parent thread parameter. Temporarily switch to the parent thread.
2172
21732017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2174
2175 * gdbthread.h: Include "common-gdbthread.h".
2176 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2177 "if" when validating the ptid.
2178 * remote-utils.c: Include "gdbthread.h".
2179 (prepare_resume_reply): Use "switch_to_thread".
2180 * target.c (done_accessing_memory): Likewise.
2181
21822017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2183
2184 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2185 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2186 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2187 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2188 s390x-gs-linux64-ipa.o to ipa_obj.
2189 * linux-s390-low.c (HWCAP_S390_GS): New define.
2190 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2191 New functions.
2192 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2193 (s390_arch_setup): Check for guarded-storage support and choose
2194 appropriate tdesc.
2195 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2196 init_registers_s390x_gs_linux64.
2197 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2198 enum value.
2199 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2200 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2201
22022017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2203
2204 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2205
22062017-09-21 Kevin Buettner <kevinb@redhat.com>
2207
2208 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2209 (thread_db_thread_handle): Declare.
2210 * linux-low.c (linux_target_ops): Initialize thread_handle.
2211 * server.c (handle_qxfer_threads_worker): Add support for
2212 "handle" attribute.
2213 * target.h (struct target_ops): Add new function pointer,
2214 thread_handle.
2215 (target_thread_handle): Define.
2216 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2217 field in lwp.
2218 (thread_db_thread_handle): New function.
2219
22202017-09-21 Kevin Buettner <kevinb@redhat.com>
2221
2222 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2223 * linux-low.h (thread_db_notice_clone): Declare.
2224 * thread-db.c (thread_db_notice_clone): New function.
2225
22262017-09-21 Pedro Alves <palves@redhat.com>
2227
2228 * server.c (gdb_read_memory, handle_status, process_serial_event)
2229 (handle_serial_event, handle_target_event): Adjust to
2230 set_desired_thread prototype change.
2231 * target.c (set_desired_thread): Remove 'use_general' parameter
2232 and adjust.
2233 * target.h (set_desired_thread): Remove 'use_general' parameter.
2234
22352017-09-20 Tom Tromey <tom@tromey.com>
2236
2237 * target.c (target_terminal::terminal_state): Define.
2238 (target_terminal::init): Rename from target_terminal_init.
2239 (target_terminal::inferior): Rename from
2240 target_terminal_inferior.
2241 (target_terminal::ours): Rename from target_terminal_ours.
2242 (target_terminal::ours_for_output, target_terminal::info): New.
2243
22442017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2245
2246 * server.c (accumulate_file_name_length): Remove.
2247 (emit_dll_description): Adjust to std::string change.
2248 (handle_qxfer_libraries): Use std::string to hold document.
2249
22502017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2251
2252 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2253 return type of xml_escape_text.
2254 * server.c (emit_dll_description): Likewise.
2255
22562017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2257
2258 * server.c (captured_main): Accept argument for --selftest.
2259 Update run_tests call.
2260 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2261 when registering selftests.
2262
22632017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2264
2265 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2266 instead of "VEC" for "target_desc.reg_defs".
2267 (regcache_cpy): Likewise.
2268 (registers_to_string): Likewise.
2269 (registers_from_string): Likewise.
2270 (find_regno): Likewise.
2271 (supply_regblock): Likewise.
2272 (regcache_raw_read_unsigned): Likewise.
2273 * tdesc.c (init_target_desc): Likewise.
2274 (tdesc_create_reg): Likewise.
2275 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2276 (struct target_desc) <reg_defs>: Convert to "std::vector".
2277 (target_desc): Do not initialize "reg_defs".
2278 (~target_desc): Update code to use "std::vector" instead of "VEC"
2279 for "target_desc.reg_defs".
2280 (operator==): Likewise.
2281
22822017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2283
2284 * inferiors.h (thread_to_gdb_id): Remove.
2285 * inferiors.c (thread_to_gdb_id): Remove.
2286 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2287 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2288 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2289 Likewise.
2290 * nto-low.c (nto_fetch_registers, nto_store_registers,
2291 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2292
22932017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2294
2295 * inferiors.h (gdb_id_to_thread_id): Remove.
2296 * inferiors.c (gdb_id_to_thread_id): Remove.
2297 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2298 removal. Move pid declaration closer to where it's used.
2299
23002017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2301
2302 * server.c (handle_detach): New function.
2303 (process_serial_event): Move code out, call handle_detach.
2304
23052017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2306
2307 * server.c (require_running): Rename to ...
2308 (require_running_or_return): ... this ...
2309 (require_running_or_break): ... and this.
2310 (handle_query, process_serial_event): Adjust.
2311
23122017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2313
2314 * linux-low.c (linux_set_resume_request): Remove unused
2315 variables.
2316
23172017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2318
2319 * server.c (first_thread_of): Remove.
2320 (process_serial_event): Replace usage of first_thread_of with
2321 find_any_thread_of_pid.
2322 * tracepoint.c (same_process_p): Remove.
2323 (gdb_agent_about_to_close): Replace usage of same_process_p with
2324 find_any_thread_of_pid.
2325 * linux-x86-low.c (same_process_callback): Remove.
2326 (x86_arch_setup_process_callback): Replace usage of
2327 same_process_callback with find_any_thread_of_pid.
2328 * thread-db.c (any_thread_of): Remove.
2329 (switch_to_process): Replace usage of any_thread_of with
2330 find_any_thread_of_pid.
2331 * inferiors.c (thread_pid_matches_callback): Remove.
2332 (find_thread_process): Adjust to use find_any_thread_of_pid.
2333
23342017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2335
2336 * regcache.c (get_thread_regcache): Guard calls to "memset"
2337 with "!VEC_empty".
2338
23392017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2340
2341 * linux-low.c (handle_extended_wait): Use
2342 "allocate_target_description" instead of "XNEW".
2343 * linux-x86-low.c (initialize_low_arch): Likewise.
2344
23452017-09-05 Yao Qi <yao.qi@linaro.org>
2346
2347 * configure.srv (srv_i386_regobj): Remove.
2348 (srv_amd64_regobj): Remove.
2349 (srv_regobj): Set it to "" for x86 non-linux targets.
2350 * linux-x86-tdesc.c (i386_linux_read_description):
2351 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2352 (init_registers_i386): Remove the declaration.
2353 (tdesc_i386): Remove the declaration.
2354 (lynx_i386_arch_setup): Call i386_create_target_description.
2355 * nto-x86-low.c: Likewise.
2356 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2357 [!__x86_64__]: include arch/i386.h.
2358 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2359
23602017-09-05 Yao Qi <yao.qi@linaro.org>
2361
2362 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2363 i386/amd64-XXX-linux from it.
2364
23652017-09-05 Yao Qi <yao.qi@linaro.org>
2366
2367 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2368 false.
2369 (ipa_amd64_linux_regobj): Remove.
2370 (ipa_x32_linux_regobj): Remove.
2371
23722017-09-05 Yao Qi <yao.qi@linaro.org>
2373
2374 * Makefile.in (arch-amd64.o): New rule.
2375 * configure.srv: Append arch-amd64.o.
2376 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2377 (get_ipa_tdesc): Call amd64_linux_read_description.
2378 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2379 and init_registers_amd64_XXX.
2380 * linux-x86-low.c (x86_linux_read_description): Call
2381 amd64_linux_read_description.
2382 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2383 (initialize_low_arch): Don't call init_registers_x32_XXX and
2384 init_registers_amd64_XXX.
2385 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2386 and tdesc_amd64_XXX.
2387 [__x86_64__] (amd64_tdesc_test): New function.
2388 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2389 and init_registers_amd64_XXX.
2390 * linux-x86-tdesc.c: Include arch/amd64.h.
2391 (xcr0_to_tdesc_idx): New function.
2392 (i386_linux_read_description): New function.
2393 (amd64_get_ipa_tdesc_idx): New function.
2394 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2395 (amd64_get_ipa_tdesc): Declare.
2396
23972017-09-05 Yao Qi <yao.qi@linaro.org>
2398
2399 * configure.srv (srv_i386_linux_xmlfiles): Remove
2400 i386/i386-XXX-linux.xml from it.
2401
24022017-09-05 Yao Qi <yao.qi@linaro.org>
2403
2404 * configure.srv: Set srv_i386_linux_regobj empty if $development
2405 is false.
2406 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2407 initialize_low_tdesc.
2408 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2409 with #if initialize_low_tdesc.
2410 * linux-x86-tdesc-selftest.c: New file.
2411 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2412
24132017-09-05 Yao Qi <yao.qi@linaro.org>
2414
2415 * Makefile.in (arch-i386.o): New rule.
2416 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2417 (x86_64-*-linux*): Likewise.
2418 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2419 include arch/i386.h.
2420 (i386_linux_read_description): Remove code and call
2421 i386_create_target_description.
2422 * tdesc.c (allocate_target_description): New function.
2423 * tdesc.h (set_tdesc_architecture): Remove declaration.
2424 (set_tdesc_osabi): Likewise.
2425
24262017-09-05 Yao Qi <yao.qi@linaro.org>
2427
2428 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2429 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2430 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2431 .xmltarget.
2432 * server.c (get_features_xml): Call tdesc_get_features_xml.
2433 * tdesc.c (set_tdesc_architecture): New function.
2434 (set_tdesc_osabi): New function.
2435 (tdesc_get_features_xml): New function.
2436 (tdesc_create_feature): Add an argument.
2437 * tdesc.h (struct target_desc) <features>: New field.
2438 <arch, osabi>: New field.
2439 (~target_desc): xfree features, arch, and osabi.
2440 (target_desc::oerator==): Don't compare .xmltarget.
2441 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2442 (set_tdesc_osabi): Likewise.
2443 (tdesc_get_features_xml): Likewise.
2444
24452017-09-05 Yao Qi <yao.qi@linaro.org>
2446
2447 * linux-x86-tdesc.c: Include selftest.h.
2448 (i386_tdesc_test): New function.
2449 (initialize_low_tdesc): Call selftests::register_test.
2450 * tdesc.h: Include regdef.h.
2451 (target_desc): Override operator == and !=.
2452
24532017-09-05 Yao Qi <yao.qi@linaro.org>
2454
2455 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2456 (ipa_obj): Likewise.
2457 * linux-i386-ipa.c: Include common/x86-xstate.h
2458 (get_ipa_tdesc): Call i386_linux_read_description.
2459 (initialize_low_tracepoint): Don't call init_registers_XXX
2460 functions, call initialize_low_tdesc instead.
2461 * linux-x86-low.c (x86_linux_read_description): Call
2462 i386_linux_read_description.
2463 (initialize_low_arch): Don't call init_registers_i386_XXX
2464 functions, call initialize_low_tdesc.
2465 * linux-x86-tdesc.c: New file.
2466 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2467 (i386_get_ipa_tdesc_idx): Declare.
2468 (i386_get_ipa_tdesc): Declare.
2469 (initialize_low_tdesc): Declare.
2470
24712017-09-05 Yao Qi <yao.qi@linaro.org>
2472
2473 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2474 instead of 0.
2475
24762017-09-05 Yao Qi <yao.qi@linaro.org>
2477
2478 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2479 * regcache.c (get_thread_regcache): Use VEC_length.
2480 (init_register_cache): Likewise.
2481 (regcache_cpy): Likewise.
2482 (registers_to_string): Iterate reg_defs via VEC_iterate.
2483 (find_regno): Likewise.
2484 (find_register_by_number): Use VEC_index.
2485 (register_size): Call find_register_by_number.
2486 (register_data): Call find_register_by_number.
2487 (supply_regblock): Use VEC_length.
2488 (regcache_raw_read_unsigned): Likewise.
2489 * tdesc.c (init_target_desc): Iterate reg_defs via
2490 VEC_iterate.
2491 (default_description): Update initializer.
2492 (copy_target_description): Don't update field num_registers.
2493 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2494 <num_registers>: Remove.
2495
24962017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2497
2498 * Makefile.in (.SECONDARY): Define target.
2499
25002017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2501
2502 * linux-low.c (linux_wait_1): Adjust.
2503 * server.c (queue_stop_reply_callback): Adjust.
2504
25052017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2506
2507 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2508 QEnvironmentUnset and QEnvironmentReset packets.
2509 (handle_query): Inform remote that QEnvironmentHexEncoded,
2510 QEnvironmentUnset and QEnvironmentReset are supported.
2511
25122017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2513
2514 * inferiors.h (inferior_target_data): Rename to ...
2515 (thread_target_data): ... this.
2516 (inferior_regcache_data): Rename to ...
2517 (thread_regcache_data): ... this.
2518 (set_inferior_regcache_data): Rename to ...
2519 (set_thread_regcache_data): ... this.
2520 * inferiors.c (inferior_target_data): Rename to ...
2521 (thread_target_data): ... this.
2522 (inferior_regcache_data): Rename to ...
2523 (thread_regcache_data): ... this.
2524 (set_inferior_regcache_data): Rename to ...
2525 (set_thread_regcache_data): ... this.
2526 (free_one_thread): Update.
2527 * linux-low.h (get_thread_lwp): Update.
2528 * regcache.c (get_thread_regcache): Update.
2529 (regcache_invalidate_thread): Update.
2530 (free_register_cache_thread): Update.
2531 * win32-i386-low.c (update_debug_registers_callback): Update.
2532 (win32_get_current_dr): Update.
2533 * win32-low.c (thread_rec): Update.
2534 (delete_thread_info): Update.
2535 (continue_one_thread): Update.
2536 (suspend_one_thread): Update.
2537
25382017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2539
2540 * inferiors.c (set_inferior_target_data): Remove.
2541 * inferiors.h (set_inferior_target_data): Remove.
2542
25432017-08-18 Yao Qi <yao.qi@linaro.org>
2544
2545 * Makefile.in (OBS): Add selftest.o.
2546 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2547 * configure, config.in: Re-generated.
2548 * server.c: Include common/sefltest.h.
2549 (captured_main): Handle option --selftest.
2550
25512017-08-09 Yao Qi <yao.qi@linaro.org>
2552
2553 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2554 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2555 i386-avx-mpx.o and i386-mmx.o.
2556 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2557 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2558 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2559 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2560 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2561 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2562 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2563 i386/amd64-avx-mpx.xml.
2564
25652017-08-09 Yao Qi <yao.qi@linaro.org>
2566
2567 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2568 and x32-avx-avx512.o.
2569 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2570 i386/x32-avx-avx512.xml.
2571
25722017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2573
2574 * tracepoint.h (enum class fast_tpoint_collect_result): New
2575 enumeration.
2576 (fast_tracepoint_collecting): Change return type to
2577 fast_tpoint_collect_result.
2578 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2579 * linux-low.h: Include tracepoint.h.
2580 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2581 fast_tpoint_collect_result.
2582 * linux-low.c (handle_tracepoints): Adjust.
2583 (linux_fast_tracepoint_collecting): Change return type to
2584 fast_tpoint_collect_result.
2585 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2586 linux_wait_1, stuck_in_jump_pad_callback,
2587 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2588 proceed_one_lwp): Adjust to type change.
2589
25902017-07-10 Yao Qi <yao.qi@linaro.org>
2591
2592 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2593
25942017-06-29 Yao Qi <yao.qi@linaro.org>
2595
2596 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2597 Remove.
2598 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2599
26002017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2601
2602 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2603
26042017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2605
2606 * linux-low.c (linux_create_inferior): Adjust code to access the
2607 environment information via 'gdb_environ' class.
2608 * lynx-low.c (lynx_create_inferior): Likewise.
2609 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2610 (get_environ): Return a pointer to 'our_environ'.
2611 (captured_main): Initialize 'our_environ'.
2612 * server.h (get_environ): Adjust prototype.
2613 * spu-low.c (spu_create_inferior): Adjust code to access the
2614 environment information via 'gdb_environ' class.
2615
26162017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2617
2618 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2619 usage of "register" keyword.
2620
26212017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2622
2623 * configure: Re-generate.
2624
26252017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2626
2627 * configure: Re-generate.
2628
26292017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2630
2631 * Makefile.in (COMPILE.pre): Add "-x c++".
2632
26332017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2634
2635 * fork-child.c: Conditionally include <signal.h>.
2636
26372017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2638
2639 * server.c (handle_general_set): Handle new packet
2640 "QStartupWithShell".
2641 (handle_query): Add "QStartupWithShell" to the list of supported
2642 packets.
2643 (gdbserver_usage): Add help text explaining the
2644 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2645 options.
2646 (captured_main): Recognize and act upon the presence of the new
2647 CLI options.
2648
26492017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2650 Pedro Alves <palves@redhat.com>
2651
2652 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2653 * configure: Regenerate.
2654 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2655 "fork-inferior.o".
2656 (i[34567]86-*-lynxos*): Likewise.
2657 (spu*-*-*): Likewise.
2658 * fork-child.c: New file.
2659 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2660 and "environ.h".
2661 (linux_ptrace_fun): New function.
2662 (linux_create_inferior): Adjust function prototype to reflect
2663 change on "target.h". Adjust function code to use
2664 "fork_inferior".
2665 (linux_request_interrupt): Delete "signal_pid".
2666 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2667 (lynx_ptrace_fun): New function.
2668 (lynx_create_inferior): Adjust function prototype to reflect
2669 change on "target.h". Adjust function code to use
2670 "fork_inferior".
2671 * nto-low.c (nto_create_inferior): Adjust function prototype and
2672 code to reflect change on "target.h". Update comments.
2673 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2674 "common-terminal.h" and "environ.h".
2675 (terminal_fd): Moved to fork-child.c.
2676 (old_foreground_pgrp): Likewise.
2677 (restore_old_foreground_pgrp): Likewise.
2678 (last_status): Make it global.
2679 (last_ptid): Likewise.
2680 (our_environ): New variable.
2681 (startup_with_shell): Likewise.
2682 (program_name): Likewise.
2683 (program_argv): Rename to...
2684 (program_args): ...this.
2685 (wrapper_argv): New variable.
2686 (start_inferior): Delete function.
2687 (get_exec_wrapper): New function.
2688 (get_exec_file): Likewise.
2689 (get_environ): Likewise.
2690 (prefork_hook): Likewise.
2691 (post_fork_inferior): Likewise.
2692 (postfork_hook): Likewise.
2693 (postfork_child_hook): Likewise.
2694 (handle_v_run): Update code to deal with arguments coming from the
2695 remote host. Update calls from "start_inferior" to
2696 "create_inferior".
2697 (captured_main): Likewise. Initialize environment variable. Call
2698 "have_job_control".
2699 * server.h (post_fork_inferior): New prototype.
2700 (get_environ): Likewise.
2701 (last_status): Declare.
2702 (last_ptid): Likewise.
2703 (signal_pid): Likewise.
2704 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2705 (spu_ptrace_fun): New function.
2706 (spu_create_inferior): Adjust function prototype to reflect change
2707 on "target.h". Adjust function code to use "fork_inferior".
2708 * target.c (target_terminal_init): New function.
2709 (target_terminal_inferior): Likewise.
2710 (target_terminal_ours): Likewise.
2711 * target.h: Include <vector>.
2712 (struct target_ops) <create_inferior>: Update prototype.
2713 (create_inferior): Update macro.
2714 * utils.c (gdb_flush_out_err): New function.
2715 * win32-low.c (win32_create_inferior): Adjust function prototype
2716 and code to reflect change on "target.h".
2717
27182017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2719
2720 * inferiors.c (switch_to_thread): New function.
2721
27222017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2723
2724 * Makefile.in (SFILE): Add "common/job-control.c".
2725 (OBS): Add "job-control.o".
2726
27272017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2728
2729 * Makefile: Remove "@host_makefile_frag@".
2730
27312017-05-05 Pedro Alves <palves@redhat.com>
2732
2733 * configure: Regenerate.
2734
27352017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2736
2737 * configure: Regenerate.
2738
27392017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2740
2741 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2742 software_single_step change of return type to
2743 std::vector<CORE_ADDR>.
2744 * linux-low.c (install_software_single_step_breakpoints):
2745 Likewise.
2746 * linux-low.h (install_software_single_step_breakpoints):
2747 Likewise.
2748
27492017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2750
2751 * remote-utils.c: Include "gdb_termios.h" instead of
2752 "terminal.h".
2753 * terminal.h: Delete file.
2754
27552017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2756
2757 * server.c: Include <vector>.
2758 <program_argv, wrapper_argv>: Convert to std::vector.
2759 (start_inferior): Rewrite function to use C++.
2760 (handle_v_run): Likewise. Update code that calculates the argv
2761 based on the vRun packet; use C++.
2762 (captured_main): Likewise.
2763
27642017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2765
2766 * server.c (handle_v_cont): Initialize thread_resume::thread
2767 with null_ptid.
2768
27692017-04-05 Pedro Alves <palves@redhat.com>
2770
2771 * configure: Regenerate.
2772
27732017-04-05 Pedro Alves <palves@redhat.com>
2774
2775 * gdbreplay.c (sync_error): Constify.
2776 * linux-x86-low.c (push_opcode): Constify.
2777
27782017-04-05 Pedro Alves <palves@redhat.com>
2779
2780 * win32-low.c (get_child_debug_event)
2781 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2782 Report TARGET_WAITKIND_SPURIOUS instead.
2783
27842017-04-05 Pedro Alves <palves@redhat.com>
2785
2786 * remote-utils.c (remote_prepare, remote_open): Constify.
2787 * remote-utils.h (remote_prepare, remote_open): Constify.
2788 * server.c (captured_main): Constify 'port' handling.
2789
27902017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2791
2792 * Makefile.in (clean): Clear .deps.
2793
27942017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2795
2796 * .gitignore: Remove generated files, replace with wildcard.
2797 * (clean): Replace removal of generated files with wildcard.
2798 (version.c): Replace with...
2799 (version-generated.c): ...this.
2800 (xml-builtin.c): Replace with...
2801 (xml-builtin-generated.c): ...this.
2802 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2803 (%.c: *regformats*): Replace with...
2804 (%-generated.c: *regformats*): ...this.
2805
28062017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2807
2808 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2809 (xtensa_fill_gregset): Call collect_register_by_name for
2810 threadptr register.
2811 (xtensa_store_gregset): Call supply_register_by_name for
2812 threadptr register.
2813
28142017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2815
2816 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2817 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2818 (xtensa_store_gregset): Call supply_register for all registers in
2819 a0_regnum..a0_regnum + C0_NREGS range.
2820
28212017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2822
2823 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2824 (ax-ipa.o: ax.c): Remove.
2825 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2826 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2827 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2828 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2829 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2830
28312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2832
2833 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2834 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2835 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2836 (errors-ipa.o: ../common/errors.c): Remove.
2837 (format-ipa.o: ../common/format.c): Remove.
2838 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2839
28402017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2841
2842 * Makefile.in (%-ipa.o: %.c): New rule.
2843 (tracepoint-ipa.o: tracepoint.c): Remove.
2844 (utils-ipa.o: utils.c): Remove.
2845 (remote-utils-ipa.o: remote-utils.c): Remove.
2846 (regcache-ipa.o: regcache.c): Remove.
2847 (i386-linux-ipa.o: i386-linux.c): Remove.
2848 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2849 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2850 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2851 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2852 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2853 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2854 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2855 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2856 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2857 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2858 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2859 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2860 (aarch64-ipa.o: aarch64.c): Remove.
2861 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2862 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2863 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2864 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2865 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2866 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2867 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2868 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2869 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2870 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2871 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2872 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2873 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2874 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2875 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2876 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2877 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2878 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2879 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2880 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2881 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2882 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2883 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2884 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2885 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2886 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2887 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2888 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2889 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2890 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2891 (tdesc-ipa.o: tdesc.c): Remove.
2892 (x32-linux-ipa.o: x32-linux.c): Remove.
2893 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2894 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2895
28962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2897
2898 * Makefile.in (%.o: ../arch/%.c): New rule.
2899 (arm.o: ../arch/arm.c): Remove.
2900 (arm-linux.o: ../arch/arm-linux.c): Remove.
2901 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2902 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2903
29042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2905
2906 * Makefile.in (%.o: ../nat/%.c): New rule.
2907 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2908 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2909 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2910 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2911 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2912 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2913 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2914 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2915 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2916 (linux-personality.o: ../nat/linux-personality.c): Remove.
2917 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2918 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2919 (x86-linux.o: ../nat/x86-linux.c): Remove.
2920 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2921 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2922
29232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2924
2925 * Makefile.in (%.o: ../common/%.c): New rule.
2926 (signals.o: ../common/signals.c): Remove.
2927 (print-utils.o: ../common/print-utils.c): Remove.
2928 (rsp-low.o: ../common/rsp-low.c): Remove.
2929 (common-utils.o: ../common/common-utils.c): Remove.
2930 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2931 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2932 (vec.o: ../common/vec.c): Remove.
2933 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2934 (xml-utils.o: ../common/xml-utils.c): Remove.
2935 (ptid.o: ../common/ptid.c): Remove.
2936 (buffer.o: ../common/buffer.c): Remove.
2937 (format.o: ../common/format.c): Remove.
2938 (filestuff.o: ../common/filestuff.c): Remove.
2939 (agent.o: ../common/agent.c): Remove.
2940 (errors.o: ../common/errors.c): Remove.
2941 (environ.o: ../common/environ.c): Remove.
2942 (common-debug.o: ../common/common-debug.c): Remove.
2943 (cleanups.o: ../common/cleanups.c): Remove.
2944 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2945 (fileio.o: ../common/fileio.c): Remove.
2946 (common-regcache.o: ../common/common-regcache.c): Remove.
2947 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2948 (new-op.o: ../common/new-op.c): Remove.
2949 (btrace-common.o: ../common/btrace-common.c): Remove.
2950
29512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2952
2953 * Makefile.in (%.o: ../target/%.c): New rule.
2954 (waitstatus.o: ../target/waitstatus.c): Remove.
2955
29562017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2957
2958 * Makefile.in
2959 (%.c: ../regformats/%.dat,
2960 (%.c: ../regformats/arm/%.dat,
2961 (%.c: ../regformats/i386/%.dat,
2962 (%.c: ../regformats/rs6000/%.dat): New rules.
2963 (aarch64.c): Remove.
2964 (reg-arm.c): Remove.
2965 (arm-with-iwmmxt.c): Remove.
2966 (arm-with-vfpv2.c): Remove.
2967 (arm-with-vfpv3.c): Remove.
2968 (arm-with-neon.c): Remove.
2969 (reg-bfin.c): Remove.
2970 (reg-cris.c): Remove.
2971 (reg-crisv32.c): Remove.
2972 (i386.c): Remove.
2973 (i386-linux.c): Remove.
2974 (i386-avx.c): Remove.
2975 (i386-avx-linux.c): Remove.
2976 (i386-avx-avx512.c): Remove.
2977 (i386-avx-avx512-linux.c): Remove.
2978 (i386-mpx.c): Remove.
2979 (i386-mpx-linux.c): Remove.
2980 (i386-avx-mpx-avx512-pku.c): Remove.
2981 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2982 (i386-avx-mpx.c): Remove.
2983 (i386-avx-mpx-linux.c): Remove.
2984 (i386-mmx.c): Remove.
2985 (i386-mmx-linux.c): Remove.
2986 (reg-ia64.c): Remove.
2987 (reg-m32r.c): Remove.
2988 (reg-m68k.c): Remove.
2989 (reg-cf.c): Remove.
2990 (mips-linux.c): Remove.
2991 (mips-dsp-linux.c): Remove.
2992 (mips64-linux.c): Remove.
2993 (mips64-dsp-linux.c): Remove.
2994 (nios2-linux.c): Remove.
2995 (powerpc-32.c): Remove.
2996 (powerpc-32l.c): Remove.
2997 (powerpc-altivec32l.c): Remove.
2998 (powerpc-cell32l.c): Remove.
2999 (powerpc-vsx32l.c): Remove.
3000 (powerpc-isa205-32l.c): Remove.
3001 (powerpc-isa205-altivec32l.c): Remove.
3002 (powerpc-isa205-vsx32l.c): Remove.
3003 (powerpc-e500l.c): Remove.
3004 (powerpc-64l.c): Remove.
3005 (powerpc-altivec64l.c): Remove.
3006 (powerpc-cell64l.c): Remove.
3007 (powerpc-vsx64l.c): Remove.
3008 (powerpc-isa205-64l.c): Remove.
3009 (powerpc-isa205-altivec64l.c): Remove.
3010 (powerpc-isa205-vsx64l.c): Remove.
3011 (s390-linux32.c): Remove.
3012 (s390-linux32v1.c): Remove.
3013 (s390-linux32v2.c): Remove.
3014 (s390-linux64.c): Remove.
3015 (s390-linux64v1.c): Remove.
3016 (s390-linux64v2.c): Remove.
3017 (s390-te-linux64.c): Remove.
3018 (s390-vx-linux64.c): Remove.
3019 (s390-tevx-linux64.c): Remove.
3020 (s390x-linux64.c): Remove.
3021 (s390x-linux64v1.c): Remove.
3022 (s390x-linux64v2.c): Remove.
3023 (s390x-te-linux64.c): Remove.
3024 (s390x-vx-linux64.c): Remove.
3025 (s390x-tevx-linux64.c): Remove.
3026 (tic6x-c64xp-linux.c): Remove.
3027 (tic6x-c64x-linux.c): Remove.
3028 (tic6x-c62x-linux.c): Remove.
3029 (reg-sh.c): Remove.
3030 (reg-sparc64.c): Remove.
3031 (reg-spu.c): Remove.
3032 (amd64.c): Remove.
3033 (amd64-linux.c): Remove.
3034 (amd64-avx.c): Remove.
3035 (amd64-avx-linux.c): Remove.
3036 (amd64-avx-avx512.c): Remove.
3037 (amd64-avx-avx512-linux.c): Remove.
3038 (amd64-mpx.c): Remove.
3039 (amd64-mpx-linux.c): Remove.
3040 (amd64-avx-mpx-avx512-pku.c): Remove.
3041 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3042 (amd64-avx-mpx.c): Remove.
3043 (amd64-avx-mpx-linux.c): Remove.
3044 (x32.c): Remove.
3045 (x32-linux.c): Remove.
3046 (x32-avx.c): Remove.
3047 (x32-avx-linux.c): Remove.
3048 (x32-avx-avx512.c): Remove.
3049 (x32-avx-avx512-linux.c): Remove.
3050 (reg-xtensa.c): Remove.
3051 (reg-tilegx.c): Remove.
3052 (reg-tilegx32.c): Remove.
3053
30542017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3055
3056 * Makefile.in (SFILES): Add "common/environ.c".
3057 (OBJS): Add "common/environ.h".
3058
30592017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3060
3061 * configure.ac: Check if the fs_base and gs_base members of
3062 `struct user_regs_struct' exist.
3063 * config.in: Regenerated.
3064 * configure: Likewise.
3065
30662017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3067
3068 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3069 target_read_memory.
3070 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3071 (get_next_pcs_syscall_next_pc): Likewise.
3072
30732016-12-23 Luis Machado <lgustavo@codesourcery.com>
3074
3075 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3076 * nto-x86-low.c: Likewise.
3077
30782016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3079
3080 * Makefile.in: Include disable-implicit-rules.mk.
3081
30822016-11-23 Pedro Alves <palves@redhat.com>
3083
3084 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3085 (debug_vprintf): Use std::chrono::steady_clock instead of
3086 gettimeofday. Use '.' instead of ':'.
3087 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3088 (get_timestamp): Use std::chrono::steady_clock instead of
3089 gettimeofday.
3090
30912016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3092
3093 * Makefile.in: Fix whitespace formatting.
3094
30952016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3096
3097 * Makefile.in (SFILES, OBS): Flatten list and order
3098 alphabetically.
3099
31002016-11-23 Pedro Alves <palves@redhat.com>
3101
3102 * event-loop.c (handle_file_event): Use warning.
3103 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3104 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3105 Use warning.
3106
31072016-11-23 Pedro Alves <palves@redhat.com>
3108
3109 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3110 output.
3111 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3112 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3113 debug_printf and debug_flush for debug output.
3114 * server.c (handle_general_set): Likewise.
3115 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3116 output.
3117
31182016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3119
3120 * Makefile.in (.c.o): Replace rule with ...
3121 (%.o: %.c): ... this one.
3122
31232016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3124
3125 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3126 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3127 make.
3128 * configure.ac: Remove checks for the make program.
3129 * configure: Re-generate.
3130
31312016-10-28 Pedro Alves <palves@redhat.com>
3132
3133 * Makefile.in (CXX_DIALECT): Get from configure.
3134 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3135 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3136 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3137 * config.in: Regenerate.
3138 * configure: Regenerate.
3139
31402016-10-27 Yao Qi <yao.qi@linaro.org>
3141
3142 * linux-low.c (linux_supports_range_stepping): Return true if
3143 can_software_single_step return true.
3144
31452016-10-27 Yao Qi <yao.qi@linaro.org>
3146
3147 * inferiors.c (find_inferior_in_random): New function.
3148 * inferiors.h (find_inferior_in_random): Declare.
3149 * linux-low.c (linux_wait_for_event_filtered): Call
3150 find_inferior_in_random instead of find_inferior.
3151
31522016-10-27 Yao Qi <yao.qi@linaro.org>
3153
3154 * linux-low.c (linux_wait_1): If single-step breakpoints are
3155 inserted, remove them.
3156
31572016-10-26 Pedro Alves <palves@redhat.com>
3158
3159 * linux-low.c (handle_extended_wait): Link parent/child fork
3160 threads.
3161 (linux_wait_1): Unlink them.
3162 (linux_set_resume_request): Ignore resume requests for
3163 already-resumed and unhandled fork child threads.
3164 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3165 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3166 New functions.
3167 (handle_v_requests) <vCont>: Don't call require_running.
3168 * server.h (in_queued_stop_replies): New declaration.
3169
31702016-10-24 Yao Qi <yao.qi@linaro.org>
3171
3172 PR server/20733
3173 * linux-aarch64-low.c (append_insns): Cast the return value to
3174 'uint32_t *'.
3175
31762016-10-10 Yao Qi <yao.qi@linaro.org>
3177
3178 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3179
31802016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3181
3182 * target.c (target_supports_multi_process): New function, moved
3183 from...
3184 * target.h (target_supports_multi_process): ... here. Remove
3185 macro.
3186
31872016-10-05 Tom Tromey <tom@tromey.com>
3188
3189 PR remote/20655:
3190 * tracepoint.c (handle_tracepoint_bkpts): Check
3191 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3192
31932016-10-05 Yao Qi <yao.qi@linaro.org>
3194
3195 * configure.srv: Update the path of arm-*.xml files.
3196
31972016-10-05 Terry Guo <terry.guo@arm.com>
3198 Yao Qi <yao.qi@linaro.org>
3199
3200 * Makefile.in: Adjust the path of rules.
3201 * configure.srv: Update the path of xml files.
3202 * regformats/arm-with-iwmmxt.dat: Regenerated.
3203 * regformats/arm-with-neon.dat: Likewise.
3204 * regformats/arm-with-vfpv2.dat: Likewise.
3205 * regformats/arm-with-vfpv3.dat Likewise.
3206
32072016-09-30 Yao Qi <yao.qi@linaro.org>
3208
3209 PR gdbserver/20627
3210 * target.c (target_stop_and_wait): Don't call
3211 target_continue_no_signal, use resume_stop instead.
3212
32132016-09-26 Yao Qi <yao.qi@linaro.org>
3214
3215 * linux-low.c (linux_wait_1): Call debug_exit.
3216
32172016-09-23 Pedro Alves <palves@redhat.com>
3218
3219 * Makefile.in (SFILES): Add common/new-op.c.
3220 (OBS): Add common/new-op.o.
3221 (new-op.o): New rule.
3222
32232016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3224
3225 * .gitinore: Ignore more files.
3226
32272016-09-21 Yao Qi <yao.qi@linaro.org>
3228
3229 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3230 23.
3231
32322016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3233
3234 * server.c (start_inferior): Call target_mourn_inferior instead of
3235 mourn_inferior; pass ptid_t argument to it.
3236 (resume): Likewise.
3237 (handle_target_event): Likewise.
3238 * target.c (target_mourn_inferior): New function.
3239 * target.h (mourn_inferior): Delete macro.
3240
32412016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3242
3243 * linux-low.c (lwp_is_stepping): New function.
3244
32452016-09-06 Carl Love <cel@us.ibm.com>
3246
3247 * server.c (start_inferior): Fixed comment, requested comment change
3248 didn't get updated correctly. Removed reference to ptrace () call as
3249 it is only true on Linux systems.
3250
32512016-09-06 Carl Love <cel@us.ibm.com>
3252
3253 * server.c (start_inferior): Do not call
3254 function target_post_create_inferior () if the
3255 inferior process has already exited.
3256
32572016-09-05 Pedro Alves <palves@redhat.com>
3258
3259 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3260 (COMPILE.pre, CC_LD): Use CXX directly.
3261 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3262 * acinclude.m4: Don't include build-with-cxx.m4.
3263 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3264 * configure: Regenerate.
3265
32662016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3267
3268 PR gdb/19495
3269 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3270 call writing data to own_buf.
3271
32722016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3273
3274 * target.c (mywait): Call target_wait instead of
3275 the_target->wait.
3276 (target_wait): New function.
3277
32782016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3279
3280 * server.c (start_inferior): New variable 'ptid'. Replace calls
3281 to the_target->resume by target_continue{,_no_signal}, depending
3282 on the case.
3283 * target.c (target_stop_and_wait): Call target_continue_no_signal
3284 instead of the_target->resume.
3285 (target_continue): New function.
3286
32872016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3288
3289 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3290
32912016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3292
3293 PR server/20491
3294 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3295 ps_prochandle.
3296 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3297 * linux-arm-low.c (ps_get_thread_area): Likewise.
3298 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3299 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3300 * linux-mips-low.c (ps_get_thread_area): Likewise.
3301 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3302 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3303 * linux-x86-low.c (ps_get_thread_area): Likewise.
3304 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3305
33062016-08-19 Pedro Alves <palves@redhat.com>
3307
3308 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3309
33102016-08-19 Pedro Alves <palves@redhat.com>
3311
3312 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3313 comment. Use memcpy instead of casting through unsigned long.
3314
33152016-08-19 Pedro Alves <palves@redhat.com>
3316
3317 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3318 allocating around 0x80000000.
3319
33202016-08-19 Pedro Alves <palves@redhat.com>
3321
3322 PR gdb/20415
3323 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3324 (x32-avx512-linux-ipa.o): New rules.
3325 * configure.ac (x86_64-*-linux*): New x32 check.
3326 * configure.srv (ipa_x32_linux_regobj): New.
3327 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3328 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3329 descriptions.
3330 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3331 descriptions.
3332 * configure: Regenerate.
3333
33342016-08-09 Pedro Alves <palves@redhat.com>
3335
3336 PR gdb/18653
3337 * Makefile.in (OBS): Add signals-state-save-restore.o.
3338 (signals-state-save-restore.o): New rule.
3339 * config.in: Regenerate.
3340 * configure: Regenerate.
3341 * linux-low.c: Include "signals-state-save-restore.h".
3342 (linux_create_inferior): Call
3343 restore_original_signals_state.
3344 * server.c: Include "dispositions-save-restore.h".
3345 (captured_main): Call save_original_signals_state.
3346
33472016-08-05 Pedro Alves <palves@redhat.com>
3348
3349 * configure: Regenerate.
3350
33512016-08-04 Yao Qi <yao.qi@linaro.org>
3352
3353 * linux-low.c (regsets_fetch_inferior_registers): Check
3354 errno is ESRCH or not.
3355
33562016-08-02 Yao Qi <yao.qi@linaro.org>
3357
3358 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3359 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3360 (thread_db_load_search): Update.
3361 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3362 td_ta_set_event and td_ta_event_getmsg.
3363
33642016-07-26 Pedro Alves <palves@redhat.com>
3365
3366 PR server/20414
3367 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3368 of unsigned long for 64-bit registers and use uint32_t instead of
3369 unsigned int for 32-bit registers.
3370
33712016-07-26 Pedro Alves <palves@redhat.com>
3372
3373 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3374 to 'ptrace'.
3375
33762016-07-21 Tom Tromey <tom@tromey.com>
3377
3378 * configure: Rebuild.
3379
33802016-07-21 Yao Qi <yao.qi@linaro.org>
3381
3382 * mem-break.c (find_gdb_breakpoint): Cast bp to
3383 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3384
33852016-07-21 Yao Qi <yao.qi@linaro.org>
3386
3387 * server.c (handle_v_requests): Support s and S actions
3388 if target_supports_software_single_step return true.
3389
33902016-07-21 Yao Qi <yao.qi@linaro.org>
3391
3392 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3393 is resume_step, call maybe_hw_step.
3394 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3395 and unstop them.
3396 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3397 breakpoints or not.
3398 (proceed_one_lwp): If resume request is resume_step, install
3399 reinsert breakpoints and call maybe_hw_step.
3400
34012016-07-21 Yao Qi <yao.qi@linaro.org>
3402
3403 * linux-low.c (proceed_one_lwp): Declare.
3404 (linux_resume_one_thread): Remove local variable 'step'.
3405 Lift code enqueue signal. Call proceed_one_lwp instead of
3406 linux_resume_one_lwp.
3407
34082016-07-21 Yao Qi <yao.qi@linaro.org>
3409
3410 * linux-low.c (linux_resume_one_thread): Call
3411 enqueue_pending_signal.
3412
34132016-07-21 Yao Qi <yao.qi@linaro.org>
3414
3415 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3416 * inferiors.c (do_restore_current_thread_cleanup): New function.
3417 (make_cleanup_restore_current_thread): Likewise.
3418 * linux-low.c (install_software_single_step_breakpoints): Call
3419 make_cleanup_restore_current_thread. Switch current_thread to
3420 thread.
3421
34222016-07-21 Yao Qi <yao.qi@linaro.org>
3423
3424 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3425 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3426 (clone_one_breakpoint): Likewise.
3427 (delete_reinsert_breakpoints): Change parameter to thread.
3428 Callers updated.
3429 (has_reinsert_breakpoints): Likewise.
3430 (uninsert_reinsert_breakpoints): Likewise.
3431 (reinsert_reinsert_breakpoints): Likewise.
3432 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3433 (delete_reinsert_breakpoints): Likewise.
3434 (reinsert_reinsert_breakpoints): Likewise.
3435 (uninsert_reinsert_breakpoints): Likewise.
3436 (has_reinsert_breakpoints): Likewise.
3437
34382016-07-21 Yao Qi <yao.qi@linaro.org>
3439
3440 * inferiors.c (get_thread_process): Make parameter const.
3441 * inferiors.h (get_thread_process): Update declaration.
3442 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3443 Add new parameters child_thread and parent_thread. Callers
3444 updated.
3445 * mem-break.h (clone_all_breakpoints): Update declaration.
3446
34472016-07-21 Yao Qi <yao.qi@linaro.org>
3448
3449 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3450 <command_list, handler>: Remove.
3451 (struct gdb_breakpoint): New.
3452 (struct other_breakpoint): New.
3453 (struct reinsert_breakpoint): New.
3454 (is_gdb_breakpoint): New function.
3455 (any_persistent_commands): Update command_list if
3456 is_gdb_breakpoint returns true.
3457 (set_breakpoint): Create breakpoints according to their types.
3458 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3459 (set_gdb_breakpoint_1): Likewise.
3460 (set_gdb_breakpoint): Likewise.
3461 (clear_breakpoint_conditions): Change parameter type to
3462 'struct gdb_breakpoint *'.
3463 (clear_breakpoint_commands): Likewise.
3464 (clear_breakpoint_conditions_and_commands): Likewise.
3465 (add_condition_to_breakpoint): Likewise.
3466 (add_breakpoint_condition): Likewise.
3467 (add_commands_to_breakpoint): Likewise.
3468 (check_breakpoints): Check other_breakpoint.
3469 (clone_one_breakpoint): Clone breakpopint according to its type.
3470 * mem-break.h (struct gdb_breakpoint): Declare.
3471 (set_gdb_breakpoint): Update declaration.
3472 (clear_breakpoint_conditions_and_commands): Likewise.
3473 (add_breakpoint_condition): Likewise.
3474 (add_breakpoint_commands): Likewise.
3475 * server.c (process_point_options): Change parameter type to
3476 'struct gdb_breakpoint *'.
3477
34782016-07-21 Yao Qi <yao.qi@linaro.org>
3479
3480 * mem-break.c (set_breakpoint_at): Rename it to ...
3481 (set_breakpoint_type_at): ... it.
3482 (set_breakpoint_at): Call set_breakpoint_type_at.
3483 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3484 * mem-break.h (set_breakpoint_at): Update comments.
3485
34862016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3487
3488 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3489 to buf parameter.
3490 (nios2_store_gregset): Likewise.
3491
34922016-07-01 Pedro Alves <palves@redhat.com>
3493 Antoine Tremblay <antoine.tremblay@ericsson.com>
3494
3495 * linux-low.c: Change interface to take the target lwp_info
3496 pointer directly and return void. Handle detaching from a zombie
3497 thread.
3498 (linux_detach_lwp_callback): New function.
3499 (linux_detach): Detach from the leader thread after detaching from
3500 the clone threads.
3501
35022016-06-28 Yao Qi <yao.qi@linaro.org>
3503
3504 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3505 for variable new_offset.
3506 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3507 (aarch64_ftrace_insn_reloc_cb): Likewise.
3508 (aarch64_ftrace_insn_reloc_tb): Likewise.
3509 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3510 PRIx64 instead of PRIx32.
3511
35122016-06-28 Yao Qi <yao.qi@linaro.org>
3513
3514 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3515 (the_low_target): Install arm_get_syscall_trapinfo.
3516
35172016-06-28 Yao Qi <yao.qi@linaro.org>
3518
3519 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3520 function.
3521 (the_low_target): Install aarch64_get_syscall_trapinfo.
3522
35232016-06-28 Yao Qi <yao.qi@linaro.org>
3524
3525 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3526 Callers updated.
3527 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3528 Remove parameter sysno.
3529 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3530 sysret.
3531
35322016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3533
3534 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3535 (s390_emit_ne_goto): Likewise.
3536 (s390_emit_lt_goto): Likewise.
3537 (s390_emit_le_goto): Likewise.
3538 (s390_emit_gt_goto): Likewise.
3539 (s390_emit_ge_goto): Likewise.
3540 (s390x_emit_eq_goto): Likewise.
3541 (s390x_emit_ne_goto): Likewise.
3542 (s390x_emit_lt_goto): Likewise.
3543 (s390x_emit_le_goto): Likewise.
3544 (s390x_emit_gt_goto): Likewise.
3545 (s390x_emit_ge_goto): Likewise.
3546 (s390_emit_ops_impl): Mark variable static.
3547 (s390x_emit_ops): Likewise.
3548
35492016-06-17 Yao Qi <yao.qi@linaro.org>
3550
3551 * linux-low.c (handle_extended_wait): Call
3552 uninsert_reinsert_breakpoints for the parent process. Remove
3553 reinsert breakpoints from the child process. Reinsert them to
3554 the parent process when vfork is done.
3555 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3556 (reinsert_reinsert_breakpoints): New function.
3557 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3558 (reinsert_reinsert_breakpoints): Declare.
3559
35602016-06-17 Yao Qi <yao.qi@linaro.org>
3561
3562 * linux-low.c (handle_extended_wait): If the parent is doing
3563 step-over, remove the reinsert breakpoints from the forked child.
3564
35652016-06-17 Yao Qi <yao.qi@linaro.org>
3566
3567 * linux-low.c (unsuspend_all_lwps): Declare.
3568 (linux_low_filter_event): If thread exited, call finish_step_over.
3569 If step-over is finished, unsuspend other threads.
3570
35712016-06-17 Yao Qi <yao.qi@linaro.org>
3572
3573 * linux-low.c (linux_resume_one_lwp_throw): Assert
3574 has_reinsert_breakpoints returns false.
3575 * mem-break.c (delete_disabled_breakpoints): Assert
3576 bp type isn't reinsert_breakpoint.
3577
35782016-06-17 Yao Qi <yao.qi@linaro.org>
3579
3580 * linux-low.c (maybe_hw_step): New function.
3581 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3582 (finish_step_over): Switch current_thread to lwp temporarily,
3583 and assert has_reinsert_breakpoints returns true.
3584 (proceed_one_lwp): Call maybe_hw_step.
3585 * mem-break.c (has_reinsert_breakpoints): New function.
3586 * mem-break.h (has_reinsert_breakpoints): Declare.
3587
35882016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3589
3590 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3591
35922016-05-17 Yao Qi <yao.qi@linaro.org>
3593
3594 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3595 instead of find_inferior.
3596
35972016-05-05 Yao Qi <yao.qi@linaro.org>
3598
3599 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3600 Initialize res to zero.
3601
36022016-05-05 Yao Qi <yao.qi@linaro.org>
3603
3604 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3605 to uint32_t.
3606
36072016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3608
3609 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3610 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3611 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3612
36132016-04-28 Par Olsson <par.olsson@windriver.com>
3614 Simon Marchi <simon.marchi@ericsson.com>
3615
3616 * tracepoint.c (write_inferior_int8): New function.
3617 (cmd_qtenable_disable): Write enable flag using
3618 write_inferior_int8.
3619
36202016-04-25 Yao Qi <yao.qi@linaro.org>
3621
3622 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3623 (need_step_over_p): Return zero if the LWP has pending signals
3624 can be delivered on software single step target.
3625
36262016-04-25 Yao Qi <yao.qi@linaro.org>
3627
3628 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3629 return instead of error.
3630
36312016-04-22 Yao Qi <yao.qi@linaro.org>
3632
3633 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3634 to 23.
3635
36362016-04-22 Yao Qi <yao.qi@linaro.org>
3637
3638 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3639 signal when stepping over breakpoint with software single
3640 step.
3641
36422016-04-21 Pedro Alves <palves@redhat.com>
3643
3644 * linux-s390-low.c (s390_collect_ptrace_register)
3645 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3646 add casts.
3647 (s390_check_regset): Use void * instead of gdb_byte *.
3648
36492016-04-20 Pedro Alves <palves@redhat.com>
3650
3651 * configure: Renegerate.
3652
36532016-04-20 Yao Qi <yao.qi@linaro.org>
3654
3655 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3656 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3657 number 16.
3658 (arm_store_gregset): Likewise.
3659
36602016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3661
3662 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3663 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3664 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3665 (amd64-avx-mpx-linux.c): New rules.
3666 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3667 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3668 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3669 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3670 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3671 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3672 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3673 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3674 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3675 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3676 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3677 * linux-x86-low.c (x86_linux_read_description): Add case for
3678 X86_XSTATE_AVX_MPX_MASK.
3679 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3680 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3681 init_registers_i386_avx_mpx_linux.
3682 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3683 (initialize_low_tracepoint): Call
3684 init_registers_i386_avx_mpx_linux.
3685 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3686 (initialize_low_tracepoint): Call
3687 init_registers_amd64_avx_mpx_linux.
3688 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3689 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3690 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3691 declarations.
3692
36932016-04-18 Pedro Alves <palves@redhat.com>
3694
3695 * configure: Regenerate.
3696
36972016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3698
3699 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3700 (aarch64_emit_sub): Likewise.
3701
37022016-04-12 Pedro Alves <palves@redhat.com>
3703
3704 * utils.c (prepare_to_throw_exception): Delete.
3705
37062016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3707
3708 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3709
37102016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3711
3712 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3713
37142016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3715
3716 * linux-aarch64-ipa.c: Add <elf.h> include.
3717 * linux-ppc-ipa.c: Add <elf.h> include.
3718 * linux-s390-ipa.c: Add <elf.h> include.
3719
37202016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3721
3722 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3723 (get_raw_reg_ptr): Likewise.
3724 (get_trace_state_variable_value_ptr): Likewise.
3725 (set_trace_state_variable_value_ptr): Likewise.
3726 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3727 char *.
3728
37292016-03-31 Wei-cheng Wang <cole945@gmail.com>
3730 Marcin Kościelnicki <koriakin@0x04.net>
3731
3732 PR/17221
3733 * linux-ppc-low.c (emit_insns): New function.
3734 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3735 (ppc_emit_prologue): New function.
3736 (ppc_emit_epilogue): New function.
3737 (ppc_emit_add): New function.
3738 (ppc_emit_sub): New function.
3739 (ppc_emit_mul): New function.
3740 (ppc_emit_lsh): New function.
3741 (ppc_emit_rsh_signed): New function.
3742 (ppc_emit_rsh_unsigned): New function.
3743 (ppc_emit_ext): New function.
3744 (ppc_emit_zero_ext): New function.
3745 (ppc_emit_log_not): New function.
3746 (ppc_emit_bit_and): New function.
3747 (ppc_emit_bit_or): New function.
3748 (ppc_emit_bit_xor): New function.
3749 (ppc_emit_bit_not): New function.
3750 (ppc_emit_equal): New function.
3751 (ppc_emit_less_signed): New function.
3752 (ppc_emit_less_unsigned): New function.
3753 (ppc_emit_ref): New function.
3754 (ppc_emit_const): New function.
3755 (ppc_emit_reg): New function.
3756 (ppc_emit_pop): New function.
3757 (ppc_emit_stack_flush): New function.
3758 (ppc_emit_swap): New function.
3759 (ppc_emit_stack_adjust): New function.
3760 (ppc_emit_call): New function.
3761 (ppc_emit_int_call_1): New function.
3762 (ppc_emit_void_call_2): New function.
3763 (ppc_emit_if_goto): New function.
3764 (ppc_emit_goto): New function.
3765 (ppc_emit_eq_goto): New function.
3766 (ppc_emit_ne_goto): New function.
3767 (ppc_emit_lt_goto): New function.
3768 (ppc_emit_le_goto): New function.
3769 (ppc_emit_gt_goto): New function.
3770 (ppc_emit_ge_goto): New function.
3771 (ppc_write_goto_address): New function.
3772 (ppc_emit_ops_impl): New static variable.
3773 (ppc64v1_emit_prologue): New function.
3774 (ppc64v2_emit_prologue): New function.
3775 (ppc64_emit_epilogue): New function.
3776 (ppc64_emit_add): New function.
3777 (ppc64_emit_sub): New function.
3778 (ppc64_emit_mul): New function.
3779 (ppc64_emit_lsh): New function.
3780 (ppc64_emit_rsh_signed): New function.
3781 (ppc64_emit_rsh_unsigned): New function.
3782 (ppc64_emit_ext): New function.
3783 (ppc64_emit_zero_ext): New function.
3784 (ppc64_emit_log_not): New function.
3785 (ppc64_emit_bit_and): New function.
3786 (ppc64_emit_bit_or): New function.
3787 (ppc64_emit_bit_xor): New function.
3788 (ppc64_emit_bit_not): New function.
3789 (ppc64_emit_equal): New function.
3790 (ppc64_emit_less_signed): New function.
3791 (ppc64_emit_less_unsigned): New function.
3792 (ppc64_emit_ref): New function.
3793 (ppc64_emit_const): New function.
3794 (ppc64v1_emit_reg): New function.
3795 (ppc64v2_emit_reg): New function.
3796 (ppc64_emit_pop): New function.
3797 (ppc64_emit_stack_flush): New function.
3798 (ppc64_emit_swap): New function.
3799 (ppc64v1_emit_call): New function.
3800 (ppc64v2_emit_call): New function.
3801 (ppc64v1_emit_int_call_1): New function.
3802 (ppc64v2_emit_int_call_1): New function.
3803 (ppc64v1_emit_void_call_2): New function.
3804 (ppc64v2_emit_void_call_2): New function.
3805 (ppc64_emit_if_goto): New function.
3806 (ppc64_emit_eq_goto): New function.
3807 (ppc64_emit_ne_goto): New function.
3808 (ppc64_emit_lt_goto): New function.
3809 (ppc64_emit_le_goto): New function.
3810 (ppc64_emit_gt_goto): New function.
3811 (ppc64_emit_ge_goto): New function.
3812 (ppc64v1_emit_ops_impl): New static variable.
3813 (ppc64v2_emit_ops_impl): New static variable.
3814 (ppc_emit_ops): New function.
3815 (linux_low_target): Wire in ppc_emit_ops.
3816
38172016-03-31 Wei-cheng Wang <cole945@gmail.com>
3818 Marcin Kościelnicki <koriakin@0x04.net>
3819
3820 PR/17221
3821 * Makefile.in: Add powerpc-*-ipa.o
3822 * configure.srv: Add ipa_obj for powerpc*-linux.
3823 * linux-ppc-ipa.c: New file.
3824 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3825 includes.
3826 (PPC_FIELD): New macro.
3827 (PPC_SEXT): New macro.
3828 (PPC_OP6): New macro.
3829 (PPC_BO): New macro.
3830 (PPC_LI): New macro.
3831 (PPC_BD): New macro.
3832 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3833 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3834 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3835 (ppc_get_thread_area): New function.
3836 (is_elfv2_inferior): New function.
3837 (gen_ds_form): New function.
3838 (GEN_STD): New macro.
3839 (GEN_STDU): New macro.
3840 (GEN_LD): New macro.
3841 (GEN_LDU): New macro.
3842 (gen_d_form): New function.
3843 (GEN_ADDI): New macro.
3844 (GEN_ADDIS): New macro.
3845 (GEN_LI): New macro.
3846 (GEN_LIS): New macro.
3847 (GEN_ORI): New macro.
3848 (GEN_ORIS): New macro.
3849 (GEN_LWZ): New macro.
3850 (GEN_STW): New macro.
3851 (GEN_STWU): New macro.
3852 (gen_xfx_form): New function.
3853 (GEN_MFSPR): New macro.
3854 (GEN_MTSPR): New macro.
3855 (GEN_MFCR): New macro.
3856 (GEN_MTCR): New macro.
3857 (GEN_SYNC): New macro.
3858 (GEN_LWSYNC): New macro.
3859 (gen_x_form): New function.
3860 (GEN_OR): New macro.
3861 (GEN_MR): New macro.
3862 (GEN_LWARX): New macro.
3863 (GEN_STWCX): New macro.
3864 (GEN_CMPW): New macro.
3865 (gen_md_form): New function.
3866 (GEN_RLDICL): New macro.
3867 (GEN_RLDICR): New macro.
3868 (gen_i_form): New function.
3869 (GEN_B): New macro.
3870 (GEN_BL): New macro.
3871 (gen_b_form): New function.
3872 (GEN_BNE): New macro.
3873 (GEN_LOAD): New macro.
3874 (GEN_STORE): New macro.
3875 (gen_limm): New function.
3876 (gen_atomic_xchg): New function.
3877 (gen_call): New function.
3878 (ppc_relocate_instruction): New function.
3879 (ppc_install_fast_tracepoint_jump_pad): New function.
3880 (ppc_get_min_fast_tracepoint_insn_len): New function.
3881 (ppc_get_ipa_tdesc_idx): New function.
3882 (the_low_target): Wire in the new functions.
3883 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3884 tdescs.
3885 * linux-ppc-tdesc.h: New file.
3886
38872016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3888
3889 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3890 (alloc_jump_pad_buffer): New function.
3891 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3892 (alloc_jump_pad_buffer): New function.
3893 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3894 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3895 (alloc_jump_pad_buffer): New function.
3896 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3897 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3898 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3899 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3900
39012016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3902
3903 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3904 * linux-amd64-ipa.c: Likewise.
3905 * linux-i386-ipa.c: Likewise.
3906 * linux-s390-ipa.c: Likewise.
3907 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3908 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3909 set_trace_state_variable_value_ptr.
3910 (struct ipa_sym_addresses): Likewise.
3911 (symbol_list): Likewise.
3912 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3913 accessing gdb_collect directly.
3914 (gdb_collect_ptr_type): New typedef.
3915 (get_raw_reg_ptr_type): New typedef.
3916 (get_trace_state_variable_value_ptr_type): New typedef.
3917 (set_trace_state_variable_value_ptr_type): New typedef.
3918 (gdb_collect_ptr): New global.
3919 (get_raw_reg_ptr): New global.
3920 (get_trace_state_variable_value_ptr): New global.
3921 (set_trace_state_variable_value_ptr): New global.
3922 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3923 accessing get_raw_reg directly.
3924 (get_get_tsv_func_addr): Likewise for
3925 get_trace_state_variable_value_ptr.
3926 (get_set_tsv_func_addr): Likewise for
3927 set_trace_state_variable_value_ptr.
3928 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3929
39302016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3931
3932 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3933
39342016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3935
3936 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3937 packets.
3938 (relocate_instruction): Remove own_buf.
3939 * server.c (own_buf): Make global.
3940 (handle_v_requests): Make global.
3941 * server.h (own_buf): New declaration.
3942 (handle_v_requests): New prototype.
3943
39442016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3945
3946 PR 18377
3947 * linux-s390-low.c (add_insns): New function.
3948 (s390_emit_prologue): New function.
3949 (s390_emit_epilogue): New function.
3950 (s390_emit_add): New function.
3951 (s390_emit_sub): New function.
3952 (s390_emit_mul): New function.
3953 (s390_emit_lsh): New function.
3954 (s390_emit_rsh_signed): New function.
3955 (s390_emit_rsh_unsigned): New function.
3956 (s390_emit_ext): New function.
3957 (s390_emit_log_not): New function.
3958 (s390_emit_bit_and): New function.
3959 (s390_emit_bit_or): New function.
3960 (s390_emit_bit_xor): New function.
3961 (s390_emit_bit_not): New function.
3962 (s390_emit_equal): New function.
3963 (s390_emit_less_signed): New function.
3964 (s390_emit_less_unsigned): New function.
3965 (s390_emit_ref): New function.
3966 (s390_emit_if_goto): New function.
3967 (s390_emit_goto): New function.
3968 (s390_write_goto_address): New function.
3969 (s390_emit_litpool): New function.
3970 (s390_emit_const): New function.
3971 (s390_emit_call): New function.
3972 (s390_emit_reg): New function.
3973 (s390_emit_pop): New function.
3974 (s390_emit_stack_flush): New function.
3975 (s390_emit_zero_ext): New function.
3976 (s390_emit_swap): New function.
3977 (s390_emit_stack_adjust): New function.
3978 (s390_emit_set_r2): New function.
3979 (s390_emit_int_call_1): New function.
3980 (s390_emit_void_call_2): New function.
3981 (s390_emit_eq_goto): New function.
3982 (s390_emit_ne_goto): New function.
3983 (s390_emit_lt_goto): New function.
3984 (s390_emit_le_goto): New function.
3985 (s390_emit_gt_goto): New function.
3986 (s390_emit_ge_goto): New function.
3987 (s390x_emit_prologue): New function.
3988 (s390x_emit_epilogue): New function.
3989 (s390x_emit_add): New function.
3990 (s390x_emit_sub): New function.
3991 (s390x_emit_mul): New function.
3992 (s390x_emit_lsh): New function.
3993 (s390x_emit_rsh_signed): New function.
3994 (s390x_emit_rsh_unsigned): New function.
3995 (s390x_emit_ext): New function.
3996 (s390x_emit_log_not): New function.
3997 (s390x_emit_bit_and): New function.
3998 (s390x_emit_bit_or): New function.
3999 (s390x_emit_bit_xor): New function.
4000 (s390x_emit_bit_not): New function.
4001 (s390x_emit_equal): New function.
4002 (s390x_emit_less_signed): New function.
4003 (s390x_emit_less_unsigned): New function.
4004 (s390x_emit_ref): New function.
4005 (s390x_emit_if_goto): New function.
4006 (s390x_emit_const): New function.
4007 (s390x_emit_call): New function.
4008 (s390x_emit_reg): New function.
4009 (s390x_emit_pop): New function.
4010 (s390x_emit_stack_flush): New function.
4011 (s390x_emit_zero_ext): New function.
4012 (s390x_emit_swap): New function.
4013 (s390x_emit_stack_adjust): New function.
4014 (s390x_emit_int_call_1): New function.
4015 (s390x_emit_void_call_2): New function.
4016 (s390x_emit_eq_goto): New function.
4017 (s390x_emit_ne_goto): New function.
4018 (s390x_emit_lt_goto): New function.
4019 (s390x_emit_le_goto): New function.
4020 (s390x_emit_gt_goto): New function.
4021 (s390x_emit_ge_goto): New function.
4022 (s390_emit_ops): New function.
4023 (struct linux_target_ops): Fill in emit_ops hook.
4024
40252016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4026
4027 PR 18377
4028 * Makefile.in: Add s390 IPA files.
4029 * configure.srv: Build IPA for s390.
4030 * linux-s390-ipa.c: New file.
4031 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4032 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4033 (tdesc_s390_linux32): Likewise.
4034 (init_registers_s390_linux32v1): Likewise.
4035 (tdesc_s390_linux32v1): Likewise.
4036 (init_registers_s390_linux32v2): Likewise.
4037 (tdesc_s390_linux32v2): Likewise.
4038 (init_registers_s390_linux64): Likewise.
4039 (tdesc_s390_linux64): Likewise.
4040 (init_registers_s390_linux64v1): Likewise.
4041 (tdesc_s390_linux64v1): Likewise.
4042 (init_registers_s390_linux64v2): Likewise.
4043 (tdesc_s390_linux64v2): Likewise.
4044 (init_registers_s390_te_linux64): Likewise.
4045 (tdesc_s390_te_linux64): Likewise.
4046 (init_registers_s390_vx_linux64): Likewise.
4047 (tdesc_s390_vx_linux64): Likewise.
4048 (init_registers_s390_tevx_linux64): Likewise.
4049 (tdesc_s390_tevx_linux64): Likewise.
4050 (init_registers_s390x_linux64): Likewise.
4051 (tdesc_s390x_linux64): Likewise.
4052 (init_registers_s390x_linux64v1): Likewise.
4053 (tdesc_s390x_linux64v1): Likewise.
4054 (init_registers_s390x_linux64v2): Likewise.
4055 (tdesc_s390x_linux64v2): Likewise.
4056 (init_registers_s390x_te_linux64): Likewise.
4057 (tdesc_s390x_te_linux64): Likewise.
4058 (init_registers_s390x_vx_linux64): Likewise.
4059 (tdesc_s390x_vx_linux64): Likewise.
4060 (init_registers_s390x_tevx_linux64): Likewise.
4061 (tdesc_s390x_tevx_linux64): Likewise.
4062 (have_hwcap_s390_vx): New static variable.
4063 (s390_arch_setup): Fill have_hwcap_s390_vx.
4064 (s390_get_thread_area): New function.
4065 (s390_ft_entry_gpr_esa): New const.
4066 (s390_ft_entry_gpr_zarch): New const.
4067 (s390_ft_entry_misc): New const.
4068 (s390_ft_entry_fr): New const.
4069 (s390_ft_entry_vr): New const.
4070 (s390_ft_main_31): New const.
4071 (s390_ft_main_64): New const.
4072 (s390_ft_exit_fr): New const.
4073 (s390_ft_exit_vr): New const.
4074 (s390_ft_exit_misc): New const.
4075 (s390_ft_exit_gpr_esa): New const.
4076 (s390_ft_exit_gpr_zarch): New const.
4077 (append_insns): New function.
4078 (s390_relocate_instruction): New function.
4079 (s390_install_fast_tracepoint_jump_pad): New function.
4080 (s390_get_min_fast_tracepoint_insn_len): New function.
4081 (s390_get_ipa_tdesc_idx): New function.
4082 (struct linux_target_ops): Wire in the above functions.
4083 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4084 * linux-s390-tdesc.h: New file.
4085
40862016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4087
4088 * linux-s390-low.c (s390_supports_tracepoints): New function.
4089 (struct linux_target_ops): Fill supports_tracepoints hook.
4090
40912016-03-18 Yao Qi <yao.qi@linaro.org>
4092
4093 * linux-low.c (lwp_signal_can_be_delivered): New function.
4094 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4095
40962016-03-18 Yao Qi <yao.qi@linaro.org>
4097
4098 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4099 0 if signal is enqueued. Remove 'signal' from one debugging
4100 message. Move one debugging message to some lines below.
4101 Remove code setting 'signal' to 0.
4102
41032016-03-18 Yao Qi <yao.qi@linaro.org>
4104
4105 * linux-low.c (linux_low_filter_event): Remove redundant
4106 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4107
41082016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4109
4110 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4111 (struct linux_target_ops): Wire in the above.
4112
41132016-03-03 Yao Qi <yao.qi@linaro.org>
4114
4115 * linux-low.c: Update comments to start_step_over.
4116
41172016-03-03 Yao Qi <yao.qi@linaro.org>
4118
4119 PR server/19736
4120 * linux-low.c (handle_extended_wait): Set child suspended
4121 if event_lwp->bp_reinsert isn't zero.
4122
41232016-03-02 Yao Qi <yao.qi@linaro.org>
4124
4125 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4126 enqueue_pending_signal.
4127
41282016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4129
4130 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4131 is actually loaded.
4132
41332016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4134
4135 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4136 (s390_regmap_3264) [!__s390x__]: New global.
4137 (s390_collect_ptrace_register): Skip map entries containing -1.
4138 (s390_supply_ptrace_register): Ditto.
4139 (s390_fill_gprs_high): New function.
4140 (s390_store_gprs_high): New function.
4141 (s390_regsets): Add NT_S390_HIGH_GPRS.
4142 (s390_get_hwcap): Enable on 31-bit.
4143 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4144 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4145 Detect NT_S390_HIGH_GPRS.
4146 (s390_usrregs_info_3264): Enable on 31-bit.
4147 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4148 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4149
41502016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4151
4152 PR gdb/13808
4153 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4154 * configure.srv: Ditto.
4155 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4156 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4157 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4158 (init_registers_amd64_linux): Remove prototype.
4159 (tdesc_amd64_linux): Remove declaration.
4160 (get_ipa_tdesc): New function.
4161 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4162 initialize remaining tdescs.
4163 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4164 (init_registers_i386_linux): Remove prototype.
4165 (tdesc_i386_linux): Remove declaration.
4166 (get_ipa_tdesc): New function.
4167 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4168 initialize remaining tdescs.
4169 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4170 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4171 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4172 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4173 (x86_get_ipa_tdesc_idx): New function.
4174 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4175 * linux-x86-tdesc.h: New file.
4176 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4177 (target_get_ipa_tdesc_idx): New macro.
4178 * tracepoint.c (ipa_tdesc_idx): New macro.
4179 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4180 (symbol_list): Add ipa_tdesc_idx.
4181 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4182 (ipa_tdesc): Remove.
4183 (ipa_tdesc_idx): New variable.
4184 (get_context_regcache): Use get_ipa_tdesc.
4185 (gdb_collect): Ditto.
4186 (gdb_probe): Ditto.
4187 * tracepoint.h (get_ipa_tdesc): New prototype.
4188 (ipa_tdesc): Remove.
4189
41902016-02-24 Pedro Alves <palves@redhat.com>
4191
4192 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4193 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4194 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4195 Factor out common code between the USE_SIGTRAP_SIGINFO and
4196 !USE_SIGTRAP_SIGINFO blocks.
4197 (linux_low_filter_event): Call save_stop_reason instead of
4198 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4199 Update comments.
4200 (linux_wait_1): Update comments.
4201
42022016-02-24 Wei-cheng Wang <cole945@gmail.com>
4203
4204 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4205 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4206 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4207 ppc_insert_point, ppc_remove_point.
4208
42092016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4210
4211 * linux-s390-low.c (s390_supports_z_point_type): New function.
4212 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4213
42142016-02-16 Yao Qi <yao.qi@linaro.org>
4215
4216 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4217 PC. Get pc from regcache_read_pc.
4218
42192016-02-12 Yao Qi <yao.qi@linaro.org>
4220
4221 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4222 or linux_get_pc_32bit.
4223 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4224
42252016-02-12 Yao Qi <yao.qi@linaro.org>
4226
4227 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4228 arm_linux_get_next_pcs_fixup.
4229
42302016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4231
4232 * tracepoint.c (x_tracepoint_action_download): Change
4233 write_inferior_data_ptr to write_inferior_data_pointer.
4234 (cmd_qtstart): Likewise.
4235 (write_inferior_data_ptr): Remove.
4236 (download_agent_expr): Change write_inferior_data_ptr to
4237 write_inferior_data_pointer.
4238 (download_tracepoint_1): Likewise.
4239 (download_tracepoint): Likewise.
4240 (download_trace_state_variables): Likewise.
4241
42422016-02-11 Wei-cheng Wang <cole945@gmail.com>
4243 Marcin Kościelnicki <koriakin@0x04.net>
4244
4245 * tracepoint.c (struct tracepoint_action_ops): Remove.
4246 (struct tracepoint_action): Remove ops.
4247 (m_tracepoint_action_download, r_tracepoint_action_download)
4248 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4249 size and offset accordingly.
4250 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4251 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4252 (tracepoint_action_send, tracepoint_action_download): New functions.
4253 Helpers for trace action handlers.
4254 (add_tracepoint_action): Remove setup actions ops.
4255 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4256
42572016-02-10 Yao Qi <yao.qi@linaro.org>
4258
4259 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4260
42612016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4262
4263 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4264 to AC_OUTPUT.
4265 * configure: Regenerate.
4266
42672016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4268
4269 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4270 void * to gdb_byte *.
4271 * linux-low.c (siginfo_fixup): Likewise.
4272 (linux_xfer_siginfo): Likewise.
4273 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4274 Likewise.
4275 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4276
42772016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4278
4279 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4280 to srv_tgtobj.
4281 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4282 to srv_tgtobj.
4283 * linux-x86-low.c [__x86_64__]: Include
4284 "nat/amd64-linux-siginfo.h".
4285 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4286 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4287 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4288 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4289 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4290 (cpt_si_fd, si_timerid, si_overrun): Move from
4291 nat/amd64-linux-siginfo.c.
4292 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4293
42942016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4295
4296 * server.c (skip_to_semicolon): Remove.
4297 (process_point_options): Use strchrnul instead of
4298 skip_to_semicolon.
4299
43002016-01-26 Yao Qi <yao.qi@linaro.org>
4301
4302 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4303 * linux-low.c (install_software_single_step_breakpoints): Don't
4304 call regcache_read_pc.
4305 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4306 argument pc.
4307
43082016-01-26 Yao Qi <yao.qi@linaro.org>
4309
4310 * linux-low.c (install_software_single_step_breakpoints): Call
4311 regcache_read_pc instead of get_pc.
4312
43132016-01-26 Yao Qi <yao.qi@linaro.org>
4314
4315 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4316 (unblock_async_io): Rename to ...
4317 (block_unblock_async_io): ... it. New function.
4318 (enable_async_io): Don't install SIGIO handler. Unblock it
4319 instead.
4320 (disable_async_io): Don't ignore SIGIO. Block it instead.
4321 (initialize_async_io): Install SIGIO handler. Don't call
4322 unblock_async_io.
4323
43242016-01-26 Yao Qi <yao.qi@linaro.org>
4325
4326 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4327 first character is '\003', call *the_target->request_interrupt.
4328
43292016-01-25 Yao Qi <yao.qi@linaro.org>
4330
4331 * remote-utils.c (new_thread_notify): Remove.
4332 (dead_thread_notify): Likewise.
4333 * remote-utils.h (new_thread_notify): Remove declaration.
4334 (dead_thread_notify): Likewise.
4335
43362016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4337
4338 * gdb.trace/pending.exp: Fix expected message on continue.
4339
43402016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4341
4342 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4343 it works properly on big-endian machines where sizeof (CORE_ADDR)
4344 != sizeof (void *).
4345
43462016-01-21 Pedro Alves <palves@redhat.com>
4347
4348 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4349 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4350 * configure: Regenerate.
4351
43522016-01-21 Yao Qi <yao.qi@linaro.org>
4353
4354 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4355 is_thumb and set it according to CPSR saved on the stack.
4356 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4357 arm_sigreturn_next_pc.
4358
43592016-01-18 Yao Qi <yao.qi@linaro.org>
4360
4361 * linux-low.c (linux_set_pc_64bit): New function.
4362 (linux_get_pc_64bit): New function.
4363 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4364 Declare.
4365 * linux-sparc-low.c (debug_threads): Remove declaration.
4366 (sparc_get_pc): Remove.
4367 (the_low_target): Use linux_get_pc_64bit instead of
4368 sparc_get_pc.
4369 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4370 (the_low_target): Use linux_get_pc_64bit and
4371 linux_set_pc_64bit.
4372
43732016-01-18 Yao Qi <yao.qi@linaro.org>
4374
4375 * linux-arm-low.c (debug_threads): Remove declaration.
4376 (arm_get_pc, arm_set_pc): Remove.
4377 (the_low_target): Use linux_get_pc_32bit and
4378 linux_set_pc_32bit.
4379 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4380 (the_low_target): Use linux_get_pc_32bit and
4381 linux_set_pc_32bit.
4382 * linux-cris-low.c (debug_threads): Remove declaration.
4383 (cris_get_pc, cris_set_pc,): Remove.
4384 (the_low_target): Use linux_get_pc_32bit and
4385 linux_set_pc_32bit.
4386 * linux-crisv32-low.c (debug_threads): Remove declaration.
4387 (cris_get_pc, cris_set_pc): Remove.
4388 (the_low_target): Use linux_get_pc_32bit and
4389 linux_set_pc_32bit.
4390 * linux-low.c: Include inttypes.h.
4391 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4392 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4393 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4394 (the_low_target): Use linux_get_pc_32bit and
4395 linux_set_pc_32bit.
4396 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4397 (the_low_target): Use linux_get_pc_32bit and
4398 linux_set_pc_32bit.
4399 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4400 (the_low_target): Use linux_get_pc_32bit and
4401 linux_set_pc_32bit.
4402 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4403 (the_low_target): Use linux_get_pc_32bit and
4404 linux_set_pc_32bit.
4405 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4406 (the_low_target): Use linux_get_pc_32bit and
4407 linux_set_pc_32bit.
4408
44092016-01-18 Gary Benson <gbenson@redhat.com>
4410
4411 * configure.ac (AC_FUNC_FORK): New check.
4412 * config.in: Regenerate.
4413 * configure: Likewise.
4414
44152016-01-14 Yao Qi <yao.qi@linaro.org>
4416
4417 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4418 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4419 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4420 arm_get_next_pcs_ctor.
4421
44222016-01-12 Josh Stone <jistone@redhat.com>
4423 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4424
4425 * inferiors.h: Include "gdb_vecs.h".
4426 (struct process_info): Add syscalls_to_catch.
4427 * inferiors.c (remove_process): Free syscalls_to_catch.
4428 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4429 syscall_return stops.
4430 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4431 * server.c (handle_general_set): Handle QCatchSyscalls.
4432 (handle_query): Report support for QCatchSyscalls.
4433 * target.h (struct target_ops): Add supports_catch_syscall.
4434 (target_supports_catch_syscall): New macro.
4435 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4436 (struct lwp_info): Add syscall_state.
4437 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4438 Maintain syscall_state and syscalls_to_catch across exec.
4439 (get_syscall_trapinfo): New function, proxy to the_low_target.
4440 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4441 (linux_low_filter_event): Toggle syscall_state entry/return for
4442 syscall traps, and set it ignored for all others.
4443 (gdb_catching_syscalls_p): New function.
4444 (gdb_catch_this_syscall_p): New function.
4445 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4446 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4447 (linux_supports_catch_syscall): New function.
4448 (linux_target_ops): Install it.
4449 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4450 (the_low_target): Install it.
4451
44522016-01-12 Mike Frysinger <vapier@gentoo.org>
4453
4454 * acinclude.m4: Include new ../warning.m4 file.
4455 * configure: Regenerated.
4456 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4457
44582016-01-12 Mike Frysinger <vapier@gentoo.org>
4459
4460 * ax.c (is_goto_target): Mark static.
4461 * linux-low.c (register_addr): Likewise.
4462 (linux_fetch_registers, linux_store_registers): Likewise.
4463 * mem-break.c (any_persistent_commands): Fix old prototype.
4464 (add_commands_to_breakpoint): Mark static.
4465 * regcache.c (find_register_by_name): Delete unused func.
4466 * remote-utils.c (hex_or_minus_one): Mark static.
4467 * server.c (monitor_show_help): Mark static.
4468 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4469 handle_v_requests): Likewise.
4470
44712016-01-12 Pedro Alves <palves@redhat.com>
4472
4473 Remove use of the registered trademark symbol throughout.
4474
44752016-01-08 Yao Qi <yao.qi@linaro.org>
4476
4477 * remote-utils.c (getpkt): If c is '\003', call target hook
4478 request_interrupt.
4479
44802016-01-06 Yao Qi <yao.qi@linaro.org>
4481
4482 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4483 linux-aarch32-low.c.
4484 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4485 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4486 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4487 (thumb2_breakpoint): Declare.
4488 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4489 linux-aarch32-low.h.
4490 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4491 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4492 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4493
44942016-01-01 Joel Brobecker <brobecker@adacore.com>
4495
4496 * gdbreplay.c (gdbreplay_version): Change copyright year in
4497 version message.
4498 * server.c (gdbserver_version): Likewise.
4499
45002015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4501
4502 * server.c (crc32_table): Delete.
4503 (crc32): Use libiberty's xcrc32 function.
4504
45052015-12-22 Joel Brobecker <brobecker@adacore.com>
4506
4507 * lynx-low.c (lynx_delete_thread_callback): New function.
4508 (lynx_mourn): Properly delete our process and all of its
4509 threads. Remove call to clear_inferiors.
4510
45112015-12-22 Joel Brobecker <brobecker@adacore.com>
4512
4513 * target.c (thread_search_callback): Add check that
4514 the thread_stopped target callback is not NULL before
4515 calling it.
4516
45172015-12-21 Yao Qi <yao.qi@linaro.org>
4518
4519 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4520 arm breakpoint.
4521
45222015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4523
4524 * server.c (handle_query): Call target_supports_software_single_step.
4525
45262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4527
4528 * linux-low.c (single_step): New function.
4529 (linux_resume_one_lwp_throw): Call single_step.
4530 (start_step_over): Likewise.
4531
45322015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4533
4534 * Makefile.in (SFILES): Append arch/arm-linux.c,
4535 arch/arm-get-next-pcs.c.
4536 (arm-linux.o): New rule.
4537 (arm-get-next-pcs.o): New rule.
4538 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4539 arm-linux.o.
4540 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4541 to linux-aarch32-low.c.
4542 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4543 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4544 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4545 (thumb2_breakpoint_len): Likewise.
4546 (arm_is_thumb_mode): Make non-static.
4547 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4548 from linux-aarch32-low.c.
4549 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4550 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4551 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4552 (thumb2_breakpoint_len): Likewise.
4553 (arm_is_thumb_mode): New declaration.
4554 * linux-arm-low.c: Include arch/arm-linux.h
4555 aarch/arm-get-next-pcs.h, sys/syscall.h.
4556 (get_next_pcs_ops): New struct.
4557 (get_next_pcs_addr_bits_remove): New function.
4558 (get_next_pcs_is_thumb): New function.
4559 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4560 (arm_sigreturn_next_pc): Likewise.
4561 (get_next_pcs_syscall_next_pc): Likewise.
4562 (arm_gdbserver_get_next_pcs): Likewise.
4563 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4564 Initialize.
4565 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4566 * server.h: Include gdb_vecs.h.
4567
45682015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4569
4570 * Makefile.in (SFILES): Append common/common-regcache.c.
4571 (OBS): Append common-regcache.o.
4572 (common-regcache.o): New rule.
4573 * regcache.c (init_register_cache): Initialize cache to
4574 REG_UNAVAILABLE.
4575 (regcache_raw_read_unsigned): New function.
4576 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4577 register_status enum.
4578
45792015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4580
4581 * linux-aarch64-low.c (the_low_targets): Rename
4582 breakpoint_reinsert_addr to get_next_pcs.
4583 * linux-arm-low.c (the_low_targets): Likewise.
4584 * linux-bfin-low.c (the_low_targets): Likewise.
4585 * linux-cris-low.c (the_low_targets): Likewise.
4586 * linux-crisv32-low.c (the_low_targets): Likewise.
4587 * linux-low.c (can_software_single_step): Likewise.
4588 (install_software_single_step_breakpoints): New function.
4589 (start_step_over): Use install_software_single_step_breakpoints.
4590 * linux-low.h: New CORE_ADDR vector.
4591 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4592 get_next_pcs.
4593 * linux-mips-low.c (the_low_targets): Likewise.
4594 * linux-nios2-low.c (the_low_targets): Likewise.
4595 * linux-sparc-low.c (the_low_targets): Likewise.
4596
45972015-12-17 Pedro Alves <palves@redhat.com>
4598
4599 * linux-low.c (linux_kill_one_lwp): Remove references to
4600 LinuxThreads.
4601 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4602 to 'kill'.
4603 (linux_init_signals): Delete.
4604 (initialize_low): Adjust.
4605 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4606
46072015-12-16 Pedro Alves <palves@redhat.com>
4608
4609 * configure.ac (compiler warning flags): When testing a
4610 -Wno-foo option, check whether -Wfoo works instead.
4611 * configure: Regenerate.
4612
46132015-12-11 Don Breazeal <donb@codesourcery.com>
4614
4615 * server.c (process_serial_event): Don't exit from gdbserver
4616 in remote mode if there are still active inferiors.
4617
46182015-12-11 Yao Qi <yao.qi@linaro.org>
4619
4620 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4621 arm_breakpoint_at if the process is 32-bit.
4622
46232015-12-11 Yao Qi <yao.qi@linaro.org>
4624
4625 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4626 arm breakpoint.
4627
46282015-12-07 Yao Qi <yao.qi@linaro.org>
4629
4630 * configure.srv: Append arm.o to srv_tgtobj for
4631 aarch64*-*-linux* target.
4632 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4633 from linux-arm-low.c.
4634 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4635 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4636 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4637 (thumb2_breakpoint_len): Likewise.
4638 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4639 (arm_breakpoint_kinds): Likewise.
4640 (arm_breakpoint_kind_from_pc): Likewise.
4641 (arm_sw_breakpoint_from_kind): Likewise.
4642 (arm_breakpoint_kind_from_current_state): Likewise.
4643 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4644 (arm_sw_breakpoint_from_kind): Declare.
4645 (arm_breakpoint_kind_from_current_state): Declare.
4646 (arm_breakpoint_at): Declare.
4647 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4648 arm_sw_breakpoint_from_kind if process is 32-bit.
4649 (aarch64_breakpoint_kind_from_pc): New function.
4650 (aarch64_breakpoint_kind_from_current_state): New function.
4651 (the_low_target): Initialize fields breakpoint_kind_from_pc
4652 and breakpoint_kind_from_current_state.
4653 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4654 linux-aarch32-low.c.
4655 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4656 (arm_breakpoint, arm_breakpoint_len): Likewise.
4657 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4658 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4659 (arm_is_thumb_mode): Likewise.
4660 (arm_breakpoint_at): Likewise.
4661 (arm_breakpoint_kind_from_pc): Likewise.
4662 (arm_sw_breakpoint_from_kind): Likewise.
4663 (arm_breakpoint_kind_from_current_state): Likewise.
4664
4665 Revert:
4666 2015-08-04 Yao Qi <yao.qi@linaro.org>
4667
4668 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4669 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4670 * server.c (extended_protocol): Remove "static".
4671 * server.h (extended_protocol): Declare it.
4672
46732015-12-04 Josh Stone <jistone@redhat.com>
4674
4675 * target.h (struct target_ops) <arch_setup>: Rename to ...
4676 (struct target_ops) <post_create_inferior>: ... this.
4677 (target_arch_setup): Rename to ...
4678 (target_post_create_inferior): ... this, calling post_create_inferior.
4679 * server.c (start_inferior): Update target_arch_setup calls to
4680 target_post_create_inferior.
4681 * linux-low.c (linux_low_ptrace_options): Forward declare.
4682 (linux_arch_setup): Update its comment for general use.
4683 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4684 (struct linux_target_ops): Use linux_post_create_inferior.
4685 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4686 to post_create_inferior.
4687 * nto-low.c (struct nto_target_ops): Likewise.
4688 * spu-low.c (struct spu_target_ops): Likewise.
4689 * win32-low.c (struct win32_target_ops): Likewise.
4690
46912015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4692
4693 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4694
46952015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4696
4697 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4698 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4699 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4700 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4701 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4702 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4703 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4704 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4705 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4706 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4707 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4708 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4709
47102015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4711
4712 * linux-low.c (linux_look_up_symbols): Don't call
4713 linux_supports_traceclone.
4714 * linux-low.h (thread_db_init): Remove use_events argument.
4715 * thread-db.c (thread_db_use_event): Remove global variable.
4716 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4717 (struct thread_db) <td_create_bp>: Remove field.
4718 (thread_db_create_event): Remove function.
4719 (thread_db_enable_reporting): Likewise.
4720 (find_one_thread): Don't check for thread_db_use_events.
4721 (attach_thread): Likewise.
4722 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4723 (try_thread_db_load_1): Don't check for thread_db_use_events.
4724 (thread_db_init): Remove use_events argument and thread events
4725 handling.
4726 (remove_thread_event_breakpoints): Remove function.
4727 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4728
47292015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4730
4731 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4732 New function.
4733 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4734 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4735 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4736 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4737 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4738 Initialize.
4739 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4740 New function.
4741 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4742 * linux-low.c (can_hardware_single_step): Use
4743 supports_hardware_single_step.
4744 (can_software_single_step): New function.
4745 (start_step_over): Call can_software_single_step.
4746 (linux_supports_hardware_single_step): New function.
4747 (struct target_ops) <supports_software_single_step>: Initialize.
4748 * linux-low.h (struct linux_target_ops)
4749 <supports_hardware_single_step>: Initialize.
4750 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4751 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4752 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4753 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4754 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4755 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4756 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4757 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4758 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4759 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4760 Initialize.
4761 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4762 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4763 Initialize.
4764 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4765 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4766 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4767 New function.
4768 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4769 * target.h (struct target_ops): <supports_software_single_step>:
4770 New field.
4771 (target_supports_software_single_step): New macro.
4772
47732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4774
4775 * linux-low.c (linux_wait_1): Fix pc advance condition.
4776 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4777 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4778
47792015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4780
4781 * linux-arm-low.c (arm_is_thumb_mode): New function.
4782 (arm_breakpoint_at): Use arm_is_thumb_mode.
4783 (arm_breakpoint_kind_from_current_state): New function.
4784 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4785 Initialize.
4786 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4787 (linux_breakpoint_kind_from_current_state): New function.
4788 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4789 * linux-low.h (struct linux_target_ops)
4790 <breakpoint_kind_from_current_state>: New field.
4791 * target.h (struct target_ops): Likewise.
4792 (target_breakpoint_kind_from_current_state): New macro.
4793
47942015-11-30 Pedro Alves <palves@redhat.com>
4795
4796 * linux-low.c (linux_resume): Wake up the event loop before
4797 returning.
4798
47992015-11-30 Pedro Alves <palves@redhat.com>
4800
4801 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4802 check.
4803 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4804 to -1.
4805 * target.c (struct thread_search): New structure.
4806 (thread_search_callback): New function.
4807 (prev_general_thread): New global.
4808 (prepare_to_access_memory, done_accessing_memory): New functions.
4809 * target.h (prepare_to_access_memory, done_accessing_memory):
4810 Replace macros with function declarations.
4811
48122015-11-30 Pedro Alves <palves@redhat.com>
4813
4814 PR 14618
4815 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4816 report TARGET_WAITKIND_NO_RESUMED.
4817 * remote-utils.c (prepare_resume_reply): Handle
4818 TARGET_WAITKIND_NO_RESUMED.
4819 * server.c (report_no_resumed): New global.
4820 (handle_query) <qSupported>: Handle "no-resumed+". Report
4821 "no-resumed+" support.
4822 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4823 return error if the client doesn't support no-resumed events.
4824 (push_stop_notification): New function.
4825 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4826 events if the client supports them.
4827
48282015-11-30 Pedro Alves <palves@redhat.com>
4829
4830 * linux-low.c (thread_still_has_status_pending_p): Don't check
4831 vCont;t here.
4832 (lwp_resumed): New function.
4833 (status_pending_p_callback): Return early if the LWP is not
4834 supposed to be resumed.
4835
48362015-11-30 Pedro Alves <palves@redhat.com>
4837
4838 * linux-low.c (handle_extended_wait): Assert that the LWP's
4839 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4840 thread create events, leave the new child's status pending.
4841 (linux_low_filter_event): If GDB wants to hear about thread exit
4842 events, leave the LWP marked dead and don't delete it.
4843 (linux_wait_for_event_filtered): Don't check for thread exit.
4844 (filter_exit_event): New function.
4845 (linux_wait_1): Use it, when returning an exit event.
4846 (linux_resume_one_lwp_throw): Assert that the LWP's
4847 waitstatus is TARGET_WAITKIND_IGNORE.
4848 * remote-utils.c (prepare_resume_reply): Handle
4849 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4850 * server.c (report_thread_events): New global.
4851 (handle_general_set): Handle QThreadEvents.
4852 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4853 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4854 TARGET_WAITKIND_THREAD_EXITED.
4855 * server.h (report_thread_events): Declare.
4856
48572015-11-30 Pedro Alves <palves@redhat.com>
4858
4859 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4860 the thread's last_resume_kind was resume_stop.
4861
48622015-11-30 Pedro Alves <palves@redhat.com>
4863
4864 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4865 before returning.
4866
48672015-11-30 Pedro Alves <palves@redhat.com>
4868
4869 * server.c (handle_v_requests): Handle vCtrlC.
4870
48712015-11-30 Pedro Alves <palves@redhat.com>
4872
4873 * gdbthread.h (find_any_thread_of_pid): Declare.
4874 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4875 functions.
4876 * server.c (handle_query): If current_thread is NULL, look for
4877 another thread of the selected process.
4878
48792015-11-26 Daniel Colascione <dancol@dancol.org>
4880 Simon Marchi <simon.marchi@ericsson.com>
4881
4882 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4883 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4884 name in reply.
4885 * target.h (struct target_ops) <thread_name>: New field.
4886 (target_thread_name): New macro.
4887
48882015-11-23 Joel Brobecker <brobecker@adacore.com>
4889
4890 * regcache.h (regcache_invalidate_pid): Add declaration.
4891 * regcache.c (regcache_invalidate_pid): New function, extracted
4892 from regcache_invalidate.
4893 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4894 Add trivial documentation comment.
4895 * lynx-low.c: Use regcache_invalidate_pid instead of
4896 regcache_invalidate.
4897
48982015-11-23 Joel Brobecker <brobecker@adacore.com>
4899
4900 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4901 and Elf64_auxv_t if the target is Android.
4902
49032015-11-22 Doug Evans <xdje42@gmail.com>
4904
4905 * target.h: #include <sys/types.h>.
4906
49072015-11-19 Pedro Alves <palves@redhat.com>
4908
4909 * linux-low.c (linux_process_qsupported): Change prototype.
4910 Adjust.
4911 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4912 Change prototype.
4913 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4914 and adjust to loop over all features.
4915 * server.c (handle_query) <qSupported>: Adjust to call
4916 target_process_qsupported once, passing it a vector of unprocessed
4917 features.
4918 * target.h (struct target_ops) <process_qsupported>: Change
4919 prototype.
4920 (target_process_qsupported): Adjust.
4921
49222015-11-19 Pedro Alves <palves@redhat.com>
4923
4924 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4925 mode.
4926 * configure: Regenerate.
4927
49282015-11-19 Pedro Alves <palves@redhat.com>
4929
4930 * configure: Regenerate.
4931
49322015-11-19 Yao Qi <yao.qi@linaro.org>
4933
4934 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4935 type to uint32_t.
4936
49372015-11-19 Yao Qi <yao.qi@linaro.org>
4938
4939 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4940 (struct aarch64_operand): Move enum out.
4941
49422015-11-19 Yao Qi <yao.qi@linaro.org>
4943
4944 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4945 struct user_fpsimd_state *.
4946 (aarch64_store_fpregset): Likewise.
4947
49482015-11-19 Yao Qi <yao.qi@linaro.org>
4949
4950 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4951 struct user_pt_regs *.
4952 (aarch64_store_gregset): Likewise.
4953
49542015-11-18 Pedro Alves <palves@redhat.com>
4955
4956 * Makefile.in (all_object_files): Add $IPA_OBJS.
4957
49582015-11-17 Pedro Alves <palves@redhat.com>
4959
4960 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4961 GDB_SIGNAL_0 and gdb_signal_to_string.
4962
49632015-11-17 Pedro Alves <palves@redhat.com>
4964
4965 * win32-low.c (handle_output_debug_string): Remove parameter.
4966 (win32_kill): Remove our_status local and adjust call to
4967 handle_output_debug_string.
4968 (get_child_debug_event): Adjust call to
4969 handle_output_debug_string.
4970
49712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4972
4973 * linux-mips-low.c (mips_fill_gregset): Add cast.
4974 (mips_store_gregset): Likewise.
4975 (mips_fill_fpregset): Likewise.
4976 (mips_store_fpregset): Likewise.
4977
49782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4979
4980 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4981 priv.
4982
49832015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4984
4985 * linux-mips-low.c (mips_linux_new_thread): Change type of
4986 watch_type to enum target_hw_bp_type.
4987
49882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4989
4990 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4991 Change return type to arm_hwbp_type.
4992
49932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4994
4995 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4996 (arm_store_gregset): Likewise.
4997 * linux-arm-low.c (arm_get_hwcap): Likewise.
4998 (arm_read_description): Likewise.
4999
50002015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5001
5002 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5003
50042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5005
5006 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5007 (ppc_fill_vsxregset): Likewise.
5008 (ppc_store_vsxregset): Likewise.
5009 (ppc_fill_vrregset): Likewise.
5010 (ppc_store_vrregset): Likewise.
5011 (ppc_fill_evrregset): Likewise.
5012 (ppc_store_evrregset): Likewise.
5013
50142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5015
5016 * linux-ppc-low.c (ppc_usrregs_info): Remove
5017 forward-declaration.
5018 (ppc_arch_setup): Move lower in file.
5019
50202015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5021
5022 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5023 (ps_pdwrite): Likewise.
5024
50252015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5026
5027 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5028 to after assert checks.
5029
50302015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5031
5032 * proc-service.c (ps_pdread): Add/adjust casts.
5033 (ps_pdwrite): Add/adjust casts.
5034
50352015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5036
5037 * server.c (handle_search_memory_1): Cast return value of
5038 memmem.
5039
50402015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5041
5042 * server.c (write_qxfer_response): Change type of data to
5043 gdb_byte *.
5044
50452015-10-29 Pedro Alves <palves@redhat.com>
5046
5047 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5048
50492015-10-29 Pedro Alves <palves@redhat.com>
5050
5051 * tracepoint.c (clear_installed_tracepoints): Add casts.
5052
50532015-10-29 Pedro Alves <palves@redhat.com>
5054
5055 * server.c (handle_v_cont, process_serial_event): Add enum
5056 gdb_signal casts to signal parsing code.
5057
50582015-10-29 Pedro Alves <palves@redhat.com>
5059
5060 * linux-low.h (NULL_REGSET): Define.
5061 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5062 * linux-arm-low.c (arm_regsets): Likewise.
5063 * linux-crisv32-low.c (cris_regsets): Likewise.
5064 * linux-m68k-low.c (m68k_regsets): Likewise.
5065 * linux-mips-low.c (mips_regsets): Likewise.
5066 * linux-nios2-low.c (nios2_regsets): Likewise.
5067 * linux-ppc-low.c (ppc_regsets): Likewise.
5068 * linux-s390-low.c (s390_regsets): Likewise.
5069 * linux-sh-low.c (sh_regsets): Likewise.
5070 * linux-sparc-low.c (sparc_regsets): Likewise.
5071 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5072 * linux-tile-low.c (tile_regsets): Likewise.
5073 * linux-x86-low.c (x86_regsets): Likewise.
5074 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5075
50762015-10-29 Pedro Alves <palves@redhat.com>
5077
5078 * linux-low.h (NULL_REGSET): Define.
5079 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5080 * linux-arm-low.c (arm_regsets): Likewise.
5081 * linux-crisv32-low.c (cris_regsets): Likewise.
5082 * linux-m68k-low.c (m68k_regsets): Likewise.
5083 * linux-mips-low.c (mips_regsets): Likewise.
5084 * linux-nios2-low.c (nios2_regsets): Likewise.
5085 * linux-ppc-low.c (ppc_regsets): Likewise.
5086 * linux-s390-low.c (s390_regsets): Likewise.
5087 * linux-sh-low.c (sh_regsets): Likewise.
5088 * linux-sparc-low.c (sparc_regsets): Likewise.
5089 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5090 * linux-tile-low.c (tile_regsets): Likewise.
5091 * linux-x86-low.c (x86_regsets): Likewise.
5092 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5093
50942015-10-26 Doug Evans <dje@google.com>
5095
5096 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5097
50982015-10-26 Doug Evans <dje@google.com>
5099
5100 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5101
51022015-10-26 Doug Evans <dje@google.com>
5103
5104 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5105 for debug_printf.
5106 (attach_thread, find_new_threads_callback): Ditto.
5107
51082015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5109
5110 * mem-break.h (set_breakpoint_data): Remove.
5111
51122015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5113
5114 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5115 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5116 (initialize_low): Remove set_breakpoint_data call.
5117 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5118 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5119 (initialize_low): Remove set_breakpoint_data call.
5120 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5121 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5122 (initialize_low): Remove set_breakpoint_data call.
5123
51242015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5125
5126 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5127 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5128 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5129 * target.h (target_breakpoint_kind_from_pc): New macro.
5130
51312015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5132
5133 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5134 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5135 the default breakpoint kind.
5136
51372015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5138
5139 * linux-arm-low.c (arm_supports_z_point_type): Add software
5140 breakpoint support.
5141
51422015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5143
5144 * linux-arm-low.c: Refactor breakpoint definitions.
5145 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5146 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5147
51482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5149
5150 * Makefile.in: Add arm.c/o.
5151 * configure.srv: Likewise.
5152 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5153 (arm_breakpoint_kind_from_pc): New function.
5154 (arm_sw_breakpoint_from_kind): Return proper kind.
5155 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5156
51572015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5158
5159 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5160 removal.
5161 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5162 (struct raw_breakpoint) <size>: Remove.
5163 (struct raw_breakpoint) <kind>: Add.
5164 (bp_size): New function.
5165 (bp_opcode): Likewise.
5166 (find_raw_breakpoint_at): Adjust for kind.
5167 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5168 (remove_memory_breakpoint): Adjust for kind call bp_size.
5169 (set_raw_breakpoint_at): Adjust for kind.
5170 (set_breakpoint): Likewise.
5171 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5172 (delete_raw_breakpoint): Adjust for kind.
5173 (delete_breakpoint): Likewise.
5174 (find_gdb_breakpoint): Likewise.
5175 (set_gdb_breakpoint_1): Likewise.
5176 (set_gdb_breakpoint): Likewise.
5177 (delete_gdb_breakpoint_1): Likewise.
5178 (delete_gdb_breakpoint): Likewise.
5179 (uninsert_raw_breakpoint): Likewise.
5180 (reinsert_raw_breakpoint): Likewise.
5181 (set_breakpoint_data): Remove.
5182 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5183 (check_mem_read): Adjust for kind call bp_size.
5184 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5185 (clone_one_breakpoint): Adjust for kind.
5186 * mem-break.h (set_gdb_breakpoint): Likewise.
5187 (delete_gdb_breakpoint): Likewise.
5188 * server.c (process_serial_event): Likewise.
5189
51902015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5191
5192 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5193 (struct linux_target_ops) <breakpoint>: Remove.
5194 (struct linux_target_ops) <breakpoint_len>: Remove.
5195 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5196 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5197 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5198 (arm_sw_breakpoint_from_kind): New function.
5199 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5200 (struct linux_target_ops) <breakpoint>: Remove.
5201 (struct linux_target_ops) <breakpoint_len>: Remove.
5202 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5203 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5204 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5205 (struct linux_target_ops) <breakpoint>: Remove.
5206 (struct linux_target_ops) <breakpoint_len>: Remove.
5207 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5208 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5209 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5210 (struct linux_target_ops) <breakpoint>: Remove.
5211 (struct linux_target_ops) <breakpoint_len>: Remove.
5212 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5213 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5214 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5215 and sw_breakpoint_from_kind to increment the pc.
5216 (linux_breakpoint_kind_from_pc): New function.
5217 (linux_sw_breakpoint_from_kind): New function.
5218 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5219 (initialize_low): Call breakpoint_kind_from_pc and
5220 sw_breakpoint_from_kind to replace breakpoint_data/len.
5221 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5222 New field.
5223 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5224 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5225 (struct linux_target_ops) <breakpoint>: Remove.
5226 (struct linux_target_ops) <breakpoint_len>: Remove.
5227 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5228 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5229 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5230 (struct linux_target_ops) <breakpoint>: Remove.
5231 (struct linux_target_ops) <breakpoint_len>: Remove.
5232 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5233 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5234 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5235 (struct linux_target_ops) <breakpoint>: Remove.
5236 (struct linux_target_ops) <breakpoint_len>: Remove.
5237 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5238 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5239 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5240 (struct linux_target_ops) <breakpoint>: Remove.
5241 (struct linux_target_ops) <breakpoint_len>: Remove.
5242 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5243 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5244 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5245 (struct linux_target_ops) <breakpoint>: Remove.
5246 (struct linux_target_ops) <breakpoint_len>: Remove.
5247 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5248 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5249 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5250 (struct linux_target_ops) <breakpoint>: Remove.
5251 (struct linux_target_ops) <breakpoint_len>: Remove.
5252 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5253 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5254 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5255 (struct linux_target_ops) <breakpoint>: Remove.
5256 (struct linux_target_ops) <breakpoint_len>: Remove.
5257 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5258 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5259 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5260 (struct linux_target_ops) <breakpoint>: Remove.
5261 (struct linux_target_ops) <breakpoint_len>: Remove.
5262 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5263 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5264 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5265 (struct linux_target_ops) <breakpoint>: Remove.
5266 (struct linux_target_ops) <breakpoint_len>: Remove.
5267 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5268 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5269 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5270 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5271 (struct linux_target_ops) <breakpoint>: Remove.
5272 (struct linux_target_ops) <breakpoint_len>: Remove.
5273 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5274 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5275 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5276 (struct linux_target_ops) <breakpoint>: Remove.
5277 (struct linux_target_ops) <breakpoint_len>: Remove.
5278 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5279 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5280
52812015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5282
5283 * linux-cris-low.c (cris_get_pc): Remove void arg.
5284
52852015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5286
5287 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5288 variable name.
5289
52902015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5291
5292 * inferiors.c (thread_pid_matches_callback): New function.
5293 (find_thread_process): New function.
5294 (remove_thread): Reset current_thread.
5295 (remove_process): Assert threads have been removed first.
5296
52972015-10-15 Yao Qi <yao.qi@linaro.org>
5298
5299 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5300 if it is 3.
5301 (aarch64_remove_point): Likewise.
5302 * regcache.c (regcache_register_size): New function.
5303
53042015-10-12 Yao Qi <yao.qi@linaro.org>
5305
5306 * linux-aarch64-low.c: Update all callers as emit_load_store
5307 is renamed to aarch64_emit_load_store.
5308
53092015-10-12 Yao Qi <yao.qi@linaro.org>
5310
5311 * linux-aarch64-low.c: Update all callers of function renaming
5312 from emit_insn to aarch64_emit_insn.
5313
53142015-10-12 Yao Qi <yao.qi@linaro.org>
5315
5316 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5317 arch/aarch64-insn.h.
5318 (struct aarch64_memory_operand): Likewise.
5319 (ENCODE): Likewise.
5320 (emit_insn): Move to arch/aarch64-insn.c.
5321 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5322 (emit_load_store): Move to arch/aarch64-insn.c.
5323 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5324 (can_encode_int32): Remove.
5325
53262015-10-12 Yao Qi <yao.qi@linaro.org>
5327
5328 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5329 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5330 (aarch64_relocate_instruction): Likewise.
5331 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5332 (struct aarch64_insn_visitor): Likewise.
5333
53342015-10-12 Yao Qi <yao.qi@linaro.org>
5335
5336 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5337 (struct aarch64_insn_visitor): New.
5338 (struct aarch64_insn_relocation_data): New.
5339 (aarch64_ftrace_insn_reloc_b): New function.
5340 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5341 (aarch64_ftrace_insn_reloc_cb): Likewise.
5342 (aarch64_ftrace_insn_reloc_tb): Likewise.
5343 (aarch64_ftrace_insn_reloc_adr): Likewise.
5344 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5345 (aarch64_ftrace_insn_reloc_others): Likewise.
5346 (visitor): New.
5347 (aarch64_relocate_instruction): Use visitor.
5348
53492015-10-12 Yao Qi <yao.qi@linaro.org>
5350
5351 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5352 int. Add argument buf.
5353 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5354 aarch64_relocate_instruction.
5355
53562015-10-12 Yao Qi <yao.qi@linaro.org>
5357
5358 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5359 argument insn. Remove local variable insn. Don't call
5360 target_read_uint32.
5361 (aarch64_install_fast_tracepoint_jump_pad): Call
5362 target_read_uint32.
5363
53642015-09-30 Yao Qi <yao.qi@linaro.org>
5365
5366 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5367 (emit_load_store_pair): Likewise.
5368
53692015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5370
5371 * dll.c (match_dll): Add cast(s).
5372 (unloaded_dll): Likewise.
5373 * linux-low.c (second_thread_of_pid_p): Likewise.
5374 (delete_lwp_callback): Likewise.
5375 (count_events_callback): Likewise.
5376 (select_event_lwp_callback): Likewise.
5377 (linux_set_resume_request): Likewise.
5378 * server.c (accumulate_file_name_length): Likewise.
5379 (emit_dll_description): Likewise.
5380 (handle_qxfer_threads_worker): Likewise.
5381 (visit_actioned_threads): Likewise.
5382 * thread-db.c (any_thread_of): Likewise.
5383 * tracepoint.c (same_process_p): Likewise.
5384 (match_blocktype): Likewise.
5385 (build_traceframe_info_xml): Likewise.
5386
53872015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5388
5389 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5390 assignment.
5391 (gdb_unparse_agent_expr): Likewise.
5392 * hostio.c (require_data): Likewise.
5393 (handle_pread): Likewise.
5394 * linux-low.c (disable_regset): Likewise.
5395 (fetch_register): Likewise.
5396 (store_register): Likewise.
5397 (get_dynamic): Likewise.
5398 (linux_qxfer_libraries_svr4): Likewise.
5399 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5400 (set_fast_tracepoint_jump): Likewise.
5401 (uninsert_fast_tracepoint_jumps_at): Likewise.
5402 (reinsert_fast_tracepoint_jumps_at): Likewise.
5403 (validate_inserted_breakpoint): Likewise.
5404 (clone_agent_expr): Likewise.
5405 * regcache.c (init_register_cache): Likewise.
5406 * remote-utils.c (putpkt_binary_1): Likewise.
5407 (decode_M_packet): Likewise.
5408 (decode_X_packet): Likewise.
5409 (look_up_one_symbol): Likewise.
5410 (relocate_instruction): Likewise.
5411 (monitor_output): Likewise.
5412 * server.c (handle_search_memory): Likewise.
5413 (handle_qxfer_exec_file): Likewise.
5414 (handle_qxfer_libraries): Likewise.
5415 (handle_qxfer): Likewise.
5416 (handle_query): Likewise.
5417 (handle_v_cont): Likewise.
5418 (handle_v_run): Likewise.
5419 (captured_main): Likewise.
5420 * target.c (write_inferior_memory): Likewise.
5421 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5422 * tracepoint.c (init_trace_buffer): Likewise.
5423 (add_tracepoint_action): Likewise.
5424 (add_traceframe): Likewise.
5425 (add_traceframe_block): Likewise.
5426 (cmd_qtdpsrc): Likewise.
5427 (cmd_qtdv): Likewise.
5428 (cmd_qtstatus): Likewise.
5429 (response_source): Likewise.
5430 (response_tsv): Likewise.
5431 (cmd_qtnotes): Likewise.
5432 (gdb_collect): Likewise.
5433 (initialize_tracepoint): Likewise.
5434
54352015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5436
5437 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5438 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5439 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5440 <NOP>: New.
5441 (enum aarch64_condition_codes): New enum.
5442 (w0): New static global.
5443 (fp): Likewise.
5444 (lr): Likewise.
5445 (struct aarch64_memory_operand) <type>: New
5446 MEMORY_OPERAND_POSTINDEX type.
5447 (postindex_memory_operand): New helper function.
5448 (emit_ret): New function.
5449 (emit_load_store_pair): New function, factored out of emit_stp
5450 with support for MEMORY_OPERAND_POSTINDEX.
5451 (emit_stp): Rewrite using emit_load_store_pair.
5452 (emit_ldp): New function.
5453 (emit_load_store): Likewise.
5454 (emit_ldr): Mention post-index instruction in comment.
5455 (emit_ldrh): New function.
5456 (emit_ldrb): New function.
5457 (emit_ldrsw): Mention post-index instruction in comment.
5458 (emit_str): Likewise.
5459 (emit_subs): New function.
5460 (emit_cmp): Likewise.
5461 (emit_and): Likewise.
5462 (emit_orr): Likewise.
5463 (emit_orn): Likewise.
5464 (emit_eor): Likewise.
5465 (emit_mvn): Likewise.
5466 (emit_lslv): Likewise.
5467 (emit_lsrv): Likewise.
5468 (emit_asrv): Likewise.
5469 (emit_mul): Likewise.
5470 (emit_sbfm): Likewise.
5471 (emit_sbfx): Likewise.
5472 (emit_ubfm): Likewise.
5473 (emit_ubfx): Likewise.
5474 (emit_csinc): Likewise.
5475 (emit_cset): Likewise.
5476 (emit_nop): Likewise.
5477 (emit_ops_insns): New helper function.
5478 (emit_pop): Likewise.
5479 (emit_push): Likewise.
5480 (aarch64_emit_prologue): New function.
5481 (aarch64_emit_epilogue): Likewise.
5482 (aarch64_emit_add): Likewise.
5483 (aarch64_emit_sub): Likewise.
5484 (aarch64_emit_mul): Likewise.
5485 (aarch64_emit_lsh): Likewise.
5486 (aarch64_emit_rsh_signed): Likewise.
5487 (aarch64_emit_rsh_unsigned): Likewise.
5488 (aarch64_emit_ext): Likewise.
5489 (aarch64_emit_log_not): Likewise.
5490 (aarch64_emit_bit_and): Likewise.
5491 (aarch64_emit_bit_or): Likewise.
5492 (aarch64_emit_bit_xor): Likewise.
5493 (aarch64_emit_bit_not): Likewise.
5494 (aarch64_emit_equal): Likewise.
5495 (aarch64_emit_less_signed): Likewise.
5496 (aarch64_emit_less_unsigned): Likewise.
5497 (aarch64_emit_ref): Likewise.
5498 (aarch64_emit_if_goto): Likewise.
5499 (aarch64_emit_goto): Likewise.
5500 (aarch64_write_goto_address): Likewise.
5501 (aarch64_emit_const): Likewise.
5502 (aarch64_emit_call): Likewise.
5503 (aarch64_emit_reg): Likewise.
5504 (aarch64_emit_pop): Likewise.
5505 (aarch64_emit_stack_flush): Likewise.
5506 (aarch64_emit_zero_ext): Likewise.
5507 (aarch64_emit_swap): Likewise.
5508 (aarch64_emit_stack_adjust): Likewise.
5509 (aarch64_emit_int_call_1): Likewise.
5510 (aarch64_emit_void_call_2): Likewise.
5511 (aarch64_emit_eq_goto): Likewise.
5512 (aarch64_emit_ne_goto): Likewise.
5513 (aarch64_emit_lt_goto): Likewise.
5514 (aarch64_emit_le_goto): Likewise.
5515 (aarch64_emit_gt_goto): Likewise.
5516 (aarch64_emit_ge_got): Likewise.
5517 (aarch64_emit_ops_impl): New static global variable.
5518 (aarch64_emit_ops): New target function, return
5519 &aarch64_emit_ops_impl.
5520 (struct linux_target_ops): Install it.
5521
55222015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5523
5524 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5525 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5526 aarch64-ipa.o.
5527 * linux-aarch64-ipa.c: New file.
5528 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5529 and endian.h.
5530 (aarch64_get_thread_area): New target method.
5531 (extract_signed_bitfield): New helper function.
5532 (aarch64_decode_ldr_literal): New function.
5533 (enum aarch64_opcodes): New enum.
5534 (struct aarch64_register): New struct.
5535 (struct aarch64_operand): New struct.
5536 (x0): New static global.
5537 (x1): Likewise.
5538 (x2): Likewise.
5539 (x3): Likewise.
5540 (x4): Likewise.
5541 (w2): Likewise.
5542 (ip0): Likewise.
5543 (sp): Likewise.
5544 (xzr): Likewise.
5545 (aarch64_register): New helper function.
5546 (register_operand): Likewise.
5547 (immediate_operand): Likewise.
5548 (struct aarch64_memory_operand): New struct.
5549 (offset_memory_operand): New helper function.
5550 (preindex_memory_operand): Likewise.
5551 (enum aarch64_system_control_registers): New enum.
5552 (ENCODE): New macro.
5553 (emit_insn): New helper function.
5554 (emit_b): New function.
5555 (emit_bcond): Likewise.
5556 (emit_cb): Likewise.
5557 (emit_tb): Likewise.
5558 (emit_blr): Likewise.
5559 (emit_stp): Likewise.
5560 (emit_ldp_q_offset): Likewise.
5561 (emit_stp_q_offset): Likewise.
5562 (emit_load_store): Likewise.
5563 (emit_ldr): Likewise.
5564 (emit_ldrsw): Likewise.
5565 (emit_str): Likewise.
5566 (emit_ldaxr): Likewise.
5567 (emit_stxr): Likewise.
5568 (emit_stlr): Likewise.
5569 (emit_data_processing_reg): Likewise.
5570 (emit_data_processing): Likewise.
5571 (emit_add): Likewise.
5572 (emit_sub): Likewise.
5573 (emit_mov): Likewise.
5574 (emit_movk): Likewise.
5575 (emit_mov_addr): Likewise.
5576 (emit_mrs): Likewise.
5577 (emit_msr): Likewise.
5578 (emit_sevl): Likewise.
5579 (emit_wfe): Likewise.
5580 (append_insns): Likewise.
5581 (can_encode_int32_in): New helper function.
5582 (aarch64_relocate_instruction): New function.
5583 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5584 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5585 (struct linux_target_ops): Install aarch64_get_thread_area,
5586 aarch64_install_fast_tracepoint_jump_pad and
5587 aarch64_get_min_fast_tracepoint_insn_len.
5588
55892015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5590
5591 * Makefile.in (aarch64-insn.o): New rule.
5592 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5593
55942015-09-21 Yao Qi <yao.qi@linaro.org>
5595
5596 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5597
55982015-09-21 Yao Qi <yao.qi@linaro.org>
5599
5600 * tracepoint.c (max_jump_pad_size): Remove.
5601
56022015-09-18 Yao Qi <yao.qi@linaro.org>
5603
5604 * linux-aarch64-low.c: Don't include sys/uio.h.
5605 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5606
56072015-09-16 Wei-cheng Wang <cole945@gmail.com>
5608
5609 * tracepoint.c (eval_result_type): Change prototype.
5610 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5611
56122015-09-15 Pedro Alves <palves@redhat.com>
5613
5614 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5615 Check whether to report exec events instead of checking whether
5616 multiprocess is enabled.
5617
56182015-09-15 Pedro Alves <palves@redhat.com>
5619
5620 PR remote/18965
5621 * remote-utils.c (prepare_resume_reply): Merge
5622 TARGET_WAITKIND_VFORK_DONE switch case with the
5623 TARGET_WAITKIND_FORKED case.
5624
56252015-09-15 Yao Qi <yao.qi@linaro.org>
5626
5627 * server.c (handle_query): Check string comparison using
5628 "else if" instead of "if".
5629
56302015-09-15 Yao Qi <yao.qi@linaro.org>
5631
5632 * server.c (vCont_supported): New global variable.
5633 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5634 matches. Append ";vContSupported+" to own_buf.
5635 (handle_v_requests): Append ";s;S" to own_buf if target supports
5636 hardware single step or vCont_supported is false.
5637 (capture_main): Set vCont_supported to zero.
5638
56392015-09-15 Yao Qi <yao.qi@linaro.org>
5640
5641 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5642 it to ...
5643 (linux_supports_hardware_single_step): ... New function.
5644 (linux_target_ops): Update.
5645 * lynx-low.c (lynx_target_ops): Set field
5646 supports_hardware_single_step to target_can_do_hardware_single_step.
5647 * nto-low.c (nto_target_ops): Likewise.
5648 * spu-low.c (spu_target_ops): Likewise.
5649 * win32-low.c (win32_target_ops): Likewise.
5650 * target.c (target_can_do_hardware_single_step): New function.
5651 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5652 Remove. <supports_hardware_single_step>: New field.
5653 (target_supports_conditional_breakpoints): Remove.
5654 (target_supports_hardware_single_step): New macro.
5655 (target_can_do_hardware_single_step): Declare.
5656 * server.c (handle_query): Use target_supports_hardware_single_step
5657 instead of target_supports_conditional_breakpoints.
5658
56592015-09-15 Yao Qi <yao.qi@linaro.org>
5660
5661 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5662 function.
5663 (struct linux_target_ops the_low_target): Install
5664 aarch64_linux_siginfo_fixup.
5665
56662015-09-11 Don Breazeal <donb@codesourcery.com>
5667 Luis Machado <lgustavo@codesourcery.com>
5668
5669 * linux-low.c (linux_mourn): Static declaration.
5670 (linux_arch_setup): Move in front of
5671 handle_extended_wait.
5672 (linux_arch_setup_thread): New function.
5673 (handle_extended_wait): Handle exec events. Call
5674 linux_arch_setup_thread. Make event_lwp argument a
5675 pointer-to-a-pointer.
5676 (check_zombie_leaders): Do not check stopped threads.
5677 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5678 (linux_low_filter_event): Add lwp and thread for exec'ing
5679 non-leader thread if leader thread has been deleted.
5680 Refactor code into linux_arch_setup_thread and call it.
5681 Pass child lwp pointer by reference to handle_extended_wait.
5682 (linux_wait_for_event_filtered): Update comment.
5683 (linux_wait_1): Prevent clobbering exec event status.
5684 (linux_supports_exec_events): New function.
5685 (linux_target_ops) <supports_exec_events>: Initialize new member.
5686 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5687 new member.
5688 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5689 * server.c (report_exec_events): New global variable.
5690 (handle_query): Handle qSupported query for exec-events feature.
5691 (captured_main): Initialize report_exec_events.
5692 * server.h (report_exec_events): Declare new global variable.
5693 * target.h (struct target_ops) <supports_exec_events>: New
5694 member.
5695 (target_supports_exec_events): New macro.
5696 * win32-low.c (win32_target_ops) <supports_exec_events>:
5697 Initialize new member.
5698
56992015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5700
5701 * linux-low.c (linux_low_enable_btrace): Remove.
5702 (linux_target_ops): Replace linux_low_enable_btrace with
5703 linux_enable_btrace.
5704
57052015-09-03 Yao Qi <yao.qi@linaro.org>
5706
5707 * linux-aarch64-low.c (aarch64_insert_point): Call
5708 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5709 returns true.
5710
57112015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5712
5713 * linux-low.c (check_stopped_by_breakpoint): Use
5714 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5715
57162015-08-27 Pedro Alves <palves@redhat.com>
5717
5718 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5719
57202015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5721
5722 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5723 the XNEW-family equivalent.
5724 (compile_bytecodes): Likewise.
5725 * dll.c (loaded_dll): Likewise.
5726 * event-loop.c (append_callback_event): Likewise.
5727 (create_file_handler): Likewise.
5728 (create_file_event): Likewise.
5729 * hostio.c (handle_open): Likewise.
5730 * inferiors.c (add_thread): Likewise.
5731 (add_process): Likewise.
5732 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5733 * linux-arm-low.c (arm_new_process): Likewise.
5734 (arm_new_thread): Likewise.
5735 * linux-low.c (add_to_pid_list): Likewise.
5736 (linux_add_process): Likewise.
5737 (handle_extended_wait): Likewise.
5738 (add_lwp): Likewise.
5739 (enqueue_one_deferred_signal): Likewise.
5740 (enqueue_pending_signal): Likewise.
5741 (linux_resume_one_lwp_throw): Likewise.
5742 (linux_resume_one_thread): Likewise.
5743 (linux_read_memory): Likewise.
5744 (linux_write_memory): Likewise.
5745 * linux-mips-low.c (mips_linux_new_process): Likewise.
5746 (mips_linux_new_thread): Likewise.
5747 (mips_add_watchpoint): Likewise.
5748 * linux-x86-low.c (initialize_low_arch): Likewise.
5749 * lynx-low.c (lynx_add_process): Likewise.
5750 * mem-break.c (set_raw_breakpoint_at): Likewise.
5751 (set_breakpoint): Likewise.
5752 (add_condition_to_breakpoint): Likewise.
5753 (add_commands_to_breakpoint): Likewise.
5754 (clone_agent_expr): Likewise.
5755 (clone_one_breakpoint): Likewise.
5756 * regcache.c (new_register_cache): Likewise.
5757 * remote-utils.c (look_up_one_symbol): Likewise.
5758 * server.c (queue_stop_reply): Likewise.
5759 (start_inferior): Likewise.
5760 (queue_stop_reply_callback): Likewise.
5761 (handle_target_event): Likewise.
5762 * spu-low.c (fetch_ppc_memory): Likewise.
5763 (store_ppc_memory): Likewise.
5764 * target.c (set_target_ops): Likewise.
5765 * thread-db.c (thread_db_load_search): Likewise.
5766 (try_thread_db_load_1): Likewise.
5767 * tracepoint.c (add_tracepoint): Likewise.
5768 (add_tracepoint_action): Likewise.
5769 (create_trace_state_variable): Likewise.
5770 (cmd_qtdpsrc): Likewise.
5771 (cmd_qtro): Likewise.
5772 (add_while_stepping_state): Likewise.
5773 * win32-low.c (child_add_thread): Likewise.
5774 (get_image_name): Likewise.
5775
57762015-08-25 Yao Qi <yao.qi@linaro.org>
5777
5778 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5779
57802015-08-25 Yao Qi <yao.qi@linaro.org>
5781
5782 * Makefile.in (aarch64-linux.o): New rule.
5783 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5784 srv_tgtobj.
5785 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5786 (aarch64_init_debug_reg_state): Make it extern.
5787 (aarch64_linux_prepare_to_resume): Remove.
5788
57892015-08-25 Yao Qi <yao.qi@linaro.org>
5790
5791 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5792 lwp_arch_private_info and ptid_of_lwp.
5793
57942015-08-25 Yao Qi <yao.qi@linaro.org>
5795
5796 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5797 Find proc_info by find_process_pid. All callers updated.
5798
57992015-08-25 Yao Qi <yao.qi@linaro.org>
5800
5801 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5802 Remove.
5803 (debug_reg_change_callback): Remove.
5804 (aarch64_notify_debug_reg_change): Remove.
5805
58062015-08-25 Yao Qi <yao.qi@linaro.org>
5807
5808 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5809 Call current_lwp_ptid.
5810
58112015-08-25 Yao Qi <yao.qi@linaro.org>
5812
5813 * linux-aarch64-low.c (debug_reg_change_callback): Use
5814 debug_printf.
5815
58162015-08-25 Yao Qi <yao.qi@linaro.org>
5817
5818 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5819
58202015-08-25 Yao Qi <yao.qi@linaro.org>
5821
5822 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5823
58242015-08-25 Yao Qi <yao.qi@linaro.org>
5825
5826 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5827 the code.
5828
58292015-08-25 Yao Qi <yao.qi@linaro.org>
5830
5831 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5832 Remove.
5833 (debug_reg_change_callback): Remove argument entry and add argument
5834 lwp. Remove local variable thread. Don't print thread id in the
5835 debugging output. Don't check whether pid of thread equals to pid.
5836 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5837 iterate_over_lwps instead find_inferior.
5838
58392015-08-24 Pedro Alves <palves@redhat.com>
5840
5841 * inferiors.c (get_first_process): New function.
5842 * inferiors.h (get_first_process): New declaration.
5843 * remote-utils.c (read_ptid): Default to the first process in the
5844 list, instead of to the current thread's process.
5845
58462015-08-24 Pedro Alves <palves@redhat.com>
5847
5848 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5849 * event-loop.c: Likewise.
5850 * remote-utils.c: Likewise.
5851 * tracepoint.c: Likewise.
5852
58532015-08-24 Pedro Alves <palves@redhat.com>
5854
5855 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5856 ptid_get_lwp.
5857
58582015-08-21 Pedro Alves <palves@redhat.com>
5859
5860 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5861 instead of literal 1.
5862
58632015-08-21 Pedro Alves <palves@redhat.com>
5864
5865 * tdesc.c (default_description): Explicitly zero-initialize.
5866
58672015-08-21 Pedro Alves <palves@redhat.com>
5868
5869 PR gdb/18749
5870 * inferiors.c (remove_thread): Discard any pending stop reply for
5871 this thread.
5872 * server.c (remove_all_on_match_pid): Rename to ...
5873 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5874 instead of a pid.
5875 (discard_queued_stop_replies): Change parameter to a ptid. Now
5876 extern.
5877 (handle_v_kill, kill_inferior_callback, captured_main)
5878 (process_serial_event): Adjust.
5879 * server.h (discard_queued_stop_replies): Declare.
5880
58812015-08-21 Pedro Alves <palves@redhat.com>
5882
5883 * linux-low.c (wait_for_sigstop): Always switch to no thread
5884 selected if the previously current thread dies.
5885 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5886 process instead of the current thread's.
5887 * remote-utils.c (input_interrupt): Don't check if there's no
5888 current thread.
5889 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5890 current thread to the general thread fails, error out.
5891 (handle_qxfer_auxv, handle_qxfer_libraries)
5892 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5893 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5894 (handle_query): Check if there's a thread selected instead of
5895 checking whether there's any thread in the thread list.
5896 (handle_qxfer_threads, handle_qxfer_btrace)
5897 (handle_qxfer_btrace_conf): Don't error out early if there's no
5898 thread in the thread list.
5899 (handle_v_cont, myresume): Don't set the current thread to the
5900 continue thread.
5901 (process_serial_event) <Hg handling>: Also set thread_id if the
5902 previous general thread is still alive.
5903 (process_serial_event) <g/G handling>: If setting the current
5904 thread to the general thread fails, error out.
5905 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5906 thread's lwp instead of the current thread's.
5907 * target.c (set_desired_thread): If the desired thread was not
5908 found, leave the current thread pointing to NULL. Return an int
5909 (boolean) indicating success.
5910 * target.h (set_desired_thread): Change return type to int.
5911
59122015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5913
5914 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5915 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5916 #includes.
5917 (ps_get_thread_area): New function.
5918
59192015-08-19 Gary Benson <gbenson@redhat.com>
5920
5921 * hostio.c (handle_pread): Do not attempt to read more data
5922 than hostio_reply_with_data can fit in a packet.
5923
59242015-08-18 Joel Brobecker <brobecker@adacore.com>
5925
5926 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5927
59282015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5929
5930 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5931
59322015-08-06 Pedro Alves <palves@redhat.com>
5933
5934 * tracepoint.c (expr_eval_result): Now an int.
5935
59362015-08-06 Pedro Alves <palves@redhat.com>
5937
5938 * gdbthread.h (struct regcache): Forward declare.
5939 (struct thread_info) <regcache_data>: Now a struct regcache
5940 pointer.
5941 * inferiors.c (inferior_regcache_data)
5942 (set_inferior_regcache_data): Now work with struct regcache
5943 pointers.
5944 * inferiors.h (struct regcache): Forward declare.
5945 (inferior_regcache_data, set_inferior_regcache_data): Now work
5946 with struct regcache pointers.
5947 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5948 (free_register_cache_thread): Remove struct regcache pointer
5949 casts.
5950
59512015-08-06 Pedro Alves <palves@redhat.com>
5952
5953 * server.c (captured_main): On error, print the exception message
5954 to stderr, and if run_once is set, throw a quit.
5955
59562015-08-06 Pedro Alves <palves@redhat.com>
5957
5958 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5959 the current thread.
5960
59612015-08-06 Pedro Alves <palves@redhat.com>
5962
5963 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5964 reading beyond the passed in buffer length.
5965
59662015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5967
5968 * tracepoint.c (symbol_list) <required>: Remove.
5969
59702015-08-06 Pedro Alves <palves@redhat.com>
5971
5972 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5973 count if stopping and suspending threads.
5974 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5975 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5976 (linux_detach): Complete an ongoing step-over.
5977 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5978 throughout.
5979 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5980 (linux_wait_1): If passing a signal to the inferior after
5981 finishing a step-over, unsuspend and re-resume all lwps. If we
5982 see a single-step event but the thread should be continuing, don't
5983 pass the trap to gdb.
5984 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5985 internal_error instead of gdb_assert.
5986 (enqueue_pending_signal): New function.
5987 (check_ptrace_stopped_lwp_gone): Add debug output.
5988 (start_step_over): Use internal_error instead of gdb_assert.
5989 (complete_ongoing_step_over): New function.
5990 (linux_resume_one_thread): Don't resume a suspended thread.
5991 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5992 it stepping.
5993
59942015-08-06 Pedro Alves <palves@redhat.com>
5995
5996 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5997 (linux_thread_alive): Use lwp_is_marked_dead.
5998 (extended_event_reported): Delete.
5999 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6000 instead of extended_event_reported.
6001 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6002 as well.
6003 (lwp_is_marked_dead): New function.
6004 (lwp_running): Use lwp_is_marked_dead.
6005 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6006 comment.
6007
60082015-08-06 Pedro Alves <palves@redhat.com>
6009
6010 * linux-low.c (linux_wait_1): Move fork event output out of the
6011 !report_to_gdb check. Pass event_child->waitstatus to
6012 target_waitstatus_to_string instead of ourstatus.
6013
60142015-08-04 Yao Qi <yao.qi@linaro.org>
6015
6016 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6017 if current_thread is 32 bit.
6018
60192015-08-04 Yao Qi <yao.qi@linaro.org>
6020
6021 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6022 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6023 * server.c (extended_protocol): Remove "static".
6024 * server.h (extended_protocol): Declare it.
6025
60262015-08-04 Yao Qi <yao.qi@linaro.org>
6027
6028 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6029 both aarch64 and aarch32.
6030 (aarch64_set_pc): Likewise.
6031
60322015-08-04 Yao Qi <yao.qi@linaro.org>
6033
6034 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6035 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6036 arm-with-neon.xml to srv_xmlfiles.
6037 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6038 (is_64bit_tdesc): New function.
6039 (aarch64_linux_read_description): New function.
6040 (aarch64_arch_setup): Call aarch64_linux_read_description.
6041 (regs_info): Rename to regs_info_aarch64.
6042 (aarch64_regs_info): Return right regs_info.
6043 (initialize_low_arch): Call initialize_low_arch_aarch32.
6044
60452015-08-04 Yao Qi <yao.qi@linaro.org>
6046
6047 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6048 * linux-aarch32-low.c: New file.
6049 * linux-aarch32-low.h: New file.
6050 * linux-arm-low.c (arm_fill_gregset): Move it to
6051 linux-aarch32-low.c.
6052 (arm_store_gregset): Likewise.
6053 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6054 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6055 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6056 (regs_info): Rename to regs_info_arm.
6057 (arm_regs_info): Return regs_info_aarch32 if
6058 have_ptrace_getregset is 1 and target description is
6059 arm_with_neon or arm_with_vfpv3.
6060 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6061 Call initialize_low_arch_aarch32 instead.
6062
60632015-08-04 Yao Qi <yao.qi@linaro.org>
6064
6065 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6066 * linux-low.c: ... here.
6067 * linux-low.h (have_ptrace_getregset): Declare it.
6068
60692015-08-04 Pedro Alves <palves@redhat.com>
6070
6071 * thread-db.c (struct thread_db): Use new typedefs.
6072 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6073 CHK calls.
6074 (disable_thread_event_reporting): Cast result of dlsym to
6075 destination function pointer type.
6076 (thread_db_mourn): Use td_ta_delete_ftype.
6077
60782015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6079
6080 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6081 arch variant.
6082 (CDX_BREAKPOINT): Define for R2.
6083 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6084 (the_low_target): Add comments.
6085
60862015-07-30 Yao Qi <yao.qi@linaro.org>
6087
6088 * linux-arm-low.c (arm_hwcap): Remove it.
6089 (arm_read_description): New local variable arm_hwcap. Don't
6090 set arm_hwcap to zero.
6091
60922015-07-30 Yao Qi <yao.qi@linaro.org>
6093
6094 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6095 Use regcache->tdesc instead.
6096 (arm_store_wmmxregset): Likewise.
6097 (arm_fill_vfpregset): Likewise.
6098 (arm_store_vfpregset): Likewise.
6099
61002015-07-30 Yao Qi <yao.qi@linaro.org>
6101
6102 * linux-arm-low.c: Include arch/arm.h.
6103 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6104 (arm_store_gregset): Likewise.
6105
61062015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6107
6108 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6109 ptrace's 4th parameter.
6110
61112015-07-27 Yao Qi <yao.qi@linaro.org>
6112
6113 * configure.srv (case aarch64*-*-linux*): Don't set
6114 srv_linux_usrregs.
6115
61162015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6117
6118 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6119 sys/ptrace.h.
6120 * linux-arm-low.c: Likewise.
6121 * linux-cris-low.c: Likewise.
6122 * linux-crisv32-low.c: Likewise.
6123 * linux-low.c: Likewise.
6124 * linux-m68k-low.c: Likewise.
6125 * linux-mips-low.c: Likewise.
6126 * linux-nios2-low.c: Likewise.
6127 * linux-s390-low.c: Likewise.
6128 * linux-sparc-low.c: Likewise.
6129 * linux-tic6x-low.c: Likewise.
6130 * linux-tile-low.c: Likewise.
6131 * linux-x86-low.c: Likewise.
6132
61332015-07-24 Pedro Alves <palves@redhat.com>
6134
6135 * config.in: Regenerate.
6136 * configure: Regenerate.
6137
61382015-07-24 Pedro Alves <palves@redhat.com>
6139
6140 * acinclude.m4: Include ../ptrace.m4.
6141 * configure.ac: Call GDB_AC_PTRACE.
6142 * config.in, configure: Regenerate.
6143
61442015-07-24 Yao Qi <yao.qi@linaro.org>
6145
6146 * linux-low.c (linux_create_inferior): Remove setting to
6147 proc->priv->new_inferior.
6148 (linux_attach): Likewise.
6149 (linux_low_filter_event): Likewise.
6150 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6151
61522015-07-24 Yao Qi <yao.qi@linaro.org>
6153
6154 * linux-low.c (linux_arch_setup): New function.
6155 (linux_low_filter_event): If proc->tdesc is NULL and
6156 proc->attached is true, call the_low_target.arch_setup.
6157 Otherwise, keep status pending, and return.
6158 (linux_resume_one_lwp_throw): Don't call get_pc if
6159 thread->while_stepping isn't NULL. Don't call
6160 get_thread_regcache if proc->tdesc is NULL.
6161 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6162 (linux_target_ops): Install arch_setup.
6163 * server.c (start_inferior): Call the_target->arch_setup.
6164 * target.h (struct target_ops) <arch_setup>: New field.
6165 (target_arch_setup): New marco.
6166 * lynx-low.c (lynx_target_ops): Update.
6167 * nto-low.c (nto_target_ops): Update.
6168 * spu-low.c (spu_target_ops): Update.
6169 * win32-low.c (win32_target_ops): Update.
6170
61712015-07-24 Yao Qi <yao.qi@linaro.org>
6172
6173 * linux-low.c (linux_add_process): Don't set
6174 proc->priv->new_inferior.
6175 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6176 (linux_attach): Likewise.
6177
61782015-07-24 Yao Qi <yao.qi@linaro.org>
6179
6180 * server.c (start_inferior): Code refactor.
6181
61822015-07-24 Yao Qi <yao.qi@linaro.org>
6183
6184 * server.c (process_serial_event): Set general_thread.
6185
61862015-07-21 Yao Qi <yao.qi@linaro.org>
6187
6188 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6189 aarch64_linux_get_debug_reg_capacity.
6190
61912015-07-17 Yao Qi <yao.qi@linaro.org>
6192
6193 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6194 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6195 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6196 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6197 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6198 (AARCH64_HWP_ALIGNMENT): Likewise.
6199 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6200 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6201 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6202 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6203 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6204 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6205 (struct aarch64_debug_reg_state): Likewise.
6206 (struct arch_lwp_info): Likewise.
6207 (aarch64_align_watchpoint): Likewise.
6208 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6209 (aarch64_watchpoint_length): Likewise.
6210 (aarch64_point_encode_ctrl_reg): Likewise
6211 (aarch64_point_is_aligned): Likewise.
6212 (aarch64_align_watchpoint): Likewise.
6213 (aarch64_linux_set_debug_regs):
6214 (aarch64_dr_state_insert_one_point): Likewise.
6215 (aarch64_dr_state_remove_one_point): Likewise.
6216 (aarch64_handle_breakpoint): Likewise.
6217 (aarch64_handle_aligned_watchpoint): Likewise.
6218 (aarch64_handle_unaligned_watchpoint): Likewise.
6219 (aarch64_handle_watchpoint): Likewise.
6220
62212015-07-17 Yao Qi <yao.qi@linaro.org>
6222
6223 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6224 and don't aarch64_get_debug_reg_state. All callers update.
6225 (aarch64_handle_aligned_watchpoint): Likewise.
6226 (aarch64_handle_unaligned_watchpoint): Likewise.
6227 (aarch64_handle_watchpoint): Likewise.
6228 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6229 (aarch64_remove_point): Likewise.
6230
62312015-07-17 Yao Qi <yao.qi@linaro.org>
6232
6233 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6234 debug_printf.
6235 (aarch64_handle_unaligned_watchpoint): Likewise.
6236
62372015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6238
6239 Revert the previous 3 commits:
6240 Move gdb_regex* to common/
6241 Move linux_find_memory_regions_full & co.
6242 gdbserver build-id attribute generator
6243
62442015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6245 Jan Kratochvil <jan.kratochvil@redhat.com>
6246
6247 gdbserver build-id attribute generator.
6248 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6249 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6250 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6251 (find_phdr): New.
6252 (get_dynamic): Use find_pdhr to traverse program headers.
6253 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6254 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6255 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6256 (get_hex_build_id): New.
6257 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6258 to reply XML document.
6259
62602015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6261 Jan Kratochvil <jan.kratochvil@redhat.com>
6262
6263 * target.c: Include target/target-utils.h and fcntl.h.
6264 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6265 (target_fileio_read_stralloc): New functions.
6266
62672015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6268
6269 * Makefile.in (OBS): Add gdb_regex.o.
6270 (gdb_regex.o): New.
6271 * config.in: Rebuilt.
6272 * configure: Rebuilt.
6273
62742015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6275 Jan Kratochvil <jan.kratochvil@redhat.com>
6276
6277 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6278 * Makefile.in (OBS): Add target-utils.o.
6279 (linux-maps.o, target-utils.o): New.
6280 * configure.srv (srv_linux_obj): Add linux-maps.o.
6281
62822015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6283
6284 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6285 function, return 1.
6286 (the_low_target): Install it.
6287
62882015-07-14 Pedro Alves <palves@redhat.com>
6289
6290 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6291 Instead, ignore ECHILD, and throw an error for other errnos.
6292
62932015-07-10 Pedro Alves <palves@redhat.com>
6294
6295 * event-loop.c (struct callback_event) <data>: Change type to
6296 gdb_client_data instance instead of gdb_client_data pointer.
6297 (append_callback_event): Adjust.
6298
62992015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6300
6301 * linux-aarch64-low.c: Add comments for each linux_target_ops
6302 method. Remove comments already covered in target_ops and
6303 linux_target_ops definitions.
6304 (the_low_target): Add comments for each unimplemented method.
6305
63062015-07-09 Yao Qi <yao.qi@linaro.org>
6307
6308 * linux-aarch64-low.c (aarch64_regmap): Remove.
6309 (aarch64_usrregs_info): Remove.
6310 (regs_info): Set field usrregs to NULL.
6311
63122015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6313
6314 * linux-low.c: Include "rsp-low.h"
6315 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6316 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6317 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6318 (handle_btrace_enable_pt): New.
6319 (handle_btrace_general_set): Support "pt".
6320 (handle_btrace_conf_general_set): Support "pt:size".
6321
63222015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6323
6324 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6325 Z_PACKET_SW_BP.
6326
63272015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6328
6329 * linux-aarch64-low.c: Remove comment about endianness.
6330 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6331 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6332 memcmp.
6333
63342015-06-24 Gary Benson <gbenson@redhat.com>
6335
6336 * linux-i386-ipa.c (stdint.h): Do not include.
6337 * lynx-i386-low.c (stdint.h): Likewise.
6338 * lynx-ppc-low.c (stdint.h): Likewise.
6339 * mem-break.c (stdint.h): Likewise.
6340 * thread-db.c (stdint.h): Likewise.
6341 * tracepoint.c (stdint.h): Likewise.
6342 * win32-low.c (stdint.h): Likewise.
6343
63442015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6345
6346 * server.c (write_qxfer_response): Update call to
6347 remote_escape_output.
6348
63492015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6350 Jan Kratochvil <jan.kratochvil@redhat.com>
6351
6352 Merge multiple hex conversions.
6353 * gdbreplay.c (tohex): Rename to 'fromhex'.
6354 (logchar): Use fromhex.
6355
63562015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6357
6358 * server.c (handle_qxfer_libraries): Set `version' attribute for
6359 <library-list>.
6360
63612015-06-10 Gary Benson <gbenson@redhat.com>
6362
6363 * target.h (struct target_ops) <multifs_open>: New field.
6364 <multifs_unlink>: Likewise.
6365 <multifs_readlink>: Likewise.
6366 * linux-low.c (nat/linux-namespaces.h): New include.
6367 (linux_target_ops): Initialize the_target->multifs_open,
6368 the_target->multifs_unlink and the_target->multifs_readlink.
6369 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6370 * hostio.c (hostio_fs_pid): New static variable.
6371 (hostio_handle_new_gdb_connection): New function.
6372 (handle_setfs): Likewise.
6373 (handle_open): Use the_target->multifs_open as appropriate.
6374 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6375 (handle_readlink): Use the_target->multifs_readlink as
6376 appropriate.
6377 (handle_vFile): Handle vFile:setfs packets.
6378 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6379 after target_handle_new_gdb_connection.
6380
63812015-06-10 Gary Benson <gbenson@redhat.com>
6382
6383 * configure.ac (AC_CHECK_FUNCS): Add setns.
6384 * config.in: Regenerate.
6385 * configure: Likewise.
6386 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6387 (linux-namespaces.o): New rule.
6388 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6389
63902015-06-09 Gary Benson <gbenson@redhat.com>
6391
6392 * hostio.c (handle_open): Process mode argument with
6393 fileio_to_host_mode.
6394
63952015-06-01 Yao Qi <yao.qi@linaro.org>
6396
6397 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6398 * linux-x86-low.c: Likewise.
6399
64002015-05-28 Don Breazeal <donb@codesourcery.com>
6401
6402 * linux-low.c (handle_extended_wait): Initialize
6403 thread_info.last_resume_kind for new fork children.
6404
64052015-05-15 Pedro Alves <palves@redhat.com>
6406
6407 * target.h (target_handle_new_gdb_connection): Rewrite using if
6408 wrapped in do/while.
6409
64102015-05-14 Joel Brobecker <brobecker@adacore.com>
6411
6412 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6413 * configure, config.in: Regenerate.
6414 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6415 Declare typedef.
6416
64172015-05-12 Don Breazeal <donb@codesourcery.com>
6418
6419 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6420 PTRACE_EVENT_VFORK_DONE.
6421 (linux_low_ptrace_options, extended_event_reported): Add vfork
6422 events.
6423 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6424 and "vforkdone" for RSP 'T' Stop Reply Packet.
6425 * server.h (report_vfork_events): Declare
6426 global variable.
6427
64282015-05-12 Don Breazeal <donb@codesourcery.com>
6429
6430 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6431 (the_low_target) <new_fork>: Initialize new member.
6432 * linux-arm-low.c (arm_new_fork): New function.
6433 (the_low_target) <new_fork>: Initialize new member.
6434 * linux-low.c (handle_extended_wait): Call new target function
6435 new_fork.
6436 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6437 * linux-mips-low.c (mips_add_watchpoint): New function
6438 extracted from mips_insert_point.
6439 (the_low_target) <new_fork>: Initialize new member.
6440 (mips_linux_new_fork): New function.
6441 (mips_insert_point): Call mips_add_watchpoint.
6442 * linux-x86-low.c (x86_linux_new_fork): New function.
6443 (the_low_target) <new_fork>: Initialize new member.
6444
64452015-05-12 Don Breazeal <donb@codesourcery.com>
6446
6447 * linux-low.c (handle_extended_wait): Implement return value,
6448 rename argument 'event_child' to 'event_lwp', handle
6449 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6450 (linux_low_ptrace_options): New function.
6451 (linux_low_filter_event): Call linux_low_ptrace_options,
6452 use different argument fo linux_enable_event_reporting,
6453 use return value from handle_extended_wait.
6454 (extended_event_reported): New function.
6455 (linux_wait_1): Call extended_event_reported and set
6456 status to report fork events.
6457 (linux_write_memory): Add pid to debug message.
6458 (reset_lwp_ptrace_options_callback): New function.
6459 (linux_handle_new_gdb_connection): New function.
6460 (linux_target_ops): Initialize new structure member.
6461 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6462 * lynx-low.c: Initialize new structure member.
6463 * remote-utils.c (prepare_resume_reply): Implement stop reason
6464 "fork" for "T" stop message.
6465 * server.c (handle_query): Call handle_new_gdb_connection.
6466 * server.h (report_fork_events): Declare global flag.
6467 * target.h (struct target_ops) <handle_new_gdb_connection>:
6468 New member.
6469 (target_handle_new_gdb_connection): New macro.
6470 * win32-low.c: Initialize new structure member.
6471
64722015-05-12 Don Breazeal <donb@codesourcery.com>
6473
6474 * mem-break.c (APPEND_TO_LIST): Define macro.
6475 (clone_agent_expr): New function.
6476 (clone_one_breakpoint): New function.
6477 (clone_all_breakpoints): New function.
6478 * mem-break.h: Declare new functions.
6479
64802015-05-12 Don Breazeal <donb@codesourcery.com>
6481
6482 * linux-low.c (linux_supports_fork_events): New function.
6483 (linux_supports_vfork_events): New function.
6484 (linux_target_ops): Initialize new structure members.
6485 (initialize_low): Call linux_check_ptrace_features.
6486 * lynx-low.c (lynx_target_ops): Initialize new structure
6487 members.
6488 * server.c (report_fork_events, report_vfork_events):
6489 New global flags.
6490 (handle_query): Add new features to qSupported packet and
6491 response.
6492 (captured_main): Initialize new global variables.
6493 * target.h (struct target_ops) <supports_fork_events>:
6494 New member.
6495 <supports_vfork_events>: New member.
6496 (target_supports_fork_events): New macro.
6497 (target_supports_vfork_events): New macro.
6498 * win32-low.c (win32_target_ops): Initialize new structure
6499 members.
6500
65012015-05-12 Gary Benson <gbenson@redhat.com>
6502
6503 * server.c (handle_qxfer_exec_file): Use current process
6504 if annex is empty.
6505
65062015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6507
6508 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6509 Remove HAVE_PTRACE_GETREGS conditionals.
6510 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6511 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6512
65132015-05-08 Yao Qi <yao.qi@linaro.org>
6514
6515 * linux-low.c (linux_supports_conditional_breakpoints): New
6516 function.
6517 (linux_target_ops): Install new target method.
6518 * lynx-low.c (lynx_target_ops): Install NULL hook for
6519 supports_conditional_breakpoints.
6520 * nto-low.c (nto_target_ops): Likewise.
6521 * spu-low.c (spu_target_ops): Likewise.
6522 * win32-low.c (win32_target_ops): Likewise.
6523 * server.c (handle_query): Check
6524 target_supports_conditional_breakpoints.
6525 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6526 New field.
6527 (target_supports_conditional_breakpoints): New macro.
6528
65292015-05-06 Pedro Alves <palves@redhat.com>
6530
6531 PR server/18081
6532 * server.c (start_inferior): If the process exits, mourn it.
6533
65342015-04-21 Gary Benson <gbenson@redhat.com>
6535
6536 * hostio.c (fileio_open_flags_to_host): Factored out to
6537 fileio_to_host_openflags in common/fileio.c. Single use
6538 updated.
6539
65402015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6541
6542 * linux-xtensa-low.c (xtensa_fill_gregset)
6543 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6544 XCHAL_HAVE_LOOP.
6545
65462015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6547
6548 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6549 (regs_info): Replace usrregs pointer with NULL.
6550
65512015-04-17 Gary Benson <gbenson@redhat.com>
6552
6553 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6554 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6555 * server.c (handle_qxfer_exec_file): New function.
6556 (qxfer_packets): Add exec-file entry.
6557 (handle_query): Report qXfer:exec-file:read as supported packet.
6558
65592015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6560
6561 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6562
65632015-04-09 Gary Benson <gbenson@redhat.com>
6564
6565 * hostio-errno.c (errno_to_fileio_error): Remove function.
6566 Update caller to use remote_fileio_to_fio_error.
6567
65682015-04-09 Yao Qi <yao.qi@linaro.org>
6569
6570 * linux-low.c (linux_insert_point): Call
6571 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6572 (linux_remove_point): Call remove_memory_breakpoint if type is
6573 raw_bkpt_type_sw.
6574 * linux-x86-low.c (x86_insert_point): Don't call
6575 insert_memory_breakpoint.
6576 (x86_remove_point): Don't call remove_memory_breakpoint.
6577
65782015-04-01 Pedro Alves <palves@redhat.com>
6579 Cleber Rosa <crosa@redhat.com>
6580
6581 * server.c (gdbserver_usage): Reorganize and extend the usage
6582 message.
6583
65842015-03-24 Pedro Alves <palves@redhat.com>
6585
6586 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6587 output. Also dump TRAP_TRACE.
6588 (linux_low_filter_event): In debug output, distinguish a
6589 resume_stop SIGSTOP from a delayed SIGSTOP.
6590
65912015-03-24 Gary Benson <gbenson@redhat.com>
6592
6593 * linux-x86-low.c (x86_linux_new_thread): Moved to
6594 nat/x86-linux.c.
6595 (x86_linux_prepare_to_resume): Likewise.
6596
65972015-03-24 Gary Benson <gbenson@redhat.com>
6598
6599 * Makefile.in (x86-linux-dregs.o): New rule.
6600 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6601 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6602 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6603 (x86_linux_dr_get): Likewise.
6604 (x86_linux_dr_set): Likewise.
6605 (update_debug_registers_callback): Likewise.
6606 (x86_linux_dr_set_addr): Likewise.
6607 (x86_linux_dr_get_addr): Likewise.
6608 (x86_linux_dr_set_control): Likewise.
6609 (x86_linux_dr_get_control): Likewise.
6610 (x86_linux_dr_get_status): Likewise.
6611 (x86_linux_update_debug_registers): Likewise.
6612
66132015-03-24 Gary Benson <gbenson@redhat.com>
6614
6615 * linux-x86-low.c (x86_linux_update_debug_registers):
6616 New function, factored out from...
6617 (x86_linux_prepare_to_resume): ...this.
6618
66192015-03-24 Gary Benson <gbenson@redhat.com>
6620
6621 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6622 (x86_linux_dr_set): Likewise.
6623 (update_debug_registers_callback): Likewise.
6624 (x86_linux_dr_set_addr): Likewise.
6625 (x86_linux_dr_get_addr): Likewise.
6626 (x86_linux_dr_set_control): Likewise.
6627 (x86_linux_dr_get_control): Likewise.
6628 (x86_linux_dr_get_status): Likewise.
6629 (x86_linux_prepare_to_resume): Likewise.
6630
66312015-03-24 Gary Benson <gbenson@redhat.com>
6632
6633 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6634 Use perror_with_name. Pass string through gettext.
6635 (x86_linux_dr_set): Likewise.
6636
66372015-03-24 Gary Benson <gbenson@redhat.com>
6638
6639 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6640 (x86_linux_dr_set_addr): ...this.
6641 (x86_dr_low_get_addr): Rename to...
6642 (x86_linux_dr_get_addr): ...this.
6643 (x86_dr_low_set_control): Rename to...
6644 (x86_linux_dr_set_control): ...this.
6645 (x86_dr_low_get_control): Rename to...
6646 (x86_linux_dr_get_control): ...this.
6647 (x86_dr_low_get_status): Rename to...
6648 (x86_linux_dr_get_status): ...this.
6649 (x86_dr_low): Update with new function names.
6650
66512015-03-24 Gary Benson <gbenson@redhat.com>
6652
6653 * Makefile.in (x86-linux.o): New rule.
6654 * configure.srv: Add x86-linux.o to relevant targets.
6655 * linux-low.c (lwp_set_arch_private_info): New function.
6656 (lwp_arch_private_info): Likewise.
6657 * linux-x86-low.c: Include nat/x86-linux.h.
6658 (arch_lwp_info): Removed structure.
6659 (update_debug_registers_callback):
6660 Use lwp_set_debug_registers_changed.
6661 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6662 and lwp_set_debug_registers_changed.
6663 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6664
66652015-03-24 Gary Benson <gbenson@redhat.com>
6666
6667 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6668 * linux-arm-low.c (arm_new_thread): Likewise.
6669 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6670 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6671 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6672 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6673
66742015-03-24 Gary Benson <gbenson@redhat.com>
6675
6676 * linux-low.c (ptid_of_lwp): New function.
6677 (lwp_is_stopped): Likewise.
6678 (lwp_stop_reason): Likewise.
6679 * linux-x86-low.c (update_debug_registers_callback):
6680 Use lwp_is_stopped.
6681 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6682 lwp_stop_reason.
6683
66842015-03-24 Gary Benson <gbenson@redhat.com>
6685
6686 * linux-low.h (linux_stop_lwp): Remove declaration.
6687
66882015-03-24 Gary Benson <gbenson@redhat.com>
6689
6690 * linux-low.h: Include nat/linux-nat.h.
6691 * linux-low.c (iterate_over_lwps_args): New structure.
6692 (iterate_over_lwps_filter): New function.
6693 (iterate_over_lwps): Likewise.
6694 * linux-x86-low.c (update_debug_registers_callback):
6695 Update signature to what iterate_over_lwps expects.
6696 Remove PID check that iterate_over_lwps now performs.
6697 (x86_dr_low_set_addr): Use iterate_over_lwps.
6698 (x86_dr_low_set_control): Likewise.
6699
67002015-03-24 Gary Benson <gbenson@redhat.com>
6701
6702 * linux-x86-low.c (x86_debug_reg_state): New function.
6703 (x86_linux_prepare_to_resume): Use the above.
6704
67052015-03-24 Gary Benson <gbenson@redhat.com>
6706
6707 * linux-low.c (current_lwp_ptid): New function.
6708 * linux-x86-low.c: Include nat/linux-nat.h.
6709 (x86_dr_low_get_addr): Use current_lwp_ptid.
6710 (x86_dr_low_get_control): Likewise.
6711 (x86_dr_low_get_status): Likewise.
6712
67132015-03-20 Pedro Alves <palves@redhat.com>
6714
6715 * tracepoint.c (cmd_qtstatus): Make "str" const.
6716
67172015-03-20 Pedro Alves <palves@redhat.com>
6718
6719 * server.c (handle_general_set): Make "req_str" const.
6720
67212015-03-19 Pedro Alves <palves@redhat.com>
6722
6723 * linux-low.c (linux_resume_one_lwp): Rename to ...
6724 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6725 instead call perror_with_name.
6726 (check_ptrace_stopped_lwp_gone): New function.
6727 (linux_resume_one_lwp): Reimplement as wrapper around
6728 linux_resume_one_lwp_throw that swallows errors if the LWP is
6729 gone.
6730
67312015-03-19 Pedro Alves <palves@redhat.com>
6732
6733 * linux-low.c (count_events_callback, select_event_lwp_callback):
6734 No longer check whether the thread has resume_stop as last resume
6735 kind.
6736
67372015-03-19 Pedro Alves <palves@redhat.com>
6738
6739 * linux-low.c (count_events_callback, select_event_lwp_callback):
6740 Use the lwp's status_pending_p field, not the thread's.
6741
67422015-03-19 Pedro Alves <palves@redhat.com>
6743
6744 * linux-low.c (select_event_lwp_callback): Update comments to
6745 no longer mention SIGTRAP.
6746
67472015-03-18 Gary Benson <gbenson@redhat.com>
6748
6749 * server.c (handle_query): Do not report vFile:fstat as supported.
6750
67512015-03-11 Gary Benson <gbenson@redhat.com>
6752
6753 * hostio.c (sys/types.h): New include.
6754 (sys/stat.h): Likewise.
6755 (common-remote-fileio.h): Likewise.
6756 (handle_fstat): New function.
6757 (handle_vFile): Handle vFile:fstat packets.
6758
67592015-03-11 Gary Benson <gbenson@redhat.com>
6760
6761 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6762 struct stat.st_blocks and struct stat.st_blksize.
6763 * configure: Regenerate.
6764 * config.in: Likewise.
6765 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6766 (OBS): Add common-remote-fileio.o.
6767 (common-remote-fileio.o): New rule.
6768
67692015-03-09 Pedro Alves <palves@redhat.com>
6770
6771 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6772 'struct sockaddr' pointer in 'accept' call.
6773
67742015-03-09 Pedro Alves <palves@redhat.com>
6775
6776 Revert:
6777 2015-03-07 Pedro Alves <palves@redhat.com>
6778 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6779 or <winsock2.h> here. Instead include "gdb_socket.h".
6780 (remote_open): Use union gdb_sockaddr_u.
6781 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6782 or <winsock2.h> here. Instead include "gdb_socket.h".
6783 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6784 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6785 or <sys/un.h>.
6786 (init_named_socket, gdb_agent_helper_thread): Use union
6787 gdb_sockaddr_u.
6788
67892015-03-07 Pedro Alves <palves@redhat.com>
6790
6791 * configure.ac (build_warnings): Move
6792 -Wdeclaration-after-statement to the C-specific set.
6793 * configure: Regenerate.
6794
67952015-03-07 Pedro Alves <palves@redhat.com>
6796
6797 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6798 or <winsock2.h> here. Instead include "gdb_socket.h".
6799 (remote_open): Use union gdb_sockaddr_u.
6800 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6801 or <winsock2.h> here. Instead include "gdb_socket.h".
6802 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6803 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6804 or <sys/un.h>.
6805 (init_named_socket, gdb_agent_helper_thread): Use union
6806 gdb_sockaddr_u.
6807
68082015-03-07 Pedro Alves <palves@redhat.com>
6809
6810 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6811 instead.
6812
68132015-03-06 Yao Qi <yao.qi@linaro.org>
6814
6815 * linux-aarch64-low.c (aarch64_insert_point): Use
6816 show_debug_regs as a boolean.
6817 (aarch64_remove_point): Likewise.
6818
68192015-03-05 Pedro Alves <palves@redhat.com>
6820
6821 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6822 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6823 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6824 * nto-low.c (nto_target_ops): Likewise.
6825 * spu-low.c (spu_target_ops): Likewise.
6826 * win32-low.c (win32_target_ops): Likewise.
6827
68282015-03-04 Pedro Alves <palves@redhat.com>
6829
6830 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6831 Decide whether a breakpoint triggered based on the SIGTRAP's
6832 siginfo.si_code.
6833 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6834 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6835 (linux_low_filter_event): Check for breakpoints before checking
6836 watchpoints.
6837 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6838 siginfo.si_code.
6839 (linux_stopped_by_sw_breakpoint)
6840 (linux_supports_stopped_by_sw_breakpoint)
6841 (linux_stopped_by_hw_breakpoint)
6842 (linux_supports_stopped_by_hw_breakpoint): New functions.
6843 (linux_target_ops): Install new target methods.
6844
68452015-03-04 Pedro Alves <palves@redhat.com>
6846
6847 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6848 * server.c (swbreak_feature, hwbreak_feature): New globals.
6849 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6850 (captured_main): Clear swbreak_feature and hwbreak_feature.
6851 * server.h (swbreak_feature, hwbreak_feature): Declare.
6852 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6853 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6854 supports_stopped_by_hw_breakpoint>: New fields.
6855 (target_supports_stopped_by_sw_breakpoint)
6856 (target_stopped_by_sw_breakpoint)
6857 (target_supports_stopped_by_hw_breakpoint)
6858 (target_stopped_by_hw_breakpoint): Declare.
6859
68602015-03-04 Pedro Alves <palves@redhat.com>
6861
6862 enum lwp_stop_reason -> enum target_stop_reason
6863 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6864 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6865 (linux_wait_1, stuck_in_jump_pad_callback)
6866 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6867 (linux_stopped_by_watchpoint):
6868 * linux-low.h (enum lwp_stop_reason): Delete.
6869 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6870 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6871
68722015-03-04 Yao Qi <yao.qi@linaro.org>
6873
6874 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6875
68762015-03-03 Gary Benson <gbenson@redhat.com>
6877
6878 * hostio.c (handle_vFile): Fix prefix lengths.
6879
68802015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6881
6882 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6883 ptr_bits.
6884
68852015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6886
6887 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6888 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6889 (clean): Add "rm -f" for above C files.
6890 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6891 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6892 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6893 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6894 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6895 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6896 (init_registers_s390x_vx_linux64)
6897 (init_registers_s390x_tevx_linux64)
6898 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6899 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6900 declarations.
6901 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6902 (s390_store_vxrs_high): New functions.
6903 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6904 NT_S390_VXRS_HIGH.
6905 (s390_arch_setup): Add logic for selecting one of the new target
6906 descriptions. Activate the new vector regsets if applicable.
6907 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6908 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6909 and init_registers_s390x_tevx_linux64.
6910
69112015-03-01 Pedro Alves <palves@redhat.com>
6912
6913 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6914 parameter.
6915
69162015-02-27 Pedro Alves <palves@redhat.com>
6917
6918 * linux-x86-low.c (u_debugreg_offset): New function.
6919 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6920
69212015-02-27 Pedro Alves <palves@redhat.com>
6922
6923 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6924 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6925 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6926 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6927 (ps_lsetfpregs, ps_getpid)
6928 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6929 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6930 (ps_lsetxregs, ps_plog): Declare.
6931
69322015-02-27 Pedro Alves <palves@redhat.com>
6933
6934 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6935 IP_AGENT_EXPORT_FUNC.
6936 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6937 IP_AGENT_EXPORT_FUNC.
6938 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6939 (IP_AGENT_EXPORT): Delete.
6940 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6941 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6942 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6943 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6944 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6945 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6946 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6947 (traceframe_read_count, traceframe_write_count)
6948 (traceframes_created, trace_state_variables, get_raw_reg)
6949 (get_trace_state_variable_value, set_trace_state_variable_value)
6950 (ust_loaded, helper_thread_id, cmd_buf): Use
6951 IPA_SYM_EXPORTED_NAME.
6952 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6953 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6954 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6955 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6956 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6957 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6958 EXTERN_C_PUSH/EXTERN_C_POP.
6959 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6960 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6961 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6962 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6963 (traceframe_write_count, traceframe_read_count)
6964 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6965 (about_to_request_buffer_space, get_trace_state_variable_value)
6966 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6967 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6968 EXTERN_C_PUSH/EXTERN_C_POP.
6969 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6970 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6971 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6972 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6973 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6974 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6975 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6976 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6977 Define.
6978 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6979 (IP_AGENT_EXPORT_VAR_DECL): Define.
6980 (tracing): Declare.
6981 (gdb_agent_get_raw_reg): Declare.
6982
69832015-02-27 Tom Tromey <tromey@redhat.com>
6984 Pedro Alves <palves@redhat.com>
6985
6986 Rename symbols whose names are reserved C++ keywords throughout.
6987
69882015-02-27 Pedro Alves <palves@redhat.com>
6989
6990 * Makefile.in (COMPILER): New, get it from autoconf.
6991 (CXX): Get from autoconf instead.
6992 (COMPILE.pre): Use COMPILER.
6993 (CC-LD): Rename to ...
6994 (CC_LD): ... this. Use COMPILER.
6995 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6996 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6997 * acinclude.m4: Include build-with-cxx.m4.
6998 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6999 Disable -Werror by default if building in C++ mode.
7000 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7001 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7002 the C++ compiler. Save/restore CXXFLAGS too.
7003 * configure: Regenerate.
7004
70052015-02-27 Pedro Alves <palves@redhat.com>
7006
7007 * acinclude.m4: Include libiberty.m4.
7008 * configure.ac: Call libiberty_INIT.
7009 * config.in, configure: Regenerate.
7010
70112015-02-26 Pedro Alves <palves@redhat.com>
7012
7013 * linux-low.c (linux_wait_1): When incrementing the PC past a
7014 program breakpoint always use the_low_target.breakpoint_len as
7015 increment, rather than the maximum between that and
7016 the_low_target.decr_pc_after_break.
7017
70182015-02-23 Pedro Alves <palves@redhat.com>
7019
7020 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7021 thread was doing a step-over; always adjust the PC if
7022 we stepped over a permanent breakpoint.
7023 (linux_wait_1): If we stepped over breakpoint that was on top of a
7024 permanent breakpoint, manually advance the PC past it.
7025
70262015-02-23 Pedro Alves <palves@redhat.com>
7027
7028 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7029 modes.
7030 (x86_fill_gregset, x86_store_gregset): Use it when handling
7031 $orig_eax.
7032
70332015-02-20 Pedro Alves <palves@redhat.com>
7034
7035 * thread-db.c: Include "nat/linux-procfs.h".
7036 (thread_db_init): Skip listing new threads if the kernel supports
7037 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7038
70392015-02-20 Pedro Alves <palves@redhat.com>
7040
7041 * linux-low.c (status_pending_p_callback): Use ptid_match.
7042
70432015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7044
7045 PR breakpoints/16812
7046 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7047 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7048 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7049
70502015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7051
7052 PR breakpoints/15956
7053 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7054
70552015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7056
7057 * linux-low.c (linux_low_btrace_conf): Print size.
7058 * server.c (handle_btrace_conf_general_set): New.
7059 (hanle_general_set): Call handle_btrace_conf_general_set.
7060 (handle_query): Report Qbtrace-conf:bts:size as supported.
7061
70622015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7063
7064 * linux-low.c (linux_low_enable_btrace): Update parameters.
7065 (linux_low_btrace_conf): New.
7066 (linux_target_ops)<to_btrace_conf>: Initialize.
7067 * server.c (current_btrace_conf): New.
7068 (handle_btrace_enable): Rename to ...
7069 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7070 to target_enable_btrace. Update comment. Update users.
7071 (handle_qxfer_btrace_conf): New.
7072 (qxfer_packets): Add btrace-conf entry.
7073 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7074 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7075 (target_ops)<read_btrace_conf>: New.
7076 (target_enable_btrace): Update parameters.
7077 (target_read_btrace_conf): New.
7078
70792015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7080
7081 * server.c (handle_btrace_general_set): Remove call to
7082 target_supports_btrace.
7083 (supported_btrace_packets): New.
7084 (handle_query): Call supported_btrace_packets.
7085 * target.h: include btrace-common.h.
7086 (btrace_target_info): Removed.
7087 (supports_btrace, target_supports_btrace): Update parameters.
7088
70892015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7090
7091 * Makefile.in (SFILES): Add common/btrace-common.c.
7092 (OBS): Add common/btrace-common.o.
7093 (btrace-common.o): Add build rules.
7094 * linux-low: Include btrace-common.h.
7095 (linux_low_read_btrace): Use struct btrace_data. Call
7096 btrace_data_init and btrace_data_fini.
7097
70982015-02-06 Pedro Alves <palves@redhat.com>
7099
7100 * thread-db.c (find_new_threads_callback): Add debug output.
7101
71022015-02-04 Pedro Alves <palves@redhat.com>
7103
7104 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7105 (resume_stopped_resumed_lwps): New function.
7106 (linux_wait_for_event_filtered): Use it.
7107
71082015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7109
7110 * Makefile.in (SFILES): Add linux-personality.c.
7111 (linux-personality.o): New rule.
7112 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7113 list of objects to be built.
7114 * linux-low.c: Include nat/linux-personality.h.
7115 (linux_create_inferior): Remove code to disable address space
7116 randomization (moved to ../nat/linux-personality.c). Create
7117 cleanup to disable address space randomization.
7118
71192015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7120
7121 * Makefile.in (posix-strerror.o): New rule.
7122 (mingw-strerror.o): Likewise.
7123 * configure: Regenerated.
7124 * configure.ac: Source file ../common/common.host. Initialize new
7125 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7126
71272015-01-14 Yao Qi <yao@codesourcery.com>
7128
7129 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7130 (ppc-linux.o): New rule.
7131 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7132 * configure.ac: AC_CHECK_FUNCS(getauxval).
7133 * config.in: Re-generated.
7134 * configure: Re-generated.
7135 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7136 ppc64_64bit_inferior_p
7137
71382015-01-14 Yao Qi <yao@codesourcery.com>
7139
7140 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7141 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7142 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7143 (PT_ORIG_R3, PT_TRAP): Likewise.
7144 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7145 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7146 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7147
71482015-01-10 Joel Brobecker <brobecker@adacore.com>
7149
7150 * i387-fp.c (i387_cache_to_xsave): In look over
7151 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7152 zmmh_low_space field by use of zmmh_high_space.
7153
71542015-01-09 Pedro Alves <palves@redhat.com>
7155
7156 * linux-low.c (step_over_bkpt): Move higher up in the file.
7157 (handle_extended_wait): Don't store the stop_pc here.
7158 (get_stop_pc): Adjust comments and rename to ...
7159 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7160 stopped for a software breakpoint or hardware breakpoint.
7161 (thread_still_has_status_pending_p): New function.
7162 (status_pending_p_callback): Use
7163 thread_still_has_status_pending_p. If the event is no longer
7164 interesting, resume the LWP.
7165 (handle_tracepoints): Add assert.
7166 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7167 (wstatus_maybe_breakpoint): New function.
7168 (cancel_breakpoint): Delete function.
7169 (check_stopped_by_watchpoint): New function, factored out from
7170 linux_low_filter_event.
7171 (lp_status_maybe_breakpoint): Delete function.
7172 (linux_low_filter_event): Remove filter_ptid argument.
7173 Leave thread group exits pending here. Store the LWP's stop PC.
7174 Always leave events pending.
7175 (linux_wait_for_event_filtered): Pull all events out of the
7176 kernel, and leave them all pending.
7177 (count_events_callback, select_event_lwp_callback): Consider all
7178 events.
7179 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7180 (select_event_lwp): Only give preference to the stepping LWP in
7181 all-stop mode. Adjust comments.
7182 (ignore_event): New function.
7183 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7184 references to cancel_breakpoints. Adjust to renames. Also give
7185 equal priority to all LWPs that have had events in non-stop mode.
7186 If reporting a software breakpoint event, unadjust the LWP's PC.
7187 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7188 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7189 Adjust.
7190 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7191 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7192 (linux_stopped_by_watchpoint): Adjust.
7193 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7194 * linux-low.h (enum lwp_stop_reason): New.
7195 (struct lwp_info) <stop_pc>: Adjust comment.
7196 <stopped_by_watchpoint>: Delete field.
7197 <stop_reason>: New field.
7198 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7199 * mem-break.c (software_breakpoint_inserted_here)
7200 (hardware_breakpoint_inserted_here): New function.
7201 * mem-break.h (software_breakpoint_inserted_here)
7202 (hardware_breakpoint_inserted_here): Declare.
7203 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7204 (cancel_breakpoints): Delete.
7205 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7206 (upload_fast_traceframes): Remove references to
7207 cancel_breakpoints.
7208
72092015-01-09 Pedro Alves <palves@redhat.com>
7210
7211 * thread-db.c (find_new_threads_callback): Ignore thread if the
7212 kernel thread ID is -1.
7213
72142015-01-09 Pedro Alves <palves@redhat.com>
7215
7216 * linux-low.c (linux_attach_fail_reason_string): Move to
7217 nat/linux-ptrace.c, and rename.
7218 (linux_attach_lwp): Update comment.
7219 (attach_proc_task_lwp_callback): New function.
7220 (linux_attach): Adjust to rename and use
7221 linux_proc_attach_tgid_threads.
7222 (linux_attach_fail_reason_string): Delete declaration.
7223
72242015-01-01 Joel Brobecker <brobecker@adacore.com>
7225
7226 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7227 * server.c (gdbserver_version): Likewise.
7228
72292014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7230
7231 * remote-utils.c: Include ctype.h.
7232 (input_interrupt): Explicitly handle the case when the char
7233 received is the NUL byte. Improve the printing of non-ASCII
7234 characters.
7235
72362014-12-16 Joel Brobecker <brobecker@adacore.com>
7237
7238 * linux-low.c (linux_low_filter_event): Update call to
7239 linux_enable_event_reporting following the addition of
7240 a new parameter to that function.
7241
72422014-12-16 Catalin Udma <catalin.udma@freescale.com>
7243
7244 PR server/17457
7245 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7246 (AARCH64_FPCR_REGNO): Likewise.
7247 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7248 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7249 (aarch64_store_fpregset): Likewise.
7250
72512014-12-15 Joel Brobecker <brobecker@adacore.com>
7252
7253 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7254 Remove FIXME comment about assumption about N.
7255
72562014-12-13 Joel Brobecker <brobecker@adacore.com>
7257
7258 * configure.ac: If large-file support is disabled in GDBserver,
7259 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7260 * configure: Regenerate.
7261
72622014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7263
7264 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7265 warning upon ENODATA from ptrace.
7266 * linux-s390-low.c (s390_store_tdb): New.
7267 (s390_regsets): Add regset for NT_S390_TDB.
7268
72692014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7270
7271 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7272 without a fill_function.
7273 * linux-s390-low.c (s390_fill_last_break): Remove.
7274 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7275 (s390_arch_setup): Use regset's size instead of fill_function for
7276 loop end condition.
7277
72782014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7279
7280 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7281 the regset's store function when ptrace returned an error.
7282 * regcache.c (get_thread_regcache): Invalidate register cache
7283 before fetching inferior's registers.
7284
72852014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7286
7287 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7288 while-loop as for-loop.
7289 (regsets_store_inferior_registers): Likewise.
7290
72912014-11-28 Yao Qi <yao@codesourcery.com>
7292
7293 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7294 * config.in, configure: Re-generate.
7295 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7296 is defined.
7297
72982014-11-21 Yao Qi <yao@codesourcery.com>
7299
7300 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7301 (AC_CHECK_HEADERS): Remove malloc.h.
7302 * configure: Re-generated.
7303 * config.in: Re-generated.
7304 * server.h: Don't include alloca.h and malloc.h.
7305 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7306 Don't include malloc.h.
7307
73082014-11-17 Joel Brobecker <brobecker@adacore.com>
7309
7310 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7311 corresponding ERRNO check in same block.
7312
73132014-11-12 Pedro Alves <palves@redhat.com>
7314
7315 * server.c (cont_thread): Update comment.
7316 (start_inferior, attach_inferior): No longer clear cont_thread.
7317 (handle_v_cont): No longer set cont_thread.
7318 (captured_main): Clear cont_thread each time a GDB connects.
7319
73202014-11-12 Pedro Alves <palves@redhat.com>
7321
7322 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7323 thread, and don't resume all threads if the Hc thread has exited.
7324
73252014-11-12 Pedro Alves <palves@redhat.com>
7326
7327 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7328 the process group instead of to a specific LWP.
7329
73302014-10-15 Pedro Alves <palves@redhat.com>
7331
7332 PR server/17487
7333 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7334 parameter.
7335 (arm_set_thread_context): Delete.
7336 (the_low_target): Adjust.
7337 * win32-i386-low.c (debug_registers_changed)
7338 (debug_registers_used): Delete.
7339 (update_debug_registers_callback): New function.
7340 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7341 needing to update their debug registers.
7342 (win32_get_current_dr): New function.
7343 (x86_dr_low_get_addr, x86_dr_low_get_control)
7344 (x86_dr_low_get_status): Fetch the debug register from the thread
7345 record's context.
7346 (i386_initial_stuff): Adjust.
7347 (i386_get_thread_context): Remove current_event parameter. Don't
7348 clear debug_registers_changed nor copy DR values to
7349 debug_reg_state.
7350 (i386_set_thread_context): Delete.
7351 (i386_prepare_to_resume): New function.
7352 (i386_thread_added): Mark the thread as needing to update irs
7353 debug registers.
7354 (the_low_target): Remove i386_set_thread_context and install
7355 i386_prepare_to_resume.
7356 * win32-low.c (win32_get_thread_context): Adjust.
7357 (win32_set_thread_context): Use SetThreadContext
7358 directly.
7359 (win32_prepare_to_resume): New function.
7360 (win32_require_context): New function, factored out from ...
7361 (thread_rec): ... this.
7362 (continue_one_thread): Call win32_prepare_to_resume on each thread
7363 we're about to continue.
7364 (win32_resume): Call win32_prepare_to_resume on the event thread.
7365 * win32-low.h (struct win32_thread_info)
7366 <debug_registers_changed>: New field.
7367 (struct win32_target_ops): Change prototype of set_thread_context,
7368 delete set_thread_context and add prepare_to_resume.
7369 (win32_require_context): New declaration.
7370
73712014-10-08 Gary Benson <gbenson@redhat.com>
7372
7373 * server.h: Do not include common-exceptions.h.
7374
73752014-10-08 Gary Benson <gbenson@redhat.com>
7376
7377 * server.h: Do not include cleanups.h.
7378
73792014-09-30 James Hogan <james.hogan@imgtec.com>
7380
7381 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7382 mips64-dsp-linux.c.
7383
73842014-09-23 Yao Qi <yao@codesourcery.com>
7385
7386 * linux-low.c (lp_status_maybe_breakpoint): New function.
7387 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7388 (count_events_callback): Likewise.
7389 (select_event_lwp_callback): Likewise.
7390 (cancel_breakpoints_callback): Likewise.
7391
73922014-09-19 Don Breazeal <donb@codesourcery.com>
7393
7394 * linux-low.c (handle_extended_wait): Call
7395 linux_ptrace_get_extended_event.
7396 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7397 linux_is_extended_waitstatus.
7398
73992014-09-16 Joel Brobecker <brobecker@adacore.com>
7400
7401 * Makefile.in (CPPFLAGS): Define.
7402 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7403 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7404
74052014-09-16 Gary Benson <gbenson@redhat.com>
7406
7407 * inferiors.h (current_inferior): Renamed as...
7408 (current_thread): New variable. All uses updated.
7409 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7410 (maybe_move_out_of_jump_pad): Likewise.
7411 (cancel_breakpoint): Likewise.
7412 (linux_low_filter_event): Likewise.
7413 (wait_for_sigstop): Likewise.
7414 (linux_resume_one_lwp): Likewise.
7415 (need_step_over_p): Likewise.
7416 (start_step_over): Likewise.
7417 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7418 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7419 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7420 and save_inferior as saved_thread.
7421 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7422 saved_thread.
7423 (regcache_invalidate_thread): Likewise.
7424 * remote-utils.c (prepare_resume_reply): Likewise.
7425 * thread-db.c (thread_db_get_tls_address): Likewise.
7426 (disable_thread_event_reporting): Likewise.
7427 (remove_thread_event_breakpoints): Likewise.
7428 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7429 as saved_thread.
7430 * target.h (set_desired_inferior): Renamed as...
7431 (set_desired_thread): New declaration. All uses updated.
7432 * server.c (myresume): Updated comment to reference thread instead
7433 of inferior.
7434 (handle_serial_event): Likewise.
7435 (handle_target_event): Likewise.
7436
74372014-09-12 Tom Tromey <tromey@redhat.com>
7438 Gary Benson <gbenson@redhat.com>
7439
7440 * regcache.h: Include common-regcache.h.
7441 (regcache_read_pc): Don't declare.
7442 * regcache.c (get_thread_regcache_for_ptid): New function.
7443
74442014-09-11 Tom Tromey <tromey@redhat.com>
7445 Gary Benson <gbenson@redhat.com>
7446
7447 * symbol.c: New file.
7448 * Makefile.in (SFILES): Add symbol.c.
7449 (OBS): Add symbol.o.
7450
74512014-09-11 Gary Benson <gbenson@redhat.com>
7452
7453 * target.c (target_stop_ptid, target_continue_ptid): New
7454 functions.
7455
74562014-09-11 Tom Tromey <tromey@redhat.com>
7457 Gary Benson <gbenson@redhat.com>
7458
7459 * target.h: Include target/target.h.
7460 * target.c (target_read_memory, target_read_uint32)
7461 (target_write_memory): New functions.
7462
74632014-09-11 Gary Benson <gbenson@redhat.com>
7464
7465 * server.h (debug_hw_points): Don't declare.
7466 * server.c (debug_hw_points): Don't define. Replace all uses
7467 with show_debug_regs.
7468 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7469 all uses with show_debug_regs.
7470
74712014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7472
7473 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7474 endianness into account.
7475 (ppc_supply_ptrace_register): Likewise.
7476
74772014-09-03 James Hogan <james.hogan@imgtec.com>
7478
7479 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7480 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7481
74822014-09-03 Gary Benson <gbenson@redhat.com>
7483
7484 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7485 ALL_DEBUG_ADDRESS_REGISTERS.
7486
74872014-09-02 Gary Benson <gbenson@redhat.com>
7488
7489 * i386-low.h: Renamed as...
7490 * x86-low.h: New file. All type, function and variable name
7491 prefixes changed from "i386_" to "x86_". All references updated.
7492 * i386-low.c: Renamed as...
7493 * x86-low.c: New file. All type, function and variable name
7494 prefixes changed from "i386_" to "x86_". All references updated.
7495
74962014-09-02 Gary Benson <gbenson@redhat.com>
7497
7498 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7499 (x86_linux_new_thread): Likewise.
7500
75012014-08-29 Gary Benson <gbenson@redhat.com>
7502
7503 * server.h (setjmp.h): Do not include.
7504 (toplevel): Do not declare.
7505 (common-exceptions.h): Include.
7506 (cleanups.h): Likewise.
7507 * server.c (toplevel): Do not define.
7508 (exit_code): New static global.
7509 (detach_or_kill_for_exit_cleanup): New function.
7510 (main): New function. Original main renamed to...
7511 (captured_main): New function.
7512 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7513
75142014-08-29 Gary Benson <gbenson@redhat.com>
7515
7516 * Makefile.in (SFILES): Add common/common-exceptions.c.
7517 (OBS): Add common-exceptions.o.
7518 (common-exceptions.o): New rule.
7519 * utils.c (prepare_to_throw_exception): New function.
7520
75212014-08-29 Gary Benson <gbenson@redhat.com>
7522
7523 * config.in: Regenerate.
7524 * configure: Likewise.
7525
75262014-08-29 Gary Benson <gbenson@redhat.com>
7527
7528 * Makefile.in (SFILES): Add common/cleanups.c.
7529 (OBS): cleanups.o.
7530 (cleanups.o): New rule.
7531
75322014-08-29 Gary Benson <gbenson@redhat.com>
7533
7534 * utils.c (internal_vwarning): New function.
7535
75362014-08-28 Gary Benson <gbenson@redhat.com>
7537
7538 * utils.h (fatal): Remove declaration.
7539 * utils.c (fatal): Remove function.
7540
75412014-08-28 Gary Benson <gbenson@redhat.com>
7542
7543 * tracepoint.c (gdb_agent_init): Replace fatal with
7544 perror_with_name.
7545 (initialize_tracepoint): Likewise.
7546
75472014-08-28 Gary Benson <gbenson@redhat.com>
7548
7549 * remote-utils.c (remote_prepare): Replace fatal with error.
7550
75512014-08-28 Gary Benson <gbenson@redhat.com>
7552
7553 * linux-low.c (linux_async): Replace fatal with warning.
7554 Tidy up and return.
7555 (linux_start_non_stop): Return -1 if linux_async failed.
7556
75572014-08-28 Gary Benson <gbenson@redhat.com>
7558
7559 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7560 gdb_assert.
7561 (i386_dr_low_get_addr): Remove vague comment.
7562 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7563 gdb_assert.
7564
75652014-08-28 Gary Benson <gbenson@redhat.com>
7566
7567 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7568 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7569 internal_error.
7570 (linux_resume_one_lwp): Likewise.
7571 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7572 gdb_assert.
7573 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7574 with internal_error.
7575 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7576 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7577 (find_register_by_name): Replace fatal with internal_error.
7578 (find_regno): Likewise.
7579 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7580 * thread-db.c (thread_db_create_event): Likewise.
7581 (thread_db_load_search): Likewise.
7582 (try_thread_db_load_1): Likewise.
7583 * tracepoint.c (get_jump_space_head): Replace fatal with
7584 internal_error.
7585 (claim_trampoline_space): Likewise.
7586 (have_fast_tracepoint_trampoline_buffer): Likewise.
7587 (cmd_qtstart): Likewise.
7588 (stop_tracing): Likewise.
7589 (fast_tracepoint_collecting): Likewise.
7590 (target_malloc): Likewise.
7591 (download_tracepoint): Likewise.
7592 (download_trace_state_variables): Replace check with gdb_assert.
7593 (upload_fast_traceframes): Replace fatal with internal_error.
7594
75952014-08-19 Tom Tromey <tromey@redhat.com>
7596 Gary Benson <gbenson@redhat.com>
7597
7598 * Makefile.in (SFILES): Add common/common-debug.c.
7599 (OBS): Add common-debug.o.
7600 (common-debug.o): New rule.
7601 * debug.h (debug_printf): Don't declare.
7602 * debug.c (debug_printf): Renamed and rewritten as...
7603 (debug_vprintf): New function.
7604
76052014-08-19 Gary Benson <gbenson@redhat.com>
7606
7607 * utils.h: Do not include print-utils.h.
7608
76092014-08-19 Tom Tromey <tromey@redhat.com>
7610 Gary Benson <gbenson@redhat.com>
7611
7612 * server.h: Add static assertion.
7613 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7614
76152014-08-19 Tom Tromey <tromey@redhat.com>
7616 Gary Benson <gbenson@redhat.com>
7617
7618 * Makefile.in (SFILES): Add common/errors.c.
7619 (OBS): Add errors.o.
7620 (IPA_OBS): Add errors-ipa.o.
7621 (errors.o): New rule.
7622 (errors-ipa.o): Likewise.
7623 * utils.h (perror_with_name, error, warning): Don't declare.
7624 * utils.c (warning): Renamed and rewritten as...
7625 (vwarning): New function.
7626 (error): Renamed and rewritten as...
7627 (verror): New function.
7628 (internal_error): Renamed and rewritten as...
7629 (internal_verror): New function.
7630
76312014-08-07 Gary Benson <gbenson@redhat.com>
7632
7633 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7634 * configure: Regenerate.
7635 * config.in: Likewise.
7636 * server.h: Do not include errno.h.
7637 * event-loop.c: Likewise.
7638 * hostio-errno.c: Likewise.
7639 * linux-low.c: Likewise.
7640 * remote-utils.c: Likewise.
7641 * spu-low.c: Likewise.
7642 * utils.c: Likewise.
7643 * gdbreplay.c: Unconditionally include errno.h.
7644
76452014-08-07 Gary Benson <gbenson@redhat.com>
7646
7647 * server.h: Do not include string.h.
7648 * event-loop.c: Likewise.
7649 * linux-low.c: Likewise.
7650 * regcache.c: Likewise.
7651 * remote-utils.c: Likewise.
7652 * spu-low.c: Likewise.
7653 * utils.c: Likewise.
7654
76552014-08-07 Gary Benson <gbenson@redhat.com>
7656
7657 * server.h: Do not include gdb_assert.h.
7658
76592014-08-07 Gary Benson <gbenson@redhat.com>
7660
7661 * server.h: Do not include common-utils.h.
7662
76632014-08-07 Gary Benson <gbenson@redhat.com>
7664
7665 * server.h: Do not include ptid.h.
7666 * notif.h: Likewise.
7667
76682014-08-07 Gary Benson <gbenson@redhat.com>
7669
7670 * server.h: Do not include gdb_locale.h.
7671
76722014-08-07 Gary Benson <gbenson@redhat.com>
7673
7674 * server.h: Do not include gdb/signals.h.
7675 * win32-low.c: Likewise.
7676
76772014-08-07 Gary Benson <gbenson@redhat.com>
7678
7679 * server.h: Do not include pathmax.h.
7680
76812014-08-07 Gary Benson <gbenson@redhat.com>
7682
7683 * server.h: Do not include libiberty.h.
7684 * linux-bfin-low.c: Likewise.
7685
76862014-08-07 Gary Benson <gbenson@redhat.com>
7687
7688 * server.h: Do not include ansidecl.h.
7689
76902014-08-07 Gary Benson <gbenson@redhat.com>
7691
7692 * linux-x86-low.c: Do not include stddef.h.
7693 * lynx-ppc-low.c: Likewise.
7694 * tracepoint.c: Likewise.
7695
76962014-08-07 Gary Benson <gbenson@redhat.com>
7697
7698 * server.h: Do not include stdarg.h.
7699 * nto-low.c: Likewise.
7700
77012014-08-07 Gary Benson <gbenson@redhat.com>
7702
7703 * server.h: Do not include stdlib.h.
7704 * inferiors.c: Likewise.
7705 * linux-low.c: Likewise.
7706 * regcache.c: Likewise.
7707 * spu-low.c: Likewise.
7708 * tracepoint.c: Likewise.
7709 * utils.c: Likewise.
7710
77112014-08-07 Gary Benson <gbenson@redhat.com>
7712
7713 * server.h: Do not include stdio.h.
7714 * linux-low.c: Likewise.
7715 * remote-utils.c: Likewise.
7716 * spu-low.c: Likewise.
7717 * utils.c: Likewise.
7718 * wincecompat.c: Likewise.
7719
77202014-08-06 Gary Benson <gbenson@redhat.com>
7721
7722 * regcache.c (init_register_cache): Move conditionals inside if.
7723
77242014-08-06 Gary Benson <gbenson@redhat.com>
7725
7726 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7727
77282014-07-31 Gary Benson <gbenson@redhat.com>
7729
7730 * ax.h: Do not include server.h.
7731 * gdbthread.h: Likewise.
7732 * lynx-low.h: Likewise.
7733 * notif.h: Likewise.
7734
77352014-07-30 Gary Benson <gbenson@redhat.com>
7736
7737 * server.h: Include common-defs.h.
7738 Do not include config.h or build-gnulib-gdbserver/config.h.
7739
77402014-07-30 Gary Benson <gbenson@redhat.com>
7741
7742 * hostio-errno.c: Move server.h to top of includes list.
7743 * inferiors.c: Likewise.
7744 * linux-x86-low.c: Likewise.
7745 * notif.c: Include server.h.
7746
77472014-07-24 Tom Tromey <tromey@redhat.com>
7748 Gary Benson <gbenson@redhat.com>
7749
7750 * server.h (CORE_ADDR): Now unsigned.
7751
77522014-07-16 Pedro Alves <palves@redhat.com>
7753
7754 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7755
77562014-07-15 Pedro Alves <palves@redhat.com>
7757
7758 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7759 copy.
7760
77612014-07-11 Pedro Alves <palves@redhat.com>
7762
7763 * linux-low.c (kill_wait_lwp): New function, based on
7764 kill_one_lwp_callback, but use my_waitpid directly.
7765 (kill_one_lwp_callback, linux_kill): Use it.
7766
77672014-06-23 Pedro Alves <palves@redhat.com>
7768
7769 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7770 before setting DR0..DR3.
7771
77722014-06-20 Gary Benson <gbenson@redhat.com>
7773
7774 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7775 * configure: Regenerated.
7776 * config.in: Likewise.
7777
77782014-06-20 Gary Benson <gbenson@redhat.com>
7779
7780 * Makefile.in (SFILES): Update locations for files moved
7781 from common to nat.
7782 (object file files): Reordered.
7783
77842014-06-20 Gary Benson <gbenson@redhat.com>
7785
7786 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7787 (i386_dr_low_set_addr): Likewise.
7788 (i386_dr_low_get_addr): Likewise.
7789 (i386_dr_low_can_set_control): Likewise.
7790 (i386_dr_low_set_control): Likewise.
7791 (i386_dr_low_get_control): Likewise.
7792 (i386_dr_low_get_status): Likewise.
7793 (i386_get_debug_register_length): Likewise.
7794 * linux-x86-low.c (i386_dr_low_set_addr):
7795 Changed signature. Made static.
7796 (i386_dr_low_get_addr): Likewise.
7797 (i386_dr_low_set_control): Likewise.
7798 (i386_dr_low_get_control): Likewise.
7799 (i386_dr_low_get_status): Likewise.
7800 (i386_dr_low): New global variable.
7801 * win32-i386-low.c (i386_dr_low_set_addr):
7802 Changed signature. Made static.
7803 (i386_dr_low_get_addr): Likewise.
7804 (i386_dr_low_set_control): Likewise.
7805 (i386_dr_low_get_control): Likewise.
7806 (i386_dr_low_get_status): Likewise.
7807 (i386_dr_low): New global variable.
7808
78092014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7810
7811 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7812 * Makefile.in (AR, AR_FLAGS): Define.
7813 * configure: Regenerate.
7814
78152014-06-19 Gary Benson <gbenson@redhat.com>
7816
7817 * Makefile.in (i386-dregs.o): New rule.
7818 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7819 * i386-low.c (target.h): Remove include.
7820 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7821 (DR_CONTROL_SHIFT): Likewise.
7822 (DR_CONTROL_SIZE): Likewise.
7823 (DR_RW_EXECUTE): Likewise.
7824 (DR_RW_WRITE): Likewise.
7825 (DR_RW_READ): Likewise.
7826 (DR_RW_IORW): Likewise.
7827 (DR_LEN_1): Likewise.
7828 (DR_LEN_2): Likewise.
7829 (DR_LEN_4): Likewise.
7830 (DR_LEN_8): Likewise.
7831 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7832 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7833 (DR_ENABLE_SIZE): Likewise.
7834 (DR_LOCAL_SLOWDOWN): Likewise.
7835 (DR_GLOBAL_SLOWDOWN): Likewise.
7836 (DR_CONTROL_RESERVED): Likewise.
7837 (I386_DR_CONTROL_MASK): Likewise.
7838 (I386_DR_VACANT): Likewise.
7839 (I386_DR_LOCAL_ENABLE): Likewise.
7840 (I386_DR_GLOBAL_ENABLE): Likewise.
7841 (I386_DR_DISABLE): Likewise.
7842 (I386_DR_SET_RW_LEN): Likewise.
7843 (I386_DR_GET_RW_LEN): Likewise.
7844 (I386_DR_WATCH_HIT): Likewise.
7845 (i386_wp_op_t): Likewise.
7846 (i386_show_dr): Likewise.
7847 (i386_length_and_rw_bits): Likewise.
7848 (i386_insert_aligned_watchpoint): Likewise.
7849 (i386_remove_aligned_watchpoint): Likewise.
7850 (i386_handle_nonaligned_watchpoint): Likewise.
7851 i386_update_inferior_debug_regs(): Likewise.
7852 (i386_dr_insert_watchpoint): Likewise.
7853 (i386_dr_remove_watchpoint): Likewise.
7854 (i386_dr_region_ok_for_watchpoint): Likewise.
7855 (i386_dr_stopped_data_address): Likewise.
7856 (i386_dr_stopped_by_watchpoint): Likewise.
7857
78582014-06-19 Gary Benson <gbenson@redhat.com>
7859
7860 * i386-low.c (i386_dr_show): Renamed to
7861 i386_show_dr and made static. All uses updated.
7862 (i386_dr_length_and_rw_bits): Renamed to
7863 i386_length_and_rw_bits and made static.
7864 All uses updated.
7865 (i386_dr_insert_aligned_watchpoint): Renamed to
7866 i386_insert_aligned_watchpoint and made static.
7867 All uses updated.
7868 (i386_dr_remove_aligned_watchpoint): Renamed to
7869 i386_remove_aligned_watchpoint and made static.
7870 All uses updated.
7871 (i386_dr_update_inferior_debug_regs): Renamed to
7872 i386_update_inferior_debug_regs and made static.
7873 All uses updated.
7874
78752014-06-18 Gary Benson <gbenson@redhat.com>
7876
7877 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7878 (i386_dr_low_can_set_control): Likewise.
7879 (i386_get_debug_register_length): Likewise.
7880 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7881 (i386_dr_low_can_set_control): Likewise.
7882 (i386_get_debug_register_length): Likewise.
7883
78842014-06-17 Gary Benson <gbenson@redhat.com>
7885
7886 * i386-low.h (i386-dregs.h): New include.
7887 (DR_FIRSTADDR): Now in i386-dregs.h.
7888 (DR_LASTADDR): Likewise.
7889 (DR_NADDR): Likewise.
7890 (DR_STATUS): Likewise.
7891 (DR_CONTROL): Likewise.
7892 (i386_debug_reg_state): Likewise.
7893 (i386_dr_insert_watchpoint): Likewise.
7894 (i386_dr_remove_watchpoint): Likewise.
7895 (i386_dr_region_ok_for_watchpoint): Likewise.
7896 (i386_dr_stopped_data_address): Likewise.
7897 (i386_dr_stopped_by_watchpoint): Likewise.
7898 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7899
79002014-06-18 Gary Benson <gbenson@redhat.com>
7901
7902 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7903 i386_dr_insert_watchpoint.
7904 (i386_low_remove_watchpoint): Renamed to
7905 i386_dr_remove_watchpoint.
7906 (i386_low_region_ok_for_watchpoint): Renamed to
7907 i386_dr_region_ok_for_watchpoint.
7908 (i386_low_stopped_data_address): Renamed to
7909 i386_dr_stopped_data_address.
7910 (i386_low_stopped_by_watchpoint): Renamed to
7911 i386_dr_stopped_by_watchpoint.
7912 * i386-low.c (i386_show_dr): Renamed to
7913 i386_dr_show and made nonstatic. All uses updated.
7914 (i386_length_and_rw_bits): Renamed to
7915 i386_dr_length_and_rw_bits and made nonstatic.
7916 All uses updated.
7917 (i386_insert_aligned_watchpoint): Renamed to
7918 i386_dr_insert_aligned_watchpoint and made nonstatic.
7919 All uses updated.
7920 (i386_remove_aligned_watchpoint): Renamed to
7921 i386_dr_remove_aligned_watchpoint and made nonstatic.
7922 All uses updated.
7923 (i386_update_inferior_debug_regs): Renamed to
7924 i386_dr_update_inferior_debug_regs and made nonstatic.
7925 All uses updated.
7926 (i386_low_insert_watchpoint): Renamed to
7927 i386_dr_insert_watchpoint. All uses updated.
7928 (i386_low_remove_watchpoint): Renamed to
7929 i386_dr_remove_watchpoint. All uses updated.
7930 (i386_low_region_ok_for_watchpoint): Renamed to
7931 i386_dr_region_ok_for_watchpoint. All uses updated.
7932 (i386_low_stopped_data_address): Renamed to
7933 i386_dr_stopped_data_address. All uses updated.
7934 (i386_low_stopped_by_watchpoint): Renamed to
7935 i386_dr_stopped_by_watchpoint. All uses updated.
7936
79372014-06-18 Gary Benson <gbenson@redhat.com>
7938
7939 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7940 (i386_dr_low_can_set_control): Likewise.
7941 (i386_insert_aligned_watchpoint): New check.
7942
79432014-06-18 Gary Benson <gbenson@redhat.com>
7944
7945 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7946 Renamed to state.
7947
79482014-06-18 Gary Benson <gbenson@redhat.com>
7949
7950 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7951 instead of fatal and error.
7952 (i386_handle_nonaligned_watchpoint): Likewise.
7953
79542014-06-18 Gary Benson <gbenson@redhat.com>
7955
7956 * i386-low.c (i386_get_debug_register_length): New macro.
7957 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7958 (i386_show_dr): Use debug_printf instead of fprintf. Use
7959 phex to format values.
7960
79612014-06-18 Gary Benson <gbenson@redhat.com>
7962
7963 * i386-low.h: Comment changes.
7964 * i386-low.c: Likewise.
7965
79662014-06-18 Gary Benson <gbenson@redhat.com>
7967
7968 * i386-low.c: Whitespace changes.
7969
79702014-06-12 Tom Tromey <tromey@redhat.com>
7971
7972 * utils.c (freeargv): Remove.
7973
79742014-06-12 Tom Tromey <tromey@redhat.com>
7975
7976 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7977 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7978 (parse_debug_format_options): Likewise.
7979 (gdbserver_usage): Likewise.
7980 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7981 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7982 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7983 against libiberty.
7984 ($(LIBGNU)): Depend on libiberty.
7985 (all-lib): Recurse into all subdirs.
7986 (install-only): Invoke "install" target in subdirs.
7987 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7988 targets.
7989 * configure: Rebuild.
7990 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7991 for vasprintf, vsnprintf, or gettimeofday.
7992 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7993 srv_tgtobj.
7994
79952014-06-05 Joel Brobecker <brobecker@adacore.com>
7996
7997 * development.sh: Delete.
7998 * Makefile.in (config.status): Adjust dependency on development.sh.
7999 * configure.ac: Adjust development.sh source call.
8000 * configure: Regenerate.
8001
80022014-06-02 Pedro Alves <palves@redhat.com>
8003
8004 * ax.c (gdb_free_agent_expr): New function.
8005 * ax.h (gdb_free_agent_expr): New declaration.
8006 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8007 list.
8008 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8009 static.
8010 (clear_breakpoint_conditions_and_commands): New function.
8011 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8012 (clear_breakpoint_conditions_and_commands): New declaration.
8013
80142014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8015
8016 * linux-aarch64-low.c (asm/ptrace.h): Include.
8017
80182014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8019
8020 Fix TLS access for -static -pthread.
8021 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8022 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8023 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8024
80252014-05-20 Pedro Alves <palves@redhat.com>
8026
8027 * linux-aarch64-low.c (aarch64_insert_point)
8028 (aarch64_remove_point): No longer check whether the type is
8029 supported here. Adjust to new interface.
8030 (the_low_target): Install aarch64_supports_z_point_type as
8031 supports_z_point_type method.
8032 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8033 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8034 instead of a Z packet char. Adjust.
8035 (arm_supports_z_point_type): New function.
8036 (arm_insert_point, arm_remove_point): Adjust to new interface.
8037 (the_low_target): Install arm_supports_z_point_type.
8038 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8039 (cris_insert_point, cris_remove_point): Adjust to new interface.
8040 Don't check whether the type is supported here.
8041 (the_low_target): Install cris_supports_z_point_type.
8042 * linux-low.c (linux_supports_z_point_type): New function.
8043 (linux_insert_point, linux_remove_point): Adjust to new interface.
8044 * linux-low.h (struct linux_target_ops) <insert_point,
8045 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8046 raw_breakpoint pointer parameter.
8047 <supports_z_point_type>: New method.
8048 * linux-mips-low.c (mips_supports_z_point_type): New function.
8049 (mips_insert_point, mips_remove_point): Adjust to new interface.
8050 Use mips_supports_z_point_type.
8051 (the_low_target): Install mips_supports_z_point_type.
8052 * linux-ppc-low.c (the_low_target): Install NULL as
8053 supports_z_point_type method.
8054 * linux-s390-low.c (the_low_target): Install NULL as
8055 supports_z_point_type method.
8056 * linux-sparc-low.c (the_low_target): Install NULL as
8057 supports_z_point_type method.
8058 * linux-x86-low.c (x86_supports_z_point_type): New function.
8059 (x86_insert_point): Adjust to new insert_point interface. Use
8060 insert_memory_breakpoint. Adjust to new
8061 i386_low_insert_watchpoint interface.
8062 (x86_remove_point): Adjust to remove_point interface. Use
8063 remove_memory_breakpoint. Adjust to new
8064 i386_low_remove_watchpoint interface.
8065 (the_low_target): Install x86_supports_z_point_type.
8066 * lynx-low.c (lynx_target_ops): Install NULL as
8067 supports_z_point_type callback.
8068 * nto-low.c (nto_supports_z_point_type): New.
8069 (nto_insert_point, nto_remove_point): Adjust to new interface.
8070 (nto_target_ops): Install nto_supports_z_point_type.
8071 * mem-break.c: Adjust intro comment.
8072 (struct raw_breakpoint) <raw_type, size>: New fields.
8073 <inserted>: Update comment.
8074 <shlib_disabled>: Delete field.
8075 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8076 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8077 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8078 (raw_bkpt_type_to_target_hw_bp_type): New function.
8079 (find_enabled_raw_code_breakpoint_at): New function.
8080 (find_raw_breakpoint_at): New type and size parameters. Use them.
8081 (insert_memory_breakpoint): New function, based off
8082 set_raw_breakpoint_at.
8083 (remove_memory_breakpoint): New function.
8084 (set_raw_breakpoint_at): Reimplement.
8085 (set_breakpoint): New, based on set_breakpoint_at.
8086 (set_breakpoint_at): Reimplement.
8087 (delete_raw_breakpoint): Go through the_target->remove_point
8088 instead of assuming memory breakpoints.
8089 (find_gdb_breakpoint_at): Delete.
8090 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8091 (find_gdb_breakpoint): New function.
8092 (set_gdb_breakpoint_at): Delete.
8093 (z_type_supported): New function.
8094 (set_gdb_breakpoint_1): New function, loosely based off
8095 set_gdb_breakpoint_at.
8096 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8097 (delete_gdb_breakpoint_at): Delete.
8098 (delete_gdb_breakpoint_1): New function, loosely based off
8099 delete_gdb_breakpoint_at.
8100 (delete_gdb_breakpoint): New function.
8101 (clear_gdb_breakpoint_conditions): Rename to ...
8102 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8103 breakpoint.
8104 (add_condition_to_breakpoint): Make static.
8105 (add_breakpoint_condition): Take a struct breakpoint pointer
8106 instead of an address. Adjust.
8107 (gdb_condition_true_at_breakpoint): Rename to ...
8108 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8109 z_type parameter.
8110 (gdb_condition_true_at_breakpoint): Reimplement.
8111 (add_breakpoint_commands): Take a struct breakpoint pointer
8112 instead of an address. Adjust.
8113 (gdb_no_commands_at_breakpoint): Rename to ...
8114 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8115 parameter. Return true if no breakpoint was found. Change debug
8116 output.
8117 (gdb_no_commands_at_breakpoint): Reimplement.
8118 (run_breakpoint_commands): Rename to ...
8119 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8120 and change return type to boolean.
8121 (run_breakpoint_commands): New function.
8122 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8123 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8124 breakpoint. Go through the_target->remove_point instead of
8125 assuming memory breakpoint.
8126 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8127 software and hardware breakpoints.
8128 (reinsert_raw_breakpoint): Go through the_target->insert_point
8129 instead of assuming memory breakpoint.
8130 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8131 software and hardware breakpoints.
8132 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8133 Check both software and hardware breakpoints.
8134 (validate_inserted_breakpoint): Assert the breakpoint is a
8135 software breakpoint. Set the inserted flag to -1 instead of
8136 setting shlib_disabled.
8137 (delete_disabled_breakpoints): Adjust.
8138 (validate_breakpoints): Only validate software breakpoints.
8139 Adjust to inserted flag change.
8140 (check_mem_read, check_mem_write): Skip breakpoint types other
8141 than software breakpoints. Adjust to inserted flag change.
8142 * mem-break.h (enum raw_bkpt_type): New enum.
8143 (raw_breakpoint, struct process_info): Forward declare.
8144 (Z_packet_to_target_hw_bp_type): Delete declaration.
8145 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8146 (set_gdb_breakpoint, delete_gdb_breakpoint)
8147 (clear_breakpoint_conditions): New declarations.
8148 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8149 (breakpoint_inserted_here): Update comment.
8150 (add_breakpoint_condition, add_breakpoint_commands): Replace
8151 address parameter with a breakpoint pointer parameter.
8152 (gdb_breakpoint_here): Update comment.
8153 (delete_gdb_breakpoint_at): Delete.
8154 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8155 * server.c (process_point_options): Take a struct breakpoint
8156 pointer instead of an address. Adjust.
8157 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8158 delete_gdb_breakpoint.
8159 * spu-low.c (spu_target_ops): Install NULL as
8160 supports_z_point_type method.
8161 * target.h: Include mem-break.h.
8162 (struct target_ops) <prepare_to_access_memory>: Update comment.
8163 <supports_z_point_type>: New field.
8164 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8165 instead of a char. Also take a raw breakpoint pointer.
8166 * win32-arm-low.c (the_low_target): Install NULL as
8167 supports_z_point_type.
8168 * win32-i386-low.c (i386_supports_z_point_type): New function.
8169 (i386_insert_point, i386_remove_point): Adjust to new interface.
8170 (the_low_target): Install i386_supports_z_point_type.
8171 * win32-low.c (win32_supports_z_point_type): New function.
8172 (win32_insert_point, win32_remove_point): Adjust to new interface.
8173 (win32_target_ops): Install win32_supports_z_point_type.
8174 * win32-low.h (struct win32_target_ops):
8175 <supports_z_point_type>: New method.
8176 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8177 instead of a char. Also take a raw breakpoint pointer.
8178
81792014-05-20 Pedro Alves <palves@redhat.com>
8180
8181 * mem-break.h: Include break-common.h.
8182 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8183 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8184 (Z_packet_to_target_hw_bp_type): New declaration.
8185 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8186 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8187 (Z_PACKET_ACCESS_WP): Delete macros.
8188 (Z_packet_to_hw_type): Delete function.
8189 * i386-low.h: Don't include break-common.h here.
8190 (Z_packet_to_hw_type): Delete declaration.
8191 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8192 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8193 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8194 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8195 * linux-aarch64-low.c: Don't include break-common.h here.
8196 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8197 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8198 (Z_packet_to_target_hw_bp_type): Delete function.
8199 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8200 function.
8201 (mips_insert_point, mips_remove_point): Use
8202 Z_packet_to_target_hw_bp_type.
8203
82042014-05-20 Pedro Alves <palves@redhat.com>
8205
8206 * linux-aarch64-low.c: Include break-common.h.
8207 (enum target_point_type): Delete.
8208 (Z_packet_to_point_type): Rename to ...
8209 (Z_packet_to_target_hw_bp_type): ... this, and return a
8210 target_hw_bp_type instead.
8211 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8212 instead of an enum target_point_type.
8213 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8214 breakpoint type.
8215 (aarch64_dr_state_insert_one_point)
8216 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8217 (aarch64_handle_aligned_watchpoint)
8218 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8219 Take an enum target_hw_bp_type instead of an enum
8220 target_point_type.
8221 (aarch64_supports_z_point_type): New function.
8222 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8223 use Z_packet_to_target_hw_bp_type.
8224
82252014-05-20 Joel Brobecker <brobecker@adacore.com>
8226
8227 * configure.ac: Only use -Werror by default when DEVELOPMENT
8228 is true.
8229 * configure: Regenerate.
8230
82312014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8232
8233 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8234 * linux-x86-low.c (X86_64_USER_REGS): New.
8235 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8236
82372014-04-28 Yao Qi <yao@codesourcery.com>
8238
8239 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8240 name.
8241
82422014-04-25 Pedro Alves <palves@redhat.com>
8243
8244 PR server/16255
8245 * linux-low.c (linux_attach_fail_reason_string): New function.
8246 (linux_attach_lwp): Delete.
8247 (linux_attach_lwp_1): Rename to ...
8248 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8249 argument. Remove "initial" parameter. Return int instead of
8250 void. Don't error or warn here.
8251 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8252 failure to attach to the tgid. Call warning when failing to
8253 attach to an lwp.
8254 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8255 argument. Remove "initial" parameter. Return int instead of
8256 void. Don't error or warn here.
8257 (linux_attach_fail_reason_string): New declaration.
8258 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8259 interface change. Use linux_attach_fail_reason_string.
8260
82612014-04-24 Michael Sturm <michael.sturm@mintel.com>
8262 Walfred Tedeschi <walfred.tedeschi@intel.com>
8263
8264 * Makefile.in: Added rules to handle new files
8265 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8266 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8267 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8268 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8269 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8270 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8271 x32-avx512-linux.o.
8272 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8273 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8274 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8275 i386/x32-avx512.xml.
8276 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8277 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8278 i386/x32-avx512-linux.xml.
8279 * i387-fp.c (num_avx512_k_registers): New constant for number
8280 of K registers.
8281 (num_avx512_zmmh_low_registers): New constant for number of
8282 lower ZMM registers (0-15).
8283 (num_avx512_zmmh_high_registers): New constant for number of
8284 higher ZMM registers (16-31).
8285 (num_avx512_ymmh_registers): New contant for number of higher
8286 YMM registers (ymm16-31 added by avx521 on x86_64).
8287 (num_avx512_xmm_registers): New constant for number of higher
8288 XMM registers (xmm16-31 added by AVX512 on x86_64).
8289 (struct i387_xsave): Add space for AVX512 registers.
8290 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8291 Add code to handle AVX512 registers.
8292 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8293 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8294 prototypei from generated file.
8295 (tdesc_amd64_avx512_linux): Likewise.
8296 (init_registers_x32_avx512_linux): Likewise.
8297 (tdesc_x32_avx512_linux): Likewise.
8298 (init_registers_i386_avx512_linux): Likewise.
8299 (tdesc_i386_avx512_linux): Likewise.
8300 (x86_64_regmap): Add AVX512 registers.
8301 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8302 mask.
8303 (initialize_low_arch): Add code to initialize AVX512 registers.
8304
83052014-04-23 Pedro Alves <palves@redhat.com>
8306
8307 * mem-break.c (find_gdb_breakpoint_at): Make static.
8308 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8309
83102014-04-23 Pedro Alves <palves@redhat.com>
8311
8312 * i386-low.c: Don't include break-common.h here.
8313 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8314 prototype to take target_hw_bp_type as argument instead of a Z
8315 packet char.
8316 * i386-low.h: Include break-common.h here.
8317 (Z_packet_to_hw_type): Declare.
8318 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8319 prototypes.
8320 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8321 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8322 (x86_remove_point): Convert the packet number to a
8323 target_hw_bp_type before calling i386_low_remove_watchpoint.
8324 * win32-i386-low.c (i386_insert_point): Convert the packet number
8325 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8326 (i386_remove_point): Convert the packet number to a
8327 target_hw_bp_type before calling i386_low_remove_watchpoint.
8328
83292014-04-23 Pedro Alves <palves@redhat.com>
8330
8331 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8332
83332014-04-10 Pedro Alves <palves@redhat.com>
8334
8335 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8336 Check if the condition or command is NULL before checking if the
8337 breakpoint is known. On success, return true.
8338 * mem-break.h (add_breakpoint_condition): Document return.
8339 (add_breakpoint_commands): Add describing comment.
8340 * server.c (skip_to_semicolon): New function.
8341 (process_point_options): Use it.
8342
83432014-04-09 Pedro Alves <palves@redhat.com>
8344
8345 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8346 to lwpid_of.
8347
83482014-02-27 Pedro Alves <palves@redhat.com>
8349
8350 PR 12702
8351 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8352 macros.
8353 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8354 output.
8355 (last_thread_of_process_p): Take a PID argument instead of a
8356 thread pointer.
8357 (linux_wait_for_lwp): Delete.
8358 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8359 functions.
8360 (linux_low_filter_event): New function, party factored out from
8361 linux_wait_for_event.
8362 (linux_wait_for_event): Rename to ...
8363 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8364 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8365 sigsuspend. Check for zombie leaders.
8366 (linux_wait_for_event): Reimplement as wrapper around
8367 linux_wait_for_event_filtered.
8368 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8369 a normal or signal exit is seen, it's the whole process exiting.
8370 (wait_for_sigstop): No longer a for_each_inferior callback.
8371 Rewrite on top of linux_wait_for_event_filtered.
8372 (stop_all_lwps): Call wait_for_sigstop directly.
8373 * server.c (resume, handle_target_event): Handle
8374 TARGET_WAITKIND_NO_RESUMED.
8375
83762014-02-26 Joel Brobecker <brobecker@adacore.com>
8377
8378 * win32-low.c (psapi_get_dll_name,
8379 * win32_CreateToolhelp32Snapshot): Delete.
8380 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8381 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8382 Delete.
8383 (handle_load_dll): Add function description.
8384 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8385
83862014-02-26 Joel Brobecker <brobecker@adacore.com>
8387
8388 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8389 Add comment.
8390 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8391 base address when calling win32_add_one_solib.
8392 (handle_load_dll): Delete local variable load_addr.
8393 Remove 0x1000 offset applied to DLL base address when calling
8394 win32_add_one_solib.
8395 (handle_unload_dll): Add comment.
8396
83972014-02-26 Joel Brobecker <brobecker@adacore.com>
8398
8399 * win32-low.c (win32_add_all_dlls): Renames
8400 win32_ensure_ntdll_loaded. Rewrite function documentation.
8401 Adjust implementation to always load all DLLs.
8402 Add 0x1000 offset to DLL base address when calling
8403 win32_add_one_solib.
8404 (child_initialization_done): New static global.
8405 (do_initial_child_stuff): Set child_initialization_done to
8406 zero during child initialization, and 1 after. Replace call
8407 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8408 Add comment.
8409 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8410 (handle_unload_dll): Add function documentation.
8411 (get_child_debug_event): Ignore load and unload DLL events
8412 during child initialization.
8413
84142014-02-20 Doug Evans <dje@google.com>
8415
8416 Remove global all_lwps.
8417 * inferiors.h (ptid_of): Move here from linux-low.h.
8418 (pid_of, lwpid_of): Ditto.
8419 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8420 parameter is a struct thread_info * now.
8421 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8422 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8423 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8424 directly.
8425 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8426 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8427 * linux-arm-low.c (update_registers_callback): Update, "entry"
8428 parameter is a struct thread_info * now.
8429 Fetch lwpid from current_inferior directly.
8430 (arm_insert_point): Pass &all_threads to find_inferior instead of
8431 &all_lwps.
8432 (arm_remove_point): Ditto.
8433 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8434 (arm_prepare_to_resume): Fetch pid from thread.
8435 (arm_read_description): Fetch lwpid from current_inferior directly.
8436 * linux-low.c (all_lwps): Delete.
8437 (delete_lwp): Delete call to remove_inferior.
8438 (handle_extended_wait): Fetch lwpid from thread.
8439 (add_lwp): Don't set lwp->entry.id. Remove call to
8440 add_inferior_to_list.
8441 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8442 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8443 (kill_one_lwp_callback): Ditto.
8444 (linux_kill): Don't dereference NULL pointer.
8445 Fetch ptid,lwpid from thread.
8446 (get_detach_signal): Fetch ptid from thread.
8447 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8448 Simplify call to regcache_invalidate_thread.
8449 (delete_lwp_callback): Update, "entry" parameter is a
8450 struct thread_info * now. Fetch pid from thread.
8451 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8452 (status_pending_p_callback): Update, "entry" parameter is a
8453 struct thread_info * now. Fetch ptid from thread.
8454 (find_lwp_pid): Update, "entry" parameter is a
8455 struct thread_info * now.
8456 (linux_wait_for_lwp): Fetch pid from thread.
8457 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8458 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8459 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8460 (dequeue_one_deferred_signal): Ditto.
8461 (cancel_breakpoint): Fetch ptid from current_inferior.
8462 (linux_wait_for_event): Pass &all_threads to find_inferior,
8463 not &all_lwps. Fetch ptid, lwpid from thread.
8464 (count_events_callback): Update, "entry" parameter is a
8465 struct thread_info * now.
8466 (select_singlestep_lwp_callback): Ditto.
8467 (select_event_lwp_callback): Ditto.
8468 (cancel_breakpoints_callback): Ditto.
8469 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8470 not &all_lwps.
8471 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8472 (unsuspend_one_lwp): Update, "entry" parameter is a
8473 struct thread_info * now.
8474 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8475 not &all_lwps.
8476 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8477 Fetch lwpid from thread, not lwp.
8478 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8479 Pass &all_threads to find_inferior, not &all_lwps.
8480 (send_sigstop): Fetch lwpid from thread, not lwp.
8481 (send_sigstop_callback): Update, "entry" parameter is a
8482 struct thread_info * now.
8483 (suspend_and_send_sigstop_callback): Ditto.
8484 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8485 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8486 struct thread_info * now.
8487 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8488 from thread, lwp.
8489 (lwp_running): Update, "entry" parameter is a
8490 struct thread_info * now.
8491 (stop_all_lwps): Fetch ptid from thread.
8492 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8493 (linux_resume_one_lwp): Fetch lwpid from thread.
8494 (linux_set_resume_request): Update, "entry" parameter is a
8495 struct thread_info * now. Fetch pid, lwpid from thread.
8496 (resume_status_pending_p): Update, "entry" parameter is a
8497 struct thread_info * now.
8498 (need_step_over_p): Ditto. Fetch lwpid from thread.
8499 (start_step_over): Fetch lwpid from thread.
8500 (linux_resume_one_thread): Update, "entry" parameter is a
8501 struct thread_info * now. Fetch lwpid from thread.
8502 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8503 (proceed_one_lwp): Update, "entry" parameter is a
8504 struct thread_info * now. Fetch lwpid from thread.
8505 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8506 struct thread_info * now.
8507 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8508 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8509 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8510 directly.
8511 (regsets_store_inferior_registers): Ditto.
8512 (fetch_register, store_register): Ditto.
8513 (linux_read_memory, linux_write_memory): Ditto.
8514 (linux_request_interrupt): Ditto.
8515 (linux_read_auxv): Ditto.
8516 (linux_xfer_siginfo): Ditto.
8517 (linux_qxfer_spu): Ditto.
8518 (linux_qxfer_libraries_svr4): Ditto.
8519 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8520 moved to inferiors.h.
8521 (get_lwp): Delete.
8522 (get_thread_lwp): Update.
8523 (struct lwp_info): Delete member "entry". Simplify comment for
8524 member "thread".
8525 (all_lwps): Delete.
8526 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8527 current_inferior directly.
8528 (update_watch_registers_callback): Update, "entry" parameter is a
8529 struct thread_info * now. Fetch pid from thread.
8530 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8531 (mips_insert_point): Fetch lwpid from current_inferior.
8532 Pass &all_threads to find_inferior, not &all_lwps.
8533 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8534 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8535 directly.
8536 (mips_stopped_data_address): Ditto.
8537 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8538 directly.
8539 * linux-tile-low.c (tile_arch_setup): Ditto.
8540 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8541 (update_debug_registers_callback): Update, "entry" parameter is a
8542 struct thread_info * now. Fetch pid from thread.
8543 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8544 Pass &all_threads to find_inferior, not &all_lwps.
8545 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8546 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8547 Pass &all_threads to find_inferior, not &all_lwps.
8548 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8549 (i386_dr_low_get_status): Ditto.
8550 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8551 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8552 (x86_linux_read_description): Ditto.
8553 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8554
85552014-02-20 Doug Evans <dje@google.com>
8556
8557 * inferiors.c (get_first_inferior): Fix buglet.
8558
85592014-02-19 Doug Evans <dje@google.com>
8560
8561 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8562 * inferiors.c (add_thread): Change result type to struct thread_info *.
8563 All callers updated.
8564 (add_lwp): Call add_thread here instead of in callers.
8565 All callers updated.
8566 * linux-low.h (get_lwp_thread): Rewrite.
8567 (struct lwp_info): New member "thread".
8568
85692014-02-19 Doug Evans <dje@google.com>
8570
8571 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8572 All callers updated.
8573
85742014-02-19 Doug Evans <dje@google.com>
8575
8576 * inferiors.c (add_thread): Fix whitespace.
8577
85782014-02-19 Doug Evans <dje@google.com>
8579
8580 * dll.c (clear_dlls): Replace accessing list implemention details
8581 with API function.
8582 * gdbthread.h (get_first_thread): Declare.
8583 * inferiors.c (for_each_inferior_with_data): New function.
8584 (get_first_thread): New function.
8585 (find_thread_ptid): Simplify.
8586 (get_first_inferior): New function.
8587 (clear_list): Delete.
8588 (one_inferior_p): New function.
8589 (clear_inferior_list): New function.
8590 (clear_inferiors): Update.
8591 * inferiors.h (for_each_inferior_with_data): Declare.
8592 (clear_inferior_list): Declare.
8593 (one_inferior_p): Declare.
8594 (get_first_inferior): Declare.
8595 * linux-low.c (linux_wait_for_event): Replace accessing list
8596 implemention details with API function.
8597 * server.c (target_running): Ditto.
8598 (accumulate_file_name_length): New function.
8599 (emit_dll_description): New function.
8600 (handle_qxfer_libraries): Replace accessing list implemention
8601 details with API function.
8602 (handle_qxfer_threads_worker): New function.
8603 (handle_qxfer_threads_proper): Replace accessing list implemention
8604 details with API function.
8605 (handle_query): Ditto.
8606 (visit_actioned_threads_callback_ftype): New typedef.
8607 (visit_actioned_threads_data): New struct.
8608 (visit_actioned_threads): Rewrite to be find_inferior callback.
8609 (resume): Call find_inferior.
8610 (handle_status): Replace accessing list implemention
8611 details with API function.
8612 (process_serial_event): Replace accessing list implemention details
8613 with API function.
8614 * target.c (set_desired_inferior): Replace accessing list implemention
8615 details with API function.
8616 * tracepoint.c (same_process_p): New function.
8617 (gdb_agent_about_to_close): Replace accessing list implemention
8618 details with API function.
8619 * win32-low.c (child_delete_thread): Replace accessing list
8620 implemention details with API function.
8621 (match_dll_by_basename): New function.
8622 (dll_is_loaded_by_basename): New function.
8623 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8624 details call to dll_is_loaded_by_basename.
8625
86262014-02-19 Doug Evans <dje@google.com>
8627
8628 * dll.h (struct dll_info): Add comment.
8629 * gdbthread.h (struct thread_info): Add comment.
8630 (current_ptid): Simplify.
8631 * inferiors.c (add_process): Update.
8632 (remove_process): Update.
8633 * inferiors.h (struct process_info): Rename member "head" to "entry".
8634 * linux-low.c (delete_lwp): Update.
8635 (add_lwp): Update.
8636 (last_thread_of_process_p): Update.
8637 (kill_one_lwp_callback, linux_kill): Update.
8638 (status_pending_p_callback): Update.
8639 (wait_for_sigstop): Update. Simplify read of ptid.
8640 (start_step_over): Update.
8641 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8642 (get_lwp_thread): Update.
8643 (struct lwp_info): Rename member "head" to "entry".
8644 * regcache.h (inferior_list_entry): Delete.
8645 * server.c (kill_inferior_callback): Update.
8646 (detach_or_kill_inferior_callback): Update.
8647 (print_started_pid): Update.
8648 (print_attached_pid): Update.
8649 (process_serial_event): Simplify read of ptid.
8650 * thread-db.c (thread_db_create_event): Update.
8651 (thread_db_get_tls_address): Update.
8652 * win32-low.c (current_inferior_ptid): Simplify.
8653
86542014-02-19 Tom Tromey <tromey@redhat.com>
8655
8656 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8657 argument.
8658 (target_supports_btrace): Update.
8659
86602014-02-14 Yao Qi <yao@codesourcery.com>
8661
8662 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8663 (rsp-low-ipa.o): New target.
8664
86652014-02-12 Tom Tromey <tromey@redhat.com>
8666
8667 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8668 convert_ascii_to_int.
8669 * regcache.c (registers_to_string): Likewise.
8670 * remote-utils.c (decode_M_packet): Likewise.
8671 * server.c (process_serial_event): Likewise.
8672
86732014-02-12 Tom Tromey <tromey@redhat.com>
8674
8675 * server.c (handle_query, handle_v_run): Use hex2bin, not
8676 unhexify.
8677 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8678
86792014-02-12 Tom Tromey <tromey@redhat.com>
8680
8681 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8682 convert_int_to_ascii.
8683 * regcache.c (registers_to_string, collect_register_as_string):
8684 Likewise.
8685 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8686 Likewise.
8687 * server.c (process_serial_event): Likewise.
8688 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8689 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8690
86912014-02-12 Tom Tromey <tromey@redhat.com>
8692
8693 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8694 bin2hex, not hexify.
8695 * tracepoint.c (cmd_qtstatus): Likewise.
8696
86972014-02-12 Tom Tromey <tromey@redhat.com>
8698
8699 * remote-utils.c (monitor_output): Pass explicit length to
8700 hexify.
8701
87022014-02-12 Tom Tromey <tromey@redhat.com>
8703
8704 * tracepoint.c: Include rsp-low.h.
8705 * server.c: Include rsp-low.h.
8706 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8707 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8708 declare.
8709 * remote-utils.c: Include rsp-low.h.
8710 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8711 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8712 (convert_int_to_ascii, convert_ascii_to_int): Move to
8713 common/rsp-low.c.
8714 * regcache.c: Include rsp-low.h.
8715 * ax.c: Include rsp-low.h.
8716 * Makefile.in (SFILES): Add common/rsp-low.c.
8717 (OBS): Add rsp-low.o.
8718 (rsp-low.o): New target.
8719
87202014-02-12 Tom Tromey <tromey@redhat.com>
8721
8722 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8723 Include print-utils.h.
8724 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8725 (plongest, thirty_two, phex_nz): Remove.
8726 * Makefile.in (SFILES): Add common/print-utils.c.
8727 (OBS): Add print-utils.o.
8728 (print-utils-ipa.o): New target.
8729 (print-utils.o): New target.
8730 (IPA_OBJS): Add print-utils-ipa.o.
8731
87322014-02-06 Tom Tromey <tromey@redhat.com>
8733
8734 * Makefile.in (SFILES): Fix indentation.
8735
87362014-02-05 Doug Evans <dje@google.com>
8737
8738 * linux-low.c (linux_wait_for_event): Improve comment.
8739 (linux_wait_1): Keep current_inferior in sync with event_child.
8740
87412014-01-22 Doug Evans <dje@google.com>
8742
8743 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8744
87452014-01-22 Doug Evans <dje@google.com>
8746
8747 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8748 * configure: Regenerate.
8749 * config.in: Regenerate.
8750 * Makefile.in (SFILES): Add debug.c.
8751 (OBS): Add debug.o.
8752 * debug.c: New file.
8753 * debug.h: New file.
8754 * linux-aarch64-low.c (*): Update all debugging printfs to use
8755 debug_printf instead of fprintf.
8756 * linux-arm-low.c (*): Ditto.
8757 * linux-cris-low.c (*): Ditto.
8758 * linux-crisv32-low.c (*): Ditto.
8759 * linux-m32r-low.c (*): Ditto.
8760 * linux-sparc-low.c (*): Ditto.
8761 * linux-x86.c (*): Ditto.
8762 * linux-low.c (*): Ditto.
8763 (linux_wait_1): Add calls to debug_enter, debug_exit.
8764 (linux_wait): Remove redundant debugging printf.
8765 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8766 (linux_resume, unstop_all_lwps): Ditto.
8767 * mem-break.c (*): Update all debugging printfs to use
8768 debug_printf instead of fprintf.
8769 * remote-utils.c (*): Ditto.
8770 * thread-db.c (*): Ditto.
8771 * server.c #include <ctype.h>, "gdb_vecs.h".
8772 (debug_threads): Moved to debug.c.
8773 (*): Update all debugging printfs to use debug_printf instead of
8774 fprintf.
8775 (start_inferior): Replace call to fflush with call to debug_flush.
8776 (monitor_show_help): Mention set debug-format.
8777 (parse_debug_format_options): New function.
8778 (handle_monitor_command): Handle "monitor set debug-format".
8779 (gdbserver_usage): Mention --debug-format.
8780 (main): Parse --debug-format.
8781 * server.h (debug_threads): Declaration moved to debug.h.
8782 #include "debug.h".
8783 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8784 trace_debug_1 that uses debug_printf.
8785 (tracepoint_look_up_symbols): Update all debugging printfs to use
8786 debug_printf instead of fprintf.
8787
87882014-01-20 Baruch Siach <baruch@tkos.co.il>
8789
8790 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8791 sys/ptrace.h.
8792
87932014-01-17 Pedro Alves <palves@redhat.com>
8794
8795 PR build/16445
8796 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8797 defined after including gdb_proc_service.h.
8798
87992014-01-16 Doug Evans <dje@google.com>
8800
8801 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8802 (match_dll): Use it.
8803
88042014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8805
8806 * target.h (target_ops) <read_btrace>: Change parameters and
8807 return type to allow error reporting.
8808 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8809 trace reading errors on.
8810 * linux-low.c (linux_low_read_btrace): Pass trace reading
8811 errors on.
8812 (linux_low_disable_btrace): New.
8813
88142014-01-15 Doug Evans <dje@google.com>
8815
8816 * inferiors.c (thread_id_to_gdb_id): Delete.
8817 * inferiors.h (thread_id_to_gdb_id): Delete.
8818
88192014-01-13 Eli Zaretskii <eliz@gnu.org>
8820
8821 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8822 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8823 versions.
8824
88252014-01-08 Pedro Alves <palves@redhat.com>
8826
8827 * server.c (handle_status): Don't discard previous queued stop
8828 replies or thread's pending status here.
8829 (main) <disconnection>: Do it here instead.
8830
88312014-01-08 Pedro Alves <palves@redhat.com>
8832
8833 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8834 * server.c (visit_actioned_threads, handle_pending_status): New
8835 function.
8836 (handle_v_cont): Factor out parts to ...
8837 (resume): ... this new function. If in all-stop, and a thread
8838 being resumed has a pending status, report it without actually
8839 resuming.
8840 (myresume): Adjust to use the new 'resume' function.
8841 (clear_pending_status_callback, set_pending_status_callback)
8842 (find_status_pending_thread_callback): New functions.
8843 (handle_status): Handle the case of multiple threads having
8844 interesting statuses to report. Report threads' real last signal
8845 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8846 with an interesting thread to report the status for, instead of
8847 always reporting the status of the first thread.
8848
88492014-01-01 Joel Brobecker <brobecker@adacore.com>
8850
8851 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8852 * gdbreplay.c (gdbreplay_version): Likewise.
8853
88542013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8855
8856 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8857 iov.iov_len with the real length in use.
8858
88592013-12-13 Joel Brobecker <brobecker@adacore.com>
8860
8861 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8862 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8863 for all targets that use win32-low.c.
8864 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8865 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8866
88672013-12-13 Pedro Alves <palves@redhat.com>
8868
8869 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8870 if equal to TARGET_WAITKIND_LOADED.
8871 * win32-low.c (cached_status): New static global.
8872 (win32_wait): Add declaration.
8873 (do_initial_child_stuff): Flush all initial pending debug events
8874 up to the initial breakpoint.
8875 (win32_wait): If CACHED_STATUS was set, return that instead
8876 of doing a real wait. Remove the code resuming the execution
8877 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8878 during the initial phase. Also remove the code changing
8879 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8880 TARGET_WAITKIND_STOPPED.
8881
88822013-12-11 Yao Qi <yao@codesourcery.com>
8883
8884 * notif.c (handle_notif_ack): Return 0 if no notification
8885 matches.
8886
88872013-11-20 Doug Evans <dje@google.com>
8888
8889 * linux-low.c (linux_set_resume_request): Fix comment.
8890
88912013-11-20 Doug Evans <dje@google.com>
8892
8893 * linux-low.c (resume_status_pending_p): Tweak comment.
8894
88952013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8896
8897 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8898 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8899 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8900 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8901 (srv_amd64_regobj): Add amd64-mpx.o.
8902 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8903 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8904 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8905 * i387-fp.c (num_pl_bnd_register) Added constant.
8906 (num_pl_bnd_cfg_registers) Added constant.
8907 (struct i387_xsave) Added reserved area and MPX fields.
8908 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8909 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8910 function.
8911 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8912 (init_registers_amd64_mpx_linux): Declare new function.
8913 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8914 (x86_64_regmap): Add MPX registers.
8915 (x86_linux_read_description): Add MPX case.
8916 (initialize_low_arch): Initialize MPX targets.
8917
89182013-11-18 Tom Tromey <tromey@redhat.com>
8919
8920 * configure: Rebuild.
8921 * configure.ac: Don't check for stdlib.h.
8922 * gdbreplay.c: Unconditionally include stdlib.h.
8923
89242013-11-18 Tom Tromey <tromey@redhat.com>
8925
8926 * config.in: Rebuild.
8927 * configure: Rebuild.
8928 * configure.ac: Don't use AC_HEADER_DIRENT.
8929
89302013-11-18 Tom Tromey <tromey@redhat.com>
8931
8932 * server.h: Don't check HAVE_STRING_H.
8933 * gdbreplay.c: Don't check HAVE_STRING_H.
8934 * configure: Rebuild.
8935
89362013-11-18 Tom Tromey <tromey@redhat.com>
8937
8938 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8939 LIBGNU.
8940
89412013-11-08 Tom Tromey <tromey@redhat.com>
8942
8943 * configure, config.in: Rebuild.
8944 * configure.ac: Remove unused configury.
8945
89462013-11-08 Tom Tromey <tromey@redhat.com>
8947
8948 * acinclude.m4: Include common.m4, codeset.m4.
8949 * configure, config.in: Rebuild.
8950 * configure.ac: Use GDB_AC_COMMON.
8951
89522013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8953
8954 * linux-s390-low.c (HWCAP_S390_TE): New define.
8955 (s390_arch_setup): Consider the TE field in the HWCAP for
8956 determining 'have_regset_tdb'.
8957
89582013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8959
8960 PR gdb/16014
8961 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8962 call to sizeof.
8963
89642013-10-02 Pedro Alves <palves@redhat.com>
8965
8966 * server.c (process_serial_event): Don't output "GDBserver
8967 exiting" if GDB is connected through stdio.
8968 * target.c (mywait): Likewise, be silent if GDB is connected
8969 through stdio.
8970
89712013-10-01 Joel Brobecker <brobecker@adacore.com>
8972
8973 * lynx-low.c (lynx_add_threads_after_attach): New function.
8974 (lynx_attach): Remove call to add_thread. Add call to
8975 lynx_add_threads_after_attach instead.
8976
89772013-09-28 Mike Frysinger <vapier@gentoo.org>
8978
8979 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8980 * config.in, configure: Regenerated.
8981
89822013-09-18 Yao Qi <yao@codesourcery.com>
8983
8984 PR server/15959
8985 * server.c (start_inferior): Clear 'resume_info'.
8986
89872013-09-16 Jiong Wang <jiwang@tilera.com>
8988
8989 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8990 for each register.
8991
89922013-09-16 Jiong Wang <jiwang@tilera.com>
8993
8994 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8995 linux-tile-low.o to srv_tgtobj.
8996
89972013-09-16 Will Newton <will.newton@linaro.org>
8998
8999 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9000 out regs.
9001
90022013-09-06 Pedro Alves <palves@redhat.com>
9003
9004 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9005 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9006 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9007 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9008 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9009 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9010
90112013-09-06 Pedro Alves <palves@redhat.com>
9012
9013 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9014 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9015
90162013-09-06 Pedro Alves <palves@redhat.com>
9017
9018 * linux-amd64-ipa.c: Include tracepoint.h.
9019 * linux-i386-ipa.c: Include tracepoint.h.
9020
90212013-09-06 Ricard Wanderlof <ricardw@axis.com>
9022
9023 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9024 (ps_get_thread_area): New function.
9025
90262013-09-06 Ricard Wanderlof <ricardw@axis.com>
9027
9028 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9029 (initialize_low_arch): Call init_registers_crisv32 rather than
9030 init_register_crisv32.
9031
90322013-09-05 Pedro Alves <palves@redhat.com>
9033
9034 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9035 to ...
9036 * hostio.h: ... this new file.
9037 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9038 win32-low.c: Include hostio.h.
9039
90402013-09-05 Pedro Alves <palves@redhat.com>
9041
9042 * server.h (gdb_client_data, handler_func, callback_handler_func)
9043 (delete_file_handler, add_file_handler, append_callback_event)
9044 (delete_callback_event, start_event_loop, initialize_event_loop):
9045 Move to event-loop.h and include it.
9046 * event-loop.h: New file.
9047
90482013-09-05 Pedro Alves <palves@redhat.com>
9049
9050 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9051 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9052 (loaded_dll, unloaded_dll): Move to ...
9053 * dll.h: ... this new file.
9054 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9055
90562013-09-05 Pedro Alves <palves@redhat.com>
9057
9058 * server.h (current_process, get_thread_process, all_processes)
9059 (add_inferior_to_list, for_each_inferior, current_inferior)
9060 (remove_inferior, add_process, remove_process, find_process_pid)
9061 (have_started_inferiors_p, have_attached_inferiors_p)
9062 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9063 (clear_inferiors, find_inferior, find_inferior_id)
9064 (inferior_target_data, set_inferior_target_data)
9065 (inferior_regcache_data, set_inferior_regcache_data): Move to
9066 inferiors.h, and include it.
9067 * inferiors.h: New file.
9068
90692013-09-05 Pedro Alves <palves@redhat.com>
9070
9071 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9072 Move ...
9073 * ax.h: ... here.
9074
90752013-09-05 Pedro Alves <palves@redhat.com>
9076
9077 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9078 tracepoint.h.
9079 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9080 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9081 (handle_tracepoint_general_set, handle_tracepoint_query)
9082 (tracepoint_finished_step, tracepoint_was_hit)
9083 (release_while_stepping_state_list, current_traceframe)
9084 (in_readonly_region, traceframe_read_mem)
9085 (fetch_traceframe_registers, traceframe_read_sdata)
9086 (traceframe_read_info, struct fast_tpoint_collect_status)
9087 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9088 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9089 (supply_fast_tracepoint_registers)
9090 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9091 (ipa_tdesc, claim_trampoline_space)
9092 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9093 (agent_mem_read, agent_get_trace_state_variable_value)
9094 (agent_set_trace_state_variable_value, agent_tsv_read)
9095 (agent_mem_read_string, get_raw_reg_func_addr)
9096 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9097 * tracepoint.h: ... this new file.
9098
90992013-09-05 Pedro Alves <palves@redhat.com>
9100
9101 * server.h (perror_with_name, error, fatal, warning, paddress)
9102 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9103 include it.
9104 * utils.h: New file.
9105
91062013-09-05 Pedro Alves <palves@redhat.com>
9107
9108 * server.h (remote_debug, noack_mode, transport_is_reliable)
9109 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9110 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9111 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9112 (write_enn, initialize_async_io, enable_async_io)
9113 (disable_async_io, check_remote_input_interrupt_request)
9114 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9115 (dead_thread_notify, prepare_resume_reply)
9116 (decode_address_to_semicolon, decode_address, decode_m_packet)
9117 (decode_M_packet, decode_X_packet, decode_xfer_write)
9118 (decode_search_memory_packet, unhexify, hexify)
9119 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9120 (look_up_one_symbol, relocate_instruction)
9121 (monitor_output): Move to remote-utils.h, and include it.
9122 * remote-utils.h: New file.
9123
91242013-09-05 Pedro Alves <palves@redhat.com>
9125
9126 * server.h (_): Delete.
9127
91282013-09-02 Pedro Alves <palves@redhat.com>
9129
9130 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9131 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9132 allocated.
9133 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9134
91352013-09-02 Pierre Muller <muller@sourceware.org>
9136
9137 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9138 or WriteProcessMemory complete successfully and handle
9139 ERROR_PARTIAL_COPY error.
9140
91412013-09-02 Pedro Alves <palves@redhat.com>
9142
9143 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9144 error instead of EIO.
9145
91462013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9147
9148 PR server/15604
9149 * linux-low.c: Include filestuff.h.
9150 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9151 * lynx-low.c: Include filestuff.h.
9152 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9153 * server.c: Include filestuff.h.
9154 (main): Call notice_open_fds.
9155 * spu-low.c: Include filestuff.h.
9156 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9157
91582013-08-22 Luis Machado <lgustavo@codesourcery.com>
9159
9160 * Makefile.in: Explain why ../target and ../nat are not
9161 listed as include file search paths.
9162 (linux-waitpid.o): New object file rule.
9163 * configure.srv (srv_native_linux_obj): New variable.
9164 Replace all occurrences of linux native object files with
9165 $srv_native_linux_obj.
9166 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9167 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9168 (linux_enable_event_reporting): Remove declaration.
9169 (my_waitpid): Moved to common/linux-waitpid.c.
9170 (linux_wait_for_event): Pass ptid when calling
9171 linux_enable_event_reporting.
9172 (linux_supports_tracefork_flag): Remove.
9173 (linux_enable_event_reporting): Likewise.
9174 (linux_tracefork_grandchild): Remove.
9175 (STACK_SIZE): Moved to common/linux-ptrace.c.
9176 (linux_tracefork_child): Remove.
9177 (linux_test_for_tracefork): Remove.
9178 (linux_look_up_symbols): Call linux_supports_traceclone.
9179 (initialize_low): Remove call to linux_test_for_tracefork.
9180 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9181 common/linux-ptrace.h.
9182 (PTRACE_TYPE_ARG4): Likewise.
9183 Include linux-ptrace.h.
9184
91852013-08-21 Pedro Alves <palves@redhat.com>
9186
9187 * config.in: Renegerate.
9188
91892013-08-19 Luis Machado <lgustavo@codesourcery.com>
9190
9191 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9192 (SFILES): Remove $(srcdir)/common/target-common.c and
9193 add $(srcdir)/target/waitstatus.c.
9194 (OBS): Remove target-common.o and add waitstatus.o.
9195 (server_h): Remove $(srcdir)/../common/target-common.h and
9196 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9197 and $(srcdir)/../target/waitstatus.h.
9198 (target-common.o): Remove.
9199 (waitstatus.o): New target object file.
9200 * target.h: Do not include target-common.h and
9201 include target/resume.h, target/wait.h and
9202 target/waitstatus.h.
9203
92042013-08-13 Luis Machado <lgustavo@codesourcery.com>
9205
9206 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9207 to PTRACE_TYPE_ARG3.
9208 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9209 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9210 PTRACE_TYPE_ARG4.
9211 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9212 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9213
92142013-07-27 Jie Zhang <jie@codesourcery.com>
9215 Daniel Jacobowitz <dan@codesourcery.com>
9216 Yao Qi <yao@codesourcery.com>
9217
9218 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9219 (mips-linux-watch.o): New rule.
9220 (mips_linux_watch_h): New variable.
9221 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9222 srv_tgtobj.
9223 * linux-mips-low.c: Include mips-linux-watch.h.
9224 (struct arch_process_info, struct arch_lwp_info): New.
9225 (update_watch_registers_callback): New function.
9226 (mips_linux_new_process, mips_linux_new_thread) New functions.
9227 (mips_linux_prepare_to_resume, mips_insert_point): New
9228 functions.
9229 (mips_remove_point, mips_stopped_by_watchpoint): New
9230 functions.
9231 (rsp_bp_type_to_target_hw_bp_type): New function.
9232 (mips_stopped_data_address): New function.
9233 (the_low_target): Add watchpoint support functions.
9234
92352013-07-27 Yao Qi <yao@codesourcery.com>
9236
9237 * i386-low.c: Include break-common.h.
9238 (enum target_hw_bp_type): Remove.
9239
92402013-07-24 Luis Machado <lgustavo@codesourcery.com>
9241
9242 * Makefile.in (SFILES): /common/target-common.c.
9243 (OBS): Add target-common.o.
9244 (server_h): Add $(srcdir)/../common/target-common.h.
9245 (target-common.o): New target.
9246 * server.c (queue_stop_reply_callback): Free
9247 status string after use.
9248 * target.c (target_waitstatus_to_string): Remove.
9249 * target.h: Include target-common.h.
9250 (resume_kind): Likewise.
9251 (target_waitkind): Likewise.
9252 (target_waitstatus): Likewise.
9253 (TARGET_WNOHANG): Likewise.
9254
92552013-07-04 Yao Qi <yao@codesourcery.com>
9256
9257 * Makefile.in (host_alias): Use @host_noncanonical@.
9258 (target_alias): Use @target_noncanonical@.
9259 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9260 ACX_NONCANONICAL_HOST.
9261 * configure: Regenerated.
9262
9263 Revert:
9264 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9265
9266 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9267 * configure: Rebuild.
9268 * Makefile.in (version_host, version_target): Get from configure.
9269 (version.c): Use $(version_host) and $(version_target).
9270
92712013-07-03 Pedro Alves <palves@redhat.com>
9272
9273 * Makefile.in (config.status): Depend on development.sh.
9274 * acinclude.m4: Include libmcheck.m4.
9275 * configure: Regenerate.
9276
92772013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9278
9279 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9280 attribute inside the parentheses.
9281 (winapi_DebugSetProcessKillOnExit): Ditto.
9282 (winapi_DebugBreakProcess): Ditto.
9283 (winapi_GenerateConsoleCtrlEvent): Ditto.
9284
92852013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9286
9287 * notif.h (notif_event): Add a dummy member to avoid compiler
9288 errors.
9289
92902013-07-01 Pedro Alves <palves@redhat.com>
9291
9292 * hostio.c (HOSTIO_PATH_MAX): Define.
9293 (require_filename, handle_open, handle_unlink, handle_readlink):
9294 Use it.
9295
92962013-07-01 Pedro Alves <palves@redhat.com>
9297
9298 * server.h: Include "pathmax.h".
9299 * linux-low.c: Don't include sys/param.h.
9300 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9301 MAXPATHLEN.
9302 * win32-low.c: Don't include sys/param.h.
9303 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9304
93052013-07-01 Pedro Alves <palves@redhat.com>
9306
9307 * event-loop.c: Don't check HAVE_UNISTD_H before including
9308 <unistd.h>.
9309 * gdbreplay.c: Likewise.
9310 * remote-utils.c: Likewise.
9311 * server.c: Likewise.
9312 * configure.ac: Don't check for unistd.h.
9313 * configure: Regenerate.
9314
93152013-06-28 Tom Tromey <tromey@redhat.com>
9316
9317 * Makefile.in (version.c): Use version.in, not
9318 common/version.in.
9319
93202013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9321
9322 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9323 * configure: Rebuild.
9324 * Makefile.in (version_host, version_target): Get from configure.
9325 (version.c): Use $(version_host) and $(version_target).
9326
93272013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9328
9329 Fix trace-status to output user name without trailing colon.
9330 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9331
93322013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9333
9334 Fix trace-status to output proper start-time and stop-time.
9335 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9336 output start time and stop time in hex as gdb expects.
9337
93382013-06-26 Pedro Alves <pedro@codesourcery.com>
9339
9340 * tracepoint.c (build_traceframe_info_xml): Output trace state
9341 variables present in the trace buffer.
9342
93432013-06-24 Tom Tromey <tromey@redhat.com>
9344
9345 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9346 create-version.sh.
9347 (version.o): Remove.
9348 * gdbreplay.c: Include version.h.
9349 (version, host_name): Don't declare.
9350 * server.h: Include version.h.
9351 (version, host_name): Don't declare.
9352
93532013-06-12 Pedro Alves <palves@redhat.com>
9354
9355 * linux-x86-low.c (linux_is_elf64): Delete global.
9356 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9357 with local linux_pid_exe_is_elf_64_file use.
9358
93592013-06-11 Pedro Alves <palves@redhat.com>
9360
9361 * linux-low.c (regset_disabled, disable_regset): New functions.
9362 (regsets_fetch_inferior_registers)
9363 (regsets_store_inferior_registers): Use them.
9364 (initialize_regsets_info); Don't allocate the disabled_regsets
9365 array here.
9366 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9367 comment.
9368
93692013-06-11 Pedro Alves <palves@redhat.com>
9370
9371 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9372 xmalloc.
9373
93742013-06-11 Pedro Alves <palves@redhat.com>
9375
9376 * linux-x86-low.c (initialize_low_arch): Call
9377 init_registers_x32_avx_linux.
9378
93792013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9380
9381 Fix compatibility with Android Bionic.
9382 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9383 it is not empty.
9384
93852013-06-07 Pedro Alves <palves@redhat.com>
9386
9387 PR server/14823
9388 * Makefile.in (OBS): Add tdesc.o.
9389 (IPA_OBJS): Add tdesc-ipa.o.
9390 (tdesc-ipa.o): New rule.
9391 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9392 interface.
9393 * linux-low.c (new_inferior): Delete.
9394 (disabled_regsets, num_regsets): Delete.
9395 (linux_add_process): Adjust to set the new per-process
9396 new_inferior flag.
9397 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9398 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9399 was a stop. When calling arch_setup, switch the current inferior
9400 to the thread that got an event.
9401 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9402 (regsets_fetch_inferior_registers)
9403 (regsets_store_inferior_registers): New regsets_info parameter.
9404 Adjust to use it.
9405 (linux_register_in_regsets): New regs_info parameter. Adjust to
9406 use it.
9407 (register_addr, fetch_register, store_register): New usrregs_info
9408 parameter. Adjust to use it.
9409 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9410 parameter regs_info. Adjust to use it.
9411 (linux_fetch_registers): Get the current inferior's regs_info, and
9412 adjust to use it.
9413 (linux_store_registers): Ditto.
9414 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9415 (initialize_low): Don't initialize the target_regsets here. Call
9416 initialize_low_arch.
9417 * linux-low.h (target_regsets): Delete declaration.
9418 (struct regsets_info): New.
9419 (struct usrregs_info): New.
9420 (struct regs_info): New.
9421 (struct process_info_private) <new_inferior>: New field.
9422 (struct linux_target_ops): Delete the num_regs, regmap, and
9423 regset_bitmap fields. New field regs_info.
9424 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9425 * i387-fp.c (num_xmm_registers): Delete.
9426 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9427 calls to new interface.
9428 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9429 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9430 Infer the number of xmm registers from the regcache's target
9431 description.
9432 * i387-fp.h (num_xmm_registers): Delete.
9433 * inferiors.c (add_thread): Don't install the thread's regcache
9434 here.
9435 * proc-service.c (gregset_info): Fetch the current inferior's
9436 regs_info. Adjust to use it.
9437 * regcache.c: Include tdesc.h.
9438 (register_bytes, reg_defs, num_registers)
9439 (gdbserver_expedite_regs): Delete.
9440 (get_thread_regcache): If the thread doesn't have a regcache yet,
9441 create one, instead of aborting gdbserver.
9442 (regcache_invalidate_one): Rename to ...
9443 (regcache_invalidate_thread): ... this.
9444 (regcache_invalidate_one): New.
9445 (regcache_invalidate): Only invalidate registers of the current
9446 process.
9447 (init_register_cache): Add target_desc parameter, and use it.
9448 (new_register_cache): Ditto. Assert the target description has a
9449 non zero registers_size.
9450 (regcache_cpy): Add assertions. Adjust.
9451 (realloc_register_cache, set_register_cache): Delete.
9452 (registers_to_string, registers_from_string): Adjust.
9453 (find_register_by_name, find_regno, find_register_by_number)
9454 (register_cache_size): Add target_desc parameter, and use it.
9455 (free_register_cache_thread, free_register_cache_thread_one)
9456 (regcache_release, register_cache_size): New.
9457 (register_size): Add target_desc parameter, and use it.
9458 (register_data, supply_register, supply_register_zeroed)
9459 (supply_regblock, supply_register_by_name, collect_register)
9460 (collect_register_as_string, collect_register_by_name): Adjust.
9461 * regcache.h (struct target_desc): Forward declare.
9462 (struct regcache) <tdesc>: New field.
9463 (init_register_cache, new_register_cache): Add target_desc
9464 parameter.
9465 (regcache_invalidate_thread): Declare.
9466 (regcache_invalidate_one): Delete declaration.
9467 (regcache_release): Declare.
9468 (find_register_by_number, register_cache_size, register_size)
9469 (find_regno): Add target_desc parameter.
9470 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9471 declarations.
9472 * remote-utils.c: Include tdesc.h.
9473 (outreg, prepare_resume_reply): Adjust.
9474 * server.c: Include tdesc.h.
9475 (gdbserver_xmltarget): Delete declaration.
9476 (get_features_xml, process_serial_event): Adjust.
9477 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9478 declare.
9479 (struct process_info) <tdesc>: New field.
9480 (ipa_tdesc): Declare.
9481 * tdesc.c: New file.
9482 * tdesc.h: New file.
9483 * tracepoint.c: Include tdesc.h.
9484 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9485 (get_context_regcache): Adjust to pass ipa_tdesc down.
9486 (do_action_at_tracepoint): Adjust to get the register cache size
9487 from the context regcache's description.
9488 (traceframe_walk_blocks): Adjust to get the register cache size
9489 from the current trace frame's description.
9490 (traceframe_get_pc): Adjust to get current trace frame's
9491 description and pass it down.
9492 (gdb_collect): Adjust to get the register cache size from the
9493 IPA's description.
9494 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9495 (gdbserver_xmltarget): Delete.
9496 (initialize_low_tracepoint): Set the ipa's target description.
9497 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9498 (initialize_low_tracepoint): Set the ipa's target description.
9499 * linux-x86-low.c: Include tdesc.h.
9500 [__x86_64__] (is_64bit_tdesc): New.
9501 (ps_get_thread_area, x86_get_thread_area): Use it.
9502 (i386_cannot_store_register): Rename to ...
9503 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9504 (i386_cannot_fetch_register): Rename to ...
9505 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9506 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9507 to new interface.
9508 (target_regsets): Rename to ...
9509 (x86_regsets): ... this.
9510 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9511 interface.
9512 (x86_siginfo_fixup): Use is_64bit_tdesc.
9513 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9514 (tdesc_x32_avx_linux, tdesc_x32_linux)
9515 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9516 Declare.
9517 (x86_linux_update_xmltarget): Delete.
9518 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9519 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9520 (AMD64_LINUX_USER64_CS): New.
9521 (x86_linux_read_description): New, based on
9522 x86_linux_update_xmltarget.
9523 (same_process_callback): New.
9524 (x86_arch_setup_process_callback): New.
9525 (x86_linux_update_xmltarget): New.
9526 (x86_regsets_info): New.
9527 (amd64_linux_regs_info): New.
9528 (i386_linux_usrregs_info): New.
9529 (i386_linux_regs_info): New.
9530 (x86_linux_regs_info): New.
9531 (x86_arch_setup): Reimplement.
9532 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9533 (x86_emit_ops): Ditto.
9534 (the_low_target): Adjust. Install x86_linux_regs_info,
9535 x86_cannot_fetch_register, and x86_cannot_store_register.
9536 (initialize_low_arch): New.
9537 * linux-ia64-low.c (tdesc_ia64): Declare.
9538 (ia64_fetch_register): Adjust.
9539 (ia64_usrregs_info, regs_info): New globals.
9540 (ia64_regs_info): New function.
9541 (the_low_target): Adjust.
9542 (initialize_low_arch): New function.
9543 * linux-sparc-low.c (tdesc_sparc64): Declare.
9544 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9545 Adjust.
9546 (sparc_arch_setup): New function.
9547 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9548 (the_low_target): Adjust.
9549 (initialize_low_arch): New function.
9550 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9551 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9552 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9553 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9554 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9555 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9556 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9557 (tdesc_powerpc_isa205_vsx64l): Declare.
9558 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9559 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9560 (ppc_set_pc, ppc_get_hwcap): Adjust.
9561 (ppc_usrregs_info): Forward declare.
9562 (!__powerpc64__) ppc_regmap_adjusted: New global.
9563 (ppc_arch_setup): Adjust to the current process'es target
9564 description.
9565 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9566 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9567 (ppc_store_evrregset): Adjust.
9568 (target_regsets): Rename to ...
9569 (ppc_regsets): ... this, and make static.
9570 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9571 (ppc_regs_info): New function.
9572 (the_low_target): Adjust.
9573 (initialize_low_arch): New function.
9574 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9575 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9576 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9577 (tdesc_s390x_linux64v2): Declare.
9578 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9579 (s390_fill_gregset, s390_store_last_break): Adjust.
9580 (target_regsets): Rename to ...
9581 (s390_regsets): ... this, and make static.
9582 (s390_get_pc, s390_set_pc): Adjust.
9583 (s390_get_hwcap): New target_desc parameter, and use it.
9584 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9585 (s390_arch_setup): Adjust to set the current process'es target
9586 description. Don't adjust the regmap.
9587 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9588 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9589 (regs_info_3264): New globals.
9590 (s390_regs_info): New function.
9591 (the_low_target): Adjust.
9592 (initialize_low_arch): New function.
9593 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9594 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9595 [__mips64] (init_registers_mips_linux)
9596 (init_registers_mips_dsp_linux): Delete defines.
9597 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9598 (have_dsp): New global.
9599 (mips_read_description): New, based on mips_arch_setup.
9600 (mips_arch_setup): Reimplement.
9601 (get_usrregs_info): New function.
9602 (mips_cannot_fetch_register, mips_cannot_store_register)
9603 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9604 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9605 (target_regsets): Rename to ...
9606 (mips_regsets): ... this, and make static.
9607 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9608 (dsp_regs_info, regs_info): New globals.
9609 (mips_regs_info): New function.
9610 (the_low_target): Adjust.
9611 (initialize_low_arch): New function.
9612 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9613 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9614 Declare.
9615 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9616 (arm_read_description): New, with bits factored from
9617 arm_arch_setup.
9618 (arm_arch_setup): Reimplement.
9619 (target_regsets): Rename to ...
9620 (arm_regsets): ... this, and make static.
9621 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9622 (arm_regs_info): New function.
9623 (the_low_target): Adjust.
9624 (initialize_low_arch): New function.
9625 * linux-m68k-low.c (tdesc_m68k): Declare.
9626 (target_regsets): Rename to ...
9627 (m68k_regsets): ... this, and make static.
9628 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9629 (m68k_regs_info): New function.
9630 (m68k_arch_setup): New function.
9631 (the_low_target): Adjust.
9632 (initialize_low_arch): New function.
9633 * linux-sh-low.c (tdesc_sharch): Declare.
9634 (target_regsets): Rename to ...
9635 (sh_regsets): ... this, and make static.
9636 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9637 (sh_regs_info, sh_arch_setup): New functions.
9638 (the_low_target): Adjust.
9639 (initialize_low_arch): New function.
9640 * linux-bfin-low.c (tdesc_bfin): Declare.
9641 (bfin_arch_setup): New function.
9642 (bfin_usrregs_info, regs_info): New globals.
9643 (bfin_regs_info): New function.
9644 (the_low_target): Adjust.
9645 (initialize_low_arch): New function.
9646 * linux-cris-low.c (tdesc_cris): Declare.
9647 (cris_arch_setup): New function.
9648 (cris_usrregs_info, regs_info): New globals.
9649 (cris_regs_info): New function.
9650 (the_low_target): Adjust.
9651 (initialize_low_arch): New function.
9652 * linux-cris-low.c (tdesc_crisv32): Declare.
9653 (cris_arch_setup): New function.
9654 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9655 (cris_regs_info): New function.
9656 (the_low_target): Adjust.
9657 (initialize_low_arch): New function.
9658 * linux-m32r-low.c (tdesc_m32r): Declare.
9659 (m32r_arch_setup): New function.
9660 (m32r_usrregs_info, regs_info): New globals.
9661 (m32r_regs_info): Adjust.
9662 (initialize_low_arch): New function.
9663 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9664 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9665 (tic6x_usrregs_info): Forward declare.
9666 (tic6x_read_description): New function, based on ...
9667 (tic6x_arch_setup): ... this. Reimplement.
9668 (target_regsets): Rename to ...
9669 (tic6x_regsets): ... this, and make static.
9670 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9671 (tic6x_regs_info): New function.
9672 (the_low_target): Adjust.
9673 (initialize_low_arch): New function.
9674 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9675 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9676 (target_regsets): Rename to ...
9677 (xtensa_regsets): ... this, and make static.
9678 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9679 globals.
9680 (xtensa_arch_setup, xtensa_regs_info): New functions.
9681 (the_low_target): Adjust.
9682 (initialize_low_arch): New function.
9683 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9684 (nios2_arch_setup): Set the current process'es tdesc.
9685 (target_regsets): Rename to ...
9686 (nios2_regsets): ... this.
9687 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9688 (nios2_regs_info): New function.
9689 (the_low_target): Adjust.
9690 (initialize_low_arch): New function.
9691 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9692 (aarch64_arch_setup): Set the current process'es tdesc.
9693 (target_regsets): Rename to ...
9694 (aarch64_regsets): ... this.
9695 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9696 (aarch64_regs_info): New function.
9697 (the_low_target): Adjust.
9698 (initialize_low_arch): New function.
9699 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9700 globals.
9701 (target_regsets): Rename to ...
9702 (tile_regsets): ... this.
9703 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9704 (tile_regs_info): New function.
9705 (tile_arch_setup): Set the current process'es tdesc.
9706 (the_low_target): Adjust.
9707 (initialize_low_arch): New function.
9708 * spu-low.c (tdesc_spu): Declare.
9709 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9710 * win32-arm-low.c (tdesc_arm): Declare.
9711 (arm_arch_setup): New function.
9712 (the_low_target): Install arm_arch_setup instead of
9713 init_registers_arm.
9714 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9715 (init_windows_x86): Rename to ...
9716 (i386_arch_setup): ... this. Set `win32_tdesc'.
9717 (the_low_target): Adjust.
9718 * win32-low.c (win32_tdesc): New global.
9719 (child_add_thread): Don't create the thread cache here.
9720 (do_initial_child_stuff): Set the new process'es tdesc.
9721 * win32-low.h (struct target_desc): Forward declare.
9722 (win32_tdesc): Declare.
9723 * lynx-i386-low.c (tdesc_i386): Declare global.
9724 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9725 * lynx-low.c (lynx_tdesc): New global.
9726 (lynx_add_process): Set the new process'es tdesc.
9727 * lynx-low.h (struct target_desc): Forward declare.
9728 (lynx_tdesc): Declare global.
9729 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9730 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9731 * nto-low.c (nto_tdesc): New global.
9732 (do_attach): Set the new process'es tdesc.
9733 * nto-low.h (struct target_desc): Forward declare.
9734 (nto_tdesc): Declare.
9735 * nto-x86-low.c (tdesc_i386): Declare.
9736 (nto_x86_arch_setup): Set `nto_tdesc'.
9737
97382013-06-04 Gary Benson <gbenson@redhat.com>
9739
9740 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9741 to qSupported response when appropriate.
9742 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9743 with nonzero-length annex.
9744 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9745 arguments supplied in annex.
9746
97472013-05-31 Doug Evans <dje@google.com>
9748
9749 PR server/15594
9750 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9751 64 bits in 64-cross-32 environment.
9752
97532013-05-28 Pedro Alves <palves@redhat.com>
9754
9755 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9756 (aarch64-without-fpu.c): Delete rule.
9757 * configure.srv (aarch64*-*-linux*): Remove references to
9758 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9759 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9760 declaration.
9761
97622013-05-24 Pedro Alves <palves@redhat.com>
9763
9764 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9765 instead of strchr/decode_address. Error if the range isn't split
9766 with a ','. Don't assume there's be a ':' in the action.
9767
97682013-05-23 Yao Qi <yao@codesourcery.com>
9769 Pedro Alves <palves@redhat.com>
9770
9771 * linux-low.c (lwp_in_step_range): New function.
9772 (linux_wait_1): If the thread was range stepping and stopped
9773 outside the stepping range, report the stop to GDB. Otherwise,
9774 continue stepping. Add range stepping debug output.
9775 (linux_set_resume_request): Copy the step range from the resume
9776 request to the lwp.
9777 (linux_supports_range_stepping): New.
9778 (linux_target_ops) <supports_range_stepping>: Set to
9779 linux_supports_range_stepping.
9780 * linux-low.h (struct linux_target_ops)
9781 <supports_range_stepping>: New field.
9782 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9783 * linux-x86-low.c (x86_supports_range_stepping): New.
9784 (the_low_target) <supports_range_stepping>: Set to
9785 x86_supports_range_stepping.
9786 * server.c (handle_v_cont): Handle 'r' action.
9787 (handle_v_requests): Append ";r" if the target supports range
9788 stepping.
9789 * target.h (struct thread_resume) <step_range_start,
9790 step_range_end>: New fields.
9791 (struct target_ops) <supports_range_stepping>:
9792 New field.
9793 (target_supports_range_stepping): New macro.
9794
97952013-05-17 Joel Brobecker <brobecker@adacore.com>
9796
9797 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9798 confusion in comment.
9799
98002013-05-17 Joel Brobecker <brobecker@adacore.com>
9801
9802 * lynx-low.c (struct process_info_private): New type.
9803 (lynx_add_process): New function.
9804 (lynx_create_inferior, lynx_attach): Replace calls to
9805 add_process by calls to lynx_add_process.
9806 (lynx_resume): If PTID is null, then try using
9807 current_process()->private->last_wait_event_ptid.
9808 Add comments.
9809 (lynx_clear_inferiors): Delete. The contents of that function
9810 has been inlined in lynx_mourn;
9811 (lynx_wait_1): Save the ptid in the process's private data.
9812 (lynx_mourn): Free the process' private data. Replace call
9813 to lynx_clear_inferiors by call to clear_inferiors.
9814
98152013-05-17 Yao Qi <yao@codesourcery.com>
9816
9817 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9818 the right place.
9819
98202013-05-16 Luis Machado <lgustavo@codesourcery.com>
9821
9822 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9823 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9824 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9825 PT_TEXT_END_ADDR guards. Update comments.
9826 (linux_target_op) <read_offsets>: Conditionally define to
9827 linux_read_offsets if the target is UCLIBC and if it defines
9828 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9829
98302013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9831 Andrew Jenner <andrew@codesourcery.com>
9832
9833 * Makefile.in (SFILES): Add linux-nios2-low.c.
9834 (clean): Add action to delete nios2-linux.c.
9835 (nios2-linux.c): New rule.
9836 * configure.srv: Add nios2*-*-linux*.
9837 * linux-nios2-low.c: New.
9838
98392013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9840
9841 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9842
98432013-04-25 Hui Zhu <hui@codesourcery.com>
9844
9845 PR gdb/15186
9846 * ax.c (ax_printf): Add fflush.
9847
98482013-04-22 Tom Tromey <tromey@redhat.com>
9849
9850 * Makefile.in (SFILES): Add filestuff.c.
9851 (OBS): Add filestuff.o.
9852 (filestuff.o): New target.
9853 * config.in, configure: Rebuild.
9854 * configure.ac: Check for fdwalk, pipe2.
9855
98562013-04-17 Pedro Alves <palves@redhat.com>
9857
9858 * configure.ac (USE_THREAD_DB): Delete variable.
9859 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9860 Don't AC_SUBST USE_THREAD_DB.
9861 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9862 * config.in, configure: Regenerate.
9863
98642013-04-16 Pedro Alves <palves@redhat.com>
9865
9866 * linux-low.h (struct lwp_info) <thread_known>: Move under
9867 the USE_THREAD_DB #ifdef.
9868
98692013-04-16 Pedro Alves <palves@redhat.com>
9870
9871 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9872 (linux-low.o): Delete rule.
9873 * linux-low.h: Always include "gdb_thread_db.h" instead of
9874 conditionally including thread_db.h.
9875 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9876 HAVE_THREAD_DB_H.
9877
98782013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9879
9880 * Makefile.in (install-only): Fix make install regression.
9881
98822013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9883
9884 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9885 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9886 installation.
9887 * gdbserver.1: Remove.
9888
98892013-03-22 Pedro Alves <palves@redhat.com>
9890
9891 * linux-low.c (handle_extended_wait): Don't call
9892 linux_enable_event_reporting.
9893
98942013-03-15 Tony Theodore <tonyt@logyst.com>
9895
9896 PR build/9098:
9897 * Makefile.in (SHELL): Use @SHELL@.
9898
98992013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9900
9901 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9902 compiler warning.
9903
99042013-03-13 Joel Brobecker <brobecker@adacore.com>
9905
9906 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9907 Remove extraneous NULL element.
9908
99092013-03-13 Yao Qi <yao@codesourcery.com>
9910
9911 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9912 'V' block in trace frame.
9913
99142013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9915
9916 * target.h (struct target_ops): Add btrace ops.
9917 (target_supports_btrace): New macro.
9918 (target_enable_btrace): New macro.
9919 (target_disable_btrace): New macro.
9920 (target_read_btrace): New macro.
9921 * gdbthread.h (struct thread_info): Add btrace field.
9922 * server.c: Include btrace-common.h.
9923 (handle_btrace_general_set): New function.
9924 (handle_btrace_enable): New function.
9925 (handle_btrace_disable): New function.
9926 (handle_general_set): Call handle_btrace_general_set.
9927 (handle_qxfer_btrace): New function.
9928 (struct qxfer qxfer_packets[]): Add btrace entry.
9929 * inferiors.c (remove_thread): Disable btrace.
9930 * linux-low: Include linux-btrace.h.
9931 (linux_low_enable_btrace): New function.
9932 (linux_low_read_btrace): New function.
9933 (linux_target_ops): Add btrace ops.
9934 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9935 Add srv_linux_btrace=yes.
9936 (x86_64-*-linux*): Add linux-btrace.o.
9937 Add srv_linux_btrace=yes.
9938 * configure.ac: Define HAVE_LINUX_BTRACE.
9939 * config.in: Regenerated.
9940 * configure: Regenerated.
9941
99422013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9943
9944 * server.c (handle_qxfer): Preserve error message if -3 is
9945 returned.
9946 (qxfer): Document the -3 return value.
9947
99482013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9949
9950 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9951 (linux_btrace_h): New variable.
9952 (linux-btrace.o): New rule.
9953
99542013-03-08 Stan Shebs <stan@codesourcery.com>
9955 Hafiz Abid Qadeer <abidh@codesourcery.com>
9956
9957 * tracepoint.c (trace_buffer_size): New global.
9958 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9959 (init_trace_buffer): Change to one-argument function. Allocate
9960 trace buffer memory.
9961 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9962 handle QTBuffer:size packet.
9963 (cmd_bigqtbuffer_size): New function.
9964 (initialize_tracepoint): Call init_trace_buffer with
9965 DEFAULT_TRACE_BUFFER_SIZE.
9966 * server.c (handle_query): Add QTBuffer:size in the
9967 supported packets.
9968
99692013-03-07 Yao Qi <yao@codesourcery.com>
9970
9971 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9972 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9973 of -1.
9974 (cmd_qtsp): Adjust condition. Do post increment.
9975 Set cur_action and cur_step_action back to 0.
9976
99772013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9978
9979 PR server/15236
9980 * linux-low.c (linux_write_memory): Return early success if LEN is
9981 zero.
9982
99832013-03-05 Corinna Vinschen <vinschen@redhat.de>
9984
9985 * configure.srv: Add x86_64-*-cygwin* as target.
9986
99872013-02-28 Tom Tromey <tromey@redhat.com>
9988
9989 * configure.ac: Invoke AC_SYS_LARGEFILE.
9990 * configure, config.in: Rebuild.
9991
99922013-02-28 Corinna Vinschen <vinschen@redhat.com>
9993
9994 * win32-low.c: Throughout, fix format strings and casts of
9995 printf-like functions to avoid type related warnings on all
9996 platforms.
9997 (get_child_debug_event): Print dwDebugEventCode as hex since
9998 that's how it's usually documented.
9999
100002013-02-28 Yao Qi <yao@codesourcery.com>
10001
10002 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10003 pulongest.
10004
100052013-02-27 Jiong Wang <jiwang@tilera.com>
10006
10007 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10008 (reg-tilegx32.c): New rule.
10009 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10010 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10011 different register info initializer according to elf class.
10012 (init_registers_tilgx32): New function. The tilegx32 register info
10013 initializer.
10014 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10015 (tile_store_gregset): Likewise.
10016
100172013-02-27 Yao Qi <yao@codesourcery.com>
10018
10019 * server.c (process_point_options): Print debug message when
10020 debug_threads is true.
10021
100222013-02-26 Yao Qi <yao@codesourcery.com>
10023
10024 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10025
100262013-02-19 Pedro Alves <palves@redhat.com>
10027 Kai Tietz <ktietz@redhat.com>
10028
10029 PR gdb/15161
10030
10031 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10032 instead of strtoul to extract address from packet.
10033 (process_serial_event) <'z'>: Likewise.
10034
100352013-02-18 Yao Qi <yao@codesourcery.com>
10036
10037 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10038
100392013-02-14 Pedro Alves <palves@redhat.com>
10040
10041 Plug memory leak.
10042
10043 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10044 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10045
100462013-02-14 Pedro Alves <palves@redhat.com>
10047
10048 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10049
100502013-02-14 Pedro Alves <palves@redhat.com>
10051
10052 * tracepoint.c (save_string): Delete.
10053 (add_tracepoint_action): Use savestring instead of save_string.
10054
100552013-02-12 Pedro Alves <palves@redhat.com>
10056
10057 * linux-xtensa-low.c: Ditto.
10058 * xtensa-xtregs.c: Ditto.
10059
100602013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10061
10062 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10063 thread_db.
10064
100652013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10066
10067 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10068 aarch64_num_wp_regs and aarch64_num_bp_regs to
10069 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10070
100712013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10072
10073 * linux-aarch64-low.c (ps_get_thread_area): Replace
10074 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10075
100762013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10077 Marcus Shawcroft <marcus.shawcroft@arm.com>
10078 Nigel Stephens <nigel.stephens@arm.com>
10079 Yufeng Zhang <yufeng.zhang@arm.com>
10080
10081 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10082 (aarch64.c, aarch64-without-fpu.c): New targets.
10083 * configure.srv (aarch64*-*-linux*): New.
10084 * linux-aarch64-low.c: New file.
10085
100862013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10087
10088 * linux-low.c (handle_extended_wait, linux_create_inferior)
10089 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10090 (dequeue_one_deferred_signal, linux_resume_one_thread)
10091 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10092 (linux_tracefork_grandchild, linux_test_for_tracefork)
10093 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10094 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10095 where the argument is 0.
10096
100972013-01-25 Yao Qi <yao@codesourcery.com>
10098
10099 * event-loop.c: Include "queue.h".
10100 (gdb_event_p): New typedef.
10101 (struct gdb_event) <next_event>: Remove.
10102 (event_queue): Change to QUEUE(gdb_event_p).
10103 (async_queue_event): Remove.
10104 (gdb_event_xfree): New.
10105 (initialize_event_loop): New.
10106 (process_event): Use API from QUEUE.
10107 (wait_for_event): Likewise.
10108 * server.c (main): Call initialize_event_loop.
10109 * server.h (initialize_event_loop): Declare.
10110
101112013-01-18 Yao Qi <yao@codesourcery.com>
10112
10113 * ax.h (struct eval_agent_expr_context): New.
10114 (gdb_eval_agent_expr): Update declaration.
10115 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10116 TFRAME. Add new argument CTX.
10117 * server.h (struct eval_agent_expr_context): Declare.
10118 (agent_mem_read, agent_tsv_read): Update declaration.
10119 (agent_mem_read_string): Likewise.
10120 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10121 (add_traceframe_block): Add new argument TPOINT.
10122 Increase TPOINT->traceframe_usage.
10123 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10124 eval_tracepoint_agent_expr.
10125 (condition_true_at_tracepoint): Likewise.
10126 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10127 (agent_mem_read_string, agent_tsv_read): Likewise.
10128
101292013-01-16 Yao Qi <yao@codesourcery.com>
10130
10131 * linux-low.c (linux_resume_one_lwp): Don't check
10132 'lwp->bp_reinsert != 0'.
10133
101342013-01-07 Joel Brobecker <brobecker@adacore.com>
10135 Pedro Alves <palves@redhat.com>
10136
10137 * lynx-low.c (ptrace_request_to_str): Define a temporary
10138 macro and use it to simplify this function's implementation.
10139
101402013-01-07 Joel Brobecker <brobecker@adacore.com>
10141
10142 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10143 sets errno.
10144
101452013-01-07 Joel Brobecker <brobecker@adacore.com>
10146
10147 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10148
101492013-01-07 Joel Brobecker <brobecker@adacore.com>
10150
10151 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10152
101532013-01-07 Joel Brobecker <brobecker@adacore.com>
10154
10155 * lynx-low.c (lynx_resume): Use the resume_info parameter
10156 to determine the ptid for the lynx_ptrace call, unless
10157 it is equal to minus_one_ptid, in which case we use the
10158 ptid of the current_inferior.
10159 (lynx_wait_1): After having received a thread create/exit
10160 event, resume the inferior's execution using the signaling
10161 thread's ptid, rather than the old ptid.
10162
101632013-01-07 Joel Brobecker <brobecker@adacore.com>
10164
10165 * lynx-low.c (lynx_resume): Delete variable ret.
10166
101672013-01-01 Joel Brobecker <brobecker@adacore.com>
10168
10169 * gdbreplay.c (gdbreplay_version): Update copyright year.
10170 * server.c (gdbserver_version): Likewise.
10171
101722012-12-17 Joel Brobecker <brobecker@adacore.com>
10173
10174 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10175 new thread.
10176
101772012-12-17 Joel Brobecker <brobecker@adacore.com>
10178
10179 * lynx-low.c (ptrace_request_to_str): Add handling for
10180 PTRACE_GETTRACESIG.
10181
101822012-12-17 Joel Brobecker <brobecker@adacore.com>
10183
10184 * lynx-low.c (lynx_attach): Delete variable new_process.
10185
101862012-12-17 Joel Brobecker <brobecker@adacore.com>
10187
10188 * lynx-low.c (lynx_create_inferior): Delete variable
10189 new_process.
10190
101912012-12-17 Joel Brobecker <brobecker@adacore.com>
10192
10193 * lynx-low.c (ptrace_request_to_str): Do not handle
10194 PTRACE_GETTHREADLIST if this macro does not exist.
10195
101962012-12-15 Yao Qi <yao@codesourcery.com>
10197
10198 * Makefile.in (OBS): Add notif.o.
10199 * notif.c, notif.h: New.
10200 * server.c: Include "notif.h".
10201 (struct vstop_notif) <next>: Remove.
10202 <base>: New field.
10203 (queue_stop_reply): Update.
10204 (push_event, send_next_stop_reply): Remove.
10205 (discard_queued_stop_replies): Update.
10206 (notif_stop): New variable.
10207 (handle_v_stopped): Remove.
10208 (handle_v_requests): Don't call handle_v_stopped. Call
10209 handle_ack_notif instead.
10210 (queue_stop_reply_callback): Call notif_event_enque instead
10211 of queue_stop_reply.
10212 (handle_status): Don't call send_next_stop_reply, call
10213 notif_write_event instead.
10214 (kill_inferior_callback): Likewise.
10215 (detach_or_kill_inferior_callback): Likewise.
10216 (main): Call initialize_notif.
10217 (process_serial_event): Call QUEUE_is_empty.
10218 (handle_target_event): Call notif_push instead of push event.
10219 * server.h (push_event): Remove declaration.
10220
102212012-12-10 Tom Tromey <tromey@redhat.com>
10222
10223 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10224 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10225 macros.
10226 (.c.o): Rewrite.
10227 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10228 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10229 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10230 (amd64-linux-ipa.o, ax.o): Rewrite.
10231 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10232 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10233 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10234 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10235 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10236 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10237 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10238 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10239 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10240 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10241 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10242 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10243 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10244 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10245 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10246 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10247 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10248 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10249 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10250 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10251 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10252 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10253 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10254 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10255 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10256 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10257 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10258 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10259 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10260 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10261 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10262 (reg-tilegx.o): Remove.
10263 (all_object_files): New macro.
10264 Include .deps files.
10265 * aclocal.m4, configure: Rebuild.
10266 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10267 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10268 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10269
102702012-12-05 Tom Tromey <tromey@redhat.com>
10271
10272 PR gdb/14917:
10273 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10274
102752012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10276
10277 * configure.ac: Check for linux/perf_event.h.
10278 * config.in: Regenerated.
10279 * configure: Regenerated.
10280
102812012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10282
10283 * hostio.c (handle_readlink): Decrease buffer size
10284 parameter passed to readlink by one byte.
10285
102862012-11-26 Yao Qi <yao@codesourcery.com>
10287
10288 * configure.ac (build_warnings): Append '-Wempty-body'.
10289 * configure: Regenerated.
10290 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10291 body.
10292
102932012-11-15 Pierre Muller <muller@sourceware.org>
10294
10295 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10296 * config.in: Regenerate.
10297 * configure: Regenerate.
10298 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10299 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10300 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10301 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10302 header.
10303 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10304 instead of <sys/wait.h> header.
10305 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10306
103072012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10308
10309 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10310 (various make rules): Remove -DGDBSERVER
10311
103122012-11-09 Yao Qi <yao@codesourcery.com>
10313
10314 * spu-low.c (current_ptid): Move it to ..
10315 * gdbthread.h: ... here. New.
10316 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10317 * server.c (myresume, process_serial_event): Likewise.
10318 * thread-db.c (thread_db_find_new_threads): Likewise.
10319 * tracepoint.c (run_inferior_command): Likewise.
10320
103212012-10-01 Andrew Burgess <aburgess@broadcom.com>
10322
10323 * server.c (handle_search_memory_1): Include access length in
10324 warning message.
10325
103262012-09-05 Michael Brandt <michael.brandt@axis.com>
10327
10328 * linux-crisv32-low.c: Fix compile errors.
10329
103302012-09-04 Yao Qi <yao@codesourcery.com>
10331
10332 * tracepoint.c (cmd_qtsv): Adjust debug message.
10333 Don't check CUR_TPOINT.
10334
103352012-08-28 Yao Qi <yao@codesourcery.com>
10336
10337 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10338 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10339 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10340 Remove declarations of xmalloc, xreallloc, xstrdup and
10341 freeargv.
10342 * Makefile.in (libiberty_h): New.
10343 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10344 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10345
103462012-08-23 Yao Qi <yao@codesourcery.com>
10347
10348 * server.h: Remove declaration of 'xsnprintf'.
10349
103502012-08-22 Keith Seitz <keiths@redhat.com>
10351
10352 * server.h: Include build-gnulib-gbserver/config.h.
10353 * gdbreplay.c: Likewise.
10354
103552012-08-08 Doug Evans <dje@google.com>
10356
10357 * Makefile.in (SFILES): Add gdb_vecs.c.
10358 (OBS): Add gdb_vecs.o.
10359 (gdb_vecs_h, host_defs_h): New variables.
10360 (thread-db.o): Add $(gdb_vecs_h) dependency.
10361 (gdb_vecs.o): New rule.
10362 * thread-db.c: #include "gdb_vecs.h".
10363 (thread_db_load_search): Use a vector to iterate over path elements.
10364 Handle text appearing after "$pdir".
10365
10366 * configure.ac: Add check for strstr.
10367 * config.in: Regenerate.
10368 * configure: Regenerate.
10369
103702012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10371
10372 * hostio.c (handle_pread): If pread fails, fall back to attempting
10373 lseek/read.
10374 (handle_pwrite): Likewise for pwrite.
10375
103762012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10377
10378 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10379 between unsupported TYPE and unimplementable ADDR/LEN combination.
10380 (arm_insert_point): Act on new return value.
10381
103822012-07-31 Pedro Alves <palves@redhat.com>
10383
10384 * server.c (process_point_options): Only skip tokens if we find
10385 one that is unrecognized. Don't treat 'X' specially while
10386 skipping unrecognized tokens.
10387
103882012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10389
10390 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10391 to 4-byte-align HW breakpoint addresses for Thumb.
10392
103932012-07-27 Yao Qi <yao@codesourcery.com>
10394
10395 PR remote/14161.
10396
10397 * server.h: Declare gdb_agent_about_to_close.
10398 * target.c (kill_inferior): Include "agent.h".
10399 New. Send command 'kill'.
10400 * target.h (kill_inferior): Removed macro.
10401 * tracepoint.c (gdb_agent_about_to_close): New.
10402 (gdb_agent_helper_thread): Handle command 'close'.
10403 Wait endlessly until the inferior stops.
10404 Install gdb_agent_remove_socket to atexit hook.
10405 (agent_socket_name): New static variable.
10406 (gdb_agent_socket_init): Replace local variable 'name' with
10407 'agent_socket_name'.
10408 (gdb_agent_remove_socket): New.
10409
104102012-07-27 Yao Qi <yao@codesourcery.com>
10411
10412 * server.c (process_point_options): Stop at 'X' when parsing.
10413
104142012-07-19 Michael Eager <eager@eagercon.com>
10415
10416 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10417 to hw_execute.
10418 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10419 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10420 hardware breakpoint.
10421
104222012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10423
10424 * gdbserver/linux-low.c (initialize_low): Call
10425 linux_ptrace_init_warnings.
10426
104272012-07-02 Doug Evans <dje@google.com>
10428
10429 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10430 pointer to int.
10431
104322012-07-02 Stan Shebs <stan@codesourcery.com>
10433
10434 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10435 (ax.o): Add it to build rule.
10436 (ax-ipa.o): Ditto.
10437 (OBS): Add format.o.
10438 (IPA_OBS): Add format.o.
10439 * server.c (handle_query): Claim support for breakpoint commands.
10440 (process_point_options): Add command case.
10441 (process_serial_event): Leave running if there are printfs in
10442 effect.
10443 * mem-break.h (any_persistent_commands): Declare.
10444 (add_breakpoint_commands): Declare.
10445 (gdb_no_commands_at_breakpoint): Declare.
10446 (run_breakpoint_commands): Declare.
10447 * mem-break.c (struct point_command_list): New struct.
10448 (struct breakpoint): New field command_list.
10449 (any_persistent_commands): New function.
10450 (add_commands_to_breakpoint): New function.
10451 (add_breakpoint_commands): New function.
10452 (gdb_no_commands_at_breakpoint): New function.
10453 (run_breakpoint_commands): New function.
10454 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10455 locally.
10456 * ax.c: Include format.h.
10457 (ax_printf): New function.
10458 (gdb_eval_agent_expr): Add printf opcode.
10459
104602012-06-13 Yao Qi <yao@codesourcery.com>
10461
10462 * server.c (start_inferior): Remove duplicated writes to fields
10463 'last_resume_kind' and 'last_status' of 'current_inferior'.
10464
104652012-06-12 Yao Qi <yao@codesourcery.com>
10466 Pedro Alves <palves@redhat.com>
10467
10468 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10469 comment.
10470 * server.c (handle_v_cont): Extend comment.
10471
104722012-06-11 Yao Qi <yao@codesourcery.com>
10473
10474 * linux-low.c (linux_attach): Add 'static'.
10475
104762012-06-06 Yao Qi <yao@codesourcery.com>
10477
10478 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10479
104802012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10481
10482 Fix gcc -flto compilation warning.
10483 * server.c (main): Make variable multi_mode and attach volatile.
10484
104852012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10486
10487 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10488 if the platform doesn't know about it.
10489
104902012-05-30 Jeff Kenton <jkenton@tilera.com>
10491
10492 * Makefile.in (SFILES): Add linux-tile-low.c.
10493 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10494 * configure.srv: Handle tilegx-*-linux*.
10495 * linux-tile-low.c: New file.
10496
104972012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10498
10499 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10500
105012012-05-24 Pedro Alves <palves@redhat.com>
10502
10503 PR gdb/7205
10504
10505 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10506
105072012-05-24 Pedro Alves <palves@redhat.com>
10508
10509 PR gdb/7205
10510
10511 Replace target_signal with gdb_signal throughout.
10512
105132012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10514
10515 * linux-low.c (linux_store_registers): Avoid the copying sequence
10516 when no data has been retrieved by ptrace.
10517
105182012-05-22 Will Deacon <will.deacon@arm.com>
10519
10520 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10521 Include asm/ptrace.h.
10522 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10523 already defined.
10524
105252012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10526
10527 * linux-low.c (linux_store_registers): Don't re-retrieve data
10528 with ptrace that has already been obtained from /proc. Always
10529 copy any data retrieved with ptrace to the buffer supplied.
10530
105312012-05-11 Yao Qi <yao@codesourcery.com>
10532 Pedro Alves <palves@redhat.com>
10533
10534 * linux-low.c (enum stopping_threads_kind): New.
10535 (stopping_threads): Change type to `enum stopping_threads_kind'.
10536 (handle_extended_wait): If stopping and suspending threads, leave
10537 the new_lwp suspended too.
10538 (linux_wait_for_event): Adjust.
10539 (stop_all_lwps): Set `stopping_threads' to
10540 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10541 whether we're suspending threads or just stopping them. Assert no
10542 recursion happens.
10543
105442012-04-29 Yao Qi <yao@codesourcery.com>
10545
10546 * server.h: Move some code to ...
10547 * gdbthread.h: ... here. New.
10548 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10549 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10550 (nto-low.o, win32-low.o): Likewise.
10551 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10552 * regcache.c, remote-utils.c, server.c: Likewise.
10553 * target.c, tracepoint.c, win32-low.c: Likewise.
10554
105552012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10556
10557 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10558 (PTRACE_ARG4_TYPE): Likewise.
10559 (PTRACE_XFER_TYPE): Likewise.
10560 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10561 ptrace to PTRACE_ARG3_TYPE.
10562 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10563 (PTRACE_ARG4_TYPE): Likewise.
10564 (PTRACE_XFER_TYPE): Likewise.
10565 (linux_detach_one_lwp): Cast fourth argument of
10566 ptrace to long then PTRACE_ARG4_TYPE.
10567 (regsets_fetch_inferior_registers): Cast third argument of
10568 ptrace to long then PTRACE_ARG3_TYPE.
10569 (regsets_store_inferior_registers): Likewise.
10570
105712012-04-20 Pedro Alves <palves@redhat.com>
10572
10573 * configure: Regenerate.
10574
105752012-04-19 Pedro Alves <palves@redhat.com>
10576
10577 * Makefile.in (GNULIB_BUILDDIR): New.
10578 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10579 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10580 (all, install-only, uninstall, clean-info, all-lib, clean): No
10581 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10582 (maintainer-clean realclean distclean): Use subdir_do.
10583 (subdir_do): New.
10584 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10585 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10586 * acinclude.m4: Include acx_configure_dir.m4.
10587 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10588 calls. Call AC_PROG_RANLIB. Configure gnulib using
10589 ACX_CONFIGURE_DIR.
10590 (GNULIB): New.
10591 (GNULIB_STDINT_H): Adjust.
10592 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10593 * gdbreplay.c: Include build-gnulib/config.h.
10594 * server.h: Likewise.
10595 * aclocal.m4: Regenerate.
10596 * config.in: Regenerate.
10597 * configure: Regenerate.
10598
105992012-04-19 Pedro Alves <palves@redhat.com>
10600
10601 * Makefile.in (LIBGNU, INCGNU): Adjust.
10602 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10603 (all, install-only, uninstall, clean-info, all-lib, clean)
10604 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10605 * configure.ac: Adjust AC_OUTPUT output.
10606 * aclocal.m4: Regenerate.
10607 * configure: Regenerate.
10608
106092012-04-19 Pedro Alves <palves@redhat.com>
10610
10611 * Makefile.in (generated_files): New.
10612 (server_h): Remove the explicit dependency on config.h, and depend
10613 on $generated_files.
10614
106152012-04-19 Pedro Alves <palves@redhat.com>
10616
10617 * Makefile.in (INCGNU): Add -Ignulib.
10618
106192012-04-19 Pedro Alves <palves@redhat.com>
10620
10621 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10622 (INCGNU): ... this, and spell out -I here.
10623 (GNULIB_LIB): Rename to ...
10624 (LIBGNU): ... this.
10625 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10626
106272012-04-19 Pedro Alves <palves@redhat.com>
10628
10629 * config.in: Regenerate.
10630
106312012-04-19 Pedro Alves <palves@redhat.com>
10632
10633 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10634 * server.h (memmem): Remove declaration.
10635 * config.in: Regenerate.
10636 * configure: Regenerate.
10637
106382012-04-19 Yao Qi <yao@codesourcery.com>
10639
10640 * Makefile.in (SFILES): Add common/vec.c.
10641 (OBS): Add vec.o.
10642 (vec.o): New rule.
10643
106442012-04-19 Yao Qi <yao@codesourcery.com>
10645
10646 * remote-utils.c (prepare_resume_reply): Replace with macro
10647 target_core_of_thread.
10648 * server.c (handle_qxfer_threads_proper): Likewise.
10649 * target.h (traget_core_of_thread): New macro.
10650
106512012-04-18 Pedro Alves <palves@redhat.com>
10652
10653 * aclocal.m4: Regenerate.
10654 * configure: Regenerate.
10655
106562012-04-16 Yao Qi <yao@codesourcery.com>
10657
10658 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10659 duplicated on address.
10660
106612012-04-16 Yao Qi <yao@codesourcery.com>
10662
10663 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10664 (struct tracepoint_action_ops) <send>: New field.
10665 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10666 (agent_expr_send, x_tracepoint_action_send): New.
10667 (l_tracepoint_action_send): New.
10668 (cmd_qtdp): Download and install tracepoint
10669 according to `use_agent'.
10670 (run_inferior_command): Add one more parameter `len'.
10671 Update callers.
10672 (tracepoint_send_agent): New.
10673 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10674
106752012-04-16 Yao Qi <yao@codesourcery.com>
10676
10677 * tracepoint.c (download_tracepoints): Moved to ...
10678 (cmd_qtstart): ... here.
10679
106802012-04-14 Yao Qi <yao@codesourcery.com>
10681
10682 * tracepoint.c: Include inttypes.h.
10683 (struct collect_memory_action): Use sized types.
10684 (struct tracepoint): Likewise.
10685 (cmd_qtdp, stop_tracing): Update print specifiers.
10686 (cmd_qtp, response_tracepoint): Likewise.
10687 (collect_data_at_tracepoint): Likewise.
10688 (collect_data_at_step): Likewise.
10689
106902012-04-14 Yao Qi <yao@codesourcery.com>
10691
10692 Import gnulib module inttypes.
10693 * aclocal.m4, config.in, configure: Regenerated.
10694
106952012-04-14 Yao Qi <yao@codesourcery.com>
10696
10697 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10698 Makefile and config.status at last.
10699
107002012-04-13 Yao Qi <yao@codesourcery.com>
10701
10702 * tracepoint.c: Include stdint.h unconditionally.
10703
107042012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10705
10706 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10707 on BFD_HAVE_SYS_PROCFS_TYPE.
10708 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10709 * configure: Regenerate.
10710 * config.in: Likewise.
10711
107122012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10713
10714 * Makefile.in (clean): Also remove x32.c x32-linux.c
10715 x32-avx.c x32-avx-linux.c.
10716 (x32.o): New target.
10717 (x32.c): Likewise.
10718 (x32-linux.o): Likewise.
10719 (x32-linux.c): Likewise.
10720 (x32-avx.o): Likewise.
10721 (x32-avx.c): Likewise.
10722 (x32-avx-linux.o): Likewise.
10723 (x32-avx-linux.c): Likewise.
10724
10725 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10726 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10727 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10728 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10729 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10730 i386/x32-avx-linux.xml.
10731
10732 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10733 (init_registers_x32_avx_linux): Likwise.
10734 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10735 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10736
107372012-04-13 Pedro Alves <palves@redhat.com>
10738
10739 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10740 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10741 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10742 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10743 the sub-make.
10744
107452012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10746
10747 * linux-x86-low.c (compat_x32_clock_t): New.
10748 (compat_x32_siginfo_t): Likewise.
10749 (compat_x32_siginfo_from_siginfo): Likewise.
10750 (siginfo_from_compat_x32_siginfo): Likewise.
10751 (linux_is_elf64): Likewise.
10752 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10753 and siginfo_from_compat_x32_siginfo for x32.
10754 (x86_arch_setup): Set linux_is_elf64.
10755
107562012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10757
10758 PR gdb/13969
10759 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10760 e_machine field.
10761 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10762 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10763 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10764 compatible with process.
10765
107662012-04-12 Yao Qi <yao@codesourcery.com>
10767
10768 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10769 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10770 (install-only, install-info, clean): Handle sub dir gnulib.
10771 (all-lib, am--refresh): New targets.
10772 (memmem.o): Remove target.
10773 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10774 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10775 (AC_REPLACE_FUNCS): Remove memmem.
10776 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10777 (AC_OUTPUT): Generate Makefile in gnulib/.
10778 * aclocal.m4, config.in, configure: Regenerated.
10779
107802012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10781
10782 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10783
107842012-04-05 Pedro Alves <palves@redhat.com>
10785
10786 -Werror=strict-aliasing
10787
10788 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10789 pointer.
10790
107912012-04-04 Pedro Alves <palves@redhat.com>
10792
10793 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10794 (sparc_store_gregset_from_stack, sparc_store_gregset)
10795 (sparc_breakpoint_at): Fix formatting.
10796
107972012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10798
10799 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10800 are available.
10801 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10802 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10803 * config.in: Regenerate.
10804 * configure: Likewise.
10805
108062012-03-29 Pedro Alves <palves@redhat.com>
10807
10808 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10809 Correct ptrace arguments.
10810
108112012-03-28 Pedro Alves <palves@redhat.com>
10812
10813 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10814 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10815 (IA64_FR1_REGNUM): New defines.
10816 (ia64_fetch_register): New.
10817 (the_low_target): Install it.
10818 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10819 field.
10820 * linux-low.c (linux_fetch_registers): Try the
10821 the_low_target.fetch_register hook first.
10822
10823 * linux-arm-low.c (the_low_target): Adjust.
10824 * linux-bfin-low.c (the_low_target): Adjust.
10825 * linux-cris-low.c (the_low_target): Adjust.
10826 * linux-crisv32-low.c (the_low_target): Adjust.
10827 * linux-m32r-low.c (the_low_target): Adjust.
10828 * linux-m68k-low.c (the_low_target): Adjust.
10829 * linux-mips-low.c (the_low_target): Adjust.
10830 * linux-ppc-low.c (the_low_target): Adjust.
10831 * linux-s390-low.c (the_low_target): Adjust.
10832 * linux-sh-low.c (the_low_target): Adjust.
10833 * linux-sparc-low.c (the_low_target): Adjust.
10834 * linux-tic6x-low.c (the_low_target): Adjust.
10835 * linux-x86-low.c (the_low_target): Adjust.
10836 * linux-xtensa-low.c (the_low_target): Adjust.
10837
108382012-03-26 Pedro Alves <palves@redhat.com>
10839
10840 * server.c (handle_qxfer_libraries): Don't bail early if
10841 the_target->qxfer_libraries_svr4 is not NULL.
10842
108432012-03-26 Pedro Alves <palves@redhat.com>
10844
10845 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10846
108472012-03-23 Pedro Alves <palves@redhat.com>
10848
10849 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10850 "library-list-svr4" element's start tag when the the DSO list is
10851 empty.
10852
108532012-03-23 Pedro Alves <palves@redhat.com>
10854
10855 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10856 a variable whose type size is the same as the inferior's pointer
10857 size.
10858
108592012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10860
10861 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10862 struct siginfo.
10863 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10864 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10865 * linux-low.h: Include <signal.h>.
10866 (struct siginfo): Remove forward declaration.
10867 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10868 struct siginfo.
10869
108702012-03-21 Mike Frysinger <vapier@gentoo.org>
10871
10872 * .gitignore: Ignore more files.
10873
108742012-03-19 Pedro Alves <palves@redhat.com>
10875 Jan Kratochvil <jan.kratochvil@redhat.com>
10876
10877 * server.c (cont_thread, general_thread): Add describing comments.
10878 (start_inferior): Clear `cont_thread'.
10879 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10880 of a process.
10881
108822012-03-15 Yao Qi <yao@codesourcery.com>
10883
10884 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10885 handling to ...
10886 (cmd_qtdp): ... here.
10887
108882012-03-15 Yao Qi <yao@codesourcery.com>
10889
10890 * tracepoint.c (struct tracepoint_action_ops): New.
10891 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10892 (m_tracepoint_action_download): New.
10893 (r_tracepoint_action_download): New.
10894 (x_tracepoint_action_download): New.
10895 (l_tracepoint_action_download): New.
10896 (add_tracepoint_action): Install `action->ops' according type.
10897 (download_tracepoint_1): Move code `download' function pointer
10898 of various tracepoint_action_ops.
10899
109002012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10901
10902 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10903 linux_ptrace_attach_warnings.
10904
109052012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10906
10907 * Makefile.in (linux-ptrace.o): New.
10908 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10909 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10910 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10911 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10912 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10913 of these targets.
10914 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10915
109162012-03-08 Yao Qi <yao@codesourcery.com>
10917 Pedro Alves <palves@redhat.com>
10918
10919 Fix PR server/13392.
10920 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10921 offset of JMP insn.
10922 * tracepoint.c (remove_tracepoint): New.
10923 (cmd_qtdp): Call remove_tracepoint when failed to install.
10924
109252012-03-07 Pedro Alves <palves@redhat.com>
10926
10927 * linux-low.c (get_detach_signal): New.
10928 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10929 Pass on pending signals to PTRACE_DETACH. Check the result of the
10930 ptrace call.
10931 * server.c (program_signals, program_signals_p): New.
10932 (handle_general_set): Handle QProgramSignals.
10933 * server.h (program_signals, program_signals_p): Declare.
10934
109352012-03-05 Pedro Alves <palves@redhat.com>
10936 Jan Kratochvil <jan.kratochvil@redhat.com>
10937
10938 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10939 New comment why.
10940
109412012-03-03 Yao Qi <yao@codesourcery.com>
10942
10943 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10944 agent_look_up_symbols.
10945
109462012-03-03 Yao Qi <yao@codesourcery.com>
10947
10948 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10949 (linux-x86-low.o): Likewise.
10950 * server.h: Remove in_process_agent_loaded.
10951 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10952 common/agent.c.
10953 Update callers.
10954
109552012-03-03 Yao Qi <yao@codesourcery.com>
10956
10957 * tracepoint.c (gdb_agent_capability): New global.
10958 (in_process_agent_loaded_ust): Renamed to
10959 `in_process_agent_supports_ust'.
10960 Update callers.
10961 (in_process_agent_supports_ust): Call agent_capability_check.
10962 (clear_installed_tracepoints): Assert that agent supports
10963 agent.
10964
109652012-03-03 Yao Qi <yao@codesourcery.com>
10966
10967 * linux-low.c (linux_supports_agent): New.
10968 (linux_target_ops): Initialize field `supports_agent' with
10969 linux_supports_agent.
10970 * target.h (struct target_ops) <supports_agent>: New.
10971 (target_supports_agent): New macro.
10972 * server.c (handle_general_set): Handle packet 'QAgent'.
10973 (handle_query): Send `QAgent+'.
10974 * Makefile.in (server.o): Depends on agent.h.
10975
109762012-03-03 Yao Qi <yao@codesourcery.com>
10977
10978 * Makefile.in (OBS): Add agent.o.
10979 Add new rule for agent.o.
10980 Track dependence of tracepoint.c on agent.h.
10981 * tracepoint.c (run_inferior_command_1):
10982 (run_inferior_command): Call agent_run_command.
10983 (gdb_ust_connect_sync_socket): Deleted. Move it to
10984 common/agent.c.
10985 (resume_thread, stop_thread): Likewise.
10986 (gdb_ust_socket_init): Renamed to ...
10987 (gdb_agent_socket_init): ... New.
10988 (gdb_ust_thread): Renamed to ...
10989 (gdb_agent_helper_thread): ... New.
10990 (gdb_ust_init): Move some code to ...
10991 (gdb_agent_init): ... here. New.
10992 [HAVE_UST]: Call gdb_ust_init.
10993 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10994 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10995 * config.in, configure: Regenerated.
10996
109972012-03-02 Pedro Alves <palves@redhat.com>
10998
10999 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11000 * linux-low.c (struct simple_pid_list): New.
11001 (stopped_pids): New a struct simple_pid_list pointer.
11002 (add_to_pid_list, pull_pid_from_list): New.
11003 (handle_extended_wait): Don't assume the first signal new children
11004 report is SIGSTOP. Adjust call to pull_pid_from_list.
11005 (linux_wait_for_lwp): Adjust.
11006
110072012-03-02 Yao Qi <yao@codesourcery.com>
11008
11009 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11010 debug log.
11011
110122012-03-02 Yao Qi <yao@codesourcery.com>
11013
11014 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11015 `stop_pc' and `tpoint'. Update caller.
11016
110172012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11018
11019 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11020 * linux-low.c (use_linux_regsets): New macro.
11021 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11022 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11023 (linux_register_in_regsets): New function.
11024 (usr_fetch_inferior_registers): Skip registers covered by
11025 regsets.
11026 (usr_store_inferior_registers): Likewise.
11027 (usr_fetch_inferior_registers): New macro.
11028 (usr_store_inferior_registers): Likewise.
11029 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11030 (linux_store_registers): Likewise.
11031 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11032 prototype.
11033 (init_registers_mips64_dsp_linux): Likewise.
11034 (init_registers_mips_linux): New macro.
11035 (init_registers_mips_dsp_linux): Likewise.
11036 (mips_dsp_num_regs): Likewise.
11037 (DSP_BASE, DSP_CONTROL): New fallback macros.
11038 (mips_base_regs): New macro.
11039 (mips_regmap): Use it. Fix the size.
11040 (mips_dsp_regmap): New variable.
11041 (mips_dsp_regset_bitmap): Likewise.
11042 (mips_arch_setup): New function.
11043 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11044 than mips_regmap.
11045 (mips_cannot_store_register): Likewise.
11046 (the_low_target): Update .arch_setup, .num_regs and .regmap
11047 initializers. Add .regset_bitmap initializer.
11048 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11049 initializer.
11050 * linux-bfin-low.c (the_low_target): Likewise.
11051 * linux-cris-low.c (the_low_target): Likewise.
11052 * linux-crisv32-low.c (the_low_target): Likewise.
11053 * linux-ia64-low.c (the_low_target): Likewise.
11054 * linux-m32r-low.c (the_low_target): Likewise.
11055 * linux-m68k-low.c (the_low_target): Likewise.
11056 * linux-ppc-low.c (the_low_target): Likewise.
11057 * linux-s390-low.c (the_low_target): Likewise.
11058 * linux-sh-low.c (the_low_target): Likewise.
11059 * linux-sparc-low.c (the_low_target): Likewise.
11060 * linux-tic6x-low.c (the_low_target): Likewise.
11061 * linux-x86-low.c (the_low_target): Likewise.
11062 * linux-xtensa-low.c (the_low_target): Likewise.
11063 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11064 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11065 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11066 srv_xmlfiles.
11067 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11068 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11069
110702012-02-29 Yao Qi <yao@codesourcery.com>
11071 Pedro Alves <palves@redhat.com>
11072
11073 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11074 `step_over_finished' is true.
11075
110762012-02-27 Pedro Alves <palves@redhat.com>
11077
11078 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11079 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11080
110812012-02-27 Pedro Alves <palves@redhat.com>
11082
11083 PR server/9684
11084 * linux-low.c (pid_is_stopped): New.
11085 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11086
110872012-02-25 Luis Machado <lgustavo@codesourcery.com>
11088
11089 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11090 of conditions.
11091
110922012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11093
11094 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11095
110962012-02-24 Luis Machado <lgustavo@codesourcery>
11097
11098 * server.c (handle_query): Advertise support for target-side
11099 breakpoint condition evaluation.
11100 (process_point_options): New function.
11101 (process_serial_event): When inserting a breakpoint, check for
11102 a target-side condition that should be evaluated.
11103
11104 * mem-break.c: Include regcache.h and ax.h.
11105 (point_cond_list_t): New data structure.
11106 (breakpoint) <cond_list>: New field.
11107 (find_gdb_breakpoint_at): Make non-static.
11108 (delete_gdb_breakpoint_at): Clear any target-side
11109 conditions.
11110 (clear_gdb_breakpoint_conditions): New function.
11111 (add_condition_to_breakpoint): Likewise.
11112 (add_breakpoint_condition): Likewise.
11113 (gdb_condition_true_at_breakpoint): Likewise.
11114 (gdb_breakpoint_here): Return result directly instead
11115 of going through a local variable.
11116
11117 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11118 (clear_gdb_breakpoint_conditions): Likewise.
11119 (add_breakpoint_condition): Likewise.
11120 (gdb_condition_true_at_breakpoint): Likewise.
11121
11122 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11123 (need_step_over_p): Take target-side breakpoint condition into
11124 consideration.
11125
111262012-02-24 Luis Machado <lgustavo@codesourcery>
11127
11128 * server.h: Include tracepoint.h.
11129 (agent_mem_read, agent_get_trace_state_variable_value,
11130 agent_set_trace_state_variable_value,
11131 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11132 get_set_tsv_func_addr): New prototypes.
11133
11134 * ax.h: New include file.
11135 * ax.c: New source file.
11136
11137 * tracepoint.c: Include ax.h.
11138 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11139 agent_expr, eval_result_type): Move to ax.h.
11140 (parse_agent_expr): Rename to ...
11141 (gdb_parse_agent_expr): ... this, make it non-static and move
11142 to ax.h.
11143 (unparse_agent_expr) Rename to ...
11144 (gdb_unparse_agent_expr): ... this, make it non-static and move
11145 to ax.h.
11146 (eval_agent_expr): Rename to ...
11147 (eval_tracepoint_agent_expr): ... this.
11148 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11149 forward declarations.
11150 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11151 (agent_get_trace_state_variable_value): New function.
11152 (agent_set_trace_state_variable_value): New function.
11153 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11154 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11155 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11156 (condition_true_at_tracepoint): Likewise.
11157 (parse_agent_expr): Rename to ...
11158 (gdb_parse_agent_expr): ... this and move to ax.c.
11159 (unparse_agent_expr): Rename to ...
11160 (gdb_unparse_agent_expr): ... this and move to ax.c.
11161 (gdb_agent_op_name): Move to ax.c.
11162 (eval_agent_expr): Rename to ...
11163 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11164 and move to ax.c.
11165 (eval_tracepoint_agent_expr): New function.
11166 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11167 non-static.
11168 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11169 ax.c.
11170 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11171 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11172 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11173 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11174 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11175 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11176 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11177 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11178 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11179 (compile_bytecodes): Remove forward declaration.
11180 (is_goto_target): Move to ax.c.
11181 (compile_bytecodes): Move to ax.c and call
11182 agent_get_trace_state_variable_value (...) and
11183 agent_set_trace_state_variable_value (...).
11184
11185 * Makefile.in: Update ax.c and IPA dependencies.
11186
111872012-02-24 Pedro Alves <palves@redhat.com>
11188
11189 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11190 (cmd_bigqtbuffer_circular): ... this. Only handle
11191 'QTBuffer:circular:'.
11192 (handle_tracepoint_general_set): Adjust.
11193
111942012-02-16 Yao Qi <yao@codesourcery.com>
11195
11196 * inferiors.c: Move code to ...
11197 * dll.c: .... here. New.
11198 * server.h: Declare clear_dlls.
11199 * Makefile.in (SFILES): Add dll.c.
11200 (OBS): Add dll.o
11201 (dll.o): New rule.
11202
112032012-02-11 Yao Qi <yao@codesourcery.com>
11204
11205 * server.c: (handle_monitor_command): Add a new parameter
11206 `own_buf'.
11207 (handle_query): Update caller.
11208
112092012-02-09 Joel Brobecker <brobecker@adacore.com>
11210
11211 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11212 * configure, config.in: Regenerate.
11213 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11214 is not defined.
11215
112162012-02-02 Pedro Alves <palves@redhat.com>
11217
11218 Try SIGKILL first, then PTRACE_KILL.
11219 * linux-low.c (linux_kill_one_lwp): New.
11220 (linux_kill_one_lwp): Rename to ...
11221 (kill_one_lwp_callback): ... this. Use the new
11222 linux_kill_one_lwp.
11223
112242012-02-02 Pedro Alves <palves@redhat.com>
11225
11226 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11227 inferior.
11228
112292012-01-27 Pedro Alves <palves@redhat.com>
11230
11231 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11232 (elf_64_file_p): Make static.
11233 (linux_pid_exe_is_elf_64_file): New.
11234 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11235 Delete declarations.
11236 (linux_pid_exe_is_elf_64_file): Declare.
11237 * linux-x86-low.c (x86_arch_setup): Use
11238 linux_pid_exe_is_elf_64_file.
11239
112402012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11241
11242 * linux-low.c (linux_wait_for_event_1): Rename to ...
11243 (linux_wait_for_event): ... here and merge it with former
11244 linux_wait_for_event - new variable wait_ptid, use it.
11245 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11246
112472012-01-23 Pedro Alves <palves@redhat.com>
11248
11249 * server.c (main): Avoid yet another case of infinite loop while
11250 detaching/killing after a longjmp.
11251
112522012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11253
11254 Code cleanup.
11255 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11256
112572012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11258
11259 * hostio.c (handle_readlink): New function.
11260 (handle_vFile): Call it to handle "vFile:readlink" packets.
11261
112622012-01-20 Pedro Alves <palves@redhat.com>
11263 Ulrich Weigand <ulrich.weigand@linaro.org>
11264
11265 * server.c (handle_v_requests): Only support vAttach and vRun to
11266 start multiple processes when in extended protocol mode.
11267
112682012-01-17 Pedro Alves <palves@redhat.com>
11269
11270 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11271 memalign plus mprotect to allocate the scratch buffer.
11272
112732012-01-13 Pedro Alves <palves@redhat.com>
11274
11275 * server.c (attach_inferior): Clear `cont_thread'.
11276
112772012-01-13 Pedro Alves <palves@redhat.com>
11278
11279 * server.c (main): Avoid infinite loop while detaching/killing
11280 after a longjmp.
11281
112822012-01-09 Doug Evans <dje@google.com>
11283
11284 * server.c (start_inferior): Set last_ptid in --wrapper case.
11285
112862012-01-06 Yao Qi <yao@codesourcery.com>
11287
11288 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11289 defined.
11290 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11291
112922012-01-04 Yao Qi <yao@codesourcery.com>
11293
11294 * tracepoint.c (cmd_qtdp): Print debug message
11295 for static tracepoint.
11296
112972012-01-04 Yao Qi <yao@codesourcery.com>
11298
11299 * tracepoint.c (trace_vdebug): Differentiate debug message
11300 between gdbserver and IPA.
11301
113022012-01-03 Yao Qi <yao@codesourcery.com>
11303
11304 * tracepoint.c (tracepoint_was_hit): Don't collect for
11305 static tracepoint.
11306
113072012-01-02 Joel Brobecker <brobecker@adacore.com>
11308
11309 * terminal.h: Reformat copyright header.
11310
113112012-01-02 Joel Brobecker <brobecker@adacore.com>
11312
11313 * server.c (gdbserver_version): Update copyright year.
11314 * gdbreplay.c (gdbreplay_version): Likewise.
11315
113162011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11317
11318 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11319
11320 Revert:
11321 2011-12-18 Hui Zhu <teawater@gmail.com>
11322 * linux-low.c (linux_create_inferior): Save return value to ret.
11323
113242011-12-18 Hui Zhu <teawater@gmail.com>
11325
11326 * linux-low.c (linux_create_inferior): Save return value to ret.
11327
113282011-12-16 Doug Evans <dje@google.com>
11329
11330 * linux-low.c (linux_create_inferior): If stdio connection,
11331 redirect stdin from /dev/null, stdout to stderr.
11332 * remote-utils.c (remote_is_stdio): New static global.
11333 (remote_connection_is_stdio): New function.
11334 (remote_prepare): Handle stdio connection.
11335 (remote_open): Ditto.
11336 (remote_close): Don't close stdin for stdio connections.
11337 (read_prim,write_prim): New functions. Replace all calls to
11338 read/write to these.
11339 * server.c (main): Watch for "-" argument. Move call to
11340 remote_prepare before start_inferior.
11341 * server.h (STDIO_CONNECTION_NAME): New macro.
11342 (remote_connection_is_stdio): Declare.
11343
11344 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11345 in debugging output.
11346
113472011-12-15 Yao Qi <yao@codesourcery.com>
11348
11349 * tracepoint.c: Include sys/syscall.h.
11350 (gdb_ust_thread): Remove preprocessor conditional.
11351
113522011-12-14 Pedro Alves <pedro@codesourcery.com>
11353
11354 * linux-low.c (linux_detach_one_lwp): Call
11355 the_low_target.prepare_to_resume before detaching.
11356
113572011-12-14 Yao Qi <yao@codesourcery.com>
11358
11359 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11360 of write.
11361
113622011-12-14 Yao Qi <yao@codesourcery.com>
11363
11364 * i386-low.c (i386_low_stopped_data_address): Initialize local
11365 variable `control'.
11366
113672011-12-13 Pedro Alves <pedro@codesourcery.com>
11368
11369 PR remote/13492
11370
11371 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11372 DR_CONTROL unless necessary. Extend comments.
11373 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11374 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11375
113762011-12-13 Yao Qi <yao@codesourcery.com>
11377
11378 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11379 macros.
11380 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11381
113822011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11383
11384 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11385 Print new debug message for such case.
11386
113872011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11388
11389 Fix overlapping memcpy.
11390 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11391 the read_inferior_memory transfer.
11392 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11393 write_inferior_memory transfer.
11394 (set_fast_tracepoint_jump): New variable buf. Use it for the
11395 read_inferior_memory and write_inferior_memory transfers.
11396 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11397 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11398 Use it for the write_inferior_memory transfer.
11399 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11400 buffers.
11401
114022011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11403
11404 * linux-low.c (fetch_register, store_register): Make code
11405 consistent, fix formatting.
11406
114072011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11408
11409 * linux-low.c (usr_store_inferior_registers): Factor out code
11410 to handle individual registers into...
11411 (store_register): ... this new function.
11412
114132011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11414
11415 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11416 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11417 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11418 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11419 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11420 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11421 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11422 (srv_xmlfiles): Add new XML files.
11423
11424 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11425 and <sys/uio.h>.
11426 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11427 (init_registers_s390_linux32v1): Add prototype.
11428 (init_registers_s390_linux32v2): Likewise.
11429 (init_registers_s390_linux64v1): Likewise.
11430 (init_registers_s390_linux64v2): Likewise.
11431 (init_registers_s390x_linux64v1): Likewise.
11432 (init_registers_s390x_linux64v2): Likewise.
11433 (s390_num_regs): Increment to 52.
11434 (s390_regmap): Add orig_r2 register.
11435 (s390_num_regs_3264): Increment to 68.
11436 (s390_regmap_3264): Add orig_r2 register.
11437 (s390_collect_ptrace_register): Handle orig_r2 register.
11438 (s390_supply_ptrace_register): Likewise.
11439 (s390_fill_last_break): New function.
11440 (s390_store_last_break): Likewise.
11441 (s390_fill_system_call): New function.
11442 (s390_store_system_call): Likewise.
11443 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11444 register sets.
11445 (s390_check_regset): New function.
11446 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11447 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11448 Update target_regsets for available register sets.
11449
114502011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11451 Jan Kratochvil <jan.kratochvil@redhat.com>
11452
11453 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11454 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11455 New.
11456 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11457 * linux-low.h (struct process_info_private): New member r_debug.
11458 * server.c (handle_qxfer_libraries): Call
11459 the_target->qxfer_libraries_svr4.
11460 (handle_qxfer_libraries_svr4): New function.
11461 (qxfer_packets): New entry "libraries-svr4".
11462 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11463 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11464 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11465 PACKET_qXfer_libraries_svr4.
11466
114672011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11468
11469 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11470 PSW address/mask between 8-byte and 16-byte formats.
11471 (s390_supply_ptrace_register): Likewise.
11472 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11473 basic addressing mode bit.
11474
114752011-11-24 Stan Shebs <stan@codesourcery.com>
11476
11477 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11478
114792011-11-17 Stan Shebs <stan@codesourcery.com>
11480
11481 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11482 (tracing_start_time): New global.
11483 (tracing_stop_time): New global.
11484 (tracing_user_name): New global.
11485 (tracing_notes): New global.
11486 (tracing_stop_note): New global.
11487 (cmd_qtstart): Set traceframe_usage, start_time.
11488 (stop_tracing): Set stop_time.
11489 (cmd_qtstatus): Report additional status.
11490 (cmd_qtp): New function.
11491 (handle_tracepoint_query): Call it.
11492 (cmd_qtnotes): New function.
11493 (handle_tracepoint_general_set): Call it.
11494 (get_timestamp): Rename from tsv_get_timestamp.
11495
114962011-11-14 Stan Shebs <stan@codesourcery.com>
11497 Kwok Cheung Yeung <kcy@codesourcery.com>
11498
11499 * linux-x86-low.c (small_jump_insn): New.
11500 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11501 trampoline and error message, build a trampoline and issue a small
11502 jump instruction to it.
11503 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11504 trampoline and error message.
11505 (x86_get_min_fast_tracepoint_insn_len): New.
11506 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11507 * linux-low.h (struct linux_target_ops): Add arguments to
11508 install_fast_tracepoint_jump_pad operation, add new operation.
11509 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11510 arguments.
11511 (linux_get_min_fast_tracepoint_insn_len): New function.
11512 (linux_target_op): Add new operation.
11513 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11514 (gdb_trampoline_buffer_end): Ditto.
11515 (gdb_trampoline_buffer_error): Ditto.
11516 (struct ipa_sym_addresses): Add fields for new IPA variables.
11517 (symbol_list): Add entries for new IPA variables.
11518 (struct tracepoint): Add fields to hold the address range of the
11519 trampoline used by the tracepoint.
11520 (trampoline_buffer_head): New static variable.
11521 (trampoline_buffer_tail): Ditto.
11522 (claim_trampoline_space): New function.
11523 (have_fast_tracepoint_trampoline_buffer): New function.
11524 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11525 structure.
11526 (install_fast_tracepoint): Ditto, also add error buffer argument.
11527 (cmd_qtminftpilen): New function.
11528 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11529 (fast_tracepoint_from_trampoline_address): New function.
11530 (fast_tracepoint_collecting): Handle trampoline as part of jump
11531 pad space.
11532 (set_trampoline_buffer_space): New function.
11533 (initialize_tracepoint): Initialize new IPA variables.
11534 * target.h (struct target_ops): Add arguments to
11535 install_fast_tracepoint_jump_pad operation, add new
11536 get_min_fast_tracepoint_insn_len operation.
11537 (target_get_min_fast_tracepoint_insn_len): New.
11538 (install_fast_tracepoint_jump_pad): Add arguments.
11539 * server.h (IPA_BUFSIZ): Define.
11540 * linux-i386-ipa.c: Include extra header files.
11541 (initialize_fast_tracepoint_trampoline_buffer): New function.
11542 (initialize_low_tracepoint): Call it.
11543 * server.h (set_trampoline_buffer_space): Declare.
11544 (claim_trampoline_space): Ditto.
11545 (have_fast_tracepoint_trampoline_buffer): Ditto.
11546
115472011-11-14 Yao Qi <yao@codesourcery.com>
11548
11549 * server.c (handle_query): Handle InstallInTrace for qSupported.
11550 * tracepoint.c (add_tracepoint): Sort list.
11551 (install_tracepoint, download_tracepoint): New.
11552 (cmd_qtdp): Call them to install and download tracepoints.
11553 (sort_tracepoints): Removed.
11554 (cmd_qtstart): Update.
11555
115562011-11-14 Yao Qi <yao@codesourcery.com>
11557
11558 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11559 * mem-break.h: Declare.
11560 * tracepoint.c (cmd_qtstart): Move some code to ...
11561 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11562 New.
11563 (download_tracepoints): Move some code to ...
11564 (download_tracepoint_1): ... here. New.
11565
115662011-11-08 Yao Qi <yao@codesourcery.com>
11567
11568 * remote-utils.c (relocate_instruction): A comment fix.
11569
115702011-11-07 Joel Brobecker <brobecker@adacore.com>
11571
11572 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11573 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11574 dr_status_mirror and dr_control_mirror from debug_reg_state.
11575 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11576 (i386_initial_stuff): Remove use of deleted globals.
11577 (i386_get_thread_context, i386_set_thread_context,
11578 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11579 from debug_reg_state.
11580
115812011-11-05 Yao Qi <yao@codesourcery.com>
11582
11583 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11584 address as TPOINT's.
11585
115862011-11-02 Stan Shebs <stan@codesourcery.com>
11587
11588 * tracepoint.c (agent_mem_read_string): New function.
11589 (eval_agent_expr): Call it for tracenz.
11590 * server.c (handle_query): Report support for tracenz.
11591
115922011-11-02 Yao Qi <yao@codesourcery.com>
11593
11594 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11595
115962011-11-02 Yao Qi <yao@codesourcery.com>
11597
11598 * target.h: Fix a typo in comment.
11599
116002011-10-31 Pedro Alves <pedro@codesourcery.com>
11601
11602 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11603 clobber the breakpoints' shadows with fast tracepoint jumps.
11604 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11605 * target.c (write_inferior_memory): Also pass MYADDR down to
11606 check_mem_write.
11607
116082011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11609
11610 * configure.ac: Check support for personality routine.
11611 * configure: Regenerate.
11612 * config.in: Likewise.
11613 * linux-low.c: Include <sys/personality.h>.
11614 Define ADDR_NO_RANDOMIZE if necessary.
11615 (linux_create_inferior): Disable address space randomization when
11616 forking inferior, if requested.
11617 (linux_supports_disable_randomization): New function.
11618 (linux_target_ops): Install it.
11619 * server.h (disable_randomization): Declare.
11620 * server.c (disable_randomization): New global variable.
11621 (handle_general_set): Handle QDisableRandomization.
11622 (handle_query): Likewise for qSupported.
11623 (main): Support --disable-randomization and --no-disable-randomization
11624 command line arguments.
11625 * target.h (struct target_ops): Add supports_disable_randomization.
11626 (target_supports_disable_randomization): New macro.
11627
116282011-09-29 Mike Frysinger <vapier@gentoo.org>
11629
11630 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11631 ifdef check.
11632 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11633 [!PT_GETDSBT] (target_loadmap): New definition.
11634 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11635 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11636 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11637 and PT_GETDSBT to LINUX_LOADMAP.
11638 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11639 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11640
116412011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11642
11643 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11644 (arm_linux_hwbp_cap): New static variable.
11645 (arm_linux_get_hwbp_cap): Replace by ...
11646 (arm_linux_init_hwbp_cap): ... this new function.
11647 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11648 (arm_linux_get_hw_watchpoint_count): Likewise.
11649 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11650 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11651 (arm_prepare_to_resume): Use perror_with_name instead of error.
11652
116532011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11654
11655 * linux-arm-low.c: Include <signal.h>.
11656 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11657 (struct arm_linux_hwbp_cap): New data type.
11658 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11659 (struct arm_linux_hw_breakpoint): New data type.
11660 (MAX_BPTS, MAX_WPTS): Define.
11661 (struct arch_process_info, struct arch_lwp_info): New data types.
11662 (arm_linux_get_hwbp_cap): New function.
11663 (arm_linux_get_hw_breakpoint_count): Likewise.
11664 (arm_linux_get_hw_watchpoint_count): Likewise.
11665 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11666 (arm_hwbp_control_initialize): Likewise.
11667 (arm_hwbp_control_is_enabled): Likewise.
11668 (arm_hwbp_control_is_initialized): Likewise.
11669 (arm_hwbp_control_disable): Likewise.
11670 (arm_linux_hw_breakpoint_equal): Likewise.
11671 (arm_linux_hw_point_initialize): Likewise.
11672 (struct update_registers_data): New data structure.
11673 (update_registers_callback: New function.
11674 (arm_insert_point): Likewise.
11675 (arm_remove_point): Likewise.
11676 (arm_stopped_by_watchpoint): Likewise.
11677 (arm_stopped_data_address): Likewise.
11678 (arm_new_process): Likewise.
11679 (arm_new_thread): Likewise.
11680 (arm_prepare_to_resume): Likewise.
11681 (the_low_target): Register arm_insert_point, arm_remove_point,
11682 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11683 arm_new_thread, and arm_prepare_to_resume.
11684
116852011-09-15 Stan Shebs <stan@codesourcery.com>
11686
11687 * server.h (struct emit_ops): Add compare-goto fields.
11688 * tracepoint.c (gdb_agent_op_sizes): New table.
11689 (emit_eq_goto): New function.
11690 (emit_ne_goto): New function.
11691 (emit_lt_goto): New function.
11692 (emit_le_goto): New function.
11693 (emit_gt_goto): New function.
11694 (emit_ge_goto): New function.
11695 (is_goto_target): New function.
11696 (compile_bytecodes): Recognize special cases of compare-goto
11697 combinations and call specialized emitters for them.
11698 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11699 (amd64_emit_ne_goto): New function.
11700 (amd64_emit_lt_goto): New function.
11701 (amd64_emit_le_goto): New function.
11702 (amd64_emit_gt_goto): New function.
11703 (amd64_emit_ge_goto): New function.
11704 (amd64_emit_ops): Add the new functions.
11705 (i386_emit_eq_goto): New function.
11706 (i386_emit_ne_goto): New function.
11707 (i386_emit_lt_goto): New function.
11708 (i386_emit_le_goto): New function.
11709 (i386_emit_gt_goto): New function.
11710 (i386_emit_ge_goto): New function.
11711 (i386_emit_ops): Add the new functions.
11712
117132011-09-08 Stan Shebs <stan@codesourcery.com>
11714
11715 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11716 (i386_emit_epilogue): Restore %ebx.
11717
117182011-08-31 Jie Zhang <jzhang918@gmail.com>
11719
11720 * server.c (step_thread): Remove definition.
11721 (process_serial_event): Don't handle Hs.
11722 * server.h (step_thread): Remove declaration.
11723 * target.c (set_desired_inferior): Remove use of step_thread.
11724
117252011-08-24 Luis Machado <lgustavo@codesourcery.com>
11726
11727 * linux-low.c: Include linux-procfs.h.
11728 (linux_attach_lwp_1): Update comments.
11729 (linux_attach): Scan for existing threads when attaching to a
11730 process that is the tgid.
11731 * Makefile.in: Update dependencies.
11732
117332011-08-24 Luis Machado <lgustavo@codesourcery.com>
11734
11735 * configure.srv: Add linux-procfs.o dependencies.
11736
117372011-08-14 Yao Qi <yao@codesourcery.com>
11738
11739 * target.h (struct target_ops): Fix indent.
11740 * win32-low.c (win32_target_ops): Fix comment.
11741
117422011-08-14 Andrew Jenner <andrew@codesourcery.com>
11743 Yao Qi <yao@codesourcery.com>
11744
11745 * Makefile.in (clean): Remove tic6x-*.c files.
11746 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11747 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11748 (tic6x-c64xp-linux.c): Likewise.
11749 * configure.srv: Add support for tic6x-*-uclinux.
11750 * linux-tic6x-low.c: New.
11751 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11752
117532011-08-14 Andrew Stubbs <ams@codesourcery.com>
11754 Yao Qi <yao@codesourcery.com>
11755
11756 * target.h (struct target_ops): Add read_loadmap.
11757 * linux-low.c (struct target_loadseg): New type.
11758 (struct target_loadmap): New type.
11759 (linux_read_loadmap): New function.
11760 (linux_target_ops): Add linux_read_loadmap.
11761 * server.c (handle_query): Support qXfer:fdpic:read packet.
11762 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11763 to NULL.
11764
117652011-08-05 Eli Zaretskii <eliz@gnu.org>
11766
11767 * win32-low.c: Include <stdint.h>.
11768
117692011-07-22 Pedro Alves <pedro@codesourcery.com>
11770
11771 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11772 to the inferior here.
11773 (i386_remove_aligned_watchpoint): Ditto.
11774 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11775 fit part of the watchpoint in the debug registers.
11776 (i386_update_inferior_debug_regs): New.
11777 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11778 registers, and only update the inferior on success.
11779 (i386_low_remove_watchpoint): Ditto.
11780
117812011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11782
11783 * linux-low.c (compare_ints, unique, list_threads, show_process,
11784 linux_core_of_thread): Delete.
11785 (linux_target_ops): Change linux_core_of_thread to
11786 linux_common_core_of_thread.
11787 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11788 * utils.c (malloc_failure): Change type of argument.
11789 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11790 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11791 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11792 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11793 (IPA_OBJS): Add common-utils-ipa.o.
11794 (ptid_h, linux_osdata_h): New macros.
11795 (server_h): Add common/common-utils.h, common/xml-utils.h,
11796 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11797 common/ptid.h.
11798 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11799 ptid.o, buffer.o): New rules.
11800 (linux-low.o): Add common/linux-osdata.h as a dependency.
11801 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11802 * configure.ac: Add AC_HEADER_DIRENT check.
11803 * config.in: Regenerate.
11804 * configure: Regenerate.
11805 * remote-utils.c (xml_escape_text): Delete.
11806 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11807 buffer_xml_printf): Move to common/buffer.c.
11808 * server.c (main): Remove call to initialize_inferiors.
11809 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11810 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11811 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11812 internal_error, gdb_assert, gdb_assert_fail): Delete.
11813 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11814 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11815 common/buffer.h.
11816 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11817 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11818 initialize_inferiors): Delete.
11819
118202011-07-20 Pedro Alves <pedro@codesourcery.com>
11821
11822 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11823 symbol error.
11824
118252011-05-31 Pedro Alves <pedro@codesourcery.com>
11826
11827 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11828 assertion.
11829 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11830
118312011-05-26 Yao Qi <yao@codesourcery.com>
11832
11833 * Makefile.in (thread-db.o): Track dependence to
11834 common/gdb_thread_db.h.
11835 * thread-db.c: include gdb_thread_db.h from right place.
11836
118372011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11838
11839 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11840 __FILE__ and __LINE__ to internal_error.
11841
118422011-05-13 Doug Evans <dje@google.com>
11843
11844 * thread-db.c (try_thread_db_load_from_sdir): New function.
11845 (try_thread_db_load_from_dir): New function.
11846 (thread_db_load_search): Handle $sdir, ignore $pdir.
11847 Remove trying of system directories if search of
11848 libthread-db-search-path fails, that is now done via $sdir.
11849
118502011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11851
11852 * server.c (handle_query): Add EnableDisableTracepoints to the list
11853 of supported features.
11854 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11855 tracepoints.
11856 (cmd_qtenable_disable): New.
11857 (cmd_qtstart): Install tracepoints even if disabled.
11858 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11859 receiving a QTEnable or QTDisable packet.
11860 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11861 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11862 tracepoints.
11863 (gdb_probe): Skip data collection if static tracepoint is disabled.
11864
118652011-05-10 Doug Evans <dje@google.com>
11866
11867 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11868
118692011-05-04 Doug Evans <dje@google.com>
11870
11871 * linux-low.c (linux_join): Skip process lookup.
11872 * spu-low.c (spu_join): Ditto.
11873 * server.c (join_inferiors_callback): Delete.
11874 (process_serial_event): For 'D' packet (detach) call join_inferior
11875 directly.
11876
118772011-05-04 Joseph Myers <joseph@codesourcery.com>
11878
11879 * README: Don't mention xscale*-*-linux*.
11880 * configure.srv (xscale*-*-linux*): Don't handle target.
11881
118822011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11883
11884 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11885 casting pointers.
11886 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11887 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11888 (i386_emit_void_call_2): Likewise.
11889
118902011-04-26 Yao Qi <yao@codesourcery.com>
11891
11892 * linux-low.c: Move common macros to linux-ptrace.h.
11893 Include linux-ptrace.h.
11894 * Makefile.in (linux_ptrace_h): New.
11895 (linux-low.o): Depends on linux-ptrace.h.
11896
118972011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11898
11899 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11900 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11901 (remote_prepare): New function with most of the TCP code from ...
11902 (remote_open): ... here. Detect PORT here unconditionally. Move also
11903 setting transport_is_reliable.
11904 * server.c (run_once): New variable.
11905 (gdbserver_usage): Document it.
11906 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11907 the first run if RUN_ONCE.
11908 * server.h (run_once, remote_prepare): New declarations.
11909
119102011-04-19 Tom Tromey <tromey@redhat.com>
11911
11912 * win32-low.c (handle_load_dll): Remove duplicate "the".
11913
119142011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11915
11916 Remove support for old Cygwin 1.5 versions.
11917 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11918 function to avoid warning.
11919 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11920 warning.
11921
119222011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11923
11924 * gdbserver/server.h (Macro _): Define it if not available.
11925
119262011-03-14 Michael Snyder <msnyder@vmware.com>
11927
11928 * hostio.c (handle_close): Remove unnecessary null test.
11929
119302011-03-10 Joel Brobecker <brobecker@adacore.com>
11931
11932 * Makefile.in (maintainer-clean realclean distclean): Remove
11933 "make ... subdir_do" command.
11934
119352011-03-10 Michael Snyder <msnyder@vmware.com>
11936
11937 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11938
11939 * server.c (handle_v_run): Free alloced buffer on early return.
11940
119412011-03-09 Yao Qi <yao@codesourcery.com>
11942
11943 Revert:
11944 2011-03-04 Yao Qi <yao@codesourcery.com>
11945
11946 * Makefile.in: Remove GNU make feature --directory.
11947
11948 2011-03-05 Yao Qi <yao@codesourcery.com>
11949
11950 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11951 (subdir_do): New make target. Copied from gdb/Makefile.
11952 (maintainer-clean, realclean, distclean, clean): Call corresponding
11953 make targets in common/Makefile.
11954
11955 2011-02-11 Yao Qi <yao@codesourcery.com>
11956
11957 * configure.ac: Call AC_PROG_RANLIB.
11958 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11959 * configure: Regenerate.
11960
119612011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11962
11963 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11964
119652011-03-06 Yao Qi <yao@codesourcery.com>
11966
11967 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11968
119692011-03-05 Yao Qi <yao@codesourcery.com>
11970
11971 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11972 (subdir_do): New make target. Copied from gdb/Makefile.
11973 (maintainer-clean, realclean, distclean, clean): Call corresponding
11974 make targets in common/Makefile.
11975
119762011-03-04 Yao Qi <yao@codesourcery.com>
11977
11978 * Makefile.in: Remove GNU make feature --directory.
11979
119802011-03-04 Michael Snyder <msnyder@vmware.com>
11981
11982 * server.c (queue_stop_reply): Call xmalloc not malloc.
11983
119842011-03-02 Michael Snyder <msnyder@vmware.com>
11985
11986 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11987
119882011-02-28 Michael Snyder <msnyder@vmware.com>
11989
11990 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11991 (cmd_qtframe): Ditto.
11992 (cmd_qtbuffer): Ditto.
11993 (cmd_bigqtbuffer): Ditto.
11994
11995 * utils.c (decimal2str): Initialize 'width' to nine, then
11996 don't mess with it.
11997
119982011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11999
12000 * hostio.c (require_data): Free *data, not data.
12001
120022011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12003
12004 * hostio.c (require_data): Use free, not xfree.
12005
120062011-02-27 Michael Snyder <msnyder@vmware.com>
12007
12008 * server.c (handle_query): Discard unused value.
12009
12010 * hostio.c (require_data): Free malloc memory before returning
12011 error.
12012
120132011-02-26 Michael Snyder <msnyder@vmware.com>
12014
12015 * linux-low.c (list_threads): Call closedir for dirent.
12016
120172011-02-27 Michael Snyder <msnyder@vmware.com>
12018
12019 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12020 a case statement falls through.
12021
12022 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12023
12024 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12025 in comparison.
12026
120272011-02-26 Michael Snyder <msnyder@vmware.com>
12028
12029 * utils.c (decimal2str): Eliminate dead code and dead param.
12030 (pulongest): Drop dead param from call to decimal2str.
12031 (plongest): Ditto.
12032
120332011-02-24 Joel Brobecker <brobecker@adacore.com>
12034
12035 Revert the following patch (not approved yet):
12036 2011-02-21 Hui Zhu <teawater@gmail.com>
12037 * tracepoint.c (tp_printf): New function.
12038 (eval_agent_expr): Handle gdb_agent_op_printf.
12039
120402011-02-21 Hui Zhu <teawater@gmail.com>
12041
12042 * tracepoint.c (tp_printf): New function.
12043 (eval_agent_expr): Handle gdb_agent_op_printf.
12044
120452011-02-18 Tom Tromey <tromey@redhat.com>
12046
12047 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12048 (tracepoint.o): Likewise.
12049 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12050 (gdb_agent_op_names): Likewise.
12051
120522011-02-18 Tom Tromey <tromey@redhat.com>
12053
12054 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12055 gdb_agent_op_rot>: New constants.
12056 (gdb_agent_op_names): Add pick and roll.
12057 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12058 cases.
12059
120602011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12061
12062 * aclocal.m4: Regenerated with aclocal-1.11.1.
12063
120642011-02-14 Pedro Alves <pedro@codesourcery.com>
12065
12066 * server.c (handle_qxfer_traceframe_info): New.
12067 (qxfer_packets): Register "traceframe-info".
12068 (handle_query): Report support for qXfer:traceframe-info:read+.
12069 * tracepoint.c (match_blocktype): New.
12070 (traceframe_find_block_type): Rename to ...
12071 (traceframe_walk_blocks): ... this. Add callback filter argument,
12072 and use it.
12073 (traceframe_find_block_type): New, reimplemented on top of
12074 traceframe_walk_blocks.
12075 (build_traceframe_info_xml): New.
12076 (traceframe_read_info): New.
12077 * server.h (traceframe_read_info): Declare.
12078
120792011-02-11 Yao Qi <yao@codesourcery.com>
12080
12081 * configure.ac: Call AC_PROG_RANLIB.
12082 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12083 * configure: Regenerate.
12084
120852011-02-07 Pedro Alves <pedro@codesourcery.com>
12086
12087 * server.c (gdb_read_memory): Change return semantics to allow
12088 partial transfers.
12089 (handle_search_memory_1): Adjust.
12090 (process_serial_event) <'m' packet>: Handle partial transfers.
12091 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12092
120932011-01-28 Pedro Alves <pedro@codesourcery.com>
12094
12095 * regcache.c (init_register_cache): Initialize
12096 regcache->register_status.
12097 (free_register_cache): Release regcache->register_status.
12098 (regcache_cpy): Copy register_status.
12099 (registers_to_string): Print 'x's for unavailable registers.
12100 (supply_register): Mark the register's status valid or
12101 unavailable, depending on whether a buffer was passed in or not.
12102 (supply_register_zeroed): New.
12103 (supply_regblock): Mark the registers' status valid or
12104 unavailable, depending on whether a buffer was passed in or not.
12105 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12106 (struct regcache): New `register_status' field.
12107 (supply_register_zeroed): Declare.
12108 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12109 supply_register_zeroed, rather than passing a NULL buffer to
12110 supply_register.
12111 * tracepoint.c (fetch_traceframe_registers): Update comment.
12112
121132011-01-28 Pedro Alves <pedro@codesourcery.com>
12114
12115 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12116 buffer explicit.
12117
121182011-01-25 Pedro Alves <pedro@codesourcery.com>
12119
12120 * server.h (decode_xfer_write): Change prototype.
12121 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12122 and don't extract the annex here.
12123 * server.c (decode_xfer_read): Remove `annex' parameter,
12124 and don't extract the annex here.
12125 (decode_xfer): New.
12126 (struct qxfer): New.
12127 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12128 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12129 (handle_qxfer_statictrace): New functions, abstracted out from
12130 handle_query, and made to use the struct qxfer interface.
12131 (handle_threads_qxfer_proper): Rename to ...
12132 (handle_qxfer_threads_proper): ... this.
12133 (handle_threads_qxfer): Rename to ...
12134 (handle_qxfer_threads): ... this. Adjust.
12135 (qxfer_packets): New array.
12136 (handle_qxfer): New function.
12137 (handle_query): Use handle_qxfer.
12138
121392011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12140
12141 * gdbreplay.c: Shorten lines of >= 80 columns.
12142 * linux-low.c: Ditto.
12143 * linux-ppc-low.c: Ditto.
12144 * linux-s390-low.c: Ditto.
12145 * linux-sparc-low.c: Ditto.
12146 * linux-x86-low.c: Ditto.
12147 * linux-xtensa-low.c: Ditto.
12148 * mem-break.c: Ditto.
12149 * nto-low.c: Ditto.
12150 * regcache.h: Ditto.
12151 * remote-utils.c: Ditto.
12152 * server.c: Ditto.
12153 * server.h: Ditto.
12154 * thread-db.c: Ditto.
12155 * tracepoint.c: Ditto.
12156 * utils.c: Ditto.
12157 * win32-low.h: Ditto.
12158
121592011-01-05 Joel Brobecker <brobecker@adacore.com>
12160
12161 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12162 update.
12163
121642011-01-01 Joel Brobecker <brobecker@adacore.com>
12165
12166 * server.c (gdbserver_version): Update copyright year in version
12167 output.
12168 * gdbreplay.c (gdbreplay_version): Ditto.
12169
121702010-12-29 Jie Zhang <jie.zhang@analog.com>
12171
12172 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12173 * linux-bfin-low.c: New file.
12174 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12175 PT_DATA_ADDR for BFIN targets.
12176 * Makefile.in (SFILES): Add linux-bfin-low.c.
12177 (clean): Remove reg-bfin.c.
12178 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12179 * README: Mention supported Blackfin targets.
12180
121812010-12-23 Mike Frysinger <vapier@gentoo.org>
12182
12183 * .gitignore: New file.
12184
121852010-11-16 Mike Frysinger <vapier@gentoo.org>
12186
12187 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12188
121892010-10-22 Jie Zhang <jie@codesourcery.com>
12190
12191 * Makefile.in: Add FLAGS_TO_PASS variable.
12192 (install): Remove dependency of install-only and recursively
12193 invoke make for install-only.
12194
121952010-10-04 Doug Evans <dje@google.com>
12196
12197 * Makefile.in (uninstall): Use $(DESTDIR).
12198
121992010-09-24 Pedro Alves <pedro@codesourcery.com>
12200
12201 PR gdb/11842
12202
12203 * linux-x86-low.c (compat_siginfo_from_siginfo)
12204 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12205 si_code is < 0. Check for si_code == SI_TIMER before checking for
12206 si_code < 0.
12207
122082010-09-13 Joel Brobecker <brobecker@adacore.com>
12209
12210 * lynx-i386-low.c: New file.
12211 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12212
122132010-09-13 Joel Brobecker <brobecker@adacore.com>
12214
12215 * lynx-low.c (ptrace_request_to_str): Remove handling for
12216 request values that have been removed in LynxOS 5.x.
12217
122182010-09-13 Joel Brobecker <brobecker@adacore.com>
12219
12220 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12221 <ptrace.h>
12222
122232010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12224
12225 * configure.ac: Add --enable-inprocess-agent option.
12226 * configure: Rebuilt.
12227
122282010-09-06 Yao Qi <yao@codesourcery.com>
12229
12230 * linux-low.c (linux_kill): Remove unused variable.
12231 (linux_stabilize_threads): Likewise.
12232 * server.c (start_inferior): Likewise.
12233 (queue_stop_reply_callback): Likewise.
12234 * tracepoint.c (do_action_at_tracepoint): Likewise.
12235
122362010-09-06 Yao Qi <yao@codesourcery.com>
12237
12238 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12239 on return.
12240
122412010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12242
12243 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12244
122452010-09-06 Pedro Alves <pedro@codesourcery.com>
12246
12247 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12248 "$(IPA_DEPFILES)".
12249
122502010-09-01 Joel Brobecker <brobecker@adacore.com>
12251
12252 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12253 gdbserver/lynx-ppc-low.c: New files.
12254 * Makefile.in (lynx_low_h): New variable.
12255 (lynx-low.o, lynx-ppc-low.o): New rules.
12256 * configure.ac: On LynxOS, link with -lnetinet.
12257 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12258 * configure: regenerate.
12259
122602010-09-01 Joel Brobecker <brobecker@adacore.com>
12261
12262 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12263 * configure.ac: Add check for vasprintf and vsnprintf.
12264 * configure, config.in: Regenerate.
12265 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12266
122672010-09-01 Joel Brobecker <brobecker@adacore.com>
12268
12269 * gdbreplay.c: Move include of alloca.h up, next to include of
12270 malloc.h.
12271 * server.h: Add include of malloc.h.
12272 * mem-break.c: Remove include of malloc.h.
12273 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12274
122752010-09-01 Joel Brobecker <brobecker@adacore.com>
12276
12277 * Makefile.in (memmem.o): Build with -Wno-error.
12278
122792010-09-01 Joel Brobecker <brobecker@adacore.com>
12280
12281 * utils.c (xsnprintf): Make non-static.
12282 * server.h: Add xsnprintf declaration.
12283 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12284 replace calls to snprintf by calls to xsnprintf throughout.
12285
122862010-09-01 Joel Brobecker <brobecker@adacore.com>
12287
12288 * configure.ac: Add configure check for alloca.
12289 * configure, config.in: Regenerate.
12290 * server.h: Include alloca.h if it exists.
12291 * gdbreplay.c: Include alloca.h if it exists.
12292
122932010-08-28 Pedro Alves <pedro@codesourcery.com>
12294
12295 * linux-low.c (__SIGRTMIN): Define if not already defined.
12296 (linux_create_inferior): Check for __ANDROID__ rather than
12297 __SIGRTMIN.
12298 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12299 are already deferred.
12300 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12301 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12302 stopped and already has a pending signal to report.
12303 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12304 a pending signal to report or is moving out of a jump pad.
12305 (linux_init_signals): Check for __ANDROID__ rather than
12306 __SIGRTMIN.
12307
123082010-08-28 Pedro Alves <pedro@codesourcery.com>
12309
12310 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12311 debug_threads check. Avoid a linear search when not doing debug
12312 output.
12313
123142010-08-27 Pedro Alves <pedro@codesourcery.com>
12315
12316 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12317 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12318 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12319 (process_event): Change local fd's type to gdb_fildes_t.
12320 (create_file_handler): Adjust prototype.
12321 (delete_file_handler): Adjust prototype.
12322 (handle_file_event): Adjust prototype. Use pfildes.
12323 (create_file_event): Adjsut prototype.
12324 * remote-utils.c (remote_desc, listen_desc): Change type to
12325 gdb_fildes_t.
12326 * server.h: New gdb_fildes_t typedef.
12327 [USE_WIN32API]: Include winsock2.h.
12328 (delete_file_handler, add_file_handler): Adjust prototypes.
12329 (pfildes): Declare.
12330 * utils.c (pfildes): New.
12331
123322010-08-27 Pedro Alves <pedro@codesourcery.com>
12333
12334 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12335 * configure: Regenerate.
12336
123372010-08-27 Pedro Alves <pedro@codesourcery.com>
12338
12339 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12340 (linux_done_accessing_memory): ... this.
12341 (linux_target_ops): Adjust.
12342 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12343 * nto-low.c (nto_target_ops): Adjust comment.
12344 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12345 * spu-low.c (spu_target_ops): Adjust comment.
12346 * target.h (target_ops): Rename unprepare_to_access_memory field
12347 to done_accessing_memory.
12348 (unprepare_to_access_memory): Rename to ...
12349 (done_accessing_memory): ... this.
12350
123512010-08-26 Pedro Alves <pedro@codesourcery.com>
12352
12353 * linux-low.c (linux_prepare_to_access_memory): New.
12354 (linux_unprepare_to_access_memory): New.
12355 (linux_target_ops): Install them.
12356 * server.c (read_memory): Rename to ...
12357 (gdb_read_memory): ... this. Use
12358 prepare_to_access_memory/prepare_to_access_memory.
12359 (write_memory): Rename to ...
12360 (gdb_write_memory): ... this. Use
12361 prepare_to_access_memory/prepare_to_access_memory.
12362 (handle_search_memory_1): Adjust.
12363 (process_serial_event): Adjust.
12364 * target.h (struct target_ops): New fields
12365 prepare_to_access_memory and unprepare_to_access_memory.
12366 (prepare_to_access_memory, unprepare_to_access_memory): New.
12367 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12368 prepare_to_access_memory/prepare_to_access_memory.
12369 * nto-low.c (nto_target_ops): Adjust.
12370 * spu-low.c (spu_target_ops): Adjust.
12371 * win32-low.c (win32_target_ops): Adjust.
12372
123732010-08-26 Pedro Alves <pedro@codesourcery.com>
12374
12375 * Makefile.in (WARN_CFLAGS): Get it from configure.
12376 (WERROR_CFLAGS): New.
12377 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12378 * configure.ac: Introduce --enable-werror, which adds -Werror to
12379 the compiler command line. Enabled by default. Disable with
12380 --disable-werror. Add -Wdeclaration-after-statement
12381 Wpointer-arith and -Wformat-nonliteral to warning flags.
12382 * configure: Regenerate.
12383
123842010-08-26 Pedro Alves <pedro@codesourcery.com>
12385
12386 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12387
123882010-08-26 Pedro Alves <pedro@codesourcery.com>
12389
12390 * gdbreplay.c (remote_error): New.
12391 (gdbchar): New.
12392 (expect): Use gdbchar. Check for error reading from GDB.
12393 Clarify sync error output.
12394 (play): Check for errors writing to GDB.
12395 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12396 * remote-utils.c (getpkt): Check for errors writing to the remote
12397 descriptor.
12398
123992010-08-25 Pedro Alves <pedro@codesourcery.com>
12400
12401 * linux-low.c (linux_wait_1): Move non-debugging code out of
12402 `debug_threads' control.
12403
124042010-08-25 Pedro Alves <pedro@codesourcery.com>
12405
12406 * linux-low.c (linux_wait_1): Don't set last_status here.
12407 * server.c (push_event, queue_stop_reply_callback): Assert we're
12408 not pushing a TARGET_WAITKIND_IGNORE event.
12409 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12410 (myresume, handle_target_event): Set the thread's last_resume_kind
12411 and last_status from the target returned status.
12412
124132010-08-25 Pedro Alves <pedro@codesourcery.com>
12414
12415 PR threads/10729
12416
12417 * linux-x86-low.c (update_debug_registers_callback): New.
12418 (i386_dr_low_set_addr): Use it.
12419 (i386_dr_low_get_addr): New.
12420 (i386_dr_low_set_control): Use update_debug_registers_callback.
12421 (i386_dr_low_get_control): New.
12422 (i386_dr_low_get_status): Adjust.
12423 * linux-low.c (linux_stop_lwp): New.
12424 * linux-low.h (linux_stop_lwp): Declare.
12425
12426 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12427 argument instead of a i386_debug_reg_state.
12428 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12429 a i386_debug_reg_state.
12430 (i386_insert_aligned_watchpoint): Adjust.
12431 (i386_remove_aligned_watchpoint): Adjust.
12432 (i386_low_stopped_data_address): Read the debug registers from the
12433 inferior instead of from the mirrors.
12434 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12435 (i386_dr_low_get_addr): Declare.
12436 (i386_dr_low_get_control): Declare.
12437 (i386_dr_low_get_status): Change prototype.
12438
12439 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12440 (i386_dr_low_get_addr): New.
12441 (i386_dr_low_get_control): New.
12442 (i386_dr_low_get_status): Adjust prototype. Return
12443 dr_status_mirror.
12444 (i386_initial_stuff): Clear dr_status_mirror and
12445 dr_control_mirror.
12446 (i386_get_thread_context): Adjust.
12447 (i386_set_thread_context): Adjust.
12448 (i386_thread_added): Adjust.
12449
124502010-08-24 Pedro Alves <pedro@codesourcery.com>
12451
12452 * linux-low.h (linux_thread_area): Delete declaration.
12453
124542010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12455
12456 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12457 after its termination.
12458
124592010-08-09 Pedro Alves <pedro@codesourcery.com>
12460
12461 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12462 (gdb_wants_all_stopped): Delete.
12463 (linux_wait_1): Don't call them.
12464 * server.c (handle_v_cont): Tag all threads as want-stopped.
12465 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12466 stopped as "client-wants-stopped".
12467
124682010-07-31 Pedro Alves <pedro@codesourcery.com>
12469
12470 * Makefile.in (signals_h): New.
12471 (server_h): Depend on it.
12472 (server.o): Don't depend on $(signals_def).
12473 (signals.o): Depend on $(signals_def).
12474
124752010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12476
12477 * Makefile.in (signals_def): New.
12478 (server_h): Append include/gdb/signals.h and signals_def.
12479 (server.o): Append signals_def.
12480
124812010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12482
12483 * server.c (handle_target_event): Use target_signal_to_host for
12484 resume_info.sig initialization.
12485 * target.h (struct thread_resume) <sig>: New comment.
12486
124872010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12488
12489 * server.c (handle_query): strcpy() the returned string from paddress()
12490 instead of sprintf().
12491 * utils.c (paddress): Return phex_nz().
12492
124932010-07-07 Joel Brobecker <brobecker@adacore.com>
12494
12495 * server.c (handle_v_cont): Call mourn_inferior if process
12496 just exited.
12497 (myresume): Likewise.
12498
124992010-07-01 Pedro Alves <pedro@codesourcery.com>
12500
12501 Static tracepoints, and integration with UST.
12502
12503 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12504 * mem-break.c (uninsert_all_breakpoints)
12505 (reinsert_all_breakpoints): New.
12506 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12507 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12508 (gdb_agent_ust_loaded, helper_thread_id)
12509 (gdb_agent_helper_thread_id): New macros.
12510 (struct ipa_sym_addresses): Add addr_ust_loaded,
12511 addr_helper_thread_id, addr_cmd_buf.
12512 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12513 (in_process_agent_loaded_ust): New.
12514 (write_e_ust_not_loaded): New.
12515 (maybe_write_ipa_ust_not_loaded): New.
12516 (struct collect_static_trace_data_action): New.
12517 (enum tracepoint_type) <static_tracepoint>: New.
12518 (struct tracepoint) <handle>: Mention static tracepoints.
12519 (struct static_tracepoint_ctx): New.
12520 (CMD_BUF_SIZE): New.
12521 (add_tracepoint_action): Handle static tracepoint actions.
12522 (unprobe_marker_at): New.
12523 (clear_installed_tracepoints): Handle static tracepoints.
12524 (cmd_qtdp): Handle static tracepoints.
12525 (probe_marker_at): New.
12526 (cmd_qtstart): Handle static tracepoints.
12527 (response_tracepoint): Handle static tracepoints.
12528 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12529 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12530 (get_context_regcache): Handle static tracepoints.
12531 (do_action_at_tracepoint): Handle static tracepoint actions.
12532 (traceframe_find_block_type): Handle static trace data blocks.
12533 (traceframe_read_sdata): New.
12534 (download_tracepoints): Download static tracepoint actions.
12535 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12536 (GDB_PROBE_NAME): New.
12537 (ust_ops): New.
12538 (GET_UST_SYM): New.
12539 (USTF): New.
12540 (dlsym_ust): New.
12541 (ust_marker_to_static_tracepoint): New.
12542 (gdb_probe): New.
12543 (collect_ust_data_at_tracepoint): New.
12544 (gdb_ust_probe): New.
12545 (UNIX_PATH_MAX, SOCK_DIR): New.
12546 (gdb_ust_connect_sync_socket): New.
12547 (resume_thread, stop_thread): New.
12548 (run_inferior_command): New.
12549 (init_named_socket): New.
12550 (gdb_ust_socket_init): New.
12551 (cstr_to_hexstr): New.
12552 (next_st): New.
12553 (first_marker, next_marker): New.
12554 (response_ust_marker): New.
12555 (cmd_qtfstm, cmd_qtsstm): New.
12556 (unprobe_marker_at, probe_marker_at): New.
12557 (cmd_qtstmat, gdb_ust_thread): New.
12558 (gdb_ust_init): New.
12559 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12560 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12561 (ST_REGENTRY): New.
12562 (x86_64_st_collect_regmap): New.
12563 (X86_64_NUM_ST_COLLECT_GREGS): New.
12564 (AMD64_RIP_REGNUM): New.
12565 (supply_static_tracepoint_registers): New.
12566 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12567 (ST_REGENTRY): New.
12568 (i386_st_collect_regmap): New.
12569 (i386_NUM_ST_COLLECT_GREGS): New.
12570 (supply_static_tracepoint_registers): New.
12571 * server.c (handle_query): Handle qXfer:statictrace:read.
12572 <qSupported>: Report support for StaticTracepoints, and
12573 qXfer:statictrace:read features.
12574 * server.h (traceframe_read_sdata)
12575 (supply_static_tracepoint_registers): Declare.
12576 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12577 (unpack_varlen_hex): Include in IPA build.
12578 * Makefile.in (ustlibs, ustinc): New.
12579 (IPA_OBJS): Add remote-utils-ipa.o.
12580 ($(IPA_LIB)): Link -ldl and -lpthread.
12581 (UST_CFLAGS): New.
12582 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12583 * config.in, configure: Regenerate.
12584
125852010-06-20 Ian Lance Taylor <iant@google.com>
12586 Pedro Alves <pedro@codesourcery.com>
12587
12588 * linux-x86-low.c (always_true): Delete.
12589 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12590 trying to fool the compiler with always_true.
12591
125922010-06-20 Pedro Alves <pedro@codesourcery.com>
12593
12594 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12595 conditions in gdbserver.
12596
125972010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12598
12599 * spu-low.c (spu_read_memory): Wrap around local store limit.
12600 (spu_write_memory): Likewise.
12601
126022010-06-15 Pedro Alves <pedro@codesourcery.com>
12603
12604 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12605 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12606 LONGEST uses.
12607 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12608 uses.
12609 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12610 uses with LONGEST uses.
12611
126122010-06-14 Stan Shebs <stan@codesourcery.com>
12613 Pedro Alves <pedro@codesourcery.com>
12614
12615 Bytecode compiler.
12616
12617 * linux-x86-low.c: Include limits.h.
12618 (add_insns): New.
12619 (always_true): New.
12620 (EMIT_ASM): New.
12621 (EMIT_ASM32): New.
12622 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12623 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12624 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12625 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12626 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12627 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12628 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12629 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12630 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12631 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12632 (amd64_emit_void_call_2): New.
12633 (amd64_emit_ops): New.
12634 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12635 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12636 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12637 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12638 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12639 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12640 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12641 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12642 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12643 (i386_emit_stack_adjust, i386_emit_int_call_1)
12644 (i386_emit_void_call_2): New.
12645 (i386_emit_ops): New.
12646 (x86_emit_ops): New.
12647 (the_low_target): Install x86_emit_ops.
12648 * server.h (struct emit_ops): New.
12649 (get_raw_reg_func_addr): Declare.
12650 (current_insn_ptr, emit_error): Declare.
12651 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12652 (set_trace_state_variable_value): New defines.
12653 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12654 addr_get_trace_state_variable_value and
12655 addr_set_trace_state_variable_value.
12656 (symbol_list): New fields for get_raw_reg,
12657 get_trace_state_variable_value and set_trace_state_variable_value.
12658 (condfn): New typedef.
12659 (struct tracepoint): New field `compiled_cond'.
12660 (do_action_at_tracepoint): Clear compiled_cond.
12661 (get_trace_state_variable_value, set_trace_state_variable_value):
12662 Export in the IPA.
12663 (condition_true_at_tracepoint): If there's a compiled condition,
12664 run that.
12665 (current_insn_ptr, emit_error): New globals.
12666 (struct bytecode_address): New.
12667 (get_raw_reg_func_addr): New.
12668 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12669 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12670 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12671 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12672 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12673 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12674 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12675 (compile_tracepoint_condition, compile_bytecodes): New.
12676 * target.h (emit_ops): Forward declare.
12677 (struct target_ops): New field emit_ops.
12678 (target_emit_ops): New.
12679 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12680 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12681 * linux-low.c (linux_emit_ops): New.
12682 (linux_target_ops): Install it.
12683 * linux-low.h (struct linux_target_ops): New field emit_ops.
12684
126852010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12686
12687 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12688 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12689
126902010-06-01 Pedro Alves <pedro@codesourcery.com>
12691 Stan Shebs <stan@codesourcery.com>
12692
12693 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12694 (all): Depend on $(extra_libraries).
12695 (install-only): Install the IPA.
12696 (IPA_OBJS, IPA_LIB): New.
12697 (clean): Remove the IPA lib.
12698 (IPAGENT_CFLAGS): New.
12699 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12700 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12701 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12702 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12703 * configure.ac: Check for atomic builtins support in the compiler.
12704 (IPA_DEPFILES, extra_libraries): Define.
12705 * configure.srv (ipa_obj): Add description.
12706 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12707 (i[34567]86-*-linux*): Set ipa_obj.
12708 (x86_64-*-linux*): Set ipa_obj.
12709 * linux-low.c (stabilizing_threads): New.
12710 (supports_fast_tracepoints): New.
12711 (linux_detach): Stabilize threads before detaching.
12712 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12713 the lwp is either not stabilizing, or is moving out of a jump pad.
12714 (linux_fast_tracepoint_collecting): New.
12715 (maybe_move_out_of_jump_pad): New.
12716 (enqueue_one_deferred_signal): New.
12717 (dequeue_one_deferred_signal): New.
12718 (linux_wait_for_event_1): If moving out of a jump pad, defer
12719 pending signals to later.
12720 (linux_stabilize_threads): New.
12721 (linux_wait_1): Check if threads need moving out of jump pads, and
12722 do it if so.
12723 (stuck_in_jump_pad_callback): New.
12724 (move_out_of_jump_pad_callback): New.
12725 (lwp_running): New.
12726 (linux_resume_one_lwp): Handle moving out of jump pads.
12727 (linux_set_resume_request): Dequeue deferred signals.
12728 (need_step_over_p): Also step over fast tracepoint jumps.
12729 (start_step_over): Also uninsert fast tracepoint jumps.
12730 (finish_step_over): Also reinsert fast tracepoint jumps.
12731 (linux_install_fast_tracepoint_jump): New.
12732 (linux_target_ops): Install linux_stabilize_threads and
12733 linux_install_fast_tracepoint_jump_pad.
12734 * linux-low.h (linux_target_ops) <get_thread_area,
12735 install_fast_tracepoint_jump_pad>: New fields.
12736 (struct lwp_info) <collecting_fast_tracepoint,
12737 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12738 (linux_get_thread_area): Declare.
12739 * linux-x86-low.c (jump_insn): New.
12740 (x86_get_thread_area): New.
12741 (append_insns): New.
12742 (push_opcode): New.
12743 (amd64_install_fast_tracepoint_jump_pad): New.
12744 (i386_install_fast_tracepoint_jump_pad): New.
12745 (x86_install_fast_tracepoint_jump_pad): New.
12746 (the_low_target): Install x86_get_thread_area and
12747 x86_install_fast_tracepoint_jump_pad.
12748 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12749 (struct fast_tracepoint_jump): New.
12750 (fast_tracepoint_jump_insn): New.
12751 (fast_tracepoint_jump_shadow): New.
12752 (find_fast_tracepoint_jump_at): New.
12753 (fast_tracepoint_jump_here): New.
12754 (delete_fast_tracepoint_jump): New.
12755 (set_fast_tracepoint_jump): New.
12756 (uninsert_fast_tracepoint_jumps_at): New.
12757 (reinsert_fast_tracepoint_jumps_at): New.
12758 (set_breakpoint_at): Use write_inferior_memory.
12759 (uninsert_raw_breakpoint): Use write_inferior_memory.
12760 (check_mem_read): Mask out fast tracepoint jumps.
12761 (check_mem_write): Mask out fast tracepoint jumps.
12762 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12763 (set_fast_tracepoint_jump): Declare.
12764 (delete_fast_tracepoint_jump)
12765 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12766 (reinsert_fast_tracepoint_jumps_at): Declare.
12767 * regcache.c: Don't compile many functions when building the
12768 in-process agent library.
12769 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12770 the register buffer in the heap.
12771 (free_register_cache): If the register buffer isn't owned by the
12772 regcache, don't free it.
12773 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12774 pre-existing register caches.
12775 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12776 type.
12777 (convert_ascii_to_int): : Constify `from' parameter type.
12778 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12779 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12780 the needed buffer in-place.
12781 (relocate_instruction): New.
12782 * server.c (handle_query) <qSymbols>: If the target supports
12783 tracepoints, give it a chance of looking up symbols. Report
12784 support for fast tracepoints.
12785 (handle_status): Stabilize threads.
12786 (process_serial_event): Adjust.
12787 * server.h (struct fast_tracepoint_jump): Forward declare.
12788 (struct process_info) <fast_tracepoint_jumps>: New field.
12789 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12790 (decode_X_packet, decode_M_packet): Adjust.
12791 (relocate_instruction): Declare.
12792 (in_process_agent_loaded): Declare.
12793 (tracepoint_look_up_symbols): Declare.
12794 (struct fast_tpoint_collect_status): Declare.
12795 (fast_tracepoint_collecting): Declare.
12796 (force_unlock_trace_buffer): Declare.
12797 (handle_tracepoint_bkpts): Declare.
12798 (initialize_low_tracepoint)
12799 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12800 * target.h (struct target_ops) <stabilize_threads,
12801 install_fast_tracepoint_jump_pad>: New fields.
12802 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12803 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12804 [HAVE_STDINT_H]: Include stdint.h.
12805 (trace_debug_1): Rename to ...
12806 (trace_vdebug): ... this.
12807 (trace_debug): Rename to ...
12808 (trace_debug_1): ... this. Add `level' parameter.
12809 (trace_debug): New.
12810 (ATTR_USED, ATTR_NOINLINE): New.
12811 (IP_AGENT_EXPORT): New.
12812 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12813 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12814 (about_to_request_buffer_space, trace_buffer_is_full)
12815 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12816 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12817 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12818 (traceframe_write_count, traceframes_created)
12819 (trace_state_variables)
12820 New renaming defines.
12821 (struct ipa_sym_addresses): New.
12822 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12823 (symbol_list): New.
12824 (ipa_sym_addrs): New.
12825 (all_tracepoint_symbols_looked_up): New.
12826 (in_process_agent_loaded): New.
12827 (write_e_ipa_not_loaded): New.
12828 (maybe_write_ipa_not_loaded): New.
12829 (tracepoint_look_up_symbols): New.
12830 (debug_threads) [IN_PROCESS_AGENT]: New.
12831 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12832 (UNKNOWN_SIDE_EFFECTS): New.
12833 (stop_tracing): New.
12834 (flush_trace_buffer): New.
12835 (stop_tracing_bkpt): New.
12836 (flush_trace_buffer_bkpt): New.
12837 (read_inferior_integer): New.
12838 (read_inferior_uinteger): New.
12839 (read_inferior_data_pointer): New.
12840 (write_inferior_data_pointer): New.
12841 (write_inferior_integer): New.
12842 (write_inferior_uinteger): New.
12843 (struct collect_static_trace_data_action): Delete.
12844 (enum tracepoint_type): New.
12845 (struct tracepoint) <type>: New field `type'.
12846 <actions_str, step_actions, step_actions_str>: Only include in
12847 GDBserver.
12848 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12849 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12850 (tracepoints): Use IP_AGENT_EXPORT.
12851 (last_tracepoint): Don't include in the IPA.
12852 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12853 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12854 (alloced_trace_state_variables): New.
12855 (trace_state_variables): Use IP_AGENT_EXPORT.
12856 (traceframe_t): Delete unused variable.
12857 (circular_trace_buffer): Don't include in the IPA.
12858 (trace_buffer_start): Delete.
12859 (struct trace_buffer_control): New.
12860 (trace_buffer_free): Delete.
12861 (struct ipa_trace_buffer_control): New.
12862 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12863 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12864 New.
12865 (trace_buffer_ctrl): New.
12866 (TRACE_BUFFER_CTRL_CURR): New.
12867 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12868 Reimplement as macros.
12869 (trace_buffer_wrap): Delete.
12870 (traceframe_write_count, traceframe_read_count)
12871 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12872 (struct tracepoint_hit_ctx) <type>: New field.
12873 (struct fast_tracepoint_ctx): New.
12874 (memory_barrier): New.
12875 (cmpxchg): New.
12876 (record_tracepoint_error): Update atomically in the IPA.
12877 (clear_inferior_trace_buffer): New.
12878 (about_to_request_buffer_space): New.
12879 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12880 updating the same buffer.
12881 (add_tracepoint): Default the tracepoint's type to trap
12882 tracepoint, and orig_size to -1.
12883 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12884 internal variables.
12885 (create_trace_state_variable): New parameter `gdb'. Handle it.
12886 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12887 (cmd_qtdp): Handle fast tracepoints.
12888 (cmd_qtdv): Adjust.
12889 (max_jump_pad_size): New.
12890 (gdb_jump_pad_head): New.
12891 (get_jump_space_head): New.
12892 (claim_jump_space): New.
12893 (sort_tracepoints): New.
12894 (MAX_JUMP_SIZE): New.
12895 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12896 IPA.
12897 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12898 support. Upload fast traceframes, and delete internal IPA
12899 breakpoints.
12900 (stop_tracing_handler): New.
12901 (flush_trace_buffer_handler): New.
12902 (cmd_qtstop): Upload fast tracepoints.
12903 (response_tracepoint): Handle fast tracepoints.
12904 (tracepoint_finished_step): Upload fast traceframes. Set the
12905 tracepoint hit context's tracepoint type.
12906 (handle_tracepoint_bkpts): New.
12907 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12908 type. Add comment about fast tracepoints.
12909 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12910 non-existing action_str field.
12911 (get_context_regcache): Handle fast tracepoints.
12912 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12913 to the regcache.
12914 (fast_tracepoint_from_jump_pad_address): New.
12915 (fast_tracepoint_from_ipa_tpoint_address): New.
12916 (collecting_t): New.
12917 (force_unlock_trace_buffer): New.
12918 (fast_tracepoint_collecting): New.
12919 (collecting): New.
12920 (gdb_collect): New.
12921 (write_inferior_data_ptr): New.
12922 (target_tp_heap): New.
12923 (target_malloc): New.
12924 (download_agent_expr): New.
12925 (UALIGN): New.
12926 (download_tracepoints): New.
12927 (download_trace_state_variables): New.
12928 (upload_fast_traceframes): New.
12929 (IPA_FIRST_TRACEFRAME): New.
12930 (IPA_NEXT_TRACEFRAME_1): New.
12931 (IPA_NEXT_TRACEFRAME): New.
12932 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12933 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12934 (gdb_jump_pad_buffer_end): New.
12935 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12936 (initialize_tracepoint): Adjust.
12937 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12938 buffer. Initialize the low module.
12939 * utils.c (PREFIX, TOOLNAME): New.
12940 (malloc_failure): Use PREFIX.
12941 (error): In the IPA, an error causes an exit.
12942 (fatal, warning): Use PREFIX.
12943 (internal_error): Use TOOLNAME.
12944 (NUMCELLS): Increase to 10.
12945 * configure, config.in: Regenerate.
12946
129472010-06-01 Pedro Alves <pedro@codesourcery.com>
12948
12949 * server.c (handle_query) <qSupported>: Do two passes over the
12950 qSupported string to avoid nesting strtok.
12951
129522010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12953
12954 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12955 (CDEPS): New.
12956 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12957 -Wl,--dynamic-list.
12958 * configure: Regenerate.
12959 * proc-service.list: New.
12960
129612010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12962
12963 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12964 New comment.
12965
129662010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12967
12968 * gdbreplay.c (remote_open): Check error return from socket() call by
12969 its equality to -1 not by it being negative.
12970 * remote-utils.c (remote_open): Likewise.
12971
129722010-05-23 Pedro Alves <pedro@codesourcery.com>
12973
12974 * config.h: Regenerate.
12975
129762010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12977
12978 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12979 doesn't provide PTRACE_GET_THREAD_AREA.
12980
129812010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12982
12983 * linux-m68k-low.c: Include <asm/ptrace.h>
12984 (ps_get_thread_area): Implement.
12985
129862010-05-03 Doug Evans <dje@google.com>
12987
12988 * event-loop.c (struct callback_event): New struct.
12989 (callback_list): New global.
12990 (append_callback_event, delete_callback_event): New functions.
12991 (process_callback): New function.
12992 (start_event_loop): Call it.
12993 * remote-utils.c (NOT_SCHEDULED): Define.
12994 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12995 moved out of readchar.
12996 (readchar): Rewrite. Call reschedule before returning.
12997 (reset_readchar): New function.
12998 (remote_close): Call it.
12999 (process_remaining, reschedule): New functions.
13000 * server.h (callback_handler_func): New typedef.
13001 (append_callback_event, delete_callback_event): Declare.
13002
130032010-05-03 Pedro Alves <pedro@codesourcery.com>
13004
13005 * proc-service.c (ps_pglobal_lookup): Use
13006 thread_db_look_up_one_symbol.
13007 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13008 parameter. Use it instead of all_symbols_looked_up.
13009 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13010 field.
13011 (all_symbols_looked_up): Don't declare.
13012 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13013 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13014 field.
13015 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13016 Set all_symbols_looked_up here.
13017 (thread_db_look_up_one_symbol): New.
13018 (thread_db_get_tls_address): Adjust.
13019 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13020 thread_db object on the heap, and tentatively set it in the
13021 process structure.
13022 (thread_db_init): Don't set all_symbols_looked_up here.
13023 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13024
130252010-05-03 Pedro Alves <pedro@codesourcery.com>
13026
13027 * linux-low.c (linux_kill, linux_detach): Adjust.
13028 (status_pending_p_callback): Remove redundant statement. Check
13029 for !TARGET_WAITIKIND_IGNORE, instead of
13030 TARGET_WAITKIND_STOPPED.
13031 (handle_tracepoints): Make sure LWP is locked. Adjust.
13032 (linux_wait_for_event_1): Adjust.
13033 (linux_cancel_breakpoints): New.
13034 (unsuspend_one_lwp): New.
13035 (unsuspend_all_lwps): New.
13036 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13037 (send_sigstop_callback): Change return type to int, add new
13038 `except' parameter and handle it.
13039 (suspend_and_send_sigstop_callback): New.
13040 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13041 pass them down. If SUSPEND, also increment the lwp's suspend
13042 count.
13043 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13044 (need_step_over_p): Don't consider suspended LWPs.
13045 (start_step_over): Adjust.
13046 (proceed_one_lwp): Change return type to int, add new `except'
13047 parameter and handle it.
13048 (unsuspend_and_proceed_one_lwp): New.
13049 (proceed_all_lwps): Use find_inferior instead of
13050 for_each_inferior.
13051 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13052 also decrement the suspend count of LWPs. Pass `except' down,
13053 instead of hacking its suspend count.
13054 (linux_pause_all): Add `freeze' parameter. Adjust.
13055 (linux_unpause_all): New.
13056 (linux_target_ops): Install linux_unpause_all.
13057 * server.c (handle_status): Adjust.
13058 * target.h (struct target_ops): New fields `unpause_all' and
13059 `cancel_breakpoints'. Add new parameter to `pause_all'.
13060 (pause_all): Add new `freeze' parameter.
13061 (unpause_all): New.
13062 (cancel_breakpoints): New.
13063 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13064 cancel breakpoints.
13065 (cmd_qtstart): Pause threads.
13066 (stop_tracing): Pause threads, and cancel breakpoints.
13067 * win32-low.c (win32_target_ops): Adjust.
13068
130692010-05-03 Pedro Alves <pedro@codesourcery.com>
13070
13071 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13072 the inferior right away from here...
13073 (linux_wait_1): ... to here, and adjust to check the thread's
13074 last_resume_kind instead of the lwp's step or stop_expected flags.
13075
130762010-05-02 Pedro Alves <pedro@codesourcery.com>
13077
13078 * README: Use consistent `GDB' and `GDBserver' spellings.
13079
130802010-05-02 Pedro Alves <pedro@codesourcery.com>
13081
13082 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13083 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13084 (linux_detach_one_lwp): Assume the lwp is stopped.
13085 (any_thread_of): Delete.
13086 (linux_detach): Stop all lwps here. Don't blindly delete all
13087 breakpoints.
13088 (delete_lwp_callback): New.
13089 (linux_mourn): Delete all lwps of the process that is gone.
13090 (linux_wait_1): Don't delete the last lwp of the process here.
13091 * mem-break.h (mark_breakpoints_out): Declare.
13092 * mem-break.c (mark_breakpoints_out): New.
13093 (free_all_breakpoints): Use it.
13094 * server.c (handle_target_event): If the process is gone, mark
13095 breakpoints out.
13096 * thread-db.c (struct thread_db) <create_bp>: New field.
13097 (thread_db_enable_reporting): Fix prototype. Store a thread event
13098 breakpoint reference in the thread_db struct.
13099 (thread_db_load_search): Clear the thread_db object.
13100 (try_thread_db_load_1): Ditto.
13101 (switch_to_process): New.
13102 (disable_thread_event_reporting): Use it.
13103 (remove_thread_event_breakpoints): New.
13104 (thread_db_detach, thread_db_mourn): Use it.
13105
131062010-05-01 Pedro Alves <pedro@codesourcery.com>
13107
13108 * linux-low.c (linux_enable_event_reporting): New.
13109 (linux_wait_for_event_1, handle_extended_wait): Use it.
13110
131112010-04-30 Pedro Alves <pedro@codesourcery.com>
13112
13113 * linux-low.c (linux_kill_one_lwp, linux_kill)
13114 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13115 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13116 SIGSTOP even if the LWP is stopped.
13117 (send_sigstop_callback): New.
13118 (stop_all_lwps): Use send_sigstop_callback instead.
13119 (linux_resume_one_thread): Adjust.
13120 (proceed_one_lwp): Still proceed an LWP that the client has
13121 requested to stop, if we haven't reported it as stopped yet. Make
13122 sure that LWPs the client want stopped, have a pending SIGSTOP.
13123
131242010-04-26 Doug Evans <dje@google.com>
13125
13126 * server.c (handle_general_set): Make static.
13127
13128 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13129 Print received char after testing for error/eof instead of before.
13130 (input_interrupt): Tweak comment.
13131
131322010-04-23 Doug Evans <dje@google.com>
13133
13134 * server.c (start_inferior): Print inferior argv if --debug.
13135
131362010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13137
13138 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13139 * nto-x86-low.c: Include server.h
13140
131412010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13142
13143 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13144 be consistent with other sources of this directory.
13145 (init_registers_amd64): Correct name of source file of this function
13146 in the comment.
13147
131482010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13149
13150 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13151 64-bit executables.
13152
131532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13154
13155 * win32-i386-low.c: Add 64-bit support.
13156 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13157 (init_registers_amd64): Declare.
13158 (mappings): Add 64-bit version of array.
13159 (init_windows_x86): New function.
13160 (the_low_target): Change init_arch field to init_windows_x86.
13161
131622010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13163
13164 * win32-low.c: Adapt to support also 64-bit architecture.
13165 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13166 (get_image_name): Use SIZE_T type for local variable `done'.
13167 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13168 (toolhelp_get_dll_name): Idem.
13169 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13170 Use uintptr_t typecast to avoid warning.
13171 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13172 (handle_exception): Use phex_nz to avoid warning.
13173 (win32_wait): Remove unused local variable `process'.
13174
131752010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13176
13177 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13178 `amd64-avx.o'.
13179
131802010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13181
13182 * configure.ac: Use `ws2_32' library for srv_mingw.
13183 * configure: Regenerate.
13184 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13185 * remote-utils.c: Likewise.
13186
131872010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13188
13189 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13190 if __x86_64__ is defined.
13191
131922010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13193
13194 * configure: Regenerate.
13195
131962010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13197
13198 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13199 * target.h (target_ops): New get_tib_address field.
13200 * win32-low.h (win32_thread_info): Add thread_local_base field.
13201 * win32-low.c (child_add_thread): Add tlb argument.
13202 Set thread_local_base field to TLB.
13203 (get_child_debug_event): Adapt to child_add_thread change.
13204 (win32_get_tib_address): New function.
13205 (win32_target_ops): Set get_tib_address field to
13206 win32_get_tib_address.
13207 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13208
132092010-04-12 Pedro Alves <pedro@codesourcery.com>
13210
13211 * linux-low.c (linux_mourn): Also remove the process.
13212 * server.c (handle_target_event): Don't remove the process here.
13213 * nto-low.c (nto_mourn): New.
13214 (nto_target_ops): Install it.
13215 * spu-low.c (spu_mourn): New.
13216 (spu_target_ops): Install it.
13217 * win32-low.c (win32_mourn): New.
13218 (win32_target_ops): Install it.
13219
132202010-04-12 Pedro Alves <pedro@codesourcery.com>
13221
13222 * server.h (buffer_xml_printf): Remove redundant `;'.
13223
132242010-04-12 Pedro Alves <pedro@codesourcery.com>
13225
13226 * regcache.c (set_register_cache): Invalidate regcaches before
13227 changing the register cache layout.
13228 (regcache_invalidate_one): Allow a NULL regcache.
13229 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13230 regcaches before changing the register cache layout or the target
13231 regsets.
13232
132332010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13234
13235 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13236 variable warning on Linux/x86-64.
13237
132382010-04-11 Pedro Alves <pedro@codesourcery.com>
13239
13240 GDBserver disconnected tracing support.
13241
13242 * linux-low.c (linux_remove_process): Delete.
13243 (add_lwp): Don't set last_resume_kind here.
13244 (linux_kill): Use `mourn'.
13245 (linux_detach): Use `thread_db_detach', and `mourn'.
13246 (linux_mourn): New.
13247 (linux_attach_lwp_1): Adjust comment.
13248 (linux_attach): last_resume_kind moved the thread_info; adjust.
13249 (status_pending_p_callback): Adjust.
13250 (linux_wait_for_event_1): Adjust.
13251 (count_events_callback, select_singlestep_lwp_callback)
13252 (select_event_lwp_callback, cancel_breakpoints_callback)
13253 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13254 (proceed_one_lwp): Adjust.
13255 (linux_async): Add debug output.
13256 (linux_thread_stopped): New.
13257 (linux_pause_all): New.
13258 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13259 linux_pause_all.
13260 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13261 (thread_db_free): Delete declaration.
13262 (thread_db_detach, thread_db_mourn): Declare.
13263 * thread-db.c (thread_db_init): Use thread_db_mourn.
13264 (thread_db_free): Delete, split in two.
13265 (disable_thread_event_reporting): New.
13266 (thread_db_detach): New.
13267 (thread_db_mourn): New.
13268
13269 * server.h (struct thread_info) <last_resume_kind>: New field.
13270 <attached>: Add comment.
13271 <gdb_detached>: New field.
13272 (handler_func): Change return type to int.
13273 (handle_serial_event, handle_target_event): Ditto.
13274 (gdb_connected): Declare.
13275 (tracing): Delete.
13276 (disconnected_tracing): Declare.
13277 (stop_tracing): Declare.
13278
13279 * server.c (handle_query) <qSupported>: Report support for
13280 disconnected tracing.
13281 (queue_stop_reply_callback): Account for running threads.
13282 (gdb_wants_thread_stopped): New.
13283 (gdb_wants_all_threads_stopped): New.
13284 (gdb_reattached_process): New.
13285 (handle_status): Clear the `gdb_detached' flag of all processes.
13286 In all-stop, stop all threads.
13287 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13288 (process_serial_event): If the remote connection breaks, or if an
13289 exit was forced with "monitor exit", force an event loop exit.
13290 Handle disconnected tracing on detach.
13291 (handle_serial_event): Adjust.
13292 (handle_target_event): If GDB isn't connected, forward events back
13293 to the inferior, unless the last process exited, in which case,
13294 exit gdbserver. Adjust interface.
13295
13296 * remote-utils.c (remote_open): Don't block in accept. Instead
13297 register an event loop source on the listen socket file
13298 descriptor. Refactor bits into ...
13299 (listen_desc): ... this new global.
13300 (gdb_connected): ... this new function.
13301 (enable_async_notification): ... this new function.
13302 (handle_accept_event): ... this new function.
13303 (remote_close): Clear remote_desc.
13304
13305 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13306
13307 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13308 New fields.
13309 (mourn_inferior): Define.
13310 (target_process_qsupported): Avoid the dangling else problem.
13311 (thread_stopped): Define.
13312 (pause_all): Define.
13313 (target_waitstatus_to_string): Declare.
13314 * target.c (target_waitstatus_to_string): New.
13315
13316 * tracepoint.c (tracing): Make extern.
13317 (disconnected_tracing): New.
13318 (stop_tracing): Make extern. Handle tracing stops due to GDB
13319 disconnecting.
13320 (cmd_qtdisconnected): New.
13321 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13322 (handle_tracepoint_general_set): Handle QTDisconnected.
13323
13324 * event-loop.c (event_handler_func): Change return type to int.
13325 (process_event): Bail out if the event handler wants the event
13326 loop to stop.
13327 (handle_file_event): Ditto.
13328 (start_event_loop): Bail out if the event handler wants the event
13329 loop to stop.
13330
13331 * nto-low.c (nto_target_ops): Adjust.
13332 * spu-low.c (spu_wait): Don't remove the process here.
13333 (spu_target_ops): Adjust.
13334 * win32-low.c (win32_wait): Don't remove the process here.
13335 (win32_target_ops): Adjust.
13336
133372010-04-11 Pedro Alves <pedro@codesourcery.com>
13338
13339 * regcache.c (realloc_register_cache): Invalidate inferior's
13340 regcache before recreating it.
13341
133422010-04-09 Pedro Alves <pedro@codesourcery.com>
13343
13344 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13345
133462010-04-09 Stan Shebs <stan@codesourcery.com>
13347 Pedro Alves <pedro@codesourcery.com>
13348
13349 * server.h (LONGEST): New.
13350 (struct thread_info) <while_stepping>: New field.
13351 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13352 Declare.
13353 (initialize_tracepoint, handle_tracepoint_general_set)
13354 (handle_tracepoint_query, tracepoint_finished_step)
13355 (tracepoint_was_hit, release_while_stepping_state_list):
13356 (current_traceframe): Declare.
13357 * server.c (handle_general_set): Handle tracepoint packets.
13358 (read_memory): New.
13359 (write_memory): New.
13360 (handle_search_memory_1): Use read_memory.
13361 (handle_query): Report support for conditional tracepoints, trace
13362 state variables, and tracepoint sources. Handle tracepoint
13363 queries.
13364 (main): Initialize the tracepoints module.
13365 (process_serial_event): Handle traceframe reads/writes.
13366
13367 * linux-low.c (handle_tracepoints): New.
13368 (linux_wait_1): Call it.
13369 (linux_resume_one_lwp): Handle while-stepping.
13370 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13371 (linux_target_ops): Install them.
13372 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13373 New field.
13374 * linux-x86-low.c (x86_supports_tracepoints): New.
13375 (the_low_target). Install it.
13376
13377 * mem-break.h (delete_breakpoint): Declare.
13378 * mem-break.c (delete_breakpoint): Make external.
13379
13380 * target.h (struct target_ops): Add `supports_tracepoints',
13381 `read_pc', and `write_pc' fields.
13382 (target_supports_tracepoints): Define.
13383 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13384 (phex_nz): New.
13385
13386 * regcache.h (struct regcache) <registers_owned>: New field.
13387 (init_register_cache, regcache_cpy): Declare.
13388 (regcache_read_pc, regcache_write_pc): Declare.
13389 (register_cache_size): Declare.
13390 (supply_regblock): Declare.
13391 * regcache.c (init_register_cache): New.
13392 (new_register_cache): Use it.
13393 (regcache_cpy): New.
13394 (register_cache_size): New.
13395 (supply_regblock): New.
13396 (regcache_read_pc, regcache_write_pc): New.
13397
13398 * tracepoint.c: New.
13399
13400 * Makefile.in (OBS): Add tracepoint.o.
13401 (tracepoint.o): New rule.
13402
134032010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13404
13405 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13406 (i386-mmx.o): New.
13407 (i386-mmx.c): Likewise.
13408 (i386-mmx-linux.o): Likewise.
13409 (i386-mmx-linux.c): Likewise.
13410
13411 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13412 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13413 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13414 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13415
13416 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13417 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13418 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13419
134202010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13421
13422 * Makefile.in (clean): Updated.
13423 (i386-avx.o): New.
13424 (i386-avx.c): Likewise.
13425 (i386-avx-linux.o): Likewise.
13426 (i386-avx-linux.c): Likewise.
13427 (amd64-avx.o): Likewise.
13428 (amd64-avx.c): Likewise.
13429 (amd64-avx-linux.o): Likewise.
13430 (amd64-avx-linux.c): Likewise.
13431
13432 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13433 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13434 (srv_amd64_regobj): Add amd64-avx.o.
13435 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13436 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13437 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13438 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13439 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13440 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13441 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13442
13443 * i387-fp.c: Include "i386-xstate.h".
13444 (i387_xsave): New.
13445 (i387_cache_to_xsave): Likewise.
13446 (i387_xsave_to_cache): Likewise.
13447 (x86_xcr0): Likewise.
13448
13449 * i387-fp.h (i387_cache_to_xsave): Likewise.
13450 (i387_xsave_to_cache): Likewise.
13451 (x86_xcr0): Likewise.
13452
13453 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13454 * linux-crisv32-low.c (target_regsets): Likewise.
13455 * linux-m68k-low.c (target_regsets): Likewise.
13456 * linux-mips-low.c (target_regsets): Likewise.
13457 * linux-ppc-low.c (target_regsets): Likewise.
13458 * linux-s390-low.c (target_regsets): Likewise.
13459 * linux-sh-low.c (target_regsets): Likewise.
13460 * linux-sparc-low.c (target_regsets): Likewise.
13461 * linux-xtensa-low.c (target_regsets): Likewise.
13462
13463 * linux-low.c: Include <sys/uio.h>.
13464 (regsets_fetch_inferior_registers): Support nt_type.
13465 (regsets_store_inferior_registers): Likewise.
13466 (linux_process_qsupported): New.
13467 (linux_target_ops): Add linux_process_qsupported.
13468
13469 * linux-low.h (regset_info): Add nt_type.
13470 (linux_target_ops): Add process_qsupported.
13471
13472 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13473 and <sys/uio.h>.
13474 (init_registers_i386_avx_linux): New.
13475 (init_registers_amd64_avx_linux): Likewise.
13476 (xmltarget_i386_linux_no_xml): Likewise.
13477 (xmltarget_amd64_linux_no_xml): Likewise.
13478 (PTRACE_GETREGSET): Likewise.
13479 (PTRACE_SETREGSET): Likewise.
13480 (x86_fill_xstateregset): Likewise.
13481 (x86_store_xstateregset): Likewise.
13482 (use_xml): Likewise.
13483 (x86_linux_update_xmltarget): Likewise.
13484 (x86_linux_process_qsupported): Likewise.
13485 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13486 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13487 init_registers_i386_linux here. Call
13488 x86_linux_update_xmltarget.
13489 (the_low_target): Add x86_linux_process_qsupported.
13490
13491 * server.c (handle_query): Call target_process_qsupported.
13492
13493 * target.h (target_ops): Add process_qsupported.
13494 (target_process_qsupported): New.
13495
134962010-04-03 Pedro Alves <pedro@codesourcery.com>
13497
13498 * inferiors.c (add_thread): Set last_status kind to
13499 TARGET_WAITKIND_IGNORE.
13500 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13501 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13502 (linux_wait_1): Move `thread' local definition to block that uses
13503 it. Don't NULL initialize `event_child'.
13504 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13505 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13506 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13507
135082010-04-01 Pedro Alves <pedro@codesourcery.com>
13509
13510 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13511 an extended waitstatus, or by a watchpoint.
13512 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13513 thread was stepping or has been stopped by a watchpoint.
13514
135152010-04-01 Pedro Alves <pedro@codesourcery.com>
13516
13517 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13518 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13519 of another, then delete the previous, and validate all
13520 breakpoints.
13521 (validate_inserted_breakpoint): New.
13522 (delete_disabled_breakpoints): New.
13523 (validate_breakpoints): New.
13524 (check_mem_read): Validate breakpoints before trusting their
13525 shadow. Delete disabled breakpoints.
13526 (check_mem_write): Validate breakpoints before trusting they
13527 should be inserted. Delete disabled breakpoints.
13528 * mem-break.h (validate_breakpoints):
13529 * server.c (handle_query): Validate breakpoints when we see a
13530 qSymbol query.
13531
135322010-04-01 Pedro Alves <pedro@codesourcery.com>
13533
13534 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13535 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13536 if we could tell there's a GDB breakpoint at stop_pc.
13537 (need_step_over_p): Don't do a step over if we find a GDB
13538 breakpoint at the resume PC.
13539
13540 * mem-break.c (struct raw_breakpoint): New.
13541 (enum bkpt_type): New type `gdb_breakpoint'.
13542 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13543 fields. New field `raw'.
13544 (find_raw_breakpoint_at): New.
13545 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13546 breakpoint instead.
13547 (set_breakpoint_at): Adjust.
13548 (delete_raw_breakpoint): New.
13549 (release_breakpoint): New.
13550 (delete_breakpoint): Rename to...
13551 (delete_breakpoint_1): ... this. Add proc parameter. Use
13552 release_breakpoint. Return ENOENT.
13553 (delete_breakpoint): Reimplement.
13554 (find_breakpoint_at): Delete.
13555 (find_gdb_breakpoint_at): New.
13556 (delete_breakpoint_at): Delete.
13557 (set_gdb_breakpoint_at): New.
13558 (delete_gdb_breakpoint_at): New.
13559 (gdb_breakpoint_here): New.
13560 (set_reinsert_breakpoint): Use release_breakpoint.
13561 (uninsert_breakpoint): Rename to ...
13562 (uninsert_raw_breakpoint): ... this.
13563 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13564 (reinsert_raw_breakpoint): Change parameter type to
13565 raw_breakpoint.
13566 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13567 instead.
13568 (check_breakpoints): Adjust. Use release_breakpoint.
13569 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13570 (breakpoint_inserted_here): Ditto.
13571 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13572 Don't trust the breakpoint's shadow if it is not inserted.
13573 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13574 (delete_all_breakpoints): Adjust.
13575 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13576 use delete_breakpoint_1.
13577
13578 * mem-break.h (breakpoints_supported): Delete declaration.
13579 (set_gdb_breakpoint_at): Declare.
13580 (gdb_breakpoint_here): Declare.
13581 (delete_breakpoint_at): Delete.
13582 (delete_gdb_breakpoint_at): Declare.
13583
13584 * server.h (struct raw_breakpoint): Forward declare.
13585 (struct process_info): New field `raw_breakpoints'.
13586
13587 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13588 breakpoints.
13589
135902010-03-24 Pedro Alves <pedro@codesourcery.com>
13591
13592 * linux-low.c (status_pending_p_callback): Fix comment.
13593 (linux_wait_for_event_1): Move most of the internal breakpoint
13594 handling from here...
13595 (linux_wait_1): ... to here.
13596 (count_events_callback): New.
13597 (select_singlestep_lwp_callback): New.
13598 (select_event_lwp_callback): New.
13599 (cancel_breakpoints_callback): New.
13600 (select_event_lwp): New.
13601 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13602 priority to all LWPs that have had events that should be reported
13603 to the client. Cancel breakpoints when about to reporting the
13604 event to the client, not while stopping lwps. No longer cancel
13605 finished single-steps here.
13606 (cancel_finished_single_step): Delete.
13607 (cancel_finished_single_steps): Delete.
13608
136092010-03-24 Pedro Alves <pedro@codesourcery.com>
13610
13611 * mem-break.c (enum bkpt_type): New.
13612 (struct breakpoint): New field `type'.
13613 (set_breakpoint_at): Change return type to struct breakpoint
13614 pointer. Set type to `other_breakpoint' by default.
13615 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13616 in the breakpoint list.
13617 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13618 (reinsert_breakpoint): Rename to ...
13619 (reinsert_raw_breakpoint): ... this.
13620 (reinsert_breakpoints_at): Adjust.
13621 * mem-break.h (struct breakpoint): Declare.
13622 (set_breakpoint_at): Change return type to struct breakpoint
13623 pointer.
13624
136252010-03-24 Pedro Alves <pedro@codesourcery.com>
13626
13627 * server.c (handle_query): Assign, not compare.
13628
136292010-03-24 Pedro Alves <pedro@codesourcery.com>
13630
13631 Teach linux gdbserver to step-over-breakpoints.
13632
13633 * linux-low.c (can_hardware_single_step): New.
13634 (supports_breakpoints): New.
13635 (handle_extended_wait): If stopping threads, read the stop pc of
13636 the new cloned LWP.
13637 (get_pc): New.
13638 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13639 low target doesn't support retrieving the PC.
13640 (add_lwp): Set last_resume_kind to resume_continue.
13641 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13642 (linux_attach): Don't clear stop_expected. Set the lwp's
13643 last_resume_kind to resume_stop.
13644 (linux_detach_one_lwp): Don't check for removed breakpoints.
13645 (check_removed_breakpoint): Delete.
13646 (status_pending_p): Rename to ...
13647 (status_pending_p_callback): ... this. Don't check for removed
13648 breakpoints. Don't consider threads that are stopped from GDB's
13649 perspective.
13650 (linux_wait_for_lwp): Always read the stop_pc here.
13651 (cancel_breakpoint): New.
13652 (step_over_bkpt): New global.
13653 (linux_wait_for_event_1): Implement stepping over breakpoints.
13654 (gdb_wants_lwp_stopped): New.
13655 (gdb_wants_all_stopped): New.
13656 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13657 single-step traps here. Store the thread's last reported target
13658 wait status.
13659 (send_sigstop): Don't clear stop_expected. Always set it,
13660 instead.
13661 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13662 (cancel_finished_single_step): New.
13663 (cancel_finished_single_steps): New.
13664 (wait_for_sigstop): Don't cancel finished single-step traps here.
13665 (linux_resume_one_lwp): Don't check for removed breakpoints.
13666 Don't set `step' on non-hardware step archs.
13667 (linux_set_resume_request): Ignore resume_stop requests if already
13668 stopping or stopped. Set the lwp's last_resume_kind.
13669 (resume_status_pending_p): Don't check for removed breakpoints.
13670 (need_step_over_p): New.
13671 (start_step_over): New.
13672 (finish_step_over): New.
13673 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13674 requests. Clear the thread's last reported target waitstatus.
13675 Don't use the `suspended' flag. Don't consider pending breakpoints.
13676 (linux_resume): Start a step-over if necessary.
13677 (proceed_one_lwp): New.
13678 (proceed_all_lwps): New.
13679 (unstop_all_lwps): New.
13680 * linux-low.h (struct lwp_info): Rewrite comment for the
13681 `suspended' flag. Add the `stop_pc' field. Delete the
13682 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13683 Add `'last_resume_kind' and `need_step_over' fields.
13684 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13685 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13686 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13687 (set_raw_breakpoint_at): New.
13688 (set_breakpoint_at): Rewrite to use it.
13689 (reinsert_breakpoint_handler): Delete.
13690 (set_reinsert_breakpoint): New.
13691 (reinsert_breakpoint_by_bp): Delete.
13692 (delete_reinsert_breakpoints): New.
13693 (uninsert_breakpoint): Rewrite.
13694 (uninsert_breakpoints_at): New.
13695 (reinsert_breakpoint): Rewrite.
13696 (reinsert_breakpoints_at): New.
13697 (check_breakpoints): Rewrite.
13698 (breakpoint_here): New.
13699 (breakpoint_inserted_here): New.
13700 (check_mem_read): Adjust.
13701 * mem-break.h (breakpoints_supported, breakpoint_here)
13702 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13703 (reinsert_breakpoint_by_bp): Delete declaration.
13704 (delete_reinsert_breakpoints): Declare.
13705 (reinsert_breakpoint): Delete declaration.
13706 (reinsert_breakpoints_at): Declare.
13707 (uninsert_breakpoint): Delete declaration.
13708 (uninsert_breakpoints_at): Declare.
13709 (check_breakpoints): Adjust prototype.
13710 * server.h: Adjust include order.
13711 (struct thread_info): Declare here. Add a `last_status' field.
13712
137132010-03-23 Michael Snyder <msnyder@vmware.com>
13714
13715 * server.c (crc32): New function.
13716 (handle_query): Add handling for 'qCRC:' request.
13717
137182010-03-23 Pedro Alves <pedro@codesourcery.com>
13719
13720 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13721 lwp had been stopped by a watchpoint.
13722
137232010-03-16 Pedro Alves <pedro@codesourcery.com>
13724
13725 * server.h (internal_error): Declare.
13726 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13727 * utils.c (internal_error): New function.
13728
137292010-03-15 Andreas Schwab <schwab@redhat.com>
13730
13731 * configure.srv: Fix typo setting srv_regobj.
13732
137332010-03-15 Pedro Alves <pedro@codesourcery.com>
13734
13735 * linux-low.c (fetch_register): Avoid passing a non string literal
13736 format to `error'.
13737 (usr_store_inferior_registers): Ditto.
13738
137392010-03-14 Pedro Alves <pedro@codesourcery.com>
13740
13741 * linux-low.c (linux_write_memory): Bail out early if peeking
13742 memory failed.
13743
137442010-03-14 Pedro Alves <pedro@codesourcery.com>
13745
13746 * linux-low.h (struct lwp_info): New fields
13747 `stopped_by_watchpoint' and `stopped_data_address'.
13748 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13749 here, and cache them in the lwp object.
13750 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13751 directly.
13752 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13753 field.
13754 (linux_stopped_by_watchpoint): Rewrite.
13755 (linux_stopped_data_address): Rewrite.
13756
137572010-03-06 Simo Melenius <simo.melenius@iki.fi>
13758
13759 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13760 switching the current inferior, not before.
13761
137622010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13763
13764 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13765 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13766 i386-linux.c and amd64-linux.c.
13767 (reg-i386.o): Removed.
13768 (reg-i386.c): Likewise.
13769 (reg-i386-linux.o): Likewise.
13770 (reg-i386-linux.c): Likewise.
13771 (reg-x86-64.o): Likewise.
13772 (reg-x86-64.c): Likewise.
13773 (reg-x86-64-linux.o): Likewise.
13774 (reg-x86-64-linux.c): Likewise.
13775 (i386.o): New.
13776 (i386.c): Likewise.
13777 (i386-linux.o): Likewise.
13778 (i386-linux.c): Likewise.
13779 (amd64.o): Likewise.
13780 (amd64.c): Likewise.
13781 (amd64-linux.o): Likewise.
13782 (amd64-linux.c): Likewise.
13783
13784 * configure.srv (srv_i386_regobj): New.
13785 (srv_i386_linux_regobj): Likewise.
13786 (srv_amd64_regobj): Likewise.
13787 (srv_amd64_linux_regobj): Likewise.
13788 (srv_i386_32bit_xmlfiles): Likewise.
13789 (srv_i386_64bit_xmlfiles): Likewise.
13790 (srv_i386_xmlfiles): Likewise.
13791 (srv_amd64_xmlfiles): Likewise.
13792 (srv_i386_linux_xmlfiles): Likewise.
13793 (srv_amd64_linux_xmlfiles): Likewise.
13794 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13795 srv_xmlfiles to $srv_i386_xmlfiles.
13796 (i[34567]86-*-mingw32ce*): Likewise.
13797 (i[34567]86-*-mingw*): Likewise.
13798 (i[34567]86-*-nto*): Likewise.
13799 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13800 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13801 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13802 (x86_64-*-linux*): Likewise.
13803
13804 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13805 (init_registers_amd64_linux): New.
13806 (x86_arch_setup): Replace init_registers_x86_64_linux with
13807 init_registers_amd64_linux.
13808
138092010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13810
13811 * configure.ac: Check for libdl. If it is not available link against
13812 static libthread_db.
13813 * configure: Regenerate.
13814
138152010-02-22 Pedro Alves <pedro@codesourcery.com>
13816
13817 PR9605
13818
13819 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13820 handing a read watchpoint.
13821 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13822
138232010-02-12 Doug Evans <dje@google.com>
13824
13825 * linux-low.c (linux_supports_tracefork_flag): Document.
13826 (linux_look_up_symbols): Add comment.
13827
138282010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13829
13830 * regcache.c (supply_register): Clear regcache if buf is NULL.
13831
138322010-02-02 Nicolas Roche <roche@sourceware.org>
13833 Joel Brobecker <brobecker@adacore.com>
13834
13835 * inferiors.c (find_inferior): Add function documentation.
13836 (unloaded_dll): Handle the case where the unloaded dll has not
13837 been previously registered in the dll list.
13838
138392010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13840
13841 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13842 (thumb2_breakpoint): New.
13843 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13844
138452010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13846
13847 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13848 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13849 breakpoints.
13850
138512010-01-21 Pedro Alves <pedro@codesourcery.com>
13852
13853 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13854
138552010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13856
13857 * linux-s390-low.c (s390_collect_ptrace_register)
13858 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13859
138602010-01-21 Doug Evans <dje@google.com>
13861
13862 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13863 (PTRACE_ARG4_TYPE): New macro.
13864 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13865 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13866 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13867 (usr_store_inferior_registers): Ditto.
13868 (linux_read_memory, linux_write_memory): Ditto.
13869 (linux_test_for_tracefork): Ditto.
13870
13871 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13872 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13873
138742010-01-21 Pedro Alves <pedro@codesourcery.com>
13875
13876 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13877 target.
13878
138792010-01-21 Pedro Alves <pedro@codesourcery.com>
13880
13881 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13882 prototype to take a regcache. Adjust.
13883
138842010-01-20 Pedro Alves <pedro@codesourcery.com>
13885
13886 * regcache.h (struct thread_info): Forward declare.
13887 (struct regcache): New.
13888 (new_register_cache): Adjust prototype.
13889 (get_thread_regcache): Declare.
13890 (free_register_cache): Adjust prototype.
13891 (registers_to_string, registers_from_string): Ditto.
13892 (supply_register, supply_register_by_name, collect_register)
13893 (collect_register_as_string, collect_register_by_name): Ditto.
13894 * regcache.c (struct inferior_regcache_data): Delete.
13895 (get_regcache): Rename to ...
13896 (get_thread_regcache): ... this. Adjust. Switch inferior before
13897 fetching registers.
13898 (regcache_invalidate_one): Adjust.
13899 (regcache_invalidate): Fix prototype.
13900 (new_register_cache): Return the new register cache.
13901 (free_register_cache): Change prototype.
13902 (realloc_register_cache): Adjust.
13903 (registers_to_string): Change prototype to take a regcache. Adjust.
13904 (registers_from_string): Ditto.
13905 (register_data): Ditto.
13906 (supply_register): Ditto.
13907 (supply_register_by_name): Ditto.
13908 (collect_register): Ditto.
13909 (collect_register_as_string): Ditto.
13910 (collect_register_by_name): Ditto.
13911 * server.c (process_serial_event): Adjust.
13912 * linux-low.h (regset_fill_func, regset_store_func): Change
13913 prototype.
13914 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13915 Change prototype.
13916 * linux-low.c (get_stop_pc): Adjust.
13917 (check_removed_breakpoint): Adjust.
13918 (linux_wait_for_event): Adjust.
13919 (linux_resume_one_lwp): Adjust.
13920 (fetch_register): Add regcache parameter. Adjust.
13921 (usr_store_inferior_registers): Ditto.
13922 (regsets_fetch_inferior_registers): Ditto.
13923 (regsets_store_inferior_registers): Ditto.
13924 (linux_fetch_registers, linux_store_registers): Ditto.
13925 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13926 regcache. Adjust.
13927 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13928 Ditto.
13929 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13930 prototype to take a regcache.
13931 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13932 * remote-utils.c (convert_ascii_to_int, outreg)
13933 (prepare_resume_reply): Change prototype to take a regcache.
13934 Adjust.
13935 * target.h (struct target_ops) <fetch_registers, store_registers>:
13936 Change prototype to take a regcache.
13937 (fetch_inferior_registers, store_inferior_registers): Change
13938 prototype to take a regcache. Adjust.
13939 * proc-service.c (ps_lgetregs): Adjust.
13940 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13941 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13942 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13943 take a regcache. Adjust.
13944 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13945 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13946 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13947 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13948 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13949 (cris_cannot_fetch_register):
13950 (cris_breakpoint_at): Change prototype to take a regcache.
13951 Adjust.
13952 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13953 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13954 to take a regcache. Adjust.
13955 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13956 Adjust.
13957 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13958 take a regcache. Adjust.
13959 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13960 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13961 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13962 * linux-mips-low.c (mips_get_pc):
13963 (mips_set_pc): Change prototype to take a regcache. Adjust.
13964 (mips_reinsert_addr): Adjust.
13965 (mips_collect_register): Change prototype to take a regcache.
13966 Adjust.
13967 (mips_supply_register):
13968 (mips_collect_register_32bit, mips_supply_register_32bit)
13969 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13970 (mips_store_fpregset): Ditto.
13971 * linux-ppc-low.c (ppc_supply_ptrace_register)
13972 (ppc_supply_ptrace_register): Ditto.
13973 (parse_spufs_run): Adjust.
13974 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13975 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13976 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13977 take a regcache. Adjust.
13978 * linux-s390-low.c (s390_collect_ptrace_register)
13979 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13980 (s390_set_pc): Change prototype to take a regcache. Adjust.
13981 (s390_arch_setup): Adjust.
13982 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13983 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13984 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13985 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13986 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13987 regcache. Adjust.
13988 (sparc_breakpoint_at): Adjust.
13989 * linux-xtensa-low.c (xtensa_fill_gregset):
13990 (xtensa_store_gregset):
13991 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13992 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13993 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13994 prototype to take a regcache. Adjust.
13995 * win32-arm-low.c (arm_fetch_inferior_register)
13996 (arm_store_inferior_register): Change prototype to take a
13997 regcache. Adjust.
13998 * win32-i386-low.c (i386_fetch_inferior_register)
13999 (i386_store_inferior_register): Change prototype to take a
14000 regcache. Adjust.
14001 * win32-low.c (child_fetch_inferior_registers)
14002 (child_store_inferior_registers): Change prototype to take a
14003 regcache. Adjust.
14004 (win32_wait): Adjust.
14005 (win32_fetch_inferior_registers): Change prototype to take a
14006 regcache. Adjust.
14007 (win32_store_inferior_registers): Adjust.
14008 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14009 store_inferior_register>: Change prototype to take a regcache.
14010
140112010-01-20 Doug Evans <dje@google.com>
14012
14013 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14014 #ifdef.
14015 (linux_wait_for_event1, linux_init_signals): Ditto.
14016 (W_STOPCODE): Provide definition if missing.
14017
140182010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14019
14020 * linux-low.c (linux_core_of_thread): New.
14021 (compare_ints, show_process, list_threads): New.
14022 (linux_qxfer_osdata): Report threads and cores.
14023 (linux_target_op): Register linux_core_of_thread.
14024 * remote-utils.c (prepare_resume_reply): Report the core.
14025 (buffer_xml_printf): Support %d specifier.
14026 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14027 New.
14028 (handle_query): Handle qXfer:threads. Announce availability
14029 thereof.
14030 * target.h (struct target_ops): New field core_of_thread.
14031
140322010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14033
14034 * Makefile.in (clean): Remove new generated files.
14035 (reg-s390.o, reg-s390.c): Remove rules.
14036 (reg-s390x.o, reg-s390x.c): Likewise.
14037 (s390-linux32.o, s390-linux32.c): Add rules.
14038 (s390-linux64.o, s390-linux64.c): Likewise.
14039 (s390x-linux64.o, s390x-linux64.c): Likewise.
14040 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14041 * linux-s390-low.c: Include <elf.h>.
14042 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14043 (init_registers_s390): Remove prototype.
14044 (init_registers_s390x): Likewise.
14045 (init_registers_s390_linux32): Add prototype.
14046 (init_registers_s390_linux64): Likewise.
14047 (init_registers_s390x_linux64): Likewise.
14048 (s390_num_regs_3264): New define.
14049 (s390_regmap_3264): New global variable.
14050 (s390_cannot_fetch_register): Remove obsolete check.
14051 (s390_cannot_store_register): Likewise.
14052 (s390_collect_ptrace_register): Handle upper/lower register halves.
14053 (s390_supply_ptrace_register): Likewise.
14054 (s390_fill_gregset): Update to register number changes.
14055 (s390_get_hwcap): New routine.
14056 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14057 Install appropriate regmap and register set.
14058
140592010-01-01 Joel Brobecker <brobecker@adacore.com>
14060
14061 * server.c (gdbserver_version): Update copyright year to 2010.
14062 * gdbreplay.c (gdbreplay_version): Likewise.
14063
140642009-12-28 Doug Evans <dje@google.com>
14065
14066 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14067 elf/external.h. Include <elf.h> instead but only if necessary.
14068
140692009-12-28 Pedro Alves <pedro@codesourcery.com>
14070
14071 * linux-low.c (linux_remove_process): Remove `detaching'
14072 parameter. Don't release/detach from thread_db here.
14073 (linux_kill): Release/detach from thread_db here, ...
14074 (linux_detach): ... and here, before actually detaching.
14075 (linux_wait_1): ... and here, when a process exits.
14076 * thread-db.c (any_thread_of): New.
14077 (thread_db_free): Switch the current inferior to a thread of the
14078 passed in process.
14079
140802009-12-21 Doug Evans <dje@google.com>
14081
14082 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14083
14084 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14085 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14086 warning ifndef __NR_tkill. Move setting of errno there too.
14087 Delete unnecessary resetting of errno after syscall.
14088 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14089
14090 * configure.ac: Check for dladdr.
14091 * config.in: Regenerate.
14092 * configure: Regenerate.
14093 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14094 (try_thread_db_load): Update.
14095
14096 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14097
140982009-12-18 Doug Evans <dje@google.com>
14099
14100 * event-loop.c: Include unistd.h if it exists.
14101
14102 * linux-low.c (my_waitpid): Move definition away from being in
14103 between linux_tracefork_child/linux_test_for_tracefork.
14104
14105 * gdb_proc_service.h (psaddr_t): Fix type.
14106 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14107 signature to match glibc.
14108
141092009-12-16 Doug Evans <dje@google.com>
14110
14111 * linux-low.c (linux_read_memory): Fix argument to read.
14112
141132009-11-26 Pedro Alves <pedro@codesourcery.com>
14114
14115 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14116 events, don't leave current_inferior pointing at null.
14117
141182009-11-26 Pedro Alves <pedro@codesourcery.com>
14119
14120 * win32-low.c (LOG): Delete.
14121 (OUTMSG): Output to stderr.
14122 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14123 on compile time LOG macro.
14124 (win32_wait): Fix debug output.
14125
141262009-11-26 Pedro Alves <pedro@codesourcery.com>
14127
14128 * win32-low.c (win32_add_one_solib): If the dll name is
14129 "ntdll.dll", prepend the system directory to the dll path.
14130
141312009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14132
14133 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14134
141352009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14136 Vladimir Prus <vladimir@codesourcery.com>
14137
14138 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14139 * configure.ac: Check for __mcoldfire__ and set
14140 gdb_cv_m68k_is_coldfire.
14141 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14142 reg-cf.o and reg-m68k.o.
14143 * configure: Regenerated.
14144
141452009-11-16 Pedro Alves <pedro@codesourcery.com>
14146
14147 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14148 Pass it to thread_db_free.
14149 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14150 proper `detaching' argument to linux_remove_process.
14151 * linux-low.h (thread_db_free): Add `detaching' parameter.
14152 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14153 to thread_db_free.
14154 (thread_db_free): Add `detaching' parameter. Only
14155 call td_ta_clear_event if detaching from process.
14156
141572009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14158
14159 * thread-db.c (thread_db_free): Fix typo.
14160
141612009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14162
14163 PR gdb/10838
14164 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14165
141662009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14167
14168 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14169 with an i686 compiler.
14170 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14171 needed.
14172 * configure: Rebuilt.
14173
141742009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14175
14176 PR gdb/10783
14177
14178 * server.c (handle_search_memory_1): Correct read_addr initialization
14179 in loop for searching subsequent chunks.
14180
141812009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14182
14183 * configure.ac: New --with-libthread-db option.
14184 * thread-db.c: Allow direct dependence on libthread_db.
14185 (thread_db_free): Adjust.
14186 * config.in: Regenerate.
14187 * configure: Likewise.
14188
141892009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14190
14191 PR gdb/10757
14192 * thread-db.c (attach_thread): New function.
14193 (maybe_attach_thread): Return success/failure.
14194 (find_new_threads_callback): Adjust.
14195 (thread_db_find_new_threads): Loop until no new threads.
14196
141972009-10-13 Pedro Alves <pedro@codesourcery.com>
14198
14199 * proc-service.c (ps_lgetregs): Formatting.
14200
142012009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14202
14203 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14204 * configure.ac: Adjust.
14205 * linux-low.h (struct process_info_private): Move members to struct
14206 thread_db.
14207 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14208 * linux-low.c (linux_remove_process): Adjust.
14209 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14210 * server.c (handle_query): Move code ...
14211 (handle_monitor_command): ... here. New function.
14212 * target.h (struct target_ops): New member.
14213 * thread-db.c (struct thread_db): New.
14214 (libthread_db_search_path): New variable.
14215 (thread_db_create_event, thread_db_enable_reporting)
14216 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14217 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14218 (try_thread_db_load_1, dladdr_to_soname): New functions.
14219 (try_thread_db_load, thread_db_load_search): New functions.
14220 (thread_db_init): Search for libthread_db.
14221 (thread_db_free): New function.
14222 (thread_db_handle_monitor_command): Likewise.
14223 * config.in: Regenerate.
14224 * configure: Regenerate.
14225
142262009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14227
14228 * spu-low.c (spu_kill): Wait for inferior to terminate.
14229 Call clear_inferiors.
14230 (spu_detach): Call clear_inferiors.
14231
142322009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14233
14234 * aclocal.m4: Regenerate.
14235 * config.in: Likewise.
14236 * configure: Likewise.
14237
142382009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14239
14240 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14241 (parse_spufs_run): New function.
14242 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14243 (ppc_breakpoint_at): Handle SPU breakpoints.
14244
142452009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14246
14247 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14248 (SPUFS_MAGIC): Define.
14249 (spu_enumerate_spu_ids): New function.
14250 (linux_qxfer_spu): New function.
14251 (linux_target_ops): Install linux_qxfer_spu.
14252
142532009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14254
14255 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14256 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14257 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14258 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14259 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14260 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14261 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14262 (init_registers_powerpc_cell32l): Add prototype.
14263 (init_registers_powerpc_cell64l): Likewise.
14264 (ppc_arch_setup): Detect Cell/B.E. architecture.
14265
142662009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14267
14268 * Makefile.in (datarootdir): New variable.
14269
142702009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14271
14272 * linux-low.c (linux_write_memory): Update debugging output.
14273 * Makefile.in (clean): Add new descriptions.
14274 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14275 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14276 * configure.srv: Add new files for arm*-*-linux*.
14277 * linux-arm-low.c: Add new declarations.
14278 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14279 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14280 (HWCAP_VFPv3D16): New.
14281 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14282 instead of __IWMMXT__.
14283 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14284 (arm_arch_setup): New.
14285 (target_regsets): Remove #ifdef. Add VFP regset.
14286 (the_low_target): Use arm_arch_setup.
14287
142882009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14289
14290 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14291 the main thread again.
14292
142932009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14294
14295 Adding Neutrino gdbserver.
14296 * configure: Regenerated.
14297 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14298 * configure.srv (i[34567]86-*-nto*): New target.
14299 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14300 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14301 (nto_comctrl) [__QNX__]: New function.
14302 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14303
143042009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14305
14306 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14307 srv_tgtobj.
14308
143092009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14310 Pedro Alves <pedro@codesourcery.com>
14311
14312 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14313 don't support CONTEXT_EXTENDED_REGISTERS.
14314 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14315 (the_low_target): Install them.
14316 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14317 failing with ERROR_PIPE_NOT_CONNECTED.
14318
143192009-06-30 Doug Evans <dje@google.com>
14320 Pierre Muller <muller@ics.u-strasbg.fr>
14321
14322 Add h/w watchpoint support to x86-linux, win32-i386.
14323 * Makefile.in (SFILES): Add i386-low.c
14324 (i386_low_h): Define.
14325 (i386-low.o): Add dependencies.
14326 (linux-x86-low.o): Add i386-low.h dependency.
14327 (win32-i386-low.o): Ditto.
14328 * i386-low.c: New file.
14329 * i386-low.h: New file.
14330 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14331 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14332 * linux-low.c (linux_add_process): Initialize arch_private.
14333 (linux_remove_process): Free arch_private.
14334 (add_lwp): Initialize arch_private.
14335 (delete_lwp): Free arch_private.
14336 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14337 provided.
14338 * linux-low.h (process_info_private): New member arch_private.
14339 (lwp_info): New member arch_private.
14340 (linux_target_ops): New members new_process, new_thread,
14341 prepare_to_resume.
14342 (ptid_of): New macro.
14343 * linux-x86-low.c: Include stddef.h, i386-low.h.
14344 (arch_process_info): New struct.
14345 (arch_lwp_info): New struct.
14346 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14347 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14348 (i386_dr_low_get_status): New function.
14349 (x86_insert_point, x86_remove_point): New functions.
14350 (x86_stopped_by_watchpoint): New function.
14351 (x86_stopped_data_address): New function.
14352 (x86_linux_new_process, x86_linux_new_thread): New functions.
14353 (x86_linux_prepare_to_resume): New function.
14354 (the_low_target): Add entries for insert_point, remove_point,
14355 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14356 prepare_to_resume.
14357 * server.c (debug_hw_points): New global.
14358 (monitor_show_help): Document set debug-hw-points.
14359 (handle_query): Process "set debug-hw-points".
14360 * server.h (debug_hw_points): Declare.
14361 (paddress): Declare.
14362 * utils.c (NUMCELLS, CELLSIZE): New macros.
14363 (get_sell, xsnprintf, paddress): New functions.
14364 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14365 remove_point, stopped_by_watchpoint, stopped_data_address.
14366 * win32-i386-low.c: Include i386-low.h.
14367 (debug_reg_state): Replaces dr.
14368 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14369 (i386_dr_low_get_status): New function.
14370 (i386_insert_point, i386_remove_point): New functions.
14371 (i386_stopped_by_watchpoint): New function.
14372 (i386_stopped_data_address): New function.
14373 (i386_initial_stuff): Update.
14374 (get_thread_context,set_thread_context,i386_thread_added): Update.
14375 (the_low_target): Add entries for insert_point,
14376 remove_point, stopped_by_watchpoint, stopped_data_address.
14377 * win32-low.c (win32_insert_watchpoint): New function.
14378 (win32_remove_watchpoint): New function.
14379 (win32_stopped_by_watchpoint): New function.
14380 (win32_stopped_data_address): New function.
14381 (win32_target_ops): Add entries for insert_watchpoint,
14382 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14383 * win32-low.h (win32_target_ops): New members insert_point,
14384 remove_point, stopped_by_watchpoint, stopped_data_address.
14385
143862009-06-25 Pedro Alves <pedro@codesourcery.com>
14387
14388 * server.c (process_serial_event): Re-return unsupported, not
14389 error, if the type isn't recognized. Re-allow supporting only
14390 insert or remove packets. Also call require_running for
14391 breakpoints. Add missing break statement to default case. Tidy.
14392 * target.h (struct target_ops): Rename insert_watchpoint to
14393 insert_point, and remove_watchpoint to remove_point.
14394
14395 * linux-low.h (struct linux_target_ops): Likewise.
14396 * linux-low.c (linux_insert_watchpoint): Rename to ...
14397 (linux_insert_point): ... this. Adjust.
14398 (linux_remove_watchpoint): Rename to ...
14399 (linux_remove_point): ... this. Adjust.
14400 (linux_target_ops): Adjust.
14401 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14402 (cris_insert_point): ... this.
14403 (cris_remove_watchpoint): Rename to ...
14404 (cris_remove_point): ... this.
14405 (the_low_target): Adjust.
14406
144072009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14408
14409 * server.c (handle_v_kill): Pass signal_pid to
14410 kill_inferior if multi_process is zero.
14411
144122009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14413
14414 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14415 * target.h (target_ops): Comment for *_watchpoint to make it clear
14416 the functions can get types '0' and '1'.
14417
144182009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14419
14420 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14421 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14422 * regcache.c (get_regcache): Likewise.
14423 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14424 * win32-low.c (child_fetch_inferior_registers): Remove check for
14425 regno 0.
14426
144272009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14428 Pedro Alves <pedro@codesourcery.com>
14429
14430 * target.h (struct target_ops) <supports_multi_process>: New
14431 callback.
14432 (target_supports_multi_process): New.
14433 * server.c (handle_query): Even if GDB reports support, only
14434 enable multi-process if the target also supports it. Report
14435 multi-process support only if the target backend supports it.
14436 * linux-low.c (linux_supports_multi_process): New function.
14437 (linux_target_ops): Install it as target_supports_multi_process
14438 callback.
14439
144402009-05-24 Doug Evans <dje@google.com>
14441
14442 Global renaming of find_thread_pid to find_thread_ptid.
14443 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14444 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14445 All callers updated.
14446
14447 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14448 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14449 directly.
14450
14451 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14452 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14453 (linux_resume_one_lwp): Ditto.
14454
144552009-05-23 Doug Evans <dje@google.com>
14456
14457 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14458 from struct inferior_list_entry * to struct lwp_info *.
14459 All callers updated.
14460
144612009-05-13 Doug Evans <dje@google.com>
14462
14463 * linux-x86-low.c: Don't include assert.h.
14464 (x86_siginfo_fixup): Use fatal, not assert.
14465 (x86_arch_setup): Fix comment.
14466
144672009-05-12 Doug Evans <dje@google.com>
14468
14469 Biarch support for i386/amd64 gdbserver.
14470 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14471 Add linux-x86-low.c.
14472 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14473 (linux-x86-low.o): Add.
14474 * linux-x86-64-low.c: Delete.
14475 * linux-i386-low.c: Delete.
14476 * linux-x86-low.c: New file.
14477 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14478 linux-x86-low.o.
14479 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14480 linux-x86-low.o.
14481 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14482 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14483 (linux_child_pid_to_exec_file): New function.
14484 (elf_64_header_p, elf_64_file_p): New functions.
14485 (siginfo_fixup): New function.
14486 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14487 give target a chance to convert layout.
14488 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14489 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14490
144912009-05-07 Doug Evans <dje@google.com>
14492
14493 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14494 (regsets_store_inferior_registers): Ditto.
14495
144962009-05-06 Pedro Alves <pedro@codesourcery.com>
14497
14498 PR server/10048
14499
14500 * linux-low.c (must_set_ptrace_flags): Delete.
14501 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14502 of the global.
14503 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14504 `lwp->must_set_ptrace_flags' instead.
14505 (linux_wait_for_event_1): Set ptrace options here.
14506 (linux_wait_1): ... not here.
14507
145082009-04-30 Doug Evans <dje@google.com>
14509
14510 * inferiors.c (started_inferior_callback): New function.
14511 (attached_inferior_callback): New function.
14512 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14513 * server.c (print_started_pid, print_attached_pid): New functions.
14514 (detach_or_kill_for_exit): New function.
14515 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14516 * server.h (have_started_inferiors_p): Declare.
14517 (have_attached_inferiors_p): Declare.
14518
14519 * inferiors.c (remove_process): Fix memory leak, free process.
14520 * linux-low.c (linux_remove_process): New function.
14521 (linux_kill): Call it instead of remove_process.
14522 (linux_detach, linux_wait_1): Ditto.
14523
145242009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14525
14526 * configure.srv: Add x86 Windows CE target.
14527
145282009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14529
14530 * inferiors.c (get_thread_process): Make global.
14531 * server.h (get_thread_process): Add prototype.
14532 * thread-db.c (find_one_thread): Use get_thread_process
14533 instead of current_process.
14534 (thread_db_get_tls_address): Do not crash if called when
14535 thread layer is not yet initialized.
14536
145372009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14538
14539 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14540 * spu-low.c (current_tid): Rename to ...
14541 (current_ptid): ... this.
14542 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14543 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14544 ptid_get_lwp (current_ptid) instead of current_tid.
14545 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14546 instead of current_tid. Use find_process_pid to verify pid
14547 argument is valid. Pass proper argument to remove_process.
14548 (spu_thread_alive): Compare current_ptid instead of current_tid.
14549 (spu_resume): Likewise.
14550
145512009-04-02 Pedro Alves <pedro@codesourcery.com>
14552
14553 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14554 variable.
14555
145562009-04-01 Pedro Alves <pedro@codesourcery.com>
14557
14558 Implement the multiprocess extensions, and add linux multiprocess
14559 support.
14560
14561 * server.h (ULONGEST): Declare.
14562 (struct ptid, ptid_t): New.
14563 (minus_one_ptid, null_ptid): Declare.
14564 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14565 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14566 (struct inferior_list_entry): Change `id' type from unsigned from
14567 to ptid_t.
14568 (struct sym_cache, struct breakpoint, struct
14569 process_info_private): Forward declare.
14570 (struct process_info): Declare.
14571 (current_process): Declare.
14572 (all_processes): Declare.
14573 (initialize_inferiors): Declare.
14574 (add_thread): Adjust to use ptid_t.
14575 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14576 (add_process, remove_process, find_thread_pid): Declare.
14577 (find_inferior_id): Adjust to use ptid_t.
14578 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14579 (multi_process): Declare.
14580 (push_event): Adjust to use ptid_t.
14581 (read_ptid, write_ptid): Declare.
14582 (prepare_resume_reply): Adjust to use ptid_t.
14583 (clear_symbol_cache): Declare.
14584 * inferiors.c (all_processes): New.
14585 (null_ptid, minus_one_ptid): New.
14586 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14587 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14588 (add_thread): Change unsigned long to ptid. Remove gdb_id
14589 parameter. Adjust.
14590 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14591 (gdb_id_to_thread): Rename to ...
14592 (find_thread_pid): ... this. Change unsigned long to ptid.
14593 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14594 (loaded_dll, pull_pid_from_list): Adjust.
14595 (add_process, remove_process, find_process_pid)
14596 (get_thread_process, current_process, initialize_inferiors): New.
14597 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14598 (struct target_waitstatus) <related_pid>: Ditto.
14599 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14600 return type to int.
14601 (struct target_ops) <join>: Add `pid' argument.
14602 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14603 (struct target_ops) <wait>: Add `ptid' field. Change return type
14604 to ptid.
14605 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14606 (mywait): Add `ptid' argument. Change return type to ptid_t.
14607 (target_pid_to_str): Declare.
14608 * target.c (set_desired_inferior): Adjust to use ptids.
14609 (mywait): Add new `ptid' argument. Adjust.
14610 (target_pid_to_str): New.
14611 * mem-break.h (free_all_breakpoints): Declare.
14612 * mem-break.c (breakpoints): Delelete.
14613 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14614 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14615 to use per-process breakpoint list.
14616 (free_all_breakpoints): New.
14617 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14618 (symbol_cache, all_symbols_looked_up): Delete.
14619 (hexchars): New.
14620 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14621 read_ptid): New.
14622 (prepare_resume_reply): Change ptid argument's type from unsigned
14623 long to ptid_t. Adjust. Implement W;process and X;process.
14624 (free_sym_cache, clear_symbol_cache): New.
14625 (look_up_one_symbol): Adjust to per-process symbol cache. *
14626 * server.c (cont_thread, general_thread, step_thread): Change type
14627 to ptid_t.
14628 (attached): Delete.
14629 (multi_process): New.
14630 (last_ptid): Change type to ptid_t.
14631 (struct vstop_notif) <ptid>: Change type to ptid_t.
14632 (queue_stop_reply, push_event): Change `ptid' argument's type to
14633 ptid_t.
14634 (discard_queued_stop_replies): Add `pid' argument.
14635 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14636 changes. Don't reference the `attached' global.
14637 (attach_inferior): Adjust to mywait interface changes.
14638 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14639 features. Handle and report "multiprocess+". Handle
14640 "qAttached:PID".
14641 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14642 changes.
14643 (handle_v_kill): New.
14644 (handle_v_stopped): Adjust to use target_pid_to_str.
14645 (handle_v_requests): Allow multiple attaches and runs when
14646 multiprocess extensions are in effect. Handle "vKill".
14647 (myresume): Adjust to use ptids.
14648 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14649 (handle_status): Adjust to discard_queued_stop_replies interface
14650 change.
14651 (first_thread_of, kill_inferior_callback)
14652 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14653 (main): Call initialize_inferiors. Adjust to use ptids, killing
14654 and detaching from all inferiors. Handle multiprocess packet
14655 variants.
14656 * linux-low.h: Include gdb_proc_service.h.
14657 (struct process_info_private): New.
14658 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14659 <lwpid_of>: Use ptid_get_lwp.
14660 (get_lwp_thread): Adjust.
14661 (struct lwp_info): Add `dead' member.
14662 (find_lwp_pid): Declare.
14663 * linux-low.c (thread_db_active): Delete.
14664 (new_inferior): Adjust comment.
14665 (inferior_pid): Delete.
14666 (linux_add_process): New.
14667 (handle_extended_wait): Adjust.
14668 (add_lwp): Change unsigned long to ptid.
14669 (linux_create_inferior): Add process to processes table. Adjust
14670 to use ptids. Don't set new_inferior here.
14671 (linux_attach_lwp): Rename to ...
14672 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14673 it. Adjust to use ptids.
14674 (linux_attach_lwp): New.
14675 (linux_attach): Add process to processes table. Don't set
14676 new_inferior here.
14677 (struct counter): New.
14678 (second_thread_of_pid_p, last_thread_of_process_p): New.
14679 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14680 multiple processes.
14681 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14682 processes. Remove process from process table.
14683 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14684 to multiple processes.
14685 (any_thread_of): New.
14686 (linux_detach): Add `pid' argument, and handle it. Remove process
14687 from processes table.
14688 (linux_join): Add `pid' argument. Handle it.
14689 (linux_thread_alive): Change unsighed long argument to ptid_t.
14690 Consider dead lwps as not being alive.
14691 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14692 threads we're not interested in.
14693 (same_lwp, find_lwp_pid): New.
14694 (linux_wait_for_lwp): Change `pid' argument's type from int to
14695 ptid_t. Adjust.
14696 (linux_wait_for_event): Rename to ...
14697 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14698 from int to ptid_t. Adjust.
14699 (linux_wait_for_event): New.
14700 (linux_wait_1): Add `ptid' argument. Change return type to
14701 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14702 that exit from the process table.
14703 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14704 Adjust.
14705 (mark_lwp_dead): New.
14706 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14707 stopping all threads, mark its main lwp as dead.
14708 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14709 ptids.
14710 (fetch_register, usr_store_inferior_registers)
14711 (regsets_fetch_inferior_registers)
14712 (regsets_store_inferior_registers, linux_read_memory)
14713 (linux_write_memory): Inline `inferior_pid'.
14714 (linux_look_up_symbols): Adjust to use per-process
14715 `thread_db_active'.
14716 (linux_request_interrupt): Adjust to use ptids.
14717 (linux_read_auxv): Inline `inferior_pid'.
14718 (initialize_low): Don't reference thread_db_active.
14719 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14720 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14721 (ps_getpid): Return the pid of the current inferior.
14722 * thread-db.c (proc_handle, thread_agent): Delete.
14723 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14724 per-process data.
14725 (find_one_thread): Change argument type to ptid_t. Adjust to
14726 per-process data.
14727 (maybe_attach_thread): Adjust to per-process data and ptids.
14728 (thread_db_find_new_threads): Ditto.
14729 (thread_db_init): Ditto.
14730 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14731 processes table. Adjust to use ptids.
14732 (spu_kill, spu_detach): Adjust interface. Remove process from
14733 processes table.
14734 (spu_join, spu_thread_alive): Adjust interface.
14735 (spu_wait): Adjust interface. Remove process from processes
14736 table. Adjust to use ptids.
14737 * win32-low.c (current_inferior_tid): Delete.
14738 (current_inferior_ptid): New.
14739 (debug_event_ptid): New.
14740 (thread_rec): Take a ptid. Adjust.
14741 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14742 (child_delete_thread): Ditto.
14743 (do_initial_child_stuff): Add `attached' argument. Add process to
14744 processes table.
14745 (child_fetch_inferior_registers, child_store_inferior_registers):
14746 Adjust.
14747 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14748 (win32_attach): Pass 1 to do_initial_child_stuff.
14749 (win32_kill): Adjust interface. Remove process from processes
14750 table.
14751 (win32_detach): Ditto.
14752 (win32_join): Adjust interface.
14753 (win32_thread_alive): Take a ptid.
14754 (win32_resume): Adjust to use ptids.
14755 (get_child_debug_event): Ditto.
14756 (win32_wait): Adjust interface. Remove exiting process from
14757 processes table.
14758
147592009-04-01 Pedro Alves <pedro@codesourcery.com>
14760
14761 Non-stop mode support.
14762
14763 * server.h (non_stop): Declare.
14764 (gdb_client_data, handler_func): Declare.
14765 (delete_file_handler, add_file_handler, start_event_loop):
14766 Declare.
14767 (handle_serial_event, handle_target_event, push_event)
14768 (putpkt_notif): Declare.
14769 * target.h (enum resume_kind): New.
14770 (struct thread_resume): Replace `step' field by `kind' field.
14771 (TARGET_WNOHANG): Define.
14772 (struct target_ops) <wait>: Add `options' argument.
14773 <supports_non_stop, async, start_non_stop>: New fields.
14774 (target_supports_non_stop, target_async): New.
14775 (start_non_stop): Declare.
14776 (mywait): Add `options' argument.
14777 * target.c (mywait): Add `options' argument. Print child exit
14778 notifications here.
14779 (start_non_stop): New.
14780 * server.c (non_stop, own_buf, mem_buf): New globals.
14781 (struct vstop_notif): New.
14782 (notif_queue): New global.
14783 (queue_stop_reply, push_event, discard_queued_stop_replies)
14784 (send_next_stop_reply): New.
14785 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14786 interface changes.
14787 (attach_inferior): In non-stop mode, don't wait for the target
14788 here.
14789 (handle_general_set): Handle QNonStop.
14790 (handle_query): When handling qC, return the current general
14791 thread, instead of the first thread of the list.
14792 (handle_query): If the backend supports non-stop mode, include
14793 QNonStop+ in the qSupported query response.
14794 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14795 and non-stop mode.
14796 (handle_v_attach, handle_v_run): Handle non-stop mode.
14797 (handle_v_stopped): New.
14798 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14799 (myresume): Adjust to use resume_kind. Handle non-stop.
14800 (queue_stop_reply_callback): New.
14801 (handle_status): Handle non-stop mode.
14802 (main): Clear non_stop flag on reconnection. Use the event-loop.
14803 Refactor serial protocol handling from here ...
14804 (process_serial_event): ... to this new function. When GDB
14805 selects any thread, select one here. In non-stop mode, wait until
14806 GDB acks all pending events before exiting.
14807 (handle_serial_event, handle_target_event): New.
14808 * remote-utils.c (remote_open): Install remote_desc in the event
14809 loop.
14810 (remote_close): Remove remote_desc from the event loop.
14811 (putpkt_binary): Rename to...
14812 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14813 (putpkt_binary): New as wrapper around putpkt_binary_1.
14814 (putpkt_notif): New.
14815 (prepare_resume_reply): In non-stop mode, don't change the
14816 general_thread.
14817 * event-loop.c: New.
14818 * Makefile.in (OBJ): Add event-loop.o.
14819 (event-loop.o): New rule.
14820
14821 * linux-low.h (pid_of): Moved here.
14822 (lwpid_of): New.
14823 (get_lwp_thread): Use lwpid_of.
14824 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14825 * linux-low.c (pid_of): Delete.
14826 (inferior_pid): Use lwpid_of.
14827 (linux_event_pipe): New.
14828 (target_is_async_p): New.
14829 (delete_lwp): New.
14830 (handle_extended_wait): Use lwpid_of.
14831 (add_lwp): Don't set lwpid field.
14832 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14833 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14834 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14835 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14836 first. Adjust to linux_wait_for_event interface changes. Use
14837 lwpid_of.
14838 (linux_detach): Don't delete the main lwp here.
14839 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14840 (status_pending_p): Don't consider explicitly suspended lwps.
14841 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14842 pointer. Add OPTIONS argument. Change return type to int. Use
14843 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14844 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14845 pointer. Add status pointer argument. Return a pid instead of a
14846 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14847 changes. In non-stop mode, don't switch to a random thread.
14848 (linux_wait): Rename to...
14849 (linux_wait_1): ... this. Add target_options argument, and handle
14850 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14851 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14852 clean exit and signal exit code. Don't stop all threads in
14853 non-stop mode. In all-stop mode, only stop all threads when
14854 reporting a stop to GDB. Handle explicit thread stop requests.
14855 (async_file_flush, async_file_mark): New.
14856 (linux_wait): New.
14857 (send_sigstop): Use lwpid_of.
14858 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14859 interface changes. In non-stop mode, don't switch to a random
14860 thread.
14861 (linux_resume_one_lwp): Use lwpid_of.
14862 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14863 (linux_resume_one_thread): ... this. Handle resume_stop. In
14864 non-stop mode, don't look for pending flag in all threads.
14865 (resume_status_pending_p): Don't consider explicitly suspended
14866 threads.
14867 (my_waitpid): Reimplement. Emulate __WALL.
14868 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14869 Use lwpid_of.
14870 (sigchld_handler, linux_supports_non_stop, linux_async)
14871 (linux_start_non_stop): New.
14872 (linux_target_ops): Register linux_supports_non_stop, linux_async
14873 and linux_start_non_stop.
14874 (initialize_low): Install SIGCHLD handler.
14875 * thread-db.c (thread_db_create_event, find_one_thread)
14876 (thread_db_get_tls_address): Use lwpid_of.
14877 * win32-low.c (win32_detach): Adjust to use resume_kind.
14878 (win32_wait): Add `options' argument.
14879 * spu-low.c (spu_resume): Adjust to use resume_kind.
14880 (spu_wait): Add `options' argument.
14881
148822009-04-01 Pedro Alves <pedro@codesourcery.com>
14883
14884 Decouple target code from remote protocol.
14885
14886 * target.h (enum target_waitkind): New.
14887 (struct target_waitstatus): New.
14888 (struct target_ops) <wait>: Return an unsigned long. Take a
14889 target_waitstatus pointer instead of a char pointer.
14890 (mywait): Likewise.
14891 * target.c (mywait): Change prototype to return an unsigned long.
14892 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14893 * server.h (thread_from_wait, old_thread_from_wait): Delete
14894 declarations.
14895 (prepare_resume_reply): Change prototype to take a
14896 target_waitstatus.
14897 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14898 (last_status, last_ptid): New.
14899 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14900 pid instead of a signal.
14901 (attach_inferior): Remove "status" and "signal" parameters.
14902 Adjust.
14903 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14904 not as an address.
14905 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14906 (handle_v_requests, myresume): Remove "status" and "signal"
14907 parameters. Adjust.
14908 (handle_status): New.
14909 (main): Delete local `status'. Adjust.
14910 * remote-utils.c: Include target.h.
14911 (prepare_resume_reply): Change prototype to take a
14912 target_waitstatus. Adjust.
14913
14914 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14915 interface.
14916 * spu-low.c (spu_wait): Adjust.
14917 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14918 Delete.
14919 (win32_wait): Adjust.
14920
149212009-04-01 Pedro Alves <pedro@codesourcery.com>
14922
14923 * target.h (struct thread_resume): Delete leave_stopped member.
14924 (struct target_ops): Add a `n' argument to the `resume' callback.
14925 * server.c (start_inferior): Adjust.
14926 (handle_v_cont, myresume): Adjust.
14927 * linux-low.c (check_removed_breakpoint): Adjust to resume
14928 interface change, and to removed leave_stopped field.
14929 (resume_ptr): Delete.
14930 (struct thread_resume_array): New.
14931 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14932 resume interface change.
14933 (linux_continue_one_thread, linux_queue_one_thread)
14934 (resume_status_pending_p): Check if the resume field is NULL
14935 instead of checking the leave_stopped member.
14936 (linux_resume): Adjust to the target resume interface change.
14937 * spu-low.c (spu_resume): Adjust to the target resume interface
14938 change.
14939 * win32-low.c (win32_detach, win32_resume): Ditto.
14940
149412009-04-01 Pedro Alves <pedro@codesourcery.com>
14942
14943 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14944 flag.
14945 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14946 pending.
14947 (linux_continue_one_thread): Only preserve the stepping flag if
14948 there's a pending breakpoint.
14949
149502009-03-31 Pedro Alves <pedro@codesourcery.com>
14951
14952 * server.c (main): After the inferior having exited, call
14953 remote_close before exiting gdbserver.
14954
149552009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14956
14957 Fix size of FPSCR in Power 7 processors.
14958 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14959 (PPC_FEATURE_HAS_DFP): New #define.
14960 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14961 size of the FPSCR.
14962
149632009-03-23 Pedro Alves <pedro@codesourcery.com>
14964
14965 * server.c (handle_query) Whitespace and formatting.
14966
149672009-03-22 Pedro Alves <pedro@codesourcery.com>
14968
14969 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14970 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14971 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14972 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14973 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14974 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14975 Makefile.in, configure.ac: Fix whitespace throughout.
14976 * configure: Regenerate.
14977
149782009-03-22 Pedro Alves <pedro@codesourcery.com>
14979
14980 * inferiors.c (find_inferior): Make it safe for the callback
14981 function to delete the currently iterated inferior.
14982
149832009-03-22 Pedro Alves <pedro@codesourcery.com>
14984
14985 * Makefile.in (linuw_low_h): Move higher.
14986 (thread-db.o): Depend on $(linux_low_h).
14987
149882009-03-17 Pedro Alves <pedro@codesourcery.com>
14989
14990 Rename "process" to "lwp" throughout.
14991
14992 * linux-low.c (all_processes): Rename to...
14993 (all_lwps): ... this.
14994 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14995 (add_process): Rename to ...
14996 (add_lwp): ... this. Adjust.
14997 (linux_create_inferior): Adjust.
14998 (linux_attach_lwp): Adjust.
14999 (linux_attach): Adjust.
15000 (linux_kill_one_process): Rename to ...
15001 (linux_kill_one_lwp): ... this. Adjust.
15002 (linux_kill): Adjust.
15003 (linux_detach_one_process): Rename to ...
15004 (linux_detach_one_lwp): ... this. Adjust.
15005 (linux_detach): Adjust.
15006 (check_removed_breakpoint): Adjust.
15007 (status_pending_p): Adjust.
15008 (linux_wait_for_process): Rename to ...
15009 (linux_wait_for_lwp): ... this. Adjust.
15010 (linux_wait_for_event): Adjust.
15011 (send_sigstop): Adjust.
15012 (wait_for_sigstop): Adjust.
15013 (stop_all_processes): Rename to ...
15014 (stop_all_lwps): ... this.
15015 (linux_resume_one_process): Rename to ...
15016 (linux_resume_one_lwp): ... this. Adjust.
15017 (linux_set_resume_request, linux_continue_one_thread)
15018 (linux_queue_one_thread, resume_status_pending_p)
15019 (usr_store_inferior_registers, regsets_store_inferior_registers)
15020 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15021 Adjust.
15022 * linux-low.h (get_process): Rename to ...
15023 (get_lwp): ... this. Adjust.
15024 (get_thread_process): Rename to ...
15025 (get_thread_lwp): ... this. Adjust.
15026 (get_process_thread): Rename to ...
15027 (get_lwp_thread): ... this. Adjust.
15028 (struct process_info): Rename to ...
15029 (struct lwp_info): ... this.
15030 (all_processes): Rename to ...
15031 (all_lwps): ... this.
15032 * proc-service.c (ps_lgetregs): Adjust.
15033 * thread-db.c (thread_db_create_event, find_one_thread)
15034 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15035
150362009-03-14 Pedro Alves <pedro@codesourcery.com>
15037
15038 * server.c (handle_query): Handle "qAttached".
15039
150402009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15041
15042 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15043 GPLv3, update license URL.
15044
150452009-03-01 Doug Evans <dje@google.com>
15046
15047 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15048 (server_h): Add gdb_signals.h.
15049 (signals.o): Update.
15050 * server.h (target_signal_from_host,target_signal_to_host_p)
15051 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15052
150532009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15054
15055 * remote-utils.c (getpkt): Also generate remote-debug
15056 information if noack_mode is set.
15057
150582009-02-06 Pedro Alves <pedro@codesourcery.com>
15059
15060 * server.c (handle_query): Report qXfer:siginfo:read and
15061 qXfer:siginfo:write as supported and handle them.
15062 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15063 * linux-low.c (linux_xfer_siginfo): New.
15064 (linux_target_ops): Set it.
15065
150662009-01-26 Pedro Alves <pedro@codesourcery.com>
15067
15068 * server.c (gdbserver_usage): Mention --remote-debug.
15069 (main): Accept '--remote-debug' switch.
15070
150712009-01-18 Doug Evans <dje@google.com>
15072
15073 * regcache.c (new_register_cache): No need to check result of xcalloc.
15074 * server.c (handle_search_memory): Back out calls to xmalloc,
15075 result is checked and error is returned to user upon failure.
15076 (handle_query): Ditto. Add more checks for result of malloc.
15077 (handle_v_cont): Check result of malloc, report error back to
15078 user upon failure.
15079 (handle_v_run): Ditto. Call freeargv.
15080 * server.h (freeargv): Declare.
15081 * utils.c (freeargv): New fn.
15082
150832009-01-15 Doug Evans <dje@google.com>
15084
15085 * gdbreplay.c (perror_with_name): Make arg const char *.
15086 * server.h (target_signal_to_name): Make return type const char *.
15087 * thread-db.c (thread_db_err_str): Make return type const char *.
15088 * utils.c (perror_with_name): Make arg const char *.
15089
150902009-01-14 Pedro Alves <pedro@codesourcery.com>
15091
15092 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15093 when handling a EXIT_PROCESS_DEBUG_EVENT.
15094
150952009-01-06 Joel Brobecker <brobecker@adacore.com>
15096
15097 * gdbreplay.c (gdbreplay_version): Update copyright year.
15098 * server.c (gdbserver_version): Likewise.
15099
151002009-01-05 Doug Evans <dje@google.com>
15101
15102 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15103 (handle_extended_wait): Improve comment.
15104
151052008-12-13 Doug Evans <dje@google.com>
15106
15107 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15108 * server.h (ATTR_MALLOC): New macro.
15109 (xmalloc,xcalloc,xstrdup): Declare.
15110 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15111 * inferiors.c: Ditto.
15112 * linux-low.c: Ditto.
15113 * mem-break.c: Ditto.
15114 * regcache.c: Ditto.
15115 * remote-utils.c: Ditto.
15116 * server.c: Ditto.
15117 * target.c: Ditto.
15118 * win32-low.c: Ditto.
15119
151202008-12-12 Doug Evans <dje@google.com>
15121
15122 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15123 in debugging printf.
15124
15125 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15126
151272008-12-09 Doug Evans <dje@google.com>
15128
15129 * linux-low.h (struct process_info): Delete member tid, unused.
15130 * thread-db.c (find_one_thread): Update.
15131 (maybe_attach_thread): Update.
15132
151332008-12-02 Pedro Alves <pedro@codesourcery.com>
15134
15135 * target.h (struct target_ops): Add qxfer_osdata member.
15136 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15137 and dirent.h.
15138 (linux_qxfer_osdata): New functions.
15139 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15140 callback.
15141 * server.c (handle_query): Handle "qXfer:osdata:read:".
15142 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15143 (buffer_xml_printf): New functions.
15144 * server.h (struct buffer): New.
15145 (buffer_grow_str, buffer_grow_str0): New macros.
15146 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15147 (buffer_xml_printf): Declare.
15148
151492008-11-24 Doug Evans <dje@google.com>
15150
15151 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15152
151532008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15154
15155 * server.c (handle_v_run): Always use the supplied argument list.
15156
151572008-11-19 Bob Wilson <bob.wilson@acm.org>
15158
15159 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15160 (xtensa_regmap_table): Add entry for scompare1.
15161
151622008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15163
15164 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15165 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15166 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15167 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15168 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15169 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15170 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15171 XML target descriptions.
15172 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15173 when inferior is running on an ISA 2.05 or later processor. Add
15174 special case to return offset for full 64-bit slot of FPSCR when
15175 in 32-bits.
15176
151772008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15178
15179 * Makefile.in (SFILES, clean): Added sparc64 files.
15180 (reg-sparc64.o, reg-sparc64.c): New.
15181 * configure.srv (sparc*-*-linux*): New configuration.
15182 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15183 syscall arguments for SPARC.
15184 (regsets_store_inferior_registers): Likewise.
15185 * linux-sparc-low.c: New file.
15186
151872008-10-21 Doug Evans <dje@google.com>
15188
15189 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15190 (READLINE_DIR,READLINE_DEP): Delete.
15191 (INTERNAL_CFLAGS): Update.
15192 (LINTFLAGS): Update.
15193
151942008-10-10 Pedro Alves <pedro@codesourcery.com>
15195
15196 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15197 whole argv from the last run, not just argv[0].
15198
151992008-09-08 Pedro Alves <pedro@codesourcery.com>
15200
15201 * regcache.c (new_register_cache): Return NULL if the register
15202 cache size isn't known yet.
15203 (free_register_cache): Avoid dereferencing a NULL regcache.
15204
152052008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15206
15207 * configure.srv: Merge MIPS and MIPS64.
15208
152092008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15210
15211 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15212
152132008-08-18 Luis Machado <luisgpm@br.ibm.com>
15214
15215 * Makefile.in: Add required vsx dependencies.
15216
15217 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15218 Declare init_registers_powerpc_vsx32l.
15219 Declare init_registers_powerpc_vsx64l.
15220 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15221 (ppc_arch_setup): Check for VSX in hwcap.
15222 (ppc_fill_vsxregset): New function.
15223 (ppc_store_vsxregset): New function.
15224 Add new VSX entry in regset_info target_regsets.
15225
15226 * configure.srv: Add new VSX dependencies.
15227
152282008-08-12 Pedro Alves <pedro@codesourcery.com>
15229
15230 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15231 (remote_open): Set or clear transport_is_reliable.
15232 (putpkt_binary): Don't expect acks in noack mode.
15233 (getpkt): Don't send ack/nac in noack mode.
15234 * server.c (handle_general_set): Handle QStartNoAckMode.
15235 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15236 qSupported.
15237 (main): Reset noack_mode on every connection.
15238 * server.h (noack_mode): Declare.
15239
152402008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15241
15242 * Makefile.in (GDBREPLAY_OBS): New variable.
15243 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15244
152452008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15246 Daniel Jacobowitz <dan@codesourcery.com>
15247
15248 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15249 (usr_store_inferior_registers): Likewise.
15250 (regsets_store_inferior_registers): Likewise.
15251
152522008-07-31 Rolf Jansen <rj@surtec.com>
15253 Pedro Alves <pedro@codesourcery.com>
15254
15255 * configure.ac: Check for memmem declaration.
15256 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15257 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15258 (disable_packet_qfThreadInfo): Unconditionally compile.
15259 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15260 * configure, config.in: Regenerate.
15261
152622008-07-28 Doug Kwan <dougkwan@google.com>
15263
15264 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15265 (linux_write_memory): Remove declaration of errno.
15266
152672008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15268
15269 * linux-low.c (handle_extended_wait): Do not use "status"
15270 variable uninitialized.
15271
152722008-07-07 Pedro Alves <pedro@codesourcery.com>
15273
15274 * server.c (handle_v_attach): Inhibit reporting dll changes.
15275
152762008-06-27 Pedro Alves <pedro@codesourcery.com>
15277
15278 * remote-utils.c (prepare_resume_reply): If requested, don't
15279 output "thread:TID" in the T stop reply.
15280
15281 * server.c (disable_packet_vCont, disable_packet_Tthread)
15282 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15283 (handle_query): If requested, disable support for qC, qfThreadInfo
15284 and qsThreadInfo.
15285 (handle_v_requests): If requested, disable support for vCont.
15286 (gdbserver_show_disableable): New.
15287 (main): Handle --disable-packet and --disable-packet=LIST.
15288
15289 * server.h (disable_packet_vCont, disable_packet_Tthread)
15290 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15291
152922008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15293
15294 * server.c (gdbserver_usage): Mention --version.
15295
152962008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15297
15298 * Makefile.in (gdbreplay.o): New rule.
15299
153002008-06-06 Joseph Myers <joseph@codesourcery.com>
15301
15302 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15303 message, not gdbserver.
15304
153052008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15306 Nathan Sidwell <nathan@codesourcery.com>
15307 Joseph Myers <joseph@codesourcery.com>
15308
15309 * acinclude.m4: Include ../../config/acx.m4.
15310 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15311 * configure, config.in: Regenerate.
15312 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15313 * server.c (gdbserver_version): Print PKGVERSION.
15314 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15315 (main): Adjust gdbserver_usage calls.
15316 * gdbreplay.c (version, host_name): Add declarations.
15317 (gdbreplay_version, gdbreplay_usage): New.
15318 (main): Accept --version and --help options.
15319
153202008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15321
15322 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15323 (arm_breakpoint_at): Handle Thumb.
15324 (the_low_target): Add comment.
15325
153262008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15327
15328 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15329
153302008-05-09 Doug Evans <dje@google.com>
15331
15332 * server.h (decode_search_memory_packet): Declare.
15333 * remote-utils.c (decode_search_memory_packet): New fn.
15334 * server.c (handle_search_memory_1): New fn.
15335 (handle_search_memory): New fn.
15336 (handle_query): Process qSearch:memory packets.
15337
153382008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15339
15340 * regcache.c (registers_length): Remove.
15341 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15342 full register packet.
15343 * regcache.h (registers_length): Remove prototype.
15344 * server.h (PBUFSIZ): Define to 16384.
15345
153462008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15347
15348 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15349 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15350 powerpc-64l.o, and powerpc-altivec64l.o.
15351 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15352 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15353 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15354 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15355 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15356 to srv_xmlfiles.
15357
15358 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15359 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15360 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15361 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15362 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15363 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15364 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15365 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15366 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15367 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15368 (clean): Update.
15369
15370 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15371 (init_registers_powerpc_32l): ... this new prototype.
15372 (init_registers_powerpc_32): Remove, replace by ...
15373 (init_registers_powerpc_altivec32l): ... this new prototype.
15374 (init_registers_powerpc_e500): Remove, replace by ...
15375 (init_registers_powerpc_e500l): ... this new prototype.
15376 (init_registers_ppc64): Remove, replace by ...
15377 (init_registers_powerpc_64l): ... this new prototype.
15378 (init_registers_powerpc_64): Remove, replace by ...
15379 (init_registers_powerpc_altivec64l): ... this new prototype.
15380 (ppc_num_regs): Set to 73.
15381 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15382 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15383 (ppc_cannot_store_register): Handle orig_r3 and trap.
15384 (ppc_arch_setup): Update init_registers_... calls.
15385 (ppc_fill_gregset): Handle orig_r3 and trap.
15386
15387 * inferiors.c (clear_inferiors): Reset current_inferior.
15388
153892008-04-23 Paolo Bonzini <bonzini@gnu.org>
15390
15391 * acinclude.m4: Add override.m4.
15392 * configure: Regenerate.
15393
153942008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15395
15396 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15397 initial call to init_register_ppc64.
15398
153992008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15400
15401 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15402 single powerpc*-*-linux* case.
15403 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15404
154052008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15406
15407 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15408 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15409 from reg_xmlfiles.
15410 * linux-ppc-low.c: Include <elf.h>.
15411 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15412 (ppc_hwcap): New global variable.
15413 (ppc_regmap): Remove __SPE__ #ifdef sections.
15414 (ppc_regmap_e500): New global variable.
15415 (ppc_cannot_store_register): Update __SPE__ special case.
15416 (ppc_get_hwcap): New function.
15417 (ppc_arch_setup): Use it to determine whether inferior supports
15418 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15419 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15420 Do not access registers if target does not support AltiVec.
15421 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15422 Do not access registers if target does not support SPE.
15423 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15424
154252008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15426
15427 * linux-low.c (disabled_regsets, num_regsets): New.
15428 (use_regsets_p): Delete.
15429 (linux_wait_for_process): Clear disabled_regsets.
15430 (regsets_fetch_inferior_registers): Check and set it.
15431 (regsets_store_inferior_registers): Likewise.
15432 (linux_fetch_registers, linux_store_registers): Do not use
15433 use_regsets_p.
15434 (initialize_low): Allocate disabled_regsets.
15435
154362008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15437
15438 * Makefile.in (LIBOBJS): New.
15439 (OBS): Use LIBOBJS.
15440 (memmem.o): New rule.
15441 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15442 * configure: Regenerated.
15443
154442008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15445
15446 * server.c (handle_query): Never return "unsupported" for
15447 qXfer:features:read queries.
15448
154492008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15450
15451 * server.c (get_features_xml): Fix inverted condition.
15452 (handle_query): Always support qXfer:feature:read.
15453
154542008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15455
15456 * server.c (wrapper_argv): New.
15457 (start_inferior): Handle wrapper_argv. If set, expect an extra
15458 trap.
15459 (gdbserver_usage): Document --wrapper.
15460 (main): Parse --wrapper.
15461
154622008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15463
15464 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15465 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15466 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15467 (ppc_set_pc): Likewise.
15468 (ppc_arch_setup): New function.
15469 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15470 of collect_register.
15471 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15472
154732008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15474
15475 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15476 instead of linux-ppc64-low.o.
15477 * linux-ppc64-low.c: Remove file.
15478 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15479 (linux-ppc64-low.o): Remove rule.
15480
15481 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15482 (init_registers_powerpc_64): Likewise.
15483 (ppc_regmap): Conditionally define depending on __powerpc64__.
15484 (ppc_cannot_store_register): Do not special-case "fpscr" when
15485 compiled on __powerpc64__.
15486 (ppc_collect_ptrace_register): New function.
15487 (ppc_supply_ptrace_register): New function.
15488 (ppc_breakpoint): Change type to "unsigned int".
15489 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15490 (the_low_target): Conditionally provide initializers for the
15491 arch_setup member depending on __powerpc64__. Install
15492 collect_ptrace_register and supply_ptrace_register members.
15493
154942008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15495
15496 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15497 * server.c (gdbserver_xmltarget): Define.
15498 (get_features_xml): Use it to replace "target.xml" and arch_string.
15499
15500 * configure.srv: Remove srv_xmltarget. Add XML files that were
15501 mentioned there to srv_xmlfiles instead. Remove conditional tests
15502 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15503 srv_xmlfiles and srv_regobj to include all possible choices.
15504 * configure.ac (srv_xmltarget): Remove.
15505 (srv_xmlfiles): Do not add "target.xml".
15506 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15507 checks for supplementary target information.
15508 * configure: Regenerate.
15509 * Makefile.in (XML_TARGET): Remove.
15510 (target.xml): Remove rule.
15511 (clean): Do not clean up target.xml.
15512 (.PRECIOUS): Do not mention target.xml.
15513
15514 * target.h (struct target_ops): Remove arch_string member.
15515 * linux-low.c (linux_arch_string): Remove.
15516 (linux_target_ops): Remove arch_string initializer.
15517 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15518 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15519 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15520 * spu-low.c (spu_arch_string): Remove.
15521 (spu_target_ops): Remove arch_string initializer.
15522 * win32-low.c (win32_arch_string): Remove.
15523 (win32_target_ops): Remove arch_string initializer.
15524 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15525 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15526 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15527
155282008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15529
15530 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15531 by collect_ptrace_register and supply_ptrace_register hooks.
15532 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15533 instead of checking for the_low_target.left_pad_xfer.
15534 (usr_store_inferior_registers): Use collect_ptrace_register callback
15535 instead of checking for the_low_target.left_pad_xfer.
15536
15537 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15538 (s390_supply_ptrace_register): Likewise.
15539 (s390_fill_gregset): Call s390_collect_ptrace_register.
15540 (the_low_target): Update.
15541
15542 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15543 (ppc_supply_ptrace_register): Likewise.
15544 (the_low_target): Update.
15545
15546 * linux-i386-low.c (the_low_target): Update.
15547 * linux-x86-64-low.c (the_low_target): Update.
15548
155492008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15550
15551 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15552 reg-s390.o and reg-s390x.o.
15553
15554 * linux-low.c (new_inferior): New global variable.
15555 (linux_create_inferior, linux_attach): Set it.
15556 (linux_wait_for_process): Call the_low_target.arch_setup after the
15557 target has stopped for the first time.
15558 (initialize_low): Do not call the_low_target.arch_setup.
15559
15560 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15561 (s390_set_pc): Likewise.
15562 (s390_arch_setup): New function.
15563 (the_low_target): Use s390_arch_setup as arch_setup routine.
15564
15565 * regcache.c (realloc_register_cache): New function.
15566 (set_register_cache): Call it for each existing regcache.
15567
155682008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15569
15570 * server.h (init_registers): Remove prototype.
15571
15572 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15573 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15574 instead of init_registers ().
15575 * linux-arm-low.c (init_registers_arm): Add prototype.
15576 (init_registers_arm_with_iwmmxt): Likewise.
15577 (the_low_target): Add initializer for arch_setup field.
15578 * linux-cris-low.c (init_registers_cris): Add prototype.
15579 (the_low_target): Add initializer for arch_setup field.
15580 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15581 (the_low_target): Add initializer for arch_setup field.
15582 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15583 (the_low_target): Add initializer for arch_setup field.
15584 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15585 (the_low_target): Add initializer for arch_setup field.
15586 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15587 (the_low_target): Add initializer for arch_setup field.
15588 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15589 (the_low_target): Add initializer for arch_setup field.
15590 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15591 (init_registers_mips64_linux): Likewise.
15592 (the_low_target): Add initializer for arch_setup field.
15593 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15594 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15595 (the_low_target): Add initializer for arch_setup field.
15596 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15597 (init_registers_powerpc_64): Likewise.
15598 (the_low_target): Add initializer for arch_setup field.
15599 * linux-s390-low.c (init_registers_s390): Add prototype.
15600 (init_registers_s390x): Likewise.
15601 (the_low_target): Add initializer for arch_setup field.
15602 * linux-sh-low.c (init_registers_sh): Add prototype.
15603 (the_low_target): Add initializer for arch_setup field.
15604 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15605 (the_low_target): Add initializer for arch_setup field.
15606 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15607 (the_low_target): Add initializer for arch_setup field.
15608
15609 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15610 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15611 instead of init_registers ().
15612 * win32-arm-low.c (init_registers_arm): Add prototype.
15613 (the_low_target): Add initializer for arch_setup field.
15614 * win32-i386-low.c (init_registers_i386): Add prototype.
15615 (the_low_target): Add initializer for arch_setup field.
15616
15617 * spu-low.c (init_registers_spu): Add prototype.
15618 (initialize_low): Call initialie_registers_spu () instead of
15619 initialize_registers ().
15620
156212008-02-19 Pedro Alves <pedro@codesourcery.com>
15622
15623 * server.c (handle_v_requests): When handling the vRun and vAttach
15624 packets, if already debugging a process, don't kill it. Return an
15625 error instead.
15626
156272008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15628
15629 * server.c (handle_query): Correct length check.
15630
156312008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15632
15633 * win32-low.c (do_initial_child_stuff): Add process handle
15634 parameter. Set current_process_handle and current_process_id from the
15635 parameters. Clear globals.
15636 (win32_create_inferior): Don't set current_process_handle and
15637 current_process_id here. Instead pass them on the call to
15638 do_initial_child_stuff.
15639 (win32_attach): Likewise.
15640 (win32_clear_inferiors): New.
15641 (win32_kill): Don't close the current process handle or the
15642 current thread handle here. Instead call win32_clear_inferiors.
15643 (win32_detach): Don't open a new handle to the process. Call
15644 win32_clear_inferiors.
15645 (win32_join): Don't rely on current_process_handle; open a new
15646 handle using the process id.
15647 (win32_wait): Call win32_clear_inferiors when the inferior process
15648 has exited.
15649
156502008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15651
15652 * server.c (monitor_show_help): Add "exit".
15653
156542008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15655
15656 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15657 (clean): Add reg-xtensa.c.
15658 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15659 * configure.srv (xtensa*-*-linux*) New target.
15660 * linux-xtensa-low.c: New.
15661 * xtensa-xtregs.c: New.
15662
156632008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15664
15665 * hostio.c: Don't include errno.h.
15666 (errno_to_fileio_errno): Move to hostio-errno.
15667 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15668 error number outputting to the target->hostio_last_error callback.
15669 (hostio_packet_error): Use FILEIO_EINVAL directly.
15670 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15671 calls to hostio_error.
15672 * hostio-errno.c: New.
15673 * server.h (hostio_last_error_from_errno): Declare.
15674 * target.h (target_ops): Add hostio_last_error member.
15675 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15676 as hostio_last_error handler.
15677 * spu-low.c (spu_target_ops): Likewise.
15678 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15679 (wince_hostio_last_error): New functions.
15680 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15681 as hostio_last_error handler.
15682 (win32_target_ops) [!_WIN32_WCE]: Register
15683 hostio_last_error_from_errno as hostio_last_error handler.
15684 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15685 (hostio-errno.o): New rule.
15686 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15687 * configure.srv (srv_hostio_err_objs): New variable. Default to
15688 hostio-errno.o.
15689 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15690 * configure: Regenerate.
15691
156922008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15693
15694 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15695 (linux_kill, linux_detach): Clean up the process list.
15696 * remote-utils.c (remote_open): Improve port number parsing.
15697 (putpkt_binary, input_interrupt): Only send interrupts if the target
15698 is running.
15699 * server.c (extended_protocol): Make static.
15700 (attached): Define earlier.
15701 (exit_requested, response_needed, program_argv): New variables.
15702 (target_running): New.
15703 (start_inferior): Clear attached here.
15704 (attach_inferior): Set attached here.
15705 (require_running): Define.
15706 (handle_query): Use require_running and target_running. Implement
15707 "monitor exit".
15708 (handle_v_attach, handle_v_run): New.
15709 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15710 (gdbserver_usage): Update.
15711 (main): Redo argument parsing. Handle --debug and --multi. Handle
15712 --attach along with other options or after the port. Save
15713 program_argv. Support no initial program. Resynchronize
15714 communication with GDB after an error. Handle "monitor exit".
15715 Use require_running and target_running. Always allow the extended
15716 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15717 restart in extended mode.
15718 * README: Refer to the GDB manual. Update --attach usage.
15719
157202007-12-20 Andreas Schwab <schwab@suse.de>
15721
15722 * linux-low.c (STACK_SIZE): Define.
15723 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15724 (linux_test_for_tracefork): Likewise.
15725
157262007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15727
15728 * linux-low.c (linux_wait_for_event): Update messages. Do not
15729 reinsert auto-delete breakpoints.
15730 * mem-break.c (struct breakpoint): Change return type of handler to
15731 int.
15732 (set_breakpoint_at): Update handler type.
15733 (reinsert_breakpoint_handler): Return 1 instead of calling
15734 delete_breakpoint.
15735 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15736 setting a new one.
15737 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15738 * mem-break.h (set_breakpoint_at): Update handler type.
15739 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15740 * win32-low.c (auto_delete_breakpoint): New.
15741 (get_child_debug_event): Use it.
15742
157432007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15744
15745 * configure.ac: Check for pread and pwrite.
15746 * hostio.c (handle_pread): Fall back to lseek and read.
15747 (handle_pwrite): Fall back to lseek and write.
15748 * config.in, configure: Regenerated.
15749
157502007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15751
15752 * server.c (myresume): Add own_buf argument.
15753 (main): Update calls.
15754
157552007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15756
15757 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15758 * remote-utils.c (remote_open): Do not call disable_async_io.
15759 (block_async_io): Delete.
15760 (unblock_async_io): Make static.
15761 (initialize_async_io): New.
15762 * server.c (handle_v_cont): Handle async I/O here.
15763 (myresume): Likewise. Move other common resume tasks here...
15764 (main): ... from here. Call initialize_async_io. Disable async
15765 I/O before the main loop.
15766 * server.h (initialize_async_io): Declare.
15767 (block_async_io, unblock_async_io): Delete prototypes.
15768 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15769
157702007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15771
15772 * remote-utils.c (readchar): Allow binary data in received messages.
15773
157742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15775
15776 * win32-low.c (attaching): New global.
15777 (win32_create_inferior): Clear the `attaching' global.
15778 (win32_attach): Set the `attaching' global.
15779 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15780 attaching. Only set a breakpoint at the entry point if not
15781 attaching.
15782
157832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15784
15785 * server.c (main): Don't report dll events on the initial
15786 connection on attaches.
15787
157882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15789
15790 * server.c (main): Relax numerical bases supported for the pid of
15791 the --attach command line argument.
15792
157932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15794
15795 * win32-low.c (win32_attach): Call OpenProcess before
15796 DebugActiveProcess, not after. Add last error output to error
15797 call.
15798
157992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15800
15801 * win32-low.c (win32_get_thread_context)
15802 (win32_set_thread_context): New functions.
15803 (thread_rec): Use win32_get_thread_context.
15804 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15805 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15806 field.
15807
158082007-12-03 Leo Zayas
15809 Pedro Alves <pedro_alves@portugalmail.pt>
15810
15811 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15812 global variables.
15813 (child_add_thread): Minor cleanup.
15814 (child_continue): Resume artificially suspended threads before
15815 calling ContinueDebugEvent.
15816 (suspend_one_thread): New.
15817 (fake_breakpoint_event): New.
15818 (get_child_debug_event): Change return type to int. Check here if
15819 gdb sent an interrupt request. If a soft interrupt was requested,
15820 fake a breakpoint event. Return 0 if there is no event to handle,
15821 and 1 otherwise.
15822 (win32_wait): Don't check here if gdb sent an interrupt request.
15823 Ensure there is a valid event to handle.
15824 (win32_request_interrupt): Add soft interruption method as last
15825 resort.
15826
158272007-12-03 Leo Zayas
15828 Pedro Alves <pedro_alves@portugalmail.pt>
15829
15830 * win32-low.h (win32_thread_info): Add descriptions to the
15831 structure members. Replace `suspend_count' counter by a
15832 `suspended' flag.
15833 * win32-low.c (thread_rec): Update condition of when to get the
15834 context from the inferior. Rely on ContextFlags being set if it
15835 has already been retrieved. Only suspend the inferior thread if
15836 we haven't already. Warn if that fails.
15837 (continue_one_thread): s/suspend_count/suspended/. Only call
15838 ResumeThread once. Warn if that fails.
15839
158402007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15841
15842 * win32-low.c (win32_wait): Don't read from the inferior when it
15843 has already exited.
15844
158452007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15846
15847 * Makefile.in (win32_low_h): New variable.
15848 (win32-low.o): Add dependency on $(win32_low_h).
15849 (win32-arm-low.o, win32-i386-low.o): New rules.
15850
158512007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15852
15853 * hostio.c: Correct copyright year.
15854
158552007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15856
15857 * Makefile.in (OBS): Add hostio.o.
15858 (hostio.o): New rule.
15859 * server.h (handle_vFile): Declare.
15860 * hostio.c: New file.
15861 * server.c (handle_v_requests): Take packet_len and new_packet_len
15862 for binary packets. Call handle_vFile.
15863 (main): Update call to handle_v_requests.
15864
158652007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15866
15867 * linux-low.c: Include <sched.h>.
15868
158692007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15870
15871 * linux-low.c (linux_tracefork_grandchild): New.
15872 (linux_tracefork_child): Use clone.
15873 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15874
158752007-10-31 Joel Brobecker <brobecker@adacore.com>
15876
15877 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15878
158792007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15880
15881 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15882
158832007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15884
15885 * inferiors.c (change_inferior_id): Delete.
15886 (add_pid_to_list, pull_pid_from_list): New.
15887 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15888 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15889 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15890 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15891 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15892 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15893 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15894 (using_threads): Always set to 1.
15895 (handle_extended_wait): New.
15896 (add_process): Do not set TID.
15897 (linux_create_inferior): Set must_set_ptrace_flags.
15898 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15899 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15900 (linux_thread_alive): Rename TID argument to LWPID.
15901 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15902 (linux_wait_for_event): Do not use TID or check using_threads. Update
15903 call to dead_thread_notify. Call handle_extended_wait.
15904 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15905 (send_sigstop): Delete sigstop_sent.
15906 (wait_for_sigstop): Avoid TID.
15907 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15908 (linux_test_for_tracefork): New.
15909 (linux_lookup_signals): Use thread_db_active and
15910 linux_supports_tracefork_flag.
15911 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15912 * linux-low.h (get_process_thread): Avoid TID.
15913 (struct process_ifo): Move thread_known and tid to the end. Remove
15914 sigstop_sent.
15915 (linux_attach_lwp, thread_db_init): Update prototypes.
15916 * server.h (change_inferior_id): Delete prototype.
15917 (add_pid_to_list, pull_pid_from_list): New prototypes.
15918 * thread-db.c (thread_db_use_events): New.
15919 (find_first_thread): Rename to...
15920 (find_one_thread): ...this. Update callers and messages. Do not
15921 call fatal. Check thread_db_use_events. Do not call
15922 change_inferior_id or new_thread_notify.
15923 (maybe_attach_thread): Update. Do not call new_thread_notify.
15924 (thread_db_init): Set thread_db_use_events. Check use_events.
15925 * utils.c (fatal, warning): Correct message prefix.
15926
159272007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15928
15929 * Makefile.in (clean): Remove new files.
15930 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15931 (powerpc-64.o, powerpc-64.c): New rules.
15932 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15933 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15934 with SPE.
15935 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15936 SPE targets.
15937 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15938 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15939 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15940 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15941 (target_regsets): Add AltiVec and SPE register sets.
15942 * configure.ac: Check for AltiVec and SPE.
15943 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15944 (ppc_fill_vrregset, ppc_store_vrregset): New.
15945 (target_regsets): Add AltiVec register set.
15946 * configure: Regenerated.
15947
159482007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15949
15950 * linux-low.c (O_LARGEFILE): Define.
15951 (linux_read_memory): Use /proc/PID/mem.
15952 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15953 * configure, config.in: Regenerated.
15954
159552007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15956
15957 * linux-low.c (linux_wait_for_event): Do not pass signals while
15958 single-stepping.
15959
159602007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15961
15962 * win32-low.c (create_process): New.
15963 (win32_create_inferior): Use create_process instead of
15964 CreateProcess. If create_process failed retry appending an ".exe"
15965 suffix. Store the GetLastError result immediatelly after
15966 create_process calls and use it on the call to error.
15967
159682007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15969
15970 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15971
159722007-08-23 Joel Brobecker <brobecker@adacore.com>
15973
15974 * configure.ac: Switch license to GPLv3.
15975
159762007-08-01 Michael Snyder <msnyder@access-company.com>
15977
15978 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15979
159802007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15981
15982 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15983 typedef.
15984 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15985 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15986 CloseToolhelp32Snapshot.
15987 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15988 CloseToolhelp32Snapshot.
15989
159902007-07-27 Michael Snyder <michael.snyder@access-company.com>
15991
15992 * server.c (main): Check for inferior exit before main loop.
15993
159942007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15995
15996 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15997 instead of on tmp_desc.
15998
159992007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16000 Daniel Jacobowitz <dan@codesourcery.com>
16001
16002 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16003 (add_thread): Minor cleanups.
16004 (clear_inferiors): Move lower in the file. Clear the DLL
16005 list.
16006 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16007 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16008 (xml_escape_text): New.
16009 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16010 for qSupported.
16011 (handle_v_cont): Report errors.
16012 (gdbserver_version): Update.
16013 (main): Correct size of own_buf. Do not report initial DLL events.
16014 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16015 (unloaded_dll, xml_escape_text): New.
16016 * win32-low.c (enum target_waitkind): Update comments.
16017 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16018 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16019 (win32_EnumProcessModules, win32_GetModuleInformation)
16020 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16021 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16022 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16023 (win32_Module32First, win32_Module32Next, load_toolhelp)
16024 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16025 (get_child_debug_event): Handle DLL events.
16026 (win32_wait): Likewise.
16027
160282007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16029
16030 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16031 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16032
160332007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16034
16035 * win32-low.c (handle_output_debug_string): Ignore event if not
16036 waiting.
16037
160382007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16039
16040 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16041
160422007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16043
16044 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16045
160462007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16047
16048 * inferiors.c (change_inferior_id): Add comment.
16049 * linux-low.c (check_removed_breakpoint): Add an early
16050 prototype. Improve debug output.
16051 (linux_attach): Doc update.
16052 (linux_detach_one_process, linux_detach): Clean up before releasing
16053 each process.
16054 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16055 * linux-low.h (struct process_info): Doc improvement.
16056 * mem-break.c (delete_all_breakpoints): New.
16057 * mem-break.h (delete_all_breakpoints): New prototype.
16058 * thread-db.c (find_first_thread): New.
16059 (thread_db_create_event): Call it instead of
16060 thread_db_find_new_threads. Clean up unused variables.
16061 (maybe_attach_thread): Remove first thread handling.
16062 (thread_db_find_new_threads): Use find_first_thread.
16063 (thread_db_get_tls_address): Likewise.
16064
160652007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16066
16067 * thread-db.c (thread_db_find_new_threads): Add prototype.
16068 (thread_db_create_event): Check for the main thread before adding
16069 a new thread.
16070 (maybe_attach_thread): Only enable event reporting if TID == 0.
16071 (thread_db_get_tls_address): Check for new threads.
16072
160732007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16074
16075 * linux-low.c (linux_create_inferior): Try execv before execvp.
16076 * spu-low.c (spu_create_inferior): Likewise.
16077
160782007-06-13 Mike Frysinger <vapier@gentoo.org>
16079
16080 * linux-low.c (linux_create_inferior): Change execv to execvp.
16081 * spu-low.c (spu_create_inferior): Likewies.
16082
160832007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16084
16085 * Makefile.in (clean): Clean new files instead of deleted ones.
16086 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16087 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16088 rules.
16089 * configure.srv: Specify XML files and new regformats for MIPS and
16090 MIPS64 GNU/Linux.
16091 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16092 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16093 an entry for the restart register.
16094 (mips_cannot_fetch_register, mips_cannot_store_register)
16095 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16096 register names to match the XML descriptions.
16097 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16098 restart register instead of $0.
16099
161002007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16101 Markus Deuling <deuling@de.ibm.com>
16102
16103 * remote-utils.c (decode_xfer_write): New function.
16104 * server.h (decode_xfer_write): Add prototype.
16105 * server.c (handle_query): Add PACKET_LEN argument. Support
16106 qXfer:spu:read and qXfer:spu:write packets.
16107 (main): Pass packet_len to handle_query.
16108 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16109 * target.h (target_ops): Add qxfer_spu.
16110
161112007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16112
16113 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16114 accessing non-seekable spufs files.
16115
161162007-05-16 Markus Deuling <deuling@de.ibm.com>
16117
16118 * server.c (handle_query): Add reply for qC packet.
16119
161202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16121 Leo Zayas <lerele@champenstudios@com>
16122
16123 * server.h (check_remote_input_interrupt_request): New function.
16124 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16125 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16126 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16127 (check_remote_input_interrupt_request): New function.
16128 * server.h (check_remote_input_interrupt_request): Declare.
16129 * win32-low.c (winapi_DebugBreakProcess,
16130 winapi_GenerateConsoleCtrlEvent): New typedefs.
16131 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16132 to 250 ms.
16133 (win32_wait): Check for remote interrupt request
16134 with check_remote_input_interrupt_request.
16135 (win32_request_interrupt): New function.
16136 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16137
161382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16139
16140 * win32-low.c (debug_registers_changed,
16141 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16142 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16143 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16144 (thread_rec): Get context using the low target.
16145 (child_add_thread): Call thread_added on the low target,
16146 which does the same thing.
16147 (regptr): Delete.
16148 (do_initial_child_stuff): Remove debug registers references.
16149 Set context using the low target. Resume threads after
16150 setting the contexts.
16151 (child_continue): Remove dead variable. Remove debug
16152 registers references.
16153 (child_fetch_inferior_registers): Go through the low target.
16154 (do_child_store_inferior_registers): Remove.
16155 (child_store_inferior_registers): Go through the low target.
16156 (win32_resume): Remove debug registers references.
16157 Set context using the low target.
16158 (handle_exception): Change return type to void. Don't record
16159 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16160 first chance exception.
16161 (get_child_debug_event): Change return type to void. Remove
16162 goto loop. Always return after waiting for debug event.
16163 (win32_wait): Convert to switch statement. Handle spurious
16164 events.
16165
16166 * win32-i386-low.c (debug_registers_changed,
16167 debug_registers_used): New.
16168 (initial_stuff): Rename to ...
16169 (i386_initial_stuff): ... this. Clear debug registers
16170 state variables.
16171 (store_debug_registers): Delete.
16172 (i386_get_thread_context): New.
16173 (load_debug_registers): Delete.
16174 (i386_set_thread_context): New.
16175 (i386_thread_added): New.
16176 (single_step): Rename to ...
16177 (i386_single_step): ... this.
16178 (do_fetch_inferior_registers): Rename to ...
16179 (i386_fetch_inferior_register): ... this.
16180 (i386_store_inferior_register): New.
16181 (the_low_target): Adapt to new interface.
16182
16183 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16184 (arm_get_thread_context): New.
16185 (arm_set_thread_context): New.
16186 (regptr): New.
16187 (do_fetch_inferior_registers): Rename to ...
16188 (arm_fetch_inferior_register): ... this.
16189 (arm_store_inferior_register): New.
16190 (arm_wince_breakpoint): Reimplement as unsigned long.
16191 (arm_wince_breakpoint_len): Define.
16192 (the_low_target): Adapt to new interface.
16193
16194 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16195 load_debug_registers. Add get_thread_context, set_thread_context,
16196 thread_added and store_inferior_register. Rename
16197 fetch_inferior_registers to fetch_inferior_register.
16198 (regptr): Remove declaration.
16199
162002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16201
16202 * linux-low.c (linux_detach): Change return type to int. Return 0.
16203 * spu-low.c (spu_detach): Likewise.
16204
162052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16206
16207 * target.h (target_ops): Change return type of detach to int.
16208 Add join.
16209 (join_inferior): New.
16210 * server.c (main): Don't skip detach support on mingw32.
16211 If the inferior doesn't support detaching return error.
16212 Call join_inferior instead of using waitpid.
16213 * linux-low.c (linux_join): New.
16214 (linux_target_op): Add linux_join.
16215 * spu-low.c (spu_join): New.
16216 (spu_target_ops): Add spu_join.
16217 * win32-low.c (win32_detach): Adapt to new interface.
16218 Reopen current_process_handle before detaching. Issue a child
16219 resume before detaching.
16220 (win32_join): New.
16221 (win32_target_op): Add win32_join.
16222
162232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16224
16225 * win32-low.c (win32-attach): Fix return value.
16226 * target.h (target_ops): Describe ATTACH return values.
16227
162282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16229
16230 * win32-low.c (GETPROCADDRESS): Define.
16231 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16232 (winapi_DebugSetProcessKillOnExit): Likewise.
16233 (win32_create_inferior): Force usage of ansi CreateProcessA.
16234 (win32_attach): Use GETPROCADDRESS.
16235 (win32_detach): Likewise.
16236
162372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16238
16239 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16240
162412007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16242
16243 * win32-low.c: Commit leftover changes from 2007-03-29.
16244
162452007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16246
16247 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16248 fields short instead of int. Add explicit padding.
16249 (i387_cache_to_fsave): Remove unnecessary casts.
16250 (i387_fsave_to_cache): Doc fix.
16251 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16252
162532007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16254
16255 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16256 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16257
162582007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16259
16260 * configure.srv (arm*-*-mingw32ce*): Move near the other
16261 arm targets.
16262
162632007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16264
16265 * configure.ac: Add errno checking.
16266 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16267 sys/file.h and malloc.h.
16268 (AC_CHECK_DECLS): Add perror.
16269 (srv_mingwce): Handle.
16270 * configure.srv (i[34567]86-*-cygwin*): Add
16271 win32-i386-low.o to srv_tgtobj.
16272 (i[34567]86-*-mingw*): Likewise.
16273 (arm*-*-mingw32ce*): Add case.
16274 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16275 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16276 [__MINGW32CE__] (strerror): New function.
16277 [__MINGW32CE__] (errno): Define to GetLastError.
16278 [__MINGW32CE__] (COUNTOF): New macro.
16279 (remote_open): Remove extra close call.
16280 * mem-break.c (delete_breakpoint_at): New function.
16281 * mem-break.h (delete_breakpoint_at): Declare.
16282 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16283 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16284 [USE_WIN32API] (read, write): Add char* casts.
16285 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16286 * server.h: Include wincecompat.h on Windows CE.
16287 [HAVE_ERRNO_H]: Check.
16288 (perror): Declare if not declared.
16289 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16290 (perror_with_name): Remove errno declaration.
16291 * wincecompat.h: New.
16292 * wincecompat.c: New.
16293 * win32-low.h: New.
16294 * win32-arm-low.c: New.
16295 * win32-i386-low.c: New.
16296 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16297 (OUTMSG2): Make it safe.
16298 (_T): New macro.
16299 (COUNTOF): New macro.
16300 (NUM_REGS): Get it from the low target.
16301 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16302 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16303 (thread_rec): Let low target handle debug registers.
16304 (child_add_thread): Likewise.
16305 (child_init_thread_list): Likewise.
16306 (continue_one_thread): Likewise.
16307 (regptr): New.
16308 (do_child_fetch_inferior_registers): Move to ...
16309 * win32-i386-low.c: ... here, and rename to ...
16310 (do_fetch_inferior_registers): ... this.
16311 * win32-low.c (child_fetch_inferior_registers):
16312 Go through the low target.
16313 (do_child_store_inferior_registers): Use regptr.
16314 (strwinerror): New function.
16315 (win32_create_inferior): Handle Windows CE.
16316 Use strwinerror instead of strerror on Windows error
16317 codes. Add program to the error output.
16318 Don't close the main thread handle on Windows CE.
16319 (win32_attach): Use coredll.dll on Windows CE.
16320 (win32_kill): Close current process and current
16321 thread handles.
16322 (win32_detach): Use coredll.dll on Windows CE.
16323 (win32_resume): Let low target handle debug registers, and
16324 step request.
16325 (handle_exception): Add/Remove initial breakpoint. Avoid
16326 non-existant WSTOPSIG on Windows CE.
16327 (win32_read_inferior_memory): Cast to remove warning.
16328 (win32_arch_string): Go through the low target.
16329 (initialize_low): Call set_breakpoint_data with the low
16330 target's breakpoint.
16331 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16332 FOP_REGNUM, mappings): Move to ...
16333 * win32-i386-low.c: ... here.
16334 * win32-low.c (win32_thread_info): Move to ...
16335 * win32-low.h: ... here.
16336 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16337 win32-arm-low.c and wincecompat.c.
16338 (all:): Add $EXEEXT.
16339 (install-only:): Likewise.
16340 (gdbserver:): Likewise.
16341 (gdbreplay:): Likewise.
16342 * config.in: Regenerate.
16343 * configure: Regenerate.
16344
163452007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16346
16347 * win32-low.c: Rename typedef thread_info to
16348 win32_thread_info throughout.
16349
163502007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16351
16352 * win32-i386-low.c: Rename to ...
16353 * win32-low.c: ... this.
16354 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16355 * Makefile.in: Likewise.
16356
163572007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16358
16359 * remote-utils.c (monitor_output): Constify msg parameter.
16360 * server.h (monitor_output): Likewise.
16361 * win32-i386-low.c (handle_output_debug_string): New.
16362 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16363 handle_output_debug_string.
16364 (get_child_debug_event): Likewise.
16365
163662007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16367
16368 * server.c (main): Correct strtoul check.
16369
163702007-03-27 Jon Ringle <jon@ringle.org>
16371
16372 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16373
163742007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16375
16376 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16377
163782007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16379
16380 * terminal.h: Check HAVE_SGTTY_H.
16381
163822007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16383
16384 * remote-utils.c (remote_open): Print out the assigned port number.
16385
163862007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16387
16388 * remote-utils.c (monitor_output): New function.
16389 * server.c (debug_threads): Define here.
16390 (monitor_show_help): New function.
16391 (handle_query): Handle qRcmd.
16392 (main): Do not handle 'd' packet.
16393 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16394 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16395 of debug_threads.
16396
163972007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16398
16399 * Makefile.in (EXEEXT): New.
16400 (clean): Use $(EXEEXT).
16401
164022007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16403
16404 * target.h (target_ops): Rename send_signal to request_interrupt,
16405 and remove enum target_signal parameter.
16406 * linux-low.c (linux_request_interrupt): Rename from
16407 linux_send_signal, and always send SIGINT.
16408 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16409 and always send SIGINT.
16410 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16411 of send_signal.
16412 (input_interrupt): Likewise.
16413
164142007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16415
16416 * server.c (get_features_xml): Check if target implemented
16417 arch_string.
16418 * win32-i386-low.c (win32_arch_string): New.
16419 (win32_target_ops): Add win32_arch_string as arch_string member.
16420
164212007-02-22 Markus Deuling <deuling@de.ibm.com>
16422
16423 * spu-low.c (spu_arch_string): New.
16424 (spu_target_ops): Add spu_arch_string.
16425
164262007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16427
16428 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16429 * configure.ac: Do not check for terminal.h.
16430 * configure, config.in: Regenerated.
16431
164322007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16433
16434 * Makefile.in (OBS): Add $(XML_BUILTIN).
16435 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16436 (clean): Update.
16437 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16438 (arm-with-iwmmxt.c): New.
16439 * config.in, configure: Regenerate.
16440 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16441 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16442 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16443 (arm*-*-linux*): Add iWMMXt and regset support.
16444 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16445 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16446 (arm_store_wmmxregset, target_regsets): New.
16447 * server.c (get_features_xml): Take annex argument. Check builtin
16448 XML documents.
16449 (handle_query): Handle multiple annexes.
16450
164512007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16452
16453 * remote-utils.c [USE_WIN32API] (read, write): Define.
16454 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16455 write.
16456
164572007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16458
16459 * linux-i386-low.c (the_low_target): Set arch_string.
16460 * linux-x86-64-low.c (the_low_target): Likewise.
16461 * linux-low.c (linux_arch_string): New.
16462 (linux_target_ops): Add it.
16463 * linux-low.h (struct linux_target_ops): Add arch_string.
16464 * server.c (write_qxfer_response): Use const void * for DATA.
16465 (get_features_xml): New.
16466 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16467 * target.h (struct target_ops): Add arch_string method.
16468
164692007-01-03 Denis Pilat <denis.pilat@st.com>
16470 Daniel Jacobowitz <dan@codesourcery.com>
16471
16472 * linux-low.c (linux_kill): Handle being called with no threads.
16473 * win32-i386-low.c (win32_kill): Likewise.
16474 (get_child_debug_event): Clear current_process_handle.
16475
164762006-12-30 Denis PILAT <denis.pilat@st.com>
16477 Daniel Jacobowitz <dan@codesourcery.com>
16478
16479 * remote-utils.c (remote_open): Check the type of specified
16480 serial port devices before opening them.
16481 * server.c (main): Kill the inferior if an error occurs during
16482 the first remote_open.
16483
164842006-12-05 Markus Deuling <deuling@de.ibm.com>
16485
16486 * README: Update supported targets.
16487
164882006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16489
16490 * Makefile.in (clean): Remove reg-mips64.c.
16491 (reg-mips64.c, reg-mips64.o): New rules.
16492 * configure.srv: Handle mips64. Include regset support for mips.
16493 * linux-mips-low.c (union mips_register): New.
16494 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16495 (mips_breakpoint, mips_breakpoint_at): Use int.
16496 (mips_collect_register, mips_supply_register)
16497 (mips_collect_register_32bit, mips_supply_register_32bit)
16498 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16499 (mips_store_fpregset, target_regsets): New.
16500 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16501
165022006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16503
16504 * configure.srv: Add target "spu*-*-*".
16505 * Makefile.in (clean): Remove reg-spu.c.
16506 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16507 * spu-low.c: New file.
16508
165092006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16510
16511 * configure.ac: Correct td_thr_tls_get_addr test.
16512 * configure: Regenerated.
16513
165142006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16515
16516 * linux-low.c (linux_wait_for_event): Reformat. Use the
16517 pass_signals array.
16518 * remote-utils.c (decode_address_to_semicolon): New.
16519 * server.c (pass_signals, handle_general_set): New.
16520 (handle_query): Mention QPassSignals for qSupported.
16521 (main): Call handle_general_set.
16522 * server.h (pass_signals, decode_address_to_semicolon): New.
16523
165242006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16525
16526 * server.c (handle_query): Correct error handling for read_auxv.
16527
165282005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16529
16530 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16531 and srv_linux_thread_db to yes.
16532 * linux-s390-low.c (s390_fill_gregset): New function.
16533 (target_regsets): Define data structure.
16534
165352006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16536
16537 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16538 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16539 * config.in, configure: Regenerated.
16540 * inferiors.c (gdb_id_to_thread): New function.
16541 (gdb_id_to_thread_id): Use it.
16542 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16543 * linux-low.h (struct process_info): Add th member.
16544 (thread_db_get_tls_address): New prototype.
16545 * remote-utils.c (decode_address): Make non-static.
16546 * server.c (handle_query): Handle qGetTLSAddr.
16547 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16548 * target.h (struct target_ops): Add get_tls_address.
16549 * thread-db.c (maybe_attach_thread): Save the thread handle.
16550 (thread_db_get_tls_address): New.
16551
165522006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16553
16554 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16555 (linux_resume_one_process): Take a siginfo_t *. Update all
16556 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16557 (struct pending_signals): Add a siginfo_t.
16558 (linux_wait_for_process): Always set last_status.
16559 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16560 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16561 * linux-low.h (struct process_info): Add last_status.
16562
165632006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16564
16565 * remote-utils.c (try_rle): New function.
16566 (putpkt_binary): Use it.
16567
165682006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16569
16570 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16571 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16572 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16573 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16574 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16575 point registers.
16576
165772006-08-08 Richard Sandiford <richard@codesourcery.com>
16578
16579 * server.c (terminal_fd): New variable.
16580 (old_foreground_pgrp): Likewise.
16581 (restore_old_foreground_pgrp): New function.
16582 (start_inferior): Record the terminal file descriptor in terminal_fd
16583 and its original foreground group in old_foreground_pgrp. Register
16584 restore_old_foreground_pgrp with atexit().
16585
165862006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16587
16588 * server.c (handle_query): Correct qPart to qXfer.
16589
165902006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16591
16592 * configure.ac: Check for more headers which are missing on
16593 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16594 * configure.srv: Add Cygwin and mingw32.
16595 * remote-utils.c: Don't include headers unconditionally which
16596 are missing on mingw32. Include <winsock.h> for mingw32.
16597 (remote_open): Adjust for mingw32 support. Flush
16598 standard error after writing to it.
16599 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16600 (unblock_async_io, enable_async_io, disable_async_io)
16601 (readchar, getpkt): Update for Winsock support.
16602 (prepare_resume_reply): Expect a protocol signal number.
16603 * server.c: Disable <sys/wait.h> on mingw32.
16604 (start_inferior): Adjust for mingw32 support. Flush
16605 standard error after writing to it.
16606 (attach_inferior): Likewise. Use protocol signal
16607 numbers.
16608 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16609 and names.
16610 * win32-i386-low.c: New file.
16611 * Makefile.in (XM_CLIBS): Set.
16612 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16613 (win32-i386-low.o): New dependency rule.
16614 * linux-low.c (linux_wait): Use target signal numbers.
16615 * target.h (struct target_ops): Doc fix.
16616 * server.h (target_signal_to_name): New prototype.
16617 * gdbreplay.c: Don't include headers unconditionally which
16618 are missing on mingw32. Include <winsock.h> for mingw32.
16619 (remote_close, remote_open): Adjust for Winsock support.
16620 * configure, config.in: Regenerated.
16621
166222006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16623
16624 * server.c (decode_xfer_read, write_qxfer_response): New.
16625 (handle_query): Take a packet length argument. Handle
16626 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16627 the qSupported response.
16628 (main): Update call to handle_query.
16629
166302006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16631
16632 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16633 (putpkt_binary): Renamed from putpkt and adjusted for binary
16634 data.
16635 (putpkt): New wrapper for putpkt_binary.
16636 (readchar): Don't mask off the high bit.
16637 (decode_X_packet): New function.
16638 * server.c (main): Call putpkt_binary if a handler sets the packet
16639 length. Save the length of the incoming packet. Handle 'X'.
16640 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16641
166422006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16643
16644 * server.c (handle_query): Handle qSupported.
16645
166462006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16647
16648 * remote-utils.c (all_symbols_looked_up): New variable.
16649 (look_up_one_symbol): Check it.
16650 * server.h (look_up_one_symbol): New declaration.
16651 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16652
166532006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16654
16655 * Makefile.in (linux-arm-low.o): Update dependencies.
16656 * linux-arm-low.c: Include "gdb_proc_service.h".
16657 (PTRACE_GET_THREAD_AREA): Define.
16658 (ps_get_thread_area): New function.
16659
166602006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16661
16662 * configure.srv (m68k*-*-uclinux*): New target.
16663 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16664 (linux_resume_one_process): Remove extraneous cast.
16665 (linux_read_offsets): New.
16666 (linux_target_op): Add linux_read_offsets on mmuless systems.
16667 * server.c (handle_query): Add qOffsets logic.
16668 * target.h (struct target_ops): Add read_offsets.
16669
166702006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16671
16672 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16673 (PTRACE_GET_THREAD_AREA): Define.
16674 (ps_get_thread_area): New function.
16675 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16676 (linux-x86-64-low.o): Update.
16677
166782006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16679
16680 * configure.ac: Remove checks for prfpregset_t.
16681 * gdb_proc_service.h: New file.
16682 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16683 new "gdb_proc_service.h".
16684 * proc-service.c: Likewise.
16685 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16686 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16687 * Makefile.in (gdb_proc_service_h): Updated.
16688 * configure, config.in: Regenerated.
16689
166902006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16691
16692 * remote-utils.c (prepare_resume_reply): Move declaration
16693 of gdb_id_from_wait to the top of the block.
16694
166952006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16696
16697 * linux-low.c (regsets_store_inferior_registers): Read the regset
16698 from the target before filling it.
16699
167002006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16701
16702 * server.c (attach_inferior): Return SIGTRAP for a successful
16703 attach.
16704
167052006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16706
16707 * Makefile.in (OBS): Add version.o.
16708 (STAGESTUFF): Delete.
16709 (version.o): Add dependencies.
16710 (version.c): Replace rule.
16711 (clean): Remove version.c.
16712 * server.c (gdbserver_version): New.
16713 (gdbserver_usage): Use printf.
16714 (main): Handle --version and --help.
16715 * server.h (version, host_name): Add declarations.
16716
167172005-12-23 Eli Zaretskii <eliz@gnu.org>
16718
16719 * linux-arm-low.c:
16720 * linux-arm-low.c:
16721 * inferiors.c:
16722 * i387-fp.h:
16723 * i387-fp.c:
16724 * gdbreplay.c:
16725 * regcache.c:
16726 * proc-service.c:
16727 * mem-break.h:
16728 * mem-break.c:
16729 * linux-x86-64-low.c:
16730 * linux-sh-low.c:
16731 * linux-s390-low.c:
16732 * linux-ppc64-low.c:
16733 * linux-ppc-low.c:
16734 * linux-mips-low.c:
16735 * linux-m68k-low.c:
16736 * linux-m32r-low.c:
16737 * linux-low.h:
16738 * linux-low.c:
16739 * linux-ia64-low.c:
16740 * linux-i386-low.c:
16741 * linux-crisv32-low.c:
16742 * thread-db.c:
16743 * terminal.h:
16744 * target.h:
16745 * target.c:
16746 * server.h:
16747 * server.c:
16748 * remote-utils.c:
16749 * regcache.h:
16750 * utils.c:
16751 * Makefile.in:
16752 * configure.ac:
16753 * gdbserver.1: Add (C) after Copyright. Update the FSF
16754 address.
16755
167562005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16757
16758 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16759 (arm_breakpoint_at): Recognize both breakpoints.
16760 (the_low_target): Use the correct breakpoint instruction.
16761
167622005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16763
16764 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16765 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16766 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16767 (the_low_target): Update.
16768
167692005-10-25 Andreas Schwab <schwab@suse.de>
16770
16771 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16772
16773 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16774 (ia64_num_regs): Reduce to 462.
16775
167762005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16777
16778 * acinclude.m4: Correct quoting.
16779 * aclocal.m4: Regenerated.
16780
16781 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16782 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16783 (thread_db_init): Call thread_db_err_str.
16784 * configure.ac: Check for TD_VERSION.
16785 * config.in, configure: Regenerated.
16786
167872005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16788
16789 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16790
167912005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16792
16793 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16794 is not available. Define HAVE_PTRACE_GETREGS if it is.
16795 * config.in, configure: Regenerated.
16796 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16797 * linux-i386-low.c, linux-m68k-low.c: Update to use
16798 HAVE_PTRACE_GETREGS.
16799 * linux-low.c (regsets_fetch_inferior_registers)
16800 (regsets_store_inferior_registers): Only return 0 if we processed
16801 GENERAL_REGS.
16802 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16803 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16804
168052005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16806
16807 * inferiors.c (struct thread_info): Add gdb_id.
16808 (add_thread): Add gdb_id argument.
16809 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16810 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16811 calls to add_thread.
16812 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16813 * server.c (handle_query): Use thread_to_gdb_id.
16814 (handle_v_cont, main): Use gdb_id_to_thread_id.
16815 * server.h (add_thread): Update prototype.
16816 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16817 prototypes.
16818
168192005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16820
16821 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16822 left-padded registers.
16823 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16824 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16825
168262005-07-01 Steve Ellcey <sje@cup.hp.com>
16827
16828 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16829 * configure: Regenerate.
16830 * config.in: Regenerate.
16831 * server.h (NEED_DECLARATION_STRERROR):
16832 Replace with !HAVE_DECL_STRERROR.
16833
168342005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16835
16836 * linux-low.c (linux_wait, linux_send_signal): Don't test
16837 an unsigned long variable for > 0 if it could be MAX_ULONG.
16838 * server.c (myresume): Likewise.
16839 * target.c (set_desired_inferior): Likewise.
16840
168412005-06-13 Mark Kettenis <kettenis@gnu.org>
16842
16843 * configure.ac: Simplify and improve check for socklen_t.
16844 * configure, config.in: Regenerate.
16845
168462005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16847
16848 * acconfig.h: Remove.
16849 * configure.ac: Add a test for socklen_t. Use three-argument
16850 AC_DEFINE throughout.
16851 * config.in: Regenerated using autoheader 2.59.
16852 * configure: Regenerated.
16853
16854 * gdbreplay.c (socklen_t): Provide a default.
16855 (remote_open): Use socklen_t.
16856 * remote-utils.c (socklen_t): Provide a default.
16857 (remote_open): Use socklen_t.
16858 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16859 unsigned char.
16860
16861 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16862 char for buffers.
16863 * linux-low.c (linux_read_memory, linux_write_memory)
16864 (linux_read_auxv): Likewise.
16865 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16866 (check_mem_write): Likewise.
16867 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16868 Likewise.
16869 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16870 (registers_from_string, register_data): Likewise.
16871 * server.c (handle_query, main): Likewise.
16872 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16873 (decode_M_packet): Likewise.
16874 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16875 * target.h (struct target_ops): Update read_memory, write_memory,
16876 and read_auxv.
16877 (read_inferior_memory, write_inferior_memory): Update.
16878 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16879 to unsigned char *.
16880 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16881 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16882 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16883 linux-s390-low.c, linux-sh-low.c: Update for changes in
16884 read_inferior_memory and the_low_target->breakpoint.
16885
168862005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16887
16888 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16889 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16890 * configure.srv: Add powerpc64-*-linux*.
16891 * linux-ppc64-low.c: New file.
16892
168932005-05-23 Orjan Friberg <orjanf@axis.com>
16894
16895 * linux-cris-low.c: New file with support for CRIS.
16896 * linux-crisv32-low.c: Ditto for CRISv32.
16897 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16898 (clean): Add reg-cris.c and reg-crisv32.c.
16899 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16900 reg-crisv32.o, and reg-crisv32.c to make rules.
16901 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16902 recognized targets.
16903
169042005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16905
16906 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16907 of sizeof (PTRACE_XFER_TYPE).
16908 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16909
169102005-05-12 Orjan Friberg <orjanf@axis.com>
16911
16912 * target.h (struct target_ops): Add insert_watchpoint,
16913 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16914 pointers for hardware watchpoint support.
16915 * linux-low.h (struct linux_target_ops): Ditto.
16916 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16917 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16918 to linux_target_ops.
16919 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16920 reply packet.
16921 * server.c (main): Recognize 'Z' and 'z' packets.
16922
169232005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16924
16925 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16926 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16927 (the_low_target): Add new members.
16928
169292005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16930
16931 * proc-service.c (ps_lgetregs): Search all_processes instead of
16932 all_threads.
16933
169342005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16935
16936 * server.c (start_inferior): Change return type to int.
16937 (attach_inferior): Change sigptr to int *.
16938 (handle_v_cont, handle_v_requests): Change signal to int *.
16939 (main): Change signal to int.
16940
169412005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16942
16943 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16944 * configure.srv: Add m32r*-*-linux*.
16945 * linux-m32r-low.c: New file.
16946
169472005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16948
16949 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16950
169512005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16952
16953 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16954 Take unsigned long arguments for PIDs.
16955 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16956 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16957 (wait_for_sigstop, linux_resume_one_process)
16958 (regsets_fetch_inferior_registers, linux_send_signal)
16959 (linux_read_auxv): Likewise. Update the types of variables holding
16960 PIDs. Update format string specifiers.
16961 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16962 * remote-utils.c (prepare_resume_reply): Likewise.
16963 * server.c (cont_thread, general_thread, step_thread)
16964 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16965 unsigned long.
16966 (handle_query): Update format specifiers.
16967 (handle_v_cont, main): Use strtoul for thread IDs.
16968 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16969 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16970 (general_thread, step_thread, thread_from_wait)
16971 (old_thread_from_wait): Update.
16972 * target.h (struct thread_resume): Use unsigned long for THREAD.
16973 (struct target_ops): Use unsigned long for arguments to attach and
16974 thread_alive.
16975
169762005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16977
16978 * acinclude.m4: Include bfd/bfd.m4 directly.
16979 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16980 <agriffis@toolchain.org>.
16981 * aclocal.m4, configure: Regenerated.
16982
169832005-01-07 Andrew Cagney <cagney@gnu.org>
16984
16985 * configure.ac: Rename configure.in, require autoconf 2.59.
16986 * configure: Re-generate.
16987
169882004-12-08 Daniel Jacobowitz <dan@debian.org>
16989
16990 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16991 LIBS when finished.
16992 * aclocal.m4: Regenerated.
16993 * configure: Regenerated.
16994
169952004-11-21 Andreas Schwab <schwab@suse.de>
16996
16997 * linux-m68k-low.c (m68k_num_gregs): Define.
16998 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16999 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17000 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17001 (m68k_breakpoint_at): New. Add to the_low_target.
17002
17003 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17004 srv_linux_thread_db to yes.
17005
170062004-10-20 Joel Brobecker <brobecker@gnat.com>
17007
17008 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17009 (ARCH_SET_FS): Likewise.
17010 (ARCH_GET_FS): Likewise.
17011 (ARCH_GET_GS): Likewise.
17012
170132004-10-16 Daniel Jacobowitz <dan@debian.org>
17014
17015 * linux-i386-low.c (ps_get_thread_area): New.
17016 * linux-x86-64-low.c (ps_get_thread_area): New.
17017 * linux-low.c: Include <sys/syscall.h>.
17018 (linux_kill_one_process): Don't kill the first thread here.
17019 (linux_kill): Kill the first thread here.
17020 (kill_lwp): New function.
17021 (send_sigstop, linux_send_signal): Use it.
17022 * proc-service.c: Clean up #ifdefs.
17023 (fpregset_info): Delete.
17024 (ps_lgetregs): Update and enable implementation.
17025 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17026 implementations.
17027 * remote-utils.c (struct sym_cache, symbol_cache): New.
17028 (input_interrupt): Print a clearer message.
17029 (async_io_enabled): New variable.
17030 (enable_async_io, disable_async_io): Use it. Update comments.
17031 (look_up_one_symbol): Use the symbol cache.
17032 * thread-db.c (thread_db_look_up_symbols): New function.
17033 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17034
170352004-10-16 Daniel Jacobowitz <dan@debian.org>
17036
17037 * configure.in: Test for -rdynamic.
17038 * configure: Regenerated.
17039 * Makefile (INTERNAL_LDFLAGS): New.
17040 (gdbserver, gdbreplay): Use it.
17041
170422004-09-02 Andrew Cagney <cagney@gnu.org>
17043
17044 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17045
170462004-03-23 Daniel Jacobowitz <drow@mvista.com>
17047
17048 * linux-low.c (linux_wait): Clear all_processes list also.
17049
170502004-03-12 Daniel Jacobowitz <drow@mvista.com>
17051
17052 * linux-low.c: Include <errno.h>. Remove extern declaration of
17053 errno.
17054
170552004-03-12 Daniel Jacobowitz <drow@mvista.com>
17056
17057 * gdbreplay.c, server.h, utils.c: Update copyright years.
17058
170592004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17060
17061 * server.c (main): Print child status or termination signal from
17062 variable 'signal', not 'sig'.
17063
170642004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17065
17066 * linux-low.c (linux_read_memory): Change return type to
17067 int. Check for and return error from ptrace().
17068 * target.c (read_inferior_memory): Change return type to int. Pass
17069 back return status from the_target->read_memory().
17070 * target.h (struct target_ops): Adapt *read_memory() prototype.
17071 Update comment.
17072 (read_inferior_memory): Adapt prototype.
17073 * server.c (main): Return an error packet if
17074 read_inferior_memory() returns an error.
17075
170762004-03-04 Daniel Jacobowitz <drow@mvista.com>
17077
17078 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17079 Unify with other clean targets.
17080
170812004-02-29 Daniel Jacobowitz <drow@mvista.com>
17082
17083 * server.c (handle_v_cont): Call set_desired_inferior.
17084
170852004-02-29 Daniel Jacobowitz <drow@mvista.com>
17086
17087 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17088
170892004-02-29 Daniel Jacobowitz <drow@mvista.com>
17090
17091 * linux-low.c (linux_wait): Unblock async I/O.
17092 (linux_resume): Block and enable async I/O.
17093 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17094 * server.h (block_async_io, unblock_async_io): Add prototypes.
17095
170962004-02-29 Daniel Jacobowitz <drow@mvista.com>
17097
17098 * remote-utils.c (remote_open): Print a status notice after
17099 opening a TCP port.
17100 * server.c (attach_inferior): Print a status notice after
17101 attaching.
17102
171032004-02-29 Daniel Jacobowitz <drow@mvista.com>
17104
17105 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17106
171072004-02-26 Daniel Jacobowitz <drow@mvista.com>
17108
17109 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17110 error packet.
17111 * server.c, target.h: Update copyright years.
17112
171132004-02-25 Roland McGrath <roland@redhat.com>
17114
17115 * target.h (struct target_ops): New member `read_auxv'.
17116 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17117 * linux-low.c (linux_read_auxv): New function.
17118 (linux_target_ops): Initialize `read_auxv' member to that.
17119
171202004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17121
17122 Committed by Jim Blandy <jimb@redhat.com>.
17123
17124 * linux-s390-low.c (s390_num_regs): Update.
17125 (s390_regmap): Remove control registers. Use __s390x__ predefine
17126 instead of GPR_SIZE to distiguish s390 and s390x targets.
17127
171282004-01-31 Daniel Jacobowitz <drow@mvista.com>
17129
17130 * linux-low.c: Update copyright year.
17131 (check_removed_breakpoint): Clear pending_is_breakpoint.
17132 (linux_set_resume_request, linux_queue_one_thread)
17133 (resume_status_pending_p): New functions.
17134 (linux_continue_one_thread): Use process->resume.
17135 (linux_resume): Only resume threads if there are no pending events.
17136 * linux-low.h (struct process_info): Add resume request
17137 pointer.
17138
171392004-01-30 Daniel Jacobowitz <drow@mvista.com>
17140
17141 * regcache.c (new_register_cache): Clear the allocated register
17142 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17143
171442003-10-13 Daniel Jacobowitz <drow@mvista.com>
17145
17146 * linux-low.c (linux_resume): Take a struct thread_resume *
17147 argument.
17148 (linux_wait): Update call.
17149 (resume_ptr): New static variable.
17150 (linux_continue_one_thread): Renamed from
17151 linux_continue_one_process. Use resume_ptr.
17152 (linux_resume): Use linux_continue_one_thread.
17153 * server.c (handle_v_cont, handle_v_requests): New functions.
17154 (myresume): New function.
17155 (main): Handle 'v' case.
17156 * target.h (struct thread_resume): New type.
17157 (struct target_ops): Change argument of "resume" to struct
17158 thread_resume *.
17159 (myresume): Delete macro.
17160
171612003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17162
17163 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17164 (uninstall): Support DESTDIR.
17165
17166Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17167
17168 * configure.srv: Add xscale*linux copy of arm*linux entry.
17169
171702003-07-24 Daniel Jacobowitz <drow@mvista.com>
17171
17172 * linux-arm-low.c (arm_reinsert_addr): New function.
17173 (the_low_target): Add arm_reinsert_addr.
17174
171752003-07-08 Mark Kettenis <kettenis@gnu.org>
17176
17177 * mem-break.c: Remove whitespace at end of file.
17178
171792003-06-28 Daniel Jacobowitz <drow@mvista.com>
17180
17181 * configure.in: Check whether we need to prototype strerror.
17182 * server.h: Optionally prototype strerror.
17183 * gdbreplay.c (perror_with_name): Use strerror.
17184 * linux-low.c (linux_attach_lwp): Use strerror.
17185 * utils.c (perror_with_name): Use strerror.
17186 * config.in, configure: Regenerated.
17187
171882003-06-28 Daniel Jacobowitz <drow@mvista.com>
17189
17190 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17191 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17192
171932003-06-20 Daniel Jacobowitz <drow@mvista.com>
17194
17195 * Makefile.in (SFILES): Update.
17196 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17197 low-sun3.c: Remove files.
17198
171992003-06-17 Daniel Jacobowitz <drow@mvista.com>
17200
17201 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17202 (linux_detach_one_process, linux_detach): New functions.
17203 (linux_target_ops): Add linux_detach.
17204 * server.c (main): Handle 'D' packet.
17205 * target.h (struct target_ops): Add "detach" member.
17206 (detach_inferior): Define.
17207
172082003-06-13 Mark Kettenis <kettenis@gnu.org>
17209
17210 From Kelley Cook <kelleycook@wideopenwest.com>:
17211 * configure.srv: Accept i[34567]86 variants.
17212
172132003-06-05 Daniel Jacobowitz <drow@mvista.com>
17214
17215 * linux-low.c (linux_wait_for_event): Correct comment typos.
17216 (linux_resume_one_process): Call check_removed_breakpoint.
17217 (linux_send_signal): New function.
17218 (linux_target_ops): Add linux_send_signal.
17219 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17220 of kill.
17221 * target.h (struct target_ops): Add send_signal.
17222
172232003-05-29 Jim Blandy <jimb@redhat.com>
17224
17225 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17226 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17227 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17228 away part of the register's value.
17229
172302003-03-26 Daniel Jacobowitz <drow@mvista.com>
17231
17232 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17233 (linux_wait_for_event, linux_init_signals): Likewise.
17234
172352003-03-17 Daniel Jacobowitz <drow@mvista.com>
17236
17237 * configure.in: Check for stdlib.h.
17238 * configure: Regenerated.
17239 * config.in: Regenerated.
17240
172412003-01-04 Andreas Schwab <schwab@suse.de>
17242
17243 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17244
172452003-01-02 Andrew Cagney <ac131313@redhat.com>
17246
17247 * Makefile.in: Remove obsolete code.
17248
172492002-11-20 Daniel Jacobowitz <drow@mvista.com>
17250
17251 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17252 defined(PT_FPR0_HI).
17253
172542002-11-17 Stuart Hughes <seh@zee2.com>
17255
17256 * linux-arm-low.c (arm_num_regs): Increase.
17257 (arm_regmap): Include status register.
17258
172592002-11-17 Daniel Jacobowitz <drow@mvista.com>
17260
17261 * linux-low.c (register_addr): Remove incorrect -1 check.
17262
172632002-08-29 Daniel Jacobowitz <drow@mvista.com>
17264
17265 * linux-low.c (linux_create_inferior): Call setpgid. Return
17266 the new PID.
17267 (unstopped_p, linux_signal_pid): Remove.
17268 (linux_target_ops): Remove linux_signal_pid.
17269 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17270 global instead of target method.
17271 * target.h (struct target_ops): Remove signal_pid. Update comment
17272 for create_inferior.
17273 * server.c (signal_pid): New variable.
17274 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17275 gdbserver. Set the child to be the foreground process group.
17276 (attach_inferior): Set signal_pid.
17277
172782002-08-23 Daniel Jacobowitz <drow@mvista.com>
17279
17280 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17281
172822002-08-20 Jim Blandy <jimb@redhat.com>
17283
17284 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17285 default for this.
17286
172872002-08-01 Andrew Cagney <cagney@redhat.com>
17288
17289 * Makefile.in: Make chill references obsolete.
17290
172912002-07-24 Kevin Buettner <kevinb@redhat.com>
17292
17293 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17294 * configure: Regenerate.
17295 * config.in: Regenerate.
17296
172972002-07-09 David O'Brien <obrien@FreeBSD.org>
17298
17299 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17300 (perror_with_name, remote_close, remote_open, expect, play): Static.
17301
173022002-07-04 Michal Ludvig <mludvig@suse.cz>
17303
17304 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17305 byte offsets instead of an array of indexes.
17306 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17307
173082002-06-13 Daniel Jacobowitz <drow@mvista.com>
17309
17310 * regcache.c: Add comment.
17311
173122002-06-11 Daniel Jacobowitz <drow@mvista.com>
17313
17314 * thread-db.c: New file.
17315 * proc-service.c: New file.
17316 * acinclude.m4: New file.
17317 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17318 proc-service.o, and thread-db.o.
17319 (linux-low.o): Add USE_THREAD_DB.
17320 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17321 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17322 * aclocal.m4: Regenerated.
17323 * config.in: Regenerated.
17324 * configure: Regenerated.
17325 * configure.in: Check for proc_service.h, sys/procfs.h,
17326 thread_db.h, and linux/elf.h headrs.
17327 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17328 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17329 Check for -lthread_db and thread support.
17330 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17331 PowerPC, and SuperH.
17332 * i387-fp.c: Constify arguments.
17333 * i387-fp.h: Likewise.
17334 * inferiors.c: (struct thread_info): Renamed from
17335 `struct inferior_info'. Remove PID member. Use generic inferior
17336 list header. All uses updated.
17337 (inferiors, signal_pid): Removed.
17338 (all_threads): New variable.
17339 (get_thread): Define.
17340 (add_inferior_to_list): New function.
17341 (for_each_inferior): New function.
17342 (change_inferior_id): New function.
17343 (add_inferior): Removed.
17344 (remove_inferior): New function.
17345 (add_thread): New function.
17346 (free_one_thread): New function.
17347 (remove_thread): New function.
17348 (clear_inferiors): Use for_each_inferior and free_one_thread.
17349 (find_inferior): New function.
17350 (find_inferior_id): New function.
17351 (inferior_target_data): Update argument type.
17352 (set_inferior_target_data): Likewise.
17353 (inferior_regcache_data): Likewise.
17354 (set_inferior_regcache_data): Likewise.
17355 * linux-low.c (linux_bp_reinsert): Remove.
17356 (all_processes, stopping_threads, using_thrads)
17357 (struct pending_signals, debug_threads, pid_of): New.
17358 (inferior_pid): Replace with macro.
17359 (struct inferior_linux_data): Remove.
17360 (get_stop_pc, add_process): New functions.
17361 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17362 Use add_process and add_thread.
17363 (linux_attach_lwp): New function, based on old linux_attach. Use
17364 add_process and add_thread. Set stop_expected for new threads.
17365 (linux_attach): New function.
17366 (linux_kill_one_process): New function.
17367 (linux_kill): Kill all LWPs.
17368 (linux_thread_alive): Use find_inferior_id.
17369 (check_removed_breakpoints, status_pending_p): New functions.
17370 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17371 Update. Use WNOHANG. Wait for cloned processes also. Update process
17372 struct for the found process.
17373 (linux_wait_for_event): New function.
17374 (linux_wait): Use it. Support LWPs.
17375 (send_sigstop, wait_for_sigstop, stop_all_processes)
17376 (linux_resume_one_process, linux_continue_one_process): New functions.
17377 (linux_resume): Support LWPs.
17378 (REGISTER_RAW_SIZE): Remove.
17379 (fetch_register): Use register_size instead. Call supply_register.
17380 (usr_store_inferior_registers): Likewise. Call collect_register.
17381 Fix recursive case.
17382 (regsets_fetch_inferior_registers): Improve error message.
17383 (regsets_store_inferior_registers): Add debugging.
17384 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17385 (unstopped_p, linux_signal_pid): New functions.
17386 (linux_target_ops): Add linux_signal_pid.
17387 (linux_init_signals): New function.
17388 (initialize_low): Call it. Initialize using_threads.
17389 * regcache.c (inferior_regcache_data): Add valid
17390 flag.
17391 (get_regcache): Fetch registers lazily. Add fetch argument
17392 and update all callers.
17393 (regcache_invalidate_one, regcache_invalidate): New
17394 functions.
17395 (new_register_cache): Renamed from create_register_cache.
17396 Return the new regcache.
17397 (free_register_cache): Change argument to a void *.
17398 (registers_to_string, registers_from_string): Call get_regcache
17399 with fetch flag set.
17400 (register_data): Make static. Pass fetch flag to get_regcache.
17401 (supply_register): Call get_regcache with fetch flag clear.
17402 (collect_register): Call get_regcache with fetch flag set.
17403 (collect_register_as_string): New function.
17404 * regcache.h: Update.
17405 * remote-utils.c (putpkt): Flush after debug output and use
17406 stderr.
17407 Handle input interrupts while waiting for an ACK.
17408 (input_interrupt): Use signal_pid method.
17409 (getpkt): Flush after debug output and use stderr.
17410 (outreg): Use collect_register_as_string.
17411 (new_thread_notify, dead_thread_notify): New functions.
17412 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17413 and general_thread.
17414 (look_up_one_symbol): Flush after debug output.
17415 * server.c (step_thread, server_waiting): New variables.
17416 (start_inferior): Don't use signal_pid. Update call to mywait.
17417 (attach_inferior): Update call to mywait.
17418 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17419 (main): Don't fetch/store registers explicitly. Use
17420 set_desired_inferior. Support proposed ``Hs'' packet. Update
17421 calls to mywait.
17422 * server.h: Update.
17423 (struct inferior_list, struct_inferior_list_entry): New.
17424 * target.c (set_desired_inferior): New.
17425 (write_inferior_memory): Constify.
17426 (mywait): New function.
17427 * target.h: Update.
17428 (struct target_ops): New signal_pid method.
17429 (mywait): Removed macro, added prototype.
17430
17431 * linux-low.h (regset_func): Removed.
17432 (regset_fill_func, regset_store_func): New.
17433 (enum regset_type): New.
17434 (struct regset_info): Add type field. Use new operation types.
17435 (struct linux_target_ops): stop_pc renamed to get_pc.
17436 Add decr_pc_after_break and breakpoint_at.
17437 (get_process, get_thread_proess, get_process_thread)
17438 (strut process_info, all_processes, linux_attach_lwp)
17439 (thread_db_init): New.
17440
17441 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17442 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17443 (the_low_target): Add new members.
17444 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17445 (i386_store_fpxregset): Constify.
17446 (target_regsets): Add new kind identifier.
17447 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17448 (i386_set_pc): Add debugging.
17449 (i386_breakpoint_at): New function.
17450 (the_low_target): Add new members.
17451 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17452 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17453 (mips_breakpoint_at): New.
17454 (the_low_target): Add new members.
17455 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17456 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17457 (the_low_target): Add new members.
17458 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17459 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17460 (the_low_target): Add new members.
17461 * linux-x86-64-low.c (target_regsets): Add new kind
17462 identifier.
17463
174642002-05-15 Daniel Jacobowitz <drow@mvista.com>
17465
17466 From Martin Pool <mbp@samba.org>:
17467 * server.c (gdbserver_usage): New function.
17468 (main): Call it.
17469
174702002-05-14 Daniel Jacobowitz <drow@mvista.com>
17471
17472 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17473 stop_at -> stop_pc.
17474
174752002-05-04 Andrew Cagney <ac131313@redhat.com>
17476
17477 * Makefile.in: Remove obsolete code.
17478
174792002-04-24 Michal Ludvig <mludvig@suse.cz>
17480
17481 * linux-low.c (regsets_fetch_inferior_registers),
17482 (regsets_store_inferior_registers): Removed cast to int from
17483 ptrace() calls.
17484 * regcache.h: Added declaration of struct inferior_info.
17485
174862002-04-20 Daniel Jacobowitz <drow@mvista.com>
17487
17488 * inferiors.c (struct inferior_info): Add regcache_data.
17489 (add_inferior): Call create_register_cache.
17490 (clear_inferiors): Call free_register_cache.
17491 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17492 * regcache.c (struct inferior_regcache_data): New.
17493 (registers): Remove.
17494 (get_regcache): New function.
17495 (create_register_cache, free_register_cache): New functions.
17496 (set_register_cache): Don't initialize the register cache here.
17497 (registers_to_string, registers_from_string, register_data): Call
17498 get_regcache.
17499 * regcache.h: Add prototypes.
17500 * server.h: Likewise.
17501
175022002-04-20 Daniel Jacobowitz <drow@mvista.com>
17503
17504 * mem-break.c: New file.
17505 * mem-break.h: New file.
17506 * Makefile.in: Add mem-break.o rule; update server.h
17507 dependencies.
17508 * inferiors.c (struct inferior_info): Add target_data
17509 member.
17510 (clear_inferiors): Free target_data member if set.
17511 (inferior_target_data, set_inferior_target_data): New functions.
17512 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17513 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17514 * linux-low.c (linux_bp_reinsert): New variable.
17515 (struct inferior_linux_data): New.
17516 (linux_create_inferior): Use set_inferior_target_data.
17517 (linux_attach): Likewise. Call add_inferior.
17518 (linux_wait_for_one_inferior): New function.
17519 (linux_wait): Call it.
17520 (linux_write_memory): Add const.
17521 (initialize_low): Call set_breakpoint_data.
17522 * linux-low.h (struct linux_target_ops): Add breakpoint
17523 handling members.
17524 * server.c (attach_inferior): Remove extra add_inferior
17525 call.
17526 * server.h: Include mem-break.h. Update inferior.c
17527 prototypes.
17528 * target.c (read_inferior_memory)
17529 (write_inferior_memory): New functions.
17530 * target.h (read_inferior_memory)
17531 (write_inferior_memory): Change macros to prototypes.
17532 (struct target_ops): Update comments. Add const to write_memory
17533 definition.
17534
175352002-04-11 Daniel Jacobowitz <drow@mvista.com>
17536
17537 * linux-low.c (usr_store_inferior_registers): Support
17538 registers which are allowed to fail to store.
17539 * linux-low.h (linux_target_ops): Likewise.
17540 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17541 (ppc_cannot_store_register): FPSCR may not be storable.
17542
175432002-04-09 Daniel Jacobowitz <drow@mvista.com>
17544
17545 * server.h: Include <string.h> if HAVE_STRING_H.
17546 * ChangeLog: Correct paths in last ChangeLog entry.
17547
175482002-04-09 Daniel Jacobowitz <drow@mvista.com>
17549
17550 * linux-low.h: Remove obsolete prototypes.
17551 (struct linux_target_ops): New.
17552 (extern the_low_target): New.
17553 * linux-low.c (num_regs, regmap): Remove declarations.
17554 (register_addr): Use the_low_target explicitly.
17555 (fetch_register): Likewise.
17556 (usr_fetch_inferior_registers): Likewise.
17557 (usr_store_inferior_registers): Likewise.
17558 * linux-arm-low.c (num_regs): Remove.
17559 (arm_num_regs): Define.
17560 (arm_regmap): Renamed from regmap, made static.
17561 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17562 made static.
17563 (arm_cannot_store_register): Renamed from cannot_store_register,
17564 made static.
17565 (the_low_target): New.
17566 * linux-i386-low.c (num_regs): Remove.
17567 (i386_num_regs): Define.
17568 (i386_regmap): Renamed from regmap, made static.
17569 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17570 made static.
17571 (i386_cannot_store_register): Renamed from cannot_store_register,
17572 made static.
17573 (the_low_target): New.
17574 * linux-ia64-low.c (num_regs): Remove.
17575 (ia64_num_regs): Define.
17576 (ia64_regmap): Renamed from regmap, made static.
17577 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17578 made static.
17579 (ia64_cannot_store_register): Renamed from cannot_store_register,
17580 made static.
17581 (the_low_target): New.
17582 * linux-m68k-low.c (num_regs): Remove.
17583 (m68k_num_regs): Define.
17584 (m68k_regmap): Renamed from regmap, made static.
17585 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17586 made static.
17587 (m68k_cannot_store_register): Renamed from cannot_store_register,
17588 made static.
17589 (the_low_target): New.
17590 * linux-mips-low.c (num_regs): Remove.
17591 (mips_num_regs): Define.
17592 (mips_regmap): Renamed from regmap, made static.
17593 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17594 made static.
17595 (mips_cannot_store_register): Renamed from cannot_store_register,
17596 made static.
17597 (the_low_target): New.
17598 * linux-ppc-low.c (num_regs): Remove.
17599 (ppc_num_regs): Define.
17600 (ppc_regmap): Renamed from regmap, made static.
17601 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17602 made static.
17603 (ppc_cannot_store_register): Renamed from cannot_store_register,
17604 made static.
17605 (the_low_target): New.
17606 * linux-s390-low.c (num_regs): Remove.
17607 (s390_num_regs): Define.
17608 (s390_regmap): Renamed from regmap, made static.
17609 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17610 made static.
17611 (s390_cannot_store_register): Renamed from cannot_store_register,
17612 made static.
17613 (the_low_target): New.
17614 * linux-sh-low.c (num_regs): Remove.
17615 (sh_num_regs): Define.
17616 (sh_regmap): Renamed from regmap, made static.
17617 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17618 made static.
17619 (sh_cannot_store_register): Renamed from cannot_store_register,
17620 made static.
17621 (the_low_target): New.
17622 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17623 (the_low_target): New.
17624
176252002-04-09 Daniel Jacobowitz <drow@mvista.com>
17626
17627 * Makefile.in: Add stamp-h target.
17628 * configure.in: Create stamp-h.
17629 * configure: Regenerated.
17630
176312002-04-09 Daniel Jacobowitz <drow@mvista.com>
17632
17633 * inferiors.c: New file.
17634 * target.c: New file.
17635 * target.h: New file.
17636 * Makefile.in: Add target.o and inferiors.o. Update
17637 dependencies.
17638 * linux-low.c (inferior_pid): New static variable,
17639 moved from server.c.
17640 (linux_create_inferior): Renamed from create_inferior.
17641 Call add_inferior. Return 0 on success instead of a PID.
17642 (linux_attach): Renamed from myattach.
17643 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17644 (linux_thread_alive): Renamed from mythread_alive.
17645 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17646 child dies.
17647 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17648 (regsets_store_inferior_registers): Correct error message.
17649 Add missing ``return 0''.
17650 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17651 (linux_store_registers): Renamed from store_inferior_registers.
17652 (linux_read_memory): Renamed from read_inferior_memory.
17653 (linux_write_memory): Renamed from write_inferior_memory.
17654 (linux_target_ops): New structure.
17655 (initialize_low): Call set_target_ops ().
17656 * remote-utils.c (unhexify): New function.
17657 (hexify): New function.
17658 (input_interrupt): Send signals to ``signal_pid''.
17659 * server.c (inferior_pid): Remove.
17660 (start_inferior): Update create_inferior call.
17661 (attach_inferior): Call add_inferior.
17662 (handle_query): New function.
17663 (main): Call handle_query for `q' packets.
17664 * server.h: Include "target.h". Remove obsolete prototypes.
17665 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17666
176672002-04-09 Daniel Jacobowitz <drow@mvista.com>
17668
17669 * Makefile.in: Add WARN_CFLAGS. Update configury
17670 dependencies.
17671 * configure.in: Check for <string.h>
17672 * configure: Regenerate.
17673 * config.in: Regenerate.
17674 * gdbreplay.c: Include needed system headers.
17675 (remote_open): Remove strchr prototype.
17676 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17677 * regcache.c (supply_register): Change buf argument to const void *.
17678 (supply_register_by_name): Likewise.
17679 (collect_register): Change buf argument to void *.
17680 (collect_register_by_name): Likewise.
17681 * regcache.h: Add missing prototypes.
17682 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17683 * server.c (handle_query): New function.
17684 (attached): New static variable, moved out of main.
17685 (main): Quiet longjmp clobber warnings.
17686 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17687 * utils.c (error): Remove NORETURN.
17688 (fatal): Likewise.
This page took 0.09118 seconds and 4 git commands to generate.