Use gdb::byte_vector in target_write_memory
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-08-15 Tom Tromey <tromey@adacore.com>
2
3 * target.c (target_write_memory): Use gdb::byte_vector.
4
5 2019-08-15 Tom Tromey <tromey@adacore.com>
6
7 * tracepoint.c (write_inferior_data_pointer)
8 (write_inferior_integer, write_inferior_int8)
9 (write_inferior_uinteger, m_tracepoint_action_download)
10 (r_tracepoint_action_download, x_tracepoint_action_download)
11 (l_tracepoint_action_download, clear_inferior_trace_buffer)
12 (download_agent_expr, download_tracepoint_1)
13 (download_trace_state_variables, upload_fast_traceframes): Update.
14 * server.c (gdb_write_memory): Update.
15 * remote-utils.c (relocate_instruction): Update.
16 * proc-service.c (ps_pdwrite): Update.
17 * mem-break.c (remove_memory_breakpoint)
18 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
19 (uninsert_fast_tracepoint_jumps_at)
20 (reinsert_fast_tracepoint_jumps_at): Update.
21 * linux-x86-low.c (append_insns)
22 (i386_install_fast_tracepoint_jump_pad)
23 (amd64_write_goto_address, i386_write_goto_address): Update.
24 * linux-s390-low.c (append_insns, s390_write_goto_address):
25 Update.
26 * linux-ppc-low.c (ppc_relocate_instruction)
27 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
28 (ppc_write_goto_address): Update.
29 * linux-aarch64-low.c (append_insns): Update.
30 * target.h (struct target_ops): Update.
31 (write_inferior_memory): Don't declare.
32 * target.c (target_write_memory): Rename from
33 write_inferior_memory. Remove old target_write_memory.
34
35 2019-08-15 Tom Tromey <tromey@adacore.com>
36
37 * target.c (write_inferior_memory): Use std::vector.
38
39 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
40
41 PR build/24886
42 * configure.ac: Drop enable-libmcheck support.
43 * configure, config.in: Rebuild.
44 * acinclude.m4: Don't include it.
45
46 2019-07-19 Alan Hayward <alan.hayward@arm.com>
47
48 * configure.srv: Remove Arm xml files.
49
50 2019-07-19 Alan Hayward <alan.hayward@arm.com>
51
52 * configure.srv: Add new files. Remove xml generated files.
53 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
54 registers.
55 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
56 * linux-aarch32-tdesc.c: New file.
57 * linux-aarch32-tdesc.h: New file.
58 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
59 * linux-arm-low.c (init_registers_arm, tdesc_arm)
60 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
61 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
62 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
63 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
64 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
65 (arm_read_description): Call arm_linux_read_description.
66 (initialize_low_arch): Don't init registers.
67 * linux-arm-tdesc.c: New file.
68 * linux-arm-tdesc.h: New file.
69
70 2019-07-10 Alan Hayward <alan.hayward@arm.com>
71
72 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
73 Move counter inside for.
74 (arm_read_description): Check ptrace earlier.
75 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
76
77 2019-07-09 Tom Tromey <tom@tromey.com>
78
79 * configure: Rebuild.
80 * configure.ac: Change common to gdbsupport.
81 * acinclude.m4: Change common to gdbsupport.
82 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
83 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
84 common to gdbsupport.
85 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
86 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
87 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
88 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
89 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
90 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
91 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
92 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
93 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
94 common to gdbsupport.
95
96 2019-07-04 Alan Hayward <alan.hayward@arm.com>
97
98 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
99 defines.
100 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
101
102 2019-07-04 Alan Hayward <alan.hayward@arm.com>
103
104 * configure.srv: Remove legacy xml.
105 * linux-aarch64-low.c (initialize_low_arch): Remove
106 initialize_low_tdesc call.
107 * linux-aarch64-tdesc-selftest.c: Remove file.
108 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
109 * linux-x86-low.c (initialize_low_arch): Remove
110 initialize_low_tdesc call.
111 * linux-x86-tdesc-selftest.c: Remove file.
112 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
113
114 2019-06-20 Tom de Vries <tdevries@suse.de>
115
116 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
117 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
118
119 2019-06-19 Tom de Vries <tdevries@suse.de>
120
121 * debug.h (debug_write): Change return type to ssize_t.
122 * debug.c (debug_write): Same.
123
124 2019-06-14 Tom Tromey <tom@tromey.com>
125
126 * configure.ac: Use new path to gnulib.
127 * configure: Rebuild.
128 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
129 to gnulib.
130
131 2019-06-11 Tom Tromey <tom@tromey.com>
132
133 * Makefile.in (SFILES): Add alloc.c.
134 (OBS): Add alloc.o.
135 (IPA_OBJS): Add alloc-ipa.o.
136 (alloc-ipa.o): New target.
137 (%.o: ../%.c): New pattern rule.
138
139 2019-06-10 Tom Tromey <tromey@adacore.com>
140
141 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
142 end warning with a newline.
143 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
144 newline.
145 * thread-db.c (attach_thread): Don't end warning with a newline.
146 (thread_db_notice_clone): Likewise.
147 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
148 newline.
149 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
150 end warning with a newline.
151
152 2019-06-04 Pedro Alves <palves@redhat.com>
153
154 * server.c (captured_main): Use make_unique_xstrdup.
155
156 2019-06-02 Tom Tromey <tom@tromey.com>
157
158 * gdbreplay.c (fromhex): Remove.
159 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
160
161 2019-05-29 Tom Tromey <tromey@adacore.com>
162
163 * configure: Rebuild.
164
165 2019-05-06 Kevin Buettner <kevinb@redhat.com>
166
167 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
168 sign extension code on 32-bit builds.
169
170 2019-05-03 Eli Zaretskii <eliz@gnu.org>
171
172 * remote-utils.c:
173 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
174
175 2019-04-19 Tom Tromey <tom@tromey.com>
176
177 * server.c (struct vstop_notif): Derive from notif_event.
178 <base>: Remove.
179 (queue_stop_reply): Update.
180 (remove_all_on_match_ptid): Change type. Rewrite.
181 (discard_queued_stop_replies): Rewrite.
182 (in_queued_stop_replies_ptid): Change type.
183 (in_queued_stop_replies): Rewrite.
184 (notif_stop): Update.
185 (queue_stop_reply_callback): Update.
186 (captured_main): Don't call initialize_notif.
187 (push_stop_notification): Update.
188 * notif.c (notif_write_event, handle_notif_ack)
189 (notif_event_enque, notif_push): Update.
190 (notif_event_xfree, initialize_notif): Remove.
191 * notif.h (struct notif_event): Include <list>, not
192 "common/queue.h".
193 (struct notif_server) <queue>: Now a std::list.
194 (notif_event_p): Remove typedef.
195 (initialize_notif): Don't declare.
196 (struct notif_event): Add virtual destructor.
197
198 2019-04-17 Alan Hayward <alan.hayward@arm.com>
199
200 * ax.c (ax_vdebug): Call debug_printf.
201 * debug.c (debug_write): New function.
202 * debug.h (debug_write): New declaration.
203 * linux-low.c (sigchld_handler): Call debug_write.
204
205 2019-04-17 Alan Hayward <alan.hayward@arm.com>
206
207 * debug.c (debug_set_output): New function.
208 (debug_vprintf): Send output to debug_file.
209 (debug_flush): Likewise.
210 * debug.h (debug_set_output): New declaration.
211 * server.c (handle_monitor_command): Add debug-file option.
212 (captured_main): Likewise.
213
214 2019-04-17 Alan Hayward <alan.hayward@arm.com>
215
216 * debug.c (remote_debug): Add definition.
217 * debug.h (remote_debug): Add declaration.
218 * hostio.c (remote_debug): Remove declaration.
219 * remote-utils.c (struct ui_file): Likewise.
220 (remote_debug): Likewise.
221 * remote-utils.h (remote_debug): Likewise,
222 * server.c (remote_debug): Remove definition.
223
224 2019-04-10 Kevin Buettner <kevinb@redhat.com>
225
226 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
227 when using a 64-bit gdbserver.
228
229 2019-04-09 Tom Tromey <tromey@adacore.com>
230
231 * linux-low.c (select_event_lwp): Use find_thread_in_random.
232
233 2019-04-08 Tom Tromey <tom@tromey.com>
234
235 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
236 throw.
237 (linux_resume_one_lwp): Likewise.
238
239 2019-04-08 Tom Tromey <tom@tromey.com>
240
241 * gdbreplay.c: Update.
242 * linux-low.c: Update.
243 * server.c: Update.
244
245 2019-04-08 Tom Tromey <tom@tromey.com>
246
247 * server.c: Use C++ exception handling.
248 * linux-low.c: Use C++ exception handling.
249 * gdbreplay.c: Use C++ exception handling.
250
251 2019-04-08 Tom Tromey <tom@tromey.com>
252
253 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
254 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
255 (captured_main, main): Update.
256 * gdbreplay.c (main): Update.
257
258 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
259
260 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
261 value in argument pointer, return 1 if the entry is found and 0
262 otherwise. Move comment.
263 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
264 * linux-low.h (linux_get_auxv): Declare.
265 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
266
267 2019-04-05 Tom Tromey <tromey@adacore.com>
268
269 * server.c (gdbserver_usage): Use upper-case for metasyntactic
270 variables.
271
272 2019-03-28 Alan Hayward <alan.hayward@arm.com>
273
274 * linux-low.c (AT_HWCAP2): Add define if not already included.
275
276 2019-03-26 Alan Hayward <alan.hayward@arm.com>
277
278 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
279 (aarch64_arch_setup): Call linux_get_hwcap.
280 * linux-arm-low.c (arm_get_hwcap): Remove function.
281 (arm_read_description): Call linux_get_hwcap.
282 * linux-low.c (linux_get_auxv): New function.
283 (linux_get_hwcap): Likewise.
284 (linux_get_hwcap2): Likewise.
285 * linux-low.h (linux_get_hwcap): New declaration.
286 (linux_get_hwcap2): Likewise.
287 * linux-ppc-low.c (ppc_get_auxv): Remove function.
288 (ppc_arch_setup): Call linux_get_hwcap.
289 * linux-s390-low.c (s390_get_hwcap): Remove function.
290 (s390_arch_setup): Call linux_get_hwcap.
291
292 2019-03-22 Alan Hayward <alan.hayward@arm.com>
293 Jiong Wang <jiong.wang@arm.com>
294
295 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
296 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
297 to fail.
298 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
299
300 2019-03-22 Alan Hayward <alan.hayward@arm.com>
301 Jiong Wang <jiong.wang@arm.com>
302
303 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
304 (aarch64_get_hwcap): New function.
305 (aarch64_arch_setup): Read APIA hwcap.
306
307 2019-03-22 Alan Hayward <alan.hayward@arm.com>
308 Jiong Wang <jiong.wang@arm.com>
309
310 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
311 (initialize_low_tracepoint): Likewise.
312 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
313 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
314 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
315 (aarch64_linux_read_description): Likewise.
316 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
317
318 2019-03-12 John Baldwin <jhb@FreeBSD.org>
319
320 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
321 i386_create_target_description for 'segments' parameter.
322 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
323 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
324 * win32-i386-low.c (i386_arch_setup): Likewise.
325
326 2019-03-12 Tom Tromey <tromey@adacore.com>
327
328 * linux-low.c (iterate_over_lwps): Update.
329
330 2019-03-06 Tom Tromey <tom@tromey.com>
331
332 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
333 (captured_main): Use SCOPE_EXIT.
334
335 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
336
337 * configure.srv: Use '$enable_unittest' instead of '$development'
338 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
339 case.
340
341 2019-02-27 Tom Tromey <tromey@adacore.com>
342
343 * gdbreplay.c (logchar): Handle \r\n.
344
345 2019-02-07 Alan Hayward <alan.hayward@arm.com>
346
347 * linux-low.c (linux_attach): Add process before lwp.
348 * server.c (attach_inferior): Check if already attached.
349
350 2019-02-07 Tom Tromey <tom@tromey.com>
351
352 * x86-tdesc.h: Rename include guard.
353 * x86-low.h: Add include guard.
354 * wincecompat.h: Rename include guard.
355 * win32-low.h: Add include guard.
356 * utils.h: Rename include guard.
357 * tracepoint.h: Rename include guard.
358 * tdesc.h: Rename include guard.
359 * target.h: Rename include guard.
360 * server.h: Rename include guard.
361 * remote-utils.h: Rename include guard.
362 * regcache.h: Rename include guard.
363 * nto-low.h: Rename include guard.
364 * notif.h: Add include guard.
365 * mem-break.h: Rename include guard.
366 * lynx-low.h: Add include guard.
367 * linux-x86-tdesc.h: Add include guard.
368 * linux-s390-tdesc.h: Add include guard.
369 * linux-ppc-tdesc-init.h: Add include guard.
370 * linux-low.h: Add include guard.
371 * linux-aarch64-tdesc.h: Add include guard.
372 * linux-aarch32-low.h: Add include guard.
373 * inferiors.h: Rename include guard.
374 * i387-fp.h: Rename include guard.
375 * hostio.h: Rename include guard.
376 * gdbthread.h: Rename include guard.
377 * gdb_proc_service.h: Rename include guard.
378 * event-loop.h: Rename include guard.
379 * dll.h: Rename include guard.
380 * debug.h: Rename include guard.
381 * ax.h: Rename include guard.
382
383 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
384
385 PR gdb/23985
386 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
387 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
388
389 2019-01-25 Tom Tromey <tom@tromey.com>
390
391 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
392
393 2019-01-25 Tom Tromey <tom@tromey.com>
394
395 * win32-low.c: Fix common/ includes.
396 * win32-i386-low.c: Fix common/ includes.
397 * tracepoint.c: Fix common/ includes.
398 * thread-db.c: Fix common/ includes.
399 * target.h: Fix common/ includes.
400 * symbol.c: Fix common/ includes.
401 * spu-low.c: Fix common/ includes.
402 * server.h: Fix common/ includes.
403 * server.c: Fix common/ includes.
404 * remote-utils.c: Fix common/ includes.
405 * regcache.h: Fix common/ includes.
406 * regcache.c: Fix common/ includes.
407 * nto-x86-low.c: Fix common/ includes.
408 * notif.h: Fix common/ includes.
409 * mem-break.h: Fix common/ includes.
410 * lynx-low.c: Fix common/ includes.
411 * lynx-i386-low.c: Fix common/ includes.
412 * linux-x86-tdesc-selftest.c: Fix common/ includes.
413 * linux-x86-low.c: Fix common/ includes.
414 * linux-low.c: Fix common/ includes.
415 * inferiors.h: Fix common/ includes.
416 * i387-fp.c: Fix common/ includes.
417 * hostio.c: Fix common/ includes.
418 * hostio-errno.c: Fix common/ includes.
419 * gdbthread.h: Fix common/ includes.
420 * gdbreplay.c: Fix common/ includes.
421 * fork-child.c: Fix common/ includes.
422 * event-loop.c: Fix common/ includes.
423 * ax.c:
424 (enum gdb_agent_op): Fix common/ includes.
425
426 2019-01-21 Tom Tromey <tom@tromey.com>
427
428 * tracepoint.c: Fix includes.
429 * remote-utils.c: Fix includes.
430 * linux-x86-low.c: Fix includes.
431
432 2019-01-01 Joel Brobecker <brobecker@adacore.com>
433
434 * gdbreplay.c (gdbreplay_version): Update copyright year in
435 version message.
436 * server.c (gdbserver_version): Likewise.
437
438 2018-12-05 Alan Hayward <alan.hayward@arm.com>
439
440 * linux-low.c (add_lwp): Switch ordering.
441
442 2018-11-29 Tom Tromey <tom@tromey.com>
443
444 * win32-low.c (win32_join): Take pid, not process.
445 * target.h (struct target_ops) <join>: Change argument type.
446 (join_inferior): Change argument name.
447 * spu-low.c (spu_join): Take pid, not process.
448 * server.c (handle_detach): Preserve pid before destroying
449 process.
450 * lynx-low.c (lynx_join): Take pid, not process.
451 * linux-low.c (linux_join): Take pid, not process.
452
453 2018-11-23 Alan Hayward <alan.hayward@arm.com>
454
455 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
456 (aarch64_cannot_fetch_register): Likewise.
457 (struct linux_target_ops): Update references.
458
459 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
460
461 * linux-ppc-low.c: Include nat/linux-ptrace.h.
462
463 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
464
465 * configure.srv (ipa_ppc_linux_regobj): Add
466 powerpc-isa207-htm-vsx32l-ipa.o and
467 powerpc-isa207-htm-vsx64l-ipa.o.
468 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
469 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
470 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
471 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
472 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
473 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
474 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
475 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
476 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
477 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
478 (init_registers_powerpc_isa207_htm_vsx32l)
479 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
480 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
481 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
482 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
483 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
484 (ppc_store_tm_ctarregset): New functions.
485 (ppc_regsets): Add entries for HTM regsets.
486 (ppc_arch_setup): Set htm in features struct when needed. Set
487 sizes for the HTM regsets.
488 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
489 (initialize_low_arch): Call
490 init_registers_powerpc_isa207_htm_vsx32l and
491 init_registers_powerpc_isa207_htm_vsx64l.
492 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
493 PPC_TDESC_ISA207_HTM_VSX.
494 (initialize_low_tracepoint): Call
495 init_registers_powerpc_isa207_htm_vsx32l and
496 init_registers_powerpc_isa207_htm_vsx64l.
497
498 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
499
500 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
501 rs6000/power-linux-pmu.xml to srv_xmlfiles.
502 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
503 (ppc_store_pmuregset): New functions.
504 (ppc_regsets): Add entries for ebb and pmu regsets.
505 (ppc_arch_setup): Set isa207 in features struct if the ebb and
506 pmu regsets are available. Set sizes for these regsets.
507
508 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
509
510 * configure.srv (ipa_ppc_linux_regobj): Add
511 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
512 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
513 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
514 rs6000/powerpc-isa207-vsx32l.xml, and
515 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
516 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
517 <PPC_TDESC_ISA207_VSX>: New enum value.
518 (init_registers_powerpc_isa207_vsx32l): Declare.
519 (init_registers_powerpc_isa207_vsx64l): Declare.
520 * linux-ppc-low.c (ppc_fill_tarregset): New function.
521 (ppc_store_tarregset): New function.
522 (ppc_regsets): Add entry for the TAR regset.
523 (ppc_arch_setup): Set isa207 in features struct when needed. Set
524 size for the TAR regsets.
525 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
526 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
527 and init_registers_powerpc_isa207_vsx64l.
528 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
529 (initialize_low_tracepoint): Call
530 init_registers_powerpc_isa207_vsx32l and
531 init_registers_powerpc_isa207_vsx64l.
532
533 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
534 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
535
536 * configure.srv (ipa_ppc_linux_regobj): Add
537 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
538 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
539 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
540 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
541 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
542 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
543 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
544 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
545 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
546 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
547 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
548 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
549 (ppc_hwcap): Add comment.
550 (ppc_hwcap2): New global.
551 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
552 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
553 (ppc_regsets): Add entries for the DSCR and PPR regsets.
554 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
555 when needed. Set sizes for the the DSCR and PPR regsets.
556 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
557 (initialize_low_arch): Call
558 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
559 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
560 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
561 PPC_TDESC_ISA205_PPR_DSCR_VSX.
562 (initialize_low_tracepoint): Call
563 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
564 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
565
566 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
567
568 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
569
570 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
571 Simon Marchi <simark@simark.ca>
572
573 * acinclude.m4: Include "../selftest.m4".
574 * configure: Regenerate.
575 * configure.ac: Use "GDB_AC_SELFTEST".
576 * configure.srv: Use "$enable_unittests" instead of
577 "$development" when checking whether unit tests have been
578 enabled.
579 * server.c (captured_main): Update message informing that
580 selftests have been disabled.
581
582 2018-10-04 Tom Tromey <tom@tromey.com>
583
584 * configure: Rebuild.
585
586 2018-10-04 Tom Tromey <tom@tromey.com>
587
588 * server.c (handle_status): Rename inner "thread".
589 (process_serial_event): Declare "res" in 'm' case.
590 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
591 (iterate_over_lwps): Rename inner "thread".
592 (linux_qxfer_libraries_svr4): Rename inner "len".
593 * gdbthread.h (find_thread_in_random): Rename inner "thread".
594
595 2018-10-01 Gary Benson <gbenson@redhat.com>
596
597 * gdb_proc_service.h: Moved common code to
598 common/gdb_proc_service.h.
599
600 2018-10-01 Gary Benson <gbenson@redhat.com>
601
602 * gdb_proc_service.h: Synchronize comments and whitespace with
603 GDB's version of this file.
604
605 2018-09-25 Tom Tromey <tom@tromey.com>
606
607 * configure: Rebuild.
608 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
609
610 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
611
612 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
613 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
614 ($(IPA_LIB)): Sort IPA_OBJS.
615
616 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
617
618 * Makefile.in: Remove references to $(ADD_DEPS).
619
620 2018-09-16 Tom Tromey <tom@tromey.com>
621
622 * remote-utils.c (remote_open): Use GNU style for metasyntactic
623 variables.
624 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
625 variables.
626
627 2018-09-05 Tom Tromey <tom@tromey.com>
628
629 * configure: Rebuild.
630
631 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
632
633 PR build/23399
634 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
635
636 2018-08-27 Tom Tromey <tom@tromey.com>
637
638 PR build/23087:
639 * configure: Rebuild.
640
641 2018-08-27 Tom Tromey <tom@tromey.com>
642
643 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
644 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
645 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
646 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
647 (s390x_emit_stack_adjust): Add casts to unsigned char.
648
649 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
650
651 PR gdb/23374
652 PR gdb/23375
653 * server.h (struct client_state) <disable_randomization>:
654 Initialize to 1.
655
656 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
657
658 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
659 variable.
660 (mips_supply_ptrace_register): Likewise.
661
662 2018-07-22 Tom Tromey <tom@tromey.com>
663
664 * configure: Rebuild.
665
666 2018-07-22 Tom Tromey <tom@tromey.com>
667
668 * win32-low.c (win32_create_inferior): Remove unused variables.
669 * gdbreplay.c (remote_open): Remove unused variable.
670 * remote-utils.c (remote_prepare): Remove unused variable.
671 * x86-tdesc.h (X86_TDESC_H): Define.
672 (amd64_expedite_regs): Define conditionally.
673 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
674 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
675 * remote-utils.c (readchar): Remove unused variable.
676
677 2018-07-13 Pedro Alves <palves@redhat.com>
678
679 * linux-low.c (linux_kill): Change parameter to process_info
680 pointer instead of pid. Adjust.
681 * lynx-low.c (lynx_kill): Likewise.
682 * nto-low.c (nto_kill): Likewise.
683 * spu-low.c (spu_kill): Likewise.
684 * win32-low.c (win32_kill): Likewise.
685 * server.c (handle_v_kill, kill_inferior_callback)
686 (detach_or_kill_for_exit): Adjust.
687 * target.c (kill_inferior): Change parameter to process_info
688 pointer instead of pid. Adjust.
689 * target.h (struct target_ops) <kill>: Change parameter to
690 process_info pointer instead of pid. Adjust all implementations
691 and callers.
692 (kill_inferior): Likewise.
693
694 2018-07-13 Pedro Alves <palves@redhat.com>
695
696 * linux-low.c (linux_detach, linux_join): Change parameter to
697 process_info pointer instead of pid. Adjust.
698 * lynx-low.c (lynx_detach, lynx_join): Likewise.
699 * nto-low.c (nto_detach): Likewise.
700 * spu-low.c (spu_detach, spu_join): Likewise.
701 * win32-low.c (win32_detach, win32_join): Likewise.
702 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
703 * target.h (struct target_ops) <detach, join>: Change parameter to
704 process_info pointer instead of pid. Adjust all implementations
705 and callers.
706 (detach_inferior, join_inferior): Rename 'pid' parameter to
707 'proc'.
708
709 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
710 Jan Kratochvil <jan.kratochvil@redhat.com>
711 Paul Fertser <fercerpav@gmail.com>
712 Tsutomu Seki <sekiriki@gmail.com>
713
714 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
715 (OBS): Add 'common/netstuff.o'.
716 (GDBREPLAY_OBS): Likewise.
717 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
718 (remote_open): Implement support for IPv6
719 connections.
720 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
721 and 'wspiapi.h'.
722 (handle_accept_event): Accept connections from IPv6 sources.
723 (remote_prepare): Handle IPv6-style hostnames; implement
724 support for IPv6 connections.
725 (remote_open): Implement support for printing connections from
726 IPv6 sources.
727
728 2018-07-11 Pedro Alves <palves@redhat.com>
729
730 PR gdb/23377
731 * mem-break.c (any_persistent_commands): Add process_info
732 parameter and use it instead of relying on the current process.
733 Change return type to bool.
734 * mem-break.h (any_persistent_commands): Add process_info
735 parameter and change return type to bool.
736 * server.c (handle_detach): Remove require_running_or_return call.
737 Look up the process_info for the process we're about to detach.
738 If not found, return back error to GDB. Adjust
739 any_persistent_commands call to pass down a process pointer.
740
741 2018-07-11 Pedro Alves <palves@redhat.com>
742
743 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
744 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
745 instead of collect_register_by_name.
746 * regcache.c (regcache_raw_get_unsigned_by_name): New.
747 * regcache.h (regcache_raw_get_unsigned_by_name): New.
748
749 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
750 Pedro Alves <palves@redhat.com>
751
752 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
753
754 2018-07-03 Tom Tromey <tom@tromey.com>
755
756 * linux-low.c: Update.
757 * lynx-low.c: Update.
758 * mem-break.c: Update.
759 * nto-low.c: Update.
760 * remote-utils.c: Update.
761 * server.c: Update.
762 * spu-low.c: Update.
763 * target.c: Update.
764 * win32-low.c: Update.
765
766 2018-07-03 Tom Tromey <tom@tromey.com>
767
768 * server.c: Update.
769
770 2018-07-03 Tom Tromey <tom@tromey.com>
771
772 * linux-low.c: Update.
773
774 2018-07-03 Tom Tromey <tom@tromey.com>
775
776 * target.c: Update.
777
778 2018-07-03 Tom Tromey <tom@tromey.com>
779
780 * linux-low.c: Update.
781 * linux-mips-low.c: Update.
782 * lynx-low.c: Update.
783 * nto-low.c: Update.
784 * remote-utils.c: Update.
785 * server.c: Update.
786 * spu-low.c: Update.
787 * target.c: Update.
788 * thread-db.c: Update.
789
790 2018-07-03 Tom Tromey <tom@tromey.com>
791
792 * linux-low.c: Update.
793 * linux-mips-low.c: Update.
794 * lynx-low.c: Update.
795 * mem-break.c: Update.
796 * nto-low.c: Update.
797 * remote-utils.c: Update.
798 * server.c: Update.
799 * spu-low.c: Update.
800 * target.c: Update.
801 * tracepoint.c: Update.
802
803 2018-07-03 Tom Tromey <tom@tromey.com>
804
805 * linux-low.c: Update.
806 * linux-ppc-low.c: Update.
807 * linux-x86-low.c: Update.
808 * proc-service.c: Update.
809 * server.c: Update.
810 * spu-low.c: Update.
811 * thread-db.c: Update.
812 * win32-low.c: Update.
813
814 2018-07-03 Tom Tromey <tom@tromey.com>
815
816 * linux-low.c: Update.
817 * lynx-low.c: Update.
818 * nto-low.c: Update.
819 * remote-utils.c: Update.
820 * spu-low.c: Update.
821 * thread-db.c: Update.
822 * win32-low.c: Update.
823
824 2018-06-29 Joel Brobecker <brobecker@adacore.com>
825
826 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
827 parameter in call to 'amd64_create_target_description'.
828
829 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
830
831 * x86-tdesc.h: Remove executable permission flag.
832
833 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
834
835 * configure.ac: Remove AC_PREREQ, add missing quoting.
836 * configure: Re-generate.
837 * config.in: Re-generate.
838 * aclocal.m4: Re-generate.
839
840 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
841
842 * tracepoint.h (current_traceframe): Remove declaration.
843
844 2018-06-18 Alan Hayward <alan.hayward@arm.com>
845
846 * linux-aarch64-low.c (is_sve_tdesc): New function.
847 (aarch64_sve_regs_copy_to_regcache): Likewise.
848 (aarch64_sve_regs_copy_from_regcache): Likewise.
849 (aarch64_regs_info): Add SVE checks.
850 (initialize_low_arch): Initialize SVE.
851
852 2018-06-18 Alan Hayward <alan.hayward@arm.com>
853
854 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
855
856 2018-06-11 Alan Hayward <alan.hayward@arm.com>
857
858 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
859 (initialize_low_tracepoint): Likewise
860 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
861 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
862 param.
863 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
864 checks.
865 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
866
867 2018-06-11 Alan Hayward <alan.hayward@arm.com>
868
869 * server.h (PBUFSIZ): Increase size
870
871 2018-06-11 Alan Hayward <alan.hayward@arm.com>
872
873 * regcache.c (regcache::raw_compare): New function.
874 * regcache.h (regcache::raw_compare): New declaration.
875
876 2018-06-11 Alan Hayward <alan.hayward@arm.com>
877
878 * regcache.c (new_register_cache): Use new.
879 (free_register_cache): Use delete.
880 (register_data): Use const.
881 (supply_register): Move body inside regcache.
882 (regcache::raw_supply): New override function.
883 (collect_register): Move body inside regcache.
884 (regcache::raw_collect): New override function.
885 (regcache::get_register_status): New override function.
886 * regcache.h (struct regcache): Inherit from reg_buffer_common.
887
888 2018-06-09 Tom Tromey <tom@tromey.com>
889
890 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
891 declare queue.
892 (event_queue): Use std::queue.
893 (gdb_event_xfree): Remove.
894 (initialize_event_loop, process_event, wait_for_event): Update.
895
896 2018-06-08 Stan Cox <scox@redhat.com>
897
898 * win32-low.c (win32_create_inferior): last_ptid and last_status
899 moved to client_state.
900
901 2018-06-08 Pedro Alves <palves@redhat.com>
902
903 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
904 common/common-exceptions.o, common/common-utils.o,
905 common/errors.o, common/print-utils.o and utils.o.
906 * gdbreplay.c: Include "common-defs.h" instead of the two
907 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
908 string.h or alloca.h.
909 (perror_with_name): Delete.
910 (remote_open): Use xstrdup instead of strdup.
911 (main): Rename to ...
912 (captured_main): ... this.
913 (main): New.
914
915 2018-06-08 Tom Tromey <tom@tromey.com>
916
917 * linux-low.c (linux_low_read_btrace): Update.
918
919 2018-06-04 Stan Cox <scox@redhat.com>
920
921 * server.h (struct client_state): New.
922 * server.c (cont_thread, general_thread, multi_process)
923 (report_fork_events, report_vfork_events, report_exec_events)
924 (report_thread_events, swbreak_feature, hwbreak_feature)
925 (vCont_supported, disable_randomization, pass_signals)
926 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
927 Moved to client_state.
928 * remote-utils.c (remote_debug, noack_mode)
929 (transport_is_reliable): Moved to client_state.
930 * tracepoint.c (current_traceframe): Moved to client_state.
931
932 Update all callers.
933 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
934 linux-low.c, remote-utils.h, target.c: Use client_state.
935
936 2018-05-31 Alan Hayward <alan.hayward@arm.com>
937
938 * configure.srv: Add new c/h file.
939
940 2018-05-31 Alan Hayward <alan.hayward@arm.com>
941
942 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
943 null VQ.
944
945 2018-05-25 Maciej W. Rozycki <macro@mips.com>
946
947 * gdb.arch/mips-fpregset-core.exp: New test.
948 * gdb.arch/mips-fpregset-core.c: New test source.
949
950 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
951
952 PR server/23198
953 * hostio.c (require_int): Do not report overflow for integers
954 between 0xfffffff and 0x7fffffff.
955
956 2018-05-22 Maciej W. Rozycki <macro@mips.com>
957
958 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
959 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
960 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
961 functions.
962 (the_low_target): Wire them.
963
964 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
965
966 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
967 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
968 mode. Call collect_register_by_name with vscr using
969 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
970 (ppc_store_vrregset): Add and set vscr_offset variable as in
971 ppc_fill_vrregset. Call supply_register_by_name with vscr using
972 vscr_offset.
973
974 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
975
976 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
977 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
978 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
979
980 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
981
982 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
983 (ppc_store_vsxregset): Likewise.
984 (ppc_fill_vrregset): Likewise.
985 (ppc_store_vrregset): Likewise.
986 (ppc_fill_evrregset): Likewise.
987 (ppc_store_evrregset): Likewise.
988 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
989 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
990 needed.
991
992 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
993
994 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
995 wordsize of the inferior. Call ppc_linux_target_wordsize.
996
997 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
998
999 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1000 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1001 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1002 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1003 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1004 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1005 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1006 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1007 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1008 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1009 (tdesc_powerpc_e500l): Remove.
1010 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1011 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1012 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1013 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1014 linux-ppc-tdesc.h.
1015 (ppc_arch_setup): Remove target description matching code. Fill a
1016 ppc_linux_features struct and call ppc_linux_match_description
1017 with it.
1018
1019 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1020
1021 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1022 width of the requested register exceeds the width of the
1023 `ptrace' data type.
1024 (mips_cannot_store_register): Likewise.
1025
1026 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1027
1028 * linux-mips-low.c (mips_fetch_register): New function. Update
1029 preceding comment.
1030 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1031 (the_low_target): Wire `mips_fetch_register'.
1032
1033 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1034
1035 * lynx-i386-low.c (LYNXOS_178): New macro.
1036 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1037 the layout on LynxOS-178.
1038 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1039 handle floating point registers that are not supported by
1040 LynxOS-178.
1041
1042 2018-05-10 Tom Tromey <tom@tromey.com>
1043
1044 * configure: Rebuild.
1045
1046 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1047
1048 PR server/23158:
1049 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1050 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1051 Use it to set the expedite_regs field in the given tdesc.
1052 * x86-tdesc.h: New file.
1053 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1054 Adjust following the addition of the new expedite_regs parameter
1055 to init_target_desc.
1056 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1057 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1058 (i386_linux_read_description, amd64_linux_read_description):
1059 Adjust following the addition of the new expedite_regs parameter
1060 to init_target_desc.
1061 * lynx-i386-low.c: #include "x86-tdesc.h".
1062 (lynx_i386_arch_setup): Adjust following the addition of the new
1063 expedite_regs parameter to init_target_desc.
1064 * nto-x86-low.c: #include "x86-tdesc.h".
1065 (nto_x86_arch_setup): Adjust following the addition of the new
1066 expedite_regs parameter to init_target_desc.
1067 * win32-i386-low.c: #include "x86-tdesc.h".
1068 (i386_arch_setup): Adjust following the addition of the new
1069 expedite_regs parameter to init_target_desc.
1070
1071 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1072
1073 PR server/23158:
1074 * win32-low.c (win32_create_inferior): Add call to my_wait
1075 setting last_status global.
1076
1077 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1078
1079 PR server/23158:
1080 * win32-low.c (create_process): Only call gdb_tilde_expand if
1081 inferior_cwd is not NULL.
1082
1083 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1084
1085 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1086 registers to the cache if their values have changed.
1087 (i387_xsave_to_cache): Provide default values for x87 control
1088 registers when these features are available, but disabled.
1089 * regcache.c (supply_register_by_name_zeroed): New function.
1090 * regcache.h (supply_register_by_name_zeroed): Declare new
1091 function.
1092
1093 2018-05-07 Tom Tromey <tom@tromey.com>
1094
1095 * configure: Rebuild.
1096
1097 2018-05-04 Tom Tromey <tom@tromey.com>
1098
1099 * configure: Rebuild.
1100
1101 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1102 Pedro Alves <palves@redhat.com>
1103
1104 * linux-aarch64-low.c (aarch64_stopped_data_address):
1105 Likewise.
1106
1107 2018-04-27 Tom Tromey <tom@tromey.com>
1108
1109 * configure: Rebuild.
1110
1111 2018-04-23 Tom Tromey <tom@tromey.com>
1112
1113 * configure: Rebuild.
1114
1115 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1116
1117 * Makefile.in (depcomp): Add "..".
1118 (all_deps_files): New and use it.
1119
1120 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1121
1122 * configure.srv (aarch64*-*-linux*): Don't include xml.
1123 (i[34567]86-*-cygwin*): Likewise.
1124 (i[34567]86-*-linux*): Likewise.
1125 (i[34567]86-*-lynxos*): Likewise.
1126 (i[34567]86-*-mingw32ce*): Likewise.
1127 (i[34567]86-*-mingw*): Likewise.
1128 (i[34567]86-*-nto*): Likewise.
1129 (tic6x-*-uclinux): Likewise.
1130 (x86_64-*-linux*): Likewise.
1131 (x86_64-*-mingw*): Likewise.
1132 (x86_64-*-cygwin*): Likewise.
1133
1134 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1135
1136 * tdesc.c: Remove xml parameter.
1137
1138 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1139
1140 * server.c (get_features_xml): Remove cast.
1141 * tdesc.c (void target_desc::accept): Fill in function.
1142 (tdesc_get_features_xml): Remove old xml creation.
1143 (print_xml_feature::visit_pre): Add xml vistor.
1144 * tdesc.h (struct target_desc): Make xmltarget mutable.
1145 (tdesc_get_features_xml): Remove declaration.
1146
1147 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1148
1149 * tdesc.c (tdesc_architecture_name): Add new function.
1150 (tdesc_osabi_name): Likewise.
1151 (tdesc_get_features_xml): Use new functions.
1152
1153 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1154
1155 * tdesc.c (tdesc_create_flags): Remove.
1156 (tdesc_add_flag): Likewise.
1157 (tdesc_named_type): Likewise.
1158 (tdesc_create_union): Likewise.
1159 (tdesc_create_struct): Likewise.
1160 (tdesc_create_vector): Likewise.
1161 (tdesc_add_bitfield): Likewise.
1162 (tdesc_add_field): Likewise.
1163 (tdesc_set_struct_size): Likewise.
1164
1165 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1166
1167 * tdesc.c (~target_desc): Remove implictly deleted items.
1168 (init_target_desc): Iterate all features.
1169 (tdesc_get_features_xml): Use vector.
1170 (tdesc_create_feature): Create feature.
1171 * tdesc.h (tdesc_feature) Remove
1172 (target_desc): Add features.
1173
1174 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1175
1176 * Makefile.in: Add common/tdesc.c
1177 * tdesc.c (init_target_desc): init all reg_defs from register
1178 vector.
1179 (tdesc_create_reg): Create tdesc_reg.
1180 * tdesc.h (tdesc_feature): Add register vector.
1181
1182 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1183
1184 * tdesc.h (struct target_desc) <features>: Change type to
1185 std::vector<std::string>.
1186 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1187 changes.
1188 (tdesc_get_features_xml): Likewise.
1189 (tdesc_create_feature): Likewise.
1190
1191 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1192
1193 * regcache.c (find_register_by_number): Return a ref.
1194 (find_regno): Use references.
1195 (register_size): Likewise.
1196 (register_data): Likewise.
1197 * tdesc.c (target_desc::~target_desc): Remove free calls.
1198 (target_desc::operator==): Use std::vector compare.
1199 (init_target_desc): Use reference.
1200 (tdesc_create_reg): Use reg constructors.
1201 * tdesc.h (struct target_desc): Replace pointer with object.
1202
1203 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1204
1205 * regcache.c (find_register_by_number): Make static.
1206 (find_regno): Use find_register_by_number
1207 * regcache.h (struct reg): Remove declaration.
1208
1209 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1210
1211 * tdesc.c (target_desc::~target_desc): Move to here.
1212 (target_desc::operator==): Likewise.
1213 * tdesc.h (target_desc::~target_desc): Move from here.
1214 (target_desc::operator==): Likewise.
1215
1216 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1217
1218 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1219
1220 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1221
1222 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1223 S390_TDESC_GS.
1224 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1225 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1226 and init_registers_s390_gs_linux64.
1227
1228 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1229
1230 * linux-s390-low.c (s390_fill_gs): Remove function.
1231 (s390_fill_gsbc): Remove function.
1232 (s390_regsets): Set fill functions for the guarded storage regsets
1233 to NULL.
1234
1235 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1236
1237 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1238 the word size. Add comment.
1239 (s390_get_wordsize): New function.
1240 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1241 pswm with it. Instead, use s390_get_wordsize to determine the
1242 word size first and derive the correct tdesc from that directly.
1243
1244 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1245
1246 * Makefile.in: Include silent-rules.mk.
1247 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1248 (COMPILE): Add ECHO_CXX.
1249 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1250 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1251 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1252 (version-generated.c): Add ECHO_GEN.
1253 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1254 (IPAGENT_COMPILE): Add ECHO_CXX.
1255 (%-generated.c): Add ECHO_REGDAT.
1256
1257 2018-03-14 Tom Tromey <tom@tromey.com>
1258
1259 PR cli/14977:
1260 * ax.c (ax_printf): Special case for NULL.
1261
1262 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1263
1264 * linux-low.c (linux_qxfer_libraries_svr4): Use
1265 xml_escape_text_append.
1266
1267 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1268
1269 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1270
1271 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1272
1273 * server.c (handle_general_set): Remove unnecessary xstrdup.
1274
1275 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1276
1277 * server.c (parse_debug_format_options): Adjust to
1278 delim_string_to_char_ptr_vec changes.
1279 * thread-db.c (thread_db_load_search): Adjust to
1280 dirnames_to_char_ptr_vec changes.
1281
1282 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1283
1284 * target.h (target_enable_btrace, target_disable_btrace)
1285 (target_read_btrace, target_read_btrace_conf): Turn macro into
1286 inline function. Throw error if target method is not defined.
1287 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1288 check for btrace target method. Be prepared to handle exceptions
1289 from btrace target methods.
1290
1291 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1292
1293 * server.c (captured_main): Change order of error message printed
1294 when the current working directory cannot be found.
1295
1296 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1297
1298 * server.c: Include "filenames.h" and "pathstuff.h".
1299 (program_name): Delete variable.
1300 (program_path): New anonymous class.
1301 (get_exec_wrapper): Use "program_path" instead of
1302 "program_name".
1303 (handle_v_run): Likewise.
1304 (captured_main): Likewise.
1305 (process_serial_event): Likewise.
1306
1307 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1308
1309 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1310 (OBJS): Add "pathstuff.o".
1311 * server.c (current_directory): New global variable.
1312 (captured_main): Initialize "current_directory".
1313
1314 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1315
1316 * tdesc.c: Use common/tdesc.h.
1317 * tdesc.h: Likewise.
1318
1319 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1320 Simon Marchi <simon.marchi@ericsson.com>
1321
1322 * Makefile.in: Switch order of make rules.
1323
1324 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1325
1326 * Makefile.in: Add common directory in build.
1327 * configure.ac: Add common reference.
1328 * configure: Regenerate.
1329
1330 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1331
1332 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1333 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1334 * spu-low.c (spu_target_ops): Likewise.
1335 * win32-low.c (win32_target_ops): Likewise.
1336 * server.c (supported_btrace_packets): Report packets unconditionally.
1337 * target.h (target_ops) <supports_btrace>: Remove.
1338 (target_supports_btrace): Remove.
1339
1340 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1341
1342 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1343 (handle_btrace_disable): Change return type to void. Use exceptions
1344 to report errors.
1345 (handle_btrace_general_set): Catch exception and copy message to
1346 return message.
1347
1348 2018-02-08 Tom Tromey <tom@tromey.com>
1349
1350 * linux-low.c (install_software_single_step_breakpoints): Use
1351 make_scoped_restore.
1352 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1353 (do_restore_current_thread_cleanup): Remove.
1354 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1355 declare.
1356
1357 2018-02-08 Tom Tromey <tom@tromey.com>
1358
1359 * mem-break.c (set_raw_breakpoint_at): Use
1360 gdb::unique_xmalloc_ptr.
1361
1362 2018-01-30 Pedro Alves <palves@redhat.com>
1363
1364 PR gdb/13211
1365 * target.c (target_terminal::terminal_state): Rename to ...
1366 (target_terminal::m_terminal_state): ... this.
1367
1368 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1369
1370 * linux-low.c (handle_extended_wait): Surround call to
1371 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1372
1373 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1374
1375 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1376 linux_ptrace_attach_fail_reason_string now returning an
1377 std::string.
1378 (linux_attach): Likewise.
1379 * thread-db.c (attach_thread): Likewise.
1380
1381 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1382
1383 PR gdb/21559
1384 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1385 checking for fs_base/gs_base fields in struct user_regs_struct.
1386 * configure: Regenerate.
1387
1388 2018-01-16 Yao Qi <yao.qi@linaro.org>
1389
1390 PR gdb/18749
1391 * linux-low.c (fetch_register): Call supply_register instead of
1392 error.
1393
1394 2018-01-08 Yao Qi <yao.qi@linaro.org>
1395 Simon Marchi <simon.marchi@ericsson.com>
1396
1397 * Makefile.in (OBS): Remove selftest.o.
1398 * configure.ac: Set srv_selftest_objs if $development is true.
1399 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1400 * configure: Re-generated.
1401 * server.c (captured_main): Wrap variable selftest_filter with
1402 GDB_SELF_TEST.
1403
1404 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1405
1406 * server.c (parse_debug_format_options): Return std::string.
1407 (handle_monitor_command, captured_main): Adjust.
1408
1409 2018-01-05 Pedro Alves <palves@redhat.com>
1410
1411 PR gdb/18653
1412 * server.c (captured_main): Pass quiet=false to
1413 save_original_signals_state.
1414
1415 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1416
1417 * gdbreplay.c (gdbreplay_version): Update copyright year in
1418 version message.
1419 * server.c (gdbserver_version): Likewise.
1420
1421 2017-12-08 Tom Tromey <tom@tromey.com>
1422
1423 * ax.c (ax_printf): Update.
1424
1425 2017-12-07 Yao Qi <yao.qi@linaro.org>
1426
1427 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1428 aarch64_linux_read_description.
1429 * linux-amd64-ipa.c (idx2mask): New array.
1430 (get_ipa_tdesc): Move idx2mask out.
1431 (initialize_low_tracepoint): Initialize target descriptions.
1432 * linux-i386-ipa.c (idx2mask): New array.
1433 (get_ipa_tdesc): Move idx2mask out.
1434 (initialize_low_tracepoint): Initialize target descriptions.
1435
1436 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1437
1438 * tdesc.c (struct tdesc_type): Change return type.
1439 (tdesc_add_flag): Change parameter type.
1440 (tdesc_add_bitfield): Likewise.
1441 (tdesc_add_field): Likewise.
1442 (tdesc_set_struct_size): Likewise.
1443
1444 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1445
1446 * regcache.c (registers_to_string): Remove unused variable.
1447
1448 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1449
1450 * inferiors.c (for_each_inferior_with_data): Remove.
1451 * inferiors.h (for_each_inferior_with_data): Remove.
1452 * server.c (handle_qxfer_threads_worker): Change parameter type.
1453 (handle_qxfer_threads_proper): Use for_each_thread.
1454
1455 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1456
1457 * inferiors.c (for_each_inferior): Remove.
1458 (clear_inferiors): Use for_each_thread.
1459 * inferiors.h (for_each_inferior): Remove.
1460 * linux-low.c (linux_wait_for_event_filtered): Use
1461 for_each_thread.
1462 (linux_stabilize_threads): Likewise.
1463 * regcache.c (regcache_release): Likewise.
1464 * server.c (gdb_wants_all_threads_stopped): Likewise.
1465 (clear_pending_status_callback): Remove.
1466 (handle_status): Use for_each_thread.
1467 (captured_main): Likewise.
1468 * win32-low.c (child_init_thread_list): Likewise.
1469 (win32_clear_inferiors): Likewise.
1470 (fake_breakpoint_event): Likewise.
1471
1472 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1473
1474 * inferiors.h (find_inferior): Remove.
1475 * inferiors.c (find_inferior): Remove.
1476
1477 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1478
1479 * linux-low.c (resume_status_pending_p): Update comment.
1480 (need_step_over_p): Update comment.
1481
1482 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1483
1484 * linux-low.c (proceed_one_lwp): Return void, change parameter
1485 type.
1486 (unsuspend_and_proceed_one_lwp): Likewise.
1487 (proceed_all_lwps): Use for_each_thread.
1488 (unstop_all_lwps): Likewise.
1489
1490 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1491
1492 * linux-low.c (linux_resume_one_thread): Return void, take
1493 parameter directly.
1494 (linux_resume): Use for_each_thread.
1495
1496 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1497
1498 * linux-low.c (send_sigstop_callback): Return void, change
1499 parameter type. Rename to...
1500 (send_sigstop): ... this.
1501 (suspend_and_send_sigstop_callback): Return void, change parameter
1502 type. Rename to...
1503 (suspend_and_send_sigstop): ... this.
1504 (stop_all_lwps): Use for_each_thread.
1505
1506 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1507
1508 * linux-low.c (lwp_running): Return bool, remove unused
1509 argument.
1510 (linux_stabilize_threads): Use find_thread.
1511
1512 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1513
1514 * linux-low.c (select_singlestep_lwp_callback): Remove.
1515 (count_events_callback): Remove.
1516 (select_event_lwp_callback): Remove.
1517 (select_event_lwp): Use find_thread/for_each_thread.
1518
1519 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1520
1521 * linux-low.c (not_stopped_callback): Return bool, take filter
1522 argument directly.
1523 (linux_wait_for_event_filtered): Use find_thread.
1524 (linux_wait_1): Likewise.
1525
1526 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1527
1528 * linux-low.c (same_lwp): Remove.
1529 (find_lwp_pid): Use find_thread.
1530
1531 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1532
1533 * linux-low.c (delete_lwp_callback): Remove.
1534 (linux_mourn): Use for_each_thread.
1535
1536 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1537
1538 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1539 args parameter, don't check for pid.
1540 (linux_detach): Use for_each_thread.
1541
1542 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1543
1544 * linux-low.c (struct counter): Remove.
1545 (second_thread_of_pid_p): Remove.
1546 (last_thread_of_process_p): Use find_thread.
1547
1548 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1549
1550 * inferiors.c (find_inferior_in_random): Remove.
1551 * inferiors.h (find_inferior_in_random): Remove.
1552 * linux-low.c (status_pending_p_callback): Return bool, accept
1553 parameter ptid directly.
1554 (linux_wait_for_event_filtered): Use find_thread_in_random.
1555 (linux_wait_1): Likewise.
1556
1557 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1558
1559 * inferiors.c (find_inferior_id): Remove.
1560 (find_thread_ptid): Move implemention from find_inferior_id to
1561 here.
1562 * inferiors.h (find_inferior_id): Remove.
1563 * server.c (handle_status): Use find_thread_ptid.
1564 (process_serial_event): Likewise.
1565 * thread-db.c (find_one_thread): Likewise.
1566 (thread_db_thread_handle): Likewise.
1567 * win32-low.c (thread_rec): Likewise.
1568 (child_delete_thread): Likewise.
1569 (win32_thread_alive): Likewise.
1570 (get_child_debug_event): Likewise.
1571
1572 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1573
1574 * linux-mips-low.c (update_watch_registers_callback): Return
1575 void, remove pid_p parameter, don't check for pid.
1576 (mips_insert_point, mips_remove_point): Use for_each_thread.
1577
1578 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1579
1580 * lynx.low (lynx_delete_thread_callback): Remove.
1581 (lynx_mourn): Use for_each_thread.
1582
1583 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1584
1585 * regcache.c (regcache_invalidate_one): Remove.
1586 (regcache_invalidate_pid): use for_each_thread.
1587
1588 2017-11-26 Tom Tromey <tom@tromey.com>
1589
1590 * linux-low.c (linux_create_inferior): Update.
1591
1592 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1593
1594 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1595
1596 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1597
1598 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1599 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1600 * linux-aarch64-tdesc-selftest.c: New file.
1601 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1602
1603 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1604
1605 * configure.srv: Add new file.
1606 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1607 * linux-aarch64-tdesc-selftest.c: New file.
1608 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1609
1610 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1611
1612 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1613 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1614 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1615
1616 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1617
1618 * configure.srv: Add new files.
1619 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1620 aarch64_linux_read_description.
1621 * linux-aarch64-low.c (aarch64_linux_read_description):
1622 Merge with aarch64_arch_setup.
1623 (aarch64_arch_setup): Call aarch64_linux_read_description.
1624 * linux-aarch64-tdesc.c: New file.
1625 * linux-aarch64-tdesc.h: New file.
1626
1627 2017-11-24 Yao Qi <yao.qi@linaro.org>
1628
1629 * configure.srv: Set $srv_regobj for tic6x-linux.
1630 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1631 (tic6x_read_description): Move some code to tic6x_arch_setup.
1632 (tic6x_tdesc_test): New function.
1633 (initialize_low_arch): Call selftests::register_test.
1634
1635 2017-11-22 Yao Qi <yao.qi@linaro.org>
1636
1637 * remote-utils.c (prepare_resume_reply): Use memcpy.
1638
1639 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1640
1641 * linux-low.c (kill_one_lwp_callback): Return void, take
1642 argument directly, don't filter on pid.
1643 (linux_kill): Use for_each_thread.
1644
1645 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1646
1647 * linux-low.c (need_step_over_p): Return bool, remove dummy
1648 argument.
1649 (linux_resume, proceed_all_lwps): Use find_thread.
1650
1651 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1652
1653 * linux-low.c (resume_status_pending_p): Return bool, remove
1654 flag_p argument.
1655 (linux_resume): Use find_thread.
1656
1657 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1658
1659 * linux-low.c (struct thread_resume_array): Remove.
1660 (linux_set_resume_request): Return void, take arguments
1661 directly.
1662 (linux_resume): Use for_each_thread.
1663
1664 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1665
1666 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1667 return bool, remove data argument.
1668 (linux_stabilize_threads): Use find_thread.
1669
1670 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1671
1672 * linux-low.c (unsuspend_one_lwp): Remove.
1673 (unsuspend_all_lwps): Use for_each_thread, inline code from
1674 unsuspend_one_lwp.
1675
1676 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1677
1678 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1679 * linux-low.c (struct iterate_over_lwps_args): Remove.
1680 (iterate_over_lwps_filter): Remove.
1681 (iterate_over_lwps): Use find_thread.
1682
1683 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1684
1685 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1686 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1687 code from reset_lwp_ptrace_options_callback.
1688
1689 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1690
1691 * linux-arm-low.c (struct update_registers_data): Remove.
1692 (update_registers_callback): Return void, take arguments
1693 directly, don't check thread's pid.
1694 (arm_insert_point, arm_remove_point): Use for_each_thread.
1695
1696 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1697
1698 * win32-low.c (continue_one_thread): Return void, take argument
1699 directly.
1700 (child_continue): Use for_each_thread.
1701
1702 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1703
1704 * win32-i386-low.c (update_debug_registers_callback): Rename
1705 to ...
1706 (update_debug_registers): ... this, return void, remove pid_p arg.
1707 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1708
1709 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1710
1711 * inferiors.h (struct process_info): Add constructor, initialize
1712 fields..
1713 <syscalls_to_catch>: Change type to std::vector<int>.
1714 * inferiors.c (add_process): Allocate process_info with new.
1715 (remove_process): Free process_info with delete.
1716 * linux-low.c (handle_extended_wait): Adjust.
1717 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1718 * server.c (handle_general_set): Adjust.
1719
1720 2017-11-16 Pedro Alves <palves@redhat.com>
1721
1722 * remote-utils.c (remote_close): Block SIGIO signals instead of
1723 uninstalling the SIGIO handler.
1724
1725 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1726
1727 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1728
1729 2017-11-16 Yao Qi <yao.qi@linaro.org>
1730
1731 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1732 (tic6x_store_gregset): Likewise.
1733 (tic6x_usrregs_info): Move it up.
1734
1735 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1736
1737 * Makefile.in: Update arch rules.
1738 * configure.srv: Explicitly mark arch/ files.
1739
1740 2017-11-13 Andreas Schwab <schwab@suse.de>
1741
1742 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1743 function.
1744 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1745
1746 2017-11-06 Pedro Alves <palves@redhat.com>
1747
1748 * config.in, configure: Regenerate.
1749
1750 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1751
1752 * target.c (struct thread_search): Remove.
1753 (thread_search_callback): Remove.
1754 (prepare_to_access_memory): Use for_each_thread instead of
1755 find_inferior. Inline code from thread_search_callback.
1756
1757 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1758
1759 * server.c (struct visit_actioned_threads_data): Remove.
1760 (visit_actioned_threads): Change prototype to take arguments
1761 directly.
1762 (resume): Use find_thread instead of find_inferior.
1763
1764 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1765
1766 * server.c (queue_stop_reply_callback): Change prototype, return
1767 void.
1768 (find_status_pending_thread_callback): Remove.
1769 (handle_status): Replace find_inferior with find_thread and
1770 for_each_thread.
1771
1772 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1773
1774 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1775 with REGNO.
1776 (aarch64_store_gregset): Likewise.
1777 (aarch64_fill_fpregset): Likewise.
1778 (aarch64_store_fpregset): Likewise.
1779
1780 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1781
1782 * gdbthread.h (find_thread, for_each_thread): New functions.
1783 * inferiors.c (thread_of_pid): Remove.
1784 (find_any_thread_of_pid): Use find_thread.
1785 * linux-low.c (num_lwps): Use for_each_thread.
1786
1787 2017-10-17 Yao Qi <yao.qi@linaro.org>
1788
1789 * Makefile.in: Remove one rule.
1790 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1791
1792 2017-10-17 Yao Qi <yao.qi@linaro.org>
1793
1794 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1795 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1796
1797 2017-10-17 Yao Qi <yao.qi@linaro.org>
1798
1799 * configure.srv: Rename arm.o with arch/arm.o.
1800
1801 2017-10-17 Yao Qi <yao.qi@linaro.org>
1802
1803 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1804 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1805 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1806 (arch-i386.o, arch-amd64.o): Remove rules.
1807 (arch/%.o): New rule.
1808 Update POSTCOMPILE and COMPILE.pre.
1809 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1810 * configure: Re-generated.
1811 * configure.srv: Replace arch-i386.o with arch/i386.o.
1812 Replace arch-amd64.o with arch/amd64.o.
1813
1814 2017-10-16 Yao Qi <yao.qi@linaro.org>
1815
1816 * configure: Regenerated.
1817
1818 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1819
1820 * inferiors.h: (struct inferior_list): Remove.
1821 (struct inferior_list_entry); Remove.
1822 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1823 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1824 get_first_inferior): Remove.
1825 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1826 find_inferior_id, find_inferior_in_random): Change signature.
1827 * inferiors.c (all_threads): Change type to
1828 std::list<thread_info *>.
1829 (get_thread): Remove macro.
1830 (find_inferior, find_inferior_id): Change signature, implement
1831 using find_thread.
1832 (find_inferior_in_random): Change signature, implement using
1833 find_thread_in_random.
1834 (for_each_inferior, for_each_inferior_with_data): Change
1835 signature, implement using for_each_thread.
1836 (add_inferior_to_list, remove_inferior): Remove.
1837 (add_thread, get_first_thread, thread_of_pid,
1838 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1839 (get_first_inferior, one_inferior_p, clear_inferior_list):
1840 Remove.
1841 (clear_inferiors, get_thread_process): Update.
1842 * gdbthread.h: Include <list>.
1843 (struct thread_info) <entry>: Remove field.
1844 <id>: New field.
1845 (all_threads): Change type to std::list<thread_info *>.
1846 (get_first_inferior): Add doc.
1847 (find_thread, for_each_thread, find_thread_in_random): New
1848 functions.
1849 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1850 * linux-arm-low.c (update_registers_callback): Update.
1851 * linux-low.c (second_thread_of_pid_p): Update.
1852 (kill_one_lwp_callback, linux_detach_lwp_callback,
1853 delete_lwp_callback, status_pending_p_callback, same_lwp,
1854 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1855 iterate_over_lwps, not_stopped_callback,
1856 resume_stopped_resumed_lwps, count_events_callback,
1857 select_singlestep_lwp_callback, select_event_lwp_callback,
1858 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1859 suspend_and_send_sigstop_callback, wait_for_sigstop,
1860 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1861 lwp_running, linux_set_resume_request, resume_status_pending_p,
1862 need_step_over_p, start_step_over, linux_resume_one_thread,
1863 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1864 reset_lwp_ptrace_options_callback): Update.
1865 * linux-mips-low.c (update_watch_registers_callback): Update.
1866 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1867 Update.
1868 (free_register_cache_thread_one): Remove.
1869 (regcache_release): Update.
1870 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1871 handle_qxfer_threads_worker): Update.
1872 (handle_query): Update, use list iterator.
1873 (visit_actioned_threads, handle_pending_status,
1874 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1875 clear_pending_status_callback, set_pending_status_callback,
1876 find_status_pending_thread_callback, handle_status,
1877 process_serial_event): Update.
1878 * target.c (thread_search_callback): Update.
1879 * thread-db.c (thread_db_get_tls_address): Update.
1880 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1881 Update.
1882 * win32-i386-low.c (update_debug_registers_callback): Update.
1883 * win32-low.c (delete_thread_info, child_delete_thread,
1884 continue_one_thread, suspend_one_thread,
1885 get_child_debug_event): Adjust.
1886
1887 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1888
1889 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1890 * inferiors.h: Include <list>.
1891 (struct process_info) <entry>: Remove field.
1892 <pid>: New field.
1893 (pid_of): Change macro to function.
1894 (ptid_of, lwpid_of): Remove macro.
1895 (all_processes): Change type to std::list<process_info *>.
1896 (ALL_PROCESSES): Remove macro.
1897 (for_each_process, find_process): New function.
1898 * inferiors.c (all_processes): Change type to
1899 std::list<process_info *>.
1900 (find_thread_process): Adjust.
1901 (add_process): Likewise.
1902 (remove_process): Likewise.
1903 (find_process_pid): Likewise.
1904 (get_first_process): Likewise.
1905 (started_inferior_callback): Remove.
1906 (have_started_inferiors_p): Adjust.
1907 (attached_inferior_callback): Remove.
1908 (have_attached_inferiors_p): Adjust.
1909 * linux-low.c (check_zombie_leaders): Likewise.
1910 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1911 (x86_linux_update_xmltarget): Adjust.
1912 * server.c (handle_query): Likewise.
1913 (gdb_reattached_process): Remove.
1914 (handle_status): Adjust.
1915 (kill_inferior_callback): Likewise.
1916 (detach_or_kill_inferior): Remove.
1917 (print_started_pid): Likewise.
1918 (print_attached_pid): Likewise.
1919 (detach_or_kill_for_exit): Update.
1920 (process_serial_event): Likewise.
1921 * linux-arm-low.c (arm_new_fork): Likewise.
1922
1923 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1924
1925 * dll.h: Include <list>.
1926 (struct dll_info): Add constructor.
1927 <entry>: Remove field.
1928 (all_dlls): Change type to std::list<dll_info>.
1929 * dll.c: Include <algorithm>.
1930 (get_dll): Remove macro.
1931 (all_dlls): Change type to std::list<dll_info *>.
1932 (free_one_dll): Remove.
1933 (match_dll): Likewise.
1934 (loaded_dll): Adjust.
1935 (unloaded_dll): Adjust to all_dlls type change, use
1936 std::find_if. Inline code from match_dll.
1937 (clear_dlls): Adjust to all_dlls type change.
1938 * server.c (emit_dll_description): Remove.
1939 (handle_qxfer_libraries): Adjust to all_dlls type change,
1940 integrate emit_dll_description's functionality.
1941
1942 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1943
1944 * linux-low.h (struct linux_target_ops) <delete_process>: New
1945 field.
1946 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1947 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1948 (struct linux_target_ops): Add delete_process callback.
1949 * linux-arm-low.c (arm_delete_process): New.
1950 (struct linux_target_ops): Add delete_process callback.
1951 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1952 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1953 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1954 * linux-mips-low.c (mips_linux_delete_process): New.
1955 (struct linux_target_ops): Add delete_process callback.
1956 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1957 * linux-s390-low.c (struct linux_target_ops): Likewise.
1958 * linux-sh-low.c (struct linux_target_ops): Likewise.
1959 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1960 * linux-tile-low.c (struct linux_target_ops): Likewise.
1961 * linux-x86-low.c (x86_linux_delete_process): New.
1962 (struct linux_target_ops): Add delete_process callback.
1963 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1964
1965 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1966
1967 * linux-aarch64-low.c (the_low_target): Add thread delete
1968 callback.
1969 * linux-arm-low.c (arm_delete_thread): New function.
1970 (the_low_target): Add thread delete callback.
1971 * linux-bfin-low.c (the_low_target): Likewise.
1972 * linux-crisv32-low.c (the_low_target): Likewise.
1973 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1974 set.
1975 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1976 field.
1977 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1978 * linux-mips-low.c (mips_linux_delete_thread): New function.
1979 (the_low_target): Add thread delete callback.
1980 * linux-ppc-low.c (the_low_target): Likewise.
1981 * linux-s390-low.c (the_low_target): Likewise.
1982 * linux-sh-low.c (the_low_target): Likewise.
1983 * linux-tic6x-low.c (the_low_target): Likewise.
1984 * linux-tile-low.c (the_low_target): Likewise.
1985 * linux-x86-low.c (the_low_target): Likewise.
1986 * linux-xtensa-low.c (the_low_target): Likewise.
1987
1988 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1989
1990 * win32-low.c: Include "common-inferior.h".
1991
1992 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1993
1994 * inferiors.c (set_inferior_cwd): New function.
1995 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1996 (handle_query): Inform that QSetWorkingDir is supported.
1997 * win32-low.c (create_process): Pass the inferior's cwd to
1998 CreateProcess.
1999
2000 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2001
2002 * inferiors.c (current_inferior_cwd): New global variable.
2003 (get_inferior_cwd): New function.
2004 * inferiors.h (struct process_info) <cwd>: New field.
2005
2006 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2007
2008 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2009 (OBS): Add gdb_tilde_expand.o.
2010
2011 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2012
2013 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2014 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2015
2016 2017-09-29 Pedro Alves <palves@redhat.com>
2017
2018 * ax.c (gdb_parse_agent_expr): Constify.
2019 * ax.h (gdb_parse_agent_expr): Constify.
2020 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2021 Constify.
2022 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2023 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2024 * remote-utils.h (read_ptid): Constify.
2025 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2026 (process_point_options, process_serial_event): Constify.
2027 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2028 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2029 (cmd_qtbuffer): Constify.
2030
2031 2017-09-29 Pedro Alves <palves@redhat.com>
2032
2033 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2034 fails.
2035
2036 2017-09-29 Pedro Alves <palves@redhat.com>
2037
2038 * linux-low.c (handle_extended_wait): Pass parent thread instead
2039 of process to thread_db_notice_clone.
2040 * linux-low.h (thread_db_notice_clone): Replace parent process
2041 parameter with parent thread parameter.
2042 * thread-db.c (find_one_thread): Add comment.
2043 (thread_db_notice_clone): Replace parent process parameter with
2044 parent thread parameter. Temporarily switch to the parent thread.
2045
2046 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2047
2048 * gdbthread.h: Include "common-gdbthread.h".
2049 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2050 "if" when validating the ptid.
2051 * remote-utils.c: Include "gdbthread.h".
2052 (prepare_resume_reply): Use "switch_to_thread".
2053 * target.c (done_accessing_memory): Likewise.
2054
2055 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2056
2057 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2058 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2059 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2060 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2061 s390x-gs-linux64-ipa.o to ipa_obj.
2062 * linux-s390-low.c (HWCAP_S390_GS): New define.
2063 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2064 New functions.
2065 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2066 (s390_arch_setup): Check for guarded-storage support and choose
2067 appropriate tdesc.
2068 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2069 init_registers_s390x_gs_linux64.
2070 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2071 enum value.
2072 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2073 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2074
2075 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2076
2077 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2078
2079 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2080
2081 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2082 (thread_db_thread_handle): Declare.
2083 * linux-low.c (linux_target_ops): Initialize thread_handle.
2084 * server.c (handle_qxfer_threads_worker): Add support for
2085 "handle" attribute.
2086 * target.h (struct target_ops): Add new function pointer,
2087 thread_handle.
2088 (target_thread_handle): Define.
2089 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2090 field in lwp.
2091 (thread_db_thread_handle): New function.
2092
2093 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2094
2095 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2096 * linux-low.h (thread_db_notice_clone): Declare.
2097 * thread-db.c (thread_db_notice_clone): New function.
2098
2099 2017-09-21 Pedro Alves <palves@redhat.com>
2100
2101 * server.c (gdb_read_memory, handle_status, process_serial_event)
2102 (handle_serial_event, handle_target_event): Adjust to
2103 set_desired_thread prototype change.
2104 * target.c (set_desired_thread): Remove 'use_general' parameter
2105 and adjust.
2106 * target.h (set_desired_thread): Remove 'use_general' parameter.
2107
2108 2017-09-20 Tom Tromey <tom@tromey.com>
2109
2110 * target.c (target_terminal::terminal_state): Define.
2111 (target_terminal::init): Rename from target_terminal_init.
2112 (target_terminal::inferior): Rename from
2113 target_terminal_inferior.
2114 (target_terminal::ours): Rename from target_terminal_ours.
2115 (target_terminal::ours_for_output, target_terminal::info): New.
2116
2117 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2118
2119 * server.c (accumulate_file_name_length): Remove.
2120 (emit_dll_description): Adjust to std::string change.
2121 (handle_qxfer_libraries): Use std::string to hold document.
2122
2123 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2124
2125 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2126 return type of xml_escape_text.
2127 * server.c (emit_dll_description): Likewise.
2128
2129 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2130
2131 * server.c (captured_main): Accept argument for --selftest.
2132 Update run_tests call.
2133 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2134 when registering selftests.
2135
2136 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2137
2138 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2139 instead of "VEC" for "target_desc.reg_defs".
2140 (regcache_cpy): Likewise.
2141 (registers_to_string): Likewise.
2142 (registers_from_string): Likewise.
2143 (find_regno): Likewise.
2144 (supply_regblock): Likewise.
2145 (regcache_raw_read_unsigned): Likewise.
2146 * tdesc.c (init_target_desc): Likewise.
2147 (tdesc_create_reg): Likewise.
2148 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2149 (struct target_desc) <reg_defs>: Convert to "std::vector".
2150 (target_desc): Do not initialize "reg_defs".
2151 (~target_desc): Update code to use "std::vector" instead of "VEC"
2152 for "target_desc.reg_defs".
2153 (operator==): Likewise.
2154
2155 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2156
2157 * inferiors.h (thread_to_gdb_id): Remove.
2158 * inferiors.c (thread_to_gdb_id): Remove.
2159 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2160 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2161 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2162 Likewise.
2163 * nto-low.c (nto_fetch_registers, nto_store_registers,
2164 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2165
2166 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2167
2168 * inferiors.h (gdb_id_to_thread_id): Remove.
2169 * inferiors.c (gdb_id_to_thread_id): Remove.
2170 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2171 removal. Move pid declaration closer to where it's used.
2172
2173 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2174
2175 * server.c (handle_detach): New function.
2176 (process_serial_event): Move code out, call handle_detach.
2177
2178 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2179
2180 * server.c (require_running): Rename to ...
2181 (require_running_or_return): ... this ...
2182 (require_running_or_break): ... and this.
2183 (handle_query, process_serial_event): Adjust.
2184
2185 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2186
2187 * linux-low.c (linux_set_resume_request): Remove unused
2188 variables.
2189
2190 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2191
2192 * server.c (first_thread_of): Remove.
2193 (process_serial_event): Replace usage of first_thread_of with
2194 find_any_thread_of_pid.
2195 * tracepoint.c (same_process_p): Remove.
2196 (gdb_agent_about_to_close): Replace usage of same_process_p with
2197 find_any_thread_of_pid.
2198 * linux-x86-low.c (same_process_callback): Remove.
2199 (x86_arch_setup_process_callback): Replace usage of
2200 same_process_callback with find_any_thread_of_pid.
2201 * thread-db.c (any_thread_of): Remove.
2202 (switch_to_process): Replace usage of any_thread_of with
2203 find_any_thread_of_pid.
2204 * inferiors.c (thread_pid_matches_callback): Remove.
2205 (find_thread_process): Adjust to use find_any_thread_of_pid.
2206
2207 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2208
2209 * regcache.c (get_thread_regcache): Guard calls to "memset"
2210 with "!VEC_empty".
2211
2212 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2213
2214 * linux-low.c (handle_extended_wait): Use
2215 "allocate_target_description" instead of "XNEW".
2216 * linux-x86-low.c (initialize_low_arch): Likewise.
2217
2218 2017-09-05 Yao Qi <yao.qi@linaro.org>
2219
2220 * configure.srv (srv_i386_regobj): Remove.
2221 (srv_amd64_regobj): Remove.
2222 (srv_regobj): Set it to "" for x86 non-linux targets.
2223 * linux-x86-tdesc.c (i386_linux_read_description):
2224 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2225 (init_registers_i386): Remove the declaration.
2226 (tdesc_i386): Remove the declaration.
2227 (lynx_i386_arch_setup): Call i386_create_target_description.
2228 * nto-x86-low.c: Likewise.
2229 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2230 [!__x86_64__]: include arch/i386.h.
2231 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2232
2233 2017-09-05 Yao Qi <yao.qi@linaro.org>
2234
2235 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2236 i386/amd64-XXX-linux from it.
2237
2238 2017-09-05 Yao Qi <yao.qi@linaro.org>
2239
2240 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2241 false.
2242 (ipa_amd64_linux_regobj): Remove.
2243 (ipa_x32_linux_regobj): Remove.
2244
2245 2017-09-05 Yao Qi <yao.qi@linaro.org>
2246
2247 * Makefile.in (arch-amd64.o): New rule.
2248 * configure.srv: Append arch-amd64.o.
2249 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2250 (get_ipa_tdesc): Call amd64_linux_read_description.
2251 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2252 and init_registers_amd64_XXX.
2253 * linux-x86-low.c (x86_linux_read_description): Call
2254 amd64_linux_read_description.
2255 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2256 (initialize_low_arch): Don't call init_registers_x32_XXX and
2257 init_registers_amd64_XXX.
2258 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2259 and tdesc_amd64_XXX.
2260 [__x86_64__] (amd64_tdesc_test): New function.
2261 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2262 and init_registers_amd64_XXX.
2263 * linux-x86-tdesc.c: Include arch/amd64.h.
2264 (xcr0_to_tdesc_idx): New function.
2265 (i386_linux_read_description): New function.
2266 (amd64_get_ipa_tdesc_idx): New function.
2267 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2268 (amd64_get_ipa_tdesc): Declare.
2269
2270 2017-09-05 Yao Qi <yao.qi@linaro.org>
2271
2272 * configure.srv (srv_i386_linux_xmlfiles): Remove
2273 i386/i386-XXX-linux.xml from it.
2274
2275 2017-09-05 Yao Qi <yao.qi@linaro.org>
2276
2277 * configure.srv: Set srv_i386_linux_regobj empty if $development
2278 is false.
2279 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2280 initialize_low_tdesc.
2281 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2282 with #if initialize_low_tdesc.
2283 * linux-x86-tdesc-selftest.c: New file.
2284 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2285
2286 2017-09-05 Yao Qi <yao.qi@linaro.org>
2287
2288 * Makefile.in (arch-i386.o): New rule.
2289 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2290 (x86_64-*-linux*): Likewise.
2291 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2292 include arch/i386.h.
2293 (i386_linux_read_description): Remove code and call
2294 i386_create_target_description.
2295 * tdesc.c (allocate_target_description): New function.
2296 * tdesc.h (set_tdesc_architecture): Remove declaration.
2297 (set_tdesc_osabi): Likewise.
2298
2299 2017-09-05 Yao Qi <yao.qi@linaro.org>
2300
2301 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2302 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2303 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2304 .xmltarget.
2305 * server.c (get_features_xml): Call tdesc_get_features_xml.
2306 * tdesc.c (set_tdesc_architecture): New function.
2307 (set_tdesc_osabi): New function.
2308 (tdesc_get_features_xml): New function.
2309 (tdesc_create_feature): Add an argument.
2310 * tdesc.h (struct target_desc) <features>: New field.
2311 <arch, osabi>: New field.
2312 (~target_desc): xfree features, arch, and osabi.
2313 (target_desc::oerator==): Don't compare .xmltarget.
2314 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2315 (set_tdesc_osabi): Likewise.
2316 (tdesc_get_features_xml): Likewise.
2317
2318 2017-09-05 Yao Qi <yao.qi@linaro.org>
2319
2320 * linux-x86-tdesc.c: Include selftest.h.
2321 (i386_tdesc_test): New function.
2322 (initialize_low_tdesc): Call selftests::register_test.
2323 * tdesc.h: Include regdef.h.
2324 (target_desc): Override operator == and !=.
2325
2326 2017-09-05 Yao Qi <yao.qi@linaro.org>
2327
2328 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2329 (ipa_obj): Likewise.
2330 * linux-i386-ipa.c: Include common/x86-xstate.h
2331 (get_ipa_tdesc): Call i386_linux_read_description.
2332 (initialize_low_tracepoint): Don't call init_registers_XXX
2333 functions, call initialize_low_tdesc instead.
2334 * linux-x86-low.c (x86_linux_read_description): Call
2335 i386_linux_read_description.
2336 (initialize_low_arch): Don't call init_registers_i386_XXX
2337 functions, call initialize_low_tdesc.
2338 * linux-x86-tdesc.c: New file.
2339 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2340 (i386_get_ipa_tdesc_idx): Declare.
2341 (i386_get_ipa_tdesc): Declare.
2342 (initialize_low_tdesc): Declare.
2343
2344 2017-09-05 Yao Qi <yao.qi@linaro.org>
2345
2346 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2347 instead of 0.
2348
2349 2017-09-05 Yao Qi <yao.qi@linaro.org>
2350
2351 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2352 * regcache.c (get_thread_regcache): Use VEC_length.
2353 (init_register_cache): Likewise.
2354 (regcache_cpy): Likewise.
2355 (registers_to_string): Iterate reg_defs via VEC_iterate.
2356 (find_regno): Likewise.
2357 (find_register_by_number): Use VEC_index.
2358 (register_size): Call find_register_by_number.
2359 (register_data): Call find_register_by_number.
2360 (supply_regblock): Use VEC_length.
2361 (regcache_raw_read_unsigned): Likewise.
2362 * tdesc.c (init_target_desc): Iterate reg_defs via
2363 VEC_iterate.
2364 (default_description): Update initializer.
2365 (copy_target_description): Don't update field num_registers.
2366 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2367 <num_registers>: Remove.
2368
2369 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2370
2371 * Makefile.in (.SECONDARY): Define target.
2372
2373 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2374
2375 * linux-low.c (linux_wait_1): Adjust.
2376 * server.c (queue_stop_reply_callback): Adjust.
2377
2378 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2379
2380 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2381 QEnvironmentUnset and QEnvironmentReset packets.
2382 (handle_query): Inform remote that QEnvironmentHexEncoded,
2383 QEnvironmentUnset and QEnvironmentReset are supported.
2384
2385 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2386
2387 * inferiors.h (inferior_target_data): Rename to ...
2388 (thread_target_data): ... this.
2389 (inferior_regcache_data): Rename to ...
2390 (thread_regcache_data): ... this.
2391 (set_inferior_regcache_data): Rename to ...
2392 (set_thread_regcache_data): ... this.
2393 * inferiors.c (inferior_target_data): Rename to ...
2394 (thread_target_data): ... this.
2395 (inferior_regcache_data): Rename to ...
2396 (thread_regcache_data): ... this.
2397 (set_inferior_regcache_data): Rename to ...
2398 (set_thread_regcache_data): ... this.
2399 (free_one_thread): Update.
2400 * linux-low.h (get_thread_lwp): Update.
2401 * regcache.c (get_thread_regcache): Update.
2402 (regcache_invalidate_thread): Update.
2403 (free_register_cache_thread): Update.
2404 * win32-i386-low.c (update_debug_registers_callback): Update.
2405 (win32_get_current_dr): Update.
2406 * win32-low.c (thread_rec): Update.
2407 (delete_thread_info): Update.
2408 (continue_one_thread): Update.
2409 (suspend_one_thread): Update.
2410
2411 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2412
2413 * inferiors.c (set_inferior_target_data): Remove.
2414 * inferiors.h (set_inferior_target_data): Remove.
2415
2416 2017-08-18 Yao Qi <yao.qi@linaro.org>
2417
2418 * Makefile.in (OBS): Add selftest.o.
2419 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2420 * configure, config.in: Re-generated.
2421 * server.c: Include common/sefltest.h.
2422 (captured_main): Handle option --selftest.
2423
2424 2017-08-09 Yao Qi <yao.qi@linaro.org>
2425
2426 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2427 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2428 i386-avx-mpx.o and i386-mmx.o.
2429 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2430 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2431 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2432 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2433 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2434 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2435 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2436 i386/amd64-avx-mpx.xml.
2437
2438 2017-08-09 Yao Qi <yao.qi@linaro.org>
2439
2440 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2441 and x32-avx-avx512.o.
2442 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2443 i386/x32-avx-avx512.xml.
2444
2445 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2446
2447 * tracepoint.h (enum class fast_tpoint_collect_result): New
2448 enumeration.
2449 (fast_tracepoint_collecting): Change return type to
2450 fast_tpoint_collect_result.
2451 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2452 * linux-low.h: Include tracepoint.h.
2453 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2454 fast_tpoint_collect_result.
2455 * linux-low.c (handle_tracepoints): Adjust.
2456 (linux_fast_tracepoint_collecting): Change return type to
2457 fast_tpoint_collect_result.
2458 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2459 linux_wait_1, stuck_in_jump_pad_callback,
2460 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2461 proceed_one_lwp): Adjust to type change.
2462
2463 2017-07-10 Yao Qi <yao.qi@linaro.org>
2464
2465 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2466
2467 2017-06-29 Yao Qi <yao.qi@linaro.org>
2468
2469 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2470 Remove.
2471 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2472
2473 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2474
2475 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2476
2477 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2478
2479 * linux-low.c (linux_create_inferior): Adjust code to access the
2480 environment information via 'gdb_environ' class.
2481 * lynx-low.c (lynx_create_inferior): Likewise.
2482 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2483 (get_environ): Return a pointer to 'our_environ'.
2484 (captured_main): Initialize 'our_environ'.
2485 * server.h (get_environ): Adjust prototype.
2486 * spu-low.c (spu_create_inferior): Adjust code to access the
2487 environment information via 'gdb_environ' class.
2488
2489 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2490
2491 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2492 usage of "register" keyword.
2493
2494 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2495
2496 * configure: Re-generate.
2497
2498 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2499
2500 * configure: Re-generate.
2501
2502 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2503
2504 * Makefile.in (COMPILE.pre): Add "-x c++".
2505
2506 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2507
2508 * fork-child.c: Conditionally include <signal.h>.
2509
2510 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2511
2512 * server.c (handle_general_set): Handle new packet
2513 "QStartupWithShell".
2514 (handle_query): Add "QStartupWithShell" to the list of supported
2515 packets.
2516 (gdbserver_usage): Add help text explaining the
2517 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2518 options.
2519 (captured_main): Recognize and act upon the presence of the new
2520 CLI options.
2521
2522 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2523 Pedro Alves <palves@redhat.com>
2524
2525 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2526 * configure: Regenerate.
2527 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2528 "fork-inferior.o".
2529 (i[34567]86-*-lynxos*): Likewise.
2530 (spu*-*-*): Likewise.
2531 * fork-child.c: New file.
2532 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2533 and "environ.h".
2534 (linux_ptrace_fun): New function.
2535 (linux_create_inferior): Adjust function prototype to reflect
2536 change on "target.h". Adjust function code to use
2537 "fork_inferior".
2538 (linux_request_interrupt): Delete "signal_pid".
2539 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2540 (lynx_ptrace_fun): New function.
2541 (lynx_create_inferior): Adjust function prototype to reflect
2542 change on "target.h". Adjust function code to use
2543 "fork_inferior".
2544 * nto-low.c (nto_create_inferior): Adjust function prototype and
2545 code to reflect change on "target.h". Update comments.
2546 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2547 "common-terminal.h" and "environ.h".
2548 (terminal_fd): Moved to fork-child.c.
2549 (old_foreground_pgrp): Likewise.
2550 (restore_old_foreground_pgrp): Likewise.
2551 (last_status): Make it global.
2552 (last_ptid): Likewise.
2553 (our_environ): New variable.
2554 (startup_with_shell): Likewise.
2555 (program_name): Likewise.
2556 (program_argv): Rename to...
2557 (program_args): ...this.
2558 (wrapper_argv): New variable.
2559 (start_inferior): Delete function.
2560 (get_exec_wrapper): New function.
2561 (get_exec_file): Likewise.
2562 (get_environ): Likewise.
2563 (prefork_hook): Likewise.
2564 (post_fork_inferior): Likewise.
2565 (postfork_hook): Likewise.
2566 (postfork_child_hook): Likewise.
2567 (handle_v_run): Update code to deal with arguments coming from the
2568 remote host. Update calls from "start_inferior" to
2569 "create_inferior".
2570 (captured_main): Likewise. Initialize environment variable. Call
2571 "have_job_control".
2572 * server.h (post_fork_inferior): New prototype.
2573 (get_environ): Likewise.
2574 (last_status): Declare.
2575 (last_ptid): Likewise.
2576 (signal_pid): Likewise.
2577 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2578 (spu_ptrace_fun): New function.
2579 (spu_create_inferior): Adjust function prototype to reflect change
2580 on "target.h". Adjust function code to use "fork_inferior".
2581 * target.c (target_terminal_init): New function.
2582 (target_terminal_inferior): Likewise.
2583 (target_terminal_ours): Likewise.
2584 * target.h: Include <vector>.
2585 (struct target_ops) <create_inferior>: Update prototype.
2586 (create_inferior): Update macro.
2587 * utils.c (gdb_flush_out_err): New function.
2588 * win32-low.c (win32_create_inferior): Adjust function prototype
2589 and code to reflect change on "target.h".
2590
2591 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2592
2593 * inferiors.c (switch_to_thread): New function.
2594
2595 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2596
2597 * Makefile.in (SFILE): Add "common/job-control.c".
2598 (OBS): Add "job-control.o".
2599
2600 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2601
2602 * Makefile: Remove "@host_makefile_frag@".
2603
2604 2017-05-05 Pedro Alves <palves@redhat.com>
2605
2606 * configure: Regenerate.
2607
2608 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2609
2610 * configure: Regenerate.
2611
2612 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2613
2614 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2615 software_single_step change of return type to
2616 std::vector<CORE_ADDR>.
2617 * linux-low.c (install_software_single_step_breakpoints):
2618 Likewise.
2619 * linux-low.h (install_software_single_step_breakpoints):
2620 Likewise.
2621
2622 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2623
2624 * remote-utils.c: Include "gdb_termios.h" instead of
2625 "terminal.h".
2626 * terminal.h: Delete file.
2627
2628 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2629
2630 * server.c: Include <vector>.
2631 <program_argv, wrapper_argv>: Convert to std::vector.
2632 (start_inferior): Rewrite function to use C++.
2633 (handle_v_run): Likewise. Update code that calculates the argv
2634 based on the vRun packet; use C++.
2635 (captured_main): Likewise.
2636
2637 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2638
2639 * server.c (handle_v_cont): Initialize thread_resume::thread
2640 with null_ptid.
2641
2642 2017-04-05 Pedro Alves <palves@redhat.com>
2643
2644 * configure: Regenerate.
2645
2646 2017-04-05 Pedro Alves <palves@redhat.com>
2647
2648 * gdbreplay.c (sync_error): Constify.
2649 * linux-x86-low.c (push_opcode): Constify.
2650
2651 2017-04-05 Pedro Alves <palves@redhat.com>
2652
2653 * win32-low.c (get_child_debug_event)
2654 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2655 Report TARGET_WAITKIND_SPURIOUS instead.
2656
2657 2017-04-05 Pedro Alves <palves@redhat.com>
2658
2659 * remote-utils.c (remote_prepare, remote_open): Constify.
2660 * remote-utils.h (remote_prepare, remote_open): Constify.
2661 * server.c (captured_main): Constify 'port' handling.
2662
2663 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2664
2665 * Makefile.in (clean): Clear .deps.
2666
2667 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2668
2669 * .gitignore: Remove generated files, replace with wildcard.
2670 * (clean): Replace removal of generated files with wildcard.
2671 (version.c): Replace with...
2672 (version-generated.c): ...this.
2673 (xml-builtin.c): Replace with...
2674 (xml-builtin-generated.c): ...this.
2675 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2676 (%.c: *regformats*): Replace with...
2677 (%-generated.c: *regformats*): ...this.
2678
2679 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2680
2681 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2682 (xtensa_fill_gregset): Call collect_register_by_name for
2683 threadptr register.
2684 (xtensa_store_gregset): Call supply_register_by_name for
2685 threadptr register.
2686
2687 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2688
2689 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2690 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2691 (xtensa_store_gregset): Call supply_register for all registers in
2692 a0_regnum..a0_regnum + C0_NREGS range.
2693
2694 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2695
2696 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2697 (ax-ipa.o: ax.c): Remove.
2698 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2699 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2700 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2701 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2702 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2703
2704 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2705
2706 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2707 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2708 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2709 (errors-ipa.o: ../common/errors.c): Remove.
2710 (format-ipa.o: ../common/format.c): Remove.
2711 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2712
2713 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2714
2715 * Makefile.in (%-ipa.o: %.c): New rule.
2716 (tracepoint-ipa.o: tracepoint.c): Remove.
2717 (utils-ipa.o: utils.c): Remove.
2718 (remote-utils-ipa.o: remote-utils.c): Remove.
2719 (regcache-ipa.o: regcache.c): Remove.
2720 (i386-linux-ipa.o: i386-linux.c): Remove.
2721 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2722 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2723 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2724 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2725 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2726 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2727 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2728 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2729 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2730 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2731 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2732 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2733 (aarch64-ipa.o: aarch64.c): Remove.
2734 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2735 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2736 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2737 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2738 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2739 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2740 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2741 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2742 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2743 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2744 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2745 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2746 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2747 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2748 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2749 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2750 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2751 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2752 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2753 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2754 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2755 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2756 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2757 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2758 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2759 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2760 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2761 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2762 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2763 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2764 (tdesc-ipa.o: tdesc.c): Remove.
2765 (x32-linux-ipa.o: x32-linux.c): Remove.
2766 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2767 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2768
2769 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2770
2771 * Makefile.in (%.o: ../arch/%.c): New rule.
2772 (arm.o: ../arch/arm.c): Remove.
2773 (arm-linux.o: ../arch/arm-linux.c): Remove.
2774 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2775 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2776
2777 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2778
2779 * Makefile.in (%.o: ../nat/%.c): New rule.
2780 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2781 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2782 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2783 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2784 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2785 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2786 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2787 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2788 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2789 (linux-personality.o: ../nat/linux-personality.c): Remove.
2790 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2791 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2792 (x86-linux.o: ../nat/x86-linux.c): Remove.
2793 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2794 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2795
2796 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2797
2798 * Makefile.in (%.o: ../common/%.c): New rule.
2799 (signals.o: ../common/signals.c): Remove.
2800 (print-utils.o: ../common/print-utils.c): Remove.
2801 (rsp-low.o: ../common/rsp-low.c): Remove.
2802 (common-utils.o: ../common/common-utils.c): Remove.
2803 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2804 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2805 (vec.o: ../common/vec.c): Remove.
2806 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2807 (xml-utils.o: ../common/xml-utils.c): Remove.
2808 (ptid.o: ../common/ptid.c): Remove.
2809 (buffer.o: ../common/buffer.c): Remove.
2810 (format.o: ../common/format.c): Remove.
2811 (filestuff.o: ../common/filestuff.c): Remove.
2812 (agent.o: ../common/agent.c): Remove.
2813 (errors.o: ../common/errors.c): Remove.
2814 (environ.o: ../common/environ.c): Remove.
2815 (common-debug.o: ../common/common-debug.c): Remove.
2816 (cleanups.o: ../common/cleanups.c): Remove.
2817 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2818 (fileio.o: ../common/fileio.c): Remove.
2819 (common-regcache.o: ../common/common-regcache.c): Remove.
2820 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2821 (new-op.o: ../common/new-op.c): Remove.
2822 (btrace-common.o: ../common/btrace-common.c): Remove.
2823
2824 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2825
2826 * Makefile.in (%.o: ../target/%.c): New rule.
2827 (waitstatus.o: ../target/waitstatus.c): Remove.
2828
2829 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2830
2831 * Makefile.in
2832 (%.c: ../regformats/%.dat,
2833 (%.c: ../regformats/arm/%.dat,
2834 (%.c: ../regformats/i386/%.dat,
2835 (%.c: ../regformats/rs6000/%.dat): New rules.
2836 (aarch64.c): Remove.
2837 (reg-arm.c): Remove.
2838 (arm-with-iwmmxt.c): Remove.
2839 (arm-with-vfpv2.c): Remove.
2840 (arm-with-vfpv3.c): Remove.
2841 (arm-with-neon.c): Remove.
2842 (reg-bfin.c): Remove.
2843 (reg-cris.c): Remove.
2844 (reg-crisv32.c): Remove.
2845 (i386.c): Remove.
2846 (i386-linux.c): Remove.
2847 (i386-avx.c): Remove.
2848 (i386-avx-linux.c): Remove.
2849 (i386-avx-avx512.c): Remove.
2850 (i386-avx-avx512-linux.c): Remove.
2851 (i386-mpx.c): Remove.
2852 (i386-mpx-linux.c): Remove.
2853 (i386-avx-mpx-avx512-pku.c): Remove.
2854 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2855 (i386-avx-mpx.c): Remove.
2856 (i386-avx-mpx-linux.c): Remove.
2857 (i386-mmx.c): Remove.
2858 (i386-mmx-linux.c): Remove.
2859 (reg-ia64.c): Remove.
2860 (reg-m32r.c): Remove.
2861 (reg-m68k.c): Remove.
2862 (reg-cf.c): Remove.
2863 (mips-linux.c): Remove.
2864 (mips-dsp-linux.c): Remove.
2865 (mips64-linux.c): Remove.
2866 (mips64-dsp-linux.c): Remove.
2867 (nios2-linux.c): Remove.
2868 (powerpc-32.c): Remove.
2869 (powerpc-32l.c): Remove.
2870 (powerpc-altivec32l.c): Remove.
2871 (powerpc-cell32l.c): Remove.
2872 (powerpc-vsx32l.c): Remove.
2873 (powerpc-isa205-32l.c): Remove.
2874 (powerpc-isa205-altivec32l.c): Remove.
2875 (powerpc-isa205-vsx32l.c): Remove.
2876 (powerpc-e500l.c): Remove.
2877 (powerpc-64l.c): Remove.
2878 (powerpc-altivec64l.c): Remove.
2879 (powerpc-cell64l.c): Remove.
2880 (powerpc-vsx64l.c): Remove.
2881 (powerpc-isa205-64l.c): Remove.
2882 (powerpc-isa205-altivec64l.c): Remove.
2883 (powerpc-isa205-vsx64l.c): Remove.
2884 (s390-linux32.c): Remove.
2885 (s390-linux32v1.c): Remove.
2886 (s390-linux32v2.c): Remove.
2887 (s390-linux64.c): Remove.
2888 (s390-linux64v1.c): Remove.
2889 (s390-linux64v2.c): Remove.
2890 (s390-te-linux64.c): Remove.
2891 (s390-vx-linux64.c): Remove.
2892 (s390-tevx-linux64.c): Remove.
2893 (s390x-linux64.c): Remove.
2894 (s390x-linux64v1.c): Remove.
2895 (s390x-linux64v2.c): Remove.
2896 (s390x-te-linux64.c): Remove.
2897 (s390x-vx-linux64.c): Remove.
2898 (s390x-tevx-linux64.c): Remove.
2899 (tic6x-c64xp-linux.c): Remove.
2900 (tic6x-c64x-linux.c): Remove.
2901 (tic6x-c62x-linux.c): Remove.
2902 (reg-sh.c): Remove.
2903 (reg-sparc64.c): Remove.
2904 (reg-spu.c): Remove.
2905 (amd64.c): Remove.
2906 (amd64-linux.c): Remove.
2907 (amd64-avx.c): Remove.
2908 (amd64-avx-linux.c): Remove.
2909 (amd64-avx-avx512.c): Remove.
2910 (amd64-avx-avx512-linux.c): Remove.
2911 (amd64-mpx.c): Remove.
2912 (amd64-mpx-linux.c): Remove.
2913 (amd64-avx-mpx-avx512-pku.c): Remove.
2914 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2915 (amd64-avx-mpx.c): Remove.
2916 (amd64-avx-mpx-linux.c): Remove.
2917 (x32.c): Remove.
2918 (x32-linux.c): Remove.
2919 (x32-avx.c): Remove.
2920 (x32-avx-linux.c): Remove.
2921 (x32-avx-avx512.c): Remove.
2922 (x32-avx-avx512-linux.c): Remove.
2923 (reg-xtensa.c): Remove.
2924 (reg-tilegx.c): Remove.
2925 (reg-tilegx32.c): Remove.
2926
2927 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2928
2929 * Makefile.in (SFILES): Add "common/environ.c".
2930 (OBJS): Add "common/environ.h".
2931
2932 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2933
2934 * configure.ac: Check if the fs_base and gs_base members of
2935 `struct user_regs_struct' exist.
2936 * config.in: Regenerated.
2937 * configure: Likewise.
2938
2939 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2940
2941 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2942 target_read_memory.
2943 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2944 (get_next_pcs_syscall_next_pc): Likewise.
2945
2946 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2947
2948 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2949 * nto-x86-low.c: Likewise.
2950
2951 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2952
2953 * Makefile.in: Include disable-implicit-rules.mk.
2954
2955 2016-11-23 Pedro Alves <palves@redhat.com>
2956
2957 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2958 (debug_vprintf): Use std::chrono::steady_clock instead of
2959 gettimeofday. Use '.' instead of ':'.
2960 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2961 (get_timestamp): Use std::chrono::steady_clock instead of
2962 gettimeofday.
2963
2964 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2965
2966 * Makefile.in: Fix whitespace formatting.
2967
2968 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2969
2970 * Makefile.in (SFILES, OBS): Flatten list and order
2971 alphabetically.
2972
2973 2016-11-23 Pedro Alves <palves@redhat.com>
2974
2975 * event-loop.c (handle_file_event): Use warning.
2976 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2977 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2978 Use warning.
2979
2980 2016-11-23 Pedro Alves <palves@redhat.com>
2981
2982 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2983 output.
2984 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2985 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2986 debug_printf and debug_flush for debug output.
2987 * server.c (handle_general_set): Likewise.
2988 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2989 output.
2990
2991 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2992
2993 * Makefile.in (.c.o): Replace rule with ...
2994 (%.o: %.c): ... this one.
2995
2996 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2997
2998 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2999 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3000 make.
3001 * configure.ac: Remove checks for the make program.
3002 * configure: Re-generate.
3003
3004 2016-10-28 Pedro Alves <palves@redhat.com>
3005
3006 * Makefile.in (CXX_DIALECT): Get from configure.
3007 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3008 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3009 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3010 * config.in: Regenerate.
3011 * configure: Regenerate.
3012
3013 2016-10-27 Yao Qi <yao.qi@linaro.org>
3014
3015 * linux-low.c (linux_supports_range_stepping): Return true if
3016 can_software_single_step return true.
3017
3018 2016-10-27 Yao Qi <yao.qi@linaro.org>
3019
3020 * inferiors.c (find_inferior_in_random): New function.
3021 * inferiors.h (find_inferior_in_random): Declare.
3022 * linux-low.c (linux_wait_for_event_filtered): Call
3023 find_inferior_in_random instead of find_inferior.
3024
3025 2016-10-27 Yao Qi <yao.qi@linaro.org>
3026
3027 * linux-low.c (linux_wait_1): If single-step breakpoints are
3028 inserted, remove them.
3029
3030 2016-10-26 Pedro Alves <palves@redhat.com>
3031
3032 * linux-low.c (handle_extended_wait): Link parent/child fork
3033 threads.
3034 (linux_wait_1): Unlink them.
3035 (linux_set_resume_request): Ignore resume requests for
3036 already-resumed and unhandled fork child threads.
3037 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3038 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3039 New functions.
3040 (handle_v_requests) <vCont>: Don't call require_running.
3041 * server.h (in_queued_stop_replies): New declaration.
3042
3043 2016-10-24 Yao Qi <yao.qi@linaro.org>
3044
3045 PR server/20733
3046 * linux-aarch64-low.c (append_insns): Cast the return value to
3047 'uint32_t *'.
3048
3049 2016-10-10 Yao Qi <yao.qi@linaro.org>
3050
3051 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3052
3053 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3054
3055 * target.c (target_supports_multi_process): New function, moved
3056 from...
3057 * target.h (target_supports_multi_process): ... here. Remove
3058 macro.
3059
3060 2016-10-05 Tom Tromey <tom@tromey.com>
3061
3062 PR remote/20655:
3063 * tracepoint.c (handle_tracepoint_bkpts): Check
3064 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3065
3066 2016-10-05 Yao Qi <yao.qi@linaro.org>
3067
3068 * configure.srv: Update the path of arm-*.xml files.
3069
3070 2016-10-05 Terry Guo <terry.guo@arm.com>
3071 Yao Qi <yao.qi@linaro.org>
3072
3073 * Makefile.in: Adjust the path of rules.
3074 * configure.srv: Update the path of xml files.
3075 * regformats/arm-with-iwmmxt.dat: Regenerated.
3076 * regformats/arm-with-neon.dat: Likewise.
3077 * regformats/arm-with-vfpv2.dat: Likewise.
3078 * regformats/arm-with-vfpv3.dat Likewise.
3079
3080 2016-09-30 Yao Qi <yao.qi@linaro.org>
3081
3082 PR gdbserver/20627
3083 * target.c (target_stop_and_wait): Don't call
3084 target_continue_no_signal, use resume_stop instead.
3085
3086 2016-09-26 Yao Qi <yao.qi@linaro.org>
3087
3088 * linux-low.c (linux_wait_1): Call debug_exit.
3089
3090 2016-09-23 Pedro Alves <palves@redhat.com>
3091
3092 * Makefile.in (SFILES): Add common/new-op.c.
3093 (OBS): Add common/new-op.o.
3094 (new-op.o): New rule.
3095
3096 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3097
3098 * .gitinore: Ignore more files.
3099
3100 2016-09-21 Yao Qi <yao.qi@linaro.org>
3101
3102 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3103 23.
3104
3105 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3106
3107 * server.c (start_inferior): Call target_mourn_inferior instead of
3108 mourn_inferior; pass ptid_t argument to it.
3109 (resume): Likewise.
3110 (handle_target_event): Likewise.
3111 * target.c (target_mourn_inferior): New function.
3112 * target.h (mourn_inferior): Delete macro.
3113
3114 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3115
3116 * linux-low.c (lwp_is_stepping): New function.
3117
3118 2016-09-06 Carl Love <cel@us.ibm.com>
3119
3120 * server.c (start_inferior): Fixed comment, requested comment change
3121 didn't get updated correctly. Removed reference to ptrace () call as
3122 it is only true on Linux systems.
3123
3124 2016-09-06 Carl Love <cel@us.ibm.com>
3125
3126 * server.c (start_inferior): Do not call
3127 function target_post_create_inferior () if the
3128 inferior process has already exited.
3129
3130 2016-09-05 Pedro Alves <palves@redhat.com>
3131
3132 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3133 (COMPILE.pre, CC_LD): Use CXX directly.
3134 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3135 * acinclude.m4: Don't include build-with-cxx.m4.
3136 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3137 * configure: Regenerate.
3138
3139 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3140
3141 PR gdb/19495
3142 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3143 call writing data to own_buf.
3144
3145 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3146
3147 * target.c (mywait): Call target_wait instead of
3148 the_target->wait.
3149 (target_wait): New function.
3150
3151 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3152
3153 * server.c (start_inferior): New variable 'ptid'. Replace calls
3154 to the_target->resume by target_continue{,_no_signal}, depending
3155 on the case.
3156 * target.c (target_stop_and_wait): Call target_continue_no_signal
3157 instead of the_target->resume.
3158 (target_continue): New function.
3159
3160 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3161
3162 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3163
3164 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3165
3166 PR server/20491
3167 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3168 ps_prochandle.
3169 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3170 * linux-arm-low.c (ps_get_thread_area): Likewise.
3171 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3172 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3173 * linux-mips-low.c (ps_get_thread_area): Likewise.
3174 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3175 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3176 * linux-x86-low.c (ps_get_thread_area): Likewise.
3177 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3178
3179 2016-08-19 Pedro Alves <palves@redhat.com>
3180
3181 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3182
3183 2016-08-19 Pedro Alves <palves@redhat.com>
3184
3185 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3186 comment. Use memcpy instead of casting through unsigned long.
3187
3188 2016-08-19 Pedro Alves <palves@redhat.com>
3189
3190 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3191 allocating around 0x80000000.
3192
3193 2016-08-19 Pedro Alves <palves@redhat.com>
3194
3195 PR gdb/20415
3196 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3197 (x32-avx512-linux-ipa.o): New rules.
3198 * configure.ac (x86_64-*-linux*): New x32 check.
3199 * configure.srv (ipa_x32_linux_regobj): New.
3200 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3201 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3202 descriptions.
3203 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3204 descriptions.
3205 * configure: Regenerate.
3206
3207 2016-08-09 Pedro Alves <palves@redhat.com>
3208
3209 PR gdb/18653
3210 * Makefile.in (OBS): Add signals-state-save-restore.o.
3211 (signals-state-save-restore.o): New rule.
3212 * config.in: Regenerate.
3213 * configure: Regenerate.
3214 * linux-low.c: Include "signals-state-save-restore.h".
3215 (linux_create_inferior): Call
3216 restore_original_signals_state.
3217 * server.c: Include "dispositions-save-restore.h".
3218 (captured_main): Call save_original_signals_state.
3219
3220 2016-08-05 Pedro Alves <palves@redhat.com>
3221
3222 * configure: Regenerate.
3223
3224 2016-08-04 Yao Qi <yao.qi@linaro.org>
3225
3226 * linux-low.c (regsets_fetch_inferior_registers): Check
3227 errno is ESRCH or not.
3228
3229 2016-08-02 Yao Qi <yao.qi@linaro.org>
3230
3231 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3232 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3233 (thread_db_load_search): Update.
3234 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3235 td_ta_set_event and td_ta_event_getmsg.
3236
3237 2016-07-26 Pedro Alves <palves@redhat.com>
3238
3239 PR server/20414
3240 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3241 of unsigned long for 64-bit registers and use uint32_t instead of
3242 unsigned int for 32-bit registers.
3243
3244 2016-07-26 Pedro Alves <palves@redhat.com>
3245
3246 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3247 to 'ptrace'.
3248
3249 2016-07-21 Tom Tromey <tom@tromey.com>
3250
3251 * configure: Rebuild.
3252
3253 2016-07-21 Yao Qi <yao.qi@linaro.org>
3254
3255 * mem-break.c (find_gdb_breakpoint): Cast bp to
3256 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3257
3258 2016-07-21 Yao Qi <yao.qi@linaro.org>
3259
3260 * server.c (handle_v_requests): Support s and S actions
3261 if target_supports_software_single_step return true.
3262
3263 2016-07-21 Yao Qi <yao.qi@linaro.org>
3264
3265 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3266 is resume_step, call maybe_hw_step.
3267 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3268 and unstop them.
3269 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3270 breakpoints or not.
3271 (proceed_one_lwp): If resume request is resume_step, install
3272 reinsert breakpoints and call maybe_hw_step.
3273
3274 2016-07-21 Yao Qi <yao.qi@linaro.org>
3275
3276 * linux-low.c (proceed_one_lwp): Declare.
3277 (linux_resume_one_thread): Remove local variable 'step'.
3278 Lift code enqueue signal. Call proceed_one_lwp instead of
3279 linux_resume_one_lwp.
3280
3281 2016-07-21 Yao Qi <yao.qi@linaro.org>
3282
3283 * linux-low.c (linux_resume_one_thread): Call
3284 enqueue_pending_signal.
3285
3286 2016-07-21 Yao Qi <yao.qi@linaro.org>
3287
3288 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3289 * inferiors.c (do_restore_current_thread_cleanup): New function.
3290 (make_cleanup_restore_current_thread): Likewise.
3291 * linux-low.c (install_software_single_step_breakpoints): Call
3292 make_cleanup_restore_current_thread. Switch current_thread to
3293 thread.
3294
3295 2016-07-21 Yao Qi <yao.qi@linaro.org>
3296
3297 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3298 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3299 (clone_one_breakpoint): Likewise.
3300 (delete_reinsert_breakpoints): Change parameter to thread.
3301 Callers updated.
3302 (has_reinsert_breakpoints): Likewise.
3303 (uninsert_reinsert_breakpoints): Likewise.
3304 (reinsert_reinsert_breakpoints): Likewise.
3305 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3306 (delete_reinsert_breakpoints): Likewise.
3307 (reinsert_reinsert_breakpoints): Likewise.
3308 (uninsert_reinsert_breakpoints): Likewise.
3309 (has_reinsert_breakpoints): Likewise.
3310
3311 2016-07-21 Yao Qi <yao.qi@linaro.org>
3312
3313 * inferiors.c (get_thread_process): Make parameter const.
3314 * inferiors.h (get_thread_process): Update declaration.
3315 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3316 Add new parameters child_thread and parent_thread. Callers
3317 updated.
3318 * mem-break.h (clone_all_breakpoints): Update declaration.
3319
3320 2016-07-21 Yao Qi <yao.qi@linaro.org>
3321
3322 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3323 <command_list, handler>: Remove.
3324 (struct gdb_breakpoint): New.
3325 (struct other_breakpoint): New.
3326 (struct reinsert_breakpoint): New.
3327 (is_gdb_breakpoint): New function.
3328 (any_persistent_commands): Update command_list if
3329 is_gdb_breakpoint returns true.
3330 (set_breakpoint): Create breakpoints according to their types.
3331 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3332 (set_gdb_breakpoint_1): Likewise.
3333 (set_gdb_breakpoint): Likewise.
3334 (clear_breakpoint_conditions): Change parameter type to
3335 'struct gdb_breakpoint *'.
3336 (clear_breakpoint_commands): Likewise.
3337 (clear_breakpoint_conditions_and_commands): Likewise.
3338 (add_condition_to_breakpoint): Likewise.
3339 (add_breakpoint_condition): Likewise.
3340 (add_commands_to_breakpoint): Likewise.
3341 (check_breakpoints): Check other_breakpoint.
3342 (clone_one_breakpoint): Clone breakpopint according to its type.
3343 * mem-break.h (struct gdb_breakpoint): Declare.
3344 (set_gdb_breakpoint): Update declaration.
3345 (clear_breakpoint_conditions_and_commands): Likewise.
3346 (add_breakpoint_condition): Likewise.
3347 (add_breakpoint_commands): Likewise.
3348 * server.c (process_point_options): Change parameter type to
3349 'struct gdb_breakpoint *'.
3350
3351 2016-07-21 Yao Qi <yao.qi@linaro.org>
3352
3353 * mem-break.c (set_breakpoint_at): Rename it to ...
3354 (set_breakpoint_type_at): ... it.
3355 (set_breakpoint_at): Call set_breakpoint_type_at.
3356 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3357 * mem-break.h (set_breakpoint_at): Update comments.
3358
3359 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3360
3361 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3362 to buf parameter.
3363 (nios2_store_gregset): Likewise.
3364
3365 2016-07-01 Pedro Alves <palves@redhat.com>
3366 Antoine Tremblay <antoine.tremblay@ericsson.com>
3367
3368 * linux-low.c: Change interface to take the target lwp_info
3369 pointer directly and return void. Handle detaching from a zombie
3370 thread.
3371 (linux_detach_lwp_callback): New function.
3372 (linux_detach): Detach from the leader thread after detaching from
3373 the clone threads.
3374
3375 2016-06-28 Yao Qi <yao.qi@linaro.org>
3376
3377 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3378 for variable new_offset.
3379 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3380 (aarch64_ftrace_insn_reloc_cb): Likewise.
3381 (aarch64_ftrace_insn_reloc_tb): Likewise.
3382 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3383 PRIx64 instead of PRIx32.
3384
3385 2016-06-28 Yao Qi <yao.qi@linaro.org>
3386
3387 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3388 (the_low_target): Install arm_get_syscall_trapinfo.
3389
3390 2016-06-28 Yao Qi <yao.qi@linaro.org>
3391
3392 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3393 function.
3394 (the_low_target): Install aarch64_get_syscall_trapinfo.
3395
3396 2016-06-28 Yao Qi <yao.qi@linaro.org>
3397
3398 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3399 Callers updated.
3400 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3401 Remove parameter sysno.
3402 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3403 sysret.
3404
3405 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3406
3407 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3408 (s390_emit_ne_goto): Likewise.
3409 (s390_emit_lt_goto): Likewise.
3410 (s390_emit_le_goto): Likewise.
3411 (s390_emit_gt_goto): Likewise.
3412 (s390_emit_ge_goto): Likewise.
3413 (s390x_emit_eq_goto): Likewise.
3414 (s390x_emit_ne_goto): Likewise.
3415 (s390x_emit_lt_goto): Likewise.
3416 (s390x_emit_le_goto): Likewise.
3417 (s390x_emit_gt_goto): Likewise.
3418 (s390x_emit_ge_goto): Likewise.
3419 (s390_emit_ops_impl): Mark variable static.
3420 (s390x_emit_ops): Likewise.
3421
3422 2016-06-17 Yao Qi <yao.qi@linaro.org>
3423
3424 * linux-low.c (handle_extended_wait): Call
3425 uninsert_reinsert_breakpoints for the parent process. Remove
3426 reinsert breakpoints from the child process. Reinsert them to
3427 the parent process when vfork is done.
3428 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3429 (reinsert_reinsert_breakpoints): New function.
3430 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3431 (reinsert_reinsert_breakpoints): Declare.
3432
3433 2016-06-17 Yao Qi <yao.qi@linaro.org>
3434
3435 * linux-low.c (handle_extended_wait): If the parent is doing
3436 step-over, remove the reinsert breakpoints from the forked child.
3437
3438 2016-06-17 Yao Qi <yao.qi@linaro.org>
3439
3440 * linux-low.c (unsuspend_all_lwps): Declare.
3441 (linux_low_filter_event): If thread exited, call finish_step_over.
3442 If step-over is finished, unsuspend other threads.
3443
3444 2016-06-17 Yao Qi <yao.qi@linaro.org>
3445
3446 * linux-low.c (linux_resume_one_lwp_throw): Assert
3447 has_reinsert_breakpoints returns false.
3448 * mem-break.c (delete_disabled_breakpoints): Assert
3449 bp type isn't reinsert_breakpoint.
3450
3451 2016-06-17 Yao Qi <yao.qi@linaro.org>
3452
3453 * linux-low.c (maybe_hw_step): New function.
3454 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3455 (finish_step_over): Switch current_thread to lwp temporarily,
3456 and assert has_reinsert_breakpoints returns true.
3457 (proceed_one_lwp): Call maybe_hw_step.
3458 * mem-break.c (has_reinsert_breakpoints): New function.
3459 * mem-break.h (has_reinsert_breakpoints): Declare.
3460
3461 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3462
3463 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3464
3465 2016-05-17 Yao Qi <yao.qi@linaro.org>
3466
3467 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3468 instead of find_inferior.
3469
3470 2016-05-05 Yao Qi <yao.qi@linaro.org>
3471
3472 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3473 Initialize res to zero.
3474
3475 2016-05-05 Yao Qi <yao.qi@linaro.org>
3476
3477 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3478 to uint32_t.
3479
3480 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3481
3482 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3483 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3484 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3485
3486 2016-04-28 Par Olsson <par.olsson@windriver.com>
3487 Simon Marchi <simon.marchi@ericsson.com>
3488
3489 * tracepoint.c (write_inferior_int8): New function.
3490 (cmd_qtenable_disable): Write enable flag using
3491 write_inferior_int8.
3492
3493 2016-04-25 Yao Qi <yao.qi@linaro.org>
3494
3495 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3496 (need_step_over_p): Return zero if the LWP has pending signals
3497 can be delivered on software single step target.
3498
3499 2016-04-25 Yao Qi <yao.qi@linaro.org>
3500
3501 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3502 return instead of error.
3503
3504 2016-04-22 Yao Qi <yao.qi@linaro.org>
3505
3506 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3507 to 23.
3508
3509 2016-04-22 Yao Qi <yao.qi@linaro.org>
3510
3511 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3512 signal when stepping over breakpoint with software single
3513 step.
3514
3515 2016-04-21 Pedro Alves <palves@redhat.com>
3516
3517 * linux-s390-low.c (s390_collect_ptrace_register)
3518 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3519 add casts.
3520 (s390_check_regset): Use void * instead of gdb_byte *.
3521
3522 2016-04-20 Pedro Alves <palves@redhat.com>
3523
3524 * configure: Renegerate.
3525
3526 2016-04-20 Yao Qi <yao.qi@linaro.org>
3527
3528 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3529 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3530 number 16.
3531 (arm_store_gregset): Likewise.
3532
3533 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3534
3535 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3536 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3537 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3538 (amd64-avx-mpx-linux.c): New rules.
3539 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3540 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3541 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3542 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3543 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3544 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3545 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3546 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3547 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3548 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3549 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3550 * linux-x86-low.c (x86_linux_read_description): Add case for
3551 X86_XSTATE_AVX_MPX_MASK.
3552 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3553 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3554 init_registers_i386_avx_mpx_linux.
3555 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3556 (initialize_low_tracepoint): Call
3557 init_registers_i386_avx_mpx_linux.
3558 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3559 (initialize_low_tracepoint): Call
3560 init_registers_amd64_avx_mpx_linux.
3561 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3562 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3563 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3564 declarations.
3565
3566 2016-04-18 Pedro Alves <palves@redhat.com>
3567
3568 * configure: Regenerate.
3569
3570 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3571
3572 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3573 (aarch64_emit_sub): Likewise.
3574
3575 2016-04-12 Pedro Alves <palves@redhat.com>
3576
3577 * utils.c (prepare_to_throw_exception): Delete.
3578
3579 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3580
3581 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3582
3583 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3584
3585 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3586
3587 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3588
3589 * linux-aarch64-ipa.c: Add <elf.h> include.
3590 * linux-ppc-ipa.c: Add <elf.h> include.
3591 * linux-s390-ipa.c: Add <elf.h> include.
3592
3593 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3594
3595 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3596 (get_raw_reg_ptr): Likewise.
3597 (get_trace_state_variable_value_ptr): Likewise.
3598 (set_trace_state_variable_value_ptr): Likewise.
3599 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3600 char *.
3601
3602 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3603 Marcin Kościelnicki <koriakin@0x04.net>
3604
3605 PR/17221
3606 * linux-ppc-low.c (emit_insns): New function.
3607 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3608 (ppc_emit_prologue): New function.
3609 (ppc_emit_epilogue): New function.
3610 (ppc_emit_add): New function.
3611 (ppc_emit_sub): New function.
3612 (ppc_emit_mul): New function.
3613 (ppc_emit_lsh): New function.
3614 (ppc_emit_rsh_signed): New function.
3615 (ppc_emit_rsh_unsigned): New function.
3616 (ppc_emit_ext): New function.
3617 (ppc_emit_zero_ext): New function.
3618 (ppc_emit_log_not): New function.
3619 (ppc_emit_bit_and): New function.
3620 (ppc_emit_bit_or): New function.
3621 (ppc_emit_bit_xor): New function.
3622 (ppc_emit_bit_not): New function.
3623 (ppc_emit_equal): New function.
3624 (ppc_emit_less_signed): New function.
3625 (ppc_emit_less_unsigned): New function.
3626 (ppc_emit_ref): New function.
3627 (ppc_emit_const): New function.
3628 (ppc_emit_reg): New function.
3629 (ppc_emit_pop): New function.
3630 (ppc_emit_stack_flush): New function.
3631 (ppc_emit_swap): New function.
3632 (ppc_emit_stack_adjust): New function.
3633 (ppc_emit_call): New function.
3634 (ppc_emit_int_call_1): New function.
3635 (ppc_emit_void_call_2): New function.
3636 (ppc_emit_if_goto): New function.
3637 (ppc_emit_goto): New function.
3638 (ppc_emit_eq_goto): New function.
3639 (ppc_emit_ne_goto): New function.
3640 (ppc_emit_lt_goto): New function.
3641 (ppc_emit_le_goto): New function.
3642 (ppc_emit_gt_goto): New function.
3643 (ppc_emit_ge_goto): New function.
3644 (ppc_write_goto_address): New function.
3645 (ppc_emit_ops_impl): New static variable.
3646 (ppc64v1_emit_prologue): New function.
3647 (ppc64v2_emit_prologue): New function.
3648 (ppc64_emit_epilogue): New function.
3649 (ppc64_emit_add): New function.
3650 (ppc64_emit_sub): New function.
3651 (ppc64_emit_mul): New function.
3652 (ppc64_emit_lsh): New function.
3653 (ppc64_emit_rsh_signed): New function.
3654 (ppc64_emit_rsh_unsigned): New function.
3655 (ppc64_emit_ext): New function.
3656 (ppc64_emit_zero_ext): New function.
3657 (ppc64_emit_log_not): New function.
3658 (ppc64_emit_bit_and): New function.
3659 (ppc64_emit_bit_or): New function.
3660 (ppc64_emit_bit_xor): New function.
3661 (ppc64_emit_bit_not): New function.
3662 (ppc64_emit_equal): New function.
3663 (ppc64_emit_less_signed): New function.
3664 (ppc64_emit_less_unsigned): New function.
3665 (ppc64_emit_ref): New function.
3666 (ppc64_emit_const): New function.
3667 (ppc64v1_emit_reg): New function.
3668 (ppc64v2_emit_reg): New function.
3669 (ppc64_emit_pop): New function.
3670 (ppc64_emit_stack_flush): New function.
3671 (ppc64_emit_swap): New function.
3672 (ppc64v1_emit_call): New function.
3673 (ppc64v2_emit_call): New function.
3674 (ppc64v1_emit_int_call_1): New function.
3675 (ppc64v2_emit_int_call_1): New function.
3676 (ppc64v1_emit_void_call_2): New function.
3677 (ppc64v2_emit_void_call_2): New function.
3678 (ppc64_emit_if_goto): New function.
3679 (ppc64_emit_eq_goto): New function.
3680 (ppc64_emit_ne_goto): New function.
3681 (ppc64_emit_lt_goto): New function.
3682 (ppc64_emit_le_goto): New function.
3683 (ppc64_emit_gt_goto): New function.
3684 (ppc64_emit_ge_goto): New function.
3685 (ppc64v1_emit_ops_impl): New static variable.
3686 (ppc64v2_emit_ops_impl): New static variable.
3687 (ppc_emit_ops): New function.
3688 (linux_low_target): Wire in ppc_emit_ops.
3689
3690 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3691 Marcin Kościelnicki <koriakin@0x04.net>
3692
3693 PR/17221
3694 * Makefile.in: Add powerpc-*-ipa.o
3695 * configure.srv: Add ipa_obj for powerpc*-linux.
3696 * linux-ppc-ipa.c: New file.
3697 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3698 includes.
3699 (PPC_FIELD): New macro.
3700 (PPC_SEXT): New macro.
3701 (PPC_OP6): New macro.
3702 (PPC_BO): New macro.
3703 (PPC_LI): New macro.
3704 (PPC_BD): New macro.
3705 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3706 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3707 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3708 (ppc_get_thread_area): New function.
3709 (is_elfv2_inferior): New function.
3710 (gen_ds_form): New function.
3711 (GEN_STD): New macro.
3712 (GEN_STDU): New macro.
3713 (GEN_LD): New macro.
3714 (GEN_LDU): New macro.
3715 (gen_d_form): New function.
3716 (GEN_ADDI): New macro.
3717 (GEN_ADDIS): New macro.
3718 (GEN_LI): New macro.
3719 (GEN_LIS): New macro.
3720 (GEN_ORI): New macro.
3721 (GEN_ORIS): New macro.
3722 (GEN_LWZ): New macro.
3723 (GEN_STW): New macro.
3724 (GEN_STWU): New macro.
3725 (gen_xfx_form): New function.
3726 (GEN_MFSPR): New macro.
3727 (GEN_MTSPR): New macro.
3728 (GEN_MFCR): New macro.
3729 (GEN_MTCR): New macro.
3730 (GEN_SYNC): New macro.
3731 (GEN_LWSYNC): New macro.
3732 (gen_x_form): New function.
3733 (GEN_OR): New macro.
3734 (GEN_MR): New macro.
3735 (GEN_LWARX): New macro.
3736 (GEN_STWCX): New macro.
3737 (GEN_CMPW): New macro.
3738 (gen_md_form): New function.
3739 (GEN_RLDICL): New macro.
3740 (GEN_RLDICR): New macro.
3741 (gen_i_form): New function.
3742 (GEN_B): New macro.
3743 (GEN_BL): New macro.
3744 (gen_b_form): New function.
3745 (GEN_BNE): New macro.
3746 (GEN_LOAD): New macro.
3747 (GEN_STORE): New macro.
3748 (gen_limm): New function.
3749 (gen_atomic_xchg): New function.
3750 (gen_call): New function.
3751 (ppc_relocate_instruction): New function.
3752 (ppc_install_fast_tracepoint_jump_pad): New function.
3753 (ppc_get_min_fast_tracepoint_insn_len): New function.
3754 (ppc_get_ipa_tdesc_idx): New function.
3755 (the_low_target): Wire in the new functions.
3756 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3757 tdescs.
3758 * linux-ppc-tdesc.h: New file.
3759
3760 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3761
3762 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3763 (alloc_jump_pad_buffer): New function.
3764 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3765 (alloc_jump_pad_buffer): New function.
3766 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3767 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3768 (alloc_jump_pad_buffer): New function.
3769 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3770 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3771 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3772 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3773
3774 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3775
3776 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3777 * linux-amd64-ipa.c: Likewise.
3778 * linux-i386-ipa.c: Likewise.
3779 * linux-s390-ipa.c: Likewise.
3780 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3781 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3782 set_trace_state_variable_value_ptr.
3783 (struct ipa_sym_addresses): Likewise.
3784 (symbol_list): Likewise.
3785 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3786 accessing gdb_collect directly.
3787 (gdb_collect_ptr_type): New typedef.
3788 (get_raw_reg_ptr_type): New typedef.
3789 (get_trace_state_variable_value_ptr_type): New typedef.
3790 (set_trace_state_variable_value_ptr_type): New typedef.
3791 (gdb_collect_ptr): New global.
3792 (get_raw_reg_ptr): New global.
3793 (get_trace_state_variable_value_ptr): New global.
3794 (set_trace_state_variable_value_ptr): New global.
3795 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3796 accessing get_raw_reg directly.
3797 (get_get_tsv_func_addr): Likewise for
3798 get_trace_state_variable_value_ptr.
3799 (get_set_tsv_func_addr): Likewise for
3800 set_trace_state_variable_value_ptr.
3801 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3802
3803 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3804
3805 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3806
3807 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3808
3809 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3810 packets.
3811 (relocate_instruction): Remove own_buf.
3812 * server.c (own_buf): Make global.
3813 (handle_v_requests): Make global.
3814 * server.h (own_buf): New declaration.
3815 (handle_v_requests): New prototype.
3816
3817 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3818
3819 PR 18377
3820 * linux-s390-low.c (add_insns): New function.
3821 (s390_emit_prologue): New function.
3822 (s390_emit_epilogue): New function.
3823 (s390_emit_add): New function.
3824 (s390_emit_sub): New function.
3825 (s390_emit_mul): New function.
3826 (s390_emit_lsh): New function.
3827 (s390_emit_rsh_signed): New function.
3828 (s390_emit_rsh_unsigned): New function.
3829 (s390_emit_ext): New function.
3830 (s390_emit_log_not): New function.
3831 (s390_emit_bit_and): New function.
3832 (s390_emit_bit_or): New function.
3833 (s390_emit_bit_xor): New function.
3834 (s390_emit_bit_not): New function.
3835 (s390_emit_equal): New function.
3836 (s390_emit_less_signed): New function.
3837 (s390_emit_less_unsigned): New function.
3838 (s390_emit_ref): New function.
3839 (s390_emit_if_goto): New function.
3840 (s390_emit_goto): New function.
3841 (s390_write_goto_address): New function.
3842 (s390_emit_litpool): New function.
3843 (s390_emit_const): New function.
3844 (s390_emit_call): New function.
3845 (s390_emit_reg): New function.
3846 (s390_emit_pop): New function.
3847 (s390_emit_stack_flush): New function.
3848 (s390_emit_zero_ext): New function.
3849 (s390_emit_swap): New function.
3850 (s390_emit_stack_adjust): New function.
3851 (s390_emit_set_r2): New function.
3852 (s390_emit_int_call_1): New function.
3853 (s390_emit_void_call_2): New function.
3854 (s390_emit_eq_goto): New function.
3855 (s390_emit_ne_goto): New function.
3856 (s390_emit_lt_goto): New function.
3857 (s390_emit_le_goto): New function.
3858 (s390_emit_gt_goto): New function.
3859 (s390_emit_ge_goto): New function.
3860 (s390x_emit_prologue): New function.
3861 (s390x_emit_epilogue): New function.
3862 (s390x_emit_add): New function.
3863 (s390x_emit_sub): New function.
3864 (s390x_emit_mul): New function.
3865 (s390x_emit_lsh): New function.
3866 (s390x_emit_rsh_signed): New function.
3867 (s390x_emit_rsh_unsigned): New function.
3868 (s390x_emit_ext): New function.
3869 (s390x_emit_log_not): New function.
3870 (s390x_emit_bit_and): New function.
3871 (s390x_emit_bit_or): New function.
3872 (s390x_emit_bit_xor): New function.
3873 (s390x_emit_bit_not): New function.
3874 (s390x_emit_equal): New function.
3875 (s390x_emit_less_signed): New function.
3876 (s390x_emit_less_unsigned): New function.
3877 (s390x_emit_ref): New function.
3878 (s390x_emit_if_goto): New function.
3879 (s390x_emit_const): New function.
3880 (s390x_emit_call): New function.
3881 (s390x_emit_reg): New function.
3882 (s390x_emit_pop): New function.
3883 (s390x_emit_stack_flush): New function.
3884 (s390x_emit_zero_ext): New function.
3885 (s390x_emit_swap): New function.
3886 (s390x_emit_stack_adjust): New function.
3887 (s390x_emit_int_call_1): New function.
3888 (s390x_emit_void_call_2): New function.
3889 (s390x_emit_eq_goto): New function.
3890 (s390x_emit_ne_goto): New function.
3891 (s390x_emit_lt_goto): New function.
3892 (s390x_emit_le_goto): New function.
3893 (s390x_emit_gt_goto): New function.
3894 (s390x_emit_ge_goto): New function.
3895 (s390_emit_ops): New function.
3896 (struct linux_target_ops): Fill in emit_ops hook.
3897
3898 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3899
3900 PR 18377
3901 * Makefile.in: Add s390 IPA files.
3902 * configure.srv: Build IPA for s390.
3903 * linux-s390-ipa.c: New file.
3904 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3905 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3906 (tdesc_s390_linux32): Likewise.
3907 (init_registers_s390_linux32v1): Likewise.
3908 (tdesc_s390_linux32v1): Likewise.
3909 (init_registers_s390_linux32v2): Likewise.
3910 (tdesc_s390_linux32v2): Likewise.
3911 (init_registers_s390_linux64): Likewise.
3912 (tdesc_s390_linux64): Likewise.
3913 (init_registers_s390_linux64v1): Likewise.
3914 (tdesc_s390_linux64v1): Likewise.
3915 (init_registers_s390_linux64v2): Likewise.
3916 (tdesc_s390_linux64v2): Likewise.
3917 (init_registers_s390_te_linux64): Likewise.
3918 (tdesc_s390_te_linux64): Likewise.
3919 (init_registers_s390_vx_linux64): Likewise.
3920 (tdesc_s390_vx_linux64): Likewise.
3921 (init_registers_s390_tevx_linux64): Likewise.
3922 (tdesc_s390_tevx_linux64): Likewise.
3923 (init_registers_s390x_linux64): Likewise.
3924 (tdesc_s390x_linux64): Likewise.
3925 (init_registers_s390x_linux64v1): Likewise.
3926 (tdesc_s390x_linux64v1): Likewise.
3927 (init_registers_s390x_linux64v2): Likewise.
3928 (tdesc_s390x_linux64v2): Likewise.
3929 (init_registers_s390x_te_linux64): Likewise.
3930 (tdesc_s390x_te_linux64): Likewise.
3931 (init_registers_s390x_vx_linux64): Likewise.
3932 (tdesc_s390x_vx_linux64): Likewise.
3933 (init_registers_s390x_tevx_linux64): Likewise.
3934 (tdesc_s390x_tevx_linux64): Likewise.
3935 (have_hwcap_s390_vx): New static variable.
3936 (s390_arch_setup): Fill have_hwcap_s390_vx.
3937 (s390_get_thread_area): New function.
3938 (s390_ft_entry_gpr_esa): New const.
3939 (s390_ft_entry_gpr_zarch): New const.
3940 (s390_ft_entry_misc): New const.
3941 (s390_ft_entry_fr): New const.
3942 (s390_ft_entry_vr): New const.
3943 (s390_ft_main_31): New const.
3944 (s390_ft_main_64): New const.
3945 (s390_ft_exit_fr): New const.
3946 (s390_ft_exit_vr): New const.
3947 (s390_ft_exit_misc): New const.
3948 (s390_ft_exit_gpr_esa): New const.
3949 (s390_ft_exit_gpr_zarch): New const.
3950 (append_insns): New function.
3951 (s390_relocate_instruction): New function.
3952 (s390_install_fast_tracepoint_jump_pad): New function.
3953 (s390_get_min_fast_tracepoint_insn_len): New function.
3954 (s390_get_ipa_tdesc_idx): New function.
3955 (struct linux_target_ops): Wire in the above functions.
3956 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3957 * linux-s390-tdesc.h: New file.
3958
3959 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3960
3961 * linux-s390-low.c (s390_supports_tracepoints): New function.
3962 (struct linux_target_ops): Fill supports_tracepoints hook.
3963
3964 2016-03-18 Yao Qi <yao.qi@linaro.org>
3965
3966 * linux-low.c (lwp_signal_can_be_delivered): New function.
3967 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3968
3969 2016-03-18 Yao Qi <yao.qi@linaro.org>
3970
3971 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3972 0 if signal is enqueued. Remove 'signal' from one debugging
3973 message. Move one debugging message to some lines below.
3974 Remove code setting 'signal' to 0.
3975
3976 2016-03-18 Yao Qi <yao.qi@linaro.org>
3977
3978 * linux-low.c (linux_low_filter_event): Remove redundant
3979 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3980
3981 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3982
3983 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3984 (struct linux_target_ops): Wire in the above.
3985
3986 2016-03-03 Yao Qi <yao.qi@linaro.org>
3987
3988 * linux-low.c: Update comments to start_step_over.
3989
3990 2016-03-03 Yao Qi <yao.qi@linaro.org>
3991
3992 PR server/19736
3993 * linux-low.c (handle_extended_wait): Set child suspended
3994 if event_lwp->bp_reinsert isn't zero.
3995
3996 2016-03-02 Yao Qi <yao.qi@linaro.org>
3997
3998 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3999 enqueue_pending_signal.
4000
4001 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4002
4003 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4004 is actually loaded.
4005
4006 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4007
4008 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4009 (s390_regmap_3264) [!__s390x__]: New global.
4010 (s390_collect_ptrace_register): Skip map entries containing -1.
4011 (s390_supply_ptrace_register): Ditto.
4012 (s390_fill_gprs_high): New function.
4013 (s390_store_gprs_high): New function.
4014 (s390_regsets): Add NT_S390_HIGH_GPRS.
4015 (s390_get_hwcap): Enable on 31-bit.
4016 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4017 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4018 Detect NT_S390_HIGH_GPRS.
4019 (s390_usrregs_info_3264): Enable on 31-bit.
4020 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4021 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4022
4023 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4024
4025 PR gdb/13808
4026 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4027 * configure.srv: Ditto.
4028 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4029 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4030 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4031 (init_registers_amd64_linux): Remove prototype.
4032 (tdesc_amd64_linux): Remove declaration.
4033 (get_ipa_tdesc): New function.
4034 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4035 initialize remaining tdescs.
4036 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4037 (init_registers_i386_linux): Remove prototype.
4038 (tdesc_i386_linux): Remove declaration.
4039 (get_ipa_tdesc): New function.
4040 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4041 initialize remaining tdescs.
4042 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4043 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4044 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4045 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4046 (x86_get_ipa_tdesc_idx): New function.
4047 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4048 * linux-x86-tdesc.h: New file.
4049 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4050 (target_get_ipa_tdesc_idx): New macro.
4051 * tracepoint.c (ipa_tdesc_idx): New macro.
4052 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4053 (symbol_list): Add ipa_tdesc_idx.
4054 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4055 (ipa_tdesc): Remove.
4056 (ipa_tdesc_idx): New variable.
4057 (get_context_regcache): Use get_ipa_tdesc.
4058 (gdb_collect): Ditto.
4059 (gdb_probe): Ditto.
4060 * tracepoint.h (get_ipa_tdesc): New prototype.
4061 (ipa_tdesc): Remove.
4062
4063 2016-02-24 Pedro Alves <palves@redhat.com>
4064
4065 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4066 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4067 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4068 Factor out common code between the USE_SIGTRAP_SIGINFO and
4069 !USE_SIGTRAP_SIGINFO blocks.
4070 (linux_low_filter_event): Call save_stop_reason instead of
4071 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4072 Update comments.
4073 (linux_wait_1): Update comments.
4074
4075 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4076
4077 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4078 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4079 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4080 ppc_insert_point, ppc_remove_point.
4081
4082 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4083
4084 * linux-s390-low.c (s390_supports_z_point_type): New function.
4085 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4086
4087 2016-02-16 Yao Qi <yao.qi@linaro.org>
4088
4089 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4090 PC. Get pc from regcache_read_pc.
4091
4092 2016-02-12 Yao Qi <yao.qi@linaro.org>
4093
4094 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4095 or linux_get_pc_32bit.
4096 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4097
4098 2016-02-12 Yao Qi <yao.qi@linaro.org>
4099
4100 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4101 arm_linux_get_next_pcs_fixup.
4102
4103 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4104
4105 * tracepoint.c (x_tracepoint_action_download): Change
4106 write_inferior_data_ptr to write_inferior_data_pointer.
4107 (cmd_qtstart): Likewise.
4108 (write_inferior_data_ptr): Remove.
4109 (download_agent_expr): Change write_inferior_data_ptr to
4110 write_inferior_data_pointer.
4111 (download_tracepoint_1): Likewise.
4112 (download_tracepoint): Likewise.
4113 (download_trace_state_variables): Likewise.
4114
4115 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4116 Marcin Kościelnicki <koriakin@0x04.net>
4117
4118 * tracepoint.c (struct tracepoint_action_ops): Remove.
4119 (struct tracepoint_action): Remove ops.
4120 (m_tracepoint_action_download, r_tracepoint_action_download)
4121 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4122 size and offset accordingly.
4123 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4124 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4125 (tracepoint_action_send, tracepoint_action_download): New functions.
4126 Helpers for trace action handlers.
4127 (add_tracepoint_action): Remove setup actions ops.
4128 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4129
4130 2016-02-10 Yao Qi <yao.qi@linaro.org>
4131
4132 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4133
4134 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4135
4136 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4137 to AC_OUTPUT.
4138 * configure: Regenerate.
4139
4140 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4141
4142 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4143 void * to gdb_byte *.
4144 * linux-low.c (siginfo_fixup): Likewise.
4145 (linux_xfer_siginfo): Likewise.
4146 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4147 Likewise.
4148 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4149
4150 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4151
4152 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4153 to srv_tgtobj.
4154 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4155 to srv_tgtobj.
4156 * linux-x86-low.c [__x86_64__]: Include
4157 "nat/amd64-linux-siginfo.h".
4158 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4159 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4160 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4161 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4162 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4163 (cpt_si_fd, si_timerid, si_overrun): Move from
4164 nat/amd64-linux-siginfo.c.
4165 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4166
4167 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4168
4169 * server.c (skip_to_semicolon): Remove.
4170 (process_point_options): Use strchrnul instead of
4171 skip_to_semicolon.
4172
4173 2016-01-26 Yao Qi <yao.qi@linaro.org>
4174
4175 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4176 * linux-low.c (install_software_single_step_breakpoints): Don't
4177 call regcache_read_pc.
4178 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4179 argument pc.
4180
4181 2016-01-26 Yao Qi <yao.qi@linaro.org>
4182
4183 * linux-low.c (install_software_single_step_breakpoints): Call
4184 regcache_read_pc instead of get_pc.
4185
4186 2016-01-26 Yao Qi <yao.qi@linaro.org>
4187
4188 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4189 (unblock_async_io): Rename to ...
4190 (block_unblock_async_io): ... it. New function.
4191 (enable_async_io): Don't install SIGIO handler. Unblock it
4192 instead.
4193 (disable_async_io): Don't ignore SIGIO. Block it instead.
4194 (initialize_async_io): Install SIGIO handler. Don't call
4195 unblock_async_io.
4196
4197 2016-01-26 Yao Qi <yao.qi@linaro.org>
4198
4199 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4200 first character is '\003', call *the_target->request_interrupt.
4201
4202 2016-01-25 Yao Qi <yao.qi@linaro.org>
4203
4204 * remote-utils.c (new_thread_notify): Remove.
4205 (dead_thread_notify): Likewise.
4206 * remote-utils.h (new_thread_notify): Remove declaration.
4207 (dead_thread_notify): Likewise.
4208
4209 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4210
4211 * gdb.trace/pending.exp: Fix expected message on continue.
4212
4213 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4214
4215 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4216 it works properly on big-endian machines where sizeof (CORE_ADDR)
4217 != sizeof (void *).
4218
4219 2016-01-21 Pedro Alves <palves@redhat.com>
4220
4221 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4222 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4223 * configure: Regenerate.
4224
4225 2016-01-21 Yao Qi <yao.qi@linaro.org>
4226
4227 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4228 is_thumb and set it according to CPSR saved on the stack.
4229 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4230 arm_sigreturn_next_pc.
4231
4232 2016-01-18 Yao Qi <yao.qi@linaro.org>
4233
4234 * linux-low.c (linux_set_pc_64bit): New function.
4235 (linux_get_pc_64bit): New function.
4236 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4237 Declare.
4238 * linux-sparc-low.c (debug_threads): Remove declaration.
4239 (sparc_get_pc): Remove.
4240 (the_low_target): Use linux_get_pc_64bit instead of
4241 sparc_get_pc.
4242 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4243 (the_low_target): Use linux_get_pc_64bit and
4244 linux_set_pc_64bit.
4245
4246 2016-01-18 Yao Qi <yao.qi@linaro.org>
4247
4248 * linux-arm-low.c (debug_threads): Remove declaration.
4249 (arm_get_pc, arm_set_pc): Remove.
4250 (the_low_target): Use linux_get_pc_32bit and
4251 linux_set_pc_32bit.
4252 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4253 (the_low_target): Use linux_get_pc_32bit and
4254 linux_set_pc_32bit.
4255 * linux-cris-low.c (debug_threads): Remove declaration.
4256 (cris_get_pc, cris_set_pc,): Remove.
4257 (the_low_target): Use linux_get_pc_32bit and
4258 linux_set_pc_32bit.
4259 * linux-crisv32-low.c (debug_threads): Remove declaration.
4260 (cris_get_pc, cris_set_pc): Remove.
4261 (the_low_target): Use linux_get_pc_32bit and
4262 linux_set_pc_32bit.
4263 * linux-low.c: Include inttypes.h.
4264 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4265 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4266 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4267 (the_low_target): Use linux_get_pc_32bit and
4268 linux_set_pc_32bit.
4269 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4270 (the_low_target): Use linux_get_pc_32bit and
4271 linux_set_pc_32bit.
4272 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4273 (the_low_target): Use linux_get_pc_32bit and
4274 linux_set_pc_32bit.
4275 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4276 (the_low_target): Use linux_get_pc_32bit and
4277 linux_set_pc_32bit.
4278 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4279 (the_low_target): Use linux_get_pc_32bit and
4280 linux_set_pc_32bit.
4281
4282 2016-01-18 Gary Benson <gbenson@redhat.com>
4283
4284 * configure.ac (AC_FUNC_FORK): New check.
4285 * config.in: Regenerate.
4286 * configure: Likewise.
4287
4288 2016-01-14 Yao Qi <yao.qi@linaro.org>
4289
4290 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4291 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4292 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4293 arm_get_next_pcs_ctor.
4294
4295 2016-01-12 Josh Stone <jistone@redhat.com>
4296 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4297
4298 * inferiors.h: Include "gdb_vecs.h".
4299 (struct process_info): Add syscalls_to_catch.
4300 * inferiors.c (remove_process): Free syscalls_to_catch.
4301 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4302 syscall_return stops.
4303 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4304 * server.c (handle_general_set): Handle QCatchSyscalls.
4305 (handle_query): Report support for QCatchSyscalls.
4306 * target.h (struct target_ops): Add supports_catch_syscall.
4307 (target_supports_catch_syscall): New macro.
4308 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4309 (struct lwp_info): Add syscall_state.
4310 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4311 Maintain syscall_state and syscalls_to_catch across exec.
4312 (get_syscall_trapinfo): New function, proxy to the_low_target.
4313 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4314 (linux_low_filter_event): Toggle syscall_state entry/return for
4315 syscall traps, and set it ignored for all others.
4316 (gdb_catching_syscalls_p): New function.
4317 (gdb_catch_this_syscall_p): New function.
4318 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4319 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4320 (linux_supports_catch_syscall): New function.
4321 (linux_target_ops): Install it.
4322 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4323 (the_low_target): Install it.
4324
4325 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4326
4327 * acinclude.m4: Include new ../warning.m4 file.
4328 * configure: Regenerated.
4329 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4330
4331 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4332
4333 * ax.c (is_goto_target): Mark static.
4334 * linux-low.c (register_addr): Likewise.
4335 (linux_fetch_registers, linux_store_registers): Likewise.
4336 * mem-break.c (any_persistent_commands): Fix old prototype.
4337 (add_commands_to_breakpoint): Mark static.
4338 * regcache.c (find_register_by_name): Delete unused func.
4339 * remote-utils.c (hex_or_minus_one): Mark static.
4340 * server.c (monitor_show_help): Mark static.
4341 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4342 handle_v_requests): Likewise.
4343
4344 2016-01-12 Pedro Alves <palves@redhat.com>
4345
4346 Remove use of the registered trademark symbol throughout.
4347
4348 2016-01-08 Yao Qi <yao.qi@linaro.org>
4349
4350 * remote-utils.c (getpkt): If c is '\003', call target hook
4351 request_interrupt.
4352
4353 2016-01-06 Yao Qi <yao.qi@linaro.org>
4354
4355 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4356 linux-aarch32-low.c.
4357 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4358 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4359 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4360 (thumb2_breakpoint): Declare.
4361 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4362 linux-aarch32-low.h.
4363 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4364 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4365 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4366
4367 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4368
4369 * gdbreplay.c (gdbreplay_version): Change copyright year in
4370 version message.
4371 * server.c (gdbserver_version): Likewise.
4372
4373 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4374
4375 * server.c (crc32_table): Delete.
4376 (crc32): Use libiberty's xcrc32 function.
4377
4378 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4379
4380 * lynx-low.c (lynx_delete_thread_callback): New function.
4381 (lynx_mourn): Properly delete our process and all of its
4382 threads. Remove call to clear_inferiors.
4383
4384 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4385
4386 * target.c (thread_search_callback): Add check that
4387 the thread_stopped target callback is not NULL before
4388 calling it.
4389
4390 2015-12-21 Yao Qi <yao.qi@linaro.org>
4391
4392 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4393 arm breakpoint.
4394
4395 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4396
4397 * server.c (handle_query): Call target_supports_software_single_step.
4398
4399 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4400
4401 * linux-low.c (single_step): New function.
4402 (linux_resume_one_lwp_throw): Call single_step.
4403 (start_step_over): Likewise.
4404
4405 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4406
4407 * Makefile.in (SFILES): Append arch/arm-linux.c,
4408 arch/arm-get-next-pcs.c.
4409 (arm-linux.o): New rule.
4410 (arm-get-next-pcs.o): New rule.
4411 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4412 arm-linux.o.
4413 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4414 to linux-aarch32-low.c.
4415 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4416 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4417 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4418 (thumb2_breakpoint_len): Likewise.
4419 (arm_is_thumb_mode): Make non-static.
4420 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4421 from linux-aarch32-low.c.
4422 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4423 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4424 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4425 (thumb2_breakpoint_len): Likewise.
4426 (arm_is_thumb_mode): New declaration.
4427 * linux-arm-low.c: Include arch/arm-linux.h
4428 aarch/arm-get-next-pcs.h, sys/syscall.h.
4429 (get_next_pcs_ops): New struct.
4430 (get_next_pcs_addr_bits_remove): New function.
4431 (get_next_pcs_is_thumb): New function.
4432 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4433 (arm_sigreturn_next_pc): Likewise.
4434 (get_next_pcs_syscall_next_pc): Likewise.
4435 (arm_gdbserver_get_next_pcs): Likewise.
4436 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4437 Initialize.
4438 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4439 * server.h: Include gdb_vecs.h.
4440
4441 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4442
4443 * Makefile.in (SFILES): Append common/common-regcache.c.
4444 (OBS): Append common-regcache.o.
4445 (common-regcache.o): New rule.
4446 * regcache.c (init_register_cache): Initialize cache to
4447 REG_UNAVAILABLE.
4448 (regcache_raw_read_unsigned): New function.
4449 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4450 register_status enum.
4451
4452 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4453
4454 * linux-aarch64-low.c (the_low_targets): Rename
4455 breakpoint_reinsert_addr to get_next_pcs.
4456 * linux-arm-low.c (the_low_targets): Likewise.
4457 * linux-bfin-low.c (the_low_targets): Likewise.
4458 * linux-cris-low.c (the_low_targets): Likewise.
4459 * linux-crisv32-low.c (the_low_targets): Likewise.
4460 * linux-low.c (can_software_single_step): Likewise.
4461 (install_software_single_step_breakpoints): New function.
4462 (start_step_over): Use install_software_single_step_breakpoints.
4463 * linux-low.h: New CORE_ADDR vector.
4464 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4465 get_next_pcs.
4466 * linux-mips-low.c (the_low_targets): Likewise.
4467 * linux-nios2-low.c (the_low_targets): Likewise.
4468 * linux-sparc-low.c (the_low_targets): Likewise.
4469
4470 2015-12-17 Pedro Alves <palves@redhat.com>
4471
4472 * linux-low.c (linux_kill_one_lwp): Remove references to
4473 LinuxThreads.
4474 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4475 to 'kill'.
4476 (linux_init_signals): Delete.
4477 (initialize_low): Adjust.
4478 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4479
4480 2015-12-16 Pedro Alves <palves@redhat.com>
4481
4482 * configure.ac (compiler warning flags): When testing a
4483 -Wno-foo option, check whether -Wfoo works instead.
4484 * configure: Regenerate.
4485
4486 2015-12-11 Don Breazeal <donb@codesourcery.com>
4487
4488 * server.c (process_serial_event): Don't exit from gdbserver
4489 in remote mode if there are still active inferiors.
4490
4491 2015-12-11 Yao Qi <yao.qi@linaro.org>
4492
4493 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4494 arm_breakpoint_at if the process is 32-bit.
4495
4496 2015-12-11 Yao Qi <yao.qi@linaro.org>
4497
4498 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4499 arm breakpoint.
4500
4501 2015-12-07 Yao Qi <yao.qi@linaro.org>
4502
4503 * configure.srv: Append arm.o to srv_tgtobj for
4504 aarch64*-*-linux* target.
4505 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4506 from linux-arm-low.c.
4507 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4508 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4509 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4510 (thumb2_breakpoint_len): Likewise.
4511 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4512 (arm_breakpoint_kinds): Likewise.
4513 (arm_breakpoint_kind_from_pc): Likewise.
4514 (arm_sw_breakpoint_from_kind): Likewise.
4515 (arm_breakpoint_kind_from_current_state): Likewise.
4516 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4517 (arm_sw_breakpoint_from_kind): Declare.
4518 (arm_breakpoint_kind_from_current_state): Declare.
4519 (arm_breakpoint_at): Declare.
4520 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4521 arm_sw_breakpoint_from_kind if process is 32-bit.
4522 (aarch64_breakpoint_kind_from_pc): New function.
4523 (aarch64_breakpoint_kind_from_current_state): New function.
4524 (the_low_target): Initialize fields breakpoint_kind_from_pc
4525 and breakpoint_kind_from_current_state.
4526 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4527 linux-aarch32-low.c.
4528 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4529 (arm_breakpoint, arm_breakpoint_len): Likewise.
4530 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4531 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4532 (arm_is_thumb_mode): Likewise.
4533 (arm_breakpoint_at): Likewise.
4534 (arm_breakpoint_kind_from_pc): Likewise.
4535 (arm_sw_breakpoint_from_kind): Likewise.
4536 (arm_breakpoint_kind_from_current_state): Likewise.
4537
4538 Revert:
4539 2015-08-04 Yao Qi <yao.qi@linaro.org>
4540
4541 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4542 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4543 * server.c (extended_protocol): Remove "static".
4544 * server.h (extended_protocol): Declare it.
4545
4546 2015-12-04 Josh Stone <jistone@redhat.com>
4547
4548 * target.h (struct target_ops) <arch_setup>: Rename to ...
4549 (struct target_ops) <post_create_inferior>: ... this.
4550 (target_arch_setup): Rename to ...
4551 (target_post_create_inferior): ... this, calling post_create_inferior.
4552 * server.c (start_inferior): Update target_arch_setup calls to
4553 target_post_create_inferior.
4554 * linux-low.c (linux_low_ptrace_options): Forward declare.
4555 (linux_arch_setup): Update its comment for general use.
4556 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4557 (struct linux_target_ops): Use linux_post_create_inferior.
4558 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4559 to post_create_inferior.
4560 * nto-low.c (struct nto_target_ops): Likewise.
4561 * spu-low.c (struct spu_target_ops): Likewise.
4562 * win32-low.c (struct win32_target_ops): Likewise.
4563
4564 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4565
4566 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4567
4568 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4569
4570 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4571 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4572 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4573 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4574 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4575 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4576 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4577 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4578 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4579 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4580 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4581 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4582
4583 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4584
4585 * linux-low.c (linux_look_up_symbols): Don't call
4586 linux_supports_traceclone.
4587 * linux-low.h (thread_db_init): Remove use_events argument.
4588 * thread-db.c (thread_db_use_event): Remove global variable.
4589 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4590 (struct thread_db) <td_create_bp>: Remove field.
4591 (thread_db_create_event): Remove function.
4592 (thread_db_enable_reporting): Likewise.
4593 (find_one_thread): Don't check for thread_db_use_events.
4594 (attach_thread): Likewise.
4595 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4596 (try_thread_db_load_1): Don't check for thread_db_use_events.
4597 (thread_db_init): Remove use_events argument and thread events
4598 handling.
4599 (remove_thread_event_breakpoints): Remove function.
4600 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4601
4602 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4603
4604 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4605 New function.
4606 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4607 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4608 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4609 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4610 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4611 Initialize.
4612 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4613 New function.
4614 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4615 * linux-low.c (can_hardware_single_step): Use
4616 supports_hardware_single_step.
4617 (can_software_single_step): New function.
4618 (start_step_over): Call can_software_single_step.
4619 (linux_supports_hardware_single_step): New function.
4620 (struct target_ops) <supports_software_single_step>: Initialize.
4621 * linux-low.h (struct linux_target_ops)
4622 <supports_hardware_single_step>: Initialize.
4623 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4624 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4625 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4626 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4627 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4628 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4629 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4630 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4631 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4632 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4633 Initialize.
4634 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4635 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4636 Initialize.
4637 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4638 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4639 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4640 New function.
4641 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4642 * target.h (struct target_ops): <supports_software_single_step>:
4643 New field.
4644 (target_supports_software_single_step): New macro.
4645
4646 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4647
4648 * linux-low.c (linux_wait_1): Fix pc advance condition.
4649 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4650 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4651
4652 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4653
4654 * linux-arm-low.c (arm_is_thumb_mode): New function.
4655 (arm_breakpoint_at): Use arm_is_thumb_mode.
4656 (arm_breakpoint_kind_from_current_state): New function.
4657 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4658 Initialize.
4659 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4660 (linux_breakpoint_kind_from_current_state): New function.
4661 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4662 * linux-low.h (struct linux_target_ops)
4663 <breakpoint_kind_from_current_state>: New field.
4664 * target.h (struct target_ops): Likewise.
4665 (target_breakpoint_kind_from_current_state): New macro.
4666
4667 2015-11-30 Pedro Alves <palves@redhat.com>
4668
4669 * linux-low.c (linux_resume): Wake up the event loop before
4670 returning.
4671
4672 2015-11-30 Pedro Alves <palves@redhat.com>
4673
4674 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4675 check.
4676 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4677 to -1.
4678 * target.c (struct thread_search): New structure.
4679 (thread_search_callback): New function.
4680 (prev_general_thread): New global.
4681 (prepare_to_access_memory, done_accessing_memory): New functions.
4682 * target.h (prepare_to_access_memory, done_accessing_memory):
4683 Replace macros with function declarations.
4684
4685 2015-11-30 Pedro Alves <palves@redhat.com>
4686
4687 PR 14618
4688 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4689 report TARGET_WAITKIND_NO_RESUMED.
4690 * remote-utils.c (prepare_resume_reply): Handle
4691 TARGET_WAITKIND_NO_RESUMED.
4692 * server.c (report_no_resumed): New global.
4693 (handle_query) <qSupported>: Handle "no-resumed+". Report
4694 "no-resumed+" support.
4695 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4696 return error if the client doesn't support no-resumed events.
4697 (push_stop_notification): New function.
4698 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4699 events if the client supports them.
4700
4701 2015-11-30 Pedro Alves <palves@redhat.com>
4702
4703 * linux-low.c (thread_still_has_status_pending_p): Don't check
4704 vCont;t here.
4705 (lwp_resumed): New function.
4706 (status_pending_p_callback): Return early if the LWP is not
4707 supposed to be resumed.
4708
4709 2015-11-30 Pedro Alves <palves@redhat.com>
4710
4711 * linux-low.c (handle_extended_wait): Assert that the LWP's
4712 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4713 thread create events, leave the new child's status pending.
4714 (linux_low_filter_event): If GDB wants to hear about thread exit
4715 events, leave the LWP marked dead and don't delete it.
4716 (linux_wait_for_event_filtered): Don't check for thread exit.
4717 (filter_exit_event): New function.
4718 (linux_wait_1): Use it, when returning an exit event.
4719 (linux_resume_one_lwp_throw): Assert that the LWP's
4720 waitstatus is TARGET_WAITKIND_IGNORE.
4721 * remote-utils.c (prepare_resume_reply): Handle
4722 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4723 * server.c (report_thread_events): New global.
4724 (handle_general_set): Handle QThreadEvents.
4725 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4726 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4727 TARGET_WAITKIND_THREAD_EXITED.
4728 * server.h (report_thread_events): Declare.
4729
4730 2015-11-30 Pedro Alves <palves@redhat.com>
4731
4732 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4733 the thread's last_resume_kind was resume_stop.
4734
4735 2015-11-30 Pedro Alves <palves@redhat.com>
4736
4737 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4738 before returning.
4739
4740 2015-11-30 Pedro Alves <palves@redhat.com>
4741
4742 * server.c (handle_v_requests): Handle vCtrlC.
4743
4744 2015-11-30 Pedro Alves <palves@redhat.com>
4745
4746 * gdbthread.h (find_any_thread_of_pid): Declare.
4747 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4748 functions.
4749 * server.c (handle_query): If current_thread is NULL, look for
4750 another thread of the selected process.
4751
4752 2015-11-26 Daniel Colascione <dancol@dancol.org>
4753 Simon Marchi <simon.marchi@ericsson.com>
4754
4755 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4756 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4757 name in reply.
4758 * target.h (struct target_ops) <thread_name>: New field.
4759 (target_thread_name): New macro.
4760
4761 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4762
4763 * regcache.h (regcache_invalidate_pid): Add declaration.
4764 * regcache.c (regcache_invalidate_pid): New function, extracted
4765 from regcache_invalidate.
4766 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4767 Add trivial documentation comment.
4768 * lynx-low.c: Use regcache_invalidate_pid instead of
4769 regcache_invalidate.
4770
4771 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4772
4773 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4774 and Elf64_auxv_t if the target is Android.
4775
4776 2015-11-22 Doug Evans <xdje42@gmail.com>
4777
4778 * target.h: #include <sys/types.h>.
4779
4780 2015-11-19 Pedro Alves <palves@redhat.com>
4781
4782 * linux-low.c (linux_process_qsupported): Change prototype.
4783 Adjust.
4784 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4785 Change prototype.
4786 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4787 and adjust to loop over all features.
4788 * server.c (handle_query) <qSupported>: Adjust to call
4789 target_process_qsupported once, passing it a vector of unprocessed
4790 features.
4791 * target.h (struct target_ops) <process_qsupported>: Change
4792 prototype.
4793 (target_process_qsupported): Adjust.
4794
4795 2015-11-19 Pedro Alves <palves@redhat.com>
4796
4797 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4798 mode.
4799 * configure: Regenerate.
4800
4801 2015-11-19 Pedro Alves <palves@redhat.com>
4802
4803 * configure: Regenerate.
4804
4805 2015-11-19 Yao Qi <yao.qi@linaro.org>
4806
4807 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4808 type to uint32_t.
4809
4810 2015-11-19 Yao Qi <yao.qi@linaro.org>
4811
4812 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4813 (struct aarch64_operand): Move enum out.
4814
4815 2015-11-19 Yao Qi <yao.qi@linaro.org>
4816
4817 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4818 struct user_fpsimd_state *.
4819 (aarch64_store_fpregset): Likewise.
4820
4821 2015-11-19 Yao Qi <yao.qi@linaro.org>
4822
4823 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4824 struct user_pt_regs *.
4825 (aarch64_store_gregset): Likewise.
4826
4827 2015-11-18 Pedro Alves <palves@redhat.com>
4828
4829 * Makefile.in (all_object_files): Add $IPA_OBJS.
4830
4831 2015-11-17 Pedro Alves <palves@redhat.com>
4832
4833 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4834 GDB_SIGNAL_0 and gdb_signal_to_string.
4835
4836 2015-11-17 Pedro Alves <palves@redhat.com>
4837
4838 * win32-low.c (handle_output_debug_string): Remove parameter.
4839 (win32_kill): Remove our_status local and adjust call to
4840 handle_output_debug_string.
4841 (get_child_debug_event): Adjust call to
4842 handle_output_debug_string.
4843
4844 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4845
4846 * linux-mips-low.c (mips_fill_gregset): Add cast.
4847 (mips_store_gregset): Likewise.
4848 (mips_fill_fpregset): Likewise.
4849 (mips_store_fpregset): Likewise.
4850
4851 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4852
4853 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4854 priv.
4855
4856 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4857
4858 * linux-mips-low.c (mips_linux_new_thread): Change type of
4859 watch_type to enum target_hw_bp_type.
4860
4861 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4862
4863 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4864 Change return type to arm_hwbp_type.
4865
4866 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4867
4868 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4869 (arm_store_gregset): Likewise.
4870 * linux-arm-low.c (arm_get_hwcap): Likewise.
4871 (arm_read_description): Likewise.
4872
4873 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4874
4875 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4876
4877 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4878
4879 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4880 (ppc_fill_vsxregset): Likewise.
4881 (ppc_store_vsxregset): Likewise.
4882 (ppc_fill_vrregset): Likewise.
4883 (ppc_store_vrregset): Likewise.
4884 (ppc_fill_evrregset): Likewise.
4885 (ppc_store_evrregset): Likewise.
4886
4887 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4888
4889 * linux-ppc-low.c (ppc_usrregs_info): Remove
4890 forward-declaration.
4891 (ppc_arch_setup): Move lower in file.
4892
4893 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4894
4895 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4896 (ps_pdwrite): Likewise.
4897
4898 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4899
4900 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4901 to after assert checks.
4902
4903 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4904
4905 * proc-service.c (ps_pdread): Add/adjust casts.
4906 (ps_pdwrite): Add/adjust casts.
4907
4908 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4909
4910 * server.c (handle_search_memory_1): Cast return value of
4911 memmem.
4912
4913 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4914
4915 * server.c (write_qxfer_response): Change type of data to
4916 gdb_byte *.
4917
4918 2015-10-29 Pedro Alves <palves@redhat.com>
4919
4920 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4921
4922 2015-10-29 Pedro Alves <palves@redhat.com>
4923
4924 * tracepoint.c (clear_installed_tracepoints): Add casts.
4925
4926 2015-10-29 Pedro Alves <palves@redhat.com>
4927
4928 * server.c (handle_v_cont, process_serial_event): Add enum
4929 gdb_signal casts to signal parsing code.
4930
4931 2015-10-29 Pedro Alves <palves@redhat.com>
4932
4933 * linux-low.h (NULL_REGSET): Define.
4934 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4935 * linux-arm-low.c (arm_regsets): Likewise.
4936 * linux-crisv32-low.c (cris_regsets): Likewise.
4937 * linux-m68k-low.c (m68k_regsets): Likewise.
4938 * linux-mips-low.c (mips_regsets): Likewise.
4939 * linux-nios2-low.c (nios2_regsets): Likewise.
4940 * linux-ppc-low.c (ppc_regsets): Likewise.
4941 * linux-s390-low.c (s390_regsets): Likewise.
4942 * linux-sh-low.c (sh_regsets): Likewise.
4943 * linux-sparc-low.c (sparc_regsets): Likewise.
4944 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4945 * linux-tile-low.c (tile_regsets): Likewise.
4946 * linux-x86-low.c (x86_regsets): Likewise.
4947 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4948
4949 2015-10-29 Pedro Alves <palves@redhat.com>
4950
4951 * linux-low.h (NULL_REGSET): Define.
4952 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4953 * linux-arm-low.c (arm_regsets): Likewise.
4954 * linux-crisv32-low.c (cris_regsets): Likewise.
4955 * linux-m68k-low.c (m68k_regsets): Likewise.
4956 * linux-mips-low.c (mips_regsets): Likewise.
4957 * linux-nios2-low.c (nios2_regsets): Likewise.
4958 * linux-ppc-low.c (ppc_regsets): Likewise.
4959 * linux-s390-low.c (s390_regsets): Likewise.
4960 * linux-sh-low.c (sh_regsets): Likewise.
4961 * linux-sparc-low.c (sparc_regsets): Likewise.
4962 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4963 * linux-tile-low.c (tile_regsets): Likewise.
4964 * linux-x86-low.c (x86_regsets): Likewise.
4965 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4966
4967 2015-10-26 Doug Evans <dje@google.com>
4968
4969 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4970
4971 2015-10-26 Doug Evans <dje@google.com>
4972
4973 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4974
4975 2015-10-26 Doug Evans <dje@google.com>
4976
4977 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4978 for debug_printf.
4979 (attach_thread, find_new_threads_callback): Ditto.
4980
4981 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4982
4983 * mem-break.h (set_breakpoint_data): Remove.
4984
4985 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4986
4987 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4988 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4989 (initialize_low): Remove set_breakpoint_data call.
4990 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4991 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4992 (initialize_low): Remove set_breakpoint_data call.
4993 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4994 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4995 (initialize_low): Remove set_breakpoint_data call.
4996
4997 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4998
4999 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5000 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5001 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5002 * target.h (target_breakpoint_kind_from_pc): New macro.
5003
5004 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5005
5006 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5007 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5008 the default breakpoint kind.
5009
5010 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5011
5012 * linux-arm-low.c (arm_supports_z_point_type): Add software
5013 breakpoint support.
5014
5015 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5016
5017 * linux-arm-low.c: Refactor breakpoint definitions.
5018 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5019 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5020
5021 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5022
5023 * Makefile.in: Add arm.c/o.
5024 * configure.srv: Likewise.
5025 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5026 (arm_breakpoint_kind_from_pc): New function.
5027 (arm_sw_breakpoint_from_kind): Return proper kind.
5028 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5029
5030 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5031
5032 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5033 removal.
5034 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5035 (struct raw_breakpoint) <size>: Remove.
5036 (struct raw_breakpoint) <kind>: Add.
5037 (bp_size): New function.
5038 (bp_opcode): Likewise.
5039 (find_raw_breakpoint_at): Adjust for kind.
5040 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5041 (remove_memory_breakpoint): Adjust for kind call bp_size.
5042 (set_raw_breakpoint_at): Adjust for kind.
5043 (set_breakpoint): Likewise.
5044 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5045 (delete_raw_breakpoint): Adjust for kind.
5046 (delete_breakpoint): Likewise.
5047 (find_gdb_breakpoint): Likewise.
5048 (set_gdb_breakpoint_1): Likewise.
5049 (set_gdb_breakpoint): Likewise.
5050 (delete_gdb_breakpoint_1): Likewise.
5051 (delete_gdb_breakpoint): Likewise.
5052 (uninsert_raw_breakpoint): Likewise.
5053 (reinsert_raw_breakpoint): Likewise.
5054 (set_breakpoint_data): Remove.
5055 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5056 (check_mem_read): Adjust for kind call bp_size.
5057 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5058 (clone_one_breakpoint): Adjust for kind.
5059 * mem-break.h (set_gdb_breakpoint): Likewise.
5060 (delete_gdb_breakpoint): Likewise.
5061 * server.c (process_serial_event): Likewise.
5062
5063 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5064
5065 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5066 (struct linux_target_ops) <breakpoint>: Remove.
5067 (struct linux_target_ops) <breakpoint_len>: Remove.
5068 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5069 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5070 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5071 (arm_sw_breakpoint_from_kind): New function.
5072 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5073 (struct linux_target_ops) <breakpoint>: Remove.
5074 (struct linux_target_ops) <breakpoint_len>: Remove.
5075 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5076 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5077 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5078 (struct linux_target_ops) <breakpoint>: Remove.
5079 (struct linux_target_ops) <breakpoint_len>: Remove.
5080 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5081 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5082 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5083 (struct linux_target_ops) <breakpoint>: Remove.
5084 (struct linux_target_ops) <breakpoint_len>: Remove.
5085 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5086 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5087 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5088 and sw_breakpoint_from_kind to increment the pc.
5089 (linux_breakpoint_kind_from_pc): New function.
5090 (linux_sw_breakpoint_from_kind): New function.
5091 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5092 (initialize_low): Call breakpoint_kind_from_pc and
5093 sw_breakpoint_from_kind to replace breakpoint_data/len.
5094 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5095 New field.
5096 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5097 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5098 (struct linux_target_ops) <breakpoint>: Remove.
5099 (struct linux_target_ops) <breakpoint_len>: Remove.
5100 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5101 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5102 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5103 (struct linux_target_ops) <breakpoint>: Remove.
5104 (struct linux_target_ops) <breakpoint_len>: Remove.
5105 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5106 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5107 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5108 (struct linux_target_ops) <breakpoint>: Remove.
5109 (struct linux_target_ops) <breakpoint_len>: Remove.
5110 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5111 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5112 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5113 (struct linux_target_ops) <breakpoint>: Remove.
5114 (struct linux_target_ops) <breakpoint_len>: Remove.
5115 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5116 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5117 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5118 (struct linux_target_ops) <breakpoint>: Remove.
5119 (struct linux_target_ops) <breakpoint_len>: Remove.
5120 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5121 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5122 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5123 (struct linux_target_ops) <breakpoint>: Remove.
5124 (struct linux_target_ops) <breakpoint_len>: Remove.
5125 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5126 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5127 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5128 (struct linux_target_ops) <breakpoint>: Remove.
5129 (struct linux_target_ops) <breakpoint_len>: Remove.
5130 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5131 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5132 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5133 (struct linux_target_ops) <breakpoint>: Remove.
5134 (struct linux_target_ops) <breakpoint_len>: Remove.
5135 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5136 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5137 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5138 (struct linux_target_ops) <breakpoint>: Remove.
5139 (struct linux_target_ops) <breakpoint_len>: Remove.
5140 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5141 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5142 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5143 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5144 (struct linux_target_ops) <breakpoint>: Remove.
5145 (struct linux_target_ops) <breakpoint_len>: Remove.
5146 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5148 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5149 (struct linux_target_ops) <breakpoint>: Remove.
5150 (struct linux_target_ops) <breakpoint_len>: Remove.
5151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5153
5154 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5155
5156 * linux-cris-low.c (cris_get_pc): Remove void arg.
5157
5158 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5159
5160 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5161 variable name.
5162
5163 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5164
5165 * inferiors.c (thread_pid_matches_callback): New function.
5166 (find_thread_process): New function.
5167 (remove_thread): Reset current_thread.
5168 (remove_process): Assert threads have been removed first.
5169
5170 2015-10-15 Yao Qi <yao.qi@linaro.org>
5171
5172 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5173 if it is 3.
5174 (aarch64_remove_point): Likewise.
5175 * regcache.c (regcache_register_size): New function.
5176
5177 2015-10-12 Yao Qi <yao.qi@linaro.org>
5178
5179 * linux-aarch64-low.c: Update all callers as emit_load_store
5180 is renamed to aarch64_emit_load_store.
5181
5182 2015-10-12 Yao Qi <yao.qi@linaro.org>
5183
5184 * linux-aarch64-low.c: Update all callers of function renaming
5185 from emit_insn to aarch64_emit_insn.
5186
5187 2015-10-12 Yao Qi <yao.qi@linaro.org>
5188
5189 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5190 arch/aarch64-insn.h.
5191 (struct aarch64_memory_operand): Likewise.
5192 (ENCODE): Likewise.
5193 (emit_insn): Move to arch/aarch64-insn.c.
5194 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5195 (emit_load_store): Move to arch/aarch64-insn.c.
5196 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5197 (can_encode_int32): Remove.
5198
5199 2015-10-12 Yao Qi <yao.qi@linaro.org>
5200
5201 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5202 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5203 (aarch64_relocate_instruction): Likewise.
5204 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5205 (struct aarch64_insn_visitor): Likewise.
5206
5207 2015-10-12 Yao Qi <yao.qi@linaro.org>
5208
5209 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5210 (struct aarch64_insn_visitor): New.
5211 (struct aarch64_insn_relocation_data): New.
5212 (aarch64_ftrace_insn_reloc_b): New function.
5213 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5214 (aarch64_ftrace_insn_reloc_cb): Likewise.
5215 (aarch64_ftrace_insn_reloc_tb): Likewise.
5216 (aarch64_ftrace_insn_reloc_adr): Likewise.
5217 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5218 (aarch64_ftrace_insn_reloc_others): Likewise.
5219 (visitor): New.
5220 (aarch64_relocate_instruction): Use visitor.
5221
5222 2015-10-12 Yao Qi <yao.qi@linaro.org>
5223
5224 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5225 int. Add argument buf.
5226 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5227 aarch64_relocate_instruction.
5228
5229 2015-10-12 Yao Qi <yao.qi@linaro.org>
5230
5231 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5232 argument insn. Remove local variable insn. Don't call
5233 target_read_uint32.
5234 (aarch64_install_fast_tracepoint_jump_pad): Call
5235 target_read_uint32.
5236
5237 2015-09-30 Yao Qi <yao.qi@linaro.org>
5238
5239 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5240 (emit_load_store_pair): Likewise.
5241
5242 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5243
5244 * dll.c (match_dll): Add cast(s).
5245 (unloaded_dll): Likewise.
5246 * linux-low.c (second_thread_of_pid_p): Likewise.
5247 (delete_lwp_callback): Likewise.
5248 (count_events_callback): Likewise.
5249 (select_event_lwp_callback): Likewise.
5250 (linux_set_resume_request): Likewise.
5251 * server.c (accumulate_file_name_length): Likewise.
5252 (emit_dll_description): Likewise.
5253 (handle_qxfer_threads_worker): Likewise.
5254 (visit_actioned_threads): Likewise.
5255 * thread-db.c (any_thread_of): Likewise.
5256 * tracepoint.c (same_process_p): Likewise.
5257 (match_blocktype): Likewise.
5258 (build_traceframe_info_xml): Likewise.
5259
5260 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5261
5262 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5263 assignment.
5264 (gdb_unparse_agent_expr): Likewise.
5265 * hostio.c (require_data): Likewise.
5266 (handle_pread): Likewise.
5267 * linux-low.c (disable_regset): Likewise.
5268 (fetch_register): Likewise.
5269 (store_register): Likewise.
5270 (get_dynamic): Likewise.
5271 (linux_qxfer_libraries_svr4): Likewise.
5272 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5273 (set_fast_tracepoint_jump): Likewise.
5274 (uninsert_fast_tracepoint_jumps_at): Likewise.
5275 (reinsert_fast_tracepoint_jumps_at): Likewise.
5276 (validate_inserted_breakpoint): Likewise.
5277 (clone_agent_expr): Likewise.
5278 * regcache.c (init_register_cache): Likewise.
5279 * remote-utils.c (putpkt_binary_1): Likewise.
5280 (decode_M_packet): Likewise.
5281 (decode_X_packet): Likewise.
5282 (look_up_one_symbol): Likewise.
5283 (relocate_instruction): Likewise.
5284 (monitor_output): Likewise.
5285 * server.c (handle_search_memory): Likewise.
5286 (handle_qxfer_exec_file): Likewise.
5287 (handle_qxfer_libraries): Likewise.
5288 (handle_qxfer): Likewise.
5289 (handle_query): Likewise.
5290 (handle_v_cont): Likewise.
5291 (handle_v_run): Likewise.
5292 (captured_main): Likewise.
5293 * target.c (write_inferior_memory): Likewise.
5294 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5295 * tracepoint.c (init_trace_buffer): Likewise.
5296 (add_tracepoint_action): Likewise.
5297 (add_traceframe): Likewise.
5298 (add_traceframe_block): Likewise.
5299 (cmd_qtdpsrc): Likewise.
5300 (cmd_qtdv): Likewise.
5301 (cmd_qtstatus): Likewise.
5302 (response_source): Likewise.
5303 (response_tsv): Likewise.
5304 (cmd_qtnotes): Likewise.
5305 (gdb_collect): Likewise.
5306 (initialize_tracepoint): Likewise.
5307
5308 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5309
5310 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5311 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5312 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5313 <NOP>: New.
5314 (enum aarch64_condition_codes): New enum.
5315 (w0): New static global.
5316 (fp): Likewise.
5317 (lr): Likewise.
5318 (struct aarch64_memory_operand) <type>: New
5319 MEMORY_OPERAND_POSTINDEX type.
5320 (postindex_memory_operand): New helper function.
5321 (emit_ret): New function.
5322 (emit_load_store_pair): New function, factored out of emit_stp
5323 with support for MEMORY_OPERAND_POSTINDEX.
5324 (emit_stp): Rewrite using emit_load_store_pair.
5325 (emit_ldp): New function.
5326 (emit_load_store): Likewise.
5327 (emit_ldr): Mention post-index instruction in comment.
5328 (emit_ldrh): New function.
5329 (emit_ldrb): New function.
5330 (emit_ldrsw): Mention post-index instruction in comment.
5331 (emit_str): Likewise.
5332 (emit_subs): New function.
5333 (emit_cmp): Likewise.
5334 (emit_and): Likewise.
5335 (emit_orr): Likewise.
5336 (emit_orn): Likewise.
5337 (emit_eor): Likewise.
5338 (emit_mvn): Likewise.
5339 (emit_lslv): Likewise.
5340 (emit_lsrv): Likewise.
5341 (emit_asrv): Likewise.
5342 (emit_mul): Likewise.
5343 (emit_sbfm): Likewise.
5344 (emit_sbfx): Likewise.
5345 (emit_ubfm): Likewise.
5346 (emit_ubfx): Likewise.
5347 (emit_csinc): Likewise.
5348 (emit_cset): Likewise.
5349 (emit_nop): Likewise.
5350 (emit_ops_insns): New helper function.
5351 (emit_pop): Likewise.
5352 (emit_push): Likewise.
5353 (aarch64_emit_prologue): New function.
5354 (aarch64_emit_epilogue): Likewise.
5355 (aarch64_emit_add): Likewise.
5356 (aarch64_emit_sub): Likewise.
5357 (aarch64_emit_mul): Likewise.
5358 (aarch64_emit_lsh): Likewise.
5359 (aarch64_emit_rsh_signed): Likewise.
5360 (aarch64_emit_rsh_unsigned): Likewise.
5361 (aarch64_emit_ext): Likewise.
5362 (aarch64_emit_log_not): Likewise.
5363 (aarch64_emit_bit_and): Likewise.
5364 (aarch64_emit_bit_or): Likewise.
5365 (aarch64_emit_bit_xor): Likewise.
5366 (aarch64_emit_bit_not): Likewise.
5367 (aarch64_emit_equal): Likewise.
5368 (aarch64_emit_less_signed): Likewise.
5369 (aarch64_emit_less_unsigned): Likewise.
5370 (aarch64_emit_ref): Likewise.
5371 (aarch64_emit_if_goto): Likewise.
5372 (aarch64_emit_goto): Likewise.
5373 (aarch64_write_goto_address): Likewise.
5374 (aarch64_emit_const): Likewise.
5375 (aarch64_emit_call): Likewise.
5376 (aarch64_emit_reg): Likewise.
5377 (aarch64_emit_pop): Likewise.
5378 (aarch64_emit_stack_flush): Likewise.
5379 (aarch64_emit_zero_ext): Likewise.
5380 (aarch64_emit_swap): Likewise.
5381 (aarch64_emit_stack_adjust): Likewise.
5382 (aarch64_emit_int_call_1): Likewise.
5383 (aarch64_emit_void_call_2): Likewise.
5384 (aarch64_emit_eq_goto): Likewise.
5385 (aarch64_emit_ne_goto): Likewise.
5386 (aarch64_emit_lt_goto): Likewise.
5387 (aarch64_emit_le_goto): Likewise.
5388 (aarch64_emit_gt_goto): Likewise.
5389 (aarch64_emit_ge_got): Likewise.
5390 (aarch64_emit_ops_impl): New static global variable.
5391 (aarch64_emit_ops): New target function, return
5392 &aarch64_emit_ops_impl.
5393 (struct linux_target_ops): Install it.
5394
5395 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5396
5397 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5398 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5399 aarch64-ipa.o.
5400 * linux-aarch64-ipa.c: New file.
5401 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5402 and endian.h.
5403 (aarch64_get_thread_area): New target method.
5404 (extract_signed_bitfield): New helper function.
5405 (aarch64_decode_ldr_literal): New function.
5406 (enum aarch64_opcodes): New enum.
5407 (struct aarch64_register): New struct.
5408 (struct aarch64_operand): New struct.
5409 (x0): New static global.
5410 (x1): Likewise.
5411 (x2): Likewise.
5412 (x3): Likewise.
5413 (x4): Likewise.
5414 (w2): Likewise.
5415 (ip0): Likewise.
5416 (sp): Likewise.
5417 (xzr): Likewise.
5418 (aarch64_register): New helper function.
5419 (register_operand): Likewise.
5420 (immediate_operand): Likewise.
5421 (struct aarch64_memory_operand): New struct.
5422 (offset_memory_operand): New helper function.
5423 (preindex_memory_operand): Likewise.
5424 (enum aarch64_system_control_registers): New enum.
5425 (ENCODE): New macro.
5426 (emit_insn): New helper function.
5427 (emit_b): New function.
5428 (emit_bcond): Likewise.
5429 (emit_cb): Likewise.
5430 (emit_tb): Likewise.
5431 (emit_blr): Likewise.
5432 (emit_stp): Likewise.
5433 (emit_ldp_q_offset): Likewise.
5434 (emit_stp_q_offset): Likewise.
5435 (emit_load_store): Likewise.
5436 (emit_ldr): Likewise.
5437 (emit_ldrsw): Likewise.
5438 (emit_str): Likewise.
5439 (emit_ldaxr): Likewise.
5440 (emit_stxr): Likewise.
5441 (emit_stlr): Likewise.
5442 (emit_data_processing_reg): Likewise.
5443 (emit_data_processing): Likewise.
5444 (emit_add): Likewise.
5445 (emit_sub): Likewise.
5446 (emit_mov): Likewise.
5447 (emit_movk): Likewise.
5448 (emit_mov_addr): Likewise.
5449 (emit_mrs): Likewise.
5450 (emit_msr): Likewise.
5451 (emit_sevl): Likewise.
5452 (emit_wfe): Likewise.
5453 (append_insns): Likewise.
5454 (can_encode_int32_in): New helper function.
5455 (aarch64_relocate_instruction): New function.
5456 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5457 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5458 (struct linux_target_ops): Install aarch64_get_thread_area,
5459 aarch64_install_fast_tracepoint_jump_pad and
5460 aarch64_get_min_fast_tracepoint_insn_len.
5461
5462 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5463
5464 * Makefile.in (aarch64-insn.o): New rule.
5465 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5466
5467 2015-09-21 Yao Qi <yao.qi@linaro.org>
5468
5469 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5470
5471 2015-09-21 Yao Qi <yao.qi@linaro.org>
5472
5473 * tracepoint.c (max_jump_pad_size): Remove.
5474
5475 2015-09-18 Yao Qi <yao.qi@linaro.org>
5476
5477 * linux-aarch64-low.c: Don't include sys/uio.h.
5478 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5479
5480 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5481
5482 * tracepoint.c (eval_result_type): Change prototype.
5483 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5484
5485 2015-09-15 Pedro Alves <palves@redhat.com>
5486
5487 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5488 Check whether to report exec events instead of checking whether
5489 multiprocess is enabled.
5490
5491 2015-09-15 Pedro Alves <palves@redhat.com>
5492
5493 PR remote/18965
5494 * remote-utils.c (prepare_resume_reply): Merge
5495 TARGET_WAITKIND_VFORK_DONE switch case with the
5496 TARGET_WAITKIND_FORKED case.
5497
5498 2015-09-15 Yao Qi <yao.qi@linaro.org>
5499
5500 * server.c (handle_query): Check string comparison using
5501 "else if" instead of "if".
5502
5503 2015-09-15 Yao Qi <yao.qi@linaro.org>
5504
5505 * server.c (vCont_supported): New global variable.
5506 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5507 matches. Append ";vContSupported+" to own_buf.
5508 (handle_v_requests): Append ";s;S" to own_buf if target supports
5509 hardware single step or vCont_supported is false.
5510 (capture_main): Set vCont_supported to zero.
5511
5512 2015-09-15 Yao Qi <yao.qi@linaro.org>
5513
5514 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5515 it to ...
5516 (linux_supports_hardware_single_step): ... New function.
5517 (linux_target_ops): Update.
5518 * lynx-low.c (lynx_target_ops): Set field
5519 supports_hardware_single_step to target_can_do_hardware_single_step.
5520 * nto-low.c (nto_target_ops): Likewise.
5521 * spu-low.c (spu_target_ops): Likewise.
5522 * win32-low.c (win32_target_ops): Likewise.
5523 * target.c (target_can_do_hardware_single_step): New function.
5524 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5525 Remove. <supports_hardware_single_step>: New field.
5526 (target_supports_conditional_breakpoints): Remove.
5527 (target_supports_hardware_single_step): New macro.
5528 (target_can_do_hardware_single_step): Declare.
5529 * server.c (handle_query): Use target_supports_hardware_single_step
5530 instead of target_supports_conditional_breakpoints.
5531
5532 2015-09-15 Yao Qi <yao.qi@linaro.org>
5533
5534 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5535 function.
5536 (struct linux_target_ops the_low_target): Install
5537 aarch64_linux_siginfo_fixup.
5538
5539 2015-09-11 Don Breazeal <donb@codesourcery.com>
5540 Luis Machado <lgustavo@codesourcery.com>
5541
5542 * linux-low.c (linux_mourn): Static declaration.
5543 (linux_arch_setup): Move in front of
5544 handle_extended_wait.
5545 (linux_arch_setup_thread): New function.
5546 (handle_extended_wait): Handle exec events. Call
5547 linux_arch_setup_thread. Make event_lwp argument a
5548 pointer-to-a-pointer.
5549 (check_zombie_leaders): Do not check stopped threads.
5550 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5551 (linux_low_filter_event): Add lwp and thread for exec'ing
5552 non-leader thread if leader thread has been deleted.
5553 Refactor code into linux_arch_setup_thread and call it.
5554 Pass child lwp pointer by reference to handle_extended_wait.
5555 (linux_wait_for_event_filtered): Update comment.
5556 (linux_wait_1): Prevent clobbering exec event status.
5557 (linux_supports_exec_events): New function.
5558 (linux_target_ops) <supports_exec_events>: Initialize new member.
5559 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5560 new member.
5561 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5562 * server.c (report_exec_events): New global variable.
5563 (handle_query): Handle qSupported query for exec-events feature.
5564 (captured_main): Initialize report_exec_events.
5565 * server.h (report_exec_events): Declare new global variable.
5566 * target.h (struct target_ops) <supports_exec_events>: New
5567 member.
5568 (target_supports_exec_events): New macro.
5569 * win32-low.c (win32_target_ops) <supports_exec_events>:
5570 Initialize new member.
5571
5572 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5573
5574 * linux-low.c (linux_low_enable_btrace): Remove.
5575 (linux_target_ops): Replace linux_low_enable_btrace with
5576 linux_enable_btrace.
5577
5578 2015-09-03 Yao Qi <yao.qi@linaro.org>
5579
5580 * linux-aarch64-low.c (aarch64_insert_point): Call
5581 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5582 returns true.
5583
5584 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5585
5586 * linux-low.c (check_stopped_by_breakpoint): Use
5587 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5588
5589 2015-08-27 Pedro Alves <palves@redhat.com>
5590
5591 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5592
5593 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5594
5595 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5596 the XNEW-family equivalent.
5597 (compile_bytecodes): Likewise.
5598 * dll.c (loaded_dll): Likewise.
5599 * event-loop.c (append_callback_event): Likewise.
5600 (create_file_handler): Likewise.
5601 (create_file_event): Likewise.
5602 * hostio.c (handle_open): Likewise.
5603 * inferiors.c (add_thread): Likewise.
5604 (add_process): Likewise.
5605 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5606 * linux-arm-low.c (arm_new_process): Likewise.
5607 (arm_new_thread): Likewise.
5608 * linux-low.c (add_to_pid_list): Likewise.
5609 (linux_add_process): Likewise.
5610 (handle_extended_wait): Likewise.
5611 (add_lwp): Likewise.
5612 (enqueue_one_deferred_signal): Likewise.
5613 (enqueue_pending_signal): Likewise.
5614 (linux_resume_one_lwp_throw): Likewise.
5615 (linux_resume_one_thread): Likewise.
5616 (linux_read_memory): Likewise.
5617 (linux_write_memory): Likewise.
5618 * linux-mips-low.c (mips_linux_new_process): Likewise.
5619 (mips_linux_new_thread): Likewise.
5620 (mips_add_watchpoint): Likewise.
5621 * linux-x86-low.c (initialize_low_arch): Likewise.
5622 * lynx-low.c (lynx_add_process): Likewise.
5623 * mem-break.c (set_raw_breakpoint_at): Likewise.
5624 (set_breakpoint): Likewise.
5625 (add_condition_to_breakpoint): Likewise.
5626 (add_commands_to_breakpoint): Likewise.
5627 (clone_agent_expr): Likewise.
5628 (clone_one_breakpoint): Likewise.
5629 * regcache.c (new_register_cache): Likewise.
5630 * remote-utils.c (look_up_one_symbol): Likewise.
5631 * server.c (queue_stop_reply): Likewise.
5632 (start_inferior): Likewise.
5633 (queue_stop_reply_callback): Likewise.
5634 (handle_target_event): Likewise.
5635 * spu-low.c (fetch_ppc_memory): Likewise.
5636 (store_ppc_memory): Likewise.
5637 * target.c (set_target_ops): Likewise.
5638 * thread-db.c (thread_db_load_search): Likewise.
5639 (try_thread_db_load_1): Likewise.
5640 * tracepoint.c (add_tracepoint): Likewise.
5641 (add_tracepoint_action): Likewise.
5642 (create_trace_state_variable): Likewise.
5643 (cmd_qtdpsrc): Likewise.
5644 (cmd_qtro): Likewise.
5645 (add_while_stepping_state): Likewise.
5646 * win32-low.c (child_add_thread): Likewise.
5647 (get_image_name): Likewise.
5648
5649 2015-08-25 Yao Qi <yao.qi@linaro.org>
5650
5651 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5652
5653 2015-08-25 Yao Qi <yao.qi@linaro.org>
5654
5655 * Makefile.in (aarch64-linux.o): New rule.
5656 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5657 srv_tgtobj.
5658 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5659 (aarch64_init_debug_reg_state): Make it extern.
5660 (aarch64_linux_prepare_to_resume): Remove.
5661
5662 2015-08-25 Yao Qi <yao.qi@linaro.org>
5663
5664 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5665 lwp_arch_private_info and ptid_of_lwp.
5666
5667 2015-08-25 Yao Qi <yao.qi@linaro.org>
5668
5669 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5670 Find proc_info by find_process_pid. All callers updated.
5671
5672 2015-08-25 Yao Qi <yao.qi@linaro.org>
5673
5674 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5675 Remove.
5676 (debug_reg_change_callback): Remove.
5677 (aarch64_notify_debug_reg_change): Remove.
5678
5679 2015-08-25 Yao Qi <yao.qi@linaro.org>
5680
5681 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5682 Call current_lwp_ptid.
5683
5684 2015-08-25 Yao Qi <yao.qi@linaro.org>
5685
5686 * linux-aarch64-low.c (debug_reg_change_callback): Use
5687 debug_printf.
5688
5689 2015-08-25 Yao Qi <yao.qi@linaro.org>
5690
5691 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5692
5693 2015-08-25 Yao Qi <yao.qi@linaro.org>
5694
5695 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5696
5697 2015-08-25 Yao Qi <yao.qi@linaro.org>
5698
5699 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5700 the code.
5701
5702 2015-08-25 Yao Qi <yao.qi@linaro.org>
5703
5704 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5705 Remove.
5706 (debug_reg_change_callback): Remove argument entry and add argument
5707 lwp. Remove local variable thread. Don't print thread id in the
5708 debugging output. Don't check whether pid of thread equals to pid.
5709 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5710 iterate_over_lwps instead find_inferior.
5711
5712 2015-08-24 Pedro Alves <palves@redhat.com>
5713
5714 * inferiors.c (get_first_process): New function.
5715 * inferiors.h (get_first_process): New declaration.
5716 * remote-utils.c (read_ptid): Default to the first process in the
5717 list, instead of to the current thread's process.
5718
5719 2015-08-24 Pedro Alves <palves@redhat.com>
5720
5721 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5722 * event-loop.c: Likewise.
5723 * remote-utils.c: Likewise.
5724 * tracepoint.c: Likewise.
5725
5726 2015-08-24 Pedro Alves <palves@redhat.com>
5727
5728 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5729 ptid_get_lwp.
5730
5731 2015-08-21 Pedro Alves <palves@redhat.com>
5732
5733 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5734 instead of literal 1.
5735
5736 2015-08-21 Pedro Alves <palves@redhat.com>
5737
5738 * tdesc.c (default_description): Explicitly zero-initialize.
5739
5740 2015-08-21 Pedro Alves <palves@redhat.com>
5741
5742 PR gdb/18749
5743 * inferiors.c (remove_thread): Discard any pending stop reply for
5744 this thread.
5745 * server.c (remove_all_on_match_pid): Rename to ...
5746 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5747 instead of a pid.
5748 (discard_queued_stop_replies): Change parameter to a ptid. Now
5749 extern.
5750 (handle_v_kill, kill_inferior_callback, captured_main)
5751 (process_serial_event): Adjust.
5752 * server.h (discard_queued_stop_replies): Declare.
5753
5754 2015-08-21 Pedro Alves <palves@redhat.com>
5755
5756 * linux-low.c (wait_for_sigstop): Always switch to no thread
5757 selected if the previously current thread dies.
5758 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5759 process instead of the current thread's.
5760 * remote-utils.c (input_interrupt): Don't check if there's no
5761 current thread.
5762 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5763 current thread to the general thread fails, error out.
5764 (handle_qxfer_auxv, handle_qxfer_libraries)
5765 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5766 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5767 (handle_query): Check if there's a thread selected instead of
5768 checking whether there's any thread in the thread list.
5769 (handle_qxfer_threads, handle_qxfer_btrace)
5770 (handle_qxfer_btrace_conf): Don't error out early if there's no
5771 thread in the thread list.
5772 (handle_v_cont, myresume): Don't set the current thread to the
5773 continue thread.
5774 (process_serial_event) <Hg handling>: Also set thread_id if the
5775 previous general thread is still alive.
5776 (process_serial_event) <g/G handling>: If setting the current
5777 thread to the general thread fails, error out.
5778 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5779 thread's lwp instead of the current thread's.
5780 * target.c (set_desired_thread): If the desired thread was not
5781 found, leave the current thread pointing to NULL. Return an int
5782 (boolean) indicating success.
5783 * target.h (set_desired_thread): Change return type to int.
5784
5785 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5786
5787 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5788 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5789 #includes.
5790 (ps_get_thread_area): New function.
5791
5792 2015-08-19 Gary Benson <gbenson@redhat.com>
5793
5794 * hostio.c (handle_pread): Do not attempt to read more data
5795 than hostio_reply_with_data can fit in a packet.
5796
5797 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5798
5799 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5800
5801 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5802
5803 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5804
5805 2015-08-06 Pedro Alves <palves@redhat.com>
5806
5807 * tracepoint.c (expr_eval_result): Now an int.
5808
5809 2015-08-06 Pedro Alves <palves@redhat.com>
5810
5811 * gdbthread.h (struct regcache): Forward declare.
5812 (struct thread_info) <regcache_data>: Now a struct regcache
5813 pointer.
5814 * inferiors.c (inferior_regcache_data)
5815 (set_inferior_regcache_data): Now work with struct regcache
5816 pointers.
5817 * inferiors.h (struct regcache): Forward declare.
5818 (inferior_regcache_data, set_inferior_regcache_data): Now work
5819 with struct regcache pointers.
5820 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5821 (free_register_cache_thread): Remove struct regcache pointer
5822 casts.
5823
5824 2015-08-06 Pedro Alves <palves@redhat.com>
5825
5826 * server.c (captured_main): On error, print the exception message
5827 to stderr, and if run_once is set, throw a quit.
5828
5829 2015-08-06 Pedro Alves <palves@redhat.com>
5830
5831 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5832 the current thread.
5833
5834 2015-08-06 Pedro Alves <palves@redhat.com>
5835
5836 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5837 reading beyond the passed in buffer length.
5838
5839 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5840
5841 * tracepoint.c (symbol_list) <required>: Remove.
5842
5843 2015-08-06 Pedro Alves <palves@redhat.com>
5844
5845 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5846 count if stopping and suspending threads.
5847 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5848 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5849 (linux_detach): Complete an ongoing step-over.
5850 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5851 throughout.
5852 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5853 (linux_wait_1): If passing a signal to the inferior after
5854 finishing a step-over, unsuspend and re-resume all lwps. If we
5855 see a single-step event but the thread should be continuing, don't
5856 pass the trap to gdb.
5857 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5858 internal_error instead of gdb_assert.
5859 (enqueue_pending_signal): New function.
5860 (check_ptrace_stopped_lwp_gone): Add debug output.
5861 (start_step_over): Use internal_error instead of gdb_assert.
5862 (complete_ongoing_step_over): New function.
5863 (linux_resume_one_thread): Don't resume a suspended thread.
5864 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5865 it stepping.
5866
5867 2015-08-06 Pedro Alves <palves@redhat.com>
5868
5869 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5870 (linux_thread_alive): Use lwp_is_marked_dead.
5871 (extended_event_reported): Delete.
5872 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5873 instead of extended_event_reported.
5874 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5875 as well.
5876 (lwp_is_marked_dead): New function.
5877 (lwp_running): Use lwp_is_marked_dead.
5878 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5879 comment.
5880
5881 2015-08-06 Pedro Alves <palves@redhat.com>
5882
5883 * linux-low.c (linux_wait_1): Move fork event output out of the
5884 !report_to_gdb check. Pass event_child->waitstatus to
5885 target_waitstatus_to_string instead of ourstatus.
5886
5887 2015-08-04 Yao Qi <yao.qi@linaro.org>
5888
5889 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5890 if current_thread is 32 bit.
5891
5892 2015-08-04 Yao Qi <yao.qi@linaro.org>
5893
5894 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5895 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5896 * server.c (extended_protocol): Remove "static".
5897 * server.h (extended_protocol): Declare it.
5898
5899 2015-08-04 Yao Qi <yao.qi@linaro.org>
5900
5901 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5902 both aarch64 and aarch32.
5903 (aarch64_set_pc): Likewise.
5904
5905 2015-08-04 Yao Qi <yao.qi@linaro.org>
5906
5907 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5908 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5909 arm-with-neon.xml to srv_xmlfiles.
5910 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5911 (is_64bit_tdesc): New function.
5912 (aarch64_linux_read_description): New function.
5913 (aarch64_arch_setup): Call aarch64_linux_read_description.
5914 (regs_info): Rename to regs_info_aarch64.
5915 (aarch64_regs_info): Return right regs_info.
5916 (initialize_low_arch): Call initialize_low_arch_aarch32.
5917
5918 2015-08-04 Yao Qi <yao.qi@linaro.org>
5919
5920 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5921 * linux-aarch32-low.c: New file.
5922 * linux-aarch32-low.h: New file.
5923 * linux-arm-low.c (arm_fill_gregset): Move it to
5924 linux-aarch32-low.c.
5925 (arm_store_gregset): Likewise.
5926 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5927 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5928 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5929 (regs_info): Rename to regs_info_arm.
5930 (arm_regs_info): Return regs_info_aarch32 if
5931 have_ptrace_getregset is 1 and target description is
5932 arm_with_neon or arm_with_vfpv3.
5933 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5934 Call initialize_low_arch_aarch32 instead.
5935
5936 2015-08-04 Yao Qi <yao.qi@linaro.org>
5937
5938 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5939 * linux-low.c: ... here.
5940 * linux-low.h (have_ptrace_getregset): Declare it.
5941
5942 2015-08-04 Pedro Alves <palves@redhat.com>
5943
5944 * thread-db.c (struct thread_db): Use new typedefs.
5945 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5946 CHK calls.
5947 (disable_thread_event_reporting): Cast result of dlsym to
5948 destination function pointer type.
5949 (thread_db_mourn): Use td_ta_delete_ftype.
5950
5951 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5952
5953 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5954 arch variant.
5955 (CDX_BREAKPOINT): Define for R2.
5956 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5957 (the_low_target): Add comments.
5958
5959 2015-07-30 Yao Qi <yao.qi@linaro.org>
5960
5961 * linux-arm-low.c (arm_hwcap): Remove it.
5962 (arm_read_description): New local variable arm_hwcap. Don't
5963 set arm_hwcap to zero.
5964
5965 2015-07-30 Yao Qi <yao.qi@linaro.org>
5966
5967 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5968 Use regcache->tdesc instead.
5969 (arm_store_wmmxregset): Likewise.
5970 (arm_fill_vfpregset): Likewise.
5971 (arm_store_vfpregset): Likewise.
5972
5973 2015-07-30 Yao Qi <yao.qi@linaro.org>
5974
5975 * linux-arm-low.c: Include arch/arm.h.
5976 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5977 (arm_store_gregset): Likewise.
5978
5979 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5980
5981 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5982 ptrace's 4th parameter.
5983
5984 2015-07-27 Yao Qi <yao.qi@linaro.org>
5985
5986 * configure.srv (case aarch64*-*-linux*): Don't set
5987 srv_linux_usrregs.
5988
5989 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5990
5991 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5992 sys/ptrace.h.
5993 * linux-arm-low.c: Likewise.
5994 * linux-cris-low.c: Likewise.
5995 * linux-crisv32-low.c: Likewise.
5996 * linux-low.c: Likewise.
5997 * linux-m68k-low.c: Likewise.
5998 * linux-mips-low.c: Likewise.
5999 * linux-nios2-low.c: Likewise.
6000 * linux-s390-low.c: Likewise.
6001 * linux-sparc-low.c: Likewise.
6002 * linux-tic6x-low.c: Likewise.
6003 * linux-tile-low.c: Likewise.
6004 * linux-x86-low.c: Likewise.
6005
6006 2015-07-24 Pedro Alves <palves@redhat.com>
6007
6008 * config.in: Regenerate.
6009 * configure: Regenerate.
6010
6011 2015-07-24 Pedro Alves <palves@redhat.com>
6012
6013 * acinclude.m4: Include ../ptrace.m4.
6014 * configure.ac: Call GDB_AC_PTRACE.
6015 * config.in, configure: Regenerate.
6016
6017 2015-07-24 Yao Qi <yao.qi@linaro.org>
6018
6019 * linux-low.c (linux_create_inferior): Remove setting to
6020 proc->priv->new_inferior.
6021 (linux_attach): Likewise.
6022 (linux_low_filter_event): Likewise.
6023 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6024
6025 2015-07-24 Yao Qi <yao.qi@linaro.org>
6026
6027 * linux-low.c (linux_arch_setup): New function.
6028 (linux_low_filter_event): If proc->tdesc is NULL and
6029 proc->attached is true, call the_low_target.arch_setup.
6030 Otherwise, keep status pending, and return.
6031 (linux_resume_one_lwp_throw): Don't call get_pc if
6032 thread->while_stepping isn't NULL. Don't call
6033 get_thread_regcache if proc->tdesc is NULL.
6034 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6035 (linux_target_ops): Install arch_setup.
6036 * server.c (start_inferior): Call the_target->arch_setup.
6037 * target.h (struct target_ops) <arch_setup>: New field.
6038 (target_arch_setup): New marco.
6039 * lynx-low.c (lynx_target_ops): Update.
6040 * nto-low.c (nto_target_ops): Update.
6041 * spu-low.c (spu_target_ops): Update.
6042 * win32-low.c (win32_target_ops): Update.
6043
6044 2015-07-24 Yao Qi <yao.qi@linaro.org>
6045
6046 * linux-low.c (linux_add_process): Don't set
6047 proc->priv->new_inferior.
6048 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6049 (linux_attach): Likewise.
6050
6051 2015-07-24 Yao Qi <yao.qi@linaro.org>
6052
6053 * server.c (start_inferior): Code refactor.
6054
6055 2015-07-24 Yao Qi <yao.qi@linaro.org>
6056
6057 * server.c (process_serial_event): Set general_thread.
6058
6059 2015-07-21 Yao Qi <yao.qi@linaro.org>
6060
6061 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6062 aarch64_linux_get_debug_reg_capacity.
6063
6064 2015-07-17 Yao Qi <yao.qi@linaro.org>
6065
6066 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6067 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6068 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6069 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6070 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6071 (AARCH64_HWP_ALIGNMENT): Likewise.
6072 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6073 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6074 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6075 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6076 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6077 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6078 (struct aarch64_debug_reg_state): Likewise.
6079 (struct arch_lwp_info): Likewise.
6080 (aarch64_align_watchpoint): Likewise.
6081 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6082 (aarch64_watchpoint_length): Likewise.
6083 (aarch64_point_encode_ctrl_reg): Likewise
6084 (aarch64_point_is_aligned): Likewise.
6085 (aarch64_align_watchpoint): Likewise.
6086 (aarch64_linux_set_debug_regs):
6087 (aarch64_dr_state_insert_one_point): Likewise.
6088 (aarch64_dr_state_remove_one_point): Likewise.
6089 (aarch64_handle_breakpoint): Likewise.
6090 (aarch64_handle_aligned_watchpoint): Likewise.
6091 (aarch64_handle_unaligned_watchpoint): Likewise.
6092 (aarch64_handle_watchpoint): Likewise.
6093
6094 2015-07-17 Yao Qi <yao.qi@linaro.org>
6095
6096 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6097 and don't aarch64_get_debug_reg_state. All callers update.
6098 (aarch64_handle_aligned_watchpoint): Likewise.
6099 (aarch64_handle_unaligned_watchpoint): Likewise.
6100 (aarch64_handle_watchpoint): Likewise.
6101 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6102 (aarch64_remove_point): Likewise.
6103
6104 2015-07-17 Yao Qi <yao.qi@linaro.org>
6105
6106 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6107 debug_printf.
6108 (aarch64_handle_unaligned_watchpoint): Likewise.
6109
6110 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6111
6112 Revert the previous 3 commits:
6113 Move gdb_regex* to common/
6114 Move linux_find_memory_regions_full & co.
6115 gdbserver build-id attribute generator
6116
6117 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6118 Jan Kratochvil <jan.kratochvil@redhat.com>
6119
6120 gdbserver build-id attribute generator.
6121 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6122 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6123 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6124 (find_phdr): New.
6125 (get_dynamic): Use find_pdhr to traverse program headers.
6126 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6127 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6128 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6129 (get_hex_build_id): New.
6130 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6131 to reply XML document.
6132
6133 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6134 Jan Kratochvil <jan.kratochvil@redhat.com>
6135
6136 * target.c: Include target/target-utils.h and fcntl.h.
6137 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6138 (target_fileio_read_stralloc): New functions.
6139
6140 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6141
6142 * Makefile.in (OBS): Add gdb_regex.o.
6143 (gdb_regex.o): New.
6144 * config.in: Rebuilt.
6145 * configure: Rebuilt.
6146
6147 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6148 Jan Kratochvil <jan.kratochvil@redhat.com>
6149
6150 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6151 * Makefile.in (OBS): Add target-utils.o.
6152 (linux-maps.o, target-utils.o): New.
6153 * configure.srv (srv_linux_obj): Add linux-maps.o.
6154
6155 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6156
6157 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6158 function, return 1.
6159 (the_low_target): Install it.
6160
6161 2015-07-14 Pedro Alves <palves@redhat.com>
6162
6163 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6164 Instead, ignore ECHILD, and throw an error for other errnos.
6165
6166 2015-07-10 Pedro Alves <palves@redhat.com>
6167
6168 * event-loop.c (struct callback_event) <data>: Change type to
6169 gdb_client_data instance instead of gdb_client_data pointer.
6170 (append_callback_event): Adjust.
6171
6172 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6173
6174 * linux-aarch64-low.c: Add comments for each linux_target_ops
6175 method. Remove comments already covered in target_ops and
6176 linux_target_ops definitions.
6177 (the_low_target): Add comments for each unimplemented method.
6178
6179 2015-07-09 Yao Qi <yao.qi@linaro.org>
6180
6181 * linux-aarch64-low.c (aarch64_regmap): Remove.
6182 (aarch64_usrregs_info): Remove.
6183 (regs_info): Set field usrregs to NULL.
6184
6185 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6186
6187 * linux-low.c: Include "rsp-low.h"
6188 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6189 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6190 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6191 (handle_btrace_enable_pt): New.
6192 (handle_btrace_general_set): Support "pt".
6193 (handle_btrace_conf_general_set): Support "pt:size".
6194
6195 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6196
6197 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6198 Z_PACKET_SW_BP.
6199
6200 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6201
6202 * linux-aarch64-low.c: Remove comment about endianness.
6203 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6204 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6205 memcmp.
6206
6207 2015-06-24 Gary Benson <gbenson@redhat.com>
6208
6209 * linux-i386-ipa.c (stdint.h): Do not include.
6210 * lynx-i386-low.c (stdint.h): Likewise.
6211 * lynx-ppc-low.c (stdint.h): Likewise.
6212 * mem-break.c (stdint.h): Likewise.
6213 * thread-db.c (stdint.h): Likewise.
6214 * tracepoint.c (stdint.h): Likewise.
6215 * win32-low.c (stdint.h): Likewise.
6216
6217 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6218
6219 * server.c (write_qxfer_response): Update call to
6220 remote_escape_output.
6221
6222 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6223 Jan Kratochvil <jan.kratochvil@redhat.com>
6224
6225 Merge multiple hex conversions.
6226 * gdbreplay.c (tohex): Rename to 'fromhex'.
6227 (logchar): Use fromhex.
6228
6229 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6230
6231 * server.c (handle_qxfer_libraries): Set `version' attribute for
6232 <library-list>.
6233
6234 2015-06-10 Gary Benson <gbenson@redhat.com>
6235
6236 * target.h (struct target_ops) <multifs_open>: New field.
6237 <multifs_unlink>: Likewise.
6238 <multifs_readlink>: Likewise.
6239 * linux-low.c (nat/linux-namespaces.h): New include.
6240 (linux_target_ops): Initialize the_target->multifs_open,
6241 the_target->multifs_unlink and the_target->multifs_readlink.
6242 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6243 * hostio.c (hostio_fs_pid): New static variable.
6244 (hostio_handle_new_gdb_connection): New function.
6245 (handle_setfs): Likewise.
6246 (handle_open): Use the_target->multifs_open as appropriate.
6247 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6248 (handle_readlink): Use the_target->multifs_readlink as
6249 appropriate.
6250 (handle_vFile): Handle vFile:setfs packets.
6251 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6252 after target_handle_new_gdb_connection.
6253
6254 2015-06-10 Gary Benson <gbenson@redhat.com>
6255
6256 * configure.ac (AC_CHECK_FUNCS): Add setns.
6257 * config.in: Regenerate.
6258 * configure: Likewise.
6259 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6260 (linux-namespaces.o): New rule.
6261 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6262
6263 2015-06-09 Gary Benson <gbenson@redhat.com>
6264
6265 * hostio.c (handle_open): Process mode argument with
6266 fileio_to_host_mode.
6267
6268 2015-06-01 Yao Qi <yao.qi@linaro.org>
6269
6270 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6271 * linux-x86-low.c: Likewise.
6272
6273 2015-05-28 Don Breazeal <donb@codesourcery.com>
6274
6275 * linux-low.c (handle_extended_wait): Initialize
6276 thread_info.last_resume_kind for new fork children.
6277
6278 2015-05-15 Pedro Alves <palves@redhat.com>
6279
6280 * target.h (target_handle_new_gdb_connection): Rewrite using if
6281 wrapped in do/while.
6282
6283 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6284
6285 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6286 * configure, config.in: Regenerate.
6287 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6288 Declare typedef.
6289
6290 2015-05-12 Don Breazeal <donb@codesourcery.com>
6291
6292 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6293 PTRACE_EVENT_VFORK_DONE.
6294 (linux_low_ptrace_options, extended_event_reported): Add vfork
6295 events.
6296 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6297 and "vforkdone" for RSP 'T' Stop Reply Packet.
6298 * server.h (report_vfork_events): Declare
6299 global variable.
6300
6301 2015-05-12 Don Breazeal <donb@codesourcery.com>
6302
6303 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6304 (the_low_target) <new_fork>: Initialize new member.
6305 * linux-arm-low.c (arm_new_fork): New function.
6306 (the_low_target) <new_fork>: Initialize new member.
6307 * linux-low.c (handle_extended_wait): Call new target function
6308 new_fork.
6309 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6310 * linux-mips-low.c (mips_add_watchpoint): New function
6311 extracted from mips_insert_point.
6312 (the_low_target) <new_fork>: Initialize new member.
6313 (mips_linux_new_fork): New function.
6314 (mips_insert_point): Call mips_add_watchpoint.
6315 * linux-x86-low.c (x86_linux_new_fork): New function.
6316 (the_low_target) <new_fork>: Initialize new member.
6317
6318 2015-05-12 Don Breazeal <donb@codesourcery.com>
6319
6320 * linux-low.c (handle_extended_wait): Implement return value,
6321 rename argument 'event_child' to 'event_lwp', handle
6322 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6323 (linux_low_ptrace_options): New function.
6324 (linux_low_filter_event): Call linux_low_ptrace_options,
6325 use different argument fo linux_enable_event_reporting,
6326 use return value from handle_extended_wait.
6327 (extended_event_reported): New function.
6328 (linux_wait_1): Call extended_event_reported and set
6329 status to report fork events.
6330 (linux_write_memory): Add pid to debug message.
6331 (reset_lwp_ptrace_options_callback): New function.
6332 (linux_handle_new_gdb_connection): New function.
6333 (linux_target_ops): Initialize new structure member.
6334 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6335 * lynx-low.c: Initialize new structure member.
6336 * remote-utils.c (prepare_resume_reply): Implement stop reason
6337 "fork" for "T" stop message.
6338 * server.c (handle_query): Call handle_new_gdb_connection.
6339 * server.h (report_fork_events): Declare global flag.
6340 * target.h (struct target_ops) <handle_new_gdb_connection>:
6341 New member.
6342 (target_handle_new_gdb_connection): New macro.
6343 * win32-low.c: Initialize new structure member.
6344
6345 2015-05-12 Don Breazeal <donb@codesourcery.com>
6346
6347 * mem-break.c (APPEND_TO_LIST): Define macro.
6348 (clone_agent_expr): New function.
6349 (clone_one_breakpoint): New function.
6350 (clone_all_breakpoints): New function.
6351 * mem-break.h: Declare new functions.
6352
6353 2015-05-12 Don Breazeal <donb@codesourcery.com>
6354
6355 * linux-low.c (linux_supports_fork_events): New function.
6356 (linux_supports_vfork_events): New function.
6357 (linux_target_ops): Initialize new structure members.
6358 (initialize_low): Call linux_check_ptrace_features.
6359 * lynx-low.c (lynx_target_ops): Initialize new structure
6360 members.
6361 * server.c (report_fork_events, report_vfork_events):
6362 New global flags.
6363 (handle_query): Add new features to qSupported packet and
6364 response.
6365 (captured_main): Initialize new global variables.
6366 * target.h (struct target_ops) <supports_fork_events>:
6367 New member.
6368 <supports_vfork_events>: New member.
6369 (target_supports_fork_events): New macro.
6370 (target_supports_vfork_events): New macro.
6371 * win32-low.c (win32_target_ops): Initialize new structure
6372 members.
6373
6374 2015-05-12 Gary Benson <gbenson@redhat.com>
6375
6376 * server.c (handle_qxfer_exec_file): Use current process
6377 if annex is empty.
6378
6379 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6380
6381 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6382 Remove HAVE_PTRACE_GETREGS conditionals.
6383 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6384 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6385
6386 2015-05-08 Yao Qi <yao.qi@linaro.org>
6387
6388 * linux-low.c (linux_supports_conditional_breakpoints): New
6389 function.
6390 (linux_target_ops): Install new target method.
6391 * lynx-low.c (lynx_target_ops): Install NULL hook for
6392 supports_conditional_breakpoints.
6393 * nto-low.c (nto_target_ops): Likewise.
6394 * spu-low.c (spu_target_ops): Likewise.
6395 * win32-low.c (win32_target_ops): Likewise.
6396 * server.c (handle_query): Check
6397 target_supports_conditional_breakpoints.
6398 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6399 New field.
6400 (target_supports_conditional_breakpoints): New macro.
6401
6402 2015-05-06 Pedro Alves <palves@redhat.com>
6403
6404 PR server/18081
6405 * server.c (start_inferior): If the process exits, mourn it.
6406
6407 2015-04-21 Gary Benson <gbenson@redhat.com>
6408
6409 * hostio.c (fileio_open_flags_to_host): Factored out to
6410 fileio_to_host_openflags in common/fileio.c. Single use
6411 updated.
6412
6413 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6414
6415 * linux-xtensa-low.c (xtensa_fill_gregset)
6416 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6417 XCHAL_HAVE_LOOP.
6418
6419 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6420
6421 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6422 (regs_info): Replace usrregs pointer with NULL.
6423
6424 2015-04-17 Gary Benson <gbenson@redhat.com>
6425
6426 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6427 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6428 * server.c (handle_qxfer_exec_file): New function.
6429 (qxfer_packets): Add exec-file entry.
6430 (handle_query): Report qXfer:exec-file:read as supported packet.
6431
6432 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6433
6434 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6435
6436 2015-04-09 Gary Benson <gbenson@redhat.com>
6437
6438 * hostio-errno.c (errno_to_fileio_error): Remove function.
6439 Update caller to use remote_fileio_to_fio_error.
6440
6441 2015-04-09 Yao Qi <yao.qi@linaro.org>
6442
6443 * linux-low.c (linux_insert_point): Call
6444 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6445 (linux_remove_point): Call remove_memory_breakpoint if type is
6446 raw_bkpt_type_sw.
6447 * linux-x86-low.c (x86_insert_point): Don't call
6448 insert_memory_breakpoint.
6449 (x86_remove_point): Don't call remove_memory_breakpoint.
6450
6451 2015-04-01 Pedro Alves <palves@redhat.com>
6452 Cleber Rosa <crosa@redhat.com>
6453
6454 * server.c (gdbserver_usage): Reorganize and extend the usage
6455 message.
6456
6457 2015-03-24 Pedro Alves <palves@redhat.com>
6458
6459 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6460 output. Also dump TRAP_TRACE.
6461 (linux_low_filter_event): In debug output, distinguish a
6462 resume_stop SIGSTOP from a delayed SIGSTOP.
6463
6464 2015-03-24 Gary Benson <gbenson@redhat.com>
6465
6466 * linux-x86-low.c (x86_linux_new_thread): Moved to
6467 nat/x86-linux.c.
6468 (x86_linux_prepare_to_resume): Likewise.
6469
6470 2015-03-24 Gary Benson <gbenson@redhat.com>
6471
6472 * Makefile.in (x86-linux-dregs.o): New rule.
6473 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6474 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6475 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6476 (x86_linux_dr_get): Likewise.
6477 (x86_linux_dr_set): Likewise.
6478 (update_debug_registers_callback): Likewise.
6479 (x86_linux_dr_set_addr): Likewise.
6480 (x86_linux_dr_get_addr): Likewise.
6481 (x86_linux_dr_set_control): Likewise.
6482 (x86_linux_dr_get_control): Likewise.
6483 (x86_linux_dr_get_status): Likewise.
6484 (x86_linux_update_debug_registers): Likewise.
6485
6486 2015-03-24 Gary Benson <gbenson@redhat.com>
6487
6488 * linux-x86-low.c (x86_linux_update_debug_registers):
6489 New function, factored out from...
6490 (x86_linux_prepare_to_resume): ...this.
6491
6492 2015-03-24 Gary Benson <gbenson@redhat.com>
6493
6494 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6495 (x86_linux_dr_set): Likewise.
6496 (update_debug_registers_callback): Likewise.
6497 (x86_linux_dr_set_addr): Likewise.
6498 (x86_linux_dr_get_addr): Likewise.
6499 (x86_linux_dr_set_control): Likewise.
6500 (x86_linux_dr_get_control): Likewise.
6501 (x86_linux_dr_get_status): Likewise.
6502 (x86_linux_prepare_to_resume): Likewise.
6503
6504 2015-03-24 Gary Benson <gbenson@redhat.com>
6505
6506 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6507 Use perror_with_name. Pass string through gettext.
6508 (x86_linux_dr_set): Likewise.
6509
6510 2015-03-24 Gary Benson <gbenson@redhat.com>
6511
6512 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6513 (x86_linux_dr_set_addr): ...this.
6514 (x86_dr_low_get_addr): Rename to...
6515 (x86_linux_dr_get_addr): ...this.
6516 (x86_dr_low_set_control): Rename to...
6517 (x86_linux_dr_set_control): ...this.
6518 (x86_dr_low_get_control): Rename to...
6519 (x86_linux_dr_get_control): ...this.
6520 (x86_dr_low_get_status): Rename to...
6521 (x86_linux_dr_get_status): ...this.
6522 (x86_dr_low): Update with new function names.
6523
6524 2015-03-24 Gary Benson <gbenson@redhat.com>
6525
6526 * Makefile.in (x86-linux.o): New rule.
6527 * configure.srv: Add x86-linux.o to relevant targets.
6528 * linux-low.c (lwp_set_arch_private_info): New function.
6529 (lwp_arch_private_info): Likewise.
6530 * linux-x86-low.c: Include nat/x86-linux.h.
6531 (arch_lwp_info): Removed structure.
6532 (update_debug_registers_callback):
6533 Use lwp_set_debug_registers_changed.
6534 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6535 and lwp_set_debug_registers_changed.
6536 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6537
6538 2015-03-24 Gary Benson <gbenson@redhat.com>
6539
6540 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6541 * linux-arm-low.c (arm_new_thread): Likewise.
6542 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6543 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6544 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6545 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6546
6547 2015-03-24 Gary Benson <gbenson@redhat.com>
6548
6549 * linux-low.c (ptid_of_lwp): New function.
6550 (lwp_is_stopped): Likewise.
6551 (lwp_stop_reason): Likewise.
6552 * linux-x86-low.c (update_debug_registers_callback):
6553 Use lwp_is_stopped.
6554 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6555 lwp_stop_reason.
6556
6557 2015-03-24 Gary Benson <gbenson@redhat.com>
6558
6559 * linux-low.h (linux_stop_lwp): Remove declaration.
6560
6561 2015-03-24 Gary Benson <gbenson@redhat.com>
6562
6563 * linux-low.h: Include nat/linux-nat.h.
6564 * linux-low.c (iterate_over_lwps_args): New structure.
6565 (iterate_over_lwps_filter): New function.
6566 (iterate_over_lwps): Likewise.
6567 * linux-x86-low.c (update_debug_registers_callback):
6568 Update signature to what iterate_over_lwps expects.
6569 Remove PID check that iterate_over_lwps now performs.
6570 (x86_dr_low_set_addr): Use iterate_over_lwps.
6571 (x86_dr_low_set_control): Likewise.
6572
6573 2015-03-24 Gary Benson <gbenson@redhat.com>
6574
6575 * linux-x86-low.c (x86_debug_reg_state): New function.
6576 (x86_linux_prepare_to_resume): Use the above.
6577
6578 2015-03-24 Gary Benson <gbenson@redhat.com>
6579
6580 * linux-low.c (current_lwp_ptid): New function.
6581 * linux-x86-low.c: Include nat/linux-nat.h.
6582 (x86_dr_low_get_addr): Use current_lwp_ptid.
6583 (x86_dr_low_get_control): Likewise.
6584 (x86_dr_low_get_status): Likewise.
6585
6586 2015-03-20 Pedro Alves <palves@redhat.com>
6587
6588 * tracepoint.c (cmd_qtstatus): Make "str" const.
6589
6590 2015-03-20 Pedro Alves <palves@redhat.com>
6591
6592 * server.c (handle_general_set): Make "req_str" const.
6593
6594 2015-03-19 Pedro Alves <palves@redhat.com>
6595
6596 * linux-low.c (linux_resume_one_lwp): Rename to ...
6597 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6598 instead call perror_with_name.
6599 (check_ptrace_stopped_lwp_gone): New function.
6600 (linux_resume_one_lwp): Reimplement as wrapper around
6601 linux_resume_one_lwp_throw that swallows errors if the LWP is
6602 gone.
6603
6604 2015-03-19 Pedro Alves <palves@redhat.com>
6605
6606 * linux-low.c (count_events_callback, select_event_lwp_callback):
6607 No longer check whether the thread has resume_stop as last resume
6608 kind.
6609
6610 2015-03-19 Pedro Alves <palves@redhat.com>
6611
6612 * linux-low.c (count_events_callback, select_event_lwp_callback):
6613 Use the lwp's status_pending_p field, not the thread's.
6614
6615 2015-03-19 Pedro Alves <palves@redhat.com>
6616
6617 * linux-low.c (select_event_lwp_callback): Update comments to
6618 no longer mention SIGTRAP.
6619
6620 2015-03-18 Gary Benson <gbenson@redhat.com>
6621
6622 * server.c (handle_query): Do not report vFile:fstat as supported.
6623
6624 2015-03-11 Gary Benson <gbenson@redhat.com>
6625
6626 * hostio.c (sys/types.h): New include.
6627 (sys/stat.h): Likewise.
6628 (common-remote-fileio.h): Likewise.
6629 (handle_fstat): New function.
6630 (handle_vFile): Handle vFile:fstat packets.
6631
6632 2015-03-11 Gary Benson <gbenson@redhat.com>
6633
6634 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6635 struct stat.st_blocks and struct stat.st_blksize.
6636 * configure: Regenerate.
6637 * config.in: Likewise.
6638 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6639 (OBS): Add common-remote-fileio.o.
6640 (common-remote-fileio.o): New rule.
6641
6642 2015-03-09 Pedro Alves <palves@redhat.com>
6643
6644 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6645 'struct sockaddr' pointer in 'accept' call.
6646
6647 2015-03-09 Pedro Alves <palves@redhat.com>
6648
6649 Revert:
6650 2015-03-07 Pedro Alves <palves@redhat.com>
6651 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6652 or <winsock2.h> here. Instead include "gdb_socket.h".
6653 (remote_open): Use union gdb_sockaddr_u.
6654 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6655 or <winsock2.h> here. Instead include "gdb_socket.h".
6656 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6657 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6658 or <sys/un.h>.
6659 (init_named_socket, gdb_agent_helper_thread): Use union
6660 gdb_sockaddr_u.
6661
6662 2015-03-07 Pedro Alves <palves@redhat.com>
6663
6664 * configure.ac (build_warnings): Move
6665 -Wdeclaration-after-statement to the C-specific set.
6666 * configure: Regenerate.
6667
6668 2015-03-07 Pedro Alves <palves@redhat.com>
6669
6670 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6671 or <winsock2.h> here. Instead include "gdb_socket.h".
6672 (remote_open): Use union gdb_sockaddr_u.
6673 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6674 or <winsock2.h> here. Instead include "gdb_socket.h".
6675 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6676 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6677 or <sys/un.h>.
6678 (init_named_socket, gdb_agent_helper_thread): Use union
6679 gdb_sockaddr_u.
6680
6681 2015-03-07 Pedro Alves <palves@redhat.com>
6682
6683 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6684 instead.
6685
6686 2015-03-06 Yao Qi <yao.qi@linaro.org>
6687
6688 * linux-aarch64-low.c (aarch64_insert_point): Use
6689 show_debug_regs as a boolean.
6690 (aarch64_remove_point): Likewise.
6691
6692 2015-03-05 Pedro Alves <palves@redhat.com>
6693
6694 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6695 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6696 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6697 * nto-low.c (nto_target_ops): Likewise.
6698 * spu-low.c (spu_target_ops): Likewise.
6699 * win32-low.c (win32_target_ops): Likewise.
6700
6701 2015-03-04 Pedro Alves <palves@redhat.com>
6702
6703 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6704 Decide whether a breakpoint triggered based on the SIGTRAP's
6705 siginfo.si_code.
6706 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6707 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6708 (linux_low_filter_event): Check for breakpoints before checking
6709 watchpoints.
6710 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6711 siginfo.si_code.
6712 (linux_stopped_by_sw_breakpoint)
6713 (linux_supports_stopped_by_sw_breakpoint)
6714 (linux_stopped_by_hw_breakpoint)
6715 (linux_supports_stopped_by_hw_breakpoint): New functions.
6716 (linux_target_ops): Install new target methods.
6717
6718 2015-03-04 Pedro Alves <palves@redhat.com>
6719
6720 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6721 * server.c (swbreak_feature, hwbreak_feature): New globals.
6722 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6723 (captured_main): Clear swbreak_feature and hwbreak_feature.
6724 * server.h (swbreak_feature, hwbreak_feature): Declare.
6725 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6726 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6727 supports_stopped_by_hw_breakpoint>: New fields.
6728 (target_supports_stopped_by_sw_breakpoint)
6729 (target_stopped_by_sw_breakpoint)
6730 (target_supports_stopped_by_hw_breakpoint)
6731 (target_stopped_by_hw_breakpoint): Declare.
6732
6733 2015-03-04 Pedro Alves <palves@redhat.com>
6734
6735 enum lwp_stop_reason -> enum target_stop_reason
6736 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6737 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6738 (linux_wait_1, stuck_in_jump_pad_callback)
6739 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6740 (linux_stopped_by_watchpoint):
6741 * linux-low.h (enum lwp_stop_reason): Delete.
6742 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6743 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6744
6745 2015-03-04 Yao Qi <yao.qi@linaro.org>
6746
6747 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6748
6749 2015-03-03 Gary Benson <gbenson@redhat.com>
6750
6751 * hostio.c (handle_vFile): Fix prefix lengths.
6752
6753 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6754
6755 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6756 ptr_bits.
6757
6758 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6759
6760 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6761 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6762 (clean): Add "rm -f" for above C files.
6763 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6764 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6765 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6766 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6767 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6768 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6769 (init_registers_s390x_vx_linux64)
6770 (init_registers_s390x_tevx_linux64)
6771 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6772 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6773 declarations.
6774 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6775 (s390_store_vxrs_high): New functions.
6776 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6777 NT_S390_VXRS_HIGH.
6778 (s390_arch_setup): Add logic for selecting one of the new target
6779 descriptions. Activate the new vector regsets if applicable.
6780 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6781 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6782 and init_registers_s390x_tevx_linux64.
6783
6784 2015-03-01 Pedro Alves <palves@redhat.com>
6785
6786 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6787 parameter.
6788
6789 2015-02-27 Pedro Alves <palves@redhat.com>
6790
6791 * linux-x86-low.c (u_debugreg_offset): New function.
6792 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6793
6794 2015-02-27 Pedro Alves <palves@redhat.com>
6795
6796 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6797 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6798 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6799 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6800 (ps_lsetfpregs, ps_getpid)
6801 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6802 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6803 (ps_lsetxregs, ps_plog): Declare.
6804
6805 2015-02-27 Pedro Alves <palves@redhat.com>
6806
6807 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6808 IP_AGENT_EXPORT_FUNC.
6809 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6810 IP_AGENT_EXPORT_FUNC.
6811 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6812 (IP_AGENT_EXPORT): Delete.
6813 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6814 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6815 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6816 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6817 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6818 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6819 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6820 (traceframe_read_count, traceframe_write_count)
6821 (traceframes_created, trace_state_variables, get_raw_reg)
6822 (get_trace_state_variable_value, set_trace_state_variable_value)
6823 (ust_loaded, helper_thread_id, cmd_buf): Use
6824 IPA_SYM_EXPORTED_NAME.
6825 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6826 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6827 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6828 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6829 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6830 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6831 EXTERN_C_PUSH/EXTERN_C_POP.
6832 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6833 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6834 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6835 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6836 (traceframe_write_count, traceframe_read_count)
6837 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6838 (about_to_request_buffer_space, get_trace_state_variable_value)
6839 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6840 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6841 EXTERN_C_PUSH/EXTERN_C_POP.
6842 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6843 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6844 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6845 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6846 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6847 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6848 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6849 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6850 Define.
6851 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6852 (IP_AGENT_EXPORT_VAR_DECL): Define.
6853 (tracing): Declare.
6854 (gdb_agent_get_raw_reg): Declare.
6855
6856 2015-02-27 Tom Tromey <tromey@redhat.com>
6857 Pedro Alves <palves@redhat.com>
6858
6859 Rename symbols whose names are reserved C++ keywords throughout.
6860
6861 2015-02-27 Pedro Alves <palves@redhat.com>
6862
6863 * Makefile.in (COMPILER): New, get it from autoconf.
6864 (CXX): Get from autoconf instead.
6865 (COMPILE.pre): Use COMPILER.
6866 (CC-LD): Rename to ...
6867 (CC_LD): ... this. Use COMPILER.
6868 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6869 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6870 * acinclude.m4: Include build-with-cxx.m4.
6871 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6872 Disable -Werror by default if building in C++ mode.
6873 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6874 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6875 the C++ compiler. Save/restore CXXFLAGS too.
6876 * configure: Regenerate.
6877
6878 2015-02-27 Pedro Alves <palves@redhat.com>
6879
6880 * acinclude.m4: Include libiberty.m4.
6881 * configure.ac: Call libiberty_INIT.
6882 * config.in, configure: Regenerate.
6883
6884 2015-02-26 Pedro Alves <palves@redhat.com>
6885
6886 * linux-low.c (linux_wait_1): When incrementing the PC past a
6887 program breakpoint always use the_low_target.breakpoint_len as
6888 increment, rather than the maximum between that and
6889 the_low_target.decr_pc_after_break.
6890
6891 2015-02-23 Pedro Alves <palves@redhat.com>
6892
6893 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6894 thread was doing a step-over; always adjust the PC if
6895 we stepped over a permanent breakpoint.
6896 (linux_wait_1): If we stepped over breakpoint that was on top of a
6897 permanent breakpoint, manually advance the PC past it.
6898
6899 2015-02-23 Pedro Alves <palves@redhat.com>
6900
6901 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6902 modes.
6903 (x86_fill_gregset, x86_store_gregset): Use it when handling
6904 $orig_eax.
6905
6906 2015-02-20 Pedro Alves <palves@redhat.com>
6907
6908 * thread-db.c: Include "nat/linux-procfs.h".
6909 (thread_db_init): Skip listing new threads if the kernel supports
6910 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6911
6912 2015-02-20 Pedro Alves <palves@redhat.com>
6913
6914 * linux-low.c (status_pending_p_callback): Use ptid_match.
6915
6916 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6917
6918 PR breakpoints/16812
6919 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6920 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6921 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6922
6923 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6924
6925 PR breakpoints/15956
6926 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6927
6928 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6929
6930 * linux-low.c (linux_low_btrace_conf): Print size.
6931 * server.c (handle_btrace_conf_general_set): New.
6932 (hanle_general_set): Call handle_btrace_conf_general_set.
6933 (handle_query): Report Qbtrace-conf:bts:size as supported.
6934
6935 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6936
6937 * linux-low.c (linux_low_enable_btrace): Update parameters.
6938 (linux_low_btrace_conf): New.
6939 (linux_target_ops)<to_btrace_conf>: Initialize.
6940 * server.c (current_btrace_conf): New.
6941 (handle_btrace_enable): Rename to ...
6942 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6943 to target_enable_btrace. Update comment. Update users.
6944 (handle_qxfer_btrace_conf): New.
6945 (qxfer_packets): Add btrace-conf entry.
6946 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6947 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6948 (target_ops)<read_btrace_conf>: New.
6949 (target_enable_btrace): Update parameters.
6950 (target_read_btrace_conf): New.
6951
6952 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6953
6954 * server.c (handle_btrace_general_set): Remove call to
6955 target_supports_btrace.
6956 (supported_btrace_packets): New.
6957 (handle_query): Call supported_btrace_packets.
6958 * target.h: include btrace-common.h.
6959 (btrace_target_info): Removed.
6960 (supports_btrace, target_supports_btrace): Update parameters.
6961
6962 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6963
6964 * Makefile.in (SFILES): Add common/btrace-common.c.
6965 (OBS): Add common/btrace-common.o.
6966 (btrace-common.o): Add build rules.
6967 * linux-low: Include btrace-common.h.
6968 (linux_low_read_btrace): Use struct btrace_data. Call
6969 btrace_data_init and btrace_data_fini.
6970
6971 2015-02-06 Pedro Alves <palves@redhat.com>
6972
6973 * thread-db.c (find_new_threads_callback): Add debug output.
6974
6975 2015-02-04 Pedro Alves <palves@redhat.com>
6976
6977 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6978 (resume_stopped_resumed_lwps): New function.
6979 (linux_wait_for_event_filtered): Use it.
6980
6981 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6982
6983 * Makefile.in (SFILES): Add linux-personality.c.
6984 (linux-personality.o): New rule.
6985 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6986 list of objects to be built.
6987 * linux-low.c: Include nat/linux-personality.h.
6988 (linux_create_inferior): Remove code to disable address space
6989 randomization (moved to ../nat/linux-personality.c). Create
6990 cleanup to disable address space randomization.
6991
6992 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6993
6994 * Makefile.in (posix-strerror.o): New rule.
6995 (mingw-strerror.o): Likewise.
6996 * configure: Regenerated.
6997 * configure.ac: Source file ../common/common.host. Initialize new
6998 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6999
7000 2015-01-14 Yao Qi <yao@codesourcery.com>
7001
7002 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7003 (ppc-linux.o): New rule.
7004 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7005 * configure.ac: AC_CHECK_FUNCS(getauxval).
7006 * config.in: Re-generated.
7007 * configure: Re-generated.
7008 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7009 ppc64_64bit_inferior_p
7010
7011 2015-01-14 Yao Qi <yao@codesourcery.com>
7012
7013 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7014 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7015 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7016 (PT_ORIG_R3, PT_TRAP): Likewise.
7017 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7018 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7019 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7020
7021 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7022
7023 * i387-fp.c (i387_cache_to_xsave): In look over
7024 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7025 zmmh_low_space field by use of zmmh_high_space.
7026
7027 2015-01-09 Pedro Alves <palves@redhat.com>
7028
7029 * linux-low.c (step_over_bkpt): Move higher up in the file.
7030 (handle_extended_wait): Don't store the stop_pc here.
7031 (get_stop_pc): Adjust comments and rename to ...
7032 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7033 stopped for a software breakpoint or hardware breakpoint.
7034 (thread_still_has_status_pending_p): New function.
7035 (status_pending_p_callback): Use
7036 thread_still_has_status_pending_p. If the event is no longer
7037 interesting, resume the LWP.
7038 (handle_tracepoints): Add assert.
7039 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7040 (wstatus_maybe_breakpoint): New function.
7041 (cancel_breakpoint): Delete function.
7042 (check_stopped_by_watchpoint): New function, factored out from
7043 linux_low_filter_event.
7044 (lp_status_maybe_breakpoint): Delete function.
7045 (linux_low_filter_event): Remove filter_ptid argument.
7046 Leave thread group exits pending here. Store the LWP's stop PC.
7047 Always leave events pending.
7048 (linux_wait_for_event_filtered): Pull all events out of the
7049 kernel, and leave them all pending.
7050 (count_events_callback, select_event_lwp_callback): Consider all
7051 events.
7052 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7053 (select_event_lwp): Only give preference to the stepping LWP in
7054 all-stop mode. Adjust comments.
7055 (ignore_event): New function.
7056 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7057 references to cancel_breakpoints. Adjust to renames. Also give
7058 equal priority to all LWPs that have had events in non-stop mode.
7059 If reporting a software breakpoint event, unadjust the LWP's PC.
7060 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7061 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7062 Adjust.
7063 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7064 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7065 (linux_stopped_by_watchpoint): Adjust.
7066 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7067 * linux-low.h (enum lwp_stop_reason): New.
7068 (struct lwp_info) <stop_pc>: Adjust comment.
7069 <stopped_by_watchpoint>: Delete field.
7070 <stop_reason>: New field.
7071 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7072 * mem-break.c (software_breakpoint_inserted_here)
7073 (hardware_breakpoint_inserted_here): New function.
7074 * mem-break.h (software_breakpoint_inserted_here)
7075 (hardware_breakpoint_inserted_here): Declare.
7076 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7077 (cancel_breakpoints): Delete.
7078 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7079 (upload_fast_traceframes): Remove references to
7080 cancel_breakpoints.
7081
7082 2015-01-09 Pedro Alves <palves@redhat.com>
7083
7084 * thread-db.c (find_new_threads_callback): Ignore thread if the
7085 kernel thread ID is -1.
7086
7087 2015-01-09 Pedro Alves <palves@redhat.com>
7088
7089 * linux-low.c (linux_attach_fail_reason_string): Move to
7090 nat/linux-ptrace.c, and rename.
7091 (linux_attach_lwp): Update comment.
7092 (attach_proc_task_lwp_callback): New function.
7093 (linux_attach): Adjust to rename and use
7094 linux_proc_attach_tgid_threads.
7095 (linux_attach_fail_reason_string): Delete declaration.
7096
7097 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7098
7099 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7100 * server.c (gdbserver_version): Likewise.
7101
7102 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7103
7104 * remote-utils.c: Include ctype.h.
7105 (input_interrupt): Explicitly handle the case when the char
7106 received is the NUL byte. Improve the printing of non-ASCII
7107 characters.
7108
7109 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7110
7111 * linux-low.c (linux_low_filter_event): Update call to
7112 linux_enable_event_reporting following the addition of
7113 a new parameter to that function.
7114
7115 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7116
7117 PR server/17457
7118 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7119 (AARCH64_FPCR_REGNO): Likewise.
7120 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7121 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7122 (aarch64_store_fpregset): Likewise.
7123
7124 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7125
7126 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7127 Remove FIXME comment about assumption about N.
7128
7129 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7130
7131 * configure.ac: If large-file support is disabled in GDBserver,
7132 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7133 * configure: Regenerate.
7134
7135 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7136
7137 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7138 warning upon ENODATA from ptrace.
7139 * linux-s390-low.c (s390_store_tdb): New.
7140 (s390_regsets): Add regset for NT_S390_TDB.
7141
7142 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7143
7144 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7145 without a fill_function.
7146 * linux-s390-low.c (s390_fill_last_break): Remove.
7147 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7148 (s390_arch_setup): Use regset's size instead of fill_function for
7149 loop end condition.
7150
7151 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7152
7153 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7154 the regset's store function when ptrace returned an error.
7155 * regcache.c (get_thread_regcache): Invalidate register cache
7156 before fetching inferior's registers.
7157
7158 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7159
7160 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7161 while-loop as for-loop.
7162 (regsets_store_inferior_registers): Likewise.
7163
7164 2014-11-28 Yao Qi <yao@codesourcery.com>
7165
7166 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7167 * config.in, configure: Re-generate.
7168 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7169 is defined.
7170
7171 2014-11-21 Yao Qi <yao@codesourcery.com>
7172
7173 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7174 (AC_CHECK_HEADERS): Remove malloc.h.
7175 * configure: Re-generated.
7176 * config.in: Re-generated.
7177 * server.h: Don't include alloca.h and malloc.h.
7178 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7179 Don't include malloc.h.
7180
7181 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7182
7183 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7184 corresponding ERRNO check in same block.
7185
7186 2014-11-12 Pedro Alves <palves@redhat.com>
7187
7188 * server.c (cont_thread): Update comment.
7189 (start_inferior, attach_inferior): No longer clear cont_thread.
7190 (handle_v_cont): No longer set cont_thread.
7191 (captured_main): Clear cont_thread each time a GDB connects.
7192
7193 2014-11-12 Pedro Alves <palves@redhat.com>
7194
7195 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7196 thread, and don't resume all threads if the Hc thread has exited.
7197
7198 2014-11-12 Pedro Alves <palves@redhat.com>
7199
7200 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7201 the process group instead of to a specific LWP.
7202
7203 2014-10-15 Pedro Alves <palves@redhat.com>
7204
7205 PR server/17487
7206 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7207 parameter.
7208 (arm_set_thread_context): Delete.
7209 (the_low_target): Adjust.
7210 * win32-i386-low.c (debug_registers_changed)
7211 (debug_registers_used): Delete.
7212 (update_debug_registers_callback): New function.
7213 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7214 needing to update their debug registers.
7215 (win32_get_current_dr): New function.
7216 (x86_dr_low_get_addr, x86_dr_low_get_control)
7217 (x86_dr_low_get_status): Fetch the debug register from the thread
7218 record's context.
7219 (i386_initial_stuff): Adjust.
7220 (i386_get_thread_context): Remove current_event parameter. Don't
7221 clear debug_registers_changed nor copy DR values to
7222 debug_reg_state.
7223 (i386_set_thread_context): Delete.
7224 (i386_prepare_to_resume): New function.
7225 (i386_thread_added): Mark the thread as needing to update irs
7226 debug registers.
7227 (the_low_target): Remove i386_set_thread_context and install
7228 i386_prepare_to_resume.
7229 * win32-low.c (win32_get_thread_context): Adjust.
7230 (win32_set_thread_context): Use SetThreadContext
7231 directly.
7232 (win32_prepare_to_resume): New function.
7233 (win32_require_context): New function, factored out from ...
7234 (thread_rec): ... this.
7235 (continue_one_thread): Call win32_prepare_to_resume on each thread
7236 we're about to continue.
7237 (win32_resume): Call win32_prepare_to_resume on the event thread.
7238 * win32-low.h (struct win32_thread_info)
7239 <debug_registers_changed>: New field.
7240 (struct win32_target_ops): Change prototype of set_thread_context,
7241 delete set_thread_context and add prepare_to_resume.
7242 (win32_require_context): New declaration.
7243
7244 2014-10-08 Gary Benson <gbenson@redhat.com>
7245
7246 * server.h: Do not include common-exceptions.h.
7247
7248 2014-10-08 Gary Benson <gbenson@redhat.com>
7249
7250 * server.h: Do not include cleanups.h.
7251
7252 2014-09-30 James Hogan <james.hogan@imgtec.com>
7253
7254 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7255 mips64-dsp-linux.c.
7256
7257 2014-09-23 Yao Qi <yao@codesourcery.com>
7258
7259 * linux-low.c (lp_status_maybe_breakpoint): New function.
7260 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7261 (count_events_callback): Likewise.
7262 (select_event_lwp_callback): Likewise.
7263 (cancel_breakpoints_callback): Likewise.
7264
7265 2014-09-19 Don Breazeal <donb@codesourcery.com>
7266
7267 * linux-low.c (handle_extended_wait): Call
7268 linux_ptrace_get_extended_event.
7269 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7270 linux_is_extended_waitstatus.
7271
7272 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7273
7274 * Makefile.in (CPPFLAGS): Define.
7275 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7276 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7277
7278 2014-09-16 Gary Benson <gbenson@redhat.com>
7279
7280 * inferiors.h (current_inferior): Renamed as...
7281 (current_thread): New variable. All uses updated.
7282 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7283 (maybe_move_out_of_jump_pad): Likewise.
7284 (cancel_breakpoint): Likewise.
7285 (linux_low_filter_event): Likewise.
7286 (wait_for_sigstop): Likewise.
7287 (linux_resume_one_lwp): Likewise.
7288 (need_step_over_p): Likewise.
7289 (start_step_over): Likewise.
7290 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7291 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7292 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7293 and save_inferior as saved_thread.
7294 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7295 saved_thread.
7296 (regcache_invalidate_thread): Likewise.
7297 * remote-utils.c (prepare_resume_reply): Likewise.
7298 * thread-db.c (thread_db_get_tls_address): Likewise.
7299 (disable_thread_event_reporting): Likewise.
7300 (remove_thread_event_breakpoints): Likewise.
7301 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7302 as saved_thread.
7303 * target.h (set_desired_inferior): Renamed as...
7304 (set_desired_thread): New declaration. All uses updated.
7305 * server.c (myresume): Updated comment to reference thread instead
7306 of inferior.
7307 (handle_serial_event): Likewise.
7308 (handle_target_event): Likewise.
7309
7310 2014-09-12 Tom Tromey <tromey@redhat.com>
7311 Gary Benson <gbenson@redhat.com>
7312
7313 * regcache.h: Include common-regcache.h.
7314 (regcache_read_pc): Don't declare.
7315 * regcache.c (get_thread_regcache_for_ptid): New function.
7316
7317 2014-09-11 Tom Tromey <tromey@redhat.com>
7318 Gary Benson <gbenson@redhat.com>
7319
7320 * symbol.c: New file.
7321 * Makefile.in (SFILES): Add symbol.c.
7322 (OBS): Add symbol.o.
7323
7324 2014-09-11 Gary Benson <gbenson@redhat.com>
7325
7326 * target.c (target_stop_ptid, target_continue_ptid): New
7327 functions.
7328
7329 2014-09-11 Tom Tromey <tromey@redhat.com>
7330 Gary Benson <gbenson@redhat.com>
7331
7332 * target.h: Include target/target.h.
7333 * target.c (target_read_memory, target_read_uint32)
7334 (target_write_memory): New functions.
7335
7336 2014-09-11 Gary Benson <gbenson@redhat.com>
7337
7338 * server.h (debug_hw_points): Don't declare.
7339 * server.c (debug_hw_points): Don't define. Replace all uses
7340 with show_debug_regs.
7341 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7342 all uses with show_debug_regs.
7343
7344 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7345
7346 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7347 endianness into account.
7348 (ppc_supply_ptrace_register): Likewise.
7349
7350 2014-09-03 James Hogan <james.hogan@imgtec.com>
7351
7352 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7353 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7354
7355 2014-09-03 Gary Benson <gbenson@redhat.com>
7356
7357 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7358 ALL_DEBUG_ADDRESS_REGISTERS.
7359
7360 2014-09-02 Gary Benson <gbenson@redhat.com>
7361
7362 * i386-low.h: Renamed as...
7363 * x86-low.h: New file. All type, function and variable name
7364 prefixes changed from "i386_" to "x86_". All references updated.
7365 * i386-low.c: Renamed as...
7366 * x86-low.c: New file. All type, function and variable name
7367 prefixes changed from "i386_" to "x86_". All references updated.
7368
7369 2014-09-02 Gary Benson <gbenson@redhat.com>
7370
7371 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7372 (x86_linux_new_thread): Likewise.
7373
7374 2014-08-29 Gary Benson <gbenson@redhat.com>
7375
7376 * server.h (setjmp.h): Do not include.
7377 (toplevel): Do not declare.
7378 (common-exceptions.h): Include.
7379 (cleanups.h): Likewise.
7380 * server.c (toplevel): Do not define.
7381 (exit_code): New static global.
7382 (detach_or_kill_for_exit_cleanup): New function.
7383 (main): New function. Original main renamed to...
7384 (captured_main): New function.
7385 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7386
7387 2014-08-29 Gary Benson <gbenson@redhat.com>
7388
7389 * Makefile.in (SFILES): Add common/common-exceptions.c.
7390 (OBS): Add common-exceptions.o.
7391 (common-exceptions.o): New rule.
7392 * utils.c (prepare_to_throw_exception): New function.
7393
7394 2014-08-29 Gary Benson <gbenson@redhat.com>
7395
7396 * config.in: Regenerate.
7397 * configure: Likewise.
7398
7399 2014-08-29 Gary Benson <gbenson@redhat.com>
7400
7401 * Makefile.in (SFILES): Add common/cleanups.c.
7402 (OBS): cleanups.o.
7403 (cleanups.o): New rule.
7404
7405 2014-08-29 Gary Benson <gbenson@redhat.com>
7406
7407 * utils.c (internal_vwarning): New function.
7408
7409 2014-08-28 Gary Benson <gbenson@redhat.com>
7410
7411 * utils.h (fatal): Remove declaration.
7412 * utils.c (fatal): Remove function.
7413
7414 2014-08-28 Gary Benson <gbenson@redhat.com>
7415
7416 * tracepoint.c (gdb_agent_init): Replace fatal with
7417 perror_with_name.
7418 (initialize_tracepoint): Likewise.
7419
7420 2014-08-28 Gary Benson <gbenson@redhat.com>
7421
7422 * remote-utils.c (remote_prepare): Replace fatal with error.
7423
7424 2014-08-28 Gary Benson <gbenson@redhat.com>
7425
7426 * linux-low.c (linux_async): Replace fatal with warning.
7427 Tidy up and return.
7428 (linux_start_non_stop): Return -1 if linux_async failed.
7429
7430 2014-08-28 Gary Benson <gbenson@redhat.com>
7431
7432 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7433 gdb_assert.
7434 (i386_dr_low_get_addr): Remove vague comment.
7435 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7436 gdb_assert.
7437
7438 2014-08-28 Gary Benson <gbenson@redhat.com>
7439
7440 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7441 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7442 internal_error.
7443 (linux_resume_one_lwp): Likewise.
7444 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7445 gdb_assert.
7446 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7447 with internal_error.
7448 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7449 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7450 (find_register_by_name): Replace fatal with internal_error.
7451 (find_regno): Likewise.
7452 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7453 * thread-db.c (thread_db_create_event): Likewise.
7454 (thread_db_load_search): Likewise.
7455 (try_thread_db_load_1): Likewise.
7456 * tracepoint.c (get_jump_space_head): Replace fatal with
7457 internal_error.
7458 (claim_trampoline_space): Likewise.
7459 (have_fast_tracepoint_trampoline_buffer): Likewise.
7460 (cmd_qtstart): Likewise.
7461 (stop_tracing): Likewise.
7462 (fast_tracepoint_collecting): Likewise.
7463 (target_malloc): Likewise.
7464 (download_tracepoint): Likewise.
7465 (download_trace_state_variables): Replace check with gdb_assert.
7466 (upload_fast_traceframes): Replace fatal with internal_error.
7467
7468 2014-08-19 Tom Tromey <tromey@redhat.com>
7469 Gary Benson <gbenson@redhat.com>
7470
7471 * Makefile.in (SFILES): Add common/common-debug.c.
7472 (OBS): Add common-debug.o.
7473 (common-debug.o): New rule.
7474 * debug.h (debug_printf): Don't declare.
7475 * debug.c (debug_printf): Renamed and rewritten as...
7476 (debug_vprintf): New function.
7477
7478 2014-08-19 Gary Benson <gbenson@redhat.com>
7479
7480 * utils.h: Do not include print-utils.h.
7481
7482 2014-08-19 Tom Tromey <tromey@redhat.com>
7483 Gary Benson <gbenson@redhat.com>
7484
7485 * server.h: Add static assertion.
7486 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7487
7488 2014-08-19 Tom Tromey <tromey@redhat.com>
7489 Gary Benson <gbenson@redhat.com>
7490
7491 * Makefile.in (SFILES): Add common/errors.c.
7492 (OBS): Add errors.o.
7493 (IPA_OBS): Add errors-ipa.o.
7494 (errors.o): New rule.
7495 (errors-ipa.o): Likewise.
7496 * utils.h (perror_with_name, error, warning): Don't declare.
7497 * utils.c (warning): Renamed and rewritten as...
7498 (vwarning): New function.
7499 (error): Renamed and rewritten as...
7500 (verror): New function.
7501 (internal_error): Renamed and rewritten as...
7502 (internal_verror): New function.
7503
7504 2014-08-07 Gary Benson <gbenson@redhat.com>
7505
7506 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7507 * configure: Regenerate.
7508 * config.in: Likewise.
7509 * server.h: Do not include errno.h.
7510 * event-loop.c: Likewise.
7511 * hostio-errno.c: Likewise.
7512 * linux-low.c: Likewise.
7513 * remote-utils.c: Likewise.
7514 * spu-low.c: Likewise.
7515 * utils.c: Likewise.
7516 * gdbreplay.c: Unconditionally include errno.h.
7517
7518 2014-08-07 Gary Benson <gbenson@redhat.com>
7519
7520 * server.h: Do not include string.h.
7521 * event-loop.c: Likewise.
7522 * linux-low.c: Likewise.
7523 * regcache.c: Likewise.
7524 * remote-utils.c: Likewise.
7525 * spu-low.c: Likewise.
7526 * utils.c: Likewise.
7527
7528 2014-08-07 Gary Benson <gbenson@redhat.com>
7529
7530 * server.h: Do not include gdb_assert.h.
7531
7532 2014-08-07 Gary Benson <gbenson@redhat.com>
7533
7534 * server.h: Do not include common-utils.h.
7535
7536 2014-08-07 Gary Benson <gbenson@redhat.com>
7537
7538 * server.h: Do not include ptid.h.
7539 * notif.h: Likewise.
7540
7541 2014-08-07 Gary Benson <gbenson@redhat.com>
7542
7543 * server.h: Do not include gdb_locale.h.
7544
7545 2014-08-07 Gary Benson <gbenson@redhat.com>
7546
7547 * server.h: Do not include gdb/signals.h.
7548 * win32-low.c: Likewise.
7549
7550 2014-08-07 Gary Benson <gbenson@redhat.com>
7551
7552 * server.h: Do not include pathmax.h.
7553
7554 2014-08-07 Gary Benson <gbenson@redhat.com>
7555
7556 * server.h: Do not include libiberty.h.
7557 * linux-bfin-low.c: Likewise.
7558
7559 2014-08-07 Gary Benson <gbenson@redhat.com>
7560
7561 * server.h: Do not include ansidecl.h.
7562
7563 2014-08-07 Gary Benson <gbenson@redhat.com>
7564
7565 * linux-x86-low.c: Do not include stddef.h.
7566 * lynx-ppc-low.c: Likewise.
7567 * tracepoint.c: Likewise.
7568
7569 2014-08-07 Gary Benson <gbenson@redhat.com>
7570
7571 * server.h: Do not include stdarg.h.
7572 * nto-low.c: Likewise.
7573
7574 2014-08-07 Gary Benson <gbenson@redhat.com>
7575
7576 * server.h: Do not include stdlib.h.
7577 * inferiors.c: Likewise.
7578 * linux-low.c: Likewise.
7579 * regcache.c: Likewise.
7580 * spu-low.c: Likewise.
7581 * tracepoint.c: Likewise.
7582 * utils.c: Likewise.
7583
7584 2014-08-07 Gary Benson <gbenson@redhat.com>
7585
7586 * server.h: Do not include stdio.h.
7587 * linux-low.c: Likewise.
7588 * remote-utils.c: Likewise.
7589 * spu-low.c: Likewise.
7590 * utils.c: Likewise.
7591 * wincecompat.c: Likewise.
7592
7593 2014-08-06 Gary Benson <gbenson@redhat.com>
7594
7595 * regcache.c (init_register_cache): Move conditionals inside if.
7596
7597 2014-08-06 Gary Benson <gbenson@redhat.com>
7598
7599 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7600
7601 2014-07-31 Gary Benson <gbenson@redhat.com>
7602
7603 * ax.h: Do not include server.h.
7604 * gdbthread.h: Likewise.
7605 * lynx-low.h: Likewise.
7606 * notif.h: Likewise.
7607
7608 2014-07-30 Gary Benson <gbenson@redhat.com>
7609
7610 * server.h: Include common-defs.h.
7611 Do not include config.h or build-gnulib-gdbserver/config.h.
7612
7613 2014-07-30 Gary Benson <gbenson@redhat.com>
7614
7615 * hostio-errno.c: Move server.h to top of includes list.
7616 * inferiors.c: Likewise.
7617 * linux-x86-low.c: Likewise.
7618 * notif.c: Include server.h.
7619
7620 2014-07-24 Tom Tromey <tromey@redhat.com>
7621 Gary Benson <gbenson@redhat.com>
7622
7623 * server.h (CORE_ADDR): Now unsigned.
7624
7625 2014-07-16 Pedro Alves <palves@redhat.com>
7626
7627 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7628
7629 2014-07-15 Pedro Alves <palves@redhat.com>
7630
7631 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7632 copy.
7633
7634 2014-07-11 Pedro Alves <palves@redhat.com>
7635
7636 * linux-low.c (kill_wait_lwp): New function, based on
7637 kill_one_lwp_callback, but use my_waitpid directly.
7638 (kill_one_lwp_callback, linux_kill): Use it.
7639
7640 2014-06-23 Pedro Alves <palves@redhat.com>
7641
7642 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7643 before setting DR0..DR3.
7644
7645 2014-06-20 Gary Benson <gbenson@redhat.com>
7646
7647 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7648 * configure: Regenerated.
7649 * config.in: Likewise.
7650
7651 2014-06-20 Gary Benson <gbenson@redhat.com>
7652
7653 * Makefile.in (SFILES): Update locations for files moved
7654 from common to nat.
7655 (object file files): Reordered.
7656
7657 2014-06-20 Gary Benson <gbenson@redhat.com>
7658
7659 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7660 (i386_dr_low_set_addr): Likewise.
7661 (i386_dr_low_get_addr): Likewise.
7662 (i386_dr_low_can_set_control): Likewise.
7663 (i386_dr_low_set_control): Likewise.
7664 (i386_dr_low_get_control): Likewise.
7665 (i386_dr_low_get_status): Likewise.
7666 (i386_get_debug_register_length): Likewise.
7667 * linux-x86-low.c (i386_dr_low_set_addr):
7668 Changed signature. Made static.
7669 (i386_dr_low_get_addr): Likewise.
7670 (i386_dr_low_set_control): Likewise.
7671 (i386_dr_low_get_control): Likewise.
7672 (i386_dr_low_get_status): Likewise.
7673 (i386_dr_low): New global variable.
7674 * win32-i386-low.c (i386_dr_low_set_addr):
7675 Changed signature. Made static.
7676 (i386_dr_low_get_addr): Likewise.
7677 (i386_dr_low_set_control): Likewise.
7678 (i386_dr_low_get_control): Likewise.
7679 (i386_dr_low_get_status): Likewise.
7680 (i386_dr_low): New global variable.
7681
7682 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7683
7684 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7685 * Makefile.in (AR, AR_FLAGS): Define.
7686 * configure: Regenerate.
7687
7688 2014-06-19 Gary Benson <gbenson@redhat.com>
7689
7690 * Makefile.in (i386-dregs.o): New rule.
7691 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7692 * i386-low.c (target.h): Remove include.
7693 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7694 (DR_CONTROL_SHIFT): Likewise.
7695 (DR_CONTROL_SIZE): Likewise.
7696 (DR_RW_EXECUTE): Likewise.
7697 (DR_RW_WRITE): Likewise.
7698 (DR_RW_READ): Likewise.
7699 (DR_RW_IORW): Likewise.
7700 (DR_LEN_1): Likewise.
7701 (DR_LEN_2): Likewise.
7702 (DR_LEN_4): Likewise.
7703 (DR_LEN_8): Likewise.
7704 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7705 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7706 (DR_ENABLE_SIZE): Likewise.
7707 (DR_LOCAL_SLOWDOWN): Likewise.
7708 (DR_GLOBAL_SLOWDOWN): Likewise.
7709 (DR_CONTROL_RESERVED): Likewise.
7710 (I386_DR_CONTROL_MASK): Likewise.
7711 (I386_DR_VACANT): Likewise.
7712 (I386_DR_LOCAL_ENABLE): Likewise.
7713 (I386_DR_GLOBAL_ENABLE): Likewise.
7714 (I386_DR_DISABLE): Likewise.
7715 (I386_DR_SET_RW_LEN): Likewise.
7716 (I386_DR_GET_RW_LEN): Likewise.
7717 (I386_DR_WATCH_HIT): Likewise.
7718 (i386_wp_op_t): Likewise.
7719 (i386_show_dr): Likewise.
7720 (i386_length_and_rw_bits): Likewise.
7721 (i386_insert_aligned_watchpoint): Likewise.
7722 (i386_remove_aligned_watchpoint): Likewise.
7723 (i386_handle_nonaligned_watchpoint): Likewise.
7724 i386_update_inferior_debug_regs(): Likewise.
7725 (i386_dr_insert_watchpoint): Likewise.
7726 (i386_dr_remove_watchpoint): Likewise.
7727 (i386_dr_region_ok_for_watchpoint): Likewise.
7728 (i386_dr_stopped_data_address): Likewise.
7729 (i386_dr_stopped_by_watchpoint): Likewise.
7730
7731 2014-06-19 Gary Benson <gbenson@redhat.com>
7732
7733 * i386-low.c (i386_dr_show): Renamed to
7734 i386_show_dr and made static. All uses updated.
7735 (i386_dr_length_and_rw_bits): Renamed to
7736 i386_length_and_rw_bits and made static.
7737 All uses updated.
7738 (i386_dr_insert_aligned_watchpoint): Renamed to
7739 i386_insert_aligned_watchpoint and made static.
7740 All uses updated.
7741 (i386_dr_remove_aligned_watchpoint): Renamed to
7742 i386_remove_aligned_watchpoint and made static.
7743 All uses updated.
7744 (i386_dr_update_inferior_debug_regs): Renamed to
7745 i386_update_inferior_debug_regs and made static.
7746 All uses updated.
7747
7748 2014-06-18 Gary Benson <gbenson@redhat.com>
7749
7750 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7751 (i386_dr_low_can_set_control): Likewise.
7752 (i386_get_debug_register_length): Likewise.
7753 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7754 (i386_dr_low_can_set_control): Likewise.
7755 (i386_get_debug_register_length): Likewise.
7756
7757 2014-06-17 Gary Benson <gbenson@redhat.com>
7758
7759 * i386-low.h (i386-dregs.h): New include.
7760 (DR_FIRSTADDR): Now in i386-dregs.h.
7761 (DR_LASTADDR): Likewise.
7762 (DR_NADDR): Likewise.
7763 (DR_STATUS): Likewise.
7764 (DR_CONTROL): Likewise.
7765 (i386_debug_reg_state): Likewise.
7766 (i386_dr_insert_watchpoint): Likewise.
7767 (i386_dr_remove_watchpoint): Likewise.
7768 (i386_dr_region_ok_for_watchpoint): Likewise.
7769 (i386_dr_stopped_data_address): Likewise.
7770 (i386_dr_stopped_by_watchpoint): Likewise.
7771 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7772
7773 2014-06-18 Gary Benson <gbenson@redhat.com>
7774
7775 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7776 i386_dr_insert_watchpoint.
7777 (i386_low_remove_watchpoint): Renamed to
7778 i386_dr_remove_watchpoint.
7779 (i386_low_region_ok_for_watchpoint): Renamed to
7780 i386_dr_region_ok_for_watchpoint.
7781 (i386_low_stopped_data_address): Renamed to
7782 i386_dr_stopped_data_address.
7783 (i386_low_stopped_by_watchpoint): Renamed to
7784 i386_dr_stopped_by_watchpoint.
7785 * i386-low.c (i386_show_dr): Renamed to
7786 i386_dr_show and made nonstatic. All uses updated.
7787 (i386_length_and_rw_bits): Renamed to
7788 i386_dr_length_and_rw_bits and made nonstatic.
7789 All uses updated.
7790 (i386_insert_aligned_watchpoint): Renamed to
7791 i386_dr_insert_aligned_watchpoint and made nonstatic.
7792 All uses updated.
7793 (i386_remove_aligned_watchpoint): Renamed to
7794 i386_dr_remove_aligned_watchpoint and made nonstatic.
7795 All uses updated.
7796 (i386_update_inferior_debug_regs): Renamed to
7797 i386_dr_update_inferior_debug_regs and made nonstatic.
7798 All uses updated.
7799 (i386_low_insert_watchpoint): Renamed to
7800 i386_dr_insert_watchpoint. All uses updated.
7801 (i386_low_remove_watchpoint): Renamed to
7802 i386_dr_remove_watchpoint. All uses updated.
7803 (i386_low_region_ok_for_watchpoint): Renamed to
7804 i386_dr_region_ok_for_watchpoint. All uses updated.
7805 (i386_low_stopped_data_address): Renamed to
7806 i386_dr_stopped_data_address. All uses updated.
7807 (i386_low_stopped_by_watchpoint): Renamed to
7808 i386_dr_stopped_by_watchpoint. All uses updated.
7809
7810 2014-06-18 Gary Benson <gbenson@redhat.com>
7811
7812 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7813 (i386_dr_low_can_set_control): Likewise.
7814 (i386_insert_aligned_watchpoint): New check.
7815
7816 2014-06-18 Gary Benson <gbenson@redhat.com>
7817
7818 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7819 Renamed to state.
7820
7821 2014-06-18 Gary Benson <gbenson@redhat.com>
7822
7823 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7824 instead of fatal and error.
7825 (i386_handle_nonaligned_watchpoint): Likewise.
7826
7827 2014-06-18 Gary Benson <gbenson@redhat.com>
7828
7829 * i386-low.c (i386_get_debug_register_length): New macro.
7830 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7831 (i386_show_dr): Use debug_printf instead of fprintf. Use
7832 phex to format values.
7833
7834 2014-06-18 Gary Benson <gbenson@redhat.com>
7835
7836 * i386-low.h: Comment changes.
7837 * i386-low.c: Likewise.
7838
7839 2014-06-18 Gary Benson <gbenson@redhat.com>
7840
7841 * i386-low.c: Whitespace changes.
7842
7843 2014-06-12 Tom Tromey <tromey@redhat.com>
7844
7845 * utils.c (freeargv): Remove.
7846
7847 2014-06-12 Tom Tromey <tromey@redhat.com>
7848
7849 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7850 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7851 (parse_debug_format_options): Likewise.
7852 (gdbserver_usage): Likewise.
7853 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7854 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7855 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7856 against libiberty.
7857 ($(LIBGNU)): Depend on libiberty.
7858 (all-lib): Recurse into all subdirs.
7859 (install-only): Invoke "install" target in subdirs.
7860 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7861 targets.
7862 * configure: Rebuild.
7863 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7864 for vasprintf, vsnprintf, or gettimeofday.
7865 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7866 srv_tgtobj.
7867
7868 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7869
7870 * development.sh: Delete.
7871 * Makefile.in (config.status): Adjust dependency on development.sh.
7872 * configure.ac: Adjust development.sh source call.
7873 * configure: Regenerate.
7874
7875 2014-06-02 Pedro Alves <palves@redhat.com>
7876
7877 * ax.c (gdb_free_agent_expr): New function.
7878 * ax.h (gdb_free_agent_expr): New declaration.
7879 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7880 list.
7881 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7882 static.
7883 (clear_breakpoint_conditions_and_commands): New function.
7884 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7885 (clear_breakpoint_conditions_and_commands): New declaration.
7886
7887 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7888
7889 * linux-aarch64-low.c (asm/ptrace.h): Include.
7890
7891 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7892
7893 Fix TLS access for -static -pthread.
7894 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7895 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7896 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7897
7898 2014-05-20 Pedro Alves <palves@redhat.com>
7899
7900 * linux-aarch64-low.c (aarch64_insert_point)
7901 (aarch64_remove_point): No longer check whether the type is
7902 supported here. Adjust to new interface.
7903 (the_low_target): Install aarch64_supports_z_point_type as
7904 supports_z_point_type method.
7905 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7906 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7907 instead of a Z packet char. Adjust.
7908 (arm_supports_z_point_type): New function.
7909 (arm_insert_point, arm_remove_point): Adjust to new interface.
7910 (the_low_target): Install arm_supports_z_point_type.
7911 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7912 (cris_insert_point, cris_remove_point): Adjust to new interface.
7913 Don't check whether the type is supported here.
7914 (the_low_target): Install cris_supports_z_point_type.
7915 * linux-low.c (linux_supports_z_point_type): New function.
7916 (linux_insert_point, linux_remove_point): Adjust to new interface.
7917 * linux-low.h (struct linux_target_ops) <insert_point,
7918 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7919 raw_breakpoint pointer parameter.
7920 <supports_z_point_type>: New method.
7921 * linux-mips-low.c (mips_supports_z_point_type): New function.
7922 (mips_insert_point, mips_remove_point): Adjust to new interface.
7923 Use mips_supports_z_point_type.
7924 (the_low_target): Install mips_supports_z_point_type.
7925 * linux-ppc-low.c (the_low_target): Install NULL as
7926 supports_z_point_type method.
7927 * linux-s390-low.c (the_low_target): Install NULL as
7928 supports_z_point_type method.
7929 * linux-sparc-low.c (the_low_target): Install NULL as
7930 supports_z_point_type method.
7931 * linux-x86-low.c (x86_supports_z_point_type): New function.
7932 (x86_insert_point): Adjust to new insert_point interface. Use
7933 insert_memory_breakpoint. Adjust to new
7934 i386_low_insert_watchpoint interface.
7935 (x86_remove_point): Adjust to remove_point interface. Use
7936 remove_memory_breakpoint. Adjust to new
7937 i386_low_remove_watchpoint interface.
7938 (the_low_target): Install x86_supports_z_point_type.
7939 * lynx-low.c (lynx_target_ops): Install NULL as
7940 supports_z_point_type callback.
7941 * nto-low.c (nto_supports_z_point_type): New.
7942 (nto_insert_point, nto_remove_point): Adjust to new interface.
7943 (nto_target_ops): Install nto_supports_z_point_type.
7944 * mem-break.c: Adjust intro comment.
7945 (struct raw_breakpoint) <raw_type, size>: New fields.
7946 <inserted>: Update comment.
7947 <shlib_disabled>: Delete field.
7948 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7949 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7950 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7951 (raw_bkpt_type_to_target_hw_bp_type): New function.
7952 (find_enabled_raw_code_breakpoint_at): New function.
7953 (find_raw_breakpoint_at): New type and size parameters. Use them.
7954 (insert_memory_breakpoint): New function, based off
7955 set_raw_breakpoint_at.
7956 (remove_memory_breakpoint): New function.
7957 (set_raw_breakpoint_at): Reimplement.
7958 (set_breakpoint): New, based on set_breakpoint_at.
7959 (set_breakpoint_at): Reimplement.
7960 (delete_raw_breakpoint): Go through the_target->remove_point
7961 instead of assuming memory breakpoints.
7962 (find_gdb_breakpoint_at): Delete.
7963 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7964 (find_gdb_breakpoint): New function.
7965 (set_gdb_breakpoint_at): Delete.
7966 (z_type_supported): New function.
7967 (set_gdb_breakpoint_1): New function, loosely based off
7968 set_gdb_breakpoint_at.
7969 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7970 (delete_gdb_breakpoint_at): Delete.
7971 (delete_gdb_breakpoint_1): New function, loosely based off
7972 delete_gdb_breakpoint_at.
7973 (delete_gdb_breakpoint): New function.
7974 (clear_gdb_breakpoint_conditions): Rename to ...
7975 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7976 breakpoint.
7977 (add_condition_to_breakpoint): Make static.
7978 (add_breakpoint_condition): Take a struct breakpoint pointer
7979 instead of an address. Adjust.
7980 (gdb_condition_true_at_breakpoint): Rename to ...
7981 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7982 z_type parameter.
7983 (gdb_condition_true_at_breakpoint): Reimplement.
7984 (add_breakpoint_commands): Take a struct breakpoint pointer
7985 instead of an address. Adjust.
7986 (gdb_no_commands_at_breakpoint): Rename to ...
7987 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7988 parameter. Return true if no breakpoint was found. Change debug
7989 output.
7990 (gdb_no_commands_at_breakpoint): Reimplement.
7991 (run_breakpoint_commands): Rename to ...
7992 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7993 and change return type to boolean.
7994 (run_breakpoint_commands): New function.
7995 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7996 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7997 breakpoint. Go through the_target->remove_point instead of
7998 assuming memory breakpoint.
7999 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8000 software and hardware breakpoints.
8001 (reinsert_raw_breakpoint): Go through the_target->insert_point
8002 instead of assuming memory breakpoint.
8003 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8004 software and hardware breakpoints.
8005 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8006 Check both software and hardware breakpoints.
8007 (validate_inserted_breakpoint): Assert the breakpoint is a
8008 software breakpoint. Set the inserted flag to -1 instead of
8009 setting shlib_disabled.
8010 (delete_disabled_breakpoints): Adjust.
8011 (validate_breakpoints): Only validate software breakpoints.
8012 Adjust to inserted flag change.
8013 (check_mem_read, check_mem_write): Skip breakpoint types other
8014 than software breakpoints. Adjust to inserted flag change.
8015 * mem-break.h (enum raw_bkpt_type): New enum.
8016 (raw_breakpoint, struct process_info): Forward declare.
8017 (Z_packet_to_target_hw_bp_type): Delete declaration.
8018 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8019 (set_gdb_breakpoint, delete_gdb_breakpoint)
8020 (clear_breakpoint_conditions): New declarations.
8021 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8022 (breakpoint_inserted_here): Update comment.
8023 (add_breakpoint_condition, add_breakpoint_commands): Replace
8024 address parameter with a breakpoint pointer parameter.
8025 (gdb_breakpoint_here): Update comment.
8026 (delete_gdb_breakpoint_at): Delete.
8027 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8028 * server.c (process_point_options): Take a struct breakpoint
8029 pointer instead of an address. Adjust.
8030 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8031 delete_gdb_breakpoint.
8032 * spu-low.c (spu_target_ops): Install NULL as
8033 supports_z_point_type method.
8034 * target.h: Include mem-break.h.
8035 (struct target_ops) <prepare_to_access_memory>: Update comment.
8036 <supports_z_point_type>: New field.
8037 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8038 instead of a char. Also take a raw breakpoint pointer.
8039 * win32-arm-low.c (the_low_target): Install NULL as
8040 supports_z_point_type.
8041 * win32-i386-low.c (i386_supports_z_point_type): New function.
8042 (i386_insert_point, i386_remove_point): Adjust to new interface.
8043 (the_low_target): Install i386_supports_z_point_type.
8044 * win32-low.c (win32_supports_z_point_type): New function.
8045 (win32_insert_point, win32_remove_point): Adjust to new interface.
8046 (win32_target_ops): Install win32_supports_z_point_type.
8047 * win32-low.h (struct win32_target_ops):
8048 <supports_z_point_type>: New method.
8049 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8050 instead of a char. Also take a raw breakpoint pointer.
8051
8052 2014-05-20 Pedro Alves <palves@redhat.com>
8053
8054 * mem-break.h: Include break-common.h.
8055 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8056 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8057 (Z_packet_to_target_hw_bp_type): New declaration.
8058 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8059 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8060 (Z_PACKET_ACCESS_WP): Delete macros.
8061 (Z_packet_to_hw_type): Delete function.
8062 * i386-low.h: Don't include break-common.h here.
8063 (Z_packet_to_hw_type): Delete declaration.
8064 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8065 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8066 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8067 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8068 * linux-aarch64-low.c: Don't include break-common.h here.
8069 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8070 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8071 (Z_packet_to_target_hw_bp_type): Delete function.
8072 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8073 function.
8074 (mips_insert_point, mips_remove_point): Use
8075 Z_packet_to_target_hw_bp_type.
8076
8077 2014-05-20 Pedro Alves <palves@redhat.com>
8078
8079 * linux-aarch64-low.c: Include break-common.h.
8080 (enum target_point_type): Delete.
8081 (Z_packet_to_point_type): Rename to ...
8082 (Z_packet_to_target_hw_bp_type): ... this, and return a
8083 target_hw_bp_type instead.
8084 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8085 instead of an enum target_point_type.
8086 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8087 breakpoint type.
8088 (aarch64_dr_state_insert_one_point)
8089 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8090 (aarch64_handle_aligned_watchpoint)
8091 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8092 Take an enum target_hw_bp_type instead of an enum
8093 target_point_type.
8094 (aarch64_supports_z_point_type): New function.
8095 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8096 use Z_packet_to_target_hw_bp_type.
8097
8098 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8099
8100 * configure.ac: Only use -Werror by default when DEVELOPMENT
8101 is true.
8102 * configure: Regenerate.
8103
8104 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8105
8106 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8107 * linux-x86-low.c (X86_64_USER_REGS): New.
8108 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8109
8110 2014-04-28 Yao Qi <yao@codesourcery.com>
8111
8112 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8113 name.
8114
8115 2014-04-25 Pedro Alves <palves@redhat.com>
8116
8117 PR server/16255
8118 * linux-low.c (linux_attach_fail_reason_string): New function.
8119 (linux_attach_lwp): Delete.
8120 (linux_attach_lwp_1): Rename to ...
8121 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8122 argument. Remove "initial" parameter. Return int instead of
8123 void. Don't error or warn here.
8124 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8125 failure to attach to the tgid. Call warning when failing to
8126 attach to an lwp.
8127 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8128 argument. Remove "initial" parameter. Return int instead of
8129 void. Don't error or warn here.
8130 (linux_attach_fail_reason_string): New declaration.
8131 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8132 interface change. Use linux_attach_fail_reason_string.
8133
8134 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8135 Walfred Tedeschi <walfred.tedeschi@intel.com>
8136
8137 * Makefile.in: Added rules to handle new files
8138 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8139 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8140 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8141 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8142 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8143 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8144 x32-avx512-linux.o.
8145 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8146 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8147 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8148 i386/x32-avx512.xml.
8149 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8150 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8151 i386/x32-avx512-linux.xml.
8152 * i387-fp.c (num_avx512_k_registers): New constant for number
8153 of K registers.
8154 (num_avx512_zmmh_low_registers): New constant for number of
8155 lower ZMM registers (0-15).
8156 (num_avx512_zmmh_high_registers): New constant for number of
8157 higher ZMM registers (16-31).
8158 (num_avx512_ymmh_registers): New contant for number of higher
8159 YMM registers (ymm16-31 added by avx521 on x86_64).
8160 (num_avx512_xmm_registers): New constant for number of higher
8161 XMM registers (xmm16-31 added by AVX512 on x86_64).
8162 (struct i387_xsave): Add space for AVX512 registers.
8163 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8164 Add code to handle AVX512 registers.
8165 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8166 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8167 prototypei from generated file.
8168 (tdesc_amd64_avx512_linux): Likewise.
8169 (init_registers_x32_avx512_linux): Likewise.
8170 (tdesc_x32_avx512_linux): Likewise.
8171 (init_registers_i386_avx512_linux): Likewise.
8172 (tdesc_i386_avx512_linux): Likewise.
8173 (x86_64_regmap): Add AVX512 registers.
8174 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8175 mask.
8176 (initialize_low_arch): Add code to initialize AVX512 registers.
8177
8178 2014-04-23 Pedro Alves <palves@redhat.com>
8179
8180 * mem-break.c (find_gdb_breakpoint_at): Make static.
8181 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8182
8183 2014-04-23 Pedro Alves <palves@redhat.com>
8184
8185 * i386-low.c: Don't include break-common.h here.
8186 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8187 prototype to take target_hw_bp_type as argument instead of a Z
8188 packet char.
8189 * i386-low.h: Include break-common.h here.
8190 (Z_packet_to_hw_type): Declare.
8191 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8192 prototypes.
8193 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8194 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8195 (x86_remove_point): Convert the packet number to a
8196 target_hw_bp_type before calling i386_low_remove_watchpoint.
8197 * win32-i386-low.c (i386_insert_point): Convert the packet number
8198 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8199 (i386_remove_point): Convert the packet number to a
8200 target_hw_bp_type before calling i386_low_remove_watchpoint.
8201
8202 2014-04-23 Pedro Alves <palves@redhat.com>
8203
8204 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8205
8206 2014-04-10 Pedro Alves <palves@redhat.com>
8207
8208 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8209 Check if the condition or command is NULL before checking if the
8210 breakpoint is known. On success, return true.
8211 * mem-break.h (add_breakpoint_condition): Document return.
8212 (add_breakpoint_commands): Add describing comment.
8213 * server.c (skip_to_semicolon): New function.
8214 (process_point_options): Use it.
8215
8216 2014-04-09 Pedro Alves <palves@redhat.com>
8217
8218 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8219 to lwpid_of.
8220
8221 2014-02-27 Pedro Alves <palves@redhat.com>
8222
8223 PR 12702
8224 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8225 macros.
8226 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8227 output.
8228 (last_thread_of_process_p): Take a PID argument instead of a
8229 thread pointer.
8230 (linux_wait_for_lwp): Delete.
8231 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8232 functions.
8233 (linux_low_filter_event): New function, party factored out from
8234 linux_wait_for_event.
8235 (linux_wait_for_event): Rename to ...
8236 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8237 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8238 sigsuspend. Check for zombie leaders.
8239 (linux_wait_for_event): Reimplement as wrapper around
8240 linux_wait_for_event_filtered.
8241 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8242 a normal or signal exit is seen, it's the whole process exiting.
8243 (wait_for_sigstop): No longer a for_each_inferior callback.
8244 Rewrite on top of linux_wait_for_event_filtered.
8245 (stop_all_lwps): Call wait_for_sigstop directly.
8246 * server.c (resume, handle_target_event): Handle
8247 TARGET_WAITKIND_NO_RESUMED.
8248
8249 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8250
8251 * win32-low.c (psapi_get_dll_name,
8252 * win32_CreateToolhelp32Snapshot): Delete.
8253 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8254 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8255 Delete.
8256 (handle_load_dll): Add function description.
8257 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8258
8259 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8260
8261 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8262 Add comment.
8263 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8264 base address when calling win32_add_one_solib.
8265 (handle_load_dll): Delete local variable load_addr.
8266 Remove 0x1000 offset applied to DLL base address when calling
8267 win32_add_one_solib.
8268 (handle_unload_dll): Add comment.
8269
8270 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8271
8272 * win32-low.c (win32_add_all_dlls): Renames
8273 win32_ensure_ntdll_loaded. Rewrite function documentation.
8274 Adjust implementation to always load all DLLs.
8275 Add 0x1000 offset to DLL base address when calling
8276 win32_add_one_solib.
8277 (child_initialization_done): New static global.
8278 (do_initial_child_stuff): Set child_initialization_done to
8279 zero during child initialization, and 1 after. Replace call
8280 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8281 Add comment.
8282 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8283 (handle_unload_dll): Add function documentation.
8284 (get_child_debug_event): Ignore load and unload DLL events
8285 during child initialization.
8286
8287 2014-02-20 Doug Evans <dje@google.com>
8288
8289 Remove global all_lwps.
8290 * inferiors.h (ptid_of): Move here from linux-low.h.
8291 (pid_of, lwpid_of): Ditto.
8292 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8293 parameter is a struct thread_info * now.
8294 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8295 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8296 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8297 directly.
8298 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8299 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8300 * linux-arm-low.c (update_registers_callback): Update, "entry"
8301 parameter is a struct thread_info * now.
8302 Fetch lwpid from current_inferior directly.
8303 (arm_insert_point): Pass &all_threads to find_inferior instead of
8304 &all_lwps.
8305 (arm_remove_point): Ditto.
8306 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8307 (arm_prepare_to_resume): Fetch pid from thread.
8308 (arm_read_description): Fetch lwpid from current_inferior directly.
8309 * linux-low.c (all_lwps): Delete.
8310 (delete_lwp): Delete call to remove_inferior.
8311 (handle_extended_wait): Fetch lwpid from thread.
8312 (add_lwp): Don't set lwp->entry.id. Remove call to
8313 add_inferior_to_list.
8314 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8315 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8316 (kill_one_lwp_callback): Ditto.
8317 (linux_kill): Don't dereference NULL pointer.
8318 Fetch ptid,lwpid from thread.
8319 (get_detach_signal): Fetch ptid from thread.
8320 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8321 Simplify call to regcache_invalidate_thread.
8322 (delete_lwp_callback): Update, "entry" parameter is a
8323 struct thread_info * now. Fetch pid from thread.
8324 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8325 (status_pending_p_callback): Update, "entry" parameter is a
8326 struct thread_info * now. Fetch ptid from thread.
8327 (find_lwp_pid): Update, "entry" parameter is a
8328 struct thread_info * now.
8329 (linux_wait_for_lwp): Fetch pid from thread.
8330 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8331 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8332 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8333 (dequeue_one_deferred_signal): Ditto.
8334 (cancel_breakpoint): Fetch ptid from current_inferior.
8335 (linux_wait_for_event): Pass &all_threads to find_inferior,
8336 not &all_lwps. Fetch ptid, lwpid from thread.
8337 (count_events_callback): Update, "entry" parameter is a
8338 struct thread_info * now.
8339 (select_singlestep_lwp_callback): Ditto.
8340 (select_event_lwp_callback): Ditto.
8341 (cancel_breakpoints_callback): Ditto.
8342 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8343 not &all_lwps.
8344 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8345 (unsuspend_one_lwp): Update, "entry" parameter is a
8346 struct thread_info * now.
8347 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8348 not &all_lwps.
8349 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8350 Fetch lwpid from thread, not lwp.
8351 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8352 Pass &all_threads to find_inferior, not &all_lwps.
8353 (send_sigstop): Fetch lwpid from thread, not lwp.
8354 (send_sigstop_callback): Update, "entry" parameter is a
8355 struct thread_info * now.
8356 (suspend_and_send_sigstop_callback): Ditto.
8357 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8358 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8359 struct thread_info * now.
8360 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8361 from thread, lwp.
8362 (lwp_running): Update, "entry" parameter is a
8363 struct thread_info * now.
8364 (stop_all_lwps): Fetch ptid from thread.
8365 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8366 (linux_resume_one_lwp): Fetch lwpid from thread.
8367 (linux_set_resume_request): Update, "entry" parameter is a
8368 struct thread_info * now. Fetch pid, lwpid from thread.
8369 (resume_status_pending_p): Update, "entry" parameter is a
8370 struct thread_info * now.
8371 (need_step_over_p): Ditto. Fetch lwpid from thread.
8372 (start_step_over): Fetch lwpid from thread.
8373 (linux_resume_one_thread): Update, "entry" parameter is a
8374 struct thread_info * now. Fetch lwpid from thread.
8375 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8376 (proceed_one_lwp): Update, "entry" parameter is a
8377 struct thread_info * now. Fetch lwpid from thread.
8378 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8379 struct thread_info * now.
8380 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8381 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8382 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8383 directly.
8384 (regsets_store_inferior_registers): Ditto.
8385 (fetch_register, store_register): Ditto.
8386 (linux_read_memory, linux_write_memory): Ditto.
8387 (linux_request_interrupt): Ditto.
8388 (linux_read_auxv): Ditto.
8389 (linux_xfer_siginfo): Ditto.
8390 (linux_qxfer_spu): Ditto.
8391 (linux_qxfer_libraries_svr4): Ditto.
8392 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8393 moved to inferiors.h.
8394 (get_lwp): Delete.
8395 (get_thread_lwp): Update.
8396 (struct lwp_info): Delete member "entry". Simplify comment for
8397 member "thread".
8398 (all_lwps): Delete.
8399 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8400 current_inferior directly.
8401 (update_watch_registers_callback): Update, "entry" parameter is a
8402 struct thread_info * now. Fetch pid from thread.
8403 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8404 (mips_insert_point): Fetch lwpid from current_inferior.
8405 Pass &all_threads to find_inferior, not &all_lwps.
8406 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8407 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8408 directly.
8409 (mips_stopped_data_address): Ditto.
8410 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8411 directly.
8412 * linux-tile-low.c (tile_arch_setup): Ditto.
8413 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8414 (update_debug_registers_callback): Update, "entry" parameter is a
8415 struct thread_info * now. Fetch pid from thread.
8416 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8417 Pass &all_threads to find_inferior, not &all_lwps.
8418 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8419 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8420 Pass &all_threads to find_inferior, not &all_lwps.
8421 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8422 (i386_dr_low_get_status): Ditto.
8423 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8424 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8425 (x86_linux_read_description): Ditto.
8426 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8427
8428 2014-02-20 Doug Evans <dje@google.com>
8429
8430 * inferiors.c (get_first_inferior): Fix buglet.
8431
8432 2014-02-19 Doug Evans <dje@google.com>
8433
8434 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8435 * inferiors.c (add_thread): Change result type to struct thread_info *.
8436 All callers updated.
8437 (add_lwp): Call add_thread here instead of in callers.
8438 All callers updated.
8439 * linux-low.h (get_lwp_thread): Rewrite.
8440 (struct lwp_info): New member "thread".
8441
8442 2014-02-19 Doug Evans <dje@google.com>
8443
8444 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8445 All callers updated.
8446
8447 2014-02-19 Doug Evans <dje@google.com>
8448
8449 * inferiors.c (add_thread): Fix whitespace.
8450
8451 2014-02-19 Doug Evans <dje@google.com>
8452
8453 * dll.c (clear_dlls): Replace accessing list implemention details
8454 with API function.
8455 * gdbthread.h (get_first_thread): Declare.
8456 * inferiors.c (for_each_inferior_with_data): New function.
8457 (get_first_thread): New function.
8458 (find_thread_ptid): Simplify.
8459 (get_first_inferior): New function.
8460 (clear_list): Delete.
8461 (one_inferior_p): New function.
8462 (clear_inferior_list): New function.
8463 (clear_inferiors): Update.
8464 * inferiors.h (for_each_inferior_with_data): Declare.
8465 (clear_inferior_list): Declare.
8466 (one_inferior_p): Declare.
8467 (get_first_inferior): Declare.
8468 * linux-low.c (linux_wait_for_event): Replace accessing list
8469 implemention details with API function.
8470 * server.c (target_running): Ditto.
8471 (accumulate_file_name_length): New function.
8472 (emit_dll_description): New function.
8473 (handle_qxfer_libraries): Replace accessing list implemention
8474 details with API function.
8475 (handle_qxfer_threads_worker): New function.
8476 (handle_qxfer_threads_proper): Replace accessing list implemention
8477 details with API function.
8478 (handle_query): Ditto.
8479 (visit_actioned_threads_callback_ftype): New typedef.
8480 (visit_actioned_threads_data): New struct.
8481 (visit_actioned_threads): Rewrite to be find_inferior callback.
8482 (resume): Call find_inferior.
8483 (handle_status): Replace accessing list implemention
8484 details with API function.
8485 (process_serial_event): Replace accessing list implemention details
8486 with API function.
8487 * target.c (set_desired_inferior): Replace accessing list implemention
8488 details with API function.
8489 * tracepoint.c (same_process_p): New function.
8490 (gdb_agent_about_to_close): Replace accessing list implemention
8491 details with API function.
8492 * win32-low.c (child_delete_thread): Replace accessing list
8493 implemention details with API function.
8494 (match_dll_by_basename): New function.
8495 (dll_is_loaded_by_basename): New function.
8496 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8497 details call to dll_is_loaded_by_basename.
8498
8499 2014-02-19 Doug Evans <dje@google.com>
8500
8501 * dll.h (struct dll_info): Add comment.
8502 * gdbthread.h (struct thread_info): Add comment.
8503 (current_ptid): Simplify.
8504 * inferiors.c (add_process): Update.
8505 (remove_process): Update.
8506 * inferiors.h (struct process_info): Rename member "head" to "entry".
8507 * linux-low.c (delete_lwp): Update.
8508 (add_lwp): Update.
8509 (last_thread_of_process_p): Update.
8510 (kill_one_lwp_callback, linux_kill): Update.
8511 (status_pending_p_callback): Update.
8512 (wait_for_sigstop): Update. Simplify read of ptid.
8513 (start_step_over): Update.
8514 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8515 (get_lwp_thread): Update.
8516 (struct lwp_info): Rename member "head" to "entry".
8517 * regcache.h (inferior_list_entry): Delete.
8518 * server.c (kill_inferior_callback): Update.
8519 (detach_or_kill_inferior_callback): Update.
8520 (print_started_pid): Update.
8521 (print_attached_pid): Update.
8522 (process_serial_event): Simplify read of ptid.
8523 * thread-db.c (thread_db_create_event): Update.
8524 (thread_db_get_tls_address): Update.
8525 * win32-low.c (current_inferior_ptid): Simplify.
8526
8527 2014-02-19 Tom Tromey <tromey@redhat.com>
8528
8529 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8530 argument.
8531 (target_supports_btrace): Update.
8532
8533 2014-02-14 Yao Qi <yao@codesourcery.com>
8534
8535 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8536 (rsp-low-ipa.o): New target.
8537
8538 2014-02-12 Tom Tromey <tromey@redhat.com>
8539
8540 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8541 convert_ascii_to_int.
8542 * regcache.c (registers_to_string): Likewise.
8543 * remote-utils.c (decode_M_packet): Likewise.
8544 * server.c (process_serial_event): Likewise.
8545
8546 2014-02-12 Tom Tromey <tromey@redhat.com>
8547
8548 * server.c (handle_query, handle_v_run): Use hex2bin, not
8549 unhexify.
8550 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8551
8552 2014-02-12 Tom Tromey <tromey@redhat.com>
8553
8554 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8555 convert_int_to_ascii.
8556 * regcache.c (registers_to_string, collect_register_as_string):
8557 Likewise.
8558 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8559 Likewise.
8560 * server.c (process_serial_event): Likewise.
8561 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8562 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8563
8564 2014-02-12 Tom Tromey <tromey@redhat.com>
8565
8566 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8567 bin2hex, not hexify.
8568 * tracepoint.c (cmd_qtstatus): Likewise.
8569
8570 2014-02-12 Tom Tromey <tromey@redhat.com>
8571
8572 * remote-utils.c (monitor_output): Pass explicit length to
8573 hexify.
8574
8575 2014-02-12 Tom Tromey <tromey@redhat.com>
8576
8577 * tracepoint.c: Include rsp-low.h.
8578 * server.c: Include rsp-low.h.
8579 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8580 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8581 declare.
8582 * remote-utils.c: Include rsp-low.h.
8583 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8584 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8585 (convert_int_to_ascii, convert_ascii_to_int): Move to
8586 common/rsp-low.c.
8587 * regcache.c: Include rsp-low.h.
8588 * ax.c: Include rsp-low.h.
8589 * Makefile.in (SFILES): Add common/rsp-low.c.
8590 (OBS): Add rsp-low.o.
8591 (rsp-low.o): New target.
8592
8593 2014-02-12 Tom Tromey <tromey@redhat.com>
8594
8595 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8596 Include print-utils.h.
8597 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8598 (plongest, thirty_two, phex_nz): Remove.
8599 * Makefile.in (SFILES): Add common/print-utils.c.
8600 (OBS): Add print-utils.o.
8601 (print-utils-ipa.o): New target.
8602 (print-utils.o): New target.
8603 (IPA_OBJS): Add print-utils-ipa.o.
8604
8605 2014-02-06 Tom Tromey <tromey@redhat.com>
8606
8607 * Makefile.in (SFILES): Fix indentation.
8608
8609 2014-02-05 Doug Evans <dje@google.com>
8610
8611 * linux-low.c (linux_wait_for_event): Improve comment.
8612 (linux_wait_1): Keep current_inferior in sync with event_child.
8613
8614 2014-01-22 Doug Evans <dje@google.com>
8615
8616 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8617
8618 2014-01-22 Doug Evans <dje@google.com>
8619
8620 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8621 * configure: Regenerate.
8622 * config.in: Regenerate.
8623 * Makefile.in (SFILES): Add debug.c.
8624 (OBS): Add debug.o.
8625 * debug.c: New file.
8626 * debug.h: New file.
8627 * linux-aarch64-low.c (*): Update all debugging printfs to use
8628 debug_printf instead of fprintf.
8629 * linux-arm-low.c (*): Ditto.
8630 * linux-cris-low.c (*): Ditto.
8631 * linux-crisv32-low.c (*): Ditto.
8632 * linux-m32r-low.c (*): Ditto.
8633 * linux-sparc-low.c (*): Ditto.
8634 * linux-x86.c (*): Ditto.
8635 * linux-low.c (*): Ditto.
8636 (linux_wait_1): Add calls to debug_enter, debug_exit.
8637 (linux_wait): Remove redundant debugging printf.
8638 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8639 (linux_resume, unstop_all_lwps): Ditto.
8640 * mem-break.c (*): Update all debugging printfs to use
8641 debug_printf instead of fprintf.
8642 * remote-utils.c (*): Ditto.
8643 * thread-db.c (*): Ditto.
8644 * server.c #include <ctype.h>, "gdb_vecs.h".
8645 (debug_threads): Moved to debug.c.
8646 (*): Update all debugging printfs to use debug_printf instead of
8647 fprintf.
8648 (start_inferior): Replace call to fflush with call to debug_flush.
8649 (monitor_show_help): Mention set debug-format.
8650 (parse_debug_format_options): New function.
8651 (handle_monitor_command): Handle "monitor set debug-format".
8652 (gdbserver_usage): Mention --debug-format.
8653 (main): Parse --debug-format.
8654 * server.h (debug_threads): Declaration moved to debug.h.
8655 #include "debug.h".
8656 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8657 trace_debug_1 that uses debug_printf.
8658 (tracepoint_look_up_symbols): Update all debugging printfs to use
8659 debug_printf instead of fprintf.
8660
8661 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8662
8663 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8664 sys/ptrace.h.
8665
8666 2014-01-17 Pedro Alves <palves@redhat.com>
8667
8668 PR build/16445
8669 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8670 defined after including gdb_proc_service.h.
8671
8672 2014-01-16 Doug Evans <dje@google.com>
8673
8674 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8675 (match_dll): Use it.
8676
8677 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8678
8679 * target.h (target_ops) <read_btrace>: Change parameters and
8680 return type to allow error reporting.
8681 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8682 trace reading errors on.
8683 * linux-low.c (linux_low_read_btrace): Pass trace reading
8684 errors on.
8685 (linux_low_disable_btrace): New.
8686
8687 2014-01-15 Doug Evans <dje@google.com>
8688
8689 * inferiors.c (thread_id_to_gdb_id): Delete.
8690 * inferiors.h (thread_id_to_gdb_id): Delete.
8691
8692 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8693
8694 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8695 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8696 versions.
8697
8698 2014-01-08 Pedro Alves <palves@redhat.com>
8699
8700 * server.c (handle_status): Don't discard previous queued stop
8701 replies or thread's pending status here.
8702 (main) <disconnection>: Do it here instead.
8703
8704 2014-01-08 Pedro Alves <palves@redhat.com>
8705
8706 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8707 * server.c (visit_actioned_threads, handle_pending_status): New
8708 function.
8709 (handle_v_cont): Factor out parts to ...
8710 (resume): ... this new function. If in all-stop, and a thread
8711 being resumed has a pending status, report it without actually
8712 resuming.
8713 (myresume): Adjust to use the new 'resume' function.
8714 (clear_pending_status_callback, set_pending_status_callback)
8715 (find_status_pending_thread_callback): New functions.
8716 (handle_status): Handle the case of multiple threads having
8717 interesting statuses to report. Report threads' real last signal
8718 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8719 with an interesting thread to report the status for, instead of
8720 always reporting the status of the first thread.
8721
8722 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8723
8724 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8725 * gdbreplay.c (gdbreplay_version): Likewise.
8726
8727 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8728
8729 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8730 iov.iov_len with the real length in use.
8731
8732 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8733
8734 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8735 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8736 for all targets that use win32-low.c.
8737 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8738 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8739
8740 2013-12-13 Pedro Alves <palves@redhat.com>
8741
8742 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8743 if equal to TARGET_WAITKIND_LOADED.
8744 * win32-low.c (cached_status): New static global.
8745 (win32_wait): Add declaration.
8746 (do_initial_child_stuff): Flush all initial pending debug events
8747 up to the initial breakpoint.
8748 (win32_wait): If CACHED_STATUS was set, return that instead
8749 of doing a real wait. Remove the code resuming the execution
8750 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8751 during the initial phase. Also remove the code changing
8752 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8753 TARGET_WAITKIND_STOPPED.
8754
8755 2013-12-11 Yao Qi <yao@codesourcery.com>
8756
8757 * notif.c (handle_notif_ack): Return 0 if no notification
8758 matches.
8759
8760 2013-11-20 Doug Evans <dje@google.com>
8761
8762 * linux-low.c (linux_set_resume_request): Fix comment.
8763
8764 2013-11-20 Doug Evans <dje@google.com>
8765
8766 * linux-low.c (resume_status_pending_p): Tweak comment.
8767
8768 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8769
8770 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8771 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8772 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8773 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8774 (srv_amd64_regobj): Add amd64-mpx.o.
8775 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8776 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8777 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8778 * i387-fp.c (num_pl_bnd_register) Added constant.
8779 (num_pl_bnd_cfg_registers) Added constant.
8780 (struct i387_xsave) Added reserved area and MPX fields.
8781 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8782 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8783 function.
8784 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8785 (init_registers_amd64_mpx_linux): Declare new function.
8786 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8787 (x86_64_regmap): Add MPX registers.
8788 (x86_linux_read_description): Add MPX case.
8789 (initialize_low_arch): Initialize MPX targets.
8790
8791 2013-11-18 Tom Tromey <tromey@redhat.com>
8792
8793 * configure: Rebuild.
8794 * configure.ac: Don't check for stdlib.h.
8795 * gdbreplay.c: Unconditionally include stdlib.h.
8796
8797 2013-11-18 Tom Tromey <tromey@redhat.com>
8798
8799 * config.in: Rebuild.
8800 * configure: Rebuild.
8801 * configure.ac: Don't use AC_HEADER_DIRENT.
8802
8803 2013-11-18 Tom Tromey <tromey@redhat.com>
8804
8805 * server.h: Don't check HAVE_STRING_H.
8806 * gdbreplay.c: Don't check HAVE_STRING_H.
8807 * configure: Rebuild.
8808
8809 2013-11-18 Tom Tromey <tromey@redhat.com>
8810
8811 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8812 LIBGNU.
8813
8814 2013-11-08 Tom Tromey <tromey@redhat.com>
8815
8816 * configure, config.in: Rebuild.
8817 * configure.ac: Remove unused configury.
8818
8819 2013-11-08 Tom Tromey <tromey@redhat.com>
8820
8821 * acinclude.m4: Include common.m4, codeset.m4.
8822 * configure, config.in: Rebuild.
8823 * configure.ac: Use GDB_AC_COMMON.
8824
8825 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8826
8827 * linux-s390-low.c (HWCAP_S390_TE): New define.
8828 (s390_arch_setup): Consider the TE field in the HWCAP for
8829 determining 'have_regset_tdb'.
8830
8831 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8832
8833 PR gdb/16014
8834 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8835 call to sizeof.
8836
8837 2013-10-02 Pedro Alves <palves@redhat.com>
8838
8839 * server.c (process_serial_event): Don't output "GDBserver
8840 exiting" if GDB is connected through stdio.
8841 * target.c (mywait): Likewise, be silent if GDB is connected
8842 through stdio.
8843
8844 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8845
8846 * lynx-low.c (lynx_add_threads_after_attach): New function.
8847 (lynx_attach): Remove call to add_thread. Add call to
8848 lynx_add_threads_after_attach instead.
8849
8850 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8851
8852 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8853 * config.in, configure: Regenerated.
8854
8855 2013-09-18 Yao Qi <yao@codesourcery.com>
8856
8857 PR server/15959
8858 * server.c (start_inferior): Clear 'resume_info'.
8859
8860 2013-09-16 Jiong Wang <jiwang@tilera.com>
8861
8862 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8863 for each register.
8864
8865 2013-09-16 Jiong Wang <jiwang@tilera.com>
8866
8867 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8868 linux-tile-low.o to srv_tgtobj.
8869
8870 2013-09-16 Will Newton <will.newton@linaro.org>
8871
8872 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8873 out regs.
8874
8875 2013-09-06 Pedro Alves <palves@redhat.com>
8876
8877 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8878 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8879 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8880 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8881 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8882 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8883
8884 2013-09-06 Pedro Alves <palves@redhat.com>
8885
8886 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8887 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8888
8889 2013-09-06 Pedro Alves <palves@redhat.com>
8890
8891 * linux-amd64-ipa.c: Include tracepoint.h.
8892 * linux-i386-ipa.c: Include tracepoint.h.
8893
8894 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8895
8896 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8897 (ps_get_thread_area): New function.
8898
8899 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8900
8901 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8902 (initialize_low_arch): Call init_registers_crisv32 rather than
8903 init_register_crisv32.
8904
8905 2013-09-05 Pedro Alves <palves@redhat.com>
8906
8907 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8908 to ...
8909 * hostio.h: ... this new file.
8910 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8911 win32-low.c: Include hostio.h.
8912
8913 2013-09-05 Pedro Alves <palves@redhat.com>
8914
8915 * server.h (gdb_client_data, handler_func, callback_handler_func)
8916 (delete_file_handler, add_file_handler, append_callback_event)
8917 (delete_callback_event, start_event_loop, initialize_event_loop):
8918 Move to event-loop.h and include it.
8919 * event-loop.h: New file.
8920
8921 2013-09-05 Pedro Alves <palves@redhat.com>
8922
8923 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8924 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8925 (loaded_dll, unloaded_dll): Move to ...
8926 * dll.h: ... this new file.
8927 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8928
8929 2013-09-05 Pedro Alves <palves@redhat.com>
8930
8931 * server.h (current_process, get_thread_process, all_processes)
8932 (add_inferior_to_list, for_each_inferior, current_inferior)
8933 (remove_inferior, add_process, remove_process, find_process_pid)
8934 (have_started_inferiors_p, have_attached_inferiors_p)
8935 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8936 (clear_inferiors, find_inferior, find_inferior_id)
8937 (inferior_target_data, set_inferior_target_data)
8938 (inferior_regcache_data, set_inferior_regcache_data): Move to
8939 inferiors.h, and include it.
8940 * inferiors.h: New file.
8941
8942 2013-09-05 Pedro Alves <palves@redhat.com>
8943
8944 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8945 Move ...
8946 * ax.h: ... here.
8947
8948 2013-09-05 Pedro Alves <palves@redhat.com>
8949
8950 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8951 tracepoint.h.
8952 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8953 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8954 (handle_tracepoint_general_set, handle_tracepoint_query)
8955 (tracepoint_finished_step, tracepoint_was_hit)
8956 (release_while_stepping_state_list, current_traceframe)
8957 (in_readonly_region, traceframe_read_mem)
8958 (fetch_traceframe_registers, traceframe_read_sdata)
8959 (traceframe_read_info, struct fast_tpoint_collect_status)
8960 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8961 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8962 (supply_fast_tracepoint_registers)
8963 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8964 (ipa_tdesc, claim_trampoline_space)
8965 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8966 (agent_mem_read, agent_get_trace_state_variable_value)
8967 (agent_set_trace_state_variable_value, agent_tsv_read)
8968 (agent_mem_read_string, get_raw_reg_func_addr)
8969 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8970 * tracepoint.h: ... this new file.
8971
8972 2013-09-05 Pedro Alves <palves@redhat.com>
8973
8974 * server.h (perror_with_name, error, fatal, warning, paddress)
8975 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8976 include it.
8977 * utils.h: New file.
8978
8979 2013-09-05 Pedro Alves <palves@redhat.com>
8980
8981 * server.h (remote_debug, noack_mode, transport_is_reliable)
8982 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8983 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8984 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8985 (write_enn, initialize_async_io, enable_async_io)
8986 (disable_async_io, check_remote_input_interrupt_request)
8987 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8988 (dead_thread_notify, prepare_resume_reply)
8989 (decode_address_to_semicolon, decode_address, decode_m_packet)
8990 (decode_M_packet, decode_X_packet, decode_xfer_write)
8991 (decode_search_memory_packet, unhexify, hexify)
8992 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8993 (look_up_one_symbol, relocate_instruction)
8994 (monitor_output): Move to remote-utils.h, and include it.
8995 * remote-utils.h: New file.
8996
8997 2013-09-05 Pedro Alves <palves@redhat.com>
8998
8999 * server.h (_): Delete.
9000
9001 2013-09-02 Pedro Alves <palves@redhat.com>
9002
9003 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9004 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9005 allocated.
9006 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9007
9008 2013-09-02 Pierre Muller <muller@sourceware.org>
9009
9010 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9011 or WriteProcessMemory complete successfully and handle
9012 ERROR_PARTIAL_COPY error.
9013
9014 2013-09-02 Pedro Alves <palves@redhat.com>
9015
9016 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9017 error instead of EIO.
9018
9019 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9020
9021 PR server/15604
9022 * linux-low.c: Include filestuff.h.
9023 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9024 * lynx-low.c: Include filestuff.h.
9025 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9026 * server.c: Include filestuff.h.
9027 (main): Call notice_open_fds.
9028 * spu-low.c: Include filestuff.h.
9029 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9030
9031 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9032
9033 * Makefile.in: Explain why ../target and ../nat are not
9034 listed as include file search paths.
9035 (linux-waitpid.o): New object file rule.
9036 * configure.srv (srv_native_linux_obj): New variable.
9037 Replace all occurrences of linux native object files with
9038 $srv_native_linux_obj.
9039 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9040 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9041 (linux_enable_event_reporting): Remove declaration.
9042 (my_waitpid): Moved to common/linux-waitpid.c.
9043 (linux_wait_for_event): Pass ptid when calling
9044 linux_enable_event_reporting.
9045 (linux_supports_tracefork_flag): Remove.
9046 (linux_enable_event_reporting): Likewise.
9047 (linux_tracefork_grandchild): Remove.
9048 (STACK_SIZE): Moved to common/linux-ptrace.c.
9049 (linux_tracefork_child): Remove.
9050 (linux_test_for_tracefork): Remove.
9051 (linux_look_up_symbols): Call linux_supports_traceclone.
9052 (initialize_low): Remove call to linux_test_for_tracefork.
9053 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9054 common/linux-ptrace.h.
9055 (PTRACE_TYPE_ARG4): Likewise.
9056 Include linux-ptrace.h.
9057
9058 2013-08-21 Pedro Alves <palves@redhat.com>
9059
9060 * config.in: Renegerate.
9061
9062 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9063
9064 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9065 (SFILES): Remove $(srcdir)/common/target-common.c and
9066 add $(srcdir)/target/waitstatus.c.
9067 (OBS): Remove target-common.o and add waitstatus.o.
9068 (server_h): Remove $(srcdir)/../common/target-common.h and
9069 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9070 and $(srcdir)/../target/waitstatus.h.
9071 (target-common.o): Remove.
9072 (waitstatus.o): New target object file.
9073 * target.h: Do not include target-common.h and
9074 include target/resume.h, target/wait.h and
9075 target/waitstatus.h.
9076
9077 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9078
9079 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9080 to PTRACE_TYPE_ARG3.
9081 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9082 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9083 PTRACE_TYPE_ARG4.
9084 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9085 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9086
9087 2013-07-27 Jie Zhang <jie@codesourcery.com>
9088 Daniel Jacobowitz <dan@codesourcery.com>
9089 Yao Qi <yao@codesourcery.com>
9090
9091 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9092 (mips-linux-watch.o): New rule.
9093 (mips_linux_watch_h): New variable.
9094 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9095 srv_tgtobj.
9096 * linux-mips-low.c: Include mips-linux-watch.h.
9097 (struct arch_process_info, struct arch_lwp_info): New.
9098 (update_watch_registers_callback): New function.
9099 (mips_linux_new_process, mips_linux_new_thread) New functions.
9100 (mips_linux_prepare_to_resume, mips_insert_point): New
9101 functions.
9102 (mips_remove_point, mips_stopped_by_watchpoint): New
9103 functions.
9104 (rsp_bp_type_to_target_hw_bp_type): New function.
9105 (mips_stopped_data_address): New function.
9106 (the_low_target): Add watchpoint support functions.
9107
9108 2013-07-27 Yao Qi <yao@codesourcery.com>
9109
9110 * i386-low.c: Include break-common.h.
9111 (enum target_hw_bp_type): Remove.
9112
9113 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9114
9115 * Makefile.in (SFILES): /common/target-common.c.
9116 (OBS): Add target-common.o.
9117 (server_h): Add $(srcdir)/../common/target-common.h.
9118 (target-common.o): New target.
9119 * server.c (queue_stop_reply_callback): Free
9120 status string after use.
9121 * target.c (target_waitstatus_to_string): Remove.
9122 * target.h: Include target-common.h.
9123 (resume_kind): Likewise.
9124 (target_waitkind): Likewise.
9125 (target_waitstatus): Likewise.
9126 (TARGET_WNOHANG): Likewise.
9127
9128 2013-07-04 Yao Qi <yao@codesourcery.com>
9129
9130 * Makefile.in (host_alias): Use @host_noncanonical@.
9131 (target_alias): Use @target_noncanonical@.
9132 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9133 ACX_NONCANONICAL_HOST.
9134 * configure: Regenerated.
9135
9136 Revert:
9137 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9138
9139 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9140 * configure: Rebuild.
9141 * Makefile.in (version_host, version_target): Get from configure.
9142 (version.c): Use $(version_host) and $(version_target).
9143
9144 2013-07-03 Pedro Alves <palves@redhat.com>
9145
9146 * Makefile.in (config.status): Depend on development.sh.
9147 * acinclude.m4: Include libmcheck.m4.
9148 * configure: Regenerate.
9149
9150 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9151
9152 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9153 attribute inside the parentheses.
9154 (winapi_DebugSetProcessKillOnExit): Ditto.
9155 (winapi_DebugBreakProcess): Ditto.
9156 (winapi_GenerateConsoleCtrlEvent): Ditto.
9157
9158 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9159
9160 * notif.h (notif_event): Add a dummy member to avoid compiler
9161 errors.
9162
9163 2013-07-01 Pedro Alves <palves@redhat.com>
9164
9165 * hostio.c (HOSTIO_PATH_MAX): Define.
9166 (require_filename, handle_open, handle_unlink, handle_readlink):
9167 Use it.
9168
9169 2013-07-01 Pedro Alves <palves@redhat.com>
9170
9171 * server.h: Include "pathmax.h".
9172 * linux-low.c: Don't include sys/param.h.
9173 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9174 MAXPATHLEN.
9175 * win32-low.c: Don't include sys/param.h.
9176 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9177
9178 2013-07-01 Pedro Alves <palves@redhat.com>
9179
9180 * event-loop.c: Don't check HAVE_UNISTD_H before including
9181 <unistd.h>.
9182 * gdbreplay.c: Likewise.
9183 * remote-utils.c: Likewise.
9184 * server.c: Likewise.
9185 * configure.ac: Don't check for unistd.h.
9186 * configure: Regenerate.
9187
9188 2013-06-28 Tom Tromey <tromey@redhat.com>
9189
9190 * Makefile.in (version.c): Use version.in, not
9191 common/version.in.
9192
9193 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9194
9195 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9196 * configure: Rebuild.
9197 * Makefile.in (version_host, version_target): Get from configure.
9198 (version.c): Use $(version_host) and $(version_target).
9199
9200 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9201
9202 Fix trace-status to output user name without trailing colon.
9203 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9204
9205 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9206
9207 Fix trace-status to output proper start-time and stop-time.
9208 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9209 output start time and stop time in hex as gdb expects.
9210
9211 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9212
9213 * tracepoint.c (build_traceframe_info_xml): Output trace state
9214 variables present in the trace buffer.
9215
9216 2013-06-24 Tom Tromey <tromey@redhat.com>
9217
9218 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9219 create-version.sh.
9220 (version.o): Remove.
9221 * gdbreplay.c: Include version.h.
9222 (version, host_name): Don't declare.
9223 * server.h: Include version.h.
9224 (version, host_name): Don't declare.
9225
9226 2013-06-12 Pedro Alves <palves@redhat.com>
9227
9228 * linux-x86-low.c (linux_is_elf64): Delete global.
9229 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9230 with local linux_pid_exe_is_elf_64_file use.
9231
9232 2013-06-11 Pedro Alves <palves@redhat.com>
9233
9234 * linux-low.c (regset_disabled, disable_regset): New functions.
9235 (regsets_fetch_inferior_registers)
9236 (regsets_store_inferior_registers): Use them.
9237 (initialize_regsets_info); Don't allocate the disabled_regsets
9238 array here.
9239 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9240 comment.
9241
9242 2013-06-11 Pedro Alves <palves@redhat.com>
9243
9244 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9245 xmalloc.
9246
9247 2013-06-11 Pedro Alves <palves@redhat.com>
9248
9249 * linux-x86-low.c (initialize_low_arch): Call
9250 init_registers_x32_avx_linux.
9251
9252 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9253
9254 Fix compatibility with Android Bionic.
9255 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9256 it is not empty.
9257
9258 2013-06-07 Pedro Alves <palves@redhat.com>
9259
9260 PR server/14823
9261 * Makefile.in (OBS): Add tdesc.o.
9262 (IPA_OBJS): Add tdesc-ipa.o.
9263 (tdesc-ipa.o): New rule.
9264 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9265 interface.
9266 * linux-low.c (new_inferior): Delete.
9267 (disabled_regsets, num_regsets): Delete.
9268 (linux_add_process): Adjust to set the new per-process
9269 new_inferior flag.
9270 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9271 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9272 was a stop. When calling arch_setup, switch the current inferior
9273 to the thread that got an event.
9274 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9275 (regsets_fetch_inferior_registers)
9276 (regsets_store_inferior_registers): New regsets_info parameter.
9277 Adjust to use it.
9278 (linux_register_in_regsets): New regs_info parameter. Adjust to
9279 use it.
9280 (register_addr, fetch_register, store_register): New usrregs_info
9281 parameter. Adjust to use it.
9282 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9283 parameter regs_info. Adjust to use it.
9284 (linux_fetch_registers): Get the current inferior's regs_info, and
9285 adjust to use it.
9286 (linux_store_registers): Ditto.
9287 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9288 (initialize_low): Don't initialize the target_regsets here. Call
9289 initialize_low_arch.
9290 * linux-low.h (target_regsets): Delete declaration.
9291 (struct regsets_info): New.
9292 (struct usrregs_info): New.
9293 (struct regs_info): New.
9294 (struct process_info_private) <new_inferior>: New field.
9295 (struct linux_target_ops): Delete the num_regs, regmap, and
9296 regset_bitmap fields. New field regs_info.
9297 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9298 * i387-fp.c (num_xmm_registers): Delete.
9299 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9300 calls to new interface.
9301 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9302 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9303 Infer the number of xmm registers from the regcache's target
9304 description.
9305 * i387-fp.h (num_xmm_registers): Delete.
9306 * inferiors.c (add_thread): Don't install the thread's regcache
9307 here.
9308 * proc-service.c (gregset_info): Fetch the current inferior's
9309 regs_info. Adjust to use it.
9310 * regcache.c: Include tdesc.h.
9311 (register_bytes, reg_defs, num_registers)
9312 (gdbserver_expedite_regs): Delete.
9313 (get_thread_regcache): If the thread doesn't have a regcache yet,
9314 create one, instead of aborting gdbserver.
9315 (regcache_invalidate_one): Rename to ...
9316 (regcache_invalidate_thread): ... this.
9317 (regcache_invalidate_one): New.
9318 (regcache_invalidate): Only invalidate registers of the current
9319 process.
9320 (init_register_cache): Add target_desc parameter, and use it.
9321 (new_register_cache): Ditto. Assert the target description has a
9322 non zero registers_size.
9323 (regcache_cpy): Add assertions. Adjust.
9324 (realloc_register_cache, set_register_cache): Delete.
9325 (registers_to_string, registers_from_string): Adjust.
9326 (find_register_by_name, find_regno, find_register_by_number)
9327 (register_cache_size): Add target_desc parameter, and use it.
9328 (free_register_cache_thread, free_register_cache_thread_one)
9329 (regcache_release, register_cache_size): New.
9330 (register_size): Add target_desc parameter, and use it.
9331 (register_data, supply_register, supply_register_zeroed)
9332 (supply_regblock, supply_register_by_name, collect_register)
9333 (collect_register_as_string, collect_register_by_name): Adjust.
9334 * regcache.h (struct target_desc): Forward declare.
9335 (struct regcache) <tdesc>: New field.
9336 (init_register_cache, new_register_cache): Add target_desc
9337 parameter.
9338 (regcache_invalidate_thread): Declare.
9339 (regcache_invalidate_one): Delete declaration.
9340 (regcache_release): Declare.
9341 (find_register_by_number, register_cache_size, register_size)
9342 (find_regno): Add target_desc parameter.
9343 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9344 declarations.
9345 * remote-utils.c: Include tdesc.h.
9346 (outreg, prepare_resume_reply): Adjust.
9347 * server.c: Include tdesc.h.
9348 (gdbserver_xmltarget): Delete declaration.
9349 (get_features_xml, process_serial_event): Adjust.
9350 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9351 declare.
9352 (struct process_info) <tdesc>: New field.
9353 (ipa_tdesc): Declare.
9354 * tdesc.c: New file.
9355 * tdesc.h: New file.
9356 * tracepoint.c: Include tdesc.h.
9357 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9358 (get_context_regcache): Adjust to pass ipa_tdesc down.
9359 (do_action_at_tracepoint): Adjust to get the register cache size
9360 from the context regcache's description.
9361 (traceframe_walk_blocks): Adjust to get the register cache size
9362 from the current trace frame's description.
9363 (traceframe_get_pc): Adjust to get current trace frame's
9364 description and pass it down.
9365 (gdb_collect): Adjust to get the register cache size from the
9366 IPA's description.
9367 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9368 (gdbserver_xmltarget): Delete.
9369 (initialize_low_tracepoint): Set the ipa's target description.
9370 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9371 (initialize_low_tracepoint): Set the ipa's target description.
9372 * linux-x86-low.c: Include tdesc.h.
9373 [__x86_64__] (is_64bit_tdesc): New.
9374 (ps_get_thread_area, x86_get_thread_area): Use it.
9375 (i386_cannot_store_register): Rename to ...
9376 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9377 (i386_cannot_fetch_register): Rename to ...
9378 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9379 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9380 to new interface.
9381 (target_regsets): Rename to ...
9382 (x86_regsets): ... this.
9383 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9384 interface.
9385 (x86_siginfo_fixup): Use is_64bit_tdesc.
9386 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9387 (tdesc_x32_avx_linux, tdesc_x32_linux)
9388 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9389 Declare.
9390 (x86_linux_update_xmltarget): Delete.
9391 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9392 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9393 (AMD64_LINUX_USER64_CS): New.
9394 (x86_linux_read_description): New, based on
9395 x86_linux_update_xmltarget.
9396 (same_process_callback): New.
9397 (x86_arch_setup_process_callback): New.
9398 (x86_linux_update_xmltarget): New.
9399 (x86_regsets_info): New.
9400 (amd64_linux_regs_info): New.
9401 (i386_linux_usrregs_info): New.
9402 (i386_linux_regs_info): New.
9403 (x86_linux_regs_info): New.
9404 (x86_arch_setup): Reimplement.
9405 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9406 (x86_emit_ops): Ditto.
9407 (the_low_target): Adjust. Install x86_linux_regs_info,
9408 x86_cannot_fetch_register, and x86_cannot_store_register.
9409 (initialize_low_arch): New.
9410 * linux-ia64-low.c (tdesc_ia64): Declare.
9411 (ia64_fetch_register): Adjust.
9412 (ia64_usrregs_info, regs_info): New globals.
9413 (ia64_regs_info): New function.
9414 (the_low_target): Adjust.
9415 (initialize_low_arch): New function.
9416 * linux-sparc-low.c (tdesc_sparc64): Declare.
9417 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9418 Adjust.
9419 (sparc_arch_setup): New function.
9420 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9421 (the_low_target): Adjust.
9422 (initialize_low_arch): New function.
9423 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9424 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9425 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9426 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9427 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9428 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9429 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9430 (tdesc_powerpc_isa205_vsx64l): Declare.
9431 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9432 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9433 (ppc_set_pc, ppc_get_hwcap): Adjust.
9434 (ppc_usrregs_info): Forward declare.
9435 (!__powerpc64__) ppc_regmap_adjusted: New global.
9436 (ppc_arch_setup): Adjust to the current process'es target
9437 description.
9438 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9439 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9440 (ppc_store_evrregset): Adjust.
9441 (target_regsets): Rename to ...
9442 (ppc_regsets): ... this, and make static.
9443 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9444 (ppc_regs_info): New function.
9445 (the_low_target): Adjust.
9446 (initialize_low_arch): New function.
9447 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9448 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9449 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9450 (tdesc_s390x_linux64v2): Declare.
9451 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9452 (s390_fill_gregset, s390_store_last_break): Adjust.
9453 (target_regsets): Rename to ...
9454 (s390_regsets): ... this, and make static.
9455 (s390_get_pc, s390_set_pc): Adjust.
9456 (s390_get_hwcap): New target_desc parameter, and use it.
9457 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9458 (s390_arch_setup): Adjust to set the current process'es target
9459 description. Don't adjust the regmap.
9460 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9461 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9462 (regs_info_3264): New globals.
9463 (s390_regs_info): New function.
9464 (the_low_target): Adjust.
9465 (initialize_low_arch): New function.
9466 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9467 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9468 [__mips64] (init_registers_mips_linux)
9469 (init_registers_mips_dsp_linux): Delete defines.
9470 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9471 (have_dsp): New global.
9472 (mips_read_description): New, based on mips_arch_setup.
9473 (mips_arch_setup): Reimplement.
9474 (get_usrregs_info): New function.
9475 (mips_cannot_fetch_register, mips_cannot_store_register)
9476 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9477 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9478 (target_regsets): Rename to ...
9479 (mips_regsets): ... this, and make static.
9480 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9481 (dsp_regs_info, regs_info): New globals.
9482 (mips_regs_info): New function.
9483 (the_low_target): Adjust.
9484 (initialize_low_arch): New function.
9485 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9486 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9487 Declare.
9488 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9489 (arm_read_description): New, with bits factored from
9490 arm_arch_setup.
9491 (arm_arch_setup): Reimplement.
9492 (target_regsets): Rename to ...
9493 (arm_regsets): ... this, and make static.
9494 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9495 (arm_regs_info): New function.
9496 (the_low_target): Adjust.
9497 (initialize_low_arch): New function.
9498 * linux-m68k-low.c (tdesc_m68k): Declare.
9499 (target_regsets): Rename to ...
9500 (m68k_regsets): ... this, and make static.
9501 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9502 (m68k_regs_info): New function.
9503 (m68k_arch_setup): New function.
9504 (the_low_target): Adjust.
9505 (initialize_low_arch): New function.
9506 * linux-sh-low.c (tdesc_sharch): Declare.
9507 (target_regsets): Rename to ...
9508 (sh_regsets): ... this, and make static.
9509 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9510 (sh_regs_info, sh_arch_setup): New functions.
9511 (the_low_target): Adjust.
9512 (initialize_low_arch): New function.
9513 * linux-bfin-low.c (tdesc_bfin): Declare.
9514 (bfin_arch_setup): New function.
9515 (bfin_usrregs_info, regs_info): New globals.
9516 (bfin_regs_info): New function.
9517 (the_low_target): Adjust.
9518 (initialize_low_arch): New function.
9519 * linux-cris-low.c (tdesc_cris): Declare.
9520 (cris_arch_setup): New function.
9521 (cris_usrregs_info, regs_info): New globals.
9522 (cris_regs_info): New function.
9523 (the_low_target): Adjust.
9524 (initialize_low_arch): New function.
9525 * linux-cris-low.c (tdesc_crisv32): Declare.
9526 (cris_arch_setup): New function.
9527 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9528 (cris_regs_info): New function.
9529 (the_low_target): Adjust.
9530 (initialize_low_arch): New function.
9531 * linux-m32r-low.c (tdesc_m32r): Declare.
9532 (m32r_arch_setup): New function.
9533 (m32r_usrregs_info, regs_info): New globals.
9534 (m32r_regs_info): Adjust.
9535 (initialize_low_arch): New function.
9536 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9537 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9538 (tic6x_usrregs_info): Forward declare.
9539 (tic6x_read_description): New function, based on ...
9540 (tic6x_arch_setup): ... this. Reimplement.
9541 (target_regsets): Rename to ...
9542 (tic6x_regsets): ... this, and make static.
9543 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9544 (tic6x_regs_info): New function.
9545 (the_low_target): Adjust.
9546 (initialize_low_arch): New function.
9547 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9548 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9549 (target_regsets): Rename to ...
9550 (xtensa_regsets): ... this, and make static.
9551 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9552 globals.
9553 (xtensa_arch_setup, xtensa_regs_info): New functions.
9554 (the_low_target): Adjust.
9555 (initialize_low_arch): New function.
9556 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9557 (nios2_arch_setup): Set the current process'es tdesc.
9558 (target_regsets): Rename to ...
9559 (nios2_regsets): ... this.
9560 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9561 (nios2_regs_info): New function.
9562 (the_low_target): Adjust.
9563 (initialize_low_arch): New function.
9564 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9565 (aarch64_arch_setup): Set the current process'es tdesc.
9566 (target_regsets): Rename to ...
9567 (aarch64_regsets): ... this.
9568 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9569 (aarch64_regs_info): New function.
9570 (the_low_target): Adjust.
9571 (initialize_low_arch): New function.
9572 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9573 globals.
9574 (target_regsets): Rename to ...
9575 (tile_regsets): ... this.
9576 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9577 (tile_regs_info): New function.
9578 (tile_arch_setup): Set the current process'es tdesc.
9579 (the_low_target): Adjust.
9580 (initialize_low_arch): New function.
9581 * spu-low.c (tdesc_spu): Declare.
9582 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9583 * win32-arm-low.c (tdesc_arm): Declare.
9584 (arm_arch_setup): New function.
9585 (the_low_target): Install arm_arch_setup instead of
9586 init_registers_arm.
9587 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9588 (init_windows_x86): Rename to ...
9589 (i386_arch_setup): ... this. Set `win32_tdesc'.
9590 (the_low_target): Adjust.
9591 * win32-low.c (win32_tdesc): New global.
9592 (child_add_thread): Don't create the thread cache here.
9593 (do_initial_child_stuff): Set the new process'es tdesc.
9594 * win32-low.h (struct target_desc): Forward declare.
9595 (win32_tdesc): Declare.
9596 * lynx-i386-low.c (tdesc_i386): Declare global.
9597 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9598 * lynx-low.c (lynx_tdesc): New global.
9599 (lynx_add_process): Set the new process'es tdesc.
9600 * lynx-low.h (struct target_desc): Forward declare.
9601 (lynx_tdesc): Declare global.
9602 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9603 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9604 * nto-low.c (nto_tdesc): New global.
9605 (do_attach): Set the new process'es tdesc.
9606 * nto-low.h (struct target_desc): Forward declare.
9607 (nto_tdesc): Declare.
9608 * nto-x86-low.c (tdesc_i386): Declare.
9609 (nto_x86_arch_setup): Set `nto_tdesc'.
9610
9611 2013-06-04 Gary Benson <gbenson@redhat.com>
9612
9613 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9614 to qSupported response when appropriate.
9615 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9616 with nonzero-length annex.
9617 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9618 arguments supplied in annex.
9619
9620 2013-05-31 Doug Evans <dje@google.com>
9621
9622 PR server/15594
9623 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9624 64 bits in 64-cross-32 environment.
9625
9626 2013-05-28 Pedro Alves <palves@redhat.com>
9627
9628 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9629 (aarch64-without-fpu.c): Delete rule.
9630 * configure.srv (aarch64*-*-linux*): Remove references to
9631 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9632 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9633 declaration.
9634
9635 2013-05-24 Pedro Alves <palves@redhat.com>
9636
9637 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9638 instead of strchr/decode_address. Error if the range isn't split
9639 with a ','. Don't assume there's be a ':' in the action.
9640
9641 2013-05-23 Yao Qi <yao@codesourcery.com>
9642 Pedro Alves <palves@redhat.com>
9643
9644 * linux-low.c (lwp_in_step_range): New function.
9645 (linux_wait_1): If the thread was range stepping and stopped
9646 outside the stepping range, report the stop to GDB. Otherwise,
9647 continue stepping. Add range stepping debug output.
9648 (linux_set_resume_request): Copy the step range from the resume
9649 request to the lwp.
9650 (linux_supports_range_stepping): New.
9651 (linux_target_ops) <supports_range_stepping>: Set to
9652 linux_supports_range_stepping.
9653 * linux-low.h (struct linux_target_ops)
9654 <supports_range_stepping>: New field.
9655 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9656 * linux-x86-low.c (x86_supports_range_stepping): New.
9657 (the_low_target) <supports_range_stepping>: Set to
9658 x86_supports_range_stepping.
9659 * server.c (handle_v_cont): Handle 'r' action.
9660 (handle_v_requests): Append ";r" if the target supports range
9661 stepping.
9662 * target.h (struct thread_resume) <step_range_start,
9663 step_range_end>: New fields.
9664 (struct target_ops) <supports_range_stepping>:
9665 New field.
9666 (target_supports_range_stepping): New macro.
9667
9668 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9669
9670 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9671 confusion in comment.
9672
9673 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9674
9675 * lynx-low.c (struct process_info_private): New type.
9676 (lynx_add_process): New function.
9677 (lynx_create_inferior, lynx_attach): Replace calls to
9678 add_process by calls to lynx_add_process.
9679 (lynx_resume): If PTID is null, then try using
9680 current_process()->private->last_wait_event_ptid.
9681 Add comments.
9682 (lynx_clear_inferiors): Delete. The contents of that function
9683 has been inlined in lynx_mourn;
9684 (lynx_wait_1): Save the ptid in the process's private data.
9685 (lynx_mourn): Free the process' private data. Replace call
9686 to lynx_clear_inferiors by call to clear_inferiors.
9687
9688 2013-05-17 Yao Qi <yao@codesourcery.com>
9689
9690 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9691 the right place.
9692
9693 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9694
9695 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9696 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9697 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9698 PT_TEXT_END_ADDR guards. Update comments.
9699 (linux_target_op) <read_offsets>: Conditionally define to
9700 linux_read_offsets if the target is UCLIBC and if it defines
9701 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9702
9703 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9704 Andrew Jenner <andrew@codesourcery.com>
9705
9706 * Makefile.in (SFILES): Add linux-nios2-low.c.
9707 (clean): Add action to delete nios2-linux.c.
9708 (nios2-linux.c): New rule.
9709 * configure.srv: Add nios2*-*-linux*.
9710 * linux-nios2-low.c: New.
9711
9712 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9713
9714 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9715
9716 2013-04-25 Hui Zhu <hui@codesourcery.com>
9717
9718 PR gdb/15186
9719 * ax.c (ax_printf): Add fflush.
9720
9721 2013-04-22 Tom Tromey <tromey@redhat.com>
9722
9723 * Makefile.in (SFILES): Add filestuff.c.
9724 (OBS): Add filestuff.o.
9725 (filestuff.o): New target.
9726 * config.in, configure: Rebuild.
9727 * configure.ac: Check for fdwalk, pipe2.
9728
9729 2013-04-17 Pedro Alves <palves@redhat.com>
9730
9731 * configure.ac (USE_THREAD_DB): Delete variable.
9732 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9733 Don't AC_SUBST USE_THREAD_DB.
9734 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9735 * config.in, configure: Regenerate.
9736
9737 2013-04-16 Pedro Alves <palves@redhat.com>
9738
9739 * linux-low.h (struct lwp_info) <thread_known>: Move under
9740 the USE_THREAD_DB #ifdef.
9741
9742 2013-04-16 Pedro Alves <palves@redhat.com>
9743
9744 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9745 (linux-low.o): Delete rule.
9746 * linux-low.h: Always include "gdb_thread_db.h" instead of
9747 conditionally including thread_db.h.
9748 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9749 HAVE_THREAD_DB_H.
9750
9751 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9752
9753 * Makefile.in (install-only): Fix make install regression.
9754
9755 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9756
9757 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9758 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9759 installation.
9760 * gdbserver.1: Remove.
9761
9762 2013-03-22 Pedro Alves <palves@redhat.com>
9763
9764 * linux-low.c (handle_extended_wait): Don't call
9765 linux_enable_event_reporting.
9766
9767 2013-03-15 Tony Theodore <tonyt@logyst.com>
9768
9769 PR build/9098:
9770 * Makefile.in (SHELL): Use @SHELL@.
9771
9772 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9773
9774 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9775 compiler warning.
9776
9777 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9778
9779 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9780 Remove extraneous NULL element.
9781
9782 2013-03-13 Yao Qi <yao@codesourcery.com>
9783
9784 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9785 'V' block in trace frame.
9786
9787 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9788
9789 * target.h (struct target_ops): Add btrace ops.
9790 (target_supports_btrace): New macro.
9791 (target_enable_btrace): New macro.
9792 (target_disable_btrace): New macro.
9793 (target_read_btrace): New macro.
9794 * gdbthread.h (struct thread_info): Add btrace field.
9795 * server.c: Include btrace-common.h.
9796 (handle_btrace_general_set): New function.
9797 (handle_btrace_enable): New function.
9798 (handle_btrace_disable): New function.
9799 (handle_general_set): Call handle_btrace_general_set.
9800 (handle_qxfer_btrace): New function.
9801 (struct qxfer qxfer_packets[]): Add btrace entry.
9802 * inferiors.c (remove_thread): Disable btrace.
9803 * linux-low: Include linux-btrace.h.
9804 (linux_low_enable_btrace): New function.
9805 (linux_low_read_btrace): New function.
9806 (linux_target_ops): Add btrace ops.
9807 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9808 Add srv_linux_btrace=yes.
9809 (x86_64-*-linux*): Add linux-btrace.o.
9810 Add srv_linux_btrace=yes.
9811 * configure.ac: Define HAVE_LINUX_BTRACE.
9812 * config.in: Regenerated.
9813 * configure: Regenerated.
9814
9815 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9816
9817 * server.c (handle_qxfer): Preserve error message if -3 is
9818 returned.
9819 (qxfer): Document the -3 return value.
9820
9821 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9822
9823 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9824 (linux_btrace_h): New variable.
9825 (linux-btrace.o): New rule.
9826
9827 2013-03-08 Stan Shebs <stan@codesourcery.com>
9828 Hafiz Abid Qadeer <abidh@codesourcery.com>
9829
9830 * tracepoint.c (trace_buffer_size): New global.
9831 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9832 (init_trace_buffer): Change to one-argument function. Allocate
9833 trace buffer memory.
9834 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9835 handle QTBuffer:size packet.
9836 (cmd_bigqtbuffer_size): New function.
9837 (initialize_tracepoint): Call init_trace_buffer with
9838 DEFAULT_TRACE_BUFFER_SIZE.
9839 * server.c (handle_query): Add QTBuffer:size in the
9840 supported packets.
9841
9842 2013-03-07 Yao Qi <yao@codesourcery.com>
9843
9844 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9845 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9846 of -1.
9847 (cmd_qtsp): Adjust condition. Do post increment.
9848 Set cur_action and cur_step_action back to 0.
9849
9850 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9851
9852 PR server/15236
9853 * linux-low.c (linux_write_memory): Return early success if LEN is
9854 zero.
9855
9856 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9857
9858 * configure.srv: Add x86_64-*-cygwin* as target.
9859
9860 2013-02-28 Tom Tromey <tromey@redhat.com>
9861
9862 * configure.ac: Invoke AC_SYS_LARGEFILE.
9863 * configure, config.in: Rebuild.
9864
9865 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9866
9867 * win32-low.c: Throughout, fix format strings and casts of
9868 printf-like functions to avoid type related warnings on all
9869 platforms.
9870 (get_child_debug_event): Print dwDebugEventCode as hex since
9871 that's how it's usually documented.
9872
9873 2013-02-28 Yao Qi <yao@codesourcery.com>
9874
9875 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9876 pulongest.
9877
9878 2013-02-27 Jiong Wang <jiwang@tilera.com>
9879
9880 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9881 (reg-tilegx32.c): New rule.
9882 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9883 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9884 different register info initializer according to elf class.
9885 (init_registers_tilgx32): New function. The tilegx32 register info
9886 initializer.
9887 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9888 (tile_store_gregset): Likewise.
9889
9890 2013-02-27 Yao Qi <yao@codesourcery.com>
9891
9892 * server.c (process_point_options): Print debug message when
9893 debug_threads is true.
9894
9895 2013-02-26 Yao Qi <yao@codesourcery.com>
9896
9897 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9898
9899 2013-02-19 Pedro Alves <palves@redhat.com>
9900 Kai Tietz <ktietz@redhat.com>
9901
9902 PR gdb/15161
9903
9904 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9905 instead of strtoul to extract address from packet.
9906 (process_serial_event) <'z'>: Likewise.
9907
9908 2013-02-18 Yao Qi <yao@codesourcery.com>
9909
9910 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9911
9912 2013-02-14 Pedro Alves <palves@redhat.com>
9913
9914 Plug memory leak.
9915
9916 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9917 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9918
9919 2013-02-14 Pedro Alves <palves@redhat.com>
9920
9921 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9922
9923 2013-02-14 Pedro Alves <palves@redhat.com>
9924
9925 * tracepoint.c (save_string): Delete.
9926 (add_tracepoint_action): Use savestring instead of save_string.
9927
9928 2013-02-12 Pedro Alves <palves@redhat.com>
9929
9930 * linux-xtensa-low.c: Ditto.
9931 * xtensa-xtregs.c: Ditto.
9932
9933 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9934
9935 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9936 thread_db.
9937
9938 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9939
9940 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9941 aarch64_num_wp_regs and aarch64_num_bp_regs to
9942 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9943
9944 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9945
9946 * linux-aarch64-low.c (ps_get_thread_area): Replace
9947 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9948
9949 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9950 Marcus Shawcroft <marcus.shawcroft@arm.com>
9951 Nigel Stephens <nigel.stephens@arm.com>
9952 Yufeng Zhang <yufeng.zhang@arm.com>
9953
9954 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9955 (aarch64.c, aarch64-without-fpu.c): New targets.
9956 * configure.srv (aarch64*-*-linux*): New.
9957 * linux-aarch64-low.c: New file.
9958
9959 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9960
9961 * linux-low.c (handle_extended_wait, linux_create_inferior)
9962 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9963 (dequeue_one_deferred_signal, linux_resume_one_thread)
9964 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9965 (linux_tracefork_grandchild, linux_test_for_tracefork)
9966 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9967 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9968 where the argument is 0.
9969
9970 2013-01-25 Yao Qi <yao@codesourcery.com>
9971
9972 * event-loop.c: Include "queue.h".
9973 (gdb_event_p): New typedef.
9974 (struct gdb_event) <next_event>: Remove.
9975 (event_queue): Change to QUEUE(gdb_event_p).
9976 (async_queue_event): Remove.
9977 (gdb_event_xfree): New.
9978 (initialize_event_loop): New.
9979 (process_event): Use API from QUEUE.
9980 (wait_for_event): Likewise.
9981 * server.c (main): Call initialize_event_loop.
9982 * server.h (initialize_event_loop): Declare.
9983
9984 2013-01-18 Yao Qi <yao@codesourcery.com>
9985
9986 * ax.h (struct eval_agent_expr_context): New.
9987 (gdb_eval_agent_expr): Update declaration.
9988 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9989 TFRAME. Add new argument CTX.
9990 * server.h (struct eval_agent_expr_context): Declare.
9991 (agent_mem_read, agent_tsv_read): Update declaration.
9992 (agent_mem_read_string): Likewise.
9993 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9994 (add_traceframe_block): Add new argument TPOINT.
9995 Increase TPOINT->traceframe_usage.
9996 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9997 eval_tracepoint_agent_expr.
9998 (condition_true_at_tracepoint): Likewise.
9999 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10000 (agent_mem_read_string, agent_tsv_read): Likewise.
10001
10002 2013-01-16 Yao Qi <yao@codesourcery.com>
10003
10004 * linux-low.c (linux_resume_one_lwp): Don't check
10005 'lwp->bp_reinsert != 0'.
10006
10007 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10008 Pedro Alves <palves@redhat.com>
10009
10010 * lynx-low.c (ptrace_request_to_str): Define a temporary
10011 macro and use it to simplify this function's implementation.
10012
10013 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10014
10015 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10016 sets errno.
10017
10018 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10019
10020 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10021
10022 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10023
10024 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10025
10026 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10027
10028 * lynx-low.c (lynx_resume): Use the resume_info parameter
10029 to determine the ptid for the lynx_ptrace call, unless
10030 it is equal to minus_one_ptid, in which case we use the
10031 ptid of the current_inferior.
10032 (lynx_wait_1): After having received a thread create/exit
10033 event, resume the inferior's execution using the signaling
10034 thread's ptid, rather than the old ptid.
10035
10036 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10037
10038 * lynx-low.c (lynx_resume): Delete variable ret.
10039
10040 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10041
10042 * gdbreplay.c (gdbreplay_version): Update copyright year.
10043 * server.c (gdbserver_version): Likewise.
10044
10045 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10046
10047 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10048 new thread.
10049
10050 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10051
10052 * lynx-low.c (ptrace_request_to_str): Add handling for
10053 PTRACE_GETTRACESIG.
10054
10055 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10056
10057 * lynx-low.c (lynx_attach): Delete variable new_process.
10058
10059 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10060
10061 * lynx-low.c (lynx_create_inferior): Delete variable
10062 new_process.
10063
10064 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10065
10066 * lynx-low.c (ptrace_request_to_str): Do not handle
10067 PTRACE_GETTHREADLIST if this macro does not exist.
10068
10069 2012-12-15 Yao Qi <yao@codesourcery.com>
10070
10071 * Makefile.in (OBS): Add notif.o.
10072 * notif.c, notif.h: New.
10073 * server.c: Include "notif.h".
10074 (struct vstop_notif) <next>: Remove.
10075 <base>: New field.
10076 (queue_stop_reply): Update.
10077 (push_event, send_next_stop_reply): Remove.
10078 (discard_queued_stop_replies): Update.
10079 (notif_stop): New variable.
10080 (handle_v_stopped): Remove.
10081 (handle_v_requests): Don't call handle_v_stopped. Call
10082 handle_ack_notif instead.
10083 (queue_stop_reply_callback): Call notif_event_enque instead
10084 of queue_stop_reply.
10085 (handle_status): Don't call send_next_stop_reply, call
10086 notif_write_event instead.
10087 (kill_inferior_callback): Likewise.
10088 (detach_or_kill_inferior_callback): Likewise.
10089 (main): Call initialize_notif.
10090 (process_serial_event): Call QUEUE_is_empty.
10091 (handle_target_event): Call notif_push instead of push event.
10092 * server.h (push_event): Remove declaration.
10093
10094 2012-12-10 Tom Tromey <tromey@redhat.com>
10095
10096 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10097 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10098 macros.
10099 (.c.o): Rewrite.
10100 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10101 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10102 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10103 (amd64-linux-ipa.o, ax.o): Rewrite.
10104 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10105 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10106 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10107 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10108 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10109 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10110 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10111 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10112 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10113 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10114 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10115 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10116 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10117 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10118 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10119 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10120 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10121 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10122 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10123 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10124 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10125 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10126 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10127 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10128 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10129 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10130 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10131 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10132 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10133 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10134 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10135 (reg-tilegx.o): Remove.
10136 (all_object_files): New macro.
10137 Include .deps files.
10138 * aclocal.m4, configure: Rebuild.
10139 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10140 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10141 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10142
10143 2012-12-05 Tom Tromey <tromey@redhat.com>
10144
10145 PR gdb/14917:
10146 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10147
10148 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10149
10150 * configure.ac: Check for linux/perf_event.h.
10151 * config.in: Regenerated.
10152 * configure: Regenerated.
10153
10154 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10155
10156 * hostio.c (handle_readlink): Decrease buffer size
10157 parameter passed to readlink by one byte.
10158
10159 2012-11-26 Yao Qi <yao@codesourcery.com>
10160
10161 * configure.ac (build_warnings): Append '-Wempty-body'.
10162 * configure: Regenerated.
10163 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10164 body.
10165
10166 2012-11-15 Pierre Muller <muller@sourceware.org>
10167
10168 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10169 * config.in: Regenerate.
10170 * configure: Regenerate.
10171 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10172 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10173 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10174 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10175 header.
10176 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10177 instead of <sys/wait.h> header.
10178 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10179
10180 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10181
10182 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10183 (various make rules): Remove -DGDBSERVER
10184
10185 2012-11-09 Yao Qi <yao@codesourcery.com>
10186
10187 * spu-low.c (current_ptid): Move it to ..
10188 * gdbthread.h: ... here. New.
10189 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10190 * server.c (myresume, process_serial_event): Likewise.
10191 * thread-db.c (thread_db_find_new_threads): Likewise.
10192 * tracepoint.c (run_inferior_command): Likewise.
10193
10194 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10195
10196 * server.c (handle_search_memory_1): Include access length in
10197 warning message.
10198
10199 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10200
10201 * linux-crisv32-low.c: Fix compile errors.
10202
10203 2012-09-04 Yao Qi <yao@codesourcery.com>
10204
10205 * tracepoint.c (cmd_qtsv): Adjust debug message.
10206 Don't check CUR_TPOINT.
10207
10208 2012-08-28 Yao Qi <yao@codesourcery.com>
10209
10210 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10211 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10212 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10213 Remove declarations of xmalloc, xreallloc, xstrdup and
10214 freeargv.
10215 * Makefile.in (libiberty_h): New.
10216 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10217 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10218
10219 2012-08-23 Yao Qi <yao@codesourcery.com>
10220
10221 * server.h: Remove declaration of 'xsnprintf'.
10222
10223 2012-08-22 Keith Seitz <keiths@redhat.com>
10224
10225 * server.h: Include build-gnulib-gbserver/config.h.
10226 * gdbreplay.c: Likewise.
10227
10228 2012-08-08 Doug Evans <dje@google.com>
10229
10230 * Makefile.in (SFILES): Add gdb_vecs.c.
10231 (OBS): Add gdb_vecs.o.
10232 (gdb_vecs_h, host_defs_h): New variables.
10233 (thread-db.o): Add $(gdb_vecs_h) dependency.
10234 (gdb_vecs.o): New rule.
10235 * thread-db.c: #include "gdb_vecs.h".
10236 (thread_db_load_search): Use a vector to iterate over path elements.
10237 Handle text appearing after "$pdir".
10238
10239 * configure.ac: Add check for strstr.
10240 * config.in: Regenerate.
10241 * configure: Regenerate.
10242
10243 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10244
10245 * hostio.c (handle_pread): If pread fails, fall back to attempting
10246 lseek/read.
10247 (handle_pwrite): Likewise for pwrite.
10248
10249 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10250
10251 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10252 between unsupported TYPE and unimplementable ADDR/LEN combination.
10253 (arm_insert_point): Act on new return value.
10254
10255 2012-07-31 Pedro Alves <palves@redhat.com>
10256
10257 * server.c (process_point_options): Only skip tokens if we find
10258 one that is unrecognized. Don't treat 'X' specially while
10259 skipping unrecognized tokens.
10260
10261 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10262
10263 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10264 to 4-byte-align HW breakpoint addresses for Thumb.
10265
10266 2012-07-27 Yao Qi <yao@codesourcery.com>
10267
10268 PR remote/14161.
10269
10270 * server.h: Declare gdb_agent_about_to_close.
10271 * target.c (kill_inferior): Include "agent.h".
10272 New. Send command 'kill'.
10273 * target.h (kill_inferior): Removed macro.
10274 * tracepoint.c (gdb_agent_about_to_close): New.
10275 (gdb_agent_helper_thread): Handle command 'close'.
10276 Wait endlessly until the inferior stops.
10277 Install gdb_agent_remove_socket to atexit hook.
10278 (agent_socket_name): New static variable.
10279 (gdb_agent_socket_init): Replace local variable 'name' with
10280 'agent_socket_name'.
10281 (gdb_agent_remove_socket): New.
10282
10283 2012-07-27 Yao Qi <yao@codesourcery.com>
10284
10285 * server.c (process_point_options): Stop at 'X' when parsing.
10286
10287 2012-07-19 Michael Eager <eager@eagercon.com>
10288
10289 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10290 to hw_execute.
10291 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10292 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10293 hardware breakpoint.
10294
10295 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10296
10297 * gdbserver/linux-low.c (initialize_low): Call
10298 linux_ptrace_init_warnings.
10299
10300 2012-07-02 Doug Evans <dje@google.com>
10301
10302 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10303 pointer to int.
10304
10305 2012-07-02 Stan Shebs <stan@codesourcery.com>
10306
10307 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10308 (ax.o): Add it to build rule.
10309 (ax-ipa.o): Ditto.
10310 (OBS): Add format.o.
10311 (IPA_OBS): Add format.o.
10312 * server.c (handle_query): Claim support for breakpoint commands.
10313 (process_point_options): Add command case.
10314 (process_serial_event): Leave running if there are printfs in
10315 effect.
10316 * mem-break.h (any_persistent_commands): Declare.
10317 (add_breakpoint_commands): Declare.
10318 (gdb_no_commands_at_breakpoint): Declare.
10319 (run_breakpoint_commands): Declare.
10320 * mem-break.c (struct point_command_list): New struct.
10321 (struct breakpoint): New field command_list.
10322 (any_persistent_commands): New function.
10323 (add_commands_to_breakpoint): New function.
10324 (add_breakpoint_commands): New function.
10325 (gdb_no_commands_at_breakpoint): New function.
10326 (run_breakpoint_commands): New function.
10327 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10328 locally.
10329 * ax.c: Include format.h.
10330 (ax_printf): New function.
10331 (gdb_eval_agent_expr): Add printf opcode.
10332
10333 2012-06-13 Yao Qi <yao@codesourcery.com>
10334
10335 * server.c (start_inferior): Remove duplicated writes to fields
10336 'last_resume_kind' and 'last_status' of 'current_inferior'.
10337
10338 2012-06-12 Yao Qi <yao@codesourcery.com>
10339 Pedro Alves <palves@redhat.com>
10340
10341 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10342 comment.
10343 * server.c (handle_v_cont): Extend comment.
10344
10345 2012-06-11 Yao Qi <yao@codesourcery.com>
10346
10347 * linux-low.c (linux_attach): Add 'static'.
10348
10349 2012-06-06 Yao Qi <yao@codesourcery.com>
10350
10351 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10352
10353 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10354
10355 Fix gcc -flto compilation warning.
10356 * server.c (main): Make variable multi_mode and attach volatile.
10357
10358 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10359
10360 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10361 if the platform doesn't know about it.
10362
10363 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10364
10365 * Makefile.in (SFILES): Add linux-tile-low.c.
10366 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10367 * configure.srv: Handle tilegx-*-linux*.
10368 * linux-tile-low.c: New file.
10369
10370 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10371
10372 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10373
10374 2012-05-24 Pedro Alves <palves@redhat.com>
10375
10376 PR gdb/7205
10377
10378 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10379
10380 2012-05-24 Pedro Alves <palves@redhat.com>
10381
10382 PR gdb/7205
10383
10384 Replace target_signal with gdb_signal throughout.
10385
10386 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10387
10388 * linux-low.c (linux_store_registers): Avoid the copying sequence
10389 when no data has been retrieved by ptrace.
10390
10391 2012-05-22 Will Deacon <will.deacon@arm.com>
10392
10393 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10394 Include asm/ptrace.h.
10395 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10396 already defined.
10397
10398 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10399
10400 * linux-low.c (linux_store_registers): Don't re-retrieve data
10401 with ptrace that has already been obtained from /proc. Always
10402 copy any data retrieved with ptrace to the buffer supplied.
10403
10404 2012-05-11 Yao Qi <yao@codesourcery.com>
10405 Pedro Alves <palves@redhat.com>
10406
10407 * linux-low.c (enum stopping_threads_kind): New.
10408 (stopping_threads): Change type to `enum stopping_threads_kind'.
10409 (handle_extended_wait): If stopping and suspending threads, leave
10410 the new_lwp suspended too.
10411 (linux_wait_for_event): Adjust.
10412 (stop_all_lwps): Set `stopping_threads' to
10413 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10414 whether we're suspending threads or just stopping them. Assert no
10415 recursion happens.
10416
10417 2012-04-29 Yao Qi <yao@codesourcery.com>
10418
10419 * server.h: Move some code to ...
10420 * gdbthread.h: ... here. New.
10421 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10422 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10423 (nto-low.o, win32-low.o): Likewise.
10424 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10425 * regcache.c, remote-utils.c, server.c: Likewise.
10426 * target.c, tracepoint.c, win32-low.c: Likewise.
10427
10428 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10429
10430 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10431 (PTRACE_ARG4_TYPE): Likewise.
10432 (PTRACE_XFER_TYPE): Likewise.
10433 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10434 ptrace to PTRACE_ARG3_TYPE.
10435 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10436 (PTRACE_ARG4_TYPE): Likewise.
10437 (PTRACE_XFER_TYPE): Likewise.
10438 (linux_detach_one_lwp): Cast fourth argument of
10439 ptrace to long then PTRACE_ARG4_TYPE.
10440 (regsets_fetch_inferior_registers): Cast third argument of
10441 ptrace to long then PTRACE_ARG3_TYPE.
10442 (regsets_store_inferior_registers): Likewise.
10443
10444 2012-04-20 Pedro Alves <palves@redhat.com>
10445
10446 * configure: Regenerate.
10447
10448 2012-04-19 Pedro Alves <palves@redhat.com>
10449
10450 * Makefile.in (GNULIB_BUILDDIR): New.
10451 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10452 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10453 (all, install-only, uninstall, clean-info, all-lib, clean): No
10454 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10455 (maintainer-clean realclean distclean): Use subdir_do.
10456 (subdir_do): New.
10457 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10458 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10459 * acinclude.m4: Include acx_configure_dir.m4.
10460 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10461 calls. Call AC_PROG_RANLIB. Configure gnulib using
10462 ACX_CONFIGURE_DIR.
10463 (GNULIB): New.
10464 (GNULIB_STDINT_H): Adjust.
10465 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10466 * gdbreplay.c: Include build-gnulib/config.h.
10467 * server.h: Likewise.
10468 * aclocal.m4: Regenerate.
10469 * config.in: Regenerate.
10470 * configure: Regenerate.
10471
10472 2012-04-19 Pedro Alves <palves@redhat.com>
10473
10474 * Makefile.in (LIBGNU, INCGNU): Adjust.
10475 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10476 (all, install-only, uninstall, clean-info, all-lib, clean)
10477 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10478 * configure.ac: Adjust AC_OUTPUT output.
10479 * aclocal.m4: Regenerate.
10480 * configure: Regenerate.
10481
10482 2012-04-19 Pedro Alves <palves@redhat.com>
10483
10484 * Makefile.in (generated_files): New.
10485 (server_h): Remove the explicit dependency on config.h, and depend
10486 on $generated_files.
10487
10488 2012-04-19 Pedro Alves <palves@redhat.com>
10489
10490 * Makefile.in (INCGNU): Add -Ignulib.
10491
10492 2012-04-19 Pedro Alves <palves@redhat.com>
10493
10494 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10495 (INCGNU): ... this, and spell out -I here.
10496 (GNULIB_LIB): Rename to ...
10497 (LIBGNU): ... this.
10498 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10499
10500 2012-04-19 Pedro Alves <palves@redhat.com>
10501
10502 * config.in: Regenerate.
10503
10504 2012-04-19 Pedro Alves <palves@redhat.com>
10505
10506 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10507 * server.h (memmem): Remove declaration.
10508 * config.in: Regenerate.
10509 * configure: Regenerate.
10510
10511 2012-04-19 Yao Qi <yao@codesourcery.com>
10512
10513 * Makefile.in (SFILES): Add common/vec.c.
10514 (OBS): Add vec.o.
10515 (vec.o): New rule.
10516
10517 2012-04-19 Yao Qi <yao@codesourcery.com>
10518
10519 * remote-utils.c (prepare_resume_reply): Replace with macro
10520 target_core_of_thread.
10521 * server.c (handle_qxfer_threads_proper): Likewise.
10522 * target.h (traget_core_of_thread): New macro.
10523
10524 2012-04-18 Pedro Alves <palves@redhat.com>
10525
10526 * aclocal.m4: Regenerate.
10527 * configure: Regenerate.
10528
10529 2012-04-16 Yao Qi <yao@codesourcery.com>
10530
10531 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10532 duplicated on address.
10533
10534 2012-04-16 Yao Qi <yao@codesourcery.com>
10535
10536 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10537 (struct tracepoint_action_ops) <send>: New field.
10538 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10539 (agent_expr_send, x_tracepoint_action_send): New.
10540 (l_tracepoint_action_send): New.
10541 (cmd_qtdp): Download and install tracepoint
10542 according to `use_agent'.
10543 (run_inferior_command): Add one more parameter `len'.
10544 Update callers.
10545 (tracepoint_send_agent): New.
10546 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10547
10548 2012-04-16 Yao Qi <yao@codesourcery.com>
10549
10550 * tracepoint.c (download_tracepoints): Moved to ...
10551 (cmd_qtstart): ... here.
10552
10553 2012-04-14 Yao Qi <yao@codesourcery.com>
10554
10555 * tracepoint.c: Include inttypes.h.
10556 (struct collect_memory_action): Use sized types.
10557 (struct tracepoint): Likewise.
10558 (cmd_qtdp, stop_tracing): Update print specifiers.
10559 (cmd_qtp, response_tracepoint): Likewise.
10560 (collect_data_at_tracepoint): Likewise.
10561 (collect_data_at_step): Likewise.
10562
10563 2012-04-14 Yao Qi <yao@codesourcery.com>
10564
10565 Import gnulib module inttypes.
10566 * aclocal.m4, config.in, configure: Regenerated.
10567
10568 2012-04-14 Yao Qi <yao@codesourcery.com>
10569
10570 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10571 Makefile and config.status at last.
10572
10573 2012-04-13 Yao Qi <yao@codesourcery.com>
10574
10575 * tracepoint.c: Include stdint.h unconditionally.
10576
10577 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10578
10579 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10580 on BFD_HAVE_SYS_PROCFS_TYPE.
10581 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10582 * configure: Regenerate.
10583 * config.in: Likewise.
10584
10585 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10586
10587 * Makefile.in (clean): Also remove x32.c x32-linux.c
10588 x32-avx.c x32-avx-linux.c.
10589 (x32.o): New target.
10590 (x32.c): Likewise.
10591 (x32-linux.o): Likewise.
10592 (x32-linux.c): Likewise.
10593 (x32-avx.o): Likewise.
10594 (x32-avx.c): Likewise.
10595 (x32-avx-linux.o): Likewise.
10596 (x32-avx-linux.c): Likewise.
10597
10598 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10599 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10600 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10601 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10602 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10603 i386/x32-avx-linux.xml.
10604
10605 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10606 (init_registers_x32_avx_linux): Likwise.
10607 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10608 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10609
10610 2012-04-13 Pedro Alves <palves@redhat.com>
10611
10612 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10613 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10614 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10615 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10616 the sub-make.
10617
10618 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10619
10620 * linux-x86-low.c (compat_x32_clock_t): New.
10621 (compat_x32_siginfo_t): Likewise.
10622 (compat_x32_siginfo_from_siginfo): Likewise.
10623 (siginfo_from_compat_x32_siginfo): Likewise.
10624 (linux_is_elf64): Likewise.
10625 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10626 and siginfo_from_compat_x32_siginfo for x32.
10627 (x86_arch_setup): Set linux_is_elf64.
10628
10629 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10630
10631 PR gdb/13969
10632 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10633 e_machine field.
10634 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10635 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10636 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10637 compatible with process.
10638
10639 2012-04-12 Yao Qi <yao@codesourcery.com>
10640
10641 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10642 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10643 (install-only, install-info, clean): Handle sub dir gnulib.
10644 (all-lib, am--refresh): New targets.
10645 (memmem.o): Remove target.
10646 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10647 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10648 (AC_REPLACE_FUNCS): Remove memmem.
10649 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10650 (AC_OUTPUT): Generate Makefile in gnulib/.
10651 * aclocal.m4, config.in, configure: Regenerated.
10652
10653 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10654
10655 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10656
10657 2012-04-05 Pedro Alves <palves@redhat.com>
10658
10659 -Werror=strict-aliasing
10660
10661 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10662 pointer.
10663
10664 2012-04-04 Pedro Alves <palves@redhat.com>
10665
10666 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10667 (sparc_store_gregset_from_stack, sparc_store_gregset)
10668 (sparc_breakpoint_at): Fix formatting.
10669
10670 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10671
10672 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10673 are available.
10674 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10675 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10676 * config.in: Regenerate.
10677 * configure: Likewise.
10678
10679 2012-03-29 Pedro Alves <palves@redhat.com>
10680
10681 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10682 Correct ptrace arguments.
10683
10684 2012-03-28 Pedro Alves <palves@redhat.com>
10685
10686 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10687 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10688 (IA64_FR1_REGNUM): New defines.
10689 (ia64_fetch_register): New.
10690 (the_low_target): Install it.
10691 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10692 field.
10693 * linux-low.c (linux_fetch_registers): Try the
10694 the_low_target.fetch_register hook first.
10695
10696 * linux-arm-low.c (the_low_target): Adjust.
10697 * linux-bfin-low.c (the_low_target): Adjust.
10698 * linux-cris-low.c (the_low_target): Adjust.
10699 * linux-crisv32-low.c (the_low_target): Adjust.
10700 * linux-m32r-low.c (the_low_target): Adjust.
10701 * linux-m68k-low.c (the_low_target): Adjust.
10702 * linux-mips-low.c (the_low_target): Adjust.
10703 * linux-ppc-low.c (the_low_target): Adjust.
10704 * linux-s390-low.c (the_low_target): Adjust.
10705 * linux-sh-low.c (the_low_target): Adjust.
10706 * linux-sparc-low.c (the_low_target): Adjust.
10707 * linux-tic6x-low.c (the_low_target): Adjust.
10708 * linux-x86-low.c (the_low_target): Adjust.
10709 * linux-xtensa-low.c (the_low_target): Adjust.
10710
10711 2012-03-26 Pedro Alves <palves@redhat.com>
10712
10713 * server.c (handle_qxfer_libraries): Don't bail early if
10714 the_target->qxfer_libraries_svr4 is not NULL.
10715
10716 2012-03-26 Pedro Alves <palves@redhat.com>
10717
10718 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10719
10720 2012-03-23 Pedro Alves <palves@redhat.com>
10721
10722 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10723 "library-list-svr4" element's start tag when the the DSO list is
10724 empty.
10725
10726 2012-03-23 Pedro Alves <palves@redhat.com>
10727
10728 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10729 a variable whose type size is the same as the inferior's pointer
10730 size.
10731
10732 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10733
10734 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10735 struct siginfo.
10736 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10737 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10738 * linux-low.h: Include <signal.h>.
10739 (struct siginfo): Remove forward declaration.
10740 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10741 struct siginfo.
10742
10743 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10744
10745 * .gitignore: Ignore more files.
10746
10747 2012-03-19 Pedro Alves <palves@redhat.com>
10748 Jan Kratochvil <jan.kratochvil@redhat.com>
10749
10750 * server.c (cont_thread, general_thread): Add describing comments.
10751 (start_inferior): Clear `cont_thread'.
10752 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10753 of a process.
10754
10755 2012-03-15 Yao Qi <yao@codesourcery.com>
10756
10757 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10758 handling to ...
10759 (cmd_qtdp): ... here.
10760
10761 2012-03-15 Yao Qi <yao@codesourcery.com>
10762
10763 * tracepoint.c (struct tracepoint_action_ops): New.
10764 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10765 (m_tracepoint_action_download): New.
10766 (r_tracepoint_action_download): New.
10767 (x_tracepoint_action_download): New.
10768 (l_tracepoint_action_download): New.
10769 (add_tracepoint_action): Install `action->ops' according type.
10770 (download_tracepoint_1): Move code `download' function pointer
10771 of various tracepoint_action_ops.
10772
10773 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10774
10775 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10776 linux_ptrace_attach_warnings.
10777
10778 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10779
10780 * Makefile.in (linux-ptrace.o): New.
10781 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10782 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10783 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10784 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10785 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10786 of these targets.
10787 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10788
10789 2012-03-08 Yao Qi <yao@codesourcery.com>
10790 Pedro Alves <palves@redhat.com>
10791
10792 Fix PR server/13392.
10793 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10794 offset of JMP insn.
10795 * tracepoint.c (remove_tracepoint): New.
10796 (cmd_qtdp): Call remove_tracepoint when failed to install.
10797
10798 2012-03-07 Pedro Alves <palves@redhat.com>
10799
10800 * linux-low.c (get_detach_signal): New.
10801 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10802 Pass on pending signals to PTRACE_DETACH. Check the result of the
10803 ptrace call.
10804 * server.c (program_signals, program_signals_p): New.
10805 (handle_general_set): Handle QProgramSignals.
10806 * server.h (program_signals, program_signals_p): Declare.
10807
10808 2012-03-05 Pedro Alves <palves@redhat.com>
10809 Jan Kratochvil <jan.kratochvil@redhat.com>
10810
10811 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10812 New comment why.
10813
10814 2012-03-03 Yao Qi <yao@codesourcery.com>
10815
10816 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10817 agent_look_up_symbols.
10818
10819 2012-03-03 Yao Qi <yao@codesourcery.com>
10820
10821 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10822 (linux-x86-low.o): Likewise.
10823 * server.h: Remove in_process_agent_loaded.
10824 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10825 common/agent.c.
10826 Update callers.
10827
10828 2012-03-03 Yao Qi <yao@codesourcery.com>
10829
10830 * tracepoint.c (gdb_agent_capability): New global.
10831 (in_process_agent_loaded_ust): Renamed to
10832 `in_process_agent_supports_ust'.
10833 Update callers.
10834 (in_process_agent_supports_ust): Call agent_capability_check.
10835 (clear_installed_tracepoints): Assert that agent supports
10836 agent.
10837
10838 2012-03-03 Yao Qi <yao@codesourcery.com>
10839
10840 * linux-low.c (linux_supports_agent): New.
10841 (linux_target_ops): Initialize field `supports_agent' with
10842 linux_supports_agent.
10843 * target.h (struct target_ops) <supports_agent>: New.
10844 (target_supports_agent): New macro.
10845 * server.c (handle_general_set): Handle packet 'QAgent'.
10846 (handle_query): Send `QAgent+'.
10847 * Makefile.in (server.o): Depends on agent.h.
10848
10849 2012-03-03 Yao Qi <yao@codesourcery.com>
10850
10851 * Makefile.in (OBS): Add agent.o.
10852 Add new rule for agent.o.
10853 Track dependence of tracepoint.c on agent.h.
10854 * tracepoint.c (run_inferior_command_1):
10855 (run_inferior_command): Call agent_run_command.
10856 (gdb_ust_connect_sync_socket): Deleted. Move it to
10857 common/agent.c.
10858 (resume_thread, stop_thread): Likewise.
10859 (gdb_ust_socket_init): Renamed to ...
10860 (gdb_agent_socket_init): ... New.
10861 (gdb_ust_thread): Renamed to ...
10862 (gdb_agent_helper_thread): ... New.
10863 (gdb_ust_init): Move some code to ...
10864 (gdb_agent_init): ... here. New.
10865 [HAVE_UST]: Call gdb_ust_init.
10866 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10867 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10868 * config.in, configure: Regenerated.
10869
10870 2012-03-02 Pedro Alves <palves@redhat.com>
10871
10872 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10873 * linux-low.c (struct simple_pid_list): New.
10874 (stopped_pids): New a struct simple_pid_list pointer.
10875 (add_to_pid_list, pull_pid_from_list): New.
10876 (handle_extended_wait): Don't assume the first signal new children
10877 report is SIGSTOP. Adjust call to pull_pid_from_list.
10878 (linux_wait_for_lwp): Adjust.
10879
10880 2012-03-02 Yao Qi <yao@codesourcery.com>
10881
10882 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10883 debug log.
10884
10885 2012-03-02 Yao Qi <yao@codesourcery.com>
10886
10887 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10888 `stop_pc' and `tpoint'. Update caller.
10889
10890 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10891
10892 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10893 * linux-low.c (use_linux_regsets): New macro.
10894 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10895 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10896 (linux_register_in_regsets): New function.
10897 (usr_fetch_inferior_registers): Skip registers covered by
10898 regsets.
10899 (usr_store_inferior_registers): Likewise.
10900 (usr_fetch_inferior_registers): New macro.
10901 (usr_store_inferior_registers): Likewise.
10902 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10903 (linux_store_registers): Likewise.
10904 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10905 prototype.
10906 (init_registers_mips64_dsp_linux): Likewise.
10907 (init_registers_mips_linux): New macro.
10908 (init_registers_mips_dsp_linux): Likewise.
10909 (mips_dsp_num_regs): Likewise.
10910 (DSP_BASE, DSP_CONTROL): New fallback macros.
10911 (mips_base_regs): New macro.
10912 (mips_regmap): Use it. Fix the size.
10913 (mips_dsp_regmap): New variable.
10914 (mips_dsp_regset_bitmap): Likewise.
10915 (mips_arch_setup): New function.
10916 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10917 than mips_regmap.
10918 (mips_cannot_store_register): Likewise.
10919 (the_low_target): Update .arch_setup, .num_regs and .regmap
10920 initializers. Add .regset_bitmap initializer.
10921 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10922 initializer.
10923 * linux-bfin-low.c (the_low_target): Likewise.
10924 * linux-cris-low.c (the_low_target): Likewise.
10925 * linux-crisv32-low.c (the_low_target): Likewise.
10926 * linux-ia64-low.c (the_low_target): Likewise.
10927 * linux-m32r-low.c (the_low_target): Likewise.
10928 * linux-m68k-low.c (the_low_target): Likewise.
10929 * linux-ppc-low.c (the_low_target): Likewise.
10930 * linux-s390-low.c (the_low_target): Likewise.
10931 * linux-sh-low.c (the_low_target): Likewise.
10932 * linux-sparc-low.c (the_low_target): Likewise.
10933 * linux-tic6x-low.c (the_low_target): Likewise.
10934 * linux-x86-low.c (the_low_target): Likewise.
10935 * linux-xtensa-low.c (the_low_target): Likewise.
10936 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10937 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10938 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10939 srv_xmlfiles.
10940 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10941 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10942
10943 2012-02-29 Yao Qi <yao@codesourcery.com>
10944 Pedro Alves <palves@redhat.com>
10945
10946 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10947 `step_over_finished' is true.
10948
10949 2012-02-27 Pedro Alves <palves@redhat.com>
10950
10951 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10952 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10953
10954 2012-02-27 Pedro Alves <palves@redhat.com>
10955
10956 PR server/9684
10957 * linux-low.c (pid_is_stopped): New.
10958 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10959
10960 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10961
10962 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10963 of conditions.
10964
10965 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10966
10967 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10968
10969 2012-02-24 Luis Machado <lgustavo@codesourcery>
10970
10971 * server.c (handle_query): Advertise support for target-side
10972 breakpoint condition evaluation.
10973 (process_point_options): New function.
10974 (process_serial_event): When inserting a breakpoint, check for
10975 a target-side condition that should be evaluated.
10976
10977 * mem-break.c: Include regcache.h and ax.h.
10978 (point_cond_list_t): New data structure.
10979 (breakpoint) <cond_list>: New field.
10980 (find_gdb_breakpoint_at): Make non-static.
10981 (delete_gdb_breakpoint_at): Clear any target-side
10982 conditions.
10983 (clear_gdb_breakpoint_conditions): New function.
10984 (add_condition_to_breakpoint): Likewise.
10985 (add_breakpoint_condition): Likewise.
10986 (gdb_condition_true_at_breakpoint): Likewise.
10987 (gdb_breakpoint_here): Return result directly instead
10988 of going through a local variable.
10989
10990 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10991 (clear_gdb_breakpoint_conditions): Likewise.
10992 (add_breakpoint_condition): Likewise.
10993 (gdb_condition_true_at_breakpoint): Likewise.
10994
10995 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10996 (need_step_over_p): Take target-side breakpoint condition into
10997 consideration.
10998
10999 2012-02-24 Luis Machado <lgustavo@codesourcery>
11000
11001 * server.h: Include tracepoint.h.
11002 (agent_mem_read, agent_get_trace_state_variable_value,
11003 agent_set_trace_state_variable_value,
11004 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11005 get_set_tsv_func_addr): New prototypes.
11006
11007 * ax.h: New include file.
11008 * ax.c: New source file.
11009
11010 * tracepoint.c: Include ax.h.
11011 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11012 agent_expr, eval_result_type): Move to ax.h.
11013 (parse_agent_expr): Rename to ...
11014 (gdb_parse_agent_expr): ... this, make it non-static and move
11015 to ax.h.
11016 (unparse_agent_expr) Rename to ...
11017 (gdb_unparse_agent_expr): ... this, make it non-static and move
11018 to ax.h.
11019 (eval_agent_expr): Rename to ...
11020 (eval_tracepoint_agent_expr): ... this.
11021 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11022 forward declarations.
11023 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11024 (agent_get_trace_state_variable_value): New function.
11025 (agent_set_trace_state_variable_value): New function.
11026 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11027 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11028 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11029 (condition_true_at_tracepoint): Likewise.
11030 (parse_agent_expr): Rename to ...
11031 (gdb_parse_agent_expr): ... this and move to ax.c.
11032 (unparse_agent_expr): Rename to ...
11033 (gdb_unparse_agent_expr): ... this and move to ax.c.
11034 (gdb_agent_op_name): Move to ax.c.
11035 (eval_agent_expr): Rename to ...
11036 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11037 and move to ax.c.
11038 (eval_tracepoint_agent_expr): New function.
11039 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11040 non-static.
11041 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11042 ax.c.
11043 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11044 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11045 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11046 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11047 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11048 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11049 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11050 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11051 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11052 (compile_bytecodes): Remove forward declaration.
11053 (is_goto_target): Move to ax.c.
11054 (compile_bytecodes): Move to ax.c and call
11055 agent_get_trace_state_variable_value (...) and
11056 agent_set_trace_state_variable_value (...).
11057
11058 * Makefile.in: Update ax.c and IPA dependencies.
11059
11060 2012-02-24 Pedro Alves <palves@redhat.com>
11061
11062 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11063 (cmd_bigqtbuffer_circular): ... this. Only handle
11064 'QTBuffer:circular:'.
11065 (handle_tracepoint_general_set): Adjust.
11066
11067 2012-02-16 Yao Qi <yao@codesourcery.com>
11068
11069 * inferiors.c: Move code to ...
11070 * dll.c: .... here. New.
11071 * server.h: Declare clear_dlls.
11072 * Makefile.in (SFILES): Add dll.c.
11073 (OBS): Add dll.o
11074 (dll.o): New rule.
11075
11076 2012-02-11 Yao Qi <yao@codesourcery.com>
11077
11078 * server.c: (handle_monitor_command): Add a new parameter
11079 `own_buf'.
11080 (handle_query): Update caller.
11081
11082 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11083
11084 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11085 * configure, config.in: Regenerate.
11086 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11087 is not defined.
11088
11089 2012-02-02 Pedro Alves <palves@redhat.com>
11090
11091 Try SIGKILL first, then PTRACE_KILL.
11092 * linux-low.c (linux_kill_one_lwp): New.
11093 (linux_kill_one_lwp): Rename to ...
11094 (kill_one_lwp_callback): ... this. Use the new
11095 linux_kill_one_lwp.
11096
11097 2012-02-02 Pedro Alves <palves@redhat.com>
11098
11099 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11100 inferior.
11101
11102 2012-01-27 Pedro Alves <palves@redhat.com>
11103
11104 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11105 (elf_64_file_p): Make static.
11106 (linux_pid_exe_is_elf_64_file): New.
11107 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11108 Delete declarations.
11109 (linux_pid_exe_is_elf_64_file): Declare.
11110 * linux-x86-low.c (x86_arch_setup): Use
11111 linux_pid_exe_is_elf_64_file.
11112
11113 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11114
11115 * linux-low.c (linux_wait_for_event_1): Rename to ...
11116 (linux_wait_for_event): ... here and merge it with former
11117 linux_wait_for_event - new variable wait_ptid, use it.
11118 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11119
11120 2012-01-23 Pedro Alves <palves@redhat.com>
11121
11122 * server.c (main): Avoid yet another case of infinite loop while
11123 detaching/killing after a longjmp.
11124
11125 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11126
11127 Code cleanup.
11128 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11129
11130 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11131
11132 * hostio.c (handle_readlink): New function.
11133 (handle_vFile): Call it to handle "vFile:readlink" packets.
11134
11135 2012-01-20 Pedro Alves <palves@redhat.com>
11136 Ulrich Weigand <ulrich.weigand@linaro.org>
11137
11138 * server.c (handle_v_requests): Only support vAttach and vRun to
11139 start multiple processes when in extended protocol mode.
11140
11141 2012-01-17 Pedro Alves <palves@redhat.com>
11142
11143 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11144 memalign plus mprotect to allocate the scratch buffer.
11145
11146 2012-01-13 Pedro Alves <palves@redhat.com>
11147
11148 * server.c (attach_inferior): Clear `cont_thread'.
11149
11150 2012-01-13 Pedro Alves <palves@redhat.com>
11151
11152 * server.c (main): Avoid infinite loop while detaching/killing
11153 after a longjmp.
11154
11155 2012-01-09 Doug Evans <dje@google.com>
11156
11157 * server.c (start_inferior): Set last_ptid in --wrapper case.
11158
11159 2012-01-06 Yao Qi <yao@codesourcery.com>
11160
11161 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11162 defined.
11163 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11164
11165 2012-01-04 Yao Qi <yao@codesourcery.com>
11166
11167 * tracepoint.c (cmd_qtdp): Print debug message
11168 for static tracepoint.
11169
11170 2012-01-04 Yao Qi <yao@codesourcery.com>
11171
11172 * tracepoint.c (trace_vdebug): Differentiate debug message
11173 between gdbserver and IPA.
11174
11175 2012-01-03 Yao Qi <yao@codesourcery.com>
11176
11177 * tracepoint.c (tracepoint_was_hit): Don't collect for
11178 static tracepoint.
11179
11180 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11181
11182 * terminal.h: Reformat copyright header.
11183
11184 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11185
11186 * server.c (gdbserver_version): Update copyright year.
11187 * gdbreplay.c (gdbreplay_version): Likewise.
11188
11189 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11190
11191 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11192
11193 Revert:
11194 2011-12-18 Hui Zhu <teawater@gmail.com>
11195 * linux-low.c (linux_create_inferior): Save return value to ret.
11196
11197 2011-12-18 Hui Zhu <teawater@gmail.com>
11198
11199 * linux-low.c (linux_create_inferior): Save return value to ret.
11200
11201 2011-12-16 Doug Evans <dje@google.com>
11202
11203 * linux-low.c (linux_create_inferior): If stdio connection,
11204 redirect stdin from /dev/null, stdout to stderr.
11205 * remote-utils.c (remote_is_stdio): New static global.
11206 (remote_connection_is_stdio): New function.
11207 (remote_prepare): Handle stdio connection.
11208 (remote_open): Ditto.
11209 (remote_close): Don't close stdin for stdio connections.
11210 (read_prim,write_prim): New functions. Replace all calls to
11211 read/write to these.
11212 * server.c (main): Watch for "-" argument. Move call to
11213 remote_prepare before start_inferior.
11214 * server.h (STDIO_CONNECTION_NAME): New macro.
11215 (remote_connection_is_stdio): Declare.
11216
11217 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11218 in debugging output.
11219
11220 2011-12-15 Yao Qi <yao@codesourcery.com>
11221
11222 * tracepoint.c: Include sys/syscall.h.
11223 (gdb_ust_thread): Remove preprocessor conditional.
11224
11225 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11226
11227 * linux-low.c (linux_detach_one_lwp): Call
11228 the_low_target.prepare_to_resume before detaching.
11229
11230 2011-12-14 Yao Qi <yao@codesourcery.com>
11231
11232 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11233 of write.
11234
11235 2011-12-14 Yao Qi <yao@codesourcery.com>
11236
11237 * i386-low.c (i386_low_stopped_data_address): Initialize local
11238 variable `control'.
11239
11240 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11241
11242 PR remote/13492
11243
11244 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11245 DR_CONTROL unless necessary. Extend comments.
11246 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11247 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11248
11249 2011-12-13 Yao Qi <yao@codesourcery.com>
11250
11251 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11252 macros.
11253 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11254
11255 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11256
11257 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11258 Print new debug message for such case.
11259
11260 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11261
11262 Fix overlapping memcpy.
11263 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11264 the read_inferior_memory transfer.
11265 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11266 write_inferior_memory transfer.
11267 (set_fast_tracepoint_jump): New variable buf. Use it for the
11268 read_inferior_memory and write_inferior_memory transfers.
11269 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11270 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11271 Use it for the write_inferior_memory transfer.
11272 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11273 buffers.
11274
11275 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11276
11277 * linux-low.c (fetch_register, store_register): Make code
11278 consistent, fix formatting.
11279
11280 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11281
11282 * linux-low.c (usr_store_inferior_registers): Factor out code
11283 to handle individual registers into...
11284 (store_register): ... this new function.
11285
11286 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11287
11288 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11289 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11290 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11291 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11292 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11293 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11294 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11295 (srv_xmlfiles): Add new XML files.
11296
11297 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11298 and <sys/uio.h>.
11299 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11300 (init_registers_s390_linux32v1): Add prototype.
11301 (init_registers_s390_linux32v2): Likewise.
11302 (init_registers_s390_linux64v1): Likewise.
11303 (init_registers_s390_linux64v2): Likewise.
11304 (init_registers_s390x_linux64v1): Likewise.
11305 (init_registers_s390x_linux64v2): Likewise.
11306 (s390_num_regs): Increment to 52.
11307 (s390_regmap): Add orig_r2 register.
11308 (s390_num_regs_3264): Increment to 68.
11309 (s390_regmap_3264): Add orig_r2 register.
11310 (s390_collect_ptrace_register): Handle orig_r2 register.
11311 (s390_supply_ptrace_register): Likewise.
11312 (s390_fill_last_break): New function.
11313 (s390_store_last_break): Likewise.
11314 (s390_fill_system_call): New function.
11315 (s390_store_system_call): Likewise.
11316 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11317 register sets.
11318 (s390_check_regset): New function.
11319 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11320 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11321 Update target_regsets for available register sets.
11322
11323 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11324 Jan Kratochvil <jan.kratochvil@redhat.com>
11325
11326 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11327 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11328 New.
11329 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11330 * linux-low.h (struct process_info_private): New member r_debug.
11331 * server.c (handle_qxfer_libraries): Call
11332 the_target->qxfer_libraries_svr4.
11333 (handle_qxfer_libraries_svr4): New function.
11334 (qxfer_packets): New entry "libraries-svr4".
11335 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11336 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11337 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11338 PACKET_qXfer_libraries_svr4.
11339
11340 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11341
11342 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11343 PSW address/mask between 8-byte and 16-byte formats.
11344 (s390_supply_ptrace_register): Likewise.
11345 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11346 basic addressing mode bit.
11347
11348 2011-11-24 Stan Shebs <stan@codesourcery.com>
11349
11350 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11351
11352 2011-11-17 Stan Shebs <stan@codesourcery.com>
11353
11354 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11355 (tracing_start_time): New global.
11356 (tracing_stop_time): New global.
11357 (tracing_user_name): New global.
11358 (tracing_notes): New global.
11359 (tracing_stop_note): New global.
11360 (cmd_qtstart): Set traceframe_usage, start_time.
11361 (stop_tracing): Set stop_time.
11362 (cmd_qtstatus): Report additional status.
11363 (cmd_qtp): New function.
11364 (handle_tracepoint_query): Call it.
11365 (cmd_qtnotes): New function.
11366 (handle_tracepoint_general_set): Call it.
11367 (get_timestamp): Rename from tsv_get_timestamp.
11368
11369 2011-11-14 Stan Shebs <stan@codesourcery.com>
11370 Kwok Cheung Yeung <kcy@codesourcery.com>
11371
11372 * linux-x86-low.c (small_jump_insn): New.
11373 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11374 trampoline and error message, build a trampoline and issue a small
11375 jump instruction to it.
11376 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11377 trampoline and error message.
11378 (x86_get_min_fast_tracepoint_insn_len): New.
11379 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11380 * linux-low.h (struct linux_target_ops): Add arguments to
11381 install_fast_tracepoint_jump_pad operation, add new operation.
11382 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11383 arguments.
11384 (linux_get_min_fast_tracepoint_insn_len): New function.
11385 (linux_target_op): Add new operation.
11386 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11387 (gdb_trampoline_buffer_end): Ditto.
11388 (gdb_trampoline_buffer_error): Ditto.
11389 (struct ipa_sym_addresses): Add fields for new IPA variables.
11390 (symbol_list): Add entries for new IPA variables.
11391 (struct tracepoint): Add fields to hold the address range of the
11392 trampoline used by the tracepoint.
11393 (trampoline_buffer_head): New static variable.
11394 (trampoline_buffer_tail): Ditto.
11395 (claim_trampoline_space): New function.
11396 (have_fast_tracepoint_trampoline_buffer): New function.
11397 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11398 structure.
11399 (install_fast_tracepoint): Ditto, also add error buffer argument.
11400 (cmd_qtminftpilen): New function.
11401 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11402 (fast_tracepoint_from_trampoline_address): New function.
11403 (fast_tracepoint_collecting): Handle trampoline as part of jump
11404 pad space.
11405 (set_trampoline_buffer_space): New function.
11406 (initialize_tracepoint): Initialize new IPA variables.
11407 * target.h (struct target_ops): Add arguments to
11408 install_fast_tracepoint_jump_pad operation, add new
11409 get_min_fast_tracepoint_insn_len operation.
11410 (target_get_min_fast_tracepoint_insn_len): New.
11411 (install_fast_tracepoint_jump_pad): Add arguments.
11412 * server.h (IPA_BUFSIZ): Define.
11413 * linux-i386-ipa.c: Include extra header files.
11414 (initialize_fast_tracepoint_trampoline_buffer): New function.
11415 (initialize_low_tracepoint): Call it.
11416 * server.h (set_trampoline_buffer_space): Declare.
11417 (claim_trampoline_space): Ditto.
11418 (have_fast_tracepoint_trampoline_buffer): Ditto.
11419
11420 2011-11-14 Yao Qi <yao@codesourcery.com>
11421
11422 * server.c (handle_query): Handle InstallInTrace for qSupported.
11423 * tracepoint.c (add_tracepoint): Sort list.
11424 (install_tracepoint, download_tracepoint): New.
11425 (cmd_qtdp): Call them to install and download tracepoints.
11426 (sort_tracepoints): Removed.
11427 (cmd_qtstart): Update.
11428
11429 2011-11-14 Yao Qi <yao@codesourcery.com>
11430
11431 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11432 * mem-break.h: Declare.
11433 * tracepoint.c (cmd_qtstart): Move some code to ...
11434 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11435 New.
11436 (download_tracepoints): Move some code to ...
11437 (download_tracepoint_1): ... here. New.
11438
11439 2011-11-08 Yao Qi <yao@codesourcery.com>
11440
11441 * remote-utils.c (relocate_instruction): A comment fix.
11442
11443 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11444
11445 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11446 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11447 dr_status_mirror and dr_control_mirror from debug_reg_state.
11448 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11449 (i386_initial_stuff): Remove use of deleted globals.
11450 (i386_get_thread_context, i386_set_thread_context,
11451 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11452 from debug_reg_state.
11453
11454 2011-11-05 Yao Qi <yao@codesourcery.com>
11455
11456 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11457 address as TPOINT's.
11458
11459 2011-11-02 Stan Shebs <stan@codesourcery.com>
11460
11461 * tracepoint.c (agent_mem_read_string): New function.
11462 (eval_agent_expr): Call it for tracenz.
11463 * server.c (handle_query): Report support for tracenz.
11464
11465 2011-11-02 Yao Qi <yao@codesourcery.com>
11466
11467 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11468
11469 2011-11-02 Yao Qi <yao@codesourcery.com>
11470
11471 * target.h: Fix a typo in comment.
11472
11473 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11474
11475 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11476 clobber the breakpoints' shadows with fast tracepoint jumps.
11477 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11478 * target.c (write_inferior_memory): Also pass MYADDR down to
11479 check_mem_write.
11480
11481 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11482
11483 * configure.ac: Check support for personality routine.
11484 * configure: Regenerate.
11485 * config.in: Likewise.
11486 * linux-low.c: Include <sys/personality.h>.
11487 Define ADDR_NO_RANDOMIZE if necessary.
11488 (linux_create_inferior): Disable address space randomization when
11489 forking inferior, if requested.
11490 (linux_supports_disable_randomization): New function.
11491 (linux_target_ops): Install it.
11492 * server.h (disable_randomization): Declare.
11493 * server.c (disable_randomization): New global variable.
11494 (handle_general_set): Handle QDisableRandomization.
11495 (handle_query): Likewise for qSupported.
11496 (main): Support --disable-randomization and --no-disable-randomization
11497 command line arguments.
11498 * target.h (struct target_ops): Add supports_disable_randomization.
11499 (target_supports_disable_randomization): New macro.
11500
11501 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11502
11503 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11504 ifdef check.
11505 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11506 [!PT_GETDSBT] (target_loadmap): New definition.
11507 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11508 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11509 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11510 and PT_GETDSBT to LINUX_LOADMAP.
11511 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11512 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11513
11514 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11515
11516 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11517 (arm_linux_hwbp_cap): New static variable.
11518 (arm_linux_get_hwbp_cap): Replace by ...
11519 (arm_linux_init_hwbp_cap): ... this new function.
11520 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11521 (arm_linux_get_hw_watchpoint_count): Likewise.
11522 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11523 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11524 (arm_prepare_to_resume): Use perror_with_name instead of error.
11525
11526 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11527
11528 * linux-arm-low.c: Include <signal.h>.
11529 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11530 (struct arm_linux_hwbp_cap): New data type.
11531 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11532 (struct arm_linux_hw_breakpoint): New data type.
11533 (MAX_BPTS, MAX_WPTS): Define.
11534 (struct arch_process_info, struct arch_lwp_info): New data types.
11535 (arm_linux_get_hwbp_cap): New function.
11536 (arm_linux_get_hw_breakpoint_count): Likewise.
11537 (arm_linux_get_hw_watchpoint_count): Likewise.
11538 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11539 (arm_hwbp_control_initialize): Likewise.
11540 (arm_hwbp_control_is_enabled): Likewise.
11541 (arm_hwbp_control_is_initialized): Likewise.
11542 (arm_hwbp_control_disable): Likewise.
11543 (arm_linux_hw_breakpoint_equal): Likewise.
11544 (arm_linux_hw_point_initialize): Likewise.
11545 (struct update_registers_data): New data structure.
11546 (update_registers_callback: New function.
11547 (arm_insert_point): Likewise.
11548 (arm_remove_point): Likewise.
11549 (arm_stopped_by_watchpoint): Likewise.
11550 (arm_stopped_data_address): Likewise.
11551 (arm_new_process): Likewise.
11552 (arm_new_thread): Likewise.
11553 (arm_prepare_to_resume): Likewise.
11554 (the_low_target): Register arm_insert_point, arm_remove_point,
11555 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11556 arm_new_thread, and arm_prepare_to_resume.
11557
11558 2011-09-15 Stan Shebs <stan@codesourcery.com>
11559
11560 * server.h (struct emit_ops): Add compare-goto fields.
11561 * tracepoint.c (gdb_agent_op_sizes): New table.
11562 (emit_eq_goto): New function.
11563 (emit_ne_goto): New function.
11564 (emit_lt_goto): New function.
11565 (emit_le_goto): New function.
11566 (emit_gt_goto): New function.
11567 (emit_ge_goto): New function.
11568 (is_goto_target): New function.
11569 (compile_bytecodes): Recognize special cases of compare-goto
11570 combinations and call specialized emitters for them.
11571 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11572 (amd64_emit_ne_goto): New function.
11573 (amd64_emit_lt_goto): New function.
11574 (amd64_emit_le_goto): New function.
11575 (amd64_emit_gt_goto): New function.
11576 (amd64_emit_ge_goto): New function.
11577 (amd64_emit_ops): Add the new functions.
11578 (i386_emit_eq_goto): New function.
11579 (i386_emit_ne_goto): New function.
11580 (i386_emit_lt_goto): New function.
11581 (i386_emit_le_goto): New function.
11582 (i386_emit_gt_goto): New function.
11583 (i386_emit_ge_goto): New function.
11584 (i386_emit_ops): Add the new functions.
11585
11586 2011-09-08 Stan Shebs <stan@codesourcery.com>
11587
11588 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11589 (i386_emit_epilogue): Restore %ebx.
11590
11591 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11592
11593 * server.c (step_thread): Remove definition.
11594 (process_serial_event): Don't handle Hs.
11595 * server.h (step_thread): Remove declaration.
11596 * target.c (set_desired_inferior): Remove use of step_thread.
11597
11598 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11599
11600 * linux-low.c: Include linux-procfs.h.
11601 (linux_attach_lwp_1): Update comments.
11602 (linux_attach): Scan for existing threads when attaching to a
11603 process that is the tgid.
11604 * Makefile.in: Update dependencies.
11605
11606 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11607
11608 * configure.srv: Add linux-procfs.o dependencies.
11609
11610 2011-08-14 Yao Qi <yao@codesourcery.com>
11611
11612 * target.h (struct target_ops): Fix indent.
11613 * win32-low.c (win32_target_ops): Fix comment.
11614
11615 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11616 Yao Qi <yao@codesourcery.com>
11617
11618 * Makefile.in (clean): Remove tic6x-*.c files.
11619 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11620 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11621 (tic6x-c64xp-linux.c): Likewise.
11622 * configure.srv: Add support for tic6x-*-uclinux.
11623 * linux-tic6x-low.c: New.
11624 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11625
11626 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11627 Yao Qi <yao@codesourcery.com>
11628
11629 * target.h (struct target_ops): Add read_loadmap.
11630 * linux-low.c (struct target_loadseg): New type.
11631 (struct target_loadmap): New type.
11632 (linux_read_loadmap): New function.
11633 (linux_target_ops): Add linux_read_loadmap.
11634 * server.c (handle_query): Support qXfer:fdpic:read packet.
11635 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11636 to NULL.
11637
11638 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11639
11640 * win32-low.c: Include <stdint.h>.
11641
11642 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11643
11644 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11645 to the inferior here.
11646 (i386_remove_aligned_watchpoint): Ditto.
11647 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11648 fit part of the watchpoint in the debug registers.
11649 (i386_update_inferior_debug_regs): New.
11650 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11651 registers, and only update the inferior on success.
11652 (i386_low_remove_watchpoint): Ditto.
11653
11654 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11655
11656 * linux-low.c (compare_ints, unique, list_threads, show_process,
11657 linux_core_of_thread): Delete.
11658 (linux_target_ops): Change linux_core_of_thread to
11659 linux_common_core_of_thread.
11660 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11661 * utils.c (malloc_failure): Change type of argument.
11662 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11663 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11664 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11665 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11666 (IPA_OBJS): Add common-utils-ipa.o.
11667 (ptid_h, linux_osdata_h): New macros.
11668 (server_h): Add common/common-utils.h, common/xml-utils.h,
11669 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11670 common/ptid.h.
11671 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11672 ptid.o, buffer.o): New rules.
11673 (linux-low.o): Add common/linux-osdata.h as a dependency.
11674 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11675 * configure.ac: Add AC_HEADER_DIRENT check.
11676 * config.in: Regenerate.
11677 * configure: Regenerate.
11678 * remote-utils.c (xml_escape_text): Delete.
11679 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11680 buffer_xml_printf): Move to common/buffer.c.
11681 * server.c (main): Remove call to initialize_inferiors.
11682 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11683 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11684 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11685 internal_error, gdb_assert, gdb_assert_fail): Delete.
11686 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11687 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11688 common/buffer.h.
11689 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11690 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11691 initialize_inferiors): Delete.
11692
11693 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11694
11695 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11696 symbol error.
11697
11698 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11699
11700 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11701 assertion.
11702 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11703
11704 2011-05-26 Yao Qi <yao@codesourcery.com>
11705
11706 * Makefile.in (thread-db.o): Track dependence to
11707 common/gdb_thread_db.h.
11708 * thread-db.c: include gdb_thread_db.h from right place.
11709
11710 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11711
11712 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11713 __FILE__ and __LINE__ to internal_error.
11714
11715 2011-05-13 Doug Evans <dje@google.com>
11716
11717 * thread-db.c (try_thread_db_load_from_sdir): New function.
11718 (try_thread_db_load_from_dir): New function.
11719 (thread_db_load_search): Handle $sdir, ignore $pdir.
11720 Remove trying of system directories if search of
11721 libthread-db-search-path fails, that is now done via $sdir.
11722
11723 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11724
11725 * server.c (handle_query): Add EnableDisableTracepoints to the list
11726 of supported features.
11727 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11728 tracepoints.
11729 (cmd_qtenable_disable): New.
11730 (cmd_qtstart): Install tracepoints even if disabled.
11731 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11732 receiving a QTEnable or QTDisable packet.
11733 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11734 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11735 tracepoints.
11736 (gdb_probe): Skip data collection if static tracepoint is disabled.
11737
11738 2011-05-10 Doug Evans <dje@google.com>
11739
11740 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11741
11742 2011-05-04 Doug Evans <dje@google.com>
11743
11744 * linux-low.c (linux_join): Skip process lookup.
11745 * spu-low.c (spu_join): Ditto.
11746 * server.c (join_inferiors_callback): Delete.
11747 (process_serial_event): For 'D' packet (detach) call join_inferior
11748 directly.
11749
11750 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11751
11752 * README: Don't mention xscale*-*-linux*.
11753 * configure.srv (xscale*-*-linux*): Don't handle target.
11754
11755 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11756
11757 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11758 casting pointers.
11759 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11760 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11761 (i386_emit_void_call_2): Likewise.
11762
11763 2011-04-26 Yao Qi <yao@codesourcery.com>
11764
11765 * linux-low.c: Move common macros to linux-ptrace.h.
11766 Include linux-ptrace.h.
11767 * Makefile.in (linux_ptrace_h): New.
11768 (linux-low.o): Depends on linux-ptrace.h.
11769
11770 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11771
11772 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11773 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11774 (remote_prepare): New function with most of the TCP code from ...
11775 (remote_open): ... here. Detect PORT here unconditionally. Move also
11776 setting transport_is_reliable.
11777 * server.c (run_once): New variable.
11778 (gdbserver_usage): Document it.
11779 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11780 the first run if RUN_ONCE.
11781 * server.h (run_once, remote_prepare): New declarations.
11782
11783 2011-04-19 Tom Tromey <tromey@redhat.com>
11784
11785 * win32-low.c (handle_load_dll): Remove duplicate "the".
11786
11787 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11788
11789 Remove support for old Cygwin 1.5 versions.
11790 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11791 function to avoid warning.
11792 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11793 warning.
11794
11795 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11796
11797 * gdbserver/server.h (Macro _): Define it if not available.
11798
11799 2011-03-14 Michael Snyder <msnyder@vmware.com>
11800
11801 * hostio.c (handle_close): Remove unnecessary null test.
11802
11803 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11804
11805 * Makefile.in (maintainer-clean realclean distclean): Remove
11806 "make ... subdir_do" command.
11807
11808 2011-03-10 Michael Snyder <msnyder@vmware.com>
11809
11810 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11811
11812 * server.c (handle_v_run): Free alloced buffer on early return.
11813
11814 2011-03-09 Yao Qi <yao@codesourcery.com>
11815
11816 Revert:
11817 2011-03-04 Yao Qi <yao@codesourcery.com>
11818
11819 * Makefile.in: Remove GNU make feature --directory.
11820
11821 2011-03-05 Yao Qi <yao@codesourcery.com>
11822
11823 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11824 (subdir_do): New make target. Copied from gdb/Makefile.
11825 (maintainer-clean, realclean, distclean, clean): Call corresponding
11826 make targets in common/Makefile.
11827
11828 2011-02-11 Yao Qi <yao@codesourcery.com>
11829
11830 * configure.ac: Call AC_PROG_RANLIB.
11831 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11832 * configure: Regenerate.
11833
11834 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11835
11836 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11837
11838 2011-03-06 Yao Qi <yao@codesourcery.com>
11839
11840 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11841
11842 2011-03-05 Yao Qi <yao@codesourcery.com>
11843
11844 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11845 (subdir_do): New make target. Copied from gdb/Makefile.
11846 (maintainer-clean, realclean, distclean, clean): Call corresponding
11847 make targets in common/Makefile.
11848
11849 2011-03-04 Yao Qi <yao@codesourcery.com>
11850
11851 * Makefile.in: Remove GNU make feature --directory.
11852
11853 2011-03-04 Michael Snyder <msnyder@vmware.com>
11854
11855 * server.c (queue_stop_reply): Call xmalloc not malloc.
11856
11857 2011-03-02 Michael Snyder <msnyder@vmware.com>
11858
11859 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11860
11861 2011-02-28 Michael Snyder <msnyder@vmware.com>
11862
11863 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11864 (cmd_qtframe): Ditto.
11865 (cmd_qtbuffer): Ditto.
11866 (cmd_bigqtbuffer): Ditto.
11867
11868 * utils.c (decimal2str): Initialize 'width' to nine, then
11869 don't mess with it.
11870
11871 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11872
11873 * hostio.c (require_data): Free *data, not data.
11874
11875 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11876
11877 * hostio.c (require_data): Use free, not xfree.
11878
11879 2011-02-27 Michael Snyder <msnyder@vmware.com>
11880
11881 * server.c (handle_query): Discard unused value.
11882
11883 * hostio.c (require_data): Free malloc memory before returning
11884 error.
11885
11886 2011-02-26 Michael Snyder <msnyder@vmware.com>
11887
11888 * linux-low.c (list_threads): Call closedir for dirent.
11889
11890 2011-02-27 Michael Snyder <msnyder@vmware.com>
11891
11892 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11893 a case statement falls through.
11894
11895 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11896
11897 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11898 in comparison.
11899
11900 2011-02-26 Michael Snyder <msnyder@vmware.com>
11901
11902 * utils.c (decimal2str): Eliminate dead code and dead param.
11903 (pulongest): Drop dead param from call to decimal2str.
11904 (plongest): Ditto.
11905
11906 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11907
11908 Revert the following patch (not approved yet):
11909 2011-02-21 Hui Zhu <teawater@gmail.com>
11910 * tracepoint.c (tp_printf): New function.
11911 (eval_agent_expr): Handle gdb_agent_op_printf.
11912
11913 2011-02-21 Hui Zhu <teawater@gmail.com>
11914
11915 * tracepoint.c (tp_printf): New function.
11916 (eval_agent_expr): Handle gdb_agent_op_printf.
11917
11918 2011-02-18 Tom Tromey <tromey@redhat.com>
11919
11920 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11921 (tracepoint.o): Likewise.
11922 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11923 (gdb_agent_op_names): Likewise.
11924
11925 2011-02-18 Tom Tromey <tromey@redhat.com>
11926
11927 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11928 gdb_agent_op_rot>: New constants.
11929 (gdb_agent_op_names): Add pick and roll.
11930 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11931 cases.
11932
11933 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11934
11935 * aclocal.m4: Regenerated with aclocal-1.11.1.
11936
11937 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11938
11939 * server.c (handle_qxfer_traceframe_info): New.
11940 (qxfer_packets): Register "traceframe-info".
11941 (handle_query): Report support for qXfer:traceframe-info:read+.
11942 * tracepoint.c (match_blocktype): New.
11943 (traceframe_find_block_type): Rename to ...
11944 (traceframe_walk_blocks): ... this. Add callback filter argument,
11945 and use it.
11946 (traceframe_find_block_type): New, reimplemented on top of
11947 traceframe_walk_blocks.
11948 (build_traceframe_info_xml): New.
11949 (traceframe_read_info): New.
11950 * server.h (traceframe_read_info): Declare.
11951
11952 2011-02-11 Yao Qi <yao@codesourcery.com>
11953
11954 * configure.ac: Call AC_PROG_RANLIB.
11955 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11956 * configure: Regenerate.
11957
11958 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11959
11960 * server.c (gdb_read_memory): Change return semantics to allow
11961 partial transfers.
11962 (handle_search_memory_1): Adjust.
11963 (process_serial_event) <'m' packet>: Handle partial transfers.
11964 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11965
11966 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11967
11968 * regcache.c (init_register_cache): Initialize
11969 regcache->register_status.
11970 (free_register_cache): Release regcache->register_status.
11971 (regcache_cpy): Copy register_status.
11972 (registers_to_string): Print 'x's for unavailable registers.
11973 (supply_register): Mark the register's status valid or
11974 unavailable, depending on whether a buffer was passed in or not.
11975 (supply_register_zeroed): New.
11976 (supply_regblock): Mark the registers' status valid or
11977 unavailable, depending on whether a buffer was passed in or not.
11978 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11979 (struct regcache): New `register_status' field.
11980 (supply_register_zeroed): Declare.
11981 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11982 supply_register_zeroed, rather than passing a NULL buffer to
11983 supply_register.
11984 * tracepoint.c (fetch_traceframe_registers): Update comment.
11985
11986 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11987
11988 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11989 buffer explicit.
11990
11991 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11992
11993 * server.h (decode_xfer_write): Change prototype.
11994 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11995 and don't extract the annex here.
11996 * server.c (decode_xfer_read): Remove `annex' parameter,
11997 and don't extract the annex here.
11998 (decode_xfer): New.
11999 (struct qxfer): New.
12000 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12001 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12002 (handle_qxfer_statictrace): New functions, abstracted out from
12003 handle_query, and made to use the struct qxfer interface.
12004 (handle_threads_qxfer_proper): Rename to ...
12005 (handle_qxfer_threads_proper): ... this.
12006 (handle_threads_qxfer): Rename to ...
12007 (handle_qxfer_threads): ... this. Adjust.
12008 (qxfer_packets): New array.
12009 (handle_qxfer): New function.
12010 (handle_query): Use handle_qxfer.
12011
12012 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12013
12014 * gdbreplay.c: Shorten lines of >= 80 columns.
12015 * linux-low.c: Ditto.
12016 * linux-ppc-low.c: Ditto.
12017 * linux-s390-low.c: Ditto.
12018 * linux-sparc-low.c: Ditto.
12019 * linux-x86-low.c: Ditto.
12020 * linux-xtensa-low.c: Ditto.
12021 * mem-break.c: Ditto.
12022 * nto-low.c: Ditto.
12023 * regcache.h: Ditto.
12024 * remote-utils.c: Ditto.
12025 * server.c: Ditto.
12026 * server.h: Ditto.
12027 * thread-db.c: Ditto.
12028 * tracepoint.c: Ditto.
12029 * utils.c: Ditto.
12030 * win32-low.h: Ditto.
12031
12032 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12033
12034 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12035 update.
12036
12037 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12038
12039 * server.c (gdbserver_version): Update copyright year in version
12040 output.
12041 * gdbreplay.c (gdbreplay_version): Ditto.
12042
12043 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12044
12045 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12046 * linux-bfin-low.c: New file.
12047 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12048 PT_DATA_ADDR for BFIN targets.
12049 * Makefile.in (SFILES): Add linux-bfin-low.c.
12050 (clean): Remove reg-bfin.c.
12051 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12052 * README: Mention supported Blackfin targets.
12053
12054 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12055
12056 * .gitignore: New file.
12057
12058 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12059
12060 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12061
12062 2010-10-22 Jie Zhang <jie@codesourcery.com>
12063
12064 * Makefile.in: Add FLAGS_TO_PASS variable.
12065 (install): Remove dependency of install-only and recursively
12066 invoke make for install-only.
12067
12068 2010-10-04 Doug Evans <dje@google.com>
12069
12070 * Makefile.in (uninstall): Use $(DESTDIR).
12071
12072 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12073
12074 PR gdb/11842
12075
12076 * linux-x86-low.c (compat_siginfo_from_siginfo)
12077 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12078 si_code is < 0. Check for si_code == SI_TIMER before checking for
12079 si_code < 0.
12080
12081 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12082
12083 * lynx-i386-low.c: New file.
12084 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12085
12086 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12087
12088 * lynx-low.c (ptrace_request_to_str): Remove handling for
12089 request values that have been removed in LynxOS 5.x.
12090
12091 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12092
12093 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12094 <ptrace.h>
12095
12096 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12097
12098 * configure.ac: Add --enable-inprocess-agent option.
12099 * configure: Rebuilt.
12100
12101 2010-09-06 Yao Qi <yao@codesourcery.com>
12102
12103 * linux-low.c (linux_kill): Remove unused variable.
12104 (linux_stabilize_threads): Likewise.
12105 * server.c (start_inferior): Likewise.
12106 (queue_stop_reply_callback): Likewise.
12107 * tracepoint.c (do_action_at_tracepoint): Likewise.
12108
12109 2010-09-06 Yao Qi <yao@codesourcery.com>
12110
12111 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12112 on return.
12113
12114 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12115
12116 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12117
12118 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12119
12120 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12121 "$(IPA_DEPFILES)".
12122
12123 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12124
12125 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12126 gdbserver/lynx-ppc-low.c: New files.
12127 * Makefile.in (lynx_low_h): New variable.
12128 (lynx-low.o, lynx-ppc-low.o): New rules.
12129 * configure.ac: On LynxOS, link with -lnetinet.
12130 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12131 * configure: regenerate.
12132
12133 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12134
12135 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12136 * configure.ac: Add check for vasprintf and vsnprintf.
12137 * configure, config.in: Regenerate.
12138 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12139
12140 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12141
12142 * gdbreplay.c: Move include of alloca.h up, next to include of
12143 malloc.h.
12144 * server.h: Add include of malloc.h.
12145 * mem-break.c: Remove include of malloc.h.
12146 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12147
12148 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12149
12150 * Makefile.in (memmem.o): Build with -Wno-error.
12151
12152 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12153
12154 * utils.c (xsnprintf): Make non-static.
12155 * server.h: Add xsnprintf declaration.
12156 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12157 replace calls to snprintf by calls to xsnprintf throughout.
12158
12159 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12160
12161 * configure.ac: Add configure check for alloca.
12162 * configure, config.in: Regenerate.
12163 * server.h: Include alloca.h if it exists.
12164 * gdbreplay.c: Include alloca.h if it exists.
12165
12166 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12167
12168 * linux-low.c (__SIGRTMIN): Define if not already defined.
12169 (linux_create_inferior): Check for __ANDROID__ rather than
12170 __SIGRTMIN.
12171 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12172 are already deferred.
12173 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12174 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12175 stopped and already has a pending signal to report.
12176 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12177 a pending signal to report or is moving out of a jump pad.
12178 (linux_init_signals): Check for __ANDROID__ rather than
12179 __SIGRTMIN.
12180
12181 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12182
12183 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12184 debug_threads check. Avoid a linear search when not doing debug
12185 output.
12186
12187 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12188
12189 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12190 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12191 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12192 (process_event): Change local fd's type to gdb_fildes_t.
12193 (create_file_handler): Adjust prototype.
12194 (delete_file_handler): Adjust prototype.
12195 (handle_file_event): Adjust prototype. Use pfildes.
12196 (create_file_event): Adjsut prototype.
12197 * remote-utils.c (remote_desc, listen_desc): Change type to
12198 gdb_fildes_t.
12199 * server.h: New gdb_fildes_t typedef.
12200 [USE_WIN32API]: Include winsock2.h.
12201 (delete_file_handler, add_file_handler): Adjust prototypes.
12202 (pfildes): Declare.
12203 * utils.c (pfildes): New.
12204
12205 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12206
12207 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12208 * configure: Regenerate.
12209
12210 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12211
12212 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12213 (linux_done_accessing_memory): ... this.
12214 (linux_target_ops): Adjust.
12215 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12216 * nto-low.c (nto_target_ops): Adjust comment.
12217 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12218 * spu-low.c (spu_target_ops): Adjust comment.
12219 * target.h (target_ops): Rename unprepare_to_access_memory field
12220 to done_accessing_memory.
12221 (unprepare_to_access_memory): Rename to ...
12222 (done_accessing_memory): ... this.
12223
12224 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12225
12226 * linux-low.c (linux_prepare_to_access_memory): New.
12227 (linux_unprepare_to_access_memory): New.
12228 (linux_target_ops): Install them.
12229 * server.c (read_memory): Rename to ...
12230 (gdb_read_memory): ... this. Use
12231 prepare_to_access_memory/prepare_to_access_memory.
12232 (write_memory): Rename to ...
12233 (gdb_write_memory): ... this. Use
12234 prepare_to_access_memory/prepare_to_access_memory.
12235 (handle_search_memory_1): Adjust.
12236 (process_serial_event): Adjust.
12237 * target.h (struct target_ops): New fields
12238 prepare_to_access_memory and unprepare_to_access_memory.
12239 (prepare_to_access_memory, unprepare_to_access_memory): New.
12240 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12241 prepare_to_access_memory/prepare_to_access_memory.
12242 * nto-low.c (nto_target_ops): Adjust.
12243 * spu-low.c (spu_target_ops): Adjust.
12244 * win32-low.c (win32_target_ops): Adjust.
12245
12246 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12247
12248 * Makefile.in (WARN_CFLAGS): Get it from configure.
12249 (WERROR_CFLAGS): New.
12250 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12251 * configure.ac: Introduce --enable-werror, which adds -Werror to
12252 the compiler command line. Enabled by default. Disable with
12253 --disable-werror. Add -Wdeclaration-after-statement
12254 Wpointer-arith and -Wformat-nonliteral to warning flags.
12255 * configure: Regenerate.
12256
12257 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12258
12259 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12260
12261 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12262
12263 * gdbreplay.c (remote_error): New.
12264 (gdbchar): New.
12265 (expect): Use gdbchar. Check for error reading from GDB.
12266 Clarify sync error output.
12267 (play): Check for errors writing to GDB.
12268 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12269 * remote-utils.c (getpkt): Check for errors writing to the remote
12270 descriptor.
12271
12272 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12273
12274 * linux-low.c (linux_wait_1): Move non-debugging code out of
12275 `debug_threads' control.
12276
12277 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12278
12279 * linux-low.c (linux_wait_1): Don't set last_status here.
12280 * server.c (push_event, queue_stop_reply_callback): Assert we're
12281 not pushing a TARGET_WAITKIND_IGNORE event.
12282 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12283 (myresume, handle_target_event): Set the thread's last_resume_kind
12284 and last_status from the target returned status.
12285
12286 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12287
12288 PR threads/10729
12289
12290 * linux-x86-low.c (update_debug_registers_callback): New.
12291 (i386_dr_low_set_addr): Use it.
12292 (i386_dr_low_get_addr): New.
12293 (i386_dr_low_set_control): Use update_debug_registers_callback.
12294 (i386_dr_low_get_control): New.
12295 (i386_dr_low_get_status): Adjust.
12296 * linux-low.c (linux_stop_lwp): New.
12297 * linux-low.h (linux_stop_lwp): Declare.
12298
12299 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12300 argument instead of a i386_debug_reg_state.
12301 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12302 a i386_debug_reg_state.
12303 (i386_insert_aligned_watchpoint): Adjust.
12304 (i386_remove_aligned_watchpoint): Adjust.
12305 (i386_low_stopped_data_address): Read the debug registers from the
12306 inferior instead of from the mirrors.
12307 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12308 (i386_dr_low_get_addr): Declare.
12309 (i386_dr_low_get_control): Declare.
12310 (i386_dr_low_get_status): Change prototype.
12311
12312 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12313 (i386_dr_low_get_addr): New.
12314 (i386_dr_low_get_control): New.
12315 (i386_dr_low_get_status): Adjust prototype. Return
12316 dr_status_mirror.
12317 (i386_initial_stuff): Clear dr_status_mirror and
12318 dr_control_mirror.
12319 (i386_get_thread_context): Adjust.
12320 (i386_set_thread_context): Adjust.
12321 (i386_thread_added): Adjust.
12322
12323 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12324
12325 * linux-low.h (linux_thread_area): Delete declaration.
12326
12327 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12328
12329 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12330 after its termination.
12331
12332 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12333
12334 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12335 (gdb_wants_all_stopped): Delete.
12336 (linux_wait_1): Don't call them.
12337 * server.c (handle_v_cont): Tag all threads as want-stopped.
12338 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12339 stopped as "client-wants-stopped".
12340
12341 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12342
12343 * Makefile.in (signals_h): New.
12344 (server_h): Depend on it.
12345 (server.o): Don't depend on $(signals_def).
12346 (signals.o): Depend on $(signals_def).
12347
12348 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12349
12350 * Makefile.in (signals_def): New.
12351 (server_h): Append include/gdb/signals.h and signals_def.
12352 (server.o): Append signals_def.
12353
12354 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12355
12356 * server.c (handle_target_event): Use target_signal_to_host for
12357 resume_info.sig initialization.
12358 * target.h (struct thread_resume) <sig>: New comment.
12359
12360 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12361
12362 * server.c (handle_query): strcpy() the returned string from paddress()
12363 instead of sprintf().
12364 * utils.c (paddress): Return phex_nz().
12365
12366 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12367
12368 * server.c (handle_v_cont): Call mourn_inferior if process
12369 just exited.
12370 (myresume): Likewise.
12371
12372 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12373
12374 Static tracepoints, and integration with UST.
12375
12376 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12377 * mem-break.c (uninsert_all_breakpoints)
12378 (reinsert_all_breakpoints): New.
12379 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12380 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12381 (gdb_agent_ust_loaded, helper_thread_id)
12382 (gdb_agent_helper_thread_id): New macros.
12383 (struct ipa_sym_addresses): Add addr_ust_loaded,
12384 addr_helper_thread_id, addr_cmd_buf.
12385 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12386 (in_process_agent_loaded_ust): New.
12387 (write_e_ust_not_loaded): New.
12388 (maybe_write_ipa_ust_not_loaded): New.
12389 (struct collect_static_trace_data_action): New.
12390 (enum tracepoint_type) <static_tracepoint>: New.
12391 (struct tracepoint) <handle>: Mention static tracepoints.
12392 (struct static_tracepoint_ctx): New.
12393 (CMD_BUF_SIZE): New.
12394 (add_tracepoint_action): Handle static tracepoint actions.
12395 (unprobe_marker_at): New.
12396 (clear_installed_tracepoints): Handle static tracepoints.
12397 (cmd_qtdp): Handle static tracepoints.
12398 (probe_marker_at): New.
12399 (cmd_qtstart): Handle static tracepoints.
12400 (response_tracepoint): Handle static tracepoints.
12401 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12402 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12403 (get_context_regcache): Handle static tracepoints.
12404 (do_action_at_tracepoint): Handle static tracepoint actions.
12405 (traceframe_find_block_type): Handle static trace data blocks.
12406 (traceframe_read_sdata): New.
12407 (download_tracepoints): Download static tracepoint actions.
12408 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12409 (GDB_PROBE_NAME): New.
12410 (ust_ops): New.
12411 (GET_UST_SYM): New.
12412 (USTF): New.
12413 (dlsym_ust): New.
12414 (ust_marker_to_static_tracepoint): New.
12415 (gdb_probe): New.
12416 (collect_ust_data_at_tracepoint): New.
12417 (gdb_ust_probe): New.
12418 (UNIX_PATH_MAX, SOCK_DIR): New.
12419 (gdb_ust_connect_sync_socket): New.
12420 (resume_thread, stop_thread): New.
12421 (run_inferior_command): New.
12422 (init_named_socket): New.
12423 (gdb_ust_socket_init): New.
12424 (cstr_to_hexstr): New.
12425 (next_st): New.
12426 (first_marker, next_marker): New.
12427 (response_ust_marker): New.
12428 (cmd_qtfstm, cmd_qtsstm): New.
12429 (unprobe_marker_at, probe_marker_at): New.
12430 (cmd_qtstmat, gdb_ust_thread): New.
12431 (gdb_ust_init): New.
12432 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12433 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12434 (ST_REGENTRY): New.
12435 (x86_64_st_collect_regmap): New.
12436 (X86_64_NUM_ST_COLLECT_GREGS): New.
12437 (AMD64_RIP_REGNUM): New.
12438 (supply_static_tracepoint_registers): New.
12439 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12440 (ST_REGENTRY): New.
12441 (i386_st_collect_regmap): New.
12442 (i386_NUM_ST_COLLECT_GREGS): New.
12443 (supply_static_tracepoint_registers): New.
12444 * server.c (handle_query): Handle qXfer:statictrace:read.
12445 <qSupported>: Report support for StaticTracepoints, and
12446 qXfer:statictrace:read features.
12447 * server.h (traceframe_read_sdata)
12448 (supply_static_tracepoint_registers): Declare.
12449 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12450 (unpack_varlen_hex): Include in IPA build.
12451 * Makefile.in (ustlibs, ustinc): New.
12452 (IPA_OBJS): Add remote-utils-ipa.o.
12453 ($(IPA_LIB)): Link -ldl and -lpthread.
12454 (UST_CFLAGS): New.
12455 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12456 * config.in, configure: Regenerate.
12457
12458 2010-06-20 Ian Lance Taylor <iant@google.com>
12459 Pedro Alves <pedro@codesourcery.com>
12460
12461 * linux-x86-low.c (always_true): Delete.
12462 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12463 trying to fool the compiler with always_true.
12464
12465 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12466
12467 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12468 conditions in gdbserver.
12469
12470 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12471
12472 * spu-low.c (spu_read_memory): Wrap around local store limit.
12473 (spu_write_memory): Likewise.
12474
12475 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12476
12477 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12478 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12479 LONGEST uses.
12480 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12481 uses.
12482 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12483 uses with LONGEST uses.
12484
12485 2010-06-14 Stan Shebs <stan@codesourcery.com>
12486 Pedro Alves <pedro@codesourcery.com>
12487
12488 Bytecode compiler.
12489
12490 * linux-x86-low.c: Include limits.h.
12491 (add_insns): New.
12492 (always_true): New.
12493 (EMIT_ASM): New.
12494 (EMIT_ASM32): New.
12495 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12496 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12497 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12498 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12499 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12500 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12501 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12502 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12503 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12504 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12505 (amd64_emit_void_call_2): New.
12506 (amd64_emit_ops): New.
12507 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12508 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12509 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12510 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12511 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12512 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12513 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12514 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12515 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12516 (i386_emit_stack_adjust, i386_emit_int_call_1)
12517 (i386_emit_void_call_2): New.
12518 (i386_emit_ops): New.
12519 (x86_emit_ops): New.
12520 (the_low_target): Install x86_emit_ops.
12521 * server.h (struct emit_ops): New.
12522 (get_raw_reg_func_addr): Declare.
12523 (current_insn_ptr, emit_error): Declare.
12524 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12525 (set_trace_state_variable_value): New defines.
12526 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12527 addr_get_trace_state_variable_value and
12528 addr_set_trace_state_variable_value.
12529 (symbol_list): New fields for get_raw_reg,
12530 get_trace_state_variable_value and set_trace_state_variable_value.
12531 (condfn): New typedef.
12532 (struct tracepoint): New field `compiled_cond'.
12533 (do_action_at_tracepoint): Clear compiled_cond.
12534 (get_trace_state_variable_value, set_trace_state_variable_value):
12535 Export in the IPA.
12536 (condition_true_at_tracepoint): If there's a compiled condition,
12537 run that.
12538 (current_insn_ptr, emit_error): New globals.
12539 (struct bytecode_address): New.
12540 (get_raw_reg_func_addr): New.
12541 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12542 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12543 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12544 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12545 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12546 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12547 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12548 (compile_tracepoint_condition, compile_bytecodes): New.
12549 * target.h (emit_ops): Forward declare.
12550 (struct target_ops): New field emit_ops.
12551 (target_emit_ops): New.
12552 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12553 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12554 * linux-low.c (linux_emit_ops): New.
12555 (linux_target_ops): Install it.
12556 * linux-low.h (struct linux_target_ops): New field emit_ops.
12557
12558 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12559
12560 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12561 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12562
12563 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12564 Stan Shebs <stan@codesourcery.com>
12565
12566 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12567 (all): Depend on $(extra_libraries).
12568 (install-only): Install the IPA.
12569 (IPA_OBJS, IPA_LIB): New.
12570 (clean): Remove the IPA lib.
12571 (IPAGENT_CFLAGS): New.
12572 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12573 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12574 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12575 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12576 * configure.ac: Check for atomic builtins support in the compiler.
12577 (IPA_DEPFILES, extra_libraries): Define.
12578 * configure.srv (ipa_obj): Add description.
12579 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12580 (i[34567]86-*-linux*): Set ipa_obj.
12581 (x86_64-*-linux*): Set ipa_obj.
12582 * linux-low.c (stabilizing_threads): New.
12583 (supports_fast_tracepoints): New.
12584 (linux_detach): Stabilize threads before detaching.
12585 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12586 the lwp is either not stabilizing, or is moving out of a jump pad.
12587 (linux_fast_tracepoint_collecting): New.
12588 (maybe_move_out_of_jump_pad): New.
12589 (enqueue_one_deferred_signal): New.
12590 (dequeue_one_deferred_signal): New.
12591 (linux_wait_for_event_1): If moving out of a jump pad, defer
12592 pending signals to later.
12593 (linux_stabilize_threads): New.
12594 (linux_wait_1): Check if threads need moving out of jump pads, and
12595 do it if so.
12596 (stuck_in_jump_pad_callback): New.
12597 (move_out_of_jump_pad_callback): New.
12598 (lwp_running): New.
12599 (linux_resume_one_lwp): Handle moving out of jump pads.
12600 (linux_set_resume_request): Dequeue deferred signals.
12601 (need_step_over_p): Also step over fast tracepoint jumps.
12602 (start_step_over): Also uninsert fast tracepoint jumps.
12603 (finish_step_over): Also reinsert fast tracepoint jumps.
12604 (linux_install_fast_tracepoint_jump): New.
12605 (linux_target_ops): Install linux_stabilize_threads and
12606 linux_install_fast_tracepoint_jump_pad.
12607 * linux-low.h (linux_target_ops) <get_thread_area,
12608 install_fast_tracepoint_jump_pad>: New fields.
12609 (struct lwp_info) <collecting_fast_tracepoint,
12610 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12611 (linux_get_thread_area): Declare.
12612 * linux-x86-low.c (jump_insn): New.
12613 (x86_get_thread_area): New.
12614 (append_insns): New.
12615 (push_opcode): New.
12616 (amd64_install_fast_tracepoint_jump_pad): New.
12617 (i386_install_fast_tracepoint_jump_pad): New.
12618 (x86_install_fast_tracepoint_jump_pad): New.
12619 (the_low_target): Install x86_get_thread_area and
12620 x86_install_fast_tracepoint_jump_pad.
12621 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12622 (struct fast_tracepoint_jump): New.
12623 (fast_tracepoint_jump_insn): New.
12624 (fast_tracepoint_jump_shadow): New.
12625 (find_fast_tracepoint_jump_at): New.
12626 (fast_tracepoint_jump_here): New.
12627 (delete_fast_tracepoint_jump): New.
12628 (set_fast_tracepoint_jump): New.
12629 (uninsert_fast_tracepoint_jumps_at): New.
12630 (reinsert_fast_tracepoint_jumps_at): New.
12631 (set_breakpoint_at): Use write_inferior_memory.
12632 (uninsert_raw_breakpoint): Use write_inferior_memory.
12633 (check_mem_read): Mask out fast tracepoint jumps.
12634 (check_mem_write): Mask out fast tracepoint jumps.
12635 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12636 (set_fast_tracepoint_jump): Declare.
12637 (delete_fast_tracepoint_jump)
12638 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12639 (reinsert_fast_tracepoint_jumps_at): Declare.
12640 * regcache.c: Don't compile many functions when building the
12641 in-process agent library.
12642 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12643 the register buffer in the heap.
12644 (free_register_cache): If the register buffer isn't owned by the
12645 regcache, don't free it.
12646 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12647 pre-existing register caches.
12648 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12649 type.
12650 (convert_ascii_to_int): : Constify `from' parameter type.
12651 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12652 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12653 the needed buffer in-place.
12654 (relocate_instruction): New.
12655 * server.c (handle_query) <qSymbols>: If the target supports
12656 tracepoints, give it a chance of looking up symbols. Report
12657 support for fast tracepoints.
12658 (handle_status): Stabilize threads.
12659 (process_serial_event): Adjust.
12660 * server.h (struct fast_tracepoint_jump): Forward declare.
12661 (struct process_info) <fast_tracepoint_jumps>: New field.
12662 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12663 (decode_X_packet, decode_M_packet): Adjust.
12664 (relocate_instruction): Declare.
12665 (in_process_agent_loaded): Declare.
12666 (tracepoint_look_up_symbols): Declare.
12667 (struct fast_tpoint_collect_status): Declare.
12668 (fast_tracepoint_collecting): Declare.
12669 (force_unlock_trace_buffer): Declare.
12670 (handle_tracepoint_bkpts): Declare.
12671 (initialize_low_tracepoint)
12672 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12673 * target.h (struct target_ops) <stabilize_threads,
12674 install_fast_tracepoint_jump_pad>: New fields.
12675 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12676 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12677 [HAVE_STDINT_H]: Include stdint.h.
12678 (trace_debug_1): Rename to ...
12679 (trace_vdebug): ... this.
12680 (trace_debug): Rename to ...
12681 (trace_debug_1): ... this. Add `level' parameter.
12682 (trace_debug): New.
12683 (ATTR_USED, ATTR_NOINLINE): New.
12684 (IP_AGENT_EXPORT): New.
12685 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12686 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12687 (about_to_request_buffer_space, trace_buffer_is_full)
12688 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12689 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12690 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12691 (traceframe_write_count, traceframes_created)
12692 (trace_state_variables)
12693 New renaming defines.
12694 (struct ipa_sym_addresses): New.
12695 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12696 (symbol_list): New.
12697 (ipa_sym_addrs): New.
12698 (all_tracepoint_symbols_looked_up): New.
12699 (in_process_agent_loaded): New.
12700 (write_e_ipa_not_loaded): New.
12701 (maybe_write_ipa_not_loaded): New.
12702 (tracepoint_look_up_symbols): New.
12703 (debug_threads) [IN_PROCESS_AGENT]: New.
12704 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12705 (UNKNOWN_SIDE_EFFECTS): New.
12706 (stop_tracing): New.
12707 (flush_trace_buffer): New.
12708 (stop_tracing_bkpt): New.
12709 (flush_trace_buffer_bkpt): New.
12710 (read_inferior_integer): New.
12711 (read_inferior_uinteger): New.
12712 (read_inferior_data_pointer): New.
12713 (write_inferior_data_pointer): New.
12714 (write_inferior_integer): New.
12715 (write_inferior_uinteger): New.
12716 (struct collect_static_trace_data_action): Delete.
12717 (enum tracepoint_type): New.
12718 (struct tracepoint) <type>: New field `type'.
12719 <actions_str, step_actions, step_actions_str>: Only include in
12720 GDBserver.
12721 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12722 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12723 (tracepoints): Use IP_AGENT_EXPORT.
12724 (last_tracepoint): Don't include in the IPA.
12725 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12726 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12727 (alloced_trace_state_variables): New.
12728 (trace_state_variables): Use IP_AGENT_EXPORT.
12729 (traceframe_t): Delete unused variable.
12730 (circular_trace_buffer): Don't include in the IPA.
12731 (trace_buffer_start): Delete.
12732 (struct trace_buffer_control): New.
12733 (trace_buffer_free): Delete.
12734 (struct ipa_trace_buffer_control): New.
12735 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12736 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12737 New.
12738 (trace_buffer_ctrl): New.
12739 (TRACE_BUFFER_CTRL_CURR): New.
12740 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12741 Reimplement as macros.
12742 (trace_buffer_wrap): Delete.
12743 (traceframe_write_count, traceframe_read_count)
12744 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12745 (struct tracepoint_hit_ctx) <type>: New field.
12746 (struct fast_tracepoint_ctx): New.
12747 (memory_barrier): New.
12748 (cmpxchg): New.
12749 (record_tracepoint_error): Update atomically in the IPA.
12750 (clear_inferior_trace_buffer): New.
12751 (about_to_request_buffer_space): New.
12752 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12753 updating the same buffer.
12754 (add_tracepoint): Default the tracepoint's type to trap
12755 tracepoint, and orig_size to -1.
12756 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12757 internal variables.
12758 (create_trace_state_variable): New parameter `gdb'. Handle it.
12759 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12760 (cmd_qtdp): Handle fast tracepoints.
12761 (cmd_qtdv): Adjust.
12762 (max_jump_pad_size): New.
12763 (gdb_jump_pad_head): New.
12764 (get_jump_space_head): New.
12765 (claim_jump_space): New.
12766 (sort_tracepoints): New.
12767 (MAX_JUMP_SIZE): New.
12768 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12769 IPA.
12770 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12771 support. Upload fast traceframes, and delete internal IPA
12772 breakpoints.
12773 (stop_tracing_handler): New.
12774 (flush_trace_buffer_handler): New.
12775 (cmd_qtstop): Upload fast tracepoints.
12776 (response_tracepoint): Handle fast tracepoints.
12777 (tracepoint_finished_step): Upload fast traceframes. Set the
12778 tracepoint hit context's tracepoint type.
12779 (handle_tracepoint_bkpts): New.
12780 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12781 type. Add comment about fast tracepoints.
12782 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12783 non-existing action_str field.
12784 (get_context_regcache): Handle fast tracepoints.
12785 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12786 to the regcache.
12787 (fast_tracepoint_from_jump_pad_address): New.
12788 (fast_tracepoint_from_ipa_tpoint_address): New.
12789 (collecting_t): New.
12790 (force_unlock_trace_buffer): New.
12791 (fast_tracepoint_collecting): New.
12792 (collecting): New.
12793 (gdb_collect): New.
12794 (write_inferior_data_ptr): New.
12795 (target_tp_heap): New.
12796 (target_malloc): New.
12797 (download_agent_expr): New.
12798 (UALIGN): New.
12799 (download_tracepoints): New.
12800 (download_trace_state_variables): New.
12801 (upload_fast_traceframes): New.
12802 (IPA_FIRST_TRACEFRAME): New.
12803 (IPA_NEXT_TRACEFRAME_1): New.
12804 (IPA_NEXT_TRACEFRAME): New.
12805 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12806 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12807 (gdb_jump_pad_buffer_end): New.
12808 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12809 (initialize_tracepoint): Adjust.
12810 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12811 buffer. Initialize the low module.
12812 * utils.c (PREFIX, TOOLNAME): New.
12813 (malloc_failure): Use PREFIX.
12814 (error): In the IPA, an error causes an exit.
12815 (fatal, warning): Use PREFIX.
12816 (internal_error): Use TOOLNAME.
12817 (NUMCELLS): Increase to 10.
12818 * configure, config.in: Regenerate.
12819
12820 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12821
12822 * server.c (handle_query) <qSupported>: Do two passes over the
12823 qSupported string to avoid nesting strtok.
12824
12825 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12826
12827 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12828 (CDEPS): New.
12829 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12830 -Wl,--dynamic-list.
12831 * configure: Regenerate.
12832 * proc-service.list: New.
12833
12834 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12835
12836 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12837 New comment.
12838
12839 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12840
12841 * gdbreplay.c (remote_open): Check error return from socket() call by
12842 its equality to -1 not by it being negative.
12843 * remote-utils.c (remote_open): Likewise.
12844
12845 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12846
12847 * config.h: Regenerate.
12848
12849 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12850
12851 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12852 doesn't provide PTRACE_GET_THREAD_AREA.
12853
12854 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12855
12856 * linux-m68k-low.c: Include <asm/ptrace.h>
12857 (ps_get_thread_area): Implement.
12858
12859 2010-05-03 Doug Evans <dje@google.com>
12860
12861 * event-loop.c (struct callback_event): New struct.
12862 (callback_list): New global.
12863 (append_callback_event, delete_callback_event): New functions.
12864 (process_callback): New function.
12865 (start_event_loop): Call it.
12866 * remote-utils.c (NOT_SCHEDULED): Define.
12867 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12868 moved out of readchar.
12869 (readchar): Rewrite. Call reschedule before returning.
12870 (reset_readchar): New function.
12871 (remote_close): Call it.
12872 (process_remaining, reschedule): New functions.
12873 * server.h (callback_handler_func): New typedef.
12874 (append_callback_event, delete_callback_event): Declare.
12875
12876 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12877
12878 * proc-service.c (ps_pglobal_lookup): Use
12879 thread_db_look_up_one_symbol.
12880 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12881 parameter. Use it instead of all_symbols_looked_up.
12882 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12883 field.
12884 (all_symbols_looked_up): Don't declare.
12885 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12886 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12887 field.
12888 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12889 Set all_symbols_looked_up here.
12890 (thread_db_look_up_one_symbol): New.
12891 (thread_db_get_tls_address): Adjust.
12892 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12893 thread_db object on the heap, and tentatively set it in the
12894 process structure.
12895 (thread_db_init): Don't set all_symbols_looked_up here.
12896 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12897
12898 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12899
12900 * linux-low.c (linux_kill, linux_detach): Adjust.
12901 (status_pending_p_callback): Remove redundant statement. Check
12902 for !TARGET_WAITIKIND_IGNORE, instead of
12903 TARGET_WAITKIND_STOPPED.
12904 (handle_tracepoints): Make sure LWP is locked. Adjust.
12905 (linux_wait_for_event_1): Adjust.
12906 (linux_cancel_breakpoints): New.
12907 (unsuspend_one_lwp): New.
12908 (unsuspend_all_lwps): New.
12909 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12910 (send_sigstop_callback): Change return type to int, add new
12911 `except' parameter and handle it.
12912 (suspend_and_send_sigstop_callback): New.
12913 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12914 pass them down. If SUSPEND, also increment the lwp's suspend
12915 count.
12916 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12917 (need_step_over_p): Don't consider suspended LWPs.
12918 (start_step_over): Adjust.
12919 (proceed_one_lwp): Change return type to int, add new `except'
12920 parameter and handle it.
12921 (unsuspend_and_proceed_one_lwp): New.
12922 (proceed_all_lwps): Use find_inferior instead of
12923 for_each_inferior.
12924 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12925 also decrement the suspend count of LWPs. Pass `except' down,
12926 instead of hacking its suspend count.
12927 (linux_pause_all): Add `freeze' parameter. Adjust.
12928 (linux_unpause_all): New.
12929 (linux_target_ops): Install linux_unpause_all.
12930 * server.c (handle_status): Adjust.
12931 * target.h (struct target_ops): New fields `unpause_all' and
12932 `cancel_breakpoints'. Add new parameter to `pause_all'.
12933 (pause_all): Add new `freeze' parameter.
12934 (unpause_all): New.
12935 (cancel_breakpoints): New.
12936 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12937 cancel breakpoints.
12938 (cmd_qtstart): Pause threads.
12939 (stop_tracing): Pause threads, and cancel breakpoints.
12940 * win32-low.c (win32_target_ops): Adjust.
12941
12942 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12943
12944 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12945 the inferior right away from here...
12946 (linux_wait_1): ... to here, and adjust to check the thread's
12947 last_resume_kind instead of the lwp's step or stop_expected flags.
12948
12949 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12950
12951 * README: Use consistent `GDB' and `GDBserver' spellings.
12952
12953 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12954
12955 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12956 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12957 (linux_detach_one_lwp): Assume the lwp is stopped.
12958 (any_thread_of): Delete.
12959 (linux_detach): Stop all lwps here. Don't blindly delete all
12960 breakpoints.
12961 (delete_lwp_callback): New.
12962 (linux_mourn): Delete all lwps of the process that is gone.
12963 (linux_wait_1): Don't delete the last lwp of the process here.
12964 * mem-break.h (mark_breakpoints_out): Declare.
12965 * mem-break.c (mark_breakpoints_out): New.
12966 (free_all_breakpoints): Use it.
12967 * server.c (handle_target_event): If the process is gone, mark
12968 breakpoints out.
12969 * thread-db.c (struct thread_db) <create_bp>: New field.
12970 (thread_db_enable_reporting): Fix prototype. Store a thread event
12971 breakpoint reference in the thread_db struct.
12972 (thread_db_load_search): Clear the thread_db object.
12973 (try_thread_db_load_1): Ditto.
12974 (switch_to_process): New.
12975 (disable_thread_event_reporting): Use it.
12976 (remove_thread_event_breakpoints): New.
12977 (thread_db_detach, thread_db_mourn): Use it.
12978
12979 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12980
12981 * linux-low.c (linux_enable_event_reporting): New.
12982 (linux_wait_for_event_1, handle_extended_wait): Use it.
12983
12984 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12985
12986 * linux-low.c (linux_kill_one_lwp, linux_kill)
12987 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12988 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12989 SIGSTOP even if the LWP is stopped.
12990 (send_sigstop_callback): New.
12991 (stop_all_lwps): Use send_sigstop_callback instead.
12992 (linux_resume_one_thread): Adjust.
12993 (proceed_one_lwp): Still proceed an LWP that the client has
12994 requested to stop, if we haven't reported it as stopped yet. Make
12995 sure that LWPs the client want stopped, have a pending SIGSTOP.
12996
12997 2010-04-26 Doug Evans <dje@google.com>
12998
12999 * server.c (handle_general_set): Make static.
13000
13001 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13002 Print received char after testing for error/eof instead of before.
13003 (input_interrupt): Tweak comment.
13004
13005 2010-04-23 Doug Evans <dje@google.com>
13006
13007 * server.c (start_inferior): Print inferior argv if --debug.
13008
13009 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13010
13011 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13012 * nto-x86-low.c: Include server.h
13013
13014 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13015
13016 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13017 be consistent with other sources of this directory.
13018 (init_registers_amd64): Correct name of source file of this function
13019 in the comment.
13020
13021 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13022
13023 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13024 64-bit executables.
13025
13026 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13027
13028 * win32-i386-low.c: Add 64-bit support.
13029 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13030 (init_registers_amd64): Declare.
13031 (mappings): Add 64-bit version of array.
13032 (init_windows_x86): New function.
13033 (the_low_target): Change init_arch field to init_windows_x86.
13034
13035 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13036
13037 * win32-low.c: Adapt to support also 64-bit architecture.
13038 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13039 (get_image_name): Use SIZE_T type for local variable `done'.
13040 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13041 (toolhelp_get_dll_name): Idem.
13042 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13043 Use uintptr_t typecast to avoid warning.
13044 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13045 (handle_exception): Use phex_nz to avoid warning.
13046 (win32_wait): Remove unused local variable `process'.
13047
13048 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13049
13050 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13051 `amd64-avx.o'.
13052
13053 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13054
13055 * configure.ac: Use `ws2_32' library for srv_mingw.
13056 * configure: Regenerate.
13057 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13058 * remote-utils.c: Likewise.
13059
13060 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13061
13062 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13063 if __x86_64__ is defined.
13064
13065 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13066
13067 * configure: Regenerate.
13068
13069 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13070
13071 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13072 * target.h (target_ops): New get_tib_address field.
13073 * win32-low.h (win32_thread_info): Add thread_local_base field.
13074 * win32-low.c (child_add_thread): Add tlb argument.
13075 Set thread_local_base field to TLB.
13076 (get_child_debug_event): Adapt to child_add_thread change.
13077 (win32_get_tib_address): New function.
13078 (win32_target_ops): Set get_tib_address field to
13079 win32_get_tib_address.
13080 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13081
13082 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13083
13084 * linux-low.c (linux_mourn): Also remove the process.
13085 * server.c (handle_target_event): Don't remove the process here.
13086 * nto-low.c (nto_mourn): New.
13087 (nto_target_ops): Install it.
13088 * spu-low.c (spu_mourn): New.
13089 (spu_target_ops): Install it.
13090 * win32-low.c (win32_mourn): New.
13091 (win32_target_ops): Install it.
13092
13093 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13094
13095 * server.h (buffer_xml_printf): Remove redundant `;'.
13096
13097 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13098
13099 * regcache.c (set_register_cache): Invalidate regcaches before
13100 changing the register cache layout.
13101 (regcache_invalidate_one): Allow a NULL regcache.
13102 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13103 regcaches before changing the register cache layout or the target
13104 regsets.
13105
13106 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13107
13108 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13109 variable warning on Linux/x86-64.
13110
13111 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13112
13113 GDBserver disconnected tracing support.
13114
13115 * linux-low.c (linux_remove_process): Delete.
13116 (add_lwp): Don't set last_resume_kind here.
13117 (linux_kill): Use `mourn'.
13118 (linux_detach): Use `thread_db_detach', and `mourn'.
13119 (linux_mourn): New.
13120 (linux_attach_lwp_1): Adjust comment.
13121 (linux_attach): last_resume_kind moved the thread_info; adjust.
13122 (status_pending_p_callback): Adjust.
13123 (linux_wait_for_event_1): Adjust.
13124 (count_events_callback, select_singlestep_lwp_callback)
13125 (select_event_lwp_callback, cancel_breakpoints_callback)
13126 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13127 (proceed_one_lwp): Adjust.
13128 (linux_async): Add debug output.
13129 (linux_thread_stopped): New.
13130 (linux_pause_all): New.
13131 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13132 linux_pause_all.
13133 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13134 (thread_db_free): Delete declaration.
13135 (thread_db_detach, thread_db_mourn): Declare.
13136 * thread-db.c (thread_db_init): Use thread_db_mourn.
13137 (thread_db_free): Delete, split in two.
13138 (disable_thread_event_reporting): New.
13139 (thread_db_detach): New.
13140 (thread_db_mourn): New.
13141
13142 * server.h (struct thread_info) <last_resume_kind>: New field.
13143 <attached>: Add comment.
13144 <gdb_detached>: New field.
13145 (handler_func): Change return type to int.
13146 (handle_serial_event, handle_target_event): Ditto.
13147 (gdb_connected): Declare.
13148 (tracing): Delete.
13149 (disconnected_tracing): Declare.
13150 (stop_tracing): Declare.
13151
13152 * server.c (handle_query) <qSupported>: Report support for
13153 disconnected tracing.
13154 (queue_stop_reply_callback): Account for running threads.
13155 (gdb_wants_thread_stopped): New.
13156 (gdb_wants_all_threads_stopped): New.
13157 (gdb_reattached_process): New.
13158 (handle_status): Clear the `gdb_detached' flag of all processes.
13159 In all-stop, stop all threads.
13160 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13161 (process_serial_event): If the remote connection breaks, or if an
13162 exit was forced with "monitor exit", force an event loop exit.
13163 Handle disconnected tracing on detach.
13164 (handle_serial_event): Adjust.
13165 (handle_target_event): If GDB isn't connected, forward events back
13166 to the inferior, unless the last process exited, in which case,
13167 exit gdbserver. Adjust interface.
13168
13169 * remote-utils.c (remote_open): Don't block in accept. Instead
13170 register an event loop source on the listen socket file
13171 descriptor. Refactor bits into ...
13172 (listen_desc): ... this new global.
13173 (gdb_connected): ... this new function.
13174 (enable_async_notification): ... this new function.
13175 (handle_accept_event): ... this new function.
13176 (remote_close): Clear remote_desc.
13177
13178 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13179
13180 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13181 New fields.
13182 (mourn_inferior): Define.
13183 (target_process_qsupported): Avoid the dangling else problem.
13184 (thread_stopped): Define.
13185 (pause_all): Define.
13186 (target_waitstatus_to_string): Declare.
13187 * target.c (target_waitstatus_to_string): New.
13188
13189 * tracepoint.c (tracing): Make extern.
13190 (disconnected_tracing): New.
13191 (stop_tracing): Make extern. Handle tracing stops due to GDB
13192 disconnecting.
13193 (cmd_qtdisconnected): New.
13194 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13195 (handle_tracepoint_general_set): Handle QTDisconnected.
13196
13197 * event-loop.c (event_handler_func): Change return type to int.
13198 (process_event): Bail out if the event handler wants the event
13199 loop to stop.
13200 (handle_file_event): Ditto.
13201 (start_event_loop): Bail out if the event handler wants the event
13202 loop to stop.
13203
13204 * nto-low.c (nto_target_ops): Adjust.
13205 * spu-low.c (spu_wait): Don't remove the process here.
13206 (spu_target_ops): Adjust.
13207 * win32-low.c (win32_wait): Don't remove the process here.
13208 (win32_target_ops): Adjust.
13209
13210 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13211
13212 * regcache.c (realloc_register_cache): Invalidate inferior's
13213 regcache before recreating it.
13214
13215 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13216
13217 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13218
13219 2010-04-09 Stan Shebs <stan@codesourcery.com>
13220 Pedro Alves <pedro@codesourcery.com>
13221
13222 * server.h (LONGEST): New.
13223 (struct thread_info) <while_stepping>: New field.
13224 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13225 Declare.
13226 (initialize_tracepoint, handle_tracepoint_general_set)
13227 (handle_tracepoint_query, tracepoint_finished_step)
13228 (tracepoint_was_hit, release_while_stepping_state_list):
13229 (current_traceframe): Declare.
13230 * server.c (handle_general_set): Handle tracepoint packets.
13231 (read_memory): New.
13232 (write_memory): New.
13233 (handle_search_memory_1): Use read_memory.
13234 (handle_query): Report support for conditional tracepoints, trace
13235 state variables, and tracepoint sources. Handle tracepoint
13236 queries.
13237 (main): Initialize the tracepoints module.
13238 (process_serial_event): Handle traceframe reads/writes.
13239
13240 * linux-low.c (handle_tracepoints): New.
13241 (linux_wait_1): Call it.
13242 (linux_resume_one_lwp): Handle while-stepping.
13243 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13244 (linux_target_ops): Install them.
13245 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13246 New field.
13247 * linux-x86-low.c (x86_supports_tracepoints): New.
13248 (the_low_target). Install it.
13249
13250 * mem-break.h (delete_breakpoint): Declare.
13251 * mem-break.c (delete_breakpoint): Make external.
13252
13253 * target.h (struct target_ops): Add `supports_tracepoints',
13254 `read_pc', and `write_pc' fields.
13255 (target_supports_tracepoints): Define.
13256 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13257 (phex_nz): New.
13258
13259 * regcache.h (struct regcache) <registers_owned>: New field.
13260 (init_register_cache, regcache_cpy): Declare.
13261 (regcache_read_pc, regcache_write_pc): Declare.
13262 (register_cache_size): Declare.
13263 (supply_regblock): Declare.
13264 * regcache.c (init_register_cache): New.
13265 (new_register_cache): Use it.
13266 (regcache_cpy): New.
13267 (register_cache_size): New.
13268 (supply_regblock): New.
13269 (regcache_read_pc, regcache_write_pc): New.
13270
13271 * tracepoint.c: New.
13272
13273 * Makefile.in (OBS): Add tracepoint.o.
13274 (tracepoint.o): New rule.
13275
13276 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13277
13278 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13279 (i386-mmx.o): New.
13280 (i386-mmx.c): Likewise.
13281 (i386-mmx-linux.o): Likewise.
13282 (i386-mmx-linux.c): Likewise.
13283
13284 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13285 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13286 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13287 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13288
13289 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13290 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13291 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13292
13293 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13294
13295 * Makefile.in (clean): Updated.
13296 (i386-avx.o): New.
13297 (i386-avx.c): Likewise.
13298 (i386-avx-linux.o): Likewise.
13299 (i386-avx-linux.c): Likewise.
13300 (amd64-avx.o): Likewise.
13301 (amd64-avx.c): Likewise.
13302 (amd64-avx-linux.o): Likewise.
13303 (amd64-avx-linux.c): Likewise.
13304
13305 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13306 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13307 (srv_amd64_regobj): Add amd64-avx.o.
13308 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13309 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13310 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13311 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13312 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13313 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13314 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13315
13316 * i387-fp.c: Include "i386-xstate.h".
13317 (i387_xsave): New.
13318 (i387_cache_to_xsave): Likewise.
13319 (i387_xsave_to_cache): Likewise.
13320 (x86_xcr0): Likewise.
13321
13322 * i387-fp.h (i387_cache_to_xsave): Likewise.
13323 (i387_xsave_to_cache): Likewise.
13324 (x86_xcr0): Likewise.
13325
13326 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13327 * linux-crisv32-low.c (target_regsets): Likewise.
13328 * linux-m68k-low.c (target_regsets): Likewise.
13329 * linux-mips-low.c (target_regsets): Likewise.
13330 * linux-ppc-low.c (target_regsets): Likewise.
13331 * linux-s390-low.c (target_regsets): Likewise.
13332 * linux-sh-low.c (target_regsets): Likewise.
13333 * linux-sparc-low.c (target_regsets): Likewise.
13334 * linux-xtensa-low.c (target_regsets): Likewise.
13335
13336 * linux-low.c: Include <sys/uio.h>.
13337 (regsets_fetch_inferior_registers): Support nt_type.
13338 (regsets_store_inferior_registers): Likewise.
13339 (linux_process_qsupported): New.
13340 (linux_target_ops): Add linux_process_qsupported.
13341
13342 * linux-low.h (regset_info): Add nt_type.
13343 (linux_target_ops): Add process_qsupported.
13344
13345 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13346 and <sys/uio.h>.
13347 (init_registers_i386_avx_linux): New.
13348 (init_registers_amd64_avx_linux): Likewise.
13349 (xmltarget_i386_linux_no_xml): Likewise.
13350 (xmltarget_amd64_linux_no_xml): Likewise.
13351 (PTRACE_GETREGSET): Likewise.
13352 (PTRACE_SETREGSET): Likewise.
13353 (x86_fill_xstateregset): Likewise.
13354 (x86_store_xstateregset): Likewise.
13355 (use_xml): Likewise.
13356 (x86_linux_update_xmltarget): Likewise.
13357 (x86_linux_process_qsupported): Likewise.
13358 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13359 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13360 init_registers_i386_linux here. Call
13361 x86_linux_update_xmltarget.
13362 (the_low_target): Add x86_linux_process_qsupported.
13363
13364 * server.c (handle_query): Call target_process_qsupported.
13365
13366 * target.h (target_ops): Add process_qsupported.
13367 (target_process_qsupported): New.
13368
13369 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13370
13371 * inferiors.c (add_thread): Set last_status kind to
13372 TARGET_WAITKIND_IGNORE.
13373 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13374 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13375 (linux_wait_1): Move `thread' local definition to block that uses
13376 it. Don't NULL initialize `event_child'.
13377 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13378 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13379 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13380
13381 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13382
13383 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13384 an extended waitstatus, or by a watchpoint.
13385 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13386 thread was stepping or has been stopped by a watchpoint.
13387
13388 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13389
13390 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13391 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13392 of another, then delete the previous, and validate all
13393 breakpoints.
13394 (validate_inserted_breakpoint): New.
13395 (delete_disabled_breakpoints): New.
13396 (validate_breakpoints): New.
13397 (check_mem_read): Validate breakpoints before trusting their
13398 shadow. Delete disabled breakpoints.
13399 (check_mem_write): Validate breakpoints before trusting they
13400 should be inserted. Delete disabled breakpoints.
13401 * mem-break.h (validate_breakpoints):
13402 * server.c (handle_query): Validate breakpoints when we see a
13403 qSymbol query.
13404
13405 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13406
13407 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13408 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13409 if we could tell there's a GDB breakpoint at stop_pc.
13410 (need_step_over_p): Don't do a step over if we find a GDB
13411 breakpoint at the resume PC.
13412
13413 * mem-break.c (struct raw_breakpoint): New.
13414 (enum bkpt_type): New type `gdb_breakpoint'.
13415 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13416 fields. New field `raw'.
13417 (find_raw_breakpoint_at): New.
13418 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13419 breakpoint instead.
13420 (set_breakpoint_at): Adjust.
13421 (delete_raw_breakpoint): New.
13422 (release_breakpoint): New.
13423 (delete_breakpoint): Rename to...
13424 (delete_breakpoint_1): ... this. Add proc parameter. Use
13425 release_breakpoint. Return ENOENT.
13426 (delete_breakpoint): Reimplement.
13427 (find_breakpoint_at): Delete.
13428 (find_gdb_breakpoint_at): New.
13429 (delete_breakpoint_at): Delete.
13430 (set_gdb_breakpoint_at): New.
13431 (delete_gdb_breakpoint_at): New.
13432 (gdb_breakpoint_here): New.
13433 (set_reinsert_breakpoint): Use release_breakpoint.
13434 (uninsert_breakpoint): Rename to ...
13435 (uninsert_raw_breakpoint): ... this.
13436 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13437 (reinsert_raw_breakpoint): Change parameter type to
13438 raw_breakpoint.
13439 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13440 instead.
13441 (check_breakpoints): Adjust. Use release_breakpoint.
13442 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13443 (breakpoint_inserted_here): Ditto.
13444 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13445 Don't trust the breakpoint's shadow if it is not inserted.
13446 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13447 (delete_all_breakpoints): Adjust.
13448 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13449 use delete_breakpoint_1.
13450
13451 * mem-break.h (breakpoints_supported): Delete declaration.
13452 (set_gdb_breakpoint_at): Declare.
13453 (gdb_breakpoint_here): Declare.
13454 (delete_breakpoint_at): Delete.
13455 (delete_gdb_breakpoint_at): Declare.
13456
13457 * server.h (struct raw_breakpoint): Forward declare.
13458 (struct process_info): New field `raw_breakpoints'.
13459
13460 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13461 breakpoints.
13462
13463 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13464
13465 * linux-low.c (status_pending_p_callback): Fix comment.
13466 (linux_wait_for_event_1): Move most of the internal breakpoint
13467 handling from here...
13468 (linux_wait_1): ... to here.
13469 (count_events_callback): New.
13470 (select_singlestep_lwp_callback): New.
13471 (select_event_lwp_callback): New.
13472 (cancel_breakpoints_callback): New.
13473 (select_event_lwp): New.
13474 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13475 priority to all LWPs that have had events that should be reported
13476 to the client. Cancel breakpoints when about to reporting the
13477 event to the client, not while stopping lwps. No longer cancel
13478 finished single-steps here.
13479 (cancel_finished_single_step): Delete.
13480 (cancel_finished_single_steps): Delete.
13481
13482 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13483
13484 * mem-break.c (enum bkpt_type): New.
13485 (struct breakpoint): New field `type'.
13486 (set_breakpoint_at): Change return type to struct breakpoint
13487 pointer. Set type to `other_breakpoint' by default.
13488 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13489 in the breakpoint list.
13490 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13491 (reinsert_breakpoint): Rename to ...
13492 (reinsert_raw_breakpoint): ... this.
13493 (reinsert_breakpoints_at): Adjust.
13494 * mem-break.h (struct breakpoint): Declare.
13495 (set_breakpoint_at): Change return type to struct breakpoint
13496 pointer.
13497
13498 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13499
13500 * server.c (handle_query): Assign, not compare.
13501
13502 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13503
13504 Teach linux gdbserver to step-over-breakpoints.
13505
13506 * linux-low.c (can_hardware_single_step): New.
13507 (supports_breakpoints): New.
13508 (handle_extended_wait): If stopping threads, read the stop pc of
13509 the new cloned LWP.
13510 (get_pc): New.
13511 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13512 low target doesn't support retrieving the PC.
13513 (add_lwp): Set last_resume_kind to resume_continue.
13514 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13515 (linux_attach): Don't clear stop_expected. Set the lwp's
13516 last_resume_kind to resume_stop.
13517 (linux_detach_one_lwp): Don't check for removed breakpoints.
13518 (check_removed_breakpoint): Delete.
13519 (status_pending_p): Rename to ...
13520 (status_pending_p_callback): ... this. Don't check for removed
13521 breakpoints. Don't consider threads that are stopped from GDB's
13522 perspective.
13523 (linux_wait_for_lwp): Always read the stop_pc here.
13524 (cancel_breakpoint): New.
13525 (step_over_bkpt): New global.
13526 (linux_wait_for_event_1): Implement stepping over breakpoints.
13527 (gdb_wants_lwp_stopped): New.
13528 (gdb_wants_all_stopped): New.
13529 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13530 single-step traps here. Store the thread's last reported target
13531 wait status.
13532 (send_sigstop): Don't clear stop_expected. Always set it,
13533 instead.
13534 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13535 (cancel_finished_single_step): New.
13536 (cancel_finished_single_steps): New.
13537 (wait_for_sigstop): Don't cancel finished single-step traps here.
13538 (linux_resume_one_lwp): Don't check for removed breakpoints.
13539 Don't set `step' on non-hardware step archs.
13540 (linux_set_resume_request): Ignore resume_stop requests if already
13541 stopping or stopped. Set the lwp's last_resume_kind.
13542 (resume_status_pending_p): Don't check for removed breakpoints.
13543 (need_step_over_p): New.
13544 (start_step_over): New.
13545 (finish_step_over): New.
13546 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13547 requests. Clear the thread's last reported target waitstatus.
13548 Don't use the `suspended' flag. Don't consider pending breakpoints.
13549 (linux_resume): Start a step-over if necessary.
13550 (proceed_one_lwp): New.
13551 (proceed_all_lwps): New.
13552 (unstop_all_lwps): New.
13553 * linux-low.h (struct lwp_info): Rewrite comment for the
13554 `suspended' flag. Add the `stop_pc' field. Delete the
13555 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13556 Add `'last_resume_kind' and `need_step_over' fields.
13557 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13558 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13559 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13560 (set_raw_breakpoint_at): New.
13561 (set_breakpoint_at): Rewrite to use it.
13562 (reinsert_breakpoint_handler): Delete.
13563 (set_reinsert_breakpoint): New.
13564 (reinsert_breakpoint_by_bp): Delete.
13565 (delete_reinsert_breakpoints): New.
13566 (uninsert_breakpoint): Rewrite.
13567 (uninsert_breakpoints_at): New.
13568 (reinsert_breakpoint): Rewrite.
13569 (reinsert_breakpoints_at): New.
13570 (check_breakpoints): Rewrite.
13571 (breakpoint_here): New.
13572 (breakpoint_inserted_here): New.
13573 (check_mem_read): Adjust.
13574 * mem-break.h (breakpoints_supported, breakpoint_here)
13575 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13576 (reinsert_breakpoint_by_bp): Delete declaration.
13577 (delete_reinsert_breakpoints): Declare.
13578 (reinsert_breakpoint): Delete declaration.
13579 (reinsert_breakpoints_at): Declare.
13580 (uninsert_breakpoint): Delete declaration.
13581 (uninsert_breakpoints_at): Declare.
13582 (check_breakpoints): Adjust prototype.
13583 * server.h: Adjust include order.
13584 (struct thread_info): Declare here. Add a `last_status' field.
13585
13586 2010-03-23 Michael Snyder <msnyder@vmware.com>
13587
13588 * server.c (crc32): New function.
13589 (handle_query): Add handling for 'qCRC:' request.
13590
13591 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13592
13593 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13594 lwp had been stopped by a watchpoint.
13595
13596 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13597
13598 * server.h (internal_error): Declare.
13599 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13600 * utils.c (internal_error): New function.
13601
13602 2010-03-15 Andreas Schwab <schwab@redhat.com>
13603
13604 * configure.srv: Fix typo setting srv_regobj.
13605
13606 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13607
13608 * linux-low.c (fetch_register): Avoid passing a non string literal
13609 format to `error'.
13610 (usr_store_inferior_registers): Ditto.
13611
13612 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13613
13614 * linux-low.c (linux_write_memory): Bail out early if peeking
13615 memory failed.
13616
13617 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13618
13619 * linux-low.h (struct lwp_info): New fields
13620 `stopped_by_watchpoint' and `stopped_data_address'.
13621 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13622 here, and cache them in the lwp object.
13623 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13624 directly.
13625 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13626 field.
13627 (linux_stopped_by_watchpoint): Rewrite.
13628 (linux_stopped_data_address): Rewrite.
13629
13630 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13631
13632 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13633 switching the current inferior, not before.
13634
13635 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13636
13637 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13638 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13639 i386-linux.c and amd64-linux.c.
13640 (reg-i386.o): Removed.
13641 (reg-i386.c): Likewise.
13642 (reg-i386-linux.o): Likewise.
13643 (reg-i386-linux.c): Likewise.
13644 (reg-x86-64.o): Likewise.
13645 (reg-x86-64.c): Likewise.
13646 (reg-x86-64-linux.o): Likewise.
13647 (reg-x86-64-linux.c): Likewise.
13648 (i386.o): New.
13649 (i386.c): Likewise.
13650 (i386-linux.o): Likewise.
13651 (i386-linux.c): Likewise.
13652 (amd64.o): Likewise.
13653 (amd64.c): Likewise.
13654 (amd64-linux.o): Likewise.
13655 (amd64-linux.c): Likewise.
13656
13657 * configure.srv (srv_i386_regobj): New.
13658 (srv_i386_linux_regobj): Likewise.
13659 (srv_amd64_regobj): Likewise.
13660 (srv_amd64_linux_regobj): Likewise.
13661 (srv_i386_32bit_xmlfiles): Likewise.
13662 (srv_i386_64bit_xmlfiles): Likewise.
13663 (srv_i386_xmlfiles): Likewise.
13664 (srv_amd64_xmlfiles): Likewise.
13665 (srv_i386_linux_xmlfiles): Likewise.
13666 (srv_amd64_linux_xmlfiles): Likewise.
13667 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13668 srv_xmlfiles to $srv_i386_xmlfiles.
13669 (i[34567]86-*-mingw32ce*): Likewise.
13670 (i[34567]86-*-mingw*): Likewise.
13671 (i[34567]86-*-nto*): Likewise.
13672 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13673 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13674 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13675 (x86_64-*-linux*): Likewise.
13676
13677 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13678 (init_registers_amd64_linux): New.
13679 (x86_arch_setup): Replace init_registers_x86_64_linux with
13680 init_registers_amd64_linux.
13681
13682 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13683
13684 * configure.ac: Check for libdl. If it is not available link against
13685 static libthread_db.
13686 * configure: Regenerate.
13687
13688 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13689
13690 PR9605
13691
13692 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13693 handing a read watchpoint.
13694 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13695
13696 2010-02-12 Doug Evans <dje@google.com>
13697
13698 * linux-low.c (linux_supports_tracefork_flag): Document.
13699 (linux_look_up_symbols): Add comment.
13700
13701 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13702
13703 * regcache.c (supply_register): Clear regcache if buf is NULL.
13704
13705 2010-02-02 Nicolas Roche <roche@sourceware.org>
13706 Joel Brobecker <brobecker@adacore.com>
13707
13708 * inferiors.c (find_inferior): Add function documentation.
13709 (unloaded_dll): Handle the case where the unloaded dll has not
13710 been previously registered in the dll list.
13711
13712 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13713
13714 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13715 (thumb2_breakpoint): New.
13716 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13717
13718 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13719
13720 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13721 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13722 breakpoints.
13723
13724 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13725
13726 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13727
13728 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13729
13730 * linux-s390-low.c (s390_collect_ptrace_register)
13731 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13732
13733 2010-01-21 Doug Evans <dje@google.com>
13734
13735 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13736 (PTRACE_ARG4_TYPE): New macro.
13737 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13738 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13739 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13740 (usr_store_inferior_registers): Ditto.
13741 (linux_read_memory, linux_write_memory): Ditto.
13742 (linux_test_for_tracefork): Ditto.
13743
13744 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13745 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13746
13747 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13748
13749 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13750 target.
13751
13752 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13753
13754 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13755 prototype to take a regcache. Adjust.
13756
13757 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13758
13759 * regcache.h (struct thread_info): Forward declare.
13760 (struct regcache): New.
13761 (new_register_cache): Adjust prototype.
13762 (get_thread_regcache): Declare.
13763 (free_register_cache): Adjust prototype.
13764 (registers_to_string, registers_from_string): Ditto.
13765 (supply_register, supply_register_by_name, collect_register)
13766 (collect_register_as_string, collect_register_by_name): Ditto.
13767 * regcache.c (struct inferior_regcache_data): Delete.
13768 (get_regcache): Rename to ...
13769 (get_thread_regcache): ... this. Adjust. Switch inferior before
13770 fetching registers.
13771 (regcache_invalidate_one): Adjust.
13772 (regcache_invalidate): Fix prototype.
13773 (new_register_cache): Return the new register cache.
13774 (free_register_cache): Change prototype.
13775 (realloc_register_cache): Adjust.
13776 (registers_to_string): Change prototype to take a regcache. Adjust.
13777 (registers_from_string): Ditto.
13778 (register_data): Ditto.
13779 (supply_register): Ditto.
13780 (supply_register_by_name): Ditto.
13781 (collect_register): Ditto.
13782 (collect_register_as_string): Ditto.
13783 (collect_register_by_name): Ditto.
13784 * server.c (process_serial_event): Adjust.
13785 * linux-low.h (regset_fill_func, regset_store_func): Change
13786 prototype.
13787 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13788 Change prototype.
13789 * linux-low.c (get_stop_pc): Adjust.
13790 (check_removed_breakpoint): Adjust.
13791 (linux_wait_for_event): Adjust.
13792 (linux_resume_one_lwp): Adjust.
13793 (fetch_register): Add regcache parameter. Adjust.
13794 (usr_store_inferior_registers): Ditto.
13795 (regsets_fetch_inferior_registers): Ditto.
13796 (regsets_store_inferior_registers): Ditto.
13797 (linux_fetch_registers, linux_store_registers): Ditto.
13798 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13799 regcache. Adjust.
13800 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13801 Ditto.
13802 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13803 prototype to take a regcache.
13804 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13805 * remote-utils.c (convert_ascii_to_int, outreg)
13806 (prepare_resume_reply): Change prototype to take a regcache.
13807 Adjust.
13808 * target.h (struct target_ops) <fetch_registers, store_registers>:
13809 Change prototype to take a regcache.
13810 (fetch_inferior_registers, store_inferior_registers): Change
13811 prototype to take a regcache. Adjust.
13812 * proc-service.c (ps_lgetregs): Adjust.
13813 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13814 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13815 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13816 take a regcache. Adjust.
13817 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13818 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13819 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13820 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13821 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13822 (cris_cannot_fetch_register):
13823 (cris_breakpoint_at): Change prototype to take a regcache.
13824 Adjust.
13825 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13826 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13827 to take a regcache. Adjust.
13828 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13829 Adjust.
13830 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13831 take a regcache. Adjust.
13832 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13833 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13834 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13835 * linux-mips-low.c (mips_get_pc):
13836 (mips_set_pc): Change prototype to take a regcache. Adjust.
13837 (mips_reinsert_addr): Adjust.
13838 (mips_collect_register): Change prototype to take a regcache.
13839 Adjust.
13840 (mips_supply_register):
13841 (mips_collect_register_32bit, mips_supply_register_32bit)
13842 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13843 (mips_store_fpregset): Ditto.
13844 * linux-ppc-low.c (ppc_supply_ptrace_register)
13845 (ppc_supply_ptrace_register): Ditto.
13846 (parse_spufs_run): Adjust.
13847 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13848 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13849 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13850 take a regcache. Adjust.
13851 * linux-s390-low.c (s390_collect_ptrace_register)
13852 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13853 (s390_set_pc): Change prototype to take a regcache. Adjust.
13854 (s390_arch_setup): Adjust.
13855 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13856 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13857 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13858 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13859 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13860 regcache. Adjust.
13861 (sparc_breakpoint_at): Adjust.
13862 * linux-xtensa-low.c (xtensa_fill_gregset):
13863 (xtensa_store_gregset):
13864 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13865 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13866 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13867 prototype to take a regcache. Adjust.
13868 * win32-arm-low.c (arm_fetch_inferior_register)
13869 (arm_store_inferior_register): Change prototype to take a
13870 regcache. Adjust.
13871 * win32-i386-low.c (i386_fetch_inferior_register)
13872 (i386_store_inferior_register): Change prototype to take a
13873 regcache. Adjust.
13874 * win32-low.c (child_fetch_inferior_registers)
13875 (child_store_inferior_registers): Change prototype to take a
13876 regcache. Adjust.
13877 (win32_wait): Adjust.
13878 (win32_fetch_inferior_registers): Change prototype to take a
13879 regcache. Adjust.
13880 (win32_store_inferior_registers): Adjust.
13881 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13882 store_inferior_register>: Change prototype to take a regcache.
13883
13884 2010-01-20 Doug Evans <dje@google.com>
13885
13886 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13887 #ifdef.
13888 (linux_wait_for_event1, linux_init_signals): Ditto.
13889 (W_STOPCODE): Provide definition if missing.
13890
13891 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13892
13893 * linux-low.c (linux_core_of_thread): New.
13894 (compare_ints, show_process, list_threads): New.
13895 (linux_qxfer_osdata): Report threads and cores.
13896 (linux_target_op): Register linux_core_of_thread.
13897 * remote-utils.c (prepare_resume_reply): Report the core.
13898 (buffer_xml_printf): Support %d specifier.
13899 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13900 New.
13901 (handle_query): Handle qXfer:threads. Announce availability
13902 thereof.
13903 * target.h (struct target_ops): New field core_of_thread.
13904
13905 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13906
13907 * Makefile.in (clean): Remove new generated files.
13908 (reg-s390.o, reg-s390.c): Remove rules.
13909 (reg-s390x.o, reg-s390x.c): Likewise.
13910 (s390-linux32.o, s390-linux32.c): Add rules.
13911 (s390-linux64.o, s390-linux64.c): Likewise.
13912 (s390x-linux64.o, s390x-linux64.c): Likewise.
13913 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13914 * linux-s390-low.c: Include <elf.h>.
13915 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13916 (init_registers_s390): Remove prototype.
13917 (init_registers_s390x): Likewise.
13918 (init_registers_s390_linux32): Add prototype.
13919 (init_registers_s390_linux64): Likewise.
13920 (init_registers_s390x_linux64): Likewise.
13921 (s390_num_regs_3264): New define.
13922 (s390_regmap_3264): New global variable.
13923 (s390_cannot_fetch_register): Remove obsolete check.
13924 (s390_cannot_store_register): Likewise.
13925 (s390_collect_ptrace_register): Handle upper/lower register halves.
13926 (s390_supply_ptrace_register): Likewise.
13927 (s390_fill_gregset): Update to register number changes.
13928 (s390_get_hwcap): New routine.
13929 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13930 Install appropriate regmap and register set.
13931
13932 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13933
13934 * server.c (gdbserver_version): Update copyright year to 2010.
13935 * gdbreplay.c (gdbreplay_version): Likewise.
13936
13937 2009-12-28 Doug Evans <dje@google.com>
13938
13939 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13940 elf/external.h. Include <elf.h> instead but only if necessary.
13941
13942 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13943
13944 * linux-low.c (linux_remove_process): Remove `detaching'
13945 parameter. Don't release/detach from thread_db here.
13946 (linux_kill): Release/detach from thread_db here, ...
13947 (linux_detach): ... and here, before actually detaching.
13948 (linux_wait_1): ... and here, when a process exits.
13949 * thread-db.c (any_thread_of): New.
13950 (thread_db_free): Switch the current inferior to a thread of the
13951 passed in process.
13952
13953 2009-12-21 Doug Evans <dje@google.com>
13954
13955 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13956
13957 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13958 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13959 warning ifndef __NR_tkill. Move setting of errno there too.
13960 Delete unnecessary resetting of errno after syscall.
13961 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13962
13963 * configure.ac: Check for dladdr.
13964 * config.in: Regenerate.
13965 * configure: Regenerate.
13966 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13967 (try_thread_db_load): Update.
13968
13969 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13970
13971 2009-12-18 Doug Evans <dje@google.com>
13972
13973 * event-loop.c: Include unistd.h if it exists.
13974
13975 * linux-low.c (my_waitpid): Move definition away from being in
13976 between linux_tracefork_child/linux_test_for_tracefork.
13977
13978 * gdb_proc_service.h (psaddr_t): Fix type.
13979 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13980 signature to match glibc.
13981
13982 2009-12-16 Doug Evans <dje@google.com>
13983
13984 * linux-low.c (linux_read_memory): Fix argument to read.
13985
13986 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13987
13988 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13989 events, don't leave current_inferior pointing at null.
13990
13991 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13992
13993 * win32-low.c (LOG): Delete.
13994 (OUTMSG): Output to stderr.
13995 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13996 on compile time LOG macro.
13997 (win32_wait): Fix debug output.
13998
13999 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14000
14001 * win32-low.c (win32_add_one_solib): If the dll name is
14002 "ntdll.dll", prepend the system directory to the dll path.
14003
14004 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14005
14006 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14007
14008 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14009 Vladimir Prus <vladimir@codesourcery.com>
14010
14011 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14012 * configure.ac: Check for __mcoldfire__ and set
14013 gdb_cv_m68k_is_coldfire.
14014 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14015 reg-cf.o and reg-m68k.o.
14016 * configure: Regenerated.
14017
14018 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14019
14020 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14021 Pass it to thread_db_free.
14022 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14023 proper `detaching' argument to linux_remove_process.
14024 * linux-low.h (thread_db_free): Add `detaching' parameter.
14025 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14026 to thread_db_free.
14027 (thread_db_free): Add `detaching' parameter. Only
14028 call td_ta_clear_event if detaching from process.
14029
14030 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14031
14032 * thread-db.c (thread_db_free): Fix typo.
14033
14034 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14035
14036 PR gdb/10838
14037 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14038
14039 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14040
14041 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14042 with an i686 compiler.
14043 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14044 needed.
14045 * configure: Rebuilt.
14046
14047 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14048
14049 PR gdb/10783
14050
14051 * server.c (handle_search_memory_1): Correct read_addr initialization
14052 in loop for searching subsequent chunks.
14053
14054 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14055
14056 * configure.ac: New --with-libthread-db option.
14057 * thread-db.c: Allow direct dependence on libthread_db.
14058 (thread_db_free): Adjust.
14059 * config.in: Regenerate.
14060 * configure: Likewise.
14061
14062 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14063
14064 PR gdb/10757
14065 * thread-db.c (attach_thread): New function.
14066 (maybe_attach_thread): Return success/failure.
14067 (find_new_threads_callback): Adjust.
14068 (thread_db_find_new_threads): Loop until no new threads.
14069
14070 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14071
14072 * proc-service.c (ps_lgetregs): Formatting.
14073
14074 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14075
14076 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14077 * configure.ac: Adjust.
14078 * linux-low.h (struct process_info_private): Move members to struct
14079 thread_db.
14080 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14081 * linux-low.c (linux_remove_process): Adjust.
14082 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14083 * server.c (handle_query): Move code ...
14084 (handle_monitor_command): ... here. New function.
14085 * target.h (struct target_ops): New member.
14086 * thread-db.c (struct thread_db): New.
14087 (libthread_db_search_path): New variable.
14088 (thread_db_create_event, thread_db_enable_reporting)
14089 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14090 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14091 (try_thread_db_load_1, dladdr_to_soname): New functions.
14092 (try_thread_db_load, thread_db_load_search): New functions.
14093 (thread_db_init): Search for libthread_db.
14094 (thread_db_free): New function.
14095 (thread_db_handle_monitor_command): Likewise.
14096 * config.in: Regenerate.
14097 * configure: Regenerate.
14098
14099 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14100
14101 * spu-low.c (spu_kill): Wait for inferior to terminate.
14102 Call clear_inferiors.
14103 (spu_detach): Call clear_inferiors.
14104
14105 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14106
14107 * aclocal.m4: Regenerate.
14108 * config.in: Likewise.
14109 * configure: Likewise.
14110
14111 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14112
14113 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14114 (parse_spufs_run): New function.
14115 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14116 (ppc_breakpoint_at): Handle SPU breakpoints.
14117
14118 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14119
14120 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14121 (SPUFS_MAGIC): Define.
14122 (spu_enumerate_spu_ids): New function.
14123 (linux_qxfer_spu): New function.
14124 (linux_target_ops): Install linux_qxfer_spu.
14125
14126 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14127
14128 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14129 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14130 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14131 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14132 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14133 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14134 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14135 (init_registers_powerpc_cell32l): Add prototype.
14136 (init_registers_powerpc_cell64l): Likewise.
14137 (ppc_arch_setup): Detect Cell/B.E. architecture.
14138
14139 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14140
14141 * Makefile.in (datarootdir): New variable.
14142
14143 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14144
14145 * linux-low.c (linux_write_memory): Update debugging output.
14146 * Makefile.in (clean): Add new descriptions.
14147 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14148 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14149 * configure.srv: Add new files for arm*-*-linux*.
14150 * linux-arm-low.c: Add new declarations.
14151 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14152 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14153 (HWCAP_VFPv3D16): New.
14154 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14155 instead of __IWMMXT__.
14156 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14157 (arm_arch_setup): New.
14158 (target_regsets): Remove #ifdef. Add VFP regset.
14159 (the_low_target): Use arm_arch_setup.
14160
14161 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14162
14163 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14164 the main thread again.
14165
14166 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14167
14168 Adding Neutrino gdbserver.
14169 * configure: Regenerated.
14170 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14171 * configure.srv (i[34567]86-*-nto*): New target.
14172 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14173 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14174 (nto_comctrl) [__QNX__]: New function.
14175 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14176
14177 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14178
14179 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14180 srv_tgtobj.
14181
14182 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14183 Pedro Alves <pedro@codesourcery.com>
14184
14185 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14186 don't support CONTEXT_EXTENDED_REGISTERS.
14187 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14188 (the_low_target): Install them.
14189 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14190 failing with ERROR_PIPE_NOT_CONNECTED.
14191
14192 2009-06-30 Doug Evans <dje@google.com>
14193 Pierre Muller <muller@ics.u-strasbg.fr>
14194
14195 Add h/w watchpoint support to x86-linux, win32-i386.
14196 * Makefile.in (SFILES): Add i386-low.c
14197 (i386_low_h): Define.
14198 (i386-low.o): Add dependencies.
14199 (linux-x86-low.o): Add i386-low.h dependency.
14200 (win32-i386-low.o): Ditto.
14201 * i386-low.c: New file.
14202 * i386-low.h: New file.
14203 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14204 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14205 * linux-low.c (linux_add_process): Initialize arch_private.
14206 (linux_remove_process): Free arch_private.
14207 (add_lwp): Initialize arch_private.
14208 (delete_lwp): Free arch_private.
14209 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14210 provided.
14211 * linux-low.h (process_info_private): New member arch_private.
14212 (lwp_info): New member arch_private.
14213 (linux_target_ops): New members new_process, new_thread,
14214 prepare_to_resume.
14215 (ptid_of): New macro.
14216 * linux-x86-low.c: Include stddef.h, i386-low.h.
14217 (arch_process_info): New struct.
14218 (arch_lwp_info): New struct.
14219 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14220 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14221 (i386_dr_low_get_status): New function.
14222 (x86_insert_point, x86_remove_point): New functions.
14223 (x86_stopped_by_watchpoint): New function.
14224 (x86_stopped_data_address): New function.
14225 (x86_linux_new_process, x86_linux_new_thread): New functions.
14226 (x86_linux_prepare_to_resume): New function.
14227 (the_low_target): Add entries for insert_point, remove_point,
14228 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14229 prepare_to_resume.
14230 * server.c (debug_hw_points): New global.
14231 (monitor_show_help): Document set debug-hw-points.
14232 (handle_query): Process "set debug-hw-points".
14233 * server.h (debug_hw_points): Declare.
14234 (paddress): Declare.
14235 * utils.c (NUMCELLS, CELLSIZE): New macros.
14236 (get_sell, xsnprintf, paddress): New functions.
14237 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14238 remove_point, stopped_by_watchpoint, stopped_data_address.
14239 * win32-i386-low.c: Include i386-low.h.
14240 (debug_reg_state): Replaces dr.
14241 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14242 (i386_dr_low_get_status): New function.
14243 (i386_insert_point, i386_remove_point): New functions.
14244 (i386_stopped_by_watchpoint): New function.
14245 (i386_stopped_data_address): New function.
14246 (i386_initial_stuff): Update.
14247 (get_thread_context,set_thread_context,i386_thread_added): Update.
14248 (the_low_target): Add entries for insert_point,
14249 remove_point, stopped_by_watchpoint, stopped_data_address.
14250 * win32-low.c (win32_insert_watchpoint): New function.
14251 (win32_remove_watchpoint): New function.
14252 (win32_stopped_by_watchpoint): New function.
14253 (win32_stopped_data_address): New function.
14254 (win32_target_ops): Add entries for insert_watchpoint,
14255 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14256 * win32-low.h (win32_target_ops): New members insert_point,
14257 remove_point, stopped_by_watchpoint, stopped_data_address.
14258
14259 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14260
14261 * server.c (process_serial_event): Re-return unsupported, not
14262 error, if the type isn't recognized. Re-allow supporting only
14263 insert or remove packets. Also call require_running for
14264 breakpoints. Add missing break statement to default case. Tidy.
14265 * target.h (struct target_ops): Rename insert_watchpoint to
14266 insert_point, and remove_watchpoint to remove_point.
14267
14268 * linux-low.h (struct linux_target_ops): Likewise.
14269 * linux-low.c (linux_insert_watchpoint): Rename to ...
14270 (linux_insert_point): ... this. Adjust.
14271 (linux_remove_watchpoint): Rename to ...
14272 (linux_remove_point): ... this. Adjust.
14273 (linux_target_ops): Adjust.
14274 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14275 (cris_insert_point): ... this.
14276 (cris_remove_watchpoint): Rename to ...
14277 (cris_remove_point): ... this.
14278 (the_low_target): Adjust.
14279
14280 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14281
14282 * server.c (handle_v_kill): Pass signal_pid to
14283 kill_inferior if multi_process is zero.
14284
14285 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14286
14287 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14288 * target.h (target_ops): Comment for *_watchpoint to make it clear
14289 the functions can get types '0' and '1'.
14290
14291 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14292
14293 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14294 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14295 * regcache.c (get_regcache): Likewise.
14296 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14297 * win32-low.c (child_fetch_inferior_registers): Remove check for
14298 regno 0.
14299
14300 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14301 Pedro Alves <pedro@codesourcery.com>
14302
14303 * target.h (struct target_ops) <supports_multi_process>: New
14304 callback.
14305 (target_supports_multi_process): New.
14306 * server.c (handle_query): Even if GDB reports support, only
14307 enable multi-process if the target also supports it. Report
14308 multi-process support only if the target backend supports it.
14309 * linux-low.c (linux_supports_multi_process): New function.
14310 (linux_target_ops): Install it as target_supports_multi_process
14311 callback.
14312
14313 2009-05-24 Doug Evans <dje@google.com>
14314
14315 Global renaming of find_thread_pid to find_thread_ptid.
14316 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14317 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14318 All callers updated.
14319
14320 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14321 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14322 directly.
14323
14324 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14325 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14326 (linux_resume_one_lwp): Ditto.
14327
14328 2009-05-23 Doug Evans <dje@google.com>
14329
14330 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14331 from struct inferior_list_entry * to struct lwp_info *.
14332 All callers updated.
14333
14334 2009-05-13 Doug Evans <dje@google.com>
14335
14336 * linux-x86-low.c: Don't include assert.h.
14337 (x86_siginfo_fixup): Use fatal, not assert.
14338 (x86_arch_setup): Fix comment.
14339
14340 2009-05-12 Doug Evans <dje@google.com>
14341
14342 Biarch support for i386/amd64 gdbserver.
14343 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14344 Add linux-x86-low.c.
14345 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14346 (linux-x86-low.o): Add.
14347 * linux-x86-64-low.c: Delete.
14348 * linux-i386-low.c: Delete.
14349 * linux-x86-low.c: New file.
14350 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14351 linux-x86-low.o.
14352 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14353 linux-x86-low.o.
14354 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14355 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14356 (linux_child_pid_to_exec_file): New function.
14357 (elf_64_header_p, elf_64_file_p): New functions.
14358 (siginfo_fixup): New function.
14359 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14360 give target a chance to convert layout.
14361 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14362 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14363
14364 2009-05-07 Doug Evans <dje@google.com>
14365
14366 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14367 (regsets_store_inferior_registers): Ditto.
14368
14369 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14370
14371 PR server/10048
14372
14373 * linux-low.c (must_set_ptrace_flags): Delete.
14374 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14375 of the global.
14376 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14377 `lwp->must_set_ptrace_flags' instead.
14378 (linux_wait_for_event_1): Set ptrace options here.
14379 (linux_wait_1): ... not here.
14380
14381 2009-04-30 Doug Evans <dje@google.com>
14382
14383 * inferiors.c (started_inferior_callback): New function.
14384 (attached_inferior_callback): New function.
14385 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14386 * server.c (print_started_pid, print_attached_pid): New functions.
14387 (detach_or_kill_for_exit): New function.
14388 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14389 * server.h (have_started_inferiors_p): Declare.
14390 (have_attached_inferiors_p): Declare.
14391
14392 * inferiors.c (remove_process): Fix memory leak, free process.
14393 * linux-low.c (linux_remove_process): New function.
14394 (linux_kill): Call it instead of remove_process.
14395 (linux_detach, linux_wait_1): Ditto.
14396
14397 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14398
14399 * configure.srv: Add x86 Windows CE target.
14400
14401 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14402
14403 * inferiors.c (get_thread_process): Make global.
14404 * server.h (get_thread_process): Add prototype.
14405 * thread-db.c (find_one_thread): Use get_thread_process
14406 instead of current_process.
14407 (thread_db_get_tls_address): Do not crash if called when
14408 thread layer is not yet initialized.
14409
14410 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14411
14412 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14413 * spu-low.c (current_tid): Rename to ...
14414 (current_ptid): ... this.
14415 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14416 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14417 ptid_get_lwp (current_ptid) instead of current_tid.
14418 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14419 instead of current_tid. Use find_process_pid to verify pid
14420 argument is valid. Pass proper argument to remove_process.
14421 (spu_thread_alive): Compare current_ptid instead of current_tid.
14422 (spu_resume): Likewise.
14423
14424 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14425
14426 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14427 variable.
14428
14429 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14430
14431 Implement the multiprocess extensions, and add linux multiprocess
14432 support.
14433
14434 * server.h (ULONGEST): Declare.
14435 (struct ptid, ptid_t): New.
14436 (minus_one_ptid, null_ptid): Declare.
14437 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14438 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14439 (struct inferior_list_entry): Change `id' type from unsigned from
14440 to ptid_t.
14441 (struct sym_cache, struct breakpoint, struct
14442 process_info_private): Forward declare.
14443 (struct process_info): Declare.
14444 (current_process): Declare.
14445 (all_processes): Declare.
14446 (initialize_inferiors): Declare.
14447 (add_thread): Adjust to use ptid_t.
14448 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14449 (add_process, remove_process, find_thread_pid): Declare.
14450 (find_inferior_id): Adjust to use ptid_t.
14451 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14452 (multi_process): Declare.
14453 (push_event): Adjust to use ptid_t.
14454 (read_ptid, write_ptid): Declare.
14455 (prepare_resume_reply): Adjust to use ptid_t.
14456 (clear_symbol_cache): Declare.
14457 * inferiors.c (all_processes): New.
14458 (null_ptid, minus_one_ptid): New.
14459 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14460 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14461 (add_thread): Change unsigned long to ptid. Remove gdb_id
14462 parameter. Adjust.
14463 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14464 (gdb_id_to_thread): Rename to ...
14465 (find_thread_pid): ... this. Change unsigned long to ptid.
14466 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14467 (loaded_dll, pull_pid_from_list): Adjust.
14468 (add_process, remove_process, find_process_pid)
14469 (get_thread_process, current_process, initialize_inferiors): New.
14470 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14471 (struct target_waitstatus) <related_pid>: Ditto.
14472 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14473 return type to int.
14474 (struct target_ops) <join>: Add `pid' argument.
14475 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14476 (struct target_ops) <wait>: Add `ptid' field. Change return type
14477 to ptid.
14478 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14479 (mywait): Add `ptid' argument. Change return type to ptid_t.
14480 (target_pid_to_str): Declare.
14481 * target.c (set_desired_inferior): Adjust to use ptids.
14482 (mywait): Add new `ptid' argument. Adjust.
14483 (target_pid_to_str): New.
14484 * mem-break.h (free_all_breakpoints): Declare.
14485 * mem-break.c (breakpoints): Delelete.
14486 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14487 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14488 to use per-process breakpoint list.
14489 (free_all_breakpoints): New.
14490 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14491 (symbol_cache, all_symbols_looked_up): Delete.
14492 (hexchars): New.
14493 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14494 read_ptid): New.
14495 (prepare_resume_reply): Change ptid argument's type from unsigned
14496 long to ptid_t. Adjust. Implement W;process and X;process.
14497 (free_sym_cache, clear_symbol_cache): New.
14498 (look_up_one_symbol): Adjust to per-process symbol cache. *
14499 * server.c (cont_thread, general_thread, step_thread): Change type
14500 to ptid_t.
14501 (attached): Delete.
14502 (multi_process): New.
14503 (last_ptid): Change type to ptid_t.
14504 (struct vstop_notif) <ptid>: Change type to ptid_t.
14505 (queue_stop_reply, push_event): Change `ptid' argument's type to
14506 ptid_t.
14507 (discard_queued_stop_replies): Add `pid' argument.
14508 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14509 changes. Don't reference the `attached' global.
14510 (attach_inferior): Adjust to mywait interface changes.
14511 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14512 features. Handle and report "multiprocess+". Handle
14513 "qAttached:PID".
14514 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14515 changes.
14516 (handle_v_kill): New.
14517 (handle_v_stopped): Adjust to use target_pid_to_str.
14518 (handle_v_requests): Allow multiple attaches and runs when
14519 multiprocess extensions are in effect. Handle "vKill".
14520 (myresume): Adjust to use ptids.
14521 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14522 (handle_status): Adjust to discard_queued_stop_replies interface
14523 change.
14524 (first_thread_of, kill_inferior_callback)
14525 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14526 (main): Call initialize_inferiors. Adjust to use ptids, killing
14527 and detaching from all inferiors. Handle multiprocess packet
14528 variants.
14529 * linux-low.h: Include gdb_proc_service.h.
14530 (struct process_info_private): New.
14531 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14532 <lwpid_of>: Use ptid_get_lwp.
14533 (get_lwp_thread): Adjust.
14534 (struct lwp_info): Add `dead' member.
14535 (find_lwp_pid): Declare.
14536 * linux-low.c (thread_db_active): Delete.
14537 (new_inferior): Adjust comment.
14538 (inferior_pid): Delete.
14539 (linux_add_process): New.
14540 (handle_extended_wait): Adjust.
14541 (add_lwp): Change unsigned long to ptid.
14542 (linux_create_inferior): Add process to processes table. Adjust
14543 to use ptids. Don't set new_inferior here.
14544 (linux_attach_lwp): Rename to ...
14545 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14546 it. Adjust to use ptids.
14547 (linux_attach_lwp): New.
14548 (linux_attach): Add process to processes table. Don't set
14549 new_inferior here.
14550 (struct counter): New.
14551 (second_thread_of_pid_p, last_thread_of_process_p): New.
14552 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14553 multiple processes.
14554 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14555 processes. Remove process from process table.
14556 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14557 to multiple processes.
14558 (any_thread_of): New.
14559 (linux_detach): Add `pid' argument, and handle it. Remove process
14560 from processes table.
14561 (linux_join): Add `pid' argument. Handle it.
14562 (linux_thread_alive): Change unsighed long argument to ptid_t.
14563 Consider dead lwps as not being alive.
14564 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14565 threads we're not interested in.
14566 (same_lwp, find_lwp_pid): New.
14567 (linux_wait_for_lwp): Change `pid' argument's type from int to
14568 ptid_t. Adjust.
14569 (linux_wait_for_event): Rename to ...
14570 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14571 from int to ptid_t. Adjust.
14572 (linux_wait_for_event): New.
14573 (linux_wait_1): Add `ptid' argument. Change return type to
14574 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14575 that exit from the process table.
14576 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14577 Adjust.
14578 (mark_lwp_dead): New.
14579 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14580 stopping all threads, mark its main lwp as dead.
14581 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14582 ptids.
14583 (fetch_register, usr_store_inferior_registers)
14584 (regsets_fetch_inferior_registers)
14585 (regsets_store_inferior_registers, linux_read_memory)
14586 (linux_write_memory): Inline `inferior_pid'.
14587 (linux_look_up_symbols): Adjust to use per-process
14588 `thread_db_active'.
14589 (linux_request_interrupt): Adjust to use ptids.
14590 (linux_read_auxv): Inline `inferior_pid'.
14591 (initialize_low): Don't reference thread_db_active.
14592 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14593 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14594 (ps_getpid): Return the pid of the current inferior.
14595 * thread-db.c (proc_handle, thread_agent): Delete.
14596 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14597 per-process data.
14598 (find_one_thread): Change argument type to ptid_t. Adjust to
14599 per-process data.
14600 (maybe_attach_thread): Adjust to per-process data and ptids.
14601 (thread_db_find_new_threads): Ditto.
14602 (thread_db_init): Ditto.
14603 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14604 processes table. Adjust to use ptids.
14605 (spu_kill, spu_detach): Adjust interface. Remove process from
14606 processes table.
14607 (spu_join, spu_thread_alive): Adjust interface.
14608 (spu_wait): Adjust interface. Remove process from processes
14609 table. Adjust to use ptids.
14610 * win32-low.c (current_inferior_tid): Delete.
14611 (current_inferior_ptid): New.
14612 (debug_event_ptid): New.
14613 (thread_rec): Take a ptid. Adjust.
14614 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14615 (child_delete_thread): Ditto.
14616 (do_initial_child_stuff): Add `attached' argument. Add process to
14617 processes table.
14618 (child_fetch_inferior_registers, child_store_inferior_registers):
14619 Adjust.
14620 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14621 (win32_attach): Pass 1 to do_initial_child_stuff.
14622 (win32_kill): Adjust interface. Remove process from processes
14623 table.
14624 (win32_detach): Ditto.
14625 (win32_join): Adjust interface.
14626 (win32_thread_alive): Take a ptid.
14627 (win32_resume): Adjust to use ptids.
14628 (get_child_debug_event): Ditto.
14629 (win32_wait): Adjust interface. Remove exiting process from
14630 processes table.
14631
14632 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14633
14634 Non-stop mode support.
14635
14636 * server.h (non_stop): Declare.
14637 (gdb_client_data, handler_func): Declare.
14638 (delete_file_handler, add_file_handler, start_event_loop):
14639 Declare.
14640 (handle_serial_event, handle_target_event, push_event)
14641 (putpkt_notif): Declare.
14642 * target.h (enum resume_kind): New.
14643 (struct thread_resume): Replace `step' field by `kind' field.
14644 (TARGET_WNOHANG): Define.
14645 (struct target_ops) <wait>: Add `options' argument.
14646 <supports_non_stop, async, start_non_stop>: New fields.
14647 (target_supports_non_stop, target_async): New.
14648 (start_non_stop): Declare.
14649 (mywait): Add `options' argument.
14650 * target.c (mywait): Add `options' argument. Print child exit
14651 notifications here.
14652 (start_non_stop): New.
14653 * server.c (non_stop, own_buf, mem_buf): New globals.
14654 (struct vstop_notif): New.
14655 (notif_queue): New global.
14656 (queue_stop_reply, push_event, discard_queued_stop_replies)
14657 (send_next_stop_reply): New.
14658 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14659 interface changes.
14660 (attach_inferior): In non-stop mode, don't wait for the target
14661 here.
14662 (handle_general_set): Handle QNonStop.
14663 (handle_query): When handling qC, return the current general
14664 thread, instead of the first thread of the list.
14665 (handle_query): If the backend supports non-stop mode, include
14666 QNonStop+ in the qSupported query response.
14667 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14668 and non-stop mode.
14669 (handle_v_attach, handle_v_run): Handle non-stop mode.
14670 (handle_v_stopped): New.
14671 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14672 (myresume): Adjust to use resume_kind. Handle non-stop.
14673 (queue_stop_reply_callback): New.
14674 (handle_status): Handle non-stop mode.
14675 (main): Clear non_stop flag on reconnection. Use the event-loop.
14676 Refactor serial protocol handling from here ...
14677 (process_serial_event): ... to this new function. When GDB
14678 selects any thread, select one here. In non-stop mode, wait until
14679 GDB acks all pending events before exiting.
14680 (handle_serial_event, handle_target_event): New.
14681 * remote-utils.c (remote_open): Install remote_desc in the event
14682 loop.
14683 (remote_close): Remove remote_desc from the event loop.
14684 (putpkt_binary): Rename to...
14685 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14686 (putpkt_binary): New as wrapper around putpkt_binary_1.
14687 (putpkt_notif): New.
14688 (prepare_resume_reply): In non-stop mode, don't change the
14689 general_thread.
14690 * event-loop.c: New.
14691 * Makefile.in (OBJ): Add event-loop.o.
14692 (event-loop.o): New rule.
14693
14694 * linux-low.h (pid_of): Moved here.
14695 (lwpid_of): New.
14696 (get_lwp_thread): Use lwpid_of.
14697 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14698 * linux-low.c (pid_of): Delete.
14699 (inferior_pid): Use lwpid_of.
14700 (linux_event_pipe): New.
14701 (target_is_async_p): New.
14702 (delete_lwp): New.
14703 (handle_extended_wait): Use lwpid_of.
14704 (add_lwp): Don't set lwpid field.
14705 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14706 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14707 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14708 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14709 first. Adjust to linux_wait_for_event interface changes. Use
14710 lwpid_of.
14711 (linux_detach): Don't delete the main lwp here.
14712 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14713 (status_pending_p): Don't consider explicitly suspended lwps.
14714 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14715 pointer. Add OPTIONS argument. Change return type to int. Use
14716 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14717 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14718 pointer. Add status pointer argument. Return a pid instead of a
14719 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14720 changes. In non-stop mode, don't switch to a random thread.
14721 (linux_wait): Rename to...
14722 (linux_wait_1): ... this. Add target_options argument, and handle
14723 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14724 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14725 clean exit and signal exit code. Don't stop all threads in
14726 non-stop mode. In all-stop mode, only stop all threads when
14727 reporting a stop to GDB. Handle explicit thread stop requests.
14728 (async_file_flush, async_file_mark): New.
14729 (linux_wait): New.
14730 (send_sigstop): Use lwpid_of.
14731 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14732 interface changes. In non-stop mode, don't switch to a random
14733 thread.
14734 (linux_resume_one_lwp): Use lwpid_of.
14735 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14736 (linux_resume_one_thread): ... this. Handle resume_stop. In
14737 non-stop mode, don't look for pending flag in all threads.
14738 (resume_status_pending_p): Don't consider explicitly suspended
14739 threads.
14740 (my_waitpid): Reimplement. Emulate __WALL.
14741 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14742 Use lwpid_of.
14743 (sigchld_handler, linux_supports_non_stop, linux_async)
14744 (linux_start_non_stop): New.
14745 (linux_target_ops): Register linux_supports_non_stop, linux_async
14746 and linux_start_non_stop.
14747 (initialize_low): Install SIGCHLD handler.
14748 * thread-db.c (thread_db_create_event, find_one_thread)
14749 (thread_db_get_tls_address): Use lwpid_of.
14750 * win32-low.c (win32_detach): Adjust to use resume_kind.
14751 (win32_wait): Add `options' argument.
14752 * spu-low.c (spu_resume): Adjust to use resume_kind.
14753 (spu_wait): Add `options' argument.
14754
14755 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14756
14757 Decouple target code from remote protocol.
14758
14759 * target.h (enum target_waitkind): New.
14760 (struct target_waitstatus): New.
14761 (struct target_ops) <wait>: Return an unsigned long. Take a
14762 target_waitstatus pointer instead of a char pointer.
14763 (mywait): Likewise.
14764 * target.c (mywait): Change prototype to return an unsigned long.
14765 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14766 * server.h (thread_from_wait, old_thread_from_wait): Delete
14767 declarations.
14768 (prepare_resume_reply): Change prototype to take a
14769 target_waitstatus.
14770 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14771 (last_status, last_ptid): New.
14772 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14773 pid instead of a signal.
14774 (attach_inferior): Remove "status" and "signal" parameters.
14775 Adjust.
14776 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14777 not as an address.
14778 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14779 (handle_v_requests, myresume): Remove "status" and "signal"
14780 parameters. Adjust.
14781 (handle_status): New.
14782 (main): Delete local `status'. Adjust.
14783 * remote-utils.c: Include target.h.
14784 (prepare_resume_reply): Change prototype to take a
14785 target_waitstatus. Adjust.
14786
14787 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14788 interface.
14789 * spu-low.c (spu_wait): Adjust.
14790 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14791 Delete.
14792 (win32_wait): Adjust.
14793
14794 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14795
14796 * target.h (struct thread_resume): Delete leave_stopped member.
14797 (struct target_ops): Add a `n' argument to the `resume' callback.
14798 * server.c (start_inferior): Adjust.
14799 (handle_v_cont, myresume): Adjust.
14800 * linux-low.c (check_removed_breakpoint): Adjust to resume
14801 interface change, and to removed leave_stopped field.
14802 (resume_ptr): Delete.
14803 (struct thread_resume_array): New.
14804 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14805 resume interface change.
14806 (linux_continue_one_thread, linux_queue_one_thread)
14807 (resume_status_pending_p): Check if the resume field is NULL
14808 instead of checking the leave_stopped member.
14809 (linux_resume): Adjust to the target resume interface change.
14810 * spu-low.c (spu_resume): Adjust to the target resume interface
14811 change.
14812 * win32-low.c (win32_detach, win32_resume): Ditto.
14813
14814 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14815
14816 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14817 flag.
14818 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14819 pending.
14820 (linux_continue_one_thread): Only preserve the stepping flag if
14821 there's a pending breakpoint.
14822
14823 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14824
14825 * server.c (main): After the inferior having exited, call
14826 remote_close before exiting gdbserver.
14827
14828 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14829
14830 Fix size of FPSCR in Power 7 processors.
14831 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14832 (PPC_FEATURE_HAS_DFP): New #define.
14833 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14834 size of the FPSCR.
14835
14836 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14837
14838 * server.c (handle_query) Whitespace and formatting.
14839
14840 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14841
14842 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14843 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14844 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14845 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14846 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14847 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14848 Makefile.in, configure.ac: Fix whitespace throughout.
14849 * configure: Regenerate.
14850
14851 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14852
14853 * inferiors.c (find_inferior): Make it safe for the callback
14854 function to delete the currently iterated inferior.
14855
14856 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14857
14858 * Makefile.in (linuw_low_h): Move higher.
14859 (thread-db.o): Depend on $(linux_low_h).
14860
14861 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14862
14863 Rename "process" to "lwp" throughout.
14864
14865 * linux-low.c (all_processes): Rename to...
14866 (all_lwps): ... this.
14867 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14868 (add_process): Rename to ...
14869 (add_lwp): ... this. Adjust.
14870 (linux_create_inferior): Adjust.
14871 (linux_attach_lwp): Adjust.
14872 (linux_attach): Adjust.
14873 (linux_kill_one_process): Rename to ...
14874 (linux_kill_one_lwp): ... this. Adjust.
14875 (linux_kill): Adjust.
14876 (linux_detach_one_process): Rename to ...
14877 (linux_detach_one_lwp): ... this. Adjust.
14878 (linux_detach): Adjust.
14879 (check_removed_breakpoint): Adjust.
14880 (status_pending_p): Adjust.
14881 (linux_wait_for_process): Rename to ...
14882 (linux_wait_for_lwp): ... this. Adjust.
14883 (linux_wait_for_event): Adjust.
14884 (send_sigstop): Adjust.
14885 (wait_for_sigstop): Adjust.
14886 (stop_all_processes): Rename to ...
14887 (stop_all_lwps): ... this.
14888 (linux_resume_one_process): Rename to ...
14889 (linux_resume_one_lwp): ... this. Adjust.
14890 (linux_set_resume_request, linux_continue_one_thread)
14891 (linux_queue_one_thread, resume_status_pending_p)
14892 (usr_store_inferior_registers, regsets_store_inferior_registers)
14893 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14894 Adjust.
14895 * linux-low.h (get_process): Rename to ...
14896 (get_lwp): ... this. Adjust.
14897 (get_thread_process): Rename to ...
14898 (get_thread_lwp): ... this. Adjust.
14899 (get_process_thread): Rename to ...
14900 (get_lwp_thread): ... this. Adjust.
14901 (struct process_info): Rename to ...
14902 (struct lwp_info): ... this.
14903 (all_processes): Rename to ...
14904 (all_lwps): ... this.
14905 * proc-service.c (ps_lgetregs): Adjust.
14906 * thread-db.c (thread_db_create_event, find_one_thread)
14907 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14908
14909 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14910
14911 * server.c (handle_query): Handle "qAttached".
14912
14913 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14914
14915 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14916 GPLv3, update license URL.
14917
14918 2009-03-01 Doug Evans <dje@google.com>
14919
14920 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14921 (server_h): Add gdb_signals.h.
14922 (signals.o): Update.
14923 * server.h (target_signal_from_host,target_signal_to_host_p)
14924 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14925
14926 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14927
14928 * remote-utils.c (getpkt): Also generate remote-debug
14929 information if noack_mode is set.
14930
14931 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14932
14933 * server.c (handle_query): Report qXfer:siginfo:read and
14934 qXfer:siginfo:write as supported and handle them.
14935 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14936 * linux-low.c (linux_xfer_siginfo): New.
14937 (linux_target_ops): Set it.
14938
14939 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14940
14941 * server.c (gdbserver_usage): Mention --remote-debug.
14942 (main): Accept '--remote-debug' switch.
14943
14944 2009-01-18 Doug Evans <dje@google.com>
14945
14946 * regcache.c (new_register_cache): No need to check result of xcalloc.
14947 * server.c (handle_search_memory): Back out calls to xmalloc,
14948 result is checked and error is returned to user upon failure.
14949 (handle_query): Ditto. Add more checks for result of malloc.
14950 (handle_v_cont): Check result of malloc, report error back to
14951 user upon failure.
14952 (handle_v_run): Ditto. Call freeargv.
14953 * server.h (freeargv): Declare.
14954 * utils.c (freeargv): New fn.
14955
14956 2009-01-15 Doug Evans <dje@google.com>
14957
14958 * gdbreplay.c (perror_with_name): Make arg const char *.
14959 * server.h (target_signal_to_name): Make return type const char *.
14960 * thread-db.c (thread_db_err_str): Make return type const char *.
14961 * utils.c (perror_with_name): Make arg const char *.
14962
14963 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14964
14965 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14966 when handling a EXIT_PROCESS_DEBUG_EVENT.
14967
14968 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14969
14970 * gdbreplay.c (gdbreplay_version): Update copyright year.
14971 * server.c (gdbserver_version): Likewise.
14972
14973 2009-01-05 Doug Evans <dje@google.com>
14974
14975 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14976 (handle_extended_wait): Improve comment.
14977
14978 2008-12-13 Doug Evans <dje@google.com>
14979
14980 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14981 * server.h (ATTR_MALLOC): New macro.
14982 (xmalloc,xcalloc,xstrdup): Declare.
14983 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14984 * inferiors.c: Ditto.
14985 * linux-low.c: Ditto.
14986 * mem-break.c: Ditto.
14987 * regcache.c: Ditto.
14988 * remote-utils.c: Ditto.
14989 * server.c: Ditto.
14990 * target.c: Ditto.
14991 * win32-low.c: Ditto.
14992
14993 2008-12-12 Doug Evans <dje@google.com>
14994
14995 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14996 in debugging printf.
14997
14998 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14999
15000 2008-12-09 Doug Evans <dje@google.com>
15001
15002 * linux-low.h (struct process_info): Delete member tid, unused.
15003 * thread-db.c (find_one_thread): Update.
15004 (maybe_attach_thread): Update.
15005
15006 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15007
15008 * target.h (struct target_ops): Add qxfer_osdata member.
15009 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15010 and dirent.h.
15011 (linux_qxfer_osdata): New functions.
15012 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15013 callback.
15014 * server.c (handle_query): Handle "qXfer:osdata:read:".
15015 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15016 (buffer_xml_printf): New functions.
15017 * server.h (struct buffer): New.
15018 (buffer_grow_str, buffer_grow_str0): New macros.
15019 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15020 (buffer_xml_printf): Declare.
15021
15022 2008-11-24 Doug Evans <dje@google.com>
15023
15024 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15025
15026 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15027
15028 * server.c (handle_v_run): Always use the supplied argument list.
15029
15030 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15031
15032 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15033 (xtensa_regmap_table): Add entry for scompare1.
15034
15035 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15036
15037 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15038 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15039 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15040 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15041 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15042 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15043 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15044 XML target descriptions.
15045 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15046 when inferior is running on an ISA 2.05 or later processor. Add
15047 special case to return offset for full 64-bit slot of FPSCR when
15048 in 32-bits.
15049
15050 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15051
15052 * Makefile.in (SFILES, clean): Added sparc64 files.
15053 (reg-sparc64.o, reg-sparc64.c): New.
15054 * configure.srv (sparc*-*-linux*): New configuration.
15055 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15056 syscall arguments for SPARC.
15057 (regsets_store_inferior_registers): Likewise.
15058 * linux-sparc-low.c: New file.
15059
15060 2008-10-21 Doug Evans <dje@google.com>
15061
15062 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15063 (READLINE_DIR,READLINE_DEP): Delete.
15064 (INTERNAL_CFLAGS): Update.
15065 (LINTFLAGS): Update.
15066
15067 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15068
15069 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15070 whole argv from the last run, not just argv[0].
15071
15072 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15073
15074 * regcache.c (new_register_cache): Return NULL if the register
15075 cache size isn't known yet.
15076 (free_register_cache): Avoid dereferencing a NULL regcache.
15077
15078 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15079
15080 * configure.srv: Merge MIPS and MIPS64.
15081
15082 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15083
15084 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15085
15086 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15087
15088 * Makefile.in: Add required vsx dependencies.
15089
15090 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15091 Declare init_registers_powerpc_vsx32l.
15092 Declare init_registers_powerpc_vsx64l.
15093 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15094 (ppc_arch_setup): Check for VSX in hwcap.
15095 (ppc_fill_vsxregset): New function.
15096 (ppc_store_vsxregset): New function.
15097 Add new VSX entry in regset_info target_regsets.
15098
15099 * configure.srv: Add new VSX dependencies.
15100
15101 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15102
15103 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15104 (remote_open): Set or clear transport_is_reliable.
15105 (putpkt_binary): Don't expect acks in noack mode.
15106 (getpkt): Don't send ack/nac in noack mode.
15107 * server.c (handle_general_set): Handle QStartNoAckMode.
15108 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15109 qSupported.
15110 (main): Reset noack_mode on every connection.
15111 * server.h (noack_mode): Declare.
15112
15113 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15114
15115 * Makefile.in (GDBREPLAY_OBS): New variable.
15116 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15117
15118 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15119 Daniel Jacobowitz <dan@codesourcery.com>
15120
15121 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15122 (usr_store_inferior_registers): Likewise.
15123 (regsets_store_inferior_registers): Likewise.
15124
15125 2008-07-31 Rolf Jansen <rj@surtec.com>
15126 Pedro Alves <pedro@codesourcery.com>
15127
15128 * configure.ac: Check for memmem declaration.
15129 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15130 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15131 (disable_packet_qfThreadInfo): Unconditionally compile.
15132 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15133 * configure, config.in: Regenerate.
15134
15135 2008-07-28 Doug Kwan <dougkwan@google.com>
15136
15137 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15138 (linux_write_memory): Remove declaration of errno.
15139
15140 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15141
15142 * linux-low.c (handle_extended_wait): Do not use "status"
15143 variable uninitialized.
15144
15145 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15146
15147 * server.c (handle_v_attach): Inhibit reporting dll changes.
15148
15149 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15150
15151 * remote-utils.c (prepare_resume_reply): If requested, don't
15152 output "thread:TID" in the T stop reply.
15153
15154 * server.c (disable_packet_vCont, disable_packet_Tthread)
15155 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15156 (handle_query): If requested, disable support for qC, qfThreadInfo
15157 and qsThreadInfo.
15158 (handle_v_requests): If requested, disable support for vCont.
15159 (gdbserver_show_disableable): New.
15160 (main): Handle --disable-packet and --disable-packet=LIST.
15161
15162 * server.h (disable_packet_vCont, disable_packet_Tthread)
15163 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15164
15165 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15166
15167 * server.c (gdbserver_usage): Mention --version.
15168
15169 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15170
15171 * Makefile.in (gdbreplay.o): New rule.
15172
15173 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15174
15175 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15176 message, not gdbserver.
15177
15178 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15179 Nathan Sidwell <nathan@codesourcery.com>
15180 Joseph Myers <joseph@codesourcery.com>
15181
15182 * acinclude.m4: Include ../../config/acx.m4.
15183 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15184 * configure, config.in: Regenerate.
15185 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15186 * server.c (gdbserver_version): Print PKGVERSION.
15187 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15188 (main): Adjust gdbserver_usage calls.
15189 * gdbreplay.c (version, host_name): Add declarations.
15190 (gdbreplay_version, gdbreplay_usage): New.
15191 (main): Accept --version and --help options.
15192
15193 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15194
15195 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15196 (arm_breakpoint_at): Handle Thumb.
15197 (the_low_target): Add comment.
15198
15199 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15200
15201 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15202
15203 2008-05-09 Doug Evans <dje@google.com>
15204
15205 * server.h (decode_search_memory_packet): Declare.
15206 * remote-utils.c (decode_search_memory_packet): New fn.
15207 * server.c (handle_search_memory_1): New fn.
15208 (handle_search_memory): New fn.
15209 (handle_query): Process qSearch:memory packets.
15210
15211 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15212
15213 * regcache.c (registers_length): Remove.
15214 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15215 full register packet.
15216 * regcache.h (registers_length): Remove prototype.
15217 * server.h (PBUFSIZ): Define to 16384.
15218
15219 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15220
15221 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15222 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15223 powerpc-64l.o, and powerpc-altivec64l.o.
15224 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15225 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15226 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15227 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15228 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15229 to srv_xmlfiles.
15230
15231 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15232 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15233 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15234 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15235 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15236 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15237 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15238 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15239 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15240 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15241 (clean): Update.
15242
15243 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15244 (init_registers_powerpc_32l): ... this new prototype.
15245 (init_registers_powerpc_32): Remove, replace by ...
15246 (init_registers_powerpc_altivec32l): ... this new prototype.
15247 (init_registers_powerpc_e500): Remove, replace by ...
15248 (init_registers_powerpc_e500l): ... this new prototype.
15249 (init_registers_ppc64): Remove, replace by ...
15250 (init_registers_powerpc_64l): ... this new prototype.
15251 (init_registers_powerpc_64): Remove, replace by ...
15252 (init_registers_powerpc_altivec64l): ... this new prototype.
15253 (ppc_num_regs): Set to 73.
15254 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15255 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15256 (ppc_cannot_store_register): Handle orig_r3 and trap.
15257 (ppc_arch_setup): Update init_registers_... calls.
15258 (ppc_fill_gregset): Handle orig_r3 and trap.
15259
15260 * inferiors.c (clear_inferiors): Reset current_inferior.
15261
15262 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15263
15264 * acinclude.m4: Add override.m4.
15265 * configure: Regenerate.
15266
15267 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15268
15269 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15270 initial call to init_register_ppc64.
15271
15272 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15273
15274 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15275 single powerpc*-*-linux* case.
15276 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15277
15278 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15279
15280 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15281 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15282 from reg_xmlfiles.
15283 * linux-ppc-low.c: Include <elf.h>.
15284 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15285 (ppc_hwcap): New global variable.
15286 (ppc_regmap): Remove __SPE__ #ifdef sections.
15287 (ppc_regmap_e500): New global variable.
15288 (ppc_cannot_store_register): Update __SPE__ special case.
15289 (ppc_get_hwcap): New function.
15290 (ppc_arch_setup): Use it to determine whether inferior supports
15291 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15292 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15293 Do not access registers if target does not support AltiVec.
15294 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15295 Do not access registers if target does not support SPE.
15296 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15297
15298 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15299
15300 * linux-low.c (disabled_regsets, num_regsets): New.
15301 (use_regsets_p): Delete.
15302 (linux_wait_for_process): Clear disabled_regsets.
15303 (regsets_fetch_inferior_registers): Check and set it.
15304 (regsets_store_inferior_registers): Likewise.
15305 (linux_fetch_registers, linux_store_registers): Do not use
15306 use_regsets_p.
15307 (initialize_low): Allocate disabled_regsets.
15308
15309 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15310
15311 * Makefile.in (LIBOBJS): New.
15312 (OBS): Use LIBOBJS.
15313 (memmem.o): New rule.
15314 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15315 * configure: Regenerated.
15316
15317 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15318
15319 * server.c (handle_query): Never return "unsupported" for
15320 qXfer:features:read queries.
15321
15322 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15323
15324 * server.c (get_features_xml): Fix inverted condition.
15325 (handle_query): Always support qXfer:feature:read.
15326
15327 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15328
15329 * server.c (wrapper_argv): New.
15330 (start_inferior): Handle wrapper_argv. If set, expect an extra
15331 trap.
15332 (gdbserver_usage): Document --wrapper.
15333 (main): Parse --wrapper.
15334
15335 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15336
15337 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15338 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15339 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15340 (ppc_set_pc): Likewise.
15341 (ppc_arch_setup): New function.
15342 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15343 of collect_register.
15344 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15345
15346 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15347
15348 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15349 instead of linux-ppc64-low.o.
15350 * linux-ppc64-low.c: Remove file.
15351 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15352 (linux-ppc64-low.o): Remove rule.
15353
15354 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15355 (init_registers_powerpc_64): Likewise.
15356 (ppc_regmap): Conditionally define depending on __powerpc64__.
15357 (ppc_cannot_store_register): Do not special-case "fpscr" when
15358 compiled on __powerpc64__.
15359 (ppc_collect_ptrace_register): New function.
15360 (ppc_supply_ptrace_register): New function.
15361 (ppc_breakpoint): Change type to "unsigned int".
15362 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15363 (the_low_target): Conditionally provide initializers for the
15364 arch_setup member depending on __powerpc64__. Install
15365 collect_ptrace_register and supply_ptrace_register members.
15366
15367 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15368
15369 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15370 * server.c (gdbserver_xmltarget): Define.
15371 (get_features_xml): Use it to replace "target.xml" and arch_string.
15372
15373 * configure.srv: Remove srv_xmltarget. Add XML files that were
15374 mentioned there to srv_xmlfiles instead. Remove conditional tests
15375 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15376 srv_xmlfiles and srv_regobj to include all possible choices.
15377 * configure.ac (srv_xmltarget): Remove.
15378 (srv_xmlfiles): Do not add "target.xml".
15379 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15380 checks for supplementary target information.
15381 * configure: Regenerate.
15382 * Makefile.in (XML_TARGET): Remove.
15383 (target.xml): Remove rule.
15384 (clean): Do not clean up target.xml.
15385 (.PRECIOUS): Do not mention target.xml.
15386
15387 * target.h (struct target_ops): Remove arch_string member.
15388 * linux-low.c (linux_arch_string): Remove.
15389 (linux_target_ops): Remove arch_string initializer.
15390 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15391 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15392 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15393 * spu-low.c (spu_arch_string): Remove.
15394 (spu_target_ops): Remove arch_string initializer.
15395 * win32-low.c (win32_arch_string): Remove.
15396 (win32_target_ops): Remove arch_string initializer.
15397 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15398 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15399 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15400
15401 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15402
15403 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15404 by collect_ptrace_register and supply_ptrace_register hooks.
15405 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15406 instead of checking for the_low_target.left_pad_xfer.
15407 (usr_store_inferior_registers): Use collect_ptrace_register callback
15408 instead of checking for the_low_target.left_pad_xfer.
15409
15410 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15411 (s390_supply_ptrace_register): Likewise.
15412 (s390_fill_gregset): Call s390_collect_ptrace_register.
15413 (the_low_target): Update.
15414
15415 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15416 (ppc_supply_ptrace_register): Likewise.
15417 (the_low_target): Update.
15418
15419 * linux-i386-low.c (the_low_target): Update.
15420 * linux-x86-64-low.c (the_low_target): Update.
15421
15422 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15423
15424 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15425 reg-s390.o and reg-s390x.o.
15426
15427 * linux-low.c (new_inferior): New global variable.
15428 (linux_create_inferior, linux_attach): Set it.
15429 (linux_wait_for_process): Call the_low_target.arch_setup after the
15430 target has stopped for the first time.
15431 (initialize_low): Do not call the_low_target.arch_setup.
15432
15433 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15434 (s390_set_pc): Likewise.
15435 (s390_arch_setup): New function.
15436 (the_low_target): Use s390_arch_setup as arch_setup routine.
15437
15438 * regcache.c (realloc_register_cache): New function.
15439 (set_register_cache): Call it for each existing regcache.
15440
15441 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15442
15443 * server.h (init_registers): Remove prototype.
15444
15445 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15446 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15447 instead of init_registers ().
15448 * linux-arm-low.c (init_registers_arm): Add prototype.
15449 (init_registers_arm_with_iwmmxt): Likewise.
15450 (the_low_target): Add initializer for arch_setup field.
15451 * linux-cris-low.c (init_registers_cris): Add prototype.
15452 (the_low_target): Add initializer for arch_setup field.
15453 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15454 (the_low_target): Add initializer for arch_setup field.
15455 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15456 (the_low_target): Add initializer for arch_setup field.
15457 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15458 (the_low_target): Add initializer for arch_setup field.
15459 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15460 (the_low_target): Add initializer for arch_setup field.
15461 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15462 (the_low_target): Add initializer for arch_setup field.
15463 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15464 (init_registers_mips64_linux): Likewise.
15465 (the_low_target): Add initializer for arch_setup field.
15466 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15467 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15468 (the_low_target): Add initializer for arch_setup field.
15469 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15470 (init_registers_powerpc_64): Likewise.
15471 (the_low_target): Add initializer for arch_setup field.
15472 * linux-s390-low.c (init_registers_s390): Add prototype.
15473 (init_registers_s390x): Likewise.
15474 (the_low_target): Add initializer for arch_setup field.
15475 * linux-sh-low.c (init_registers_sh): Add prototype.
15476 (the_low_target): Add initializer for arch_setup field.
15477 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15478 (the_low_target): Add initializer for arch_setup field.
15479 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15480 (the_low_target): Add initializer for arch_setup field.
15481
15482 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15483 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15484 instead of init_registers ().
15485 * win32-arm-low.c (init_registers_arm): Add prototype.
15486 (the_low_target): Add initializer for arch_setup field.
15487 * win32-i386-low.c (init_registers_i386): Add prototype.
15488 (the_low_target): Add initializer for arch_setup field.
15489
15490 * spu-low.c (init_registers_spu): Add prototype.
15491 (initialize_low): Call initialie_registers_spu () instead of
15492 initialize_registers ().
15493
15494 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15495
15496 * server.c (handle_v_requests): When handling the vRun and vAttach
15497 packets, if already debugging a process, don't kill it. Return an
15498 error instead.
15499
15500 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15501
15502 * server.c (handle_query): Correct length check.
15503
15504 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15505
15506 * win32-low.c (do_initial_child_stuff): Add process handle
15507 parameter. Set current_process_handle and current_process_id from the
15508 parameters. Clear globals.
15509 (win32_create_inferior): Don't set current_process_handle and
15510 current_process_id here. Instead pass them on the call to
15511 do_initial_child_stuff.
15512 (win32_attach): Likewise.
15513 (win32_clear_inferiors): New.
15514 (win32_kill): Don't close the current process handle or the
15515 current thread handle here. Instead call win32_clear_inferiors.
15516 (win32_detach): Don't open a new handle to the process. Call
15517 win32_clear_inferiors.
15518 (win32_join): Don't rely on current_process_handle; open a new
15519 handle using the process id.
15520 (win32_wait): Call win32_clear_inferiors when the inferior process
15521 has exited.
15522
15523 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15524
15525 * server.c (monitor_show_help): Add "exit".
15526
15527 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15528
15529 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15530 (clean): Add reg-xtensa.c.
15531 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15532 * configure.srv (xtensa*-*-linux*) New target.
15533 * linux-xtensa-low.c: New.
15534 * xtensa-xtregs.c: New.
15535
15536 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15537
15538 * hostio.c: Don't include errno.h.
15539 (errno_to_fileio_errno): Move to hostio-errno.
15540 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15541 error number outputting to the target->hostio_last_error callback.
15542 (hostio_packet_error): Use FILEIO_EINVAL directly.
15543 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15544 calls to hostio_error.
15545 * hostio-errno.c: New.
15546 * server.h (hostio_last_error_from_errno): Declare.
15547 * target.h (target_ops): Add hostio_last_error member.
15548 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15549 as hostio_last_error handler.
15550 * spu-low.c (spu_target_ops): Likewise.
15551 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15552 (wince_hostio_last_error): New functions.
15553 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15554 as hostio_last_error handler.
15555 (win32_target_ops) [!_WIN32_WCE]: Register
15556 hostio_last_error_from_errno as hostio_last_error handler.
15557 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15558 (hostio-errno.o): New rule.
15559 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15560 * configure.srv (srv_hostio_err_objs): New variable. Default to
15561 hostio-errno.o.
15562 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15563 * configure: Regenerate.
15564
15565 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15566
15567 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15568 (linux_kill, linux_detach): Clean up the process list.
15569 * remote-utils.c (remote_open): Improve port number parsing.
15570 (putpkt_binary, input_interrupt): Only send interrupts if the target
15571 is running.
15572 * server.c (extended_protocol): Make static.
15573 (attached): Define earlier.
15574 (exit_requested, response_needed, program_argv): New variables.
15575 (target_running): New.
15576 (start_inferior): Clear attached here.
15577 (attach_inferior): Set attached here.
15578 (require_running): Define.
15579 (handle_query): Use require_running and target_running. Implement
15580 "monitor exit".
15581 (handle_v_attach, handle_v_run): New.
15582 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15583 (gdbserver_usage): Update.
15584 (main): Redo argument parsing. Handle --debug and --multi. Handle
15585 --attach along with other options or after the port. Save
15586 program_argv. Support no initial program. Resynchronize
15587 communication with GDB after an error. Handle "monitor exit".
15588 Use require_running and target_running. Always allow the extended
15589 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15590 restart in extended mode.
15591 * README: Refer to the GDB manual. Update --attach usage.
15592
15593 2007-12-20 Andreas Schwab <schwab@suse.de>
15594
15595 * linux-low.c (STACK_SIZE): Define.
15596 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15597 (linux_test_for_tracefork): Likewise.
15598
15599 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15600
15601 * linux-low.c (linux_wait_for_event): Update messages. Do not
15602 reinsert auto-delete breakpoints.
15603 * mem-break.c (struct breakpoint): Change return type of handler to
15604 int.
15605 (set_breakpoint_at): Update handler type.
15606 (reinsert_breakpoint_handler): Return 1 instead of calling
15607 delete_breakpoint.
15608 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15609 setting a new one.
15610 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15611 * mem-break.h (set_breakpoint_at): Update handler type.
15612 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15613 * win32-low.c (auto_delete_breakpoint): New.
15614 (get_child_debug_event): Use it.
15615
15616 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15617
15618 * configure.ac: Check for pread and pwrite.
15619 * hostio.c (handle_pread): Fall back to lseek and read.
15620 (handle_pwrite): Fall back to lseek and write.
15621 * config.in, configure: Regenerated.
15622
15623 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15624
15625 * server.c (myresume): Add own_buf argument.
15626 (main): Update calls.
15627
15628 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15629
15630 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15631 * remote-utils.c (remote_open): Do not call disable_async_io.
15632 (block_async_io): Delete.
15633 (unblock_async_io): Make static.
15634 (initialize_async_io): New.
15635 * server.c (handle_v_cont): Handle async I/O here.
15636 (myresume): Likewise. Move other common resume tasks here...
15637 (main): ... from here. Call initialize_async_io. Disable async
15638 I/O before the main loop.
15639 * server.h (initialize_async_io): Declare.
15640 (block_async_io, unblock_async_io): Delete prototypes.
15641 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15642
15643 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15644
15645 * remote-utils.c (readchar): Allow binary data in received messages.
15646
15647 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15648
15649 * win32-low.c (attaching): New global.
15650 (win32_create_inferior): Clear the `attaching' global.
15651 (win32_attach): Set the `attaching' global.
15652 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15653 attaching. Only set a breakpoint at the entry point if not
15654 attaching.
15655
15656 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15657
15658 * server.c (main): Don't report dll events on the initial
15659 connection on attaches.
15660
15661 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15662
15663 * server.c (main): Relax numerical bases supported for the pid of
15664 the --attach command line argument.
15665
15666 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15667
15668 * win32-low.c (win32_attach): Call OpenProcess before
15669 DebugActiveProcess, not after. Add last error output to error
15670 call.
15671
15672 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15673
15674 * win32-low.c (win32_get_thread_context)
15675 (win32_set_thread_context): New functions.
15676 (thread_rec): Use win32_get_thread_context.
15677 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15678 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15679 field.
15680
15681 2007-12-03 Leo Zayas
15682 Pedro Alves <pedro_alves@portugalmail.pt>
15683
15684 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15685 global variables.
15686 (child_add_thread): Minor cleanup.
15687 (child_continue): Resume artificially suspended threads before
15688 calling ContinueDebugEvent.
15689 (suspend_one_thread): New.
15690 (fake_breakpoint_event): New.
15691 (get_child_debug_event): Change return type to int. Check here if
15692 gdb sent an interrupt request. If a soft interrupt was requested,
15693 fake a breakpoint event. Return 0 if there is no event to handle,
15694 and 1 otherwise.
15695 (win32_wait): Don't check here if gdb sent an interrupt request.
15696 Ensure there is a valid event to handle.
15697 (win32_request_interrupt): Add soft interruption method as last
15698 resort.
15699
15700 2007-12-03 Leo Zayas
15701 Pedro Alves <pedro_alves@portugalmail.pt>
15702
15703 * win32-low.h (win32_thread_info): Add descriptions to the
15704 structure members. Replace `suspend_count' counter by a
15705 `suspended' flag.
15706 * win32-low.c (thread_rec): Update condition of when to get the
15707 context from the inferior. Rely on ContextFlags being set if it
15708 has already been retrieved. Only suspend the inferior thread if
15709 we haven't already. Warn if that fails.
15710 (continue_one_thread): s/suspend_count/suspended/. Only call
15711 ResumeThread once. Warn if that fails.
15712
15713 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15714
15715 * win32-low.c (win32_wait): Don't read from the inferior when it
15716 has already exited.
15717
15718 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15719
15720 * Makefile.in (win32_low_h): New variable.
15721 (win32-low.o): Add dependency on $(win32_low_h).
15722 (win32-arm-low.o, win32-i386-low.o): New rules.
15723
15724 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15725
15726 * hostio.c: Correct copyright year.
15727
15728 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15729
15730 * Makefile.in (OBS): Add hostio.o.
15731 (hostio.o): New rule.
15732 * server.h (handle_vFile): Declare.
15733 * hostio.c: New file.
15734 * server.c (handle_v_requests): Take packet_len and new_packet_len
15735 for binary packets. Call handle_vFile.
15736 (main): Update call to handle_v_requests.
15737
15738 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15739
15740 * linux-low.c: Include <sched.h>.
15741
15742 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15743
15744 * linux-low.c (linux_tracefork_grandchild): New.
15745 (linux_tracefork_child): Use clone.
15746 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15747
15748 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15749
15750 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15751
15752 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15753
15754 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15755
15756 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15757
15758 * inferiors.c (change_inferior_id): Delete.
15759 (add_pid_to_list, pull_pid_from_list): New.
15760 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15761 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15762 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15763 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15764 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15765 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15766 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15767 (using_threads): Always set to 1.
15768 (handle_extended_wait): New.
15769 (add_process): Do not set TID.
15770 (linux_create_inferior): Set must_set_ptrace_flags.
15771 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15772 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15773 (linux_thread_alive): Rename TID argument to LWPID.
15774 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15775 (linux_wait_for_event): Do not use TID or check using_threads. Update
15776 call to dead_thread_notify. Call handle_extended_wait.
15777 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15778 (send_sigstop): Delete sigstop_sent.
15779 (wait_for_sigstop): Avoid TID.
15780 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15781 (linux_test_for_tracefork): New.
15782 (linux_lookup_signals): Use thread_db_active and
15783 linux_supports_tracefork_flag.
15784 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15785 * linux-low.h (get_process_thread): Avoid TID.
15786 (struct process_ifo): Move thread_known and tid to the end. Remove
15787 sigstop_sent.
15788 (linux_attach_lwp, thread_db_init): Update prototypes.
15789 * server.h (change_inferior_id): Delete prototype.
15790 (add_pid_to_list, pull_pid_from_list): New prototypes.
15791 * thread-db.c (thread_db_use_events): New.
15792 (find_first_thread): Rename to...
15793 (find_one_thread): ...this. Update callers and messages. Do not
15794 call fatal. Check thread_db_use_events. Do not call
15795 change_inferior_id or new_thread_notify.
15796 (maybe_attach_thread): Update. Do not call new_thread_notify.
15797 (thread_db_init): Set thread_db_use_events. Check use_events.
15798 * utils.c (fatal, warning): Correct message prefix.
15799
15800 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15801
15802 * Makefile.in (clean): Remove new files.
15803 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15804 (powerpc-64.o, powerpc-64.c): New rules.
15805 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15806 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15807 with SPE.
15808 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15809 SPE targets.
15810 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15811 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15812 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15813 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15814 (target_regsets): Add AltiVec and SPE register sets.
15815 * configure.ac: Check for AltiVec and SPE.
15816 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15817 (ppc_fill_vrregset, ppc_store_vrregset): New.
15818 (target_regsets): Add AltiVec register set.
15819 * configure: Regenerated.
15820
15821 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15822
15823 * linux-low.c (O_LARGEFILE): Define.
15824 (linux_read_memory): Use /proc/PID/mem.
15825 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15826 * configure, config.in: Regenerated.
15827
15828 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15829
15830 * linux-low.c (linux_wait_for_event): Do not pass signals while
15831 single-stepping.
15832
15833 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15834
15835 * win32-low.c (create_process): New.
15836 (win32_create_inferior): Use create_process instead of
15837 CreateProcess. If create_process failed retry appending an ".exe"
15838 suffix. Store the GetLastError result immediatelly after
15839 create_process calls and use it on the call to error.
15840
15841 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15842
15843 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15844
15845 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15846
15847 * configure.ac: Switch license to GPLv3.
15848
15849 2007-08-01 Michael Snyder <msnyder@access-company.com>
15850
15851 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15852
15853 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15854
15855 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15856 typedef.
15857 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15858 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15859 CloseToolhelp32Snapshot.
15860 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15861 CloseToolhelp32Snapshot.
15862
15863 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15864
15865 * server.c (main): Check for inferior exit before main loop.
15866
15867 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15868
15869 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15870 instead of on tmp_desc.
15871
15872 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15873 Daniel Jacobowitz <dan@codesourcery.com>
15874
15875 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15876 (add_thread): Minor cleanups.
15877 (clear_inferiors): Move lower in the file. Clear the DLL
15878 list.
15879 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15880 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15881 (xml_escape_text): New.
15882 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15883 for qSupported.
15884 (handle_v_cont): Report errors.
15885 (gdbserver_version): Update.
15886 (main): Correct size of own_buf. Do not report initial DLL events.
15887 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15888 (unloaded_dll, xml_escape_text): New.
15889 * win32-low.c (enum target_waitkind): Update comments.
15890 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15891 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15892 (win32_EnumProcessModules, win32_GetModuleInformation)
15893 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15894 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15895 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15896 (win32_Module32First, win32_Module32Next, load_toolhelp)
15897 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15898 (get_child_debug_event): Handle DLL events.
15899 (win32_wait): Likewise.
15900
15901 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15902
15903 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15904 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15905
15906 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15907
15908 * win32-low.c (handle_output_debug_string): Ignore event if not
15909 waiting.
15910
15911 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15912
15913 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15914
15915 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15916
15917 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15918
15919 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15920
15921 * inferiors.c (change_inferior_id): Add comment.
15922 * linux-low.c (check_removed_breakpoint): Add an early
15923 prototype. Improve debug output.
15924 (linux_attach): Doc update.
15925 (linux_detach_one_process, linux_detach): Clean up before releasing
15926 each process.
15927 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15928 * linux-low.h (struct process_info): Doc improvement.
15929 * mem-break.c (delete_all_breakpoints): New.
15930 * mem-break.h (delete_all_breakpoints): New prototype.
15931 * thread-db.c (find_first_thread): New.
15932 (thread_db_create_event): Call it instead of
15933 thread_db_find_new_threads. Clean up unused variables.
15934 (maybe_attach_thread): Remove first thread handling.
15935 (thread_db_find_new_threads): Use find_first_thread.
15936 (thread_db_get_tls_address): Likewise.
15937
15938 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15939
15940 * thread-db.c (thread_db_find_new_threads): Add prototype.
15941 (thread_db_create_event): Check for the main thread before adding
15942 a new thread.
15943 (maybe_attach_thread): Only enable event reporting if TID == 0.
15944 (thread_db_get_tls_address): Check for new threads.
15945
15946 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15947
15948 * linux-low.c (linux_create_inferior): Try execv before execvp.
15949 * spu-low.c (spu_create_inferior): Likewise.
15950
15951 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15952
15953 * linux-low.c (linux_create_inferior): Change execv to execvp.
15954 * spu-low.c (spu_create_inferior): Likewies.
15955
15956 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15957
15958 * Makefile.in (clean): Clean new files instead of deleted ones.
15959 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15960 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15961 rules.
15962 * configure.srv: Specify XML files and new regformats for MIPS and
15963 MIPS64 GNU/Linux.
15964 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15965 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15966 an entry for the restart register.
15967 (mips_cannot_fetch_register, mips_cannot_store_register)
15968 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15969 register names to match the XML descriptions.
15970 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15971 restart register instead of $0.
15972
15973 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15974 Markus Deuling <deuling@de.ibm.com>
15975
15976 * remote-utils.c (decode_xfer_write): New function.
15977 * server.h (decode_xfer_write): Add prototype.
15978 * server.c (handle_query): Add PACKET_LEN argument. Support
15979 qXfer:spu:read and qXfer:spu:write packets.
15980 (main): Pass packet_len to handle_query.
15981 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15982 * target.h (target_ops): Add qxfer_spu.
15983
15984 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15985
15986 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15987 accessing non-seekable spufs files.
15988
15989 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15990
15991 * server.c (handle_query): Add reply for qC packet.
15992
15993 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15994 Leo Zayas <lerele@champenstudios@com>
15995
15996 * server.h (check_remote_input_interrupt_request): New function.
15997 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15998 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15999 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16000 (check_remote_input_interrupt_request): New function.
16001 * server.h (check_remote_input_interrupt_request): Declare.
16002 * win32-low.c (winapi_DebugBreakProcess,
16003 winapi_GenerateConsoleCtrlEvent): New typedefs.
16004 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16005 to 250 ms.
16006 (win32_wait): Check for remote interrupt request
16007 with check_remote_input_interrupt_request.
16008 (win32_request_interrupt): New function.
16009 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16010
16011 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16012
16013 * win32-low.c (debug_registers_changed,
16014 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16015 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16016 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16017 (thread_rec): Get context using the low target.
16018 (child_add_thread): Call thread_added on the low target,
16019 which does the same thing.
16020 (regptr): Delete.
16021 (do_initial_child_stuff): Remove debug registers references.
16022 Set context using the low target. Resume threads after
16023 setting the contexts.
16024 (child_continue): Remove dead variable. Remove debug
16025 registers references.
16026 (child_fetch_inferior_registers): Go through the low target.
16027 (do_child_store_inferior_registers): Remove.
16028 (child_store_inferior_registers): Go through the low target.
16029 (win32_resume): Remove debug registers references.
16030 Set context using the low target.
16031 (handle_exception): Change return type to void. Don't record
16032 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16033 first chance exception.
16034 (get_child_debug_event): Change return type to void. Remove
16035 goto loop. Always return after waiting for debug event.
16036 (win32_wait): Convert to switch statement. Handle spurious
16037 events.
16038
16039 * win32-i386-low.c (debug_registers_changed,
16040 debug_registers_used): New.
16041 (initial_stuff): Rename to ...
16042 (i386_initial_stuff): ... this. Clear debug registers
16043 state variables.
16044 (store_debug_registers): Delete.
16045 (i386_get_thread_context): New.
16046 (load_debug_registers): Delete.
16047 (i386_set_thread_context): New.
16048 (i386_thread_added): New.
16049 (single_step): Rename to ...
16050 (i386_single_step): ... this.
16051 (do_fetch_inferior_registers): Rename to ...
16052 (i386_fetch_inferior_register): ... this.
16053 (i386_store_inferior_register): New.
16054 (the_low_target): Adapt to new interface.
16055
16056 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16057 (arm_get_thread_context): New.
16058 (arm_set_thread_context): New.
16059 (regptr): New.
16060 (do_fetch_inferior_registers): Rename to ...
16061 (arm_fetch_inferior_register): ... this.
16062 (arm_store_inferior_register): New.
16063 (arm_wince_breakpoint): Reimplement as unsigned long.
16064 (arm_wince_breakpoint_len): Define.
16065 (the_low_target): Adapt to new interface.
16066
16067 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16068 load_debug_registers. Add get_thread_context, set_thread_context,
16069 thread_added and store_inferior_register. Rename
16070 fetch_inferior_registers to fetch_inferior_register.
16071 (regptr): Remove declaration.
16072
16073 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16074
16075 * linux-low.c (linux_detach): Change return type to int. Return 0.
16076 * spu-low.c (spu_detach): Likewise.
16077
16078 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16079
16080 * target.h (target_ops): Change return type of detach to int.
16081 Add join.
16082 (join_inferior): New.
16083 * server.c (main): Don't skip detach support on mingw32.
16084 If the inferior doesn't support detaching return error.
16085 Call join_inferior instead of using waitpid.
16086 * linux-low.c (linux_join): New.
16087 (linux_target_op): Add linux_join.
16088 * spu-low.c (spu_join): New.
16089 (spu_target_ops): Add spu_join.
16090 * win32-low.c (win32_detach): Adapt to new interface.
16091 Reopen current_process_handle before detaching. Issue a child
16092 resume before detaching.
16093 (win32_join): New.
16094 (win32_target_op): Add win32_join.
16095
16096 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16097
16098 * win32-low.c (win32-attach): Fix return value.
16099 * target.h (target_ops): Describe ATTACH return values.
16100
16101 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16102
16103 * win32-low.c (GETPROCADDRESS): Define.
16104 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16105 (winapi_DebugSetProcessKillOnExit): Likewise.
16106 (win32_create_inferior): Force usage of ansi CreateProcessA.
16107 (win32_attach): Use GETPROCADDRESS.
16108 (win32_detach): Likewise.
16109
16110 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16111
16112 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16113
16114 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16115
16116 * win32-low.c: Commit leftover changes from 2007-03-29.
16117
16118 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16119
16120 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16121 fields short instead of int. Add explicit padding.
16122 (i387_cache_to_fsave): Remove unnecessary casts.
16123 (i387_fsave_to_cache): Doc fix.
16124 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16125
16126 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16127
16128 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16129 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16130
16131 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16132
16133 * configure.srv (arm*-*-mingw32ce*): Move near the other
16134 arm targets.
16135
16136 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16137
16138 * configure.ac: Add errno checking.
16139 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16140 sys/file.h and malloc.h.
16141 (AC_CHECK_DECLS): Add perror.
16142 (srv_mingwce): Handle.
16143 * configure.srv (i[34567]86-*-cygwin*): Add
16144 win32-i386-low.o to srv_tgtobj.
16145 (i[34567]86-*-mingw*): Likewise.
16146 (arm*-*-mingw32ce*): Add case.
16147 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16148 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16149 [__MINGW32CE__] (strerror): New function.
16150 [__MINGW32CE__] (errno): Define to GetLastError.
16151 [__MINGW32CE__] (COUNTOF): New macro.
16152 (remote_open): Remove extra close call.
16153 * mem-break.c (delete_breakpoint_at): New function.
16154 * mem-break.h (delete_breakpoint_at): Declare.
16155 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16156 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16157 [USE_WIN32API] (read, write): Add char* casts.
16158 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16159 * server.h: Include wincecompat.h on Windows CE.
16160 [HAVE_ERRNO_H]: Check.
16161 (perror): Declare if not declared.
16162 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16163 (perror_with_name): Remove errno declaration.
16164 * wincecompat.h: New.
16165 * wincecompat.c: New.
16166 * win32-low.h: New.
16167 * win32-arm-low.c: New.
16168 * win32-i386-low.c: New.
16169 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16170 (OUTMSG2): Make it safe.
16171 (_T): New macro.
16172 (COUNTOF): New macro.
16173 (NUM_REGS): Get it from the low target.
16174 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16175 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16176 (thread_rec): Let low target handle debug registers.
16177 (child_add_thread): Likewise.
16178 (child_init_thread_list): Likewise.
16179 (continue_one_thread): Likewise.
16180 (regptr): New.
16181 (do_child_fetch_inferior_registers): Move to ...
16182 * win32-i386-low.c: ... here, and rename to ...
16183 (do_fetch_inferior_registers): ... this.
16184 * win32-low.c (child_fetch_inferior_registers):
16185 Go through the low target.
16186 (do_child_store_inferior_registers): Use regptr.
16187 (strwinerror): New function.
16188 (win32_create_inferior): Handle Windows CE.
16189 Use strwinerror instead of strerror on Windows error
16190 codes. Add program to the error output.
16191 Don't close the main thread handle on Windows CE.
16192 (win32_attach): Use coredll.dll on Windows CE.
16193 (win32_kill): Close current process and current
16194 thread handles.
16195 (win32_detach): Use coredll.dll on Windows CE.
16196 (win32_resume): Let low target handle debug registers, and
16197 step request.
16198 (handle_exception): Add/Remove initial breakpoint. Avoid
16199 non-existant WSTOPSIG on Windows CE.
16200 (win32_read_inferior_memory): Cast to remove warning.
16201 (win32_arch_string): Go through the low target.
16202 (initialize_low): Call set_breakpoint_data with the low
16203 target's breakpoint.
16204 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16205 FOP_REGNUM, mappings): Move to ...
16206 * win32-i386-low.c: ... here.
16207 * win32-low.c (win32_thread_info): Move to ...
16208 * win32-low.h: ... here.
16209 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16210 win32-arm-low.c and wincecompat.c.
16211 (all:): Add $EXEEXT.
16212 (install-only:): Likewise.
16213 (gdbserver:): Likewise.
16214 (gdbreplay:): Likewise.
16215 * config.in: Regenerate.
16216 * configure: Regenerate.
16217
16218 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16219
16220 * win32-low.c: Rename typedef thread_info to
16221 win32_thread_info throughout.
16222
16223 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16224
16225 * win32-i386-low.c: Rename to ...
16226 * win32-low.c: ... this.
16227 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16228 * Makefile.in: Likewise.
16229
16230 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16231
16232 * remote-utils.c (monitor_output): Constify msg parameter.
16233 * server.h (monitor_output): Likewise.
16234 * win32-i386-low.c (handle_output_debug_string): New.
16235 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16236 handle_output_debug_string.
16237 (get_child_debug_event): Likewise.
16238
16239 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16240
16241 * server.c (main): Correct strtoul check.
16242
16243 2007-03-27 Jon Ringle <jon@ringle.org>
16244
16245 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16246
16247 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16248
16249 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16250
16251 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16252
16253 * terminal.h: Check HAVE_SGTTY_H.
16254
16255 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16256
16257 * remote-utils.c (remote_open): Print out the assigned port number.
16258
16259 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16260
16261 * remote-utils.c (monitor_output): New function.
16262 * server.c (debug_threads): Define here.
16263 (monitor_show_help): New function.
16264 (handle_query): Handle qRcmd.
16265 (main): Do not handle 'd' packet.
16266 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16267 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16268 of debug_threads.
16269
16270 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16271
16272 * Makefile.in (EXEEXT): New.
16273 (clean): Use $(EXEEXT).
16274
16275 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16276
16277 * target.h (target_ops): Rename send_signal to request_interrupt,
16278 and remove enum target_signal parameter.
16279 * linux-low.c (linux_request_interrupt): Rename from
16280 linux_send_signal, and always send SIGINT.
16281 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16282 and always send SIGINT.
16283 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16284 of send_signal.
16285 (input_interrupt): Likewise.
16286
16287 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16288
16289 * server.c (get_features_xml): Check if target implemented
16290 arch_string.
16291 * win32-i386-low.c (win32_arch_string): New.
16292 (win32_target_ops): Add win32_arch_string as arch_string member.
16293
16294 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16295
16296 * spu-low.c (spu_arch_string): New.
16297 (spu_target_ops): Add spu_arch_string.
16298
16299 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16300
16301 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16302 * configure.ac: Do not check for terminal.h.
16303 * configure, config.in: Regenerated.
16304
16305 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16306
16307 * Makefile.in (OBS): Add $(XML_BUILTIN).
16308 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16309 (clean): Update.
16310 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16311 (arm-with-iwmmxt.c): New.
16312 * config.in, configure: Regenerate.
16313 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16314 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16315 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16316 (arm*-*-linux*): Add iWMMXt and regset support.
16317 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16318 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16319 (arm_store_wmmxregset, target_regsets): New.
16320 * server.c (get_features_xml): Take annex argument. Check builtin
16321 XML documents.
16322 (handle_query): Handle multiple annexes.
16323
16324 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16325
16326 * remote-utils.c [USE_WIN32API] (read, write): Define.
16327 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16328 write.
16329
16330 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16331
16332 * linux-i386-low.c (the_low_target): Set arch_string.
16333 * linux-x86-64-low.c (the_low_target): Likewise.
16334 * linux-low.c (linux_arch_string): New.
16335 (linux_target_ops): Add it.
16336 * linux-low.h (struct linux_target_ops): Add arch_string.
16337 * server.c (write_qxfer_response): Use const void * for DATA.
16338 (get_features_xml): New.
16339 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16340 * target.h (struct target_ops): Add arch_string method.
16341
16342 2007-01-03 Denis Pilat <denis.pilat@st.com>
16343 Daniel Jacobowitz <dan@codesourcery.com>
16344
16345 * linux-low.c (linux_kill): Handle being called with no threads.
16346 * win32-i386-low.c (win32_kill): Likewise.
16347 (get_child_debug_event): Clear current_process_handle.
16348
16349 2006-12-30 Denis PILAT <denis.pilat@st.com>
16350 Daniel Jacobowitz <dan@codesourcery.com>
16351
16352 * remote-utils.c (remote_open): Check the type of specified
16353 serial port devices before opening them.
16354 * server.c (main): Kill the inferior if an error occurs during
16355 the first remote_open.
16356
16357 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16358
16359 * README: Update supported targets.
16360
16361 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16362
16363 * Makefile.in (clean): Remove reg-mips64.c.
16364 (reg-mips64.c, reg-mips64.o): New rules.
16365 * configure.srv: Handle mips64. Include regset support for mips.
16366 * linux-mips-low.c (union mips_register): New.
16367 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16368 (mips_breakpoint, mips_breakpoint_at): Use int.
16369 (mips_collect_register, mips_supply_register)
16370 (mips_collect_register_32bit, mips_supply_register_32bit)
16371 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16372 (mips_store_fpregset, target_regsets): New.
16373 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16374
16375 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16376
16377 * configure.srv: Add target "spu*-*-*".
16378 * Makefile.in (clean): Remove reg-spu.c.
16379 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16380 * spu-low.c: New file.
16381
16382 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16383
16384 * configure.ac: Correct td_thr_tls_get_addr test.
16385 * configure: Regenerated.
16386
16387 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16388
16389 * linux-low.c (linux_wait_for_event): Reformat. Use the
16390 pass_signals array.
16391 * remote-utils.c (decode_address_to_semicolon): New.
16392 * server.c (pass_signals, handle_general_set): New.
16393 (handle_query): Mention QPassSignals for qSupported.
16394 (main): Call handle_general_set.
16395 * server.h (pass_signals, decode_address_to_semicolon): New.
16396
16397 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16398
16399 * server.c (handle_query): Correct error handling for read_auxv.
16400
16401 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16402
16403 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16404 and srv_linux_thread_db to yes.
16405 * linux-s390-low.c (s390_fill_gregset): New function.
16406 (target_regsets): Define data structure.
16407
16408 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16409
16410 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16411 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16412 * config.in, configure: Regenerated.
16413 * inferiors.c (gdb_id_to_thread): New function.
16414 (gdb_id_to_thread_id): Use it.
16415 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16416 * linux-low.h (struct process_info): Add th member.
16417 (thread_db_get_tls_address): New prototype.
16418 * remote-utils.c (decode_address): Make non-static.
16419 * server.c (handle_query): Handle qGetTLSAddr.
16420 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16421 * target.h (struct target_ops): Add get_tls_address.
16422 * thread-db.c (maybe_attach_thread): Save the thread handle.
16423 (thread_db_get_tls_address): New.
16424
16425 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16426
16427 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16428 (linux_resume_one_process): Take a siginfo_t *. Update all
16429 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16430 (struct pending_signals): Add a siginfo_t.
16431 (linux_wait_for_process): Always set last_status.
16432 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16433 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16434 * linux-low.h (struct process_info): Add last_status.
16435
16436 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16437
16438 * remote-utils.c (try_rle): New function.
16439 (putpkt_binary): Use it.
16440
16441 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16442
16443 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16444 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16445 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16446 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16447 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16448 point registers.
16449
16450 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16451
16452 * server.c (terminal_fd): New variable.
16453 (old_foreground_pgrp): Likewise.
16454 (restore_old_foreground_pgrp): New function.
16455 (start_inferior): Record the terminal file descriptor in terminal_fd
16456 and its original foreground group in old_foreground_pgrp. Register
16457 restore_old_foreground_pgrp with atexit().
16458
16459 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16460
16461 * server.c (handle_query): Correct qPart to qXfer.
16462
16463 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16464
16465 * configure.ac: Check for more headers which are missing on
16466 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16467 * configure.srv: Add Cygwin and mingw32.
16468 * remote-utils.c: Don't include headers unconditionally which
16469 are missing on mingw32. Include <winsock.h> for mingw32.
16470 (remote_open): Adjust for mingw32 support. Flush
16471 standard error after writing to it.
16472 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16473 (unblock_async_io, enable_async_io, disable_async_io)
16474 (readchar, getpkt): Update for Winsock support.
16475 (prepare_resume_reply): Expect a protocol signal number.
16476 * server.c: Disable <sys/wait.h> on mingw32.
16477 (start_inferior): Adjust for mingw32 support. Flush
16478 standard error after writing to it.
16479 (attach_inferior): Likewise. Use protocol signal
16480 numbers.
16481 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16482 and names.
16483 * win32-i386-low.c: New file.
16484 * Makefile.in (XM_CLIBS): Set.
16485 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16486 (win32-i386-low.o): New dependency rule.
16487 * linux-low.c (linux_wait): Use target signal numbers.
16488 * target.h (struct target_ops): Doc fix.
16489 * server.h (target_signal_to_name): New prototype.
16490 * gdbreplay.c: Don't include headers unconditionally which
16491 are missing on mingw32. Include <winsock.h> for mingw32.
16492 (remote_close, remote_open): Adjust for Winsock support.
16493 * configure, config.in: Regenerated.
16494
16495 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16496
16497 * server.c (decode_xfer_read, write_qxfer_response): New.
16498 (handle_query): Take a packet length argument. Handle
16499 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16500 the qSupported response.
16501 (main): Update call to handle_query.
16502
16503 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16504
16505 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16506 (putpkt_binary): Renamed from putpkt and adjusted for binary
16507 data.
16508 (putpkt): New wrapper for putpkt_binary.
16509 (readchar): Don't mask off the high bit.
16510 (decode_X_packet): New function.
16511 * server.c (main): Call putpkt_binary if a handler sets the packet
16512 length. Save the length of the incoming packet. Handle 'X'.
16513 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16514
16515 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16516
16517 * server.c (handle_query): Handle qSupported.
16518
16519 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16520
16521 * remote-utils.c (all_symbols_looked_up): New variable.
16522 (look_up_one_symbol): Check it.
16523 * server.h (look_up_one_symbol): New declaration.
16524 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16525
16526 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16527
16528 * Makefile.in (linux-arm-low.o): Update dependencies.
16529 * linux-arm-low.c: Include "gdb_proc_service.h".
16530 (PTRACE_GET_THREAD_AREA): Define.
16531 (ps_get_thread_area): New function.
16532
16533 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16534
16535 * configure.srv (m68k*-*-uclinux*): New target.
16536 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16537 (linux_resume_one_process): Remove extraneous cast.
16538 (linux_read_offsets): New.
16539 (linux_target_op): Add linux_read_offsets on mmuless systems.
16540 * server.c (handle_query): Add qOffsets logic.
16541 * target.h (struct target_ops): Add read_offsets.
16542
16543 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16544
16545 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16546 (PTRACE_GET_THREAD_AREA): Define.
16547 (ps_get_thread_area): New function.
16548 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16549 (linux-x86-64-low.o): Update.
16550
16551 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16552
16553 * configure.ac: Remove checks for prfpregset_t.
16554 * gdb_proc_service.h: New file.
16555 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16556 new "gdb_proc_service.h".
16557 * proc-service.c: Likewise.
16558 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16559 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16560 * Makefile.in (gdb_proc_service_h): Updated.
16561 * configure, config.in: Regenerated.
16562
16563 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16564
16565 * remote-utils.c (prepare_resume_reply): Move declaration
16566 of gdb_id_from_wait to the top of the block.
16567
16568 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16569
16570 * linux-low.c (regsets_store_inferior_registers): Read the regset
16571 from the target before filling it.
16572
16573 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16574
16575 * server.c (attach_inferior): Return SIGTRAP for a successful
16576 attach.
16577
16578 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16579
16580 * Makefile.in (OBS): Add version.o.
16581 (STAGESTUFF): Delete.
16582 (version.o): Add dependencies.
16583 (version.c): Replace rule.
16584 (clean): Remove version.c.
16585 * server.c (gdbserver_version): New.
16586 (gdbserver_usage): Use printf.
16587 (main): Handle --version and --help.
16588 * server.h (version, host_name): Add declarations.
16589
16590 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16591
16592 * linux-arm-low.c:
16593 * linux-arm-low.c:
16594 * inferiors.c:
16595 * i387-fp.h:
16596 * i387-fp.c:
16597 * gdbreplay.c:
16598 * regcache.c:
16599 * proc-service.c:
16600 * mem-break.h:
16601 * mem-break.c:
16602 * linux-x86-64-low.c:
16603 * linux-sh-low.c:
16604 * linux-s390-low.c:
16605 * linux-ppc64-low.c:
16606 * linux-ppc-low.c:
16607 * linux-mips-low.c:
16608 * linux-m68k-low.c:
16609 * linux-m32r-low.c:
16610 * linux-low.h:
16611 * linux-low.c:
16612 * linux-ia64-low.c:
16613 * linux-i386-low.c:
16614 * linux-crisv32-low.c:
16615 * thread-db.c:
16616 * terminal.h:
16617 * target.h:
16618 * target.c:
16619 * server.h:
16620 * server.c:
16621 * remote-utils.c:
16622 * regcache.h:
16623 * utils.c:
16624 * Makefile.in:
16625 * configure.ac:
16626 * gdbserver.1: Add (C) after Copyright. Update the FSF
16627 address.
16628
16629 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16630
16631 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16632 (arm_breakpoint_at): Recognize both breakpoints.
16633 (the_low_target): Use the correct breakpoint instruction.
16634
16635 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16636
16637 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16638 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16639 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16640 (the_low_target): Update.
16641
16642 2005-10-25 Andreas Schwab <schwab@suse.de>
16643
16644 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16645
16646 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16647 (ia64_num_regs): Reduce to 462.
16648
16649 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16650
16651 * acinclude.m4: Correct quoting.
16652 * aclocal.m4: Regenerated.
16653
16654 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16655 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16656 (thread_db_init): Call thread_db_err_str.
16657 * configure.ac: Check for TD_VERSION.
16658 * config.in, configure: Regenerated.
16659
16660 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16661
16662 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16663
16664 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16665
16666 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16667 is not available. Define HAVE_PTRACE_GETREGS if it is.
16668 * config.in, configure: Regenerated.
16669 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16670 * linux-i386-low.c, linux-m68k-low.c: Update to use
16671 HAVE_PTRACE_GETREGS.
16672 * linux-low.c (regsets_fetch_inferior_registers)
16673 (regsets_store_inferior_registers): Only return 0 if we processed
16674 GENERAL_REGS.
16675 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16676 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16677
16678 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16679
16680 * inferiors.c (struct thread_info): Add gdb_id.
16681 (add_thread): Add gdb_id argument.
16682 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16683 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16684 calls to add_thread.
16685 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16686 * server.c (handle_query): Use thread_to_gdb_id.
16687 (handle_v_cont, main): Use gdb_id_to_thread_id.
16688 * server.h (add_thread): Update prototype.
16689 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16690 prototypes.
16691
16692 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16693
16694 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16695 left-padded registers.
16696 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16697 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16698
16699 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16700
16701 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16702 * configure: Regenerate.
16703 * config.in: Regenerate.
16704 * server.h (NEED_DECLARATION_STRERROR):
16705 Replace with !HAVE_DECL_STRERROR.
16706
16707 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16708
16709 * linux-low.c (linux_wait, linux_send_signal): Don't test
16710 an unsigned long variable for > 0 if it could be MAX_ULONG.
16711 * server.c (myresume): Likewise.
16712 * target.c (set_desired_inferior): Likewise.
16713
16714 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16715
16716 * configure.ac: Simplify and improve check for socklen_t.
16717 * configure, config.in: Regenerate.
16718
16719 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16720
16721 * acconfig.h: Remove.
16722 * configure.ac: Add a test for socklen_t. Use three-argument
16723 AC_DEFINE throughout.
16724 * config.in: Regenerated using autoheader 2.59.
16725 * configure: Regenerated.
16726
16727 * gdbreplay.c (socklen_t): Provide a default.
16728 (remote_open): Use socklen_t.
16729 * remote-utils.c (socklen_t): Provide a default.
16730 (remote_open): Use socklen_t.
16731 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16732 unsigned char.
16733
16734 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16735 char for buffers.
16736 * linux-low.c (linux_read_memory, linux_write_memory)
16737 (linux_read_auxv): Likewise.
16738 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16739 (check_mem_write): Likewise.
16740 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16741 Likewise.
16742 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16743 (registers_from_string, register_data): Likewise.
16744 * server.c (handle_query, main): Likewise.
16745 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16746 (decode_M_packet): Likewise.
16747 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16748 * target.h (struct target_ops): Update read_memory, write_memory,
16749 and read_auxv.
16750 (read_inferior_memory, write_inferior_memory): Update.
16751 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16752 to unsigned char *.
16753 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16754 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16755 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16756 linux-s390-low.c, linux-sh-low.c: Update for changes in
16757 read_inferior_memory and the_low_target->breakpoint.
16758
16759 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16760
16761 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16762 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16763 * configure.srv: Add powerpc64-*-linux*.
16764 * linux-ppc64-low.c: New file.
16765
16766 2005-05-23 Orjan Friberg <orjanf@axis.com>
16767
16768 * linux-cris-low.c: New file with support for CRIS.
16769 * linux-crisv32-low.c: Ditto for CRISv32.
16770 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16771 (clean): Add reg-cris.c and reg-crisv32.c.
16772 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16773 reg-crisv32.o, and reg-crisv32.c to make rules.
16774 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16775 recognized targets.
16776
16777 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16778
16779 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16780 of sizeof (PTRACE_XFER_TYPE).
16781 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16782
16783 2005-05-12 Orjan Friberg <orjanf@axis.com>
16784
16785 * target.h (struct target_ops): Add insert_watchpoint,
16786 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16787 pointers for hardware watchpoint support.
16788 * linux-low.h (struct linux_target_ops): Ditto.
16789 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16790 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16791 to linux_target_ops.
16792 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16793 reply packet.
16794 * server.c (main): Recognize 'Z' and 'z' packets.
16795
16796 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16797
16798 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16799 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16800 (the_low_target): Add new members.
16801
16802 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16803
16804 * proc-service.c (ps_lgetregs): Search all_processes instead of
16805 all_threads.
16806
16807 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16808
16809 * server.c (start_inferior): Change return type to int.
16810 (attach_inferior): Change sigptr to int *.
16811 (handle_v_cont, handle_v_requests): Change signal to int *.
16812 (main): Change signal to int.
16813
16814 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16815
16816 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16817 * configure.srv: Add m32r*-*-linux*.
16818 * linux-m32r-low.c: New file.
16819
16820 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16821
16822 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16823
16824 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16825
16826 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16827 Take unsigned long arguments for PIDs.
16828 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16829 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16830 (wait_for_sigstop, linux_resume_one_process)
16831 (regsets_fetch_inferior_registers, linux_send_signal)
16832 (linux_read_auxv): Likewise. Update the types of variables holding
16833 PIDs. Update format string specifiers.
16834 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16835 * remote-utils.c (prepare_resume_reply): Likewise.
16836 * server.c (cont_thread, general_thread, step_thread)
16837 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16838 unsigned long.
16839 (handle_query): Update format specifiers.
16840 (handle_v_cont, main): Use strtoul for thread IDs.
16841 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16842 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16843 (general_thread, step_thread, thread_from_wait)
16844 (old_thread_from_wait): Update.
16845 * target.h (struct thread_resume): Use unsigned long for THREAD.
16846 (struct target_ops): Use unsigned long for arguments to attach and
16847 thread_alive.
16848
16849 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16850
16851 * acinclude.m4: Include bfd/bfd.m4 directly.
16852 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16853 <agriffis@toolchain.org>.
16854 * aclocal.m4, configure: Regenerated.
16855
16856 2005-01-07 Andrew Cagney <cagney@gnu.org>
16857
16858 * configure.ac: Rename configure.in, require autoconf 2.59.
16859 * configure: Re-generate.
16860
16861 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16862
16863 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16864 LIBS when finished.
16865 * aclocal.m4: Regenerated.
16866 * configure: Regenerated.
16867
16868 2004-11-21 Andreas Schwab <schwab@suse.de>
16869
16870 * linux-m68k-low.c (m68k_num_gregs): Define.
16871 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16872 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16873 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16874 (m68k_breakpoint_at): New. Add to the_low_target.
16875
16876 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16877 srv_linux_thread_db to yes.
16878
16879 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16880
16881 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16882 (ARCH_SET_FS): Likewise.
16883 (ARCH_GET_FS): Likewise.
16884 (ARCH_GET_GS): Likewise.
16885
16886 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16887
16888 * linux-i386-low.c (ps_get_thread_area): New.
16889 * linux-x86-64-low.c (ps_get_thread_area): New.
16890 * linux-low.c: Include <sys/syscall.h>.
16891 (linux_kill_one_process): Don't kill the first thread here.
16892 (linux_kill): Kill the first thread here.
16893 (kill_lwp): New function.
16894 (send_sigstop, linux_send_signal): Use it.
16895 * proc-service.c: Clean up #ifdefs.
16896 (fpregset_info): Delete.
16897 (ps_lgetregs): Update and enable implementation.
16898 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16899 implementations.
16900 * remote-utils.c (struct sym_cache, symbol_cache): New.
16901 (input_interrupt): Print a clearer message.
16902 (async_io_enabled): New variable.
16903 (enable_async_io, disable_async_io): Use it. Update comments.
16904 (look_up_one_symbol): Use the symbol cache.
16905 * thread-db.c (thread_db_look_up_symbols): New function.
16906 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16907
16908 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16909
16910 * configure.in: Test for -rdynamic.
16911 * configure: Regenerated.
16912 * Makefile (INTERNAL_LDFLAGS): New.
16913 (gdbserver, gdbreplay): Use it.
16914
16915 2004-09-02 Andrew Cagney <cagney@gnu.org>
16916
16917 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16918
16919 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16920
16921 * linux-low.c (linux_wait): Clear all_processes list also.
16922
16923 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16924
16925 * linux-low.c: Include <errno.h>. Remove extern declaration of
16926 errno.
16927
16928 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16929
16930 * gdbreplay.c, server.h, utils.c: Update copyright years.
16931
16932 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16933
16934 * server.c (main): Print child status or termination signal from
16935 variable 'signal', not 'sig'.
16936
16937 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16938
16939 * linux-low.c (linux_read_memory): Change return type to
16940 int. Check for and return error from ptrace().
16941 * target.c (read_inferior_memory): Change return type to int. Pass
16942 back return status from the_target->read_memory().
16943 * target.h (struct target_ops): Adapt *read_memory() prototype.
16944 Update comment.
16945 (read_inferior_memory): Adapt prototype.
16946 * server.c (main): Return an error packet if
16947 read_inferior_memory() returns an error.
16948
16949 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16950
16951 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16952 Unify with other clean targets.
16953
16954 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16955
16956 * server.c (handle_v_cont): Call set_desired_inferior.
16957
16958 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16959
16960 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16961
16962 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16963
16964 * linux-low.c (linux_wait): Unblock async I/O.
16965 (linux_resume): Block and enable async I/O.
16966 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16967 * server.h (block_async_io, unblock_async_io): Add prototypes.
16968
16969 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16970
16971 * remote-utils.c (remote_open): Print a status notice after
16972 opening a TCP port.
16973 * server.c (attach_inferior): Print a status notice after
16974 attaching.
16975
16976 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16977
16978 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16979
16980 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16981
16982 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16983 error packet.
16984 * server.c, target.h: Update copyright years.
16985
16986 2004-02-25 Roland McGrath <roland@redhat.com>
16987
16988 * target.h (struct target_ops): New member `read_auxv'.
16989 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16990 * linux-low.c (linux_read_auxv): New function.
16991 (linux_target_ops): Initialize `read_auxv' member to that.
16992
16993 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16994
16995 Committed by Jim Blandy <jimb@redhat.com>.
16996
16997 * linux-s390-low.c (s390_num_regs): Update.
16998 (s390_regmap): Remove control registers. Use __s390x__ predefine
16999 instead of GPR_SIZE to distiguish s390 and s390x targets.
17000
17001 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17002
17003 * linux-low.c: Update copyright year.
17004 (check_removed_breakpoint): Clear pending_is_breakpoint.
17005 (linux_set_resume_request, linux_queue_one_thread)
17006 (resume_status_pending_p): New functions.
17007 (linux_continue_one_thread): Use process->resume.
17008 (linux_resume): Only resume threads if there are no pending events.
17009 * linux-low.h (struct process_info): Add resume request
17010 pointer.
17011
17012 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17013
17014 * regcache.c (new_register_cache): Clear the allocated register
17015 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17016
17017 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17018
17019 * linux-low.c (linux_resume): Take a struct thread_resume *
17020 argument.
17021 (linux_wait): Update call.
17022 (resume_ptr): New static variable.
17023 (linux_continue_one_thread): Renamed from
17024 linux_continue_one_process. Use resume_ptr.
17025 (linux_resume): Use linux_continue_one_thread.
17026 * server.c (handle_v_cont, handle_v_requests): New functions.
17027 (myresume): New function.
17028 (main): Handle 'v' case.
17029 * target.h (struct thread_resume): New type.
17030 (struct target_ops): Change argument of "resume" to struct
17031 thread_resume *.
17032 (myresume): Delete macro.
17033
17034 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17035
17036 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17037 (uninstall): Support DESTDIR.
17038
17039 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17040
17041 * configure.srv: Add xscale*linux copy of arm*linux entry.
17042
17043 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17044
17045 * linux-arm-low.c (arm_reinsert_addr): New function.
17046 (the_low_target): Add arm_reinsert_addr.
17047
17048 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17049
17050 * mem-break.c: Remove whitespace at end of file.
17051
17052 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17053
17054 * configure.in: Check whether we need to prototype strerror.
17055 * server.h: Optionally prototype strerror.
17056 * gdbreplay.c (perror_with_name): Use strerror.
17057 * linux-low.c (linux_attach_lwp): Use strerror.
17058 * utils.c (perror_with_name): Use strerror.
17059 * config.in, configure: Regenerated.
17060
17061 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17062
17063 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17064 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17065
17066 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17067
17068 * Makefile.in (SFILES): Update.
17069 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17070 low-sun3.c: Remove files.
17071
17072 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17073
17074 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17075 (linux_detach_one_process, linux_detach): New functions.
17076 (linux_target_ops): Add linux_detach.
17077 * server.c (main): Handle 'D' packet.
17078 * target.h (struct target_ops): Add "detach" member.
17079 (detach_inferior): Define.
17080
17081 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17082
17083 From Kelley Cook <kelleycook@wideopenwest.com>:
17084 * configure.srv: Accept i[34567]86 variants.
17085
17086 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17087
17088 * linux-low.c (linux_wait_for_event): Correct comment typos.
17089 (linux_resume_one_process): Call check_removed_breakpoint.
17090 (linux_send_signal): New function.
17091 (linux_target_ops): Add linux_send_signal.
17092 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17093 of kill.
17094 * target.h (struct target_ops): Add send_signal.
17095
17096 2003-05-29 Jim Blandy <jimb@redhat.com>
17097
17098 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17099 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17100 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17101 away part of the register's value.
17102
17103 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17104
17105 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17106 (linux_wait_for_event, linux_init_signals): Likewise.
17107
17108 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17109
17110 * configure.in: Check for stdlib.h.
17111 * configure: Regenerated.
17112 * config.in: Regenerated.
17113
17114 2003-01-04 Andreas Schwab <schwab@suse.de>
17115
17116 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17117
17118 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17119
17120 * Makefile.in: Remove obsolete code.
17121
17122 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17123
17124 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17125 defined(PT_FPR0_HI).
17126
17127 2002-11-17 Stuart Hughes <seh@zee2.com>
17128
17129 * linux-arm-low.c (arm_num_regs): Increase.
17130 (arm_regmap): Include status register.
17131
17132 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17133
17134 * linux-low.c (register_addr): Remove incorrect -1 check.
17135
17136 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17137
17138 * linux-low.c (linux_create_inferior): Call setpgid. Return
17139 the new PID.
17140 (unstopped_p, linux_signal_pid): Remove.
17141 (linux_target_ops): Remove linux_signal_pid.
17142 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17143 global instead of target method.
17144 * target.h (struct target_ops): Remove signal_pid. Update comment
17145 for create_inferior.
17146 * server.c (signal_pid): New variable.
17147 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17148 gdbserver. Set the child to be the foreground process group.
17149 (attach_inferior): Set signal_pid.
17150
17151 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17152
17153 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17154
17155 2002-08-20 Jim Blandy <jimb@redhat.com>
17156
17157 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17158 default for this.
17159
17160 2002-08-01 Andrew Cagney <cagney@redhat.com>
17161
17162 * Makefile.in: Make chill references obsolete.
17163
17164 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17165
17166 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17167 * configure: Regenerate.
17168 * config.in: Regenerate.
17169
17170 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17171
17172 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17173 (perror_with_name, remote_close, remote_open, expect, play): Static.
17174
17175 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17176
17177 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17178 byte offsets instead of an array of indexes.
17179 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17180
17181 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17182
17183 * regcache.c: Add comment.
17184
17185 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17186
17187 * thread-db.c: New file.
17188 * proc-service.c: New file.
17189 * acinclude.m4: New file.
17190 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17191 proc-service.o, and thread-db.o.
17192 (linux-low.o): Add USE_THREAD_DB.
17193 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17194 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17195 * aclocal.m4: Regenerated.
17196 * config.in: Regenerated.
17197 * configure: Regenerated.
17198 * configure.in: Check for proc_service.h, sys/procfs.h,
17199 thread_db.h, and linux/elf.h headrs.
17200 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17201 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17202 Check for -lthread_db and thread support.
17203 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17204 PowerPC, and SuperH.
17205 * i387-fp.c: Constify arguments.
17206 * i387-fp.h: Likewise.
17207 * inferiors.c: (struct thread_info): Renamed from
17208 `struct inferior_info'. Remove PID member. Use generic inferior
17209 list header. All uses updated.
17210 (inferiors, signal_pid): Removed.
17211 (all_threads): New variable.
17212 (get_thread): Define.
17213 (add_inferior_to_list): New function.
17214 (for_each_inferior): New function.
17215 (change_inferior_id): New function.
17216 (add_inferior): Removed.
17217 (remove_inferior): New function.
17218 (add_thread): New function.
17219 (free_one_thread): New function.
17220 (remove_thread): New function.
17221 (clear_inferiors): Use for_each_inferior and free_one_thread.
17222 (find_inferior): New function.
17223 (find_inferior_id): New function.
17224 (inferior_target_data): Update argument type.
17225 (set_inferior_target_data): Likewise.
17226 (inferior_regcache_data): Likewise.
17227 (set_inferior_regcache_data): Likewise.
17228 * linux-low.c (linux_bp_reinsert): Remove.
17229 (all_processes, stopping_threads, using_thrads)
17230 (struct pending_signals, debug_threads, pid_of): New.
17231 (inferior_pid): Replace with macro.
17232 (struct inferior_linux_data): Remove.
17233 (get_stop_pc, add_process): New functions.
17234 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17235 Use add_process and add_thread.
17236 (linux_attach_lwp): New function, based on old linux_attach. Use
17237 add_process and add_thread. Set stop_expected for new threads.
17238 (linux_attach): New function.
17239 (linux_kill_one_process): New function.
17240 (linux_kill): Kill all LWPs.
17241 (linux_thread_alive): Use find_inferior_id.
17242 (check_removed_breakpoints, status_pending_p): New functions.
17243 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17244 Update. Use WNOHANG. Wait for cloned processes also. Update process
17245 struct for the found process.
17246 (linux_wait_for_event): New function.
17247 (linux_wait): Use it. Support LWPs.
17248 (send_sigstop, wait_for_sigstop, stop_all_processes)
17249 (linux_resume_one_process, linux_continue_one_process): New functions.
17250 (linux_resume): Support LWPs.
17251 (REGISTER_RAW_SIZE): Remove.
17252 (fetch_register): Use register_size instead. Call supply_register.
17253 (usr_store_inferior_registers): Likewise. Call collect_register.
17254 Fix recursive case.
17255 (regsets_fetch_inferior_registers): Improve error message.
17256 (regsets_store_inferior_registers): Add debugging.
17257 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17258 (unstopped_p, linux_signal_pid): New functions.
17259 (linux_target_ops): Add linux_signal_pid.
17260 (linux_init_signals): New function.
17261 (initialize_low): Call it. Initialize using_threads.
17262 * regcache.c (inferior_regcache_data): Add valid
17263 flag.
17264 (get_regcache): Fetch registers lazily. Add fetch argument
17265 and update all callers.
17266 (regcache_invalidate_one, regcache_invalidate): New
17267 functions.
17268 (new_register_cache): Renamed from create_register_cache.
17269 Return the new regcache.
17270 (free_register_cache): Change argument to a void *.
17271 (registers_to_string, registers_from_string): Call get_regcache
17272 with fetch flag set.
17273 (register_data): Make static. Pass fetch flag to get_regcache.
17274 (supply_register): Call get_regcache with fetch flag clear.
17275 (collect_register): Call get_regcache with fetch flag set.
17276 (collect_register_as_string): New function.
17277 * regcache.h: Update.
17278 * remote-utils.c (putpkt): Flush after debug output and use
17279 stderr.
17280 Handle input interrupts while waiting for an ACK.
17281 (input_interrupt): Use signal_pid method.
17282 (getpkt): Flush after debug output and use stderr.
17283 (outreg): Use collect_register_as_string.
17284 (new_thread_notify, dead_thread_notify): New functions.
17285 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17286 and general_thread.
17287 (look_up_one_symbol): Flush after debug output.
17288 * server.c (step_thread, server_waiting): New variables.
17289 (start_inferior): Don't use signal_pid. Update call to mywait.
17290 (attach_inferior): Update call to mywait.
17291 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17292 (main): Don't fetch/store registers explicitly. Use
17293 set_desired_inferior. Support proposed ``Hs'' packet. Update
17294 calls to mywait.
17295 * server.h: Update.
17296 (struct inferior_list, struct_inferior_list_entry): New.
17297 * target.c (set_desired_inferior): New.
17298 (write_inferior_memory): Constify.
17299 (mywait): New function.
17300 * target.h: Update.
17301 (struct target_ops): New signal_pid method.
17302 (mywait): Removed macro, added prototype.
17303
17304 * linux-low.h (regset_func): Removed.
17305 (regset_fill_func, regset_store_func): New.
17306 (enum regset_type): New.
17307 (struct regset_info): Add type field. Use new operation types.
17308 (struct linux_target_ops): stop_pc renamed to get_pc.
17309 Add decr_pc_after_break and breakpoint_at.
17310 (get_process, get_thread_proess, get_process_thread)
17311 (strut process_info, all_processes, linux_attach_lwp)
17312 (thread_db_init): New.
17313
17314 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17315 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17316 (the_low_target): Add new members.
17317 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17318 (i386_store_fpxregset): Constify.
17319 (target_regsets): Add new kind identifier.
17320 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17321 (i386_set_pc): Add debugging.
17322 (i386_breakpoint_at): New function.
17323 (the_low_target): Add new members.
17324 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17325 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17326 (mips_breakpoint_at): New.
17327 (the_low_target): Add new members.
17328 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17329 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17330 (the_low_target): Add new members.
17331 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17332 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17333 (the_low_target): Add new members.
17334 * linux-x86-64-low.c (target_regsets): Add new kind
17335 identifier.
17336
17337 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17338
17339 From Martin Pool <mbp@samba.org>:
17340 * server.c (gdbserver_usage): New function.
17341 (main): Call it.
17342
17343 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17344
17345 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17346 stop_at -> stop_pc.
17347
17348 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17349
17350 * Makefile.in: Remove obsolete code.
17351
17352 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17353
17354 * linux-low.c (regsets_fetch_inferior_registers),
17355 (regsets_store_inferior_registers): Removed cast to int from
17356 ptrace() calls.
17357 * regcache.h: Added declaration of struct inferior_info.
17358
17359 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17360
17361 * inferiors.c (struct inferior_info): Add regcache_data.
17362 (add_inferior): Call create_register_cache.
17363 (clear_inferiors): Call free_register_cache.
17364 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17365 * regcache.c (struct inferior_regcache_data): New.
17366 (registers): Remove.
17367 (get_regcache): New function.
17368 (create_register_cache, free_register_cache): New functions.
17369 (set_register_cache): Don't initialize the register cache here.
17370 (registers_to_string, registers_from_string, register_data): Call
17371 get_regcache.
17372 * regcache.h: Add prototypes.
17373 * server.h: Likewise.
17374
17375 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17376
17377 * mem-break.c: New file.
17378 * mem-break.h: New file.
17379 * Makefile.in: Add mem-break.o rule; update server.h
17380 dependencies.
17381 * inferiors.c (struct inferior_info): Add target_data
17382 member.
17383 (clear_inferiors): Free target_data member if set.
17384 (inferior_target_data, set_inferior_target_data): New functions.
17385 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17386 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17387 * linux-low.c (linux_bp_reinsert): New variable.
17388 (struct inferior_linux_data): New.
17389 (linux_create_inferior): Use set_inferior_target_data.
17390 (linux_attach): Likewise. Call add_inferior.
17391 (linux_wait_for_one_inferior): New function.
17392 (linux_wait): Call it.
17393 (linux_write_memory): Add const.
17394 (initialize_low): Call set_breakpoint_data.
17395 * linux-low.h (struct linux_target_ops): Add breakpoint
17396 handling members.
17397 * server.c (attach_inferior): Remove extra add_inferior
17398 call.
17399 * server.h: Include mem-break.h. Update inferior.c
17400 prototypes.
17401 * target.c (read_inferior_memory)
17402 (write_inferior_memory): New functions.
17403 * target.h (read_inferior_memory)
17404 (write_inferior_memory): Change macros to prototypes.
17405 (struct target_ops): Update comments. Add const to write_memory
17406 definition.
17407
17408 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17409
17410 * linux-low.c (usr_store_inferior_registers): Support
17411 registers which are allowed to fail to store.
17412 * linux-low.h (linux_target_ops): Likewise.
17413 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17414 (ppc_cannot_store_register): FPSCR may not be storable.
17415
17416 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17417
17418 * server.h: Include <string.h> if HAVE_STRING_H.
17419 * ChangeLog: Correct paths in last ChangeLog entry.
17420
17421 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17422
17423 * linux-low.h: Remove obsolete prototypes.
17424 (struct linux_target_ops): New.
17425 (extern the_low_target): New.
17426 * linux-low.c (num_regs, regmap): Remove declarations.
17427 (register_addr): Use the_low_target explicitly.
17428 (fetch_register): Likewise.
17429 (usr_fetch_inferior_registers): Likewise.
17430 (usr_store_inferior_registers): Likewise.
17431 * linux-arm-low.c (num_regs): Remove.
17432 (arm_num_regs): Define.
17433 (arm_regmap): Renamed from regmap, made static.
17434 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17435 made static.
17436 (arm_cannot_store_register): Renamed from cannot_store_register,
17437 made static.
17438 (the_low_target): New.
17439 * linux-i386-low.c (num_regs): Remove.
17440 (i386_num_regs): Define.
17441 (i386_regmap): Renamed from regmap, made static.
17442 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17443 made static.
17444 (i386_cannot_store_register): Renamed from cannot_store_register,
17445 made static.
17446 (the_low_target): New.
17447 * linux-ia64-low.c (num_regs): Remove.
17448 (ia64_num_regs): Define.
17449 (ia64_regmap): Renamed from regmap, made static.
17450 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17451 made static.
17452 (ia64_cannot_store_register): Renamed from cannot_store_register,
17453 made static.
17454 (the_low_target): New.
17455 * linux-m68k-low.c (num_regs): Remove.
17456 (m68k_num_regs): Define.
17457 (m68k_regmap): Renamed from regmap, made static.
17458 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17459 made static.
17460 (m68k_cannot_store_register): Renamed from cannot_store_register,
17461 made static.
17462 (the_low_target): New.
17463 * linux-mips-low.c (num_regs): Remove.
17464 (mips_num_regs): Define.
17465 (mips_regmap): Renamed from regmap, made static.
17466 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17467 made static.
17468 (mips_cannot_store_register): Renamed from cannot_store_register,
17469 made static.
17470 (the_low_target): New.
17471 * linux-ppc-low.c (num_regs): Remove.
17472 (ppc_num_regs): Define.
17473 (ppc_regmap): Renamed from regmap, made static.
17474 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17475 made static.
17476 (ppc_cannot_store_register): Renamed from cannot_store_register,
17477 made static.
17478 (the_low_target): New.
17479 * linux-s390-low.c (num_regs): Remove.
17480 (s390_num_regs): Define.
17481 (s390_regmap): Renamed from regmap, made static.
17482 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17483 made static.
17484 (s390_cannot_store_register): Renamed from cannot_store_register,
17485 made static.
17486 (the_low_target): New.
17487 * linux-sh-low.c (num_regs): Remove.
17488 (sh_num_regs): Define.
17489 (sh_regmap): Renamed from regmap, made static.
17490 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17491 made static.
17492 (sh_cannot_store_register): Renamed from cannot_store_register,
17493 made static.
17494 (the_low_target): New.
17495 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17496 (the_low_target): New.
17497
17498 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17499
17500 * Makefile.in: Add stamp-h target.
17501 * configure.in: Create stamp-h.
17502 * configure: Regenerated.
17503
17504 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17505
17506 * inferiors.c: New file.
17507 * target.c: New file.
17508 * target.h: New file.
17509 * Makefile.in: Add target.o and inferiors.o. Update
17510 dependencies.
17511 * linux-low.c (inferior_pid): New static variable,
17512 moved from server.c.
17513 (linux_create_inferior): Renamed from create_inferior.
17514 Call add_inferior. Return 0 on success instead of a PID.
17515 (linux_attach): Renamed from myattach.
17516 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17517 (linux_thread_alive): Renamed from mythread_alive.
17518 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17519 child dies.
17520 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17521 (regsets_store_inferior_registers): Correct error message.
17522 Add missing ``return 0''.
17523 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17524 (linux_store_registers): Renamed from store_inferior_registers.
17525 (linux_read_memory): Renamed from read_inferior_memory.
17526 (linux_write_memory): Renamed from write_inferior_memory.
17527 (linux_target_ops): New structure.
17528 (initialize_low): Call set_target_ops ().
17529 * remote-utils.c (unhexify): New function.
17530 (hexify): New function.
17531 (input_interrupt): Send signals to ``signal_pid''.
17532 * server.c (inferior_pid): Remove.
17533 (start_inferior): Update create_inferior call.
17534 (attach_inferior): Call add_inferior.
17535 (handle_query): New function.
17536 (main): Call handle_query for `q' packets.
17537 * server.h: Include "target.h". Remove obsolete prototypes.
17538 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17539
17540 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17541
17542 * Makefile.in: Add WARN_CFLAGS. Update configury
17543 dependencies.
17544 * configure.in: Check for <string.h>
17545 * configure: Regenerate.
17546 * config.in: Regenerate.
17547 * gdbreplay.c: Include needed system headers.
17548 (remote_open): Remove strchr prototype.
17549 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17550 * regcache.c (supply_register): Change buf argument to const void *.
17551 (supply_register_by_name): Likewise.
17552 (collect_register): Change buf argument to void *.
17553 (collect_register_by_name): Likewise.
17554 * regcache.h: Add missing prototypes.
17555 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17556 * server.c (handle_query): New function.
17557 (attached): New static variable, moved out of main.
17558 (main): Quiet longjmp clobber warnings.
17559 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17560 * utils.c (error): Remove NORETURN.
17561 (fatal): Likewise.
This page took 0.369192 seconds and 5 git commands to generate.