Add load-link, store-conditional paired EVA instructions
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
... / ...
CommitLineData
12019-05-03 Eli Zaretskii <eliz@gnu.org>
2
3 * remote-utils.c:
4 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
5
62019-04-19 Tom Tromey <tom@tromey.com>
7
8 * server.c (struct vstop_notif): Derive from notif_event.
9 <base>: Remove.
10 (queue_stop_reply): Update.
11 (remove_all_on_match_ptid): Change type. Rewrite.
12 (discard_queued_stop_replies): Rewrite.
13 (in_queued_stop_replies_ptid): Change type.
14 (in_queued_stop_replies): Rewrite.
15 (notif_stop): Update.
16 (queue_stop_reply_callback): Update.
17 (captured_main): Don't call initialize_notif.
18 (push_stop_notification): Update.
19 * notif.c (notif_write_event, handle_notif_ack)
20 (notif_event_enque, notif_push): Update.
21 (notif_event_xfree, initialize_notif): Remove.
22 * notif.h (struct notif_event): Include <list>, not
23 "common/queue.h".
24 (struct notif_server) <queue>: Now a std::list.
25 (notif_event_p): Remove typedef.
26 (initialize_notif): Don't declare.
27 (struct notif_event): Add virtual destructor.
28
292019-04-17 Alan Hayward <alan.hayward@arm.com>
30
31 * ax.c (ax_vdebug): Call debug_printf.
32 * debug.c (debug_write): New function.
33 * debug.h (debug_write): New declaration.
34 * linux-low.c (sigchld_handler): Call debug_write.
35
362019-04-17 Alan Hayward <alan.hayward@arm.com>
37
38 * debug.c (debug_set_output): New function.
39 (debug_vprintf): Send output to debug_file.
40 (debug_flush): Likewise.
41 * debug.h (debug_set_output): New declaration.
42 * server.c (handle_monitor_command): Add debug-file option.
43 (captured_main): Likewise.
44
452019-04-17 Alan Hayward <alan.hayward@arm.com>
46
47 * debug.c (remote_debug): Add definition.
48 * debug.h (remote_debug): Add declaration.
49 * hostio.c (remote_debug): Remove declaration.
50 * remote-utils.c (struct ui_file): Likewise.
51 (remote_debug): Likewise.
52 * remote-utils.h (remote_debug): Likewise,
53 * server.c (remote_debug): Remove definition.
54
552019-04-10 Kevin Buettner <kevinb@redhat.com>
56
57 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
58 when using a 64-bit gdbserver.
59
602019-04-09 Tom Tromey <tromey@adacore.com>
61
62 * linux-low.c (select_event_lwp): Use find_thread_in_random.
63
642019-04-08 Tom Tromey <tom@tromey.com>
65
66 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
67 throw.
68 (linux_resume_one_lwp): Likewise.
69
702019-04-08 Tom Tromey <tom@tromey.com>
71
72 * gdbreplay.c: Update.
73 * linux-low.c: Update.
74 * server.c: Update.
75
762019-04-08 Tom Tromey <tom@tromey.com>
77
78 * server.c: Use C++ exception handling.
79 * linux-low.c: Use C++ exception handling.
80 * gdbreplay.c: Use C++ exception handling.
81
822019-04-08 Tom Tromey <tom@tromey.com>
83
84 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
85 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
86 (captured_main, main): Update.
87 * gdbreplay.c (main): Update.
88
892019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
90
91 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
92 value in argument pointer, return 1 if the entry is found and 0
93 otherwise. Move comment.
94 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
95 * linux-low.h (linux_get_auxv): Declare.
96 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
97
982019-04-05 Tom Tromey <tromey@adacore.com>
99
100 * server.c (gdbserver_usage): Use upper-case for metasyntactic
101 variables.
102
1032019-03-28 Alan Hayward <alan.hayward@arm.com>
104
105 * linux-low.c (AT_HWCAP2): Add define if not already included.
106
1072019-03-26 Alan Hayward <alan.hayward@arm.com>
108
109 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
110 (aarch64_arch_setup): Call linux_get_hwcap.
111 * linux-arm-low.c (arm_get_hwcap): Remove function.
112 (arm_read_description): Call linux_get_hwcap.
113 * linux-low.c (linux_get_auxv): New function.
114 (linux_get_hwcap): Likewise.
115 (linux_get_hwcap2): Likewise.
116 * linux-low.h (linux_get_hwcap): New declaration.
117 (linux_get_hwcap2): Likewise.
118 * linux-ppc-low.c (ppc_get_auxv): Remove function.
119 (ppc_arch_setup): Call linux_get_hwcap.
120 * linux-s390-low.c (s390_get_hwcap): Remove function.
121 (s390_arch_setup): Call linux_get_hwcap.
122
1232019-03-22 Alan Hayward <alan.hayward@arm.com>
124 Jiong Wang <jiong.wang@arm.com>
125
126 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
127 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
128 to fail.
129 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
130
1312019-03-22 Alan Hayward <alan.hayward@arm.com>
132 Jiong Wang <jiong.wang@arm.com>
133
134 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
135 (aarch64_get_hwcap): New function.
136 (aarch64_arch_setup): Read APIA hwcap.
137
1382019-03-22 Alan Hayward <alan.hayward@arm.com>
139 Jiong Wang <jiong.wang@arm.com>
140
141 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
142 (initialize_low_tracepoint): Likewise.
143 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
144 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
145 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
146 (aarch64_linux_read_description): Likewise.
147 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
148
1492019-03-12 John Baldwin <jhb@FreeBSD.org>
150
151 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
152 i386_create_target_description for 'segments' parameter.
153 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
154 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
155 * win32-i386-low.c (i386_arch_setup): Likewise.
156
1572019-03-12 Tom Tromey <tromey@adacore.com>
158
159 * linux-low.c (iterate_over_lwps): Update.
160
1612019-03-06 Tom Tromey <tom@tromey.com>
162
163 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
164 (captured_main): Use SCOPE_EXIT.
165
1662019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
167
168 * configure.srv: Use '$enable_unittest' instead of '$development'
169 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
170 case.
171
1722019-02-27 Tom Tromey <tromey@adacore.com>
173
174 * gdbreplay.c (logchar): Handle \r\n.
175
1762019-02-07 Alan Hayward <alan.hayward@arm.com>
177
178 * linux-low.c (linux_attach): Add process before lwp.
179 * server.c (attach_inferior): Check if already attached.
180
1812019-02-07 Tom Tromey <tom@tromey.com>
182
183 * x86-tdesc.h: Rename include guard.
184 * x86-low.h: Add include guard.
185 * wincecompat.h: Rename include guard.
186 * win32-low.h: Add include guard.
187 * utils.h: Rename include guard.
188 * tracepoint.h: Rename include guard.
189 * tdesc.h: Rename include guard.
190 * target.h: Rename include guard.
191 * server.h: Rename include guard.
192 * remote-utils.h: Rename include guard.
193 * regcache.h: Rename include guard.
194 * nto-low.h: Rename include guard.
195 * notif.h: Add include guard.
196 * mem-break.h: Rename include guard.
197 * lynx-low.h: Add include guard.
198 * linux-x86-tdesc.h: Add include guard.
199 * linux-s390-tdesc.h: Add include guard.
200 * linux-ppc-tdesc-init.h: Add include guard.
201 * linux-low.h: Add include guard.
202 * linux-aarch64-tdesc.h: Add include guard.
203 * linux-aarch32-low.h: Add include guard.
204 * inferiors.h: Rename include guard.
205 * i387-fp.h: Rename include guard.
206 * hostio.h: Rename include guard.
207 * gdbthread.h: Rename include guard.
208 * gdb_proc_service.h: Rename include guard.
209 * event-loop.h: Rename include guard.
210 * dll.h: Rename include guard.
211 * debug.h: Rename include guard.
212 * ax.h: Rename include guard.
213
2142018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
215
216 PR gdb/23985
217 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
218 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
219
2202019-01-25 Tom Tromey <tom@tromey.com>
221
222 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
223
2242019-01-25 Tom Tromey <tom@tromey.com>
225
226 * win32-low.c: Fix common/ includes.
227 * win32-i386-low.c: Fix common/ includes.
228 * tracepoint.c: Fix common/ includes.
229 * thread-db.c: Fix common/ includes.
230 * target.h: Fix common/ includes.
231 * symbol.c: Fix common/ includes.
232 * spu-low.c: Fix common/ includes.
233 * server.h: Fix common/ includes.
234 * server.c: Fix common/ includes.
235 * remote-utils.c: Fix common/ includes.
236 * regcache.h: Fix common/ includes.
237 * regcache.c: Fix common/ includes.
238 * nto-x86-low.c: Fix common/ includes.
239 * notif.h: Fix common/ includes.
240 * mem-break.h: Fix common/ includes.
241 * lynx-low.c: Fix common/ includes.
242 * lynx-i386-low.c: Fix common/ includes.
243 * linux-x86-tdesc-selftest.c: Fix common/ includes.
244 * linux-x86-low.c: Fix common/ includes.
245 * linux-low.c: Fix common/ includes.
246 * inferiors.h: Fix common/ includes.
247 * i387-fp.c: Fix common/ includes.
248 * hostio.c: Fix common/ includes.
249 * hostio-errno.c: Fix common/ includes.
250 * gdbthread.h: Fix common/ includes.
251 * gdbreplay.c: Fix common/ includes.
252 * fork-child.c: Fix common/ includes.
253 * event-loop.c: Fix common/ includes.
254 * ax.c:
255 (enum gdb_agent_op): Fix common/ includes.
256
2572019-01-21 Tom Tromey <tom@tromey.com>
258
259 * tracepoint.c: Fix includes.
260 * remote-utils.c: Fix includes.
261 * linux-x86-low.c: Fix includes.
262
2632019-01-01 Joel Brobecker <brobecker@adacore.com>
264
265 * gdbreplay.c (gdbreplay_version): Update copyright year in
266 version message.
267 * server.c (gdbserver_version): Likewise.
268
2692018-12-05 Alan Hayward <alan.hayward@arm.com>
270
271 * linux-low.c (add_lwp): Switch ordering.
272
2732018-11-29 Tom Tromey <tom@tromey.com>
274
275 * win32-low.c (win32_join): Take pid, not process.
276 * target.h (struct target_ops) <join>: Change argument type.
277 (join_inferior): Change argument name.
278 * spu-low.c (spu_join): Take pid, not process.
279 * server.c (handle_detach): Preserve pid before destroying
280 process.
281 * lynx-low.c (lynx_join): Take pid, not process.
282 * linux-low.c (linux_join): Take pid, not process.
283
2842018-11-23 Alan Hayward <alan.hayward@arm.com>
285
286 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
287 (aarch64_cannot_fetch_register): Likewise.
288 (struct linux_target_ops): Update references.
289
2902018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
291
292 * linux-ppc-low.c: Include nat/linux-ptrace.h.
293
2942018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
295
296 * configure.srv (ipa_ppc_linux_regobj): Add
297 powerpc-isa207-htm-vsx32l-ipa.o and
298 powerpc-isa207-htm-vsx64l-ipa.o.
299 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
300 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
301 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
302 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
303 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
304 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
305 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
306 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
307 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
308 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
309 (init_registers_powerpc_isa207_htm_vsx32l)
310 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
311 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
312 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
313 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
314 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
315 (ppc_store_tm_ctarregset): New functions.
316 (ppc_regsets): Add entries for HTM regsets.
317 (ppc_arch_setup): Set htm in features struct when needed. Set
318 sizes for the HTM regsets.
319 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
320 (initialize_low_arch): Call
321 init_registers_powerpc_isa207_htm_vsx32l and
322 init_registers_powerpc_isa207_htm_vsx64l.
323 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
324 PPC_TDESC_ISA207_HTM_VSX.
325 (initialize_low_tracepoint): Call
326 init_registers_powerpc_isa207_htm_vsx32l and
327 init_registers_powerpc_isa207_htm_vsx64l.
328
3292018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
330
331 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
332 rs6000/power-linux-pmu.xml to srv_xmlfiles.
333 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
334 (ppc_store_pmuregset): New functions.
335 (ppc_regsets): Add entries for ebb and pmu regsets.
336 (ppc_arch_setup): Set isa207 in features struct if the ebb and
337 pmu regsets are available. Set sizes for these regsets.
338
3392018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
340
341 * configure.srv (ipa_ppc_linux_regobj): Add
342 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
343 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
344 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
345 rs6000/powerpc-isa207-vsx32l.xml, and
346 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
347 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
348 <PPC_TDESC_ISA207_VSX>: New enum value.
349 (init_registers_powerpc_isa207_vsx32l): Declare.
350 (init_registers_powerpc_isa207_vsx64l): Declare.
351 * linux-ppc-low.c (ppc_fill_tarregset): New function.
352 (ppc_store_tarregset): New function.
353 (ppc_regsets): Add entry for the TAR regset.
354 (ppc_arch_setup): Set isa207 in features struct when needed. Set
355 size for the TAR regsets.
356 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
357 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
358 and init_registers_powerpc_isa207_vsx64l.
359 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
360 (initialize_low_tracepoint): Call
361 init_registers_powerpc_isa207_vsx32l and
362 init_registers_powerpc_isa207_vsx64l.
363
3642018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
365 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
366
367 * configure.srv (ipa_ppc_linux_regobj): Add
368 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
369 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
370 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
371 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
372 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
373 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
374 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
375 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
376 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
377 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
378 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
379 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
380 (ppc_hwcap): Add comment.
381 (ppc_hwcap2): New global.
382 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
383 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
384 (ppc_regsets): Add entries for the DSCR and PPR regsets.
385 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
386 when needed. Set sizes for the the DSCR and PPR regsets.
387 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
388 (initialize_low_arch): Call
389 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
390 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
391 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
392 PPC_TDESC_ISA205_PPR_DSCR_VSX.
393 (initialize_low_tracepoint): Call
394 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
395 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
396
3972018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
398
399 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
400
4012018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
402 Simon Marchi <simark@simark.ca>
403
404 * acinclude.m4: Include "../selftest.m4".
405 * configure: Regenerate.
406 * configure.ac: Use "GDB_AC_SELFTEST".
407 * configure.srv: Use "$enable_unittests" instead of
408 "$development" when checking whether unit tests have been
409 enabled.
410 * server.c (captured_main): Update message informing that
411 selftests have been disabled.
412
4132018-10-04 Tom Tromey <tom@tromey.com>
414
415 * configure: Rebuild.
416
4172018-10-04 Tom Tromey <tom@tromey.com>
418
419 * server.c (handle_status): Rename inner "thread".
420 (process_serial_event): Declare "res" in 'm' case.
421 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
422 (iterate_over_lwps): Rename inner "thread".
423 (linux_qxfer_libraries_svr4): Rename inner "len".
424 * gdbthread.h (find_thread_in_random): Rename inner "thread".
425
4262018-10-01 Gary Benson <gbenson@redhat.com>
427
428 * gdb_proc_service.h: Moved common code to
429 common/gdb_proc_service.h.
430
4312018-10-01 Gary Benson <gbenson@redhat.com>
432
433 * gdb_proc_service.h: Synchronize comments and whitespace with
434 GDB's version of this file.
435
4362018-09-25 Tom Tromey <tom@tromey.com>
437
438 * configure: Rebuild.
439 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
440
4412018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
442
443 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
444 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
445 ($(IPA_LIB)): Sort IPA_OBJS.
446
4472018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
448
449 * Makefile.in: Remove references to $(ADD_DEPS).
450
4512018-09-16 Tom Tromey <tom@tromey.com>
452
453 * remote-utils.c (remote_open): Use GNU style for metasyntactic
454 variables.
455 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
456 variables.
457
4582018-09-05 Tom Tromey <tom@tromey.com>
459
460 * configure: Rebuild.
461
4622018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
463
464 PR build/23399
465 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
466
4672018-08-27 Tom Tromey <tom@tromey.com>
468
469 PR build/23087:
470 * configure: Rebuild.
471
4722018-08-27 Tom Tromey <tom@tromey.com>
473
474 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
475 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
476 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
477 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
478 (s390x_emit_stack_adjust): Add casts to unsigned char.
479
4802018-08-22 Simon Marchi <simon.marchi@ericsson.com>
481
482 PR gdb/23374
483 PR gdb/23375
484 * server.h (struct client_state) <disable_randomization>:
485 Initialize to 1.
486
4872018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
488
489 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
490 variable.
491 (mips_supply_ptrace_register): Likewise.
492
4932018-07-22 Tom Tromey <tom@tromey.com>
494
495 * configure: Rebuild.
496
4972018-07-22 Tom Tromey <tom@tromey.com>
498
499 * win32-low.c (win32_create_inferior): Remove unused variables.
500 * gdbreplay.c (remote_open): Remove unused variable.
501 * remote-utils.c (remote_prepare): Remove unused variable.
502 * x86-tdesc.h (X86_TDESC_H): Define.
503 (amd64_expedite_regs): Define conditionally.
504 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
505 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
506 * remote-utils.c (readchar): Remove unused variable.
507
5082018-07-13 Pedro Alves <palves@redhat.com>
509
510 * linux-low.c (linux_kill): Change parameter to process_info
511 pointer instead of pid. Adjust.
512 * lynx-low.c (lynx_kill): Likewise.
513 * nto-low.c (nto_kill): Likewise.
514 * spu-low.c (spu_kill): Likewise.
515 * win32-low.c (win32_kill): Likewise.
516 * server.c (handle_v_kill, kill_inferior_callback)
517 (detach_or_kill_for_exit): Adjust.
518 * target.c (kill_inferior): Change parameter to process_info
519 pointer instead of pid. Adjust.
520 * target.h (struct target_ops) <kill>: Change parameter to
521 process_info pointer instead of pid. Adjust all implementations
522 and callers.
523 (kill_inferior): Likewise.
524
5252018-07-13 Pedro Alves <palves@redhat.com>
526
527 * linux-low.c (linux_detach, linux_join): Change parameter to
528 process_info pointer instead of pid. Adjust.
529 * lynx-low.c (lynx_detach, lynx_join): Likewise.
530 * nto-low.c (nto_detach): Likewise.
531 * spu-low.c (spu_detach, spu_join): Likewise.
532 * win32-low.c (win32_detach, win32_join): Likewise.
533 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
534 * target.h (struct target_ops) <detach, join>: Change parameter to
535 process_info pointer instead of pid. Adjust all implementations
536 and callers.
537 (detach_inferior, join_inferior): Rename 'pid' parameter to
538 'proc'.
539
5402018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
541 Jan Kratochvil <jan.kratochvil@redhat.com>
542 Paul Fertser <fercerpav@gmail.com>
543 Tsutomu Seki <sekiriki@gmail.com>
544
545 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
546 (OBS): Add 'common/netstuff.o'.
547 (GDBREPLAY_OBS): Likewise.
548 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
549 (remote_open): Implement support for IPv6
550 connections.
551 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
552 and 'wspiapi.h'.
553 (handle_accept_event): Accept connections from IPv6 sources.
554 (remote_prepare): Handle IPv6-style hostnames; implement
555 support for IPv6 connections.
556 (remote_open): Implement support for printing connections from
557 IPv6 sources.
558
5592018-07-11 Pedro Alves <palves@redhat.com>
560
561 PR gdb/23377
562 * mem-break.c (any_persistent_commands): Add process_info
563 parameter and use it instead of relying on the current process.
564 Change return type to bool.
565 * mem-break.h (any_persistent_commands): Add process_info
566 parameter and change return type to bool.
567 * server.c (handle_detach): Remove require_running_or_return call.
568 Look up the process_info for the process we're about to detach.
569 If not found, return back error to GDB. Adjust
570 any_persistent_commands call to pass down a process pointer.
571
5722018-07-11 Pedro Alves <palves@redhat.com>
573
574 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
575 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
576 instead of collect_register_by_name.
577 * regcache.c (regcache_raw_get_unsigned_by_name): New.
578 * regcache.h (regcache_raw_get_unsigned_by_name): New.
579
5802018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
581 Pedro Alves <palves@redhat.com>
582
583 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
584
5852018-07-03 Tom Tromey <tom@tromey.com>
586
587 * linux-low.c: Update.
588 * lynx-low.c: Update.
589 * mem-break.c: Update.
590 * nto-low.c: Update.
591 * remote-utils.c: Update.
592 * server.c: Update.
593 * spu-low.c: Update.
594 * target.c: Update.
595 * win32-low.c: Update.
596
5972018-07-03 Tom Tromey <tom@tromey.com>
598
599 * server.c: Update.
600
6012018-07-03 Tom Tromey <tom@tromey.com>
602
603 * linux-low.c: Update.
604
6052018-07-03 Tom Tromey <tom@tromey.com>
606
607 * target.c: Update.
608
6092018-07-03 Tom Tromey <tom@tromey.com>
610
611 * linux-low.c: Update.
612 * linux-mips-low.c: Update.
613 * lynx-low.c: Update.
614 * nto-low.c: Update.
615 * remote-utils.c: Update.
616 * server.c: Update.
617 * spu-low.c: Update.
618 * target.c: Update.
619 * thread-db.c: Update.
620
6212018-07-03 Tom Tromey <tom@tromey.com>
622
623 * linux-low.c: Update.
624 * linux-mips-low.c: Update.
625 * lynx-low.c: Update.
626 * mem-break.c: Update.
627 * nto-low.c: Update.
628 * remote-utils.c: Update.
629 * server.c: Update.
630 * spu-low.c: Update.
631 * target.c: Update.
632 * tracepoint.c: Update.
633
6342018-07-03 Tom Tromey <tom@tromey.com>
635
636 * linux-low.c: Update.
637 * linux-ppc-low.c: Update.
638 * linux-x86-low.c: Update.
639 * proc-service.c: Update.
640 * server.c: Update.
641 * spu-low.c: Update.
642 * thread-db.c: Update.
643 * win32-low.c: Update.
644
6452018-07-03 Tom Tromey <tom@tromey.com>
646
647 * linux-low.c: Update.
648 * lynx-low.c: Update.
649 * nto-low.c: Update.
650 * remote-utils.c: Update.
651 * spu-low.c: Update.
652 * thread-db.c: Update.
653 * win32-low.c: Update.
654
6552018-06-29 Joel Brobecker <brobecker@adacore.com>
656
657 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
658 parameter in call to 'amd64_create_target_description'.
659
6602018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
661
662 * x86-tdesc.h: Remove executable permission flag.
663
6642018-06-19 Simon Marchi <simon.marchi@ericsson.com>
665
666 * configure.ac: Remove AC_PREREQ, add missing quoting.
667 * configure: Re-generate.
668 * config.in: Re-generate.
669 * aclocal.m4: Re-generate.
670
6712018-06-18 Simon Marchi <simon.marchi@ericsson.com>
672
673 * tracepoint.h (current_traceframe): Remove declaration.
674
6752018-06-18 Alan Hayward <alan.hayward@arm.com>
676
677 * linux-aarch64-low.c (is_sve_tdesc): New function.
678 (aarch64_sve_regs_copy_to_regcache): Likewise.
679 (aarch64_sve_regs_copy_from_regcache): Likewise.
680 (aarch64_regs_info): Add SVE checks.
681 (initialize_low_arch): Initialize SVE.
682
6832018-06-18 Alan Hayward <alan.hayward@arm.com>
684
685 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
686
6872018-06-11 Alan Hayward <alan.hayward@arm.com>
688
689 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
690 (initialize_low_tracepoint): Likewise
691 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
692 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
693 param.
694 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
695 checks.
696 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
697
6982018-06-11 Alan Hayward <alan.hayward@arm.com>
699
700 * server.h (PBUFSIZ): Increase size
701
7022018-06-11 Alan Hayward <alan.hayward@arm.com>
703
704 * regcache.c (regcache::raw_compare): New function.
705 * regcache.h (regcache::raw_compare): New declaration.
706
7072018-06-11 Alan Hayward <alan.hayward@arm.com>
708
709 * regcache.c (new_register_cache): Use new.
710 (free_register_cache): Use delete.
711 (register_data): Use const.
712 (supply_register): Move body inside regcache.
713 (regcache::raw_supply): New override function.
714 (collect_register): Move body inside regcache.
715 (regcache::raw_collect): New override function.
716 (regcache::get_register_status): New override function.
717 * regcache.h (struct regcache): Inherit from reg_buffer_common.
718
7192018-06-09 Tom Tromey <tom@tromey.com>
720
721 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
722 declare queue.
723 (event_queue): Use std::queue.
724 (gdb_event_xfree): Remove.
725 (initialize_event_loop, process_event, wait_for_event): Update.
726
7272018-06-08 Stan Cox <scox@redhat.com>
728
729 * win32-low.c (win32_create_inferior): last_ptid and last_status
730 moved to client_state.
731
7322018-06-08 Pedro Alves <palves@redhat.com>
733
734 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
735 common/common-exceptions.o, common/common-utils.o,
736 common/errors.o, common/print-utils.o and utils.o.
737 * gdbreplay.c: Include "common-defs.h" instead of the two
738 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
739 string.h or alloca.h.
740 (perror_with_name): Delete.
741 (remote_open): Use xstrdup instead of strdup.
742 (main): Rename to ...
743 (captured_main): ... this.
744 (main): New.
745
7462018-06-08 Tom Tromey <tom@tromey.com>
747
748 * linux-low.c (linux_low_read_btrace): Update.
749
7502018-06-04 Stan Cox <scox@redhat.com>
751
752 * server.h (struct client_state): New.
753 * server.c (cont_thread, general_thread, multi_process)
754 (report_fork_events, report_vfork_events, report_exec_events)
755 (report_thread_events, swbreak_feature, hwbreak_feature)
756 (vCont_supported, disable_randomization, pass_signals)
757 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
758 Moved to client_state.
759 * remote-utils.c (remote_debug, noack_mode)
760 (transport_is_reliable): Moved to client_state.
761 * tracepoint.c (current_traceframe): Moved to client_state.
762
763 Update all callers.
764 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
765 linux-low.c, remote-utils.h, target.c: Use client_state.
766
7672018-05-31 Alan Hayward <alan.hayward@arm.com>
768
769 * configure.srv: Add new c/h file.
770
7712018-05-31 Alan Hayward <alan.hayward@arm.com>
772
773 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
774 null VQ.
775
7762018-05-25 Maciej W. Rozycki <macro@mips.com>
777
778 * gdb.arch/mips-fpregset-core.exp: New test.
779 * gdb.arch/mips-fpregset-core.c: New test source.
780
7812018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
782
783 PR server/23198
784 * hostio.c (require_int): Do not report overflow for integers
785 between 0xfffffff and 0x7fffffff.
786
7872018-05-22 Maciej W. Rozycki <macro@mips.com>
788
789 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
790 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
791 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
792 functions.
793 (the_low_target): Wire them.
794
7952018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
796
797 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
798 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
799 mode. Call collect_register_by_name with vscr using
800 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
801 (ppc_store_vrregset): Add and set vscr_offset variable as in
802 ppc_fill_vrregset. Call supply_register_by_name with vscr using
803 vscr_offset.
804
8052018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
806
807 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
808 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
809 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
810
8112018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
812
813 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
814 (ppc_store_vsxregset): Likewise.
815 (ppc_fill_vrregset): Likewise.
816 (ppc_store_vrregset): Likewise.
817 (ppc_fill_evrregset): Likewise.
818 (ppc_store_evrregset): Likewise.
819 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
820 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
821 needed.
822
8232018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
824
825 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
826 wordsize of the inferior. Call ppc_linux_target_wordsize.
827
8282018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
829
830 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
831 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
832 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
833 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
834 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
835 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
836 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
837 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
838 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
839 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
840 (tdesc_powerpc_e500l): Remove.
841 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
842 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
843 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
844 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
845 linux-ppc-tdesc.h.
846 (ppc_arch_setup): Remove target description matching code. Fill a
847 ppc_linux_features struct and call ppc_linux_match_description
848 with it.
849
8502018-05-22 Maciej W. Rozycki <macro@mips.com>
851
852 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
853 width of the requested register exceeds the width of the
854 `ptrace' data type.
855 (mips_cannot_store_register): Likewise.
856
8572018-05-21 Maciej W. Rozycki <macro@mips.com>
858
859 * linux-mips-low.c (mips_fetch_register): New function. Update
860 preceding comment.
861 (mips_store_gregset): Supply 0 rather than $restart for $zero.
862 (the_low_target): Wire `mips_fetch_register'.
863
8642018-05-10 Joel Brobecker <brobecker@adacore.com>
865
866 * lynx-i386-low.c (LYNXOS_178): New macro.
867 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
868 the layout on LynxOS-178.
869 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
870 handle floating point registers that are not supported by
871 LynxOS-178.
872
8732018-05-10 Tom Tromey <tom@tromey.com>
874
875 * configure: Rebuild.
876
8772018-05-10 Joel Brobecker <brobecker@adacore.com>
878
879 PR server/23158:
880 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
881 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
882 Use it to set the expedite_regs field in the given tdesc.
883 * x86-tdesc.h: New file.
884 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
885 Adjust following the addition of the new expedite_regs parameter
886 to init_target_desc.
887 * linux-tic6x-low.c (tic6x_read_description): Likewise.
888 * linux-x86-tdesc.c: #include "x86-tdesc.h".
889 (i386_linux_read_description, amd64_linux_read_description):
890 Adjust following the addition of the new expedite_regs parameter
891 to init_target_desc.
892 * lynx-i386-low.c: #include "x86-tdesc.h".
893 (lynx_i386_arch_setup): Adjust following the addition of the new
894 expedite_regs parameter to init_target_desc.
895 * nto-x86-low.c: #include "x86-tdesc.h".
896 (nto_x86_arch_setup): Adjust following the addition of the new
897 expedite_regs parameter to init_target_desc.
898 * win32-i386-low.c: #include "x86-tdesc.h".
899 (i386_arch_setup): Adjust following the addition of the new
900 expedite_regs parameter to init_target_desc.
901
9022018-05-10 Joel Brobecker <brobecker@adacore.com>
903
904 PR server/23158:
905 * win32-low.c (win32_create_inferior): Add call to my_wait
906 setting last_status global.
907
9082018-05-10 Joel Brobecker <brobecker@adacore.com>
909
910 PR server/23158:
911 * win32-low.c (create_process): Only call gdb_tilde_expand if
912 inferior_cwd is not NULL.
913
9142018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
915
916 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
917 registers to the cache if their values have changed.
918 (i387_xsave_to_cache): Provide default values for x87 control
919 registers when these features are available, but disabled.
920 * regcache.c (supply_register_by_name_zeroed): New function.
921 * regcache.h (supply_register_by_name_zeroed): Declare new
922 function.
923
9242018-05-07 Tom Tromey <tom@tromey.com>
925
926 * configure: Rebuild.
927
9282018-05-04 Tom Tromey <tom@tromey.com>
929
930 * configure: Rebuild.
931
9322018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
933 Pedro Alves <palves@redhat.com>
934
935 * linux-aarch64-low.c (aarch64_stopped_data_address):
936 Likewise.
937
9382018-04-27 Tom Tromey <tom@tromey.com>
939
940 * configure: Rebuild.
941
9422018-04-23 Tom Tromey <tom@tromey.com>
943
944 * configure: Rebuild.
945
9462018-04-19 Simon Marchi <simon.marchi@ericsson.com>
947
948 * Makefile.in (depcomp): Add "..".
949 (all_deps_files): New and use it.
950
9512018-04-18 Alan Hayward <alan.hayward@arm.com>
952
953 * configure.srv (aarch64*-*-linux*): Don't include xml.
954 (i[34567]86-*-cygwin*): Likewise.
955 (i[34567]86-*-linux*): Likewise.
956 (i[34567]86-*-lynxos*): Likewise.
957 (i[34567]86-*-mingw32ce*): Likewise.
958 (i[34567]86-*-mingw*): Likewise.
959 (i[34567]86-*-nto*): Likewise.
960 (tic6x-*-uclinux): Likewise.
961 (x86_64-*-linux*): Likewise.
962 (x86_64-*-mingw*): Likewise.
963 (x86_64-*-cygwin*): Likewise.
964
9652018-04-18 Alan Hayward <alan.hayward@arm.com>
966
967 * tdesc.c: Remove xml parameter.
968
9692018-04-18 Alan Hayward <alan.hayward@arm.com>
970
971 * server.c (get_features_xml): Remove cast.
972 * tdesc.c (void target_desc::accept): Fill in function.
973 (tdesc_get_features_xml): Remove old xml creation.
974 (print_xml_feature::visit_pre): Add xml vistor.
975 * tdesc.h (struct target_desc): Make xmltarget mutable.
976 (tdesc_get_features_xml): Remove declaration.
977
9782018-04-18 Alan Hayward <alan.hayward@arm.com>
979
980 * tdesc.c (tdesc_architecture_name): Add new function.
981 (tdesc_osabi_name): Likewise.
982 (tdesc_get_features_xml): Use new functions.
983
9842018-04-18 Alan Hayward <alan.hayward@arm.com>
985
986 * tdesc.c (tdesc_create_flags): Remove.
987 (tdesc_add_flag): Likewise.
988 (tdesc_named_type): Likewise.
989 (tdesc_create_union): Likewise.
990 (tdesc_create_struct): Likewise.
991 (tdesc_create_vector): Likewise.
992 (tdesc_add_bitfield): Likewise.
993 (tdesc_add_field): Likewise.
994 (tdesc_set_struct_size): Likewise.
995
9962018-04-18 Alan Hayward <alan.hayward@arm.com>
997
998 * tdesc.c (~target_desc): Remove implictly deleted items.
999 (init_target_desc): Iterate all features.
1000 (tdesc_get_features_xml): Use vector.
1001 (tdesc_create_feature): Create feature.
1002 * tdesc.h (tdesc_feature) Remove
1003 (target_desc): Add features.
1004
10052018-04-18 Alan Hayward <alan.hayward@arm.com>
1006
1007 * Makefile.in: Add common/tdesc.c
1008 * tdesc.c (init_target_desc): init all reg_defs from register
1009 vector.
1010 (tdesc_create_reg): Create tdesc_reg.
1011 * tdesc.h (tdesc_feature): Add register vector.
1012
10132018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1014
1015 * tdesc.h (struct target_desc) <features>: Change type to
1016 std::vector<std::string>.
1017 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1018 changes.
1019 (tdesc_get_features_xml): Likewise.
1020 (tdesc_create_feature): Likewise.
1021
10222018-03-26 Alan Hayward <alan.hayward@arm.com>
1023
1024 * regcache.c (find_register_by_number): Return a ref.
1025 (find_regno): Use references.
1026 (register_size): Likewise.
1027 (register_data): Likewise.
1028 * tdesc.c (target_desc::~target_desc): Remove free calls.
1029 (target_desc::operator==): Use std::vector compare.
1030 (init_target_desc): Use reference.
1031 (tdesc_create_reg): Use reg constructors.
1032 * tdesc.h (struct target_desc): Replace pointer with object.
1033
10342018-03-23 Alan Hayward <alan.hayward@arm.com>
1035
1036 * regcache.c (find_register_by_number): Make static.
1037 (find_regno): Use find_register_by_number
1038 * regcache.h (struct reg): Remove declaration.
1039
10402018-03-23 Alan Hayward <alan.hayward@arm.com>
1041
1042 * tdesc.c (target_desc::~target_desc): Move to here.
1043 (target_desc::operator==): Likewise.
1044 * tdesc.h (target_desc::~target_desc): Move from here.
1045 (target_desc::operator==): Likewise.
1046
10472018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1048
1049 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1050
10512018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1052
1053 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1054 S390_TDESC_GS.
1055 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1056 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1057 and init_registers_s390_gs_linux64.
1058
10592018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1060
1061 * linux-s390-low.c (s390_fill_gs): Remove function.
1062 (s390_fill_gsbc): Remove function.
1063 (s390_regsets): Set fill functions for the guarded storage regsets
1064 to NULL.
1065
10662018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1067
1068 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1069 the word size. Add comment.
1070 (s390_get_wordsize): New function.
1071 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1072 pswm with it. Instead, use s390_get_wordsize to determine the
1073 word size first and derive the correct tdesc from that directly.
1074
10752018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1076
1077 * Makefile.in: Include silent-rules.mk.
1078 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1079 (COMPILE): Add ECHO_CXX.
1080 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1081 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1082 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1083 (version-generated.c): Add ECHO_GEN.
1084 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1085 (IPAGENT_COMPILE): Add ECHO_CXX.
1086 (%-generated.c): Add ECHO_REGDAT.
1087
10882018-03-14 Tom Tromey <tom@tromey.com>
1089
1090 PR cli/14977:
1091 * ax.c (ax_printf): Special case for NULL.
1092
10932018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1094
1095 * linux-low.c (linux_qxfer_libraries_svr4): Use
1096 xml_escape_text_append.
1097
10982018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1099
1100 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1101
11022018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1103
1104 * server.c (handle_general_set): Remove unnecessary xstrdup.
1105
11062018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1107
1108 * server.c (parse_debug_format_options): Adjust to
1109 delim_string_to_char_ptr_vec changes.
1110 * thread-db.c (thread_db_load_search): Adjust to
1111 dirnames_to_char_ptr_vec changes.
1112
11132018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1114
1115 * target.h (target_enable_btrace, target_disable_btrace)
1116 (target_read_btrace, target_read_btrace_conf): Turn macro into
1117 inline function. Throw error if target method is not defined.
1118 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1119 check for btrace target method. Be prepared to handle exceptions
1120 from btrace target methods.
1121
11222018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1123
1124 * server.c (captured_main): Change order of error message printed
1125 when the current working directory cannot be found.
1126
11272018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1128
1129 * server.c: Include "filenames.h" and "pathstuff.h".
1130 (program_name): Delete variable.
1131 (program_path): New anonymous class.
1132 (get_exec_wrapper): Use "program_path" instead of
1133 "program_name".
1134 (handle_v_run): Likewise.
1135 (captured_main): Likewise.
1136 (process_serial_event): Likewise.
1137
11382018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1139
1140 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1141 (OBJS): Add "pathstuff.o".
1142 * server.c (current_directory): New global variable.
1143 (captured_main): Initialize "current_directory".
1144
11452018-02-26 Alan Hayward <alan.hayward@arm.com>
1146
1147 * tdesc.c: Use common/tdesc.h.
1148 * tdesc.h: Likewise.
1149
11502018-02-20 Alan Hayward <alan.hayward@arm.com>
1151 Simon Marchi <simon.marchi@ericsson.com>
1152
1153 * Makefile.in: Switch order of make rules.
1154
11552018-02-19 Alan Hayward <alan.hayward@arm.com>
1156
1157 * Makefile.in: Add common directory in build.
1158 * configure.ac: Add common reference.
1159 * configure: Regenerate.
1160
11612018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1162
1163 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1164 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1165 * spu-low.c (spu_target_ops): Likewise.
1166 * win32-low.c (win32_target_ops): Likewise.
1167 * server.c (supported_btrace_packets): Report packets unconditionally.
1168 * target.h (target_ops) <supports_btrace>: Remove.
1169 (target_supports_btrace): Remove.
1170
11712018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1172
1173 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1174 (handle_btrace_disable): Change return type to void. Use exceptions
1175 to report errors.
1176 (handle_btrace_general_set): Catch exception and copy message to
1177 return message.
1178
11792018-02-08 Tom Tromey <tom@tromey.com>
1180
1181 * linux-low.c (install_software_single_step_breakpoints): Use
1182 make_scoped_restore.
1183 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1184 (do_restore_current_thread_cleanup): Remove.
1185 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1186 declare.
1187
11882018-02-08 Tom Tromey <tom@tromey.com>
1189
1190 * mem-break.c (set_raw_breakpoint_at): Use
1191 gdb::unique_xmalloc_ptr.
1192
11932018-01-30 Pedro Alves <palves@redhat.com>
1194
1195 PR gdb/13211
1196 * target.c (target_terminal::terminal_state): Rename to ...
1197 (target_terminal::m_terminal_state): ... this.
1198
11992018-01-19 James Clarke <jrtc27@jrtc27.com>
1200
1201 * linux-low.c (handle_extended_wait): Surround call to
1202 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1203
12042018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1205
1206 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1207 linux_ptrace_attach_fail_reason_string now returning an
1208 std::string.
1209 (linux_attach): Likewise.
1210 * thread-db.c (attach_thread): Likewise.
1211
12122018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1213
1214 PR gdb/21559
1215 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1216 checking for fs_base/gs_base fields in struct user_regs_struct.
1217 * configure: Regenerate.
1218
12192018-01-16 Yao Qi <yao.qi@linaro.org>
1220
1221 PR gdb/18749
1222 * linux-low.c (fetch_register): Call supply_register instead of
1223 error.
1224
12252018-01-08 Yao Qi <yao.qi@linaro.org>
1226 Simon Marchi <simon.marchi@ericsson.com>
1227
1228 * Makefile.in (OBS): Remove selftest.o.
1229 * configure.ac: Set srv_selftest_objs if $development is true.
1230 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1231 * configure: Re-generated.
1232 * server.c (captured_main): Wrap variable selftest_filter with
1233 GDB_SELF_TEST.
1234
12352018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1236
1237 * server.c (parse_debug_format_options): Return std::string.
1238 (handle_monitor_command, captured_main): Adjust.
1239
12402018-01-05 Pedro Alves <palves@redhat.com>
1241
1242 PR gdb/18653
1243 * server.c (captured_main): Pass quiet=false to
1244 save_original_signals_state.
1245
12462018-01-01 Joel Brobecker <brobecker@adacore.com>
1247
1248 * gdbreplay.c (gdbreplay_version): Update copyright year in
1249 version message.
1250 * server.c (gdbserver_version): Likewise.
1251
12522017-12-08 Tom Tromey <tom@tromey.com>
1253
1254 * ax.c (ax_printf): Update.
1255
12562017-12-07 Yao Qi <yao.qi@linaro.org>
1257
1258 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1259 aarch64_linux_read_description.
1260 * linux-amd64-ipa.c (idx2mask): New array.
1261 (get_ipa_tdesc): Move idx2mask out.
1262 (initialize_low_tracepoint): Initialize target descriptions.
1263 * linux-i386-ipa.c (idx2mask): New array.
1264 (get_ipa_tdesc): Move idx2mask out.
1265 (initialize_low_tracepoint): Initialize target descriptions.
1266
12672017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1268
1269 * tdesc.c (struct tdesc_type): Change return type.
1270 (tdesc_add_flag): Change parameter type.
1271 (tdesc_add_bitfield): Likewise.
1272 (tdesc_add_field): Likewise.
1273 (tdesc_set_struct_size): Likewise.
1274
12752017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1276
1277 * regcache.c (registers_to_string): Remove unused variable.
1278
12792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1280
1281 * inferiors.c (for_each_inferior_with_data): Remove.
1282 * inferiors.h (for_each_inferior_with_data): Remove.
1283 * server.c (handle_qxfer_threads_worker): Change parameter type.
1284 (handle_qxfer_threads_proper): Use for_each_thread.
1285
12862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1287
1288 * inferiors.c (for_each_inferior): Remove.
1289 (clear_inferiors): Use for_each_thread.
1290 * inferiors.h (for_each_inferior): Remove.
1291 * linux-low.c (linux_wait_for_event_filtered): Use
1292 for_each_thread.
1293 (linux_stabilize_threads): Likewise.
1294 * regcache.c (regcache_release): Likewise.
1295 * server.c (gdb_wants_all_threads_stopped): Likewise.
1296 (clear_pending_status_callback): Remove.
1297 (handle_status): Use for_each_thread.
1298 (captured_main): Likewise.
1299 * win32-low.c (child_init_thread_list): Likewise.
1300 (win32_clear_inferiors): Likewise.
1301 (fake_breakpoint_event): Likewise.
1302
13032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1304
1305 * inferiors.h (find_inferior): Remove.
1306 * inferiors.c (find_inferior): Remove.
1307
13082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1309
1310 * linux-low.c (resume_status_pending_p): Update comment.
1311 (need_step_over_p): Update comment.
1312
13132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1314
1315 * linux-low.c (proceed_one_lwp): Return void, change parameter
1316 type.
1317 (unsuspend_and_proceed_one_lwp): Likewise.
1318 (proceed_all_lwps): Use for_each_thread.
1319 (unstop_all_lwps): Likewise.
1320
13212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1322
1323 * linux-low.c (linux_resume_one_thread): Return void, take
1324 parameter directly.
1325 (linux_resume): Use for_each_thread.
1326
13272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1328
1329 * linux-low.c (send_sigstop_callback): Return void, change
1330 parameter type. Rename to...
1331 (send_sigstop): ... this.
1332 (suspend_and_send_sigstop_callback): Return void, change parameter
1333 type. Rename to...
1334 (suspend_and_send_sigstop): ... this.
1335 (stop_all_lwps): Use for_each_thread.
1336
13372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1338
1339 * linux-low.c (lwp_running): Return bool, remove unused
1340 argument.
1341 (linux_stabilize_threads): Use find_thread.
1342
13432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1344
1345 * linux-low.c (select_singlestep_lwp_callback): Remove.
1346 (count_events_callback): Remove.
1347 (select_event_lwp_callback): Remove.
1348 (select_event_lwp): Use find_thread/for_each_thread.
1349
13502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1351
1352 * linux-low.c (not_stopped_callback): Return bool, take filter
1353 argument directly.
1354 (linux_wait_for_event_filtered): Use find_thread.
1355 (linux_wait_1): Likewise.
1356
13572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1358
1359 * linux-low.c (same_lwp): Remove.
1360 (find_lwp_pid): Use find_thread.
1361
13622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1363
1364 * linux-low.c (delete_lwp_callback): Remove.
1365 (linux_mourn): Use for_each_thread.
1366
13672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1368
1369 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1370 args parameter, don't check for pid.
1371 (linux_detach): Use for_each_thread.
1372
13732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1374
1375 * linux-low.c (struct counter): Remove.
1376 (second_thread_of_pid_p): Remove.
1377 (last_thread_of_process_p): Use find_thread.
1378
13792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1380
1381 * inferiors.c (find_inferior_in_random): Remove.
1382 * inferiors.h (find_inferior_in_random): Remove.
1383 * linux-low.c (status_pending_p_callback): Return bool, accept
1384 parameter ptid directly.
1385 (linux_wait_for_event_filtered): Use find_thread_in_random.
1386 (linux_wait_1): Likewise.
1387
13882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1389
1390 * inferiors.c (find_inferior_id): Remove.
1391 (find_thread_ptid): Move implemention from find_inferior_id to
1392 here.
1393 * inferiors.h (find_inferior_id): Remove.
1394 * server.c (handle_status): Use find_thread_ptid.
1395 (process_serial_event): Likewise.
1396 * thread-db.c (find_one_thread): Likewise.
1397 (thread_db_thread_handle): Likewise.
1398 * win32-low.c (thread_rec): Likewise.
1399 (child_delete_thread): Likewise.
1400 (win32_thread_alive): Likewise.
1401 (get_child_debug_event): Likewise.
1402
14032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1404
1405 * linux-mips-low.c (update_watch_registers_callback): Return
1406 void, remove pid_p parameter, don't check for pid.
1407 (mips_insert_point, mips_remove_point): Use for_each_thread.
1408
14092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1410
1411 * lynx.low (lynx_delete_thread_callback): Remove.
1412 (lynx_mourn): Use for_each_thread.
1413
14142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1415
1416 * regcache.c (regcache_invalidate_one): Remove.
1417 (regcache_invalidate_pid): use for_each_thread.
1418
14192017-11-26 Tom Tromey <tom@tromey.com>
1420
1421 * linux-low.c (linux_create_inferior): Update.
1422
14232017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1424
1425 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1426
14272017-11-24 Alan Hayward <alan.hayward@arm.com>
1428
1429 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1430 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1431 * linux-aarch64-tdesc-selftest.c: New file.
1432 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1433
14342017-11-24 Alan Hayward <alan.hayward@arm.com>
1435
1436 * configure.srv: Add new file.
1437 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1438 * linux-aarch64-tdesc-selftest.c: New file.
1439 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1440
14412017-11-24 Alan Hayward <alan.hayward@arm.com>
1442
1443 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1444 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1445 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1446
14472017-11-24 Alan Hayward <alan.hayward@arm.com>
1448
1449 * configure.srv: Add new files.
1450 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1451 aarch64_linux_read_description.
1452 * linux-aarch64-low.c (aarch64_linux_read_description):
1453 Merge with aarch64_arch_setup.
1454 (aarch64_arch_setup): Call aarch64_linux_read_description.
1455 * linux-aarch64-tdesc.c: New file.
1456 * linux-aarch64-tdesc.h: New file.
1457
14582017-11-24 Yao Qi <yao.qi@linaro.org>
1459
1460 * configure.srv: Set $srv_regobj for tic6x-linux.
1461 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1462 (tic6x_read_description): Move some code to tic6x_arch_setup.
1463 (tic6x_tdesc_test): New function.
1464 (initialize_low_arch): Call selftests::register_test.
1465
14662017-11-22 Yao Qi <yao.qi@linaro.org>
1467
1468 * remote-utils.c (prepare_resume_reply): Use memcpy.
1469
14702017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1471
1472 * linux-low.c (kill_one_lwp_callback): Return void, take
1473 argument directly, don't filter on pid.
1474 (linux_kill): Use for_each_thread.
1475
14762017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1477
1478 * linux-low.c (need_step_over_p): Return bool, remove dummy
1479 argument.
1480 (linux_resume, proceed_all_lwps): Use find_thread.
1481
14822017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1483
1484 * linux-low.c (resume_status_pending_p): Return bool, remove
1485 flag_p argument.
1486 (linux_resume): Use find_thread.
1487
14882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1489
1490 * linux-low.c (struct thread_resume_array): Remove.
1491 (linux_set_resume_request): Return void, take arguments
1492 directly.
1493 (linux_resume): Use for_each_thread.
1494
14952017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1496
1497 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1498 return bool, remove data argument.
1499 (linux_stabilize_threads): Use find_thread.
1500
15012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1502
1503 * linux-low.c (unsuspend_one_lwp): Remove.
1504 (unsuspend_all_lwps): Use for_each_thread, inline code from
1505 unsuspend_one_lwp.
1506
15072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1508
1509 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1510 * linux-low.c (struct iterate_over_lwps_args): Remove.
1511 (iterate_over_lwps_filter): Remove.
1512 (iterate_over_lwps): Use find_thread.
1513
15142017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1515
1516 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1517 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1518 code from reset_lwp_ptrace_options_callback.
1519
15202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1521
1522 * linux-arm-low.c (struct update_registers_data): Remove.
1523 (update_registers_callback): Return void, take arguments
1524 directly, don't check thread's pid.
1525 (arm_insert_point, arm_remove_point): Use for_each_thread.
1526
15272017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1528
1529 * win32-low.c (continue_one_thread): Return void, take argument
1530 directly.
1531 (child_continue): Use for_each_thread.
1532
15332017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1534
1535 * win32-i386-low.c (update_debug_registers_callback): Rename
1536 to ...
1537 (update_debug_registers): ... this, return void, remove pid_p arg.
1538 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1539
15402017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1541
1542 * inferiors.h (struct process_info): Add constructor, initialize
1543 fields..
1544 <syscalls_to_catch>: Change type to std::vector<int>.
1545 * inferiors.c (add_process): Allocate process_info with new.
1546 (remove_process): Free process_info with delete.
1547 * linux-low.c (handle_extended_wait): Adjust.
1548 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1549 * server.c (handle_general_set): Adjust.
1550
15512017-11-16 Pedro Alves <palves@redhat.com>
1552
1553 * remote-utils.c (remote_close): Block SIGIO signals instead of
1554 uninstalling the SIGIO handler.
1555
15562017-11-16 Alan Hayward <alan.hayward@arm.com>
1557
1558 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1559
15602017-11-16 Yao Qi <yao.qi@linaro.org>
1561
1562 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1563 (tic6x_store_gregset): Likewise.
1564 (tic6x_usrregs_info): Move it up.
1565
15662017-11-15 Alan Hayward <alan.hayward@arm.com>
1567
1568 * Makefile.in: Update arch rules.
1569 * configure.srv: Explicitly mark arch/ files.
1570
15712017-11-13 Andreas Schwab <schwab@suse.de>
1572
1573 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1574 function.
1575 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1576
15772017-11-06 Pedro Alves <palves@redhat.com>
1578
1579 * config.in, configure: Regenerate.
1580
15812017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1582
1583 * target.c (struct thread_search): Remove.
1584 (thread_search_callback): Remove.
1585 (prepare_to_access_memory): Use for_each_thread instead of
1586 find_inferior. Inline code from thread_search_callback.
1587
15882017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1589
1590 * server.c (struct visit_actioned_threads_data): Remove.
1591 (visit_actioned_threads): Change prototype to take arguments
1592 directly.
1593 (resume): Use find_thread instead of find_inferior.
1594
15952017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1596
1597 * server.c (queue_stop_reply_callback): Change prototype, return
1598 void.
1599 (find_status_pending_thread_callback): Remove.
1600 (handle_status): Replace find_inferior with find_thread and
1601 for_each_thread.
1602
16032017-10-25 Alan Hayward <alan.hayward@arm.com>
1604
1605 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1606 with REGNO.
1607 (aarch64_store_gregset): Likewise.
1608 (aarch64_fill_fpregset): Likewise.
1609 (aarch64_store_fpregset): Likewise.
1610
16112017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1612
1613 * gdbthread.h (find_thread, for_each_thread): New functions.
1614 * inferiors.c (thread_of_pid): Remove.
1615 (find_any_thread_of_pid): Use find_thread.
1616 * linux-low.c (num_lwps): Use for_each_thread.
1617
16182017-10-17 Yao Qi <yao.qi@linaro.org>
1619
1620 * Makefile.in: Remove one rule.
1621 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1622
16232017-10-17 Yao Qi <yao.qi@linaro.org>
1624
1625 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1626 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1627
16282017-10-17 Yao Qi <yao.qi@linaro.org>
1629
1630 * configure.srv: Rename arm.o with arch/arm.o.
1631
16322017-10-17 Yao Qi <yao.qi@linaro.org>
1633
1634 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1635 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1636 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1637 (arch-i386.o, arch-amd64.o): Remove rules.
1638 (arch/%.o): New rule.
1639 Update POSTCOMPILE and COMPILE.pre.
1640 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1641 * configure: Re-generated.
1642 * configure.srv: Replace arch-i386.o with arch/i386.o.
1643 Replace arch-amd64.o with arch/amd64.o.
1644
16452017-10-16 Yao Qi <yao.qi@linaro.org>
1646
1647 * configure: Regenerated.
1648
16492017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1650
1651 * inferiors.h: (struct inferior_list): Remove.
1652 (struct inferior_list_entry); Remove.
1653 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1654 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1655 get_first_inferior): Remove.
1656 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1657 find_inferior_id, find_inferior_in_random): Change signature.
1658 * inferiors.c (all_threads): Change type to
1659 std::list<thread_info *>.
1660 (get_thread): Remove macro.
1661 (find_inferior, find_inferior_id): Change signature, implement
1662 using find_thread.
1663 (find_inferior_in_random): Change signature, implement using
1664 find_thread_in_random.
1665 (for_each_inferior, for_each_inferior_with_data): Change
1666 signature, implement using for_each_thread.
1667 (add_inferior_to_list, remove_inferior): Remove.
1668 (add_thread, get_first_thread, thread_of_pid,
1669 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1670 (get_first_inferior, one_inferior_p, clear_inferior_list):
1671 Remove.
1672 (clear_inferiors, get_thread_process): Update.
1673 * gdbthread.h: Include <list>.
1674 (struct thread_info) <entry>: Remove field.
1675 <id>: New field.
1676 (all_threads): Change type to std::list<thread_info *>.
1677 (get_first_inferior): Add doc.
1678 (find_thread, for_each_thread, find_thread_in_random): New
1679 functions.
1680 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1681 * linux-arm-low.c (update_registers_callback): Update.
1682 * linux-low.c (second_thread_of_pid_p): Update.
1683 (kill_one_lwp_callback, linux_detach_lwp_callback,
1684 delete_lwp_callback, status_pending_p_callback, same_lwp,
1685 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1686 iterate_over_lwps, not_stopped_callback,
1687 resume_stopped_resumed_lwps, count_events_callback,
1688 select_singlestep_lwp_callback, select_event_lwp_callback,
1689 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1690 suspend_and_send_sigstop_callback, wait_for_sigstop,
1691 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1692 lwp_running, linux_set_resume_request, resume_status_pending_p,
1693 need_step_over_p, start_step_over, linux_resume_one_thread,
1694 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1695 reset_lwp_ptrace_options_callback): Update.
1696 * linux-mips-low.c (update_watch_registers_callback): Update.
1697 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1698 Update.
1699 (free_register_cache_thread_one): Remove.
1700 (regcache_release): Update.
1701 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1702 handle_qxfer_threads_worker): Update.
1703 (handle_query): Update, use list iterator.
1704 (visit_actioned_threads, handle_pending_status,
1705 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1706 clear_pending_status_callback, set_pending_status_callback,
1707 find_status_pending_thread_callback, handle_status,
1708 process_serial_event): Update.
1709 * target.c (thread_search_callback): Update.
1710 * thread-db.c (thread_db_get_tls_address): Update.
1711 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1712 Update.
1713 * win32-i386-low.c (update_debug_registers_callback): Update.
1714 * win32-low.c (delete_thread_info, child_delete_thread,
1715 continue_one_thread, suspend_one_thread,
1716 get_child_debug_event): Adjust.
1717
17182017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1719
1720 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1721 * inferiors.h: Include <list>.
1722 (struct process_info) <entry>: Remove field.
1723 <pid>: New field.
1724 (pid_of): Change macro to function.
1725 (ptid_of, lwpid_of): Remove macro.
1726 (all_processes): Change type to std::list<process_info *>.
1727 (ALL_PROCESSES): Remove macro.
1728 (for_each_process, find_process): New function.
1729 * inferiors.c (all_processes): Change type to
1730 std::list<process_info *>.
1731 (find_thread_process): Adjust.
1732 (add_process): Likewise.
1733 (remove_process): Likewise.
1734 (find_process_pid): Likewise.
1735 (get_first_process): Likewise.
1736 (started_inferior_callback): Remove.
1737 (have_started_inferiors_p): Adjust.
1738 (attached_inferior_callback): Remove.
1739 (have_attached_inferiors_p): Adjust.
1740 * linux-low.c (check_zombie_leaders): Likewise.
1741 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1742 (x86_linux_update_xmltarget): Adjust.
1743 * server.c (handle_query): Likewise.
1744 (gdb_reattached_process): Remove.
1745 (handle_status): Adjust.
1746 (kill_inferior_callback): Likewise.
1747 (detach_or_kill_inferior): Remove.
1748 (print_started_pid): Likewise.
1749 (print_attached_pid): Likewise.
1750 (detach_or_kill_for_exit): Update.
1751 (process_serial_event): Likewise.
1752 * linux-arm-low.c (arm_new_fork): Likewise.
1753
17542017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1755
1756 * dll.h: Include <list>.
1757 (struct dll_info): Add constructor.
1758 <entry>: Remove field.
1759 (all_dlls): Change type to std::list<dll_info>.
1760 * dll.c: Include <algorithm>.
1761 (get_dll): Remove macro.
1762 (all_dlls): Change type to std::list<dll_info *>.
1763 (free_one_dll): Remove.
1764 (match_dll): Likewise.
1765 (loaded_dll): Adjust.
1766 (unloaded_dll): Adjust to all_dlls type change, use
1767 std::find_if. Inline code from match_dll.
1768 (clear_dlls): Adjust to all_dlls type change.
1769 * server.c (emit_dll_description): Remove.
1770 (handle_qxfer_libraries): Adjust to all_dlls type change,
1771 integrate emit_dll_description's functionality.
1772
17732017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1774
1775 * linux-low.h (struct linux_target_ops) <delete_process>: New
1776 field.
1777 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1778 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1779 (struct linux_target_ops): Add delete_process callback.
1780 * linux-arm-low.c (arm_delete_process): New.
1781 (struct linux_target_ops): Add delete_process callback.
1782 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1783 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1784 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1785 * linux-mips-low.c (mips_linux_delete_process): New.
1786 (struct linux_target_ops): Add delete_process callback.
1787 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1788 * linux-s390-low.c (struct linux_target_ops): Likewise.
1789 * linux-sh-low.c (struct linux_target_ops): Likewise.
1790 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1791 * linux-tile-low.c (struct linux_target_ops): Likewise.
1792 * linux-x86-low.c (x86_linux_delete_process): New.
1793 (struct linux_target_ops): Add delete_process callback.
1794 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1795
17962017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1797
1798 * linux-aarch64-low.c (the_low_target): Add thread delete
1799 callback.
1800 * linux-arm-low.c (arm_delete_thread): New function.
1801 (the_low_target): Add thread delete callback.
1802 * linux-bfin-low.c (the_low_target): Likewise.
1803 * linux-crisv32-low.c (the_low_target): Likewise.
1804 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1805 set.
1806 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1807 field.
1808 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1809 * linux-mips-low.c (mips_linux_delete_thread): New function.
1810 (the_low_target): Add thread delete callback.
1811 * linux-ppc-low.c (the_low_target): Likewise.
1812 * linux-s390-low.c (the_low_target): Likewise.
1813 * linux-sh-low.c (the_low_target): Likewise.
1814 * linux-tic6x-low.c (the_low_target): Likewise.
1815 * linux-tile-low.c (the_low_target): Likewise.
1816 * linux-x86-low.c (the_low_target): Likewise.
1817 * linux-xtensa-low.c (the_low_target): Likewise.
1818
18192017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1820
1821 * win32-low.c: Include "common-inferior.h".
1822
18232017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1824
1825 * inferiors.c (set_inferior_cwd): New function.
1826 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1827 (handle_query): Inform that QSetWorkingDir is supported.
1828 * win32-low.c (create_process): Pass the inferior's cwd to
1829 CreateProcess.
1830
18312017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1832
1833 * inferiors.c (current_inferior_cwd): New global variable.
1834 (get_inferior_cwd): New function.
1835 * inferiors.h (struct process_info) <cwd>: New field.
1836
18372017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1838
1839 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1840 (OBS): Add gdb_tilde_expand.o.
1841
18422017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1843
1844 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1845 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1846
18472017-09-29 Pedro Alves <palves@redhat.com>
1848
1849 * ax.c (gdb_parse_agent_expr): Constify.
1850 * ax.h (gdb_parse_agent_expr): Constify.
1851 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1852 Constify.
1853 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1854 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1855 * remote-utils.h (read_ptid): Constify.
1856 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1857 (process_point_options, process_serial_event): Constify.
1858 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1859 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1860 (cmd_qtbuffer): Constify.
1861
18622017-09-29 Pedro Alves <palves@redhat.com>
1863
1864 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1865 fails.
1866
18672017-09-29 Pedro Alves <palves@redhat.com>
1868
1869 * linux-low.c (handle_extended_wait): Pass parent thread instead
1870 of process to thread_db_notice_clone.
1871 * linux-low.h (thread_db_notice_clone): Replace parent process
1872 parameter with parent thread parameter.
1873 * thread-db.c (find_one_thread): Add comment.
1874 (thread_db_notice_clone): Replace parent process parameter with
1875 parent thread parameter. Temporarily switch to the parent thread.
1876
18772017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1878
1879 * gdbthread.h: Include "common-gdbthread.h".
1880 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1881 "if" when validating the ptid.
1882 * remote-utils.c: Include "gdbthread.h".
1883 (prepare_resume_reply): Use "switch_to_thread".
1884 * target.c (done_accessing_memory): Likewise.
1885
18862017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1887
1888 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1889 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1890 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1891 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1892 s390x-gs-linux64-ipa.o to ipa_obj.
1893 * linux-s390-low.c (HWCAP_S390_GS): New define.
1894 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1895 New functions.
1896 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1897 (s390_arch_setup): Check for guarded-storage support and choose
1898 appropriate tdesc.
1899 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1900 init_registers_s390x_gs_linux64.
1901 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1902 enum value.
1903 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1904 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1905
19062017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1907
1908 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1909
19102017-09-21 Kevin Buettner <kevinb@redhat.com>
1911
1912 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1913 (thread_db_thread_handle): Declare.
1914 * linux-low.c (linux_target_ops): Initialize thread_handle.
1915 * server.c (handle_qxfer_threads_worker): Add support for
1916 "handle" attribute.
1917 * target.h (struct target_ops): Add new function pointer,
1918 thread_handle.
1919 (target_thread_handle): Define.
1920 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1921 field in lwp.
1922 (thread_db_thread_handle): New function.
1923
19242017-09-21 Kevin Buettner <kevinb@redhat.com>
1925
1926 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1927 * linux-low.h (thread_db_notice_clone): Declare.
1928 * thread-db.c (thread_db_notice_clone): New function.
1929
19302017-09-21 Pedro Alves <palves@redhat.com>
1931
1932 * server.c (gdb_read_memory, handle_status, process_serial_event)
1933 (handle_serial_event, handle_target_event): Adjust to
1934 set_desired_thread prototype change.
1935 * target.c (set_desired_thread): Remove 'use_general' parameter
1936 and adjust.
1937 * target.h (set_desired_thread): Remove 'use_general' parameter.
1938
19392017-09-20 Tom Tromey <tom@tromey.com>
1940
1941 * target.c (target_terminal::terminal_state): Define.
1942 (target_terminal::init): Rename from target_terminal_init.
1943 (target_terminal::inferior): Rename from
1944 target_terminal_inferior.
1945 (target_terminal::ours): Rename from target_terminal_ours.
1946 (target_terminal::ours_for_output, target_terminal::info): New.
1947
19482017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1949
1950 * server.c (accumulate_file_name_length): Remove.
1951 (emit_dll_description): Adjust to std::string change.
1952 (handle_qxfer_libraries): Use std::string to hold document.
1953
19542017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1955
1956 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1957 return type of xml_escape_text.
1958 * server.c (emit_dll_description): Likewise.
1959
19602017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1961
1962 * server.c (captured_main): Accept argument for --selftest.
1963 Update run_tests call.
1964 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1965 when registering selftests.
1966
19672017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1968
1969 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1970 instead of "VEC" for "target_desc.reg_defs".
1971 (regcache_cpy): Likewise.
1972 (registers_to_string): Likewise.
1973 (registers_from_string): Likewise.
1974 (find_regno): Likewise.
1975 (supply_regblock): Likewise.
1976 (regcache_raw_read_unsigned): Likewise.
1977 * tdesc.c (init_target_desc): Likewise.
1978 (tdesc_create_reg): Likewise.
1979 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1980 (struct target_desc) <reg_defs>: Convert to "std::vector".
1981 (target_desc): Do not initialize "reg_defs".
1982 (~target_desc): Update code to use "std::vector" instead of "VEC"
1983 for "target_desc.reg_defs".
1984 (operator==): Likewise.
1985
19862017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1987
1988 * inferiors.h (thread_to_gdb_id): Remove.
1989 * inferiors.c (thread_to_gdb_id): Remove.
1990 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1991 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1992 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1993 Likewise.
1994 * nto-low.c (nto_fetch_registers, nto_store_registers,
1995 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1996
19972017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1998
1999 * inferiors.h (gdb_id_to_thread_id): Remove.
2000 * inferiors.c (gdb_id_to_thread_id): Remove.
2001 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2002 removal. Move pid declaration closer to where it's used.
2003
20042017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2005
2006 * server.c (handle_detach): New function.
2007 (process_serial_event): Move code out, call handle_detach.
2008
20092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2010
2011 * server.c (require_running): Rename to ...
2012 (require_running_or_return): ... this ...
2013 (require_running_or_break): ... and this.
2014 (handle_query, process_serial_event): Adjust.
2015
20162017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2017
2018 * linux-low.c (linux_set_resume_request): Remove unused
2019 variables.
2020
20212017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2022
2023 * server.c (first_thread_of): Remove.
2024 (process_serial_event): Replace usage of first_thread_of with
2025 find_any_thread_of_pid.
2026 * tracepoint.c (same_process_p): Remove.
2027 (gdb_agent_about_to_close): Replace usage of same_process_p with
2028 find_any_thread_of_pid.
2029 * linux-x86-low.c (same_process_callback): Remove.
2030 (x86_arch_setup_process_callback): Replace usage of
2031 same_process_callback with find_any_thread_of_pid.
2032 * thread-db.c (any_thread_of): Remove.
2033 (switch_to_process): Replace usage of any_thread_of with
2034 find_any_thread_of_pid.
2035 * inferiors.c (thread_pid_matches_callback): Remove.
2036 (find_thread_process): Adjust to use find_any_thread_of_pid.
2037
20382017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2039
2040 * regcache.c (get_thread_regcache): Guard calls to "memset"
2041 with "!VEC_empty".
2042
20432017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2044
2045 * linux-low.c (handle_extended_wait): Use
2046 "allocate_target_description" instead of "XNEW".
2047 * linux-x86-low.c (initialize_low_arch): Likewise.
2048
20492017-09-05 Yao Qi <yao.qi@linaro.org>
2050
2051 * configure.srv (srv_i386_regobj): Remove.
2052 (srv_amd64_regobj): Remove.
2053 (srv_regobj): Set it to "" for x86 non-linux targets.
2054 * linux-x86-tdesc.c (i386_linux_read_description):
2055 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2056 (init_registers_i386): Remove the declaration.
2057 (tdesc_i386): Remove the declaration.
2058 (lynx_i386_arch_setup): Call i386_create_target_description.
2059 * nto-x86-low.c: Likewise.
2060 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2061 [!__x86_64__]: include arch/i386.h.
2062 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2063
20642017-09-05 Yao Qi <yao.qi@linaro.org>
2065
2066 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2067 i386/amd64-XXX-linux from it.
2068
20692017-09-05 Yao Qi <yao.qi@linaro.org>
2070
2071 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2072 false.
2073 (ipa_amd64_linux_regobj): Remove.
2074 (ipa_x32_linux_regobj): Remove.
2075
20762017-09-05 Yao Qi <yao.qi@linaro.org>
2077
2078 * Makefile.in (arch-amd64.o): New rule.
2079 * configure.srv: Append arch-amd64.o.
2080 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2081 (get_ipa_tdesc): Call amd64_linux_read_description.
2082 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2083 and init_registers_amd64_XXX.
2084 * linux-x86-low.c (x86_linux_read_description): Call
2085 amd64_linux_read_description.
2086 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2087 (initialize_low_arch): Don't call init_registers_x32_XXX and
2088 init_registers_amd64_XXX.
2089 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2090 and tdesc_amd64_XXX.
2091 [__x86_64__] (amd64_tdesc_test): New function.
2092 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2093 and init_registers_amd64_XXX.
2094 * linux-x86-tdesc.c: Include arch/amd64.h.
2095 (xcr0_to_tdesc_idx): New function.
2096 (i386_linux_read_description): New function.
2097 (amd64_get_ipa_tdesc_idx): New function.
2098 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2099 (amd64_get_ipa_tdesc): Declare.
2100
21012017-09-05 Yao Qi <yao.qi@linaro.org>
2102
2103 * configure.srv (srv_i386_linux_xmlfiles): Remove
2104 i386/i386-XXX-linux.xml from it.
2105
21062017-09-05 Yao Qi <yao.qi@linaro.org>
2107
2108 * configure.srv: Set srv_i386_linux_regobj empty if $development
2109 is false.
2110 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2111 initialize_low_tdesc.
2112 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2113 with #if initialize_low_tdesc.
2114 * linux-x86-tdesc-selftest.c: New file.
2115 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2116
21172017-09-05 Yao Qi <yao.qi@linaro.org>
2118
2119 * Makefile.in (arch-i386.o): New rule.
2120 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2121 (x86_64-*-linux*): Likewise.
2122 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2123 include arch/i386.h.
2124 (i386_linux_read_description): Remove code and call
2125 i386_create_target_description.
2126 * tdesc.c (allocate_target_description): New function.
2127 * tdesc.h (set_tdesc_architecture): Remove declaration.
2128 (set_tdesc_osabi): Likewise.
2129
21302017-09-05 Yao Qi <yao.qi@linaro.org>
2131
2132 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2133 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2134 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2135 .xmltarget.
2136 * server.c (get_features_xml): Call tdesc_get_features_xml.
2137 * tdesc.c (set_tdesc_architecture): New function.
2138 (set_tdesc_osabi): New function.
2139 (tdesc_get_features_xml): New function.
2140 (tdesc_create_feature): Add an argument.
2141 * tdesc.h (struct target_desc) <features>: New field.
2142 <arch, osabi>: New field.
2143 (~target_desc): xfree features, arch, and osabi.
2144 (target_desc::oerator==): Don't compare .xmltarget.
2145 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2146 (set_tdesc_osabi): Likewise.
2147 (tdesc_get_features_xml): Likewise.
2148
21492017-09-05 Yao Qi <yao.qi@linaro.org>
2150
2151 * linux-x86-tdesc.c: Include selftest.h.
2152 (i386_tdesc_test): New function.
2153 (initialize_low_tdesc): Call selftests::register_test.
2154 * tdesc.h: Include regdef.h.
2155 (target_desc): Override operator == and !=.
2156
21572017-09-05 Yao Qi <yao.qi@linaro.org>
2158
2159 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2160 (ipa_obj): Likewise.
2161 * linux-i386-ipa.c: Include common/x86-xstate.h
2162 (get_ipa_tdesc): Call i386_linux_read_description.
2163 (initialize_low_tracepoint): Don't call init_registers_XXX
2164 functions, call initialize_low_tdesc instead.
2165 * linux-x86-low.c (x86_linux_read_description): Call
2166 i386_linux_read_description.
2167 (initialize_low_arch): Don't call init_registers_i386_XXX
2168 functions, call initialize_low_tdesc.
2169 * linux-x86-tdesc.c: New file.
2170 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2171 (i386_get_ipa_tdesc_idx): Declare.
2172 (i386_get_ipa_tdesc): Declare.
2173 (initialize_low_tdesc): Declare.
2174
21752017-09-05 Yao Qi <yao.qi@linaro.org>
2176
2177 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2178 instead of 0.
2179
21802017-09-05 Yao Qi <yao.qi@linaro.org>
2181
2182 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2183 * regcache.c (get_thread_regcache): Use VEC_length.
2184 (init_register_cache): Likewise.
2185 (regcache_cpy): Likewise.
2186 (registers_to_string): Iterate reg_defs via VEC_iterate.
2187 (find_regno): Likewise.
2188 (find_register_by_number): Use VEC_index.
2189 (register_size): Call find_register_by_number.
2190 (register_data): Call find_register_by_number.
2191 (supply_regblock): Use VEC_length.
2192 (regcache_raw_read_unsigned): Likewise.
2193 * tdesc.c (init_target_desc): Iterate reg_defs via
2194 VEC_iterate.
2195 (default_description): Update initializer.
2196 (copy_target_description): Don't update field num_registers.
2197 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2198 <num_registers>: Remove.
2199
22002017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2201
2202 * Makefile.in (.SECONDARY): Define target.
2203
22042017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2205
2206 * linux-low.c (linux_wait_1): Adjust.
2207 * server.c (queue_stop_reply_callback): Adjust.
2208
22092017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2210
2211 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2212 QEnvironmentUnset and QEnvironmentReset packets.
2213 (handle_query): Inform remote that QEnvironmentHexEncoded,
2214 QEnvironmentUnset and QEnvironmentReset are supported.
2215
22162017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2217
2218 * inferiors.h (inferior_target_data): Rename to ...
2219 (thread_target_data): ... this.
2220 (inferior_regcache_data): Rename to ...
2221 (thread_regcache_data): ... this.
2222 (set_inferior_regcache_data): Rename to ...
2223 (set_thread_regcache_data): ... this.
2224 * inferiors.c (inferior_target_data): Rename to ...
2225 (thread_target_data): ... this.
2226 (inferior_regcache_data): Rename to ...
2227 (thread_regcache_data): ... this.
2228 (set_inferior_regcache_data): Rename to ...
2229 (set_thread_regcache_data): ... this.
2230 (free_one_thread): Update.
2231 * linux-low.h (get_thread_lwp): Update.
2232 * regcache.c (get_thread_regcache): Update.
2233 (regcache_invalidate_thread): Update.
2234 (free_register_cache_thread): Update.
2235 * win32-i386-low.c (update_debug_registers_callback): Update.
2236 (win32_get_current_dr): Update.
2237 * win32-low.c (thread_rec): Update.
2238 (delete_thread_info): Update.
2239 (continue_one_thread): Update.
2240 (suspend_one_thread): Update.
2241
22422017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2243
2244 * inferiors.c (set_inferior_target_data): Remove.
2245 * inferiors.h (set_inferior_target_data): Remove.
2246
22472017-08-18 Yao Qi <yao.qi@linaro.org>
2248
2249 * Makefile.in (OBS): Add selftest.o.
2250 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2251 * configure, config.in: Re-generated.
2252 * server.c: Include common/sefltest.h.
2253 (captured_main): Handle option --selftest.
2254
22552017-08-09 Yao Qi <yao.qi@linaro.org>
2256
2257 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2258 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2259 i386-avx-mpx.o and i386-mmx.o.
2260 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2261 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2262 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2263 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2264 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2265 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2266 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2267 i386/amd64-avx-mpx.xml.
2268
22692017-08-09 Yao Qi <yao.qi@linaro.org>
2270
2271 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2272 and x32-avx-avx512.o.
2273 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2274 i386/x32-avx-avx512.xml.
2275
22762017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2277
2278 * tracepoint.h (enum class fast_tpoint_collect_result): New
2279 enumeration.
2280 (fast_tracepoint_collecting): Change return type to
2281 fast_tpoint_collect_result.
2282 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2283 * linux-low.h: Include tracepoint.h.
2284 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2285 fast_tpoint_collect_result.
2286 * linux-low.c (handle_tracepoints): Adjust.
2287 (linux_fast_tracepoint_collecting): Change return type to
2288 fast_tpoint_collect_result.
2289 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2290 linux_wait_1, stuck_in_jump_pad_callback,
2291 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2292 proceed_one_lwp): Adjust to type change.
2293
22942017-07-10 Yao Qi <yao.qi@linaro.org>
2295
2296 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2297
22982017-06-29 Yao Qi <yao.qi@linaro.org>
2299
2300 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2301 Remove.
2302 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2303
23042017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2305
2306 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2307
23082017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2309
2310 * linux-low.c (linux_create_inferior): Adjust code to access the
2311 environment information via 'gdb_environ' class.
2312 * lynx-low.c (lynx_create_inferior): Likewise.
2313 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2314 (get_environ): Return a pointer to 'our_environ'.
2315 (captured_main): Initialize 'our_environ'.
2316 * server.h (get_environ): Adjust prototype.
2317 * spu-low.c (spu_create_inferior): Adjust code to access the
2318 environment information via 'gdb_environ' class.
2319
23202017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2321
2322 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2323 usage of "register" keyword.
2324
23252017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2326
2327 * configure: Re-generate.
2328
23292017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2330
2331 * configure: Re-generate.
2332
23332017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2334
2335 * Makefile.in (COMPILE.pre): Add "-x c++".
2336
23372017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2338
2339 * fork-child.c: Conditionally include <signal.h>.
2340
23412017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2342
2343 * server.c (handle_general_set): Handle new packet
2344 "QStartupWithShell".
2345 (handle_query): Add "QStartupWithShell" to the list of supported
2346 packets.
2347 (gdbserver_usage): Add help text explaining the
2348 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2349 options.
2350 (captured_main): Recognize and act upon the presence of the new
2351 CLI options.
2352
23532017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2354 Pedro Alves <palves@redhat.com>
2355
2356 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2357 * configure: Regenerate.
2358 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2359 "fork-inferior.o".
2360 (i[34567]86-*-lynxos*): Likewise.
2361 (spu*-*-*): Likewise.
2362 * fork-child.c: New file.
2363 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2364 and "environ.h".
2365 (linux_ptrace_fun): New function.
2366 (linux_create_inferior): Adjust function prototype to reflect
2367 change on "target.h". Adjust function code to use
2368 "fork_inferior".
2369 (linux_request_interrupt): Delete "signal_pid".
2370 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2371 (lynx_ptrace_fun): New function.
2372 (lynx_create_inferior): Adjust function prototype to reflect
2373 change on "target.h". Adjust function code to use
2374 "fork_inferior".
2375 * nto-low.c (nto_create_inferior): Adjust function prototype and
2376 code to reflect change on "target.h". Update comments.
2377 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2378 "common-terminal.h" and "environ.h".
2379 (terminal_fd): Moved to fork-child.c.
2380 (old_foreground_pgrp): Likewise.
2381 (restore_old_foreground_pgrp): Likewise.
2382 (last_status): Make it global.
2383 (last_ptid): Likewise.
2384 (our_environ): New variable.
2385 (startup_with_shell): Likewise.
2386 (program_name): Likewise.
2387 (program_argv): Rename to...
2388 (program_args): ...this.
2389 (wrapper_argv): New variable.
2390 (start_inferior): Delete function.
2391 (get_exec_wrapper): New function.
2392 (get_exec_file): Likewise.
2393 (get_environ): Likewise.
2394 (prefork_hook): Likewise.
2395 (post_fork_inferior): Likewise.
2396 (postfork_hook): Likewise.
2397 (postfork_child_hook): Likewise.
2398 (handle_v_run): Update code to deal with arguments coming from the
2399 remote host. Update calls from "start_inferior" to
2400 "create_inferior".
2401 (captured_main): Likewise. Initialize environment variable. Call
2402 "have_job_control".
2403 * server.h (post_fork_inferior): New prototype.
2404 (get_environ): Likewise.
2405 (last_status): Declare.
2406 (last_ptid): Likewise.
2407 (signal_pid): Likewise.
2408 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2409 (spu_ptrace_fun): New function.
2410 (spu_create_inferior): Adjust function prototype to reflect change
2411 on "target.h". Adjust function code to use "fork_inferior".
2412 * target.c (target_terminal_init): New function.
2413 (target_terminal_inferior): Likewise.
2414 (target_terminal_ours): Likewise.
2415 * target.h: Include <vector>.
2416 (struct target_ops) <create_inferior>: Update prototype.
2417 (create_inferior): Update macro.
2418 * utils.c (gdb_flush_out_err): New function.
2419 * win32-low.c (win32_create_inferior): Adjust function prototype
2420 and code to reflect change on "target.h".
2421
24222017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2423
2424 * inferiors.c (switch_to_thread): New function.
2425
24262017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2427
2428 * Makefile.in (SFILE): Add "common/job-control.c".
2429 (OBS): Add "job-control.o".
2430
24312017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2432
2433 * Makefile: Remove "@host_makefile_frag@".
2434
24352017-05-05 Pedro Alves <palves@redhat.com>
2436
2437 * configure: Regenerate.
2438
24392017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2440
2441 * configure: Regenerate.
2442
24432017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2444
2445 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2446 software_single_step change of return type to
2447 std::vector<CORE_ADDR>.
2448 * linux-low.c (install_software_single_step_breakpoints):
2449 Likewise.
2450 * linux-low.h (install_software_single_step_breakpoints):
2451 Likewise.
2452
24532017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2454
2455 * remote-utils.c: Include "gdb_termios.h" instead of
2456 "terminal.h".
2457 * terminal.h: Delete file.
2458
24592017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2460
2461 * server.c: Include <vector>.
2462 <program_argv, wrapper_argv>: Convert to std::vector.
2463 (start_inferior): Rewrite function to use C++.
2464 (handle_v_run): Likewise. Update code that calculates the argv
2465 based on the vRun packet; use C++.
2466 (captured_main): Likewise.
2467
24682017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2469
2470 * server.c (handle_v_cont): Initialize thread_resume::thread
2471 with null_ptid.
2472
24732017-04-05 Pedro Alves <palves@redhat.com>
2474
2475 * configure: Regenerate.
2476
24772017-04-05 Pedro Alves <palves@redhat.com>
2478
2479 * gdbreplay.c (sync_error): Constify.
2480 * linux-x86-low.c (push_opcode): Constify.
2481
24822017-04-05 Pedro Alves <palves@redhat.com>
2483
2484 * win32-low.c (get_child_debug_event)
2485 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2486 Report TARGET_WAITKIND_SPURIOUS instead.
2487
24882017-04-05 Pedro Alves <palves@redhat.com>
2489
2490 * remote-utils.c (remote_prepare, remote_open): Constify.
2491 * remote-utils.h (remote_prepare, remote_open): Constify.
2492 * server.c (captured_main): Constify 'port' handling.
2493
24942017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2495
2496 * Makefile.in (clean): Clear .deps.
2497
24982017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2499
2500 * .gitignore: Remove generated files, replace with wildcard.
2501 * (clean): Replace removal of generated files with wildcard.
2502 (version.c): Replace with...
2503 (version-generated.c): ...this.
2504 (xml-builtin.c): Replace with...
2505 (xml-builtin-generated.c): ...this.
2506 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2507 (%.c: *regformats*): Replace with...
2508 (%-generated.c: *regformats*): ...this.
2509
25102017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2511
2512 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2513 (xtensa_fill_gregset): Call collect_register_by_name for
2514 threadptr register.
2515 (xtensa_store_gregset): Call supply_register_by_name for
2516 threadptr register.
2517
25182017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2519
2520 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2521 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2522 (xtensa_store_gregset): Call supply_register for all registers in
2523 a0_regnum..a0_regnum + C0_NREGS range.
2524
25252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2526
2527 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2528 (ax-ipa.o: ax.c): Remove.
2529 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2530 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2531 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2532 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2533 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2534
25352017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2536
2537 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2538 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2539 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2540 (errors-ipa.o: ../common/errors.c): Remove.
2541 (format-ipa.o: ../common/format.c): Remove.
2542 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2543
25442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2545
2546 * Makefile.in (%-ipa.o: %.c): New rule.
2547 (tracepoint-ipa.o: tracepoint.c): Remove.
2548 (utils-ipa.o: utils.c): Remove.
2549 (remote-utils-ipa.o: remote-utils.c): Remove.
2550 (regcache-ipa.o: regcache.c): Remove.
2551 (i386-linux-ipa.o: i386-linux.c): Remove.
2552 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2553 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2554 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2555 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2556 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2557 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2558 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2559 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2560 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2561 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2562 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2563 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2564 (aarch64-ipa.o: aarch64.c): Remove.
2565 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2566 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2567 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2568 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2569 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2570 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2571 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2572 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2573 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2574 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2575 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2576 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2577 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2578 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2579 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2580 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2581 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2582 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2583 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2584 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2585 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2586 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2587 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2588 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2589 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2590 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2591 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2592 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2593 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2594 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2595 (tdesc-ipa.o: tdesc.c): Remove.
2596 (x32-linux-ipa.o: x32-linux.c): Remove.
2597 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2598 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2599
26002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2601
2602 * Makefile.in (%.o: ../arch/%.c): New rule.
2603 (arm.o: ../arch/arm.c): Remove.
2604 (arm-linux.o: ../arch/arm-linux.c): Remove.
2605 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2606 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2607
26082017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2609
2610 * Makefile.in (%.o: ../nat/%.c): New rule.
2611 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2612 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2613 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2614 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2615 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2616 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2617 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2618 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2619 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2620 (linux-personality.o: ../nat/linux-personality.c): Remove.
2621 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2622 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2623 (x86-linux.o: ../nat/x86-linux.c): Remove.
2624 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2625 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2626
26272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2628
2629 * Makefile.in (%.o: ../common/%.c): New rule.
2630 (signals.o: ../common/signals.c): Remove.
2631 (print-utils.o: ../common/print-utils.c): Remove.
2632 (rsp-low.o: ../common/rsp-low.c): Remove.
2633 (common-utils.o: ../common/common-utils.c): Remove.
2634 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2635 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2636 (vec.o: ../common/vec.c): Remove.
2637 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2638 (xml-utils.o: ../common/xml-utils.c): Remove.
2639 (ptid.o: ../common/ptid.c): Remove.
2640 (buffer.o: ../common/buffer.c): Remove.
2641 (format.o: ../common/format.c): Remove.
2642 (filestuff.o: ../common/filestuff.c): Remove.
2643 (agent.o: ../common/agent.c): Remove.
2644 (errors.o: ../common/errors.c): Remove.
2645 (environ.o: ../common/environ.c): Remove.
2646 (common-debug.o: ../common/common-debug.c): Remove.
2647 (cleanups.o: ../common/cleanups.c): Remove.
2648 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2649 (fileio.o: ../common/fileio.c): Remove.
2650 (common-regcache.o: ../common/common-regcache.c): Remove.
2651 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2652 (new-op.o: ../common/new-op.c): Remove.
2653 (btrace-common.o: ../common/btrace-common.c): Remove.
2654
26552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2656
2657 * Makefile.in (%.o: ../target/%.c): New rule.
2658 (waitstatus.o: ../target/waitstatus.c): Remove.
2659
26602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2661
2662 * Makefile.in
2663 (%.c: ../regformats/%.dat,
2664 (%.c: ../regformats/arm/%.dat,
2665 (%.c: ../regformats/i386/%.dat,
2666 (%.c: ../regformats/rs6000/%.dat): New rules.
2667 (aarch64.c): Remove.
2668 (reg-arm.c): Remove.
2669 (arm-with-iwmmxt.c): Remove.
2670 (arm-with-vfpv2.c): Remove.
2671 (arm-with-vfpv3.c): Remove.
2672 (arm-with-neon.c): Remove.
2673 (reg-bfin.c): Remove.
2674 (reg-cris.c): Remove.
2675 (reg-crisv32.c): Remove.
2676 (i386.c): Remove.
2677 (i386-linux.c): Remove.
2678 (i386-avx.c): Remove.
2679 (i386-avx-linux.c): Remove.
2680 (i386-avx-avx512.c): Remove.
2681 (i386-avx-avx512-linux.c): Remove.
2682 (i386-mpx.c): Remove.
2683 (i386-mpx-linux.c): Remove.
2684 (i386-avx-mpx-avx512-pku.c): Remove.
2685 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2686 (i386-avx-mpx.c): Remove.
2687 (i386-avx-mpx-linux.c): Remove.
2688 (i386-mmx.c): Remove.
2689 (i386-mmx-linux.c): Remove.
2690 (reg-ia64.c): Remove.
2691 (reg-m32r.c): Remove.
2692 (reg-m68k.c): Remove.
2693 (reg-cf.c): Remove.
2694 (mips-linux.c): Remove.
2695 (mips-dsp-linux.c): Remove.
2696 (mips64-linux.c): Remove.
2697 (mips64-dsp-linux.c): Remove.
2698 (nios2-linux.c): Remove.
2699 (powerpc-32.c): Remove.
2700 (powerpc-32l.c): Remove.
2701 (powerpc-altivec32l.c): Remove.
2702 (powerpc-cell32l.c): Remove.
2703 (powerpc-vsx32l.c): Remove.
2704 (powerpc-isa205-32l.c): Remove.
2705 (powerpc-isa205-altivec32l.c): Remove.
2706 (powerpc-isa205-vsx32l.c): Remove.
2707 (powerpc-e500l.c): Remove.
2708 (powerpc-64l.c): Remove.
2709 (powerpc-altivec64l.c): Remove.
2710 (powerpc-cell64l.c): Remove.
2711 (powerpc-vsx64l.c): Remove.
2712 (powerpc-isa205-64l.c): Remove.
2713 (powerpc-isa205-altivec64l.c): Remove.
2714 (powerpc-isa205-vsx64l.c): Remove.
2715 (s390-linux32.c): Remove.
2716 (s390-linux32v1.c): Remove.
2717 (s390-linux32v2.c): Remove.
2718 (s390-linux64.c): Remove.
2719 (s390-linux64v1.c): Remove.
2720 (s390-linux64v2.c): Remove.
2721 (s390-te-linux64.c): Remove.
2722 (s390-vx-linux64.c): Remove.
2723 (s390-tevx-linux64.c): Remove.
2724 (s390x-linux64.c): Remove.
2725 (s390x-linux64v1.c): Remove.
2726 (s390x-linux64v2.c): Remove.
2727 (s390x-te-linux64.c): Remove.
2728 (s390x-vx-linux64.c): Remove.
2729 (s390x-tevx-linux64.c): Remove.
2730 (tic6x-c64xp-linux.c): Remove.
2731 (tic6x-c64x-linux.c): Remove.
2732 (tic6x-c62x-linux.c): Remove.
2733 (reg-sh.c): Remove.
2734 (reg-sparc64.c): Remove.
2735 (reg-spu.c): Remove.
2736 (amd64.c): Remove.
2737 (amd64-linux.c): Remove.
2738 (amd64-avx.c): Remove.
2739 (amd64-avx-linux.c): Remove.
2740 (amd64-avx-avx512.c): Remove.
2741 (amd64-avx-avx512-linux.c): Remove.
2742 (amd64-mpx.c): Remove.
2743 (amd64-mpx-linux.c): Remove.
2744 (amd64-avx-mpx-avx512-pku.c): Remove.
2745 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2746 (amd64-avx-mpx.c): Remove.
2747 (amd64-avx-mpx-linux.c): Remove.
2748 (x32.c): Remove.
2749 (x32-linux.c): Remove.
2750 (x32-avx.c): Remove.
2751 (x32-avx-linux.c): Remove.
2752 (x32-avx-avx512.c): Remove.
2753 (x32-avx-avx512-linux.c): Remove.
2754 (reg-xtensa.c): Remove.
2755 (reg-tilegx.c): Remove.
2756 (reg-tilegx32.c): Remove.
2757
27582017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2759
2760 * Makefile.in (SFILES): Add "common/environ.c".
2761 (OBJS): Add "common/environ.h".
2762
27632017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2764
2765 * configure.ac: Check if the fs_base and gs_base members of
2766 `struct user_regs_struct' exist.
2767 * config.in: Regenerated.
2768 * configure: Likewise.
2769
27702017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2771
2772 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2773 target_read_memory.
2774 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2775 (get_next_pcs_syscall_next_pc): Likewise.
2776
27772016-12-23 Luis Machado <lgustavo@codesourcery.com>
2778
2779 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2780 * nto-x86-low.c: Likewise.
2781
27822016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2783
2784 * Makefile.in: Include disable-implicit-rules.mk.
2785
27862016-11-23 Pedro Alves <palves@redhat.com>
2787
2788 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2789 (debug_vprintf): Use std::chrono::steady_clock instead of
2790 gettimeofday. Use '.' instead of ':'.
2791 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2792 (get_timestamp): Use std::chrono::steady_clock instead of
2793 gettimeofday.
2794
27952016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2796
2797 * Makefile.in: Fix whitespace formatting.
2798
27992016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2800
2801 * Makefile.in (SFILES, OBS): Flatten list and order
2802 alphabetically.
2803
28042016-11-23 Pedro Alves <palves@redhat.com>
2805
2806 * event-loop.c (handle_file_event): Use warning.
2807 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2808 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2809 Use warning.
2810
28112016-11-23 Pedro Alves <palves@redhat.com>
2812
2813 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2814 output.
2815 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2816 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2817 debug_printf and debug_flush for debug output.
2818 * server.c (handle_general_set): Likewise.
2819 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2820 output.
2821
28222016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2823
2824 * Makefile.in (.c.o): Replace rule with ...
2825 (%.o: %.c): ... this one.
2826
28272016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2828
2829 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2830 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2831 make.
2832 * configure.ac: Remove checks for the make program.
2833 * configure: Re-generate.
2834
28352016-10-28 Pedro Alves <palves@redhat.com>
2836
2837 * Makefile.in (CXX_DIALECT): Get from configure.
2838 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2839 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2840 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2841 * config.in: Regenerate.
2842 * configure: Regenerate.
2843
28442016-10-27 Yao Qi <yao.qi@linaro.org>
2845
2846 * linux-low.c (linux_supports_range_stepping): Return true if
2847 can_software_single_step return true.
2848
28492016-10-27 Yao Qi <yao.qi@linaro.org>
2850
2851 * inferiors.c (find_inferior_in_random): New function.
2852 * inferiors.h (find_inferior_in_random): Declare.
2853 * linux-low.c (linux_wait_for_event_filtered): Call
2854 find_inferior_in_random instead of find_inferior.
2855
28562016-10-27 Yao Qi <yao.qi@linaro.org>
2857
2858 * linux-low.c (linux_wait_1): If single-step breakpoints are
2859 inserted, remove them.
2860
28612016-10-26 Pedro Alves <palves@redhat.com>
2862
2863 * linux-low.c (handle_extended_wait): Link parent/child fork
2864 threads.
2865 (linux_wait_1): Unlink them.
2866 (linux_set_resume_request): Ignore resume requests for
2867 already-resumed and unhandled fork child threads.
2868 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2869 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2870 New functions.
2871 (handle_v_requests) <vCont>: Don't call require_running.
2872 * server.h (in_queued_stop_replies): New declaration.
2873
28742016-10-24 Yao Qi <yao.qi@linaro.org>
2875
2876 PR server/20733
2877 * linux-aarch64-low.c (append_insns): Cast the return value to
2878 'uint32_t *'.
2879
28802016-10-10 Yao Qi <yao.qi@linaro.org>
2881
2882 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2883
28842016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2885
2886 * target.c (target_supports_multi_process): New function, moved
2887 from...
2888 * target.h (target_supports_multi_process): ... here. Remove
2889 macro.
2890
28912016-10-05 Tom Tromey <tom@tromey.com>
2892
2893 PR remote/20655:
2894 * tracepoint.c (handle_tracepoint_bkpts): Check
2895 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2896
28972016-10-05 Yao Qi <yao.qi@linaro.org>
2898
2899 * configure.srv: Update the path of arm-*.xml files.
2900
29012016-10-05 Terry Guo <terry.guo@arm.com>
2902 Yao Qi <yao.qi@linaro.org>
2903
2904 * Makefile.in: Adjust the path of rules.
2905 * configure.srv: Update the path of xml files.
2906 * regformats/arm-with-iwmmxt.dat: Regenerated.
2907 * regformats/arm-with-neon.dat: Likewise.
2908 * regformats/arm-with-vfpv2.dat: Likewise.
2909 * regformats/arm-with-vfpv3.dat Likewise.
2910
29112016-09-30 Yao Qi <yao.qi@linaro.org>
2912
2913 PR gdbserver/20627
2914 * target.c (target_stop_and_wait): Don't call
2915 target_continue_no_signal, use resume_stop instead.
2916
29172016-09-26 Yao Qi <yao.qi@linaro.org>
2918
2919 * linux-low.c (linux_wait_1): Call debug_exit.
2920
29212016-09-23 Pedro Alves <palves@redhat.com>
2922
2923 * Makefile.in (SFILES): Add common/new-op.c.
2924 (OBS): Add common/new-op.o.
2925 (new-op.o): New rule.
2926
29272016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2928
2929 * .gitinore: Ignore more files.
2930
29312016-09-21 Yao Qi <yao.qi@linaro.org>
2932
2933 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2934 23.
2935
29362016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2937
2938 * server.c (start_inferior): Call target_mourn_inferior instead of
2939 mourn_inferior; pass ptid_t argument to it.
2940 (resume): Likewise.
2941 (handle_target_event): Likewise.
2942 * target.c (target_mourn_inferior): New function.
2943 * target.h (mourn_inferior): Delete macro.
2944
29452016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2946
2947 * linux-low.c (lwp_is_stepping): New function.
2948
29492016-09-06 Carl Love <cel@us.ibm.com>
2950
2951 * server.c (start_inferior): Fixed comment, requested comment change
2952 didn't get updated correctly. Removed reference to ptrace () call as
2953 it is only true on Linux systems.
2954
29552016-09-06 Carl Love <cel@us.ibm.com>
2956
2957 * server.c (start_inferior): Do not call
2958 function target_post_create_inferior () if the
2959 inferior process has already exited.
2960
29612016-09-05 Pedro Alves <palves@redhat.com>
2962
2963 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2964 (COMPILE.pre, CC_LD): Use CXX directly.
2965 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2966 * acinclude.m4: Don't include build-with-cxx.m4.
2967 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2968 * configure: Regenerate.
2969
29702016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2971
2972 PR gdb/19495
2973 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2974 call writing data to own_buf.
2975
29762016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2977
2978 * target.c (mywait): Call target_wait instead of
2979 the_target->wait.
2980 (target_wait): New function.
2981
29822016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2983
2984 * server.c (start_inferior): New variable 'ptid'. Replace calls
2985 to the_target->resume by target_continue{,_no_signal}, depending
2986 on the case.
2987 * target.c (target_stop_and_wait): Call target_continue_no_signal
2988 instead of the_target->resume.
2989 (target_continue): New function.
2990
29912016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2992
2993 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2994
29952016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2996
2997 PR server/20491
2998 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2999 ps_prochandle.
3000 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3001 * linux-arm-low.c (ps_get_thread_area): Likewise.
3002 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3003 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3004 * linux-mips-low.c (ps_get_thread_area): Likewise.
3005 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3006 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3007 * linux-x86-low.c (ps_get_thread_area): Likewise.
3008 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3009
30102016-08-19 Pedro Alves <palves@redhat.com>
3011
3012 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3013
30142016-08-19 Pedro Alves <palves@redhat.com>
3015
3016 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3017 comment. Use memcpy instead of casting through unsigned long.
3018
30192016-08-19 Pedro Alves <palves@redhat.com>
3020
3021 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3022 allocating around 0x80000000.
3023
30242016-08-19 Pedro Alves <palves@redhat.com>
3025
3026 PR gdb/20415
3027 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3028 (x32-avx512-linux-ipa.o): New rules.
3029 * configure.ac (x86_64-*-linux*): New x32 check.
3030 * configure.srv (ipa_x32_linux_regobj): New.
3031 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3032 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3033 descriptions.
3034 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3035 descriptions.
3036 * configure: Regenerate.
3037
30382016-08-09 Pedro Alves <palves@redhat.com>
3039
3040 PR gdb/18653
3041 * Makefile.in (OBS): Add signals-state-save-restore.o.
3042 (signals-state-save-restore.o): New rule.
3043 * config.in: Regenerate.
3044 * configure: Regenerate.
3045 * linux-low.c: Include "signals-state-save-restore.h".
3046 (linux_create_inferior): Call
3047 restore_original_signals_state.
3048 * server.c: Include "dispositions-save-restore.h".
3049 (captured_main): Call save_original_signals_state.
3050
30512016-08-05 Pedro Alves <palves@redhat.com>
3052
3053 * configure: Regenerate.
3054
30552016-08-04 Yao Qi <yao.qi@linaro.org>
3056
3057 * linux-low.c (regsets_fetch_inferior_registers): Check
3058 errno is ESRCH or not.
3059
30602016-08-02 Yao Qi <yao.qi@linaro.org>
3061
3062 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3063 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3064 (thread_db_load_search): Update.
3065 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3066 td_ta_set_event and td_ta_event_getmsg.
3067
30682016-07-26 Pedro Alves <palves@redhat.com>
3069
3070 PR server/20414
3071 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3072 of unsigned long for 64-bit registers and use uint32_t instead of
3073 unsigned int for 32-bit registers.
3074
30752016-07-26 Pedro Alves <palves@redhat.com>
3076
3077 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3078 to 'ptrace'.
3079
30802016-07-21 Tom Tromey <tom@tromey.com>
3081
3082 * configure: Rebuild.
3083
30842016-07-21 Yao Qi <yao.qi@linaro.org>
3085
3086 * mem-break.c (find_gdb_breakpoint): Cast bp to
3087 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3088
30892016-07-21 Yao Qi <yao.qi@linaro.org>
3090
3091 * server.c (handle_v_requests): Support s and S actions
3092 if target_supports_software_single_step return true.
3093
30942016-07-21 Yao Qi <yao.qi@linaro.org>
3095
3096 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3097 is resume_step, call maybe_hw_step.
3098 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3099 and unstop them.
3100 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3101 breakpoints or not.
3102 (proceed_one_lwp): If resume request is resume_step, install
3103 reinsert breakpoints and call maybe_hw_step.
3104
31052016-07-21 Yao Qi <yao.qi@linaro.org>
3106
3107 * linux-low.c (proceed_one_lwp): Declare.
3108 (linux_resume_one_thread): Remove local variable 'step'.
3109 Lift code enqueue signal. Call proceed_one_lwp instead of
3110 linux_resume_one_lwp.
3111
31122016-07-21 Yao Qi <yao.qi@linaro.org>
3113
3114 * linux-low.c (linux_resume_one_thread): Call
3115 enqueue_pending_signal.
3116
31172016-07-21 Yao Qi <yao.qi@linaro.org>
3118
3119 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3120 * inferiors.c (do_restore_current_thread_cleanup): New function.
3121 (make_cleanup_restore_current_thread): Likewise.
3122 * linux-low.c (install_software_single_step_breakpoints): Call
3123 make_cleanup_restore_current_thread. Switch current_thread to
3124 thread.
3125
31262016-07-21 Yao Qi <yao.qi@linaro.org>
3127
3128 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3129 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3130 (clone_one_breakpoint): Likewise.
3131 (delete_reinsert_breakpoints): Change parameter to thread.
3132 Callers updated.
3133 (has_reinsert_breakpoints): Likewise.
3134 (uninsert_reinsert_breakpoints): Likewise.
3135 (reinsert_reinsert_breakpoints): Likewise.
3136 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3137 (delete_reinsert_breakpoints): Likewise.
3138 (reinsert_reinsert_breakpoints): Likewise.
3139 (uninsert_reinsert_breakpoints): Likewise.
3140 (has_reinsert_breakpoints): Likewise.
3141
31422016-07-21 Yao Qi <yao.qi@linaro.org>
3143
3144 * inferiors.c (get_thread_process): Make parameter const.
3145 * inferiors.h (get_thread_process): Update declaration.
3146 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3147 Add new parameters child_thread and parent_thread. Callers
3148 updated.
3149 * mem-break.h (clone_all_breakpoints): Update declaration.
3150
31512016-07-21 Yao Qi <yao.qi@linaro.org>
3152
3153 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3154 <command_list, handler>: Remove.
3155 (struct gdb_breakpoint): New.
3156 (struct other_breakpoint): New.
3157 (struct reinsert_breakpoint): New.
3158 (is_gdb_breakpoint): New function.
3159 (any_persistent_commands): Update command_list if
3160 is_gdb_breakpoint returns true.
3161 (set_breakpoint): Create breakpoints according to their types.
3162 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3163 (set_gdb_breakpoint_1): Likewise.
3164 (set_gdb_breakpoint): Likewise.
3165 (clear_breakpoint_conditions): Change parameter type to
3166 'struct gdb_breakpoint *'.
3167 (clear_breakpoint_commands): Likewise.
3168 (clear_breakpoint_conditions_and_commands): Likewise.
3169 (add_condition_to_breakpoint): Likewise.
3170 (add_breakpoint_condition): Likewise.
3171 (add_commands_to_breakpoint): Likewise.
3172 (check_breakpoints): Check other_breakpoint.
3173 (clone_one_breakpoint): Clone breakpopint according to its type.
3174 * mem-break.h (struct gdb_breakpoint): Declare.
3175 (set_gdb_breakpoint): Update declaration.
3176 (clear_breakpoint_conditions_and_commands): Likewise.
3177 (add_breakpoint_condition): Likewise.
3178 (add_breakpoint_commands): Likewise.
3179 * server.c (process_point_options): Change parameter type to
3180 'struct gdb_breakpoint *'.
3181
31822016-07-21 Yao Qi <yao.qi@linaro.org>
3183
3184 * mem-break.c (set_breakpoint_at): Rename it to ...
3185 (set_breakpoint_type_at): ... it.
3186 (set_breakpoint_at): Call set_breakpoint_type_at.
3187 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3188 * mem-break.h (set_breakpoint_at): Update comments.
3189
31902016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3191
3192 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3193 to buf parameter.
3194 (nios2_store_gregset): Likewise.
3195
31962016-07-01 Pedro Alves <palves@redhat.com>
3197 Antoine Tremblay <antoine.tremblay@ericsson.com>
3198
3199 * linux-low.c: Change interface to take the target lwp_info
3200 pointer directly and return void. Handle detaching from a zombie
3201 thread.
3202 (linux_detach_lwp_callback): New function.
3203 (linux_detach): Detach from the leader thread after detaching from
3204 the clone threads.
3205
32062016-06-28 Yao Qi <yao.qi@linaro.org>
3207
3208 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3209 for variable new_offset.
3210 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3211 (aarch64_ftrace_insn_reloc_cb): Likewise.
3212 (aarch64_ftrace_insn_reloc_tb): Likewise.
3213 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3214 PRIx64 instead of PRIx32.
3215
32162016-06-28 Yao Qi <yao.qi@linaro.org>
3217
3218 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3219 (the_low_target): Install arm_get_syscall_trapinfo.
3220
32212016-06-28 Yao Qi <yao.qi@linaro.org>
3222
3223 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3224 function.
3225 (the_low_target): Install aarch64_get_syscall_trapinfo.
3226
32272016-06-28 Yao Qi <yao.qi@linaro.org>
3228
3229 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3230 Callers updated.
3231 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3232 Remove parameter sysno.
3233 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3234 sysret.
3235
32362016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3237
3238 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3239 (s390_emit_ne_goto): Likewise.
3240 (s390_emit_lt_goto): Likewise.
3241 (s390_emit_le_goto): Likewise.
3242 (s390_emit_gt_goto): Likewise.
3243 (s390_emit_ge_goto): Likewise.
3244 (s390x_emit_eq_goto): Likewise.
3245 (s390x_emit_ne_goto): Likewise.
3246 (s390x_emit_lt_goto): Likewise.
3247 (s390x_emit_le_goto): Likewise.
3248 (s390x_emit_gt_goto): Likewise.
3249 (s390x_emit_ge_goto): Likewise.
3250 (s390_emit_ops_impl): Mark variable static.
3251 (s390x_emit_ops): Likewise.
3252
32532016-06-17 Yao Qi <yao.qi@linaro.org>
3254
3255 * linux-low.c (handle_extended_wait): Call
3256 uninsert_reinsert_breakpoints for the parent process. Remove
3257 reinsert breakpoints from the child process. Reinsert them to
3258 the parent process when vfork is done.
3259 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3260 (reinsert_reinsert_breakpoints): New function.
3261 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3262 (reinsert_reinsert_breakpoints): Declare.
3263
32642016-06-17 Yao Qi <yao.qi@linaro.org>
3265
3266 * linux-low.c (handle_extended_wait): If the parent is doing
3267 step-over, remove the reinsert breakpoints from the forked child.
3268
32692016-06-17 Yao Qi <yao.qi@linaro.org>
3270
3271 * linux-low.c (unsuspend_all_lwps): Declare.
3272 (linux_low_filter_event): If thread exited, call finish_step_over.
3273 If step-over is finished, unsuspend other threads.
3274
32752016-06-17 Yao Qi <yao.qi@linaro.org>
3276
3277 * linux-low.c (linux_resume_one_lwp_throw): Assert
3278 has_reinsert_breakpoints returns false.
3279 * mem-break.c (delete_disabled_breakpoints): Assert
3280 bp type isn't reinsert_breakpoint.
3281
32822016-06-17 Yao Qi <yao.qi@linaro.org>
3283
3284 * linux-low.c (maybe_hw_step): New function.
3285 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3286 (finish_step_over): Switch current_thread to lwp temporarily,
3287 and assert has_reinsert_breakpoints returns true.
3288 (proceed_one_lwp): Call maybe_hw_step.
3289 * mem-break.c (has_reinsert_breakpoints): New function.
3290 * mem-break.h (has_reinsert_breakpoints): Declare.
3291
32922016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3293
3294 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3295
32962016-05-17 Yao Qi <yao.qi@linaro.org>
3297
3298 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3299 instead of find_inferior.
3300
33012016-05-05 Yao Qi <yao.qi@linaro.org>
3302
3303 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3304 Initialize res to zero.
3305
33062016-05-05 Yao Qi <yao.qi@linaro.org>
3307
3308 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3309 to uint32_t.
3310
33112016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3312
3313 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3314 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3315 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3316
33172016-04-28 Par Olsson <par.olsson@windriver.com>
3318 Simon Marchi <simon.marchi@ericsson.com>
3319
3320 * tracepoint.c (write_inferior_int8): New function.
3321 (cmd_qtenable_disable): Write enable flag using
3322 write_inferior_int8.
3323
33242016-04-25 Yao Qi <yao.qi@linaro.org>
3325
3326 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3327 (need_step_over_p): Return zero if the LWP has pending signals
3328 can be delivered on software single step target.
3329
33302016-04-25 Yao Qi <yao.qi@linaro.org>
3331
3332 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3333 return instead of error.
3334
33352016-04-22 Yao Qi <yao.qi@linaro.org>
3336
3337 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3338 to 23.
3339
33402016-04-22 Yao Qi <yao.qi@linaro.org>
3341
3342 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3343 signal when stepping over breakpoint with software single
3344 step.
3345
33462016-04-21 Pedro Alves <palves@redhat.com>
3347
3348 * linux-s390-low.c (s390_collect_ptrace_register)
3349 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3350 add casts.
3351 (s390_check_regset): Use void * instead of gdb_byte *.
3352
33532016-04-20 Pedro Alves <palves@redhat.com>
3354
3355 * configure: Renegerate.
3356
33572016-04-20 Yao Qi <yao.qi@linaro.org>
3358
3359 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3360 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3361 number 16.
3362 (arm_store_gregset): Likewise.
3363
33642016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3365
3366 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3367 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3368 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3369 (amd64-avx-mpx-linux.c): New rules.
3370 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3371 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3372 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3373 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3374 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3375 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3376 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3377 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3378 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3379 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3380 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3381 * linux-x86-low.c (x86_linux_read_description): Add case for
3382 X86_XSTATE_AVX_MPX_MASK.
3383 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3384 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3385 init_registers_i386_avx_mpx_linux.
3386 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3387 (initialize_low_tracepoint): Call
3388 init_registers_i386_avx_mpx_linux.
3389 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3390 (initialize_low_tracepoint): Call
3391 init_registers_amd64_avx_mpx_linux.
3392 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3393 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3394 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3395 declarations.
3396
33972016-04-18 Pedro Alves <palves@redhat.com>
3398
3399 * configure: Regenerate.
3400
34012016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3402
3403 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3404 (aarch64_emit_sub): Likewise.
3405
34062016-04-12 Pedro Alves <palves@redhat.com>
3407
3408 * utils.c (prepare_to_throw_exception): Delete.
3409
34102016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3411
3412 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3413
34142016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3415
3416 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3417
34182016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3419
3420 * linux-aarch64-ipa.c: Add <elf.h> include.
3421 * linux-ppc-ipa.c: Add <elf.h> include.
3422 * linux-s390-ipa.c: Add <elf.h> include.
3423
34242016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3425
3426 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3427 (get_raw_reg_ptr): Likewise.
3428 (get_trace_state_variable_value_ptr): Likewise.
3429 (set_trace_state_variable_value_ptr): Likewise.
3430 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3431 char *.
3432
34332016-03-31 Wei-cheng Wang <cole945@gmail.com>
3434 Marcin Kościelnicki <koriakin@0x04.net>
3435
3436 PR/17221
3437 * linux-ppc-low.c (emit_insns): New function.
3438 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3439 (ppc_emit_prologue): New function.
3440 (ppc_emit_epilogue): New function.
3441 (ppc_emit_add): New function.
3442 (ppc_emit_sub): New function.
3443 (ppc_emit_mul): New function.
3444 (ppc_emit_lsh): New function.
3445 (ppc_emit_rsh_signed): New function.
3446 (ppc_emit_rsh_unsigned): New function.
3447 (ppc_emit_ext): New function.
3448 (ppc_emit_zero_ext): New function.
3449 (ppc_emit_log_not): New function.
3450 (ppc_emit_bit_and): New function.
3451 (ppc_emit_bit_or): New function.
3452 (ppc_emit_bit_xor): New function.
3453 (ppc_emit_bit_not): New function.
3454 (ppc_emit_equal): New function.
3455 (ppc_emit_less_signed): New function.
3456 (ppc_emit_less_unsigned): New function.
3457 (ppc_emit_ref): New function.
3458 (ppc_emit_const): New function.
3459 (ppc_emit_reg): New function.
3460 (ppc_emit_pop): New function.
3461 (ppc_emit_stack_flush): New function.
3462 (ppc_emit_swap): New function.
3463 (ppc_emit_stack_adjust): New function.
3464 (ppc_emit_call): New function.
3465 (ppc_emit_int_call_1): New function.
3466 (ppc_emit_void_call_2): New function.
3467 (ppc_emit_if_goto): New function.
3468 (ppc_emit_goto): New function.
3469 (ppc_emit_eq_goto): New function.
3470 (ppc_emit_ne_goto): New function.
3471 (ppc_emit_lt_goto): New function.
3472 (ppc_emit_le_goto): New function.
3473 (ppc_emit_gt_goto): New function.
3474 (ppc_emit_ge_goto): New function.
3475 (ppc_write_goto_address): New function.
3476 (ppc_emit_ops_impl): New static variable.
3477 (ppc64v1_emit_prologue): New function.
3478 (ppc64v2_emit_prologue): New function.
3479 (ppc64_emit_epilogue): New function.
3480 (ppc64_emit_add): New function.
3481 (ppc64_emit_sub): New function.
3482 (ppc64_emit_mul): New function.
3483 (ppc64_emit_lsh): New function.
3484 (ppc64_emit_rsh_signed): New function.
3485 (ppc64_emit_rsh_unsigned): New function.
3486 (ppc64_emit_ext): New function.
3487 (ppc64_emit_zero_ext): New function.
3488 (ppc64_emit_log_not): New function.
3489 (ppc64_emit_bit_and): New function.
3490 (ppc64_emit_bit_or): New function.
3491 (ppc64_emit_bit_xor): New function.
3492 (ppc64_emit_bit_not): New function.
3493 (ppc64_emit_equal): New function.
3494 (ppc64_emit_less_signed): New function.
3495 (ppc64_emit_less_unsigned): New function.
3496 (ppc64_emit_ref): New function.
3497 (ppc64_emit_const): New function.
3498 (ppc64v1_emit_reg): New function.
3499 (ppc64v2_emit_reg): New function.
3500 (ppc64_emit_pop): New function.
3501 (ppc64_emit_stack_flush): New function.
3502 (ppc64_emit_swap): New function.
3503 (ppc64v1_emit_call): New function.
3504 (ppc64v2_emit_call): New function.
3505 (ppc64v1_emit_int_call_1): New function.
3506 (ppc64v2_emit_int_call_1): New function.
3507 (ppc64v1_emit_void_call_2): New function.
3508 (ppc64v2_emit_void_call_2): New function.
3509 (ppc64_emit_if_goto): New function.
3510 (ppc64_emit_eq_goto): New function.
3511 (ppc64_emit_ne_goto): New function.
3512 (ppc64_emit_lt_goto): New function.
3513 (ppc64_emit_le_goto): New function.
3514 (ppc64_emit_gt_goto): New function.
3515 (ppc64_emit_ge_goto): New function.
3516 (ppc64v1_emit_ops_impl): New static variable.
3517 (ppc64v2_emit_ops_impl): New static variable.
3518 (ppc_emit_ops): New function.
3519 (linux_low_target): Wire in ppc_emit_ops.
3520
35212016-03-31 Wei-cheng Wang <cole945@gmail.com>
3522 Marcin Kościelnicki <koriakin@0x04.net>
3523
3524 PR/17221
3525 * Makefile.in: Add powerpc-*-ipa.o
3526 * configure.srv: Add ipa_obj for powerpc*-linux.
3527 * linux-ppc-ipa.c: New file.
3528 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3529 includes.
3530 (PPC_FIELD): New macro.
3531 (PPC_SEXT): New macro.
3532 (PPC_OP6): New macro.
3533 (PPC_BO): New macro.
3534 (PPC_LI): New macro.
3535 (PPC_BD): New macro.
3536 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3537 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3538 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3539 (ppc_get_thread_area): New function.
3540 (is_elfv2_inferior): New function.
3541 (gen_ds_form): New function.
3542 (GEN_STD): New macro.
3543 (GEN_STDU): New macro.
3544 (GEN_LD): New macro.
3545 (GEN_LDU): New macro.
3546 (gen_d_form): New function.
3547 (GEN_ADDI): New macro.
3548 (GEN_ADDIS): New macro.
3549 (GEN_LI): New macro.
3550 (GEN_LIS): New macro.
3551 (GEN_ORI): New macro.
3552 (GEN_ORIS): New macro.
3553 (GEN_LWZ): New macro.
3554 (GEN_STW): New macro.
3555 (GEN_STWU): New macro.
3556 (gen_xfx_form): New function.
3557 (GEN_MFSPR): New macro.
3558 (GEN_MTSPR): New macro.
3559 (GEN_MFCR): New macro.
3560 (GEN_MTCR): New macro.
3561 (GEN_SYNC): New macro.
3562 (GEN_LWSYNC): New macro.
3563 (gen_x_form): New function.
3564 (GEN_OR): New macro.
3565 (GEN_MR): New macro.
3566 (GEN_LWARX): New macro.
3567 (GEN_STWCX): New macro.
3568 (GEN_CMPW): New macro.
3569 (gen_md_form): New function.
3570 (GEN_RLDICL): New macro.
3571 (GEN_RLDICR): New macro.
3572 (gen_i_form): New function.
3573 (GEN_B): New macro.
3574 (GEN_BL): New macro.
3575 (gen_b_form): New function.
3576 (GEN_BNE): New macro.
3577 (GEN_LOAD): New macro.
3578 (GEN_STORE): New macro.
3579 (gen_limm): New function.
3580 (gen_atomic_xchg): New function.
3581 (gen_call): New function.
3582 (ppc_relocate_instruction): New function.
3583 (ppc_install_fast_tracepoint_jump_pad): New function.
3584 (ppc_get_min_fast_tracepoint_insn_len): New function.
3585 (ppc_get_ipa_tdesc_idx): New function.
3586 (the_low_target): Wire in the new functions.
3587 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3588 tdescs.
3589 * linux-ppc-tdesc.h: New file.
3590
35912016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3592
3593 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3594 (alloc_jump_pad_buffer): New function.
3595 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3596 (alloc_jump_pad_buffer): New function.
3597 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3598 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3599 (alloc_jump_pad_buffer): New function.
3600 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3601 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3602 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3603 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3604
36052016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3606
3607 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3608 * linux-amd64-ipa.c: Likewise.
3609 * linux-i386-ipa.c: Likewise.
3610 * linux-s390-ipa.c: Likewise.
3611 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3612 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3613 set_trace_state_variable_value_ptr.
3614 (struct ipa_sym_addresses): Likewise.
3615 (symbol_list): Likewise.
3616 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3617 accessing gdb_collect directly.
3618 (gdb_collect_ptr_type): New typedef.
3619 (get_raw_reg_ptr_type): New typedef.
3620 (get_trace_state_variable_value_ptr_type): New typedef.
3621 (set_trace_state_variable_value_ptr_type): New typedef.
3622 (gdb_collect_ptr): New global.
3623 (get_raw_reg_ptr): New global.
3624 (get_trace_state_variable_value_ptr): New global.
3625 (set_trace_state_variable_value_ptr): New global.
3626 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3627 accessing get_raw_reg directly.
3628 (get_get_tsv_func_addr): Likewise for
3629 get_trace_state_variable_value_ptr.
3630 (get_set_tsv_func_addr): Likewise for
3631 set_trace_state_variable_value_ptr.
3632 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3633
36342016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3635
3636 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3637
36382016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3639
3640 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3641 packets.
3642 (relocate_instruction): Remove own_buf.
3643 * server.c (own_buf): Make global.
3644 (handle_v_requests): Make global.
3645 * server.h (own_buf): New declaration.
3646 (handle_v_requests): New prototype.
3647
36482016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3649
3650 PR 18377
3651 * linux-s390-low.c (add_insns): New function.
3652 (s390_emit_prologue): New function.
3653 (s390_emit_epilogue): New function.
3654 (s390_emit_add): New function.
3655 (s390_emit_sub): New function.
3656 (s390_emit_mul): New function.
3657 (s390_emit_lsh): New function.
3658 (s390_emit_rsh_signed): New function.
3659 (s390_emit_rsh_unsigned): New function.
3660 (s390_emit_ext): New function.
3661 (s390_emit_log_not): New function.
3662 (s390_emit_bit_and): New function.
3663 (s390_emit_bit_or): New function.
3664 (s390_emit_bit_xor): New function.
3665 (s390_emit_bit_not): New function.
3666 (s390_emit_equal): New function.
3667 (s390_emit_less_signed): New function.
3668 (s390_emit_less_unsigned): New function.
3669 (s390_emit_ref): New function.
3670 (s390_emit_if_goto): New function.
3671 (s390_emit_goto): New function.
3672 (s390_write_goto_address): New function.
3673 (s390_emit_litpool): New function.
3674 (s390_emit_const): New function.
3675 (s390_emit_call): New function.
3676 (s390_emit_reg): New function.
3677 (s390_emit_pop): New function.
3678 (s390_emit_stack_flush): New function.
3679 (s390_emit_zero_ext): New function.
3680 (s390_emit_swap): New function.
3681 (s390_emit_stack_adjust): New function.
3682 (s390_emit_set_r2): New function.
3683 (s390_emit_int_call_1): New function.
3684 (s390_emit_void_call_2): New function.
3685 (s390_emit_eq_goto): New function.
3686 (s390_emit_ne_goto): New function.
3687 (s390_emit_lt_goto): New function.
3688 (s390_emit_le_goto): New function.
3689 (s390_emit_gt_goto): New function.
3690 (s390_emit_ge_goto): New function.
3691 (s390x_emit_prologue): New function.
3692 (s390x_emit_epilogue): New function.
3693 (s390x_emit_add): New function.
3694 (s390x_emit_sub): New function.
3695 (s390x_emit_mul): New function.
3696 (s390x_emit_lsh): New function.
3697 (s390x_emit_rsh_signed): New function.
3698 (s390x_emit_rsh_unsigned): New function.
3699 (s390x_emit_ext): New function.
3700 (s390x_emit_log_not): New function.
3701 (s390x_emit_bit_and): New function.
3702 (s390x_emit_bit_or): New function.
3703 (s390x_emit_bit_xor): New function.
3704 (s390x_emit_bit_not): New function.
3705 (s390x_emit_equal): New function.
3706 (s390x_emit_less_signed): New function.
3707 (s390x_emit_less_unsigned): New function.
3708 (s390x_emit_ref): New function.
3709 (s390x_emit_if_goto): New function.
3710 (s390x_emit_const): New function.
3711 (s390x_emit_call): New function.
3712 (s390x_emit_reg): New function.
3713 (s390x_emit_pop): New function.
3714 (s390x_emit_stack_flush): New function.
3715 (s390x_emit_zero_ext): New function.
3716 (s390x_emit_swap): New function.
3717 (s390x_emit_stack_adjust): New function.
3718 (s390x_emit_int_call_1): New function.
3719 (s390x_emit_void_call_2): New function.
3720 (s390x_emit_eq_goto): New function.
3721 (s390x_emit_ne_goto): New function.
3722 (s390x_emit_lt_goto): New function.
3723 (s390x_emit_le_goto): New function.
3724 (s390x_emit_gt_goto): New function.
3725 (s390x_emit_ge_goto): New function.
3726 (s390_emit_ops): New function.
3727 (struct linux_target_ops): Fill in emit_ops hook.
3728
37292016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3730
3731 PR 18377
3732 * Makefile.in: Add s390 IPA files.
3733 * configure.srv: Build IPA for s390.
3734 * linux-s390-ipa.c: New file.
3735 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3736 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3737 (tdesc_s390_linux32): Likewise.
3738 (init_registers_s390_linux32v1): Likewise.
3739 (tdesc_s390_linux32v1): Likewise.
3740 (init_registers_s390_linux32v2): Likewise.
3741 (tdesc_s390_linux32v2): Likewise.
3742 (init_registers_s390_linux64): Likewise.
3743 (tdesc_s390_linux64): Likewise.
3744 (init_registers_s390_linux64v1): Likewise.
3745 (tdesc_s390_linux64v1): Likewise.
3746 (init_registers_s390_linux64v2): Likewise.
3747 (tdesc_s390_linux64v2): Likewise.
3748 (init_registers_s390_te_linux64): Likewise.
3749 (tdesc_s390_te_linux64): Likewise.
3750 (init_registers_s390_vx_linux64): Likewise.
3751 (tdesc_s390_vx_linux64): Likewise.
3752 (init_registers_s390_tevx_linux64): Likewise.
3753 (tdesc_s390_tevx_linux64): Likewise.
3754 (init_registers_s390x_linux64): Likewise.
3755 (tdesc_s390x_linux64): Likewise.
3756 (init_registers_s390x_linux64v1): Likewise.
3757 (tdesc_s390x_linux64v1): Likewise.
3758 (init_registers_s390x_linux64v2): Likewise.
3759 (tdesc_s390x_linux64v2): Likewise.
3760 (init_registers_s390x_te_linux64): Likewise.
3761 (tdesc_s390x_te_linux64): Likewise.
3762 (init_registers_s390x_vx_linux64): Likewise.
3763 (tdesc_s390x_vx_linux64): Likewise.
3764 (init_registers_s390x_tevx_linux64): Likewise.
3765 (tdesc_s390x_tevx_linux64): Likewise.
3766 (have_hwcap_s390_vx): New static variable.
3767 (s390_arch_setup): Fill have_hwcap_s390_vx.
3768 (s390_get_thread_area): New function.
3769 (s390_ft_entry_gpr_esa): New const.
3770 (s390_ft_entry_gpr_zarch): New const.
3771 (s390_ft_entry_misc): New const.
3772 (s390_ft_entry_fr): New const.
3773 (s390_ft_entry_vr): New const.
3774 (s390_ft_main_31): New const.
3775 (s390_ft_main_64): New const.
3776 (s390_ft_exit_fr): New const.
3777 (s390_ft_exit_vr): New const.
3778 (s390_ft_exit_misc): New const.
3779 (s390_ft_exit_gpr_esa): New const.
3780 (s390_ft_exit_gpr_zarch): New const.
3781 (append_insns): New function.
3782 (s390_relocate_instruction): New function.
3783 (s390_install_fast_tracepoint_jump_pad): New function.
3784 (s390_get_min_fast_tracepoint_insn_len): New function.
3785 (s390_get_ipa_tdesc_idx): New function.
3786 (struct linux_target_ops): Wire in the above functions.
3787 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3788 * linux-s390-tdesc.h: New file.
3789
37902016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3791
3792 * linux-s390-low.c (s390_supports_tracepoints): New function.
3793 (struct linux_target_ops): Fill supports_tracepoints hook.
3794
37952016-03-18 Yao Qi <yao.qi@linaro.org>
3796
3797 * linux-low.c (lwp_signal_can_be_delivered): New function.
3798 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3799
38002016-03-18 Yao Qi <yao.qi@linaro.org>
3801
3802 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3803 0 if signal is enqueued. Remove 'signal' from one debugging
3804 message. Move one debugging message to some lines below.
3805 Remove code setting 'signal' to 0.
3806
38072016-03-18 Yao Qi <yao.qi@linaro.org>
3808
3809 * linux-low.c (linux_low_filter_event): Remove redundant
3810 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3811
38122016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3813
3814 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3815 (struct linux_target_ops): Wire in the above.
3816
38172016-03-03 Yao Qi <yao.qi@linaro.org>
3818
3819 * linux-low.c: Update comments to start_step_over.
3820
38212016-03-03 Yao Qi <yao.qi@linaro.org>
3822
3823 PR server/19736
3824 * linux-low.c (handle_extended_wait): Set child suspended
3825 if event_lwp->bp_reinsert isn't zero.
3826
38272016-03-02 Yao Qi <yao.qi@linaro.org>
3828
3829 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3830 enqueue_pending_signal.
3831
38322016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3833
3834 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3835 is actually loaded.
3836
38372016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3838
3839 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3840 (s390_regmap_3264) [!__s390x__]: New global.
3841 (s390_collect_ptrace_register): Skip map entries containing -1.
3842 (s390_supply_ptrace_register): Ditto.
3843 (s390_fill_gprs_high): New function.
3844 (s390_store_gprs_high): New function.
3845 (s390_regsets): Add NT_S390_HIGH_GPRS.
3846 (s390_get_hwcap): Enable on 31-bit.
3847 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3848 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3849 Detect NT_S390_HIGH_GPRS.
3850 (s390_usrregs_info_3264): Enable on 31-bit.
3851 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3852 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3853
38542016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3855
3856 PR gdb/13808
3857 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3858 * configure.srv: Ditto.
3859 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3860 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3861 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3862 (init_registers_amd64_linux): Remove prototype.
3863 (tdesc_amd64_linux): Remove declaration.
3864 (get_ipa_tdesc): New function.
3865 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3866 initialize remaining tdescs.
3867 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3868 (init_registers_i386_linux): Remove prototype.
3869 (tdesc_i386_linux): Remove declaration.
3870 (get_ipa_tdesc): New function.
3871 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3872 initialize remaining tdescs.
3873 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3874 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3875 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3876 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3877 (x86_get_ipa_tdesc_idx): New function.
3878 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3879 * linux-x86-tdesc.h: New file.
3880 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3881 (target_get_ipa_tdesc_idx): New macro.
3882 * tracepoint.c (ipa_tdesc_idx): New macro.
3883 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3884 (symbol_list): Add ipa_tdesc_idx.
3885 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3886 (ipa_tdesc): Remove.
3887 (ipa_tdesc_idx): New variable.
3888 (get_context_regcache): Use get_ipa_tdesc.
3889 (gdb_collect): Ditto.
3890 (gdb_probe): Ditto.
3891 * tracepoint.h (get_ipa_tdesc): New prototype.
3892 (ipa_tdesc): Remove.
3893
38942016-02-24 Pedro Alves <palves@redhat.com>
3895
3896 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3897 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3898 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3899 Factor out common code between the USE_SIGTRAP_SIGINFO and
3900 !USE_SIGTRAP_SIGINFO blocks.
3901 (linux_low_filter_event): Call save_stop_reason instead of
3902 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3903 Update comments.
3904 (linux_wait_1): Update comments.
3905
39062016-02-24 Wei-cheng Wang <cole945@gmail.com>
3907
3908 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3909 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3910 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3911 ppc_insert_point, ppc_remove_point.
3912
39132016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3914
3915 * linux-s390-low.c (s390_supports_z_point_type): New function.
3916 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3917
39182016-02-16 Yao Qi <yao.qi@linaro.org>
3919
3920 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3921 PC. Get pc from regcache_read_pc.
3922
39232016-02-12 Yao Qi <yao.qi@linaro.org>
3924
3925 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3926 or linux_get_pc_32bit.
3927 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3928
39292016-02-12 Yao Qi <yao.qi@linaro.org>
3930
3931 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3932 arm_linux_get_next_pcs_fixup.
3933
39342016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3935
3936 * tracepoint.c (x_tracepoint_action_download): Change
3937 write_inferior_data_ptr to write_inferior_data_pointer.
3938 (cmd_qtstart): Likewise.
3939 (write_inferior_data_ptr): Remove.
3940 (download_agent_expr): Change write_inferior_data_ptr to
3941 write_inferior_data_pointer.
3942 (download_tracepoint_1): Likewise.
3943 (download_tracepoint): Likewise.
3944 (download_trace_state_variables): Likewise.
3945
39462016-02-11 Wei-cheng Wang <cole945@gmail.com>
3947 Marcin Kościelnicki <koriakin@0x04.net>
3948
3949 * tracepoint.c (struct tracepoint_action_ops): Remove.
3950 (struct tracepoint_action): Remove ops.
3951 (m_tracepoint_action_download, r_tracepoint_action_download)
3952 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3953 size and offset accordingly.
3954 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3955 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3956 (tracepoint_action_send, tracepoint_action_download): New functions.
3957 Helpers for trace action handlers.
3958 (add_tracepoint_action): Remove setup actions ops.
3959 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3960
39612016-02-10 Yao Qi <yao.qi@linaro.org>
3962
3963 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3964
39652016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3966
3967 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3968 to AC_OUTPUT.
3969 * configure: Regenerate.
3970
39712016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3972
3973 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3974 void * to gdb_byte *.
3975 * linux-low.c (siginfo_fixup): Likewise.
3976 (linux_xfer_siginfo): Likewise.
3977 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3978 Likewise.
3979 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3980
39812016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3982
3983 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3984 to srv_tgtobj.
3985 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3986 to srv_tgtobj.
3987 * linux-x86-low.c [__x86_64__]: Include
3988 "nat/amd64-linux-siginfo.h".
3989 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3990 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3991 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3992 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3993 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3994 (cpt_si_fd, si_timerid, si_overrun): Move from
3995 nat/amd64-linux-siginfo.c.
3996 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3997
39982016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3999
4000 * server.c (skip_to_semicolon): Remove.
4001 (process_point_options): Use strchrnul instead of
4002 skip_to_semicolon.
4003
40042016-01-26 Yao Qi <yao.qi@linaro.org>
4005
4006 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4007 * linux-low.c (install_software_single_step_breakpoints): Don't
4008 call regcache_read_pc.
4009 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4010 argument pc.
4011
40122016-01-26 Yao Qi <yao.qi@linaro.org>
4013
4014 * linux-low.c (install_software_single_step_breakpoints): Call
4015 regcache_read_pc instead of get_pc.
4016
40172016-01-26 Yao Qi <yao.qi@linaro.org>
4018
4019 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4020 (unblock_async_io): Rename to ...
4021 (block_unblock_async_io): ... it. New function.
4022 (enable_async_io): Don't install SIGIO handler. Unblock it
4023 instead.
4024 (disable_async_io): Don't ignore SIGIO. Block it instead.
4025 (initialize_async_io): Install SIGIO handler. Don't call
4026 unblock_async_io.
4027
40282016-01-26 Yao Qi <yao.qi@linaro.org>
4029
4030 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4031 first character is '\003', call *the_target->request_interrupt.
4032
40332016-01-25 Yao Qi <yao.qi@linaro.org>
4034
4035 * remote-utils.c (new_thread_notify): Remove.
4036 (dead_thread_notify): Likewise.
4037 * remote-utils.h (new_thread_notify): Remove declaration.
4038 (dead_thread_notify): Likewise.
4039
40402016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4041
4042 * gdb.trace/pending.exp: Fix expected message on continue.
4043
40442016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4045
4046 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4047 it works properly on big-endian machines where sizeof (CORE_ADDR)
4048 != sizeof (void *).
4049
40502016-01-21 Pedro Alves <palves@redhat.com>
4051
4052 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4053 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4054 * configure: Regenerate.
4055
40562016-01-21 Yao Qi <yao.qi@linaro.org>
4057
4058 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4059 is_thumb and set it according to CPSR saved on the stack.
4060 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4061 arm_sigreturn_next_pc.
4062
40632016-01-18 Yao Qi <yao.qi@linaro.org>
4064
4065 * linux-low.c (linux_set_pc_64bit): New function.
4066 (linux_get_pc_64bit): New function.
4067 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4068 Declare.
4069 * linux-sparc-low.c (debug_threads): Remove declaration.
4070 (sparc_get_pc): Remove.
4071 (the_low_target): Use linux_get_pc_64bit instead of
4072 sparc_get_pc.
4073 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4074 (the_low_target): Use linux_get_pc_64bit and
4075 linux_set_pc_64bit.
4076
40772016-01-18 Yao Qi <yao.qi@linaro.org>
4078
4079 * linux-arm-low.c (debug_threads): Remove declaration.
4080 (arm_get_pc, arm_set_pc): Remove.
4081 (the_low_target): Use linux_get_pc_32bit and
4082 linux_set_pc_32bit.
4083 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4084 (the_low_target): Use linux_get_pc_32bit and
4085 linux_set_pc_32bit.
4086 * linux-cris-low.c (debug_threads): Remove declaration.
4087 (cris_get_pc, cris_set_pc,): Remove.
4088 (the_low_target): Use linux_get_pc_32bit and
4089 linux_set_pc_32bit.
4090 * linux-crisv32-low.c (debug_threads): Remove declaration.
4091 (cris_get_pc, cris_set_pc): Remove.
4092 (the_low_target): Use linux_get_pc_32bit and
4093 linux_set_pc_32bit.
4094 * linux-low.c: Include inttypes.h.
4095 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4096 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4097 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4098 (the_low_target): Use linux_get_pc_32bit and
4099 linux_set_pc_32bit.
4100 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4101 (the_low_target): Use linux_get_pc_32bit and
4102 linux_set_pc_32bit.
4103 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4104 (the_low_target): Use linux_get_pc_32bit and
4105 linux_set_pc_32bit.
4106 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4107 (the_low_target): Use linux_get_pc_32bit and
4108 linux_set_pc_32bit.
4109 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4110 (the_low_target): Use linux_get_pc_32bit and
4111 linux_set_pc_32bit.
4112
41132016-01-18 Gary Benson <gbenson@redhat.com>
4114
4115 * configure.ac (AC_FUNC_FORK): New check.
4116 * config.in: Regenerate.
4117 * configure: Likewise.
4118
41192016-01-14 Yao Qi <yao.qi@linaro.org>
4120
4121 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4122 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4123 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4124 arm_get_next_pcs_ctor.
4125
41262016-01-12 Josh Stone <jistone@redhat.com>
4127 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4128
4129 * inferiors.h: Include "gdb_vecs.h".
4130 (struct process_info): Add syscalls_to_catch.
4131 * inferiors.c (remove_process): Free syscalls_to_catch.
4132 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4133 syscall_return stops.
4134 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4135 * server.c (handle_general_set): Handle QCatchSyscalls.
4136 (handle_query): Report support for QCatchSyscalls.
4137 * target.h (struct target_ops): Add supports_catch_syscall.
4138 (target_supports_catch_syscall): New macro.
4139 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4140 (struct lwp_info): Add syscall_state.
4141 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4142 Maintain syscall_state and syscalls_to_catch across exec.
4143 (get_syscall_trapinfo): New function, proxy to the_low_target.
4144 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4145 (linux_low_filter_event): Toggle syscall_state entry/return for
4146 syscall traps, and set it ignored for all others.
4147 (gdb_catching_syscalls_p): New function.
4148 (gdb_catch_this_syscall_p): New function.
4149 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4150 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4151 (linux_supports_catch_syscall): New function.
4152 (linux_target_ops): Install it.
4153 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4154 (the_low_target): Install it.
4155
41562016-01-12 Mike Frysinger <vapier@gentoo.org>
4157
4158 * acinclude.m4: Include new ../warning.m4 file.
4159 * configure: Regenerated.
4160 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4161
41622016-01-12 Mike Frysinger <vapier@gentoo.org>
4163
4164 * ax.c (is_goto_target): Mark static.
4165 * linux-low.c (register_addr): Likewise.
4166 (linux_fetch_registers, linux_store_registers): Likewise.
4167 * mem-break.c (any_persistent_commands): Fix old prototype.
4168 (add_commands_to_breakpoint): Mark static.
4169 * regcache.c (find_register_by_name): Delete unused func.
4170 * remote-utils.c (hex_or_minus_one): Mark static.
4171 * server.c (monitor_show_help): Mark static.
4172 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4173 handle_v_requests): Likewise.
4174
41752016-01-12 Pedro Alves <palves@redhat.com>
4176
4177 Remove use of the registered trademark symbol throughout.
4178
41792016-01-08 Yao Qi <yao.qi@linaro.org>
4180
4181 * remote-utils.c (getpkt): If c is '\003', call target hook
4182 request_interrupt.
4183
41842016-01-06 Yao Qi <yao.qi@linaro.org>
4185
4186 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4187 linux-aarch32-low.c.
4188 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4189 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4190 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4191 (thumb2_breakpoint): Declare.
4192 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4193 linux-aarch32-low.h.
4194 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4195 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4196 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4197
41982016-01-01 Joel Brobecker <brobecker@adacore.com>
4199
4200 * gdbreplay.c (gdbreplay_version): Change copyright year in
4201 version message.
4202 * server.c (gdbserver_version): Likewise.
4203
42042015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4205
4206 * server.c (crc32_table): Delete.
4207 (crc32): Use libiberty's xcrc32 function.
4208
42092015-12-22 Joel Brobecker <brobecker@adacore.com>
4210
4211 * lynx-low.c (lynx_delete_thread_callback): New function.
4212 (lynx_mourn): Properly delete our process and all of its
4213 threads. Remove call to clear_inferiors.
4214
42152015-12-22 Joel Brobecker <brobecker@adacore.com>
4216
4217 * target.c (thread_search_callback): Add check that
4218 the thread_stopped target callback is not NULL before
4219 calling it.
4220
42212015-12-21 Yao Qi <yao.qi@linaro.org>
4222
4223 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4224 arm breakpoint.
4225
42262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4227
4228 * server.c (handle_query): Call target_supports_software_single_step.
4229
42302015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4231
4232 * linux-low.c (single_step): New function.
4233 (linux_resume_one_lwp_throw): Call single_step.
4234 (start_step_over): Likewise.
4235
42362015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4237
4238 * Makefile.in (SFILES): Append arch/arm-linux.c,
4239 arch/arm-get-next-pcs.c.
4240 (arm-linux.o): New rule.
4241 (arm-get-next-pcs.o): New rule.
4242 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4243 arm-linux.o.
4244 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4245 to linux-aarch32-low.c.
4246 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4247 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4248 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4249 (thumb2_breakpoint_len): Likewise.
4250 (arm_is_thumb_mode): Make non-static.
4251 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4252 from linux-aarch32-low.c.
4253 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4254 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4255 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4256 (thumb2_breakpoint_len): Likewise.
4257 (arm_is_thumb_mode): New declaration.
4258 * linux-arm-low.c: Include arch/arm-linux.h
4259 aarch/arm-get-next-pcs.h, sys/syscall.h.
4260 (get_next_pcs_ops): New struct.
4261 (get_next_pcs_addr_bits_remove): New function.
4262 (get_next_pcs_is_thumb): New function.
4263 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4264 (arm_sigreturn_next_pc): Likewise.
4265 (get_next_pcs_syscall_next_pc): Likewise.
4266 (arm_gdbserver_get_next_pcs): Likewise.
4267 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4268 Initialize.
4269 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4270 * server.h: Include gdb_vecs.h.
4271
42722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4273
4274 * Makefile.in (SFILES): Append common/common-regcache.c.
4275 (OBS): Append common-regcache.o.
4276 (common-regcache.o): New rule.
4277 * regcache.c (init_register_cache): Initialize cache to
4278 REG_UNAVAILABLE.
4279 (regcache_raw_read_unsigned): New function.
4280 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4281 register_status enum.
4282
42832015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4284
4285 * linux-aarch64-low.c (the_low_targets): Rename
4286 breakpoint_reinsert_addr to get_next_pcs.
4287 * linux-arm-low.c (the_low_targets): Likewise.
4288 * linux-bfin-low.c (the_low_targets): Likewise.
4289 * linux-cris-low.c (the_low_targets): Likewise.
4290 * linux-crisv32-low.c (the_low_targets): Likewise.
4291 * linux-low.c (can_software_single_step): Likewise.
4292 (install_software_single_step_breakpoints): New function.
4293 (start_step_over): Use install_software_single_step_breakpoints.
4294 * linux-low.h: New CORE_ADDR vector.
4295 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4296 get_next_pcs.
4297 * linux-mips-low.c (the_low_targets): Likewise.
4298 * linux-nios2-low.c (the_low_targets): Likewise.
4299 * linux-sparc-low.c (the_low_targets): Likewise.
4300
43012015-12-17 Pedro Alves <palves@redhat.com>
4302
4303 * linux-low.c (linux_kill_one_lwp): Remove references to
4304 LinuxThreads.
4305 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4306 to 'kill'.
4307 (linux_init_signals): Delete.
4308 (initialize_low): Adjust.
4309 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4310
43112015-12-16 Pedro Alves <palves@redhat.com>
4312
4313 * configure.ac (compiler warning flags): When testing a
4314 -Wno-foo option, check whether -Wfoo works instead.
4315 * configure: Regenerate.
4316
43172015-12-11 Don Breazeal <donb@codesourcery.com>
4318
4319 * server.c (process_serial_event): Don't exit from gdbserver
4320 in remote mode if there are still active inferiors.
4321
43222015-12-11 Yao Qi <yao.qi@linaro.org>
4323
4324 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4325 arm_breakpoint_at if the process is 32-bit.
4326
43272015-12-11 Yao Qi <yao.qi@linaro.org>
4328
4329 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4330 arm breakpoint.
4331
43322015-12-07 Yao Qi <yao.qi@linaro.org>
4333
4334 * configure.srv: Append arm.o to srv_tgtobj for
4335 aarch64*-*-linux* target.
4336 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4337 from linux-arm-low.c.
4338 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4339 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4340 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4341 (thumb2_breakpoint_len): Likewise.
4342 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4343 (arm_breakpoint_kinds): Likewise.
4344 (arm_breakpoint_kind_from_pc): Likewise.
4345 (arm_sw_breakpoint_from_kind): Likewise.
4346 (arm_breakpoint_kind_from_current_state): Likewise.
4347 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4348 (arm_sw_breakpoint_from_kind): Declare.
4349 (arm_breakpoint_kind_from_current_state): Declare.
4350 (arm_breakpoint_at): Declare.
4351 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4352 arm_sw_breakpoint_from_kind if process is 32-bit.
4353 (aarch64_breakpoint_kind_from_pc): New function.
4354 (aarch64_breakpoint_kind_from_current_state): New function.
4355 (the_low_target): Initialize fields breakpoint_kind_from_pc
4356 and breakpoint_kind_from_current_state.
4357 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4358 linux-aarch32-low.c.
4359 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4360 (arm_breakpoint, arm_breakpoint_len): Likewise.
4361 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4362 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4363 (arm_is_thumb_mode): Likewise.
4364 (arm_breakpoint_at): Likewise.
4365 (arm_breakpoint_kind_from_pc): Likewise.
4366 (arm_sw_breakpoint_from_kind): Likewise.
4367 (arm_breakpoint_kind_from_current_state): Likewise.
4368
4369 Revert:
4370 2015-08-04 Yao Qi <yao.qi@linaro.org>
4371
4372 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4373 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4374 * server.c (extended_protocol): Remove "static".
4375 * server.h (extended_protocol): Declare it.
4376
43772015-12-04 Josh Stone <jistone@redhat.com>
4378
4379 * target.h (struct target_ops) <arch_setup>: Rename to ...
4380 (struct target_ops) <post_create_inferior>: ... this.
4381 (target_arch_setup): Rename to ...
4382 (target_post_create_inferior): ... this, calling post_create_inferior.
4383 * server.c (start_inferior): Update target_arch_setup calls to
4384 target_post_create_inferior.
4385 * linux-low.c (linux_low_ptrace_options): Forward declare.
4386 (linux_arch_setup): Update its comment for general use.
4387 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4388 (struct linux_target_ops): Use linux_post_create_inferior.
4389 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4390 to post_create_inferior.
4391 * nto-low.c (struct nto_target_ops): Likewise.
4392 * spu-low.c (struct spu_target_ops): Likewise.
4393 * win32-low.c (struct win32_target_ops): Likewise.
4394
43952015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4396
4397 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4398
43992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4400
4401 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4402 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4403 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4404 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4405 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4406 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4407 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4408 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4409 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4410 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4411 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4412 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4413
44142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4415
4416 * linux-low.c (linux_look_up_symbols): Don't call
4417 linux_supports_traceclone.
4418 * linux-low.h (thread_db_init): Remove use_events argument.
4419 * thread-db.c (thread_db_use_event): Remove global variable.
4420 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4421 (struct thread_db) <td_create_bp>: Remove field.
4422 (thread_db_create_event): Remove function.
4423 (thread_db_enable_reporting): Likewise.
4424 (find_one_thread): Don't check for thread_db_use_events.
4425 (attach_thread): Likewise.
4426 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4427 (try_thread_db_load_1): Don't check for thread_db_use_events.
4428 (thread_db_init): Remove use_events argument and thread events
4429 handling.
4430 (remove_thread_event_breakpoints): Remove function.
4431 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4432
44332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4434
4435 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4436 New function.
4437 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4438 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4439 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4440 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4441 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4442 Initialize.
4443 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4444 New function.
4445 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4446 * linux-low.c (can_hardware_single_step): Use
4447 supports_hardware_single_step.
4448 (can_software_single_step): New function.
4449 (start_step_over): Call can_software_single_step.
4450 (linux_supports_hardware_single_step): New function.
4451 (struct target_ops) <supports_software_single_step>: Initialize.
4452 * linux-low.h (struct linux_target_ops)
4453 <supports_hardware_single_step>: Initialize.
4454 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4455 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4456 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4457 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4458 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4459 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4460 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4461 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4462 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4463 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4464 Initialize.
4465 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4466 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4467 Initialize.
4468 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4469 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4470 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4471 New function.
4472 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4473 * target.h (struct target_ops): <supports_software_single_step>:
4474 New field.
4475 (target_supports_software_single_step): New macro.
4476
44772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4478
4479 * linux-low.c (linux_wait_1): Fix pc advance condition.
4480 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4481 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4482
44832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4484
4485 * linux-arm-low.c (arm_is_thumb_mode): New function.
4486 (arm_breakpoint_at): Use arm_is_thumb_mode.
4487 (arm_breakpoint_kind_from_current_state): New function.
4488 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4489 Initialize.
4490 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4491 (linux_breakpoint_kind_from_current_state): New function.
4492 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4493 * linux-low.h (struct linux_target_ops)
4494 <breakpoint_kind_from_current_state>: New field.
4495 * target.h (struct target_ops): Likewise.
4496 (target_breakpoint_kind_from_current_state): New macro.
4497
44982015-11-30 Pedro Alves <palves@redhat.com>
4499
4500 * linux-low.c (linux_resume): Wake up the event loop before
4501 returning.
4502
45032015-11-30 Pedro Alves <palves@redhat.com>
4504
4505 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4506 check.
4507 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4508 to -1.
4509 * target.c (struct thread_search): New structure.
4510 (thread_search_callback): New function.
4511 (prev_general_thread): New global.
4512 (prepare_to_access_memory, done_accessing_memory): New functions.
4513 * target.h (prepare_to_access_memory, done_accessing_memory):
4514 Replace macros with function declarations.
4515
45162015-11-30 Pedro Alves <palves@redhat.com>
4517
4518 PR 14618
4519 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4520 report TARGET_WAITKIND_NO_RESUMED.
4521 * remote-utils.c (prepare_resume_reply): Handle
4522 TARGET_WAITKIND_NO_RESUMED.
4523 * server.c (report_no_resumed): New global.
4524 (handle_query) <qSupported>: Handle "no-resumed+". Report
4525 "no-resumed+" support.
4526 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4527 return error if the client doesn't support no-resumed events.
4528 (push_stop_notification): New function.
4529 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4530 events if the client supports them.
4531
45322015-11-30 Pedro Alves <palves@redhat.com>
4533
4534 * linux-low.c (thread_still_has_status_pending_p): Don't check
4535 vCont;t here.
4536 (lwp_resumed): New function.
4537 (status_pending_p_callback): Return early if the LWP is not
4538 supposed to be resumed.
4539
45402015-11-30 Pedro Alves <palves@redhat.com>
4541
4542 * linux-low.c (handle_extended_wait): Assert that the LWP's
4543 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4544 thread create events, leave the new child's status pending.
4545 (linux_low_filter_event): If GDB wants to hear about thread exit
4546 events, leave the LWP marked dead and don't delete it.
4547 (linux_wait_for_event_filtered): Don't check for thread exit.
4548 (filter_exit_event): New function.
4549 (linux_wait_1): Use it, when returning an exit event.
4550 (linux_resume_one_lwp_throw): Assert that the LWP's
4551 waitstatus is TARGET_WAITKIND_IGNORE.
4552 * remote-utils.c (prepare_resume_reply): Handle
4553 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4554 * server.c (report_thread_events): New global.
4555 (handle_general_set): Handle QThreadEvents.
4556 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4557 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4558 TARGET_WAITKIND_THREAD_EXITED.
4559 * server.h (report_thread_events): Declare.
4560
45612015-11-30 Pedro Alves <palves@redhat.com>
4562
4563 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4564 the thread's last_resume_kind was resume_stop.
4565
45662015-11-30 Pedro Alves <palves@redhat.com>
4567
4568 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4569 before returning.
4570
45712015-11-30 Pedro Alves <palves@redhat.com>
4572
4573 * server.c (handle_v_requests): Handle vCtrlC.
4574
45752015-11-30 Pedro Alves <palves@redhat.com>
4576
4577 * gdbthread.h (find_any_thread_of_pid): Declare.
4578 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4579 functions.
4580 * server.c (handle_query): If current_thread is NULL, look for
4581 another thread of the selected process.
4582
45832015-11-26 Daniel Colascione <dancol@dancol.org>
4584 Simon Marchi <simon.marchi@ericsson.com>
4585
4586 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4587 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4588 name in reply.
4589 * target.h (struct target_ops) <thread_name>: New field.
4590 (target_thread_name): New macro.
4591
45922015-11-23 Joel Brobecker <brobecker@adacore.com>
4593
4594 * regcache.h (regcache_invalidate_pid): Add declaration.
4595 * regcache.c (regcache_invalidate_pid): New function, extracted
4596 from regcache_invalidate.
4597 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4598 Add trivial documentation comment.
4599 * lynx-low.c: Use regcache_invalidate_pid instead of
4600 regcache_invalidate.
4601
46022015-11-23 Joel Brobecker <brobecker@adacore.com>
4603
4604 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4605 and Elf64_auxv_t if the target is Android.
4606
46072015-11-22 Doug Evans <xdje42@gmail.com>
4608
4609 * target.h: #include <sys/types.h>.
4610
46112015-11-19 Pedro Alves <palves@redhat.com>
4612
4613 * linux-low.c (linux_process_qsupported): Change prototype.
4614 Adjust.
4615 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4616 Change prototype.
4617 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4618 and adjust to loop over all features.
4619 * server.c (handle_query) <qSupported>: Adjust to call
4620 target_process_qsupported once, passing it a vector of unprocessed
4621 features.
4622 * target.h (struct target_ops) <process_qsupported>: Change
4623 prototype.
4624 (target_process_qsupported): Adjust.
4625
46262015-11-19 Pedro Alves <palves@redhat.com>
4627
4628 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4629 mode.
4630 * configure: Regenerate.
4631
46322015-11-19 Pedro Alves <palves@redhat.com>
4633
4634 * configure: Regenerate.
4635
46362015-11-19 Yao Qi <yao.qi@linaro.org>
4637
4638 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4639 type to uint32_t.
4640
46412015-11-19 Yao Qi <yao.qi@linaro.org>
4642
4643 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4644 (struct aarch64_operand): Move enum out.
4645
46462015-11-19 Yao Qi <yao.qi@linaro.org>
4647
4648 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4649 struct user_fpsimd_state *.
4650 (aarch64_store_fpregset): Likewise.
4651
46522015-11-19 Yao Qi <yao.qi@linaro.org>
4653
4654 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4655 struct user_pt_regs *.
4656 (aarch64_store_gregset): Likewise.
4657
46582015-11-18 Pedro Alves <palves@redhat.com>
4659
4660 * Makefile.in (all_object_files): Add $IPA_OBJS.
4661
46622015-11-17 Pedro Alves <palves@redhat.com>
4663
4664 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4665 GDB_SIGNAL_0 and gdb_signal_to_string.
4666
46672015-11-17 Pedro Alves <palves@redhat.com>
4668
4669 * win32-low.c (handle_output_debug_string): Remove parameter.
4670 (win32_kill): Remove our_status local and adjust call to
4671 handle_output_debug_string.
4672 (get_child_debug_event): Adjust call to
4673 handle_output_debug_string.
4674
46752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4676
4677 * linux-mips-low.c (mips_fill_gregset): Add cast.
4678 (mips_store_gregset): Likewise.
4679 (mips_fill_fpregset): Likewise.
4680 (mips_store_fpregset): Likewise.
4681
46822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4683
4684 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4685 priv.
4686
46872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4688
4689 * linux-mips-low.c (mips_linux_new_thread): Change type of
4690 watch_type to enum target_hw_bp_type.
4691
46922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4693
4694 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4695 Change return type to arm_hwbp_type.
4696
46972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4698
4699 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4700 (arm_store_gregset): Likewise.
4701 * linux-arm-low.c (arm_get_hwcap): Likewise.
4702 (arm_read_description): Likewise.
4703
47042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4705
4706 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4707
47082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4709
4710 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4711 (ppc_fill_vsxregset): Likewise.
4712 (ppc_store_vsxregset): Likewise.
4713 (ppc_fill_vrregset): Likewise.
4714 (ppc_store_vrregset): Likewise.
4715 (ppc_fill_evrregset): Likewise.
4716 (ppc_store_evrregset): Likewise.
4717
47182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4719
4720 * linux-ppc-low.c (ppc_usrregs_info): Remove
4721 forward-declaration.
4722 (ppc_arch_setup): Move lower in file.
4723
47242015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4725
4726 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4727 (ps_pdwrite): Likewise.
4728
47292015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4730
4731 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4732 to after assert checks.
4733
47342015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4735
4736 * proc-service.c (ps_pdread): Add/adjust casts.
4737 (ps_pdwrite): Add/adjust casts.
4738
47392015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4740
4741 * server.c (handle_search_memory_1): Cast return value of
4742 memmem.
4743
47442015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4745
4746 * server.c (write_qxfer_response): Change type of data to
4747 gdb_byte *.
4748
47492015-10-29 Pedro Alves <palves@redhat.com>
4750
4751 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4752
47532015-10-29 Pedro Alves <palves@redhat.com>
4754
4755 * tracepoint.c (clear_installed_tracepoints): Add casts.
4756
47572015-10-29 Pedro Alves <palves@redhat.com>
4758
4759 * server.c (handle_v_cont, process_serial_event): Add enum
4760 gdb_signal casts to signal parsing code.
4761
47622015-10-29 Pedro Alves <palves@redhat.com>
4763
4764 * linux-low.h (NULL_REGSET): Define.
4765 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4766 * linux-arm-low.c (arm_regsets): Likewise.
4767 * linux-crisv32-low.c (cris_regsets): Likewise.
4768 * linux-m68k-low.c (m68k_regsets): Likewise.
4769 * linux-mips-low.c (mips_regsets): Likewise.
4770 * linux-nios2-low.c (nios2_regsets): Likewise.
4771 * linux-ppc-low.c (ppc_regsets): Likewise.
4772 * linux-s390-low.c (s390_regsets): Likewise.
4773 * linux-sh-low.c (sh_regsets): Likewise.
4774 * linux-sparc-low.c (sparc_regsets): Likewise.
4775 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4776 * linux-tile-low.c (tile_regsets): Likewise.
4777 * linux-x86-low.c (x86_regsets): Likewise.
4778 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4779
47802015-10-29 Pedro Alves <palves@redhat.com>
4781
4782 * linux-low.h (NULL_REGSET): Define.
4783 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4784 * linux-arm-low.c (arm_regsets): Likewise.
4785 * linux-crisv32-low.c (cris_regsets): Likewise.
4786 * linux-m68k-low.c (m68k_regsets): Likewise.
4787 * linux-mips-low.c (mips_regsets): Likewise.
4788 * linux-nios2-low.c (nios2_regsets): Likewise.
4789 * linux-ppc-low.c (ppc_regsets): Likewise.
4790 * linux-s390-low.c (s390_regsets): Likewise.
4791 * linux-sh-low.c (sh_regsets): Likewise.
4792 * linux-sparc-low.c (sparc_regsets): Likewise.
4793 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4794 * linux-tile-low.c (tile_regsets): Likewise.
4795 * linux-x86-low.c (x86_regsets): Likewise.
4796 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4797
47982015-10-26 Doug Evans <dje@google.com>
4799
4800 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4801
48022015-10-26 Doug Evans <dje@google.com>
4803
4804 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4805
48062015-10-26 Doug Evans <dje@google.com>
4807
4808 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4809 for debug_printf.
4810 (attach_thread, find_new_threads_callback): Ditto.
4811
48122015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4813
4814 * mem-break.h (set_breakpoint_data): Remove.
4815
48162015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4817
4818 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4819 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4820 (initialize_low): Remove set_breakpoint_data call.
4821 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4822 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4823 (initialize_low): Remove set_breakpoint_data call.
4824 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4825 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4826 (initialize_low): Remove set_breakpoint_data call.
4827
48282015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4829
4830 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4831 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4832 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4833 * target.h (target_breakpoint_kind_from_pc): New macro.
4834
48352015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4836
4837 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4838 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4839 the default breakpoint kind.
4840
48412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4842
4843 * linux-arm-low.c (arm_supports_z_point_type): Add software
4844 breakpoint support.
4845
48462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4847
4848 * linux-arm-low.c: Refactor breakpoint definitions.
4849 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4850 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4851
48522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4853
4854 * Makefile.in: Add arm.c/o.
4855 * configure.srv: Likewise.
4856 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4857 (arm_breakpoint_kind_from_pc): New function.
4858 (arm_sw_breakpoint_from_kind): Return proper kind.
4859 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4860
48612015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4862
4863 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4864 removal.
4865 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4866 (struct raw_breakpoint) <size>: Remove.
4867 (struct raw_breakpoint) <kind>: Add.
4868 (bp_size): New function.
4869 (bp_opcode): Likewise.
4870 (find_raw_breakpoint_at): Adjust for kind.
4871 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4872 (remove_memory_breakpoint): Adjust for kind call bp_size.
4873 (set_raw_breakpoint_at): Adjust for kind.
4874 (set_breakpoint): Likewise.
4875 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4876 (delete_raw_breakpoint): Adjust for kind.
4877 (delete_breakpoint): Likewise.
4878 (find_gdb_breakpoint): Likewise.
4879 (set_gdb_breakpoint_1): Likewise.
4880 (set_gdb_breakpoint): Likewise.
4881 (delete_gdb_breakpoint_1): Likewise.
4882 (delete_gdb_breakpoint): Likewise.
4883 (uninsert_raw_breakpoint): Likewise.
4884 (reinsert_raw_breakpoint): Likewise.
4885 (set_breakpoint_data): Remove.
4886 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4887 (check_mem_read): Adjust for kind call bp_size.
4888 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4889 (clone_one_breakpoint): Adjust for kind.
4890 * mem-break.h (set_gdb_breakpoint): Likewise.
4891 (delete_gdb_breakpoint): Likewise.
4892 * server.c (process_serial_event): Likewise.
4893
48942015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4895
4896 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4897 (struct linux_target_ops) <breakpoint>: Remove.
4898 (struct linux_target_ops) <breakpoint_len>: Remove.
4899 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4900 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4901 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4902 (arm_sw_breakpoint_from_kind): New function.
4903 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4904 (struct linux_target_ops) <breakpoint>: Remove.
4905 (struct linux_target_ops) <breakpoint_len>: Remove.
4906 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4907 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4908 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4909 (struct linux_target_ops) <breakpoint>: Remove.
4910 (struct linux_target_ops) <breakpoint_len>: Remove.
4911 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4912 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4913 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4914 (struct linux_target_ops) <breakpoint>: Remove.
4915 (struct linux_target_ops) <breakpoint_len>: Remove.
4916 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4917 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4918 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4919 and sw_breakpoint_from_kind to increment the pc.
4920 (linux_breakpoint_kind_from_pc): New function.
4921 (linux_sw_breakpoint_from_kind): New function.
4922 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4923 (initialize_low): Call breakpoint_kind_from_pc and
4924 sw_breakpoint_from_kind to replace breakpoint_data/len.
4925 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4926 New field.
4927 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4928 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4929 (struct linux_target_ops) <breakpoint>: Remove.
4930 (struct linux_target_ops) <breakpoint_len>: Remove.
4931 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4933 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4934 (struct linux_target_ops) <breakpoint>: Remove.
4935 (struct linux_target_ops) <breakpoint_len>: Remove.
4936 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4937 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4938 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4939 (struct linux_target_ops) <breakpoint>: Remove.
4940 (struct linux_target_ops) <breakpoint_len>: Remove.
4941 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4942 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4943 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4944 (struct linux_target_ops) <breakpoint>: Remove.
4945 (struct linux_target_ops) <breakpoint_len>: Remove.
4946 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4947 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4948 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4949 (struct linux_target_ops) <breakpoint>: Remove.
4950 (struct linux_target_ops) <breakpoint_len>: Remove.
4951 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4952 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4953 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4954 (struct linux_target_ops) <breakpoint>: Remove.
4955 (struct linux_target_ops) <breakpoint_len>: Remove.
4956 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4957 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4958 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4959 (struct linux_target_ops) <breakpoint>: Remove.
4960 (struct linux_target_ops) <breakpoint_len>: Remove.
4961 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4962 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4963 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4964 (struct linux_target_ops) <breakpoint>: Remove.
4965 (struct linux_target_ops) <breakpoint_len>: Remove.
4966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4968 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4969 (struct linux_target_ops) <breakpoint>: Remove.
4970 (struct linux_target_ops) <breakpoint_len>: Remove.
4971 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4972 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4973 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4974 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4975 (struct linux_target_ops) <breakpoint>: Remove.
4976 (struct linux_target_ops) <breakpoint_len>: Remove.
4977 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4978 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4979 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4980 (struct linux_target_ops) <breakpoint>: Remove.
4981 (struct linux_target_ops) <breakpoint_len>: Remove.
4982 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4983 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4984
49852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4986
4987 * linux-cris-low.c (cris_get_pc): Remove void arg.
4988
49892015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4990
4991 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4992 variable name.
4993
49942015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4995
4996 * inferiors.c (thread_pid_matches_callback): New function.
4997 (find_thread_process): New function.
4998 (remove_thread): Reset current_thread.
4999 (remove_process): Assert threads have been removed first.
5000
50012015-10-15 Yao Qi <yao.qi@linaro.org>
5002
5003 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5004 if it is 3.
5005 (aarch64_remove_point): Likewise.
5006 * regcache.c (regcache_register_size): New function.
5007
50082015-10-12 Yao Qi <yao.qi@linaro.org>
5009
5010 * linux-aarch64-low.c: Update all callers as emit_load_store
5011 is renamed to aarch64_emit_load_store.
5012
50132015-10-12 Yao Qi <yao.qi@linaro.org>
5014
5015 * linux-aarch64-low.c: Update all callers of function renaming
5016 from emit_insn to aarch64_emit_insn.
5017
50182015-10-12 Yao Qi <yao.qi@linaro.org>
5019
5020 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5021 arch/aarch64-insn.h.
5022 (struct aarch64_memory_operand): Likewise.
5023 (ENCODE): Likewise.
5024 (emit_insn): Move to arch/aarch64-insn.c.
5025 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5026 (emit_load_store): Move to arch/aarch64-insn.c.
5027 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5028 (can_encode_int32): Remove.
5029
50302015-10-12 Yao Qi <yao.qi@linaro.org>
5031
5032 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5033 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5034 (aarch64_relocate_instruction): Likewise.
5035 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5036 (struct aarch64_insn_visitor): Likewise.
5037
50382015-10-12 Yao Qi <yao.qi@linaro.org>
5039
5040 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5041 (struct aarch64_insn_visitor): New.
5042 (struct aarch64_insn_relocation_data): New.
5043 (aarch64_ftrace_insn_reloc_b): New function.
5044 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5045 (aarch64_ftrace_insn_reloc_cb): Likewise.
5046 (aarch64_ftrace_insn_reloc_tb): Likewise.
5047 (aarch64_ftrace_insn_reloc_adr): Likewise.
5048 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5049 (aarch64_ftrace_insn_reloc_others): Likewise.
5050 (visitor): New.
5051 (aarch64_relocate_instruction): Use visitor.
5052
50532015-10-12 Yao Qi <yao.qi@linaro.org>
5054
5055 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5056 int. Add argument buf.
5057 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5058 aarch64_relocate_instruction.
5059
50602015-10-12 Yao Qi <yao.qi@linaro.org>
5061
5062 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5063 argument insn. Remove local variable insn. Don't call
5064 target_read_uint32.
5065 (aarch64_install_fast_tracepoint_jump_pad): Call
5066 target_read_uint32.
5067
50682015-09-30 Yao Qi <yao.qi@linaro.org>
5069
5070 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5071 (emit_load_store_pair): Likewise.
5072
50732015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5074
5075 * dll.c (match_dll): Add cast(s).
5076 (unloaded_dll): Likewise.
5077 * linux-low.c (second_thread_of_pid_p): Likewise.
5078 (delete_lwp_callback): Likewise.
5079 (count_events_callback): Likewise.
5080 (select_event_lwp_callback): Likewise.
5081 (linux_set_resume_request): Likewise.
5082 * server.c (accumulate_file_name_length): Likewise.
5083 (emit_dll_description): Likewise.
5084 (handle_qxfer_threads_worker): Likewise.
5085 (visit_actioned_threads): Likewise.
5086 * thread-db.c (any_thread_of): Likewise.
5087 * tracepoint.c (same_process_p): Likewise.
5088 (match_blocktype): Likewise.
5089 (build_traceframe_info_xml): Likewise.
5090
50912015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5092
5093 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5094 assignment.
5095 (gdb_unparse_agent_expr): Likewise.
5096 * hostio.c (require_data): Likewise.
5097 (handle_pread): Likewise.
5098 * linux-low.c (disable_regset): Likewise.
5099 (fetch_register): Likewise.
5100 (store_register): Likewise.
5101 (get_dynamic): Likewise.
5102 (linux_qxfer_libraries_svr4): Likewise.
5103 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5104 (set_fast_tracepoint_jump): Likewise.
5105 (uninsert_fast_tracepoint_jumps_at): Likewise.
5106 (reinsert_fast_tracepoint_jumps_at): Likewise.
5107 (validate_inserted_breakpoint): Likewise.
5108 (clone_agent_expr): Likewise.
5109 * regcache.c (init_register_cache): Likewise.
5110 * remote-utils.c (putpkt_binary_1): Likewise.
5111 (decode_M_packet): Likewise.
5112 (decode_X_packet): Likewise.
5113 (look_up_one_symbol): Likewise.
5114 (relocate_instruction): Likewise.
5115 (monitor_output): Likewise.
5116 * server.c (handle_search_memory): Likewise.
5117 (handle_qxfer_exec_file): Likewise.
5118 (handle_qxfer_libraries): Likewise.
5119 (handle_qxfer): Likewise.
5120 (handle_query): Likewise.
5121 (handle_v_cont): Likewise.
5122 (handle_v_run): Likewise.
5123 (captured_main): Likewise.
5124 * target.c (write_inferior_memory): Likewise.
5125 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5126 * tracepoint.c (init_trace_buffer): Likewise.
5127 (add_tracepoint_action): Likewise.
5128 (add_traceframe): Likewise.
5129 (add_traceframe_block): Likewise.
5130 (cmd_qtdpsrc): Likewise.
5131 (cmd_qtdv): Likewise.
5132 (cmd_qtstatus): Likewise.
5133 (response_source): Likewise.
5134 (response_tsv): Likewise.
5135 (cmd_qtnotes): Likewise.
5136 (gdb_collect): Likewise.
5137 (initialize_tracepoint): Likewise.
5138
51392015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5140
5141 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5142 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5143 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5144 <NOP>: New.
5145 (enum aarch64_condition_codes): New enum.
5146 (w0): New static global.
5147 (fp): Likewise.
5148 (lr): Likewise.
5149 (struct aarch64_memory_operand) <type>: New
5150 MEMORY_OPERAND_POSTINDEX type.
5151 (postindex_memory_operand): New helper function.
5152 (emit_ret): New function.
5153 (emit_load_store_pair): New function, factored out of emit_stp
5154 with support for MEMORY_OPERAND_POSTINDEX.
5155 (emit_stp): Rewrite using emit_load_store_pair.
5156 (emit_ldp): New function.
5157 (emit_load_store): Likewise.
5158 (emit_ldr): Mention post-index instruction in comment.
5159 (emit_ldrh): New function.
5160 (emit_ldrb): New function.
5161 (emit_ldrsw): Mention post-index instruction in comment.
5162 (emit_str): Likewise.
5163 (emit_subs): New function.
5164 (emit_cmp): Likewise.
5165 (emit_and): Likewise.
5166 (emit_orr): Likewise.
5167 (emit_orn): Likewise.
5168 (emit_eor): Likewise.
5169 (emit_mvn): Likewise.
5170 (emit_lslv): Likewise.
5171 (emit_lsrv): Likewise.
5172 (emit_asrv): Likewise.
5173 (emit_mul): Likewise.
5174 (emit_sbfm): Likewise.
5175 (emit_sbfx): Likewise.
5176 (emit_ubfm): Likewise.
5177 (emit_ubfx): Likewise.
5178 (emit_csinc): Likewise.
5179 (emit_cset): Likewise.
5180 (emit_nop): Likewise.
5181 (emit_ops_insns): New helper function.
5182 (emit_pop): Likewise.
5183 (emit_push): Likewise.
5184 (aarch64_emit_prologue): New function.
5185 (aarch64_emit_epilogue): Likewise.
5186 (aarch64_emit_add): Likewise.
5187 (aarch64_emit_sub): Likewise.
5188 (aarch64_emit_mul): Likewise.
5189 (aarch64_emit_lsh): Likewise.
5190 (aarch64_emit_rsh_signed): Likewise.
5191 (aarch64_emit_rsh_unsigned): Likewise.
5192 (aarch64_emit_ext): Likewise.
5193 (aarch64_emit_log_not): Likewise.
5194 (aarch64_emit_bit_and): Likewise.
5195 (aarch64_emit_bit_or): Likewise.
5196 (aarch64_emit_bit_xor): Likewise.
5197 (aarch64_emit_bit_not): Likewise.
5198 (aarch64_emit_equal): Likewise.
5199 (aarch64_emit_less_signed): Likewise.
5200 (aarch64_emit_less_unsigned): Likewise.
5201 (aarch64_emit_ref): Likewise.
5202 (aarch64_emit_if_goto): Likewise.
5203 (aarch64_emit_goto): Likewise.
5204 (aarch64_write_goto_address): Likewise.
5205 (aarch64_emit_const): Likewise.
5206 (aarch64_emit_call): Likewise.
5207 (aarch64_emit_reg): Likewise.
5208 (aarch64_emit_pop): Likewise.
5209 (aarch64_emit_stack_flush): Likewise.
5210 (aarch64_emit_zero_ext): Likewise.
5211 (aarch64_emit_swap): Likewise.
5212 (aarch64_emit_stack_adjust): Likewise.
5213 (aarch64_emit_int_call_1): Likewise.
5214 (aarch64_emit_void_call_2): Likewise.
5215 (aarch64_emit_eq_goto): Likewise.
5216 (aarch64_emit_ne_goto): Likewise.
5217 (aarch64_emit_lt_goto): Likewise.
5218 (aarch64_emit_le_goto): Likewise.
5219 (aarch64_emit_gt_goto): Likewise.
5220 (aarch64_emit_ge_got): Likewise.
5221 (aarch64_emit_ops_impl): New static global variable.
5222 (aarch64_emit_ops): New target function, return
5223 &aarch64_emit_ops_impl.
5224 (struct linux_target_ops): Install it.
5225
52262015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5227
5228 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5229 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5230 aarch64-ipa.o.
5231 * linux-aarch64-ipa.c: New file.
5232 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5233 and endian.h.
5234 (aarch64_get_thread_area): New target method.
5235 (extract_signed_bitfield): New helper function.
5236 (aarch64_decode_ldr_literal): New function.
5237 (enum aarch64_opcodes): New enum.
5238 (struct aarch64_register): New struct.
5239 (struct aarch64_operand): New struct.
5240 (x0): New static global.
5241 (x1): Likewise.
5242 (x2): Likewise.
5243 (x3): Likewise.
5244 (x4): Likewise.
5245 (w2): Likewise.
5246 (ip0): Likewise.
5247 (sp): Likewise.
5248 (xzr): Likewise.
5249 (aarch64_register): New helper function.
5250 (register_operand): Likewise.
5251 (immediate_operand): Likewise.
5252 (struct aarch64_memory_operand): New struct.
5253 (offset_memory_operand): New helper function.
5254 (preindex_memory_operand): Likewise.
5255 (enum aarch64_system_control_registers): New enum.
5256 (ENCODE): New macro.
5257 (emit_insn): New helper function.
5258 (emit_b): New function.
5259 (emit_bcond): Likewise.
5260 (emit_cb): Likewise.
5261 (emit_tb): Likewise.
5262 (emit_blr): Likewise.
5263 (emit_stp): Likewise.
5264 (emit_ldp_q_offset): Likewise.
5265 (emit_stp_q_offset): Likewise.
5266 (emit_load_store): Likewise.
5267 (emit_ldr): Likewise.
5268 (emit_ldrsw): Likewise.
5269 (emit_str): Likewise.
5270 (emit_ldaxr): Likewise.
5271 (emit_stxr): Likewise.
5272 (emit_stlr): Likewise.
5273 (emit_data_processing_reg): Likewise.
5274 (emit_data_processing): Likewise.
5275 (emit_add): Likewise.
5276 (emit_sub): Likewise.
5277 (emit_mov): Likewise.
5278 (emit_movk): Likewise.
5279 (emit_mov_addr): Likewise.
5280 (emit_mrs): Likewise.
5281 (emit_msr): Likewise.
5282 (emit_sevl): Likewise.
5283 (emit_wfe): Likewise.
5284 (append_insns): Likewise.
5285 (can_encode_int32_in): New helper function.
5286 (aarch64_relocate_instruction): New function.
5287 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5288 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5289 (struct linux_target_ops): Install aarch64_get_thread_area,
5290 aarch64_install_fast_tracepoint_jump_pad and
5291 aarch64_get_min_fast_tracepoint_insn_len.
5292
52932015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5294
5295 * Makefile.in (aarch64-insn.o): New rule.
5296 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5297
52982015-09-21 Yao Qi <yao.qi@linaro.org>
5299
5300 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5301
53022015-09-21 Yao Qi <yao.qi@linaro.org>
5303
5304 * tracepoint.c (max_jump_pad_size): Remove.
5305
53062015-09-18 Yao Qi <yao.qi@linaro.org>
5307
5308 * linux-aarch64-low.c: Don't include sys/uio.h.
5309 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5310
53112015-09-16 Wei-cheng Wang <cole945@gmail.com>
5312
5313 * tracepoint.c (eval_result_type): Change prototype.
5314 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5315
53162015-09-15 Pedro Alves <palves@redhat.com>
5317
5318 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5319 Check whether to report exec events instead of checking whether
5320 multiprocess is enabled.
5321
53222015-09-15 Pedro Alves <palves@redhat.com>
5323
5324 PR remote/18965
5325 * remote-utils.c (prepare_resume_reply): Merge
5326 TARGET_WAITKIND_VFORK_DONE switch case with the
5327 TARGET_WAITKIND_FORKED case.
5328
53292015-09-15 Yao Qi <yao.qi@linaro.org>
5330
5331 * server.c (handle_query): Check string comparison using
5332 "else if" instead of "if".
5333
53342015-09-15 Yao Qi <yao.qi@linaro.org>
5335
5336 * server.c (vCont_supported): New global variable.
5337 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5338 matches. Append ";vContSupported+" to own_buf.
5339 (handle_v_requests): Append ";s;S" to own_buf if target supports
5340 hardware single step or vCont_supported is false.
5341 (capture_main): Set vCont_supported to zero.
5342
53432015-09-15 Yao Qi <yao.qi@linaro.org>
5344
5345 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5346 it to ...
5347 (linux_supports_hardware_single_step): ... New function.
5348 (linux_target_ops): Update.
5349 * lynx-low.c (lynx_target_ops): Set field
5350 supports_hardware_single_step to target_can_do_hardware_single_step.
5351 * nto-low.c (nto_target_ops): Likewise.
5352 * spu-low.c (spu_target_ops): Likewise.
5353 * win32-low.c (win32_target_ops): Likewise.
5354 * target.c (target_can_do_hardware_single_step): New function.
5355 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5356 Remove. <supports_hardware_single_step>: New field.
5357 (target_supports_conditional_breakpoints): Remove.
5358 (target_supports_hardware_single_step): New macro.
5359 (target_can_do_hardware_single_step): Declare.
5360 * server.c (handle_query): Use target_supports_hardware_single_step
5361 instead of target_supports_conditional_breakpoints.
5362
53632015-09-15 Yao Qi <yao.qi@linaro.org>
5364
5365 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5366 function.
5367 (struct linux_target_ops the_low_target): Install
5368 aarch64_linux_siginfo_fixup.
5369
53702015-09-11 Don Breazeal <donb@codesourcery.com>
5371 Luis Machado <lgustavo@codesourcery.com>
5372
5373 * linux-low.c (linux_mourn): Static declaration.
5374 (linux_arch_setup): Move in front of
5375 handle_extended_wait.
5376 (linux_arch_setup_thread): New function.
5377 (handle_extended_wait): Handle exec events. Call
5378 linux_arch_setup_thread. Make event_lwp argument a
5379 pointer-to-a-pointer.
5380 (check_zombie_leaders): Do not check stopped threads.
5381 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5382 (linux_low_filter_event): Add lwp and thread for exec'ing
5383 non-leader thread if leader thread has been deleted.
5384 Refactor code into linux_arch_setup_thread and call it.
5385 Pass child lwp pointer by reference to handle_extended_wait.
5386 (linux_wait_for_event_filtered): Update comment.
5387 (linux_wait_1): Prevent clobbering exec event status.
5388 (linux_supports_exec_events): New function.
5389 (linux_target_ops) <supports_exec_events>: Initialize new member.
5390 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5391 new member.
5392 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5393 * server.c (report_exec_events): New global variable.
5394 (handle_query): Handle qSupported query for exec-events feature.
5395 (captured_main): Initialize report_exec_events.
5396 * server.h (report_exec_events): Declare new global variable.
5397 * target.h (struct target_ops) <supports_exec_events>: New
5398 member.
5399 (target_supports_exec_events): New macro.
5400 * win32-low.c (win32_target_ops) <supports_exec_events>:
5401 Initialize new member.
5402
54032015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5404
5405 * linux-low.c (linux_low_enable_btrace): Remove.
5406 (linux_target_ops): Replace linux_low_enable_btrace with
5407 linux_enable_btrace.
5408
54092015-09-03 Yao Qi <yao.qi@linaro.org>
5410
5411 * linux-aarch64-low.c (aarch64_insert_point): Call
5412 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5413 returns true.
5414
54152015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5416
5417 * linux-low.c (check_stopped_by_breakpoint): Use
5418 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5419
54202015-08-27 Pedro Alves <palves@redhat.com>
5421
5422 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5423
54242015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5425
5426 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5427 the XNEW-family equivalent.
5428 (compile_bytecodes): Likewise.
5429 * dll.c (loaded_dll): Likewise.
5430 * event-loop.c (append_callback_event): Likewise.
5431 (create_file_handler): Likewise.
5432 (create_file_event): Likewise.
5433 * hostio.c (handle_open): Likewise.
5434 * inferiors.c (add_thread): Likewise.
5435 (add_process): Likewise.
5436 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5437 * linux-arm-low.c (arm_new_process): Likewise.
5438 (arm_new_thread): Likewise.
5439 * linux-low.c (add_to_pid_list): Likewise.
5440 (linux_add_process): Likewise.
5441 (handle_extended_wait): Likewise.
5442 (add_lwp): Likewise.
5443 (enqueue_one_deferred_signal): Likewise.
5444 (enqueue_pending_signal): Likewise.
5445 (linux_resume_one_lwp_throw): Likewise.
5446 (linux_resume_one_thread): Likewise.
5447 (linux_read_memory): Likewise.
5448 (linux_write_memory): Likewise.
5449 * linux-mips-low.c (mips_linux_new_process): Likewise.
5450 (mips_linux_new_thread): Likewise.
5451 (mips_add_watchpoint): Likewise.
5452 * linux-x86-low.c (initialize_low_arch): Likewise.
5453 * lynx-low.c (lynx_add_process): Likewise.
5454 * mem-break.c (set_raw_breakpoint_at): Likewise.
5455 (set_breakpoint): Likewise.
5456 (add_condition_to_breakpoint): Likewise.
5457 (add_commands_to_breakpoint): Likewise.
5458 (clone_agent_expr): Likewise.
5459 (clone_one_breakpoint): Likewise.
5460 * regcache.c (new_register_cache): Likewise.
5461 * remote-utils.c (look_up_one_symbol): Likewise.
5462 * server.c (queue_stop_reply): Likewise.
5463 (start_inferior): Likewise.
5464 (queue_stop_reply_callback): Likewise.
5465 (handle_target_event): Likewise.
5466 * spu-low.c (fetch_ppc_memory): Likewise.
5467 (store_ppc_memory): Likewise.
5468 * target.c (set_target_ops): Likewise.
5469 * thread-db.c (thread_db_load_search): Likewise.
5470 (try_thread_db_load_1): Likewise.
5471 * tracepoint.c (add_tracepoint): Likewise.
5472 (add_tracepoint_action): Likewise.
5473 (create_trace_state_variable): Likewise.
5474 (cmd_qtdpsrc): Likewise.
5475 (cmd_qtro): Likewise.
5476 (add_while_stepping_state): Likewise.
5477 * win32-low.c (child_add_thread): Likewise.
5478 (get_image_name): Likewise.
5479
54802015-08-25 Yao Qi <yao.qi@linaro.org>
5481
5482 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5483
54842015-08-25 Yao Qi <yao.qi@linaro.org>
5485
5486 * Makefile.in (aarch64-linux.o): New rule.
5487 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5488 srv_tgtobj.
5489 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5490 (aarch64_init_debug_reg_state): Make it extern.
5491 (aarch64_linux_prepare_to_resume): Remove.
5492
54932015-08-25 Yao Qi <yao.qi@linaro.org>
5494
5495 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5496 lwp_arch_private_info and ptid_of_lwp.
5497
54982015-08-25 Yao Qi <yao.qi@linaro.org>
5499
5500 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5501 Find proc_info by find_process_pid. All callers updated.
5502
55032015-08-25 Yao Qi <yao.qi@linaro.org>
5504
5505 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5506 Remove.
5507 (debug_reg_change_callback): Remove.
5508 (aarch64_notify_debug_reg_change): Remove.
5509
55102015-08-25 Yao Qi <yao.qi@linaro.org>
5511
5512 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5513 Call current_lwp_ptid.
5514
55152015-08-25 Yao Qi <yao.qi@linaro.org>
5516
5517 * linux-aarch64-low.c (debug_reg_change_callback): Use
5518 debug_printf.
5519
55202015-08-25 Yao Qi <yao.qi@linaro.org>
5521
5522 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5523
55242015-08-25 Yao Qi <yao.qi@linaro.org>
5525
5526 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5527
55282015-08-25 Yao Qi <yao.qi@linaro.org>
5529
5530 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5531 the code.
5532
55332015-08-25 Yao Qi <yao.qi@linaro.org>
5534
5535 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5536 Remove.
5537 (debug_reg_change_callback): Remove argument entry and add argument
5538 lwp. Remove local variable thread. Don't print thread id in the
5539 debugging output. Don't check whether pid of thread equals to pid.
5540 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5541 iterate_over_lwps instead find_inferior.
5542
55432015-08-24 Pedro Alves <palves@redhat.com>
5544
5545 * inferiors.c (get_first_process): New function.
5546 * inferiors.h (get_first_process): New declaration.
5547 * remote-utils.c (read_ptid): Default to the first process in the
5548 list, instead of to the current thread's process.
5549
55502015-08-24 Pedro Alves <palves@redhat.com>
5551
5552 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5553 * event-loop.c: Likewise.
5554 * remote-utils.c: Likewise.
5555 * tracepoint.c: Likewise.
5556
55572015-08-24 Pedro Alves <palves@redhat.com>
5558
5559 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5560 ptid_get_lwp.
5561
55622015-08-21 Pedro Alves <palves@redhat.com>
5563
5564 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5565 instead of literal 1.
5566
55672015-08-21 Pedro Alves <palves@redhat.com>
5568
5569 * tdesc.c (default_description): Explicitly zero-initialize.
5570
55712015-08-21 Pedro Alves <palves@redhat.com>
5572
5573 PR gdb/18749
5574 * inferiors.c (remove_thread): Discard any pending stop reply for
5575 this thread.
5576 * server.c (remove_all_on_match_pid): Rename to ...
5577 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5578 instead of a pid.
5579 (discard_queued_stop_replies): Change parameter to a ptid. Now
5580 extern.
5581 (handle_v_kill, kill_inferior_callback, captured_main)
5582 (process_serial_event): Adjust.
5583 * server.h (discard_queued_stop_replies): Declare.
5584
55852015-08-21 Pedro Alves <palves@redhat.com>
5586
5587 * linux-low.c (wait_for_sigstop): Always switch to no thread
5588 selected if the previously current thread dies.
5589 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5590 process instead of the current thread's.
5591 * remote-utils.c (input_interrupt): Don't check if there's no
5592 current thread.
5593 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5594 current thread to the general thread fails, error out.
5595 (handle_qxfer_auxv, handle_qxfer_libraries)
5596 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5597 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5598 (handle_query): Check if there's a thread selected instead of
5599 checking whether there's any thread in the thread list.
5600 (handle_qxfer_threads, handle_qxfer_btrace)
5601 (handle_qxfer_btrace_conf): Don't error out early if there's no
5602 thread in the thread list.
5603 (handle_v_cont, myresume): Don't set the current thread to the
5604 continue thread.
5605 (process_serial_event) <Hg handling>: Also set thread_id if the
5606 previous general thread is still alive.
5607 (process_serial_event) <g/G handling>: If setting the current
5608 thread to the general thread fails, error out.
5609 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5610 thread's lwp instead of the current thread's.
5611 * target.c (set_desired_thread): If the desired thread was not
5612 found, leave the current thread pointing to NULL. Return an int
5613 (boolean) indicating success.
5614 * target.h (set_desired_thread): Change return type to int.
5615
56162015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5617
5618 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5619 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5620 #includes.
5621 (ps_get_thread_area): New function.
5622
56232015-08-19 Gary Benson <gbenson@redhat.com>
5624
5625 * hostio.c (handle_pread): Do not attempt to read more data
5626 than hostio_reply_with_data can fit in a packet.
5627
56282015-08-18 Joel Brobecker <brobecker@adacore.com>
5629
5630 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5631
56322015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5633
5634 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5635
56362015-08-06 Pedro Alves <palves@redhat.com>
5637
5638 * tracepoint.c (expr_eval_result): Now an int.
5639
56402015-08-06 Pedro Alves <palves@redhat.com>
5641
5642 * gdbthread.h (struct regcache): Forward declare.
5643 (struct thread_info) <regcache_data>: Now a struct regcache
5644 pointer.
5645 * inferiors.c (inferior_regcache_data)
5646 (set_inferior_regcache_data): Now work with struct regcache
5647 pointers.
5648 * inferiors.h (struct regcache): Forward declare.
5649 (inferior_regcache_data, set_inferior_regcache_data): Now work
5650 with struct regcache pointers.
5651 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5652 (free_register_cache_thread): Remove struct regcache pointer
5653 casts.
5654
56552015-08-06 Pedro Alves <palves@redhat.com>
5656
5657 * server.c (captured_main): On error, print the exception message
5658 to stderr, and if run_once is set, throw a quit.
5659
56602015-08-06 Pedro Alves <palves@redhat.com>
5661
5662 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5663 the current thread.
5664
56652015-08-06 Pedro Alves <palves@redhat.com>
5666
5667 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5668 reading beyond the passed in buffer length.
5669
56702015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5671
5672 * tracepoint.c (symbol_list) <required>: Remove.
5673
56742015-08-06 Pedro Alves <palves@redhat.com>
5675
5676 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5677 count if stopping and suspending threads.
5678 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5679 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5680 (linux_detach): Complete an ongoing step-over.
5681 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5682 throughout.
5683 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5684 (linux_wait_1): If passing a signal to the inferior after
5685 finishing a step-over, unsuspend and re-resume all lwps. If we
5686 see a single-step event but the thread should be continuing, don't
5687 pass the trap to gdb.
5688 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5689 internal_error instead of gdb_assert.
5690 (enqueue_pending_signal): New function.
5691 (check_ptrace_stopped_lwp_gone): Add debug output.
5692 (start_step_over): Use internal_error instead of gdb_assert.
5693 (complete_ongoing_step_over): New function.
5694 (linux_resume_one_thread): Don't resume a suspended thread.
5695 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5696 it stepping.
5697
56982015-08-06 Pedro Alves <palves@redhat.com>
5699
5700 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5701 (linux_thread_alive): Use lwp_is_marked_dead.
5702 (extended_event_reported): Delete.
5703 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5704 instead of extended_event_reported.
5705 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5706 as well.
5707 (lwp_is_marked_dead): New function.
5708 (lwp_running): Use lwp_is_marked_dead.
5709 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5710 comment.
5711
57122015-08-06 Pedro Alves <palves@redhat.com>
5713
5714 * linux-low.c (linux_wait_1): Move fork event output out of the
5715 !report_to_gdb check. Pass event_child->waitstatus to
5716 target_waitstatus_to_string instead of ourstatus.
5717
57182015-08-04 Yao Qi <yao.qi@linaro.org>
5719
5720 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5721 if current_thread is 32 bit.
5722
57232015-08-04 Yao Qi <yao.qi@linaro.org>
5724
5725 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5726 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5727 * server.c (extended_protocol): Remove "static".
5728 * server.h (extended_protocol): Declare it.
5729
57302015-08-04 Yao Qi <yao.qi@linaro.org>
5731
5732 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5733 both aarch64 and aarch32.
5734 (aarch64_set_pc): Likewise.
5735
57362015-08-04 Yao Qi <yao.qi@linaro.org>
5737
5738 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5739 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5740 arm-with-neon.xml to srv_xmlfiles.
5741 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5742 (is_64bit_tdesc): New function.
5743 (aarch64_linux_read_description): New function.
5744 (aarch64_arch_setup): Call aarch64_linux_read_description.
5745 (regs_info): Rename to regs_info_aarch64.
5746 (aarch64_regs_info): Return right regs_info.
5747 (initialize_low_arch): Call initialize_low_arch_aarch32.
5748
57492015-08-04 Yao Qi <yao.qi@linaro.org>
5750
5751 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5752 * linux-aarch32-low.c: New file.
5753 * linux-aarch32-low.h: New file.
5754 * linux-arm-low.c (arm_fill_gregset): Move it to
5755 linux-aarch32-low.c.
5756 (arm_store_gregset): Likewise.
5757 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5758 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5759 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5760 (regs_info): Rename to regs_info_arm.
5761 (arm_regs_info): Return regs_info_aarch32 if
5762 have_ptrace_getregset is 1 and target description is
5763 arm_with_neon or arm_with_vfpv3.
5764 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5765 Call initialize_low_arch_aarch32 instead.
5766
57672015-08-04 Yao Qi <yao.qi@linaro.org>
5768
5769 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5770 * linux-low.c: ... here.
5771 * linux-low.h (have_ptrace_getregset): Declare it.
5772
57732015-08-04 Pedro Alves <palves@redhat.com>
5774
5775 * thread-db.c (struct thread_db): Use new typedefs.
5776 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5777 CHK calls.
5778 (disable_thread_event_reporting): Cast result of dlsym to
5779 destination function pointer type.
5780 (thread_db_mourn): Use td_ta_delete_ftype.
5781
57822015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5783
5784 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5785 arch variant.
5786 (CDX_BREAKPOINT): Define for R2.
5787 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5788 (the_low_target): Add comments.
5789
57902015-07-30 Yao Qi <yao.qi@linaro.org>
5791
5792 * linux-arm-low.c (arm_hwcap): Remove it.
5793 (arm_read_description): New local variable arm_hwcap. Don't
5794 set arm_hwcap to zero.
5795
57962015-07-30 Yao Qi <yao.qi@linaro.org>
5797
5798 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5799 Use regcache->tdesc instead.
5800 (arm_store_wmmxregset): Likewise.
5801 (arm_fill_vfpregset): Likewise.
5802 (arm_store_vfpregset): Likewise.
5803
58042015-07-30 Yao Qi <yao.qi@linaro.org>
5805
5806 * linux-arm-low.c: Include arch/arm.h.
5807 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5808 (arm_store_gregset): Likewise.
5809
58102015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5811
5812 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5813 ptrace's 4th parameter.
5814
58152015-07-27 Yao Qi <yao.qi@linaro.org>
5816
5817 * configure.srv (case aarch64*-*-linux*): Don't set
5818 srv_linux_usrregs.
5819
58202015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5821
5822 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5823 sys/ptrace.h.
5824 * linux-arm-low.c: Likewise.
5825 * linux-cris-low.c: Likewise.
5826 * linux-crisv32-low.c: Likewise.
5827 * linux-low.c: Likewise.
5828 * linux-m68k-low.c: Likewise.
5829 * linux-mips-low.c: Likewise.
5830 * linux-nios2-low.c: Likewise.
5831 * linux-s390-low.c: Likewise.
5832 * linux-sparc-low.c: Likewise.
5833 * linux-tic6x-low.c: Likewise.
5834 * linux-tile-low.c: Likewise.
5835 * linux-x86-low.c: Likewise.
5836
58372015-07-24 Pedro Alves <palves@redhat.com>
5838
5839 * config.in: Regenerate.
5840 * configure: Regenerate.
5841
58422015-07-24 Pedro Alves <palves@redhat.com>
5843
5844 * acinclude.m4: Include ../ptrace.m4.
5845 * configure.ac: Call GDB_AC_PTRACE.
5846 * config.in, configure: Regenerate.
5847
58482015-07-24 Yao Qi <yao.qi@linaro.org>
5849
5850 * linux-low.c (linux_create_inferior): Remove setting to
5851 proc->priv->new_inferior.
5852 (linux_attach): Likewise.
5853 (linux_low_filter_event): Likewise.
5854 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5855
58562015-07-24 Yao Qi <yao.qi@linaro.org>
5857
5858 * linux-low.c (linux_arch_setup): New function.
5859 (linux_low_filter_event): If proc->tdesc is NULL and
5860 proc->attached is true, call the_low_target.arch_setup.
5861 Otherwise, keep status pending, and return.
5862 (linux_resume_one_lwp_throw): Don't call get_pc if
5863 thread->while_stepping isn't NULL. Don't call
5864 get_thread_regcache if proc->tdesc is NULL.
5865 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5866 (linux_target_ops): Install arch_setup.
5867 * server.c (start_inferior): Call the_target->arch_setup.
5868 * target.h (struct target_ops) <arch_setup>: New field.
5869 (target_arch_setup): New marco.
5870 * lynx-low.c (lynx_target_ops): Update.
5871 * nto-low.c (nto_target_ops): Update.
5872 * spu-low.c (spu_target_ops): Update.
5873 * win32-low.c (win32_target_ops): Update.
5874
58752015-07-24 Yao Qi <yao.qi@linaro.org>
5876
5877 * linux-low.c (linux_add_process): Don't set
5878 proc->priv->new_inferior.
5879 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5880 (linux_attach): Likewise.
5881
58822015-07-24 Yao Qi <yao.qi@linaro.org>
5883
5884 * server.c (start_inferior): Code refactor.
5885
58862015-07-24 Yao Qi <yao.qi@linaro.org>
5887
5888 * server.c (process_serial_event): Set general_thread.
5889
58902015-07-21 Yao Qi <yao.qi@linaro.org>
5891
5892 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5893 aarch64_linux_get_debug_reg_capacity.
5894
58952015-07-17 Yao Qi <yao.qi@linaro.org>
5896
5897 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5898 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5899 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5900 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5901 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5902 (AARCH64_HWP_ALIGNMENT): Likewise.
5903 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5904 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5905 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5906 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5907 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5908 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5909 (struct aarch64_debug_reg_state): Likewise.
5910 (struct arch_lwp_info): Likewise.
5911 (aarch64_align_watchpoint): Likewise.
5912 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5913 (aarch64_watchpoint_length): Likewise.
5914 (aarch64_point_encode_ctrl_reg): Likewise
5915 (aarch64_point_is_aligned): Likewise.
5916 (aarch64_align_watchpoint): Likewise.
5917 (aarch64_linux_set_debug_regs):
5918 (aarch64_dr_state_insert_one_point): Likewise.
5919 (aarch64_dr_state_remove_one_point): Likewise.
5920 (aarch64_handle_breakpoint): Likewise.
5921 (aarch64_handle_aligned_watchpoint): Likewise.
5922 (aarch64_handle_unaligned_watchpoint): Likewise.
5923 (aarch64_handle_watchpoint): Likewise.
5924
59252015-07-17 Yao Qi <yao.qi@linaro.org>
5926
5927 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5928 and don't aarch64_get_debug_reg_state. All callers update.
5929 (aarch64_handle_aligned_watchpoint): Likewise.
5930 (aarch64_handle_unaligned_watchpoint): Likewise.
5931 (aarch64_handle_watchpoint): Likewise.
5932 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5933 (aarch64_remove_point): Likewise.
5934
59352015-07-17 Yao Qi <yao.qi@linaro.org>
5936
5937 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5938 debug_printf.
5939 (aarch64_handle_unaligned_watchpoint): Likewise.
5940
59412015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5942
5943 Revert the previous 3 commits:
5944 Move gdb_regex* to common/
5945 Move linux_find_memory_regions_full & co.
5946 gdbserver build-id attribute generator
5947
59482015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5949 Jan Kratochvil <jan.kratochvil@redhat.com>
5950
5951 gdbserver build-id attribute generator.
5952 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5953 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5954 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5955 (find_phdr): New.
5956 (get_dynamic): Use find_pdhr to traverse program headers.
5957 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5958 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5959 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5960 (get_hex_build_id): New.
5961 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5962 to reply XML document.
5963
59642015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5965 Jan Kratochvil <jan.kratochvil@redhat.com>
5966
5967 * target.c: Include target/target-utils.h and fcntl.h.
5968 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5969 (target_fileio_read_stralloc): New functions.
5970
59712015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5972
5973 * Makefile.in (OBS): Add gdb_regex.o.
5974 (gdb_regex.o): New.
5975 * config.in: Rebuilt.
5976 * configure: Rebuilt.
5977
59782015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5979 Jan Kratochvil <jan.kratochvil@redhat.com>
5980
5981 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5982 * Makefile.in (OBS): Add target-utils.o.
5983 (linux-maps.o, target-utils.o): New.
5984 * configure.srv (srv_linux_obj): Add linux-maps.o.
5985
59862015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5987
5988 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5989 function, return 1.
5990 (the_low_target): Install it.
5991
59922015-07-14 Pedro Alves <palves@redhat.com>
5993
5994 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5995 Instead, ignore ECHILD, and throw an error for other errnos.
5996
59972015-07-10 Pedro Alves <palves@redhat.com>
5998
5999 * event-loop.c (struct callback_event) <data>: Change type to
6000 gdb_client_data instance instead of gdb_client_data pointer.
6001 (append_callback_event): Adjust.
6002
60032015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6004
6005 * linux-aarch64-low.c: Add comments for each linux_target_ops
6006 method. Remove comments already covered in target_ops and
6007 linux_target_ops definitions.
6008 (the_low_target): Add comments for each unimplemented method.
6009
60102015-07-09 Yao Qi <yao.qi@linaro.org>
6011
6012 * linux-aarch64-low.c (aarch64_regmap): Remove.
6013 (aarch64_usrregs_info): Remove.
6014 (regs_info): Set field usrregs to NULL.
6015
60162015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6017
6018 * linux-low.c: Include "rsp-low.h"
6019 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6020 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6021 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6022 (handle_btrace_enable_pt): New.
6023 (handle_btrace_general_set): Support "pt".
6024 (handle_btrace_conf_general_set): Support "pt:size".
6025
60262015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6027
6028 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6029 Z_PACKET_SW_BP.
6030
60312015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6032
6033 * linux-aarch64-low.c: Remove comment about endianness.
6034 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6035 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6036 memcmp.
6037
60382015-06-24 Gary Benson <gbenson@redhat.com>
6039
6040 * linux-i386-ipa.c (stdint.h): Do not include.
6041 * lynx-i386-low.c (stdint.h): Likewise.
6042 * lynx-ppc-low.c (stdint.h): Likewise.
6043 * mem-break.c (stdint.h): Likewise.
6044 * thread-db.c (stdint.h): Likewise.
6045 * tracepoint.c (stdint.h): Likewise.
6046 * win32-low.c (stdint.h): Likewise.
6047
60482015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6049
6050 * server.c (write_qxfer_response): Update call to
6051 remote_escape_output.
6052
60532015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6054 Jan Kratochvil <jan.kratochvil@redhat.com>
6055
6056 Merge multiple hex conversions.
6057 * gdbreplay.c (tohex): Rename to 'fromhex'.
6058 (logchar): Use fromhex.
6059
60602015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6061
6062 * server.c (handle_qxfer_libraries): Set `version' attribute for
6063 <library-list>.
6064
60652015-06-10 Gary Benson <gbenson@redhat.com>
6066
6067 * target.h (struct target_ops) <multifs_open>: New field.
6068 <multifs_unlink>: Likewise.
6069 <multifs_readlink>: Likewise.
6070 * linux-low.c (nat/linux-namespaces.h): New include.
6071 (linux_target_ops): Initialize the_target->multifs_open,
6072 the_target->multifs_unlink and the_target->multifs_readlink.
6073 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6074 * hostio.c (hostio_fs_pid): New static variable.
6075 (hostio_handle_new_gdb_connection): New function.
6076 (handle_setfs): Likewise.
6077 (handle_open): Use the_target->multifs_open as appropriate.
6078 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6079 (handle_readlink): Use the_target->multifs_readlink as
6080 appropriate.
6081 (handle_vFile): Handle vFile:setfs packets.
6082 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6083 after target_handle_new_gdb_connection.
6084
60852015-06-10 Gary Benson <gbenson@redhat.com>
6086
6087 * configure.ac (AC_CHECK_FUNCS): Add setns.
6088 * config.in: Regenerate.
6089 * configure: Likewise.
6090 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6091 (linux-namespaces.o): New rule.
6092 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6093
60942015-06-09 Gary Benson <gbenson@redhat.com>
6095
6096 * hostio.c (handle_open): Process mode argument with
6097 fileio_to_host_mode.
6098
60992015-06-01 Yao Qi <yao.qi@linaro.org>
6100
6101 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6102 * linux-x86-low.c: Likewise.
6103
61042015-05-28 Don Breazeal <donb@codesourcery.com>
6105
6106 * linux-low.c (handle_extended_wait): Initialize
6107 thread_info.last_resume_kind for new fork children.
6108
61092015-05-15 Pedro Alves <palves@redhat.com>
6110
6111 * target.h (target_handle_new_gdb_connection): Rewrite using if
6112 wrapped in do/while.
6113
61142015-05-14 Joel Brobecker <brobecker@adacore.com>
6115
6116 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6117 * configure, config.in: Regenerate.
6118 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6119 Declare typedef.
6120
61212015-05-12 Don Breazeal <donb@codesourcery.com>
6122
6123 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6124 PTRACE_EVENT_VFORK_DONE.
6125 (linux_low_ptrace_options, extended_event_reported): Add vfork
6126 events.
6127 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6128 and "vforkdone" for RSP 'T' Stop Reply Packet.
6129 * server.h (report_vfork_events): Declare
6130 global variable.
6131
61322015-05-12 Don Breazeal <donb@codesourcery.com>
6133
6134 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6135 (the_low_target) <new_fork>: Initialize new member.
6136 * linux-arm-low.c (arm_new_fork): New function.
6137 (the_low_target) <new_fork>: Initialize new member.
6138 * linux-low.c (handle_extended_wait): Call new target function
6139 new_fork.
6140 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6141 * linux-mips-low.c (mips_add_watchpoint): New function
6142 extracted from mips_insert_point.
6143 (the_low_target) <new_fork>: Initialize new member.
6144 (mips_linux_new_fork): New function.
6145 (mips_insert_point): Call mips_add_watchpoint.
6146 * linux-x86-low.c (x86_linux_new_fork): New function.
6147 (the_low_target) <new_fork>: Initialize new member.
6148
61492015-05-12 Don Breazeal <donb@codesourcery.com>
6150
6151 * linux-low.c (handle_extended_wait): Implement return value,
6152 rename argument 'event_child' to 'event_lwp', handle
6153 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6154 (linux_low_ptrace_options): New function.
6155 (linux_low_filter_event): Call linux_low_ptrace_options,
6156 use different argument fo linux_enable_event_reporting,
6157 use return value from handle_extended_wait.
6158 (extended_event_reported): New function.
6159 (linux_wait_1): Call extended_event_reported and set
6160 status to report fork events.
6161 (linux_write_memory): Add pid to debug message.
6162 (reset_lwp_ptrace_options_callback): New function.
6163 (linux_handle_new_gdb_connection): New function.
6164 (linux_target_ops): Initialize new structure member.
6165 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6166 * lynx-low.c: Initialize new structure member.
6167 * remote-utils.c (prepare_resume_reply): Implement stop reason
6168 "fork" for "T" stop message.
6169 * server.c (handle_query): Call handle_new_gdb_connection.
6170 * server.h (report_fork_events): Declare global flag.
6171 * target.h (struct target_ops) <handle_new_gdb_connection>:
6172 New member.
6173 (target_handle_new_gdb_connection): New macro.
6174 * win32-low.c: Initialize new structure member.
6175
61762015-05-12 Don Breazeal <donb@codesourcery.com>
6177
6178 * mem-break.c (APPEND_TO_LIST): Define macro.
6179 (clone_agent_expr): New function.
6180 (clone_one_breakpoint): New function.
6181 (clone_all_breakpoints): New function.
6182 * mem-break.h: Declare new functions.
6183
61842015-05-12 Don Breazeal <donb@codesourcery.com>
6185
6186 * linux-low.c (linux_supports_fork_events): New function.
6187 (linux_supports_vfork_events): New function.
6188 (linux_target_ops): Initialize new structure members.
6189 (initialize_low): Call linux_check_ptrace_features.
6190 * lynx-low.c (lynx_target_ops): Initialize new structure
6191 members.
6192 * server.c (report_fork_events, report_vfork_events):
6193 New global flags.
6194 (handle_query): Add new features to qSupported packet and
6195 response.
6196 (captured_main): Initialize new global variables.
6197 * target.h (struct target_ops) <supports_fork_events>:
6198 New member.
6199 <supports_vfork_events>: New member.
6200 (target_supports_fork_events): New macro.
6201 (target_supports_vfork_events): New macro.
6202 * win32-low.c (win32_target_ops): Initialize new structure
6203 members.
6204
62052015-05-12 Gary Benson <gbenson@redhat.com>
6206
6207 * server.c (handle_qxfer_exec_file): Use current process
6208 if annex is empty.
6209
62102015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6211
6212 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6213 Remove HAVE_PTRACE_GETREGS conditionals.
6214 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6215 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6216
62172015-05-08 Yao Qi <yao.qi@linaro.org>
6218
6219 * linux-low.c (linux_supports_conditional_breakpoints): New
6220 function.
6221 (linux_target_ops): Install new target method.
6222 * lynx-low.c (lynx_target_ops): Install NULL hook for
6223 supports_conditional_breakpoints.
6224 * nto-low.c (nto_target_ops): Likewise.
6225 * spu-low.c (spu_target_ops): Likewise.
6226 * win32-low.c (win32_target_ops): Likewise.
6227 * server.c (handle_query): Check
6228 target_supports_conditional_breakpoints.
6229 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6230 New field.
6231 (target_supports_conditional_breakpoints): New macro.
6232
62332015-05-06 Pedro Alves <palves@redhat.com>
6234
6235 PR server/18081
6236 * server.c (start_inferior): If the process exits, mourn it.
6237
62382015-04-21 Gary Benson <gbenson@redhat.com>
6239
6240 * hostio.c (fileio_open_flags_to_host): Factored out to
6241 fileio_to_host_openflags in common/fileio.c. Single use
6242 updated.
6243
62442015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6245
6246 * linux-xtensa-low.c (xtensa_fill_gregset)
6247 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6248 XCHAL_HAVE_LOOP.
6249
62502015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6251
6252 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6253 (regs_info): Replace usrregs pointer with NULL.
6254
62552015-04-17 Gary Benson <gbenson@redhat.com>
6256
6257 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6258 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6259 * server.c (handle_qxfer_exec_file): New function.
6260 (qxfer_packets): Add exec-file entry.
6261 (handle_query): Report qXfer:exec-file:read as supported packet.
6262
62632015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6264
6265 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6266
62672015-04-09 Gary Benson <gbenson@redhat.com>
6268
6269 * hostio-errno.c (errno_to_fileio_error): Remove function.
6270 Update caller to use remote_fileio_to_fio_error.
6271
62722015-04-09 Yao Qi <yao.qi@linaro.org>
6273
6274 * linux-low.c (linux_insert_point): Call
6275 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6276 (linux_remove_point): Call remove_memory_breakpoint if type is
6277 raw_bkpt_type_sw.
6278 * linux-x86-low.c (x86_insert_point): Don't call
6279 insert_memory_breakpoint.
6280 (x86_remove_point): Don't call remove_memory_breakpoint.
6281
62822015-04-01 Pedro Alves <palves@redhat.com>
6283 Cleber Rosa <crosa@redhat.com>
6284
6285 * server.c (gdbserver_usage): Reorganize and extend the usage
6286 message.
6287
62882015-03-24 Pedro Alves <palves@redhat.com>
6289
6290 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6291 output. Also dump TRAP_TRACE.
6292 (linux_low_filter_event): In debug output, distinguish a
6293 resume_stop SIGSTOP from a delayed SIGSTOP.
6294
62952015-03-24 Gary Benson <gbenson@redhat.com>
6296
6297 * linux-x86-low.c (x86_linux_new_thread): Moved to
6298 nat/x86-linux.c.
6299 (x86_linux_prepare_to_resume): Likewise.
6300
63012015-03-24 Gary Benson <gbenson@redhat.com>
6302
6303 * Makefile.in (x86-linux-dregs.o): New rule.
6304 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6305 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6306 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6307 (x86_linux_dr_get): Likewise.
6308 (x86_linux_dr_set): Likewise.
6309 (update_debug_registers_callback): Likewise.
6310 (x86_linux_dr_set_addr): Likewise.
6311 (x86_linux_dr_get_addr): Likewise.
6312 (x86_linux_dr_set_control): Likewise.
6313 (x86_linux_dr_get_control): Likewise.
6314 (x86_linux_dr_get_status): Likewise.
6315 (x86_linux_update_debug_registers): Likewise.
6316
63172015-03-24 Gary Benson <gbenson@redhat.com>
6318
6319 * linux-x86-low.c (x86_linux_update_debug_registers):
6320 New function, factored out from...
6321 (x86_linux_prepare_to_resume): ...this.
6322
63232015-03-24 Gary Benson <gbenson@redhat.com>
6324
6325 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6326 (x86_linux_dr_set): Likewise.
6327 (update_debug_registers_callback): Likewise.
6328 (x86_linux_dr_set_addr): Likewise.
6329 (x86_linux_dr_get_addr): Likewise.
6330 (x86_linux_dr_set_control): Likewise.
6331 (x86_linux_dr_get_control): Likewise.
6332 (x86_linux_dr_get_status): Likewise.
6333 (x86_linux_prepare_to_resume): Likewise.
6334
63352015-03-24 Gary Benson <gbenson@redhat.com>
6336
6337 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6338 Use perror_with_name. Pass string through gettext.
6339 (x86_linux_dr_set): Likewise.
6340
63412015-03-24 Gary Benson <gbenson@redhat.com>
6342
6343 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6344 (x86_linux_dr_set_addr): ...this.
6345 (x86_dr_low_get_addr): Rename to...
6346 (x86_linux_dr_get_addr): ...this.
6347 (x86_dr_low_set_control): Rename to...
6348 (x86_linux_dr_set_control): ...this.
6349 (x86_dr_low_get_control): Rename to...
6350 (x86_linux_dr_get_control): ...this.
6351 (x86_dr_low_get_status): Rename to...
6352 (x86_linux_dr_get_status): ...this.
6353 (x86_dr_low): Update with new function names.
6354
63552015-03-24 Gary Benson <gbenson@redhat.com>
6356
6357 * Makefile.in (x86-linux.o): New rule.
6358 * configure.srv: Add x86-linux.o to relevant targets.
6359 * linux-low.c (lwp_set_arch_private_info): New function.
6360 (lwp_arch_private_info): Likewise.
6361 * linux-x86-low.c: Include nat/x86-linux.h.
6362 (arch_lwp_info): Removed structure.
6363 (update_debug_registers_callback):
6364 Use lwp_set_debug_registers_changed.
6365 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6366 and lwp_set_debug_registers_changed.
6367 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6368
63692015-03-24 Gary Benson <gbenson@redhat.com>
6370
6371 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6372 * linux-arm-low.c (arm_new_thread): Likewise.
6373 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6374 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6375 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6376 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6377
63782015-03-24 Gary Benson <gbenson@redhat.com>
6379
6380 * linux-low.c (ptid_of_lwp): New function.
6381 (lwp_is_stopped): Likewise.
6382 (lwp_stop_reason): Likewise.
6383 * linux-x86-low.c (update_debug_registers_callback):
6384 Use lwp_is_stopped.
6385 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6386 lwp_stop_reason.
6387
63882015-03-24 Gary Benson <gbenson@redhat.com>
6389
6390 * linux-low.h (linux_stop_lwp): Remove declaration.
6391
63922015-03-24 Gary Benson <gbenson@redhat.com>
6393
6394 * linux-low.h: Include nat/linux-nat.h.
6395 * linux-low.c (iterate_over_lwps_args): New structure.
6396 (iterate_over_lwps_filter): New function.
6397 (iterate_over_lwps): Likewise.
6398 * linux-x86-low.c (update_debug_registers_callback):
6399 Update signature to what iterate_over_lwps expects.
6400 Remove PID check that iterate_over_lwps now performs.
6401 (x86_dr_low_set_addr): Use iterate_over_lwps.
6402 (x86_dr_low_set_control): Likewise.
6403
64042015-03-24 Gary Benson <gbenson@redhat.com>
6405
6406 * linux-x86-low.c (x86_debug_reg_state): New function.
6407 (x86_linux_prepare_to_resume): Use the above.
6408
64092015-03-24 Gary Benson <gbenson@redhat.com>
6410
6411 * linux-low.c (current_lwp_ptid): New function.
6412 * linux-x86-low.c: Include nat/linux-nat.h.
6413 (x86_dr_low_get_addr): Use current_lwp_ptid.
6414 (x86_dr_low_get_control): Likewise.
6415 (x86_dr_low_get_status): Likewise.
6416
64172015-03-20 Pedro Alves <palves@redhat.com>
6418
6419 * tracepoint.c (cmd_qtstatus): Make "str" const.
6420
64212015-03-20 Pedro Alves <palves@redhat.com>
6422
6423 * server.c (handle_general_set): Make "req_str" const.
6424
64252015-03-19 Pedro Alves <palves@redhat.com>
6426
6427 * linux-low.c (linux_resume_one_lwp): Rename to ...
6428 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6429 instead call perror_with_name.
6430 (check_ptrace_stopped_lwp_gone): New function.
6431 (linux_resume_one_lwp): Reimplement as wrapper around
6432 linux_resume_one_lwp_throw that swallows errors if the LWP is
6433 gone.
6434
64352015-03-19 Pedro Alves <palves@redhat.com>
6436
6437 * linux-low.c (count_events_callback, select_event_lwp_callback):
6438 No longer check whether the thread has resume_stop as last resume
6439 kind.
6440
64412015-03-19 Pedro Alves <palves@redhat.com>
6442
6443 * linux-low.c (count_events_callback, select_event_lwp_callback):
6444 Use the lwp's status_pending_p field, not the thread's.
6445
64462015-03-19 Pedro Alves <palves@redhat.com>
6447
6448 * linux-low.c (select_event_lwp_callback): Update comments to
6449 no longer mention SIGTRAP.
6450
64512015-03-18 Gary Benson <gbenson@redhat.com>
6452
6453 * server.c (handle_query): Do not report vFile:fstat as supported.
6454
64552015-03-11 Gary Benson <gbenson@redhat.com>
6456
6457 * hostio.c (sys/types.h): New include.
6458 (sys/stat.h): Likewise.
6459 (common-remote-fileio.h): Likewise.
6460 (handle_fstat): New function.
6461 (handle_vFile): Handle vFile:fstat packets.
6462
64632015-03-11 Gary Benson <gbenson@redhat.com>
6464
6465 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6466 struct stat.st_blocks and struct stat.st_blksize.
6467 * configure: Regenerate.
6468 * config.in: Likewise.
6469 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6470 (OBS): Add common-remote-fileio.o.
6471 (common-remote-fileio.o): New rule.
6472
64732015-03-09 Pedro Alves <palves@redhat.com>
6474
6475 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6476 'struct sockaddr' pointer in 'accept' call.
6477
64782015-03-09 Pedro Alves <palves@redhat.com>
6479
6480 Revert:
6481 2015-03-07 Pedro Alves <palves@redhat.com>
6482 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6483 or <winsock2.h> here. Instead include "gdb_socket.h".
6484 (remote_open): Use union gdb_sockaddr_u.
6485 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6486 or <winsock2.h> here. Instead include "gdb_socket.h".
6487 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6488 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6489 or <sys/un.h>.
6490 (init_named_socket, gdb_agent_helper_thread): Use union
6491 gdb_sockaddr_u.
6492
64932015-03-07 Pedro Alves <palves@redhat.com>
6494
6495 * configure.ac (build_warnings): Move
6496 -Wdeclaration-after-statement to the C-specific set.
6497 * configure: Regenerate.
6498
64992015-03-07 Pedro Alves <palves@redhat.com>
6500
6501 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6502 or <winsock2.h> here. Instead include "gdb_socket.h".
6503 (remote_open): Use union gdb_sockaddr_u.
6504 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6505 or <winsock2.h> here. Instead include "gdb_socket.h".
6506 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6507 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6508 or <sys/un.h>.
6509 (init_named_socket, gdb_agent_helper_thread): Use union
6510 gdb_sockaddr_u.
6511
65122015-03-07 Pedro Alves <palves@redhat.com>
6513
6514 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6515 instead.
6516
65172015-03-06 Yao Qi <yao.qi@linaro.org>
6518
6519 * linux-aarch64-low.c (aarch64_insert_point): Use
6520 show_debug_regs as a boolean.
6521 (aarch64_remove_point): Likewise.
6522
65232015-03-05 Pedro Alves <palves@redhat.com>
6524
6525 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6526 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6527 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6528 * nto-low.c (nto_target_ops): Likewise.
6529 * spu-low.c (spu_target_ops): Likewise.
6530 * win32-low.c (win32_target_ops): Likewise.
6531
65322015-03-04 Pedro Alves <palves@redhat.com>
6533
6534 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6535 Decide whether a breakpoint triggered based on the SIGTRAP's
6536 siginfo.si_code.
6537 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6538 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6539 (linux_low_filter_event): Check for breakpoints before checking
6540 watchpoints.
6541 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6542 siginfo.si_code.
6543 (linux_stopped_by_sw_breakpoint)
6544 (linux_supports_stopped_by_sw_breakpoint)
6545 (linux_stopped_by_hw_breakpoint)
6546 (linux_supports_stopped_by_hw_breakpoint): New functions.
6547 (linux_target_ops): Install new target methods.
6548
65492015-03-04 Pedro Alves <palves@redhat.com>
6550
6551 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6552 * server.c (swbreak_feature, hwbreak_feature): New globals.
6553 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6554 (captured_main): Clear swbreak_feature and hwbreak_feature.
6555 * server.h (swbreak_feature, hwbreak_feature): Declare.
6556 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6557 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6558 supports_stopped_by_hw_breakpoint>: New fields.
6559 (target_supports_stopped_by_sw_breakpoint)
6560 (target_stopped_by_sw_breakpoint)
6561 (target_supports_stopped_by_hw_breakpoint)
6562 (target_stopped_by_hw_breakpoint): Declare.
6563
65642015-03-04 Pedro Alves <palves@redhat.com>
6565
6566 enum lwp_stop_reason -> enum target_stop_reason
6567 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6568 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6569 (linux_wait_1, stuck_in_jump_pad_callback)
6570 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6571 (linux_stopped_by_watchpoint):
6572 * linux-low.h (enum lwp_stop_reason): Delete.
6573 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6574 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6575
65762015-03-04 Yao Qi <yao.qi@linaro.org>
6577
6578 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6579
65802015-03-03 Gary Benson <gbenson@redhat.com>
6581
6582 * hostio.c (handle_vFile): Fix prefix lengths.
6583
65842015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6585
6586 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6587 ptr_bits.
6588
65892015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6590
6591 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6592 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6593 (clean): Add "rm -f" for above C files.
6594 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6595 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6596 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6597 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6598 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6599 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6600 (init_registers_s390x_vx_linux64)
6601 (init_registers_s390x_tevx_linux64)
6602 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6603 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6604 declarations.
6605 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6606 (s390_store_vxrs_high): New functions.
6607 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6608 NT_S390_VXRS_HIGH.
6609 (s390_arch_setup): Add logic for selecting one of the new target
6610 descriptions. Activate the new vector regsets if applicable.
6611 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6612 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6613 and init_registers_s390x_tevx_linux64.
6614
66152015-03-01 Pedro Alves <palves@redhat.com>
6616
6617 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6618 parameter.
6619
66202015-02-27 Pedro Alves <palves@redhat.com>
6621
6622 * linux-x86-low.c (u_debugreg_offset): New function.
6623 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6624
66252015-02-27 Pedro Alves <palves@redhat.com>
6626
6627 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6628 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6629 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6630 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6631 (ps_lsetfpregs, ps_getpid)
6632 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6633 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6634 (ps_lsetxregs, ps_plog): Declare.
6635
66362015-02-27 Pedro Alves <palves@redhat.com>
6637
6638 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6639 IP_AGENT_EXPORT_FUNC.
6640 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6641 IP_AGENT_EXPORT_FUNC.
6642 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6643 (IP_AGENT_EXPORT): Delete.
6644 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6645 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6646 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6647 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6648 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6649 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6650 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6651 (traceframe_read_count, traceframe_write_count)
6652 (traceframes_created, trace_state_variables, get_raw_reg)
6653 (get_trace_state_variable_value, set_trace_state_variable_value)
6654 (ust_loaded, helper_thread_id, cmd_buf): Use
6655 IPA_SYM_EXPORTED_NAME.
6656 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6657 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6658 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6659 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6660 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6661 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6662 EXTERN_C_PUSH/EXTERN_C_POP.
6663 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6664 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6665 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6666 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6667 (traceframe_write_count, traceframe_read_count)
6668 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6669 (about_to_request_buffer_space, get_trace_state_variable_value)
6670 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6671 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6672 EXTERN_C_PUSH/EXTERN_C_POP.
6673 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6674 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6675 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6676 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6677 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6678 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6679 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6680 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6681 Define.
6682 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6683 (IP_AGENT_EXPORT_VAR_DECL): Define.
6684 (tracing): Declare.
6685 (gdb_agent_get_raw_reg): Declare.
6686
66872015-02-27 Tom Tromey <tromey@redhat.com>
6688 Pedro Alves <palves@redhat.com>
6689
6690 Rename symbols whose names are reserved C++ keywords throughout.
6691
66922015-02-27 Pedro Alves <palves@redhat.com>
6693
6694 * Makefile.in (COMPILER): New, get it from autoconf.
6695 (CXX): Get from autoconf instead.
6696 (COMPILE.pre): Use COMPILER.
6697 (CC-LD): Rename to ...
6698 (CC_LD): ... this. Use COMPILER.
6699 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6700 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6701 * acinclude.m4: Include build-with-cxx.m4.
6702 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6703 Disable -Werror by default if building in C++ mode.
6704 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6705 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6706 the C++ compiler. Save/restore CXXFLAGS too.
6707 * configure: Regenerate.
6708
67092015-02-27 Pedro Alves <palves@redhat.com>
6710
6711 * acinclude.m4: Include libiberty.m4.
6712 * configure.ac: Call libiberty_INIT.
6713 * config.in, configure: Regenerate.
6714
67152015-02-26 Pedro Alves <palves@redhat.com>
6716
6717 * linux-low.c (linux_wait_1): When incrementing the PC past a
6718 program breakpoint always use the_low_target.breakpoint_len as
6719 increment, rather than the maximum between that and
6720 the_low_target.decr_pc_after_break.
6721
67222015-02-23 Pedro Alves <palves@redhat.com>
6723
6724 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6725 thread was doing a step-over; always adjust the PC if
6726 we stepped over a permanent breakpoint.
6727 (linux_wait_1): If we stepped over breakpoint that was on top of a
6728 permanent breakpoint, manually advance the PC past it.
6729
67302015-02-23 Pedro Alves <palves@redhat.com>
6731
6732 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6733 modes.
6734 (x86_fill_gregset, x86_store_gregset): Use it when handling
6735 $orig_eax.
6736
67372015-02-20 Pedro Alves <palves@redhat.com>
6738
6739 * thread-db.c: Include "nat/linux-procfs.h".
6740 (thread_db_init): Skip listing new threads if the kernel supports
6741 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6742
67432015-02-20 Pedro Alves <palves@redhat.com>
6744
6745 * linux-low.c (status_pending_p_callback): Use ptid_match.
6746
67472015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6748
6749 PR breakpoints/16812
6750 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6751 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6752 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6753
67542015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6755
6756 PR breakpoints/15956
6757 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6758
67592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6760
6761 * linux-low.c (linux_low_btrace_conf): Print size.
6762 * server.c (handle_btrace_conf_general_set): New.
6763 (hanle_general_set): Call handle_btrace_conf_general_set.
6764 (handle_query): Report Qbtrace-conf:bts:size as supported.
6765
67662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6767
6768 * linux-low.c (linux_low_enable_btrace): Update parameters.
6769 (linux_low_btrace_conf): New.
6770 (linux_target_ops)<to_btrace_conf>: Initialize.
6771 * server.c (current_btrace_conf): New.
6772 (handle_btrace_enable): Rename to ...
6773 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6774 to target_enable_btrace. Update comment. Update users.
6775 (handle_qxfer_btrace_conf): New.
6776 (qxfer_packets): Add btrace-conf entry.
6777 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6778 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6779 (target_ops)<read_btrace_conf>: New.
6780 (target_enable_btrace): Update parameters.
6781 (target_read_btrace_conf): New.
6782
67832015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6784
6785 * server.c (handle_btrace_general_set): Remove call to
6786 target_supports_btrace.
6787 (supported_btrace_packets): New.
6788 (handle_query): Call supported_btrace_packets.
6789 * target.h: include btrace-common.h.
6790 (btrace_target_info): Removed.
6791 (supports_btrace, target_supports_btrace): Update parameters.
6792
67932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6794
6795 * Makefile.in (SFILES): Add common/btrace-common.c.
6796 (OBS): Add common/btrace-common.o.
6797 (btrace-common.o): Add build rules.
6798 * linux-low: Include btrace-common.h.
6799 (linux_low_read_btrace): Use struct btrace_data. Call
6800 btrace_data_init and btrace_data_fini.
6801
68022015-02-06 Pedro Alves <palves@redhat.com>
6803
6804 * thread-db.c (find_new_threads_callback): Add debug output.
6805
68062015-02-04 Pedro Alves <palves@redhat.com>
6807
6808 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6809 (resume_stopped_resumed_lwps): New function.
6810 (linux_wait_for_event_filtered): Use it.
6811
68122015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6813
6814 * Makefile.in (SFILES): Add linux-personality.c.
6815 (linux-personality.o): New rule.
6816 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6817 list of objects to be built.
6818 * linux-low.c: Include nat/linux-personality.h.
6819 (linux_create_inferior): Remove code to disable address space
6820 randomization (moved to ../nat/linux-personality.c). Create
6821 cleanup to disable address space randomization.
6822
68232015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6824
6825 * Makefile.in (posix-strerror.o): New rule.
6826 (mingw-strerror.o): Likewise.
6827 * configure: Regenerated.
6828 * configure.ac: Source file ../common/common.host. Initialize new
6829 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6830
68312015-01-14 Yao Qi <yao@codesourcery.com>
6832
6833 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6834 (ppc-linux.o): New rule.
6835 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6836 * configure.ac: AC_CHECK_FUNCS(getauxval).
6837 * config.in: Re-generated.
6838 * configure: Re-generated.
6839 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6840 ppc64_64bit_inferior_p
6841
68422015-01-14 Yao Qi <yao@codesourcery.com>
6843
6844 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6845 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6846 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6847 (PT_ORIG_R3, PT_TRAP): Likewise.
6848 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6849 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6850 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6851
68522015-01-10 Joel Brobecker <brobecker@adacore.com>
6853
6854 * i387-fp.c (i387_cache_to_xsave): In look over
6855 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6856 zmmh_low_space field by use of zmmh_high_space.
6857
68582015-01-09 Pedro Alves <palves@redhat.com>
6859
6860 * linux-low.c (step_over_bkpt): Move higher up in the file.
6861 (handle_extended_wait): Don't store the stop_pc here.
6862 (get_stop_pc): Adjust comments and rename to ...
6863 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6864 stopped for a software breakpoint or hardware breakpoint.
6865 (thread_still_has_status_pending_p): New function.
6866 (status_pending_p_callback): Use
6867 thread_still_has_status_pending_p. If the event is no longer
6868 interesting, resume the LWP.
6869 (handle_tracepoints): Add assert.
6870 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6871 (wstatus_maybe_breakpoint): New function.
6872 (cancel_breakpoint): Delete function.
6873 (check_stopped_by_watchpoint): New function, factored out from
6874 linux_low_filter_event.
6875 (lp_status_maybe_breakpoint): Delete function.
6876 (linux_low_filter_event): Remove filter_ptid argument.
6877 Leave thread group exits pending here. Store the LWP's stop PC.
6878 Always leave events pending.
6879 (linux_wait_for_event_filtered): Pull all events out of the
6880 kernel, and leave them all pending.
6881 (count_events_callback, select_event_lwp_callback): Consider all
6882 events.
6883 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6884 (select_event_lwp): Only give preference to the stepping LWP in
6885 all-stop mode. Adjust comments.
6886 (ignore_event): New function.
6887 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6888 references to cancel_breakpoints. Adjust to renames. Also give
6889 equal priority to all LWPs that have had events in non-stop mode.
6890 If reporting a software breakpoint event, unadjust the LWP's PC.
6891 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6892 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6893 Adjust.
6894 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6895 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6896 (linux_stopped_by_watchpoint): Adjust.
6897 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6898 * linux-low.h (enum lwp_stop_reason): New.
6899 (struct lwp_info) <stop_pc>: Adjust comment.
6900 <stopped_by_watchpoint>: Delete field.
6901 <stop_reason>: New field.
6902 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6903 * mem-break.c (software_breakpoint_inserted_here)
6904 (hardware_breakpoint_inserted_here): New function.
6905 * mem-break.h (software_breakpoint_inserted_here)
6906 (hardware_breakpoint_inserted_here): Declare.
6907 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6908 (cancel_breakpoints): Delete.
6909 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6910 (upload_fast_traceframes): Remove references to
6911 cancel_breakpoints.
6912
69132015-01-09 Pedro Alves <palves@redhat.com>
6914
6915 * thread-db.c (find_new_threads_callback): Ignore thread if the
6916 kernel thread ID is -1.
6917
69182015-01-09 Pedro Alves <palves@redhat.com>
6919
6920 * linux-low.c (linux_attach_fail_reason_string): Move to
6921 nat/linux-ptrace.c, and rename.
6922 (linux_attach_lwp): Update comment.
6923 (attach_proc_task_lwp_callback): New function.
6924 (linux_attach): Adjust to rename and use
6925 linux_proc_attach_tgid_threads.
6926 (linux_attach_fail_reason_string): Delete declaration.
6927
69282015-01-01 Joel Brobecker <brobecker@adacore.com>
6929
6930 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6931 * server.c (gdbserver_version): Likewise.
6932
69332014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6934
6935 * remote-utils.c: Include ctype.h.
6936 (input_interrupt): Explicitly handle the case when the char
6937 received is the NUL byte. Improve the printing of non-ASCII
6938 characters.
6939
69402014-12-16 Joel Brobecker <brobecker@adacore.com>
6941
6942 * linux-low.c (linux_low_filter_event): Update call to
6943 linux_enable_event_reporting following the addition of
6944 a new parameter to that function.
6945
69462014-12-16 Catalin Udma <catalin.udma@freescale.com>
6947
6948 PR server/17457
6949 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6950 (AARCH64_FPCR_REGNO): Likewise.
6951 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6952 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6953 (aarch64_store_fpregset): Likewise.
6954
69552014-12-15 Joel Brobecker <brobecker@adacore.com>
6956
6957 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6958 Remove FIXME comment about assumption about N.
6959
69602014-12-13 Joel Brobecker <brobecker@adacore.com>
6961
6962 * configure.ac: If large-file support is disabled in GDBserver,
6963 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6964 * configure: Regenerate.
6965
69662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6967
6968 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6969 warning upon ENODATA from ptrace.
6970 * linux-s390-low.c (s390_store_tdb): New.
6971 (s390_regsets): Add regset for NT_S390_TDB.
6972
69732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6974
6975 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6976 without a fill_function.
6977 * linux-s390-low.c (s390_fill_last_break): Remove.
6978 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6979 (s390_arch_setup): Use regset's size instead of fill_function for
6980 loop end condition.
6981
69822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6983
6984 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6985 the regset's store function when ptrace returned an error.
6986 * regcache.c (get_thread_regcache): Invalidate register cache
6987 before fetching inferior's registers.
6988
69892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6990
6991 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6992 while-loop as for-loop.
6993 (regsets_store_inferior_registers): Likewise.
6994
69952014-11-28 Yao Qi <yao@codesourcery.com>
6996
6997 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6998 * config.in, configure: Re-generate.
6999 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7000 is defined.
7001
70022014-11-21 Yao Qi <yao@codesourcery.com>
7003
7004 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7005 (AC_CHECK_HEADERS): Remove malloc.h.
7006 * configure: Re-generated.
7007 * config.in: Re-generated.
7008 * server.h: Don't include alloca.h and malloc.h.
7009 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7010 Don't include malloc.h.
7011
70122014-11-17 Joel Brobecker <brobecker@adacore.com>
7013
7014 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7015 corresponding ERRNO check in same block.
7016
70172014-11-12 Pedro Alves <palves@redhat.com>
7018
7019 * server.c (cont_thread): Update comment.
7020 (start_inferior, attach_inferior): No longer clear cont_thread.
7021 (handle_v_cont): No longer set cont_thread.
7022 (captured_main): Clear cont_thread each time a GDB connects.
7023
70242014-11-12 Pedro Alves <palves@redhat.com>
7025
7026 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7027 thread, and don't resume all threads if the Hc thread has exited.
7028
70292014-11-12 Pedro Alves <palves@redhat.com>
7030
7031 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7032 the process group instead of to a specific LWP.
7033
70342014-10-15 Pedro Alves <palves@redhat.com>
7035
7036 PR server/17487
7037 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7038 parameter.
7039 (arm_set_thread_context): Delete.
7040 (the_low_target): Adjust.
7041 * win32-i386-low.c (debug_registers_changed)
7042 (debug_registers_used): Delete.
7043 (update_debug_registers_callback): New function.
7044 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7045 needing to update their debug registers.
7046 (win32_get_current_dr): New function.
7047 (x86_dr_low_get_addr, x86_dr_low_get_control)
7048 (x86_dr_low_get_status): Fetch the debug register from the thread
7049 record's context.
7050 (i386_initial_stuff): Adjust.
7051 (i386_get_thread_context): Remove current_event parameter. Don't
7052 clear debug_registers_changed nor copy DR values to
7053 debug_reg_state.
7054 (i386_set_thread_context): Delete.
7055 (i386_prepare_to_resume): New function.
7056 (i386_thread_added): Mark the thread as needing to update irs
7057 debug registers.
7058 (the_low_target): Remove i386_set_thread_context and install
7059 i386_prepare_to_resume.
7060 * win32-low.c (win32_get_thread_context): Adjust.
7061 (win32_set_thread_context): Use SetThreadContext
7062 directly.
7063 (win32_prepare_to_resume): New function.
7064 (win32_require_context): New function, factored out from ...
7065 (thread_rec): ... this.
7066 (continue_one_thread): Call win32_prepare_to_resume on each thread
7067 we're about to continue.
7068 (win32_resume): Call win32_prepare_to_resume on the event thread.
7069 * win32-low.h (struct win32_thread_info)
7070 <debug_registers_changed>: New field.
7071 (struct win32_target_ops): Change prototype of set_thread_context,
7072 delete set_thread_context and add prepare_to_resume.
7073 (win32_require_context): New declaration.
7074
70752014-10-08 Gary Benson <gbenson@redhat.com>
7076
7077 * server.h: Do not include common-exceptions.h.
7078
70792014-10-08 Gary Benson <gbenson@redhat.com>
7080
7081 * server.h: Do not include cleanups.h.
7082
70832014-09-30 James Hogan <james.hogan@imgtec.com>
7084
7085 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7086 mips64-dsp-linux.c.
7087
70882014-09-23 Yao Qi <yao@codesourcery.com>
7089
7090 * linux-low.c (lp_status_maybe_breakpoint): New function.
7091 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7092 (count_events_callback): Likewise.
7093 (select_event_lwp_callback): Likewise.
7094 (cancel_breakpoints_callback): Likewise.
7095
70962014-09-19 Don Breazeal <donb@codesourcery.com>
7097
7098 * linux-low.c (handle_extended_wait): Call
7099 linux_ptrace_get_extended_event.
7100 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7101 linux_is_extended_waitstatus.
7102
71032014-09-16 Joel Brobecker <brobecker@adacore.com>
7104
7105 * Makefile.in (CPPFLAGS): Define.
7106 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7107 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7108
71092014-09-16 Gary Benson <gbenson@redhat.com>
7110
7111 * inferiors.h (current_inferior): Renamed as...
7112 (current_thread): New variable. All uses updated.
7113 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7114 (maybe_move_out_of_jump_pad): Likewise.
7115 (cancel_breakpoint): Likewise.
7116 (linux_low_filter_event): Likewise.
7117 (wait_for_sigstop): Likewise.
7118 (linux_resume_one_lwp): Likewise.
7119 (need_step_over_p): Likewise.
7120 (start_step_over): Likewise.
7121 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7122 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7123 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7124 and save_inferior as saved_thread.
7125 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7126 saved_thread.
7127 (regcache_invalidate_thread): Likewise.
7128 * remote-utils.c (prepare_resume_reply): Likewise.
7129 * thread-db.c (thread_db_get_tls_address): Likewise.
7130 (disable_thread_event_reporting): Likewise.
7131 (remove_thread_event_breakpoints): Likewise.
7132 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7133 as saved_thread.
7134 * target.h (set_desired_inferior): Renamed as...
7135 (set_desired_thread): New declaration. All uses updated.
7136 * server.c (myresume): Updated comment to reference thread instead
7137 of inferior.
7138 (handle_serial_event): Likewise.
7139 (handle_target_event): Likewise.
7140
71412014-09-12 Tom Tromey <tromey@redhat.com>
7142 Gary Benson <gbenson@redhat.com>
7143
7144 * regcache.h: Include common-regcache.h.
7145 (regcache_read_pc): Don't declare.
7146 * regcache.c (get_thread_regcache_for_ptid): New function.
7147
71482014-09-11 Tom Tromey <tromey@redhat.com>
7149 Gary Benson <gbenson@redhat.com>
7150
7151 * symbol.c: New file.
7152 * Makefile.in (SFILES): Add symbol.c.
7153 (OBS): Add symbol.o.
7154
71552014-09-11 Gary Benson <gbenson@redhat.com>
7156
7157 * target.c (target_stop_ptid, target_continue_ptid): New
7158 functions.
7159
71602014-09-11 Tom Tromey <tromey@redhat.com>
7161 Gary Benson <gbenson@redhat.com>
7162
7163 * target.h: Include target/target.h.
7164 * target.c (target_read_memory, target_read_uint32)
7165 (target_write_memory): New functions.
7166
71672014-09-11 Gary Benson <gbenson@redhat.com>
7168
7169 * server.h (debug_hw_points): Don't declare.
7170 * server.c (debug_hw_points): Don't define. Replace all uses
7171 with show_debug_regs.
7172 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7173 all uses with show_debug_regs.
7174
71752014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7176
7177 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7178 endianness into account.
7179 (ppc_supply_ptrace_register): Likewise.
7180
71812014-09-03 James Hogan <james.hogan@imgtec.com>
7182
7183 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7184 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7185
71862014-09-03 Gary Benson <gbenson@redhat.com>
7187
7188 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7189 ALL_DEBUG_ADDRESS_REGISTERS.
7190
71912014-09-02 Gary Benson <gbenson@redhat.com>
7192
7193 * i386-low.h: Renamed as...
7194 * x86-low.h: New file. All type, function and variable name
7195 prefixes changed from "i386_" to "x86_". All references updated.
7196 * i386-low.c: Renamed as...
7197 * x86-low.c: New file. All type, function and variable name
7198 prefixes changed from "i386_" to "x86_". All references updated.
7199
72002014-09-02 Gary Benson <gbenson@redhat.com>
7201
7202 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7203 (x86_linux_new_thread): Likewise.
7204
72052014-08-29 Gary Benson <gbenson@redhat.com>
7206
7207 * server.h (setjmp.h): Do not include.
7208 (toplevel): Do not declare.
7209 (common-exceptions.h): Include.
7210 (cleanups.h): Likewise.
7211 * server.c (toplevel): Do not define.
7212 (exit_code): New static global.
7213 (detach_or_kill_for_exit_cleanup): New function.
7214 (main): New function. Original main renamed to...
7215 (captured_main): New function.
7216 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7217
72182014-08-29 Gary Benson <gbenson@redhat.com>
7219
7220 * Makefile.in (SFILES): Add common/common-exceptions.c.
7221 (OBS): Add common-exceptions.o.
7222 (common-exceptions.o): New rule.
7223 * utils.c (prepare_to_throw_exception): New function.
7224
72252014-08-29 Gary Benson <gbenson@redhat.com>
7226
7227 * config.in: Regenerate.
7228 * configure: Likewise.
7229
72302014-08-29 Gary Benson <gbenson@redhat.com>
7231
7232 * Makefile.in (SFILES): Add common/cleanups.c.
7233 (OBS): cleanups.o.
7234 (cleanups.o): New rule.
7235
72362014-08-29 Gary Benson <gbenson@redhat.com>
7237
7238 * utils.c (internal_vwarning): New function.
7239
72402014-08-28 Gary Benson <gbenson@redhat.com>
7241
7242 * utils.h (fatal): Remove declaration.
7243 * utils.c (fatal): Remove function.
7244
72452014-08-28 Gary Benson <gbenson@redhat.com>
7246
7247 * tracepoint.c (gdb_agent_init): Replace fatal with
7248 perror_with_name.
7249 (initialize_tracepoint): Likewise.
7250
72512014-08-28 Gary Benson <gbenson@redhat.com>
7252
7253 * remote-utils.c (remote_prepare): Replace fatal with error.
7254
72552014-08-28 Gary Benson <gbenson@redhat.com>
7256
7257 * linux-low.c (linux_async): Replace fatal with warning.
7258 Tidy up and return.
7259 (linux_start_non_stop): Return -1 if linux_async failed.
7260
72612014-08-28 Gary Benson <gbenson@redhat.com>
7262
7263 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7264 gdb_assert.
7265 (i386_dr_low_get_addr): Remove vague comment.
7266 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7267 gdb_assert.
7268
72692014-08-28 Gary Benson <gbenson@redhat.com>
7270
7271 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7272 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7273 internal_error.
7274 (linux_resume_one_lwp): Likewise.
7275 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7276 gdb_assert.
7277 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7278 with internal_error.
7279 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7280 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7281 (find_register_by_name): Replace fatal with internal_error.
7282 (find_regno): Likewise.
7283 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7284 * thread-db.c (thread_db_create_event): Likewise.
7285 (thread_db_load_search): Likewise.
7286 (try_thread_db_load_1): Likewise.
7287 * tracepoint.c (get_jump_space_head): Replace fatal with
7288 internal_error.
7289 (claim_trampoline_space): Likewise.
7290 (have_fast_tracepoint_trampoline_buffer): Likewise.
7291 (cmd_qtstart): Likewise.
7292 (stop_tracing): Likewise.
7293 (fast_tracepoint_collecting): Likewise.
7294 (target_malloc): Likewise.
7295 (download_tracepoint): Likewise.
7296 (download_trace_state_variables): Replace check with gdb_assert.
7297 (upload_fast_traceframes): Replace fatal with internal_error.
7298
72992014-08-19 Tom Tromey <tromey@redhat.com>
7300 Gary Benson <gbenson@redhat.com>
7301
7302 * Makefile.in (SFILES): Add common/common-debug.c.
7303 (OBS): Add common-debug.o.
7304 (common-debug.o): New rule.
7305 * debug.h (debug_printf): Don't declare.
7306 * debug.c (debug_printf): Renamed and rewritten as...
7307 (debug_vprintf): New function.
7308
73092014-08-19 Gary Benson <gbenson@redhat.com>
7310
7311 * utils.h: Do not include print-utils.h.
7312
73132014-08-19 Tom Tromey <tromey@redhat.com>
7314 Gary Benson <gbenson@redhat.com>
7315
7316 * server.h: Add static assertion.
7317 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7318
73192014-08-19 Tom Tromey <tromey@redhat.com>
7320 Gary Benson <gbenson@redhat.com>
7321
7322 * Makefile.in (SFILES): Add common/errors.c.
7323 (OBS): Add errors.o.
7324 (IPA_OBS): Add errors-ipa.o.
7325 (errors.o): New rule.
7326 (errors-ipa.o): Likewise.
7327 * utils.h (perror_with_name, error, warning): Don't declare.
7328 * utils.c (warning): Renamed and rewritten as...
7329 (vwarning): New function.
7330 (error): Renamed and rewritten as...
7331 (verror): New function.
7332 (internal_error): Renamed and rewritten as...
7333 (internal_verror): New function.
7334
73352014-08-07 Gary Benson <gbenson@redhat.com>
7336
7337 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7338 * configure: Regenerate.
7339 * config.in: Likewise.
7340 * server.h: Do not include errno.h.
7341 * event-loop.c: Likewise.
7342 * hostio-errno.c: Likewise.
7343 * linux-low.c: Likewise.
7344 * remote-utils.c: Likewise.
7345 * spu-low.c: Likewise.
7346 * utils.c: Likewise.
7347 * gdbreplay.c: Unconditionally include errno.h.
7348
73492014-08-07 Gary Benson <gbenson@redhat.com>
7350
7351 * server.h: Do not include string.h.
7352 * event-loop.c: Likewise.
7353 * linux-low.c: Likewise.
7354 * regcache.c: Likewise.
7355 * remote-utils.c: Likewise.
7356 * spu-low.c: Likewise.
7357 * utils.c: Likewise.
7358
73592014-08-07 Gary Benson <gbenson@redhat.com>
7360
7361 * server.h: Do not include gdb_assert.h.
7362
73632014-08-07 Gary Benson <gbenson@redhat.com>
7364
7365 * server.h: Do not include common-utils.h.
7366
73672014-08-07 Gary Benson <gbenson@redhat.com>
7368
7369 * server.h: Do not include ptid.h.
7370 * notif.h: Likewise.
7371
73722014-08-07 Gary Benson <gbenson@redhat.com>
7373
7374 * server.h: Do not include gdb_locale.h.
7375
73762014-08-07 Gary Benson <gbenson@redhat.com>
7377
7378 * server.h: Do not include gdb/signals.h.
7379 * win32-low.c: Likewise.
7380
73812014-08-07 Gary Benson <gbenson@redhat.com>
7382
7383 * server.h: Do not include pathmax.h.
7384
73852014-08-07 Gary Benson <gbenson@redhat.com>
7386
7387 * server.h: Do not include libiberty.h.
7388 * linux-bfin-low.c: Likewise.
7389
73902014-08-07 Gary Benson <gbenson@redhat.com>
7391
7392 * server.h: Do not include ansidecl.h.
7393
73942014-08-07 Gary Benson <gbenson@redhat.com>
7395
7396 * linux-x86-low.c: Do not include stddef.h.
7397 * lynx-ppc-low.c: Likewise.
7398 * tracepoint.c: Likewise.
7399
74002014-08-07 Gary Benson <gbenson@redhat.com>
7401
7402 * server.h: Do not include stdarg.h.
7403 * nto-low.c: Likewise.
7404
74052014-08-07 Gary Benson <gbenson@redhat.com>
7406
7407 * server.h: Do not include stdlib.h.
7408 * inferiors.c: Likewise.
7409 * linux-low.c: Likewise.
7410 * regcache.c: Likewise.
7411 * spu-low.c: Likewise.
7412 * tracepoint.c: Likewise.
7413 * utils.c: Likewise.
7414
74152014-08-07 Gary Benson <gbenson@redhat.com>
7416
7417 * server.h: Do not include stdio.h.
7418 * linux-low.c: Likewise.
7419 * remote-utils.c: Likewise.
7420 * spu-low.c: Likewise.
7421 * utils.c: Likewise.
7422 * wincecompat.c: Likewise.
7423
74242014-08-06 Gary Benson <gbenson@redhat.com>
7425
7426 * regcache.c (init_register_cache): Move conditionals inside if.
7427
74282014-08-06 Gary Benson <gbenson@redhat.com>
7429
7430 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7431
74322014-07-31 Gary Benson <gbenson@redhat.com>
7433
7434 * ax.h: Do not include server.h.
7435 * gdbthread.h: Likewise.
7436 * lynx-low.h: Likewise.
7437 * notif.h: Likewise.
7438
74392014-07-30 Gary Benson <gbenson@redhat.com>
7440
7441 * server.h: Include common-defs.h.
7442 Do not include config.h or build-gnulib-gdbserver/config.h.
7443
74442014-07-30 Gary Benson <gbenson@redhat.com>
7445
7446 * hostio-errno.c: Move server.h to top of includes list.
7447 * inferiors.c: Likewise.
7448 * linux-x86-low.c: Likewise.
7449 * notif.c: Include server.h.
7450
74512014-07-24 Tom Tromey <tromey@redhat.com>
7452 Gary Benson <gbenson@redhat.com>
7453
7454 * server.h (CORE_ADDR): Now unsigned.
7455
74562014-07-16 Pedro Alves <palves@redhat.com>
7457
7458 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7459
74602014-07-15 Pedro Alves <palves@redhat.com>
7461
7462 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7463 copy.
7464
74652014-07-11 Pedro Alves <palves@redhat.com>
7466
7467 * linux-low.c (kill_wait_lwp): New function, based on
7468 kill_one_lwp_callback, but use my_waitpid directly.
7469 (kill_one_lwp_callback, linux_kill): Use it.
7470
74712014-06-23 Pedro Alves <palves@redhat.com>
7472
7473 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7474 before setting DR0..DR3.
7475
74762014-06-20 Gary Benson <gbenson@redhat.com>
7477
7478 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7479 * configure: Regenerated.
7480 * config.in: Likewise.
7481
74822014-06-20 Gary Benson <gbenson@redhat.com>
7483
7484 * Makefile.in (SFILES): Update locations for files moved
7485 from common to nat.
7486 (object file files): Reordered.
7487
74882014-06-20 Gary Benson <gbenson@redhat.com>
7489
7490 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7491 (i386_dr_low_set_addr): Likewise.
7492 (i386_dr_low_get_addr): Likewise.
7493 (i386_dr_low_can_set_control): Likewise.
7494 (i386_dr_low_set_control): Likewise.
7495 (i386_dr_low_get_control): Likewise.
7496 (i386_dr_low_get_status): Likewise.
7497 (i386_get_debug_register_length): Likewise.
7498 * linux-x86-low.c (i386_dr_low_set_addr):
7499 Changed signature. Made static.
7500 (i386_dr_low_get_addr): Likewise.
7501 (i386_dr_low_set_control): Likewise.
7502 (i386_dr_low_get_control): Likewise.
7503 (i386_dr_low_get_status): Likewise.
7504 (i386_dr_low): New global variable.
7505 * win32-i386-low.c (i386_dr_low_set_addr):
7506 Changed signature. Made static.
7507 (i386_dr_low_get_addr): Likewise.
7508 (i386_dr_low_set_control): Likewise.
7509 (i386_dr_low_get_control): Likewise.
7510 (i386_dr_low_get_status): Likewise.
7511 (i386_dr_low): New global variable.
7512
75132014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7514
7515 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7516 * Makefile.in (AR, AR_FLAGS): Define.
7517 * configure: Regenerate.
7518
75192014-06-19 Gary Benson <gbenson@redhat.com>
7520
7521 * Makefile.in (i386-dregs.o): New rule.
7522 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7523 * i386-low.c (target.h): Remove include.
7524 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7525 (DR_CONTROL_SHIFT): Likewise.
7526 (DR_CONTROL_SIZE): Likewise.
7527 (DR_RW_EXECUTE): Likewise.
7528 (DR_RW_WRITE): Likewise.
7529 (DR_RW_READ): Likewise.
7530 (DR_RW_IORW): Likewise.
7531 (DR_LEN_1): Likewise.
7532 (DR_LEN_2): Likewise.
7533 (DR_LEN_4): Likewise.
7534 (DR_LEN_8): Likewise.
7535 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7536 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7537 (DR_ENABLE_SIZE): Likewise.
7538 (DR_LOCAL_SLOWDOWN): Likewise.
7539 (DR_GLOBAL_SLOWDOWN): Likewise.
7540 (DR_CONTROL_RESERVED): Likewise.
7541 (I386_DR_CONTROL_MASK): Likewise.
7542 (I386_DR_VACANT): Likewise.
7543 (I386_DR_LOCAL_ENABLE): Likewise.
7544 (I386_DR_GLOBAL_ENABLE): Likewise.
7545 (I386_DR_DISABLE): Likewise.
7546 (I386_DR_SET_RW_LEN): Likewise.
7547 (I386_DR_GET_RW_LEN): Likewise.
7548 (I386_DR_WATCH_HIT): Likewise.
7549 (i386_wp_op_t): Likewise.
7550 (i386_show_dr): Likewise.
7551 (i386_length_and_rw_bits): Likewise.
7552 (i386_insert_aligned_watchpoint): Likewise.
7553 (i386_remove_aligned_watchpoint): Likewise.
7554 (i386_handle_nonaligned_watchpoint): Likewise.
7555 i386_update_inferior_debug_regs(): Likewise.
7556 (i386_dr_insert_watchpoint): Likewise.
7557 (i386_dr_remove_watchpoint): Likewise.
7558 (i386_dr_region_ok_for_watchpoint): Likewise.
7559 (i386_dr_stopped_data_address): Likewise.
7560 (i386_dr_stopped_by_watchpoint): Likewise.
7561
75622014-06-19 Gary Benson <gbenson@redhat.com>
7563
7564 * i386-low.c (i386_dr_show): Renamed to
7565 i386_show_dr and made static. All uses updated.
7566 (i386_dr_length_and_rw_bits): Renamed to
7567 i386_length_and_rw_bits and made static.
7568 All uses updated.
7569 (i386_dr_insert_aligned_watchpoint): Renamed to
7570 i386_insert_aligned_watchpoint and made static.
7571 All uses updated.
7572 (i386_dr_remove_aligned_watchpoint): Renamed to
7573 i386_remove_aligned_watchpoint and made static.
7574 All uses updated.
7575 (i386_dr_update_inferior_debug_regs): Renamed to
7576 i386_update_inferior_debug_regs and made static.
7577 All uses updated.
7578
75792014-06-18 Gary Benson <gbenson@redhat.com>
7580
7581 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7582 (i386_dr_low_can_set_control): Likewise.
7583 (i386_get_debug_register_length): Likewise.
7584 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7585 (i386_dr_low_can_set_control): Likewise.
7586 (i386_get_debug_register_length): Likewise.
7587
75882014-06-17 Gary Benson <gbenson@redhat.com>
7589
7590 * i386-low.h (i386-dregs.h): New include.
7591 (DR_FIRSTADDR): Now in i386-dregs.h.
7592 (DR_LASTADDR): Likewise.
7593 (DR_NADDR): Likewise.
7594 (DR_STATUS): Likewise.
7595 (DR_CONTROL): Likewise.
7596 (i386_debug_reg_state): Likewise.
7597 (i386_dr_insert_watchpoint): Likewise.
7598 (i386_dr_remove_watchpoint): Likewise.
7599 (i386_dr_region_ok_for_watchpoint): Likewise.
7600 (i386_dr_stopped_data_address): Likewise.
7601 (i386_dr_stopped_by_watchpoint): Likewise.
7602 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7603
76042014-06-18 Gary Benson <gbenson@redhat.com>
7605
7606 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7607 i386_dr_insert_watchpoint.
7608 (i386_low_remove_watchpoint): Renamed to
7609 i386_dr_remove_watchpoint.
7610 (i386_low_region_ok_for_watchpoint): Renamed to
7611 i386_dr_region_ok_for_watchpoint.
7612 (i386_low_stopped_data_address): Renamed to
7613 i386_dr_stopped_data_address.
7614 (i386_low_stopped_by_watchpoint): Renamed to
7615 i386_dr_stopped_by_watchpoint.
7616 * i386-low.c (i386_show_dr): Renamed to
7617 i386_dr_show and made nonstatic. All uses updated.
7618 (i386_length_and_rw_bits): Renamed to
7619 i386_dr_length_and_rw_bits and made nonstatic.
7620 All uses updated.
7621 (i386_insert_aligned_watchpoint): Renamed to
7622 i386_dr_insert_aligned_watchpoint and made nonstatic.
7623 All uses updated.
7624 (i386_remove_aligned_watchpoint): Renamed to
7625 i386_dr_remove_aligned_watchpoint and made nonstatic.
7626 All uses updated.
7627 (i386_update_inferior_debug_regs): Renamed to
7628 i386_dr_update_inferior_debug_regs and made nonstatic.
7629 All uses updated.
7630 (i386_low_insert_watchpoint): Renamed to
7631 i386_dr_insert_watchpoint. All uses updated.
7632 (i386_low_remove_watchpoint): Renamed to
7633 i386_dr_remove_watchpoint. All uses updated.
7634 (i386_low_region_ok_for_watchpoint): Renamed to
7635 i386_dr_region_ok_for_watchpoint. All uses updated.
7636 (i386_low_stopped_data_address): Renamed to
7637 i386_dr_stopped_data_address. All uses updated.
7638 (i386_low_stopped_by_watchpoint): Renamed to
7639 i386_dr_stopped_by_watchpoint. All uses updated.
7640
76412014-06-18 Gary Benson <gbenson@redhat.com>
7642
7643 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7644 (i386_dr_low_can_set_control): Likewise.
7645 (i386_insert_aligned_watchpoint): New check.
7646
76472014-06-18 Gary Benson <gbenson@redhat.com>
7648
7649 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7650 Renamed to state.
7651
76522014-06-18 Gary Benson <gbenson@redhat.com>
7653
7654 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7655 instead of fatal and error.
7656 (i386_handle_nonaligned_watchpoint): Likewise.
7657
76582014-06-18 Gary Benson <gbenson@redhat.com>
7659
7660 * i386-low.c (i386_get_debug_register_length): New macro.
7661 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7662 (i386_show_dr): Use debug_printf instead of fprintf. Use
7663 phex to format values.
7664
76652014-06-18 Gary Benson <gbenson@redhat.com>
7666
7667 * i386-low.h: Comment changes.
7668 * i386-low.c: Likewise.
7669
76702014-06-18 Gary Benson <gbenson@redhat.com>
7671
7672 * i386-low.c: Whitespace changes.
7673
76742014-06-12 Tom Tromey <tromey@redhat.com>
7675
7676 * utils.c (freeargv): Remove.
7677
76782014-06-12 Tom Tromey <tromey@redhat.com>
7679
7680 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7681 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7682 (parse_debug_format_options): Likewise.
7683 (gdbserver_usage): Likewise.
7684 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7685 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7686 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7687 against libiberty.
7688 ($(LIBGNU)): Depend on libiberty.
7689 (all-lib): Recurse into all subdirs.
7690 (install-only): Invoke "install" target in subdirs.
7691 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7692 targets.
7693 * configure: Rebuild.
7694 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7695 for vasprintf, vsnprintf, or gettimeofday.
7696 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7697 srv_tgtobj.
7698
76992014-06-05 Joel Brobecker <brobecker@adacore.com>
7700
7701 * development.sh: Delete.
7702 * Makefile.in (config.status): Adjust dependency on development.sh.
7703 * configure.ac: Adjust development.sh source call.
7704 * configure: Regenerate.
7705
77062014-06-02 Pedro Alves <palves@redhat.com>
7707
7708 * ax.c (gdb_free_agent_expr): New function.
7709 * ax.h (gdb_free_agent_expr): New declaration.
7710 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7711 list.
7712 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7713 static.
7714 (clear_breakpoint_conditions_and_commands): New function.
7715 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7716 (clear_breakpoint_conditions_and_commands): New declaration.
7717
77182014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7719
7720 * linux-aarch64-low.c (asm/ptrace.h): Include.
7721
77222014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7723
7724 Fix TLS access for -static -pthread.
7725 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7726 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7727 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7728
77292014-05-20 Pedro Alves <palves@redhat.com>
7730
7731 * linux-aarch64-low.c (aarch64_insert_point)
7732 (aarch64_remove_point): No longer check whether the type is
7733 supported here. Adjust to new interface.
7734 (the_low_target): Install aarch64_supports_z_point_type as
7735 supports_z_point_type method.
7736 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7737 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7738 instead of a Z packet char. Adjust.
7739 (arm_supports_z_point_type): New function.
7740 (arm_insert_point, arm_remove_point): Adjust to new interface.
7741 (the_low_target): Install arm_supports_z_point_type.
7742 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7743 (cris_insert_point, cris_remove_point): Adjust to new interface.
7744 Don't check whether the type is supported here.
7745 (the_low_target): Install cris_supports_z_point_type.
7746 * linux-low.c (linux_supports_z_point_type): New function.
7747 (linux_insert_point, linux_remove_point): Adjust to new interface.
7748 * linux-low.h (struct linux_target_ops) <insert_point,
7749 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7750 raw_breakpoint pointer parameter.
7751 <supports_z_point_type>: New method.
7752 * linux-mips-low.c (mips_supports_z_point_type): New function.
7753 (mips_insert_point, mips_remove_point): Adjust to new interface.
7754 Use mips_supports_z_point_type.
7755 (the_low_target): Install mips_supports_z_point_type.
7756 * linux-ppc-low.c (the_low_target): Install NULL as
7757 supports_z_point_type method.
7758 * linux-s390-low.c (the_low_target): Install NULL as
7759 supports_z_point_type method.
7760 * linux-sparc-low.c (the_low_target): Install NULL as
7761 supports_z_point_type method.
7762 * linux-x86-low.c (x86_supports_z_point_type): New function.
7763 (x86_insert_point): Adjust to new insert_point interface. Use
7764 insert_memory_breakpoint. Adjust to new
7765 i386_low_insert_watchpoint interface.
7766 (x86_remove_point): Adjust to remove_point interface. Use
7767 remove_memory_breakpoint. Adjust to new
7768 i386_low_remove_watchpoint interface.
7769 (the_low_target): Install x86_supports_z_point_type.
7770 * lynx-low.c (lynx_target_ops): Install NULL as
7771 supports_z_point_type callback.
7772 * nto-low.c (nto_supports_z_point_type): New.
7773 (nto_insert_point, nto_remove_point): Adjust to new interface.
7774 (nto_target_ops): Install nto_supports_z_point_type.
7775 * mem-break.c: Adjust intro comment.
7776 (struct raw_breakpoint) <raw_type, size>: New fields.
7777 <inserted>: Update comment.
7778 <shlib_disabled>: Delete field.
7779 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7780 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7781 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7782 (raw_bkpt_type_to_target_hw_bp_type): New function.
7783 (find_enabled_raw_code_breakpoint_at): New function.
7784 (find_raw_breakpoint_at): New type and size parameters. Use them.
7785 (insert_memory_breakpoint): New function, based off
7786 set_raw_breakpoint_at.
7787 (remove_memory_breakpoint): New function.
7788 (set_raw_breakpoint_at): Reimplement.
7789 (set_breakpoint): New, based on set_breakpoint_at.
7790 (set_breakpoint_at): Reimplement.
7791 (delete_raw_breakpoint): Go through the_target->remove_point
7792 instead of assuming memory breakpoints.
7793 (find_gdb_breakpoint_at): Delete.
7794 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7795 (find_gdb_breakpoint): New function.
7796 (set_gdb_breakpoint_at): Delete.
7797 (z_type_supported): New function.
7798 (set_gdb_breakpoint_1): New function, loosely based off
7799 set_gdb_breakpoint_at.
7800 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7801 (delete_gdb_breakpoint_at): Delete.
7802 (delete_gdb_breakpoint_1): New function, loosely based off
7803 delete_gdb_breakpoint_at.
7804 (delete_gdb_breakpoint): New function.
7805 (clear_gdb_breakpoint_conditions): Rename to ...
7806 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7807 breakpoint.
7808 (add_condition_to_breakpoint): Make static.
7809 (add_breakpoint_condition): Take a struct breakpoint pointer
7810 instead of an address. Adjust.
7811 (gdb_condition_true_at_breakpoint): Rename to ...
7812 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7813 z_type parameter.
7814 (gdb_condition_true_at_breakpoint): Reimplement.
7815 (add_breakpoint_commands): Take a struct breakpoint pointer
7816 instead of an address. Adjust.
7817 (gdb_no_commands_at_breakpoint): Rename to ...
7818 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7819 parameter. Return true if no breakpoint was found. Change debug
7820 output.
7821 (gdb_no_commands_at_breakpoint): Reimplement.
7822 (run_breakpoint_commands): Rename to ...
7823 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7824 and change return type to boolean.
7825 (run_breakpoint_commands): New function.
7826 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7827 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7828 breakpoint. Go through the_target->remove_point instead of
7829 assuming memory breakpoint.
7830 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7831 software and hardware breakpoints.
7832 (reinsert_raw_breakpoint): Go through the_target->insert_point
7833 instead of assuming memory breakpoint.
7834 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7835 software and hardware breakpoints.
7836 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7837 Check both software and hardware breakpoints.
7838 (validate_inserted_breakpoint): Assert the breakpoint is a
7839 software breakpoint. Set the inserted flag to -1 instead of
7840 setting shlib_disabled.
7841 (delete_disabled_breakpoints): Adjust.
7842 (validate_breakpoints): Only validate software breakpoints.
7843 Adjust to inserted flag change.
7844 (check_mem_read, check_mem_write): Skip breakpoint types other
7845 than software breakpoints. Adjust to inserted flag change.
7846 * mem-break.h (enum raw_bkpt_type): New enum.
7847 (raw_breakpoint, struct process_info): Forward declare.
7848 (Z_packet_to_target_hw_bp_type): Delete declaration.
7849 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7850 (set_gdb_breakpoint, delete_gdb_breakpoint)
7851 (clear_breakpoint_conditions): New declarations.
7852 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7853 (breakpoint_inserted_here): Update comment.
7854 (add_breakpoint_condition, add_breakpoint_commands): Replace
7855 address parameter with a breakpoint pointer parameter.
7856 (gdb_breakpoint_here): Update comment.
7857 (delete_gdb_breakpoint_at): Delete.
7858 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7859 * server.c (process_point_options): Take a struct breakpoint
7860 pointer instead of an address. Adjust.
7861 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7862 delete_gdb_breakpoint.
7863 * spu-low.c (spu_target_ops): Install NULL as
7864 supports_z_point_type method.
7865 * target.h: Include mem-break.h.
7866 (struct target_ops) <prepare_to_access_memory>: Update comment.
7867 <supports_z_point_type>: New field.
7868 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7869 instead of a char. Also take a raw breakpoint pointer.
7870 * win32-arm-low.c (the_low_target): Install NULL as
7871 supports_z_point_type.
7872 * win32-i386-low.c (i386_supports_z_point_type): New function.
7873 (i386_insert_point, i386_remove_point): Adjust to new interface.
7874 (the_low_target): Install i386_supports_z_point_type.
7875 * win32-low.c (win32_supports_z_point_type): New function.
7876 (win32_insert_point, win32_remove_point): Adjust to new interface.
7877 (win32_target_ops): Install win32_supports_z_point_type.
7878 * win32-low.h (struct win32_target_ops):
7879 <supports_z_point_type>: New method.
7880 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7881 instead of a char. Also take a raw breakpoint pointer.
7882
78832014-05-20 Pedro Alves <palves@redhat.com>
7884
7885 * mem-break.h: Include break-common.h.
7886 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7887 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7888 (Z_packet_to_target_hw_bp_type): New declaration.
7889 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7890 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7891 (Z_PACKET_ACCESS_WP): Delete macros.
7892 (Z_packet_to_hw_type): Delete function.
7893 * i386-low.h: Don't include break-common.h here.
7894 (Z_packet_to_hw_type): Delete declaration.
7895 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7896 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7897 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7898 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7899 * linux-aarch64-low.c: Don't include break-common.h here.
7900 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7901 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7902 (Z_packet_to_target_hw_bp_type): Delete function.
7903 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7904 function.
7905 (mips_insert_point, mips_remove_point): Use
7906 Z_packet_to_target_hw_bp_type.
7907
79082014-05-20 Pedro Alves <palves@redhat.com>
7909
7910 * linux-aarch64-low.c: Include break-common.h.
7911 (enum target_point_type): Delete.
7912 (Z_packet_to_point_type): Rename to ...
7913 (Z_packet_to_target_hw_bp_type): ... this, and return a
7914 target_hw_bp_type instead.
7915 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7916 instead of an enum target_point_type.
7917 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7918 breakpoint type.
7919 (aarch64_dr_state_insert_one_point)
7920 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7921 (aarch64_handle_aligned_watchpoint)
7922 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7923 Take an enum target_hw_bp_type instead of an enum
7924 target_point_type.
7925 (aarch64_supports_z_point_type): New function.
7926 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7927 use Z_packet_to_target_hw_bp_type.
7928
79292014-05-20 Joel Brobecker <brobecker@adacore.com>
7930
7931 * configure.ac: Only use -Werror by default when DEVELOPMENT
7932 is true.
7933 * configure: Regenerate.
7934
79352014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7936
7937 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7938 * linux-x86-low.c (X86_64_USER_REGS): New.
7939 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7940
79412014-04-28 Yao Qi <yao@codesourcery.com>
7942
7943 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7944 name.
7945
79462014-04-25 Pedro Alves <palves@redhat.com>
7947
7948 PR server/16255
7949 * linux-low.c (linux_attach_fail_reason_string): New function.
7950 (linux_attach_lwp): Delete.
7951 (linux_attach_lwp_1): Rename to ...
7952 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7953 argument. Remove "initial" parameter. Return int instead of
7954 void. Don't error or warn here.
7955 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7956 failure to attach to the tgid. Call warning when failing to
7957 attach to an lwp.
7958 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7959 argument. Remove "initial" parameter. Return int instead of
7960 void. Don't error or warn here.
7961 (linux_attach_fail_reason_string): New declaration.
7962 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7963 interface change. Use linux_attach_fail_reason_string.
7964
79652014-04-24 Michael Sturm <michael.sturm@mintel.com>
7966 Walfred Tedeschi <walfred.tedeschi@intel.com>
7967
7968 * Makefile.in: Added rules to handle new files
7969 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7970 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7971 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7972 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7973 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7974 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7975 x32-avx512-linux.o.
7976 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7977 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7978 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7979 i386/x32-avx512.xml.
7980 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7981 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7982 i386/x32-avx512-linux.xml.
7983 * i387-fp.c (num_avx512_k_registers): New constant for number
7984 of K registers.
7985 (num_avx512_zmmh_low_registers): New constant for number of
7986 lower ZMM registers (0-15).
7987 (num_avx512_zmmh_high_registers): New constant for number of
7988 higher ZMM registers (16-31).
7989 (num_avx512_ymmh_registers): New contant for number of higher
7990 YMM registers (ymm16-31 added by avx521 on x86_64).
7991 (num_avx512_xmm_registers): New constant for number of higher
7992 XMM registers (xmm16-31 added by AVX512 on x86_64).
7993 (struct i387_xsave): Add space for AVX512 registers.
7994 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7995 Add code to handle AVX512 registers.
7996 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7997 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7998 prototypei from generated file.
7999 (tdesc_amd64_avx512_linux): Likewise.
8000 (init_registers_x32_avx512_linux): Likewise.
8001 (tdesc_x32_avx512_linux): Likewise.
8002 (init_registers_i386_avx512_linux): Likewise.
8003 (tdesc_i386_avx512_linux): Likewise.
8004 (x86_64_regmap): Add AVX512 registers.
8005 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8006 mask.
8007 (initialize_low_arch): Add code to initialize AVX512 registers.
8008
80092014-04-23 Pedro Alves <palves@redhat.com>
8010
8011 * mem-break.c (find_gdb_breakpoint_at): Make static.
8012 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8013
80142014-04-23 Pedro Alves <palves@redhat.com>
8015
8016 * i386-low.c: Don't include break-common.h here.
8017 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8018 prototype to take target_hw_bp_type as argument instead of a Z
8019 packet char.
8020 * i386-low.h: Include break-common.h here.
8021 (Z_packet_to_hw_type): Declare.
8022 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8023 prototypes.
8024 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8025 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8026 (x86_remove_point): Convert the packet number to a
8027 target_hw_bp_type before calling i386_low_remove_watchpoint.
8028 * win32-i386-low.c (i386_insert_point): Convert the packet number
8029 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8030 (i386_remove_point): Convert the packet number to a
8031 target_hw_bp_type before calling i386_low_remove_watchpoint.
8032
80332014-04-23 Pedro Alves <palves@redhat.com>
8034
8035 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8036
80372014-04-10 Pedro Alves <palves@redhat.com>
8038
8039 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8040 Check if the condition or command is NULL before checking if the
8041 breakpoint is known. On success, return true.
8042 * mem-break.h (add_breakpoint_condition): Document return.
8043 (add_breakpoint_commands): Add describing comment.
8044 * server.c (skip_to_semicolon): New function.
8045 (process_point_options): Use it.
8046
80472014-04-09 Pedro Alves <palves@redhat.com>
8048
8049 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8050 to lwpid_of.
8051
80522014-02-27 Pedro Alves <palves@redhat.com>
8053
8054 PR 12702
8055 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8056 macros.
8057 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8058 output.
8059 (last_thread_of_process_p): Take a PID argument instead of a
8060 thread pointer.
8061 (linux_wait_for_lwp): Delete.
8062 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8063 functions.
8064 (linux_low_filter_event): New function, party factored out from
8065 linux_wait_for_event.
8066 (linux_wait_for_event): Rename to ...
8067 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8068 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8069 sigsuspend. Check for zombie leaders.
8070 (linux_wait_for_event): Reimplement as wrapper around
8071 linux_wait_for_event_filtered.
8072 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8073 a normal or signal exit is seen, it's the whole process exiting.
8074 (wait_for_sigstop): No longer a for_each_inferior callback.
8075 Rewrite on top of linux_wait_for_event_filtered.
8076 (stop_all_lwps): Call wait_for_sigstop directly.
8077 * server.c (resume, handle_target_event): Handle
8078 TARGET_WAITKIND_NO_RESUMED.
8079
80802014-02-26 Joel Brobecker <brobecker@adacore.com>
8081
8082 * win32-low.c (psapi_get_dll_name,
8083 * win32_CreateToolhelp32Snapshot): Delete.
8084 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8085 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8086 Delete.
8087 (handle_load_dll): Add function description.
8088 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8089
80902014-02-26 Joel Brobecker <brobecker@adacore.com>
8091
8092 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8093 Add comment.
8094 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8095 base address when calling win32_add_one_solib.
8096 (handle_load_dll): Delete local variable load_addr.
8097 Remove 0x1000 offset applied to DLL base address when calling
8098 win32_add_one_solib.
8099 (handle_unload_dll): Add comment.
8100
81012014-02-26 Joel Brobecker <brobecker@adacore.com>
8102
8103 * win32-low.c (win32_add_all_dlls): Renames
8104 win32_ensure_ntdll_loaded. Rewrite function documentation.
8105 Adjust implementation to always load all DLLs.
8106 Add 0x1000 offset to DLL base address when calling
8107 win32_add_one_solib.
8108 (child_initialization_done): New static global.
8109 (do_initial_child_stuff): Set child_initialization_done to
8110 zero during child initialization, and 1 after. Replace call
8111 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8112 Add comment.
8113 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8114 (handle_unload_dll): Add function documentation.
8115 (get_child_debug_event): Ignore load and unload DLL events
8116 during child initialization.
8117
81182014-02-20 Doug Evans <dje@google.com>
8119
8120 Remove global all_lwps.
8121 * inferiors.h (ptid_of): Move here from linux-low.h.
8122 (pid_of, lwpid_of): Ditto.
8123 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8124 parameter is a struct thread_info * now.
8125 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8126 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8127 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8128 directly.
8129 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8130 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8131 * linux-arm-low.c (update_registers_callback): Update, "entry"
8132 parameter is a struct thread_info * now.
8133 Fetch lwpid from current_inferior directly.
8134 (arm_insert_point): Pass &all_threads to find_inferior instead of
8135 &all_lwps.
8136 (arm_remove_point): Ditto.
8137 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8138 (arm_prepare_to_resume): Fetch pid from thread.
8139 (arm_read_description): Fetch lwpid from current_inferior directly.
8140 * linux-low.c (all_lwps): Delete.
8141 (delete_lwp): Delete call to remove_inferior.
8142 (handle_extended_wait): Fetch lwpid from thread.
8143 (add_lwp): Don't set lwp->entry.id. Remove call to
8144 add_inferior_to_list.
8145 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8146 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8147 (kill_one_lwp_callback): Ditto.
8148 (linux_kill): Don't dereference NULL pointer.
8149 Fetch ptid,lwpid from thread.
8150 (get_detach_signal): Fetch ptid from thread.
8151 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8152 Simplify call to regcache_invalidate_thread.
8153 (delete_lwp_callback): Update, "entry" parameter is a
8154 struct thread_info * now. Fetch pid from thread.
8155 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8156 (status_pending_p_callback): Update, "entry" parameter is a
8157 struct thread_info * now. Fetch ptid from thread.
8158 (find_lwp_pid): Update, "entry" parameter is a
8159 struct thread_info * now.
8160 (linux_wait_for_lwp): Fetch pid from thread.
8161 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8162 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8163 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8164 (dequeue_one_deferred_signal): Ditto.
8165 (cancel_breakpoint): Fetch ptid from current_inferior.
8166 (linux_wait_for_event): Pass &all_threads to find_inferior,
8167 not &all_lwps. Fetch ptid, lwpid from thread.
8168 (count_events_callback): Update, "entry" parameter is a
8169 struct thread_info * now.
8170 (select_singlestep_lwp_callback): Ditto.
8171 (select_event_lwp_callback): Ditto.
8172 (cancel_breakpoints_callback): Ditto.
8173 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8174 not &all_lwps.
8175 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8176 (unsuspend_one_lwp): Update, "entry" parameter is a
8177 struct thread_info * now.
8178 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8179 not &all_lwps.
8180 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8181 Fetch lwpid from thread, not lwp.
8182 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8183 Pass &all_threads to find_inferior, not &all_lwps.
8184 (send_sigstop): Fetch lwpid from thread, not lwp.
8185 (send_sigstop_callback): Update, "entry" parameter is a
8186 struct thread_info * now.
8187 (suspend_and_send_sigstop_callback): Ditto.
8188 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8189 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8190 struct thread_info * now.
8191 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8192 from thread, lwp.
8193 (lwp_running): Update, "entry" parameter is a
8194 struct thread_info * now.
8195 (stop_all_lwps): Fetch ptid from thread.
8196 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8197 (linux_resume_one_lwp): Fetch lwpid from thread.
8198 (linux_set_resume_request): Update, "entry" parameter is a
8199 struct thread_info * now. Fetch pid, lwpid from thread.
8200 (resume_status_pending_p): Update, "entry" parameter is a
8201 struct thread_info * now.
8202 (need_step_over_p): Ditto. Fetch lwpid from thread.
8203 (start_step_over): Fetch lwpid from thread.
8204 (linux_resume_one_thread): Update, "entry" parameter is a
8205 struct thread_info * now. Fetch lwpid from thread.
8206 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8207 (proceed_one_lwp): Update, "entry" parameter is a
8208 struct thread_info * now. Fetch lwpid from thread.
8209 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8210 struct thread_info * now.
8211 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8212 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8213 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8214 directly.
8215 (regsets_store_inferior_registers): Ditto.
8216 (fetch_register, store_register): Ditto.
8217 (linux_read_memory, linux_write_memory): Ditto.
8218 (linux_request_interrupt): Ditto.
8219 (linux_read_auxv): Ditto.
8220 (linux_xfer_siginfo): Ditto.
8221 (linux_qxfer_spu): Ditto.
8222 (linux_qxfer_libraries_svr4): Ditto.
8223 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8224 moved to inferiors.h.
8225 (get_lwp): Delete.
8226 (get_thread_lwp): Update.
8227 (struct lwp_info): Delete member "entry". Simplify comment for
8228 member "thread".
8229 (all_lwps): Delete.
8230 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8231 current_inferior directly.
8232 (update_watch_registers_callback): Update, "entry" parameter is a
8233 struct thread_info * now. Fetch pid from thread.
8234 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8235 (mips_insert_point): Fetch lwpid from current_inferior.
8236 Pass &all_threads to find_inferior, not &all_lwps.
8237 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8238 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8239 directly.
8240 (mips_stopped_data_address): Ditto.
8241 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8242 directly.
8243 * linux-tile-low.c (tile_arch_setup): Ditto.
8244 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8245 (update_debug_registers_callback): Update, "entry" parameter is a
8246 struct thread_info * now. Fetch pid from thread.
8247 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8248 Pass &all_threads to find_inferior, not &all_lwps.
8249 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8250 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8251 Pass &all_threads to find_inferior, not &all_lwps.
8252 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8253 (i386_dr_low_get_status): Ditto.
8254 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8255 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8256 (x86_linux_read_description): Ditto.
8257 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8258
82592014-02-20 Doug Evans <dje@google.com>
8260
8261 * inferiors.c (get_first_inferior): Fix buglet.
8262
82632014-02-19 Doug Evans <dje@google.com>
8264
8265 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8266 * inferiors.c (add_thread): Change result type to struct thread_info *.
8267 All callers updated.
8268 (add_lwp): Call add_thread here instead of in callers.
8269 All callers updated.
8270 * linux-low.h (get_lwp_thread): Rewrite.
8271 (struct lwp_info): New member "thread".
8272
82732014-02-19 Doug Evans <dje@google.com>
8274
8275 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8276 All callers updated.
8277
82782014-02-19 Doug Evans <dje@google.com>
8279
8280 * inferiors.c (add_thread): Fix whitespace.
8281
82822014-02-19 Doug Evans <dje@google.com>
8283
8284 * dll.c (clear_dlls): Replace accessing list implemention details
8285 with API function.
8286 * gdbthread.h (get_first_thread): Declare.
8287 * inferiors.c (for_each_inferior_with_data): New function.
8288 (get_first_thread): New function.
8289 (find_thread_ptid): Simplify.
8290 (get_first_inferior): New function.
8291 (clear_list): Delete.
8292 (one_inferior_p): New function.
8293 (clear_inferior_list): New function.
8294 (clear_inferiors): Update.
8295 * inferiors.h (for_each_inferior_with_data): Declare.
8296 (clear_inferior_list): Declare.
8297 (one_inferior_p): Declare.
8298 (get_first_inferior): Declare.
8299 * linux-low.c (linux_wait_for_event): Replace accessing list
8300 implemention details with API function.
8301 * server.c (target_running): Ditto.
8302 (accumulate_file_name_length): New function.
8303 (emit_dll_description): New function.
8304 (handle_qxfer_libraries): Replace accessing list implemention
8305 details with API function.
8306 (handle_qxfer_threads_worker): New function.
8307 (handle_qxfer_threads_proper): Replace accessing list implemention
8308 details with API function.
8309 (handle_query): Ditto.
8310 (visit_actioned_threads_callback_ftype): New typedef.
8311 (visit_actioned_threads_data): New struct.
8312 (visit_actioned_threads): Rewrite to be find_inferior callback.
8313 (resume): Call find_inferior.
8314 (handle_status): Replace accessing list implemention
8315 details with API function.
8316 (process_serial_event): Replace accessing list implemention details
8317 with API function.
8318 * target.c (set_desired_inferior): Replace accessing list implemention
8319 details with API function.
8320 * tracepoint.c (same_process_p): New function.
8321 (gdb_agent_about_to_close): Replace accessing list implemention
8322 details with API function.
8323 * win32-low.c (child_delete_thread): Replace accessing list
8324 implemention details with API function.
8325 (match_dll_by_basename): New function.
8326 (dll_is_loaded_by_basename): New function.
8327 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8328 details call to dll_is_loaded_by_basename.
8329
83302014-02-19 Doug Evans <dje@google.com>
8331
8332 * dll.h (struct dll_info): Add comment.
8333 * gdbthread.h (struct thread_info): Add comment.
8334 (current_ptid): Simplify.
8335 * inferiors.c (add_process): Update.
8336 (remove_process): Update.
8337 * inferiors.h (struct process_info): Rename member "head" to "entry".
8338 * linux-low.c (delete_lwp): Update.
8339 (add_lwp): Update.
8340 (last_thread_of_process_p): Update.
8341 (kill_one_lwp_callback, linux_kill): Update.
8342 (status_pending_p_callback): Update.
8343 (wait_for_sigstop): Update. Simplify read of ptid.
8344 (start_step_over): Update.
8345 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8346 (get_lwp_thread): Update.
8347 (struct lwp_info): Rename member "head" to "entry".
8348 * regcache.h (inferior_list_entry): Delete.
8349 * server.c (kill_inferior_callback): Update.
8350 (detach_or_kill_inferior_callback): Update.
8351 (print_started_pid): Update.
8352 (print_attached_pid): Update.
8353 (process_serial_event): Simplify read of ptid.
8354 * thread-db.c (thread_db_create_event): Update.
8355 (thread_db_get_tls_address): Update.
8356 * win32-low.c (current_inferior_ptid): Simplify.
8357
83582014-02-19 Tom Tromey <tromey@redhat.com>
8359
8360 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8361 argument.
8362 (target_supports_btrace): Update.
8363
83642014-02-14 Yao Qi <yao@codesourcery.com>
8365
8366 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8367 (rsp-low-ipa.o): New target.
8368
83692014-02-12 Tom Tromey <tromey@redhat.com>
8370
8371 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8372 convert_ascii_to_int.
8373 * regcache.c (registers_to_string): Likewise.
8374 * remote-utils.c (decode_M_packet): Likewise.
8375 * server.c (process_serial_event): Likewise.
8376
83772014-02-12 Tom Tromey <tromey@redhat.com>
8378
8379 * server.c (handle_query, handle_v_run): Use hex2bin, not
8380 unhexify.
8381 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8382
83832014-02-12 Tom Tromey <tromey@redhat.com>
8384
8385 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8386 convert_int_to_ascii.
8387 * regcache.c (registers_to_string, collect_register_as_string):
8388 Likewise.
8389 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8390 Likewise.
8391 * server.c (process_serial_event): Likewise.
8392 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8393 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8394
83952014-02-12 Tom Tromey <tromey@redhat.com>
8396
8397 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8398 bin2hex, not hexify.
8399 * tracepoint.c (cmd_qtstatus): Likewise.
8400
84012014-02-12 Tom Tromey <tromey@redhat.com>
8402
8403 * remote-utils.c (monitor_output): Pass explicit length to
8404 hexify.
8405
84062014-02-12 Tom Tromey <tromey@redhat.com>
8407
8408 * tracepoint.c: Include rsp-low.h.
8409 * server.c: Include rsp-low.h.
8410 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8411 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8412 declare.
8413 * remote-utils.c: Include rsp-low.h.
8414 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8415 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8416 (convert_int_to_ascii, convert_ascii_to_int): Move to
8417 common/rsp-low.c.
8418 * regcache.c: Include rsp-low.h.
8419 * ax.c: Include rsp-low.h.
8420 * Makefile.in (SFILES): Add common/rsp-low.c.
8421 (OBS): Add rsp-low.o.
8422 (rsp-low.o): New target.
8423
84242014-02-12 Tom Tromey <tromey@redhat.com>
8425
8426 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8427 Include print-utils.h.
8428 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8429 (plongest, thirty_two, phex_nz): Remove.
8430 * Makefile.in (SFILES): Add common/print-utils.c.
8431 (OBS): Add print-utils.o.
8432 (print-utils-ipa.o): New target.
8433 (print-utils.o): New target.
8434 (IPA_OBJS): Add print-utils-ipa.o.
8435
84362014-02-06 Tom Tromey <tromey@redhat.com>
8437
8438 * Makefile.in (SFILES): Fix indentation.
8439
84402014-02-05 Doug Evans <dje@google.com>
8441
8442 * linux-low.c (linux_wait_for_event): Improve comment.
8443 (linux_wait_1): Keep current_inferior in sync with event_child.
8444
84452014-01-22 Doug Evans <dje@google.com>
8446
8447 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8448
84492014-01-22 Doug Evans <dje@google.com>
8450
8451 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8452 * configure: Regenerate.
8453 * config.in: Regenerate.
8454 * Makefile.in (SFILES): Add debug.c.
8455 (OBS): Add debug.o.
8456 * debug.c: New file.
8457 * debug.h: New file.
8458 * linux-aarch64-low.c (*): Update all debugging printfs to use
8459 debug_printf instead of fprintf.
8460 * linux-arm-low.c (*): Ditto.
8461 * linux-cris-low.c (*): Ditto.
8462 * linux-crisv32-low.c (*): Ditto.
8463 * linux-m32r-low.c (*): Ditto.
8464 * linux-sparc-low.c (*): Ditto.
8465 * linux-x86.c (*): Ditto.
8466 * linux-low.c (*): Ditto.
8467 (linux_wait_1): Add calls to debug_enter, debug_exit.
8468 (linux_wait): Remove redundant debugging printf.
8469 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8470 (linux_resume, unstop_all_lwps): Ditto.
8471 * mem-break.c (*): Update all debugging printfs to use
8472 debug_printf instead of fprintf.
8473 * remote-utils.c (*): Ditto.
8474 * thread-db.c (*): Ditto.
8475 * server.c #include <ctype.h>, "gdb_vecs.h".
8476 (debug_threads): Moved to debug.c.
8477 (*): Update all debugging printfs to use debug_printf instead of
8478 fprintf.
8479 (start_inferior): Replace call to fflush with call to debug_flush.
8480 (monitor_show_help): Mention set debug-format.
8481 (parse_debug_format_options): New function.
8482 (handle_monitor_command): Handle "monitor set debug-format".
8483 (gdbserver_usage): Mention --debug-format.
8484 (main): Parse --debug-format.
8485 * server.h (debug_threads): Declaration moved to debug.h.
8486 #include "debug.h".
8487 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8488 trace_debug_1 that uses debug_printf.
8489 (tracepoint_look_up_symbols): Update all debugging printfs to use
8490 debug_printf instead of fprintf.
8491
84922014-01-20 Baruch Siach <baruch@tkos.co.il>
8493
8494 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8495 sys/ptrace.h.
8496
84972014-01-17 Pedro Alves <palves@redhat.com>
8498
8499 PR build/16445
8500 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8501 defined after including gdb_proc_service.h.
8502
85032014-01-16 Doug Evans <dje@google.com>
8504
8505 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8506 (match_dll): Use it.
8507
85082014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8509
8510 * target.h (target_ops) <read_btrace>: Change parameters and
8511 return type to allow error reporting.
8512 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8513 trace reading errors on.
8514 * linux-low.c (linux_low_read_btrace): Pass trace reading
8515 errors on.
8516 (linux_low_disable_btrace): New.
8517
85182014-01-15 Doug Evans <dje@google.com>
8519
8520 * inferiors.c (thread_id_to_gdb_id): Delete.
8521 * inferiors.h (thread_id_to_gdb_id): Delete.
8522
85232014-01-13 Eli Zaretskii <eliz@gnu.org>
8524
8525 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8526 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8527 versions.
8528
85292014-01-08 Pedro Alves <palves@redhat.com>
8530
8531 * server.c (handle_status): Don't discard previous queued stop
8532 replies or thread's pending status here.
8533 (main) <disconnection>: Do it here instead.
8534
85352014-01-08 Pedro Alves <palves@redhat.com>
8536
8537 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8538 * server.c (visit_actioned_threads, handle_pending_status): New
8539 function.
8540 (handle_v_cont): Factor out parts to ...
8541 (resume): ... this new function. If in all-stop, and a thread
8542 being resumed has a pending status, report it without actually
8543 resuming.
8544 (myresume): Adjust to use the new 'resume' function.
8545 (clear_pending_status_callback, set_pending_status_callback)
8546 (find_status_pending_thread_callback): New functions.
8547 (handle_status): Handle the case of multiple threads having
8548 interesting statuses to report. Report threads' real last signal
8549 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8550 with an interesting thread to report the status for, instead of
8551 always reporting the status of the first thread.
8552
85532014-01-01 Joel Brobecker <brobecker@adacore.com>
8554
8555 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8556 * gdbreplay.c (gdbreplay_version): Likewise.
8557
85582013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8559
8560 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8561 iov.iov_len with the real length in use.
8562
85632013-12-13 Joel Brobecker <brobecker@adacore.com>
8564
8565 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8566 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8567 for all targets that use win32-low.c.
8568 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8569 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8570
85712013-12-13 Pedro Alves <palves@redhat.com>
8572
8573 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8574 if equal to TARGET_WAITKIND_LOADED.
8575 * win32-low.c (cached_status): New static global.
8576 (win32_wait): Add declaration.
8577 (do_initial_child_stuff): Flush all initial pending debug events
8578 up to the initial breakpoint.
8579 (win32_wait): If CACHED_STATUS was set, return that instead
8580 of doing a real wait. Remove the code resuming the execution
8581 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8582 during the initial phase. Also remove the code changing
8583 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8584 TARGET_WAITKIND_STOPPED.
8585
85862013-12-11 Yao Qi <yao@codesourcery.com>
8587
8588 * notif.c (handle_notif_ack): Return 0 if no notification
8589 matches.
8590
85912013-11-20 Doug Evans <dje@google.com>
8592
8593 * linux-low.c (linux_set_resume_request): Fix comment.
8594
85952013-11-20 Doug Evans <dje@google.com>
8596
8597 * linux-low.c (resume_status_pending_p): Tweak comment.
8598
85992013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8600
8601 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8602 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8603 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8604 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8605 (srv_amd64_regobj): Add amd64-mpx.o.
8606 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8607 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8608 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8609 * i387-fp.c (num_pl_bnd_register) Added constant.
8610 (num_pl_bnd_cfg_registers) Added constant.
8611 (struct i387_xsave) Added reserved area and MPX fields.
8612 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8613 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8614 function.
8615 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8616 (init_registers_amd64_mpx_linux): Declare new function.
8617 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8618 (x86_64_regmap): Add MPX registers.
8619 (x86_linux_read_description): Add MPX case.
8620 (initialize_low_arch): Initialize MPX targets.
8621
86222013-11-18 Tom Tromey <tromey@redhat.com>
8623
8624 * configure: Rebuild.
8625 * configure.ac: Don't check for stdlib.h.
8626 * gdbreplay.c: Unconditionally include stdlib.h.
8627
86282013-11-18 Tom Tromey <tromey@redhat.com>
8629
8630 * config.in: Rebuild.
8631 * configure: Rebuild.
8632 * configure.ac: Don't use AC_HEADER_DIRENT.
8633
86342013-11-18 Tom Tromey <tromey@redhat.com>
8635
8636 * server.h: Don't check HAVE_STRING_H.
8637 * gdbreplay.c: Don't check HAVE_STRING_H.
8638 * configure: Rebuild.
8639
86402013-11-18 Tom Tromey <tromey@redhat.com>
8641
8642 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8643 LIBGNU.
8644
86452013-11-08 Tom Tromey <tromey@redhat.com>
8646
8647 * configure, config.in: Rebuild.
8648 * configure.ac: Remove unused configury.
8649
86502013-11-08 Tom Tromey <tromey@redhat.com>
8651
8652 * acinclude.m4: Include common.m4, codeset.m4.
8653 * configure, config.in: Rebuild.
8654 * configure.ac: Use GDB_AC_COMMON.
8655
86562013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8657
8658 * linux-s390-low.c (HWCAP_S390_TE): New define.
8659 (s390_arch_setup): Consider the TE field in the HWCAP for
8660 determining 'have_regset_tdb'.
8661
86622013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8663
8664 PR gdb/16014
8665 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8666 call to sizeof.
8667
86682013-10-02 Pedro Alves <palves@redhat.com>
8669
8670 * server.c (process_serial_event): Don't output "GDBserver
8671 exiting" if GDB is connected through stdio.
8672 * target.c (mywait): Likewise, be silent if GDB is connected
8673 through stdio.
8674
86752013-10-01 Joel Brobecker <brobecker@adacore.com>
8676
8677 * lynx-low.c (lynx_add_threads_after_attach): New function.
8678 (lynx_attach): Remove call to add_thread. Add call to
8679 lynx_add_threads_after_attach instead.
8680
86812013-09-28 Mike Frysinger <vapier@gentoo.org>
8682
8683 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8684 * config.in, configure: Regenerated.
8685
86862013-09-18 Yao Qi <yao@codesourcery.com>
8687
8688 PR server/15959
8689 * server.c (start_inferior): Clear 'resume_info'.
8690
86912013-09-16 Jiong Wang <jiwang@tilera.com>
8692
8693 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8694 for each register.
8695
86962013-09-16 Jiong Wang <jiwang@tilera.com>
8697
8698 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8699 linux-tile-low.o to srv_tgtobj.
8700
87012013-09-16 Will Newton <will.newton@linaro.org>
8702
8703 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8704 out regs.
8705
87062013-09-06 Pedro Alves <palves@redhat.com>
8707
8708 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8709 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8710 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8711 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8712 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8713 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8714
87152013-09-06 Pedro Alves <palves@redhat.com>
8716
8717 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8718 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8719
87202013-09-06 Pedro Alves <palves@redhat.com>
8721
8722 * linux-amd64-ipa.c: Include tracepoint.h.
8723 * linux-i386-ipa.c: Include tracepoint.h.
8724
87252013-09-06 Ricard Wanderlof <ricardw@axis.com>
8726
8727 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8728 (ps_get_thread_area): New function.
8729
87302013-09-06 Ricard Wanderlof <ricardw@axis.com>
8731
8732 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8733 (initialize_low_arch): Call init_registers_crisv32 rather than
8734 init_register_crisv32.
8735
87362013-09-05 Pedro Alves <palves@redhat.com>
8737
8738 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8739 to ...
8740 * hostio.h: ... this new file.
8741 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8742 win32-low.c: Include hostio.h.
8743
87442013-09-05 Pedro Alves <palves@redhat.com>
8745
8746 * server.h (gdb_client_data, handler_func, callback_handler_func)
8747 (delete_file_handler, add_file_handler, append_callback_event)
8748 (delete_callback_event, start_event_loop, initialize_event_loop):
8749 Move to event-loop.h and include it.
8750 * event-loop.h: New file.
8751
87522013-09-05 Pedro Alves <palves@redhat.com>
8753
8754 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8755 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8756 (loaded_dll, unloaded_dll): Move to ...
8757 * dll.h: ... this new file.
8758 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8759
87602013-09-05 Pedro Alves <palves@redhat.com>
8761
8762 * server.h (current_process, get_thread_process, all_processes)
8763 (add_inferior_to_list, for_each_inferior, current_inferior)
8764 (remove_inferior, add_process, remove_process, find_process_pid)
8765 (have_started_inferiors_p, have_attached_inferiors_p)
8766 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8767 (clear_inferiors, find_inferior, find_inferior_id)
8768 (inferior_target_data, set_inferior_target_data)
8769 (inferior_regcache_data, set_inferior_regcache_data): Move to
8770 inferiors.h, and include it.
8771 * inferiors.h: New file.
8772
87732013-09-05 Pedro Alves <palves@redhat.com>
8774
8775 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8776 Move ...
8777 * ax.h: ... here.
8778
87792013-09-05 Pedro Alves <palves@redhat.com>
8780
8781 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8782 tracepoint.h.
8783 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8784 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8785 (handle_tracepoint_general_set, handle_tracepoint_query)
8786 (tracepoint_finished_step, tracepoint_was_hit)
8787 (release_while_stepping_state_list, current_traceframe)
8788 (in_readonly_region, traceframe_read_mem)
8789 (fetch_traceframe_registers, traceframe_read_sdata)
8790 (traceframe_read_info, struct fast_tpoint_collect_status)
8791 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8792 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8793 (supply_fast_tracepoint_registers)
8794 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8795 (ipa_tdesc, claim_trampoline_space)
8796 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8797 (agent_mem_read, agent_get_trace_state_variable_value)
8798 (agent_set_trace_state_variable_value, agent_tsv_read)
8799 (agent_mem_read_string, get_raw_reg_func_addr)
8800 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8801 * tracepoint.h: ... this new file.
8802
88032013-09-05 Pedro Alves <palves@redhat.com>
8804
8805 * server.h (perror_with_name, error, fatal, warning, paddress)
8806 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8807 include it.
8808 * utils.h: New file.
8809
88102013-09-05 Pedro Alves <palves@redhat.com>
8811
8812 * server.h (remote_debug, noack_mode, transport_is_reliable)
8813 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8814 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8815 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8816 (write_enn, initialize_async_io, enable_async_io)
8817 (disable_async_io, check_remote_input_interrupt_request)
8818 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8819 (dead_thread_notify, prepare_resume_reply)
8820 (decode_address_to_semicolon, decode_address, decode_m_packet)
8821 (decode_M_packet, decode_X_packet, decode_xfer_write)
8822 (decode_search_memory_packet, unhexify, hexify)
8823 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8824 (look_up_one_symbol, relocate_instruction)
8825 (monitor_output): Move to remote-utils.h, and include it.
8826 * remote-utils.h: New file.
8827
88282013-09-05 Pedro Alves <palves@redhat.com>
8829
8830 * server.h (_): Delete.
8831
88322013-09-02 Pedro Alves <palves@redhat.com>
8833
8834 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8835 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8836 allocated.
8837 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8838
88392013-09-02 Pierre Muller <muller@sourceware.org>
8840
8841 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8842 or WriteProcessMemory complete successfully and handle
8843 ERROR_PARTIAL_COPY error.
8844
88452013-09-02 Pedro Alves <palves@redhat.com>
8846
8847 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8848 error instead of EIO.
8849
88502013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8851
8852 PR server/15604
8853 * linux-low.c: Include filestuff.h.
8854 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8855 * lynx-low.c: Include filestuff.h.
8856 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8857 * server.c: Include filestuff.h.
8858 (main): Call notice_open_fds.
8859 * spu-low.c: Include filestuff.h.
8860 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8861
88622013-08-22 Luis Machado <lgustavo@codesourcery.com>
8863
8864 * Makefile.in: Explain why ../target and ../nat are not
8865 listed as include file search paths.
8866 (linux-waitpid.o): New object file rule.
8867 * configure.srv (srv_native_linux_obj): New variable.
8868 Replace all occurrences of linux native object files with
8869 $srv_native_linux_obj.
8870 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8871 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8872 (linux_enable_event_reporting): Remove declaration.
8873 (my_waitpid): Moved to common/linux-waitpid.c.
8874 (linux_wait_for_event): Pass ptid when calling
8875 linux_enable_event_reporting.
8876 (linux_supports_tracefork_flag): Remove.
8877 (linux_enable_event_reporting): Likewise.
8878 (linux_tracefork_grandchild): Remove.
8879 (STACK_SIZE): Moved to common/linux-ptrace.c.
8880 (linux_tracefork_child): Remove.
8881 (linux_test_for_tracefork): Remove.
8882 (linux_look_up_symbols): Call linux_supports_traceclone.
8883 (initialize_low): Remove call to linux_test_for_tracefork.
8884 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8885 common/linux-ptrace.h.
8886 (PTRACE_TYPE_ARG4): Likewise.
8887 Include linux-ptrace.h.
8888
88892013-08-21 Pedro Alves <palves@redhat.com>
8890
8891 * config.in: Renegerate.
8892
88932013-08-19 Luis Machado <lgustavo@codesourcery.com>
8894
8895 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8896 (SFILES): Remove $(srcdir)/common/target-common.c and
8897 add $(srcdir)/target/waitstatus.c.
8898 (OBS): Remove target-common.o and add waitstatus.o.
8899 (server_h): Remove $(srcdir)/../common/target-common.h and
8900 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8901 and $(srcdir)/../target/waitstatus.h.
8902 (target-common.o): Remove.
8903 (waitstatus.o): New target object file.
8904 * target.h: Do not include target-common.h and
8905 include target/resume.h, target/wait.h and
8906 target/waitstatus.h.
8907
89082013-08-13 Luis Machado <lgustavo@codesourcery.com>
8909
8910 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8911 to PTRACE_TYPE_ARG3.
8912 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8913 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8914 PTRACE_TYPE_ARG4.
8915 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8916 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8917
89182013-07-27 Jie Zhang <jie@codesourcery.com>
8919 Daniel Jacobowitz <dan@codesourcery.com>
8920 Yao Qi <yao@codesourcery.com>
8921
8922 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8923 (mips-linux-watch.o): New rule.
8924 (mips_linux_watch_h): New variable.
8925 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8926 srv_tgtobj.
8927 * linux-mips-low.c: Include mips-linux-watch.h.
8928 (struct arch_process_info, struct arch_lwp_info): New.
8929 (update_watch_registers_callback): New function.
8930 (mips_linux_new_process, mips_linux_new_thread) New functions.
8931 (mips_linux_prepare_to_resume, mips_insert_point): New
8932 functions.
8933 (mips_remove_point, mips_stopped_by_watchpoint): New
8934 functions.
8935 (rsp_bp_type_to_target_hw_bp_type): New function.
8936 (mips_stopped_data_address): New function.
8937 (the_low_target): Add watchpoint support functions.
8938
89392013-07-27 Yao Qi <yao@codesourcery.com>
8940
8941 * i386-low.c: Include break-common.h.
8942 (enum target_hw_bp_type): Remove.
8943
89442013-07-24 Luis Machado <lgustavo@codesourcery.com>
8945
8946 * Makefile.in (SFILES): /common/target-common.c.
8947 (OBS): Add target-common.o.
8948 (server_h): Add $(srcdir)/../common/target-common.h.
8949 (target-common.o): New target.
8950 * server.c (queue_stop_reply_callback): Free
8951 status string after use.
8952 * target.c (target_waitstatus_to_string): Remove.
8953 * target.h: Include target-common.h.
8954 (resume_kind): Likewise.
8955 (target_waitkind): Likewise.
8956 (target_waitstatus): Likewise.
8957 (TARGET_WNOHANG): Likewise.
8958
89592013-07-04 Yao Qi <yao@codesourcery.com>
8960
8961 * Makefile.in (host_alias): Use @host_noncanonical@.
8962 (target_alias): Use @target_noncanonical@.
8963 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8964 ACX_NONCANONICAL_HOST.
8965 * configure: Regenerated.
8966
8967 Revert:
8968 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8969
8970 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8971 * configure: Rebuild.
8972 * Makefile.in (version_host, version_target): Get from configure.
8973 (version.c): Use $(version_host) and $(version_target).
8974
89752013-07-03 Pedro Alves <palves@redhat.com>
8976
8977 * Makefile.in (config.status): Depend on development.sh.
8978 * acinclude.m4: Include libmcheck.m4.
8979 * configure: Regenerate.
8980
89812013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8982
8983 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8984 attribute inside the parentheses.
8985 (winapi_DebugSetProcessKillOnExit): Ditto.
8986 (winapi_DebugBreakProcess): Ditto.
8987 (winapi_GenerateConsoleCtrlEvent): Ditto.
8988
89892013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8990
8991 * notif.h (notif_event): Add a dummy member to avoid compiler
8992 errors.
8993
89942013-07-01 Pedro Alves <palves@redhat.com>
8995
8996 * hostio.c (HOSTIO_PATH_MAX): Define.
8997 (require_filename, handle_open, handle_unlink, handle_readlink):
8998 Use it.
8999
90002013-07-01 Pedro Alves <palves@redhat.com>
9001
9002 * server.h: Include "pathmax.h".
9003 * linux-low.c: Don't include sys/param.h.
9004 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9005 MAXPATHLEN.
9006 * win32-low.c: Don't include sys/param.h.
9007 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9008
90092013-07-01 Pedro Alves <palves@redhat.com>
9010
9011 * event-loop.c: Don't check HAVE_UNISTD_H before including
9012 <unistd.h>.
9013 * gdbreplay.c: Likewise.
9014 * remote-utils.c: Likewise.
9015 * server.c: Likewise.
9016 * configure.ac: Don't check for unistd.h.
9017 * configure: Regenerate.
9018
90192013-06-28 Tom Tromey <tromey@redhat.com>
9020
9021 * Makefile.in (version.c): Use version.in, not
9022 common/version.in.
9023
90242013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9025
9026 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9027 * configure: Rebuild.
9028 * Makefile.in (version_host, version_target): Get from configure.
9029 (version.c): Use $(version_host) and $(version_target).
9030
90312013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9032
9033 Fix trace-status to output user name without trailing colon.
9034 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9035
90362013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9037
9038 Fix trace-status to output proper start-time and stop-time.
9039 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9040 output start time and stop time in hex as gdb expects.
9041
90422013-06-26 Pedro Alves <pedro@codesourcery.com>
9043
9044 * tracepoint.c (build_traceframe_info_xml): Output trace state
9045 variables present in the trace buffer.
9046
90472013-06-24 Tom Tromey <tromey@redhat.com>
9048
9049 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9050 create-version.sh.
9051 (version.o): Remove.
9052 * gdbreplay.c: Include version.h.
9053 (version, host_name): Don't declare.
9054 * server.h: Include version.h.
9055 (version, host_name): Don't declare.
9056
90572013-06-12 Pedro Alves <palves@redhat.com>
9058
9059 * linux-x86-low.c (linux_is_elf64): Delete global.
9060 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9061 with local linux_pid_exe_is_elf_64_file use.
9062
90632013-06-11 Pedro Alves <palves@redhat.com>
9064
9065 * linux-low.c (regset_disabled, disable_regset): New functions.
9066 (regsets_fetch_inferior_registers)
9067 (regsets_store_inferior_registers): Use them.
9068 (initialize_regsets_info); Don't allocate the disabled_regsets
9069 array here.
9070 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9071 comment.
9072
90732013-06-11 Pedro Alves <palves@redhat.com>
9074
9075 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9076 xmalloc.
9077
90782013-06-11 Pedro Alves <palves@redhat.com>
9079
9080 * linux-x86-low.c (initialize_low_arch): Call
9081 init_registers_x32_avx_linux.
9082
90832013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9084
9085 Fix compatibility with Android Bionic.
9086 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9087 it is not empty.
9088
90892013-06-07 Pedro Alves <palves@redhat.com>
9090
9091 PR server/14823
9092 * Makefile.in (OBS): Add tdesc.o.
9093 (IPA_OBJS): Add tdesc-ipa.o.
9094 (tdesc-ipa.o): New rule.
9095 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9096 interface.
9097 * linux-low.c (new_inferior): Delete.
9098 (disabled_regsets, num_regsets): Delete.
9099 (linux_add_process): Adjust to set the new per-process
9100 new_inferior flag.
9101 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9102 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9103 was a stop. When calling arch_setup, switch the current inferior
9104 to the thread that got an event.
9105 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9106 (regsets_fetch_inferior_registers)
9107 (regsets_store_inferior_registers): New regsets_info parameter.
9108 Adjust to use it.
9109 (linux_register_in_regsets): New regs_info parameter. Adjust to
9110 use it.
9111 (register_addr, fetch_register, store_register): New usrregs_info
9112 parameter. Adjust to use it.
9113 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9114 parameter regs_info. Adjust to use it.
9115 (linux_fetch_registers): Get the current inferior's regs_info, and
9116 adjust to use it.
9117 (linux_store_registers): Ditto.
9118 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9119 (initialize_low): Don't initialize the target_regsets here. Call
9120 initialize_low_arch.
9121 * linux-low.h (target_regsets): Delete declaration.
9122 (struct regsets_info): New.
9123 (struct usrregs_info): New.
9124 (struct regs_info): New.
9125 (struct process_info_private) <new_inferior>: New field.
9126 (struct linux_target_ops): Delete the num_regs, regmap, and
9127 regset_bitmap fields. New field regs_info.
9128 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9129 * i387-fp.c (num_xmm_registers): Delete.
9130 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9131 calls to new interface.
9132 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9133 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9134 Infer the number of xmm registers from the regcache's target
9135 description.
9136 * i387-fp.h (num_xmm_registers): Delete.
9137 * inferiors.c (add_thread): Don't install the thread's regcache
9138 here.
9139 * proc-service.c (gregset_info): Fetch the current inferior's
9140 regs_info. Adjust to use it.
9141 * regcache.c: Include tdesc.h.
9142 (register_bytes, reg_defs, num_registers)
9143 (gdbserver_expedite_regs): Delete.
9144 (get_thread_regcache): If the thread doesn't have a regcache yet,
9145 create one, instead of aborting gdbserver.
9146 (regcache_invalidate_one): Rename to ...
9147 (regcache_invalidate_thread): ... this.
9148 (regcache_invalidate_one): New.
9149 (regcache_invalidate): Only invalidate registers of the current
9150 process.
9151 (init_register_cache): Add target_desc parameter, and use it.
9152 (new_register_cache): Ditto. Assert the target description has a
9153 non zero registers_size.
9154 (regcache_cpy): Add assertions. Adjust.
9155 (realloc_register_cache, set_register_cache): Delete.
9156 (registers_to_string, registers_from_string): Adjust.
9157 (find_register_by_name, find_regno, find_register_by_number)
9158 (register_cache_size): Add target_desc parameter, and use it.
9159 (free_register_cache_thread, free_register_cache_thread_one)
9160 (regcache_release, register_cache_size): New.
9161 (register_size): Add target_desc parameter, and use it.
9162 (register_data, supply_register, supply_register_zeroed)
9163 (supply_regblock, supply_register_by_name, collect_register)
9164 (collect_register_as_string, collect_register_by_name): Adjust.
9165 * regcache.h (struct target_desc): Forward declare.
9166 (struct regcache) <tdesc>: New field.
9167 (init_register_cache, new_register_cache): Add target_desc
9168 parameter.
9169 (regcache_invalidate_thread): Declare.
9170 (regcache_invalidate_one): Delete declaration.
9171 (regcache_release): Declare.
9172 (find_register_by_number, register_cache_size, register_size)
9173 (find_regno): Add target_desc parameter.
9174 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9175 declarations.
9176 * remote-utils.c: Include tdesc.h.
9177 (outreg, prepare_resume_reply): Adjust.
9178 * server.c: Include tdesc.h.
9179 (gdbserver_xmltarget): Delete declaration.
9180 (get_features_xml, process_serial_event): Adjust.
9181 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9182 declare.
9183 (struct process_info) <tdesc>: New field.
9184 (ipa_tdesc): Declare.
9185 * tdesc.c: New file.
9186 * tdesc.h: New file.
9187 * tracepoint.c: Include tdesc.h.
9188 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9189 (get_context_regcache): Adjust to pass ipa_tdesc down.
9190 (do_action_at_tracepoint): Adjust to get the register cache size
9191 from the context regcache's description.
9192 (traceframe_walk_blocks): Adjust to get the register cache size
9193 from the current trace frame's description.
9194 (traceframe_get_pc): Adjust to get current trace frame's
9195 description and pass it down.
9196 (gdb_collect): Adjust to get the register cache size from the
9197 IPA's description.
9198 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9199 (gdbserver_xmltarget): Delete.
9200 (initialize_low_tracepoint): Set the ipa's target description.
9201 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9202 (initialize_low_tracepoint): Set the ipa's target description.
9203 * linux-x86-low.c: Include tdesc.h.
9204 [__x86_64__] (is_64bit_tdesc): New.
9205 (ps_get_thread_area, x86_get_thread_area): Use it.
9206 (i386_cannot_store_register): Rename to ...
9207 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9208 (i386_cannot_fetch_register): Rename to ...
9209 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9210 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9211 to new interface.
9212 (target_regsets): Rename to ...
9213 (x86_regsets): ... this.
9214 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9215 interface.
9216 (x86_siginfo_fixup): Use is_64bit_tdesc.
9217 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9218 (tdesc_x32_avx_linux, tdesc_x32_linux)
9219 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9220 Declare.
9221 (x86_linux_update_xmltarget): Delete.
9222 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9223 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9224 (AMD64_LINUX_USER64_CS): New.
9225 (x86_linux_read_description): New, based on
9226 x86_linux_update_xmltarget.
9227 (same_process_callback): New.
9228 (x86_arch_setup_process_callback): New.
9229 (x86_linux_update_xmltarget): New.
9230 (x86_regsets_info): New.
9231 (amd64_linux_regs_info): New.
9232 (i386_linux_usrregs_info): New.
9233 (i386_linux_regs_info): New.
9234 (x86_linux_regs_info): New.
9235 (x86_arch_setup): Reimplement.
9236 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9237 (x86_emit_ops): Ditto.
9238 (the_low_target): Adjust. Install x86_linux_regs_info,
9239 x86_cannot_fetch_register, and x86_cannot_store_register.
9240 (initialize_low_arch): New.
9241 * linux-ia64-low.c (tdesc_ia64): Declare.
9242 (ia64_fetch_register): Adjust.
9243 (ia64_usrregs_info, regs_info): New globals.
9244 (ia64_regs_info): New function.
9245 (the_low_target): Adjust.
9246 (initialize_low_arch): New function.
9247 * linux-sparc-low.c (tdesc_sparc64): Declare.
9248 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9249 Adjust.
9250 (sparc_arch_setup): New function.
9251 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9252 (the_low_target): Adjust.
9253 (initialize_low_arch): New function.
9254 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9255 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9256 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9257 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9258 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9259 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9260 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9261 (tdesc_powerpc_isa205_vsx64l): Declare.
9262 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9263 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9264 (ppc_set_pc, ppc_get_hwcap): Adjust.
9265 (ppc_usrregs_info): Forward declare.
9266 (!__powerpc64__) ppc_regmap_adjusted: New global.
9267 (ppc_arch_setup): Adjust to the current process'es target
9268 description.
9269 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9270 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9271 (ppc_store_evrregset): Adjust.
9272 (target_regsets): Rename to ...
9273 (ppc_regsets): ... this, and make static.
9274 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9275 (ppc_regs_info): New function.
9276 (the_low_target): Adjust.
9277 (initialize_low_arch): New function.
9278 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9279 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9280 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9281 (tdesc_s390x_linux64v2): Declare.
9282 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9283 (s390_fill_gregset, s390_store_last_break): Adjust.
9284 (target_regsets): Rename to ...
9285 (s390_regsets): ... this, and make static.
9286 (s390_get_pc, s390_set_pc): Adjust.
9287 (s390_get_hwcap): New target_desc parameter, and use it.
9288 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9289 (s390_arch_setup): Adjust to set the current process'es target
9290 description. Don't adjust the regmap.
9291 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9292 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9293 (regs_info_3264): New globals.
9294 (s390_regs_info): New function.
9295 (the_low_target): Adjust.
9296 (initialize_low_arch): New function.
9297 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9298 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9299 [__mips64] (init_registers_mips_linux)
9300 (init_registers_mips_dsp_linux): Delete defines.
9301 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9302 (have_dsp): New global.
9303 (mips_read_description): New, based on mips_arch_setup.
9304 (mips_arch_setup): Reimplement.
9305 (get_usrregs_info): New function.
9306 (mips_cannot_fetch_register, mips_cannot_store_register)
9307 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9308 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9309 (target_regsets): Rename to ...
9310 (mips_regsets): ... this, and make static.
9311 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9312 (dsp_regs_info, regs_info): New globals.
9313 (mips_regs_info): New function.
9314 (the_low_target): Adjust.
9315 (initialize_low_arch): New function.
9316 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9317 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9318 Declare.
9319 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9320 (arm_read_description): New, with bits factored from
9321 arm_arch_setup.
9322 (arm_arch_setup): Reimplement.
9323 (target_regsets): Rename to ...
9324 (arm_regsets): ... this, and make static.
9325 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9326 (arm_regs_info): New function.
9327 (the_low_target): Adjust.
9328 (initialize_low_arch): New function.
9329 * linux-m68k-low.c (tdesc_m68k): Declare.
9330 (target_regsets): Rename to ...
9331 (m68k_regsets): ... this, and make static.
9332 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9333 (m68k_regs_info): New function.
9334 (m68k_arch_setup): New function.
9335 (the_low_target): Adjust.
9336 (initialize_low_arch): New function.
9337 * linux-sh-low.c (tdesc_sharch): Declare.
9338 (target_regsets): Rename to ...
9339 (sh_regsets): ... this, and make static.
9340 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9341 (sh_regs_info, sh_arch_setup): New functions.
9342 (the_low_target): Adjust.
9343 (initialize_low_arch): New function.
9344 * linux-bfin-low.c (tdesc_bfin): Declare.
9345 (bfin_arch_setup): New function.
9346 (bfin_usrregs_info, regs_info): New globals.
9347 (bfin_regs_info): New function.
9348 (the_low_target): Adjust.
9349 (initialize_low_arch): New function.
9350 * linux-cris-low.c (tdesc_cris): Declare.
9351 (cris_arch_setup): New function.
9352 (cris_usrregs_info, regs_info): New globals.
9353 (cris_regs_info): New function.
9354 (the_low_target): Adjust.
9355 (initialize_low_arch): New function.
9356 * linux-cris-low.c (tdesc_crisv32): Declare.
9357 (cris_arch_setup): New function.
9358 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9359 (cris_regs_info): New function.
9360 (the_low_target): Adjust.
9361 (initialize_low_arch): New function.
9362 * linux-m32r-low.c (tdesc_m32r): Declare.
9363 (m32r_arch_setup): New function.
9364 (m32r_usrregs_info, regs_info): New globals.
9365 (m32r_regs_info): Adjust.
9366 (initialize_low_arch): New function.
9367 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9368 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9369 (tic6x_usrregs_info): Forward declare.
9370 (tic6x_read_description): New function, based on ...
9371 (tic6x_arch_setup): ... this. Reimplement.
9372 (target_regsets): Rename to ...
9373 (tic6x_regsets): ... this, and make static.
9374 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9375 (tic6x_regs_info): New function.
9376 (the_low_target): Adjust.
9377 (initialize_low_arch): New function.
9378 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9379 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9380 (target_regsets): Rename to ...
9381 (xtensa_regsets): ... this, and make static.
9382 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9383 globals.
9384 (xtensa_arch_setup, xtensa_regs_info): New functions.
9385 (the_low_target): Adjust.
9386 (initialize_low_arch): New function.
9387 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9388 (nios2_arch_setup): Set the current process'es tdesc.
9389 (target_regsets): Rename to ...
9390 (nios2_regsets): ... this.
9391 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9392 (nios2_regs_info): New function.
9393 (the_low_target): Adjust.
9394 (initialize_low_arch): New function.
9395 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9396 (aarch64_arch_setup): Set the current process'es tdesc.
9397 (target_regsets): Rename to ...
9398 (aarch64_regsets): ... this.
9399 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9400 (aarch64_regs_info): New function.
9401 (the_low_target): Adjust.
9402 (initialize_low_arch): New function.
9403 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9404 globals.
9405 (target_regsets): Rename to ...
9406 (tile_regsets): ... this.
9407 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9408 (tile_regs_info): New function.
9409 (tile_arch_setup): Set the current process'es tdesc.
9410 (the_low_target): Adjust.
9411 (initialize_low_arch): New function.
9412 * spu-low.c (tdesc_spu): Declare.
9413 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9414 * win32-arm-low.c (tdesc_arm): Declare.
9415 (arm_arch_setup): New function.
9416 (the_low_target): Install arm_arch_setup instead of
9417 init_registers_arm.
9418 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9419 (init_windows_x86): Rename to ...
9420 (i386_arch_setup): ... this. Set `win32_tdesc'.
9421 (the_low_target): Adjust.
9422 * win32-low.c (win32_tdesc): New global.
9423 (child_add_thread): Don't create the thread cache here.
9424 (do_initial_child_stuff): Set the new process'es tdesc.
9425 * win32-low.h (struct target_desc): Forward declare.
9426 (win32_tdesc): Declare.
9427 * lynx-i386-low.c (tdesc_i386): Declare global.
9428 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9429 * lynx-low.c (lynx_tdesc): New global.
9430 (lynx_add_process): Set the new process'es tdesc.
9431 * lynx-low.h (struct target_desc): Forward declare.
9432 (lynx_tdesc): Declare global.
9433 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9434 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9435 * nto-low.c (nto_tdesc): New global.
9436 (do_attach): Set the new process'es tdesc.
9437 * nto-low.h (struct target_desc): Forward declare.
9438 (nto_tdesc): Declare.
9439 * nto-x86-low.c (tdesc_i386): Declare.
9440 (nto_x86_arch_setup): Set `nto_tdesc'.
9441
94422013-06-04 Gary Benson <gbenson@redhat.com>
9443
9444 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9445 to qSupported response when appropriate.
9446 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9447 with nonzero-length annex.
9448 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9449 arguments supplied in annex.
9450
94512013-05-31 Doug Evans <dje@google.com>
9452
9453 PR server/15594
9454 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9455 64 bits in 64-cross-32 environment.
9456
94572013-05-28 Pedro Alves <palves@redhat.com>
9458
9459 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9460 (aarch64-without-fpu.c): Delete rule.
9461 * configure.srv (aarch64*-*-linux*): Remove references to
9462 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9463 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9464 declaration.
9465
94662013-05-24 Pedro Alves <palves@redhat.com>
9467
9468 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9469 instead of strchr/decode_address. Error if the range isn't split
9470 with a ','. Don't assume there's be a ':' in the action.
9471
94722013-05-23 Yao Qi <yao@codesourcery.com>
9473 Pedro Alves <palves@redhat.com>
9474
9475 * linux-low.c (lwp_in_step_range): New function.
9476 (linux_wait_1): If the thread was range stepping and stopped
9477 outside the stepping range, report the stop to GDB. Otherwise,
9478 continue stepping. Add range stepping debug output.
9479 (linux_set_resume_request): Copy the step range from the resume
9480 request to the lwp.
9481 (linux_supports_range_stepping): New.
9482 (linux_target_ops) <supports_range_stepping>: Set to
9483 linux_supports_range_stepping.
9484 * linux-low.h (struct linux_target_ops)
9485 <supports_range_stepping>: New field.
9486 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9487 * linux-x86-low.c (x86_supports_range_stepping): New.
9488 (the_low_target) <supports_range_stepping>: Set to
9489 x86_supports_range_stepping.
9490 * server.c (handle_v_cont): Handle 'r' action.
9491 (handle_v_requests): Append ";r" if the target supports range
9492 stepping.
9493 * target.h (struct thread_resume) <step_range_start,
9494 step_range_end>: New fields.
9495 (struct target_ops) <supports_range_stepping>:
9496 New field.
9497 (target_supports_range_stepping): New macro.
9498
94992013-05-17 Joel Brobecker <brobecker@adacore.com>
9500
9501 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9502 confusion in comment.
9503
95042013-05-17 Joel Brobecker <brobecker@adacore.com>
9505
9506 * lynx-low.c (struct process_info_private): New type.
9507 (lynx_add_process): New function.
9508 (lynx_create_inferior, lynx_attach): Replace calls to
9509 add_process by calls to lynx_add_process.
9510 (lynx_resume): If PTID is null, then try using
9511 current_process()->private->last_wait_event_ptid.
9512 Add comments.
9513 (lynx_clear_inferiors): Delete. The contents of that function
9514 has been inlined in lynx_mourn;
9515 (lynx_wait_1): Save the ptid in the process's private data.
9516 (lynx_mourn): Free the process' private data. Replace call
9517 to lynx_clear_inferiors by call to clear_inferiors.
9518
95192013-05-17 Yao Qi <yao@codesourcery.com>
9520
9521 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9522 the right place.
9523
95242013-05-16 Luis Machado <lgustavo@codesourcery.com>
9525
9526 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9527 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9528 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9529 PT_TEXT_END_ADDR guards. Update comments.
9530 (linux_target_op) <read_offsets>: Conditionally define to
9531 linux_read_offsets if the target is UCLIBC and if it defines
9532 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9533
95342013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9535 Andrew Jenner <andrew@codesourcery.com>
9536
9537 * Makefile.in (SFILES): Add linux-nios2-low.c.
9538 (clean): Add action to delete nios2-linux.c.
9539 (nios2-linux.c): New rule.
9540 * configure.srv: Add nios2*-*-linux*.
9541 * linux-nios2-low.c: New.
9542
95432013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9544
9545 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9546
95472013-04-25 Hui Zhu <hui@codesourcery.com>
9548
9549 PR gdb/15186
9550 * ax.c (ax_printf): Add fflush.
9551
95522013-04-22 Tom Tromey <tromey@redhat.com>
9553
9554 * Makefile.in (SFILES): Add filestuff.c.
9555 (OBS): Add filestuff.o.
9556 (filestuff.o): New target.
9557 * config.in, configure: Rebuild.
9558 * configure.ac: Check for fdwalk, pipe2.
9559
95602013-04-17 Pedro Alves <palves@redhat.com>
9561
9562 * configure.ac (USE_THREAD_DB): Delete variable.
9563 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9564 Don't AC_SUBST USE_THREAD_DB.
9565 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9566 * config.in, configure: Regenerate.
9567
95682013-04-16 Pedro Alves <palves@redhat.com>
9569
9570 * linux-low.h (struct lwp_info) <thread_known>: Move under
9571 the USE_THREAD_DB #ifdef.
9572
95732013-04-16 Pedro Alves <palves@redhat.com>
9574
9575 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9576 (linux-low.o): Delete rule.
9577 * linux-low.h: Always include "gdb_thread_db.h" instead of
9578 conditionally including thread_db.h.
9579 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9580 HAVE_THREAD_DB_H.
9581
95822013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9583
9584 * Makefile.in (install-only): Fix make install regression.
9585
95862013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9587
9588 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9589 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9590 installation.
9591 * gdbserver.1: Remove.
9592
95932013-03-22 Pedro Alves <palves@redhat.com>
9594
9595 * linux-low.c (handle_extended_wait): Don't call
9596 linux_enable_event_reporting.
9597
95982013-03-15 Tony Theodore <tonyt@logyst.com>
9599
9600 PR build/9098:
9601 * Makefile.in (SHELL): Use @SHELL@.
9602
96032013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9604
9605 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9606 compiler warning.
9607
96082013-03-13 Joel Brobecker <brobecker@adacore.com>
9609
9610 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9611 Remove extraneous NULL element.
9612
96132013-03-13 Yao Qi <yao@codesourcery.com>
9614
9615 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9616 'V' block in trace frame.
9617
96182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9619
9620 * target.h (struct target_ops): Add btrace ops.
9621 (target_supports_btrace): New macro.
9622 (target_enable_btrace): New macro.
9623 (target_disable_btrace): New macro.
9624 (target_read_btrace): New macro.
9625 * gdbthread.h (struct thread_info): Add btrace field.
9626 * server.c: Include btrace-common.h.
9627 (handle_btrace_general_set): New function.
9628 (handle_btrace_enable): New function.
9629 (handle_btrace_disable): New function.
9630 (handle_general_set): Call handle_btrace_general_set.
9631 (handle_qxfer_btrace): New function.
9632 (struct qxfer qxfer_packets[]): Add btrace entry.
9633 * inferiors.c (remove_thread): Disable btrace.
9634 * linux-low: Include linux-btrace.h.
9635 (linux_low_enable_btrace): New function.
9636 (linux_low_read_btrace): New function.
9637 (linux_target_ops): Add btrace ops.
9638 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9639 Add srv_linux_btrace=yes.
9640 (x86_64-*-linux*): Add linux-btrace.o.
9641 Add srv_linux_btrace=yes.
9642 * configure.ac: Define HAVE_LINUX_BTRACE.
9643 * config.in: Regenerated.
9644 * configure: Regenerated.
9645
96462013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9647
9648 * server.c (handle_qxfer): Preserve error message if -3 is
9649 returned.
9650 (qxfer): Document the -3 return value.
9651
96522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9653
9654 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9655 (linux_btrace_h): New variable.
9656 (linux-btrace.o): New rule.
9657
96582013-03-08 Stan Shebs <stan@codesourcery.com>
9659 Hafiz Abid Qadeer <abidh@codesourcery.com>
9660
9661 * tracepoint.c (trace_buffer_size): New global.
9662 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9663 (init_trace_buffer): Change to one-argument function. Allocate
9664 trace buffer memory.
9665 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9666 handle QTBuffer:size packet.
9667 (cmd_bigqtbuffer_size): New function.
9668 (initialize_tracepoint): Call init_trace_buffer with
9669 DEFAULT_TRACE_BUFFER_SIZE.
9670 * server.c (handle_query): Add QTBuffer:size in the
9671 supported packets.
9672
96732013-03-07 Yao Qi <yao@codesourcery.com>
9674
9675 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9676 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9677 of -1.
9678 (cmd_qtsp): Adjust condition. Do post increment.
9679 Set cur_action and cur_step_action back to 0.
9680
96812013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9682
9683 PR server/15236
9684 * linux-low.c (linux_write_memory): Return early success if LEN is
9685 zero.
9686
96872013-03-05 Corinna Vinschen <vinschen@redhat.de>
9688
9689 * configure.srv: Add x86_64-*-cygwin* as target.
9690
96912013-02-28 Tom Tromey <tromey@redhat.com>
9692
9693 * configure.ac: Invoke AC_SYS_LARGEFILE.
9694 * configure, config.in: Rebuild.
9695
96962013-02-28 Corinna Vinschen <vinschen@redhat.com>
9697
9698 * win32-low.c: Throughout, fix format strings and casts of
9699 printf-like functions to avoid type related warnings on all
9700 platforms.
9701 (get_child_debug_event): Print dwDebugEventCode as hex since
9702 that's how it's usually documented.
9703
97042013-02-28 Yao Qi <yao@codesourcery.com>
9705
9706 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9707 pulongest.
9708
97092013-02-27 Jiong Wang <jiwang@tilera.com>
9710
9711 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9712 (reg-tilegx32.c): New rule.
9713 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9714 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9715 different register info initializer according to elf class.
9716 (init_registers_tilgx32): New function. The tilegx32 register info
9717 initializer.
9718 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9719 (tile_store_gregset): Likewise.
9720
97212013-02-27 Yao Qi <yao@codesourcery.com>
9722
9723 * server.c (process_point_options): Print debug message when
9724 debug_threads is true.
9725
97262013-02-26 Yao Qi <yao@codesourcery.com>
9727
9728 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9729
97302013-02-19 Pedro Alves <palves@redhat.com>
9731 Kai Tietz <ktietz@redhat.com>
9732
9733 PR gdb/15161
9734
9735 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9736 instead of strtoul to extract address from packet.
9737 (process_serial_event) <'z'>: Likewise.
9738
97392013-02-18 Yao Qi <yao@codesourcery.com>
9740
9741 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9742
97432013-02-14 Pedro Alves <palves@redhat.com>
9744
9745 Plug memory leak.
9746
9747 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9748 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9749
97502013-02-14 Pedro Alves <palves@redhat.com>
9751
9752 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9753
97542013-02-14 Pedro Alves <palves@redhat.com>
9755
9756 * tracepoint.c (save_string): Delete.
9757 (add_tracepoint_action): Use savestring instead of save_string.
9758
97592013-02-12 Pedro Alves <palves@redhat.com>
9760
9761 * linux-xtensa-low.c: Ditto.
9762 * xtensa-xtregs.c: Ditto.
9763
97642013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9765
9766 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9767 thread_db.
9768
97692013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9770
9771 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9772 aarch64_num_wp_regs and aarch64_num_bp_regs to
9773 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9774
97752013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9776
9777 * linux-aarch64-low.c (ps_get_thread_area): Replace
9778 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9779
97802013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9781 Marcus Shawcroft <marcus.shawcroft@arm.com>
9782 Nigel Stephens <nigel.stephens@arm.com>
9783 Yufeng Zhang <yufeng.zhang@arm.com>
9784
9785 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9786 (aarch64.c, aarch64-without-fpu.c): New targets.
9787 * configure.srv (aarch64*-*-linux*): New.
9788 * linux-aarch64-low.c: New file.
9789
97902013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9791
9792 * linux-low.c (handle_extended_wait, linux_create_inferior)
9793 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9794 (dequeue_one_deferred_signal, linux_resume_one_thread)
9795 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9796 (linux_tracefork_grandchild, linux_test_for_tracefork)
9797 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9798 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9799 where the argument is 0.
9800
98012013-01-25 Yao Qi <yao@codesourcery.com>
9802
9803 * event-loop.c: Include "queue.h".
9804 (gdb_event_p): New typedef.
9805 (struct gdb_event) <next_event>: Remove.
9806 (event_queue): Change to QUEUE(gdb_event_p).
9807 (async_queue_event): Remove.
9808 (gdb_event_xfree): New.
9809 (initialize_event_loop): New.
9810 (process_event): Use API from QUEUE.
9811 (wait_for_event): Likewise.
9812 * server.c (main): Call initialize_event_loop.
9813 * server.h (initialize_event_loop): Declare.
9814
98152013-01-18 Yao Qi <yao@codesourcery.com>
9816
9817 * ax.h (struct eval_agent_expr_context): New.
9818 (gdb_eval_agent_expr): Update declaration.
9819 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9820 TFRAME. Add new argument CTX.
9821 * server.h (struct eval_agent_expr_context): Declare.
9822 (agent_mem_read, agent_tsv_read): Update declaration.
9823 (agent_mem_read_string): Likewise.
9824 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9825 (add_traceframe_block): Add new argument TPOINT.
9826 Increase TPOINT->traceframe_usage.
9827 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9828 eval_tracepoint_agent_expr.
9829 (condition_true_at_tracepoint): Likewise.
9830 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9831 (agent_mem_read_string, agent_tsv_read): Likewise.
9832
98332013-01-16 Yao Qi <yao@codesourcery.com>
9834
9835 * linux-low.c (linux_resume_one_lwp): Don't check
9836 'lwp->bp_reinsert != 0'.
9837
98382013-01-07 Joel Brobecker <brobecker@adacore.com>
9839 Pedro Alves <palves@redhat.com>
9840
9841 * lynx-low.c (ptrace_request_to_str): Define a temporary
9842 macro and use it to simplify this function's implementation.
9843
98442013-01-07 Joel Brobecker <brobecker@adacore.com>
9845
9846 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9847 sets errno.
9848
98492013-01-07 Joel Brobecker <brobecker@adacore.com>
9850
9851 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9852
98532013-01-07 Joel Brobecker <brobecker@adacore.com>
9854
9855 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9856
98572013-01-07 Joel Brobecker <brobecker@adacore.com>
9858
9859 * lynx-low.c (lynx_resume): Use the resume_info parameter
9860 to determine the ptid for the lynx_ptrace call, unless
9861 it is equal to minus_one_ptid, in which case we use the
9862 ptid of the current_inferior.
9863 (lynx_wait_1): After having received a thread create/exit
9864 event, resume the inferior's execution using the signaling
9865 thread's ptid, rather than the old ptid.
9866
98672013-01-07 Joel Brobecker <brobecker@adacore.com>
9868
9869 * lynx-low.c (lynx_resume): Delete variable ret.
9870
98712013-01-01 Joel Brobecker <brobecker@adacore.com>
9872
9873 * gdbreplay.c (gdbreplay_version): Update copyright year.
9874 * server.c (gdbserver_version): Likewise.
9875
98762012-12-17 Joel Brobecker <brobecker@adacore.com>
9877
9878 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9879 new thread.
9880
98812012-12-17 Joel Brobecker <brobecker@adacore.com>
9882
9883 * lynx-low.c (ptrace_request_to_str): Add handling for
9884 PTRACE_GETTRACESIG.
9885
98862012-12-17 Joel Brobecker <brobecker@adacore.com>
9887
9888 * lynx-low.c (lynx_attach): Delete variable new_process.
9889
98902012-12-17 Joel Brobecker <brobecker@adacore.com>
9891
9892 * lynx-low.c (lynx_create_inferior): Delete variable
9893 new_process.
9894
98952012-12-17 Joel Brobecker <brobecker@adacore.com>
9896
9897 * lynx-low.c (ptrace_request_to_str): Do not handle
9898 PTRACE_GETTHREADLIST if this macro does not exist.
9899
99002012-12-15 Yao Qi <yao@codesourcery.com>
9901
9902 * Makefile.in (OBS): Add notif.o.
9903 * notif.c, notif.h: New.
9904 * server.c: Include "notif.h".
9905 (struct vstop_notif) <next>: Remove.
9906 <base>: New field.
9907 (queue_stop_reply): Update.
9908 (push_event, send_next_stop_reply): Remove.
9909 (discard_queued_stop_replies): Update.
9910 (notif_stop): New variable.
9911 (handle_v_stopped): Remove.
9912 (handle_v_requests): Don't call handle_v_stopped. Call
9913 handle_ack_notif instead.
9914 (queue_stop_reply_callback): Call notif_event_enque instead
9915 of queue_stop_reply.
9916 (handle_status): Don't call send_next_stop_reply, call
9917 notif_write_event instead.
9918 (kill_inferior_callback): Likewise.
9919 (detach_or_kill_inferior_callback): Likewise.
9920 (main): Call initialize_notif.
9921 (process_serial_event): Call QUEUE_is_empty.
9922 (handle_target_event): Call notif_push instead of push event.
9923 * server.h (push_event): Remove declaration.
9924
99252012-12-10 Tom Tromey <tromey@redhat.com>
9926
9927 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9928 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9929 macros.
9930 (.c.o): Rewrite.
9931 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9932 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9933 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9934 (amd64-linux-ipa.o, ax.o): Rewrite.
9935 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9936 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9937 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9938 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9939 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9940 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9941 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9942 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9943 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9944 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9945 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9946 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9947 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9948 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9949 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9950 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9951 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9952 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9953 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9954 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9955 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9956 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9957 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9958 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9959 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9960 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9961 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9962 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9963 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9964 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9965 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9966 (reg-tilegx.o): Remove.
9967 (all_object_files): New macro.
9968 Include .deps files.
9969 * aclocal.m4, configure: Rebuild.
9970 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9971 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9972 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9973
99742012-12-05 Tom Tromey <tromey@redhat.com>
9975
9976 PR gdb/14917:
9977 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9978
99792012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9980
9981 * configure.ac: Check for linux/perf_event.h.
9982 * config.in: Regenerated.
9983 * configure: Regenerated.
9984
99852012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9986
9987 * hostio.c (handle_readlink): Decrease buffer size
9988 parameter passed to readlink by one byte.
9989
99902012-11-26 Yao Qi <yao@codesourcery.com>
9991
9992 * configure.ac (build_warnings): Append '-Wempty-body'.
9993 * configure: Regenerated.
9994 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9995 body.
9996
99972012-11-15 Pierre Muller <muller@sourceware.org>
9998
9999 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10000 * config.in: Regenerate.
10001 * configure: Regenerate.
10002 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10003 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10004 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10005 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10006 header.
10007 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10008 instead of <sys/wait.h> header.
10009 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10010
100112012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10012
10013 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10014 (various make rules): Remove -DGDBSERVER
10015
100162012-11-09 Yao Qi <yao@codesourcery.com>
10017
10018 * spu-low.c (current_ptid): Move it to ..
10019 * gdbthread.h: ... here. New.
10020 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10021 * server.c (myresume, process_serial_event): Likewise.
10022 * thread-db.c (thread_db_find_new_threads): Likewise.
10023 * tracepoint.c (run_inferior_command): Likewise.
10024
100252012-10-01 Andrew Burgess <aburgess@broadcom.com>
10026
10027 * server.c (handle_search_memory_1): Include access length in
10028 warning message.
10029
100302012-09-05 Michael Brandt <michael.brandt@axis.com>
10031
10032 * linux-crisv32-low.c: Fix compile errors.
10033
100342012-09-04 Yao Qi <yao@codesourcery.com>
10035
10036 * tracepoint.c (cmd_qtsv): Adjust debug message.
10037 Don't check CUR_TPOINT.
10038
100392012-08-28 Yao Qi <yao@codesourcery.com>
10040
10041 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10042 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10043 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10044 Remove declarations of xmalloc, xreallloc, xstrdup and
10045 freeargv.
10046 * Makefile.in (libiberty_h): New.
10047 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10048 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10049
100502012-08-23 Yao Qi <yao@codesourcery.com>
10051
10052 * server.h: Remove declaration of 'xsnprintf'.
10053
100542012-08-22 Keith Seitz <keiths@redhat.com>
10055
10056 * server.h: Include build-gnulib-gbserver/config.h.
10057 * gdbreplay.c: Likewise.
10058
100592012-08-08 Doug Evans <dje@google.com>
10060
10061 * Makefile.in (SFILES): Add gdb_vecs.c.
10062 (OBS): Add gdb_vecs.o.
10063 (gdb_vecs_h, host_defs_h): New variables.
10064 (thread-db.o): Add $(gdb_vecs_h) dependency.
10065 (gdb_vecs.o): New rule.
10066 * thread-db.c: #include "gdb_vecs.h".
10067 (thread_db_load_search): Use a vector to iterate over path elements.
10068 Handle text appearing after "$pdir".
10069
10070 * configure.ac: Add check for strstr.
10071 * config.in: Regenerate.
10072 * configure: Regenerate.
10073
100742012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10075
10076 * hostio.c (handle_pread): If pread fails, fall back to attempting
10077 lseek/read.
10078 (handle_pwrite): Likewise for pwrite.
10079
100802012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10081
10082 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10083 between unsupported TYPE and unimplementable ADDR/LEN combination.
10084 (arm_insert_point): Act on new return value.
10085
100862012-07-31 Pedro Alves <palves@redhat.com>
10087
10088 * server.c (process_point_options): Only skip tokens if we find
10089 one that is unrecognized. Don't treat 'X' specially while
10090 skipping unrecognized tokens.
10091
100922012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10093
10094 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10095 to 4-byte-align HW breakpoint addresses for Thumb.
10096
100972012-07-27 Yao Qi <yao@codesourcery.com>
10098
10099 PR remote/14161.
10100
10101 * server.h: Declare gdb_agent_about_to_close.
10102 * target.c (kill_inferior): Include "agent.h".
10103 New. Send command 'kill'.
10104 * target.h (kill_inferior): Removed macro.
10105 * tracepoint.c (gdb_agent_about_to_close): New.
10106 (gdb_agent_helper_thread): Handle command 'close'.
10107 Wait endlessly until the inferior stops.
10108 Install gdb_agent_remove_socket to atexit hook.
10109 (agent_socket_name): New static variable.
10110 (gdb_agent_socket_init): Replace local variable 'name' with
10111 'agent_socket_name'.
10112 (gdb_agent_remove_socket): New.
10113
101142012-07-27 Yao Qi <yao@codesourcery.com>
10115
10116 * server.c (process_point_options): Stop at 'X' when parsing.
10117
101182012-07-19 Michael Eager <eager@eagercon.com>
10119
10120 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10121 to hw_execute.
10122 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10123 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10124 hardware breakpoint.
10125
101262012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10127
10128 * gdbserver/linux-low.c (initialize_low): Call
10129 linux_ptrace_init_warnings.
10130
101312012-07-02 Doug Evans <dje@google.com>
10132
10133 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10134 pointer to int.
10135
101362012-07-02 Stan Shebs <stan@codesourcery.com>
10137
10138 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10139 (ax.o): Add it to build rule.
10140 (ax-ipa.o): Ditto.
10141 (OBS): Add format.o.
10142 (IPA_OBS): Add format.o.
10143 * server.c (handle_query): Claim support for breakpoint commands.
10144 (process_point_options): Add command case.
10145 (process_serial_event): Leave running if there are printfs in
10146 effect.
10147 * mem-break.h (any_persistent_commands): Declare.
10148 (add_breakpoint_commands): Declare.
10149 (gdb_no_commands_at_breakpoint): Declare.
10150 (run_breakpoint_commands): Declare.
10151 * mem-break.c (struct point_command_list): New struct.
10152 (struct breakpoint): New field command_list.
10153 (any_persistent_commands): New function.
10154 (add_commands_to_breakpoint): New function.
10155 (add_breakpoint_commands): New function.
10156 (gdb_no_commands_at_breakpoint): New function.
10157 (run_breakpoint_commands): New function.
10158 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10159 locally.
10160 * ax.c: Include format.h.
10161 (ax_printf): New function.
10162 (gdb_eval_agent_expr): Add printf opcode.
10163
101642012-06-13 Yao Qi <yao@codesourcery.com>
10165
10166 * server.c (start_inferior): Remove duplicated writes to fields
10167 'last_resume_kind' and 'last_status' of 'current_inferior'.
10168
101692012-06-12 Yao Qi <yao@codesourcery.com>
10170 Pedro Alves <palves@redhat.com>
10171
10172 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10173 comment.
10174 * server.c (handle_v_cont): Extend comment.
10175
101762012-06-11 Yao Qi <yao@codesourcery.com>
10177
10178 * linux-low.c (linux_attach): Add 'static'.
10179
101802012-06-06 Yao Qi <yao@codesourcery.com>
10181
10182 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10183
101842012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10185
10186 Fix gcc -flto compilation warning.
10187 * server.c (main): Make variable multi_mode and attach volatile.
10188
101892012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10190
10191 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10192 if the platform doesn't know about it.
10193
101942012-05-30 Jeff Kenton <jkenton@tilera.com>
10195
10196 * Makefile.in (SFILES): Add linux-tile-low.c.
10197 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10198 * configure.srv: Handle tilegx-*-linux*.
10199 * linux-tile-low.c: New file.
10200
102012012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10202
10203 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10204
102052012-05-24 Pedro Alves <palves@redhat.com>
10206
10207 PR gdb/7205
10208
10209 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10210
102112012-05-24 Pedro Alves <palves@redhat.com>
10212
10213 PR gdb/7205
10214
10215 Replace target_signal with gdb_signal throughout.
10216
102172012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10218
10219 * linux-low.c (linux_store_registers): Avoid the copying sequence
10220 when no data has been retrieved by ptrace.
10221
102222012-05-22 Will Deacon <will.deacon@arm.com>
10223
10224 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10225 Include asm/ptrace.h.
10226 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10227 already defined.
10228
102292012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10230
10231 * linux-low.c (linux_store_registers): Don't re-retrieve data
10232 with ptrace that has already been obtained from /proc. Always
10233 copy any data retrieved with ptrace to the buffer supplied.
10234
102352012-05-11 Yao Qi <yao@codesourcery.com>
10236 Pedro Alves <palves@redhat.com>
10237
10238 * linux-low.c (enum stopping_threads_kind): New.
10239 (stopping_threads): Change type to `enum stopping_threads_kind'.
10240 (handle_extended_wait): If stopping and suspending threads, leave
10241 the new_lwp suspended too.
10242 (linux_wait_for_event): Adjust.
10243 (stop_all_lwps): Set `stopping_threads' to
10244 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10245 whether we're suspending threads or just stopping them. Assert no
10246 recursion happens.
10247
102482012-04-29 Yao Qi <yao@codesourcery.com>
10249
10250 * server.h: Move some code to ...
10251 * gdbthread.h: ... here. New.
10252 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10253 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10254 (nto-low.o, win32-low.o): Likewise.
10255 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10256 * regcache.c, remote-utils.c, server.c: Likewise.
10257 * target.c, tracepoint.c, win32-low.c: Likewise.
10258
102592012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10260
10261 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10262 (PTRACE_ARG4_TYPE): Likewise.
10263 (PTRACE_XFER_TYPE): Likewise.
10264 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10265 ptrace to PTRACE_ARG3_TYPE.
10266 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10267 (PTRACE_ARG4_TYPE): Likewise.
10268 (PTRACE_XFER_TYPE): Likewise.
10269 (linux_detach_one_lwp): Cast fourth argument of
10270 ptrace to long then PTRACE_ARG4_TYPE.
10271 (regsets_fetch_inferior_registers): Cast third argument of
10272 ptrace to long then PTRACE_ARG3_TYPE.
10273 (regsets_store_inferior_registers): Likewise.
10274
102752012-04-20 Pedro Alves <palves@redhat.com>
10276
10277 * configure: Regenerate.
10278
102792012-04-19 Pedro Alves <palves@redhat.com>
10280
10281 * Makefile.in (GNULIB_BUILDDIR): New.
10282 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10283 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10284 (all, install-only, uninstall, clean-info, all-lib, clean): No
10285 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10286 (maintainer-clean realclean distclean): Use subdir_do.
10287 (subdir_do): New.
10288 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10289 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10290 * acinclude.m4: Include acx_configure_dir.m4.
10291 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10292 calls. Call AC_PROG_RANLIB. Configure gnulib using
10293 ACX_CONFIGURE_DIR.
10294 (GNULIB): New.
10295 (GNULIB_STDINT_H): Adjust.
10296 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10297 * gdbreplay.c: Include build-gnulib/config.h.
10298 * server.h: Likewise.
10299 * aclocal.m4: Regenerate.
10300 * config.in: Regenerate.
10301 * configure: Regenerate.
10302
103032012-04-19 Pedro Alves <palves@redhat.com>
10304
10305 * Makefile.in (LIBGNU, INCGNU): Adjust.
10306 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10307 (all, install-only, uninstall, clean-info, all-lib, clean)
10308 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10309 * configure.ac: Adjust AC_OUTPUT output.
10310 * aclocal.m4: Regenerate.
10311 * configure: Regenerate.
10312
103132012-04-19 Pedro Alves <palves@redhat.com>
10314
10315 * Makefile.in (generated_files): New.
10316 (server_h): Remove the explicit dependency on config.h, and depend
10317 on $generated_files.
10318
103192012-04-19 Pedro Alves <palves@redhat.com>
10320
10321 * Makefile.in (INCGNU): Add -Ignulib.
10322
103232012-04-19 Pedro Alves <palves@redhat.com>
10324
10325 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10326 (INCGNU): ... this, and spell out -I here.
10327 (GNULIB_LIB): Rename to ...
10328 (LIBGNU): ... this.
10329 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10330
103312012-04-19 Pedro Alves <palves@redhat.com>
10332
10333 * config.in: Regenerate.
10334
103352012-04-19 Pedro Alves <palves@redhat.com>
10336
10337 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10338 * server.h (memmem): Remove declaration.
10339 * config.in: Regenerate.
10340 * configure: Regenerate.
10341
103422012-04-19 Yao Qi <yao@codesourcery.com>
10343
10344 * Makefile.in (SFILES): Add common/vec.c.
10345 (OBS): Add vec.o.
10346 (vec.o): New rule.
10347
103482012-04-19 Yao Qi <yao@codesourcery.com>
10349
10350 * remote-utils.c (prepare_resume_reply): Replace with macro
10351 target_core_of_thread.
10352 * server.c (handle_qxfer_threads_proper): Likewise.
10353 * target.h (traget_core_of_thread): New macro.
10354
103552012-04-18 Pedro Alves <palves@redhat.com>
10356
10357 * aclocal.m4: Regenerate.
10358 * configure: Regenerate.
10359
103602012-04-16 Yao Qi <yao@codesourcery.com>
10361
10362 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10363 duplicated on address.
10364
103652012-04-16 Yao Qi <yao@codesourcery.com>
10366
10367 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10368 (struct tracepoint_action_ops) <send>: New field.
10369 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10370 (agent_expr_send, x_tracepoint_action_send): New.
10371 (l_tracepoint_action_send): New.
10372 (cmd_qtdp): Download and install tracepoint
10373 according to `use_agent'.
10374 (run_inferior_command): Add one more parameter `len'.
10375 Update callers.
10376 (tracepoint_send_agent): New.
10377 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10378
103792012-04-16 Yao Qi <yao@codesourcery.com>
10380
10381 * tracepoint.c (download_tracepoints): Moved to ...
10382 (cmd_qtstart): ... here.
10383
103842012-04-14 Yao Qi <yao@codesourcery.com>
10385
10386 * tracepoint.c: Include inttypes.h.
10387 (struct collect_memory_action): Use sized types.
10388 (struct tracepoint): Likewise.
10389 (cmd_qtdp, stop_tracing): Update print specifiers.
10390 (cmd_qtp, response_tracepoint): Likewise.
10391 (collect_data_at_tracepoint): Likewise.
10392 (collect_data_at_step): Likewise.
10393
103942012-04-14 Yao Qi <yao@codesourcery.com>
10395
10396 Import gnulib module inttypes.
10397 * aclocal.m4, config.in, configure: Regenerated.
10398
103992012-04-14 Yao Qi <yao@codesourcery.com>
10400
10401 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10402 Makefile and config.status at last.
10403
104042012-04-13 Yao Qi <yao@codesourcery.com>
10405
10406 * tracepoint.c: Include stdint.h unconditionally.
10407
104082012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10409
10410 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10411 on BFD_HAVE_SYS_PROCFS_TYPE.
10412 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10413 * configure: Regenerate.
10414 * config.in: Likewise.
10415
104162012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10417
10418 * Makefile.in (clean): Also remove x32.c x32-linux.c
10419 x32-avx.c x32-avx-linux.c.
10420 (x32.o): New target.
10421 (x32.c): Likewise.
10422 (x32-linux.o): Likewise.
10423 (x32-linux.c): Likewise.
10424 (x32-avx.o): Likewise.
10425 (x32-avx.c): Likewise.
10426 (x32-avx-linux.o): Likewise.
10427 (x32-avx-linux.c): Likewise.
10428
10429 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10430 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10431 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10432 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10433 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10434 i386/x32-avx-linux.xml.
10435
10436 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10437 (init_registers_x32_avx_linux): Likwise.
10438 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10439 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10440
104412012-04-13 Pedro Alves <palves@redhat.com>
10442
10443 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10444 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10445 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10446 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10447 the sub-make.
10448
104492012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10450
10451 * linux-x86-low.c (compat_x32_clock_t): New.
10452 (compat_x32_siginfo_t): Likewise.
10453 (compat_x32_siginfo_from_siginfo): Likewise.
10454 (siginfo_from_compat_x32_siginfo): Likewise.
10455 (linux_is_elf64): Likewise.
10456 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10457 and siginfo_from_compat_x32_siginfo for x32.
10458 (x86_arch_setup): Set linux_is_elf64.
10459
104602012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10461
10462 PR gdb/13969
10463 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10464 e_machine field.
10465 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10466 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10467 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10468 compatible with process.
10469
104702012-04-12 Yao Qi <yao@codesourcery.com>
10471
10472 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10473 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10474 (install-only, install-info, clean): Handle sub dir gnulib.
10475 (all-lib, am--refresh): New targets.
10476 (memmem.o): Remove target.
10477 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10478 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10479 (AC_REPLACE_FUNCS): Remove memmem.
10480 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10481 (AC_OUTPUT): Generate Makefile in gnulib/.
10482 * aclocal.m4, config.in, configure: Regenerated.
10483
104842012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10485
10486 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10487
104882012-04-05 Pedro Alves <palves@redhat.com>
10489
10490 -Werror=strict-aliasing
10491
10492 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10493 pointer.
10494
104952012-04-04 Pedro Alves <palves@redhat.com>
10496
10497 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10498 (sparc_store_gregset_from_stack, sparc_store_gregset)
10499 (sparc_breakpoint_at): Fix formatting.
10500
105012012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10502
10503 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10504 are available.
10505 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10506 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10507 * config.in: Regenerate.
10508 * configure: Likewise.
10509
105102012-03-29 Pedro Alves <palves@redhat.com>
10511
10512 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10513 Correct ptrace arguments.
10514
105152012-03-28 Pedro Alves <palves@redhat.com>
10516
10517 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10518 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10519 (IA64_FR1_REGNUM): New defines.
10520 (ia64_fetch_register): New.
10521 (the_low_target): Install it.
10522 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10523 field.
10524 * linux-low.c (linux_fetch_registers): Try the
10525 the_low_target.fetch_register hook first.
10526
10527 * linux-arm-low.c (the_low_target): Adjust.
10528 * linux-bfin-low.c (the_low_target): Adjust.
10529 * linux-cris-low.c (the_low_target): Adjust.
10530 * linux-crisv32-low.c (the_low_target): Adjust.
10531 * linux-m32r-low.c (the_low_target): Adjust.
10532 * linux-m68k-low.c (the_low_target): Adjust.
10533 * linux-mips-low.c (the_low_target): Adjust.
10534 * linux-ppc-low.c (the_low_target): Adjust.
10535 * linux-s390-low.c (the_low_target): Adjust.
10536 * linux-sh-low.c (the_low_target): Adjust.
10537 * linux-sparc-low.c (the_low_target): Adjust.
10538 * linux-tic6x-low.c (the_low_target): Adjust.
10539 * linux-x86-low.c (the_low_target): Adjust.
10540 * linux-xtensa-low.c (the_low_target): Adjust.
10541
105422012-03-26 Pedro Alves <palves@redhat.com>
10543
10544 * server.c (handle_qxfer_libraries): Don't bail early if
10545 the_target->qxfer_libraries_svr4 is not NULL.
10546
105472012-03-26 Pedro Alves <palves@redhat.com>
10548
10549 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10550
105512012-03-23 Pedro Alves <palves@redhat.com>
10552
10553 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10554 "library-list-svr4" element's start tag when the the DSO list is
10555 empty.
10556
105572012-03-23 Pedro Alves <palves@redhat.com>
10558
10559 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10560 a variable whose type size is the same as the inferior's pointer
10561 size.
10562
105632012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10564
10565 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10566 struct siginfo.
10567 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10568 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10569 * linux-low.h: Include <signal.h>.
10570 (struct siginfo): Remove forward declaration.
10571 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10572 struct siginfo.
10573
105742012-03-21 Mike Frysinger <vapier@gentoo.org>
10575
10576 * .gitignore: Ignore more files.
10577
105782012-03-19 Pedro Alves <palves@redhat.com>
10579 Jan Kratochvil <jan.kratochvil@redhat.com>
10580
10581 * server.c (cont_thread, general_thread): Add describing comments.
10582 (start_inferior): Clear `cont_thread'.
10583 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10584 of a process.
10585
105862012-03-15 Yao Qi <yao@codesourcery.com>
10587
10588 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10589 handling to ...
10590 (cmd_qtdp): ... here.
10591
105922012-03-15 Yao Qi <yao@codesourcery.com>
10593
10594 * tracepoint.c (struct tracepoint_action_ops): New.
10595 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10596 (m_tracepoint_action_download): New.
10597 (r_tracepoint_action_download): New.
10598 (x_tracepoint_action_download): New.
10599 (l_tracepoint_action_download): New.
10600 (add_tracepoint_action): Install `action->ops' according type.
10601 (download_tracepoint_1): Move code `download' function pointer
10602 of various tracepoint_action_ops.
10603
106042012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10605
10606 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10607 linux_ptrace_attach_warnings.
10608
106092012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10610
10611 * Makefile.in (linux-ptrace.o): New.
10612 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10613 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10614 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10615 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10616 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10617 of these targets.
10618 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10619
106202012-03-08 Yao Qi <yao@codesourcery.com>
10621 Pedro Alves <palves@redhat.com>
10622
10623 Fix PR server/13392.
10624 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10625 offset of JMP insn.
10626 * tracepoint.c (remove_tracepoint): New.
10627 (cmd_qtdp): Call remove_tracepoint when failed to install.
10628
106292012-03-07 Pedro Alves <palves@redhat.com>
10630
10631 * linux-low.c (get_detach_signal): New.
10632 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10633 Pass on pending signals to PTRACE_DETACH. Check the result of the
10634 ptrace call.
10635 * server.c (program_signals, program_signals_p): New.
10636 (handle_general_set): Handle QProgramSignals.
10637 * server.h (program_signals, program_signals_p): Declare.
10638
106392012-03-05 Pedro Alves <palves@redhat.com>
10640 Jan Kratochvil <jan.kratochvil@redhat.com>
10641
10642 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10643 New comment why.
10644
106452012-03-03 Yao Qi <yao@codesourcery.com>
10646
10647 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10648 agent_look_up_symbols.
10649
106502012-03-03 Yao Qi <yao@codesourcery.com>
10651
10652 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10653 (linux-x86-low.o): Likewise.
10654 * server.h: Remove in_process_agent_loaded.
10655 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10656 common/agent.c.
10657 Update callers.
10658
106592012-03-03 Yao Qi <yao@codesourcery.com>
10660
10661 * tracepoint.c (gdb_agent_capability): New global.
10662 (in_process_agent_loaded_ust): Renamed to
10663 `in_process_agent_supports_ust'.
10664 Update callers.
10665 (in_process_agent_supports_ust): Call agent_capability_check.
10666 (clear_installed_tracepoints): Assert that agent supports
10667 agent.
10668
106692012-03-03 Yao Qi <yao@codesourcery.com>
10670
10671 * linux-low.c (linux_supports_agent): New.
10672 (linux_target_ops): Initialize field `supports_agent' with
10673 linux_supports_agent.
10674 * target.h (struct target_ops) <supports_agent>: New.
10675 (target_supports_agent): New macro.
10676 * server.c (handle_general_set): Handle packet 'QAgent'.
10677 (handle_query): Send `QAgent+'.
10678 * Makefile.in (server.o): Depends on agent.h.
10679
106802012-03-03 Yao Qi <yao@codesourcery.com>
10681
10682 * Makefile.in (OBS): Add agent.o.
10683 Add new rule for agent.o.
10684 Track dependence of tracepoint.c on agent.h.
10685 * tracepoint.c (run_inferior_command_1):
10686 (run_inferior_command): Call agent_run_command.
10687 (gdb_ust_connect_sync_socket): Deleted. Move it to
10688 common/agent.c.
10689 (resume_thread, stop_thread): Likewise.
10690 (gdb_ust_socket_init): Renamed to ...
10691 (gdb_agent_socket_init): ... New.
10692 (gdb_ust_thread): Renamed to ...
10693 (gdb_agent_helper_thread): ... New.
10694 (gdb_ust_init): Move some code to ...
10695 (gdb_agent_init): ... here. New.
10696 [HAVE_UST]: Call gdb_ust_init.
10697 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10698 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10699 * config.in, configure: Regenerated.
10700
107012012-03-02 Pedro Alves <palves@redhat.com>
10702
10703 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10704 * linux-low.c (struct simple_pid_list): New.
10705 (stopped_pids): New a struct simple_pid_list pointer.
10706 (add_to_pid_list, pull_pid_from_list): New.
10707 (handle_extended_wait): Don't assume the first signal new children
10708 report is SIGSTOP. Adjust call to pull_pid_from_list.
10709 (linux_wait_for_lwp): Adjust.
10710
107112012-03-02 Yao Qi <yao@codesourcery.com>
10712
10713 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10714 debug log.
10715
107162012-03-02 Yao Qi <yao@codesourcery.com>
10717
10718 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10719 `stop_pc' and `tpoint'. Update caller.
10720
107212012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10722
10723 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10724 * linux-low.c (use_linux_regsets): New macro.
10725 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10726 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10727 (linux_register_in_regsets): New function.
10728 (usr_fetch_inferior_registers): Skip registers covered by
10729 regsets.
10730 (usr_store_inferior_registers): Likewise.
10731 (usr_fetch_inferior_registers): New macro.
10732 (usr_store_inferior_registers): Likewise.
10733 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10734 (linux_store_registers): Likewise.
10735 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10736 prototype.
10737 (init_registers_mips64_dsp_linux): Likewise.
10738 (init_registers_mips_linux): New macro.
10739 (init_registers_mips_dsp_linux): Likewise.
10740 (mips_dsp_num_regs): Likewise.
10741 (DSP_BASE, DSP_CONTROL): New fallback macros.
10742 (mips_base_regs): New macro.
10743 (mips_regmap): Use it. Fix the size.
10744 (mips_dsp_regmap): New variable.
10745 (mips_dsp_regset_bitmap): Likewise.
10746 (mips_arch_setup): New function.
10747 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10748 than mips_regmap.
10749 (mips_cannot_store_register): Likewise.
10750 (the_low_target): Update .arch_setup, .num_regs and .regmap
10751 initializers. Add .regset_bitmap initializer.
10752 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10753 initializer.
10754 * linux-bfin-low.c (the_low_target): Likewise.
10755 * linux-cris-low.c (the_low_target): Likewise.
10756 * linux-crisv32-low.c (the_low_target): Likewise.
10757 * linux-ia64-low.c (the_low_target): Likewise.
10758 * linux-m32r-low.c (the_low_target): Likewise.
10759 * linux-m68k-low.c (the_low_target): Likewise.
10760 * linux-ppc-low.c (the_low_target): Likewise.
10761 * linux-s390-low.c (the_low_target): Likewise.
10762 * linux-sh-low.c (the_low_target): Likewise.
10763 * linux-sparc-low.c (the_low_target): Likewise.
10764 * linux-tic6x-low.c (the_low_target): Likewise.
10765 * linux-x86-low.c (the_low_target): Likewise.
10766 * linux-xtensa-low.c (the_low_target): Likewise.
10767 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10768 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10769 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10770 srv_xmlfiles.
10771 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10772 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10773
107742012-02-29 Yao Qi <yao@codesourcery.com>
10775 Pedro Alves <palves@redhat.com>
10776
10777 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10778 `step_over_finished' is true.
10779
107802012-02-27 Pedro Alves <palves@redhat.com>
10781
10782 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10783 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10784
107852012-02-27 Pedro Alves <palves@redhat.com>
10786
10787 PR server/9684
10788 * linux-low.c (pid_is_stopped): New.
10789 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10790
107912012-02-25 Luis Machado <lgustavo@codesourcery.com>
10792
10793 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10794 of conditions.
10795
107962012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10797
10798 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10799
108002012-02-24 Luis Machado <lgustavo@codesourcery>
10801
10802 * server.c (handle_query): Advertise support for target-side
10803 breakpoint condition evaluation.
10804 (process_point_options): New function.
10805 (process_serial_event): When inserting a breakpoint, check for
10806 a target-side condition that should be evaluated.
10807
10808 * mem-break.c: Include regcache.h and ax.h.
10809 (point_cond_list_t): New data structure.
10810 (breakpoint) <cond_list>: New field.
10811 (find_gdb_breakpoint_at): Make non-static.
10812 (delete_gdb_breakpoint_at): Clear any target-side
10813 conditions.
10814 (clear_gdb_breakpoint_conditions): New function.
10815 (add_condition_to_breakpoint): Likewise.
10816 (add_breakpoint_condition): Likewise.
10817 (gdb_condition_true_at_breakpoint): Likewise.
10818 (gdb_breakpoint_here): Return result directly instead
10819 of going through a local variable.
10820
10821 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10822 (clear_gdb_breakpoint_conditions): Likewise.
10823 (add_breakpoint_condition): Likewise.
10824 (gdb_condition_true_at_breakpoint): Likewise.
10825
10826 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10827 (need_step_over_p): Take target-side breakpoint condition into
10828 consideration.
10829
108302012-02-24 Luis Machado <lgustavo@codesourcery>
10831
10832 * server.h: Include tracepoint.h.
10833 (agent_mem_read, agent_get_trace_state_variable_value,
10834 agent_set_trace_state_variable_value,
10835 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10836 get_set_tsv_func_addr): New prototypes.
10837
10838 * ax.h: New include file.
10839 * ax.c: New source file.
10840
10841 * tracepoint.c: Include ax.h.
10842 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10843 agent_expr, eval_result_type): Move to ax.h.
10844 (parse_agent_expr): Rename to ...
10845 (gdb_parse_agent_expr): ... this, make it non-static and move
10846 to ax.h.
10847 (unparse_agent_expr) Rename to ...
10848 (gdb_unparse_agent_expr): ... this, make it non-static and move
10849 to ax.h.
10850 (eval_agent_expr): Rename to ...
10851 (eval_tracepoint_agent_expr): ... this.
10852 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10853 forward declarations.
10854 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10855 (agent_get_trace_state_variable_value): New function.
10856 (agent_set_trace_state_variable_value): New function.
10857 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10858 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10859 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10860 (condition_true_at_tracepoint): Likewise.
10861 (parse_agent_expr): Rename to ...
10862 (gdb_parse_agent_expr): ... this and move to ax.c.
10863 (unparse_agent_expr): Rename to ...
10864 (gdb_unparse_agent_expr): ... this and move to ax.c.
10865 (gdb_agent_op_name): Move to ax.c.
10866 (eval_agent_expr): Rename to ...
10867 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10868 and move to ax.c.
10869 (eval_tracepoint_agent_expr): New function.
10870 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10871 non-static.
10872 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10873 ax.c.
10874 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10875 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10876 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10877 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10878 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10879 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10880 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10881 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10882 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10883 (compile_bytecodes): Remove forward declaration.
10884 (is_goto_target): Move to ax.c.
10885 (compile_bytecodes): Move to ax.c and call
10886 agent_get_trace_state_variable_value (...) and
10887 agent_set_trace_state_variable_value (...).
10888
10889 * Makefile.in: Update ax.c and IPA dependencies.
10890
108912012-02-24 Pedro Alves <palves@redhat.com>
10892
10893 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10894 (cmd_bigqtbuffer_circular): ... this. Only handle
10895 'QTBuffer:circular:'.
10896 (handle_tracepoint_general_set): Adjust.
10897
108982012-02-16 Yao Qi <yao@codesourcery.com>
10899
10900 * inferiors.c: Move code to ...
10901 * dll.c: .... here. New.
10902 * server.h: Declare clear_dlls.
10903 * Makefile.in (SFILES): Add dll.c.
10904 (OBS): Add dll.o
10905 (dll.o): New rule.
10906
109072012-02-11 Yao Qi <yao@codesourcery.com>
10908
10909 * server.c: (handle_monitor_command): Add a new parameter
10910 `own_buf'.
10911 (handle_query): Update caller.
10912
109132012-02-09 Joel Brobecker <brobecker@adacore.com>
10914
10915 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10916 * configure, config.in: Regenerate.
10917 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10918 is not defined.
10919
109202012-02-02 Pedro Alves <palves@redhat.com>
10921
10922 Try SIGKILL first, then PTRACE_KILL.
10923 * linux-low.c (linux_kill_one_lwp): New.
10924 (linux_kill_one_lwp): Rename to ...
10925 (kill_one_lwp_callback): ... this. Use the new
10926 linux_kill_one_lwp.
10927
109282012-02-02 Pedro Alves <palves@redhat.com>
10929
10930 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10931 inferior.
10932
109332012-01-27 Pedro Alves <palves@redhat.com>
10934
10935 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10936 (elf_64_file_p): Make static.
10937 (linux_pid_exe_is_elf_64_file): New.
10938 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10939 Delete declarations.
10940 (linux_pid_exe_is_elf_64_file): Declare.
10941 * linux-x86-low.c (x86_arch_setup): Use
10942 linux_pid_exe_is_elf_64_file.
10943
109442012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10945
10946 * linux-low.c (linux_wait_for_event_1): Rename to ...
10947 (linux_wait_for_event): ... here and merge it with former
10948 linux_wait_for_event - new variable wait_ptid, use it.
10949 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10950
109512012-01-23 Pedro Alves <palves@redhat.com>
10952
10953 * server.c (main): Avoid yet another case of infinite loop while
10954 detaching/killing after a longjmp.
10955
109562012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10957
10958 Code cleanup.
10959 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10960
109612012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10962
10963 * hostio.c (handle_readlink): New function.
10964 (handle_vFile): Call it to handle "vFile:readlink" packets.
10965
109662012-01-20 Pedro Alves <palves@redhat.com>
10967 Ulrich Weigand <ulrich.weigand@linaro.org>
10968
10969 * server.c (handle_v_requests): Only support vAttach and vRun to
10970 start multiple processes when in extended protocol mode.
10971
109722012-01-17 Pedro Alves <palves@redhat.com>
10973
10974 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10975 memalign plus mprotect to allocate the scratch buffer.
10976
109772012-01-13 Pedro Alves <palves@redhat.com>
10978
10979 * server.c (attach_inferior): Clear `cont_thread'.
10980
109812012-01-13 Pedro Alves <palves@redhat.com>
10982
10983 * server.c (main): Avoid infinite loop while detaching/killing
10984 after a longjmp.
10985
109862012-01-09 Doug Evans <dje@google.com>
10987
10988 * server.c (start_inferior): Set last_ptid in --wrapper case.
10989
109902012-01-06 Yao Qi <yao@codesourcery.com>
10991
10992 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10993 defined.
10994 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10995
109962012-01-04 Yao Qi <yao@codesourcery.com>
10997
10998 * tracepoint.c (cmd_qtdp): Print debug message
10999 for static tracepoint.
11000
110012012-01-04 Yao Qi <yao@codesourcery.com>
11002
11003 * tracepoint.c (trace_vdebug): Differentiate debug message
11004 between gdbserver and IPA.
11005
110062012-01-03 Yao Qi <yao@codesourcery.com>
11007
11008 * tracepoint.c (tracepoint_was_hit): Don't collect for
11009 static tracepoint.
11010
110112012-01-02 Joel Brobecker <brobecker@adacore.com>
11012
11013 * terminal.h: Reformat copyright header.
11014
110152012-01-02 Joel Brobecker <brobecker@adacore.com>
11016
11017 * server.c (gdbserver_version): Update copyright year.
11018 * gdbreplay.c (gdbreplay_version): Likewise.
11019
110202011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11021
11022 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11023
11024 Revert:
11025 2011-12-18 Hui Zhu <teawater@gmail.com>
11026 * linux-low.c (linux_create_inferior): Save return value to ret.
11027
110282011-12-18 Hui Zhu <teawater@gmail.com>
11029
11030 * linux-low.c (linux_create_inferior): Save return value to ret.
11031
110322011-12-16 Doug Evans <dje@google.com>
11033
11034 * linux-low.c (linux_create_inferior): If stdio connection,
11035 redirect stdin from /dev/null, stdout to stderr.
11036 * remote-utils.c (remote_is_stdio): New static global.
11037 (remote_connection_is_stdio): New function.
11038 (remote_prepare): Handle stdio connection.
11039 (remote_open): Ditto.
11040 (remote_close): Don't close stdin for stdio connections.
11041 (read_prim,write_prim): New functions. Replace all calls to
11042 read/write to these.
11043 * server.c (main): Watch for "-" argument. Move call to
11044 remote_prepare before start_inferior.
11045 * server.h (STDIO_CONNECTION_NAME): New macro.
11046 (remote_connection_is_stdio): Declare.
11047
11048 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11049 in debugging output.
11050
110512011-12-15 Yao Qi <yao@codesourcery.com>
11052
11053 * tracepoint.c: Include sys/syscall.h.
11054 (gdb_ust_thread): Remove preprocessor conditional.
11055
110562011-12-14 Pedro Alves <pedro@codesourcery.com>
11057
11058 * linux-low.c (linux_detach_one_lwp): Call
11059 the_low_target.prepare_to_resume before detaching.
11060
110612011-12-14 Yao Qi <yao@codesourcery.com>
11062
11063 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11064 of write.
11065
110662011-12-14 Yao Qi <yao@codesourcery.com>
11067
11068 * i386-low.c (i386_low_stopped_data_address): Initialize local
11069 variable `control'.
11070
110712011-12-13 Pedro Alves <pedro@codesourcery.com>
11072
11073 PR remote/13492
11074
11075 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11076 DR_CONTROL unless necessary. Extend comments.
11077 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11078 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11079
110802011-12-13 Yao Qi <yao@codesourcery.com>
11081
11082 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11083 macros.
11084 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11085
110862011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11087
11088 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11089 Print new debug message for such case.
11090
110912011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11092
11093 Fix overlapping memcpy.
11094 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11095 the read_inferior_memory transfer.
11096 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11097 write_inferior_memory transfer.
11098 (set_fast_tracepoint_jump): New variable buf. Use it for the
11099 read_inferior_memory and write_inferior_memory transfers.
11100 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11101 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11102 Use it for the write_inferior_memory transfer.
11103 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11104 buffers.
11105
111062011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11107
11108 * linux-low.c (fetch_register, store_register): Make code
11109 consistent, fix formatting.
11110
111112011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11112
11113 * linux-low.c (usr_store_inferior_registers): Factor out code
11114 to handle individual registers into...
11115 (store_register): ... this new function.
11116
111172011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11118
11119 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11120 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11121 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11122 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11123 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11124 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11125 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11126 (srv_xmlfiles): Add new XML files.
11127
11128 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11129 and <sys/uio.h>.
11130 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11131 (init_registers_s390_linux32v1): Add prototype.
11132 (init_registers_s390_linux32v2): Likewise.
11133 (init_registers_s390_linux64v1): Likewise.
11134 (init_registers_s390_linux64v2): Likewise.
11135 (init_registers_s390x_linux64v1): Likewise.
11136 (init_registers_s390x_linux64v2): Likewise.
11137 (s390_num_regs): Increment to 52.
11138 (s390_regmap): Add orig_r2 register.
11139 (s390_num_regs_3264): Increment to 68.
11140 (s390_regmap_3264): Add orig_r2 register.
11141 (s390_collect_ptrace_register): Handle orig_r2 register.
11142 (s390_supply_ptrace_register): Likewise.
11143 (s390_fill_last_break): New function.
11144 (s390_store_last_break): Likewise.
11145 (s390_fill_system_call): New function.
11146 (s390_store_system_call): Likewise.
11147 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11148 register sets.
11149 (s390_check_regset): New function.
11150 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11151 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11152 Update target_regsets for available register sets.
11153
111542011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11155 Jan Kratochvil <jan.kratochvil@redhat.com>
11156
11157 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11158 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11159 New.
11160 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11161 * linux-low.h (struct process_info_private): New member r_debug.
11162 * server.c (handle_qxfer_libraries): Call
11163 the_target->qxfer_libraries_svr4.
11164 (handle_qxfer_libraries_svr4): New function.
11165 (qxfer_packets): New entry "libraries-svr4".
11166 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11167 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11168 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11169 PACKET_qXfer_libraries_svr4.
11170
111712011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11172
11173 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11174 PSW address/mask between 8-byte and 16-byte formats.
11175 (s390_supply_ptrace_register): Likewise.
11176 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11177 basic addressing mode bit.
11178
111792011-11-24 Stan Shebs <stan@codesourcery.com>
11180
11181 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11182
111832011-11-17 Stan Shebs <stan@codesourcery.com>
11184
11185 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11186 (tracing_start_time): New global.
11187 (tracing_stop_time): New global.
11188 (tracing_user_name): New global.
11189 (tracing_notes): New global.
11190 (tracing_stop_note): New global.
11191 (cmd_qtstart): Set traceframe_usage, start_time.
11192 (stop_tracing): Set stop_time.
11193 (cmd_qtstatus): Report additional status.
11194 (cmd_qtp): New function.
11195 (handle_tracepoint_query): Call it.
11196 (cmd_qtnotes): New function.
11197 (handle_tracepoint_general_set): Call it.
11198 (get_timestamp): Rename from tsv_get_timestamp.
11199
112002011-11-14 Stan Shebs <stan@codesourcery.com>
11201 Kwok Cheung Yeung <kcy@codesourcery.com>
11202
11203 * linux-x86-low.c (small_jump_insn): New.
11204 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11205 trampoline and error message, build a trampoline and issue a small
11206 jump instruction to it.
11207 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11208 trampoline and error message.
11209 (x86_get_min_fast_tracepoint_insn_len): New.
11210 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11211 * linux-low.h (struct linux_target_ops): Add arguments to
11212 install_fast_tracepoint_jump_pad operation, add new operation.
11213 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11214 arguments.
11215 (linux_get_min_fast_tracepoint_insn_len): New function.
11216 (linux_target_op): Add new operation.
11217 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11218 (gdb_trampoline_buffer_end): Ditto.
11219 (gdb_trampoline_buffer_error): Ditto.
11220 (struct ipa_sym_addresses): Add fields for new IPA variables.
11221 (symbol_list): Add entries for new IPA variables.
11222 (struct tracepoint): Add fields to hold the address range of the
11223 trampoline used by the tracepoint.
11224 (trampoline_buffer_head): New static variable.
11225 (trampoline_buffer_tail): Ditto.
11226 (claim_trampoline_space): New function.
11227 (have_fast_tracepoint_trampoline_buffer): New function.
11228 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11229 structure.
11230 (install_fast_tracepoint): Ditto, also add error buffer argument.
11231 (cmd_qtminftpilen): New function.
11232 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11233 (fast_tracepoint_from_trampoline_address): New function.
11234 (fast_tracepoint_collecting): Handle trampoline as part of jump
11235 pad space.
11236 (set_trampoline_buffer_space): New function.
11237 (initialize_tracepoint): Initialize new IPA variables.
11238 * target.h (struct target_ops): Add arguments to
11239 install_fast_tracepoint_jump_pad operation, add new
11240 get_min_fast_tracepoint_insn_len operation.
11241 (target_get_min_fast_tracepoint_insn_len): New.
11242 (install_fast_tracepoint_jump_pad): Add arguments.
11243 * server.h (IPA_BUFSIZ): Define.
11244 * linux-i386-ipa.c: Include extra header files.
11245 (initialize_fast_tracepoint_trampoline_buffer): New function.
11246 (initialize_low_tracepoint): Call it.
11247 * server.h (set_trampoline_buffer_space): Declare.
11248 (claim_trampoline_space): Ditto.
11249 (have_fast_tracepoint_trampoline_buffer): Ditto.
11250
112512011-11-14 Yao Qi <yao@codesourcery.com>
11252
11253 * server.c (handle_query): Handle InstallInTrace for qSupported.
11254 * tracepoint.c (add_tracepoint): Sort list.
11255 (install_tracepoint, download_tracepoint): New.
11256 (cmd_qtdp): Call them to install and download tracepoints.
11257 (sort_tracepoints): Removed.
11258 (cmd_qtstart): Update.
11259
112602011-11-14 Yao Qi <yao@codesourcery.com>
11261
11262 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11263 * mem-break.h: Declare.
11264 * tracepoint.c (cmd_qtstart): Move some code to ...
11265 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11266 New.
11267 (download_tracepoints): Move some code to ...
11268 (download_tracepoint_1): ... here. New.
11269
112702011-11-08 Yao Qi <yao@codesourcery.com>
11271
11272 * remote-utils.c (relocate_instruction): A comment fix.
11273
112742011-11-07 Joel Brobecker <brobecker@adacore.com>
11275
11276 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11277 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11278 dr_status_mirror and dr_control_mirror from debug_reg_state.
11279 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11280 (i386_initial_stuff): Remove use of deleted globals.
11281 (i386_get_thread_context, i386_set_thread_context,
11282 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11283 from debug_reg_state.
11284
112852011-11-05 Yao Qi <yao@codesourcery.com>
11286
11287 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11288 address as TPOINT's.
11289
112902011-11-02 Stan Shebs <stan@codesourcery.com>
11291
11292 * tracepoint.c (agent_mem_read_string): New function.
11293 (eval_agent_expr): Call it for tracenz.
11294 * server.c (handle_query): Report support for tracenz.
11295
112962011-11-02 Yao Qi <yao@codesourcery.com>
11297
11298 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11299
113002011-11-02 Yao Qi <yao@codesourcery.com>
11301
11302 * target.h: Fix a typo in comment.
11303
113042011-10-31 Pedro Alves <pedro@codesourcery.com>
11305
11306 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11307 clobber the breakpoints' shadows with fast tracepoint jumps.
11308 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11309 * target.c (write_inferior_memory): Also pass MYADDR down to
11310 check_mem_write.
11311
113122011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11313
11314 * configure.ac: Check support for personality routine.
11315 * configure: Regenerate.
11316 * config.in: Likewise.
11317 * linux-low.c: Include <sys/personality.h>.
11318 Define ADDR_NO_RANDOMIZE if necessary.
11319 (linux_create_inferior): Disable address space randomization when
11320 forking inferior, if requested.
11321 (linux_supports_disable_randomization): New function.
11322 (linux_target_ops): Install it.
11323 * server.h (disable_randomization): Declare.
11324 * server.c (disable_randomization): New global variable.
11325 (handle_general_set): Handle QDisableRandomization.
11326 (handle_query): Likewise for qSupported.
11327 (main): Support --disable-randomization and --no-disable-randomization
11328 command line arguments.
11329 * target.h (struct target_ops): Add supports_disable_randomization.
11330 (target_supports_disable_randomization): New macro.
11331
113322011-09-29 Mike Frysinger <vapier@gentoo.org>
11333
11334 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11335 ifdef check.
11336 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11337 [!PT_GETDSBT] (target_loadmap): New definition.
11338 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11339 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11340 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11341 and PT_GETDSBT to LINUX_LOADMAP.
11342 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11343 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11344
113452011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11346
11347 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11348 (arm_linux_hwbp_cap): New static variable.
11349 (arm_linux_get_hwbp_cap): Replace by ...
11350 (arm_linux_init_hwbp_cap): ... this new function.
11351 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11352 (arm_linux_get_hw_watchpoint_count): Likewise.
11353 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11354 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11355 (arm_prepare_to_resume): Use perror_with_name instead of error.
11356
113572011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11358
11359 * linux-arm-low.c: Include <signal.h>.
11360 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11361 (struct arm_linux_hwbp_cap): New data type.
11362 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11363 (struct arm_linux_hw_breakpoint): New data type.
11364 (MAX_BPTS, MAX_WPTS): Define.
11365 (struct arch_process_info, struct arch_lwp_info): New data types.
11366 (arm_linux_get_hwbp_cap): New function.
11367 (arm_linux_get_hw_breakpoint_count): Likewise.
11368 (arm_linux_get_hw_watchpoint_count): Likewise.
11369 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11370 (arm_hwbp_control_initialize): Likewise.
11371 (arm_hwbp_control_is_enabled): Likewise.
11372 (arm_hwbp_control_is_initialized): Likewise.
11373 (arm_hwbp_control_disable): Likewise.
11374 (arm_linux_hw_breakpoint_equal): Likewise.
11375 (arm_linux_hw_point_initialize): Likewise.
11376 (struct update_registers_data): New data structure.
11377 (update_registers_callback: New function.
11378 (arm_insert_point): Likewise.
11379 (arm_remove_point): Likewise.
11380 (arm_stopped_by_watchpoint): Likewise.
11381 (arm_stopped_data_address): Likewise.
11382 (arm_new_process): Likewise.
11383 (arm_new_thread): Likewise.
11384 (arm_prepare_to_resume): Likewise.
11385 (the_low_target): Register arm_insert_point, arm_remove_point,
11386 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11387 arm_new_thread, and arm_prepare_to_resume.
11388
113892011-09-15 Stan Shebs <stan@codesourcery.com>
11390
11391 * server.h (struct emit_ops): Add compare-goto fields.
11392 * tracepoint.c (gdb_agent_op_sizes): New table.
11393 (emit_eq_goto): New function.
11394 (emit_ne_goto): New function.
11395 (emit_lt_goto): New function.
11396 (emit_le_goto): New function.
11397 (emit_gt_goto): New function.
11398 (emit_ge_goto): New function.
11399 (is_goto_target): New function.
11400 (compile_bytecodes): Recognize special cases of compare-goto
11401 combinations and call specialized emitters for them.
11402 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11403 (amd64_emit_ne_goto): New function.
11404 (amd64_emit_lt_goto): New function.
11405 (amd64_emit_le_goto): New function.
11406 (amd64_emit_gt_goto): New function.
11407 (amd64_emit_ge_goto): New function.
11408 (amd64_emit_ops): Add the new functions.
11409 (i386_emit_eq_goto): New function.
11410 (i386_emit_ne_goto): New function.
11411 (i386_emit_lt_goto): New function.
11412 (i386_emit_le_goto): New function.
11413 (i386_emit_gt_goto): New function.
11414 (i386_emit_ge_goto): New function.
11415 (i386_emit_ops): Add the new functions.
11416
114172011-09-08 Stan Shebs <stan@codesourcery.com>
11418
11419 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11420 (i386_emit_epilogue): Restore %ebx.
11421
114222011-08-31 Jie Zhang <jzhang918@gmail.com>
11423
11424 * server.c (step_thread): Remove definition.
11425 (process_serial_event): Don't handle Hs.
11426 * server.h (step_thread): Remove declaration.
11427 * target.c (set_desired_inferior): Remove use of step_thread.
11428
114292011-08-24 Luis Machado <lgustavo@codesourcery.com>
11430
11431 * linux-low.c: Include linux-procfs.h.
11432 (linux_attach_lwp_1): Update comments.
11433 (linux_attach): Scan for existing threads when attaching to a
11434 process that is the tgid.
11435 * Makefile.in: Update dependencies.
11436
114372011-08-24 Luis Machado <lgustavo@codesourcery.com>
11438
11439 * configure.srv: Add linux-procfs.o dependencies.
11440
114412011-08-14 Yao Qi <yao@codesourcery.com>
11442
11443 * target.h (struct target_ops): Fix indent.
11444 * win32-low.c (win32_target_ops): Fix comment.
11445
114462011-08-14 Andrew Jenner <andrew@codesourcery.com>
11447 Yao Qi <yao@codesourcery.com>
11448
11449 * Makefile.in (clean): Remove tic6x-*.c files.
11450 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11451 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11452 (tic6x-c64xp-linux.c): Likewise.
11453 * configure.srv: Add support for tic6x-*-uclinux.
11454 * linux-tic6x-low.c: New.
11455 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11456
114572011-08-14 Andrew Stubbs <ams@codesourcery.com>
11458 Yao Qi <yao@codesourcery.com>
11459
11460 * target.h (struct target_ops): Add read_loadmap.
11461 * linux-low.c (struct target_loadseg): New type.
11462 (struct target_loadmap): New type.
11463 (linux_read_loadmap): New function.
11464 (linux_target_ops): Add linux_read_loadmap.
11465 * server.c (handle_query): Support qXfer:fdpic:read packet.
11466 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11467 to NULL.
11468
114692011-08-05 Eli Zaretskii <eliz@gnu.org>
11470
11471 * win32-low.c: Include <stdint.h>.
11472
114732011-07-22 Pedro Alves <pedro@codesourcery.com>
11474
11475 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11476 to the inferior here.
11477 (i386_remove_aligned_watchpoint): Ditto.
11478 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11479 fit part of the watchpoint in the debug registers.
11480 (i386_update_inferior_debug_regs): New.
11481 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11482 registers, and only update the inferior on success.
11483 (i386_low_remove_watchpoint): Ditto.
11484
114852011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11486
11487 * linux-low.c (compare_ints, unique, list_threads, show_process,
11488 linux_core_of_thread): Delete.
11489 (linux_target_ops): Change linux_core_of_thread to
11490 linux_common_core_of_thread.
11491 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11492 * utils.c (malloc_failure): Change type of argument.
11493 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11494 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11495 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11496 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11497 (IPA_OBJS): Add common-utils-ipa.o.
11498 (ptid_h, linux_osdata_h): New macros.
11499 (server_h): Add common/common-utils.h, common/xml-utils.h,
11500 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11501 common/ptid.h.
11502 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11503 ptid.o, buffer.o): New rules.
11504 (linux-low.o): Add common/linux-osdata.h as a dependency.
11505 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11506 * configure.ac: Add AC_HEADER_DIRENT check.
11507 * config.in: Regenerate.
11508 * configure: Regenerate.
11509 * remote-utils.c (xml_escape_text): Delete.
11510 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11511 buffer_xml_printf): Move to common/buffer.c.
11512 * server.c (main): Remove call to initialize_inferiors.
11513 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11514 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11515 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11516 internal_error, gdb_assert, gdb_assert_fail): Delete.
11517 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11518 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11519 common/buffer.h.
11520 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11521 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11522 initialize_inferiors): Delete.
11523
115242011-07-20 Pedro Alves <pedro@codesourcery.com>
11525
11526 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11527 symbol error.
11528
115292011-05-31 Pedro Alves <pedro@codesourcery.com>
11530
11531 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11532 assertion.
11533 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11534
115352011-05-26 Yao Qi <yao@codesourcery.com>
11536
11537 * Makefile.in (thread-db.o): Track dependence to
11538 common/gdb_thread_db.h.
11539 * thread-db.c: include gdb_thread_db.h from right place.
11540
115412011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11542
11543 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11544 __FILE__ and __LINE__ to internal_error.
11545
115462011-05-13 Doug Evans <dje@google.com>
11547
11548 * thread-db.c (try_thread_db_load_from_sdir): New function.
11549 (try_thread_db_load_from_dir): New function.
11550 (thread_db_load_search): Handle $sdir, ignore $pdir.
11551 Remove trying of system directories if search of
11552 libthread-db-search-path fails, that is now done via $sdir.
11553
115542011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11555
11556 * server.c (handle_query): Add EnableDisableTracepoints to the list
11557 of supported features.
11558 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11559 tracepoints.
11560 (cmd_qtenable_disable): New.
11561 (cmd_qtstart): Install tracepoints even if disabled.
11562 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11563 receiving a QTEnable or QTDisable packet.
11564 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11565 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11566 tracepoints.
11567 (gdb_probe): Skip data collection if static tracepoint is disabled.
11568
115692011-05-10 Doug Evans <dje@google.com>
11570
11571 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11572
115732011-05-04 Doug Evans <dje@google.com>
11574
11575 * linux-low.c (linux_join): Skip process lookup.
11576 * spu-low.c (spu_join): Ditto.
11577 * server.c (join_inferiors_callback): Delete.
11578 (process_serial_event): For 'D' packet (detach) call join_inferior
11579 directly.
11580
115812011-05-04 Joseph Myers <joseph@codesourcery.com>
11582
11583 * README: Don't mention xscale*-*-linux*.
11584 * configure.srv (xscale*-*-linux*): Don't handle target.
11585
115862011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11587
11588 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11589 casting pointers.
11590 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11591 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11592 (i386_emit_void_call_2): Likewise.
11593
115942011-04-26 Yao Qi <yao@codesourcery.com>
11595
11596 * linux-low.c: Move common macros to linux-ptrace.h.
11597 Include linux-ptrace.h.
11598 * Makefile.in (linux_ptrace_h): New.
11599 (linux-low.o): Depends on linux-ptrace.h.
11600
116012011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11602
11603 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11604 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11605 (remote_prepare): New function with most of the TCP code from ...
11606 (remote_open): ... here. Detect PORT here unconditionally. Move also
11607 setting transport_is_reliable.
11608 * server.c (run_once): New variable.
11609 (gdbserver_usage): Document it.
11610 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11611 the first run if RUN_ONCE.
11612 * server.h (run_once, remote_prepare): New declarations.
11613
116142011-04-19 Tom Tromey <tromey@redhat.com>
11615
11616 * win32-low.c (handle_load_dll): Remove duplicate "the".
11617
116182011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11619
11620 Remove support for old Cygwin 1.5 versions.
11621 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11622 function to avoid warning.
11623 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11624 warning.
11625
116262011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11627
11628 * gdbserver/server.h (Macro _): Define it if not available.
11629
116302011-03-14 Michael Snyder <msnyder@vmware.com>
11631
11632 * hostio.c (handle_close): Remove unnecessary null test.
11633
116342011-03-10 Joel Brobecker <brobecker@adacore.com>
11635
11636 * Makefile.in (maintainer-clean realclean distclean): Remove
11637 "make ... subdir_do" command.
11638
116392011-03-10 Michael Snyder <msnyder@vmware.com>
11640
11641 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11642
11643 * server.c (handle_v_run): Free alloced buffer on early return.
11644
116452011-03-09 Yao Qi <yao@codesourcery.com>
11646
11647 Revert:
11648 2011-03-04 Yao Qi <yao@codesourcery.com>
11649
11650 * Makefile.in: Remove GNU make feature --directory.
11651
11652 2011-03-05 Yao Qi <yao@codesourcery.com>
11653
11654 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11655 (subdir_do): New make target. Copied from gdb/Makefile.
11656 (maintainer-clean, realclean, distclean, clean): Call corresponding
11657 make targets in common/Makefile.
11658
11659 2011-02-11 Yao Qi <yao@codesourcery.com>
11660
11661 * configure.ac: Call AC_PROG_RANLIB.
11662 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11663 * configure: Regenerate.
11664
116652011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11666
11667 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11668
116692011-03-06 Yao Qi <yao@codesourcery.com>
11670
11671 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11672
116732011-03-05 Yao Qi <yao@codesourcery.com>
11674
11675 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11676 (subdir_do): New make target. Copied from gdb/Makefile.
11677 (maintainer-clean, realclean, distclean, clean): Call corresponding
11678 make targets in common/Makefile.
11679
116802011-03-04 Yao Qi <yao@codesourcery.com>
11681
11682 * Makefile.in: Remove GNU make feature --directory.
11683
116842011-03-04 Michael Snyder <msnyder@vmware.com>
11685
11686 * server.c (queue_stop_reply): Call xmalloc not malloc.
11687
116882011-03-02 Michael Snyder <msnyder@vmware.com>
11689
11690 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11691
116922011-02-28 Michael Snyder <msnyder@vmware.com>
11693
11694 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11695 (cmd_qtframe): Ditto.
11696 (cmd_qtbuffer): Ditto.
11697 (cmd_bigqtbuffer): Ditto.
11698
11699 * utils.c (decimal2str): Initialize 'width' to nine, then
11700 don't mess with it.
11701
117022011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11703
11704 * hostio.c (require_data): Free *data, not data.
11705
117062011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11707
11708 * hostio.c (require_data): Use free, not xfree.
11709
117102011-02-27 Michael Snyder <msnyder@vmware.com>
11711
11712 * server.c (handle_query): Discard unused value.
11713
11714 * hostio.c (require_data): Free malloc memory before returning
11715 error.
11716
117172011-02-26 Michael Snyder <msnyder@vmware.com>
11718
11719 * linux-low.c (list_threads): Call closedir for dirent.
11720
117212011-02-27 Michael Snyder <msnyder@vmware.com>
11722
11723 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11724 a case statement falls through.
11725
11726 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11727
11728 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11729 in comparison.
11730
117312011-02-26 Michael Snyder <msnyder@vmware.com>
11732
11733 * utils.c (decimal2str): Eliminate dead code and dead param.
11734 (pulongest): Drop dead param from call to decimal2str.
11735 (plongest): Ditto.
11736
117372011-02-24 Joel Brobecker <brobecker@adacore.com>
11738
11739 Revert the following patch (not approved yet):
11740 2011-02-21 Hui Zhu <teawater@gmail.com>
11741 * tracepoint.c (tp_printf): New function.
11742 (eval_agent_expr): Handle gdb_agent_op_printf.
11743
117442011-02-21 Hui Zhu <teawater@gmail.com>
11745
11746 * tracepoint.c (tp_printf): New function.
11747 (eval_agent_expr): Handle gdb_agent_op_printf.
11748
117492011-02-18 Tom Tromey <tromey@redhat.com>
11750
11751 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11752 (tracepoint.o): Likewise.
11753 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11754 (gdb_agent_op_names): Likewise.
11755
117562011-02-18 Tom Tromey <tromey@redhat.com>
11757
11758 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11759 gdb_agent_op_rot>: New constants.
11760 (gdb_agent_op_names): Add pick and roll.
11761 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11762 cases.
11763
117642011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11765
11766 * aclocal.m4: Regenerated with aclocal-1.11.1.
11767
117682011-02-14 Pedro Alves <pedro@codesourcery.com>
11769
11770 * server.c (handle_qxfer_traceframe_info): New.
11771 (qxfer_packets): Register "traceframe-info".
11772 (handle_query): Report support for qXfer:traceframe-info:read+.
11773 * tracepoint.c (match_blocktype): New.
11774 (traceframe_find_block_type): Rename to ...
11775 (traceframe_walk_blocks): ... this. Add callback filter argument,
11776 and use it.
11777 (traceframe_find_block_type): New, reimplemented on top of
11778 traceframe_walk_blocks.
11779 (build_traceframe_info_xml): New.
11780 (traceframe_read_info): New.
11781 * server.h (traceframe_read_info): Declare.
11782
117832011-02-11 Yao Qi <yao@codesourcery.com>
11784
11785 * configure.ac: Call AC_PROG_RANLIB.
11786 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11787 * configure: Regenerate.
11788
117892011-02-07 Pedro Alves <pedro@codesourcery.com>
11790
11791 * server.c (gdb_read_memory): Change return semantics to allow
11792 partial transfers.
11793 (handle_search_memory_1): Adjust.
11794 (process_serial_event) <'m' packet>: Handle partial transfers.
11795 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11796
117972011-01-28 Pedro Alves <pedro@codesourcery.com>
11798
11799 * regcache.c (init_register_cache): Initialize
11800 regcache->register_status.
11801 (free_register_cache): Release regcache->register_status.
11802 (regcache_cpy): Copy register_status.
11803 (registers_to_string): Print 'x's for unavailable registers.
11804 (supply_register): Mark the register's status valid or
11805 unavailable, depending on whether a buffer was passed in or not.
11806 (supply_register_zeroed): New.
11807 (supply_regblock): Mark the registers' status valid or
11808 unavailable, depending on whether a buffer was passed in or not.
11809 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11810 (struct regcache): New `register_status' field.
11811 (supply_register_zeroed): Declare.
11812 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11813 supply_register_zeroed, rather than passing a NULL buffer to
11814 supply_register.
11815 * tracepoint.c (fetch_traceframe_registers): Update comment.
11816
118172011-01-28 Pedro Alves <pedro@codesourcery.com>
11818
11819 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11820 buffer explicit.
11821
118222011-01-25 Pedro Alves <pedro@codesourcery.com>
11823
11824 * server.h (decode_xfer_write): Change prototype.
11825 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11826 and don't extract the annex here.
11827 * server.c (decode_xfer_read): Remove `annex' parameter,
11828 and don't extract the annex here.
11829 (decode_xfer): New.
11830 (struct qxfer): New.
11831 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11832 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11833 (handle_qxfer_statictrace): New functions, abstracted out from
11834 handle_query, and made to use the struct qxfer interface.
11835 (handle_threads_qxfer_proper): Rename to ...
11836 (handle_qxfer_threads_proper): ... this.
11837 (handle_threads_qxfer): Rename to ...
11838 (handle_qxfer_threads): ... this. Adjust.
11839 (qxfer_packets): New array.
11840 (handle_qxfer): New function.
11841 (handle_query): Use handle_qxfer.
11842
118432011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11844
11845 * gdbreplay.c: Shorten lines of >= 80 columns.
11846 * linux-low.c: Ditto.
11847 * linux-ppc-low.c: Ditto.
11848 * linux-s390-low.c: Ditto.
11849 * linux-sparc-low.c: Ditto.
11850 * linux-x86-low.c: Ditto.
11851 * linux-xtensa-low.c: Ditto.
11852 * mem-break.c: Ditto.
11853 * nto-low.c: Ditto.
11854 * regcache.h: Ditto.
11855 * remote-utils.c: Ditto.
11856 * server.c: Ditto.
11857 * server.h: Ditto.
11858 * thread-db.c: Ditto.
11859 * tracepoint.c: Ditto.
11860 * utils.c: Ditto.
11861 * win32-low.h: Ditto.
11862
118632011-01-05 Joel Brobecker <brobecker@adacore.com>
11864
11865 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11866 update.
11867
118682011-01-01 Joel Brobecker <brobecker@adacore.com>
11869
11870 * server.c (gdbserver_version): Update copyright year in version
11871 output.
11872 * gdbreplay.c (gdbreplay_version): Ditto.
11873
118742010-12-29 Jie Zhang <jie.zhang@analog.com>
11875
11876 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11877 * linux-bfin-low.c: New file.
11878 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11879 PT_DATA_ADDR for BFIN targets.
11880 * Makefile.in (SFILES): Add linux-bfin-low.c.
11881 (clean): Remove reg-bfin.c.
11882 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11883 * README: Mention supported Blackfin targets.
11884
118852010-12-23 Mike Frysinger <vapier@gentoo.org>
11886
11887 * .gitignore: New file.
11888
118892010-11-16 Mike Frysinger <vapier@gentoo.org>
11890
11891 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11892
118932010-10-22 Jie Zhang <jie@codesourcery.com>
11894
11895 * Makefile.in: Add FLAGS_TO_PASS variable.
11896 (install): Remove dependency of install-only and recursively
11897 invoke make for install-only.
11898
118992010-10-04 Doug Evans <dje@google.com>
11900
11901 * Makefile.in (uninstall): Use $(DESTDIR).
11902
119032010-09-24 Pedro Alves <pedro@codesourcery.com>
11904
11905 PR gdb/11842
11906
11907 * linux-x86-low.c (compat_siginfo_from_siginfo)
11908 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11909 si_code is < 0. Check for si_code == SI_TIMER before checking for
11910 si_code < 0.
11911
119122010-09-13 Joel Brobecker <brobecker@adacore.com>
11913
11914 * lynx-i386-low.c: New file.
11915 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11916
119172010-09-13 Joel Brobecker <brobecker@adacore.com>
11918
11919 * lynx-low.c (ptrace_request_to_str): Remove handling for
11920 request values that have been removed in LynxOS 5.x.
11921
119222010-09-13 Joel Brobecker <brobecker@adacore.com>
11923
11924 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11925 <ptrace.h>
11926
119272010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11928
11929 * configure.ac: Add --enable-inprocess-agent option.
11930 * configure: Rebuilt.
11931
119322010-09-06 Yao Qi <yao@codesourcery.com>
11933
11934 * linux-low.c (linux_kill): Remove unused variable.
11935 (linux_stabilize_threads): Likewise.
11936 * server.c (start_inferior): Likewise.
11937 (queue_stop_reply_callback): Likewise.
11938 * tracepoint.c (do_action_at_tracepoint): Likewise.
11939
119402010-09-06 Yao Qi <yao@codesourcery.com>
11941
11942 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11943 on return.
11944
119452010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11946
11947 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11948
119492010-09-06 Pedro Alves <pedro@codesourcery.com>
11950
11951 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11952 "$(IPA_DEPFILES)".
11953
119542010-09-01 Joel Brobecker <brobecker@adacore.com>
11955
11956 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11957 gdbserver/lynx-ppc-low.c: New files.
11958 * Makefile.in (lynx_low_h): New variable.
11959 (lynx-low.o, lynx-ppc-low.o): New rules.
11960 * configure.ac: On LynxOS, link with -lnetinet.
11961 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11962 * configure: regenerate.
11963
119642010-09-01 Joel Brobecker <brobecker@adacore.com>
11965
11966 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11967 * configure.ac: Add check for vasprintf and vsnprintf.
11968 * configure, config.in: Regenerate.
11969 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11970
119712010-09-01 Joel Brobecker <brobecker@adacore.com>
11972
11973 * gdbreplay.c: Move include of alloca.h up, next to include of
11974 malloc.h.
11975 * server.h: Add include of malloc.h.
11976 * mem-break.c: Remove include of malloc.h.
11977 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11978
119792010-09-01 Joel Brobecker <brobecker@adacore.com>
11980
11981 * Makefile.in (memmem.o): Build with -Wno-error.
11982
119832010-09-01 Joel Brobecker <brobecker@adacore.com>
11984
11985 * utils.c (xsnprintf): Make non-static.
11986 * server.h: Add xsnprintf declaration.
11987 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11988 replace calls to snprintf by calls to xsnprintf throughout.
11989
119902010-09-01 Joel Brobecker <brobecker@adacore.com>
11991
11992 * configure.ac: Add configure check for alloca.
11993 * configure, config.in: Regenerate.
11994 * server.h: Include alloca.h if it exists.
11995 * gdbreplay.c: Include alloca.h if it exists.
11996
119972010-08-28 Pedro Alves <pedro@codesourcery.com>
11998
11999 * linux-low.c (__SIGRTMIN): Define if not already defined.
12000 (linux_create_inferior): Check for __ANDROID__ rather than
12001 __SIGRTMIN.
12002 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12003 are already deferred.
12004 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12005 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12006 stopped and already has a pending signal to report.
12007 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12008 a pending signal to report or is moving out of a jump pad.
12009 (linux_init_signals): Check for __ANDROID__ rather than
12010 __SIGRTMIN.
12011
120122010-08-28 Pedro Alves <pedro@codesourcery.com>
12013
12014 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12015 debug_threads check. Avoid a linear search when not doing debug
12016 output.
12017
120182010-08-27 Pedro Alves <pedro@codesourcery.com>
12019
12020 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12021 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12022 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12023 (process_event): Change local fd's type to gdb_fildes_t.
12024 (create_file_handler): Adjust prototype.
12025 (delete_file_handler): Adjust prototype.
12026 (handle_file_event): Adjust prototype. Use pfildes.
12027 (create_file_event): Adjsut prototype.
12028 * remote-utils.c (remote_desc, listen_desc): Change type to
12029 gdb_fildes_t.
12030 * server.h: New gdb_fildes_t typedef.
12031 [USE_WIN32API]: Include winsock2.h.
12032 (delete_file_handler, add_file_handler): Adjust prototypes.
12033 (pfildes): Declare.
12034 * utils.c (pfildes): New.
12035
120362010-08-27 Pedro Alves <pedro@codesourcery.com>
12037
12038 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12039 * configure: Regenerate.
12040
120412010-08-27 Pedro Alves <pedro@codesourcery.com>
12042
12043 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12044 (linux_done_accessing_memory): ... this.
12045 (linux_target_ops): Adjust.
12046 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12047 * nto-low.c (nto_target_ops): Adjust comment.
12048 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12049 * spu-low.c (spu_target_ops): Adjust comment.
12050 * target.h (target_ops): Rename unprepare_to_access_memory field
12051 to done_accessing_memory.
12052 (unprepare_to_access_memory): Rename to ...
12053 (done_accessing_memory): ... this.
12054
120552010-08-26 Pedro Alves <pedro@codesourcery.com>
12056
12057 * linux-low.c (linux_prepare_to_access_memory): New.
12058 (linux_unprepare_to_access_memory): New.
12059 (linux_target_ops): Install them.
12060 * server.c (read_memory): Rename to ...
12061 (gdb_read_memory): ... this. Use
12062 prepare_to_access_memory/prepare_to_access_memory.
12063 (write_memory): Rename to ...
12064 (gdb_write_memory): ... this. Use
12065 prepare_to_access_memory/prepare_to_access_memory.
12066 (handle_search_memory_1): Adjust.
12067 (process_serial_event): Adjust.
12068 * target.h (struct target_ops): New fields
12069 prepare_to_access_memory and unprepare_to_access_memory.
12070 (prepare_to_access_memory, unprepare_to_access_memory): New.
12071 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12072 prepare_to_access_memory/prepare_to_access_memory.
12073 * nto-low.c (nto_target_ops): Adjust.
12074 * spu-low.c (spu_target_ops): Adjust.
12075 * win32-low.c (win32_target_ops): Adjust.
12076
120772010-08-26 Pedro Alves <pedro@codesourcery.com>
12078
12079 * Makefile.in (WARN_CFLAGS): Get it from configure.
12080 (WERROR_CFLAGS): New.
12081 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12082 * configure.ac: Introduce --enable-werror, which adds -Werror to
12083 the compiler command line. Enabled by default. Disable with
12084 --disable-werror. Add -Wdeclaration-after-statement
12085 Wpointer-arith and -Wformat-nonliteral to warning flags.
12086 * configure: Regenerate.
12087
120882010-08-26 Pedro Alves <pedro@codesourcery.com>
12089
12090 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12091
120922010-08-26 Pedro Alves <pedro@codesourcery.com>
12093
12094 * gdbreplay.c (remote_error): New.
12095 (gdbchar): New.
12096 (expect): Use gdbchar. Check for error reading from GDB.
12097 Clarify sync error output.
12098 (play): Check for errors writing to GDB.
12099 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12100 * remote-utils.c (getpkt): Check for errors writing to the remote
12101 descriptor.
12102
121032010-08-25 Pedro Alves <pedro@codesourcery.com>
12104
12105 * linux-low.c (linux_wait_1): Move non-debugging code out of
12106 `debug_threads' control.
12107
121082010-08-25 Pedro Alves <pedro@codesourcery.com>
12109
12110 * linux-low.c (linux_wait_1): Don't set last_status here.
12111 * server.c (push_event, queue_stop_reply_callback): Assert we're
12112 not pushing a TARGET_WAITKIND_IGNORE event.
12113 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12114 (myresume, handle_target_event): Set the thread's last_resume_kind
12115 and last_status from the target returned status.
12116
121172010-08-25 Pedro Alves <pedro@codesourcery.com>
12118
12119 PR threads/10729
12120
12121 * linux-x86-low.c (update_debug_registers_callback): New.
12122 (i386_dr_low_set_addr): Use it.
12123 (i386_dr_low_get_addr): New.
12124 (i386_dr_low_set_control): Use update_debug_registers_callback.
12125 (i386_dr_low_get_control): New.
12126 (i386_dr_low_get_status): Adjust.
12127 * linux-low.c (linux_stop_lwp): New.
12128 * linux-low.h (linux_stop_lwp): Declare.
12129
12130 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12131 argument instead of a i386_debug_reg_state.
12132 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12133 a i386_debug_reg_state.
12134 (i386_insert_aligned_watchpoint): Adjust.
12135 (i386_remove_aligned_watchpoint): Adjust.
12136 (i386_low_stopped_data_address): Read the debug registers from the
12137 inferior instead of from the mirrors.
12138 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12139 (i386_dr_low_get_addr): Declare.
12140 (i386_dr_low_get_control): Declare.
12141 (i386_dr_low_get_status): Change prototype.
12142
12143 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12144 (i386_dr_low_get_addr): New.
12145 (i386_dr_low_get_control): New.
12146 (i386_dr_low_get_status): Adjust prototype. Return
12147 dr_status_mirror.
12148 (i386_initial_stuff): Clear dr_status_mirror and
12149 dr_control_mirror.
12150 (i386_get_thread_context): Adjust.
12151 (i386_set_thread_context): Adjust.
12152 (i386_thread_added): Adjust.
12153
121542010-08-24 Pedro Alves <pedro@codesourcery.com>
12155
12156 * linux-low.h (linux_thread_area): Delete declaration.
12157
121582010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12159
12160 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12161 after its termination.
12162
121632010-08-09 Pedro Alves <pedro@codesourcery.com>
12164
12165 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12166 (gdb_wants_all_stopped): Delete.
12167 (linux_wait_1): Don't call them.
12168 * server.c (handle_v_cont): Tag all threads as want-stopped.
12169 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12170 stopped as "client-wants-stopped".
12171
121722010-07-31 Pedro Alves <pedro@codesourcery.com>
12173
12174 * Makefile.in (signals_h): New.
12175 (server_h): Depend on it.
12176 (server.o): Don't depend on $(signals_def).
12177 (signals.o): Depend on $(signals_def).
12178
121792010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12180
12181 * Makefile.in (signals_def): New.
12182 (server_h): Append include/gdb/signals.h and signals_def.
12183 (server.o): Append signals_def.
12184
121852010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12186
12187 * server.c (handle_target_event): Use target_signal_to_host for
12188 resume_info.sig initialization.
12189 * target.h (struct thread_resume) <sig>: New comment.
12190
121912010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12192
12193 * server.c (handle_query): strcpy() the returned string from paddress()
12194 instead of sprintf().
12195 * utils.c (paddress): Return phex_nz().
12196
121972010-07-07 Joel Brobecker <brobecker@adacore.com>
12198
12199 * server.c (handle_v_cont): Call mourn_inferior if process
12200 just exited.
12201 (myresume): Likewise.
12202
122032010-07-01 Pedro Alves <pedro@codesourcery.com>
12204
12205 Static tracepoints, and integration with UST.
12206
12207 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12208 * mem-break.c (uninsert_all_breakpoints)
12209 (reinsert_all_breakpoints): New.
12210 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12211 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12212 (gdb_agent_ust_loaded, helper_thread_id)
12213 (gdb_agent_helper_thread_id): New macros.
12214 (struct ipa_sym_addresses): Add addr_ust_loaded,
12215 addr_helper_thread_id, addr_cmd_buf.
12216 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12217 (in_process_agent_loaded_ust): New.
12218 (write_e_ust_not_loaded): New.
12219 (maybe_write_ipa_ust_not_loaded): New.
12220 (struct collect_static_trace_data_action): New.
12221 (enum tracepoint_type) <static_tracepoint>: New.
12222 (struct tracepoint) <handle>: Mention static tracepoints.
12223 (struct static_tracepoint_ctx): New.
12224 (CMD_BUF_SIZE): New.
12225 (add_tracepoint_action): Handle static tracepoint actions.
12226 (unprobe_marker_at): New.
12227 (clear_installed_tracepoints): Handle static tracepoints.
12228 (cmd_qtdp): Handle static tracepoints.
12229 (probe_marker_at): New.
12230 (cmd_qtstart): Handle static tracepoints.
12231 (response_tracepoint): Handle static tracepoints.
12232 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12233 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12234 (get_context_regcache): Handle static tracepoints.
12235 (do_action_at_tracepoint): Handle static tracepoint actions.
12236 (traceframe_find_block_type): Handle static trace data blocks.
12237 (traceframe_read_sdata): New.
12238 (download_tracepoints): Download static tracepoint actions.
12239 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12240 (GDB_PROBE_NAME): New.
12241 (ust_ops): New.
12242 (GET_UST_SYM): New.
12243 (USTF): New.
12244 (dlsym_ust): New.
12245 (ust_marker_to_static_tracepoint): New.
12246 (gdb_probe): New.
12247 (collect_ust_data_at_tracepoint): New.
12248 (gdb_ust_probe): New.
12249 (UNIX_PATH_MAX, SOCK_DIR): New.
12250 (gdb_ust_connect_sync_socket): New.
12251 (resume_thread, stop_thread): New.
12252 (run_inferior_command): New.
12253 (init_named_socket): New.
12254 (gdb_ust_socket_init): New.
12255 (cstr_to_hexstr): New.
12256 (next_st): New.
12257 (first_marker, next_marker): New.
12258 (response_ust_marker): New.
12259 (cmd_qtfstm, cmd_qtsstm): New.
12260 (unprobe_marker_at, probe_marker_at): New.
12261 (cmd_qtstmat, gdb_ust_thread): New.
12262 (gdb_ust_init): New.
12263 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12264 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12265 (ST_REGENTRY): New.
12266 (x86_64_st_collect_regmap): New.
12267 (X86_64_NUM_ST_COLLECT_GREGS): New.
12268 (AMD64_RIP_REGNUM): New.
12269 (supply_static_tracepoint_registers): New.
12270 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12271 (ST_REGENTRY): New.
12272 (i386_st_collect_regmap): New.
12273 (i386_NUM_ST_COLLECT_GREGS): New.
12274 (supply_static_tracepoint_registers): New.
12275 * server.c (handle_query): Handle qXfer:statictrace:read.
12276 <qSupported>: Report support for StaticTracepoints, and
12277 qXfer:statictrace:read features.
12278 * server.h (traceframe_read_sdata)
12279 (supply_static_tracepoint_registers): Declare.
12280 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12281 (unpack_varlen_hex): Include in IPA build.
12282 * Makefile.in (ustlibs, ustinc): New.
12283 (IPA_OBJS): Add remote-utils-ipa.o.
12284 ($(IPA_LIB)): Link -ldl and -lpthread.
12285 (UST_CFLAGS): New.
12286 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12287 * config.in, configure: Regenerate.
12288
122892010-06-20 Ian Lance Taylor <iant@google.com>
12290 Pedro Alves <pedro@codesourcery.com>
12291
12292 * linux-x86-low.c (always_true): Delete.
12293 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12294 trying to fool the compiler with always_true.
12295
122962010-06-20 Pedro Alves <pedro@codesourcery.com>
12297
12298 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12299 conditions in gdbserver.
12300
123012010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12302
12303 * spu-low.c (spu_read_memory): Wrap around local store limit.
12304 (spu_write_memory): Likewise.
12305
123062010-06-15 Pedro Alves <pedro@codesourcery.com>
12307
12308 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12309 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12310 LONGEST uses.
12311 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12312 uses.
12313 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12314 uses with LONGEST uses.
12315
123162010-06-14 Stan Shebs <stan@codesourcery.com>
12317 Pedro Alves <pedro@codesourcery.com>
12318
12319 Bytecode compiler.
12320
12321 * linux-x86-low.c: Include limits.h.
12322 (add_insns): New.
12323 (always_true): New.
12324 (EMIT_ASM): New.
12325 (EMIT_ASM32): New.
12326 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12327 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12328 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12329 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12330 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12331 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12332 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12333 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12334 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12335 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12336 (amd64_emit_void_call_2): New.
12337 (amd64_emit_ops): New.
12338 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12339 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12340 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12341 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12342 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12343 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12344 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12345 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12346 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12347 (i386_emit_stack_adjust, i386_emit_int_call_1)
12348 (i386_emit_void_call_2): New.
12349 (i386_emit_ops): New.
12350 (x86_emit_ops): New.
12351 (the_low_target): Install x86_emit_ops.
12352 * server.h (struct emit_ops): New.
12353 (get_raw_reg_func_addr): Declare.
12354 (current_insn_ptr, emit_error): Declare.
12355 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12356 (set_trace_state_variable_value): New defines.
12357 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12358 addr_get_trace_state_variable_value and
12359 addr_set_trace_state_variable_value.
12360 (symbol_list): New fields for get_raw_reg,
12361 get_trace_state_variable_value and set_trace_state_variable_value.
12362 (condfn): New typedef.
12363 (struct tracepoint): New field `compiled_cond'.
12364 (do_action_at_tracepoint): Clear compiled_cond.
12365 (get_trace_state_variable_value, set_trace_state_variable_value):
12366 Export in the IPA.
12367 (condition_true_at_tracepoint): If there's a compiled condition,
12368 run that.
12369 (current_insn_ptr, emit_error): New globals.
12370 (struct bytecode_address): New.
12371 (get_raw_reg_func_addr): New.
12372 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12373 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12374 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12375 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12376 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12377 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12378 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12379 (compile_tracepoint_condition, compile_bytecodes): New.
12380 * target.h (emit_ops): Forward declare.
12381 (struct target_ops): New field emit_ops.
12382 (target_emit_ops): New.
12383 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12384 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12385 * linux-low.c (linux_emit_ops): New.
12386 (linux_target_ops): Install it.
12387 * linux-low.h (struct linux_target_ops): New field emit_ops.
12388
123892010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12390
12391 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12392 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12393
123942010-06-01 Pedro Alves <pedro@codesourcery.com>
12395 Stan Shebs <stan@codesourcery.com>
12396
12397 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12398 (all): Depend on $(extra_libraries).
12399 (install-only): Install the IPA.
12400 (IPA_OBJS, IPA_LIB): New.
12401 (clean): Remove the IPA lib.
12402 (IPAGENT_CFLAGS): New.
12403 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12404 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12405 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12406 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12407 * configure.ac: Check for atomic builtins support in the compiler.
12408 (IPA_DEPFILES, extra_libraries): Define.
12409 * configure.srv (ipa_obj): Add description.
12410 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12411 (i[34567]86-*-linux*): Set ipa_obj.
12412 (x86_64-*-linux*): Set ipa_obj.
12413 * linux-low.c (stabilizing_threads): New.
12414 (supports_fast_tracepoints): New.
12415 (linux_detach): Stabilize threads before detaching.
12416 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12417 the lwp is either not stabilizing, or is moving out of a jump pad.
12418 (linux_fast_tracepoint_collecting): New.
12419 (maybe_move_out_of_jump_pad): New.
12420 (enqueue_one_deferred_signal): New.
12421 (dequeue_one_deferred_signal): New.
12422 (linux_wait_for_event_1): If moving out of a jump pad, defer
12423 pending signals to later.
12424 (linux_stabilize_threads): New.
12425 (linux_wait_1): Check if threads need moving out of jump pads, and
12426 do it if so.
12427 (stuck_in_jump_pad_callback): New.
12428 (move_out_of_jump_pad_callback): New.
12429 (lwp_running): New.
12430 (linux_resume_one_lwp): Handle moving out of jump pads.
12431 (linux_set_resume_request): Dequeue deferred signals.
12432 (need_step_over_p): Also step over fast tracepoint jumps.
12433 (start_step_over): Also uninsert fast tracepoint jumps.
12434 (finish_step_over): Also reinsert fast tracepoint jumps.
12435 (linux_install_fast_tracepoint_jump): New.
12436 (linux_target_ops): Install linux_stabilize_threads and
12437 linux_install_fast_tracepoint_jump_pad.
12438 * linux-low.h (linux_target_ops) <get_thread_area,
12439 install_fast_tracepoint_jump_pad>: New fields.
12440 (struct lwp_info) <collecting_fast_tracepoint,
12441 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12442 (linux_get_thread_area): Declare.
12443 * linux-x86-low.c (jump_insn): New.
12444 (x86_get_thread_area): New.
12445 (append_insns): New.
12446 (push_opcode): New.
12447 (amd64_install_fast_tracepoint_jump_pad): New.
12448 (i386_install_fast_tracepoint_jump_pad): New.
12449 (x86_install_fast_tracepoint_jump_pad): New.
12450 (the_low_target): Install x86_get_thread_area and
12451 x86_install_fast_tracepoint_jump_pad.
12452 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12453 (struct fast_tracepoint_jump): New.
12454 (fast_tracepoint_jump_insn): New.
12455 (fast_tracepoint_jump_shadow): New.
12456 (find_fast_tracepoint_jump_at): New.
12457 (fast_tracepoint_jump_here): New.
12458 (delete_fast_tracepoint_jump): New.
12459 (set_fast_tracepoint_jump): New.
12460 (uninsert_fast_tracepoint_jumps_at): New.
12461 (reinsert_fast_tracepoint_jumps_at): New.
12462 (set_breakpoint_at): Use write_inferior_memory.
12463 (uninsert_raw_breakpoint): Use write_inferior_memory.
12464 (check_mem_read): Mask out fast tracepoint jumps.
12465 (check_mem_write): Mask out fast tracepoint jumps.
12466 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12467 (set_fast_tracepoint_jump): Declare.
12468 (delete_fast_tracepoint_jump)
12469 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12470 (reinsert_fast_tracepoint_jumps_at): Declare.
12471 * regcache.c: Don't compile many functions when building the
12472 in-process agent library.
12473 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12474 the register buffer in the heap.
12475 (free_register_cache): If the register buffer isn't owned by the
12476 regcache, don't free it.
12477 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12478 pre-existing register caches.
12479 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12480 type.
12481 (convert_ascii_to_int): : Constify `from' parameter type.
12482 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12483 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12484 the needed buffer in-place.
12485 (relocate_instruction): New.
12486 * server.c (handle_query) <qSymbols>: If the target supports
12487 tracepoints, give it a chance of looking up symbols. Report
12488 support for fast tracepoints.
12489 (handle_status): Stabilize threads.
12490 (process_serial_event): Adjust.
12491 * server.h (struct fast_tracepoint_jump): Forward declare.
12492 (struct process_info) <fast_tracepoint_jumps>: New field.
12493 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12494 (decode_X_packet, decode_M_packet): Adjust.
12495 (relocate_instruction): Declare.
12496 (in_process_agent_loaded): Declare.
12497 (tracepoint_look_up_symbols): Declare.
12498 (struct fast_tpoint_collect_status): Declare.
12499 (fast_tracepoint_collecting): Declare.
12500 (force_unlock_trace_buffer): Declare.
12501 (handle_tracepoint_bkpts): Declare.
12502 (initialize_low_tracepoint)
12503 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12504 * target.h (struct target_ops) <stabilize_threads,
12505 install_fast_tracepoint_jump_pad>: New fields.
12506 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12507 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12508 [HAVE_STDINT_H]: Include stdint.h.
12509 (trace_debug_1): Rename to ...
12510 (trace_vdebug): ... this.
12511 (trace_debug): Rename to ...
12512 (trace_debug_1): ... this. Add `level' parameter.
12513 (trace_debug): New.
12514 (ATTR_USED, ATTR_NOINLINE): New.
12515 (IP_AGENT_EXPORT): New.
12516 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12517 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12518 (about_to_request_buffer_space, trace_buffer_is_full)
12519 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12520 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12521 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12522 (traceframe_write_count, traceframes_created)
12523 (trace_state_variables)
12524 New renaming defines.
12525 (struct ipa_sym_addresses): New.
12526 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12527 (symbol_list): New.
12528 (ipa_sym_addrs): New.
12529 (all_tracepoint_symbols_looked_up): New.
12530 (in_process_agent_loaded): New.
12531 (write_e_ipa_not_loaded): New.
12532 (maybe_write_ipa_not_loaded): New.
12533 (tracepoint_look_up_symbols): New.
12534 (debug_threads) [IN_PROCESS_AGENT]: New.
12535 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12536 (UNKNOWN_SIDE_EFFECTS): New.
12537 (stop_tracing): New.
12538 (flush_trace_buffer): New.
12539 (stop_tracing_bkpt): New.
12540 (flush_trace_buffer_bkpt): New.
12541 (read_inferior_integer): New.
12542 (read_inferior_uinteger): New.
12543 (read_inferior_data_pointer): New.
12544 (write_inferior_data_pointer): New.
12545 (write_inferior_integer): New.
12546 (write_inferior_uinteger): New.
12547 (struct collect_static_trace_data_action): Delete.
12548 (enum tracepoint_type): New.
12549 (struct tracepoint) <type>: New field `type'.
12550 <actions_str, step_actions, step_actions_str>: Only include in
12551 GDBserver.
12552 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12553 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12554 (tracepoints): Use IP_AGENT_EXPORT.
12555 (last_tracepoint): Don't include in the IPA.
12556 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12557 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12558 (alloced_trace_state_variables): New.
12559 (trace_state_variables): Use IP_AGENT_EXPORT.
12560 (traceframe_t): Delete unused variable.
12561 (circular_trace_buffer): Don't include in the IPA.
12562 (trace_buffer_start): Delete.
12563 (struct trace_buffer_control): New.
12564 (trace_buffer_free): Delete.
12565 (struct ipa_trace_buffer_control): New.
12566 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12567 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12568 New.
12569 (trace_buffer_ctrl): New.
12570 (TRACE_BUFFER_CTRL_CURR): New.
12571 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12572 Reimplement as macros.
12573 (trace_buffer_wrap): Delete.
12574 (traceframe_write_count, traceframe_read_count)
12575 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12576 (struct tracepoint_hit_ctx) <type>: New field.
12577 (struct fast_tracepoint_ctx): New.
12578 (memory_barrier): New.
12579 (cmpxchg): New.
12580 (record_tracepoint_error): Update atomically in the IPA.
12581 (clear_inferior_trace_buffer): New.
12582 (about_to_request_buffer_space): New.
12583 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12584 updating the same buffer.
12585 (add_tracepoint): Default the tracepoint's type to trap
12586 tracepoint, and orig_size to -1.
12587 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12588 internal variables.
12589 (create_trace_state_variable): New parameter `gdb'. Handle it.
12590 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12591 (cmd_qtdp): Handle fast tracepoints.
12592 (cmd_qtdv): Adjust.
12593 (max_jump_pad_size): New.
12594 (gdb_jump_pad_head): New.
12595 (get_jump_space_head): New.
12596 (claim_jump_space): New.
12597 (sort_tracepoints): New.
12598 (MAX_JUMP_SIZE): New.
12599 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12600 IPA.
12601 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12602 support. Upload fast traceframes, and delete internal IPA
12603 breakpoints.
12604 (stop_tracing_handler): New.
12605 (flush_trace_buffer_handler): New.
12606 (cmd_qtstop): Upload fast tracepoints.
12607 (response_tracepoint): Handle fast tracepoints.
12608 (tracepoint_finished_step): Upload fast traceframes. Set the
12609 tracepoint hit context's tracepoint type.
12610 (handle_tracepoint_bkpts): New.
12611 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12612 type. Add comment about fast tracepoints.
12613 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12614 non-existing action_str field.
12615 (get_context_regcache): Handle fast tracepoints.
12616 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12617 to the regcache.
12618 (fast_tracepoint_from_jump_pad_address): New.
12619 (fast_tracepoint_from_ipa_tpoint_address): New.
12620 (collecting_t): New.
12621 (force_unlock_trace_buffer): New.
12622 (fast_tracepoint_collecting): New.
12623 (collecting): New.
12624 (gdb_collect): New.
12625 (write_inferior_data_ptr): New.
12626 (target_tp_heap): New.
12627 (target_malloc): New.
12628 (download_agent_expr): New.
12629 (UALIGN): New.
12630 (download_tracepoints): New.
12631 (download_trace_state_variables): New.
12632 (upload_fast_traceframes): New.
12633 (IPA_FIRST_TRACEFRAME): New.
12634 (IPA_NEXT_TRACEFRAME_1): New.
12635 (IPA_NEXT_TRACEFRAME): New.
12636 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12637 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12638 (gdb_jump_pad_buffer_end): New.
12639 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12640 (initialize_tracepoint): Adjust.
12641 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12642 buffer. Initialize the low module.
12643 * utils.c (PREFIX, TOOLNAME): New.
12644 (malloc_failure): Use PREFIX.
12645 (error): In the IPA, an error causes an exit.
12646 (fatal, warning): Use PREFIX.
12647 (internal_error): Use TOOLNAME.
12648 (NUMCELLS): Increase to 10.
12649 * configure, config.in: Regenerate.
12650
126512010-06-01 Pedro Alves <pedro@codesourcery.com>
12652
12653 * server.c (handle_query) <qSupported>: Do two passes over the
12654 qSupported string to avoid nesting strtok.
12655
126562010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12657
12658 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12659 (CDEPS): New.
12660 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12661 -Wl,--dynamic-list.
12662 * configure: Regenerate.
12663 * proc-service.list: New.
12664
126652010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12666
12667 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12668 New comment.
12669
126702010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12671
12672 * gdbreplay.c (remote_open): Check error return from socket() call by
12673 its equality to -1 not by it being negative.
12674 * remote-utils.c (remote_open): Likewise.
12675
126762010-05-23 Pedro Alves <pedro@codesourcery.com>
12677
12678 * config.h: Regenerate.
12679
126802010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12681
12682 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12683 doesn't provide PTRACE_GET_THREAD_AREA.
12684
126852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12686
12687 * linux-m68k-low.c: Include <asm/ptrace.h>
12688 (ps_get_thread_area): Implement.
12689
126902010-05-03 Doug Evans <dje@google.com>
12691
12692 * event-loop.c (struct callback_event): New struct.
12693 (callback_list): New global.
12694 (append_callback_event, delete_callback_event): New functions.
12695 (process_callback): New function.
12696 (start_event_loop): Call it.
12697 * remote-utils.c (NOT_SCHEDULED): Define.
12698 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12699 moved out of readchar.
12700 (readchar): Rewrite. Call reschedule before returning.
12701 (reset_readchar): New function.
12702 (remote_close): Call it.
12703 (process_remaining, reschedule): New functions.
12704 * server.h (callback_handler_func): New typedef.
12705 (append_callback_event, delete_callback_event): Declare.
12706
127072010-05-03 Pedro Alves <pedro@codesourcery.com>
12708
12709 * proc-service.c (ps_pglobal_lookup): Use
12710 thread_db_look_up_one_symbol.
12711 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12712 parameter. Use it instead of all_symbols_looked_up.
12713 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12714 field.
12715 (all_symbols_looked_up): Don't declare.
12716 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12717 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12718 field.
12719 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12720 Set all_symbols_looked_up here.
12721 (thread_db_look_up_one_symbol): New.
12722 (thread_db_get_tls_address): Adjust.
12723 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12724 thread_db object on the heap, and tentatively set it in the
12725 process structure.
12726 (thread_db_init): Don't set all_symbols_looked_up here.
12727 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12728
127292010-05-03 Pedro Alves <pedro@codesourcery.com>
12730
12731 * linux-low.c (linux_kill, linux_detach): Adjust.
12732 (status_pending_p_callback): Remove redundant statement. Check
12733 for !TARGET_WAITIKIND_IGNORE, instead of
12734 TARGET_WAITKIND_STOPPED.
12735 (handle_tracepoints): Make sure LWP is locked. Adjust.
12736 (linux_wait_for_event_1): Adjust.
12737 (linux_cancel_breakpoints): New.
12738 (unsuspend_one_lwp): New.
12739 (unsuspend_all_lwps): New.
12740 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12741 (send_sigstop_callback): Change return type to int, add new
12742 `except' parameter and handle it.
12743 (suspend_and_send_sigstop_callback): New.
12744 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12745 pass them down. If SUSPEND, also increment the lwp's suspend
12746 count.
12747 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12748 (need_step_over_p): Don't consider suspended LWPs.
12749 (start_step_over): Adjust.
12750 (proceed_one_lwp): Change return type to int, add new `except'
12751 parameter and handle it.
12752 (unsuspend_and_proceed_one_lwp): New.
12753 (proceed_all_lwps): Use find_inferior instead of
12754 for_each_inferior.
12755 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12756 also decrement the suspend count of LWPs. Pass `except' down,
12757 instead of hacking its suspend count.
12758 (linux_pause_all): Add `freeze' parameter. Adjust.
12759 (linux_unpause_all): New.
12760 (linux_target_ops): Install linux_unpause_all.
12761 * server.c (handle_status): Adjust.
12762 * target.h (struct target_ops): New fields `unpause_all' and
12763 `cancel_breakpoints'. Add new parameter to `pause_all'.
12764 (pause_all): Add new `freeze' parameter.
12765 (unpause_all): New.
12766 (cancel_breakpoints): New.
12767 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12768 cancel breakpoints.
12769 (cmd_qtstart): Pause threads.
12770 (stop_tracing): Pause threads, and cancel breakpoints.
12771 * win32-low.c (win32_target_ops): Adjust.
12772
127732010-05-03 Pedro Alves <pedro@codesourcery.com>
12774
12775 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12776 the inferior right away from here...
12777 (linux_wait_1): ... to here, and adjust to check the thread's
12778 last_resume_kind instead of the lwp's step or stop_expected flags.
12779
127802010-05-02 Pedro Alves <pedro@codesourcery.com>
12781
12782 * README: Use consistent `GDB' and `GDBserver' spellings.
12783
127842010-05-02 Pedro Alves <pedro@codesourcery.com>
12785
12786 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12787 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12788 (linux_detach_one_lwp): Assume the lwp is stopped.
12789 (any_thread_of): Delete.
12790 (linux_detach): Stop all lwps here. Don't blindly delete all
12791 breakpoints.
12792 (delete_lwp_callback): New.
12793 (linux_mourn): Delete all lwps of the process that is gone.
12794 (linux_wait_1): Don't delete the last lwp of the process here.
12795 * mem-break.h (mark_breakpoints_out): Declare.
12796 * mem-break.c (mark_breakpoints_out): New.
12797 (free_all_breakpoints): Use it.
12798 * server.c (handle_target_event): If the process is gone, mark
12799 breakpoints out.
12800 * thread-db.c (struct thread_db) <create_bp>: New field.
12801 (thread_db_enable_reporting): Fix prototype. Store a thread event
12802 breakpoint reference in the thread_db struct.
12803 (thread_db_load_search): Clear the thread_db object.
12804 (try_thread_db_load_1): Ditto.
12805 (switch_to_process): New.
12806 (disable_thread_event_reporting): Use it.
12807 (remove_thread_event_breakpoints): New.
12808 (thread_db_detach, thread_db_mourn): Use it.
12809
128102010-05-01 Pedro Alves <pedro@codesourcery.com>
12811
12812 * linux-low.c (linux_enable_event_reporting): New.
12813 (linux_wait_for_event_1, handle_extended_wait): Use it.
12814
128152010-04-30 Pedro Alves <pedro@codesourcery.com>
12816
12817 * linux-low.c (linux_kill_one_lwp, linux_kill)
12818 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12819 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12820 SIGSTOP even if the LWP is stopped.
12821 (send_sigstop_callback): New.
12822 (stop_all_lwps): Use send_sigstop_callback instead.
12823 (linux_resume_one_thread): Adjust.
12824 (proceed_one_lwp): Still proceed an LWP that the client has
12825 requested to stop, if we haven't reported it as stopped yet. Make
12826 sure that LWPs the client want stopped, have a pending SIGSTOP.
12827
128282010-04-26 Doug Evans <dje@google.com>
12829
12830 * server.c (handle_general_set): Make static.
12831
12832 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12833 Print received char after testing for error/eof instead of before.
12834 (input_interrupt): Tweak comment.
12835
128362010-04-23 Doug Evans <dje@google.com>
12837
12838 * server.c (start_inferior): Print inferior argv if --debug.
12839
128402010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12841
12842 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12843 * nto-x86-low.c: Include server.h
12844
128452010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12846
12847 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12848 be consistent with other sources of this directory.
12849 (init_registers_amd64): Correct name of source file of this function
12850 in the comment.
12851
128522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12853
12854 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12855 64-bit executables.
12856
128572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12858
12859 * win32-i386-low.c: Add 64-bit support.
12860 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12861 (init_registers_amd64): Declare.
12862 (mappings): Add 64-bit version of array.
12863 (init_windows_x86): New function.
12864 (the_low_target): Change init_arch field to init_windows_x86.
12865
128662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12867
12868 * win32-low.c: Adapt to support also 64-bit architecture.
12869 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12870 (get_image_name): Use SIZE_T type for local variable `done'.
12871 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12872 (toolhelp_get_dll_name): Idem.
12873 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12874 Use uintptr_t typecast to avoid warning.
12875 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12876 (handle_exception): Use phex_nz to avoid warning.
12877 (win32_wait): Remove unused local variable `process'.
12878
128792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12880
12881 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12882 `amd64-avx.o'.
12883
128842010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12885
12886 * configure.ac: Use `ws2_32' library for srv_mingw.
12887 * configure: Regenerate.
12888 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12889 * remote-utils.c: Likewise.
12890
128912010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12892
12893 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12894 if __x86_64__ is defined.
12895
128962010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12897
12898 * configure: Regenerate.
12899
129002010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12901
12902 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12903 * target.h (target_ops): New get_tib_address field.
12904 * win32-low.h (win32_thread_info): Add thread_local_base field.
12905 * win32-low.c (child_add_thread): Add tlb argument.
12906 Set thread_local_base field to TLB.
12907 (get_child_debug_event): Adapt to child_add_thread change.
12908 (win32_get_tib_address): New function.
12909 (win32_target_ops): Set get_tib_address field to
12910 win32_get_tib_address.
12911 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12912
129132010-04-12 Pedro Alves <pedro@codesourcery.com>
12914
12915 * linux-low.c (linux_mourn): Also remove the process.
12916 * server.c (handle_target_event): Don't remove the process here.
12917 * nto-low.c (nto_mourn): New.
12918 (nto_target_ops): Install it.
12919 * spu-low.c (spu_mourn): New.
12920 (spu_target_ops): Install it.
12921 * win32-low.c (win32_mourn): New.
12922 (win32_target_ops): Install it.
12923
129242010-04-12 Pedro Alves <pedro@codesourcery.com>
12925
12926 * server.h (buffer_xml_printf): Remove redundant `;'.
12927
129282010-04-12 Pedro Alves <pedro@codesourcery.com>
12929
12930 * regcache.c (set_register_cache): Invalidate regcaches before
12931 changing the register cache layout.
12932 (regcache_invalidate_one): Allow a NULL regcache.
12933 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12934 regcaches before changing the register cache layout or the target
12935 regsets.
12936
129372010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12938
12939 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12940 variable warning on Linux/x86-64.
12941
129422010-04-11 Pedro Alves <pedro@codesourcery.com>
12943
12944 GDBserver disconnected tracing support.
12945
12946 * linux-low.c (linux_remove_process): Delete.
12947 (add_lwp): Don't set last_resume_kind here.
12948 (linux_kill): Use `mourn'.
12949 (linux_detach): Use `thread_db_detach', and `mourn'.
12950 (linux_mourn): New.
12951 (linux_attach_lwp_1): Adjust comment.
12952 (linux_attach): last_resume_kind moved the thread_info; adjust.
12953 (status_pending_p_callback): Adjust.
12954 (linux_wait_for_event_1): Adjust.
12955 (count_events_callback, select_singlestep_lwp_callback)
12956 (select_event_lwp_callback, cancel_breakpoints_callback)
12957 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12958 (proceed_one_lwp): Adjust.
12959 (linux_async): Add debug output.
12960 (linux_thread_stopped): New.
12961 (linux_pause_all): New.
12962 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12963 linux_pause_all.
12964 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12965 (thread_db_free): Delete declaration.
12966 (thread_db_detach, thread_db_mourn): Declare.
12967 * thread-db.c (thread_db_init): Use thread_db_mourn.
12968 (thread_db_free): Delete, split in two.
12969 (disable_thread_event_reporting): New.
12970 (thread_db_detach): New.
12971 (thread_db_mourn): New.
12972
12973 * server.h (struct thread_info) <last_resume_kind>: New field.
12974 <attached>: Add comment.
12975 <gdb_detached>: New field.
12976 (handler_func): Change return type to int.
12977 (handle_serial_event, handle_target_event): Ditto.
12978 (gdb_connected): Declare.
12979 (tracing): Delete.
12980 (disconnected_tracing): Declare.
12981 (stop_tracing): Declare.
12982
12983 * server.c (handle_query) <qSupported>: Report support for
12984 disconnected tracing.
12985 (queue_stop_reply_callback): Account for running threads.
12986 (gdb_wants_thread_stopped): New.
12987 (gdb_wants_all_threads_stopped): New.
12988 (gdb_reattached_process): New.
12989 (handle_status): Clear the `gdb_detached' flag of all processes.
12990 In all-stop, stop all threads.
12991 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12992 (process_serial_event): If the remote connection breaks, or if an
12993 exit was forced with "monitor exit", force an event loop exit.
12994 Handle disconnected tracing on detach.
12995 (handle_serial_event): Adjust.
12996 (handle_target_event): If GDB isn't connected, forward events back
12997 to the inferior, unless the last process exited, in which case,
12998 exit gdbserver. Adjust interface.
12999
13000 * remote-utils.c (remote_open): Don't block in accept. Instead
13001 register an event loop source on the listen socket file
13002 descriptor. Refactor bits into ...
13003 (listen_desc): ... this new global.
13004 (gdb_connected): ... this new function.
13005 (enable_async_notification): ... this new function.
13006 (handle_accept_event): ... this new function.
13007 (remote_close): Clear remote_desc.
13008
13009 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13010
13011 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13012 New fields.
13013 (mourn_inferior): Define.
13014 (target_process_qsupported): Avoid the dangling else problem.
13015 (thread_stopped): Define.
13016 (pause_all): Define.
13017 (target_waitstatus_to_string): Declare.
13018 * target.c (target_waitstatus_to_string): New.
13019
13020 * tracepoint.c (tracing): Make extern.
13021 (disconnected_tracing): New.
13022 (stop_tracing): Make extern. Handle tracing stops due to GDB
13023 disconnecting.
13024 (cmd_qtdisconnected): New.
13025 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13026 (handle_tracepoint_general_set): Handle QTDisconnected.
13027
13028 * event-loop.c (event_handler_func): Change return type to int.
13029 (process_event): Bail out if the event handler wants the event
13030 loop to stop.
13031 (handle_file_event): Ditto.
13032 (start_event_loop): Bail out if the event handler wants the event
13033 loop to stop.
13034
13035 * nto-low.c (nto_target_ops): Adjust.
13036 * spu-low.c (spu_wait): Don't remove the process here.
13037 (spu_target_ops): Adjust.
13038 * win32-low.c (win32_wait): Don't remove the process here.
13039 (win32_target_ops): Adjust.
13040
130412010-04-11 Pedro Alves <pedro@codesourcery.com>
13042
13043 * regcache.c (realloc_register_cache): Invalidate inferior's
13044 regcache before recreating it.
13045
130462010-04-09 Pedro Alves <pedro@codesourcery.com>
13047
13048 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13049
130502010-04-09 Stan Shebs <stan@codesourcery.com>
13051 Pedro Alves <pedro@codesourcery.com>
13052
13053 * server.h (LONGEST): New.
13054 (struct thread_info) <while_stepping>: New field.
13055 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13056 Declare.
13057 (initialize_tracepoint, handle_tracepoint_general_set)
13058 (handle_tracepoint_query, tracepoint_finished_step)
13059 (tracepoint_was_hit, release_while_stepping_state_list):
13060 (current_traceframe): Declare.
13061 * server.c (handle_general_set): Handle tracepoint packets.
13062 (read_memory): New.
13063 (write_memory): New.
13064 (handle_search_memory_1): Use read_memory.
13065 (handle_query): Report support for conditional tracepoints, trace
13066 state variables, and tracepoint sources. Handle tracepoint
13067 queries.
13068 (main): Initialize the tracepoints module.
13069 (process_serial_event): Handle traceframe reads/writes.
13070
13071 * linux-low.c (handle_tracepoints): New.
13072 (linux_wait_1): Call it.
13073 (linux_resume_one_lwp): Handle while-stepping.
13074 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13075 (linux_target_ops): Install them.
13076 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13077 New field.
13078 * linux-x86-low.c (x86_supports_tracepoints): New.
13079 (the_low_target). Install it.
13080
13081 * mem-break.h (delete_breakpoint): Declare.
13082 * mem-break.c (delete_breakpoint): Make external.
13083
13084 * target.h (struct target_ops): Add `supports_tracepoints',
13085 `read_pc', and `write_pc' fields.
13086 (target_supports_tracepoints): Define.
13087 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13088 (phex_nz): New.
13089
13090 * regcache.h (struct regcache) <registers_owned>: New field.
13091 (init_register_cache, regcache_cpy): Declare.
13092 (regcache_read_pc, regcache_write_pc): Declare.
13093 (register_cache_size): Declare.
13094 (supply_regblock): Declare.
13095 * regcache.c (init_register_cache): New.
13096 (new_register_cache): Use it.
13097 (regcache_cpy): New.
13098 (register_cache_size): New.
13099 (supply_regblock): New.
13100 (regcache_read_pc, regcache_write_pc): New.
13101
13102 * tracepoint.c: New.
13103
13104 * Makefile.in (OBS): Add tracepoint.o.
13105 (tracepoint.o): New rule.
13106
131072010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13108
13109 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13110 (i386-mmx.o): New.
13111 (i386-mmx.c): Likewise.
13112 (i386-mmx-linux.o): Likewise.
13113 (i386-mmx-linux.c): Likewise.
13114
13115 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13116 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13117 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13118 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13119
13120 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13121 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13122 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13123
131242010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13125
13126 * Makefile.in (clean): Updated.
13127 (i386-avx.o): New.
13128 (i386-avx.c): Likewise.
13129 (i386-avx-linux.o): Likewise.
13130 (i386-avx-linux.c): Likewise.
13131 (amd64-avx.o): Likewise.
13132 (amd64-avx.c): Likewise.
13133 (amd64-avx-linux.o): Likewise.
13134 (amd64-avx-linux.c): Likewise.
13135
13136 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13137 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13138 (srv_amd64_regobj): Add amd64-avx.o.
13139 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13140 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13141 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13142 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13143 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13144 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13145 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13146
13147 * i387-fp.c: Include "i386-xstate.h".
13148 (i387_xsave): New.
13149 (i387_cache_to_xsave): Likewise.
13150 (i387_xsave_to_cache): Likewise.
13151 (x86_xcr0): Likewise.
13152
13153 * i387-fp.h (i387_cache_to_xsave): Likewise.
13154 (i387_xsave_to_cache): Likewise.
13155 (x86_xcr0): Likewise.
13156
13157 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13158 * linux-crisv32-low.c (target_regsets): Likewise.
13159 * linux-m68k-low.c (target_regsets): Likewise.
13160 * linux-mips-low.c (target_regsets): Likewise.
13161 * linux-ppc-low.c (target_regsets): Likewise.
13162 * linux-s390-low.c (target_regsets): Likewise.
13163 * linux-sh-low.c (target_regsets): Likewise.
13164 * linux-sparc-low.c (target_regsets): Likewise.
13165 * linux-xtensa-low.c (target_regsets): Likewise.
13166
13167 * linux-low.c: Include <sys/uio.h>.
13168 (regsets_fetch_inferior_registers): Support nt_type.
13169 (regsets_store_inferior_registers): Likewise.
13170 (linux_process_qsupported): New.
13171 (linux_target_ops): Add linux_process_qsupported.
13172
13173 * linux-low.h (regset_info): Add nt_type.
13174 (linux_target_ops): Add process_qsupported.
13175
13176 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13177 and <sys/uio.h>.
13178 (init_registers_i386_avx_linux): New.
13179 (init_registers_amd64_avx_linux): Likewise.
13180 (xmltarget_i386_linux_no_xml): Likewise.
13181 (xmltarget_amd64_linux_no_xml): Likewise.
13182 (PTRACE_GETREGSET): Likewise.
13183 (PTRACE_SETREGSET): Likewise.
13184 (x86_fill_xstateregset): Likewise.
13185 (x86_store_xstateregset): Likewise.
13186 (use_xml): Likewise.
13187 (x86_linux_update_xmltarget): Likewise.
13188 (x86_linux_process_qsupported): Likewise.
13189 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13190 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13191 init_registers_i386_linux here. Call
13192 x86_linux_update_xmltarget.
13193 (the_low_target): Add x86_linux_process_qsupported.
13194
13195 * server.c (handle_query): Call target_process_qsupported.
13196
13197 * target.h (target_ops): Add process_qsupported.
13198 (target_process_qsupported): New.
13199
132002010-04-03 Pedro Alves <pedro@codesourcery.com>
13201
13202 * inferiors.c (add_thread): Set last_status kind to
13203 TARGET_WAITKIND_IGNORE.
13204 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13205 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13206 (linux_wait_1): Move `thread' local definition to block that uses
13207 it. Don't NULL initialize `event_child'.
13208 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13209 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13210 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13211
132122010-04-01 Pedro Alves <pedro@codesourcery.com>
13213
13214 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13215 an extended waitstatus, or by a watchpoint.
13216 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13217 thread was stepping or has been stopped by a watchpoint.
13218
132192010-04-01 Pedro Alves <pedro@codesourcery.com>
13220
13221 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13222 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13223 of another, then delete the previous, and validate all
13224 breakpoints.
13225 (validate_inserted_breakpoint): New.
13226 (delete_disabled_breakpoints): New.
13227 (validate_breakpoints): New.
13228 (check_mem_read): Validate breakpoints before trusting their
13229 shadow. Delete disabled breakpoints.
13230 (check_mem_write): Validate breakpoints before trusting they
13231 should be inserted. Delete disabled breakpoints.
13232 * mem-break.h (validate_breakpoints):
13233 * server.c (handle_query): Validate breakpoints when we see a
13234 qSymbol query.
13235
132362010-04-01 Pedro Alves <pedro@codesourcery.com>
13237
13238 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13239 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13240 if we could tell there's a GDB breakpoint at stop_pc.
13241 (need_step_over_p): Don't do a step over if we find a GDB
13242 breakpoint at the resume PC.
13243
13244 * mem-break.c (struct raw_breakpoint): New.
13245 (enum bkpt_type): New type `gdb_breakpoint'.
13246 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13247 fields. New field `raw'.
13248 (find_raw_breakpoint_at): New.
13249 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13250 breakpoint instead.
13251 (set_breakpoint_at): Adjust.
13252 (delete_raw_breakpoint): New.
13253 (release_breakpoint): New.
13254 (delete_breakpoint): Rename to...
13255 (delete_breakpoint_1): ... this. Add proc parameter. Use
13256 release_breakpoint. Return ENOENT.
13257 (delete_breakpoint): Reimplement.
13258 (find_breakpoint_at): Delete.
13259 (find_gdb_breakpoint_at): New.
13260 (delete_breakpoint_at): Delete.
13261 (set_gdb_breakpoint_at): New.
13262 (delete_gdb_breakpoint_at): New.
13263 (gdb_breakpoint_here): New.
13264 (set_reinsert_breakpoint): Use release_breakpoint.
13265 (uninsert_breakpoint): Rename to ...
13266 (uninsert_raw_breakpoint): ... this.
13267 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13268 (reinsert_raw_breakpoint): Change parameter type to
13269 raw_breakpoint.
13270 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13271 instead.
13272 (check_breakpoints): Adjust. Use release_breakpoint.
13273 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13274 (breakpoint_inserted_here): Ditto.
13275 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13276 Don't trust the breakpoint's shadow if it is not inserted.
13277 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13278 (delete_all_breakpoints): Adjust.
13279 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13280 use delete_breakpoint_1.
13281
13282 * mem-break.h (breakpoints_supported): Delete declaration.
13283 (set_gdb_breakpoint_at): Declare.
13284 (gdb_breakpoint_here): Declare.
13285 (delete_breakpoint_at): Delete.
13286 (delete_gdb_breakpoint_at): Declare.
13287
13288 * server.h (struct raw_breakpoint): Forward declare.
13289 (struct process_info): New field `raw_breakpoints'.
13290
13291 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13292 breakpoints.
13293
132942010-03-24 Pedro Alves <pedro@codesourcery.com>
13295
13296 * linux-low.c (status_pending_p_callback): Fix comment.
13297 (linux_wait_for_event_1): Move most of the internal breakpoint
13298 handling from here...
13299 (linux_wait_1): ... to here.
13300 (count_events_callback): New.
13301 (select_singlestep_lwp_callback): New.
13302 (select_event_lwp_callback): New.
13303 (cancel_breakpoints_callback): New.
13304 (select_event_lwp): New.
13305 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13306 priority to all LWPs that have had events that should be reported
13307 to the client. Cancel breakpoints when about to reporting the
13308 event to the client, not while stopping lwps. No longer cancel
13309 finished single-steps here.
13310 (cancel_finished_single_step): Delete.
13311 (cancel_finished_single_steps): Delete.
13312
133132010-03-24 Pedro Alves <pedro@codesourcery.com>
13314
13315 * mem-break.c (enum bkpt_type): New.
13316 (struct breakpoint): New field `type'.
13317 (set_breakpoint_at): Change return type to struct breakpoint
13318 pointer. Set type to `other_breakpoint' by default.
13319 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13320 in the breakpoint list.
13321 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13322 (reinsert_breakpoint): Rename to ...
13323 (reinsert_raw_breakpoint): ... this.
13324 (reinsert_breakpoints_at): Adjust.
13325 * mem-break.h (struct breakpoint): Declare.
13326 (set_breakpoint_at): Change return type to struct breakpoint
13327 pointer.
13328
133292010-03-24 Pedro Alves <pedro@codesourcery.com>
13330
13331 * server.c (handle_query): Assign, not compare.
13332
133332010-03-24 Pedro Alves <pedro@codesourcery.com>
13334
13335 Teach linux gdbserver to step-over-breakpoints.
13336
13337 * linux-low.c (can_hardware_single_step): New.
13338 (supports_breakpoints): New.
13339 (handle_extended_wait): If stopping threads, read the stop pc of
13340 the new cloned LWP.
13341 (get_pc): New.
13342 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13343 low target doesn't support retrieving the PC.
13344 (add_lwp): Set last_resume_kind to resume_continue.
13345 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13346 (linux_attach): Don't clear stop_expected. Set the lwp's
13347 last_resume_kind to resume_stop.
13348 (linux_detach_one_lwp): Don't check for removed breakpoints.
13349 (check_removed_breakpoint): Delete.
13350 (status_pending_p): Rename to ...
13351 (status_pending_p_callback): ... this. Don't check for removed
13352 breakpoints. Don't consider threads that are stopped from GDB's
13353 perspective.
13354 (linux_wait_for_lwp): Always read the stop_pc here.
13355 (cancel_breakpoint): New.
13356 (step_over_bkpt): New global.
13357 (linux_wait_for_event_1): Implement stepping over breakpoints.
13358 (gdb_wants_lwp_stopped): New.
13359 (gdb_wants_all_stopped): New.
13360 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13361 single-step traps here. Store the thread's last reported target
13362 wait status.
13363 (send_sigstop): Don't clear stop_expected. Always set it,
13364 instead.
13365 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13366 (cancel_finished_single_step): New.
13367 (cancel_finished_single_steps): New.
13368 (wait_for_sigstop): Don't cancel finished single-step traps here.
13369 (linux_resume_one_lwp): Don't check for removed breakpoints.
13370 Don't set `step' on non-hardware step archs.
13371 (linux_set_resume_request): Ignore resume_stop requests if already
13372 stopping or stopped. Set the lwp's last_resume_kind.
13373 (resume_status_pending_p): Don't check for removed breakpoints.
13374 (need_step_over_p): New.
13375 (start_step_over): New.
13376 (finish_step_over): New.
13377 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13378 requests. Clear the thread's last reported target waitstatus.
13379 Don't use the `suspended' flag. Don't consider pending breakpoints.
13380 (linux_resume): Start a step-over if necessary.
13381 (proceed_one_lwp): New.
13382 (proceed_all_lwps): New.
13383 (unstop_all_lwps): New.
13384 * linux-low.h (struct lwp_info): Rewrite comment for the
13385 `suspended' flag. Add the `stop_pc' field. Delete the
13386 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13387 Add `'last_resume_kind' and `need_step_over' fields.
13388 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13389 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13390 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13391 (set_raw_breakpoint_at): New.
13392 (set_breakpoint_at): Rewrite to use it.
13393 (reinsert_breakpoint_handler): Delete.
13394 (set_reinsert_breakpoint): New.
13395 (reinsert_breakpoint_by_bp): Delete.
13396 (delete_reinsert_breakpoints): New.
13397 (uninsert_breakpoint): Rewrite.
13398 (uninsert_breakpoints_at): New.
13399 (reinsert_breakpoint): Rewrite.
13400 (reinsert_breakpoints_at): New.
13401 (check_breakpoints): Rewrite.
13402 (breakpoint_here): New.
13403 (breakpoint_inserted_here): New.
13404 (check_mem_read): Adjust.
13405 * mem-break.h (breakpoints_supported, breakpoint_here)
13406 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13407 (reinsert_breakpoint_by_bp): Delete declaration.
13408 (delete_reinsert_breakpoints): Declare.
13409 (reinsert_breakpoint): Delete declaration.
13410 (reinsert_breakpoints_at): Declare.
13411 (uninsert_breakpoint): Delete declaration.
13412 (uninsert_breakpoints_at): Declare.
13413 (check_breakpoints): Adjust prototype.
13414 * server.h: Adjust include order.
13415 (struct thread_info): Declare here. Add a `last_status' field.
13416
134172010-03-23 Michael Snyder <msnyder@vmware.com>
13418
13419 * server.c (crc32): New function.
13420 (handle_query): Add handling for 'qCRC:' request.
13421
134222010-03-23 Pedro Alves <pedro@codesourcery.com>
13423
13424 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13425 lwp had been stopped by a watchpoint.
13426
134272010-03-16 Pedro Alves <pedro@codesourcery.com>
13428
13429 * server.h (internal_error): Declare.
13430 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13431 * utils.c (internal_error): New function.
13432
134332010-03-15 Andreas Schwab <schwab@redhat.com>
13434
13435 * configure.srv: Fix typo setting srv_regobj.
13436
134372010-03-15 Pedro Alves <pedro@codesourcery.com>
13438
13439 * linux-low.c (fetch_register): Avoid passing a non string literal
13440 format to `error'.
13441 (usr_store_inferior_registers): Ditto.
13442
134432010-03-14 Pedro Alves <pedro@codesourcery.com>
13444
13445 * linux-low.c (linux_write_memory): Bail out early if peeking
13446 memory failed.
13447
134482010-03-14 Pedro Alves <pedro@codesourcery.com>
13449
13450 * linux-low.h (struct lwp_info): New fields
13451 `stopped_by_watchpoint' and `stopped_data_address'.
13452 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13453 here, and cache them in the lwp object.
13454 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13455 directly.
13456 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13457 field.
13458 (linux_stopped_by_watchpoint): Rewrite.
13459 (linux_stopped_data_address): Rewrite.
13460
134612010-03-06 Simo Melenius <simo.melenius@iki.fi>
13462
13463 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13464 switching the current inferior, not before.
13465
134662010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13467
13468 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13469 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13470 i386-linux.c and amd64-linux.c.
13471 (reg-i386.o): Removed.
13472 (reg-i386.c): Likewise.
13473 (reg-i386-linux.o): Likewise.
13474 (reg-i386-linux.c): Likewise.
13475 (reg-x86-64.o): Likewise.
13476 (reg-x86-64.c): Likewise.
13477 (reg-x86-64-linux.o): Likewise.
13478 (reg-x86-64-linux.c): Likewise.
13479 (i386.o): New.
13480 (i386.c): Likewise.
13481 (i386-linux.o): Likewise.
13482 (i386-linux.c): Likewise.
13483 (amd64.o): Likewise.
13484 (amd64.c): Likewise.
13485 (amd64-linux.o): Likewise.
13486 (amd64-linux.c): Likewise.
13487
13488 * configure.srv (srv_i386_regobj): New.
13489 (srv_i386_linux_regobj): Likewise.
13490 (srv_amd64_regobj): Likewise.
13491 (srv_amd64_linux_regobj): Likewise.
13492 (srv_i386_32bit_xmlfiles): Likewise.
13493 (srv_i386_64bit_xmlfiles): Likewise.
13494 (srv_i386_xmlfiles): Likewise.
13495 (srv_amd64_xmlfiles): Likewise.
13496 (srv_i386_linux_xmlfiles): Likewise.
13497 (srv_amd64_linux_xmlfiles): Likewise.
13498 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13499 srv_xmlfiles to $srv_i386_xmlfiles.
13500 (i[34567]86-*-mingw32ce*): Likewise.
13501 (i[34567]86-*-mingw*): Likewise.
13502 (i[34567]86-*-nto*): Likewise.
13503 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13504 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13505 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13506 (x86_64-*-linux*): Likewise.
13507
13508 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13509 (init_registers_amd64_linux): New.
13510 (x86_arch_setup): Replace init_registers_x86_64_linux with
13511 init_registers_amd64_linux.
13512
135132010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13514
13515 * configure.ac: Check for libdl. If it is not available link against
13516 static libthread_db.
13517 * configure: Regenerate.
13518
135192010-02-22 Pedro Alves <pedro@codesourcery.com>
13520
13521 PR9605
13522
13523 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13524 handing a read watchpoint.
13525 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13526
135272010-02-12 Doug Evans <dje@google.com>
13528
13529 * linux-low.c (linux_supports_tracefork_flag): Document.
13530 (linux_look_up_symbols): Add comment.
13531
135322010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13533
13534 * regcache.c (supply_register): Clear regcache if buf is NULL.
13535
135362010-02-02 Nicolas Roche <roche@sourceware.org>
13537 Joel Brobecker <brobecker@adacore.com>
13538
13539 * inferiors.c (find_inferior): Add function documentation.
13540 (unloaded_dll): Handle the case where the unloaded dll has not
13541 been previously registered in the dll list.
13542
135432010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13544
13545 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13546 (thumb2_breakpoint): New.
13547 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13548
135492010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13550
13551 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13552 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13553 breakpoints.
13554
135552010-01-21 Pedro Alves <pedro@codesourcery.com>
13556
13557 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13558
135592010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13560
13561 * linux-s390-low.c (s390_collect_ptrace_register)
13562 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13563
135642010-01-21 Doug Evans <dje@google.com>
13565
13566 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13567 (PTRACE_ARG4_TYPE): New macro.
13568 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13569 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13570 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13571 (usr_store_inferior_registers): Ditto.
13572 (linux_read_memory, linux_write_memory): Ditto.
13573 (linux_test_for_tracefork): Ditto.
13574
13575 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13576 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13577
135782010-01-21 Pedro Alves <pedro@codesourcery.com>
13579
13580 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13581 target.
13582
135832010-01-21 Pedro Alves <pedro@codesourcery.com>
13584
13585 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13586 prototype to take a regcache. Adjust.
13587
135882010-01-20 Pedro Alves <pedro@codesourcery.com>
13589
13590 * regcache.h (struct thread_info): Forward declare.
13591 (struct regcache): New.
13592 (new_register_cache): Adjust prototype.
13593 (get_thread_regcache): Declare.
13594 (free_register_cache): Adjust prototype.
13595 (registers_to_string, registers_from_string): Ditto.
13596 (supply_register, supply_register_by_name, collect_register)
13597 (collect_register_as_string, collect_register_by_name): Ditto.
13598 * regcache.c (struct inferior_regcache_data): Delete.
13599 (get_regcache): Rename to ...
13600 (get_thread_regcache): ... this. Adjust. Switch inferior before
13601 fetching registers.
13602 (regcache_invalidate_one): Adjust.
13603 (regcache_invalidate): Fix prototype.
13604 (new_register_cache): Return the new register cache.
13605 (free_register_cache): Change prototype.
13606 (realloc_register_cache): Adjust.
13607 (registers_to_string): Change prototype to take a regcache. Adjust.
13608 (registers_from_string): Ditto.
13609 (register_data): Ditto.
13610 (supply_register): Ditto.
13611 (supply_register_by_name): Ditto.
13612 (collect_register): Ditto.
13613 (collect_register_as_string): Ditto.
13614 (collect_register_by_name): Ditto.
13615 * server.c (process_serial_event): Adjust.
13616 * linux-low.h (regset_fill_func, regset_store_func): Change
13617 prototype.
13618 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13619 Change prototype.
13620 * linux-low.c (get_stop_pc): Adjust.
13621 (check_removed_breakpoint): Adjust.
13622 (linux_wait_for_event): Adjust.
13623 (linux_resume_one_lwp): Adjust.
13624 (fetch_register): Add regcache parameter. Adjust.
13625 (usr_store_inferior_registers): Ditto.
13626 (regsets_fetch_inferior_registers): Ditto.
13627 (regsets_store_inferior_registers): Ditto.
13628 (linux_fetch_registers, linux_store_registers): Ditto.
13629 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13630 regcache. Adjust.
13631 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13632 Ditto.
13633 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13634 prototype to take a regcache.
13635 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13636 * remote-utils.c (convert_ascii_to_int, outreg)
13637 (prepare_resume_reply): Change prototype to take a regcache.
13638 Adjust.
13639 * target.h (struct target_ops) <fetch_registers, store_registers>:
13640 Change prototype to take a regcache.
13641 (fetch_inferior_registers, store_inferior_registers): Change
13642 prototype to take a regcache. Adjust.
13643 * proc-service.c (ps_lgetregs): Adjust.
13644 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13645 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13646 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13647 take a regcache. Adjust.
13648 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13649 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13650 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13651 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13652 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13653 (cris_cannot_fetch_register):
13654 (cris_breakpoint_at): Change prototype to take a regcache.
13655 Adjust.
13656 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13657 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13658 to take a regcache. Adjust.
13659 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13660 Adjust.
13661 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13662 take a regcache. Adjust.
13663 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13664 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13665 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13666 * linux-mips-low.c (mips_get_pc):
13667 (mips_set_pc): Change prototype to take a regcache. Adjust.
13668 (mips_reinsert_addr): Adjust.
13669 (mips_collect_register): Change prototype to take a regcache.
13670 Adjust.
13671 (mips_supply_register):
13672 (mips_collect_register_32bit, mips_supply_register_32bit)
13673 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13674 (mips_store_fpregset): Ditto.
13675 * linux-ppc-low.c (ppc_supply_ptrace_register)
13676 (ppc_supply_ptrace_register): Ditto.
13677 (parse_spufs_run): Adjust.
13678 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13679 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13680 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13681 take a regcache. Adjust.
13682 * linux-s390-low.c (s390_collect_ptrace_register)
13683 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13684 (s390_set_pc): Change prototype to take a regcache. Adjust.
13685 (s390_arch_setup): Adjust.
13686 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13687 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13688 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13689 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13690 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13691 regcache. Adjust.
13692 (sparc_breakpoint_at): Adjust.
13693 * linux-xtensa-low.c (xtensa_fill_gregset):
13694 (xtensa_store_gregset):
13695 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13696 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13697 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13698 prototype to take a regcache. Adjust.
13699 * win32-arm-low.c (arm_fetch_inferior_register)
13700 (arm_store_inferior_register): Change prototype to take a
13701 regcache. Adjust.
13702 * win32-i386-low.c (i386_fetch_inferior_register)
13703 (i386_store_inferior_register): Change prototype to take a
13704 regcache. Adjust.
13705 * win32-low.c (child_fetch_inferior_registers)
13706 (child_store_inferior_registers): Change prototype to take a
13707 regcache. Adjust.
13708 (win32_wait): Adjust.
13709 (win32_fetch_inferior_registers): Change prototype to take a
13710 regcache. Adjust.
13711 (win32_store_inferior_registers): Adjust.
13712 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13713 store_inferior_register>: Change prototype to take a regcache.
13714
137152010-01-20 Doug Evans <dje@google.com>
13716
13717 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13718 #ifdef.
13719 (linux_wait_for_event1, linux_init_signals): Ditto.
13720 (W_STOPCODE): Provide definition if missing.
13721
137222010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13723
13724 * linux-low.c (linux_core_of_thread): New.
13725 (compare_ints, show_process, list_threads): New.
13726 (linux_qxfer_osdata): Report threads and cores.
13727 (linux_target_op): Register linux_core_of_thread.
13728 * remote-utils.c (prepare_resume_reply): Report the core.
13729 (buffer_xml_printf): Support %d specifier.
13730 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13731 New.
13732 (handle_query): Handle qXfer:threads. Announce availability
13733 thereof.
13734 * target.h (struct target_ops): New field core_of_thread.
13735
137362010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13737
13738 * Makefile.in (clean): Remove new generated files.
13739 (reg-s390.o, reg-s390.c): Remove rules.
13740 (reg-s390x.o, reg-s390x.c): Likewise.
13741 (s390-linux32.o, s390-linux32.c): Add rules.
13742 (s390-linux64.o, s390-linux64.c): Likewise.
13743 (s390x-linux64.o, s390x-linux64.c): Likewise.
13744 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13745 * linux-s390-low.c: Include <elf.h>.
13746 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13747 (init_registers_s390): Remove prototype.
13748 (init_registers_s390x): Likewise.
13749 (init_registers_s390_linux32): Add prototype.
13750 (init_registers_s390_linux64): Likewise.
13751 (init_registers_s390x_linux64): Likewise.
13752 (s390_num_regs_3264): New define.
13753 (s390_regmap_3264): New global variable.
13754 (s390_cannot_fetch_register): Remove obsolete check.
13755 (s390_cannot_store_register): Likewise.
13756 (s390_collect_ptrace_register): Handle upper/lower register halves.
13757 (s390_supply_ptrace_register): Likewise.
13758 (s390_fill_gregset): Update to register number changes.
13759 (s390_get_hwcap): New routine.
13760 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13761 Install appropriate regmap and register set.
13762
137632010-01-01 Joel Brobecker <brobecker@adacore.com>
13764
13765 * server.c (gdbserver_version): Update copyright year to 2010.
13766 * gdbreplay.c (gdbreplay_version): Likewise.
13767
137682009-12-28 Doug Evans <dje@google.com>
13769
13770 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13771 elf/external.h. Include <elf.h> instead but only if necessary.
13772
137732009-12-28 Pedro Alves <pedro@codesourcery.com>
13774
13775 * linux-low.c (linux_remove_process): Remove `detaching'
13776 parameter. Don't release/detach from thread_db here.
13777 (linux_kill): Release/detach from thread_db here, ...
13778 (linux_detach): ... and here, before actually detaching.
13779 (linux_wait_1): ... and here, when a process exits.
13780 * thread-db.c (any_thread_of): New.
13781 (thread_db_free): Switch the current inferior to a thread of the
13782 passed in process.
13783
137842009-12-21 Doug Evans <dje@google.com>
13785
13786 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13787
13788 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13789 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13790 warning ifndef __NR_tkill. Move setting of errno there too.
13791 Delete unnecessary resetting of errno after syscall.
13792 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13793
13794 * configure.ac: Check for dladdr.
13795 * config.in: Regenerate.
13796 * configure: Regenerate.
13797 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13798 (try_thread_db_load): Update.
13799
13800 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13801
138022009-12-18 Doug Evans <dje@google.com>
13803
13804 * event-loop.c: Include unistd.h if it exists.
13805
13806 * linux-low.c (my_waitpid): Move definition away from being in
13807 between linux_tracefork_child/linux_test_for_tracefork.
13808
13809 * gdb_proc_service.h (psaddr_t): Fix type.
13810 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13811 signature to match glibc.
13812
138132009-12-16 Doug Evans <dje@google.com>
13814
13815 * linux-low.c (linux_read_memory): Fix argument to read.
13816
138172009-11-26 Pedro Alves <pedro@codesourcery.com>
13818
13819 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13820 events, don't leave current_inferior pointing at null.
13821
138222009-11-26 Pedro Alves <pedro@codesourcery.com>
13823
13824 * win32-low.c (LOG): Delete.
13825 (OUTMSG): Output to stderr.
13826 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13827 on compile time LOG macro.
13828 (win32_wait): Fix debug output.
13829
138302009-11-26 Pedro Alves <pedro@codesourcery.com>
13831
13832 * win32-low.c (win32_add_one_solib): If the dll name is
13833 "ntdll.dll", prepend the system directory to the dll path.
13834
138352009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13836
13837 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13838
138392009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13840 Vladimir Prus <vladimir@codesourcery.com>
13841
13842 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13843 * configure.ac: Check for __mcoldfire__ and set
13844 gdb_cv_m68k_is_coldfire.
13845 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13846 reg-cf.o and reg-m68k.o.
13847 * configure: Regenerated.
13848
138492009-11-16 Pedro Alves <pedro@codesourcery.com>
13850
13851 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13852 Pass it to thread_db_free.
13853 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13854 proper `detaching' argument to linux_remove_process.
13855 * linux-low.h (thread_db_free): Add `detaching' parameter.
13856 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13857 to thread_db_free.
13858 (thread_db_free): Add `detaching' parameter. Only
13859 call td_ta_clear_event if detaching from process.
13860
138612009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13862
13863 * thread-db.c (thread_db_free): Fix typo.
13864
138652009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13866
13867 PR gdb/10838
13868 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13869
138702009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13871
13872 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13873 with an i686 compiler.
13874 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13875 needed.
13876 * configure: Rebuilt.
13877
138782009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13879
13880 PR gdb/10783
13881
13882 * server.c (handle_search_memory_1): Correct read_addr initialization
13883 in loop for searching subsequent chunks.
13884
138852009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13886
13887 * configure.ac: New --with-libthread-db option.
13888 * thread-db.c: Allow direct dependence on libthread_db.
13889 (thread_db_free): Adjust.
13890 * config.in: Regenerate.
13891 * configure: Likewise.
13892
138932009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13894
13895 PR gdb/10757
13896 * thread-db.c (attach_thread): New function.
13897 (maybe_attach_thread): Return success/failure.
13898 (find_new_threads_callback): Adjust.
13899 (thread_db_find_new_threads): Loop until no new threads.
13900
139012009-10-13 Pedro Alves <pedro@codesourcery.com>
13902
13903 * proc-service.c (ps_lgetregs): Formatting.
13904
139052009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13906
13907 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13908 * configure.ac: Adjust.
13909 * linux-low.h (struct process_info_private): Move members to struct
13910 thread_db.
13911 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13912 * linux-low.c (linux_remove_process): Adjust.
13913 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13914 * server.c (handle_query): Move code ...
13915 (handle_monitor_command): ... here. New function.
13916 * target.h (struct target_ops): New member.
13917 * thread-db.c (struct thread_db): New.
13918 (libthread_db_search_path): New variable.
13919 (thread_db_create_event, thread_db_enable_reporting)
13920 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13921 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13922 (try_thread_db_load_1, dladdr_to_soname): New functions.
13923 (try_thread_db_load, thread_db_load_search): New functions.
13924 (thread_db_init): Search for libthread_db.
13925 (thread_db_free): New function.
13926 (thread_db_handle_monitor_command): Likewise.
13927 * config.in: Regenerate.
13928 * configure: Regenerate.
13929
139302009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13931
13932 * spu-low.c (spu_kill): Wait for inferior to terminate.
13933 Call clear_inferiors.
13934 (spu_detach): Call clear_inferiors.
13935
139362009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13937
13938 * aclocal.m4: Regenerate.
13939 * config.in: Likewise.
13940 * configure: Likewise.
13941
139422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13943
13944 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13945 (parse_spufs_run): New function.
13946 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13947 (ppc_breakpoint_at): Handle SPU breakpoints.
13948
139492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13950
13951 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13952 (SPUFS_MAGIC): Define.
13953 (spu_enumerate_spu_ids): New function.
13954 (linux_qxfer_spu): New function.
13955 (linux_target_ops): Install linux_qxfer_spu.
13956
139572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13958
13959 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13960 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13961 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13962 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13963 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13964 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13965 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13966 (init_registers_powerpc_cell32l): Add prototype.
13967 (init_registers_powerpc_cell64l): Likewise.
13968 (ppc_arch_setup): Detect Cell/B.E. architecture.
13969
139702009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13971
13972 * Makefile.in (datarootdir): New variable.
13973
139742009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13975
13976 * linux-low.c (linux_write_memory): Update debugging output.
13977 * Makefile.in (clean): Add new descriptions.
13978 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13979 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13980 * configure.srv: Add new files for arm*-*-linux*.
13981 * linux-arm-low.c: Add new declarations.
13982 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13983 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13984 (HWCAP_VFPv3D16): New.
13985 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13986 instead of __IWMMXT__.
13987 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13988 (arm_arch_setup): New.
13989 (target_regsets): Remove #ifdef. Add VFP regset.
13990 (the_low_target): Use arm_arch_setup.
13991
139922009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13993
13994 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13995 the main thread again.
13996
139972009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13998
13999 Adding Neutrino gdbserver.
14000 * configure: Regenerated.
14001 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14002 * configure.srv (i[34567]86-*-nto*): New target.
14003 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14004 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14005 (nto_comctrl) [__QNX__]: New function.
14006 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14007
140082009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14009
14010 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14011 srv_tgtobj.
14012
140132009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14014 Pedro Alves <pedro@codesourcery.com>
14015
14016 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14017 don't support CONTEXT_EXTENDED_REGISTERS.
14018 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14019 (the_low_target): Install them.
14020 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14021 failing with ERROR_PIPE_NOT_CONNECTED.
14022
140232009-06-30 Doug Evans <dje@google.com>
14024 Pierre Muller <muller@ics.u-strasbg.fr>
14025
14026 Add h/w watchpoint support to x86-linux, win32-i386.
14027 * Makefile.in (SFILES): Add i386-low.c
14028 (i386_low_h): Define.
14029 (i386-low.o): Add dependencies.
14030 (linux-x86-low.o): Add i386-low.h dependency.
14031 (win32-i386-low.o): Ditto.
14032 * i386-low.c: New file.
14033 * i386-low.h: New file.
14034 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14035 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14036 * linux-low.c (linux_add_process): Initialize arch_private.
14037 (linux_remove_process): Free arch_private.
14038 (add_lwp): Initialize arch_private.
14039 (delete_lwp): Free arch_private.
14040 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14041 provided.
14042 * linux-low.h (process_info_private): New member arch_private.
14043 (lwp_info): New member arch_private.
14044 (linux_target_ops): New members new_process, new_thread,
14045 prepare_to_resume.
14046 (ptid_of): New macro.
14047 * linux-x86-low.c: Include stddef.h, i386-low.h.
14048 (arch_process_info): New struct.
14049 (arch_lwp_info): New struct.
14050 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14051 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14052 (i386_dr_low_get_status): New function.
14053 (x86_insert_point, x86_remove_point): New functions.
14054 (x86_stopped_by_watchpoint): New function.
14055 (x86_stopped_data_address): New function.
14056 (x86_linux_new_process, x86_linux_new_thread): New functions.
14057 (x86_linux_prepare_to_resume): New function.
14058 (the_low_target): Add entries for insert_point, remove_point,
14059 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14060 prepare_to_resume.
14061 * server.c (debug_hw_points): New global.
14062 (monitor_show_help): Document set debug-hw-points.
14063 (handle_query): Process "set debug-hw-points".
14064 * server.h (debug_hw_points): Declare.
14065 (paddress): Declare.
14066 * utils.c (NUMCELLS, CELLSIZE): New macros.
14067 (get_sell, xsnprintf, paddress): New functions.
14068 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14069 remove_point, stopped_by_watchpoint, stopped_data_address.
14070 * win32-i386-low.c: Include i386-low.h.
14071 (debug_reg_state): Replaces dr.
14072 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14073 (i386_dr_low_get_status): New function.
14074 (i386_insert_point, i386_remove_point): New functions.
14075 (i386_stopped_by_watchpoint): New function.
14076 (i386_stopped_data_address): New function.
14077 (i386_initial_stuff): Update.
14078 (get_thread_context,set_thread_context,i386_thread_added): Update.
14079 (the_low_target): Add entries for insert_point,
14080 remove_point, stopped_by_watchpoint, stopped_data_address.
14081 * win32-low.c (win32_insert_watchpoint): New function.
14082 (win32_remove_watchpoint): New function.
14083 (win32_stopped_by_watchpoint): New function.
14084 (win32_stopped_data_address): New function.
14085 (win32_target_ops): Add entries for insert_watchpoint,
14086 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14087 * win32-low.h (win32_target_ops): New members insert_point,
14088 remove_point, stopped_by_watchpoint, stopped_data_address.
14089
140902009-06-25 Pedro Alves <pedro@codesourcery.com>
14091
14092 * server.c (process_serial_event): Re-return unsupported, not
14093 error, if the type isn't recognized. Re-allow supporting only
14094 insert or remove packets. Also call require_running for
14095 breakpoints. Add missing break statement to default case. Tidy.
14096 * target.h (struct target_ops): Rename insert_watchpoint to
14097 insert_point, and remove_watchpoint to remove_point.
14098
14099 * linux-low.h (struct linux_target_ops): Likewise.
14100 * linux-low.c (linux_insert_watchpoint): Rename to ...
14101 (linux_insert_point): ... this. Adjust.
14102 (linux_remove_watchpoint): Rename to ...
14103 (linux_remove_point): ... this. Adjust.
14104 (linux_target_ops): Adjust.
14105 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14106 (cris_insert_point): ... this.
14107 (cris_remove_watchpoint): Rename to ...
14108 (cris_remove_point): ... this.
14109 (the_low_target): Adjust.
14110
141112009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14112
14113 * server.c (handle_v_kill): Pass signal_pid to
14114 kill_inferior if multi_process is zero.
14115
141162009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14117
14118 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14119 * target.h (target_ops): Comment for *_watchpoint to make it clear
14120 the functions can get types '0' and '1'.
14121
141222009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14123
14124 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14125 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14126 * regcache.c (get_regcache): Likewise.
14127 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14128 * win32-low.c (child_fetch_inferior_registers): Remove check for
14129 regno 0.
14130
141312009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14132 Pedro Alves <pedro@codesourcery.com>
14133
14134 * target.h (struct target_ops) <supports_multi_process>: New
14135 callback.
14136 (target_supports_multi_process): New.
14137 * server.c (handle_query): Even if GDB reports support, only
14138 enable multi-process if the target also supports it. Report
14139 multi-process support only if the target backend supports it.
14140 * linux-low.c (linux_supports_multi_process): New function.
14141 (linux_target_ops): Install it as target_supports_multi_process
14142 callback.
14143
141442009-05-24 Doug Evans <dje@google.com>
14145
14146 Global renaming of find_thread_pid to find_thread_ptid.
14147 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14148 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14149 All callers updated.
14150
14151 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14152 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14153 directly.
14154
14155 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14156 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14157 (linux_resume_one_lwp): Ditto.
14158
141592009-05-23 Doug Evans <dje@google.com>
14160
14161 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14162 from struct inferior_list_entry * to struct lwp_info *.
14163 All callers updated.
14164
141652009-05-13 Doug Evans <dje@google.com>
14166
14167 * linux-x86-low.c: Don't include assert.h.
14168 (x86_siginfo_fixup): Use fatal, not assert.
14169 (x86_arch_setup): Fix comment.
14170
141712009-05-12 Doug Evans <dje@google.com>
14172
14173 Biarch support for i386/amd64 gdbserver.
14174 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14175 Add linux-x86-low.c.
14176 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14177 (linux-x86-low.o): Add.
14178 * linux-x86-64-low.c: Delete.
14179 * linux-i386-low.c: Delete.
14180 * linux-x86-low.c: New file.
14181 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14182 linux-x86-low.o.
14183 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14184 linux-x86-low.o.
14185 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14186 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14187 (linux_child_pid_to_exec_file): New function.
14188 (elf_64_header_p, elf_64_file_p): New functions.
14189 (siginfo_fixup): New function.
14190 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14191 give target a chance to convert layout.
14192 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14193 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14194
141952009-05-07 Doug Evans <dje@google.com>
14196
14197 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14198 (regsets_store_inferior_registers): Ditto.
14199
142002009-05-06 Pedro Alves <pedro@codesourcery.com>
14201
14202 PR server/10048
14203
14204 * linux-low.c (must_set_ptrace_flags): Delete.
14205 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14206 of the global.
14207 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14208 `lwp->must_set_ptrace_flags' instead.
14209 (linux_wait_for_event_1): Set ptrace options here.
14210 (linux_wait_1): ... not here.
14211
142122009-04-30 Doug Evans <dje@google.com>
14213
14214 * inferiors.c (started_inferior_callback): New function.
14215 (attached_inferior_callback): New function.
14216 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14217 * server.c (print_started_pid, print_attached_pid): New functions.
14218 (detach_or_kill_for_exit): New function.
14219 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14220 * server.h (have_started_inferiors_p): Declare.
14221 (have_attached_inferiors_p): Declare.
14222
14223 * inferiors.c (remove_process): Fix memory leak, free process.
14224 * linux-low.c (linux_remove_process): New function.
14225 (linux_kill): Call it instead of remove_process.
14226 (linux_detach, linux_wait_1): Ditto.
14227
142282009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14229
14230 * configure.srv: Add x86 Windows CE target.
14231
142322009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14233
14234 * inferiors.c (get_thread_process): Make global.
14235 * server.h (get_thread_process): Add prototype.
14236 * thread-db.c (find_one_thread): Use get_thread_process
14237 instead of current_process.
14238 (thread_db_get_tls_address): Do not crash if called when
14239 thread layer is not yet initialized.
14240
142412009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14242
14243 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14244 * spu-low.c (current_tid): Rename to ...
14245 (current_ptid): ... this.
14246 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14247 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14248 ptid_get_lwp (current_ptid) instead of current_tid.
14249 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14250 instead of current_tid. Use find_process_pid to verify pid
14251 argument is valid. Pass proper argument to remove_process.
14252 (spu_thread_alive): Compare current_ptid instead of current_tid.
14253 (spu_resume): Likewise.
14254
142552009-04-02 Pedro Alves <pedro@codesourcery.com>
14256
14257 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14258 variable.
14259
142602009-04-01 Pedro Alves <pedro@codesourcery.com>
14261
14262 Implement the multiprocess extensions, and add linux multiprocess
14263 support.
14264
14265 * server.h (ULONGEST): Declare.
14266 (struct ptid, ptid_t): New.
14267 (minus_one_ptid, null_ptid): Declare.
14268 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14269 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14270 (struct inferior_list_entry): Change `id' type from unsigned from
14271 to ptid_t.
14272 (struct sym_cache, struct breakpoint, struct
14273 process_info_private): Forward declare.
14274 (struct process_info): Declare.
14275 (current_process): Declare.
14276 (all_processes): Declare.
14277 (initialize_inferiors): Declare.
14278 (add_thread): Adjust to use ptid_t.
14279 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14280 (add_process, remove_process, find_thread_pid): Declare.
14281 (find_inferior_id): Adjust to use ptid_t.
14282 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14283 (multi_process): Declare.
14284 (push_event): Adjust to use ptid_t.
14285 (read_ptid, write_ptid): Declare.
14286 (prepare_resume_reply): Adjust to use ptid_t.
14287 (clear_symbol_cache): Declare.
14288 * inferiors.c (all_processes): New.
14289 (null_ptid, minus_one_ptid): New.
14290 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14291 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14292 (add_thread): Change unsigned long to ptid. Remove gdb_id
14293 parameter. Adjust.
14294 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14295 (gdb_id_to_thread): Rename to ...
14296 (find_thread_pid): ... this. Change unsigned long to ptid.
14297 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14298 (loaded_dll, pull_pid_from_list): Adjust.
14299 (add_process, remove_process, find_process_pid)
14300 (get_thread_process, current_process, initialize_inferiors): New.
14301 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14302 (struct target_waitstatus) <related_pid>: Ditto.
14303 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14304 return type to int.
14305 (struct target_ops) <join>: Add `pid' argument.
14306 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14307 (struct target_ops) <wait>: Add `ptid' field. Change return type
14308 to ptid.
14309 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14310 (mywait): Add `ptid' argument. Change return type to ptid_t.
14311 (target_pid_to_str): Declare.
14312 * target.c (set_desired_inferior): Adjust to use ptids.
14313 (mywait): Add new `ptid' argument. Adjust.
14314 (target_pid_to_str): New.
14315 * mem-break.h (free_all_breakpoints): Declare.
14316 * mem-break.c (breakpoints): Delelete.
14317 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14318 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14319 to use per-process breakpoint list.
14320 (free_all_breakpoints): New.
14321 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14322 (symbol_cache, all_symbols_looked_up): Delete.
14323 (hexchars): New.
14324 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14325 read_ptid): New.
14326 (prepare_resume_reply): Change ptid argument's type from unsigned
14327 long to ptid_t. Adjust. Implement W;process and X;process.
14328 (free_sym_cache, clear_symbol_cache): New.
14329 (look_up_one_symbol): Adjust to per-process symbol cache. *
14330 * server.c (cont_thread, general_thread, step_thread): Change type
14331 to ptid_t.
14332 (attached): Delete.
14333 (multi_process): New.
14334 (last_ptid): Change type to ptid_t.
14335 (struct vstop_notif) <ptid>: Change type to ptid_t.
14336 (queue_stop_reply, push_event): Change `ptid' argument's type to
14337 ptid_t.
14338 (discard_queued_stop_replies): Add `pid' argument.
14339 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14340 changes. Don't reference the `attached' global.
14341 (attach_inferior): Adjust to mywait interface changes.
14342 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14343 features. Handle and report "multiprocess+". Handle
14344 "qAttached:PID".
14345 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14346 changes.
14347 (handle_v_kill): New.
14348 (handle_v_stopped): Adjust to use target_pid_to_str.
14349 (handle_v_requests): Allow multiple attaches and runs when
14350 multiprocess extensions are in effect. Handle "vKill".
14351 (myresume): Adjust to use ptids.
14352 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14353 (handle_status): Adjust to discard_queued_stop_replies interface
14354 change.
14355 (first_thread_of, kill_inferior_callback)
14356 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14357 (main): Call initialize_inferiors. Adjust to use ptids, killing
14358 and detaching from all inferiors. Handle multiprocess packet
14359 variants.
14360 * linux-low.h: Include gdb_proc_service.h.
14361 (struct process_info_private): New.
14362 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14363 <lwpid_of>: Use ptid_get_lwp.
14364 (get_lwp_thread): Adjust.
14365 (struct lwp_info): Add `dead' member.
14366 (find_lwp_pid): Declare.
14367 * linux-low.c (thread_db_active): Delete.
14368 (new_inferior): Adjust comment.
14369 (inferior_pid): Delete.
14370 (linux_add_process): New.
14371 (handle_extended_wait): Adjust.
14372 (add_lwp): Change unsigned long to ptid.
14373 (linux_create_inferior): Add process to processes table. Adjust
14374 to use ptids. Don't set new_inferior here.
14375 (linux_attach_lwp): Rename to ...
14376 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14377 it. Adjust to use ptids.
14378 (linux_attach_lwp): New.
14379 (linux_attach): Add process to processes table. Don't set
14380 new_inferior here.
14381 (struct counter): New.
14382 (second_thread_of_pid_p, last_thread_of_process_p): New.
14383 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14384 multiple processes.
14385 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14386 processes. Remove process from process table.
14387 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14388 to multiple processes.
14389 (any_thread_of): New.
14390 (linux_detach): Add `pid' argument, and handle it. Remove process
14391 from processes table.
14392 (linux_join): Add `pid' argument. Handle it.
14393 (linux_thread_alive): Change unsighed long argument to ptid_t.
14394 Consider dead lwps as not being alive.
14395 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14396 threads we're not interested in.
14397 (same_lwp, find_lwp_pid): New.
14398 (linux_wait_for_lwp): Change `pid' argument's type from int to
14399 ptid_t. Adjust.
14400 (linux_wait_for_event): Rename to ...
14401 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14402 from int to ptid_t. Adjust.
14403 (linux_wait_for_event): New.
14404 (linux_wait_1): Add `ptid' argument. Change return type to
14405 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14406 that exit from the process table.
14407 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14408 Adjust.
14409 (mark_lwp_dead): New.
14410 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14411 stopping all threads, mark its main lwp as dead.
14412 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14413 ptids.
14414 (fetch_register, usr_store_inferior_registers)
14415 (regsets_fetch_inferior_registers)
14416 (regsets_store_inferior_registers, linux_read_memory)
14417 (linux_write_memory): Inline `inferior_pid'.
14418 (linux_look_up_symbols): Adjust to use per-process
14419 `thread_db_active'.
14420 (linux_request_interrupt): Adjust to use ptids.
14421 (linux_read_auxv): Inline `inferior_pid'.
14422 (initialize_low): Don't reference thread_db_active.
14423 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14424 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14425 (ps_getpid): Return the pid of the current inferior.
14426 * thread-db.c (proc_handle, thread_agent): Delete.
14427 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14428 per-process data.
14429 (find_one_thread): Change argument type to ptid_t. Adjust to
14430 per-process data.
14431 (maybe_attach_thread): Adjust to per-process data and ptids.
14432 (thread_db_find_new_threads): Ditto.
14433 (thread_db_init): Ditto.
14434 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14435 processes table. Adjust to use ptids.
14436 (spu_kill, spu_detach): Adjust interface. Remove process from
14437 processes table.
14438 (spu_join, spu_thread_alive): Adjust interface.
14439 (spu_wait): Adjust interface. Remove process from processes
14440 table. Adjust to use ptids.
14441 * win32-low.c (current_inferior_tid): Delete.
14442 (current_inferior_ptid): New.
14443 (debug_event_ptid): New.
14444 (thread_rec): Take a ptid. Adjust.
14445 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14446 (child_delete_thread): Ditto.
14447 (do_initial_child_stuff): Add `attached' argument. Add process to
14448 processes table.
14449 (child_fetch_inferior_registers, child_store_inferior_registers):
14450 Adjust.
14451 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14452 (win32_attach): Pass 1 to do_initial_child_stuff.
14453 (win32_kill): Adjust interface. Remove process from processes
14454 table.
14455 (win32_detach): Ditto.
14456 (win32_join): Adjust interface.
14457 (win32_thread_alive): Take a ptid.
14458 (win32_resume): Adjust to use ptids.
14459 (get_child_debug_event): Ditto.
14460 (win32_wait): Adjust interface. Remove exiting process from
14461 processes table.
14462
144632009-04-01 Pedro Alves <pedro@codesourcery.com>
14464
14465 Non-stop mode support.
14466
14467 * server.h (non_stop): Declare.
14468 (gdb_client_data, handler_func): Declare.
14469 (delete_file_handler, add_file_handler, start_event_loop):
14470 Declare.
14471 (handle_serial_event, handle_target_event, push_event)
14472 (putpkt_notif): Declare.
14473 * target.h (enum resume_kind): New.
14474 (struct thread_resume): Replace `step' field by `kind' field.
14475 (TARGET_WNOHANG): Define.
14476 (struct target_ops) <wait>: Add `options' argument.
14477 <supports_non_stop, async, start_non_stop>: New fields.
14478 (target_supports_non_stop, target_async): New.
14479 (start_non_stop): Declare.
14480 (mywait): Add `options' argument.
14481 * target.c (mywait): Add `options' argument. Print child exit
14482 notifications here.
14483 (start_non_stop): New.
14484 * server.c (non_stop, own_buf, mem_buf): New globals.
14485 (struct vstop_notif): New.
14486 (notif_queue): New global.
14487 (queue_stop_reply, push_event, discard_queued_stop_replies)
14488 (send_next_stop_reply): New.
14489 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14490 interface changes.
14491 (attach_inferior): In non-stop mode, don't wait for the target
14492 here.
14493 (handle_general_set): Handle QNonStop.
14494 (handle_query): When handling qC, return the current general
14495 thread, instead of the first thread of the list.
14496 (handle_query): If the backend supports non-stop mode, include
14497 QNonStop+ in the qSupported query response.
14498 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14499 and non-stop mode.
14500 (handle_v_attach, handle_v_run): Handle non-stop mode.
14501 (handle_v_stopped): New.
14502 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14503 (myresume): Adjust to use resume_kind. Handle non-stop.
14504 (queue_stop_reply_callback): New.
14505 (handle_status): Handle non-stop mode.
14506 (main): Clear non_stop flag on reconnection. Use the event-loop.
14507 Refactor serial protocol handling from here ...
14508 (process_serial_event): ... to this new function. When GDB
14509 selects any thread, select one here. In non-stop mode, wait until
14510 GDB acks all pending events before exiting.
14511 (handle_serial_event, handle_target_event): New.
14512 * remote-utils.c (remote_open): Install remote_desc in the event
14513 loop.
14514 (remote_close): Remove remote_desc from the event loop.
14515 (putpkt_binary): Rename to...
14516 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14517 (putpkt_binary): New as wrapper around putpkt_binary_1.
14518 (putpkt_notif): New.
14519 (prepare_resume_reply): In non-stop mode, don't change the
14520 general_thread.
14521 * event-loop.c: New.
14522 * Makefile.in (OBJ): Add event-loop.o.
14523 (event-loop.o): New rule.
14524
14525 * linux-low.h (pid_of): Moved here.
14526 (lwpid_of): New.
14527 (get_lwp_thread): Use lwpid_of.
14528 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14529 * linux-low.c (pid_of): Delete.
14530 (inferior_pid): Use lwpid_of.
14531 (linux_event_pipe): New.
14532 (target_is_async_p): New.
14533 (delete_lwp): New.
14534 (handle_extended_wait): Use lwpid_of.
14535 (add_lwp): Don't set lwpid field.
14536 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14537 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14538 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14539 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14540 first. Adjust to linux_wait_for_event interface changes. Use
14541 lwpid_of.
14542 (linux_detach): Don't delete the main lwp here.
14543 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14544 (status_pending_p): Don't consider explicitly suspended lwps.
14545 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14546 pointer. Add OPTIONS argument. Change return type to int. Use
14547 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14548 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14549 pointer. Add status pointer argument. Return a pid instead of a
14550 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14551 changes. In non-stop mode, don't switch to a random thread.
14552 (linux_wait): Rename to...
14553 (linux_wait_1): ... this. Add target_options argument, and handle
14554 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14555 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14556 clean exit and signal exit code. Don't stop all threads in
14557 non-stop mode. In all-stop mode, only stop all threads when
14558 reporting a stop to GDB. Handle explicit thread stop requests.
14559 (async_file_flush, async_file_mark): New.
14560 (linux_wait): New.
14561 (send_sigstop): Use lwpid_of.
14562 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14563 interface changes. In non-stop mode, don't switch to a random
14564 thread.
14565 (linux_resume_one_lwp): Use lwpid_of.
14566 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14567 (linux_resume_one_thread): ... this. Handle resume_stop. In
14568 non-stop mode, don't look for pending flag in all threads.
14569 (resume_status_pending_p): Don't consider explicitly suspended
14570 threads.
14571 (my_waitpid): Reimplement. Emulate __WALL.
14572 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14573 Use lwpid_of.
14574 (sigchld_handler, linux_supports_non_stop, linux_async)
14575 (linux_start_non_stop): New.
14576 (linux_target_ops): Register linux_supports_non_stop, linux_async
14577 and linux_start_non_stop.
14578 (initialize_low): Install SIGCHLD handler.
14579 * thread-db.c (thread_db_create_event, find_one_thread)
14580 (thread_db_get_tls_address): Use lwpid_of.
14581 * win32-low.c (win32_detach): Adjust to use resume_kind.
14582 (win32_wait): Add `options' argument.
14583 * spu-low.c (spu_resume): Adjust to use resume_kind.
14584 (spu_wait): Add `options' argument.
14585
145862009-04-01 Pedro Alves <pedro@codesourcery.com>
14587
14588 Decouple target code from remote protocol.
14589
14590 * target.h (enum target_waitkind): New.
14591 (struct target_waitstatus): New.
14592 (struct target_ops) <wait>: Return an unsigned long. Take a
14593 target_waitstatus pointer instead of a char pointer.
14594 (mywait): Likewise.
14595 * target.c (mywait): Change prototype to return an unsigned long.
14596 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14597 * server.h (thread_from_wait, old_thread_from_wait): Delete
14598 declarations.
14599 (prepare_resume_reply): Change prototype to take a
14600 target_waitstatus.
14601 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14602 (last_status, last_ptid): New.
14603 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14604 pid instead of a signal.
14605 (attach_inferior): Remove "status" and "signal" parameters.
14606 Adjust.
14607 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14608 not as an address.
14609 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14610 (handle_v_requests, myresume): Remove "status" and "signal"
14611 parameters. Adjust.
14612 (handle_status): New.
14613 (main): Delete local `status'. Adjust.
14614 * remote-utils.c: Include target.h.
14615 (prepare_resume_reply): Change prototype to take a
14616 target_waitstatus. Adjust.
14617
14618 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14619 interface.
14620 * spu-low.c (spu_wait): Adjust.
14621 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14622 Delete.
14623 (win32_wait): Adjust.
14624
146252009-04-01 Pedro Alves <pedro@codesourcery.com>
14626
14627 * target.h (struct thread_resume): Delete leave_stopped member.
14628 (struct target_ops): Add a `n' argument to the `resume' callback.
14629 * server.c (start_inferior): Adjust.
14630 (handle_v_cont, myresume): Adjust.
14631 * linux-low.c (check_removed_breakpoint): Adjust to resume
14632 interface change, and to removed leave_stopped field.
14633 (resume_ptr): Delete.
14634 (struct thread_resume_array): New.
14635 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14636 resume interface change.
14637 (linux_continue_one_thread, linux_queue_one_thread)
14638 (resume_status_pending_p): Check if the resume field is NULL
14639 instead of checking the leave_stopped member.
14640 (linux_resume): Adjust to the target resume interface change.
14641 * spu-low.c (spu_resume): Adjust to the target resume interface
14642 change.
14643 * win32-low.c (win32_detach, win32_resume): Ditto.
14644
146452009-04-01 Pedro Alves <pedro@codesourcery.com>
14646
14647 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14648 flag.
14649 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14650 pending.
14651 (linux_continue_one_thread): Only preserve the stepping flag if
14652 there's a pending breakpoint.
14653
146542009-03-31 Pedro Alves <pedro@codesourcery.com>
14655
14656 * server.c (main): After the inferior having exited, call
14657 remote_close before exiting gdbserver.
14658
146592009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14660
14661 Fix size of FPSCR in Power 7 processors.
14662 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14663 (PPC_FEATURE_HAS_DFP): New #define.
14664 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14665 size of the FPSCR.
14666
146672009-03-23 Pedro Alves <pedro@codesourcery.com>
14668
14669 * server.c (handle_query) Whitespace and formatting.
14670
146712009-03-22 Pedro Alves <pedro@codesourcery.com>
14672
14673 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14674 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14675 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14676 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14677 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14678 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14679 Makefile.in, configure.ac: Fix whitespace throughout.
14680 * configure: Regenerate.
14681
146822009-03-22 Pedro Alves <pedro@codesourcery.com>
14683
14684 * inferiors.c (find_inferior): Make it safe for the callback
14685 function to delete the currently iterated inferior.
14686
146872009-03-22 Pedro Alves <pedro@codesourcery.com>
14688
14689 * Makefile.in (linuw_low_h): Move higher.
14690 (thread-db.o): Depend on $(linux_low_h).
14691
146922009-03-17 Pedro Alves <pedro@codesourcery.com>
14693
14694 Rename "process" to "lwp" throughout.
14695
14696 * linux-low.c (all_processes): Rename to...
14697 (all_lwps): ... this.
14698 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14699 (add_process): Rename to ...
14700 (add_lwp): ... this. Adjust.
14701 (linux_create_inferior): Adjust.
14702 (linux_attach_lwp): Adjust.
14703 (linux_attach): Adjust.
14704 (linux_kill_one_process): Rename to ...
14705 (linux_kill_one_lwp): ... this. Adjust.
14706 (linux_kill): Adjust.
14707 (linux_detach_one_process): Rename to ...
14708 (linux_detach_one_lwp): ... this. Adjust.
14709 (linux_detach): Adjust.
14710 (check_removed_breakpoint): Adjust.
14711 (status_pending_p): Adjust.
14712 (linux_wait_for_process): Rename to ...
14713 (linux_wait_for_lwp): ... this. Adjust.
14714 (linux_wait_for_event): Adjust.
14715 (send_sigstop): Adjust.
14716 (wait_for_sigstop): Adjust.
14717 (stop_all_processes): Rename to ...
14718 (stop_all_lwps): ... this.
14719 (linux_resume_one_process): Rename to ...
14720 (linux_resume_one_lwp): ... this. Adjust.
14721 (linux_set_resume_request, linux_continue_one_thread)
14722 (linux_queue_one_thread, resume_status_pending_p)
14723 (usr_store_inferior_registers, regsets_store_inferior_registers)
14724 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14725 Adjust.
14726 * linux-low.h (get_process): Rename to ...
14727 (get_lwp): ... this. Adjust.
14728 (get_thread_process): Rename to ...
14729 (get_thread_lwp): ... this. Adjust.
14730 (get_process_thread): Rename to ...
14731 (get_lwp_thread): ... this. Adjust.
14732 (struct process_info): Rename to ...
14733 (struct lwp_info): ... this.
14734 (all_processes): Rename to ...
14735 (all_lwps): ... this.
14736 * proc-service.c (ps_lgetregs): Adjust.
14737 * thread-db.c (thread_db_create_event, find_one_thread)
14738 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14739
147402009-03-14 Pedro Alves <pedro@codesourcery.com>
14741
14742 * server.c (handle_query): Handle "qAttached".
14743
147442009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14745
14746 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14747 GPLv3, update license URL.
14748
147492009-03-01 Doug Evans <dje@google.com>
14750
14751 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14752 (server_h): Add gdb_signals.h.
14753 (signals.o): Update.
14754 * server.h (target_signal_from_host,target_signal_to_host_p)
14755 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14756
147572009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14758
14759 * remote-utils.c (getpkt): Also generate remote-debug
14760 information if noack_mode is set.
14761
147622009-02-06 Pedro Alves <pedro@codesourcery.com>
14763
14764 * server.c (handle_query): Report qXfer:siginfo:read and
14765 qXfer:siginfo:write as supported and handle them.
14766 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14767 * linux-low.c (linux_xfer_siginfo): New.
14768 (linux_target_ops): Set it.
14769
147702009-01-26 Pedro Alves <pedro@codesourcery.com>
14771
14772 * server.c (gdbserver_usage): Mention --remote-debug.
14773 (main): Accept '--remote-debug' switch.
14774
147752009-01-18 Doug Evans <dje@google.com>
14776
14777 * regcache.c (new_register_cache): No need to check result of xcalloc.
14778 * server.c (handle_search_memory): Back out calls to xmalloc,
14779 result is checked and error is returned to user upon failure.
14780 (handle_query): Ditto. Add more checks for result of malloc.
14781 (handle_v_cont): Check result of malloc, report error back to
14782 user upon failure.
14783 (handle_v_run): Ditto. Call freeargv.
14784 * server.h (freeargv): Declare.
14785 * utils.c (freeargv): New fn.
14786
147872009-01-15 Doug Evans <dje@google.com>
14788
14789 * gdbreplay.c (perror_with_name): Make arg const char *.
14790 * server.h (target_signal_to_name): Make return type const char *.
14791 * thread-db.c (thread_db_err_str): Make return type const char *.
14792 * utils.c (perror_with_name): Make arg const char *.
14793
147942009-01-14 Pedro Alves <pedro@codesourcery.com>
14795
14796 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14797 when handling a EXIT_PROCESS_DEBUG_EVENT.
14798
147992009-01-06 Joel Brobecker <brobecker@adacore.com>
14800
14801 * gdbreplay.c (gdbreplay_version): Update copyright year.
14802 * server.c (gdbserver_version): Likewise.
14803
148042009-01-05 Doug Evans <dje@google.com>
14805
14806 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14807 (handle_extended_wait): Improve comment.
14808
148092008-12-13 Doug Evans <dje@google.com>
14810
14811 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14812 * server.h (ATTR_MALLOC): New macro.
14813 (xmalloc,xcalloc,xstrdup): Declare.
14814 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14815 * inferiors.c: Ditto.
14816 * linux-low.c: Ditto.
14817 * mem-break.c: Ditto.
14818 * regcache.c: Ditto.
14819 * remote-utils.c: Ditto.
14820 * server.c: Ditto.
14821 * target.c: Ditto.
14822 * win32-low.c: Ditto.
14823
148242008-12-12 Doug Evans <dje@google.com>
14825
14826 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14827 in debugging printf.
14828
14829 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14830
148312008-12-09 Doug Evans <dje@google.com>
14832
14833 * linux-low.h (struct process_info): Delete member tid, unused.
14834 * thread-db.c (find_one_thread): Update.
14835 (maybe_attach_thread): Update.
14836
148372008-12-02 Pedro Alves <pedro@codesourcery.com>
14838
14839 * target.h (struct target_ops): Add qxfer_osdata member.
14840 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14841 and dirent.h.
14842 (linux_qxfer_osdata): New functions.
14843 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14844 callback.
14845 * server.c (handle_query): Handle "qXfer:osdata:read:".
14846 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14847 (buffer_xml_printf): New functions.
14848 * server.h (struct buffer): New.
14849 (buffer_grow_str, buffer_grow_str0): New macros.
14850 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14851 (buffer_xml_printf): Declare.
14852
148532008-11-24 Doug Evans <dje@google.com>
14854
14855 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14856
148572008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14858
14859 * server.c (handle_v_run): Always use the supplied argument list.
14860
148612008-11-19 Bob Wilson <bob.wilson@acm.org>
14862
14863 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14864 (xtensa_regmap_table): Add entry for scompare1.
14865
148662008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14867
14868 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14869 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14870 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14871 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14872 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14873 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14874 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14875 XML target descriptions.
14876 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14877 when inferior is running on an ISA 2.05 or later processor. Add
14878 special case to return offset for full 64-bit slot of FPSCR when
14879 in 32-bits.
14880
148812008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14882
14883 * Makefile.in (SFILES, clean): Added sparc64 files.
14884 (reg-sparc64.o, reg-sparc64.c): New.
14885 * configure.srv (sparc*-*-linux*): New configuration.
14886 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14887 syscall arguments for SPARC.
14888 (regsets_store_inferior_registers): Likewise.
14889 * linux-sparc-low.c: New file.
14890
148912008-10-21 Doug Evans <dje@google.com>
14892
14893 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14894 (READLINE_DIR,READLINE_DEP): Delete.
14895 (INTERNAL_CFLAGS): Update.
14896 (LINTFLAGS): Update.
14897
148982008-10-10 Pedro Alves <pedro@codesourcery.com>
14899
14900 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14901 whole argv from the last run, not just argv[0].
14902
149032008-09-08 Pedro Alves <pedro@codesourcery.com>
14904
14905 * regcache.c (new_register_cache): Return NULL if the register
14906 cache size isn't known yet.
14907 (free_register_cache): Avoid dereferencing a NULL regcache.
14908
149092008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14910
14911 * configure.srv: Merge MIPS and MIPS64.
14912
149132008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14914
14915 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14916
149172008-08-18 Luis Machado <luisgpm@br.ibm.com>
14918
14919 * Makefile.in: Add required vsx dependencies.
14920
14921 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14922 Declare init_registers_powerpc_vsx32l.
14923 Declare init_registers_powerpc_vsx64l.
14924 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14925 (ppc_arch_setup): Check for VSX in hwcap.
14926 (ppc_fill_vsxregset): New function.
14927 (ppc_store_vsxregset): New function.
14928 Add new VSX entry in regset_info target_regsets.
14929
14930 * configure.srv: Add new VSX dependencies.
14931
149322008-08-12 Pedro Alves <pedro@codesourcery.com>
14933
14934 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14935 (remote_open): Set or clear transport_is_reliable.
14936 (putpkt_binary): Don't expect acks in noack mode.
14937 (getpkt): Don't send ack/nac in noack mode.
14938 * server.c (handle_general_set): Handle QStartNoAckMode.
14939 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14940 qSupported.
14941 (main): Reset noack_mode on every connection.
14942 * server.h (noack_mode): Declare.
14943
149442008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14945
14946 * Makefile.in (GDBREPLAY_OBS): New variable.
14947 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14948
149492008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14950 Daniel Jacobowitz <dan@codesourcery.com>
14951
14952 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14953 (usr_store_inferior_registers): Likewise.
14954 (regsets_store_inferior_registers): Likewise.
14955
149562008-07-31 Rolf Jansen <rj@surtec.com>
14957 Pedro Alves <pedro@codesourcery.com>
14958
14959 * configure.ac: Check for memmem declaration.
14960 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14961 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14962 (disable_packet_qfThreadInfo): Unconditionally compile.
14963 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14964 * configure, config.in: Regenerate.
14965
149662008-07-28 Doug Kwan <dougkwan@google.com>
14967
14968 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14969 (linux_write_memory): Remove declaration of errno.
14970
149712008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14972
14973 * linux-low.c (handle_extended_wait): Do not use "status"
14974 variable uninitialized.
14975
149762008-07-07 Pedro Alves <pedro@codesourcery.com>
14977
14978 * server.c (handle_v_attach): Inhibit reporting dll changes.
14979
149802008-06-27 Pedro Alves <pedro@codesourcery.com>
14981
14982 * remote-utils.c (prepare_resume_reply): If requested, don't
14983 output "thread:TID" in the T stop reply.
14984
14985 * server.c (disable_packet_vCont, disable_packet_Tthread)
14986 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14987 (handle_query): If requested, disable support for qC, qfThreadInfo
14988 and qsThreadInfo.
14989 (handle_v_requests): If requested, disable support for vCont.
14990 (gdbserver_show_disableable): New.
14991 (main): Handle --disable-packet and --disable-packet=LIST.
14992
14993 * server.h (disable_packet_vCont, disable_packet_Tthread)
14994 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14995
149962008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14997
14998 * server.c (gdbserver_usage): Mention --version.
14999
150002008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15001
15002 * Makefile.in (gdbreplay.o): New rule.
15003
150042008-06-06 Joseph Myers <joseph@codesourcery.com>
15005
15006 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15007 message, not gdbserver.
15008
150092008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15010 Nathan Sidwell <nathan@codesourcery.com>
15011 Joseph Myers <joseph@codesourcery.com>
15012
15013 * acinclude.m4: Include ../../config/acx.m4.
15014 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15015 * configure, config.in: Regenerate.
15016 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15017 * server.c (gdbserver_version): Print PKGVERSION.
15018 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15019 (main): Adjust gdbserver_usage calls.
15020 * gdbreplay.c (version, host_name): Add declarations.
15021 (gdbreplay_version, gdbreplay_usage): New.
15022 (main): Accept --version and --help options.
15023
150242008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15027 (arm_breakpoint_at): Handle Thumb.
15028 (the_low_target): Add comment.
15029
150302008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15031
15032 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15033
150342008-05-09 Doug Evans <dje@google.com>
15035
15036 * server.h (decode_search_memory_packet): Declare.
15037 * remote-utils.c (decode_search_memory_packet): New fn.
15038 * server.c (handle_search_memory_1): New fn.
15039 (handle_search_memory): New fn.
15040 (handle_query): Process qSearch:memory packets.
15041
150422008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15043
15044 * regcache.c (registers_length): Remove.
15045 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15046 full register packet.
15047 * regcache.h (registers_length): Remove prototype.
15048 * server.h (PBUFSIZ): Define to 16384.
15049
150502008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15051
15052 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15053 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15054 powerpc-64l.o, and powerpc-altivec64l.o.
15055 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15056 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15057 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15058 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15059 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15060 to srv_xmlfiles.
15061
15062 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15063 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15064 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15065 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15066 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15067 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15068 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15069 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15070 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15071 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15072 (clean): Update.
15073
15074 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15075 (init_registers_powerpc_32l): ... this new prototype.
15076 (init_registers_powerpc_32): Remove, replace by ...
15077 (init_registers_powerpc_altivec32l): ... this new prototype.
15078 (init_registers_powerpc_e500): Remove, replace by ...
15079 (init_registers_powerpc_e500l): ... this new prototype.
15080 (init_registers_ppc64): Remove, replace by ...
15081 (init_registers_powerpc_64l): ... this new prototype.
15082 (init_registers_powerpc_64): Remove, replace by ...
15083 (init_registers_powerpc_altivec64l): ... this new prototype.
15084 (ppc_num_regs): Set to 73.
15085 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15086 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15087 (ppc_cannot_store_register): Handle orig_r3 and trap.
15088 (ppc_arch_setup): Update init_registers_... calls.
15089 (ppc_fill_gregset): Handle orig_r3 and trap.
15090
15091 * inferiors.c (clear_inferiors): Reset current_inferior.
15092
150932008-04-23 Paolo Bonzini <bonzini@gnu.org>
15094
15095 * acinclude.m4: Add override.m4.
15096 * configure: Regenerate.
15097
150982008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15099
15100 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15101 initial call to init_register_ppc64.
15102
151032008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15104
15105 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15106 single powerpc*-*-linux* case.
15107 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15108
151092008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15110
15111 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15112 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15113 from reg_xmlfiles.
15114 * linux-ppc-low.c: Include <elf.h>.
15115 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15116 (ppc_hwcap): New global variable.
15117 (ppc_regmap): Remove __SPE__ #ifdef sections.
15118 (ppc_regmap_e500): New global variable.
15119 (ppc_cannot_store_register): Update __SPE__ special case.
15120 (ppc_get_hwcap): New function.
15121 (ppc_arch_setup): Use it to determine whether inferior supports
15122 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15123 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15124 Do not access registers if target does not support AltiVec.
15125 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15126 Do not access registers if target does not support SPE.
15127 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15128
151292008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15130
15131 * linux-low.c (disabled_regsets, num_regsets): New.
15132 (use_regsets_p): Delete.
15133 (linux_wait_for_process): Clear disabled_regsets.
15134 (regsets_fetch_inferior_registers): Check and set it.
15135 (regsets_store_inferior_registers): Likewise.
15136 (linux_fetch_registers, linux_store_registers): Do not use
15137 use_regsets_p.
15138 (initialize_low): Allocate disabled_regsets.
15139
151402008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15141
15142 * Makefile.in (LIBOBJS): New.
15143 (OBS): Use LIBOBJS.
15144 (memmem.o): New rule.
15145 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15146 * configure: Regenerated.
15147
151482008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15149
15150 * server.c (handle_query): Never return "unsupported" for
15151 qXfer:features:read queries.
15152
151532008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15154
15155 * server.c (get_features_xml): Fix inverted condition.
15156 (handle_query): Always support qXfer:feature:read.
15157
151582008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15159
15160 * server.c (wrapper_argv): New.
15161 (start_inferior): Handle wrapper_argv. If set, expect an extra
15162 trap.
15163 (gdbserver_usage): Document --wrapper.
15164 (main): Parse --wrapper.
15165
151662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15167
15168 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15169 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15170 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15171 (ppc_set_pc): Likewise.
15172 (ppc_arch_setup): New function.
15173 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15174 of collect_register.
15175 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15176
151772008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15178
15179 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15180 instead of linux-ppc64-low.o.
15181 * linux-ppc64-low.c: Remove file.
15182 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15183 (linux-ppc64-low.o): Remove rule.
15184
15185 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15186 (init_registers_powerpc_64): Likewise.
15187 (ppc_regmap): Conditionally define depending on __powerpc64__.
15188 (ppc_cannot_store_register): Do not special-case "fpscr" when
15189 compiled on __powerpc64__.
15190 (ppc_collect_ptrace_register): New function.
15191 (ppc_supply_ptrace_register): New function.
15192 (ppc_breakpoint): Change type to "unsigned int".
15193 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15194 (the_low_target): Conditionally provide initializers for the
15195 arch_setup member depending on __powerpc64__. Install
15196 collect_ptrace_register and supply_ptrace_register members.
15197
151982008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15199
15200 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15201 * server.c (gdbserver_xmltarget): Define.
15202 (get_features_xml): Use it to replace "target.xml" and arch_string.
15203
15204 * configure.srv: Remove srv_xmltarget. Add XML files that were
15205 mentioned there to srv_xmlfiles instead. Remove conditional tests
15206 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15207 srv_xmlfiles and srv_regobj to include all possible choices.
15208 * configure.ac (srv_xmltarget): Remove.
15209 (srv_xmlfiles): Do not add "target.xml".
15210 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15211 checks for supplementary target information.
15212 * configure: Regenerate.
15213 * Makefile.in (XML_TARGET): Remove.
15214 (target.xml): Remove rule.
15215 (clean): Do not clean up target.xml.
15216 (.PRECIOUS): Do not mention target.xml.
15217
15218 * target.h (struct target_ops): Remove arch_string member.
15219 * linux-low.c (linux_arch_string): Remove.
15220 (linux_target_ops): Remove arch_string initializer.
15221 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15222 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15223 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15224 * spu-low.c (spu_arch_string): Remove.
15225 (spu_target_ops): Remove arch_string initializer.
15226 * win32-low.c (win32_arch_string): Remove.
15227 (win32_target_ops): Remove arch_string initializer.
15228 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15229 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15230 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15231
152322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15233
15234 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15235 by collect_ptrace_register and supply_ptrace_register hooks.
15236 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15237 instead of checking for the_low_target.left_pad_xfer.
15238 (usr_store_inferior_registers): Use collect_ptrace_register callback
15239 instead of checking for the_low_target.left_pad_xfer.
15240
15241 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15242 (s390_supply_ptrace_register): Likewise.
15243 (s390_fill_gregset): Call s390_collect_ptrace_register.
15244 (the_low_target): Update.
15245
15246 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15247 (ppc_supply_ptrace_register): Likewise.
15248 (the_low_target): Update.
15249
15250 * linux-i386-low.c (the_low_target): Update.
15251 * linux-x86-64-low.c (the_low_target): Update.
15252
152532008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15254
15255 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15256 reg-s390.o and reg-s390x.o.
15257
15258 * linux-low.c (new_inferior): New global variable.
15259 (linux_create_inferior, linux_attach): Set it.
15260 (linux_wait_for_process): Call the_low_target.arch_setup after the
15261 target has stopped for the first time.
15262 (initialize_low): Do not call the_low_target.arch_setup.
15263
15264 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15265 (s390_set_pc): Likewise.
15266 (s390_arch_setup): New function.
15267 (the_low_target): Use s390_arch_setup as arch_setup routine.
15268
15269 * regcache.c (realloc_register_cache): New function.
15270 (set_register_cache): Call it for each existing regcache.
15271
152722008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15273
15274 * server.h (init_registers): Remove prototype.
15275
15276 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15277 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15278 instead of init_registers ().
15279 * linux-arm-low.c (init_registers_arm): Add prototype.
15280 (init_registers_arm_with_iwmmxt): Likewise.
15281 (the_low_target): Add initializer for arch_setup field.
15282 * linux-cris-low.c (init_registers_cris): Add prototype.
15283 (the_low_target): Add initializer for arch_setup field.
15284 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15285 (the_low_target): Add initializer for arch_setup field.
15286 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15287 (the_low_target): Add initializer for arch_setup field.
15288 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15289 (the_low_target): Add initializer for arch_setup field.
15290 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15291 (the_low_target): Add initializer for arch_setup field.
15292 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15293 (the_low_target): Add initializer for arch_setup field.
15294 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15295 (init_registers_mips64_linux): Likewise.
15296 (the_low_target): Add initializer for arch_setup field.
15297 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15298 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15299 (the_low_target): Add initializer for arch_setup field.
15300 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15301 (init_registers_powerpc_64): Likewise.
15302 (the_low_target): Add initializer for arch_setup field.
15303 * linux-s390-low.c (init_registers_s390): Add prototype.
15304 (init_registers_s390x): Likewise.
15305 (the_low_target): Add initializer for arch_setup field.
15306 * linux-sh-low.c (init_registers_sh): Add prototype.
15307 (the_low_target): Add initializer for arch_setup field.
15308 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15309 (the_low_target): Add initializer for arch_setup field.
15310 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15311 (the_low_target): Add initializer for arch_setup field.
15312
15313 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15314 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15315 instead of init_registers ().
15316 * win32-arm-low.c (init_registers_arm): Add prototype.
15317 (the_low_target): Add initializer for arch_setup field.
15318 * win32-i386-low.c (init_registers_i386): Add prototype.
15319 (the_low_target): Add initializer for arch_setup field.
15320
15321 * spu-low.c (init_registers_spu): Add prototype.
15322 (initialize_low): Call initialie_registers_spu () instead of
15323 initialize_registers ().
15324
153252008-02-19 Pedro Alves <pedro@codesourcery.com>
15326
15327 * server.c (handle_v_requests): When handling the vRun and vAttach
15328 packets, if already debugging a process, don't kill it. Return an
15329 error instead.
15330
153312008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15332
15333 * server.c (handle_query): Correct length check.
15334
153352008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15336
15337 * win32-low.c (do_initial_child_stuff): Add process handle
15338 parameter. Set current_process_handle and current_process_id from the
15339 parameters. Clear globals.
15340 (win32_create_inferior): Don't set current_process_handle and
15341 current_process_id here. Instead pass them on the call to
15342 do_initial_child_stuff.
15343 (win32_attach): Likewise.
15344 (win32_clear_inferiors): New.
15345 (win32_kill): Don't close the current process handle or the
15346 current thread handle here. Instead call win32_clear_inferiors.
15347 (win32_detach): Don't open a new handle to the process. Call
15348 win32_clear_inferiors.
15349 (win32_join): Don't rely on current_process_handle; open a new
15350 handle using the process id.
15351 (win32_wait): Call win32_clear_inferiors when the inferior process
15352 has exited.
15353
153542008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15355
15356 * server.c (monitor_show_help): Add "exit".
15357
153582008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15359
15360 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15361 (clean): Add reg-xtensa.c.
15362 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15363 * configure.srv (xtensa*-*-linux*) New target.
15364 * linux-xtensa-low.c: New.
15365 * xtensa-xtregs.c: New.
15366
153672008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15368
15369 * hostio.c: Don't include errno.h.
15370 (errno_to_fileio_errno): Move to hostio-errno.
15371 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15372 error number outputting to the target->hostio_last_error callback.
15373 (hostio_packet_error): Use FILEIO_EINVAL directly.
15374 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15375 calls to hostio_error.
15376 * hostio-errno.c: New.
15377 * server.h (hostio_last_error_from_errno): Declare.
15378 * target.h (target_ops): Add hostio_last_error member.
15379 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15380 as hostio_last_error handler.
15381 * spu-low.c (spu_target_ops): Likewise.
15382 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15383 (wince_hostio_last_error): New functions.
15384 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15385 as hostio_last_error handler.
15386 (win32_target_ops) [!_WIN32_WCE]: Register
15387 hostio_last_error_from_errno as hostio_last_error handler.
15388 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15389 (hostio-errno.o): New rule.
15390 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15391 * configure.srv (srv_hostio_err_objs): New variable. Default to
15392 hostio-errno.o.
15393 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15394 * configure: Regenerate.
15395
153962008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15397
15398 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15399 (linux_kill, linux_detach): Clean up the process list.
15400 * remote-utils.c (remote_open): Improve port number parsing.
15401 (putpkt_binary, input_interrupt): Only send interrupts if the target
15402 is running.
15403 * server.c (extended_protocol): Make static.
15404 (attached): Define earlier.
15405 (exit_requested, response_needed, program_argv): New variables.
15406 (target_running): New.
15407 (start_inferior): Clear attached here.
15408 (attach_inferior): Set attached here.
15409 (require_running): Define.
15410 (handle_query): Use require_running and target_running. Implement
15411 "monitor exit".
15412 (handle_v_attach, handle_v_run): New.
15413 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15414 (gdbserver_usage): Update.
15415 (main): Redo argument parsing. Handle --debug and --multi. Handle
15416 --attach along with other options or after the port. Save
15417 program_argv. Support no initial program. Resynchronize
15418 communication with GDB after an error. Handle "monitor exit".
15419 Use require_running and target_running. Always allow the extended
15420 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15421 restart in extended mode.
15422 * README: Refer to the GDB manual. Update --attach usage.
15423
154242007-12-20 Andreas Schwab <schwab@suse.de>
15425
15426 * linux-low.c (STACK_SIZE): Define.
15427 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15428 (linux_test_for_tracefork): Likewise.
15429
154302007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15431
15432 * linux-low.c (linux_wait_for_event): Update messages. Do not
15433 reinsert auto-delete breakpoints.
15434 * mem-break.c (struct breakpoint): Change return type of handler to
15435 int.
15436 (set_breakpoint_at): Update handler type.
15437 (reinsert_breakpoint_handler): Return 1 instead of calling
15438 delete_breakpoint.
15439 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15440 setting a new one.
15441 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15442 * mem-break.h (set_breakpoint_at): Update handler type.
15443 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15444 * win32-low.c (auto_delete_breakpoint): New.
15445 (get_child_debug_event): Use it.
15446
154472007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15448
15449 * configure.ac: Check for pread and pwrite.
15450 * hostio.c (handle_pread): Fall back to lseek and read.
15451 (handle_pwrite): Fall back to lseek and write.
15452 * config.in, configure: Regenerated.
15453
154542007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15455
15456 * server.c (myresume): Add own_buf argument.
15457 (main): Update calls.
15458
154592007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15460
15461 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15462 * remote-utils.c (remote_open): Do not call disable_async_io.
15463 (block_async_io): Delete.
15464 (unblock_async_io): Make static.
15465 (initialize_async_io): New.
15466 * server.c (handle_v_cont): Handle async I/O here.
15467 (myresume): Likewise. Move other common resume tasks here...
15468 (main): ... from here. Call initialize_async_io. Disable async
15469 I/O before the main loop.
15470 * server.h (initialize_async_io): Declare.
15471 (block_async_io, unblock_async_io): Delete prototypes.
15472 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15473
154742007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15475
15476 * remote-utils.c (readchar): Allow binary data in received messages.
15477
154782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15479
15480 * win32-low.c (attaching): New global.
15481 (win32_create_inferior): Clear the `attaching' global.
15482 (win32_attach): Set the `attaching' global.
15483 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15484 attaching. Only set a breakpoint at the entry point if not
15485 attaching.
15486
154872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15488
15489 * server.c (main): Don't report dll events on the initial
15490 connection on attaches.
15491
154922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15493
15494 * server.c (main): Relax numerical bases supported for the pid of
15495 the --attach command line argument.
15496
154972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15498
15499 * win32-low.c (win32_attach): Call OpenProcess before
15500 DebugActiveProcess, not after. Add last error output to error
15501 call.
15502
155032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15504
15505 * win32-low.c (win32_get_thread_context)
15506 (win32_set_thread_context): New functions.
15507 (thread_rec): Use win32_get_thread_context.
15508 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15509 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15510 field.
15511
155122007-12-03 Leo Zayas
15513 Pedro Alves <pedro_alves@portugalmail.pt>
15514
15515 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15516 global variables.
15517 (child_add_thread): Minor cleanup.
15518 (child_continue): Resume artificially suspended threads before
15519 calling ContinueDebugEvent.
15520 (suspend_one_thread): New.
15521 (fake_breakpoint_event): New.
15522 (get_child_debug_event): Change return type to int. Check here if
15523 gdb sent an interrupt request. If a soft interrupt was requested,
15524 fake a breakpoint event. Return 0 if there is no event to handle,
15525 and 1 otherwise.
15526 (win32_wait): Don't check here if gdb sent an interrupt request.
15527 Ensure there is a valid event to handle.
15528 (win32_request_interrupt): Add soft interruption method as last
15529 resort.
15530
155312007-12-03 Leo Zayas
15532 Pedro Alves <pedro_alves@portugalmail.pt>
15533
15534 * win32-low.h (win32_thread_info): Add descriptions to the
15535 structure members. Replace `suspend_count' counter by a
15536 `suspended' flag.
15537 * win32-low.c (thread_rec): Update condition of when to get the
15538 context from the inferior. Rely on ContextFlags being set if it
15539 has already been retrieved. Only suspend the inferior thread if
15540 we haven't already. Warn if that fails.
15541 (continue_one_thread): s/suspend_count/suspended/. Only call
15542 ResumeThread once. Warn if that fails.
15543
155442007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15545
15546 * win32-low.c (win32_wait): Don't read from the inferior when it
15547 has already exited.
15548
155492007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15550
15551 * Makefile.in (win32_low_h): New variable.
15552 (win32-low.o): Add dependency on $(win32_low_h).
15553 (win32-arm-low.o, win32-i386-low.o): New rules.
15554
155552007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15556
15557 * hostio.c: Correct copyright year.
15558
155592007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * Makefile.in (OBS): Add hostio.o.
15562 (hostio.o): New rule.
15563 * server.h (handle_vFile): Declare.
15564 * hostio.c: New file.
15565 * server.c (handle_v_requests): Take packet_len and new_packet_len
15566 for binary packets. Call handle_vFile.
15567 (main): Update call to handle_v_requests.
15568
155692007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15570
15571 * linux-low.c: Include <sched.h>.
15572
155732007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15574
15575 * linux-low.c (linux_tracefork_grandchild): New.
15576 (linux_tracefork_child): Use clone.
15577 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15578
155792007-10-31 Joel Brobecker <brobecker@adacore.com>
15580
15581 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15582
155832007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15584
15585 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15586
155872007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15588
15589 * inferiors.c (change_inferior_id): Delete.
15590 (add_pid_to_list, pull_pid_from_list): New.
15591 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15592 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15593 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15594 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15595 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15596 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15597 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15598 (using_threads): Always set to 1.
15599 (handle_extended_wait): New.
15600 (add_process): Do not set TID.
15601 (linux_create_inferior): Set must_set_ptrace_flags.
15602 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15603 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15604 (linux_thread_alive): Rename TID argument to LWPID.
15605 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15606 (linux_wait_for_event): Do not use TID or check using_threads. Update
15607 call to dead_thread_notify. Call handle_extended_wait.
15608 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15609 (send_sigstop): Delete sigstop_sent.
15610 (wait_for_sigstop): Avoid TID.
15611 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15612 (linux_test_for_tracefork): New.
15613 (linux_lookup_signals): Use thread_db_active and
15614 linux_supports_tracefork_flag.
15615 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15616 * linux-low.h (get_process_thread): Avoid TID.
15617 (struct process_ifo): Move thread_known and tid to the end. Remove
15618 sigstop_sent.
15619 (linux_attach_lwp, thread_db_init): Update prototypes.
15620 * server.h (change_inferior_id): Delete prototype.
15621 (add_pid_to_list, pull_pid_from_list): New prototypes.
15622 * thread-db.c (thread_db_use_events): New.
15623 (find_first_thread): Rename to...
15624 (find_one_thread): ...this. Update callers and messages. Do not
15625 call fatal. Check thread_db_use_events. Do not call
15626 change_inferior_id or new_thread_notify.
15627 (maybe_attach_thread): Update. Do not call new_thread_notify.
15628 (thread_db_init): Set thread_db_use_events. Check use_events.
15629 * utils.c (fatal, warning): Correct message prefix.
15630
156312007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15632
15633 * Makefile.in (clean): Remove new files.
15634 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15635 (powerpc-64.o, powerpc-64.c): New rules.
15636 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15637 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15638 with SPE.
15639 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15640 SPE targets.
15641 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15642 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15643 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15644 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15645 (target_regsets): Add AltiVec and SPE register sets.
15646 * configure.ac: Check for AltiVec and SPE.
15647 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15648 (ppc_fill_vrregset, ppc_store_vrregset): New.
15649 (target_regsets): Add AltiVec register set.
15650 * configure: Regenerated.
15651
156522007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15653
15654 * linux-low.c (O_LARGEFILE): Define.
15655 (linux_read_memory): Use /proc/PID/mem.
15656 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15657 * configure, config.in: Regenerated.
15658
156592007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15660
15661 * linux-low.c (linux_wait_for_event): Do not pass signals while
15662 single-stepping.
15663
156642007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15665
15666 * win32-low.c (create_process): New.
15667 (win32_create_inferior): Use create_process instead of
15668 CreateProcess. If create_process failed retry appending an ".exe"
15669 suffix. Store the GetLastError result immediatelly after
15670 create_process calls and use it on the call to error.
15671
156722007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15673
15674 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15675
156762007-08-23 Joel Brobecker <brobecker@adacore.com>
15677
15678 * configure.ac: Switch license to GPLv3.
15679
156802007-08-01 Michael Snyder <msnyder@access-company.com>
15681
15682 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15683
156842007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15685
15686 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15687 typedef.
15688 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15689 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15690 CloseToolhelp32Snapshot.
15691 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15692 CloseToolhelp32Snapshot.
15693
156942007-07-27 Michael Snyder <michael.snyder@access-company.com>
15695
15696 * server.c (main): Check for inferior exit before main loop.
15697
156982007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15699
15700 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15701 instead of on tmp_desc.
15702
157032007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15704 Daniel Jacobowitz <dan@codesourcery.com>
15705
15706 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15707 (add_thread): Minor cleanups.
15708 (clear_inferiors): Move lower in the file. Clear the DLL
15709 list.
15710 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15711 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15712 (xml_escape_text): New.
15713 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15714 for qSupported.
15715 (handle_v_cont): Report errors.
15716 (gdbserver_version): Update.
15717 (main): Correct size of own_buf. Do not report initial DLL events.
15718 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15719 (unloaded_dll, xml_escape_text): New.
15720 * win32-low.c (enum target_waitkind): Update comments.
15721 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15722 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15723 (win32_EnumProcessModules, win32_GetModuleInformation)
15724 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15725 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15726 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15727 (win32_Module32First, win32_Module32Next, load_toolhelp)
15728 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15729 (get_child_debug_event): Handle DLL events.
15730 (win32_wait): Likewise.
15731
157322007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15733
15734 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15735 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15736
157372007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15738
15739 * win32-low.c (handle_output_debug_string): Ignore event if not
15740 waiting.
15741
157422007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15743
15744 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15745
157462007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15747
15748 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15749
157502007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15751
15752 * inferiors.c (change_inferior_id): Add comment.
15753 * linux-low.c (check_removed_breakpoint): Add an early
15754 prototype. Improve debug output.
15755 (linux_attach): Doc update.
15756 (linux_detach_one_process, linux_detach): Clean up before releasing
15757 each process.
15758 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15759 * linux-low.h (struct process_info): Doc improvement.
15760 * mem-break.c (delete_all_breakpoints): New.
15761 * mem-break.h (delete_all_breakpoints): New prototype.
15762 * thread-db.c (find_first_thread): New.
15763 (thread_db_create_event): Call it instead of
15764 thread_db_find_new_threads. Clean up unused variables.
15765 (maybe_attach_thread): Remove first thread handling.
15766 (thread_db_find_new_threads): Use find_first_thread.
15767 (thread_db_get_tls_address): Likewise.
15768
157692007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15770
15771 * thread-db.c (thread_db_find_new_threads): Add prototype.
15772 (thread_db_create_event): Check for the main thread before adding
15773 a new thread.
15774 (maybe_attach_thread): Only enable event reporting if TID == 0.
15775 (thread_db_get_tls_address): Check for new threads.
15776
157772007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15778
15779 * linux-low.c (linux_create_inferior): Try execv before execvp.
15780 * spu-low.c (spu_create_inferior): Likewise.
15781
157822007-06-13 Mike Frysinger <vapier@gentoo.org>
15783
15784 * linux-low.c (linux_create_inferior): Change execv to execvp.
15785 * spu-low.c (spu_create_inferior): Likewies.
15786
157872007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15788
15789 * Makefile.in (clean): Clean new files instead of deleted ones.
15790 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15791 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15792 rules.
15793 * configure.srv: Specify XML files and new regformats for MIPS and
15794 MIPS64 GNU/Linux.
15795 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15796 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15797 an entry for the restart register.
15798 (mips_cannot_fetch_register, mips_cannot_store_register)
15799 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15800 register names to match the XML descriptions.
15801 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15802 restart register instead of $0.
15803
158042007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15805 Markus Deuling <deuling@de.ibm.com>
15806
15807 * remote-utils.c (decode_xfer_write): New function.
15808 * server.h (decode_xfer_write): Add prototype.
15809 * server.c (handle_query): Add PACKET_LEN argument. Support
15810 qXfer:spu:read and qXfer:spu:write packets.
15811 (main): Pass packet_len to handle_query.
15812 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15813 * target.h (target_ops): Add qxfer_spu.
15814
158152007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15816
15817 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15818 accessing non-seekable spufs files.
15819
158202007-05-16 Markus Deuling <deuling@de.ibm.com>
15821
15822 * server.c (handle_query): Add reply for qC packet.
15823
158242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15825 Leo Zayas <lerele@champenstudios@com>
15826
15827 * server.h (check_remote_input_interrupt_request): New function.
15828 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15829 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15830 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15831 (check_remote_input_interrupt_request): New function.
15832 * server.h (check_remote_input_interrupt_request): Declare.
15833 * win32-low.c (winapi_DebugBreakProcess,
15834 winapi_GenerateConsoleCtrlEvent): New typedefs.
15835 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15836 to 250 ms.
15837 (win32_wait): Check for remote interrupt request
15838 with check_remote_input_interrupt_request.
15839 (win32_request_interrupt): New function.
15840 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15841
158422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15843
15844 * win32-low.c (debug_registers_changed,
15845 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15846 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15847 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15848 (thread_rec): Get context using the low target.
15849 (child_add_thread): Call thread_added on the low target,
15850 which does the same thing.
15851 (regptr): Delete.
15852 (do_initial_child_stuff): Remove debug registers references.
15853 Set context using the low target. Resume threads after
15854 setting the contexts.
15855 (child_continue): Remove dead variable. Remove debug
15856 registers references.
15857 (child_fetch_inferior_registers): Go through the low target.
15858 (do_child_store_inferior_registers): Remove.
15859 (child_store_inferior_registers): Go through the low target.
15860 (win32_resume): Remove debug registers references.
15861 Set context using the low target.
15862 (handle_exception): Change return type to void. Don't record
15863 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15864 first chance exception.
15865 (get_child_debug_event): Change return type to void. Remove
15866 goto loop. Always return after waiting for debug event.
15867 (win32_wait): Convert to switch statement. Handle spurious
15868 events.
15869
15870 * win32-i386-low.c (debug_registers_changed,
15871 debug_registers_used): New.
15872 (initial_stuff): Rename to ...
15873 (i386_initial_stuff): ... this. Clear debug registers
15874 state variables.
15875 (store_debug_registers): Delete.
15876 (i386_get_thread_context): New.
15877 (load_debug_registers): Delete.
15878 (i386_set_thread_context): New.
15879 (i386_thread_added): New.
15880 (single_step): Rename to ...
15881 (i386_single_step): ... this.
15882 (do_fetch_inferior_registers): Rename to ...
15883 (i386_fetch_inferior_register): ... this.
15884 (i386_store_inferior_register): New.
15885 (the_low_target): Adapt to new interface.
15886
15887 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15888 (arm_get_thread_context): New.
15889 (arm_set_thread_context): New.
15890 (regptr): New.
15891 (do_fetch_inferior_registers): Rename to ...
15892 (arm_fetch_inferior_register): ... this.
15893 (arm_store_inferior_register): New.
15894 (arm_wince_breakpoint): Reimplement as unsigned long.
15895 (arm_wince_breakpoint_len): Define.
15896 (the_low_target): Adapt to new interface.
15897
15898 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15899 load_debug_registers. Add get_thread_context, set_thread_context,
15900 thread_added and store_inferior_register. Rename
15901 fetch_inferior_registers to fetch_inferior_register.
15902 (regptr): Remove declaration.
15903
159042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15905
15906 * linux-low.c (linux_detach): Change return type to int. Return 0.
15907 * spu-low.c (spu_detach): Likewise.
15908
159092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15910
15911 * target.h (target_ops): Change return type of detach to int.
15912 Add join.
15913 (join_inferior): New.
15914 * server.c (main): Don't skip detach support on mingw32.
15915 If the inferior doesn't support detaching return error.
15916 Call join_inferior instead of using waitpid.
15917 * linux-low.c (linux_join): New.
15918 (linux_target_op): Add linux_join.
15919 * spu-low.c (spu_join): New.
15920 (spu_target_ops): Add spu_join.
15921 * win32-low.c (win32_detach): Adapt to new interface.
15922 Reopen current_process_handle before detaching. Issue a child
15923 resume before detaching.
15924 (win32_join): New.
15925 (win32_target_op): Add win32_join.
15926
159272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15928
15929 * win32-low.c (win32-attach): Fix return value.
15930 * target.h (target_ops): Describe ATTACH return values.
15931
159322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15933
15934 * win32-low.c (GETPROCADDRESS): Define.
15935 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15936 (winapi_DebugSetProcessKillOnExit): Likewise.
15937 (win32_create_inferior): Force usage of ansi CreateProcessA.
15938 (win32_attach): Use GETPROCADDRESS.
15939 (win32_detach): Likewise.
15940
159412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15942
15943 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15944
159452007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15946
15947 * win32-low.c: Commit leftover changes from 2007-03-29.
15948
159492007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15950
15951 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15952 fields short instead of int. Add explicit padding.
15953 (i387_cache_to_fsave): Remove unnecessary casts.
15954 (i387_fsave_to_cache): Doc fix.
15955 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15956
159572007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15958
15959 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15960 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15961
159622007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15963
15964 * configure.srv (arm*-*-mingw32ce*): Move near the other
15965 arm targets.
15966
159672007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15968
15969 * configure.ac: Add errno checking.
15970 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15971 sys/file.h and malloc.h.
15972 (AC_CHECK_DECLS): Add perror.
15973 (srv_mingwce): Handle.
15974 * configure.srv (i[34567]86-*-cygwin*): Add
15975 win32-i386-low.o to srv_tgtobj.
15976 (i[34567]86-*-mingw*): Likewise.
15977 (arm*-*-mingw32ce*): Add case.
15978 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15979 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15980 [__MINGW32CE__] (strerror): New function.
15981 [__MINGW32CE__] (errno): Define to GetLastError.
15982 [__MINGW32CE__] (COUNTOF): New macro.
15983 (remote_open): Remove extra close call.
15984 * mem-break.c (delete_breakpoint_at): New function.
15985 * mem-break.h (delete_breakpoint_at): Declare.
15986 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15987 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15988 [USE_WIN32API] (read, write): Add char* casts.
15989 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15990 * server.h: Include wincecompat.h on Windows CE.
15991 [HAVE_ERRNO_H]: Check.
15992 (perror): Declare if not declared.
15993 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15994 (perror_with_name): Remove errno declaration.
15995 * wincecompat.h: New.
15996 * wincecompat.c: New.
15997 * win32-low.h: New.
15998 * win32-arm-low.c: New.
15999 * win32-i386-low.c: New.
16000 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16001 (OUTMSG2): Make it safe.
16002 (_T): New macro.
16003 (COUNTOF): New macro.
16004 (NUM_REGS): Get it from the low target.
16005 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16006 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16007 (thread_rec): Let low target handle debug registers.
16008 (child_add_thread): Likewise.
16009 (child_init_thread_list): Likewise.
16010 (continue_one_thread): Likewise.
16011 (regptr): New.
16012 (do_child_fetch_inferior_registers): Move to ...
16013 * win32-i386-low.c: ... here, and rename to ...
16014 (do_fetch_inferior_registers): ... this.
16015 * win32-low.c (child_fetch_inferior_registers):
16016 Go through the low target.
16017 (do_child_store_inferior_registers): Use regptr.
16018 (strwinerror): New function.
16019 (win32_create_inferior): Handle Windows CE.
16020 Use strwinerror instead of strerror on Windows error
16021 codes. Add program to the error output.
16022 Don't close the main thread handle on Windows CE.
16023 (win32_attach): Use coredll.dll on Windows CE.
16024 (win32_kill): Close current process and current
16025 thread handles.
16026 (win32_detach): Use coredll.dll on Windows CE.
16027 (win32_resume): Let low target handle debug registers, and
16028 step request.
16029 (handle_exception): Add/Remove initial breakpoint. Avoid
16030 non-existant WSTOPSIG on Windows CE.
16031 (win32_read_inferior_memory): Cast to remove warning.
16032 (win32_arch_string): Go through the low target.
16033 (initialize_low): Call set_breakpoint_data with the low
16034 target's breakpoint.
16035 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16036 FOP_REGNUM, mappings): Move to ...
16037 * win32-i386-low.c: ... here.
16038 * win32-low.c (win32_thread_info): Move to ...
16039 * win32-low.h: ... here.
16040 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16041 win32-arm-low.c and wincecompat.c.
16042 (all:): Add $EXEEXT.
16043 (install-only:): Likewise.
16044 (gdbserver:): Likewise.
16045 (gdbreplay:): Likewise.
16046 * config.in: Regenerate.
16047 * configure: Regenerate.
16048
160492007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16050
16051 * win32-low.c: Rename typedef thread_info to
16052 win32_thread_info throughout.
16053
160542007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16055
16056 * win32-i386-low.c: Rename to ...
16057 * win32-low.c: ... this.
16058 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16059 * Makefile.in: Likewise.
16060
160612007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16062
16063 * remote-utils.c (monitor_output): Constify msg parameter.
16064 * server.h (monitor_output): Likewise.
16065 * win32-i386-low.c (handle_output_debug_string): New.
16066 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16067 handle_output_debug_string.
16068 (get_child_debug_event): Likewise.
16069
160702007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16071
16072 * server.c (main): Correct strtoul check.
16073
160742007-03-27 Jon Ringle <jon@ringle.org>
16075
16076 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16077
160782007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16079
16080 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16081
160822007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16083
16084 * terminal.h: Check HAVE_SGTTY_H.
16085
160862007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16087
16088 * remote-utils.c (remote_open): Print out the assigned port number.
16089
160902007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16091
16092 * remote-utils.c (monitor_output): New function.
16093 * server.c (debug_threads): Define here.
16094 (monitor_show_help): New function.
16095 (handle_query): Handle qRcmd.
16096 (main): Do not handle 'd' packet.
16097 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16098 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16099 of debug_threads.
16100
161012007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16102
16103 * Makefile.in (EXEEXT): New.
16104 (clean): Use $(EXEEXT).
16105
161062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16107
16108 * target.h (target_ops): Rename send_signal to request_interrupt,
16109 and remove enum target_signal parameter.
16110 * linux-low.c (linux_request_interrupt): Rename from
16111 linux_send_signal, and always send SIGINT.
16112 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16113 and always send SIGINT.
16114 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16115 of send_signal.
16116 (input_interrupt): Likewise.
16117
161182007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16119
16120 * server.c (get_features_xml): Check if target implemented
16121 arch_string.
16122 * win32-i386-low.c (win32_arch_string): New.
16123 (win32_target_ops): Add win32_arch_string as arch_string member.
16124
161252007-02-22 Markus Deuling <deuling@de.ibm.com>
16126
16127 * spu-low.c (spu_arch_string): New.
16128 (spu_target_ops): Add spu_arch_string.
16129
161302007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16131
16132 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16133 * configure.ac: Do not check for terminal.h.
16134 * configure, config.in: Regenerated.
16135
161362007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16137
16138 * Makefile.in (OBS): Add $(XML_BUILTIN).
16139 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16140 (clean): Update.
16141 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16142 (arm-with-iwmmxt.c): New.
16143 * config.in, configure: Regenerate.
16144 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16145 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16146 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16147 (arm*-*-linux*): Add iWMMXt and regset support.
16148 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16149 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16150 (arm_store_wmmxregset, target_regsets): New.
16151 * server.c (get_features_xml): Take annex argument. Check builtin
16152 XML documents.
16153 (handle_query): Handle multiple annexes.
16154
161552007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16156
16157 * remote-utils.c [USE_WIN32API] (read, write): Define.
16158 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16159 write.
16160
161612007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16162
16163 * linux-i386-low.c (the_low_target): Set arch_string.
16164 * linux-x86-64-low.c (the_low_target): Likewise.
16165 * linux-low.c (linux_arch_string): New.
16166 (linux_target_ops): Add it.
16167 * linux-low.h (struct linux_target_ops): Add arch_string.
16168 * server.c (write_qxfer_response): Use const void * for DATA.
16169 (get_features_xml): New.
16170 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16171 * target.h (struct target_ops): Add arch_string method.
16172
161732007-01-03 Denis Pilat <denis.pilat@st.com>
16174 Daniel Jacobowitz <dan@codesourcery.com>
16175
16176 * linux-low.c (linux_kill): Handle being called with no threads.
16177 * win32-i386-low.c (win32_kill): Likewise.
16178 (get_child_debug_event): Clear current_process_handle.
16179
161802006-12-30 Denis PILAT <denis.pilat@st.com>
16181 Daniel Jacobowitz <dan@codesourcery.com>
16182
16183 * remote-utils.c (remote_open): Check the type of specified
16184 serial port devices before opening them.
16185 * server.c (main): Kill the inferior if an error occurs during
16186 the first remote_open.
16187
161882006-12-05 Markus Deuling <deuling@de.ibm.com>
16189
16190 * README: Update supported targets.
16191
161922006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16193
16194 * Makefile.in (clean): Remove reg-mips64.c.
16195 (reg-mips64.c, reg-mips64.o): New rules.
16196 * configure.srv: Handle mips64. Include regset support for mips.
16197 * linux-mips-low.c (union mips_register): New.
16198 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16199 (mips_breakpoint, mips_breakpoint_at): Use int.
16200 (mips_collect_register, mips_supply_register)
16201 (mips_collect_register_32bit, mips_supply_register_32bit)
16202 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16203 (mips_store_fpregset, target_regsets): New.
16204 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16205
162062006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16207
16208 * configure.srv: Add target "spu*-*-*".
16209 * Makefile.in (clean): Remove reg-spu.c.
16210 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16211 * spu-low.c: New file.
16212
162132006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16214
16215 * configure.ac: Correct td_thr_tls_get_addr test.
16216 * configure: Regenerated.
16217
162182006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16219
16220 * linux-low.c (linux_wait_for_event): Reformat. Use the
16221 pass_signals array.
16222 * remote-utils.c (decode_address_to_semicolon): New.
16223 * server.c (pass_signals, handle_general_set): New.
16224 (handle_query): Mention QPassSignals for qSupported.
16225 (main): Call handle_general_set.
16226 * server.h (pass_signals, decode_address_to_semicolon): New.
16227
162282006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16229
16230 * server.c (handle_query): Correct error handling for read_auxv.
16231
162322005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16233
16234 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16235 and srv_linux_thread_db to yes.
16236 * linux-s390-low.c (s390_fill_gregset): New function.
16237 (target_regsets): Define data structure.
16238
162392006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16240
16241 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16242 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16243 * config.in, configure: Regenerated.
16244 * inferiors.c (gdb_id_to_thread): New function.
16245 (gdb_id_to_thread_id): Use it.
16246 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16247 * linux-low.h (struct process_info): Add th member.
16248 (thread_db_get_tls_address): New prototype.
16249 * remote-utils.c (decode_address): Make non-static.
16250 * server.c (handle_query): Handle qGetTLSAddr.
16251 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16252 * target.h (struct target_ops): Add get_tls_address.
16253 * thread-db.c (maybe_attach_thread): Save the thread handle.
16254 (thread_db_get_tls_address): New.
16255
162562006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16257
16258 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16259 (linux_resume_one_process): Take a siginfo_t *. Update all
16260 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16261 (struct pending_signals): Add a siginfo_t.
16262 (linux_wait_for_process): Always set last_status.
16263 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16264 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16265 * linux-low.h (struct process_info): Add last_status.
16266
162672006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16268
16269 * remote-utils.c (try_rle): New function.
16270 (putpkt_binary): Use it.
16271
162722006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16273
16274 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16275 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16276 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16277 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16278 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16279 point registers.
16280
162812006-08-08 Richard Sandiford <richard@codesourcery.com>
16282
16283 * server.c (terminal_fd): New variable.
16284 (old_foreground_pgrp): Likewise.
16285 (restore_old_foreground_pgrp): New function.
16286 (start_inferior): Record the terminal file descriptor in terminal_fd
16287 and its original foreground group in old_foreground_pgrp. Register
16288 restore_old_foreground_pgrp with atexit().
16289
162902006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16291
16292 * server.c (handle_query): Correct qPart to qXfer.
16293
162942006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16295
16296 * configure.ac: Check for more headers which are missing on
16297 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16298 * configure.srv: Add Cygwin and mingw32.
16299 * remote-utils.c: Don't include headers unconditionally which
16300 are missing on mingw32. Include <winsock.h> for mingw32.
16301 (remote_open): Adjust for mingw32 support. Flush
16302 standard error after writing to it.
16303 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16304 (unblock_async_io, enable_async_io, disable_async_io)
16305 (readchar, getpkt): Update for Winsock support.
16306 (prepare_resume_reply): Expect a protocol signal number.
16307 * server.c: Disable <sys/wait.h> on mingw32.
16308 (start_inferior): Adjust for mingw32 support. Flush
16309 standard error after writing to it.
16310 (attach_inferior): Likewise. Use protocol signal
16311 numbers.
16312 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16313 and names.
16314 * win32-i386-low.c: New file.
16315 * Makefile.in (XM_CLIBS): Set.
16316 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16317 (win32-i386-low.o): New dependency rule.
16318 * linux-low.c (linux_wait): Use target signal numbers.
16319 * target.h (struct target_ops): Doc fix.
16320 * server.h (target_signal_to_name): New prototype.
16321 * gdbreplay.c: Don't include headers unconditionally which
16322 are missing on mingw32. Include <winsock.h> for mingw32.
16323 (remote_close, remote_open): Adjust for Winsock support.
16324 * configure, config.in: Regenerated.
16325
163262006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16327
16328 * server.c (decode_xfer_read, write_qxfer_response): New.
16329 (handle_query): Take a packet length argument. Handle
16330 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16331 the qSupported response.
16332 (main): Update call to handle_query.
16333
163342006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16335
16336 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16337 (putpkt_binary): Renamed from putpkt and adjusted for binary
16338 data.
16339 (putpkt): New wrapper for putpkt_binary.
16340 (readchar): Don't mask off the high bit.
16341 (decode_X_packet): New function.
16342 * server.c (main): Call putpkt_binary if a handler sets the packet
16343 length. Save the length of the incoming packet. Handle 'X'.
16344 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16345
163462006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16347
16348 * server.c (handle_query): Handle qSupported.
16349
163502006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16351
16352 * remote-utils.c (all_symbols_looked_up): New variable.
16353 (look_up_one_symbol): Check it.
16354 * server.h (look_up_one_symbol): New declaration.
16355 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16356
163572006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16358
16359 * Makefile.in (linux-arm-low.o): Update dependencies.
16360 * linux-arm-low.c: Include "gdb_proc_service.h".
16361 (PTRACE_GET_THREAD_AREA): Define.
16362 (ps_get_thread_area): New function.
16363
163642006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16365
16366 * configure.srv (m68k*-*-uclinux*): New target.
16367 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16368 (linux_resume_one_process): Remove extraneous cast.
16369 (linux_read_offsets): New.
16370 (linux_target_op): Add linux_read_offsets on mmuless systems.
16371 * server.c (handle_query): Add qOffsets logic.
16372 * target.h (struct target_ops): Add read_offsets.
16373
163742006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16375
16376 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16377 (PTRACE_GET_THREAD_AREA): Define.
16378 (ps_get_thread_area): New function.
16379 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16380 (linux-x86-64-low.o): Update.
16381
163822006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16383
16384 * configure.ac: Remove checks for prfpregset_t.
16385 * gdb_proc_service.h: New file.
16386 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16387 new "gdb_proc_service.h".
16388 * proc-service.c: Likewise.
16389 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16390 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16391 * Makefile.in (gdb_proc_service_h): Updated.
16392 * configure, config.in: Regenerated.
16393
163942006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16395
16396 * remote-utils.c (prepare_resume_reply): Move declaration
16397 of gdb_id_from_wait to the top of the block.
16398
163992006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16400
16401 * linux-low.c (regsets_store_inferior_registers): Read the regset
16402 from the target before filling it.
16403
164042006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16405
16406 * server.c (attach_inferior): Return SIGTRAP for a successful
16407 attach.
16408
164092006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16410
16411 * Makefile.in (OBS): Add version.o.
16412 (STAGESTUFF): Delete.
16413 (version.o): Add dependencies.
16414 (version.c): Replace rule.
16415 (clean): Remove version.c.
16416 * server.c (gdbserver_version): New.
16417 (gdbserver_usage): Use printf.
16418 (main): Handle --version and --help.
16419 * server.h (version, host_name): Add declarations.
16420
164212005-12-23 Eli Zaretskii <eliz@gnu.org>
16422
16423 * linux-arm-low.c:
16424 * linux-arm-low.c:
16425 * inferiors.c:
16426 * i387-fp.h:
16427 * i387-fp.c:
16428 * gdbreplay.c:
16429 * regcache.c:
16430 * proc-service.c:
16431 * mem-break.h:
16432 * mem-break.c:
16433 * linux-x86-64-low.c:
16434 * linux-sh-low.c:
16435 * linux-s390-low.c:
16436 * linux-ppc64-low.c:
16437 * linux-ppc-low.c:
16438 * linux-mips-low.c:
16439 * linux-m68k-low.c:
16440 * linux-m32r-low.c:
16441 * linux-low.h:
16442 * linux-low.c:
16443 * linux-ia64-low.c:
16444 * linux-i386-low.c:
16445 * linux-crisv32-low.c:
16446 * thread-db.c:
16447 * terminal.h:
16448 * target.h:
16449 * target.c:
16450 * server.h:
16451 * server.c:
16452 * remote-utils.c:
16453 * regcache.h:
16454 * utils.c:
16455 * Makefile.in:
16456 * configure.ac:
16457 * gdbserver.1: Add (C) after Copyright. Update the FSF
16458 address.
16459
164602005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16461
16462 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16463 (arm_breakpoint_at): Recognize both breakpoints.
16464 (the_low_target): Use the correct breakpoint instruction.
16465
164662005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16467
16468 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16469 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16470 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16471 (the_low_target): Update.
16472
164732005-10-25 Andreas Schwab <schwab@suse.de>
16474
16475 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16476
16477 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16478 (ia64_num_regs): Reduce to 462.
16479
164802005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16481
16482 * acinclude.m4: Correct quoting.
16483 * aclocal.m4: Regenerated.
16484
16485 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16486 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16487 (thread_db_init): Call thread_db_err_str.
16488 * configure.ac: Check for TD_VERSION.
16489 * config.in, configure: Regenerated.
16490
164912005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16492
16493 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16494
164952005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16496
16497 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16498 is not available. Define HAVE_PTRACE_GETREGS if it is.
16499 * config.in, configure: Regenerated.
16500 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16501 * linux-i386-low.c, linux-m68k-low.c: Update to use
16502 HAVE_PTRACE_GETREGS.
16503 * linux-low.c (regsets_fetch_inferior_registers)
16504 (regsets_store_inferior_registers): Only return 0 if we processed
16505 GENERAL_REGS.
16506 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16507 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16508
165092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16510
16511 * inferiors.c (struct thread_info): Add gdb_id.
16512 (add_thread): Add gdb_id argument.
16513 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16514 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16515 calls to add_thread.
16516 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16517 * server.c (handle_query): Use thread_to_gdb_id.
16518 (handle_v_cont, main): Use gdb_id_to_thread_id.
16519 * server.h (add_thread): Update prototype.
16520 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16521 prototypes.
16522
165232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16524
16525 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16526 left-padded registers.
16527 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16528 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16529
165302005-07-01 Steve Ellcey <sje@cup.hp.com>
16531
16532 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16533 * configure: Regenerate.
16534 * config.in: Regenerate.
16535 * server.h (NEED_DECLARATION_STRERROR):
16536 Replace with !HAVE_DECL_STRERROR.
16537
165382005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16539
16540 * linux-low.c (linux_wait, linux_send_signal): Don't test
16541 an unsigned long variable for > 0 if it could be MAX_ULONG.
16542 * server.c (myresume): Likewise.
16543 * target.c (set_desired_inferior): Likewise.
16544
165452005-06-13 Mark Kettenis <kettenis@gnu.org>
16546
16547 * configure.ac: Simplify and improve check for socklen_t.
16548 * configure, config.in: Regenerate.
16549
165502005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16551
16552 * acconfig.h: Remove.
16553 * configure.ac: Add a test for socklen_t. Use three-argument
16554 AC_DEFINE throughout.
16555 * config.in: Regenerated using autoheader 2.59.
16556 * configure: Regenerated.
16557
16558 * gdbreplay.c (socklen_t): Provide a default.
16559 (remote_open): Use socklen_t.
16560 * remote-utils.c (socklen_t): Provide a default.
16561 (remote_open): Use socklen_t.
16562 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16563 unsigned char.
16564
16565 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16566 char for buffers.
16567 * linux-low.c (linux_read_memory, linux_write_memory)
16568 (linux_read_auxv): Likewise.
16569 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16570 (check_mem_write): Likewise.
16571 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16572 Likewise.
16573 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16574 (registers_from_string, register_data): Likewise.
16575 * server.c (handle_query, main): Likewise.
16576 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16577 (decode_M_packet): Likewise.
16578 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16579 * target.h (struct target_ops): Update read_memory, write_memory,
16580 and read_auxv.
16581 (read_inferior_memory, write_inferior_memory): Update.
16582 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16583 to unsigned char *.
16584 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16585 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16586 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16587 linux-s390-low.c, linux-sh-low.c: Update for changes in
16588 read_inferior_memory and the_low_target->breakpoint.
16589
165902005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16591
16592 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16593 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16594 * configure.srv: Add powerpc64-*-linux*.
16595 * linux-ppc64-low.c: New file.
16596
165972005-05-23 Orjan Friberg <orjanf@axis.com>
16598
16599 * linux-cris-low.c: New file with support for CRIS.
16600 * linux-crisv32-low.c: Ditto for CRISv32.
16601 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16602 (clean): Add reg-cris.c and reg-crisv32.c.
16603 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16604 reg-crisv32.o, and reg-crisv32.c to make rules.
16605 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16606 recognized targets.
16607
166082005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16609
16610 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16611 of sizeof (PTRACE_XFER_TYPE).
16612 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16613
166142005-05-12 Orjan Friberg <orjanf@axis.com>
16615
16616 * target.h (struct target_ops): Add insert_watchpoint,
16617 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16618 pointers for hardware watchpoint support.
16619 * linux-low.h (struct linux_target_ops): Ditto.
16620 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16621 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16622 to linux_target_ops.
16623 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16624 reply packet.
16625 * server.c (main): Recognize 'Z' and 'z' packets.
16626
166272005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16628
16629 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16630 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16631 (the_low_target): Add new members.
16632
166332005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16634
16635 * proc-service.c (ps_lgetregs): Search all_processes instead of
16636 all_threads.
16637
166382005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16639
16640 * server.c (start_inferior): Change return type to int.
16641 (attach_inferior): Change sigptr to int *.
16642 (handle_v_cont, handle_v_requests): Change signal to int *.
16643 (main): Change signal to int.
16644
166452005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16646
16647 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16648 * configure.srv: Add m32r*-*-linux*.
16649 * linux-m32r-low.c: New file.
16650
166512005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16652
16653 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16654
166552005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16656
16657 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16658 Take unsigned long arguments for PIDs.
16659 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16660 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16661 (wait_for_sigstop, linux_resume_one_process)
16662 (regsets_fetch_inferior_registers, linux_send_signal)
16663 (linux_read_auxv): Likewise. Update the types of variables holding
16664 PIDs. Update format string specifiers.
16665 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16666 * remote-utils.c (prepare_resume_reply): Likewise.
16667 * server.c (cont_thread, general_thread, step_thread)
16668 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16669 unsigned long.
16670 (handle_query): Update format specifiers.
16671 (handle_v_cont, main): Use strtoul for thread IDs.
16672 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16673 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16674 (general_thread, step_thread, thread_from_wait)
16675 (old_thread_from_wait): Update.
16676 * target.h (struct thread_resume): Use unsigned long for THREAD.
16677 (struct target_ops): Use unsigned long for arguments to attach and
16678 thread_alive.
16679
166802005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16681
16682 * acinclude.m4: Include bfd/bfd.m4 directly.
16683 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16684 <agriffis@toolchain.org>.
16685 * aclocal.m4, configure: Regenerated.
16686
166872005-01-07 Andrew Cagney <cagney@gnu.org>
16688
16689 * configure.ac: Rename configure.in, require autoconf 2.59.
16690 * configure: Re-generate.
16691
166922004-12-08 Daniel Jacobowitz <dan@debian.org>
16693
16694 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16695 LIBS when finished.
16696 * aclocal.m4: Regenerated.
16697 * configure: Regenerated.
16698
166992004-11-21 Andreas Schwab <schwab@suse.de>
16700
16701 * linux-m68k-low.c (m68k_num_gregs): Define.
16702 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16703 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16704 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16705 (m68k_breakpoint_at): New. Add to the_low_target.
16706
16707 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16708 srv_linux_thread_db to yes.
16709
167102004-10-20 Joel Brobecker <brobecker@gnat.com>
16711
16712 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16713 (ARCH_SET_FS): Likewise.
16714 (ARCH_GET_FS): Likewise.
16715 (ARCH_GET_GS): Likewise.
16716
167172004-10-16 Daniel Jacobowitz <dan@debian.org>
16718
16719 * linux-i386-low.c (ps_get_thread_area): New.
16720 * linux-x86-64-low.c (ps_get_thread_area): New.
16721 * linux-low.c: Include <sys/syscall.h>.
16722 (linux_kill_one_process): Don't kill the first thread here.
16723 (linux_kill): Kill the first thread here.
16724 (kill_lwp): New function.
16725 (send_sigstop, linux_send_signal): Use it.
16726 * proc-service.c: Clean up #ifdefs.
16727 (fpregset_info): Delete.
16728 (ps_lgetregs): Update and enable implementation.
16729 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16730 implementations.
16731 * remote-utils.c (struct sym_cache, symbol_cache): New.
16732 (input_interrupt): Print a clearer message.
16733 (async_io_enabled): New variable.
16734 (enable_async_io, disable_async_io): Use it. Update comments.
16735 (look_up_one_symbol): Use the symbol cache.
16736 * thread-db.c (thread_db_look_up_symbols): New function.
16737 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16738
167392004-10-16 Daniel Jacobowitz <dan@debian.org>
16740
16741 * configure.in: Test for -rdynamic.
16742 * configure: Regenerated.
16743 * Makefile (INTERNAL_LDFLAGS): New.
16744 (gdbserver, gdbreplay): Use it.
16745
167462004-09-02 Andrew Cagney <cagney@gnu.org>
16747
16748 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16749
167502004-03-23 Daniel Jacobowitz <drow@mvista.com>
16751
16752 * linux-low.c (linux_wait): Clear all_processes list also.
16753
167542004-03-12 Daniel Jacobowitz <drow@mvista.com>
16755
16756 * linux-low.c: Include <errno.h>. Remove extern declaration of
16757 errno.
16758
167592004-03-12 Daniel Jacobowitz <drow@mvista.com>
16760
16761 * gdbreplay.c, server.h, utils.c: Update copyright years.
16762
167632004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16764
16765 * server.c (main): Print child status or termination signal from
16766 variable 'signal', not 'sig'.
16767
167682004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16769
16770 * linux-low.c (linux_read_memory): Change return type to
16771 int. Check for and return error from ptrace().
16772 * target.c (read_inferior_memory): Change return type to int. Pass
16773 back return status from the_target->read_memory().
16774 * target.h (struct target_ops): Adapt *read_memory() prototype.
16775 Update comment.
16776 (read_inferior_memory): Adapt prototype.
16777 * server.c (main): Return an error packet if
16778 read_inferior_memory() returns an error.
16779
167802004-03-04 Daniel Jacobowitz <drow@mvista.com>
16781
16782 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16783 Unify with other clean targets.
16784
167852004-02-29 Daniel Jacobowitz <drow@mvista.com>
16786
16787 * server.c (handle_v_cont): Call set_desired_inferior.
16788
167892004-02-29 Daniel Jacobowitz <drow@mvista.com>
16790
16791 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16792
167932004-02-29 Daniel Jacobowitz <drow@mvista.com>
16794
16795 * linux-low.c (linux_wait): Unblock async I/O.
16796 (linux_resume): Block and enable async I/O.
16797 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16798 * server.h (block_async_io, unblock_async_io): Add prototypes.
16799
168002004-02-29 Daniel Jacobowitz <drow@mvista.com>
16801
16802 * remote-utils.c (remote_open): Print a status notice after
16803 opening a TCP port.
16804 * server.c (attach_inferior): Print a status notice after
16805 attaching.
16806
168072004-02-29 Daniel Jacobowitz <drow@mvista.com>
16808
16809 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16810
168112004-02-26 Daniel Jacobowitz <drow@mvista.com>
16812
16813 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16814 error packet.
16815 * server.c, target.h: Update copyright years.
16816
168172004-02-25 Roland McGrath <roland@redhat.com>
16818
16819 * target.h (struct target_ops): New member `read_auxv'.
16820 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16821 * linux-low.c (linux_read_auxv): New function.
16822 (linux_target_ops): Initialize `read_auxv' member to that.
16823
168242004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16825
16826 Committed by Jim Blandy <jimb@redhat.com>.
16827
16828 * linux-s390-low.c (s390_num_regs): Update.
16829 (s390_regmap): Remove control registers. Use __s390x__ predefine
16830 instead of GPR_SIZE to distiguish s390 and s390x targets.
16831
168322004-01-31 Daniel Jacobowitz <drow@mvista.com>
16833
16834 * linux-low.c: Update copyright year.
16835 (check_removed_breakpoint): Clear pending_is_breakpoint.
16836 (linux_set_resume_request, linux_queue_one_thread)
16837 (resume_status_pending_p): New functions.
16838 (linux_continue_one_thread): Use process->resume.
16839 (linux_resume): Only resume threads if there are no pending events.
16840 * linux-low.h (struct process_info): Add resume request
16841 pointer.
16842
168432004-01-30 Daniel Jacobowitz <drow@mvista.com>
16844
16845 * regcache.c (new_register_cache): Clear the allocated register
16846 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16847
168482003-10-13 Daniel Jacobowitz <drow@mvista.com>
16849
16850 * linux-low.c (linux_resume): Take a struct thread_resume *
16851 argument.
16852 (linux_wait): Update call.
16853 (resume_ptr): New static variable.
16854 (linux_continue_one_thread): Renamed from
16855 linux_continue_one_process. Use resume_ptr.
16856 (linux_resume): Use linux_continue_one_thread.
16857 * server.c (handle_v_cont, handle_v_requests): New functions.
16858 (myresume): New function.
16859 (main): Handle 'v' case.
16860 * target.h (struct thread_resume): New type.
16861 (struct target_ops): Change argument of "resume" to struct
16862 thread_resume *.
16863 (myresume): Delete macro.
16864
168652003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16866
16867 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16868 (uninstall): Support DESTDIR.
16869
16870Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16871
16872 * configure.srv: Add xscale*linux copy of arm*linux entry.
16873
168742003-07-24 Daniel Jacobowitz <drow@mvista.com>
16875
16876 * linux-arm-low.c (arm_reinsert_addr): New function.
16877 (the_low_target): Add arm_reinsert_addr.
16878
168792003-07-08 Mark Kettenis <kettenis@gnu.org>
16880
16881 * mem-break.c: Remove whitespace at end of file.
16882
168832003-06-28 Daniel Jacobowitz <drow@mvista.com>
16884
16885 * configure.in: Check whether we need to prototype strerror.
16886 * server.h: Optionally prototype strerror.
16887 * gdbreplay.c (perror_with_name): Use strerror.
16888 * linux-low.c (linux_attach_lwp): Use strerror.
16889 * utils.c (perror_with_name): Use strerror.
16890 * config.in, configure: Regenerated.
16891
168922003-06-28 Daniel Jacobowitz <drow@mvista.com>
16893
16894 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16895 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16896
168972003-06-20 Daniel Jacobowitz <drow@mvista.com>
16898
16899 * Makefile.in (SFILES): Update.
16900 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16901 low-sun3.c: Remove files.
16902
169032003-06-17 Daniel Jacobowitz <drow@mvista.com>
16904
16905 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16906 (linux_detach_one_process, linux_detach): New functions.
16907 (linux_target_ops): Add linux_detach.
16908 * server.c (main): Handle 'D' packet.
16909 * target.h (struct target_ops): Add "detach" member.
16910 (detach_inferior): Define.
16911
169122003-06-13 Mark Kettenis <kettenis@gnu.org>
16913
16914 From Kelley Cook <kelleycook@wideopenwest.com>:
16915 * configure.srv: Accept i[34567]86 variants.
16916
169172003-06-05 Daniel Jacobowitz <drow@mvista.com>
16918
16919 * linux-low.c (linux_wait_for_event): Correct comment typos.
16920 (linux_resume_one_process): Call check_removed_breakpoint.
16921 (linux_send_signal): New function.
16922 (linux_target_ops): Add linux_send_signal.
16923 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16924 of kill.
16925 * target.h (struct target_ops): Add send_signal.
16926
169272003-05-29 Jim Blandy <jimb@redhat.com>
16928
16929 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16930 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16931 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16932 away part of the register's value.
16933
169342003-03-26 Daniel Jacobowitz <drow@mvista.com>
16935
16936 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16937 (linux_wait_for_event, linux_init_signals): Likewise.
16938
169392003-03-17 Daniel Jacobowitz <drow@mvista.com>
16940
16941 * configure.in: Check for stdlib.h.
16942 * configure: Regenerated.
16943 * config.in: Regenerated.
16944
169452003-01-04 Andreas Schwab <schwab@suse.de>
16946
16947 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16948
169492003-01-02 Andrew Cagney <ac131313@redhat.com>
16950
16951 * Makefile.in: Remove obsolete code.
16952
169532002-11-20 Daniel Jacobowitz <drow@mvista.com>
16954
16955 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16956 defined(PT_FPR0_HI).
16957
169582002-11-17 Stuart Hughes <seh@zee2.com>
16959
16960 * linux-arm-low.c (arm_num_regs): Increase.
16961 (arm_regmap): Include status register.
16962
169632002-11-17 Daniel Jacobowitz <drow@mvista.com>
16964
16965 * linux-low.c (register_addr): Remove incorrect -1 check.
16966
169672002-08-29 Daniel Jacobowitz <drow@mvista.com>
16968
16969 * linux-low.c (linux_create_inferior): Call setpgid. Return
16970 the new PID.
16971 (unstopped_p, linux_signal_pid): Remove.
16972 (linux_target_ops): Remove linux_signal_pid.
16973 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16974 global instead of target method.
16975 * target.h (struct target_ops): Remove signal_pid. Update comment
16976 for create_inferior.
16977 * server.c (signal_pid): New variable.
16978 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16979 gdbserver. Set the child to be the foreground process group.
16980 (attach_inferior): Set signal_pid.
16981
169822002-08-23 Daniel Jacobowitz <drow@mvista.com>
16983
16984 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16985
169862002-08-20 Jim Blandy <jimb@redhat.com>
16987
16988 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16989 default for this.
16990
169912002-08-01 Andrew Cagney <cagney@redhat.com>
16992
16993 * Makefile.in: Make chill references obsolete.
16994
169952002-07-24 Kevin Buettner <kevinb@redhat.com>
16996
16997 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16998 * configure: Regenerate.
16999 * config.in: Regenerate.
17000
170012002-07-09 David O'Brien <obrien@FreeBSD.org>
17002
17003 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17004 (perror_with_name, remote_close, remote_open, expect, play): Static.
17005
170062002-07-04 Michal Ludvig <mludvig@suse.cz>
17007
17008 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17009 byte offsets instead of an array of indexes.
17010 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17011
170122002-06-13 Daniel Jacobowitz <drow@mvista.com>
17013
17014 * regcache.c: Add comment.
17015
170162002-06-11 Daniel Jacobowitz <drow@mvista.com>
17017
17018 * thread-db.c: New file.
17019 * proc-service.c: New file.
17020 * acinclude.m4: New file.
17021 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17022 proc-service.o, and thread-db.o.
17023 (linux-low.o): Add USE_THREAD_DB.
17024 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17025 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17026 * aclocal.m4: Regenerated.
17027 * config.in: Regenerated.
17028 * configure: Regenerated.
17029 * configure.in: Check for proc_service.h, sys/procfs.h,
17030 thread_db.h, and linux/elf.h headrs.
17031 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17032 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17033 Check for -lthread_db and thread support.
17034 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17035 PowerPC, and SuperH.
17036 * i387-fp.c: Constify arguments.
17037 * i387-fp.h: Likewise.
17038 * inferiors.c: (struct thread_info): Renamed from
17039 `struct inferior_info'. Remove PID member. Use generic inferior
17040 list header. All uses updated.
17041 (inferiors, signal_pid): Removed.
17042 (all_threads): New variable.
17043 (get_thread): Define.
17044 (add_inferior_to_list): New function.
17045 (for_each_inferior): New function.
17046 (change_inferior_id): New function.
17047 (add_inferior): Removed.
17048 (remove_inferior): New function.
17049 (add_thread): New function.
17050 (free_one_thread): New function.
17051 (remove_thread): New function.
17052 (clear_inferiors): Use for_each_inferior and free_one_thread.
17053 (find_inferior): New function.
17054 (find_inferior_id): New function.
17055 (inferior_target_data): Update argument type.
17056 (set_inferior_target_data): Likewise.
17057 (inferior_regcache_data): Likewise.
17058 (set_inferior_regcache_data): Likewise.
17059 * linux-low.c (linux_bp_reinsert): Remove.
17060 (all_processes, stopping_threads, using_thrads)
17061 (struct pending_signals, debug_threads, pid_of): New.
17062 (inferior_pid): Replace with macro.
17063 (struct inferior_linux_data): Remove.
17064 (get_stop_pc, add_process): New functions.
17065 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17066 Use add_process and add_thread.
17067 (linux_attach_lwp): New function, based on old linux_attach. Use
17068 add_process and add_thread. Set stop_expected for new threads.
17069 (linux_attach): New function.
17070 (linux_kill_one_process): New function.
17071 (linux_kill): Kill all LWPs.
17072 (linux_thread_alive): Use find_inferior_id.
17073 (check_removed_breakpoints, status_pending_p): New functions.
17074 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17075 Update. Use WNOHANG. Wait for cloned processes also. Update process
17076 struct for the found process.
17077 (linux_wait_for_event): New function.
17078 (linux_wait): Use it. Support LWPs.
17079 (send_sigstop, wait_for_sigstop, stop_all_processes)
17080 (linux_resume_one_process, linux_continue_one_process): New functions.
17081 (linux_resume): Support LWPs.
17082 (REGISTER_RAW_SIZE): Remove.
17083 (fetch_register): Use register_size instead. Call supply_register.
17084 (usr_store_inferior_registers): Likewise. Call collect_register.
17085 Fix recursive case.
17086 (regsets_fetch_inferior_registers): Improve error message.
17087 (regsets_store_inferior_registers): Add debugging.
17088 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17089 (unstopped_p, linux_signal_pid): New functions.
17090 (linux_target_ops): Add linux_signal_pid.
17091 (linux_init_signals): New function.
17092 (initialize_low): Call it. Initialize using_threads.
17093 * regcache.c (inferior_regcache_data): Add valid
17094 flag.
17095 (get_regcache): Fetch registers lazily. Add fetch argument
17096 and update all callers.
17097 (regcache_invalidate_one, regcache_invalidate): New
17098 functions.
17099 (new_register_cache): Renamed from create_register_cache.
17100 Return the new regcache.
17101 (free_register_cache): Change argument to a void *.
17102 (registers_to_string, registers_from_string): Call get_regcache
17103 with fetch flag set.
17104 (register_data): Make static. Pass fetch flag to get_regcache.
17105 (supply_register): Call get_regcache with fetch flag clear.
17106 (collect_register): Call get_regcache with fetch flag set.
17107 (collect_register_as_string): New function.
17108 * regcache.h: Update.
17109 * remote-utils.c (putpkt): Flush after debug output and use
17110 stderr.
17111 Handle input interrupts while waiting for an ACK.
17112 (input_interrupt): Use signal_pid method.
17113 (getpkt): Flush after debug output and use stderr.
17114 (outreg): Use collect_register_as_string.
17115 (new_thread_notify, dead_thread_notify): New functions.
17116 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17117 and general_thread.
17118 (look_up_one_symbol): Flush after debug output.
17119 * server.c (step_thread, server_waiting): New variables.
17120 (start_inferior): Don't use signal_pid. Update call to mywait.
17121 (attach_inferior): Update call to mywait.
17122 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17123 (main): Don't fetch/store registers explicitly. Use
17124 set_desired_inferior. Support proposed ``Hs'' packet. Update
17125 calls to mywait.
17126 * server.h: Update.
17127 (struct inferior_list, struct_inferior_list_entry): New.
17128 * target.c (set_desired_inferior): New.
17129 (write_inferior_memory): Constify.
17130 (mywait): New function.
17131 * target.h: Update.
17132 (struct target_ops): New signal_pid method.
17133 (mywait): Removed macro, added prototype.
17134
17135 * linux-low.h (regset_func): Removed.
17136 (regset_fill_func, regset_store_func): New.
17137 (enum regset_type): New.
17138 (struct regset_info): Add type field. Use new operation types.
17139 (struct linux_target_ops): stop_pc renamed to get_pc.
17140 Add decr_pc_after_break and breakpoint_at.
17141 (get_process, get_thread_proess, get_process_thread)
17142 (strut process_info, all_processes, linux_attach_lwp)
17143 (thread_db_init): New.
17144
17145 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17146 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17147 (the_low_target): Add new members.
17148 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17149 (i386_store_fpxregset): Constify.
17150 (target_regsets): Add new kind identifier.
17151 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17152 (i386_set_pc): Add debugging.
17153 (i386_breakpoint_at): New function.
17154 (the_low_target): Add new members.
17155 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17156 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17157 (mips_breakpoint_at): New.
17158 (the_low_target): Add new members.
17159 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17160 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17161 (the_low_target): Add new members.
17162 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17163 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17164 (the_low_target): Add new members.
17165 * linux-x86-64-low.c (target_regsets): Add new kind
17166 identifier.
17167
171682002-05-15 Daniel Jacobowitz <drow@mvista.com>
17169
17170 From Martin Pool <mbp@samba.org>:
17171 * server.c (gdbserver_usage): New function.
17172 (main): Call it.
17173
171742002-05-14 Daniel Jacobowitz <drow@mvista.com>
17175
17176 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17177 stop_at -> stop_pc.
17178
171792002-05-04 Andrew Cagney <ac131313@redhat.com>
17180
17181 * Makefile.in: Remove obsolete code.
17182
171832002-04-24 Michal Ludvig <mludvig@suse.cz>
17184
17185 * linux-low.c (regsets_fetch_inferior_registers),
17186 (regsets_store_inferior_registers): Removed cast to int from
17187 ptrace() calls.
17188 * regcache.h: Added declaration of struct inferior_info.
17189
171902002-04-20 Daniel Jacobowitz <drow@mvista.com>
17191
17192 * inferiors.c (struct inferior_info): Add regcache_data.
17193 (add_inferior): Call create_register_cache.
17194 (clear_inferiors): Call free_register_cache.
17195 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17196 * regcache.c (struct inferior_regcache_data): New.
17197 (registers): Remove.
17198 (get_regcache): New function.
17199 (create_register_cache, free_register_cache): New functions.
17200 (set_register_cache): Don't initialize the register cache here.
17201 (registers_to_string, registers_from_string, register_data): Call
17202 get_regcache.
17203 * regcache.h: Add prototypes.
17204 * server.h: Likewise.
17205
172062002-04-20 Daniel Jacobowitz <drow@mvista.com>
17207
17208 * mem-break.c: New file.
17209 * mem-break.h: New file.
17210 * Makefile.in: Add mem-break.o rule; update server.h
17211 dependencies.
17212 * inferiors.c (struct inferior_info): Add target_data
17213 member.
17214 (clear_inferiors): Free target_data member if set.
17215 (inferior_target_data, set_inferior_target_data): New functions.
17216 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17217 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17218 * linux-low.c (linux_bp_reinsert): New variable.
17219 (struct inferior_linux_data): New.
17220 (linux_create_inferior): Use set_inferior_target_data.
17221 (linux_attach): Likewise. Call add_inferior.
17222 (linux_wait_for_one_inferior): New function.
17223 (linux_wait): Call it.
17224 (linux_write_memory): Add const.
17225 (initialize_low): Call set_breakpoint_data.
17226 * linux-low.h (struct linux_target_ops): Add breakpoint
17227 handling members.
17228 * server.c (attach_inferior): Remove extra add_inferior
17229 call.
17230 * server.h: Include mem-break.h. Update inferior.c
17231 prototypes.
17232 * target.c (read_inferior_memory)
17233 (write_inferior_memory): New functions.
17234 * target.h (read_inferior_memory)
17235 (write_inferior_memory): Change macros to prototypes.
17236 (struct target_ops): Update comments. Add const to write_memory
17237 definition.
17238
172392002-04-11 Daniel Jacobowitz <drow@mvista.com>
17240
17241 * linux-low.c (usr_store_inferior_registers): Support
17242 registers which are allowed to fail to store.
17243 * linux-low.h (linux_target_ops): Likewise.
17244 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17245 (ppc_cannot_store_register): FPSCR may not be storable.
17246
172472002-04-09 Daniel Jacobowitz <drow@mvista.com>
17248
17249 * server.h: Include <string.h> if HAVE_STRING_H.
17250 * ChangeLog: Correct paths in last ChangeLog entry.
17251
172522002-04-09 Daniel Jacobowitz <drow@mvista.com>
17253
17254 * linux-low.h: Remove obsolete prototypes.
17255 (struct linux_target_ops): New.
17256 (extern the_low_target): New.
17257 * linux-low.c (num_regs, regmap): Remove declarations.
17258 (register_addr): Use the_low_target explicitly.
17259 (fetch_register): Likewise.
17260 (usr_fetch_inferior_registers): Likewise.
17261 (usr_store_inferior_registers): Likewise.
17262 * linux-arm-low.c (num_regs): Remove.
17263 (arm_num_regs): Define.
17264 (arm_regmap): Renamed from regmap, made static.
17265 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17266 made static.
17267 (arm_cannot_store_register): Renamed from cannot_store_register,
17268 made static.
17269 (the_low_target): New.
17270 * linux-i386-low.c (num_regs): Remove.
17271 (i386_num_regs): Define.
17272 (i386_regmap): Renamed from regmap, made static.
17273 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17274 made static.
17275 (i386_cannot_store_register): Renamed from cannot_store_register,
17276 made static.
17277 (the_low_target): New.
17278 * linux-ia64-low.c (num_regs): Remove.
17279 (ia64_num_regs): Define.
17280 (ia64_regmap): Renamed from regmap, made static.
17281 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17282 made static.
17283 (ia64_cannot_store_register): Renamed from cannot_store_register,
17284 made static.
17285 (the_low_target): New.
17286 * linux-m68k-low.c (num_regs): Remove.
17287 (m68k_num_regs): Define.
17288 (m68k_regmap): Renamed from regmap, made static.
17289 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17290 made static.
17291 (m68k_cannot_store_register): Renamed from cannot_store_register,
17292 made static.
17293 (the_low_target): New.
17294 * linux-mips-low.c (num_regs): Remove.
17295 (mips_num_regs): Define.
17296 (mips_regmap): Renamed from regmap, made static.
17297 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17298 made static.
17299 (mips_cannot_store_register): Renamed from cannot_store_register,
17300 made static.
17301 (the_low_target): New.
17302 * linux-ppc-low.c (num_regs): Remove.
17303 (ppc_num_regs): Define.
17304 (ppc_regmap): Renamed from regmap, made static.
17305 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17306 made static.
17307 (ppc_cannot_store_register): Renamed from cannot_store_register,
17308 made static.
17309 (the_low_target): New.
17310 * linux-s390-low.c (num_regs): Remove.
17311 (s390_num_regs): Define.
17312 (s390_regmap): Renamed from regmap, made static.
17313 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17314 made static.
17315 (s390_cannot_store_register): Renamed from cannot_store_register,
17316 made static.
17317 (the_low_target): New.
17318 * linux-sh-low.c (num_regs): Remove.
17319 (sh_num_regs): Define.
17320 (sh_regmap): Renamed from regmap, made static.
17321 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17322 made static.
17323 (sh_cannot_store_register): Renamed from cannot_store_register,
17324 made static.
17325 (the_low_target): New.
17326 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17327 (the_low_target): New.
17328
173292002-04-09 Daniel Jacobowitz <drow@mvista.com>
17330
17331 * Makefile.in: Add stamp-h target.
17332 * configure.in: Create stamp-h.
17333 * configure: Regenerated.
17334
173352002-04-09 Daniel Jacobowitz <drow@mvista.com>
17336
17337 * inferiors.c: New file.
17338 * target.c: New file.
17339 * target.h: New file.
17340 * Makefile.in: Add target.o and inferiors.o. Update
17341 dependencies.
17342 * linux-low.c (inferior_pid): New static variable,
17343 moved from server.c.
17344 (linux_create_inferior): Renamed from create_inferior.
17345 Call add_inferior. Return 0 on success instead of a PID.
17346 (linux_attach): Renamed from myattach.
17347 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17348 (linux_thread_alive): Renamed from mythread_alive.
17349 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17350 child dies.
17351 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17352 (regsets_store_inferior_registers): Correct error message.
17353 Add missing ``return 0''.
17354 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17355 (linux_store_registers): Renamed from store_inferior_registers.
17356 (linux_read_memory): Renamed from read_inferior_memory.
17357 (linux_write_memory): Renamed from write_inferior_memory.
17358 (linux_target_ops): New structure.
17359 (initialize_low): Call set_target_ops ().
17360 * remote-utils.c (unhexify): New function.
17361 (hexify): New function.
17362 (input_interrupt): Send signals to ``signal_pid''.
17363 * server.c (inferior_pid): Remove.
17364 (start_inferior): Update create_inferior call.
17365 (attach_inferior): Call add_inferior.
17366 (handle_query): New function.
17367 (main): Call handle_query for `q' packets.
17368 * server.h: Include "target.h". Remove obsolete prototypes.
17369 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17370
173712002-04-09 Daniel Jacobowitz <drow@mvista.com>
17372
17373 * Makefile.in: Add WARN_CFLAGS. Update configury
17374 dependencies.
17375 * configure.in: Check for <string.h>
17376 * configure: Regenerate.
17377 * config.in: Regenerate.
17378 * gdbreplay.c: Include needed system headers.
17379 (remote_open): Remove strchr prototype.
17380 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17381 * regcache.c (supply_register): Change buf argument to const void *.
17382 (supply_register_by_name): Likewise.
17383 (collect_register): Change buf argument to void *.
17384 (collect_register_by_name): Likewise.
17385 * regcache.h: Add missing prototypes.
17386 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17387 * server.c (handle_query): New function.
17388 (attached): New static variable, moved out of main.
17389 (main): Quiet longjmp clobber warnings.
17390 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17391 * utils.c (error): Remove NORETURN.
17392 (fatal): Likewise.
This page took 0.089786 seconds and 4 git commands to generate.