Remove fromhex implementation from gdbreplay
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-06-02 Tom Tromey <tom@tromey.com>
2
3 * gdbreplay.c (fromhex): Remove.
4 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
5
6 2019-05-29 Tom Tromey <tromey@adacore.com>
7
8 * configure: Rebuild.
9
10 2019-05-06 Kevin Buettner <kevinb@redhat.com>
11
12 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
13 sign extension code on 32-bit builds.
14
15 2019-05-03 Eli Zaretskii <eliz@gnu.org>
16
17 * remote-utils.c:
18 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
19
20 2019-04-19 Tom Tromey <tom@tromey.com>
21
22 * server.c (struct vstop_notif): Derive from notif_event.
23 <base>: Remove.
24 (queue_stop_reply): Update.
25 (remove_all_on_match_ptid): Change type. Rewrite.
26 (discard_queued_stop_replies): Rewrite.
27 (in_queued_stop_replies_ptid): Change type.
28 (in_queued_stop_replies): Rewrite.
29 (notif_stop): Update.
30 (queue_stop_reply_callback): Update.
31 (captured_main): Don't call initialize_notif.
32 (push_stop_notification): Update.
33 * notif.c (notif_write_event, handle_notif_ack)
34 (notif_event_enque, notif_push): Update.
35 (notif_event_xfree, initialize_notif): Remove.
36 * notif.h (struct notif_event): Include <list>, not
37 "common/queue.h".
38 (struct notif_server) <queue>: Now a std::list.
39 (notif_event_p): Remove typedef.
40 (initialize_notif): Don't declare.
41 (struct notif_event): Add virtual destructor.
42
43 2019-04-17 Alan Hayward <alan.hayward@arm.com>
44
45 * ax.c (ax_vdebug): Call debug_printf.
46 * debug.c (debug_write): New function.
47 * debug.h (debug_write): New declaration.
48 * linux-low.c (sigchld_handler): Call debug_write.
49
50 2019-04-17 Alan Hayward <alan.hayward@arm.com>
51
52 * debug.c (debug_set_output): New function.
53 (debug_vprintf): Send output to debug_file.
54 (debug_flush): Likewise.
55 * debug.h (debug_set_output): New declaration.
56 * server.c (handle_monitor_command): Add debug-file option.
57 (captured_main): Likewise.
58
59 2019-04-17 Alan Hayward <alan.hayward@arm.com>
60
61 * debug.c (remote_debug): Add definition.
62 * debug.h (remote_debug): Add declaration.
63 * hostio.c (remote_debug): Remove declaration.
64 * remote-utils.c (struct ui_file): Likewise.
65 (remote_debug): Likewise.
66 * remote-utils.h (remote_debug): Likewise,
67 * server.c (remote_debug): Remove definition.
68
69 2019-04-10 Kevin Buettner <kevinb@redhat.com>
70
71 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
72 when using a 64-bit gdbserver.
73
74 2019-04-09 Tom Tromey <tromey@adacore.com>
75
76 * linux-low.c (select_event_lwp): Use find_thread_in_random.
77
78 2019-04-08 Tom Tromey <tom@tromey.com>
79
80 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
81 throw.
82 (linux_resume_one_lwp): Likewise.
83
84 2019-04-08 Tom Tromey <tom@tromey.com>
85
86 * gdbreplay.c: Update.
87 * linux-low.c: Update.
88 * server.c: Update.
89
90 2019-04-08 Tom Tromey <tom@tromey.com>
91
92 * server.c: Use C++ exception handling.
93 * linux-low.c: Use C++ exception handling.
94 * gdbreplay.c: Use C++ exception handling.
95
96 2019-04-08 Tom Tromey <tom@tromey.com>
97
98 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
99 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
100 (captured_main, main): Update.
101 * gdbreplay.c (main): Update.
102
103 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
104
105 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
106 value in argument pointer, return 1 if the entry is found and 0
107 otherwise. Move comment.
108 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
109 * linux-low.h (linux_get_auxv): Declare.
110 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
111
112 2019-04-05 Tom Tromey <tromey@adacore.com>
113
114 * server.c (gdbserver_usage): Use upper-case for metasyntactic
115 variables.
116
117 2019-03-28 Alan Hayward <alan.hayward@arm.com>
118
119 * linux-low.c (AT_HWCAP2): Add define if not already included.
120
121 2019-03-26 Alan Hayward <alan.hayward@arm.com>
122
123 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
124 (aarch64_arch_setup): Call linux_get_hwcap.
125 * linux-arm-low.c (arm_get_hwcap): Remove function.
126 (arm_read_description): Call linux_get_hwcap.
127 * linux-low.c (linux_get_auxv): New function.
128 (linux_get_hwcap): Likewise.
129 (linux_get_hwcap2): Likewise.
130 * linux-low.h (linux_get_hwcap): New declaration.
131 (linux_get_hwcap2): Likewise.
132 * linux-ppc-low.c (ppc_get_auxv): Remove function.
133 (ppc_arch_setup): Call linux_get_hwcap.
134 * linux-s390-low.c (s390_get_hwcap): Remove function.
135 (s390_arch_setup): Call linux_get_hwcap.
136
137 2019-03-22 Alan Hayward <alan.hayward@arm.com>
138 Jiong Wang <jiong.wang@arm.com>
139
140 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
141 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
142 to fail.
143 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
144
145 2019-03-22 Alan Hayward <alan.hayward@arm.com>
146 Jiong Wang <jiong.wang@arm.com>
147
148 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
149 (aarch64_get_hwcap): New function.
150 (aarch64_arch_setup): Read APIA hwcap.
151
152 2019-03-22 Alan Hayward <alan.hayward@arm.com>
153 Jiong Wang <jiong.wang@arm.com>
154
155 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
156 (initialize_low_tracepoint): Likewise.
157 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
158 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
159 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
160 (aarch64_linux_read_description): Likewise.
161 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
162
163 2019-03-12 John Baldwin <jhb@FreeBSD.org>
164
165 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
166 i386_create_target_description for 'segments' parameter.
167 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
168 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
169 * win32-i386-low.c (i386_arch_setup): Likewise.
170
171 2019-03-12 Tom Tromey <tromey@adacore.com>
172
173 * linux-low.c (iterate_over_lwps): Update.
174
175 2019-03-06 Tom Tromey <tom@tromey.com>
176
177 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
178 (captured_main): Use SCOPE_EXIT.
179
180 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
181
182 * configure.srv: Use '$enable_unittest' instead of '$development'
183 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
184 case.
185
186 2019-02-27 Tom Tromey <tromey@adacore.com>
187
188 * gdbreplay.c (logchar): Handle \r\n.
189
190 2019-02-07 Alan Hayward <alan.hayward@arm.com>
191
192 * linux-low.c (linux_attach): Add process before lwp.
193 * server.c (attach_inferior): Check if already attached.
194
195 2019-02-07 Tom Tromey <tom@tromey.com>
196
197 * x86-tdesc.h: Rename include guard.
198 * x86-low.h: Add include guard.
199 * wincecompat.h: Rename include guard.
200 * win32-low.h: Add include guard.
201 * utils.h: Rename include guard.
202 * tracepoint.h: Rename include guard.
203 * tdesc.h: Rename include guard.
204 * target.h: Rename include guard.
205 * server.h: Rename include guard.
206 * remote-utils.h: Rename include guard.
207 * regcache.h: Rename include guard.
208 * nto-low.h: Rename include guard.
209 * notif.h: Add include guard.
210 * mem-break.h: Rename include guard.
211 * lynx-low.h: Add include guard.
212 * linux-x86-tdesc.h: Add include guard.
213 * linux-s390-tdesc.h: Add include guard.
214 * linux-ppc-tdesc-init.h: Add include guard.
215 * linux-low.h: Add include guard.
216 * linux-aarch64-tdesc.h: Add include guard.
217 * linux-aarch32-low.h: Add include guard.
218 * inferiors.h: Rename include guard.
219 * i387-fp.h: Rename include guard.
220 * hostio.h: Rename include guard.
221 * gdbthread.h: Rename include guard.
222 * gdb_proc_service.h: Rename include guard.
223 * event-loop.h: Rename include guard.
224 * dll.h: Rename include guard.
225 * debug.h: Rename include guard.
226 * ax.h: Rename include guard.
227
228 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
229
230 PR gdb/23985
231 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
232 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
233
234 2019-01-25 Tom Tromey <tom@tromey.com>
235
236 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
237
238 2019-01-25 Tom Tromey <tom@tromey.com>
239
240 * win32-low.c: Fix common/ includes.
241 * win32-i386-low.c: Fix common/ includes.
242 * tracepoint.c: Fix common/ includes.
243 * thread-db.c: Fix common/ includes.
244 * target.h: Fix common/ includes.
245 * symbol.c: Fix common/ includes.
246 * spu-low.c: Fix common/ includes.
247 * server.h: Fix common/ includes.
248 * server.c: Fix common/ includes.
249 * remote-utils.c: Fix common/ includes.
250 * regcache.h: Fix common/ includes.
251 * regcache.c: Fix common/ includes.
252 * nto-x86-low.c: Fix common/ includes.
253 * notif.h: Fix common/ includes.
254 * mem-break.h: Fix common/ includes.
255 * lynx-low.c: Fix common/ includes.
256 * lynx-i386-low.c: Fix common/ includes.
257 * linux-x86-tdesc-selftest.c: Fix common/ includes.
258 * linux-x86-low.c: Fix common/ includes.
259 * linux-low.c: Fix common/ includes.
260 * inferiors.h: Fix common/ includes.
261 * i387-fp.c: Fix common/ includes.
262 * hostio.c: Fix common/ includes.
263 * hostio-errno.c: Fix common/ includes.
264 * gdbthread.h: Fix common/ includes.
265 * gdbreplay.c: Fix common/ includes.
266 * fork-child.c: Fix common/ includes.
267 * event-loop.c: Fix common/ includes.
268 * ax.c:
269 (enum gdb_agent_op): Fix common/ includes.
270
271 2019-01-21 Tom Tromey <tom@tromey.com>
272
273 * tracepoint.c: Fix includes.
274 * remote-utils.c: Fix includes.
275 * linux-x86-low.c: Fix includes.
276
277 2019-01-01 Joel Brobecker <brobecker@adacore.com>
278
279 * gdbreplay.c (gdbreplay_version): Update copyright year in
280 version message.
281 * server.c (gdbserver_version): Likewise.
282
283 2018-12-05 Alan Hayward <alan.hayward@arm.com>
284
285 * linux-low.c (add_lwp): Switch ordering.
286
287 2018-11-29 Tom Tromey <tom@tromey.com>
288
289 * win32-low.c (win32_join): Take pid, not process.
290 * target.h (struct target_ops) <join>: Change argument type.
291 (join_inferior): Change argument name.
292 * spu-low.c (spu_join): Take pid, not process.
293 * server.c (handle_detach): Preserve pid before destroying
294 process.
295 * lynx-low.c (lynx_join): Take pid, not process.
296 * linux-low.c (linux_join): Take pid, not process.
297
298 2018-11-23 Alan Hayward <alan.hayward@arm.com>
299
300 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
301 (aarch64_cannot_fetch_register): Likewise.
302 (struct linux_target_ops): Update references.
303
304 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
305
306 * linux-ppc-low.c: Include nat/linux-ptrace.h.
307
308 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
309
310 * configure.srv (ipa_ppc_linux_regobj): Add
311 powerpc-isa207-htm-vsx32l-ipa.o and
312 powerpc-isa207-htm-vsx64l-ipa.o.
313 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
314 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
315 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
316 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
317 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
318 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
319 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
320 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
321 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
322 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
323 (init_registers_powerpc_isa207_htm_vsx32l)
324 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
325 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
326 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
327 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
328 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
329 (ppc_store_tm_ctarregset): New functions.
330 (ppc_regsets): Add entries for HTM regsets.
331 (ppc_arch_setup): Set htm in features struct when needed. Set
332 sizes for the HTM regsets.
333 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
334 (initialize_low_arch): Call
335 init_registers_powerpc_isa207_htm_vsx32l and
336 init_registers_powerpc_isa207_htm_vsx64l.
337 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
338 PPC_TDESC_ISA207_HTM_VSX.
339 (initialize_low_tracepoint): Call
340 init_registers_powerpc_isa207_htm_vsx32l and
341 init_registers_powerpc_isa207_htm_vsx64l.
342
343 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
344
345 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
346 rs6000/power-linux-pmu.xml to srv_xmlfiles.
347 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
348 (ppc_store_pmuregset): New functions.
349 (ppc_regsets): Add entries for ebb and pmu regsets.
350 (ppc_arch_setup): Set isa207 in features struct if the ebb and
351 pmu regsets are available. Set sizes for these regsets.
352
353 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
354
355 * configure.srv (ipa_ppc_linux_regobj): Add
356 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
357 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
358 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
359 rs6000/powerpc-isa207-vsx32l.xml, and
360 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
361 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
362 <PPC_TDESC_ISA207_VSX>: New enum value.
363 (init_registers_powerpc_isa207_vsx32l): Declare.
364 (init_registers_powerpc_isa207_vsx64l): Declare.
365 * linux-ppc-low.c (ppc_fill_tarregset): New function.
366 (ppc_store_tarregset): New function.
367 (ppc_regsets): Add entry for the TAR regset.
368 (ppc_arch_setup): Set isa207 in features struct when needed. Set
369 size for the TAR regsets.
370 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
371 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
372 and init_registers_powerpc_isa207_vsx64l.
373 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
374 (initialize_low_tracepoint): Call
375 init_registers_powerpc_isa207_vsx32l and
376 init_registers_powerpc_isa207_vsx64l.
377
378 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
379 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
380
381 * configure.srv (ipa_ppc_linux_regobj): Add
382 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
383 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
384 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
385 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
386 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
387 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
388 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
389 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
390 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
391 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
392 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
393 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
394 (ppc_hwcap): Add comment.
395 (ppc_hwcap2): New global.
396 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
397 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
398 (ppc_regsets): Add entries for the DSCR and PPR regsets.
399 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
400 when needed. Set sizes for the the DSCR and PPR regsets.
401 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
402 (initialize_low_arch): Call
403 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
404 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
405 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
406 PPC_TDESC_ISA205_PPR_DSCR_VSX.
407 (initialize_low_tracepoint): Call
408 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
409 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
410
411 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
412
413 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
414
415 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
416 Simon Marchi <simark@simark.ca>
417
418 * acinclude.m4: Include "../selftest.m4".
419 * configure: Regenerate.
420 * configure.ac: Use "GDB_AC_SELFTEST".
421 * configure.srv: Use "$enable_unittests" instead of
422 "$development" when checking whether unit tests have been
423 enabled.
424 * server.c (captured_main): Update message informing that
425 selftests have been disabled.
426
427 2018-10-04 Tom Tromey <tom@tromey.com>
428
429 * configure: Rebuild.
430
431 2018-10-04 Tom Tromey <tom@tromey.com>
432
433 * server.c (handle_status): Rename inner "thread".
434 (process_serial_event): Declare "res" in 'm' case.
435 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
436 (iterate_over_lwps): Rename inner "thread".
437 (linux_qxfer_libraries_svr4): Rename inner "len".
438 * gdbthread.h (find_thread_in_random): Rename inner "thread".
439
440 2018-10-01 Gary Benson <gbenson@redhat.com>
441
442 * gdb_proc_service.h: Moved common code to
443 common/gdb_proc_service.h.
444
445 2018-10-01 Gary Benson <gbenson@redhat.com>
446
447 * gdb_proc_service.h: Synchronize comments and whitespace with
448 GDB's version of this file.
449
450 2018-09-25 Tom Tromey <tom@tromey.com>
451
452 * configure: Rebuild.
453 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
454
455 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
456
457 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
458 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
459 ($(IPA_LIB)): Sort IPA_OBJS.
460
461 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
462
463 * Makefile.in: Remove references to $(ADD_DEPS).
464
465 2018-09-16 Tom Tromey <tom@tromey.com>
466
467 * remote-utils.c (remote_open): Use GNU style for metasyntactic
468 variables.
469 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
470 variables.
471
472 2018-09-05 Tom Tromey <tom@tromey.com>
473
474 * configure: Rebuild.
475
476 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
477
478 PR build/23399
479 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
480
481 2018-08-27 Tom Tromey <tom@tromey.com>
482
483 PR build/23087:
484 * configure: Rebuild.
485
486 2018-08-27 Tom Tromey <tom@tromey.com>
487
488 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
489 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
490 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
491 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
492 (s390x_emit_stack_adjust): Add casts to unsigned char.
493
494 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
495
496 PR gdb/23374
497 PR gdb/23375
498 * server.h (struct client_state) <disable_randomization>:
499 Initialize to 1.
500
501 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
502
503 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
504 variable.
505 (mips_supply_ptrace_register): Likewise.
506
507 2018-07-22 Tom Tromey <tom@tromey.com>
508
509 * configure: Rebuild.
510
511 2018-07-22 Tom Tromey <tom@tromey.com>
512
513 * win32-low.c (win32_create_inferior): Remove unused variables.
514 * gdbreplay.c (remote_open): Remove unused variable.
515 * remote-utils.c (remote_prepare): Remove unused variable.
516 * x86-tdesc.h (X86_TDESC_H): Define.
517 (amd64_expedite_regs): Define conditionally.
518 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
519 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
520 * remote-utils.c (readchar): Remove unused variable.
521
522 2018-07-13 Pedro Alves <palves@redhat.com>
523
524 * linux-low.c (linux_kill): Change parameter to process_info
525 pointer instead of pid. Adjust.
526 * lynx-low.c (lynx_kill): Likewise.
527 * nto-low.c (nto_kill): Likewise.
528 * spu-low.c (spu_kill): Likewise.
529 * win32-low.c (win32_kill): Likewise.
530 * server.c (handle_v_kill, kill_inferior_callback)
531 (detach_or_kill_for_exit): Adjust.
532 * target.c (kill_inferior): Change parameter to process_info
533 pointer instead of pid. Adjust.
534 * target.h (struct target_ops) <kill>: Change parameter to
535 process_info pointer instead of pid. Adjust all implementations
536 and callers.
537 (kill_inferior): Likewise.
538
539 2018-07-13 Pedro Alves <palves@redhat.com>
540
541 * linux-low.c (linux_detach, linux_join): Change parameter to
542 process_info pointer instead of pid. Adjust.
543 * lynx-low.c (lynx_detach, lynx_join): Likewise.
544 * nto-low.c (nto_detach): Likewise.
545 * spu-low.c (spu_detach, spu_join): Likewise.
546 * win32-low.c (win32_detach, win32_join): Likewise.
547 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
548 * target.h (struct target_ops) <detach, join>: Change parameter to
549 process_info pointer instead of pid. Adjust all implementations
550 and callers.
551 (detach_inferior, join_inferior): Rename 'pid' parameter to
552 'proc'.
553
554 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
555 Jan Kratochvil <jan.kratochvil@redhat.com>
556 Paul Fertser <fercerpav@gmail.com>
557 Tsutomu Seki <sekiriki@gmail.com>
558
559 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
560 (OBS): Add 'common/netstuff.o'.
561 (GDBREPLAY_OBS): Likewise.
562 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
563 (remote_open): Implement support for IPv6
564 connections.
565 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
566 and 'wspiapi.h'.
567 (handle_accept_event): Accept connections from IPv6 sources.
568 (remote_prepare): Handle IPv6-style hostnames; implement
569 support for IPv6 connections.
570 (remote_open): Implement support for printing connections from
571 IPv6 sources.
572
573 2018-07-11 Pedro Alves <palves@redhat.com>
574
575 PR gdb/23377
576 * mem-break.c (any_persistent_commands): Add process_info
577 parameter and use it instead of relying on the current process.
578 Change return type to bool.
579 * mem-break.h (any_persistent_commands): Add process_info
580 parameter and change return type to bool.
581 * server.c (handle_detach): Remove require_running_or_return call.
582 Look up the process_info for the process we're about to detach.
583 If not found, return back error to GDB. Adjust
584 any_persistent_commands call to pass down a process pointer.
585
586 2018-07-11 Pedro Alves <palves@redhat.com>
587
588 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
589 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
590 instead of collect_register_by_name.
591 * regcache.c (regcache_raw_get_unsigned_by_name): New.
592 * regcache.h (regcache_raw_get_unsigned_by_name): New.
593
594 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
595 Pedro Alves <palves@redhat.com>
596
597 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
598
599 2018-07-03 Tom Tromey <tom@tromey.com>
600
601 * linux-low.c: Update.
602 * lynx-low.c: Update.
603 * mem-break.c: Update.
604 * nto-low.c: Update.
605 * remote-utils.c: Update.
606 * server.c: Update.
607 * spu-low.c: Update.
608 * target.c: Update.
609 * win32-low.c: Update.
610
611 2018-07-03 Tom Tromey <tom@tromey.com>
612
613 * server.c: Update.
614
615 2018-07-03 Tom Tromey <tom@tromey.com>
616
617 * linux-low.c: Update.
618
619 2018-07-03 Tom Tromey <tom@tromey.com>
620
621 * target.c: Update.
622
623 2018-07-03 Tom Tromey <tom@tromey.com>
624
625 * linux-low.c: Update.
626 * linux-mips-low.c: Update.
627 * lynx-low.c: Update.
628 * nto-low.c: Update.
629 * remote-utils.c: Update.
630 * server.c: Update.
631 * spu-low.c: Update.
632 * target.c: Update.
633 * thread-db.c: Update.
634
635 2018-07-03 Tom Tromey <tom@tromey.com>
636
637 * linux-low.c: Update.
638 * linux-mips-low.c: Update.
639 * lynx-low.c: Update.
640 * mem-break.c: Update.
641 * nto-low.c: Update.
642 * remote-utils.c: Update.
643 * server.c: Update.
644 * spu-low.c: Update.
645 * target.c: Update.
646 * tracepoint.c: Update.
647
648 2018-07-03 Tom Tromey <tom@tromey.com>
649
650 * linux-low.c: Update.
651 * linux-ppc-low.c: Update.
652 * linux-x86-low.c: Update.
653 * proc-service.c: Update.
654 * server.c: Update.
655 * spu-low.c: Update.
656 * thread-db.c: Update.
657 * win32-low.c: Update.
658
659 2018-07-03 Tom Tromey <tom@tromey.com>
660
661 * linux-low.c: Update.
662 * lynx-low.c: Update.
663 * nto-low.c: Update.
664 * remote-utils.c: Update.
665 * spu-low.c: Update.
666 * thread-db.c: Update.
667 * win32-low.c: Update.
668
669 2018-06-29 Joel Brobecker <brobecker@adacore.com>
670
671 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
672 parameter in call to 'amd64_create_target_description'.
673
674 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
675
676 * x86-tdesc.h: Remove executable permission flag.
677
678 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
679
680 * configure.ac: Remove AC_PREREQ, add missing quoting.
681 * configure: Re-generate.
682 * config.in: Re-generate.
683 * aclocal.m4: Re-generate.
684
685 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
686
687 * tracepoint.h (current_traceframe): Remove declaration.
688
689 2018-06-18 Alan Hayward <alan.hayward@arm.com>
690
691 * linux-aarch64-low.c (is_sve_tdesc): New function.
692 (aarch64_sve_regs_copy_to_regcache): Likewise.
693 (aarch64_sve_regs_copy_from_regcache): Likewise.
694 (aarch64_regs_info): Add SVE checks.
695 (initialize_low_arch): Initialize SVE.
696
697 2018-06-18 Alan Hayward <alan.hayward@arm.com>
698
699 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
700
701 2018-06-11 Alan Hayward <alan.hayward@arm.com>
702
703 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
704 (initialize_low_tracepoint): Likewise
705 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
706 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
707 param.
708 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
709 checks.
710 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
711
712 2018-06-11 Alan Hayward <alan.hayward@arm.com>
713
714 * server.h (PBUFSIZ): Increase size
715
716 2018-06-11 Alan Hayward <alan.hayward@arm.com>
717
718 * regcache.c (regcache::raw_compare): New function.
719 * regcache.h (regcache::raw_compare): New declaration.
720
721 2018-06-11 Alan Hayward <alan.hayward@arm.com>
722
723 * regcache.c (new_register_cache): Use new.
724 (free_register_cache): Use delete.
725 (register_data): Use const.
726 (supply_register): Move body inside regcache.
727 (regcache::raw_supply): New override function.
728 (collect_register): Move body inside regcache.
729 (regcache::raw_collect): New override function.
730 (regcache::get_register_status): New override function.
731 * regcache.h (struct regcache): Inherit from reg_buffer_common.
732
733 2018-06-09 Tom Tromey <tom@tromey.com>
734
735 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
736 declare queue.
737 (event_queue): Use std::queue.
738 (gdb_event_xfree): Remove.
739 (initialize_event_loop, process_event, wait_for_event): Update.
740
741 2018-06-08 Stan Cox <scox@redhat.com>
742
743 * win32-low.c (win32_create_inferior): last_ptid and last_status
744 moved to client_state.
745
746 2018-06-08 Pedro Alves <palves@redhat.com>
747
748 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
749 common/common-exceptions.o, common/common-utils.o,
750 common/errors.o, common/print-utils.o and utils.o.
751 * gdbreplay.c: Include "common-defs.h" instead of the two
752 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
753 string.h or alloca.h.
754 (perror_with_name): Delete.
755 (remote_open): Use xstrdup instead of strdup.
756 (main): Rename to ...
757 (captured_main): ... this.
758 (main): New.
759
760 2018-06-08 Tom Tromey <tom@tromey.com>
761
762 * linux-low.c (linux_low_read_btrace): Update.
763
764 2018-06-04 Stan Cox <scox@redhat.com>
765
766 * server.h (struct client_state): New.
767 * server.c (cont_thread, general_thread, multi_process)
768 (report_fork_events, report_vfork_events, report_exec_events)
769 (report_thread_events, swbreak_feature, hwbreak_feature)
770 (vCont_supported, disable_randomization, pass_signals)
771 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
772 Moved to client_state.
773 * remote-utils.c (remote_debug, noack_mode)
774 (transport_is_reliable): Moved to client_state.
775 * tracepoint.c (current_traceframe): Moved to client_state.
776
777 Update all callers.
778 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
779 linux-low.c, remote-utils.h, target.c: Use client_state.
780
781 2018-05-31 Alan Hayward <alan.hayward@arm.com>
782
783 * configure.srv: Add new c/h file.
784
785 2018-05-31 Alan Hayward <alan.hayward@arm.com>
786
787 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
788 null VQ.
789
790 2018-05-25 Maciej W. Rozycki <macro@mips.com>
791
792 * gdb.arch/mips-fpregset-core.exp: New test.
793 * gdb.arch/mips-fpregset-core.c: New test source.
794
795 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
796
797 PR server/23198
798 * hostio.c (require_int): Do not report overflow for integers
799 between 0xfffffff and 0x7fffffff.
800
801 2018-05-22 Maciej W. Rozycki <macro@mips.com>
802
803 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
804 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
805 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
806 functions.
807 (the_low_target): Wire them.
808
809 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
810
811 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
812 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
813 mode. Call collect_register_by_name with vscr using
814 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
815 (ppc_store_vrregset): Add and set vscr_offset variable as in
816 ppc_fill_vrregset. Call supply_register_by_name with vscr using
817 vscr_offset.
818
819 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
820
821 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
822 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
823 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
824
825 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
826
827 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
828 (ppc_store_vsxregset): Likewise.
829 (ppc_fill_vrregset): Likewise.
830 (ppc_store_vrregset): Likewise.
831 (ppc_fill_evrregset): Likewise.
832 (ppc_store_evrregset): Likewise.
833 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
834 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
835 needed.
836
837 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
838
839 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
840 wordsize of the inferior. Call ppc_linux_target_wordsize.
841
842 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
843
844 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
845 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
846 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
847 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
848 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
849 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
850 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
851 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
852 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
853 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
854 (tdesc_powerpc_e500l): Remove.
855 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
856 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
857 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
858 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
859 linux-ppc-tdesc.h.
860 (ppc_arch_setup): Remove target description matching code. Fill a
861 ppc_linux_features struct and call ppc_linux_match_description
862 with it.
863
864 2018-05-22 Maciej W. Rozycki <macro@mips.com>
865
866 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
867 width of the requested register exceeds the width of the
868 `ptrace' data type.
869 (mips_cannot_store_register): Likewise.
870
871 2018-05-21 Maciej W. Rozycki <macro@mips.com>
872
873 * linux-mips-low.c (mips_fetch_register): New function. Update
874 preceding comment.
875 (mips_store_gregset): Supply 0 rather than $restart for $zero.
876 (the_low_target): Wire `mips_fetch_register'.
877
878 2018-05-10 Joel Brobecker <brobecker@adacore.com>
879
880 * lynx-i386-low.c (LYNXOS_178): New macro.
881 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
882 the layout on LynxOS-178.
883 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
884 handle floating point registers that are not supported by
885 LynxOS-178.
886
887 2018-05-10 Tom Tromey <tom@tromey.com>
888
889 * configure: Rebuild.
890
891 2018-05-10 Joel Brobecker <brobecker@adacore.com>
892
893 PR server/23158:
894 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
895 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
896 Use it to set the expedite_regs field in the given tdesc.
897 * x86-tdesc.h: New file.
898 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
899 Adjust following the addition of the new expedite_regs parameter
900 to init_target_desc.
901 * linux-tic6x-low.c (tic6x_read_description): Likewise.
902 * linux-x86-tdesc.c: #include "x86-tdesc.h".
903 (i386_linux_read_description, amd64_linux_read_description):
904 Adjust following the addition of the new expedite_regs parameter
905 to init_target_desc.
906 * lynx-i386-low.c: #include "x86-tdesc.h".
907 (lynx_i386_arch_setup): Adjust following the addition of the new
908 expedite_regs parameter to init_target_desc.
909 * nto-x86-low.c: #include "x86-tdesc.h".
910 (nto_x86_arch_setup): Adjust following the addition of the new
911 expedite_regs parameter to init_target_desc.
912 * win32-i386-low.c: #include "x86-tdesc.h".
913 (i386_arch_setup): Adjust following the addition of the new
914 expedite_regs parameter to init_target_desc.
915
916 2018-05-10 Joel Brobecker <brobecker@adacore.com>
917
918 PR server/23158:
919 * win32-low.c (win32_create_inferior): Add call to my_wait
920 setting last_status global.
921
922 2018-05-10 Joel Brobecker <brobecker@adacore.com>
923
924 PR server/23158:
925 * win32-low.c (create_process): Only call gdb_tilde_expand if
926 inferior_cwd is not NULL.
927
928 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
929
930 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
931 registers to the cache if their values have changed.
932 (i387_xsave_to_cache): Provide default values for x87 control
933 registers when these features are available, but disabled.
934 * regcache.c (supply_register_by_name_zeroed): New function.
935 * regcache.h (supply_register_by_name_zeroed): Declare new
936 function.
937
938 2018-05-07 Tom Tromey <tom@tromey.com>
939
940 * configure: Rebuild.
941
942 2018-05-04 Tom Tromey <tom@tromey.com>
943
944 * configure: Rebuild.
945
946 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
947 Pedro Alves <palves@redhat.com>
948
949 * linux-aarch64-low.c (aarch64_stopped_data_address):
950 Likewise.
951
952 2018-04-27 Tom Tromey <tom@tromey.com>
953
954 * configure: Rebuild.
955
956 2018-04-23 Tom Tromey <tom@tromey.com>
957
958 * configure: Rebuild.
959
960 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
961
962 * Makefile.in (depcomp): Add "..".
963 (all_deps_files): New and use it.
964
965 2018-04-18 Alan Hayward <alan.hayward@arm.com>
966
967 * configure.srv (aarch64*-*-linux*): Don't include xml.
968 (i[34567]86-*-cygwin*): Likewise.
969 (i[34567]86-*-linux*): Likewise.
970 (i[34567]86-*-lynxos*): Likewise.
971 (i[34567]86-*-mingw32ce*): Likewise.
972 (i[34567]86-*-mingw*): Likewise.
973 (i[34567]86-*-nto*): Likewise.
974 (tic6x-*-uclinux): Likewise.
975 (x86_64-*-linux*): Likewise.
976 (x86_64-*-mingw*): Likewise.
977 (x86_64-*-cygwin*): Likewise.
978
979 2018-04-18 Alan Hayward <alan.hayward@arm.com>
980
981 * tdesc.c: Remove xml parameter.
982
983 2018-04-18 Alan Hayward <alan.hayward@arm.com>
984
985 * server.c (get_features_xml): Remove cast.
986 * tdesc.c (void target_desc::accept): Fill in function.
987 (tdesc_get_features_xml): Remove old xml creation.
988 (print_xml_feature::visit_pre): Add xml vistor.
989 * tdesc.h (struct target_desc): Make xmltarget mutable.
990 (tdesc_get_features_xml): Remove declaration.
991
992 2018-04-18 Alan Hayward <alan.hayward@arm.com>
993
994 * tdesc.c (tdesc_architecture_name): Add new function.
995 (tdesc_osabi_name): Likewise.
996 (tdesc_get_features_xml): Use new functions.
997
998 2018-04-18 Alan Hayward <alan.hayward@arm.com>
999
1000 * tdesc.c (tdesc_create_flags): Remove.
1001 (tdesc_add_flag): Likewise.
1002 (tdesc_named_type): Likewise.
1003 (tdesc_create_union): Likewise.
1004 (tdesc_create_struct): Likewise.
1005 (tdesc_create_vector): Likewise.
1006 (tdesc_add_bitfield): Likewise.
1007 (tdesc_add_field): Likewise.
1008 (tdesc_set_struct_size): Likewise.
1009
1010 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1011
1012 * tdesc.c (~target_desc): Remove implictly deleted items.
1013 (init_target_desc): Iterate all features.
1014 (tdesc_get_features_xml): Use vector.
1015 (tdesc_create_feature): Create feature.
1016 * tdesc.h (tdesc_feature) Remove
1017 (target_desc): Add features.
1018
1019 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1020
1021 * Makefile.in: Add common/tdesc.c
1022 * tdesc.c (init_target_desc): init all reg_defs from register
1023 vector.
1024 (tdesc_create_reg): Create tdesc_reg.
1025 * tdesc.h (tdesc_feature): Add register vector.
1026
1027 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1028
1029 * tdesc.h (struct target_desc) <features>: Change type to
1030 std::vector<std::string>.
1031 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1032 changes.
1033 (tdesc_get_features_xml): Likewise.
1034 (tdesc_create_feature): Likewise.
1035
1036 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1037
1038 * regcache.c (find_register_by_number): Return a ref.
1039 (find_regno): Use references.
1040 (register_size): Likewise.
1041 (register_data): Likewise.
1042 * tdesc.c (target_desc::~target_desc): Remove free calls.
1043 (target_desc::operator==): Use std::vector compare.
1044 (init_target_desc): Use reference.
1045 (tdesc_create_reg): Use reg constructors.
1046 * tdesc.h (struct target_desc): Replace pointer with object.
1047
1048 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1049
1050 * regcache.c (find_register_by_number): Make static.
1051 (find_regno): Use find_register_by_number
1052 * regcache.h (struct reg): Remove declaration.
1053
1054 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1055
1056 * tdesc.c (target_desc::~target_desc): Move to here.
1057 (target_desc::operator==): Likewise.
1058 * tdesc.h (target_desc::~target_desc): Move from here.
1059 (target_desc::operator==): Likewise.
1060
1061 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1062
1063 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1064
1065 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1066
1067 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1068 S390_TDESC_GS.
1069 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1070 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1071 and init_registers_s390_gs_linux64.
1072
1073 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1074
1075 * linux-s390-low.c (s390_fill_gs): Remove function.
1076 (s390_fill_gsbc): Remove function.
1077 (s390_regsets): Set fill functions for the guarded storage regsets
1078 to NULL.
1079
1080 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1081
1082 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1083 the word size. Add comment.
1084 (s390_get_wordsize): New function.
1085 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1086 pswm with it. Instead, use s390_get_wordsize to determine the
1087 word size first and derive the correct tdesc from that directly.
1088
1089 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1090
1091 * Makefile.in: Include silent-rules.mk.
1092 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1093 (COMPILE): Add ECHO_CXX.
1094 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1095 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1096 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1097 (version-generated.c): Add ECHO_GEN.
1098 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1099 (IPAGENT_COMPILE): Add ECHO_CXX.
1100 (%-generated.c): Add ECHO_REGDAT.
1101
1102 2018-03-14 Tom Tromey <tom@tromey.com>
1103
1104 PR cli/14977:
1105 * ax.c (ax_printf): Special case for NULL.
1106
1107 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1108
1109 * linux-low.c (linux_qxfer_libraries_svr4): Use
1110 xml_escape_text_append.
1111
1112 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1113
1114 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1115
1116 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1117
1118 * server.c (handle_general_set): Remove unnecessary xstrdup.
1119
1120 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1121
1122 * server.c (parse_debug_format_options): Adjust to
1123 delim_string_to_char_ptr_vec changes.
1124 * thread-db.c (thread_db_load_search): Adjust to
1125 dirnames_to_char_ptr_vec changes.
1126
1127 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1128
1129 * target.h (target_enable_btrace, target_disable_btrace)
1130 (target_read_btrace, target_read_btrace_conf): Turn macro into
1131 inline function. Throw error if target method is not defined.
1132 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1133 check for btrace target method. Be prepared to handle exceptions
1134 from btrace target methods.
1135
1136 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1137
1138 * server.c (captured_main): Change order of error message printed
1139 when the current working directory cannot be found.
1140
1141 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1142
1143 * server.c: Include "filenames.h" and "pathstuff.h".
1144 (program_name): Delete variable.
1145 (program_path): New anonymous class.
1146 (get_exec_wrapper): Use "program_path" instead of
1147 "program_name".
1148 (handle_v_run): Likewise.
1149 (captured_main): Likewise.
1150 (process_serial_event): Likewise.
1151
1152 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1153
1154 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1155 (OBJS): Add "pathstuff.o".
1156 * server.c (current_directory): New global variable.
1157 (captured_main): Initialize "current_directory".
1158
1159 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1160
1161 * tdesc.c: Use common/tdesc.h.
1162 * tdesc.h: Likewise.
1163
1164 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1165 Simon Marchi <simon.marchi@ericsson.com>
1166
1167 * Makefile.in: Switch order of make rules.
1168
1169 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1170
1171 * Makefile.in: Add common directory in build.
1172 * configure.ac: Add common reference.
1173 * configure: Regenerate.
1174
1175 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1176
1177 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1178 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1179 * spu-low.c (spu_target_ops): Likewise.
1180 * win32-low.c (win32_target_ops): Likewise.
1181 * server.c (supported_btrace_packets): Report packets unconditionally.
1182 * target.h (target_ops) <supports_btrace>: Remove.
1183 (target_supports_btrace): Remove.
1184
1185 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1186
1187 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1188 (handle_btrace_disable): Change return type to void. Use exceptions
1189 to report errors.
1190 (handle_btrace_general_set): Catch exception and copy message to
1191 return message.
1192
1193 2018-02-08 Tom Tromey <tom@tromey.com>
1194
1195 * linux-low.c (install_software_single_step_breakpoints): Use
1196 make_scoped_restore.
1197 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1198 (do_restore_current_thread_cleanup): Remove.
1199 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1200 declare.
1201
1202 2018-02-08 Tom Tromey <tom@tromey.com>
1203
1204 * mem-break.c (set_raw_breakpoint_at): Use
1205 gdb::unique_xmalloc_ptr.
1206
1207 2018-01-30 Pedro Alves <palves@redhat.com>
1208
1209 PR gdb/13211
1210 * target.c (target_terminal::terminal_state): Rename to ...
1211 (target_terminal::m_terminal_state): ... this.
1212
1213 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1214
1215 * linux-low.c (handle_extended_wait): Surround call to
1216 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1217
1218 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1219
1220 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1221 linux_ptrace_attach_fail_reason_string now returning an
1222 std::string.
1223 (linux_attach): Likewise.
1224 * thread-db.c (attach_thread): Likewise.
1225
1226 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1227
1228 PR gdb/21559
1229 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1230 checking for fs_base/gs_base fields in struct user_regs_struct.
1231 * configure: Regenerate.
1232
1233 2018-01-16 Yao Qi <yao.qi@linaro.org>
1234
1235 PR gdb/18749
1236 * linux-low.c (fetch_register): Call supply_register instead of
1237 error.
1238
1239 2018-01-08 Yao Qi <yao.qi@linaro.org>
1240 Simon Marchi <simon.marchi@ericsson.com>
1241
1242 * Makefile.in (OBS): Remove selftest.o.
1243 * configure.ac: Set srv_selftest_objs if $development is true.
1244 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1245 * configure: Re-generated.
1246 * server.c (captured_main): Wrap variable selftest_filter with
1247 GDB_SELF_TEST.
1248
1249 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1250
1251 * server.c (parse_debug_format_options): Return std::string.
1252 (handle_monitor_command, captured_main): Adjust.
1253
1254 2018-01-05 Pedro Alves <palves@redhat.com>
1255
1256 PR gdb/18653
1257 * server.c (captured_main): Pass quiet=false to
1258 save_original_signals_state.
1259
1260 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1261
1262 * gdbreplay.c (gdbreplay_version): Update copyright year in
1263 version message.
1264 * server.c (gdbserver_version): Likewise.
1265
1266 2017-12-08 Tom Tromey <tom@tromey.com>
1267
1268 * ax.c (ax_printf): Update.
1269
1270 2017-12-07 Yao Qi <yao.qi@linaro.org>
1271
1272 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1273 aarch64_linux_read_description.
1274 * linux-amd64-ipa.c (idx2mask): New array.
1275 (get_ipa_tdesc): Move idx2mask out.
1276 (initialize_low_tracepoint): Initialize target descriptions.
1277 * linux-i386-ipa.c (idx2mask): New array.
1278 (get_ipa_tdesc): Move idx2mask out.
1279 (initialize_low_tracepoint): Initialize target descriptions.
1280
1281 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1282
1283 * tdesc.c (struct tdesc_type): Change return type.
1284 (tdesc_add_flag): Change parameter type.
1285 (tdesc_add_bitfield): Likewise.
1286 (tdesc_add_field): Likewise.
1287 (tdesc_set_struct_size): Likewise.
1288
1289 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1290
1291 * regcache.c (registers_to_string): Remove unused variable.
1292
1293 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1294
1295 * inferiors.c (for_each_inferior_with_data): Remove.
1296 * inferiors.h (for_each_inferior_with_data): Remove.
1297 * server.c (handle_qxfer_threads_worker): Change parameter type.
1298 (handle_qxfer_threads_proper): Use for_each_thread.
1299
1300 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1301
1302 * inferiors.c (for_each_inferior): Remove.
1303 (clear_inferiors): Use for_each_thread.
1304 * inferiors.h (for_each_inferior): Remove.
1305 * linux-low.c (linux_wait_for_event_filtered): Use
1306 for_each_thread.
1307 (linux_stabilize_threads): Likewise.
1308 * regcache.c (regcache_release): Likewise.
1309 * server.c (gdb_wants_all_threads_stopped): Likewise.
1310 (clear_pending_status_callback): Remove.
1311 (handle_status): Use for_each_thread.
1312 (captured_main): Likewise.
1313 * win32-low.c (child_init_thread_list): Likewise.
1314 (win32_clear_inferiors): Likewise.
1315 (fake_breakpoint_event): Likewise.
1316
1317 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1318
1319 * inferiors.h (find_inferior): Remove.
1320 * inferiors.c (find_inferior): Remove.
1321
1322 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1323
1324 * linux-low.c (resume_status_pending_p): Update comment.
1325 (need_step_over_p): Update comment.
1326
1327 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1328
1329 * linux-low.c (proceed_one_lwp): Return void, change parameter
1330 type.
1331 (unsuspend_and_proceed_one_lwp): Likewise.
1332 (proceed_all_lwps): Use for_each_thread.
1333 (unstop_all_lwps): Likewise.
1334
1335 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1336
1337 * linux-low.c (linux_resume_one_thread): Return void, take
1338 parameter directly.
1339 (linux_resume): Use for_each_thread.
1340
1341 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1342
1343 * linux-low.c (send_sigstop_callback): Return void, change
1344 parameter type. Rename to...
1345 (send_sigstop): ... this.
1346 (suspend_and_send_sigstop_callback): Return void, change parameter
1347 type. Rename to...
1348 (suspend_and_send_sigstop): ... this.
1349 (stop_all_lwps): Use for_each_thread.
1350
1351 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1352
1353 * linux-low.c (lwp_running): Return bool, remove unused
1354 argument.
1355 (linux_stabilize_threads): Use find_thread.
1356
1357 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1358
1359 * linux-low.c (select_singlestep_lwp_callback): Remove.
1360 (count_events_callback): Remove.
1361 (select_event_lwp_callback): Remove.
1362 (select_event_lwp): Use find_thread/for_each_thread.
1363
1364 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1365
1366 * linux-low.c (not_stopped_callback): Return bool, take filter
1367 argument directly.
1368 (linux_wait_for_event_filtered): Use find_thread.
1369 (linux_wait_1): Likewise.
1370
1371 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1372
1373 * linux-low.c (same_lwp): Remove.
1374 (find_lwp_pid): Use find_thread.
1375
1376 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1377
1378 * linux-low.c (delete_lwp_callback): Remove.
1379 (linux_mourn): Use for_each_thread.
1380
1381 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1382
1383 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1384 args parameter, don't check for pid.
1385 (linux_detach): Use for_each_thread.
1386
1387 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1388
1389 * linux-low.c (struct counter): Remove.
1390 (second_thread_of_pid_p): Remove.
1391 (last_thread_of_process_p): Use find_thread.
1392
1393 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1394
1395 * inferiors.c (find_inferior_in_random): Remove.
1396 * inferiors.h (find_inferior_in_random): Remove.
1397 * linux-low.c (status_pending_p_callback): Return bool, accept
1398 parameter ptid directly.
1399 (linux_wait_for_event_filtered): Use find_thread_in_random.
1400 (linux_wait_1): Likewise.
1401
1402 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1403
1404 * inferiors.c (find_inferior_id): Remove.
1405 (find_thread_ptid): Move implemention from find_inferior_id to
1406 here.
1407 * inferiors.h (find_inferior_id): Remove.
1408 * server.c (handle_status): Use find_thread_ptid.
1409 (process_serial_event): Likewise.
1410 * thread-db.c (find_one_thread): Likewise.
1411 (thread_db_thread_handle): Likewise.
1412 * win32-low.c (thread_rec): Likewise.
1413 (child_delete_thread): Likewise.
1414 (win32_thread_alive): Likewise.
1415 (get_child_debug_event): Likewise.
1416
1417 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1418
1419 * linux-mips-low.c (update_watch_registers_callback): Return
1420 void, remove pid_p parameter, don't check for pid.
1421 (mips_insert_point, mips_remove_point): Use for_each_thread.
1422
1423 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1424
1425 * lynx.low (lynx_delete_thread_callback): Remove.
1426 (lynx_mourn): Use for_each_thread.
1427
1428 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1429
1430 * regcache.c (regcache_invalidate_one): Remove.
1431 (regcache_invalidate_pid): use for_each_thread.
1432
1433 2017-11-26 Tom Tromey <tom@tromey.com>
1434
1435 * linux-low.c (linux_create_inferior): Update.
1436
1437 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1438
1439 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1440
1441 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1442
1443 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1444 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1445 * linux-aarch64-tdesc-selftest.c: New file.
1446 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1447
1448 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1449
1450 * configure.srv: Add new file.
1451 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1452 * linux-aarch64-tdesc-selftest.c: New file.
1453 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1454
1455 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1456
1457 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1458 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1459 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1460
1461 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1462
1463 * configure.srv: Add new files.
1464 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1465 aarch64_linux_read_description.
1466 * linux-aarch64-low.c (aarch64_linux_read_description):
1467 Merge with aarch64_arch_setup.
1468 (aarch64_arch_setup): Call aarch64_linux_read_description.
1469 * linux-aarch64-tdesc.c: New file.
1470 * linux-aarch64-tdesc.h: New file.
1471
1472 2017-11-24 Yao Qi <yao.qi@linaro.org>
1473
1474 * configure.srv: Set $srv_regobj for tic6x-linux.
1475 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1476 (tic6x_read_description): Move some code to tic6x_arch_setup.
1477 (tic6x_tdesc_test): New function.
1478 (initialize_low_arch): Call selftests::register_test.
1479
1480 2017-11-22 Yao Qi <yao.qi@linaro.org>
1481
1482 * remote-utils.c (prepare_resume_reply): Use memcpy.
1483
1484 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1485
1486 * linux-low.c (kill_one_lwp_callback): Return void, take
1487 argument directly, don't filter on pid.
1488 (linux_kill): Use for_each_thread.
1489
1490 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1491
1492 * linux-low.c (need_step_over_p): Return bool, remove dummy
1493 argument.
1494 (linux_resume, proceed_all_lwps): Use find_thread.
1495
1496 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1497
1498 * linux-low.c (resume_status_pending_p): Return bool, remove
1499 flag_p argument.
1500 (linux_resume): Use find_thread.
1501
1502 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1503
1504 * linux-low.c (struct thread_resume_array): Remove.
1505 (linux_set_resume_request): Return void, take arguments
1506 directly.
1507 (linux_resume): Use for_each_thread.
1508
1509 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1510
1511 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1512 return bool, remove data argument.
1513 (linux_stabilize_threads): Use find_thread.
1514
1515 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1516
1517 * linux-low.c (unsuspend_one_lwp): Remove.
1518 (unsuspend_all_lwps): Use for_each_thread, inline code from
1519 unsuspend_one_lwp.
1520
1521 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1522
1523 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1524 * linux-low.c (struct iterate_over_lwps_args): Remove.
1525 (iterate_over_lwps_filter): Remove.
1526 (iterate_over_lwps): Use find_thread.
1527
1528 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1529
1530 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1531 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1532 code from reset_lwp_ptrace_options_callback.
1533
1534 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1535
1536 * linux-arm-low.c (struct update_registers_data): Remove.
1537 (update_registers_callback): Return void, take arguments
1538 directly, don't check thread's pid.
1539 (arm_insert_point, arm_remove_point): Use for_each_thread.
1540
1541 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1542
1543 * win32-low.c (continue_one_thread): Return void, take argument
1544 directly.
1545 (child_continue): Use for_each_thread.
1546
1547 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1548
1549 * win32-i386-low.c (update_debug_registers_callback): Rename
1550 to ...
1551 (update_debug_registers): ... this, return void, remove pid_p arg.
1552 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1553
1554 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1555
1556 * inferiors.h (struct process_info): Add constructor, initialize
1557 fields..
1558 <syscalls_to_catch>: Change type to std::vector<int>.
1559 * inferiors.c (add_process): Allocate process_info with new.
1560 (remove_process): Free process_info with delete.
1561 * linux-low.c (handle_extended_wait): Adjust.
1562 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1563 * server.c (handle_general_set): Adjust.
1564
1565 2017-11-16 Pedro Alves <palves@redhat.com>
1566
1567 * remote-utils.c (remote_close): Block SIGIO signals instead of
1568 uninstalling the SIGIO handler.
1569
1570 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1571
1572 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1573
1574 2017-11-16 Yao Qi <yao.qi@linaro.org>
1575
1576 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1577 (tic6x_store_gregset): Likewise.
1578 (tic6x_usrregs_info): Move it up.
1579
1580 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1581
1582 * Makefile.in: Update arch rules.
1583 * configure.srv: Explicitly mark arch/ files.
1584
1585 2017-11-13 Andreas Schwab <schwab@suse.de>
1586
1587 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1588 function.
1589 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1590
1591 2017-11-06 Pedro Alves <palves@redhat.com>
1592
1593 * config.in, configure: Regenerate.
1594
1595 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1596
1597 * target.c (struct thread_search): Remove.
1598 (thread_search_callback): Remove.
1599 (prepare_to_access_memory): Use for_each_thread instead of
1600 find_inferior. Inline code from thread_search_callback.
1601
1602 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1603
1604 * server.c (struct visit_actioned_threads_data): Remove.
1605 (visit_actioned_threads): Change prototype to take arguments
1606 directly.
1607 (resume): Use find_thread instead of find_inferior.
1608
1609 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1610
1611 * server.c (queue_stop_reply_callback): Change prototype, return
1612 void.
1613 (find_status_pending_thread_callback): Remove.
1614 (handle_status): Replace find_inferior with find_thread and
1615 for_each_thread.
1616
1617 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1618
1619 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1620 with REGNO.
1621 (aarch64_store_gregset): Likewise.
1622 (aarch64_fill_fpregset): Likewise.
1623 (aarch64_store_fpregset): Likewise.
1624
1625 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1626
1627 * gdbthread.h (find_thread, for_each_thread): New functions.
1628 * inferiors.c (thread_of_pid): Remove.
1629 (find_any_thread_of_pid): Use find_thread.
1630 * linux-low.c (num_lwps): Use for_each_thread.
1631
1632 2017-10-17 Yao Qi <yao.qi@linaro.org>
1633
1634 * Makefile.in: Remove one rule.
1635 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1636
1637 2017-10-17 Yao Qi <yao.qi@linaro.org>
1638
1639 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1640 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1641
1642 2017-10-17 Yao Qi <yao.qi@linaro.org>
1643
1644 * configure.srv: Rename arm.o with arch/arm.o.
1645
1646 2017-10-17 Yao Qi <yao.qi@linaro.org>
1647
1648 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1649 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1650 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1651 (arch-i386.o, arch-amd64.o): Remove rules.
1652 (arch/%.o): New rule.
1653 Update POSTCOMPILE and COMPILE.pre.
1654 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1655 * configure: Re-generated.
1656 * configure.srv: Replace arch-i386.o with arch/i386.o.
1657 Replace arch-amd64.o with arch/amd64.o.
1658
1659 2017-10-16 Yao Qi <yao.qi@linaro.org>
1660
1661 * configure: Regenerated.
1662
1663 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1664
1665 * inferiors.h: (struct inferior_list): Remove.
1666 (struct inferior_list_entry); Remove.
1667 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1668 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1669 get_first_inferior): Remove.
1670 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1671 find_inferior_id, find_inferior_in_random): Change signature.
1672 * inferiors.c (all_threads): Change type to
1673 std::list<thread_info *>.
1674 (get_thread): Remove macro.
1675 (find_inferior, find_inferior_id): Change signature, implement
1676 using find_thread.
1677 (find_inferior_in_random): Change signature, implement using
1678 find_thread_in_random.
1679 (for_each_inferior, for_each_inferior_with_data): Change
1680 signature, implement using for_each_thread.
1681 (add_inferior_to_list, remove_inferior): Remove.
1682 (add_thread, get_first_thread, thread_of_pid,
1683 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1684 (get_first_inferior, one_inferior_p, clear_inferior_list):
1685 Remove.
1686 (clear_inferiors, get_thread_process): Update.
1687 * gdbthread.h: Include <list>.
1688 (struct thread_info) <entry>: Remove field.
1689 <id>: New field.
1690 (all_threads): Change type to std::list<thread_info *>.
1691 (get_first_inferior): Add doc.
1692 (find_thread, for_each_thread, find_thread_in_random): New
1693 functions.
1694 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1695 * linux-arm-low.c (update_registers_callback): Update.
1696 * linux-low.c (second_thread_of_pid_p): Update.
1697 (kill_one_lwp_callback, linux_detach_lwp_callback,
1698 delete_lwp_callback, status_pending_p_callback, same_lwp,
1699 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1700 iterate_over_lwps, not_stopped_callback,
1701 resume_stopped_resumed_lwps, count_events_callback,
1702 select_singlestep_lwp_callback, select_event_lwp_callback,
1703 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1704 suspend_and_send_sigstop_callback, wait_for_sigstop,
1705 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1706 lwp_running, linux_set_resume_request, resume_status_pending_p,
1707 need_step_over_p, start_step_over, linux_resume_one_thread,
1708 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1709 reset_lwp_ptrace_options_callback): Update.
1710 * linux-mips-low.c (update_watch_registers_callback): Update.
1711 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1712 Update.
1713 (free_register_cache_thread_one): Remove.
1714 (regcache_release): Update.
1715 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1716 handle_qxfer_threads_worker): Update.
1717 (handle_query): Update, use list iterator.
1718 (visit_actioned_threads, handle_pending_status,
1719 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1720 clear_pending_status_callback, set_pending_status_callback,
1721 find_status_pending_thread_callback, handle_status,
1722 process_serial_event): Update.
1723 * target.c (thread_search_callback): Update.
1724 * thread-db.c (thread_db_get_tls_address): Update.
1725 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1726 Update.
1727 * win32-i386-low.c (update_debug_registers_callback): Update.
1728 * win32-low.c (delete_thread_info, child_delete_thread,
1729 continue_one_thread, suspend_one_thread,
1730 get_child_debug_event): Adjust.
1731
1732 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1733
1734 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1735 * inferiors.h: Include <list>.
1736 (struct process_info) <entry>: Remove field.
1737 <pid>: New field.
1738 (pid_of): Change macro to function.
1739 (ptid_of, lwpid_of): Remove macro.
1740 (all_processes): Change type to std::list<process_info *>.
1741 (ALL_PROCESSES): Remove macro.
1742 (for_each_process, find_process): New function.
1743 * inferiors.c (all_processes): Change type to
1744 std::list<process_info *>.
1745 (find_thread_process): Adjust.
1746 (add_process): Likewise.
1747 (remove_process): Likewise.
1748 (find_process_pid): Likewise.
1749 (get_first_process): Likewise.
1750 (started_inferior_callback): Remove.
1751 (have_started_inferiors_p): Adjust.
1752 (attached_inferior_callback): Remove.
1753 (have_attached_inferiors_p): Adjust.
1754 * linux-low.c (check_zombie_leaders): Likewise.
1755 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1756 (x86_linux_update_xmltarget): Adjust.
1757 * server.c (handle_query): Likewise.
1758 (gdb_reattached_process): Remove.
1759 (handle_status): Adjust.
1760 (kill_inferior_callback): Likewise.
1761 (detach_or_kill_inferior): Remove.
1762 (print_started_pid): Likewise.
1763 (print_attached_pid): Likewise.
1764 (detach_or_kill_for_exit): Update.
1765 (process_serial_event): Likewise.
1766 * linux-arm-low.c (arm_new_fork): Likewise.
1767
1768 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1769
1770 * dll.h: Include <list>.
1771 (struct dll_info): Add constructor.
1772 <entry>: Remove field.
1773 (all_dlls): Change type to std::list<dll_info>.
1774 * dll.c: Include <algorithm>.
1775 (get_dll): Remove macro.
1776 (all_dlls): Change type to std::list<dll_info *>.
1777 (free_one_dll): Remove.
1778 (match_dll): Likewise.
1779 (loaded_dll): Adjust.
1780 (unloaded_dll): Adjust to all_dlls type change, use
1781 std::find_if. Inline code from match_dll.
1782 (clear_dlls): Adjust to all_dlls type change.
1783 * server.c (emit_dll_description): Remove.
1784 (handle_qxfer_libraries): Adjust to all_dlls type change,
1785 integrate emit_dll_description's functionality.
1786
1787 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1788
1789 * linux-low.h (struct linux_target_ops) <delete_process>: New
1790 field.
1791 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1792 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1793 (struct linux_target_ops): Add delete_process callback.
1794 * linux-arm-low.c (arm_delete_process): New.
1795 (struct linux_target_ops): Add delete_process callback.
1796 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1797 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1798 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1799 * linux-mips-low.c (mips_linux_delete_process): New.
1800 (struct linux_target_ops): Add delete_process callback.
1801 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1802 * linux-s390-low.c (struct linux_target_ops): Likewise.
1803 * linux-sh-low.c (struct linux_target_ops): Likewise.
1804 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1805 * linux-tile-low.c (struct linux_target_ops): Likewise.
1806 * linux-x86-low.c (x86_linux_delete_process): New.
1807 (struct linux_target_ops): Add delete_process callback.
1808 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1809
1810 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1811
1812 * linux-aarch64-low.c (the_low_target): Add thread delete
1813 callback.
1814 * linux-arm-low.c (arm_delete_thread): New function.
1815 (the_low_target): Add thread delete callback.
1816 * linux-bfin-low.c (the_low_target): Likewise.
1817 * linux-crisv32-low.c (the_low_target): Likewise.
1818 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1819 set.
1820 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1821 field.
1822 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1823 * linux-mips-low.c (mips_linux_delete_thread): New function.
1824 (the_low_target): Add thread delete callback.
1825 * linux-ppc-low.c (the_low_target): Likewise.
1826 * linux-s390-low.c (the_low_target): Likewise.
1827 * linux-sh-low.c (the_low_target): Likewise.
1828 * linux-tic6x-low.c (the_low_target): Likewise.
1829 * linux-tile-low.c (the_low_target): Likewise.
1830 * linux-x86-low.c (the_low_target): Likewise.
1831 * linux-xtensa-low.c (the_low_target): Likewise.
1832
1833 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1834
1835 * win32-low.c: Include "common-inferior.h".
1836
1837 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1838
1839 * inferiors.c (set_inferior_cwd): New function.
1840 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1841 (handle_query): Inform that QSetWorkingDir is supported.
1842 * win32-low.c (create_process): Pass the inferior's cwd to
1843 CreateProcess.
1844
1845 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1846
1847 * inferiors.c (current_inferior_cwd): New global variable.
1848 (get_inferior_cwd): New function.
1849 * inferiors.h (struct process_info) <cwd>: New field.
1850
1851 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1852
1853 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1854 (OBS): Add gdb_tilde_expand.o.
1855
1856 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1857
1858 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1859 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1860
1861 2017-09-29 Pedro Alves <palves@redhat.com>
1862
1863 * ax.c (gdb_parse_agent_expr): Constify.
1864 * ax.h (gdb_parse_agent_expr): Constify.
1865 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1866 Constify.
1867 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1868 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1869 * remote-utils.h (read_ptid): Constify.
1870 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1871 (process_point_options, process_serial_event): Constify.
1872 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1873 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1874 (cmd_qtbuffer): Constify.
1875
1876 2017-09-29 Pedro Alves <palves@redhat.com>
1877
1878 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1879 fails.
1880
1881 2017-09-29 Pedro Alves <palves@redhat.com>
1882
1883 * linux-low.c (handle_extended_wait): Pass parent thread instead
1884 of process to thread_db_notice_clone.
1885 * linux-low.h (thread_db_notice_clone): Replace parent process
1886 parameter with parent thread parameter.
1887 * thread-db.c (find_one_thread): Add comment.
1888 (thread_db_notice_clone): Replace parent process parameter with
1889 parent thread parameter. Temporarily switch to the parent thread.
1890
1891 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1892
1893 * gdbthread.h: Include "common-gdbthread.h".
1894 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1895 "if" when validating the ptid.
1896 * remote-utils.c: Include "gdbthread.h".
1897 (prepare_resume_reply): Use "switch_to_thread".
1898 * target.c (done_accessing_memory): Likewise.
1899
1900 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1901
1902 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1903 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1904 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1905 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1906 s390x-gs-linux64-ipa.o to ipa_obj.
1907 * linux-s390-low.c (HWCAP_S390_GS): New define.
1908 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1909 New functions.
1910 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1911 (s390_arch_setup): Check for guarded-storage support and choose
1912 appropriate tdesc.
1913 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1914 init_registers_s390x_gs_linux64.
1915 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1916 enum value.
1917 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1918 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1919
1920 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1921
1922 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1923
1924 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1925
1926 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1927 (thread_db_thread_handle): Declare.
1928 * linux-low.c (linux_target_ops): Initialize thread_handle.
1929 * server.c (handle_qxfer_threads_worker): Add support for
1930 "handle" attribute.
1931 * target.h (struct target_ops): Add new function pointer,
1932 thread_handle.
1933 (target_thread_handle): Define.
1934 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1935 field in lwp.
1936 (thread_db_thread_handle): New function.
1937
1938 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1939
1940 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1941 * linux-low.h (thread_db_notice_clone): Declare.
1942 * thread-db.c (thread_db_notice_clone): New function.
1943
1944 2017-09-21 Pedro Alves <palves@redhat.com>
1945
1946 * server.c (gdb_read_memory, handle_status, process_serial_event)
1947 (handle_serial_event, handle_target_event): Adjust to
1948 set_desired_thread prototype change.
1949 * target.c (set_desired_thread): Remove 'use_general' parameter
1950 and adjust.
1951 * target.h (set_desired_thread): Remove 'use_general' parameter.
1952
1953 2017-09-20 Tom Tromey <tom@tromey.com>
1954
1955 * target.c (target_terminal::terminal_state): Define.
1956 (target_terminal::init): Rename from target_terminal_init.
1957 (target_terminal::inferior): Rename from
1958 target_terminal_inferior.
1959 (target_terminal::ours): Rename from target_terminal_ours.
1960 (target_terminal::ours_for_output, target_terminal::info): New.
1961
1962 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1963
1964 * server.c (accumulate_file_name_length): Remove.
1965 (emit_dll_description): Adjust to std::string change.
1966 (handle_qxfer_libraries): Use std::string to hold document.
1967
1968 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1969
1970 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1971 return type of xml_escape_text.
1972 * server.c (emit_dll_description): Likewise.
1973
1974 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1975
1976 * server.c (captured_main): Accept argument for --selftest.
1977 Update run_tests call.
1978 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1979 when registering selftests.
1980
1981 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1982
1983 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1984 instead of "VEC" for "target_desc.reg_defs".
1985 (regcache_cpy): Likewise.
1986 (registers_to_string): Likewise.
1987 (registers_from_string): Likewise.
1988 (find_regno): Likewise.
1989 (supply_regblock): Likewise.
1990 (regcache_raw_read_unsigned): Likewise.
1991 * tdesc.c (init_target_desc): Likewise.
1992 (tdesc_create_reg): Likewise.
1993 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1994 (struct target_desc) <reg_defs>: Convert to "std::vector".
1995 (target_desc): Do not initialize "reg_defs".
1996 (~target_desc): Update code to use "std::vector" instead of "VEC"
1997 for "target_desc.reg_defs".
1998 (operator==): Likewise.
1999
2000 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2001
2002 * inferiors.h (thread_to_gdb_id): Remove.
2003 * inferiors.c (thread_to_gdb_id): Remove.
2004 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2005 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2006 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2007 Likewise.
2008 * nto-low.c (nto_fetch_registers, nto_store_registers,
2009 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2010
2011 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2012
2013 * inferiors.h (gdb_id_to_thread_id): Remove.
2014 * inferiors.c (gdb_id_to_thread_id): Remove.
2015 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2016 removal. Move pid declaration closer to where it's used.
2017
2018 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2019
2020 * server.c (handle_detach): New function.
2021 (process_serial_event): Move code out, call handle_detach.
2022
2023 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2024
2025 * server.c (require_running): Rename to ...
2026 (require_running_or_return): ... this ...
2027 (require_running_or_break): ... and this.
2028 (handle_query, process_serial_event): Adjust.
2029
2030 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2031
2032 * linux-low.c (linux_set_resume_request): Remove unused
2033 variables.
2034
2035 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2036
2037 * server.c (first_thread_of): Remove.
2038 (process_serial_event): Replace usage of first_thread_of with
2039 find_any_thread_of_pid.
2040 * tracepoint.c (same_process_p): Remove.
2041 (gdb_agent_about_to_close): Replace usage of same_process_p with
2042 find_any_thread_of_pid.
2043 * linux-x86-low.c (same_process_callback): Remove.
2044 (x86_arch_setup_process_callback): Replace usage of
2045 same_process_callback with find_any_thread_of_pid.
2046 * thread-db.c (any_thread_of): Remove.
2047 (switch_to_process): Replace usage of any_thread_of with
2048 find_any_thread_of_pid.
2049 * inferiors.c (thread_pid_matches_callback): Remove.
2050 (find_thread_process): Adjust to use find_any_thread_of_pid.
2051
2052 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2053
2054 * regcache.c (get_thread_regcache): Guard calls to "memset"
2055 with "!VEC_empty".
2056
2057 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2058
2059 * linux-low.c (handle_extended_wait): Use
2060 "allocate_target_description" instead of "XNEW".
2061 * linux-x86-low.c (initialize_low_arch): Likewise.
2062
2063 2017-09-05 Yao Qi <yao.qi@linaro.org>
2064
2065 * configure.srv (srv_i386_regobj): Remove.
2066 (srv_amd64_regobj): Remove.
2067 (srv_regobj): Set it to "" for x86 non-linux targets.
2068 * linux-x86-tdesc.c (i386_linux_read_description):
2069 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2070 (init_registers_i386): Remove the declaration.
2071 (tdesc_i386): Remove the declaration.
2072 (lynx_i386_arch_setup): Call i386_create_target_description.
2073 * nto-x86-low.c: Likewise.
2074 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2075 [!__x86_64__]: include arch/i386.h.
2076 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2077
2078 2017-09-05 Yao Qi <yao.qi@linaro.org>
2079
2080 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2081 i386/amd64-XXX-linux from it.
2082
2083 2017-09-05 Yao Qi <yao.qi@linaro.org>
2084
2085 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2086 false.
2087 (ipa_amd64_linux_regobj): Remove.
2088 (ipa_x32_linux_regobj): Remove.
2089
2090 2017-09-05 Yao Qi <yao.qi@linaro.org>
2091
2092 * Makefile.in (arch-amd64.o): New rule.
2093 * configure.srv: Append arch-amd64.o.
2094 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2095 (get_ipa_tdesc): Call amd64_linux_read_description.
2096 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2097 and init_registers_amd64_XXX.
2098 * linux-x86-low.c (x86_linux_read_description): Call
2099 amd64_linux_read_description.
2100 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2101 (initialize_low_arch): Don't call init_registers_x32_XXX and
2102 init_registers_amd64_XXX.
2103 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2104 and tdesc_amd64_XXX.
2105 [__x86_64__] (amd64_tdesc_test): New function.
2106 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2107 and init_registers_amd64_XXX.
2108 * linux-x86-tdesc.c: Include arch/amd64.h.
2109 (xcr0_to_tdesc_idx): New function.
2110 (i386_linux_read_description): New function.
2111 (amd64_get_ipa_tdesc_idx): New function.
2112 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2113 (amd64_get_ipa_tdesc): Declare.
2114
2115 2017-09-05 Yao Qi <yao.qi@linaro.org>
2116
2117 * configure.srv (srv_i386_linux_xmlfiles): Remove
2118 i386/i386-XXX-linux.xml from it.
2119
2120 2017-09-05 Yao Qi <yao.qi@linaro.org>
2121
2122 * configure.srv: Set srv_i386_linux_regobj empty if $development
2123 is false.
2124 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2125 initialize_low_tdesc.
2126 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2127 with #if initialize_low_tdesc.
2128 * linux-x86-tdesc-selftest.c: New file.
2129 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2130
2131 2017-09-05 Yao Qi <yao.qi@linaro.org>
2132
2133 * Makefile.in (arch-i386.o): New rule.
2134 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2135 (x86_64-*-linux*): Likewise.
2136 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2137 include arch/i386.h.
2138 (i386_linux_read_description): Remove code and call
2139 i386_create_target_description.
2140 * tdesc.c (allocate_target_description): New function.
2141 * tdesc.h (set_tdesc_architecture): Remove declaration.
2142 (set_tdesc_osabi): Likewise.
2143
2144 2017-09-05 Yao Qi <yao.qi@linaro.org>
2145
2146 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2147 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2148 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2149 .xmltarget.
2150 * server.c (get_features_xml): Call tdesc_get_features_xml.
2151 * tdesc.c (set_tdesc_architecture): New function.
2152 (set_tdesc_osabi): New function.
2153 (tdesc_get_features_xml): New function.
2154 (tdesc_create_feature): Add an argument.
2155 * tdesc.h (struct target_desc) <features>: New field.
2156 <arch, osabi>: New field.
2157 (~target_desc): xfree features, arch, and osabi.
2158 (target_desc::oerator==): Don't compare .xmltarget.
2159 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2160 (set_tdesc_osabi): Likewise.
2161 (tdesc_get_features_xml): Likewise.
2162
2163 2017-09-05 Yao Qi <yao.qi@linaro.org>
2164
2165 * linux-x86-tdesc.c: Include selftest.h.
2166 (i386_tdesc_test): New function.
2167 (initialize_low_tdesc): Call selftests::register_test.
2168 * tdesc.h: Include regdef.h.
2169 (target_desc): Override operator == and !=.
2170
2171 2017-09-05 Yao Qi <yao.qi@linaro.org>
2172
2173 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2174 (ipa_obj): Likewise.
2175 * linux-i386-ipa.c: Include common/x86-xstate.h
2176 (get_ipa_tdesc): Call i386_linux_read_description.
2177 (initialize_low_tracepoint): Don't call init_registers_XXX
2178 functions, call initialize_low_tdesc instead.
2179 * linux-x86-low.c (x86_linux_read_description): Call
2180 i386_linux_read_description.
2181 (initialize_low_arch): Don't call init_registers_i386_XXX
2182 functions, call initialize_low_tdesc.
2183 * linux-x86-tdesc.c: New file.
2184 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2185 (i386_get_ipa_tdesc_idx): Declare.
2186 (i386_get_ipa_tdesc): Declare.
2187 (initialize_low_tdesc): Declare.
2188
2189 2017-09-05 Yao Qi <yao.qi@linaro.org>
2190
2191 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2192 instead of 0.
2193
2194 2017-09-05 Yao Qi <yao.qi@linaro.org>
2195
2196 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2197 * regcache.c (get_thread_regcache): Use VEC_length.
2198 (init_register_cache): Likewise.
2199 (regcache_cpy): Likewise.
2200 (registers_to_string): Iterate reg_defs via VEC_iterate.
2201 (find_regno): Likewise.
2202 (find_register_by_number): Use VEC_index.
2203 (register_size): Call find_register_by_number.
2204 (register_data): Call find_register_by_number.
2205 (supply_regblock): Use VEC_length.
2206 (regcache_raw_read_unsigned): Likewise.
2207 * tdesc.c (init_target_desc): Iterate reg_defs via
2208 VEC_iterate.
2209 (default_description): Update initializer.
2210 (copy_target_description): Don't update field num_registers.
2211 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2212 <num_registers>: Remove.
2213
2214 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2215
2216 * Makefile.in (.SECONDARY): Define target.
2217
2218 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2219
2220 * linux-low.c (linux_wait_1): Adjust.
2221 * server.c (queue_stop_reply_callback): Adjust.
2222
2223 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2224
2225 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2226 QEnvironmentUnset and QEnvironmentReset packets.
2227 (handle_query): Inform remote that QEnvironmentHexEncoded,
2228 QEnvironmentUnset and QEnvironmentReset are supported.
2229
2230 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2231
2232 * inferiors.h (inferior_target_data): Rename to ...
2233 (thread_target_data): ... this.
2234 (inferior_regcache_data): Rename to ...
2235 (thread_regcache_data): ... this.
2236 (set_inferior_regcache_data): Rename to ...
2237 (set_thread_regcache_data): ... this.
2238 * inferiors.c (inferior_target_data): Rename to ...
2239 (thread_target_data): ... this.
2240 (inferior_regcache_data): Rename to ...
2241 (thread_regcache_data): ... this.
2242 (set_inferior_regcache_data): Rename to ...
2243 (set_thread_regcache_data): ... this.
2244 (free_one_thread): Update.
2245 * linux-low.h (get_thread_lwp): Update.
2246 * regcache.c (get_thread_regcache): Update.
2247 (regcache_invalidate_thread): Update.
2248 (free_register_cache_thread): Update.
2249 * win32-i386-low.c (update_debug_registers_callback): Update.
2250 (win32_get_current_dr): Update.
2251 * win32-low.c (thread_rec): Update.
2252 (delete_thread_info): Update.
2253 (continue_one_thread): Update.
2254 (suspend_one_thread): Update.
2255
2256 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2257
2258 * inferiors.c (set_inferior_target_data): Remove.
2259 * inferiors.h (set_inferior_target_data): Remove.
2260
2261 2017-08-18 Yao Qi <yao.qi@linaro.org>
2262
2263 * Makefile.in (OBS): Add selftest.o.
2264 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2265 * configure, config.in: Re-generated.
2266 * server.c: Include common/sefltest.h.
2267 (captured_main): Handle option --selftest.
2268
2269 2017-08-09 Yao Qi <yao.qi@linaro.org>
2270
2271 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2272 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2273 i386-avx-mpx.o and i386-mmx.o.
2274 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2275 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2276 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2277 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2278 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2279 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2280 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2281 i386/amd64-avx-mpx.xml.
2282
2283 2017-08-09 Yao Qi <yao.qi@linaro.org>
2284
2285 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2286 and x32-avx-avx512.o.
2287 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2288 i386/x32-avx-avx512.xml.
2289
2290 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2291
2292 * tracepoint.h (enum class fast_tpoint_collect_result): New
2293 enumeration.
2294 (fast_tracepoint_collecting): Change return type to
2295 fast_tpoint_collect_result.
2296 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2297 * linux-low.h: Include tracepoint.h.
2298 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2299 fast_tpoint_collect_result.
2300 * linux-low.c (handle_tracepoints): Adjust.
2301 (linux_fast_tracepoint_collecting): Change return type to
2302 fast_tpoint_collect_result.
2303 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2304 linux_wait_1, stuck_in_jump_pad_callback,
2305 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2306 proceed_one_lwp): Adjust to type change.
2307
2308 2017-07-10 Yao Qi <yao.qi@linaro.org>
2309
2310 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2311
2312 2017-06-29 Yao Qi <yao.qi@linaro.org>
2313
2314 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2315 Remove.
2316 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2317
2318 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2319
2320 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2321
2322 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2323
2324 * linux-low.c (linux_create_inferior): Adjust code to access the
2325 environment information via 'gdb_environ' class.
2326 * lynx-low.c (lynx_create_inferior): Likewise.
2327 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2328 (get_environ): Return a pointer to 'our_environ'.
2329 (captured_main): Initialize 'our_environ'.
2330 * server.h (get_environ): Adjust prototype.
2331 * spu-low.c (spu_create_inferior): Adjust code to access the
2332 environment information via 'gdb_environ' class.
2333
2334 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2335
2336 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2337 usage of "register" keyword.
2338
2339 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2340
2341 * configure: Re-generate.
2342
2343 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2344
2345 * configure: Re-generate.
2346
2347 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2348
2349 * Makefile.in (COMPILE.pre): Add "-x c++".
2350
2351 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2352
2353 * fork-child.c: Conditionally include <signal.h>.
2354
2355 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2356
2357 * server.c (handle_general_set): Handle new packet
2358 "QStartupWithShell".
2359 (handle_query): Add "QStartupWithShell" to the list of supported
2360 packets.
2361 (gdbserver_usage): Add help text explaining the
2362 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2363 options.
2364 (captured_main): Recognize and act upon the presence of the new
2365 CLI options.
2366
2367 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2368 Pedro Alves <palves@redhat.com>
2369
2370 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2371 * configure: Regenerate.
2372 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2373 "fork-inferior.o".
2374 (i[34567]86-*-lynxos*): Likewise.
2375 (spu*-*-*): Likewise.
2376 * fork-child.c: New file.
2377 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2378 and "environ.h".
2379 (linux_ptrace_fun): New function.
2380 (linux_create_inferior): Adjust function prototype to reflect
2381 change on "target.h". Adjust function code to use
2382 "fork_inferior".
2383 (linux_request_interrupt): Delete "signal_pid".
2384 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2385 (lynx_ptrace_fun): New function.
2386 (lynx_create_inferior): Adjust function prototype to reflect
2387 change on "target.h". Adjust function code to use
2388 "fork_inferior".
2389 * nto-low.c (nto_create_inferior): Adjust function prototype and
2390 code to reflect change on "target.h". Update comments.
2391 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2392 "common-terminal.h" and "environ.h".
2393 (terminal_fd): Moved to fork-child.c.
2394 (old_foreground_pgrp): Likewise.
2395 (restore_old_foreground_pgrp): Likewise.
2396 (last_status): Make it global.
2397 (last_ptid): Likewise.
2398 (our_environ): New variable.
2399 (startup_with_shell): Likewise.
2400 (program_name): Likewise.
2401 (program_argv): Rename to...
2402 (program_args): ...this.
2403 (wrapper_argv): New variable.
2404 (start_inferior): Delete function.
2405 (get_exec_wrapper): New function.
2406 (get_exec_file): Likewise.
2407 (get_environ): Likewise.
2408 (prefork_hook): Likewise.
2409 (post_fork_inferior): Likewise.
2410 (postfork_hook): Likewise.
2411 (postfork_child_hook): Likewise.
2412 (handle_v_run): Update code to deal with arguments coming from the
2413 remote host. Update calls from "start_inferior" to
2414 "create_inferior".
2415 (captured_main): Likewise. Initialize environment variable. Call
2416 "have_job_control".
2417 * server.h (post_fork_inferior): New prototype.
2418 (get_environ): Likewise.
2419 (last_status): Declare.
2420 (last_ptid): Likewise.
2421 (signal_pid): Likewise.
2422 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2423 (spu_ptrace_fun): New function.
2424 (spu_create_inferior): Adjust function prototype to reflect change
2425 on "target.h". Adjust function code to use "fork_inferior".
2426 * target.c (target_terminal_init): New function.
2427 (target_terminal_inferior): Likewise.
2428 (target_terminal_ours): Likewise.
2429 * target.h: Include <vector>.
2430 (struct target_ops) <create_inferior>: Update prototype.
2431 (create_inferior): Update macro.
2432 * utils.c (gdb_flush_out_err): New function.
2433 * win32-low.c (win32_create_inferior): Adjust function prototype
2434 and code to reflect change on "target.h".
2435
2436 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2437
2438 * inferiors.c (switch_to_thread): New function.
2439
2440 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2441
2442 * Makefile.in (SFILE): Add "common/job-control.c".
2443 (OBS): Add "job-control.o".
2444
2445 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2446
2447 * Makefile: Remove "@host_makefile_frag@".
2448
2449 2017-05-05 Pedro Alves <palves@redhat.com>
2450
2451 * configure: Regenerate.
2452
2453 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2454
2455 * configure: Regenerate.
2456
2457 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2458
2459 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2460 software_single_step change of return type to
2461 std::vector<CORE_ADDR>.
2462 * linux-low.c (install_software_single_step_breakpoints):
2463 Likewise.
2464 * linux-low.h (install_software_single_step_breakpoints):
2465 Likewise.
2466
2467 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2468
2469 * remote-utils.c: Include "gdb_termios.h" instead of
2470 "terminal.h".
2471 * terminal.h: Delete file.
2472
2473 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2474
2475 * server.c: Include <vector>.
2476 <program_argv, wrapper_argv>: Convert to std::vector.
2477 (start_inferior): Rewrite function to use C++.
2478 (handle_v_run): Likewise. Update code that calculates the argv
2479 based on the vRun packet; use C++.
2480 (captured_main): Likewise.
2481
2482 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2483
2484 * server.c (handle_v_cont): Initialize thread_resume::thread
2485 with null_ptid.
2486
2487 2017-04-05 Pedro Alves <palves@redhat.com>
2488
2489 * configure: Regenerate.
2490
2491 2017-04-05 Pedro Alves <palves@redhat.com>
2492
2493 * gdbreplay.c (sync_error): Constify.
2494 * linux-x86-low.c (push_opcode): Constify.
2495
2496 2017-04-05 Pedro Alves <palves@redhat.com>
2497
2498 * win32-low.c (get_child_debug_event)
2499 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2500 Report TARGET_WAITKIND_SPURIOUS instead.
2501
2502 2017-04-05 Pedro Alves <palves@redhat.com>
2503
2504 * remote-utils.c (remote_prepare, remote_open): Constify.
2505 * remote-utils.h (remote_prepare, remote_open): Constify.
2506 * server.c (captured_main): Constify 'port' handling.
2507
2508 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2509
2510 * Makefile.in (clean): Clear .deps.
2511
2512 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2513
2514 * .gitignore: Remove generated files, replace with wildcard.
2515 * (clean): Replace removal of generated files with wildcard.
2516 (version.c): Replace with...
2517 (version-generated.c): ...this.
2518 (xml-builtin.c): Replace with...
2519 (xml-builtin-generated.c): ...this.
2520 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2521 (%.c: *regformats*): Replace with...
2522 (%-generated.c: *regformats*): ...this.
2523
2524 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2525
2526 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2527 (xtensa_fill_gregset): Call collect_register_by_name for
2528 threadptr register.
2529 (xtensa_store_gregset): Call supply_register_by_name for
2530 threadptr register.
2531
2532 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2533
2534 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2535 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2536 (xtensa_store_gregset): Call supply_register for all registers in
2537 a0_regnum..a0_regnum + C0_NREGS range.
2538
2539 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2540
2541 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2542 (ax-ipa.o: ax.c): Remove.
2543 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2544 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2545 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2546 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2547 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2548
2549 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2550
2551 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2552 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2553 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2554 (errors-ipa.o: ../common/errors.c): Remove.
2555 (format-ipa.o: ../common/format.c): Remove.
2556 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2557
2558 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2559
2560 * Makefile.in (%-ipa.o: %.c): New rule.
2561 (tracepoint-ipa.o: tracepoint.c): Remove.
2562 (utils-ipa.o: utils.c): Remove.
2563 (remote-utils-ipa.o: remote-utils.c): Remove.
2564 (regcache-ipa.o: regcache.c): Remove.
2565 (i386-linux-ipa.o: i386-linux.c): Remove.
2566 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2567 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2568 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2569 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2570 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2571 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2572 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2573 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2574 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2575 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2576 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2577 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2578 (aarch64-ipa.o: aarch64.c): Remove.
2579 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2580 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2581 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2582 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2583 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2584 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2585 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2586 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2587 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2588 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2589 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2590 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2591 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2592 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2593 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2594 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2595 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2596 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2597 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2598 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2599 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2600 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2601 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2602 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2603 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2604 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2605 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2606 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2607 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2608 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2609 (tdesc-ipa.o: tdesc.c): Remove.
2610 (x32-linux-ipa.o: x32-linux.c): Remove.
2611 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2612 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2613
2614 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2615
2616 * Makefile.in (%.o: ../arch/%.c): New rule.
2617 (arm.o: ../arch/arm.c): Remove.
2618 (arm-linux.o: ../arch/arm-linux.c): Remove.
2619 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2620 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2621
2622 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2623
2624 * Makefile.in (%.o: ../nat/%.c): New rule.
2625 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2626 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2627 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2628 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2629 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2630 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2631 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2632 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2633 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2634 (linux-personality.o: ../nat/linux-personality.c): Remove.
2635 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2636 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2637 (x86-linux.o: ../nat/x86-linux.c): Remove.
2638 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2639 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2640
2641 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2642
2643 * Makefile.in (%.o: ../common/%.c): New rule.
2644 (signals.o: ../common/signals.c): Remove.
2645 (print-utils.o: ../common/print-utils.c): Remove.
2646 (rsp-low.o: ../common/rsp-low.c): Remove.
2647 (common-utils.o: ../common/common-utils.c): Remove.
2648 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2649 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2650 (vec.o: ../common/vec.c): Remove.
2651 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2652 (xml-utils.o: ../common/xml-utils.c): Remove.
2653 (ptid.o: ../common/ptid.c): Remove.
2654 (buffer.o: ../common/buffer.c): Remove.
2655 (format.o: ../common/format.c): Remove.
2656 (filestuff.o: ../common/filestuff.c): Remove.
2657 (agent.o: ../common/agent.c): Remove.
2658 (errors.o: ../common/errors.c): Remove.
2659 (environ.o: ../common/environ.c): Remove.
2660 (common-debug.o: ../common/common-debug.c): Remove.
2661 (cleanups.o: ../common/cleanups.c): Remove.
2662 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2663 (fileio.o: ../common/fileio.c): Remove.
2664 (common-regcache.o: ../common/common-regcache.c): Remove.
2665 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2666 (new-op.o: ../common/new-op.c): Remove.
2667 (btrace-common.o: ../common/btrace-common.c): Remove.
2668
2669 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2670
2671 * Makefile.in (%.o: ../target/%.c): New rule.
2672 (waitstatus.o: ../target/waitstatus.c): Remove.
2673
2674 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2675
2676 * Makefile.in
2677 (%.c: ../regformats/%.dat,
2678 (%.c: ../regformats/arm/%.dat,
2679 (%.c: ../regformats/i386/%.dat,
2680 (%.c: ../regformats/rs6000/%.dat): New rules.
2681 (aarch64.c): Remove.
2682 (reg-arm.c): Remove.
2683 (arm-with-iwmmxt.c): Remove.
2684 (arm-with-vfpv2.c): Remove.
2685 (arm-with-vfpv3.c): Remove.
2686 (arm-with-neon.c): Remove.
2687 (reg-bfin.c): Remove.
2688 (reg-cris.c): Remove.
2689 (reg-crisv32.c): Remove.
2690 (i386.c): Remove.
2691 (i386-linux.c): Remove.
2692 (i386-avx.c): Remove.
2693 (i386-avx-linux.c): Remove.
2694 (i386-avx-avx512.c): Remove.
2695 (i386-avx-avx512-linux.c): Remove.
2696 (i386-mpx.c): Remove.
2697 (i386-mpx-linux.c): Remove.
2698 (i386-avx-mpx-avx512-pku.c): Remove.
2699 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2700 (i386-avx-mpx.c): Remove.
2701 (i386-avx-mpx-linux.c): Remove.
2702 (i386-mmx.c): Remove.
2703 (i386-mmx-linux.c): Remove.
2704 (reg-ia64.c): Remove.
2705 (reg-m32r.c): Remove.
2706 (reg-m68k.c): Remove.
2707 (reg-cf.c): Remove.
2708 (mips-linux.c): Remove.
2709 (mips-dsp-linux.c): Remove.
2710 (mips64-linux.c): Remove.
2711 (mips64-dsp-linux.c): Remove.
2712 (nios2-linux.c): Remove.
2713 (powerpc-32.c): Remove.
2714 (powerpc-32l.c): Remove.
2715 (powerpc-altivec32l.c): Remove.
2716 (powerpc-cell32l.c): Remove.
2717 (powerpc-vsx32l.c): Remove.
2718 (powerpc-isa205-32l.c): Remove.
2719 (powerpc-isa205-altivec32l.c): Remove.
2720 (powerpc-isa205-vsx32l.c): Remove.
2721 (powerpc-e500l.c): Remove.
2722 (powerpc-64l.c): Remove.
2723 (powerpc-altivec64l.c): Remove.
2724 (powerpc-cell64l.c): Remove.
2725 (powerpc-vsx64l.c): Remove.
2726 (powerpc-isa205-64l.c): Remove.
2727 (powerpc-isa205-altivec64l.c): Remove.
2728 (powerpc-isa205-vsx64l.c): Remove.
2729 (s390-linux32.c): Remove.
2730 (s390-linux32v1.c): Remove.
2731 (s390-linux32v2.c): Remove.
2732 (s390-linux64.c): Remove.
2733 (s390-linux64v1.c): Remove.
2734 (s390-linux64v2.c): Remove.
2735 (s390-te-linux64.c): Remove.
2736 (s390-vx-linux64.c): Remove.
2737 (s390-tevx-linux64.c): Remove.
2738 (s390x-linux64.c): Remove.
2739 (s390x-linux64v1.c): Remove.
2740 (s390x-linux64v2.c): Remove.
2741 (s390x-te-linux64.c): Remove.
2742 (s390x-vx-linux64.c): Remove.
2743 (s390x-tevx-linux64.c): Remove.
2744 (tic6x-c64xp-linux.c): Remove.
2745 (tic6x-c64x-linux.c): Remove.
2746 (tic6x-c62x-linux.c): Remove.
2747 (reg-sh.c): Remove.
2748 (reg-sparc64.c): Remove.
2749 (reg-spu.c): Remove.
2750 (amd64.c): Remove.
2751 (amd64-linux.c): Remove.
2752 (amd64-avx.c): Remove.
2753 (amd64-avx-linux.c): Remove.
2754 (amd64-avx-avx512.c): Remove.
2755 (amd64-avx-avx512-linux.c): Remove.
2756 (amd64-mpx.c): Remove.
2757 (amd64-mpx-linux.c): Remove.
2758 (amd64-avx-mpx-avx512-pku.c): Remove.
2759 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2760 (amd64-avx-mpx.c): Remove.
2761 (amd64-avx-mpx-linux.c): Remove.
2762 (x32.c): Remove.
2763 (x32-linux.c): Remove.
2764 (x32-avx.c): Remove.
2765 (x32-avx-linux.c): Remove.
2766 (x32-avx-avx512.c): Remove.
2767 (x32-avx-avx512-linux.c): Remove.
2768 (reg-xtensa.c): Remove.
2769 (reg-tilegx.c): Remove.
2770 (reg-tilegx32.c): Remove.
2771
2772 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2773
2774 * Makefile.in (SFILES): Add "common/environ.c".
2775 (OBJS): Add "common/environ.h".
2776
2777 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2778
2779 * configure.ac: Check if the fs_base and gs_base members of
2780 `struct user_regs_struct' exist.
2781 * config.in: Regenerated.
2782 * configure: Likewise.
2783
2784 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2785
2786 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2787 target_read_memory.
2788 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2789 (get_next_pcs_syscall_next_pc): Likewise.
2790
2791 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2792
2793 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2794 * nto-x86-low.c: Likewise.
2795
2796 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2797
2798 * Makefile.in: Include disable-implicit-rules.mk.
2799
2800 2016-11-23 Pedro Alves <palves@redhat.com>
2801
2802 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2803 (debug_vprintf): Use std::chrono::steady_clock instead of
2804 gettimeofday. Use '.' instead of ':'.
2805 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2806 (get_timestamp): Use std::chrono::steady_clock instead of
2807 gettimeofday.
2808
2809 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2810
2811 * Makefile.in: Fix whitespace formatting.
2812
2813 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2814
2815 * Makefile.in (SFILES, OBS): Flatten list and order
2816 alphabetically.
2817
2818 2016-11-23 Pedro Alves <palves@redhat.com>
2819
2820 * event-loop.c (handle_file_event): Use warning.
2821 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2822 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2823 Use warning.
2824
2825 2016-11-23 Pedro Alves <palves@redhat.com>
2826
2827 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2828 output.
2829 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2830 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2831 debug_printf and debug_flush for debug output.
2832 * server.c (handle_general_set): Likewise.
2833 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2834 output.
2835
2836 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2837
2838 * Makefile.in (.c.o): Replace rule with ...
2839 (%.o: %.c): ... this one.
2840
2841 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2842
2843 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2844 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2845 make.
2846 * configure.ac: Remove checks for the make program.
2847 * configure: Re-generate.
2848
2849 2016-10-28 Pedro Alves <palves@redhat.com>
2850
2851 * Makefile.in (CXX_DIALECT): Get from configure.
2852 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2853 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2854 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2855 * config.in: Regenerate.
2856 * configure: Regenerate.
2857
2858 2016-10-27 Yao Qi <yao.qi@linaro.org>
2859
2860 * linux-low.c (linux_supports_range_stepping): Return true if
2861 can_software_single_step return true.
2862
2863 2016-10-27 Yao Qi <yao.qi@linaro.org>
2864
2865 * inferiors.c (find_inferior_in_random): New function.
2866 * inferiors.h (find_inferior_in_random): Declare.
2867 * linux-low.c (linux_wait_for_event_filtered): Call
2868 find_inferior_in_random instead of find_inferior.
2869
2870 2016-10-27 Yao Qi <yao.qi@linaro.org>
2871
2872 * linux-low.c (linux_wait_1): If single-step breakpoints are
2873 inserted, remove them.
2874
2875 2016-10-26 Pedro Alves <palves@redhat.com>
2876
2877 * linux-low.c (handle_extended_wait): Link parent/child fork
2878 threads.
2879 (linux_wait_1): Unlink them.
2880 (linux_set_resume_request): Ignore resume requests for
2881 already-resumed and unhandled fork child threads.
2882 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2883 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2884 New functions.
2885 (handle_v_requests) <vCont>: Don't call require_running.
2886 * server.h (in_queued_stop_replies): New declaration.
2887
2888 2016-10-24 Yao Qi <yao.qi@linaro.org>
2889
2890 PR server/20733
2891 * linux-aarch64-low.c (append_insns): Cast the return value to
2892 'uint32_t *'.
2893
2894 2016-10-10 Yao Qi <yao.qi@linaro.org>
2895
2896 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2897
2898 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2899
2900 * target.c (target_supports_multi_process): New function, moved
2901 from...
2902 * target.h (target_supports_multi_process): ... here. Remove
2903 macro.
2904
2905 2016-10-05 Tom Tromey <tom@tromey.com>
2906
2907 PR remote/20655:
2908 * tracepoint.c (handle_tracepoint_bkpts): Check
2909 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2910
2911 2016-10-05 Yao Qi <yao.qi@linaro.org>
2912
2913 * configure.srv: Update the path of arm-*.xml files.
2914
2915 2016-10-05 Terry Guo <terry.guo@arm.com>
2916 Yao Qi <yao.qi@linaro.org>
2917
2918 * Makefile.in: Adjust the path of rules.
2919 * configure.srv: Update the path of xml files.
2920 * regformats/arm-with-iwmmxt.dat: Regenerated.
2921 * regformats/arm-with-neon.dat: Likewise.
2922 * regformats/arm-with-vfpv2.dat: Likewise.
2923 * regformats/arm-with-vfpv3.dat Likewise.
2924
2925 2016-09-30 Yao Qi <yao.qi@linaro.org>
2926
2927 PR gdbserver/20627
2928 * target.c (target_stop_and_wait): Don't call
2929 target_continue_no_signal, use resume_stop instead.
2930
2931 2016-09-26 Yao Qi <yao.qi@linaro.org>
2932
2933 * linux-low.c (linux_wait_1): Call debug_exit.
2934
2935 2016-09-23 Pedro Alves <palves@redhat.com>
2936
2937 * Makefile.in (SFILES): Add common/new-op.c.
2938 (OBS): Add common/new-op.o.
2939 (new-op.o): New rule.
2940
2941 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2942
2943 * .gitinore: Ignore more files.
2944
2945 2016-09-21 Yao Qi <yao.qi@linaro.org>
2946
2947 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2948 23.
2949
2950 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2951
2952 * server.c (start_inferior): Call target_mourn_inferior instead of
2953 mourn_inferior; pass ptid_t argument to it.
2954 (resume): Likewise.
2955 (handle_target_event): Likewise.
2956 * target.c (target_mourn_inferior): New function.
2957 * target.h (mourn_inferior): Delete macro.
2958
2959 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2960
2961 * linux-low.c (lwp_is_stepping): New function.
2962
2963 2016-09-06 Carl Love <cel@us.ibm.com>
2964
2965 * server.c (start_inferior): Fixed comment, requested comment change
2966 didn't get updated correctly. Removed reference to ptrace () call as
2967 it is only true on Linux systems.
2968
2969 2016-09-06 Carl Love <cel@us.ibm.com>
2970
2971 * server.c (start_inferior): Do not call
2972 function target_post_create_inferior () if the
2973 inferior process has already exited.
2974
2975 2016-09-05 Pedro Alves <palves@redhat.com>
2976
2977 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2978 (COMPILE.pre, CC_LD): Use CXX directly.
2979 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2980 * acinclude.m4: Don't include build-with-cxx.m4.
2981 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2982 * configure: Regenerate.
2983
2984 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2985
2986 PR gdb/19495
2987 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2988 call writing data to own_buf.
2989
2990 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2991
2992 * target.c (mywait): Call target_wait instead of
2993 the_target->wait.
2994 (target_wait): New function.
2995
2996 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2997
2998 * server.c (start_inferior): New variable 'ptid'. Replace calls
2999 to the_target->resume by target_continue{,_no_signal}, depending
3000 on the case.
3001 * target.c (target_stop_and_wait): Call target_continue_no_signal
3002 instead of the_target->resume.
3003 (target_continue): New function.
3004
3005 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3006
3007 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3008
3009 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3010
3011 PR server/20491
3012 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3013 ps_prochandle.
3014 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3015 * linux-arm-low.c (ps_get_thread_area): Likewise.
3016 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3017 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3018 * linux-mips-low.c (ps_get_thread_area): Likewise.
3019 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3020 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3021 * linux-x86-low.c (ps_get_thread_area): Likewise.
3022 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3023
3024 2016-08-19 Pedro Alves <palves@redhat.com>
3025
3026 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3027
3028 2016-08-19 Pedro Alves <palves@redhat.com>
3029
3030 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3031 comment. Use memcpy instead of casting through unsigned long.
3032
3033 2016-08-19 Pedro Alves <palves@redhat.com>
3034
3035 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3036 allocating around 0x80000000.
3037
3038 2016-08-19 Pedro Alves <palves@redhat.com>
3039
3040 PR gdb/20415
3041 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3042 (x32-avx512-linux-ipa.o): New rules.
3043 * configure.ac (x86_64-*-linux*): New x32 check.
3044 * configure.srv (ipa_x32_linux_regobj): New.
3045 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3046 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3047 descriptions.
3048 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3049 descriptions.
3050 * configure: Regenerate.
3051
3052 2016-08-09 Pedro Alves <palves@redhat.com>
3053
3054 PR gdb/18653
3055 * Makefile.in (OBS): Add signals-state-save-restore.o.
3056 (signals-state-save-restore.o): New rule.
3057 * config.in: Regenerate.
3058 * configure: Regenerate.
3059 * linux-low.c: Include "signals-state-save-restore.h".
3060 (linux_create_inferior): Call
3061 restore_original_signals_state.
3062 * server.c: Include "dispositions-save-restore.h".
3063 (captured_main): Call save_original_signals_state.
3064
3065 2016-08-05 Pedro Alves <palves@redhat.com>
3066
3067 * configure: Regenerate.
3068
3069 2016-08-04 Yao Qi <yao.qi@linaro.org>
3070
3071 * linux-low.c (regsets_fetch_inferior_registers): Check
3072 errno is ESRCH or not.
3073
3074 2016-08-02 Yao Qi <yao.qi@linaro.org>
3075
3076 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3077 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3078 (thread_db_load_search): Update.
3079 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3080 td_ta_set_event and td_ta_event_getmsg.
3081
3082 2016-07-26 Pedro Alves <palves@redhat.com>
3083
3084 PR server/20414
3085 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3086 of unsigned long for 64-bit registers and use uint32_t instead of
3087 unsigned int for 32-bit registers.
3088
3089 2016-07-26 Pedro Alves <palves@redhat.com>
3090
3091 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3092 to 'ptrace'.
3093
3094 2016-07-21 Tom Tromey <tom@tromey.com>
3095
3096 * configure: Rebuild.
3097
3098 2016-07-21 Yao Qi <yao.qi@linaro.org>
3099
3100 * mem-break.c (find_gdb_breakpoint): Cast bp to
3101 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3102
3103 2016-07-21 Yao Qi <yao.qi@linaro.org>
3104
3105 * server.c (handle_v_requests): Support s and S actions
3106 if target_supports_software_single_step return true.
3107
3108 2016-07-21 Yao Qi <yao.qi@linaro.org>
3109
3110 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3111 is resume_step, call maybe_hw_step.
3112 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3113 and unstop them.
3114 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3115 breakpoints or not.
3116 (proceed_one_lwp): If resume request is resume_step, install
3117 reinsert breakpoints and call maybe_hw_step.
3118
3119 2016-07-21 Yao Qi <yao.qi@linaro.org>
3120
3121 * linux-low.c (proceed_one_lwp): Declare.
3122 (linux_resume_one_thread): Remove local variable 'step'.
3123 Lift code enqueue signal. Call proceed_one_lwp instead of
3124 linux_resume_one_lwp.
3125
3126 2016-07-21 Yao Qi <yao.qi@linaro.org>
3127
3128 * linux-low.c (linux_resume_one_thread): Call
3129 enqueue_pending_signal.
3130
3131 2016-07-21 Yao Qi <yao.qi@linaro.org>
3132
3133 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3134 * inferiors.c (do_restore_current_thread_cleanup): New function.
3135 (make_cleanup_restore_current_thread): Likewise.
3136 * linux-low.c (install_software_single_step_breakpoints): Call
3137 make_cleanup_restore_current_thread. Switch current_thread to
3138 thread.
3139
3140 2016-07-21 Yao Qi <yao.qi@linaro.org>
3141
3142 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3143 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3144 (clone_one_breakpoint): Likewise.
3145 (delete_reinsert_breakpoints): Change parameter to thread.
3146 Callers updated.
3147 (has_reinsert_breakpoints): Likewise.
3148 (uninsert_reinsert_breakpoints): Likewise.
3149 (reinsert_reinsert_breakpoints): Likewise.
3150 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3151 (delete_reinsert_breakpoints): Likewise.
3152 (reinsert_reinsert_breakpoints): Likewise.
3153 (uninsert_reinsert_breakpoints): Likewise.
3154 (has_reinsert_breakpoints): Likewise.
3155
3156 2016-07-21 Yao Qi <yao.qi@linaro.org>
3157
3158 * inferiors.c (get_thread_process): Make parameter const.
3159 * inferiors.h (get_thread_process): Update declaration.
3160 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3161 Add new parameters child_thread and parent_thread. Callers
3162 updated.
3163 * mem-break.h (clone_all_breakpoints): Update declaration.
3164
3165 2016-07-21 Yao Qi <yao.qi@linaro.org>
3166
3167 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3168 <command_list, handler>: Remove.
3169 (struct gdb_breakpoint): New.
3170 (struct other_breakpoint): New.
3171 (struct reinsert_breakpoint): New.
3172 (is_gdb_breakpoint): New function.
3173 (any_persistent_commands): Update command_list if
3174 is_gdb_breakpoint returns true.
3175 (set_breakpoint): Create breakpoints according to their types.
3176 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3177 (set_gdb_breakpoint_1): Likewise.
3178 (set_gdb_breakpoint): Likewise.
3179 (clear_breakpoint_conditions): Change parameter type to
3180 'struct gdb_breakpoint *'.
3181 (clear_breakpoint_commands): Likewise.
3182 (clear_breakpoint_conditions_and_commands): Likewise.
3183 (add_condition_to_breakpoint): Likewise.
3184 (add_breakpoint_condition): Likewise.
3185 (add_commands_to_breakpoint): Likewise.
3186 (check_breakpoints): Check other_breakpoint.
3187 (clone_one_breakpoint): Clone breakpopint according to its type.
3188 * mem-break.h (struct gdb_breakpoint): Declare.
3189 (set_gdb_breakpoint): Update declaration.
3190 (clear_breakpoint_conditions_and_commands): Likewise.
3191 (add_breakpoint_condition): Likewise.
3192 (add_breakpoint_commands): Likewise.
3193 * server.c (process_point_options): Change parameter type to
3194 'struct gdb_breakpoint *'.
3195
3196 2016-07-21 Yao Qi <yao.qi@linaro.org>
3197
3198 * mem-break.c (set_breakpoint_at): Rename it to ...
3199 (set_breakpoint_type_at): ... it.
3200 (set_breakpoint_at): Call set_breakpoint_type_at.
3201 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3202 * mem-break.h (set_breakpoint_at): Update comments.
3203
3204 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3205
3206 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3207 to buf parameter.
3208 (nios2_store_gregset): Likewise.
3209
3210 2016-07-01 Pedro Alves <palves@redhat.com>
3211 Antoine Tremblay <antoine.tremblay@ericsson.com>
3212
3213 * linux-low.c: Change interface to take the target lwp_info
3214 pointer directly and return void. Handle detaching from a zombie
3215 thread.
3216 (linux_detach_lwp_callback): New function.
3217 (linux_detach): Detach from the leader thread after detaching from
3218 the clone threads.
3219
3220 2016-06-28 Yao Qi <yao.qi@linaro.org>
3221
3222 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3223 for variable new_offset.
3224 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3225 (aarch64_ftrace_insn_reloc_cb): Likewise.
3226 (aarch64_ftrace_insn_reloc_tb): Likewise.
3227 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3228 PRIx64 instead of PRIx32.
3229
3230 2016-06-28 Yao Qi <yao.qi@linaro.org>
3231
3232 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3233 (the_low_target): Install arm_get_syscall_trapinfo.
3234
3235 2016-06-28 Yao Qi <yao.qi@linaro.org>
3236
3237 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3238 function.
3239 (the_low_target): Install aarch64_get_syscall_trapinfo.
3240
3241 2016-06-28 Yao Qi <yao.qi@linaro.org>
3242
3243 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3244 Callers updated.
3245 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3246 Remove parameter sysno.
3247 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3248 sysret.
3249
3250 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3251
3252 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3253 (s390_emit_ne_goto): Likewise.
3254 (s390_emit_lt_goto): Likewise.
3255 (s390_emit_le_goto): Likewise.
3256 (s390_emit_gt_goto): Likewise.
3257 (s390_emit_ge_goto): Likewise.
3258 (s390x_emit_eq_goto): Likewise.
3259 (s390x_emit_ne_goto): Likewise.
3260 (s390x_emit_lt_goto): Likewise.
3261 (s390x_emit_le_goto): Likewise.
3262 (s390x_emit_gt_goto): Likewise.
3263 (s390x_emit_ge_goto): Likewise.
3264 (s390_emit_ops_impl): Mark variable static.
3265 (s390x_emit_ops): Likewise.
3266
3267 2016-06-17 Yao Qi <yao.qi@linaro.org>
3268
3269 * linux-low.c (handle_extended_wait): Call
3270 uninsert_reinsert_breakpoints for the parent process. Remove
3271 reinsert breakpoints from the child process. Reinsert them to
3272 the parent process when vfork is done.
3273 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3274 (reinsert_reinsert_breakpoints): New function.
3275 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3276 (reinsert_reinsert_breakpoints): Declare.
3277
3278 2016-06-17 Yao Qi <yao.qi@linaro.org>
3279
3280 * linux-low.c (handle_extended_wait): If the parent is doing
3281 step-over, remove the reinsert breakpoints from the forked child.
3282
3283 2016-06-17 Yao Qi <yao.qi@linaro.org>
3284
3285 * linux-low.c (unsuspend_all_lwps): Declare.
3286 (linux_low_filter_event): If thread exited, call finish_step_over.
3287 If step-over is finished, unsuspend other threads.
3288
3289 2016-06-17 Yao Qi <yao.qi@linaro.org>
3290
3291 * linux-low.c (linux_resume_one_lwp_throw): Assert
3292 has_reinsert_breakpoints returns false.
3293 * mem-break.c (delete_disabled_breakpoints): Assert
3294 bp type isn't reinsert_breakpoint.
3295
3296 2016-06-17 Yao Qi <yao.qi@linaro.org>
3297
3298 * linux-low.c (maybe_hw_step): New function.
3299 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3300 (finish_step_over): Switch current_thread to lwp temporarily,
3301 and assert has_reinsert_breakpoints returns true.
3302 (proceed_one_lwp): Call maybe_hw_step.
3303 * mem-break.c (has_reinsert_breakpoints): New function.
3304 * mem-break.h (has_reinsert_breakpoints): Declare.
3305
3306 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3307
3308 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3309
3310 2016-05-17 Yao Qi <yao.qi@linaro.org>
3311
3312 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3313 instead of find_inferior.
3314
3315 2016-05-05 Yao Qi <yao.qi@linaro.org>
3316
3317 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3318 Initialize res to zero.
3319
3320 2016-05-05 Yao Qi <yao.qi@linaro.org>
3321
3322 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3323 to uint32_t.
3324
3325 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3326
3327 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3328 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3329 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3330
3331 2016-04-28 Par Olsson <par.olsson@windriver.com>
3332 Simon Marchi <simon.marchi@ericsson.com>
3333
3334 * tracepoint.c (write_inferior_int8): New function.
3335 (cmd_qtenable_disable): Write enable flag using
3336 write_inferior_int8.
3337
3338 2016-04-25 Yao Qi <yao.qi@linaro.org>
3339
3340 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3341 (need_step_over_p): Return zero if the LWP has pending signals
3342 can be delivered on software single step target.
3343
3344 2016-04-25 Yao Qi <yao.qi@linaro.org>
3345
3346 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3347 return instead of error.
3348
3349 2016-04-22 Yao Qi <yao.qi@linaro.org>
3350
3351 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3352 to 23.
3353
3354 2016-04-22 Yao Qi <yao.qi@linaro.org>
3355
3356 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3357 signal when stepping over breakpoint with software single
3358 step.
3359
3360 2016-04-21 Pedro Alves <palves@redhat.com>
3361
3362 * linux-s390-low.c (s390_collect_ptrace_register)
3363 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3364 add casts.
3365 (s390_check_regset): Use void * instead of gdb_byte *.
3366
3367 2016-04-20 Pedro Alves <palves@redhat.com>
3368
3369 * configure: Renegerate.
3370
3371 2016-04-20 Yao Qi <yao.qi@linaro.org>
3372
3373 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3374 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3375 number 16.
3376 (arm_store_gregset): Likewise.
3377
3378 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3379
3380 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3381 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3382 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3383 (amd64-avx-mpx-linux.c): New rules.
3384 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3385 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3386 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3387 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3388 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3389 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3390 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3391 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3392 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3393 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3394 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3395 * linux-x86-low.c (x86_linux_read_description): Add case for
3396 X86_XSTATE_AVX_MPX_MASK.
3397 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3398 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3399 init_registers_i386_avx_mpx_linux.
3400 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3401 (initialize_low_tracepoint): Call
3402 init_registers_i386_avx_mpx_linux.
3403 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3404 (initialize_low_tracepoint): Call
3405 init_registers_amd64_avx_mpx_linux.
3406 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3407 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3408 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3409 declarations.
3410
3411 2016-04-18 Pedro Alves <palves@redhat.com>
3412
3413 * configure: Regenerate.
3414
3415 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3416
3417 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3418 (aarch64_emit_sub): Likewise.
3419
3420 2016-04-12 Pedro Alves <palves@redhat.com>
3421
3422 * utils.c (prepare_to_throw_exception): Delete.
3423
3424 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3425
3426 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3427
3428 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3429
3430 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3431
3432 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3433
3434 * linux-aarch64-ipa.c: Add <elf.h> include.
3435 * linux-ppc-ipa.c: Add <elf.h> include.
3436 * linux-s390-ipa.c: Add <elf.h> include.
3437
3438 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3439
3440 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3441 (get_raw_reg_ptr): Likewise.
3442 (get_trace_state_variable_value_ptr): Likewise.
3443 (set_trace_state_variable_value_ptr): Likewise.
3444 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3445 char *.
3446
3447 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3448 Marcin Kościelnicki <koriakin@0x04.net>
3449
3450 PR/17221
3451 * linux-ppc-low.c (emit_insns): New function.
3452 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3453 (ppc_emit_prologue): New function.
3454 (ppc_emit_epilogue): New function.
3455 (ppc_emit_add): New function.
3456 (ppc_emit_sub): New function.
3457 (ppc_emit_mul): New function.
3458 (ppc_emit_lsh): New function.
3459 (ppc_emit_rsh_signed): New function.
3460 (ppc_emit_rsh_unsigned): New function.
3461 (ppc_emit_ext): New function.
3462 (ppc_emit_zero_ext): New function.
3463 (ppc_emit_log_not): New function.
3464 (ppc_emit_bit_and): New function.
3465 (ppc_emit_bit_or): New function.
3466 (ppc_emit_bit_xor): New function.
3467 (ppc_emit_bit_not): New function.
3468 (ppc_emit_equal): New function.
3469 (ppc_emit_less_signed): New function.
3470 (ppc_emit_less_unsigned): New function.
3471 (ppc_emit_ref): New function.
3472 (ppc_emit_const): New function.
3473 (ppc_emit_reg): New function.
3474 (ppc_emit_pop): New function.
3475 (ppc_emit_stack_flush): New function.
3476 (ppc_emit_swap): New function.
3477 (ppc_emit_stack_adjust): New function.
3478 (ppc_emit_call): New function.
3479 (ppc_emit_int_call_1): New function.
3480 (ppc_emit_void_call_2): New function.
3481 (ppc_emit_if_goto): New function.
3482 (ppc_emit_goto): New function.
3483 (ppc_emit_eq_goto): New function.
3484 (ppc_emit_ne_goto): New function.
3485 (ppc_emit_lt_goto): New function.
3486 (ppc_emit_le_goto): New function.
3487 (ppc_emit_gt_goto): New function.
3488 (ppc_emit_ge_goto): New function.
3489 (ppc_write_goto_address): New function.
3490 (ppc_emit_ops_impl): New static variable.
3491 (ppc64v1_emit_prologue): New function.
3492 (ppc64v2_emit_prologue): New function.
3493 (ppc64_emit_epilogue): New function.
3494 (ppc64_emit_add): New function.
3495 (ppc64_emit_sub): New function.
3496 (ppc64_emit_mul): New function.
3497 (ppc64_emit_lsh): New function.
3498 (ppc64_emit_rsh_signed): New function.
3499 (ppc64_emit_rsh_unsigned): New function.
3500 (ppc64_emit_ext): New function.
3501 (ppc64_emit_zero_ext): New function.
3502 (ppc64_emit_log_not): New function.
3503 (ppc64_emit_bit_and): New function.
3504 (ppc64_emit_bit_or): New function.
3505 (ppc64_emit_bit_xor): New function.
3506 (ppc64_emit_bit_not): New function.
3507 (ppc64_emit_equal): New function.
3508 (ppc64_emit_less_signed): New function.
3509 (ppc64_emit_less_unsigned): New function.
3510 (ppc64_emit_ref): New function.
3511 (ppc64_emit_const): New function.
3512 (ppc64v1_emit_reg): New function.
3513 (ppc64v2_emit_reg): New function.
3514 (ppc64_emit_pop): New function.
3515 (ppc64_emit_stack_flush): New function.
3516 (ppc64_emit_swap): New function.
3517 (ppc64v1_emit_call): New function.
3518 (ppc64v2_emit_call): New function.
3519 (ppc64v1_emit_int_call_1): New function.
3520 (ppc64v2_emit_int_call_1): New function.
3521 (ppc64v1_emit_void_call_2): New function.
3522 (ppc64v2_emit_void_call_2): New function.
3523 (ppc64_emit_if_goto): New function.
3524 (ppc64_emit_eq_goto): New function.
3525 (ppc64_emit_ne_goto): New function.
3526 (ppc64_emit_lt_goto): New function.
3527 (ppc64_emit_le_goto): New function.
3528 (ppc64_emit_gt_goto): New function.
3529 (ppc64_emit_ge_goto): New function.
3530 (ppc64v1_emit_ops_impl): New static variable.
3531 (ppc64v2_emit_ops_impl): New static variable.
3532 (ppc_emit_ops): New function.
3533 (linux_low_target): Wire in ppc_emit_ops.
3534
3535 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3536 Marcin Kościelnicki <koriakin@0x04.net>
3537
3538 PR/17221
3539 * Makefile.in: Add powerpc-*-ipa.o
3540 * configure.srv: Add ipa_obj for powerpc*-linux.
3541 * linux-ppc-ipa.c: New file.
3542 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3543 includes.
3544 (PPC_FIELD): New macro.
3545 (PPC_SEXT): New macro.
3546 (PPC_OP6): New macro.
3547 (PPC_BO): New macro.
3548 (PPC_LI): New macro.
3549 (PPC_BD): New macro.
3550 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3551 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3552 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3553 (ppc_get_thread_area): New function.
3554 (is_elfv2_inferior): New function.
3555 (gen_ds_form): New function.
3556 (GEN_STD): New macro.
3557 (GEN_STDU): New macro.
3558 (GEN_LD): New macro.
3559 (GEN_LDU): New macro.
3560 (gen_d_form): New function.
3561 (GEN_ADDI): New macro.
3562 (GEN_ADDIS): New macro.
3563 (GEN_LI): New macro.
3564 (GEN_LIS): New macro.
3565 (GEN_ORI): New macro.
3566 (GEN_ORIS): New macro.
3567 (GEN_LWZ): New macro.
3568 (GEN_STW): New macro.
3569 (GEN_STWU): New macro.
3570 (gen_xfx_form): New function.
3571 (GEN_MFSPR): New macro.
3572 (GEN_MTSPR): New macro.
3573 (GEN_MFCR): New macro.
3574 (GEN_MTCR): New macro.
3575 (GEN_SYNC): New macro.
3576 (GEN_LWSYNC): New macro.
3577 (gen_x_form): New function.
3578 (GEN_OR): New macro.
3579 (GEN_MR): New macro.
3580 (GEN_LWARX): New macro.
3581 (GEN_STWCX): New macro.
3582 (GEN_CMPW): New macro.
3583 (gen_md_form): New function.
3584 (GEN_RLDICL): New macro.
3585 (GEN_RLDICR): New macro.
3586 (gen_i_form): New function.
3587 (GEN_B): New macro.
3588 (GEN_BL): New macro.
3589 (gen_b_form): New function.
3590 (GEN_BNE): New macro.
3591 (GEN_LOAD): New macro.
3592 (GEN_STORE): New macro.
3593 (gen_limm): New function.
3594 (gen_atomic_xchg): New function.
3595 (gen_call): New function.
3596 (ppc_relocate_instruction): New function.
3597 (ppc_install_fast_tracepoint_jump_pad): New function.
3598 (ppc_get_min_fast_tracepoint_insn_len): New function.
3599 (ppc_get_ipa_tdesc_idx): New function.
3600 (the_low_target): Wire in the new functions.
3601 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3602 tdescs.
3603 * linux-ppc-tdesc.h: New file.
3604
3605 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3606
3607 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3608 (alloc_jump_pad_buffer): New function.
3609 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3610 (alloc_jump_pad_buffer): New function.
3611 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3612 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3613 (alloc_jump_pad_buffer): New function.
3614 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3615 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3616 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3617 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3618
3619 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3620
3621 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3622 * linux-amd64-ipa.c: Likewise.
3623 * linux-i386-ipa.c: Likewise.
3624 * linux-s390-ipa.c: Likewise.
3625 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3626 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3627 set_trace_state_variable_value_ptr.
3628 (struct ipa_sym_addresses): Likewise.
3629 (symbol_list): Likewise.
3630 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3631 accessing gdb_collect directly.
3632 (gdb_collect_ptr_type): New typedef.
3633 (get_raw_reg_ptr_type): New typedef.
3634 (get_trace_state_variable_value_ptr_type): New typedef.
3635 (set_trace_state_variable_value_ptr_type): New typedef.
3636 (gdb_collect_ptr): New global.
3637 (get_raw_reg_ptr): New global.
3638 (get_trace_state_variable_value_ptr): New global.
3639 (set_trace_state_variable_value_ptr): New global.
3640 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3641 accessing get_raw_reg directly.
3642 (get_get_tsv_func_addr): Likewise for
3643 get_trace_state_variable_value_ptr.
3644 (get_set_tsv_func_addr): Likewise for
3645 set_trace_state_variable_value_ptr.
3646 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3647
3648 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3649
3650 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3651
3652 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3653
3654 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3655 packets.
3656 (relocate_instruction): Remove own_buf.
3657 * server.c (own_buf): Make global.
3658 (handle_v_requests): Make global.
3659 * server.h (own_buf): New declaration.
3660 (handle_v_requests): New prototype.
3661
3662 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3663
3664 PR 18377
3665 * linux-s390-low.c (add_insns): New function.
3666 (s390_emit_prologue): New function.
3667 (s390_emit_epilogue): New function.
3668 (s390_emit_add): New function.
3669 (s390_emit_sub): New function.
3670 (s390_emit_mul): New function.
3671 (s390_emit_lsh): New function.
3672 (s390_emit_rsh_signed): New function.
3673 (s390_emit_rsh_unsigned): New function.
3674 (s390_emit_ext): New function.
3675 (s390_emit_log_not): New function.
3676 (s390_emit_bit_and): New function.
3677 (s390_emit_bit_or): New function.
3678 (s390_emit_bit_xor): New function.
3679 (s390_emit_bit_not): New function.
3680 (s390_emit_equal): New function.
3681 (s390_emit_less_signed): New function.
3682 (s390_emit_less_unsigned): New function.
3683 (s390_emit_ref): New function.
3684 (s390_emit_if_goto): New function.
3685 (s390_emit_goto): New function.
3686 (s390_write_goto_address): New function.
3687 (s390_emit_litpool): New function.
3688 (s390_emit_const): New function.
3689 (s390_emit_call): New function.
3690 (s390_emit_reg): New function.
3691 (s390_emit_pop): New function.
3692 (s390_emit_stack_flush): New function.
3693 (s390_emit_zero_ext): New function.
3694 (s390_emit_swap): New function.
3695 (s390_emit_stack_adjust): New function.
3696 (s390_emit_set_r2): New function.
3697 (s390_emit_int_call_1): New function.
3698 (s390_emit_void_call_2): New function.
3699 (s390_emit_eq_goto): New function.
3700 (s390_emit_ne_goto): New function.
3701 (s390_emit_lt_goto): New function.
3702 (s390_emit_le_goto): New function.
3703 (s390_emit_gt_goto): New function.
3704 (s390_emit_ge_goto): New function.
3705 (s390x_emit_prologue): New function.
3706 (s390x_emit_epilogue): New function.
3707 (s390x_emit_add): New function.
3708 (s390x_emit_sub): New function.
3709 (s390x_emit_mul): New function.
3710 (s390x_emit_lsh): New function.
3711 (s390x_emit_rsh_signed): New function.
3712 (s390x_emit_rsh_unsigned): New function.
3713 (s390x_emit_ext): New function.
3714 (s390x_emit_log_not): New function.
3715 (s390x_emit_bit_and): New function.
3716 (s390x_emit_bit_or): New function.
3717 (s390x_emit_bit_xor): New function.
3718 (s390x_emit_bit_not): New function.
3719 (s390x_emit_equal): New function.
3720 (s390x_emit_less_signed): New function.
3721 (s390x_emit_less_unsigned): New function.
3722 (s390x_emit_ref): New function.
3723 (s390x_emit_if_goto): New function.
3724 (s390x_emit_const): New function.
3725 (s390x_emit_call): New function.
3726 (s390x_emit_reg): New function.
3727 (s390x_emit_pop): New function.
3728 (s390x_emit_stack_flush): New function.
3729 (s390x_emit_zero_ext): New function.
3730 (s390x_emit_swap): New function.
3731 (s390x_emit_stack_adjust): New function.
3732 (s390x_emit_int_call_1): New function.
3733 (s390x_emit_void_call_2): New function.
3734 (s390x_emit_eq_goto): New function.
3735 (s390x_emit_ne_goto): New function.
3736 (s390x_emit_lt_goto): New function.
3737 (s390x_emit_le_goto): New function.
3738 (s390x_emit_gt_goto): New function.
3739 (s390x_emit_ge_goto): New function.
3740 (s390_emit_ops): New function.
3741 (struct linux_target_ops): Fill in emit_ops hook.
3742
3743 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3744
3745 PR 18377
3746 * Makefile.in: Add s390 IPA files.
3747 * configure.srv: Build IPA for s390.
3748 * linux-s390-ipa.c: New file.
3749 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3750 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3751 (tdesc_s390_linux32): Likewise.
3752 (init_registers_s390_linux32v1): Likewise.
3753 (tdesc_s390_linux32v1): Likewise.
3754 (init_registers_s390_linux32v2): Likewise.
3755 (tdesc_s390_linux32v2): Likewise.
3756 (init_registers_s390_linux64): Likewise.
3757 (tdesc_s390_linux64): Likewise.
3758 (init_registers_s390_linux64v1): Likewise.
3759 (tdesc_s390_linux64v1): Likewise.
3760 (init_registers_s390_linux64v2): Likewise.
3761 (tdesc_s390_linux64v2): Likewise.
3762 (init_registers_s390_te_linux64): Likewise.
3763 (tdesc_s390_te_linux64): Likewise.
3764 (init_registers_s390_vx_linux64): Likewise.
3765 (tdesc_s390_vx_linux64): Likewise.
3766 (init_registers_s390_tevx_linux64): Likewise.
3767 (tdesc_s390_tevx_linux64): Likewise.
3768 (init_registers_s390x_linux64): Likewise.
3769 (tdesc_s390x_linux64): Likewise.
3770 (init_registers_s390x_linux64v1): Likewise.
3771 (tdesc_s390x_linux64v1): Likewise.
3772 (init_registers_s390x_linux64v2): Likewise.
3773 (tdesc_s390x_linux64v2): Likewise.
3774 (init_registers_s390x_te_linux64): Likewise.
3775 (tdesc_s390x_te_linux64): Likewise.
3776 (init_registers_s390x_vx_linux64): Likewise.
3777 (tdesc_s390x_vx_linux64): Likewise.
3778 (init_registers_s390x_tevx_linux64): Likewise.
3779 (tdesc_s390x_tevx_linux64): Likewise.
3780 (have_hwcap_s390_vx): New static variable.
3781 (s390_arch_setup): Fill have_hwcap_s390_vx.
3782 (s390_get_thread_area): New function.
3783 (s390_ft_entry_gpr_esa): New const.
3784 (s390_ft_entry_gpr_zarch): New const.
3785 (s390_ft_entry_misc): New const.
3786 (s390_ft_entry_fr): New const.
3787 (s390_ft_entry_vr): New const.
3788 (s390_ft_main_31): New const.
3789 (s390_ft_main_64): New const.
3790 (s390_ft_exit_fr): New const.
3791 (s390_ft_exit_vr): New const.
3792 (s390_ft_exit_misc): New const.
3793 (s390_ft_exit_gpr_esa): New const.
3794 (s390_ft_exit_gpr_zarch): New const.
3795 (append_insns): New function.
3796 (s390_relocate_instruction): New function.
3797 (s390_install_fast_tracepoint_jump_pad): New function.
3798 (s390_get_min_fast_tracepoint_insn_len): New function.
3799 (s390_get_ipa_tdesc_idx): New function.
3800 (struct linux_target_ops): Wire in the above functions.
3801 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3802 * linux-s390-tdesc.h: New file.
3803
3804 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3805
3806 * linux-s390-low.c (s390_supports_tracepoints): New function.
3807 (struct linux_target_ops): Fill supports_tracepoints hook.
3808
3809 2016-03-18 Yao Qi <yao.qi@linaro.org>
3810
3811 * linux-low.c (lwp_signal_can_be_delivered): New function.
3812 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3813
3814 2016-03-18 Yao Qi <yao.qi@linaro.org>
3815
3816 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3817 0 if signal is enqueued. Remove 'signal' from one debugging
3818 message. Move one debugging message to some lines below.
3819 Remove code setting 'signal' to 0.
3820
3821 2016-03-18 Yao Qi <yao.qi@linaro.org>
3822
3823 * linux-low.c (linux_low_filter_event): Remove redundant
3824 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3825
3826 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3827
3828 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3829 (struct linux_target_ops): Wire in the above.
3830
3831 2016-03-03 Yao Qi <yao.qi@linaro.org>
3832
3833 * linux-low.c: Update comments to start_step_over.
3834
3835 2016-03-03 Yao Qi <yao.qi@linaro.org>
3836
3837 PR server/19736
3838 * linux-low.c (handle_extended_wait): Set child suspended
3839 if event_lwp->bp_reinsert isn't zero.
3840
3841 2016-03-02 Yao Qi <yao.qi@linaro.org>
3842
3843 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3844 enqueue_pending_signal.
3845
3846 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3847
3848 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3849 is actually loaded.
3850
3851 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3852
3853 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3854 (s390_regmap_3264) [!__s390x__]: New global.
3855 (s390_collect_ptrace_register): Skip map entries containing -1.
3856 (s390_supply_ptrace_register): Ditto.
3857 (s390_fill_gprs_high): New function.
3858 (s390_store_gprs_high): New function.
3859 (s390_regsets): Add NT_S390_HIGH_GPRS.
3860 (s390_get_hwcap): Enable on 31-bit.
3861 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3862 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3863 Detect NT_S390_HIGH_GPRS.
3864 (s390_usrregs_info_3264): Enable on 31-bit.
3865 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3866 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3867
3868 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3869
3870 PR gdb/13808
3871 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3872 * configure.srv: Ditto.
3873 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3874 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3875 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3876 (init_registers_amd64_linux): Remove prototype.
3877 (tdesc_amd64_linux): Remove declaration.
3878 (get_ipa_tdesc): New function.
3879 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3880 initialize remaining tdescs.
3881 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3882 (init_registers_i386_linux): Remove prototype.
3883 (tdesc_i386_linux): Remove declaration.
3884 (get_ipa_tdesc): New function.
3885 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3886 initialize remaining tdescs.
3887 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3888 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3889 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3890 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3891 (x86_get_ipa_tdesc_idx): New function.
3892 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3893 * linux-x86-tdesc.h: New file.
3894 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3895 (target_get_ipa_tdesc_idx): New macro.
3896 * tracepoint.c (ipa_tdesc_idx): New macro.
3897 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3898 (symbol_list): Add ipa_tdesc_idx.
3899 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3900 (ipa_tdesc): Remove.
3901 (ipa_tdesc_idx): New variable.
3902 (get_context_regcache): Use get_ipa_tdesc.
3903 (gdb_collect): Ditto.
3904 (gdb_probe): Ditto.
3905 * tracepoint.h (get_ipa_tdesc): New prototype.
3906 (ipa_tdesc): Remove.
3907
3908 2016-02-24 Pedro Alves <palves@redhat.com>
3909
3910 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3911 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3912 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3913 Factor out common code between the USE_SIGTRAP_SIGINFO and
3914 !USE_SIGTRAP_SIGINFO blocks.
3915 (linux_low_filter_event): Call save_stop_reason instead of
3916 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3917 Update comments.
3918 (linux_wait_1): Update comments.
3919
3920 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3921
3922 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3923 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3924 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3925 ppc_insert_point, ppc_remove_point.
3926
3927 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3928
3929 * linux-s390-low.c (s390_supports_z_point_type): New function.
3930 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3931
3932 2016-02-16 Yao Qi <yao.qi@linaro.org>
3933
3934 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3935 PC. Get pc from regcache_read_pc.
3936
3937 2016-02-12 Yao Qi <yao.qi@linaro.org>
3938
3939 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3940 or linux_get_pc_32bit.
3941 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3942
3943 2016-02-12 Yao Qi <yao.qi@linaro.org>
3944
3945 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3946 arm_linux_get_next_pcs_fixup.
3947
3948 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3949
3950 * tracepoint.c (x_tracepoint_action_download): Change
3951 write_inferior_data_ptr to write_inferior_data_pointer.
3952 (cmd_qtstart): Likewise.
3953 (write_inferior_data_ptr): Remove.
3954 (download_agent_expr): Change write_inferior_data_ptr to
3955 write_inferior_data_pointer.
3956 (download_tracepoint_1): Likewise.
3957 (download_tracepoint): Likewise.
3958 (download_trace_state_variables): Likewise.
3959
3960 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3961 Marcin Kościelnicki <koriakin@0x04.net>
3962
3963 * tracepoint.c (struct tracepoint_action_ops): Remove.
3964 (struct tracepoint_action): Remove ops.
3965 (m_tracepoint_action_download, r_tracepoint_action_download)
3966 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3967 size and offset accordingly.
3968 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3969 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3970 (tracepoint_action_send, tracepoint_action_download): New functions.
3971 Helpers for trace action handlers.
3972 (add_tracepoint_action): Remove setup actions ops.
3973 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3974
3975 2016-02-10 Yao Qi <yao.qi@linaro.org>
3976
3977 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3978
3979 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3980
3981 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3982 to AC_OUTPUT.
3983 * configure: Regenerate.
3984
3985 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3986
3987 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3988 void * to gdb_byte *.
3989 * linux-low.c (siginfo_fixup): Likewise.
3990 (linux_xfer_siginfo): Likewise.
3991 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3992 Likewise.
3993 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3994
3995 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3996
3997 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3998 to srv_tgtobj.
3999 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4000 to srv_tgtobj.
4001 * linux-x86-low.c [__x86_64__]: Include
4002 "nat/amd64-linux-siginfo.h".
4003 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4004 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4005 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4006 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4007 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4008 (cpt_si_fd, si_timerid, si_overrun): Move from
4009 nat/amd64-linux-siginfo.c.
4010 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4011
4012 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4013
4014 * server.c (skip_to_semicolon): Remove.
4015 (process_point_options): Use strchrnul instead of
4016 skip_to_semicolon.
4017
4018 2016-01-26 Yao Qi <yao.qi@linaro.org>
4019
4020 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4021 * linux-low.c (install_software_single_step_breakpoints): Don't
4022 call regcache_read_pc.
4023 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4024 argument pc.
4025
4026 2016-01-26 Yao Qi <yao.qi@linaro.org>
4027
4028 * linux-low.c (install_software_single_step_breakpoints): Call
4029 regcache_read_pc instead of get_pc.
4030
4031 2016-01-26 Yao Qi <yao.qi@linaro.org>
4032
4033 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4034 (unblock_async_io): Rename to ...
4035 (block_unblock_async_io): ... it. New function.
4036 (enable_async_io): Don't install SIGIO handler. Unblock it
4037 instead.
4038 (disable_async_io): Don't ignore SIGIO. Block it instead.
4039 (initialize_async_io): Install SIGIO handler. Don't call
4040 unblock_async_io.
4041
4042 2016-01-26 Yao Qi <yao.qi@linaro.org>
4043
4044 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4045 first character is '\003', call *the_target->request_interrupt.
4046
4047 2016-01-25 Yao Qi <yao.qi@linaro.org>
4048
4049 * remote-utils.c (new_thread_notify): Remove.
4050 (dead_thread_notify): Likewise.
4051 * remote-utils.h (new_thread_notify): Remove declaration.
4052 (dead_thread_notify): Likewise.
4053
4054 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4055
4056 * gdb.trace/pending.exp: Fix expected message on continue.
4057
4058 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4059
4060 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4061 it works properly on big-endian machines where sizeof (CORE_ADDR)
4062 != sizeof (void *).
4063
4064 2016-01-21 Pedro Alves <palves@redhat.com>
4065
4066 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4067 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4068 * configure: Regenerate.
4069
4070 2016-01-21 Yao Qi <yao.qi@linaro.org>
4071
4072 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4073 is_thumb and set it according to CPSR saved on the stack.
4074 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4075 arm_sigreturn_next_pc.
4076
4077 2016-01-18 Yao Qi <yao.qi@linaro.org>
4078
4079 * linux-low.c (linux_set_pc_64bit): New function.
4080 (linux_get_pc_64bit): New function.
4081 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4082 Declare.
4083 * linux-sparc-low.c (debug_threads): Remove declaration.
4084 (sparc_get_pc): Remove.
4085 (the_low_target): Use linux_get_pc_64bit instead of
4086 sparc_get_pc.
4087 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4088 (the_low_target): Use linux_get_pc_64bit and
4089 linux_set_pc_64bit.
4090
4091 2016-01-18 Yao Qi <yao.qi@linaro.org>
4092
4093 * linux-arm-low.c (debug_threads): Remove declaration.
4094 (arm_get_pc, arm_set_pc): Remove.
4095 (the_low_target): Use linux_get_pc_32bit and
4096 linux_set_pc_32bit.
4097 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4098 (the_low_target): Use linux_get_pc_32bit and
4099 linux_set_pc_32bit.
4100 * linux-cris-low.c (debug_threads): Remove declaration.
4101 (cris_get_pc, cris_set_pc,): Remove.
4102 (the_low_target): Use linux_get_pc_32bit and
4103 linux_set_pc_32bit.
4104 * linux-crisv32-low.c (debug_threads): Remove declaration.
4105 (cris_get_pc, cris_set_pc): Remove.
4106 (the_low_target): Use linux_get_pc_32bit and
4107 linux_set_pc_32bit.
4108 * linux-low.c: Include inttypes.h.
4109 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4110 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4111 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4112 (the_low_target): Use linux_get_pc_32bit and
4113 linux_set_pc_32bit.
4114 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4115 (the_low_target): Use linux_get_pc_32bit and
4116 linux_set_pc_32bit.
4117 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4118 (the_low_target): Use linux_get_pc_32bit and
4119 linux_set_pc_32bit.
4120 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4121 (the_low_target): Use linux_get_pc_32bit and
4122 linux_set_pc_32bit.
4123 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4124 (the_low_target): Use linux_get_pc_32bit and
4125 linux_set_pc_32bit.
4126
4127 2016-01-18 Gary Benson <gbenson@redhat.com>
4128
4129 * configure.ac (AC_FUNC_FORK): New check.
4130 * config.in: Regenerate.
4131 * configure: Likewise.
4132
4133 2016-01-14 Yao Qi <yao.qi@linaro.org>
4134
4135 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4136 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4137 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4138 arm_get_next_pcs_ctor.
4139
4140 2016-01-12 Josh Stone <jistone@redhat.com>
4141 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4142
4143 * inferiors.h: Include "gdb_vecs.h".
4144 (struct process_info): Add syscalls_to_catch.
4145 * inferiors.c (remove_process): Free syscalls_to_catch.
4146 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4147 syscall_return stops.
4148 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4149 * server.c (handle_general_set): Handle QCatchSyscalls.
4150 (handle_query): Report support for QCatchSyscalls.
4151 * target.h (struct target_ops): Add supports_catch_syscall.
4152 (target_supports_catch_syscall): New macro.
4153 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4154 (struct lwp_info): Add syscall_state.
4155 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4156 Maintain syscall_state and syscalls_to_catch across exec.
4157 (get_syscall_trapinfo): New function, proxy to the_low_target.
4158 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4159 (linux_low_filter_event): Toggle syscall_state entry/return for
4160 syscall traps, and set it ignored for all others.
4161 (gdb_catching_syscalls_p): New function.
4162 (gdb_catch_this_syscall_p): New function.
4163 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4164 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4165 (linux_supports_catch_syscall): New function.
4166 (linux_target_ops): Install it.
4167 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4168 (the_low_target): Install it.
4169
4170 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4171
4172 * acinclude.m4: Include new ../warning.m4 file.
4173 * configure: Regenerated.
4174 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4175
4176 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4177
4178 * ax.c (is_goto_target): Mark static.
4179 * linux-low.c (register_addr): Likewise.
4180 (linux_fetch_registers, linux_store_registers): Likewise.
4181 * mem-break.c (any_persistent_commands): Fix old prototype.
4182 (add_commands_to_breakpoint): Mark static.
4183 * regcache.c (find_register_by_name): Delete unused func.
4184 * remote-utils.c (hex_or_minus_one): Mark static.
4185 * server.c (monitor_show_help): Mark static.
4186 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4187 handle_v_requests): Likewise.
4188
4189 2016-01-12 Pedro Alves <palves@redhat.com>
4190
4191 Remove use of the registered trademark symbol throughout.
4192
4193 2016-01-08 Yao Qi <yao.qi@linaro.org>
4194
4195 * remote-utils.c (getpkt): If c is '\003', call target hook
4196 request_interrupt.
4197
4198 2016-01-06 Yao Qi <yao.qi@linaro.org>
4199
4200 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4201 linux-aarch32-low.c.
4202 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4203 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4204 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4205 (thumb2_breakpoint): Declare.
4206 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4207 linux-aarch32-low.h.
4208 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4209 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4210 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4211
4212 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4213
4214 * gdbreplay.c (gdbreplay_version): Change copyright year in
4215 version message.
4216 * server.c (gdbserver_version): Likewise.
4217
4218 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4219
4220 * server.c (crc32_table): Delete.
4221 (crc32): Use libiberty's xcrc32 function.
4222
4223 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4224
4225 * lynx-low.c (lynx_delete_thread_callback): New function.
4226 (lynx_mourn): Properly delete our process and all of its
4227 threads. Remove call to clear_inferiors.
4228
4229 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4230
4231 * target.c (thread_search_callback): Add check that
4232 the thread_stopped target callback is not NULL before
4233 calling it.
4234
4235 2015-12-21 Yao Qi <yao.qi@linaro.org>
4236
4237 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4238 arm breakpoint.
4239
4240 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4241
4242 * server.c (handle_query): Call target_supports_software_single_step.
4243
4244 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4245
4246 * linux-low.c (single_step): New function.
4247 (linux_resume_one_lwp_throw): Call single_step.
4248 (start_step_over): Likewise.
4249
4250 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4251
4252 * Makefile.in (SFILES): Append arch/arm-linux.c,
4253 arch/arm-get-next-pcs.c.
4254 (arm-linux.o): New rule.
4255 (arm-get-next-pcs.o): New rule.
4256 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4257 arm-linux.o.
4258 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4259 to linux-aarch32-low.c.
4260 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4261 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4262 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4263 (thumb2_breakpoint_len): Likewise.
4264 (arm_is_thumb_mode): Make non-static.
4265 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4266 from linux-aarch32-low.c.
4267 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4268 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4269 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4270 (thumb2_breakpoint_len): Likewise.
4271 (arm_is_thumb_mode): New declaration.
4272 * linux-arm-low.c: Include arch/arm-linux.h
4273 aarch/arm-get-next-pcs.h, sys/syscall.h.
4274 (get_next_pcs_ops): New struct.
4275 (get_next_pcs_addr_bits_remove): New function.
4276 (get_next_pcs_is_thumb): New function.
4277 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4278 (arm_sigreturn_next_pc): Likewise.
4279 (get_next_pcs_syscall_next_pc): Likewise.
4280 (arm_gdbserver_get_next_pcs): Likewise.
4281 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4282 Initialize.
4283 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4284 * server.h: Include gdb_vecs.h.
4285
4286 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4287
4288 * Makefile.in (SFILES): Append common/common-regcache.c.
4289 (OBS): Append common-regcache.o.
4290 (common-regcache.o): New rule.
4291 * regcache.c (init_register_cache): Initialize cache to
4292 REG_UNAVAILABLE.
4293 (regcache_raw_read_unsigned): New function.
4294 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4295 register_status enum.
4296
4297 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4298
4299 * linux-aarch64-low.c (the_low_targets): Rename
4300 breakpoint_reinsert_addr to get_next_pcs.
4301 * linux-arm-low.c (the_low_targets): Likewise.
4302 * linux-bfin-low.c (the_low_targets): Likewise.
4303 * linux-cris-low.c (the_low_targets): Likewise.
4304 * linux-crisv32-low.c (the_low_targets): Likewise.
4305 * linux-low.c (can_software_single_step): Likewise.
4306 (install_software_single_step_breakpoints): New function.
4307 (start_step_over): Use install_software_single_step_breakpoints.
4308 * linux-low.h: New CORE_ADDR vector.
4309 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4310 get_next_pcs.
4311 * linux-mips-low.c (the_low_targets): Likewise.
4312 * linux-nios2-low.c (the_low_targets): Likewise.
4313 * linux-sparc-low.c (the_low_targets): Likewise.
4314
4315 2015-12-17 Pedro Alves <palves@redhat.com>
4316
4317 * linux-low.c (linux_kill_one_lwp): Remove references to
4318 LinuxThreads.
4319 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4320 to 'kill'.
4321 (linux_init_signals): Delete.
4322 (initialize_low): Adjust.
4323 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4324
4325 2015-12-16 Pedro Alves <palves@redhat.com>
4326
4327 * configure.ac (compiler warning flags): When testing a
4328 -Wno-foo option, check whether -Wfoo works instead.
4329 * configure: Regenerate.
4330
4331 2015-12-11 Don Breazeal <donb@codesourcery.com>
4332
4333 * server.c (process_serial_event): Don't exit from gdbserver
4334 in remote mode if there are still active inferiors.
4335
4336 2015-12-11 Yao Qi <yao.qi@linaro.org>
4337
4338 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4339 arm_breakpoint_at if the process is 32-bit.
4340
4341 2015-12-11 Yao Qi <yao.qi@linaro.org>
4342
4343 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4344 arm breakpoint.
4345
4346 2015-12-07 Yao Qi <yao.qi@linaro.org>
4347
4348 * configure.srv: Append arm.o to srv_tgtobj for
4349 aarch64*-*-linux* target.
4350 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4351 from linux-arm-low.c.
4352 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4353 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4354 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4355 (thumb2_breakpoint_len): Likewise.
4356 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4357 (arm_breakpoint_kinds): Likewise.
4358 (arm_breakpoint_kind_from_pc): Likewise.
4359 (arm_sw_breakpoint_from_kind): Likewise.
4360 (arm_breakpoint_kind_from_current_state): Likewise.
4361 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4362 (arm_sw_breakpoint_from_kind): Declare.
4363 (arm_breakpoint_kind_from_current_state): Declare.
4364 (arm_breakpoint_at): Declare.
4365 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4366 arm_sw_breakpoint_from_kind if process is 32-bit.
4367 (aarch64_breakpoint_kind_from_pc): New function.
4368 (aarch64_breakpoint_kind_from_current_state): New function.
4369 (the_low_target): Initialize fields breakpoint_kind_from_pc
4370 and breakpoint_kind_from_current_state.
4371 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4372 linux-aarch32-low.c.
4373 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4374 (arm_breakpoint, arm_breakpoint_len): Likewise.
4375 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4376 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4377 (arm_is_thumb_mode): Likewise.
4378 (arm_breakpoint_at): Likewise.
4379 (arm_breakpoint_kind_from_pc): Likewise.
4380 (arm_sw_breakpoint_from_kind): Likewise.
4381 (arm_breakpoint_kind_from_current_state): Likewise.
4382
4383 Revert:
4384 2015-08-04 Yao Qi <yao.qi@linaro.org>
4385
4386 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4387 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4388 * server.c (extended_protocol): Remove "static".
4389 * server.h (extended_protocol): Declare it.
4390
4391 2015-12-04 Josh Stone <jistone@redhat.com>
4392
4393 * target.h (struct target_ops) <arch_setup>: Rename to ...
4394 (struct target_ops) <post_create_inferior>: ... this.
4395 (target_arch_setup): Rename to ...
4396 (target_post_create_inferior): ... this, calling post_create_inferior.
4397 * server.c (start_inferior): Update target_arch_setup calls to
4398 target_post_create_inferior.
4399 * linux-low.c (linux_low_ptrace_options): Forward declare.
4400 (linux_arch_setup): Update its comment for general use.
4401 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4402 (struct linux_target_ops): Use linux_post_create_inferior.
4403 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4404 to post_create_inferior.
4405 * nto-low.c (struct nto_target_ops): Likewise.
4406 * spu-low.c (struct spu_target_ops): Likewise.
4407 * win32-low.c (struct win32_target_ops): Likewise.
4408
4409 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4410
4411 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4412
4413 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4414
4415 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4416 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4417 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4418 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4419 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4420 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4421 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4422 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4423 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4424 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4425 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4426 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4427
4428 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4429
4430 * linux-low.c (linux_look_up_symbols): Don't call
4431 linux_supports_traceclone.
4432 * linux-low.h (thread_db_init): Remove use_events argument.
4433 * thread-db.c (thread_db_use_event): Remove global variable.
4434 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4435 (struct thread_db) <td_create_bp>: Remove field.
4436 (thread_db_create_event): Remove function.
4437 (thread_db_enable_reporting): Likewise.
4438 (find_one_thread): Don't check for thread_db_use_events.
4439 (attach_thread): Likewise.
4440 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4441 (try_thread_db_load_1): Don't check for thread_db_use_events.
4442 (thread_db_init): Remove use_events argument and thread events
4443 handling.
4444 (remove_thread_event_breakpoints): Remove function.
4445 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4446
4447 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4448
4449 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4450 New function.
4451 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4452 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4453 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4454 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4455 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4456 Initialize.
4457 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4458 New function.
4459 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4460 * linux-low.c (can_hardware_single_step): Use
4461 supports_hardware_single_step.
4462 (can_software_single_step): New function.
4463 (start_step_over): Call can_software_single_step.
4464 (linux_supports_hardware_single_step): New function.
4465 (struct target_ops) <supports_software_single_step>: Initialize.
4466 * linux-low.h (struct linux_target_ops)
4467 <supports_hardware_single_step>: Initialize.
4468 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4469 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4470 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4471 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4472 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4473 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4474 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4475 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4476 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4477 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4478 Initialize.
4479 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4480 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4481 Initialize.
4482 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4483 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4484 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4485 New function.
4486 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4487 * target.h (struct target_ops): <supports_software_single_step>:
4488 New field.
4489 (target_supports_software_single_step): New macro.
4490
4491 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4492
4493 * linux-low.c (linux_wait_1): Fix pc advance condition.
4494 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4495 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4496
4497 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4498
4499 * linux-arm-low.c (arm_is_thumb_mode): New function.
4500 (arm_breakpoint_at): Use arm_is_thumb_mode.
4501 (arm_breakpoint_kind_from_current_state): New function.
4502 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4503 Initialize.
4504 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4505 (linux_breakpoint_kind_from_current_state): New function.
4506 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4507 * linux-low.h (struct linux_target_ops)
4508 <breakpoint_kind_from_current_state>: New field.
4509 * target.h (struct target_ops): Likewise.
4510 (target_breakpoint_kind_from_current_state): New macro.
4511
4512 2015-11-30 Pedro Alves <palves@redhat.com>
4513
4514 * linux-low.c (linux_resume): Wake up the event loop before
4515 returning.
4516
4517 2015-11-30 Pedro Alves <palves@redhat.com>
4518
4519 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4520 check.
4521 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4522 to -1.
4523 * target.c (struct thread_search): New structure.
4524 (thread_search_callback): New function.
4525 (prev_general_thread): New global.
4526 (prepare_to_access_memory, done_accessing_memory): New functions.
4527 * target.h (prepare_to_access_memory, done_accessing_memory):
4528 Replace macros with function declarations.
4529
4530 2015-11-30 Pedro Alves <palves@redhat.com>
4531
4532 PR 14618
4533 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4534 report TARGET_WAITKIND_NO_RESUMED.
4535 * remote-utils.c (prepare_resume_reply): Handle
4536 TARGET_WAITKIND_NO_RESUMED.
4537 * server.c (report_no_resumed): New global.
4538 (handle_query) <qSupported>: Handle "no-resumed+". Report
4539 "no-resumed+" support.
4540 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4541 return error if the client doesn't support no-resumed events.
4542 (push_stop_notification): New function.
4543 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4544 events if the client supports them.
4545
4546 2015-11-30 Pedro Alves <palves@redhat.com>
4547
4548 * linux-low.c (thread_still_has_status_pending_p): Don't check
4549 vCont;t here.
4550 (lwp_resumed): New function.
4551 (status_pending_p_callback): Return early if the LWP is not
4552 supposed to be resumed.
4553
4554 2015-11-30 Pedro Alves <palves@redhat.com>
4555
4556 * linux-low.c (handle_extended_wait): Assert that the LWP's
4557 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4558 thread create events, leave the new child's status pending.
4559 (linux_low_filter_event): If GDB wants to hear about thread exit
4560 events, leave the LWP marked dead and don't delete it.
4561 (linux_wait_for_event_filtered): Don't check for thread exit.
4562 (filter_exit_event): New function.
4563 (linux_wait_1): Use it, when returning an exit event.
4564 (linux_resume_one_lwp_throw): Assert that the LWP's
4565 waitstatus is TARGET_WAITKIND_IGNORE.
4566 * remote-utils.c (prepare_resume_reply): Handle
4567 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4568 * server.c (report_thread_events): New global.
4569 (handle_general_set): Handle QThreadEvents.
4570 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4571 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4572 TARGET_WAITKIND_THREAD_EXITED.
4573 * server.h (report_thread_events): Declare.
4574
4575 2015-11-30 Pedro Alves <palves@redhat.com>
4576
4577 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4578 the thread's last_resume_kind was resume_stop.
4579
4580 2015-11-30 Pedro Alves <palves@redhat.com>
4581
4582 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4583 before returning.
4584
4585 2015-11-30 Pedro Alves <palves@redhat.com>
4586
4587 * server.c (handle_v_requests): Handle vCtrlC.
4588
4589 2015-11-30 Pedro Alves <palves@redhat.com>
4590
4591 * gdbthread.h (find_any_thread_of_pid): Declare.
4592 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4593 functions.
4594 * server.c (handle_query): If current_thread is NULL, look for
4595 another thread of the selected process.
4596
4597 2015-11-26 Daniel Colascione <dancol@dancol.org>
4598 Simon Marchi <simon.marchi@ericsson.com>
4599
4600 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4601 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4602 name in reply.
4603 * target.h (struct target_ops) <thread_name>: New field.
4604 (target_thread_name): New macro.
4605
4606 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4607
4608 * regcache.h (regcache_invalidate_pid): Add declaration.
4609 * regcache.c (regcache_invalidate_pid): New function, extracted
4610 from regcache_invalidate.
4611 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4612 Add trivial documentation comment.
4613 * lynx-low.c: Use regcache_invalidate_pid instead of
4614 regcache_invalidate.
4615
4616 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4617
4618 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4619 and Elf64_auxv_t if the target is Android.
4620
4621 2015-11-22 Doug Evans <xdje42@gmail.com>
4622
4623 * target.h: #include <sys/types.h>.
4624
4625 2015-11-19 Pedro Alves <palves@redhat.com>
4626
4627 * linux-low.c (linux_process_qsupported): Change prototype.
4628 Adjust.
4629 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4630 Change prototype.
4631 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4632 and adjust to loop over all features.
4633 * server.c (handle_query) <qSupported>: Adjust to call
4634 target_process_qsupported once, passing it a vector of unprocessed
4635 features.
4636 * target.h (struct target_ops) <process_qsupported>: Change
4637 prototype.
4638 (target_process_qsupported): Adjust.
4639
4640 2015-11-19 Pedro Alves <palves@redhat.com>
4641
4642 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4643 mode.
4644 * configure: Regenerate.
4645
4646 2015-11-19 Pedro Alves <palves@redhat.com>
4647
4648 * configure: Regenerate.
4649
4650 2015-11-19 Yao Qi <yao.qi@linaro.org>
4651
4652 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4653 type to uint32_t.
4654
4655 2015-11-19 Yao Qi <yao.qi@linaro.org>
4656
4657 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4658 (struct aarch64_operand): Move enum out.
4659
4660 2015-11-19 Yao Qi <yao.qi@linaro.org>
4661
4662 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4663 struct user_fpsimd_state *.
4664 (aarch64_store_fpregset): Likewise.
4665
4666 2015-11-19 Yao Qi <yao.qi@linaro.org>
4667
4668 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4669 struct user_pt_regs *.
4670 (aarch64_store_gregset): Likewise.
4671
4672 2015-11-18 Pedro Alves <palves@redhat.com>
4673
4674 * Makefile.in (all_object_files): Add $IPA_OBJS.
4675
4676 2015-11-17 Pedro Alves <palves@redhat.com>
4677
4678 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4679 GDB_SIGNAL_0 and gdb_signal_to_string.
4680
4681 2015-11-17 Pedro Alves <palves@redhat.com>
4682
4683 * win32-low.c (handle_output_debug_string): Remove parameter.
4684 (win32_kill): Remove our_status local and adjust call to
4685 handle_output_debug_string.
4686 (get_child_debug_event): Adjust call to
4687 handle_output_debug_string.
4688
4689 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4690
4691 * linux-mips-low.c (mips_fill_gregset): Add cast.
4692 (mips_store_gregset): Likewise.
4693 (mips_fill_fpregset): Likewise.
4694 (mips_store_fpregset): Likewise.
4695
4696 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4697
4698 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4699 priv.
4700
4701 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4702
4703 * linux-mips-low.c (mips_linux_new_thread): Change type of
4704 watch_type to enum target_hw_bp_type.
4705
4706 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4707
4708 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4709 Change return type to arm_hwbp_type.
4710
4711 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4712
4713 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4714 (arm_store_gregset): Likewise.
4715 * linux-arm-low.c (arm_get_hwcap): Likewise.
4716 (arm_read_description): Likewise.
4717
4718 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4719
4720 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4721
4722 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4723
4724 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4725 (ppc_fill_vsxregset): Likewise.
4726 (ppc_store_vsxregset): Likewise.
4727 (ppc_fill_vrregset): Likewise.
4728 (ppc_store_vrregset): Likewise.
4729 (ppc_fill_evrregset): Likewise.
4730 (ppc_store_evrregset): Likewise.
4731
4732 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4733
4734 * linux-ppc-low.c (ppc_usrregs_info): Remove
4735 forward-declaration.
4736 (ppc_arch_setup): Move lower in file.
4737
4738 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4739
4740 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4741 (ps_pdwrite): Likewise.
4742
4743 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4744
4745 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4746 to after assert checks.
4747
4748 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4749
4750 * proc-service.c (ps_pdread): Add/adjust casts.
4751 (ps_pdwrite): Add/adjust casts.
4752
4753 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4754
4755 * server.c (handle_search_memory_1): Cast return value of
4756 memmem.
4757
4758 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4759
4760 * server.c (write_qxfer_response): Change type of data to
4761 gdb_byte *.
4762
4763 2015-10-29 Pedro Alves <palves@redhat.com>
4764
4765 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4766
4767 2015-10-29 Pedro Alves <palves@redhat.com>
4768
4769 * tracepoint.c (clear_installed_tracepoints): Add casts.
4770
4771 2015-10-29 Pedro Alves <palves@redhat.com>
4772
4773 * server.c (handle_v_cont, process_serial_event): Add enum
4774 gdb_signal casts to signal parsing code.
4775
4776 2015-10-29 Pedro Alves <palves@redhat.com>
4777
4778 * linux-low.h (NULL_REGSET): Define.
4779 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4780 * linux-arm-low.c (arm_regsets): Likewise.
4781 * linux-crisv32-low.c (cris_regsets): Likewise.
4782 * linux-m68k-low.c (m68k_regsets): Likewise.
4783 * linux-mips-low.c (mips_regsets): Likewise.
4784 * linux-nios2-low.c (nios2_regsets): Likewise.
4785 * linux-ppc-low.c (ppc_regsets): Likewise.
4786 * linux-s390-low.c (s390_regsets): Likewise.
4787 * linux-sh-low.c (sh_regsets): Likewise.
4788 * linux-sparc-low.c (sparc_regsets): Likewise.
4789 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4790 * linux-tile-low.c (tile_regsets): Likewise.
4791 * linux-x86-low.c (x86_regsets): Likewise.
4792 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4793
4794 2015-10-29 Pedro Alves <palves@redhat.com>
4795
4796 * linux-low.h (NULL_REGSET): Define.
4797 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4798 * linux-arm-low.c (arm_regsets): Likewise.
4799 * linux-crisv32-low.c (cris_regsets): Likewise.
4800 * linux-m68k-low.c (m68k_regsets): Likewise.
4801 * linux-mips-low.c (mips_regsets): Likewise.
4802 * linux-nios2-low.c (nios2_regsets): Likewise.
4803 * linux-ppc-low.c (ppc_regsets): Likewise.
4804 * linux-s390-low.c (s390_regsets): Likewise.
4805 * linux-sh-low.c (sh_regsets): Likewise.
4806 * linux-sparc-low.c (sparc_regsets): Likewise.
4807 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4808 * linux-tile-low.c (tile_regsets): Likewise.
4809 * linux-x86-low.c (x86_regsets): Likewise.
4810 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4811
4812 2015-10-26 Doug Evans <dje@google.com>
4813
4814 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4815
4816 2015-10-26 Doug Evans <dje@google.com>
4817
4818 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4819
4820 2015-10-26 Doug Evans <dje@google.com>
4821
4822 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4823 for debug_printf.
4824 (attach_thread, find_new_threads_callback): Ditto.
4825
4826 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4827
4828 * mem-break.h (set_breakpoint_data): Remove.
4829
4830 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4831
4832 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4833 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4834 (initialize_low): Remove set_breakpoint_data call.
4835 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4836 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4837 (initialize_low): Remove set_breakpoint_data call.
4838 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4839 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4840 (initialize_low): Remove set_breakpoint_data call.
4841
4842 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4843
4844 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4845 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4846 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4847 * target.h (target_breakpoint_kind_from_pc): New macro.
4848
4849 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4850
4851 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4852 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4853 the default breakpoint kind.
4854
4855 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4856
4857 * linux-arm-low.c (arm_supports_z_point_type): Add software
4858 breakpoint support.
4859
4860 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4861
4862 * linux-arm-low.c: Refactor breakpoint definitions.
4863 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4864 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4865
4866 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4867
4868 * Makefile.in: Add arm.c/o.
4869 * configure.srv: Likewise.
4870 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4871 (arm_breakpoint_kind_from_pc): New function.
4872 (arm_sw_breakpoint_from_kind): Return proper kind.
4873 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4874
4875 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4876
4877 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4878 removal.
4879 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4880 (struct raw_breakpoint) <size>: Remove.
4881 (struct raw_breakpoint) <kind>: Add.
4882 (bp_size): New function.
4883 (bp_opcode): Likewise.
4884 (find_raw_breakpoint_at): Adjust for kind.
4885 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4886 (remove_memory_breakpoint): Adjust for kind call bp_size.
4887 (set_raw_breakpoint_at): Adjust for kind.
4888 (set_breakpoint): Likewise.
4889 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4890 (delete_raw_breakpoint): Adjust for kind.
4891 (delete_breakpoint): Likewise.
4892 (find_gdb_breakpoint): Likewise.
4893 (set_gdb_breakpoint_1): Likewise.
4894 (set_gdb_breakpoint): Likewise.
4895 (delete_gdb_breakpoint_1): Likewise.
4896 (delete_gdb_breakpoint): Likewise.
4897 (uninsert_raw_breakpoint): Likewise.
4898 (reinsert_raw_breakpoint): Likewise.
4899 (set_breakpoint_data): Remove.
4900 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4901 (check_mem_read): Adjust for kind call bp_size.
4902 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4903 (clone_one_breakpoint): Adjust for kind.
4904 * mem-break.h (set_gdb_breakpoint): Likewise.
4905 (delete_gdb_breakpoint): Likewise.
4906 * server.c (process_serial_event): Likewise.
4907
4908 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4909
4910 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4911 (struct linux_target_ops) <breakpoint>: Remove.
4912 (struct linux_target_ops) <breakpoint_len>: Remove.
4913 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4914 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4915 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4916 (arm_sw_breakpoint_from_kind): New function.
4917 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4918 (struct linux_target_ops) <breakpoint>: Remove.
4919 (struct linux_target_ops) <breakpoint_len>: Remove.
4920 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4921 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4922 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4923 (struct linux_target_ops) <breakpoint>: Remove.
4924 (struct linux_target_ops) <breakpoint_len>: Remove.
4925 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4926 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4927 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4928 (struct linux_target_ops) <breakpoint>: Remove.
4929 (struct linux_target_ops) <breakpoint_len>: Remove.
4930 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4931 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4932 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4933 and sw_breakpoint_from_kind to increment the pc.
4934 (linux_breakpoint_kind_from_pc): New function.
4935 (linux_sw_breakpoint_from_kind): New function.
4936 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4937 (initialize_low): Call breakpoint_kind_from_pc and
4938 sw_breakpoint_from_kind to replace breakpoint_data/len.
4939 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4940 New field.
4941 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4942 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4943 (struct linux_target_ops) <breakpoint>: Remove.
4944 (struct linux_target_ops) <breakpoint_len>: Remove.
4945 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4946 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4947 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4948 (struct linux_target_ops) <breakpoint>: Remove.
4949 (struct linux_target_ops) <breakpoint_len>: Remove.
4950 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4951 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4952 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4953 (struct linux_target_ops) <breakpoint>: Remove.
4954 (struct linux_target_ops) <breakpoint_len>: Remove.
4955 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4956 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4957 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4958 (struct linux_target_ops) <breakpoint>: Remove.
4959 (struct linux_target_ops) <breakpoint_len>: Remove.
4960 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4961 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4962 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4963 (struct linux_target_ops) <breakpoint>: Remove.
4964 (struct linux_target_ops) <breakpoint_len>: Remove.
4965 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4966 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4967 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4968 (struct linux_target_ops) <breakpoint>: Remove.
4969 (struct linux_target_ops) <breakpoint_len>: Remove.
4970 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4971 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4972 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4973 (struct linux_target_ops) <breakpoint>: Remove.
4974 (struct linux_target_ops) <breakpoint_len>: Remove.
4975 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4976 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4977 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4978 (struct linux_target_ops) <breakpoint>: Remove.
4979 (struct linux_target_ops) <breakpoint_len>: Remove.
4980 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4981 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4982 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4983 (struct linux_target_ops) <breakpoint>: Remove.
4984 (struct linux_target_ops) <breakpoint_len>: Remove.
4985 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4986 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4987 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4988 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4989 (struct linux_target_ops) <breakpoint>: Remove.
4990 (struct linux_target_ops) <breakpoint_len>: Remove.
4991 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4992 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4993 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4994 (struct linux_target_ops) <breakpoint>: Remove.
4995 (struct linux_target_ops) <breakpoint_len>: Remove.
4996 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4997 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4998
4999 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5000
5001 * linux-cris-low.c (cris_get_pc): Remove void arg.
5002
5003 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5004
5005 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5006 variable name.
5007
5008 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5009
5010 * inferiors.c (thread_pid_matches_callback): New function.
5011 (find_thread_process): New function.
5012 (remove_thread): Reset current_thread.
5013 (remove_process): Assert threads have been removed first.
5014
5015 2015-10-15 Yao Qi <yao.qi@linaro.org>
5016
5017 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5018 if it is 3.
5019 (aarch64_remove_point): Likewise.
5020 * regcache.c (regcache_register_size): New function.
5021
5022 2015-10-12 Yao Qi <yao.qi@linaro.org>
5023
5024 * linux-aarch64-low.c: Update all callers as emit_load_store
5025 is renamed to aarch64_emit_load_store.
5026
5027 2015-10-12 Yao Qi <yao.qi@linaro.org>
5028
5029 * linux-aarch64-low.c: Update all callers of function renaming
5030 from emit_insn to aarch64_emit_insn.
5031
5032 2015-10-12 Yao Qi <yao.qi@linaro.org>
5033
5034 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5035 arch/aarch64-insn.h.
5036 (struct aarch64_memory_operand): Likewise.
5037 (ENCODE): Likewise.
5038 (emit_insn): Move to arch/aarch64-insn.c.
5039 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5040 (emit_load_store): Move to arch/aarch64-insn.c.
5041 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5042 (can_encode_int32): Remove.
5043
5044 2015-10-12 Yao Qi <yao.qi@linaro.org>
5045
5046 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5047 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5048 (aarch64_relocate_instruction): Likewise.
5049 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5050 (struct aarch64_insn_visitor): Likewise.
5051
5052 2015-10-12 Yao Qi <yao.qi@linaro.org>
5053
5054 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5055 (struct aarch64_insn_visitor): New.
5056 (struct aarch64_insn_relocation_data): New.
5057 (aarch64_ftrace_insn_reloc_b): New function.
5058 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5059 (aarch64_ftrace_insn_reloc_cb): Likewise.
5060 (aarch64_ftrace_insn_reloc_tb): Likewise.
5061 (aarch64_ftrace_insn_reloc_adr): Likewise.
5062 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5063 (aarch64_ftrace_insn_reloc_others): Likewise.
5064 (visitor): New.
5065 (aarch64_relocate_instruction): Use visitor.
5066
5067 2015-10-12 Yao Qi <yao.qi@linaro.org>
5068
5069 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5070 int. Add argument buf.
5071 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5072 aarch64_relocate_instruction.
5073
5074 2015-10-12 Yao Qi <yao.qi@linaro.org>
5075
5076 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5077 argument insn. Remove local variable insn. Don't call
5078 target_read_uint32.
5079 (aarch64_install_fast_tracepoint_jump_pad): Call
5080 target_read_uint32.
5081
5082 2015-09-30 Yao Qi <yao.qi@linaro.org>
5083
5084 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5085 (emit_load_store_pair): Likewise.
5086
5087 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5088
5089 * dll.c (match_dll): Add cast(s).
5090 (unloaded_dll): Likewise.
5091 * linux-low.c (second_thread_of_pid_p): Likewise.
5092 (delete_lwp_callback): Likewise.
5093 (count_events_callback): Likewise.
5094 (select_event_lwp_callback): Likewise.
5095 (linux_set_resume_request): Likewise.
5096 * server.c (accumulate_file_name_length): Likewise.
5097 (emit_dll_description): Likewise.
5098 (handle_qxfer_threads_worker): Likewise.
5099 (visit_actioned_threads): Likewise.
5100 * thread-db.c (any_thread_of): Likewise.
5101 * tracepoint.c (same_process_p): Likewise.
5102 (match_blocktype): Likewise.
5103 (build_traceframe_info_xml): Likewise.
5104
5105 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5106
5107 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5108 assignment.
5109 (gdb_unparse_agent_expr): Likewise.
5110 * hostio.c (require_data): Likewise.
5111 (handle_pread): Likewise.
5112 * linux-low.c (disable_regset): Likewise.
5113 (fetch_register): Likewise.
5114 (store_register): Likewise.
5115 (get_dynamic): Likewise.
5116 (linux_qxfer_libraries_svr4): Likewise.
5117 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5118 (set_fast_tracepoint_jump): Likewise.
5119 (uninsert_fast_tracepoint_jumps_at): Likewise.
5120 (reinsert_fast_tracepoint_jumps_at): Likewise.
5121 (validate_inserted_breakpoint): Likewise.
5122 (clone_agent_expr): Likewise.
5123 * regcache.c (init_register_cache): Likewise.
5124 * remote-utils.c (putpkt_binary_1): Likewise.
5125 (decode_M_packet): Likewise.
5126 (decode_X_packet): Likewise.
5127 (look_up_one_symbol): Likewise.
5128 (relocate_instruction): Likewise.
5129 (monitor_output): Likewise.
5130 * server.c (handle_search_memory): Likewise.
5131 (handle_qxfer_exec_file): Likewise.
5132 (handle_qxfer_libraries): Likewise.
5133 (handle_qxfer): Likewise.
5134 (handle_query): Likewise.
5135 (handle_v_cont): Likewise.
5136 (handle_v_run): Likewise.
5137 (captured_main): Likewise.
5138 * target.c (write_inferior_memory): Likewise.
5139 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5140 * tracepoint.c (init_trace_buffer): Likewise.
5141 (add_tracepoint_action): Likewise.
5142 (add_traceframe): Likewise.
5143 (add_traceframe_block): Likewise.
5144 (cmd_qtdpsrc): Likewise.
5145 (cmd_qtdv): Likewise.
5146 (cmd_qtstatus): Likewise.
5147 (response_source): Likewise.
5148 (response_tsv): Likewise.
5149 (cmd_qtnotes): Likewise.
5150 (gdb_collect): Likewise.
5151 (initialize_tracepoint): Likewise.
5152
5153 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5154
5155 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5156 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5157 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5158 <NOP>: New.
5159 (enum aarch64_condition_codes): New enum.
5160 (w0): New static global.
5161 (fp): Likewise.
5162 (lr): Likewise.
5163 (struct aarch64_memory_operand) <type>: New
5164 MEMORY_OPERAND_POSTINDEX type.
5165 (postindex_memory_operand): New helper function.
5166 (emit_ret): New function.
5167 (emit_load_store_pair): New function, factored out of emit_stp
5168 with support for MEMORY_OPERAND_POSTINDEX.
5169 (emit_stp): Rewrite using emit_load_store_pair.
5170 (emit_ldp): New function.
5171 (emit_load_store): Likewise.
5172 (emit_ldr): Mention post-index instruction in comment.
5173 (emit_ldrh): New function.
5174 (emit_ldrb): New function.
5175 (emit_ldrsw): Mention post-index instruction in comment.
5176 (emit_str): Likewise.
5177 (emit_subs): New function.
5178 (emit_cmp): Likewise.
5179 (emit_and): Likewise.
5180 (emit_orr): Likewise.
5181 (emit_orn): Likewise.
5182 (emit_eor): Likewise.
5183 (emit_mvn): Likewise.
5184 (emit_lslv): Likewise.
5185 (emit_lsrv): Likewise.
5186 (emit_asrv): Likewise.
5187 (emit_mul): Likewise.
5188 (emit_sbfm): Likewise.
5189 (emit_sbfx): Likewise.
5190 (emit_ubfm): Likewise.
5191 (emit_ubfx): Likewise.
5192 (emit_csinc): Likewise.
5193 (emit_cset): Likewise.
5194 (emit_nop): Likewise.
5195 (emit_ops_insns): New helper function.
5196 (emit_pop): Likewise.
5197 (emit_push): Likewise.
5198 (aarch64_emit_prologue): New function.
5199 (aarch64_emit_epilogue): Likewise.
5200 (aarch64_emit_add): Likewise.
5201 (aarch64_emit_sub): Likewise.
5202 (aarch64_emit_mul): Likewise.
5203 (aarch64_emit_lsh): Likewise.
5204 (aarch64_emit_rsh_signed): Likewise.
5205 (aarch64_emit_rsh_unsigned): Likewise.
5206 (aarch64_emit_ext): Likewise.
5207 (aarch64_emit_log_not): Likewise.
5208 (aarch64_emit_bit_and): Likewise.
5209 (aarch64_emit_bit_or): Likewise.
5210 (aarch64_emit_bit_xor): Likewise.
5211 (aarch64_emit_bit_not): Likewise.
5212 (aarch64_emit_equal): Likewise.
5213 (aarch64_emit_less_signed): Likewise.
5214 (aarch64_emit_less_unsigned): Likewise.
5215 (aarch64_emit_ref): Likewise.
5216 (aarch64_emit_if_goto): Likewise.
5217 (aarch64_emit_goto): Likewise.
5218 (aarch64_write_goto_address): Likewise.
5219 (aarch64_emit_const): Likewise.
5220 (aarch64_emit_call): Likewise.
5221 (aarch64_emit_reg): Likewise.
5222 (aarch64_emit_pop): Likewise.
5223 (aarch64_emit_stack_flush): Likewise.
5224 (aarch64_emit_zero_ext): Likewise.
5225 (aarch64_emit_swap): Likewise.
5226 (aarch64_emit_stack_adjust): Likewise.
5227 (aarch64_emit_int_call_1): Likewise.
5228 (aarch64_emit_void_call_2): Likewise.
5229 (aarch64_emit_eq_goto): Likewise.
5230 (aarch64_emit_ne_goto): Likewise.
5231 (aarch64_emit_lt_goto): Likewise.
5232 (aarch64_emit_le_goto): Likewise.
5233 (aarch64_emit_gt_goto): Likewise.
5234 (aarch64_emit_ge_got): Likewise.
5235 (aarch64_emit_ops_impl): New static global variable.
5236 (aarch64_emit_ops): New target function, return
5237 &aarch64_emit_ops_impl.
5238 (struct linux_target_ops): Install it.
5239
5240 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5241
5242 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5243 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5244 aarch64-ipa.o.
5245 * linux-aarch64-ipa.c: New file.
5246 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5247 and endian.h.
5248 (aarch64_get_thread_area): New target method.
5249 (extract_signed_bitfield): New helper function.
5250 (aarch64_decode_ldr_literal): New function.
5251 (enum aarch64_opcodes): New enum.
5252 (struct aarch64_register): New struct.
5253 (struct aarch64_operand): New struct.
5254 (x0): New static global.
5255 (x1): Likewise.
5256 (x2): Likewise.
5257 (x3): Likewise.
5258 (x4): Likewise.
5259 (w2): Likewise.
5260 (ip0): Likewise.
5261 (sp): Likewise.
5262 (xzr): Likewise.
5263 (aarch64_register): New helper function.
5264 (register_operand): Likewise.
5265 (immediate_operand): Likewise.
5266 (struct aarch64_memory_operand): New struct.
5267 (offset_memory_operand): New helper function.
5268 (preindex_memory_operand): Likewise.
5269 (enum aarch64_system_control_registers): New enum.
5270 (ENCODE): New macro.
5271 (emit_insn): New helper function.
5272 (emit_b): New function.
5273 (emit_bcond): Likewise.
5274 (emit_cb): Likewise.
5275 (emit_tb): Likewise.
5276 (emit_blr): Likewise.
5277 (emit_stp): Likewise.
5278 (emit_ldp_q_offset): Likewise.
5279 (emit_stp_q_offset): Likewise.
5280 (emit_load_store): Likewise.
5281 (emit_ldr): Likewise.
5282 (emit_ldrsw): Likewise.
5283 (emit_str): Likewise.
5284 (emit_ldaxr): Likewise.
5285 (emit_stxr): Likewise.
5286 (emit_stlr): Likewise.
5287 (emit_data_processing_reg): Likewise.
5288 (emit_data_processing): Likewise.
5289 (emit_add): Likewise.
5290 (emit_sub): Likewise.
5291 (emit_mov): Likewise.
5292 (emit_movk): Likewise.
5293 (emit_mov_addr): Likewise.
5294 (emit_mrs): Likewise.
5295 (emit_msr): Likewise.
5296 (emit_sevl): Likewise.
5297 (emit_wfe): Likewise.
5298 (append_insns): Likewise.
5299 (can_encode_int32_in): New helper function.
5300 (aarch64_relocate_instruction): New function.
5301 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5302 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5303 (struct linux_target_ops): Install aarch64_get_thread_area,
5304 aarch64_install_fast_tracepoint_jump_pad and
5305 aarch64_get_min_fast_tracepoint_insn_len.
5306
5307 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5308
5309 * Makefile.in (aarch64-insn.o): New rule.
5310 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5311
5312 2015-09-21 Yao Qi <yao.qi@linaro.org>
5313
5314 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5315
5316 2015-09-21 Yao Qi <yao.qi@linaro.org>
5317
5318 * tracepoint.c (max_jump_pad_size): Remove.
5319
5320 2015-09-18 Yao Qi <yao.qi@linaro.org>
5321
5322 * linux-aarch64-low.c: Don't include sys/uio.h.
5323 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5324
5325 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5326
5327 * tracepoint.c (eval_result_type): Change prototype.
5328 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5329
5330 2015-09-15 Pedro Alves <palves@redhat.com>
5331
5332 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5333 Check whether to report exec events instead of checking whether
5334 multiprocess is enabled.
5335
5336 2015-09-15 Pedro Alves <palves@redhat.com>
5337
5338 PR remote/18965
5339 * remote-utils.c (prepare_resume_reply): Merge
5340 TARGET_WAITKIND_VFORK_DONE switch case with the
5341 TARGET_WAITKIND_FORKED case.
5342
5343 2015-09-15 Yao Qi <yao.qi@linaro.org>
5344
5345 * server.c (handle_query): Check string comparison using
5346 "else if" instead of "if".
5347
5348 2015-09-15 Yao Qi <yao.qi@linaro.org>
5349
5350 * server.c (vCont_supported): New global variable.
5351 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5352 matches. Append ";vContSupported+" to own_buf.
5353 (handle_v_requests): Append ";s;S" to own_buf if target supports
5354 hardware single step or vCont_supported is false.
5355 (capture_main): Set vCont_supported to zero.
5356
5357 2015-09-15 Yao Qi <yao.qi@linaro.org>
5358
5359 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5360 it to ...
5361 (linux_supports_hardware_single_step): ... New function.
5362 (linux_target_ops): Update.
5363 * lynx-low.c (lynx_target_ops): Set field
5364 supports_hardware_single_step to target_can_do_hardware_single_step.
5365 * nto-low.c (nto_target_ops): Likewise.
5366 * spu-low.c (spu_target_ops): Likewise.
5367 * win32-low.c (win32_target_ops): Likewise.
5368 * target.c (target_can_do_hardware_single_step): New function.
5369 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5370 Remove. <supports_hardware_single_step>: New field.
5371 (target_supports_conditional_breakpoints): Remove.
5372 (target_supports_hardware_single_step): New macro.
5373 (target_can_do_hardware_single_step): Declare.
5374 * server.c (handle_query): Use target_supports_hardware_single_step
5375 instead of target_supports_conditional_breakpoints.
5376
5377 2015-09-15 Yao Qi <yao.qi@linaro.org>
5378
5379 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5380 function.
5381 (struct linux_target_ops the_low_target): Install
5382 aarch64_linux_siginfo_fixup.
5383
5384 2015-09-11 Don Breazeal <donb@codesourcery.com>
5385 Luis Machado <lgustavo@codesourcery.com>
5386
5387 * linux-low.c (linux_mourn): Static declaration.
5388 (linux_arch_setup): Move in front of
5389 handle_extended_wait.
5390 (linux_arch_setup_thread): New function.
5391 (handle_extended_wait): Handle exec events. Call
5392 linux_arch_setup_thread. Make event_lwp argument a
5393 pointer-to-a-pointer.
5394 (check_zombie_leaders): Do not check stopped threads.
5395 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5396 (linux_low_filter_event): Add lwp and thread for exec'ing
5397 non-leader thread if leader thread has been deleted.
5398 Refactor code into linux_arch_setup_thread and call it.
5399 Pass child lwp pointer by reference to handle_extended_wait.
5400 (linux_wait_for_event_filtered): Update comment.
5401 (linux_wait_1): Prevent clobbering exec event status.
5402 (linux_supports_exec_events): New function.
5403 (linux_target_ops) <supports_exec_events>: Initialize new member.
5404 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5405 new member.
5406 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5407 * server.c (report_exec_events): New global variable.
5408 (handle_query): Handle qSupported query for exec-events feature.
5409 (captured_main): Initialize report_exec_events.
5410 * server.h (report_exec_events): Declare new global variable.
5411 * target.h (struct target_ops) <supports_exec_events>: New
5412 member.
5413 (target_supports_exec_events): New macro.
5414 * win32-low.c (win32_target_ops) <supports_exec_events>:
5415 Initialize new member.
5416
5417 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5418
5419 * linux-low.c (linux_low_enable_btrace): Remove.
5420 (linux_target_ops): Replace linux_low_enable_btrace with
5421 linux_enable_btrace.
5422
5423 2015-09-03 Yao Qi <yao.qi@linaro.org>
5424
5425 * linux-aarch64-low.c (aarch64_insert_point): Call
5426 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5427 returns true.
5428
5429 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5430
5431 * linux-low.c (check_stopped_by_breakpoint): Use
5432 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5433
5434 2015-08-27 Pedro Alves <palves@redhat.com>
5435
5436 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5437
5438 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5439
5440 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5441 the XNEW-family equivalent.
5442 (compile_bytecodes): Likewise.
5443 * dll.c (loaded_dll): Likewise.
5444 * event-loop.c (append_callback_event): Likewise.
5445 (create_file_handler): Likewise.
5446 (create_file_event): Likewise.
5447 * hostio.c (handle_open): Likewise.
5448 * inferiors.c (add_thread): Likewise.
5449 (add_process): Likewise.
5450 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5451 * linux-arm-low.c (arm_new_process): Likewise.
5452 (arm_new_thread): Likewise.
5453 * linux-low.c (add_to_pid_list): Likewise.
5454 (linux_add_process): Likewise.
5455 (handle_extended_wait): Likewise.
5456 (add_lwp): Likewise.
5457 (enqueue_one_deferred_signal): Likewise.
5458 (enqueue_pending_signal): Likewise.
5459 (linux_resume_one_lwp_throw): Likewise.
5460 (linux_resume_one_thread): Likewise.
5461 (linux_read_memory): Likewise.
5462 (linux_write_memory): Likewise.
5463 * linux-mips-low.c (mips_linux_new_process): Likewise.
5464 (mips_linux_new_thread): Likewise.
5465 (mips_add_watchpoint): Likewise.
5466 * linux-x86-low.c (initialize_low_arch): Likewise.
5467 * lynx-low.c (lynx_add_process): Likewise.
5468 * mem-break.c (set_raw_breakpoint_at): Likewise.
5469 (set_breakpoint): Likewise.
5470 (add_condition_to_breakpoint): Likewise.
5471 (add_commands_to_breakpoint): Likewise.
5472 (clone_agent_expr): Likewise.
5473 (clone_one_breakpoint): Likewise.
5474 * regcache.c (new_register_cache): Likewise.
5475 * remote-utils.c (look_up_one_symbol): Likewise.
5476 * server.c (queue_stop_reply): Likewise.
5477 (start_inferior): Likewise.
5478 (queue_stop_reply_callback): Likewise.
5479 (handle_target_event): Likewise.
5480 * spu-low.c (fetch_ppc_memory): Likewise.
5481 (store_ppc_memory): Likewise.
5482 * target.c (set_target_ops): Likewise.
5483 * thread-db.c (thread_db_load_search): Likewise.
5484 (try_thread_db_load_1): Likewise.
5485 * tracepoint.c (add_tracepoint): Likewise.
5486 (add_tracepoint_action): Likewise.
5487 (create_trace_state_variable): Likewise.
5488 (cmd_qtdpsrc): Likewise.
5489 (cmd_qtro): Likewise.
5490 (add_while_stepping_state): Likewise.
5491 * win32-low.c (child_add_thread): Likewise.
5492 (get_image_name): Likewise.
5493
5494 2015-08-25 Yao Qi <yao.qi@linaro.org>
5495
5496 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5497
5498 2015-08-25 Yao Qi <yao.qi@linaro.org>
5499
5500 * Makefile.in (aarch64-linux.o): New rule.
5501 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5502 srv_tgtobj.
5503 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5504 (aarch64_init_debug_reg_state): Make it extern.
5505 (aarch64_linux_prepare_to_resume): Remove.
5506
5507 2015-08-25 Yao Qi <yao.qi@linaro.org>
5508
5509 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5510 lwp_arch_private_info and ptid_of_lwp.
5511
5512 2015-08-25 Yao Qi <yao.qi@linaro.org>
5513
5514 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5515 Find proc_info by find_process_pid. All callers updated.
5516
5517 2015-08-25 Yao Qi <yao.qi@linaro.org>
5518
5519 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5520 Remove.
5521 (debug_reg_change_callback): Remove.
5522 (aarch64_notify_debug_reg_change): Remove.
5523
5524 2015-08-25 Yao Qi <yao.qi@linaro.org>
5525
5526 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5527 Call current_lwp_ptid.
5528
5529 2015-08-25 Yao Qi <yao.qi@linaro.org>
5530
5531 * linux-aarch64-low.c (debug_reg_change_callback): Use
5532 debug_printf.
5533
5534 2015-08-25 Yao Qi <yao.qi@linaro.org>
5535
5536 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5537
5538 2015-08-25 Yao Qi <yao.qi@linaro.org>
5539
5540 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5541
5542 2015-08-25 Yao Qi <yao.qi@linaro.org>
5543
5544 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5545 the code.
5546
5547 2015-08-25 Yao Qi <yao.qi@linaro.org>
5548
5549 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5550 Remove.
5551 (debug_reg_change_callback): Remove argument entry and add argument
5552 lwp. Remove local variable thread. Don't print thread id in the
5553 debugging output. Don't check whether pid of thread equals to pid.
5554 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5555 iterate_over_lwps instead find_inferior.
5556
5557 2015-08-24 Pedro Alves <palves@redhat.com>
5558
5559 * inferiors.c (get_first_process): New function.
5560 * inferiors.h (get_first_process): New declaration.
5561 * remote-utils.c (read_ptid): Default to the first process in the
5562 list, instead of to the current thread's process.
5563
5564 2015-08-24 Pedro Alves <palves@redhat.com>
5565
5566 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5567 * event-loop.c: Likewise.
5568 * remote-utils.c: Likewise.
5569 * tracepoint.c: Likewise.
5570
5571 2015-08-24 Pedro Alves <palves@redhat.com>
5572
5573 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5574 ptid_get_lwp.
5575
5576 2015-08-21 Pedro Alves <palves@redhat.com>
5577
5578 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5579 instead of literal 1.
5580
5581 2015-08-21 Pedro Alves <palves@redhat.com>
5582
5583 * tdesc.c (default_description): Explicitly zero-initialize.
5584
5585 2015-08-21 Pedro Alves <palves@redhat.com>
5586
5587 PR gdb/18749
5588 * inferiors.c (remove_thread): Discard any pending stop reply for
5589 this thread.
5590 * server.c (remove_all_on_match_pid): Rename to ...
5591 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5592 instead of a pid.
5593 (discard_queued_stop_replies): Change parameter to a ptid. Now
5594 extern.
5595 (handle_v_kill, kill_inferior_callback, captured_main)
5596 (process_serial_event): Adjust.
5597 * server.h (discard_queued_stop_replies): Declare.
5598
5599 2015-08-21 Pedro Alves <palves@redhat.com>
5600
5601 * linux-low.c (wait_for_sigstop): Always switch to no thread
5602 selected if the previously current thread dies.
5603 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5604 process instead of the current thread's.
5605 * remote-utils.c (input_interrupt): Don't check if there's no
5606 current thread.
5607 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5608 current thread to the general thread fails, error out.
5609 (handle_qxfer_auxv, handle_qxfer_libraries)
5610 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5611 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5612 (handle_query): Check if there's a thread selected instead of
5613 checking whether there's any thread in the thread list.
5614 (handle_qxfer_threads, handle_qxfer_btrace)
5615 (handle_qxfer_btrace_conf): Don't error out early if there's no
5616 thread in the thread list.
5617 (handle_v_cont, myresume): Don't set the current thread to the
5618 continue thread.
5619 (process_serial_event) <Hg handling>: Also set thread_id if the
5620 previous general thread is still alive.
5621 (process_serial_event) <g/G handling>: If setting the current
5622 thread to the general thread fails, error out.
5623 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5624 thread's lwp instead of the current thread's.
5625 * target.c (set_desired_thread): If the desired thread was not
5626 found, leave the current thread pointing to NULL. Return an int
5627 (boolean) indicating success.
5628 * target.h (set_desired_thread): Change return type to int.
5629
5630 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5631
5632 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5633 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5634 #includes.
5635 (ps_get_thread_area): New function.
5636
5637 2015-08-19 Gary Benson <gbenson@redhat.com>
5638
5639 * hostio.c (handle_pread): Do not attempt to read more data
5640 than hostio_reply_with_data can fit in a packet.
5641
5642 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5643
5644 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5645
5646 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5647
5648 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5649
5650 2015-08-06 Pedro Alves <palves@redhat.com>
5651
5652 * tracepoint.c (expr_eval_result): Now an int.
5653
5654 2015-08-06 Pedro Alves <palves@redhat.com>
5655
5656 * gdbthread.h (struct regcache): Forward declare.
5657 (struct thread_info) <regcache_data>: Now a struct regcache
5658 pointer.
5659 * inferiors.c (inferior_regcache_data)
5660 (set_inferior_regcache_data): Now work with struct regcache
5661 pointers.
5662 * inferiors.h (struct regcache): Forward declare.
5663 (inferior_regcache_data, set_inferior_regcache_data): Now work
5664 with struct regcache pointers.
5665 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5666 (free_register_cache_thread): Remove struct regcache pointer
5667 casts.
5668
5669 2015-08-06 Pedro Alves <palves@redhat.com>
5670
5671 * server.c (captured_main): On error, print the exception message
5672 to stderr, and if run_once is set, throw a quit.
5673
5674 2015-08-06 Pedro Alves <palves@redhat.com>
5675
5676 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5677 the current thread.
5678
5679 2015-08-06 Pedro Alves <palves@redhat.com>
5680
5681 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5682 reading beyond the passed in buffer length.
5683
5684 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5685
5686 * tracepoint.c (symbol_list) <required>: Remove.
5687
5688 2015-08-06 Pedro Alves <palves@redhat.com>
5689
5690 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5691 count if stopping and suspending threads.
5692 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5693 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5694 (linux_detach): Complete an ongoing step-over.
5695 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5696 throughout.
5697 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5698 (linux_wait_1): If passing a signal to the inferior after
5699 finishing a step-over, unsuspend and re-resume all lwps. If we
5700 see a single-step event but the thread should be continuing, don't
5701 pass the trap to gdb.
5702 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5703 internal_error instead of gdb_assert.
5704 (enqueue_pending_signal): New function.
5705 (check_ptrace_stopped_lwp_gone): Add debug output.
5706 (start_step_over): Use internal_error instead of gdb_assert.
5707 (complete_ongoing_step_over): New function.
5708 (linux_resume_one_thread): Don't resume a suspended thread.
5709 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5710 it stepping.
5711
5712 2015-08-06 Pedro Alves <palves@redhat.com>
5713
5714 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5715 (linux_thread_alive): Use lwp_is_marked_dead.
5716 (extended_event_reported): Delete.
5717 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5718 instead of extended_event_reported.
5719 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5720 as well.
5721 (lwp_is_marked_dead): New function.
5722 (lwp_running): Use lwp_is_marked_dead.
5723 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5724 comment.
5725
5726 2015-08-06 Pedro Alves <palves@redhat.com>
5727
5728 * linux-low.c (linux_wait_1): Move fork event output out of the
5729 !report_to_gdb check. Pass event_child->waitstatus to
5730 target_waitstatus_to_string instead of ourstatus.
5731
5732 2015-08-04 Yao Qi <yao.qi@linaro.org>
5733
5734 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5735 if current_thread is 32 bit.
5736
5737 2015-08-04 Yao Qi <yao.qi@linaro.org>
5738
5739 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5740 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5741 * server.c (extended_protocol): Remove "static".
5742 * server.h (extended_protocol): Declare it.
5743
5744 2015-08-04 Yao Qi <yao.qi@linaro.org>
5745
5746 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5747 both aarch64 and aarch32.
5748 (aarch64_set_pc): Likewise.
5749
5750 2015-08-04 Yao Qi <yao.qi@linaro.org>
5751
5752 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5753 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5754 arm-with-neon.xml to srv_xmlfiles.
5755 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5756 (is_64bit_tdesc): New function.
5757 (aarch64_linux_read_description): New function.
5758 (aarch64_arch_setup): Call aarch64_linux_read_description.
5759 (regs_info): Rename to regs_info_aarch64.
5760 (aarch64_regs_info): Return right regs_info.
5761 (initialize_low_arch): Call initialize_low_arch_aarch32.
5762
5763 2015-08-04 Yao Qi <yao.qi@linaro.org>
5764
5765 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5766 * linux-aarch32-low.c: New file.
5767 * linux-aarch32-low.h: New file.
5768 * linux-arm-low.c (arm_fill_gregset): Move it to
5769 linux-aarch32-low.c.
5770 (arm_store_gregset): Likewise.
5771 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5772 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5773 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5774 (regs_info): Rename to regs_info_arm.
5775 (arm_regs_info): Return regs_info_aarch32 if
5776 have_ptrace_getregset is 1 and target description is
5777 arm_with_neon or arm_with_vfpv3.
5778 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5779 Call initialize_low_arch_aarch32 instead.
5780
5781 2015-08-04 Yao Qi <yao.qi@linaro.org>
5782
5783 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5784 * linux-low.c: ... here.
5785 * linux-low.h (have_ptrace_getregset): Declare it.
5786
5787 2015-08-04 Pedro Alves <palves@redhat.com>
5788
5789 * thread-db.c (struct thread_db): Use new typedefs.
5790 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5791 CHK calls.
5792 (disable_thread_event_reporting): Cast result of dlsym to
5793 destination function pointer type.
5794 (thread_db_mourn): Use td_ta_delete_ftype.
5795
5796 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5797
5798 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5799 arch variant.
5800 (CDX_BREAKPOINT): Define for R2.
5801 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5802 (the_low_target): Add comments.
5803
5804 2015-07-30 Yao Qi <yao.qi@linaro.org>
5805
5806 * linux-arm-low.c (arm_hwcap): Remove it.
5807 (arm_read_description): New local variable arm_hwcap. Don't
5808 set arm_hwcap to zero.
5809
5810 2015-07-30 Yao Qi <yao.qi@linaro.org>
5811
5812 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5813 Use regcache->tdesc instead.
5814 (arm_store_wmmxregset): Likewise.
5815 (arm_fill_vfpregset): Likewise.
5816 (arm_store_vfpregset): Likewise.
5817
5818 2015-07-30 Yao Qi <yao.qi@linaro.org>
5819
5820 * linux-arm-low.c: Include arch/arm.h.
5821 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5822 (arm_store_gregset): Likewise.
5823
5824 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5825
5826 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5827 ptrace's 4th parameter.
5828
5829 2015-07-27 Yao Qi <yao.qi@linaro.org>
5830
5831 * configure.srv (case aarch64*-*-linux*): Don't set
5832 srv_linux_usrregs.
5833
5834 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5835
5836 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5837 sys/ptrace.h.
5838 * linux-arm-low.c: Likewise.
5839 * linux-cris-low.c: Likewise.
5840 * linux-crisv32-low.c: Likewise.
5841 * linux-low.c: Likewise.
5842 * linux-m68k-low.c: Likewise.
5843 * linux-mips-low.c: Likewise.
5844 * linux-nios2-low.c: Likewise.
5845 * linux-s390-low.c: Likewise.
5846 * linux-sparc-low.c: Likewise.
5847 * linux-tic6x-low.c: Likewise.
5848 * linux-tile-low.c: Likewise.
5849 * linux-x86-low.c: Likewise.
5850
5851 2015-07-24 Pedro Alves <palves@redhat.com>
5852
5853 * config.in: Regenerate.
5854 * configure: Regenerate.
5855
5856 2015-07-24 Pedro Alves <palves@redhat.com>
5857
5858 * acinclude.m4: Include ../ptrace.m4.
5859 * configure.ac: Call GDB_AC_PTRACE.
5860 * config.in, configure: Regenerate.
5861
5862 2015-07-24 Yao Qi <yao.qi@linaro.org>
5863
5864 * linux-low.c (linux_create_inferior): Remove setting to
5865 proc->priv->new_inferior.
5866 (linux_attach): Likewise.
5867 (linux_low_filter_event): Likewise.
5868 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5869
5870 2015-07-24 Yao Qi <yao.qi@linaro.org>
5871
5872 * linux-low.c (linux_arch_setup): New function.
5873 (linux_low_filter_event): If proc->tdesc is NULL and
5874 proc->attached is true, call the_low_target.arch_setup.
5875 Otherwise, keep status pending, and return.
5876 (linux_resume_one_lwp_throw): Don't call get_pc if
5877 thread->while_stepping isn't NULL. Don't call
5878 get_thread_regcache if proc->tdesc is NULL.
5879 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5880 (linux_target_ops): Install arch_setup.
5881 * server.c (start_inferior): Call the_target->arch_setup.
5882 * target.h (struct target_ops) <arch_setup>: New field.
5883 (target_arch_setup): New marco.
5884 * lynx-low.c (lynx_target_ops): Update.
5885 * nto-low.c (nto_target_ops): Update.
5886 * spu-low.c (spu_target_ops): Update.
5887 * win32-low.c (win32_target_ops): Update.
5888
5889 2015-07-24 Yao Qi <yao.qi@linaro.org>
5890
5891 * linux-low.c (linux_add_process): Don't set
5892 proc->priv->new_inferior.
5893 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5894 (linux_attach): Likewise.
5895
5896 2015-07-24 Yao Qi <yao.qi@linaro.org>
5897
5898 * server.c (start_inferior): Code refactor.
5899
5900 2015-07-24 Yao Qi <yao.qi@linaro.org>
5901
5902 * server.c (process_serial_event): Set general_thread.
5903
5904 2015-07-21 Yao Qi <yao.qi@linaro.org>
5905
5906 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5907 aarch64_linux_get_debug_reg_capacity.
5908
5909 2015-07-17 Yao Qi <yao.qi@linaro.org>
5910
5911 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5912 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5913 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5914 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5915 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5916 (AARCH64_HWP_ALIGNMENT): Likewise.
5917 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5918 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5919 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5920 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5921 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5922 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5923 (struct aarch64_debug_reg_state): Likewise.
5924 (struct arch_lwp_info): Likewise.
5925 (aarch64_align_watchpoint): Likewise.
5926 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5927 (aarch64_watchpoint_length): Likewise.
5928 (aarch64_point_encode_ctrl_reg): Likewise
5929 (aarch64_point_is_aligned): Likewise.
5930 (aarch64_align_watchpoint): Likewise.
5931 (aarch64_linux_set_debug_regs):
5932 (aarch64_dr_state_insert_one_point): Likewise.
5933 (aarch64_dr_state_remove_one_point): Likewise.
5934 (aarch64_handle_breakpoint): Likewise.
5935 (aarch64_handle_aligned_watchpoint): Likewise.
5936 (aarch64_handle_unaligned_watchpoint): Likewise.
5937 (aarch64_handle_watchpoint): Likewise.
5938
5939 2015-07-17 Yao Qi <yao.qi@linaro.org>
5940
5941 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5942 and don't aarch64_get_debug_reg_state. All callers update.
5943 (aarch64_handle_aligned_watchpoint): Likewise.
5944 (aarch64_handle_unaligned_watchpoint): Likewise.
5945 (aarch64_handle_watchpoint): Likewise.
5946 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5947 (aarch64_remove_point): Likewise.
5948
5949 2015-07-17 Yao Qi <yao.qi@linaro.org>
5950
5951 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5952 debug_printf.
5953 (aarch64_handle_unaligned_watchpoint): Likewise.
5954
5955 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5956
5957 Revert the previous 3 commits:
5958 Move gdb_regex* to common/
5959 Move linux_find_memory_regions_full & co.
5960 gdbserver build-id attribute generator
5961
5962 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5963 Jan Kratochvil <jan.kratochvil@redhat.com>
5964
5965 gdbserver build-id attribute generator.
5966 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5967 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5968 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5969 (find_phdr): New.
5970 (get_dynamic): Use find_pdhr to traverse program headers.
5971 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5972 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5973 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5974 (get_hex_build_id): New.
5975 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5976 to reply XML document.
5977
5978 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5979 Jan Kratochvil <jan.kratochvil@redhat.com>
5980
5981 * target.c: Include target/target-utils.h and fcntl.h.
5982 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5983 (target_fileio_read_stralloc): New functions.
5984
5985 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5986
5987 * Makefile.in (OBS): Add gdb_regex.o.
5988 (gdb_regex.o): New.
5989 * config.in: Rebuilt.
5990 * configure: Rebuilt.
5991
5992 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5993 Jan Kratochvil <jan.kratochvil@redhat.com>
5994
5995 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5996 * Makefile.in (OBS): Add target-utils.o.
5997 (linux-maps.o, target-utils.o): New.
5998 * configure.srv (srv_linux_obj): Add linux-maps.o.
5999
6000 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6001
6002 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6003 function, return 1.
6004 (the_low_target): Install it.
6005
6006 2015-07-14 Pedro Alves <palves@redhat.com>
6007
6008 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6009 Instead, ignore ECHILD, and throw an error for other errnos.
6010
6011 2015-07-10 Pedro Alves <palves@redhat.com>
6012
6013 * event-loop.c (struct callback_event) <data>: Change type to
6014 gdb_client_data instance instead of gdb_client_data pointer.
6015 (append_callback_event): Adjust.
6016
6017 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6018
6019 * linux-aarch64-low.c: Add comments for each linux_target_ops
6020 method. Remove comments already covered in target_ops and
6021 linux_target_ops definitions.
6022 (the_low_target): Add comments for each unimplemented method.
6023
6024 2015-07-09 Yao Qi <yao.qi@linaro.org>
6025
6026 * linux-aarch64-low.c (aarch64_regmap): Remove.
6027 (aarch64_usrregs_info): Remove.
6028 (regs_info): Set field usrregs to NULL.
6029
6030 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6031
6032 * linux-low.c: Include "rsp-low.h"
6033 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6034 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6035 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6036 (handle_btrace_enable_pt): New.
6037 (handle_btrace_general_set): Support "pt".
6038 (handle_btrace_conf_general_set): Support "pt:size".
6039
6040 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6041
6042 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6043 Z_PACKET_SW_BP.
6044
6045 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6046
6047 * linux-aarch64-low.c: Remove comment about endianness.
6048 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6049 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6050 memcmp.
6051
6052 2015-06-24 Gary Benson <gbenson@redhat.com>
6053
6054 * linux-i386-ipa.c (stdint.h): Do not include.
6055 * lynx-i386-low.c (stdint.h): Likewise.
6056 * lynx-ppc-low.c (stdint.h): Likewise.
6057 * mem-break.c (stdint.h): Likewise.
6058 * thread-db.c (stdint.h): Likewise.
6059 * tracepoint.c (stdint.h): Likewise.
6060 * win32-low.c (stdint.h): Likewise.
6061
6062 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6063
6064 * server.c (write_qxfer_response): Update call to
6065 remote_escape_output.
6066
6067 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6068 Jan Kratochvil <jan.kratochvil@redhat.com>
6069
6070 Merge multiple hex conversions.
6071 * gdbreplay.c (tohex): Rename to 'fromhex'.
6072 (logchar): Use fromhex.
6073
6074 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6075
6076 * server.c (handle_qxfer_libraries): Set `version' attribute for
6077 <library-list>.
6078
6079 2015-06-10 Gary Benson <gbenson@redhat.com>
6080
6081 * target.h (struct target_ops) <multifs_open>: New field.
6082 <multifs_unlink>: Likewise.
6083 <multifs_readlink>: Likewise.
6084 * linux-low.c (nat/linux-namespaces.h): New include.
6085 (linux_target_ops): Initialize the_target->multifs_open,
6086 the_target->multifs_unlink and the_target->multifs_readlink.
6087 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6088 * hostio.c (hostio_fs_pid): New static variable.
6089 (hostio_handle_new_gdb_connection): New function.
6090 (handle_setfs): Likewise.
6091 (handle_open): Use the_target->multifs_open as appropriate.
6092 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6093 (handle_readlink): Use the_target->multifs_readlink as
6094 appropriate.
6095 (handle_vFile): Handle vFile:setfs packets.
6096 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6097 after target_handle_new_gdb_connection.
6098
6099 2015-06-10 Gary Benson <gbenson@redhat.com>
6100
6101 * configure.ac (AC_CHECK_FUNCS): Add setns.
6102 * config.in: Regenerate.
6103 * configure: Likewise.
6104 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6105 (linux-namespaces.o): New rule.
6106 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6107
6108 2015-06-09 Gary Benson <gbenson@redhat.com>
6109
6110 * hostio.c (handle_open): Process mode argument with
6111 fileio_to_host_mode.
6112
6113 2015-06-01 Yao Qi <yao.qi@linaro.org>
6114
6115 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6116 * linux-x86-low.c: Likewise.
6117
6118 2015-05-28 Don Breazeal <donb@codesourcery.com>
6119
6120 * linux-low.c (handle_extended_wait): Initialize
6121 thread_info.last_resume_kind for new fork children.
6122
6123 2015-05-15 Pedro Alves <palves@redhat.com>
6124
6125 * target.h (target_handle_new_gdb_connection): Rewrite using if
6126 wrapped in do/while.
6127
6128 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6129
6130 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6131 * configure, config.in: Regenerate.
6132 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6133 Declare typedef.
6134
6135 2015-05-12 Don Breazeal <donb@codesourcery.com>
6136
6137 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6138 PTRACE_EVENT_VFORK_DONE.
6139 (linux_low_ptrace_options, extended_event_reported): Add vfork
6140 events.
6141 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6142 and "vforkdone" for RSP 'T' Stop Reply Packet.
6143 * server.h (report_vfork_events): Declare
6144 global variable.
6145
6146 2015-05-12 Don Breazeal <donb@codesourcery.com>
6147
6148 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6149 (the_low_target) <new_fork>: Initialize new member.
6150 * linux-arm-low.c (arm_new_fork): New function.
6151 (the_low_target) <new_fork>: Initialize new member.
6152 * linux-low.c (handle_extended_wait): Call new target function
6153 new_fork.
6154 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6155 * linux-mips-low.c (mips_add_watchpoint): New function
6156 extracted from mips_insert_point.
6157 (the_low_target) <new_fork>: Initialize new member.
6158 (mips_linux_new_fork): New function.
6159 (mips_insert_point): Call mips_add_watchpoint.
6160 * linux-x86-low.c (x86_linux_new_fork): New function.
6161 (the_low_target) <new_fork>: Initialize new member.
6162
6163 2015-05-12 Don Breazeal <donb@codesourcery.com>
6164
6165 * linux-low.c (handle_extended_wait): Implement return value,
6166 rename argument 'event_child' to 'event_lwp', handle
6167 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6168 (linux_low_ptrace_options): New function.
6169 (linux_low_filter_event): Call linux_low_ptrace_options,
6170 use different argument fo linux_enable_event_reporting,
6171 use return value from handle_extended_wait.
6172 (extended_event_reported): New function.
6173 (linux_wait_1): Call extended_event_reported and set
6174 status to report fork events.
6175 (linux_write_memory): Add pid to debug message.
6176 (reset_lwp_ptrace_options_callback): New function.
6177 (linux_handle_new_gdb_connection): New function.
6178 (linux_target_ops): Initialize new structure member.
6179 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6180 * lynx-low.c: Initialize new structure member.
6181 * remote-utils.c (prepare_resume_reply): Implement stop reason
6182 "fork" for "T" stop message.
6183 * server.c (handle_query): Call handle_new_gdb_connection.
6184 * server.h (report_fork_events): Declare global flag.
6185 * target.h (struct target_ops) <handle_new_gdb_connection>:
6186 New member.
6187 (target_handle_new_gdb_connection): New macro.
6188 * win32-low.c: Initialize new structure member.
6189
6190 2015-05-12 Don Breazeal <donb@codesourcery.com>
6191
6192 * mem-break.c (APPEND_TO_LIST): Define macro.
6193 (clone_agent_expr): New function.
6194 (clone_one_breakpoint): New function.
6195 (clone_all_breakpoints): New function.
6196 * mem-break.h: Declare new functions.
6197
6198 2015-05-12 Don Breazeal <donb@codesourcery.com>
6199
6200 * linux-low.c (linux_supports_fork_events): New function.
6201 (linux_supports_vfork_events): New function.
6202 (linux_target_ops): Initialize new structure members.
6203 (initialize_low): Call linux_check_ptrace_features.
6204 * lynx-low.c (lynx_target_ops): Initialize new structure
6205 members.
6206 * server.c (report_fork_events, report_vfork_events):
6207 New global flags.
6208 (handle_query): Add new features to qSupported packet and
6209 response.
6210 (captured_main): Initialize new global variables.
6211 * target.h (struct target_ops) <supports_fork_events>:
6212 New member.
6213 <supports_vfork_events>: New member.
6214 (target_supports_fork_events): New macro.
6215 (target_supports_vfork_events): New macro.
6216 * win32-low.c (win32_target_ops): Initialize new structure
6217 members.
6218
6219 2015-05-12 Gary Benson <gbenson@redhat.com>
6220
6221 * server.c (handle_qxfer_exec_file): Use current process
6222 if annex is empty.
6223
6224 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6225
6226 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6227 Remove HAVE_PTRACE_GETREGS conditionals.
6228 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6229 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6230
6231 2015-05-08 Yao Qi <yao.qi@linaro.org>
6232
6233 * linux-low.c (linux_supports_conditional_breakpoints): New
6234 function.
6235 (linux_target_ops): Install new target method.
6236 * lynx-low.c (lynx_target_ops): Install NULL hook for
6237 supports_conditional_breakpoints.
6238 * nto-low.c (nto_target_ops): Likewise.
6239 * spu-low.c (spu_target_ops): Likewise.
6240 * win32-low.c (win32_target_ops): Likewise.
6241 * server.c (handle_query): Check
6242 target_supports_conditional_breakpoints.
6243 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6244 New field.
6245 (target_supports_conditional_breakpoints): New macro.
6246
6247 2015-05-06 Pedro Alves <palves@redhat.com>
6248
6249 PR server/18081
6250 * server.c (start_inferior): If the process exits, mourn it.
6251
6252 2015-04-21 Gary Benson <gbenson@redhat.com>
6253
6254 * hostio.c (fileio_open_flags_to_host): Factored out to
6255 fileio_to_host_openflags in common/fileio.c. Single use
6256 updated.
6257
6258 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6259
6260 * linux-xtensa-low.c (xtensa_fill_gregset)
6261 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6262 XCHAL_HAVE_LOOP.
6263
6264 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6265
6266 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6267 (regs_info): Replace usrregs pointer with NULL.
6268
6269 2015-04-17 Gary Benson <gbenson@redhat.com>
6270
6271 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6272 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6273 * server.c (handle_qxfer_exec_file): New function.
6274 (qxfer_packets): Add exec-file entry.
6275 (handle_query): Report qXfer:exec-file:read as supported packet.
6276
6277 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6278
6279 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6280
6281 2015-04-09 Gary Benson <gbenson@redhat.com>
6282
6283 * hostio-errno.c (errno_to_fileio_error): Remove function.
6284 Update caller to use remote_fileio_to_fio_error.
6285
6286 2015-04-09 Yao Qi <yao.qi@linaro.org>
6287
6288 * linux-low.c (linux_insert_point): Call
6289 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6290 (linux_remove_point): Call remove_memory_breakpoint if type is
6291 raw_bkpt_type_sw.
6292 * linux-x86-low.c (x86_insert_point): Don't call
6293 insert_memory_breakpoint.
6294 (x86_remove_point): Don't call remove_memory_breakpoint.
6295
6296 2015-04-01 Pedro Alves <palves@redhat.com>
6297 Cleber Rosa <crosa@redhat.com>
6298
6299 * server.c (gdbserver_usage): Reorganize and extend the usage
6300 message.
6301
6302 2015-03-24 Pedro Alves <palves@redhat.com>
6303
6304 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6305 output. Also dump TRAP_TRACE.
6306 (linux_low_filter_event): In debug output, distinguish a
6307 resume_stop SIGSTOP from a delayed SIGSTOP.
6308
6309 2015-03-24 Gary Benson <gbenson@redhat.com>
6310
6311 * linux-x86-low.c (x86_linux_new_thread): Moved to
6312 nat/x86-linux.c.
6313 (x86_linux_prepare_to_resume): Likewise.
6314
6315 2015-03-24 Gary Benson <gbenson@redhat.com>
6316
6317 * Makefile.in (x86-linux-dregs.o): New rule.
6318 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6319 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6320 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6321 (x86_linux_dr_get): Likewise.
6322 (x86_linux_dr_set): Likewise.
6323 (update_debug_registers_callback): Likewise.
6324 (x86_linux_dr_set_addr): Likewise.
6325 (x86_linux_dr_get_addr): Likewise.
6326 (x86_linux_dr_set_control): Likewise.
6327 (x86_linux_dr_get_control): Likewise.
6328 (x86_linux_dr_get_status): Likewise.
6329 (x86_linux_update_debug_registers): Likewise.
6330
6331 2015-03-24 Gary Benson <gbenson@redhat.com>
6332
6333 * linux-x86-low.c (x86_linux_update_debug_registers):
6334 New function, factored out from...
6335 (x86_linux_prepare_to_resume): ...this.
6336
6337 2015-03-24 Gary Benson <gbenson@redhat.com>
6338
6339 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6340 (x86_linux_dr_set): Likewise.
6341 (update_debug_registers_callback): Likewise.
6342 (x86_linux_dr_set_addr): Likewise.
6343 (x86_linux_dr_get_addr): Likewise.
6344 (x86_linux_dr_set_control): Likewise.
6345 (x86_linux_dr_get_control): Likewise.
6346 (x86_linux_dr_get_status): Likewise.
6347 (x86_linux_prepare_to_resume): Likewise.
6348
6349 2015-03-24 Gary Benson <gbenson@redhat.com>
6350
6351 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6352 Use perror_with_name. Pass string through gettext.
6353 (x86_linux_dr_set): Likewise.
6354
6355 2015-03-24 Gary Benson <gbenson@redhat.com>
6356
6357 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6358 (x86_linux_dr_set_addr): ...this.
6359 (x86_dr_low_get_addr): Rename to...
6360 (x86_linux_dr_get_addr): ...this.
6361 (x86_dr_low_set_control): Rename to...
6362 (x86_linux_dr_set_control): ...this.
6363 (x86_dr_low_get_control): Rename to...
6364 (x86_linux_dr_get_control): ...this.
6365 (x86_dr_low_get_status): Rename to...
6366 (x86_linux_dr_get_status): ...this.
6367 (x86_dr_low): Update with new function names.
6368
6369 2015-03-24 Gary Benson <gbenson@redhat.com>
6370
6371 * Makefile.in (x86-linux.o): New rule.
6372 * configure.srv: Add x86-linux.o to relevant targets.
6373 * linux-low.c (lwp_set_arch_private_info): New function.
6374 (lwp_arch_private_info): Likewise.
6375 * linux-x86-low.c: Include nat/x86-linux.h.
6376 (arch_lwp_info): Removed structure.
6377 (update_debug_registers_callback):
6378 Use lwp_set_debug_registers_changed.
6379 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6380 and lwp_set_debug_registers_changed.
6381 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6382
6383 2015-03-24 Gary Benson <gbenson@redhat.com>
6384
6385 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6386 * linux-arm-low.c (arm_new_thread): Likewise.
6387 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6388 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6389 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6390 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6391
6392 2015-03-24 Gary Benson <gbenson@redhat.com>
6393
6394 * linux-low.c (ptid_of_lwp): New function.
6395 (lwp_is_stopped): Likewise.
6396 (lwp_stop_reason): Likewise.
6397 * linux-x86-low.c (update_debug_registers_callback):
6398 Use lwp_is_stopped.
6399 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6400 lwp_stop_reason.
6401
6402 2015-03-24 Gary Benson <gbenson@redhat.com>
6403
6404 * linux-low.h (linux_stop_lwp): Remove declaration.
6405
6406 2015-03-24 Gary Benson <gbenson@redhat.com>
6407
6408 * linux-low.h: Include nat/linux-nat.h.
6409 * linux-low.c (iterate_over_lwps_args): New structure.
6410 (iterate_over_lwps_filter): New function.
6411 (iterate_over_lwps): Likewise.
6412 * linux-x86-low.c (update_debug_registers_callback):
6413 Update signature to what iterate_over_lwps expects.
6414 Remove PID check that iterate_over_lwps now performs.
6415 (x86_dr_low_set_addr): Use iterate_over_lwps.
6416 (x86_dr_low_set_control): Likewise.
6417
6418 2015-03-24 Gary Benson <gbenson@redhat.com>
6419
6420 * linux-x86-low.c (x86_debug_reg_state): New function.
6421 (x86_linux_prepare_to_resume): Use the above.
6422
6423 2015-03-24 Gary Benson <gbenson@redhat.com>
6424
6425 * linux-low.c (current_lwp_ptid): New function.
6426 * linux-x86-low.c: Include nat/linux-nat.h.
6427 (x86_dr_low_get_addr): Use current_lwp_ptid.
6428 (x86_dr_low_get_control): Likewise.
6429 (x86_dr_low_get_status): Likewise.
6430
6431 2015-03-20 Pedro Alves <palves@redhat.com>
6432
6433 * tracepoint.c (cmd_qtstatus): Make "str" const.
6434
6435 2015-03-20 Pedro Alves <palves@redhat.com>
6436
6437 * server.c (handle_general_set): Make "req_str" const.
6438
6439 2015-03-19 Pedro Alves <palves@redhat.com>
6440
6441 * linux-low.c (linux_resume_one_lwp): Rename to ...
6442 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6443 instead call perror_with_name.
6444 (check_ptrace_stopped_lwp_gone): New function.
6445 (linux_resume_one_lwp): Reimplement as wrapper around
6446 linux_resume_one_lwp_throw that swallows errors if the LWP is
6447 gone.
6448
6449 2015-03-19 Pedro Alves <palves@redhat.com>
6450
6451 * linux-low.c (count_events_callback, select_event_lwp_callback):
6452 No longer check whether the thread has resume_stop as last resume
6453 kind.
6454
6455 2015-03-19 Pedro Alves <palves@redhat.com>
6456
6457 * linux-low.c (count_events_callback, select_event_lwp_callback):
6458 Use the lwp's status_pending_p field, not the thread's.
6459
6460 2015-03-19 Pedro Alves <palves@redhat.com>
6461
6462 * linux-low.c (select_event_lwp_callback): Update comments to
6463 no longer mention SIGTRAP.
6464
6465 2015-03-18 Gary Benson <gbenson@redhat.com>
6466
6467 * server.c (handle_query): Do not report vFile:fstat as supported.
6468
6469 2015-03-11 Gary Benson <gbenson@redhat.com>
6470
6471 * hostio.c (sys/types.h): New include.
6472 (sys/stat.h): Likewise.
6473 (common-remote-fileio.h): Likewise.
6474 (handle_fstat): New function.
6475 (handle_vFile): Handle vFile:fstat packets.
6476
6477 2015-03-11 Gary Benson <gbenson@redhat.com>
6478
6479 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6480 struct stat.st_blocks and struct stat.st_blksize.
6481 * configure: Regenerate.
6482 * config.in: Likewise.
6483 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6484 (OBS): Add common-remote-fileio.o.
6485 (common-remote-fileio.o): New rule.
6486
6487 2015-03-09 Pedro Alves <palves@redhat.com>
6488
6489 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6490 'struct sockaddr' pointer in 'accept' call.
6491
6492 2015-03-09 Pedro Alves <palves@redhat.com>
6493
6494 Revert:
6495 2015-03-07 Pedro Alves <palves@redhat.com>
6496 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6497 or <winsock2.h> here. Instead include "gdb_socket.h".
6498 (remote_open): Use union gdb_sockaddr_u.
6499 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6500 or <winsock2.h> here. Instead include "gdb_socket.h".
6501 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6502 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6503 or <sys/un.h>.
6504 (init_named_socket, gdb_agent_helper_thread): Use union
6505 gdb_sockaddr_u.
6506
6507 2015-03-07 Pedro Alves <palves@redhat.com>
6508
6509 * configure.ac (build_warnings): Move
6510 -Wdeclaration-after-statement to the C-specific set.
6511 * configure: Regenerate.
6512
6513 2015-03-07 Pedro Alves <palves@redhat.com>
6514
6515 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6516 or <winsock2.h> here. Instead include "gdb_socket.h".
6517 (remote_open): Use union gdb_sockaddr_u.
6518 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6519 or <winsock2.h> here. Instead include "gdb_socket.h".
6520 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6521 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6522 or <sys/un.h>.
6523 (init_named_socket, gdb_agent_helper_thread): Use union
6524 gdb_sockaddr_u.
6525
6526 2015-03-07 Pedro Alves <palves@redhat.com>
6527
6528 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6529 instead.
6530
6531 2015-03-06 Yao Qi <yao.qi@linaro.org>
6532
6533 * linux-aarch64-low.c (aarch64_insert_point): Use
6534 show_debug_regs as a boolean.
6535 (aarch64_remove_point): Likewise.
6536
6537 2015-03-05 Pedro Alves <palves@redhat.com>
6538
6539 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6540 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6541 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6542 * nto-low.c (nto_target_ops): Likewise.
6543 * spu-low.c (spu_target_ops): Likewise.
6544 * win32-low.c (win32_target_ops): Likewise.
6545
6546 2015-03-04 Pedro Alves <palves@redhat.com>
6547
6548 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6549 Decide whether a breakpoint triggered based on the SIGTRAP's
6550 siginfo.si_code.
6551 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6552 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6553 (linux_low_filter_event): Check for breakpoints before checking
6554 watchpoints.
6555 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6556 siginfo.si_code.
6557 (linux_stopped_by_sw_breakpoint)
6558 (linux_supports_stopped_by_sw_breakpoint)
6559 (linux_stopped_by_hw_breakpoint)
6560 (linux_supports_stopped_by_hw_breakpoint): New functions.
6561 (linux_target_ops): Install new target methods.
6562
6563 2015-03-04 Pedro Alves <palves@redhat.com>
6564
6565 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6566 * server.c (swbreak_feature, hwbreak_feature): New globals.
6567 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6568 (captured_main): Clear swbreak_feature and hwbreak_feature.
6569 * server.h (swbreak_feature, hwbreak_feature): Declare.
6570 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6571 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6572 supports_stopped_by_hw_breakpoint>: New fields.
6573 (target_supports_stopped_by_sw_breakpoint)
6574 (target_stopped_by_sw_breakpoint)
6575 (target_supports_stopped_by_hw_breakpoint)
6576 (target_stopped_by_hw_breakpoint): Declare.
6577
6578 2015-03-04 Pedro Alves <palves@redhat.com>
6579
6580 enum lwp_stop_reason -> enum target_stop_reason
6581 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6582 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6583 (linux_wait_1, stuck_in_jump_pad_callback)
6584 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6585 (linux_stopped_by_watchpoint):
6586 * linux-low.h (enum lwp_stop_reason): Delete.
6587 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6588 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6589
6590 2015-03-04 Yao Qi <yao.qi@linaro.org>
6591
6592 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6593
6594 2015-03-03 Gary Benson <gbenson@redhat.com>
6595
6596 * hostio.c (handle_vFile): Fix prefix lengths.
6597
6598 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6599
6600 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6601 ptr_bits.
6602
6603 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6604
6605 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6606 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6607 (clean): Add "rm -f" for above C files.
6608 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6609 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6610 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6611 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6612 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6613 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6614 (init_registers_s390x_vx_linux64)
6615 (init_registers_s390x_tevx_linux64)
6616 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6617 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6618 declarations.
6619 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6620 (s390_store_vxrs_high): New functions.
6621 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6622 NT_S390_VXRS_HIGH.
6623 (s390_arch_setup): Add logic for selecting one of the new target
6624 descriptions. Activate the new vector regsets if applicable.
6625 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6626 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6627 and init_registers_s390x_tevx_linux64.
6628
6629 2015-03-01 Pedro Alves <palves@redhat.com>
6630
6631 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6632 parameter.
6633
6634 2015-02-27 Pedro Alves <palves@redhat.com>
6635
6636 * linux-x86-low.c (u_debugreg_offset): New function.
6637 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6638
6639 2015-02-27 Pedro Alves <palves@redhat.com>
6640
6641 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6642 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6643 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6644 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6645 (ps_lsetfpregs, ps_getpid)
6646 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6647 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6648 (ps_lsetxregs, ps_plog): Declare.
6649
6650 2015-02-27 Pedro Alves <palves@redhat.com>
6651
6652 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6653 IP_AGENT_EXPORT_FUNC.
6654 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6655 IP_AGENT_EXPORT_FUNC.
6656 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6657 (IP_AGENT_EXPORT): Delete.
6658 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6659 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6660 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6661 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6662 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6663 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6664 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6665 (traceframe_read_count, traceframe_write_count)
6666 (traceframes_created, trace_state_variables, get_raw_reg)
6667 (get_trace_state_variable_value, set_trace_state_variable_value)
6668 (ust_loaded, helper_thread_id, cmd_buf): Use
6669 IPA_SYM_EXPORTED_NAME.
6670 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6671 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6672 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6673 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6674 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6675 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6676 EXTERN_C_PUSH/EXTERN_C_POP.
6677 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6678 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6679 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6680 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6681 (traceframe_write_count, traceframe_read_count)
6682 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6683 (about_to_request_buffer_space, get_trace_state_variable_value)
6684 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6685 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6686 EXTERN_C_PUSH/EXTERN_C_POP.
6687 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6688 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6689 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6690 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6691 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6692 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6693 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6694 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6695 Define.
6696 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6697 (IP_AGENT_EXPORT_VAR_DECL): Define.
6698 (tracing): Declare.
6699 (gdb_agent_get_raw_reg): Declare.
6700
6701 2015-02-27 Tom Tromey <tromey@redhat.com>
6702 Pedro Alves <palves@redhat.com>
6703
6704 Rename symbols whose names are reserved C++ keywords throughout.
6705
6706 2015-02-27 Pedro Alves <palves@redhat.com>
6707
6708 * Makefile.in (COMPILER): New, get it from autoconf.
6709 (CXX): Get from autoconf instead.
6710 (COMPILE.pre): Use COMPILER.
6711 (CC-LD): Rename to ...
6712 (CC_LD): ... this. Use COMPILER.
6713 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6714 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6715 * acinclude.m4: Include build-with-cxx.m4.
6716 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6717 Disable -Werror by default if building in C++ mode.
6718 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6719 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6720 the C++ compiler. Save/restore CXXFLAGS too.
6721 * configure: Regenerate.
6722
6723 2015-02-27 Pedro Alves <palves@redhat.com>
6724
6725 * acinclude.m4: Include libiberty.m4.
6726 * configure.ac: Call libiberty_INIT.
6727 * config.in, configure: Regenerate.
6728
6729 2015-02-26 Pedro Alves <palves@redhat.com>
6730
6731 * linux-low.c (linux_wait_1): When incrementing the PC past a
6732 program breakpoint always use the_low_target.breakpoint_len as
6733 increment, rather than the maximum between that and
6734 the_low_target.decr_pc_after_break.
6735
6736 2015-02-23 Pedro Alves <palves@redhat.com>
6737
6738 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6739 thread was doing a step-over; always adjust the PC if
6740 we stepped over a permanent breakpoint.
6741 (linux_wait_1): If we stepped over breakpoint that was on top of a
6742 permanent breakpoint, manually advance the PC past it.
6743
6744 2015-02-23 Pedro Alves <palves@redhat.com>
6745
6746 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6747 modes.
6748 (x86_fill_gregset, x86_store_gregset): Use it when handling
6749 $orig_eax.
6750
6751 2015-02-20 Pedro Alves <palves@redhat.com>
6752
6753 * thread-db.c: Include "nat/linux-procfs.h".
6754 (thread_db_init): Skip listing new threads if the kernel supports
6755 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6756
6757 2015-02-20 Pedro Alves <palves@redhat.com>
6758
6759 * linux-low.c (status_pending_p_callback): Use ptid_match.
6760
6761 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6762
6763 PR breakpoints/16812
6764 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6765 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6766 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6767
6768 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6769
6770 PR breakpoints/15956
6771 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6772
6773 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6774
6775 * linux-low.c (linux_low_btrace_conf): Print size.
6776 * server.c (handle_btrace_conf_general_set): New.
6777 (hanle_general_set): Call handle_btrace_conf_general_set.
6778 (handle_query): Report Qbtrace-conf:bts:size as supported.
6779
6780 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6781
6782 * linux-low.c (linux_low_enable_btrace): Update parameters.
6783 (linux_low_btrace_conf): New.
6784 (linux_target_ops)<to_btrace_conf>: Initialize.
6785 * server.c (current_btrace_conf): New.
6786 (handle_btrace_enable): Rename to ...
6787 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6788 to target_enable_btrace. Update comment. Update users.
6789 (handle_qxfer_btrace_conf): New.
6790 (qxfer_packets): Add btrace-conf entry.
6791 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6792 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6793 (target_ops)<read_btrace_conf>: New.
6794 (target_enable_btrace): Update parameters.
6795 (target_read_btrace_conf): New.
6796
6797 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6798
6799 * server.c (handle_btrace_general_set): Remove call to
6800 target_supports_btrace.
6801 (supported_btrace_packets): New.
6802 (handle_query): Call supported_btrace_packets.
6803 * target.h: include btrace-common.h.
6804 (btrace_target_info): Removed.
6805 (supports_btrace, target_supports_btrace): Update parameters.
6806
6807 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6808
6809 * Makefile.in (SFILES): Add common/btrace-common.c.
6810 (OBS): Add common/btrace-common.o.
6811 (btrace-common.o): Add build rules.
6812 * linux-low: Include btrace-common.h.
6813 (linux_low_read_btrace): Use struct btrace_data. Call
6814 btrace_data_init and btrace_data_fini.
6815
6816 2015-02-06 Pedro Alves <palves@redhat.com>
6817
6818 * thread-db.c (find_new_threads_callback): Add debug output.
6819
6820 2015-02-04 Pedro Alves <palves@redhat.com>
6821
6822 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6823 (resume_stopped_resumed_lwps): New function.
6824 (linux_wait_for_event_filtered): Use it.
6825
6826 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6827
6828 * Makefile.in (SFILES): Add linux-personality.c.
6829 (linux-personality.o): New rule.
6830 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6831 list of objects to be built.
6832 * linux-low.c: Include nat/linux-personality.h.
6833 (linux_create_inferior): Remove code to disable address space
6834 randomization (moved to ../nat/linux-personality.c). Create
6835 cleanup to disable address space randomization.
6836
6837 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6838
6839 * Makefile.in (posix-strerror.o): New rule.
6840 (mingw-strerror.o): Likewise.
6841 * configure: Regenerated.
6842 * configure.ac: Source file ../common/common.host. Initialize new
6843 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6844
6845 2015-01-14 Yao Qi <yao@codesourcery.com>
6846
6847 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6848 (ppc-linux.o): New rule.
6849 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6850 * configure.ac: AC_CHECK_FUNCS(getauxval).
6851 * config.in: Re-generated.
6852 * configure: Re-generated.
6853 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6854 ppc64_64bit_inferior_p
6855
6856 2015-01-14 Yao Qi <yao@codesourcery.com>
6857
6858 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6859 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6860 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6861 (PT_ORIG_R3, PT_TRAP): Likewise.
6862 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6863 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6864 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6865
6866 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6867
6868 * i387-fp.c (i387_cache_to_xsave): In look over
6869 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6870 zmmh_low_space field by use of zmmh_high_space.
6871
6872 2015-01-09 Pedro Alves <palves@redhat.com>
6873
6874 * linux-low.c (step_over_bkpt): Move higher up in the file.
6875 (handle_extended_wait): Don't store the stop_pc here.
6876 (get_stop_pc): Adjust comments and rename to ...
6877 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6878 stopped for a software breakpoint or hardware breakpoint.
6879 (thread_still_has_status_pending_p): New function.
6880 (status_pending_p_callback): Use
6881 thread_still_has_status_pending_p. If the event is no longer
6882 interesting, resume the LWP.
6883 (handle_tracepoints): Add assert.
6884 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6885 (wstatus_maybe_breakpoint): New function.
6886 (cancel_breakpoint): Delete function.
6887 (check_stopped_by_watchpoint): New function, factored out from
6888 linux_low_filter_event.
6889 (lp_status_maybe_breakpoint): Delete function.
6890 (linux_low_filter_event): Remove filter_ptid argument.
6891 Leave thread group exits pending here. Store the LWP's stop PC.
6892 Always leave events pending.
6893 (linux_wait_for_event_filtered): Pull all events out of the
6894 kernel, and leave them all pending.
6895 (count_events_callback, select_event_lwp_callback): Consider all
6896 events.
6897 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6898 (select_event_lwp): Only give preference to the stepping LWP in
6899 all-stop mode. Adjust comments.
6900 (ignore_event): New function.
6901 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6902 references to cancel_breakpoints. Adjust to renames. Also give
6903 equal priority to all LWPs that have had events in non-stop mode.
6904 If reporting a software breakpoint event, unadjust the LWP's PC.
6905 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6906 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6907 Adjust.
6908 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6909 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6910 (linux_stopped_by_watchpoint): Adjust.
6911 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6912 * linux-low.h (enum lwp_stop_reason): New.
6913 (struct lwp_info) <stop_pc>: Adjust comment.
6914 <stopped_by_watchpoint>: Delete field.
6915 <stop_reason>: New field.
6916 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6917 * mem-break.c (software_breakpoint_inserted_here)
6918 (hardware_breakpoint_inserted_here): New function.
6919 * mem-break.h (software_breakpoint_inserted_here)
6920 (hardware_breakpoint_inserted_here): Declare.
6921 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6922 (cancel_breakpoints): Delete.
6923 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6924 (upload_fast_traceframes): Remove references to
6925 cancel_breakpoints.
6926
6927 2015-01-09 Pedro Alves <palves@redhat.com>
6928
6929 * thread-db.c (find_new_threads_callback): Ignore thread if the
6930 kernel thread ID is -1.
6931
6932 2015-01-09 Pedro Alves <palves@redhat.com>
6933
6934 * linux-low.c (linux_attach_fail_reason_string): Move to
6935 nat/linux-ptrace.c, and rename.
6936 (linux_attach_lwp): Update comment.
6937 (attach_proc_task_lwp_callback): New function.
6938 (linux_attach): Adjust to rename and use
6939 linux_proc_attach_tgid_threads.
6940 (linux_attach_fail_reason_string): Delete declaration.
6941
6942 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6943
6944 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6945 * server.c (gdbserver_version): Likewise.
6946
6947 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6948
6949 * remote-utils.c: Include ctype.h.
6950 (input_interrupt): Explicitly handle the case when the char
6951 received is the NUL byte. Improve the printing of non-ASCII
6952 characters.
6953
6954 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6955
6956 * linux-low.c (linux_low_filter_event): Update call to
6957 linux_enable_event_reporting following the addition of
6958 a new parameter to that function.
6959
6960 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6961
6962 PR server/17457
6963 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6964 (AARCH64_FPCR_REGNO): Likewise.
6965 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6966 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6967 (aarch64_store_fpregset): Likewise.
6968
6969 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6970
6971 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6972 Remove FIXME comment about assumption about N.
6973
6974 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6975
6976 * configure.ac: If large-file support is disabled in GDBserver,
6977 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6978 * configure: Regenerate.
6979
6980 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6981
6982 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6983 warning upon ENODATA from ptrace.
6984 * linux-s390-low.c (s390_store_tdb): New.
6985 (s390_regsets): Add regset for NT_S390_TDB.
6986
6987 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6988
6989 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6990 without a fill_function.
6991 * linux-s390-low.c (s390_fill_last_break): Remove.
6992 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6993 (s390_arch_setup): Use regset's size instead of fill_function for
6994 loop end condition.
6995
6996 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6997
6998 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6999 the regset's store function when ptrace returned an error.
7000 * regcache.c (get_thread_regcache): Invalidate register cache
7001 before fetching inferior's registers.
7002
7003 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7004
7005 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7006 while-loop as for-loop.
7007 (regsets_store_inferior_registers): Likewise.
7008
7009 2014-11-28 Yao Qi <yao@codesourcery.com>
7010
7011 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7012 * config.in, configure: Re-generate.
7013 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7014 is defined.
7015
7016 2014-11-21 Yao Qi <yao@codesourcery.com>
7017
7018 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7019 (AC_CHECK_HEADERS): Remove malloc.h.
7020 * configure: Re-generated.
7021 * config.in: Re-generated.
7022 * server.h: Don't include alloca.h and malloc.h.
7023 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7024 Don't include malloc.h.
7025
7026 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7027
7028 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7029 corresponding ERRNO check in same block.
7030
7031 2014-11-12 Pedro Alves <palves@redhat.com>
7032
7033 * server.c (cont_thread): Update comment.
7034 (start_inferior, attach_inferior): No longer clear cont_thread.
7035 (handle_v_cont): No longer set cont_thread.
7036 (captured_main): Clear cont_thread each time a GDB connects.
7037
7038 2014-11-12 Pedro Alves <palves@redhat.com>
7039
7040 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7041 thread, and don't resume all threads if the Hc thread has exited.
7042
7043 2014-11-12 Pedro Alves <palves@redhat.com>
7044
7045 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7046 the process group instead of to a specific LWP.
7047
7048 2014-10-15 Pedro Alves <palves@redhat.com>
7049
7050 PR server/17487
7051 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7052 parameter.
7053 (arm_set_thread_context): Delete.
7054 (the_low_target): Adjust.
7055 * win32-i386-low.c (debug_registers_changed)
7056 (debug_registers_used): Delete.
7057 (update_debug_registers_callback): New function.
7058 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7059 needing to update their debug registers.
7060 (win32_get_current_dr): New function.
7061 (x86_dr_low_get_addr, x86_dr_low_get_control)
7062 (x86_dr_low_get_status): Fetch the debug register from the thread
7063 record's context.
7064 (i386_initial_stuff): Adjust.
7065 (i386_get_thread_context): Remove current_event parameter. Don't
7066 clear debug_registers_changed nor copy DR values to
7067 debug_reg_state.
7068 (i386_set_thread_context): Delete.
7069 (i386_prepare_to_resume): New function.
7070 (i386_thread_added): Mark the thread as needing to update irs
7071 debug registers.
7072 (the_low_target): Remove i386_set_thread_context and install
7073 i386_prepare_to_resume.
7074 * win32-low.c (win32_get_thread_context): Adjust.
7075 (win32_set_thread_context): Use SetThreadContext
7076 directly.
7077 (win32_prepare_to_resume): New function.
7078 (win32_require_context): New function, factored out from ...
7079 (thread_rec): ... this.
7080 (continue_one_thread): Call win32_prepare_to_resume on each thread
7081 we're about to continue.
7082 (win32_resume): Call win32_prepare_to_resume on the event thread.
7083 * win32-low.h (struct win32_thread_info)
7084 <debug_registers_changed>: New field.
7085 (struct win32_target_ops): Change prototype of set_thread_context,
7086 delete set_thread_context and add prepare_to_resume.
7087 (win32_require_context): New declaration.
7088
7089 2014-10-08 Gary Benson <gbenson@redhat.com>
7090
7091 * server.h: Do not include common-exceptions.h.
7092
7093 2014-10-08 Gary Benson <gbenson@redhat.com>
7094
7095 * server.h: Do not include cleanups.h.
7096
7097 2014-09-30 James Hogan <james.hogan@imgtec.com>
7098
7099 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7100 mips64-dsp-linux.c.
7101
7102 2014-09-23 Yao Qi <yao@codesourcery.com>
7103
7104 * linux-low.c (lp_status_maybe_breakpoint): New function.
7105 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7106 (count_events_callback): Likewise.
7107 (select_event_lwp_callback): Likewise.
7108 (cancel_breakpoints_callback): Likewise.
7109
7110 2014-09-19 Don Breazeal <donb@codesourcery.com>
7111
7112 * linux-low.c (handle_extended_wait): Call
7113 linux_ptrace_get_extended_event.
7114 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7115 linux_is_extended_waitstatus.
7116
7117 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7118
7119 * Makefile.in (CPPFLAGS): Define.
7120 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7121 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7122
7123 2014-09-16 Gary Benson <gbenson@redhat.com>
7124
7125 * inferiors.h (current_inferior): Renamed as...
7126 (current_thread): New variable. All uses updated.
7127 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7128 (maybe_move_out_of_jump_pad): Likewise.
7129 (cancel_breakpoint): Likewise.
7130 (linux_low_filter_event): Likewise.
7131 (wait_for_sigstop): Likewise.
7132 (linux_resume_one_lwp): Likewise.
7133 (need_step_over_p): Likewise.
7134 (start_step_over): Likewise.
7135 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7136 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7137 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7138 and save_inferior as saved_thread.
7139 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7140 saved_thread.
7141 (regcache_invalidate_thread): Likewise.
7142 * remote-utils.c (prepare_resume_reply): Likewise.
7143 * thread-db.c (thread_db_get_tls_address): Likewise.
7144 (disable_thread_event_reporting): Likewise.
7145 (remove_thread_event_breakpoints): Likewise.
7146 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7147 as saved_thread.
7148 * target.h (set_desired_inferior): Renamed as...
7149 (set_desired_thread): New declaration. All uses updated.
7150 * server.c (myresume): Updated comment to reference thread instead
7151 of inferior.
7152 (handle_serial_event): Likewise.
7153 (handle_target_event): Likewise.
7154
7155 2014-09-12 Tom Tromey <tromey@redhat.com>
7156 Gary Benson <gbenson@redhat.com>
7157
7158 * regcache.h: Include common-regcache.h.
7159 (regcache_read_pc): Don't declare.
7160 * regcache.c (get_thread_regcache_for_ptid): New function.
7161
7162 2014-09-11 Tom Tromey <tromey@redhat.com>
7163 Gary Benson <gbenson@redhat.com>
7164
7165 * symbol.c: New file.
7166 * Makefile.in (SFILES): Add symbol.c.
7167 (OBS): Add symbol.o.
7168
7169 2014-09-11 Gary Benson <gbenson@redhat.com>
7170
7171 * target.c (target_stop_ptid, target_continue_ptid): New
7172 functions.
7173
7174 2014-09-11 Tom Tromey <tromey@redhat.com>
7175 Gary Benson <gbenson@redhat.com>
7176
7177 * target.h: Include target/target.h.
7178 * target.c (target_read_memory, target_read_uint32)
7179 (target_write_memory): New functions.
7180
7181 2014-09-11 Gary Benson <gbenson@redhat.com>
7182
7183 * server.h (debug_hw_points): Don't declare.
7184 * server.c (debug_hw_points): Don't define. Replace all uses
7185 with show_debug_regs.
7186 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7187 all uses with show_debug_regs.
7188
7189 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7190
7191 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7192 endianness into account.
7193 (ppc_supply_ptrace_register): Likewise.
7194
7195 2014-09-03 James Hogan <james.hogan@imgtec.com>
7196
7197 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7198 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7199
7200 2014-09-03 Gary Benson <gbenson@redhat.com>
7201
7202 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7203 ALL_DEBUG_ADDRESS_REGISTERS.
7204
7205 2014-09-02 Gary Benson <gbenson@redhat.com>
7206
7207 * i386-low.h: Renamed as...
7208 * x86-low.h: New file. All type, function and variable name
7209 prefixes changed from "i386_" to "x86_". All references updated.
7210 * i386-low.c: Renamed as...
7211 * x86-low.c: New file. All type, function and variable name
7212 prefixes changed from "i386_" to "x86_". All references updated.
7213
7214 2014-09-02 Gary Benson <gbenson@redhat.com>
7215
7216 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7217 (x86_linux_new_thread): Likewise.
7218
7219 2014-08-29 Gary Benson <gbenson@redhat.com>
7220
7221 * server.h (setjmp.h): Do not include.
7222 (toplevel): Do not declare.
7223 (common-exceptions.h): Include.
7224 (cleanups.h): Likewise.
7225 * server.c (toplevel): Do not define.
7226 (exit_code): New static global.
7227 (detach_or_kill_for_exit_cleanup): New function.
7228 (main): New function. Original main renamed to...
7229 (captured_main): New function.
7230 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7231
7232 2014-08-29 Gary Benson <gbenson@redhat.com>
7233
7234 * Makefile.in (SFILES): Add common/common-exceptions.c.
7235 (OBS): Add common-exceptions.o.
7236 (common-exceptions.o): New rule.
7237 * utils.c (prepare_to_throw_exception): New function.
7238
7239 2014-08-29 Gary Benson <gbenson@redhat.com>
7240
7241 * config.in: Regenerate.
7242 * configure: Likewise.
7243
7244 2014-08-29 Gary Benson <gbenson@redhat.com>
7245
7246 * Makefile.in (SFILES): Add common/cleanups.c.
7247 (OBS): cleanups.o.
7248 (cleanups.o): New rule.
7249
7250 2014-08-29 Gary Benson <gbenson@redhat.com>
7251
7252 * utils.c (internal_vwarning): New function.
7253
7254 2014-08-28 Gary Benson <gbenson@redhat.com>
7255
7256 * utils.h (fatal): Remove declaration.
7257 * utils.c (fatal): Remove function.
7258
7259 2014-08-28 Gary Benson <gbenson@redhat.com>
7260
7261 * tracepoint.c (gdb_agent_init): Replace fatal with
7262 perror_with_name.
7263 (initialize_tracepoint): Likewise.
7264
7265 2014-08-28 Gary Benson <gbenson@redhat.com>
7266
7267 * remote-utils.c (remote_prepare): Replace fatal with error.
7268
7269 2014-08-28 Gary Benson <gbenson@redhat.com>
7270
7271 * linux-low.c (linux_async): Replace fatal with warning.
7272 Tidy up and return.
7273 (linux_start_non_stop): Return -1 if linux_async failed.
7274
7275 2014-08-28 Gary Benson <gbenson@redhat.com>
7276
7277 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7278 gdb_assert.
7279 (i386_dr_low_get_addr): Remove vague comment.
7280 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7281 gdb_assert.
7282
7283 2014-08-28 Gary Benson <gbenson@redhat.com>
7284
7285 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7286 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7287 internal_error.
7288 (linux_resume_one_lwp): Likewise.
7289 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7290 gdb_assert.
7291 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7292 with internal_error.
7293 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7294 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7295 (find_register_by_name): Replace fatal with internal_error.
7296 (find_regno): Likewise.
7297 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7298 * thread-db.c (thread_db_create_event): Likewise.
7299 (thread_db_load_search): Likewise.
7300 (try_thread_db_load_1): Likewise.
7301 * tracepoint.c (get_jump_space_head): Replace fatal with
7302 internal_error.
7303 (claim_trampoline_space): Likewise.
7304 (have_fast_tracepoint_trampoline_buffer): Likewise.
7305 (cmd_qtstart): Likewise.
7306 (stop_tracing): Likewise.
7307 (fast_tracepoint_collecting): Likewise.
7308 (target_malloc): Likewise.
7309 (download_tracepoint): Likewise.
7310 (download_trace_state_variables): Replace check with gdb_assert.
7311 (upload_fast_traceframes): Replace fatal with internal_error.
7312
7313 2014-08-19 Tom Tromey <tromey@redhat.com>
7314 Gary Benson <gbenson@redhat.com>
7315
7316 * Makefile.in (SFILES): Add common/common-debug.c.
7317 (OBS): Add common-debug.o.
7318 (common-debug.o): New rule.
7319 * debug.h (debug_printf): Don't declare.
7320 * debug.c (debug_printf): Renamed and rewritten as...
7321 (debug_vprintf): New function.
7322
7323 2014-08-19 Gary Benson <gbenson@redhat.com>
7324
7325 * utils.h: Do not include print-utils.h.
7326
7327 2014-08-19 Tom Tromey <tromey@redhat.com>
7328 Gary Benson <gbenson@redhat.com>
7329
7330 * server.h: Add static assertion.
7331 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7332
7333 2014-08-19 Tom Tromey <tromey@redhat.com>
7334 Gary Benson <gbenson@redhat.com>
7335
7336 * Makefile.in (SFILES): Add common/errors.c.
7337 (OBS): Add errors.o.
7338 (IPA_OBS): Add errors-ipa.o.
7339 (errors.o): New rule.
7340 (errors-ipa.o): Likewise.
7341 * utils.h (perror_with_name, error, warning): Don't declare.
7342 * utils.c (warning): Renamed and rewritten as...
7343 (vwarning): New function.
7344 (error): Renamed and rewritten as...
7345 (verror): New function.
7346 (internal_error): Renamed and rewritten as...
7347 (internal_verror): New function.
7348
7349 2014-08-07 Gary Benson <gbenson@redhat.com>
7350
7351 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7352 * configure: Regenerate.
7353 * config.in: Likewise.
7354 * server.h: Do not include errno.h.
7355 * event-loop.c: Likewise.
7356 * hostio-errno.c: Likewise.
7357 * linux-low.c: Likewise.
7358 * remote-utils.c: Likewise.
7359 * spu-low.c: Likewise.
7360 * utils.c: Likewise.
7361 * gdbreplay.c: Unconditionally include errno.h.
7362
7363 2014-08-07 Gary Benson <gbenson@redhat.com>
7364
7365 * server.h: Do not include string.h.
7366 * event-loop.c: Likewise.
7367 * linux-low.c: Likewise.
7368 * regcache.c: Likewise.
7369 * remote-utils.c: Likewise.
7370 * spu-low.c: Likewise.
7371 * utils.c: Likewise.
7372
7373 2014-08-07 Gary Benson <gbenson@redhat.com>
7374
7375 * server.h: Do not include gdb_assert.h.
7376
7377 2014-08-07 Gary Benson <gbenson@redhat.com>
7378
7379 * server.h: Do not include common-utils.h.
7380
7381 2014-08-07 Gary Benson <gbenson@redhat.com>
7382
7383 * server.h: Do not include ptid.h.
7384 * notif.h: Likewise.
7385
7386 2014-08-07 Gary Benson <gbenson@redhat.com>
7387
7388 * server.h: Do not include gdb_locale.h.
7389
7390 2014-08-07 Gary Benson <gbenson@redhat.com>
7391
7392 * server.h: Do not include gdb/signals.h.
7393 * win32-low.c: Likewise.
7394
7395 2014-08-07 Gary Benson <gbenson@redhat.com>
7396
7397 * server.h: Do not include pathmax.h.
7398
7399 2014-08-07 Gary Benson <gbenson@redhat.com>
7400
7401 * server.h: Do not include libiberty.h.
7402 * linux-bfin-low.c: Likewise.
7403
7404 2014-08-07 Gary Benson <gbenson@redhat.com>
7405
7406 * server.h: Do not include ansidecl.h.
7407
7408 2014-08-07 Gary Benson <gbenson@redhat.com>
7409
7410 * linux-x86-low.c: Do not include stddef.h.
7411 * lynx-ppc-low.c: Likewise.
7412 * tracepoint.c: Likewise.
7413
7414 2014-08-07 Gary Benson <gbenson@redhat.com>
7415
7416 * server.h: Do not include stdarg.h.
7417 * nto-low.c: Likewise.
7418
7419 2014-08-07 Gary Benson <gbenson@redhat.com>
7420
7421 * server.h: Do not include stdlib.h.
7422 * inferiors.c: Likewise.
7423 * linux-low.c: Likewise.
7424 * regcache.c: Likewise.
7425 * spu-low.c: Likewise.
7426 * tracepoint.c: Likewise.
7427 * utils.c: Likewise.
7428
7429 2014-08-07 Gary Benson <gbenson@redhat.com>
7430
7431 * server.h: Do not include stdio.h.
7432 * linux-low.c: Likewise.
7433 * remote-utils.c: Likewise.
7434 * spu-low.c: Likewise.
7435 * utils.c: Likewise.
7436 * wincecompat.c: Likewise.
7437
7438 2014-08-06 Gary Benson <gbenson@redhat.com>
7439
7440 * regcache.c (init_register_cache): Move conditionals inside if.
7441
7442 2014-08-06 Gary Benson <gbenson@redhat.com>
7443
7444 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7445
7446 2014-07-31 Gary Benson <gbenson@redhat.com>
7447
7448 * ax.h: Do not include server.h.
7449 * gdbthread.h: Likewise.
7450 * lynx-low.h: Likewise.
7451 * notif.h: Likewise.
7452
7453 2014-07-30 Gary Benson <gbenson@redhat.com>
7454
7455 * server.h: Include common-defs.h.
7456 Do not include config.h or build-gnulib-gdbserver/config.h.
7457
7458 2014-07-30 Gary Benson <gbenson@redhat.com>
7459
7460 * hostio-errno.c: Move server.h to top of includes list.
7461 * inferiors.c: Likewise.
7462 * linux-x86-low.c: Likewise.
7463 * notif.c: Include server.h.
7464
7465 2014-07-24 Tom Tromey <tromey@redhat.com>
7466 Gary Benson <gbenson@redhat.com>
7467
7468 * server.h (CORE_ADDR): Now unsigned.
7469
7470 2014-07-16 Pedro Alves <palves@redhat.com>
7471
7472 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7473
7474 2014-07-15 Pedro Alves <palves@redhat.com>
7475
7476 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7477 copy.
7478
7479 2014-07-11 Pedro Alves <palves@redhat.com>
7480
7481 * linux-low.c (kill_wait_lwp): New function, based on
7482 kill_one_lwp_callback, but use my_waitpid directly.
7483 (kill_one_lwp_callback, linux_kill): Use it.
7484
7485 2014-06-23 Pedro Alves <palves@redhat.com>
7486
7487 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7488 before setting DR0..DR3.
7489
7490 2014-06-20 Gary Benson <gbenson@redhat.com>
7491
7492 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7493 * configure: Regenerated.
7494 * config.in: Likewise.
7495
7496 2014-06-20 Gary Benson <gbenson@redhat.com>
7497
7498 * Makefile.in (SFILES): Update locations for files moved
7499 from common to nat.
7500 (object file files): Reordered.
7501
7502 2014-06-20 Gary Benson <gbenson@redhat.com>
7503
7504 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7505 (i386_dr_low_set_addr): Likewise.
7506 (i386_dr_low_get_addr): Likewise.
7507 (i386_dr_low_can_set_control): Likewise.
7508 (i386_dr_low_set_control): Likewise.
7509 (i386_dr_low_get_control): Likewise.
7510 (i386_dr_low_get_status): Likewise.
7511 (i386_get_debug_register_length): Likewise.
7512 * linux-x86-low.c (i386_dr_low_set_addr):
7513 Changed signature. Made static.
7514 (i386_dr_low_get_addr): Likewise.
7515 (i386_dr_low_set_control): Likewise.
7516 (i386_dr_low_get_control): Likewise.
7517 (i386_dr_low_get_status): Likewise.
7518 (i386_dr_low): New global variable.
7519 * win32-i386-low.c (i386_dr_low_set_addr):
7520 Changed signature. Made static.
7521 (i386_dr_low_get_addr): Likewise.
7522 (i386_dr_low_set_control): Likewise.
7523 (i386_dr_low_get_control): Likewise.
7524 (i386_dr_low_get_status): Likewise.
7525 (i386_dr_low): New global variable.
7526
7527 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7528
7529 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7530 * Makefile.in (AR, AR_FLAGS): Define.
7531 * configure: Regenerate.
7532
7533 2014-06-19 Gary Benson <gbenson@redhat.com>
7534
7535 * Makefile.in (i386-dregs.o): New rule.
7536 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7537 * i386-low.c (target.h): Remove include.
7538 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7539 (DR_CONTROL_SHIFT): Likewise.
7540 (DR_CONTROL_SIZE): Likewise.
7541 (DR_RW_EXECUTE): Likewise.
7542 (DR_RW_WRITE): Likewise.
7543 (DR_RW_READ): Likewise.
7544 (DR_RW_IORW): Likewise.
7545 (DR_LEN_1): Likewise.
7546 (DR_LEN_2): Likewise.
7547 (DR_LEN_4): Likewise.
7548 (DR_LEN_8): Likewise.
7549 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7550 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7551 (DR_ENABLE_SIZE): Likewise.
7552 (DR_LOCAL_SLOWDOWN): Likewise.
7553 (DR_GLOBAL_SLOWDOWN): Likewise.
7554 (DR_CONTROL_RESERVED): Likewise.
7555 (I386_DR_CONTROL_MASK): Likewise.
7556 (I386_DR_VACANT): Likewise.
7557 (I386_DR_LOCAL_ENABLE): Likewise.
7558 (I386_DR_GLOBAL_ENABLE): Likewise.
7559 (I386_DR_DISABLE): Likewise.
7560 (I386_DR_SET_RW_LEN): Likewise.
7561 (I386_DR_GET_RW_LEN): Likewise.
7562 (I386_DR_WATCH_HIT): Likewise.
7563 (i386_wp_op_t): Likewise.
7564 (i386_show_dr): Likewise.
7565 (i386_length_and_rw_bits): Likewise.
7566 (i386_insert_aligned_watchpoint): Likewise.
7567 (i386_remove_aligned_watchpoint): Likewise.
7568 (i386_handle_nonaligned_watchpoint): Likewise.
7569 i386_update_inferior_debug_regs(): Likewise.
7570 (i386_dr_insert_watchpoint): Likewise.
7571 (i386_dr_remove_watchpoint): Likewise.
7572 (i386_dr_region_ok_for_watchpoint): Likewise.
7573 (i386_dr_stopped_data_address): Likewise.
7574 (i386_dr_stopped_by_watchpoint): Likewise.
7575
7576 2014-06-19 Gary Benson <gbenson@redhat.com>
7577
7578 * i386-low.c (i386_dr_show): Renamed to
7579 i386_show_dr and made static. All uses updated.
7580 (i386_dr_length_and_rw_bits): Renamed to
7581 i386_length_and_rw_bits and made static.
7582 All uses updated.
7583 (i386_dr_insert_aligned_watchpoint): Renamed to
7584 i386_insert_aligned_watchpoint and made static.
7585 All uses updated.
7586 (i386_dr_remove_aligned_watchpoint): Renamed to
7587 i386_remove_aligned_watchpoint and made static.
7588 All uses updated.
7589 (i386_dr_update_inferior_debug_regs): Renamed to
7590 i386_update_inferior_debug_regs and made static.
7591 All uses updated.
7592
7593 2014-06-18 Gary Benson <gbenson@redhat.com>
7594
7595 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7596 (i386_dr_low_can_set_control): Likewise.
7597 (i386_get_debug_register_length): Likewise.
7598 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7599 (i386_dr_low_can_set_control): Likewise.
7600 (i386_get_debug_register_length): Likewise.
7601
7602 2014-06-17 Gary Benson <gbenson@redhat.com>
7603
7604 * i386-low.h (i386-dregs.h): New include.
7605 (DR_FIRSTADDR): Now in i386-dregs.h.
7606 (DR_LASTADDR): Likewise.
7607 (DR_NADDR): Likewise.
7608 (DR_STATUS): Likewise.
7609 (DR_CONTROL): Likewise.
7610 (i386_debug_reg_state): Likewise.
7611 (i386_dr_insert_watchpoint): Likewise.
7612 (i386_dr_remove_watchpoint): Likewise.
7613 (i386_dr_region_ok_for_watchpoint): Likewise.
7614 (i386_dr_stopped_data_address): Likewise.
7615 (i386_dr_stopped_by_watchpoint): Likewise.
7616 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7617
7618 2014-06-18 Gary Benson <gbenson@redhat.com>
7619
7620 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7621 i386_dr_insert_watchpoint.
7622 (i386_low_remove_watchpoint): Renamed to
7623 i386_dr_remove_watchpoint.
7624 (i386_low_region_ok_for_watchpoint): Renamed to
7625 i386_dr_region_ok_for_watchpoint.
7626 (i386_low_stopped_data_address): Renamed to
7627 i386_dr_stopped_data_address.
7628 (i386_low_stopped_by_watchpoint): Renamed to
7629 i386_dr_stopped_by_watchpoint.
7630 * i386-low.c (i386_show_dr): Renamed to
7631 i386_dr_show and made nonstatic. All uses updated.
7632 (i386_length_and_rw_bits): Renamed to
7633 i386_dr_length_and_rw_bits and made nonstatic.
7634 All uses updated.
7635 (i386_insert_aligned_watchpoint): Renamed to
7636 i386_dr_insert_aligned_watchpoint and made nonstatic.
7637 All uses updated.
7638 (i386_remove_aligned_watchpoint): Renamed to
7639 i386_dr_remove_aligned_watchpoint and made nonstatic.
7640 All uses updated.
7641 (i386_update_inferior_debug_regs): Renamed to
7642 i386_dr_update_inferior_debug_regs and made nonstatic.
7643 All uses updated.
7644 (i386_low_insert_watchpoint): Renamed to
7645 i386_dr_insert_watchpoint. All uses updated.
7646 (i386_low_remove_watchpoint): Renamed to
7647 i386_dr_remove_watchpoint. All uses updated.
7648 (i386_low_region_ok_for_watchpoint): Renamed to
7649 i386_dr_region_ok_for_watchpoint. All uses updated.
7650 (i386_low_stopped_data_address): Renamed to
7651 i386_dr_stopped_data_address. All uses updated.
7652 (i386_low_stopped_by_watchpoint): Renamed to
7653 i386_dr_stopped_by_watchpoint. All uses updated.
7654
7655 2014-06-18 Gary Benson <gbenson@redhat.com>
7656
7657 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7658 (i386_dr_low_can_set_control): Likewise.
7659 (i386_insert_aligned_watchpoint): New check.
7660
7661 2014-06-18 Gary Benson <gbenson@redhat.com>
7662
7663 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7664 Renamed to state.
7665
7666 2014-06-18 Gary Benson <gbenson@redhat.com>
7667
7668 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7669 instead of fatal and error.
7670 (i386_handle_nonaligned_watchpoint): Likewise.
7671
7672 2014-06-18 Gary Benson <gbenson@redhat.com>
7673
7674 * i386-low.c (i386_get_debug_register_length): New macro.
7675 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7676 (i386_show_dr): Use debug_printf instead of fprintf. Use
7677 phex to format values.
7678
7679 2014-06-18 Gary Benson <gbenson@redhat.com>
7680
7681 * i386-low.h: Comment changes.
7682 * i386-low.c: Likewise.
7683
7684 2014-06-18 Gary Benson <gbenson@redhat.com>
7685
7686 * i386-low.c: Whitespace changes.
7687
7688 2014-06-12 Tom Tromey <tromey@redhat.com>
7689
7690 * utils.c (freeargv): Remove.
7691
7692 2014-06-12 Tom Tromey <tromey@redhat.com>
7693
7694 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7695 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7696 (parse_debug_format_options): Likewise.
7697 (gdbserver_usage): Likewise.
7698 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7699 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7700 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7701 against libiberty.
7702 ($(LIBGNU)): Depend on libiberty.
7703 (all-lib): Recurse into all subdirs.
7704 (install-only): Invoke "install" target in subdirs.
7705 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7706 targets.
7707 * configure: Rebuild.
7708 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7709 for vasprintf, vsnprintf, or gettimeofday.
7710 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7711 srv_tgtobj.
7712
7713 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7714
7715 * development.sh: Delete.
7716 * Makefile.in (config.status): Adjust dependency on development.sh.
7717 * configure.ac: Adjust development.sh source call.
7718 * configure: Regenerate.
7719
7720 2014-06-02 Pedro Alves <palves@redhat.com>
7721
7722 * ax.c (gdb_free_agent_expr): New function.
7723 * ax.h (gdb_free_agent_expr): New declaration.
7724 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7725 list.
7726 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7727 static.
7728 (clear_breakpoint_conditions_and_commands): New function.
7729 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7730 (clear_breakpoint_conditions_and_commands): New declaration.
7731
7732 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7733
7734 * linux-aarch64-low.c (asm/ptrace.h): Include.
7735
7736 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7737
7738 Fix TLS access for -static -pthread.
7739 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7740 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7741 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7742
7743 2014-05-20 Pedro Alves <palves@redhat.com>
7744
7745 * linux-aarch64-low.c (aarch64_insert_point)
7746 (aarch64_remove_point): No longer check whether the type is
7747 supported here. Adjust to new interface.
7748 (the_low_target): Install aarch64_supports_z_point_type as
7749 supports_z_point_type method.
7750 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7751 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7752 instead of a Z packet char. Adjust.
7753 (arm_supports_z_point_type): New function.
7754 (arm_insert_point, arm_remove_point): Adjust to new interface.
7755 (the_low_target): Install arm_supports_z_point_type.
7756 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7757 (cris_insert_point, cris_remove_point): Adjust to new interface.
7758 Don't check whether the type is supported here.
7759 (the_low_target): Install cris_supports_z_point_type.
7760 * linux-low.c (linux_supports_z_point_type): New function.
7761 (linux_insert_point, linux_remove_point): Adjust to new interface.
7762 * linux-low.h (struct linux_target_ops) <insert_point,
7763 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7764 raw_breakpoint pointer parameter.
7765 <supports_z_point_type>: New method.
7766 * linux-mips-low.c (mips_supports_z_point_type): New function.
7767 (mips_insert_point, mips_remove_point): Adjust to new interface.
7768 Use mips_supports_z_point_type.
7769 (the_low_target): Install mips_supports_z_point_type.
7770 * linux-ppc-low.c (the_low_target): Install NULL as
7771 supports_z_point_type method.
7772 * linux-s390-low.c (the_low_target): Install NULL as
7773 supports_z_point_type method.
7774 * linux-sparc-low.c (the_low_target): Install NULL as
7775 supports_z_point_type method.
7776 * linux-x86-low.c (x86_supports_z_point_type): New function.
7777 (x86_insert_point): Adjust to new insert_point interface. Use
7778 insert_memory_breakpoint. Adjust to new
7779 i386_low_insert_watchpoint interface.
7780 (x86_remove_point): Adjust to remove_point interface. Use
7781 remove_memory_breakpoint. Adjust to new
7782 i386_low_remove_watchpoint interface.
7783 (the_low_target): Install x86_supports_z_point_type.
7784 * lynx-low.c (lynx_target_ops): Install NULL as
7785 supports_z_point_type callback.
7786 * nto-low.c (nto_supports_z_point_type): New.
7787 (nto_insert_point, nto_remove_point): Adjust to new interface.
7788 (nto_target_ops): Install nto_supports_z_point_type.
7789 * mem-break.c: Adjust intro comment.
7790 (struct raw_breakpoint) <raw_type, size>: New fields.
7791 <inserted>: Update comment.
7792 <shlib_disabled>: Delete field.
7793 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7794 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7795 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7796 (raw_bkpt_type_to_target_hw_bp_type): New function.
7797 (find_enabled_raw_code_breakpoint_at): New function.
7798 (find_raw_breakpoint_at): New type and size parameters. Use them.
7799 (insert_memory_breakpoint): New function, based off
7800 set_raw_breakpoint_at.
7801 (remove_memory_breakpoint): New function.
7802 (set_raw_breakpoint_at): Reimplement.
7803 (set_breakpoint): New, based on set_breakpoint_at.
7804 (set_breakpoint_at): Reimplement.
7805 (delete_raw_breakpoint): Go through the_target->remove_point
7806 instead of assuming memory breakpoints.
7807 (find_gdb_breakpoint_at): Delete.
7808 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7809 (find_gdb_breakpoint): New function.
7810 (set_gdb_breakpoint_at): Delete.
7811 (z_type_supported): New function.
7812 (set_gdb_breakpoint_1): New function, loosely based off
7813 set_gdb_breakpoint_at.
7814 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7815 (delete_gdb_breakpoint_at): Delete.
7816 (delete_gdb_breakpoint_1): New function, loosely based off
7817 delete_gdb_breakpoint_at.
7818 (delete_gdb_breakpoint): New function.
7819 (clear_gdb_breakpoint_conditions): Rename to ...
7820 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7821 breakpoint.
7822 (add_condition_to_breakpoint): Make static.
7823 (add_breakpoint_condition): Take a struct breakpoint pointer
7824 instead of an address. Adjust.
7825 (gdb_condition_true_at_breakpoint): Rename to ...
7826 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7827 z_type parameter.
7828 (gdb_condition_true_at_breakpoint): Reimplement.
7829 (add_breakpoint_commands): Take a struct breakpoint pointer
7830 instead of an address. Adjust.
7831 (gdb_no_commands_at_breakpoint): Rename to ...
7832 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7833 parameter. Return true if no breakpoint was found. Change debug
7834 output.
7835 (gdb_no_commands_at_breakpoint): Reimplement.
7836 (run_breakpoint_commands): Rename to ...
7837 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7838 and change return type to boolean.
7839 (run_breakpoint_commands): New function.
7840 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7841 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7842 breakpoint. Go through the_target->remove_point instead of
7843 assuming memory breakpoint.
7844 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7845 software and hardware breakpoints.
7846 (reinsert_raw_breakpoint): Go through the_target->insert_point
7847 instead of assuming memory breakpoint.
7848 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7849 software and hardware breakpoints.
7850 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7851 Check both software and hardware breakpoints.
7852 (validate_inserted_breakpoint): Assert the breakpoint is a
7853 software breakpoint. Set the inserted flag to -1 instead of
7854 setting shlib_disabled.
7855 (delete_disabled_breakpoints): Adjust.
7856 (validate_breakpoints): Only validate software breakpoints.
7857 Adjust to inserted flag change.
7858 (check_mem_read, check_mem_write): Skip breakpoint types other
7859 than software breakpoints. Adjust to inserted flag change.
7860 * mem-break.h (enum raw_bkpt_type): New enum.
7861 (raw_breakpoint, struct process_info): Forward declare.
7862 (Z_packet_to_target_hw_bp_type): Delete declaration.
7863 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7864 (set_gdb_breakpoint, delete_gdb_breakpoint)
7865 (clear_breakpoint_conditions): New declarations.
7866 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7867 (breakpoint_inserted_here): Update comment.
7868 (add_breakpoint_condition, add_breakpoint_commands): Replace
7869 address parameter with a breakpoint pointer parameter.
7870 (gdb_breakpoint_here): Update comment.
7871 (delete_gdb_breakpoint_at): Delete.
7872 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7873 * server.c (process_point_options): Take a struct breakpoint
7874 pointer instead of an address. Adjust.
7875 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7876 delete_gdb_breakpoint.
7877 * spu-low.c (spu_target_ops): Install NULL as
7878 supports_z_point_type method.
7879 * target.h: Include mem-break.h.
7880 (struct target_ops) <prepare_to_access_memory>: Update comment.
7881 <supports_z_point_type>: New field.
7882 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7883 instead of a char. Also take a raw breakpoint pointer.
7884 * win32-arm-low.c (the_low_target): Install NULL as
7885 supports_z_point_type.
7886 * win32-i386-low.c (i386_supports_z_point_type): New function.
7887 (i386_insert_point, i386_remove_point): Adjust to new interface.
7888 (the_low_target): Install i386_supports_z_point_type.
7889 * win32-low.c (win32_supports_z_point_type): New function.
7890 (win32_insert_point, win32_remove_point): Adjust to new interface.
7891 (win32_target_ops): Install win32_supports_z_point_type.
7892 * win32-low.h (struct win32_target_ops):
7893 <supports_z_point_type>: New method.
7894 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7895 instead of a char. Also take a raw breakpoint pointer.
7896
7897 2014-05-20 Pedro Alves <palves@redhat.com>
7898
7899 * mem-break.h: Include break-common.h.
7900 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7901 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7902 (Z_packet_to_target_hw_bp_type): New declaration.
7903 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7904 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7905 (Z_PACKET_ACCESS_WP): Delete macros.
7906 (Z_packet_to_hw_type): Delete function.
7907 * i386-low.h: Don't include break-common.h here.
7908 (Z_packet_to_hw_type): Delete declaration.
7909 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7910 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7911 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7912 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7913 * linux-aarch64-low.c: Don't include break-common.h here.
7914 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7915 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7916 (Z_packet_to_target_hw_bp_type): Delete function.
7917 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7918 function.
7919 (mips_insert_point, mips_remove_point): Use
7920 Z_packet_to_target_hw_bp_type.
7921
7922 2014-05-20 Pedro Alves <palves@redhat.com>
7923
7924 * linux-aarch64-low.c: Include break-common.h.
7925 (enum target_point_type): Delete.
7926 (Z_packet_to_point_type): Rename to ...
7927 (Z_packet_to_target_hw_bp_type): ... this, and return a
7928 target_hw_bp_type instead.
7929 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7930 instead of an enum target_point_type.
7931 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7932 breakpoint type.
7933 (aarch64_dr_state_insert_one_point)
7934 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7935 (aarch64_handle_aligned_watchpoint)
7936 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7937 Take an enum target_hw_bp_type instead of an enum
7938 target_point_type.
7939 (aarch64_supports_z_point_type): New function.
7940 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7941 use Z_packet_to_target_hw_bp_type.
7942
7943 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7944
7945 * configure.ac: Only use -Werror by default when DEVELOPMENT
7946 is true.
7947 * configure: Regenerate.
7948
7949 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7950
7951 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7952 * linux-x86-low.c (X86_64_USER_REGS): New.
7953 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7954
7955 2014-04-28 Yao Qi <yao@codesourcery.com>
7956
7957 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7958 name.
7959
7960 2014-04-25 Pedro Alves <palves@redhat.com>
7961
7962 PR server/16255
7963 * linux-low.c (linux_attach_fail_reason_string): New function.
7964 (linux_attach_lwp): Delete.
7965 (linux_attach_lwp_1): Rename to ...
7966 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7967 argument. Remove "initial" parameter. Return int instead of
7968 void. Don't error or warn here.
7969 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7970 failure to attach to the tgid. Call warning when failing to
7971 attach to an lwp.
7972 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7973 argument. Remove "initial" parameter. Return int instead of
7974 void. Don't error or warn here.
7975 (linux_attach_fail_reason_string): New declaration.
7976 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7977 interface change. Use linux_attach_fail_reason_string.
7978
7979 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7980 Walfred Tedeschi <walfred.tedeschi@intel.com>
7981
7982 * Makefile.in: Added rules to handle new files
7983 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7984 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7985 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7986 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7987 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7988 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7989 x32-avx512-linux.o.
7990 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7991 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7992 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7993 i386/x32-avx512.xml.
7994 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7995 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7996 i386/x32-avx512-linux.xml.
7997 * i387-fp.c (num_avx512_k_registers): New constant for number
7998 of K registers.
7999 (num_avx512_zmmh_low_registers): New constant for number of
8000 lower ZMM registers (0-15).
8001 (num_avx512_zmmh_high_registers): New constant for number of
8002 higher ZMM registers (16-31).
8003 (num_avx512_ymmh_registers): New contant for number of higher
8004 YMM registers (ymm16-31 added by avx521 on x86_64).
8005 (num_avx512_xmm_registers): New constant for number of higher
8006 XMM registers (xmm16-31 added by AVX512 on x86_64).
8007 (struct i387_xsave): Add space for AVX512 registers.
8008 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8009 Add code to handle AVX512 registers.
8010 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8011 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8012 prototypei from generated file.
8013 (tdesc_amd64_avx512_linux): Likewise.
8014 (init_registers_x32_avx512_linux): Likewise.
8015 (tdesc_x32_avx512_linux): Likewise.
8016 (init_registers_i386_avx512_linux): Likewise.
8017 (tdesc_i386_avx512_linux): Likewise.
8018 (x86_64_regmap): Add AVX512 registers.
8019 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8020 mask.
8021 (initialize_low_arch): Add code to initialize AVX512 registers.
8022
8023 2014-04-23 Pedro Alves <palves@redhat.com>
8024
8025 * mem-break.c (find_gdb_breakpoint_at): Make static.
8026 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8027
8028 2014-04-23 Pedro Alves <palves@redhat.com>
8029
8030 * i386-low.c: Don't include break-common.h here.
8031 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8032 prototype to take target_hw_bp_type as argument instead of a Z
8033 packet char.
8034 * i386-low.h: Include break-common.h here.
8035 (Z_packet_to_hw_type): Declare.
8036 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8037 prototypes.
8038 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8039 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8040 (x86_remove_point): Convert the packet number to a
8041 target_hw_bp_type before calling i386_low_remove_watchpoint.
8042 * win32-i386-low.c (i386_insert_point): Convert the packet number
8043 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8044 (i386_remove_point): Convert the packet number to a
8045 target_hw_bp_type before calling i386_low_remove_watchpoint.
8046
8047 2014-04-23 Pedro Alves <palves@redhat.com>
8048
8049 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8050
8051 2014-04-10 Pedro Alves <palves@redhat.com>
8052
8053 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8054 Check if the condition or command is NULL before checking if the
8055 breakpoint is known. On success, return true.
8056 * mem-break.h (add_breakpoint_condition): Document return.
8057 (add_breakpoint_commands): Add describing comment.
8058 * server.c (skip_to_semicolon): New function.
8059 (process_point_options): Use it.
8060
8061 2014-04-09 Pedro Alves <palves@redhat.com>
8062
8063 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8064 to lwpid_of.
8065
8066 2014-02-27 Pedro Alves <palves@redhat.com>
8067
8068 PR 12702
8069 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8070 macros.
8071 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8072 output.
8073 (last_thread_of_process_p): Take a PID argument instead of a
8074 thread pointer.
8075 (linux_wait_for_lwp): Delete.
8076 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8077 functions.
8078 (linux_low_filter_event): New function, party factored out from
8079 linux_wait_for_event.
8080 (linux_wait_for_event): Rename to ...
8081 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8082 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8083 sigsuspend. Check for zombie leaders.
8084 (linux_wait_for_event): Reimplement as wrapper around
8085 linux_wait_for_event_filtered.
8086 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8087 a normal or signal exit is seen, it's the whole process exiting.
8088 (wait_for_sigstop): No longer a for_each_inferior callback.
8089 Rewrite on top of linux_wait_for_event_filtered.
8090 (stop_all_lwps): Call wait_for_sigstop directly.
8091 * server.c (resume, handle_target_event): Handle
8092 TARGET_WAITKIND_NO_RESUMED.
8093
8094 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8095
8096 * win32-low.c (psapi_get_dll_name,
8097 * win32_CreateToolhelp32Snapshot): Delete.
8098 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8099 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8100 Delete.
8101 (handle_load_dll): Add function description.
8102 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8103
8104 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8105
8106 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8107 Add comment.
8108 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8109 base address when calling win32_add_one_solib.
8110 (handle_load_dll): Delete local variable load_addr.
8111 Remove 0x1000 offset applied to DLL base address when calling
8112 win32_add_one_solib.
8113 (handle_unload_dll): Add comment.
8114
8115 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8116
8117 * win32-low.c (win32_add_all_dlls): Renames
8118 win32_ensure_ntdll_loaded. Rewrite function documentation.
8119 Adjust implementation to always load all DLLs.
8120 Add 0x1000 offset to DLL base address when calling
8121 win32_add_one_solib.
8122 (child_initialization_done): New static global.
8123 (do_initial_child_stuff): Set child_initialization_done to
8124 zero during child initialization, and 1 after. Replace call
8125 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8126 Add comment.
8127 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8128 (handle_unload_dll): Add function documentation.
8129 (get_child_debug_event): Ignore load and unload DLL events
8130 during child initialization.
8131
8132 2014-02-20 Doug Evans <dje@google.com>
8133
8134 Remove global all_lwps.
8135 * inferiors.h (ptid_of): Move here from linux-low.h.
8136 (pid_of, lwpid_of): Ditto.
8137 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8138 parameter is a struct thread_info * now.
8139 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8140 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8141 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8142 directly.
8143 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8144 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8145 * linux-arm-low.c (update_registers_callback): Update, "entry"
8146 parameter is a struct thread_info * now.
8147 Fetch lwpid from current_inferior directly.
8148 (arm_insert_point): Pass &all_threads to find_inferior instead of
8149 &all_lwps.
8150 (arm_remove_point): Ditto.
8151 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8152 (arm_prepare_to_resume): Fetch pid from thread.
8153 (arm_read_description): Fetch lwpid from current_inferior directly.
8154 * linux-low.c (all_lwps): Delete.
8155 (delete_lwp): Delete call to remove_inferior.
8156 (handle_extended_wait): Fetch lwpid from thread.
8157 (add_lwp): Don't set lwp->entry.id. Remove call to
8158 add_inferior_to_list.
8159 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8160 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8161 (kill_one_lwp_callback): Ditto.
8162 (linux_kill): Don't dereference NULL pointer.
8163 Fetch ptid,lwpid from thread.
8164 (get_detach_signal): Fetch ptid from thread.
8165 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8166 Simplify call to regcache_invalidate_thread.
8167 (delete_lwp_callback): Update, "entry" parameter is a
8168 struct thread_info * now. Fetch pid from thread.
8169 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8170 (status_pending_p_callback): Update, "entry" parameter is a
8171 struct thread_info * now. Fetch ptid from thread.
8172 (find_lwp_pid): Update, "entry" parameter is a
8173 struct thread_info * now.
8174 (linux_wait_for_lwp): Fetch pid from thread.
8175 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8176 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8177 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8178 (dequeue_one_deferred_signal): Ditto.
8179 (cancel_breakpoint): Fetch ptid from current_inferior.
8180 (linux_wait_for_event): Pass &all_threads to find_inferior,
8181 not &all_lwps. Fetch ptid, lwpid from thread.
8182 (count_events_callback): Update, "entry" parameter is a
8183 struct thread_info * now.
8184 (select_singlestep_lwp_callback): Ditto.
8185 (select_event_lwp_callback): Ditto.
8186 (cancel_breakpoints_callback): Ditto.
8187 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8188 not &all_lwps.
8189 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8190 (unsuspend_one_lwp): Update, "entry" parameter is a
8191 struct thread_info * now.
8192 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8193 not &all_lwps.
8194 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8195 Fetch lwpid from thread, not lwp.
8196 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8197 Pass &all_threads to find_inferior, not &all_lwps.
8198 (send_sigstop): Fetch lwpid from thread, not lwp.
8199 (send_sigstop_callback): Update, "entry" parameter is a
8200 struct thread_info * now.
8201 (suspend_and_send_sigstop_callback): Ditto.
8202 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8203 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8204 struct thread_info * now.
8205 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8206 from thread, lwp.
8207 (lwp_running): Update, "entry" parameter is a
8208 struct thread_info * now.
8209 (stop_all_lwps): Fetch ptid from thread.
8210 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8211 (linux_resume_one_lwp): Fetch lwpid from thread.
8212 (linux_set_resume_request): Update, "entry" parameter is a
8213 struct thread_info * now. Fetch pid, lwpid from thread.
8214 (resume_status_pending_p): Update, "entry" parameter is a
8215 struct thread_info * now.
8216 (need_step_over_p): Ditto. Fetch lwpid from thread.
8217 (start_step_over): Fetch lwpid from thread.
8218 (linux_resume_one_thread): Update, "entry" parameter is a
8219 struct thread_info * now. Fetch lwpid from thread.
8220 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8221 (proceed_one_lwp): Update, "entry" parameter is a
8222 struct thread_info * now. Fetch lwpid from thread.
8223 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8224 struct thread_info * now.
8225 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8226 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8227 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8228 directly.
8229 (regsets_store_inferior_registers): Ditto.
8230 (fetch_register, store_register): Ditto.
8231 (linux_read_memory, linux_write_memory): Ditto.
8232 (linux_request_interrupt): Ditto.
8233 (linux_read_auxv): Ditto.
8234 (linux_xfer_siginfo): Ditto.
8235 (linux_qxfer_spu): Ditto.
8236 (linux_qxfer_libraries_svr4): Ditto.
8237 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8238 moved to inferiors.h.
8239 (get_lwp): Delete.
8240 (get_thread_lwp): Update.
8241 (struct lwp_info): Delete member "entry". Simplify comment for
8242 member "thread".
8243 (all_lwps): Delete.
8244 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8245 current_inferior directly.
8246 (update_watch_registers_callback): Update, "entry" parameter is a
8247 struct thread_info * now. Fetch pid from thread.
8248 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8249 (mips_insert_point): Fetch lwpid from current_inferior.
8250 Pass &all_threads to find_inferior, not &all_lwps.
8251 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8252 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8253 directly.
8254 (mips_stopped_data_address): Ditto.
8255 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8256 directly.
8257 * linux-tile-low.c (tile_arch_setup): Ditto.
8258 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8259 (update_debug_registers_callback): Update, "entry" parameter is a
8260 struct thread_info * now. Fetch pid from thread.
8261 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8262 Pass &all_threads to find_inferior, not &all_lwps.
8263 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8264 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8265 Pass &all_threads to find_inferior, not &all_lwps.
8266 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8267 (i386_dr_low_get_status): Ditto.
8268 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8269 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8270 (x86_linux_read_description): Ditto.
8271 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8272
8273 2014-02-20 Doug Evans <dje@google.com>
8274
8275 * inferiors.c (get_first_inferior): Fix buglet.
8276
8277 2014-02-19 Doug Evans <dje@google.com>
8278
8279 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8280 * inferiors.c (add_thread): Change result type to struct thread_info *.
8281 All callers updated.
8282 (add_lwp): Call add_thread here instead of in callers.
8283 All callers updated.
8284 * linux-low.h (get_lwp_thread): Rewrite.
8285 (struct lwp_info): New member "thread".
8286
8287 2014-02-19 Doug Evans <dje@google.com>
8288
8289 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8290 All callers updated.
8291
8292 2014-02-19 Doug Evans <dje@google.com>
8293
8294 * inferiors.c (add_thread): Fix whitespace.
8295
8296 2014-02-19 Doug Evans <dje@google.com>
8297
8298 * dll.c (clear_dlls): Replace accessing list implemention details
8299 with API function.
8300 * gdbthread.h (get_first_thread): Declare.
8301 * inferiors.c (for_each_inferior_with_data): New function.
8302 (get_first_thread): New function.
8303 (find_thread_ptid): Simplify.
8304 (get_first_inferior): New function.
8305 (clear_list): Delete.
8306 (one_inferior_p): New function.
8307 (clear_inferior_list): New function.
8308 (clear_inferiors): Update.
8309 * inferiors.h (for_each_inferior_with_data): Declare.
8310 (clear_inferior_list): Declare.
8311 (one_inferior_p): Declare.
8312 (get_first_inferior): Declare.
8313 * linux-low.c (linux_wait_for_event): Replace accessing list
8314 implemention details with API function.
8315 * server.c (target_running): Ditto.
8316 (accumulate_file_name_length): New function.
8317 (emit_dll_description): New function.
8318 (handle_qxfer_libraries): Replace accessing list implemention
8319 details with API function.
8320 (handle_qxfer_threads_worker): New function.
8321 (handle_qxfer_threads_proper): Replace accessing list implemention
8322 details with API function.
8323 (handle_query): Ditto.
8324 (visit_actioned_threads_callback_ftype): New typedef.
8325 (visit_actioned_threads_data): New struct.
8326 (visit_actioned_threads): Rewrite to be find_inferior callback.
8327 (resume): Call find_inferior.
8328 (handle_status): Replace accessing list implemention
8329 details with API function.
8330 (process_serial_event): Replace accessing list implemention details
8331 with API function.
8332 * target.c (set_desired_inferior): Replace accessing list implemention
8333 details with API function.
8334 * tracepoint.c (same_process_p): New function.
8335 (gdb_agent_about_to_close): Replace accessing list implemention
8336 details with API function.
8337 * win32-low.c (child_delete_thread): Replace accessing list
8338 implemention details with API function.
8339 (match_dll_by_basename): New function.
8340 (dll_is_loaded_by_basename): New function.
8341 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8342 details call to dll_is_loaded_by_basename.
8343
8344 2014-02-19 Doug Evans <dje@google.com>
8345
8346 * dll.h (struct dll_info): Add comment.
8347 * gdbthread.h (struct thread_info): Add comment.
8348 (current_ptid): Simplify.
8349 * inferiors.c (add_process): Update.
8350 (remove_process): Update.
8351 * inferiors.h (struct process_info): Rename member "head" to "entry".
8352 * linux-low.c (delete_lwp): Update.
8353 (add_lwp): Update.
8354 (last_thread_of_process_p): Update.
8355 (kill_one_lwp_callback, linux_kill): Update.
8356 (status_pending_p_callback): Update.
8357 (wait_for_sigstop): Update. Simplify read of ptid.
8358 (start_step_over): Update.
8359 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8360 (get_lwp_thread): Update.
8361 (struct lwp_info): Rename member "head" to "entry".
8362 * regcache.h (inferior_list_entry): Delete.
8363 * server.c (kill_inferior_callback): Update.
8364 (detach_or_kill_inferior_callback): Update.
8365 (print_started_pid): Update.
8366 (print_attached_pid): Update.
8367 (process_serial_event): Simplify read of ptid.
8368 * thread-db.c (thread_db_create_event): Update.
8369 (thread_db_get_tls_address): Update.
8370 * win32-low.c (current_inferior_ptid): Simplify.
8371
8372 2014-02-19 Tom Tromey <tromey@redhat.com>
8373
8374 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8375 argument.
8376 (target_supports_btrace): Update.
8377
8378 2014-02-14 Yao Qi <yao@codesourcery.com>
8379
8380 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8381 (rsp-low-ipa.o): New target.
8382
8383 2014-02-12 Tom Tromey <tromey@redhat.com>
8384
8385 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8386 convert_ascii_to_int.
8387 * regcache.c (registers_to_string): Likewise.
8388 * remote-utils.c (decode_M_packet): Likewise.
8389 * server.c (process_serial_event): Likewise.
8390
8391 2014-02-12 Tom Tromey <tromey@redhat.com>
8392
8393 * server.c (handle_query, handle_v_run): Use hex2bin, not
8394 unhexify.
8395 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8396
8397 2014-02-12 Tom Tromey <tromey@redhat.com>
8398
8399 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8400 convert_int_to_ascii.
8401 * regcache.c (registers_to_string, collect_register_as_string):
8402 Likewise.
8403 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8404 Likewise.
8405 * server.c (process_serial_event): Likewise.
8406 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8407 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8408
8409 2014-02-12 Tom Tromey <tromey@redhat.com>
8410
8411 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8412 bin2hex, not hexify.
8413 * tracepoint.c (cmd_qtstatus): Likewise.
8414
8415 2014-02-12 Tom Tromey <tromey@redhat.com>
8416
8417 * remote-utils.c (monitor_output): Pass explicit length to
8418 hexify.
8419
8420 2014-02-12 Tom Tromey <tromey@redhat.com>
8421
8422 * tracepoint.c: Include rsp-low.h.
8423 * server.c: Include rsp-low.h.
8424 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8425 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8426 declare.
8427 * remote-utils.c: Include rsp-low.h.
8428 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8429 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8430 (convert_int_to_ascii, convert_ascii_to_int): Move to
8431 common/rsp-low.c.
8432 * regcache.c: Include rsp-low.h.
8433 * ax.c: Include rsp-low.h.
8434 * Makefile.in (SFILES): Add common/rsp-low.c.
8435 (OBS): Add rsp-low.o.
8436 (rsp-low.o): New target.
8437
8438 2014-02-12 Tom Tromey <tromey@redhat.com>
8439
8440 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8441 Include print-utils.h.
8442 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8443 (plongest, thirty_two, phex_nz): Remove.
8444 * Makefile.in (SFILES): Add common/print-utils.c.
8445 (OBS): Add print-utils.o.
8446 (print-utils-ipa.o): New target.
8447 (print-utils.o): New target.
8448 (IPA_OBJS): Add print-utils-ipa.o.
8449
8450 2014-02-06 Tom Tromey <tromey@redhat.com>
8451
8452 * Makefile.in (SFILES): Fix indentation.
8453
8454 2014-02-05 Doug Evans <dje@google.com>
8455
8456 * linux-low.c (linux_wait_for_event): Improve comment.
8457 (linux_wait_1): Keep current_inferior in sync with event_child.
8458
8459 2014-01-22 Doug Evans <dje@google.com>
8460
8461 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8462
8463 2014-01-22 Doug Evans <dje@google.com>
8464
8465 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8466 * configure: Regenerate.
8467 * config.in: Regenerate.
8468 * Makefile.in (SFILES): Add debug.c.
8469 (OBS): Add debug.o.
8470 * debug.c: New file.
8471 * debug.h: New file.
8472 * linux-aarch64-low.c (*): Update all debugging printfs to use
8473 debug_printf instead of fprintf.
8474 * linux-arm-low.c (*): Ditto.
8475 * linux-cris-low.c (*): Ditto.
8476 * linux-crisv32-low.c (*): Ditto.
8477 * linux-m32r-low.c (*): Ditto.
8478 * linux-sparc-low.c (*): Ditto.
8479 * linux-x86.c (*): Ditto.
8480 * linux-low.c (*): Ditto.
8481 (linux_wait_1): Add calls to debug_enter, debug_exit.
8482 (linux_wait): Remove redundant debugging printf.
8483 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8484 (linux_resume, unstop_all_lwps): Ditto.
8485 * mem-break.c (*): Update all debugging printfs to use
8486 debug_printf instead of fprintf.
8487 * remote-utils.c (*): Ditto.
8488 * thread-db.c (*): Ditto.
8489 * server.c #include <ctype.h>, "gdb_vecs.h".
8490 (debug_threads): Moved to debug.c.
8491 (*): Update all debugging printfs to use debug_printf instead of
8492 fprintf.
8493 (start_inferior): Replace call to fflush with call to debug_flush.
8494 (monitor_show_help): Mention set debug-format.
8495 (parse_debug_format_options): New function.
8496 (handle_monitor_command): Handle "monitor set debug-format".
8497 (gdbserver_usage): Mention --debug-format.
8498 (main): Parse --debug-format.
8499 * server.h (debug_threads): Declaration moved to debug.h.
8500 #include "debug.h".
8501 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8502 trace_debug_1 that uses debug_printf.
8503 (tracepoint_look_up_symbols): Update all debugging printfs to use
8504 debug_printf instead of fprintf.
8505
8506 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8507
8508 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8509 sys/ptrace.h.
8510
8511 2014-01-17 Pedro Alves <palves@redhat.com>
8512
8513 PR build/16445
8514 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8515 defined after including gdb_proc_service.h.
8516
8517 2014-01-16 Doug Evans <dje@google.com>
8518
8519 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8520 (match_dll): Use it.
8521
8522 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8523
8524 * target.h (target_ops) <read_btrace>: Change parameters and
8525 return type to allow error reporting.
8526 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8527 trace reading errors on.
8528 * linux-low.c (linux_low_read_btrace): Pass trace reading
8529 errors on.
8530 (linux_low_disable_btrace): New.
8531
8532 2014-01-15 Doug Evans <dje@google.com>
8533
8534 * inferiors.c (thread_id_to_gdb_id): Delete.
8535 * inferiors.h (thread_id_to_gdb_id): Delete.
8536
8537 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8538
8539 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8540 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8541 versions.
8542
8543 2014-01-08 Pedro Alves <palves@redhat.com>
8544
8545 * server.c (handle_status): Don't discard previous queued stop
8546 replies or thread's pending status here.
8547 (main) <disconnection>: Do it here instead.
8548
8549 2014-01-08 Pedro Alves <palves@redhat.com>
8550
8551 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8552 * server.c (visit_actioned_threads, handle_pending_status): New
8553 function.
8554 (handle_v_cont): Factor out parts to ...
8555 (resume): ... this new function. If in all-stop, and a thread
8556 being resumed has a pending status, report it without actually
8557 resuming.
8558 (myresume): Adjust to use the new 'resume' function.
8559 (clear_pending_status_callback, set_pending_status_callback)
8560 (find_status_pending_thread_callback): New functions.
8561 (handle_status): Handle the case of multiple threads having
8562 interesting statuses to report. Report threads' real last signal
8563 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8564 with an interesting thread to report the status for, instead of
8565 always reporting the status of the first thread.
8566
8567 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8568
8569 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8570 * gdbreplay.c (gdbreplay_version): Likewise.
8571
8572 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8573
8574 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8575 iov.iov_len with the real length in use.
8576
8577 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8578
8579 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8580 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8581 for all targets that use win32-low.c.
8582 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8583 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8584
8585 2013-12-13 Pedro Alves <palves@redhat.com>
8586
8587 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8588 if equal to TARGET_WAITKIND_LOADED.
8589 * win32-low.c (cached_status): New static global.
8590 (win32_wait): Add declaration.
8591 (do_initial_child_stuff): Flush all initial pending debug events
8592 up to the initial breakpoint.
8593 (win32_wait): If CACHED_STATUS was set, return that instead
8594 of doing a real wait. Remove the code resuming the execution
8595 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8596 during the initial phase. Also remove the code changing
8597 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8598 TARGET_WAITKIND_STOPPED.
8599
8600 2013-12-11 Yao Qi <yao@codesourcery.com>
8601
8602 * notif.c (handle_notif_ack): Return 0 if no notification
8603 matches.
8604
8605 2013-11-20 Doug Evans <dje@google.com>
8606
8607 * linux-low.c (linux_set_resume_request): Fix comment.
8608
8609 2013-11-20 Doug Evans <dje@google.com>
8610
8611 * linux-low.c (resume_status_pending_p): Tweak comment.
8612
8613 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8614
8615 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8616 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8617 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8618 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8619 (srv_amd64_regobj): Add amd64-mpx.o.
8620 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8621 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8622 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8623 * i387-fp.c (num_pl_bnd_register) Added constant.
8624 (num_pl_bnd_cfg_registers) Added constant.
8625 (struct i387_xsave) Added reserved area and MPX fields.
8626 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8627 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8628 function.
8629 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8630 (init_registers_amd64_mpx_linux): Declare new function.
8631 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8632 (x86_64_regmap): Add MPX registers.
8633 (x86_linux_read_description): Add MPX case.
8634 (initialize_low_arch): Initialize MPX targets.
8635
8636 2013-11-18 Tom Tromey <tromey@redhat.com>
8637
8638 * configure: Rebuild.
8639 * configure.ac: Don't check for stdlib.h.
8640 * gdbreplay.c: Unconditionally include stdlib.h.
8641
8642 2013-11-18 Tom Tromey <tromey@redhat.com>
8643
8644 * config.in: Rebuild.
8645 * configure: Rebuild.
8646 * configure.ac: Don't use AC_HEADER_DIRENT.
8647
8648 2013-11-18 Tom Tromey <tromey@redhat.com>
8649
8650 * server.h: Don't check HAVE_STRING_H.
8651 * gdbreplay.c: Don't check HAVE_STRING_H.
8652 * configure: Rebuild.
8653
8654 2013-11-18 Tom Tromey <tromey@redhat.com>
8655
8656 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8657 LIBGNU.
8658
8659 2013-11-08 Tom Tromey <tromey@redhat.com>
8660
8661 * configure, config.in: Rebuild.
8662 * configure.ac: Remove unused configury.
8663
8664 2013-11-08 Tom Tromey <tromey@redhat.com>
8665
8666 * acinclude.m4: Include common.m4, codeset.m4.
8667 * configure, config.in: Rebuild.
8668 * configure.ac: Use GDB_AC_COMMON.
8669
8670 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8671
8672 * linux-s390-low.c (HWCAP_S390_TE): New define.
8673 (s390_arch_setup): Consider the TE field in the HWCAP for
8674 determining 'have_regset_tdb'.
8675
8676 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8677
8678 PR gdb/16014
8679 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8680 call to sizeof.
8681
8682 2013-10-02 Pedro Alves <palves@redhat.com>
8683
8684 * server.c (process_serial_event): Don't output "GDBserver
8685 exiting" if GDB is connected through stdio.
8686 * target.c (mywait): Likewise, be silent if GDB is connected
8687 through stdio.
8688
8689 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8690
8691 * lynx-low.c (lynx_add_threads_after_attach): New function.
8692 (lynx_attach): Remove call to add_thread. Add call to
8693 lynx_add_threads_after_attach instead.
8694
8695 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8696
8697 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8698 * config.in, configure: Regenerated.
8699
8700 2013-09-18 Yao Qi <yao@codesourcery.com>
8701
8702 PR server/15959
8703 * server.c (start_inferior): Clear 'resume_info'.
8704
8705 2013-09-16 Jiong Wang <jiwang@tilera.com>
8706
8707 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8708 for each register.
8709
8710 2013-09-16 Jiong Wang <jiwang@tilera.com>
8711
8712 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8713 linux-tile-low.o to srv_tgtobj.
8714
8715 2013-09-16 Will Newton <will.newton@linaro.org>
8716
8717 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8718 out regs.
8719
8720 2013-09-06 Pedro Alves <palves@redhat.com>
8721
8722 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8723 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8724 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8725 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8726 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8727 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8728
8729 2013-09-06 Pedro Alves <palves@redhat.com>
8730
8731 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8732 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8733
8734 2013-09-06 Pedro Alves <palves@redhat.com>
8735
8736 * linux-amd64-ipa.c: Include tracepoint.h.
8737 * linux-i386-ipa.c: Include tracepoint.h.
8738
8739 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8740
8741 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8742 (ps_get_thread_area): New function.
8743
8744 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8745
8746 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8747 (initialize_low_arch): Call init_registers_crisv32 rather than
8748 init_register_crisv32.
8749
8750 2013-09-05 Pedro Alves <palves@redhat.com>
8751
8752 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8753 to ...
8754 * hostio.h: ... this new file.
8755 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8756 win32-low.c: Include hostio.h.
8757
8758 2013-09-05 Pedro Alves <palves@redhat.com>
8759
8760 * server.h (gdb_client_data, handler_func, callback_handler_func)
8761 (delete_file_handler, add_file_handler, append_callback_event)
8762 (delete_callback_event, start_event_loop, initialize_event_loop):
8763 Move to event-loop.h and include it.
8764 * event-loop.h: New file.
8765
8766 2013-09-05 Pedro Alves <palves@redhat.com>
8767
8768 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8769 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8770 (loaded_dll, unloaded_dll): Move to ...
8771 * dll.h: ... this new file.
8772 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8773
8774 2013-09-05 Pedro Alves <palves@redhat.com>
8775
8776 * server.h (current_process, get_thread_process, all_processes)
8777 (add_inferior_to_list, for_each_inferior, current_inferior)
8778 (remove_inferior, add_process, remove_process, find_process_pid)
8779 (have_started_inferiors_p, have_attached_inferiors_p)
8780 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8781 (clear_inferiors, find_inferior, find_inferior_id)
8782 (inferior_target_data, set_inferior_target_data)
8783 (inferior_regcache_data, set_inferior_regcache_data): Move to
8784 inferiors.h, and include it.
8785 * inferiors.h: New file.
8786
8787 2013-09-05 Pedro Alves <palves@redhat.com>
8788
8789 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8790 Move ...
8791 * ax.h: ... here.
8792
8793 2013-09-05 Pedro Alves <palves@redhat.com>
8794
8795 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8796 tracepoint.h.
8797 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8798 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8799 (handle_tracepoint_general_set, handle_tracepoint_query)
8800 (tracepoint_finished_step, tracepoint_was_hit)
8801 (release_while_stepping_state_list, current_traceframe)
8802 (in_readonly_region, traceframe_read_mem)
8803 (fetch_traceframe_registers, traceframe_read_sdata)
8804 (traceframe_read_info, struct fast_tpoint_collect_status)
8805 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8806 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8807 (supply_fast_tracepoint_registers)
8808 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8809 (ipa_tdesc, claim_trampoline_space)
8810 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8811 (agent_mem_read, agent_get_trace_state_variable_value)
8812 (agent_set_trace_state_variable_value, agent_tsv_read)
8813 (agent_mem_read_string, get_raw_reg_func_addr)
8814 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8815 * tracepoint.h: ... this new file.
8816
8817 2013-09-05 Pedro Alves <palves@redhat.com>
8818
8819 * server.h (perror_with_name, error, fatal, warning, paddress)
8820 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8821 include it.
8822 * utils.h: New file.
8823
8824 2013-09-05 Pedro Alves <palves@redhat.com>
8825
8826 * server.h (remote_debug, noack_mode, transport_is_reliable)
8827 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8828 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8829 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8830 (write_enn, initialize_async_io, enable_async_io)
8831 (disable_async_io, check_remote_input_interrupt_request)
8832 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8833 (dead_thread_notify, prepare_resume_reply)
8834 (decode_address_to_semicolon, decode_address, decode_m_packet)
8835 (decode_M_packet, decode_X_packet, decode_xfer_write)
8836 (decode_search_memory_packet, unhexify, hexify)
8837 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8838 (look_up_one_symbol, relocate_instruction)
8839 (monitor_output): Move to remote-utils.h, and include it.
8840 * remote-utils.h: New file.
8841
8842 2013-09-05 Pedro Alves <palves@redhat.com>
8843
8844 * server.h (_): Delete.
8845
8846 2013-09-02 Pedro Alves <palves@redhat.com>
8847
8848 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8849 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8850 allocated.
8851 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8852
8853 2013-09-02 Pierre Muller <muller@sourceware.org>
8854
8855 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8856 or WriteProcessMemory complete successfully and handle
8857 ERROR_PARTIAL_COPY error.
8858
8859 2013-09-02 Pedro Alves <palves@redhat.com>
8860
8861 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8862 error instead of EIO.
8863
8864 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8865
8866 PR server/15604
8867 * linux-low.c: Include filestuff.h.
8868 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8869 * lynx-low.c: Include filestuff.h.
8870 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8871 * server.c: Include filestuff.h.
8872 (main): Call notice_open_fds.
8873 * spu-low.c: Include filestuff.h.
8874 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8875
8876 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8877
8878 * Makefile.in: Explain why ../target and ../nat are not
8879 listed as include file search paths.
8880 (linux-waitpid.o): New object file rule.
8881 * configure.srv (srv_native_linux_obj): New variable.
8882 Replace all occurrences of linux native object files with
8883 $srv_native_linux_obj.
8884 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8885 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8886 (linux_enable_event_reporting): Remove declaration.
8887 (my_waitpid): Moved to common/linux-waitpid.c.
8888 (linux_wait_for_event): Pass ptid when calling
8889 linux_enable_event_reporting.
8890 (linux_supports_tracefork_flag): Remove.
8891 (linux_enable_event_reporting): Likewise.
8892 (linux_tracefork_grandchild): Remove.
8893 (STACK_SIZE): Moved to common/linux-ptrace.c.
8894 (linux_tracefork_child): Remove.
8895 (linux_test_for_tracefork): Remove.
8896 (linux_look_up_symbols): Call linux_supports_traceclone.
8897 (initialize_low): Remove call to linux_test_for_tracefork.
8898 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8899 common/linux-ptrace.h.
8900 (PTRACE_TYPE_ARG4): Likewise.
8901 Include linux-ptrace.h.
8902
8903 2013-08-21 Pedro Alves <palves@redhat.com>
8904
8905 * config.in: Renegerate.
8906
8907 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8908
8909 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8910 (SFILES): Remove $(srcdir)/common/target-common.c and
8911 add $(srcdir)/target/waitstatus.c.
8912 (OBS): Remove target-common.o and add waitstatus.o.
8913 (server_h): Remove $(srcdir)/../common/target-common.h and
8914 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8915 and $(srcdir)/../target/waitstatus.h.
8916 (target-common.o): Remove.
8917 (waitstatus.o): New target object file.
8918 * target.h: Do not include target-common.h and
8919 include target/resume.h, target/wait.h and
8920 target/waitstatus.h.
8921
8922 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8923
8924 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8925 to PTRACE_TYPE_ARG3.
8926 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8927 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8928 PTRACE_TYPE_ARG4.
8929 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8930 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8931
8932 2013-07-27 Jie Zhang <jie@codesourcery.com>
8933 Daniel Jacobowitz <dan@codesourcery.com>
8934 Yao Qi <yao@codesourcery.com>
8935
8936 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8937 (mips-linux-watch.o): New rule.
8938 (mips_linux_watch_h): New variable.
8939 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8940 srv_tgtobj.
8941 * linux-mips-low.c: Include mips-linux-watch.h.
8942 (struct arch_process_info, struct arch_lwp_info): New.
8943 (update_watch_registers_callback): New function.
8944 (mips_linux_new_process, mips_linux_new_thread) New functions.
8945 (mips_linux_prepare_to_resume, mips_insert_point): New
8946 functions.
8947 (mips_remove_point, mips_stopped_by_watchpoint): New
8948 functions.
8949 (rsp_bp_type_to_target_hw_bp_type): New function.
8950 (mips_stopped_data_address): New function.
8951 (the_low_target): Add watchpoint support functions.
8952
8953 2013-07-27 Yao Qi <yao@codesourcery.com>
8954
8955 * i386-low.c: Include break-common.h.
8956 (enum target_hw_bp_type): Remove.
8957
8958 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8959
8960 * Makefile.in (SFILES): /common/target-common.c.
8961 (OBS): Add target-common.o.
8962 (server_h): Add $(srcdir)/../common/target-common.h.
8963 (target-common.o): New target.
8964 * server.c (queue_stop_reply_callback): Free
8965 status string after use.
8966 * target.c (target_waitstatus_to_string): Remove.
8967 * target.h: Include target-common.h.
8968 (resume_kind): Likewise.
8969 (target_waitkind): Likewise.
8970 (target_waitstatus): Likewise.
8971 (TARGET_WNOHANG): Likewise.
8972
8973 2013-07-04 Yao Qi <yao@codesourcery.com>
8974
8975 * Makefile.in (host_alias): Use @host_noncanonical@.
8976 (target_alias): Use @target_noncanonical@.
8977 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8978 ACX_NONCANONICAL_HOST.
8979 * configure: Regenerated.
8980
8981 Revert:
8982 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8983
8984 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8985 * configure: Rebuild.
8986 * Makefile.in (version_host, version_target): Get from configure.
8987 (version.c): Use $(version_host) and $(version_target).
8988
8989 2013-07-03 Pedro Alves <palves@redhat.com>
8990
8991 * Makefile.in (config.status): Depend on development.sh.
8992 * acinclude.m4: Include libmcheck.m4.
8993 * configure: Regenerate.
8994
8995 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8996
8997 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8998 attribute inside the parentheses.
8999 (winapi_DebugSetProcessKillOnExit): Ditto.
9000 (winapi_DebugBreakProcess): Ditto.
9001 (winapi_GenerateConsoleCtrlEvent): Ditto.
9002
9003 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9004
9005 * notif.h (notif_event): Add a dummy member to avoid compiler
9006 errors.
9007
9008 2013-07-01 Pedro Alves <palves@redhat.com>
9009
9010 * hostio.c (HOSTIO_PATH_MAX): Define.
9011 (require_filename, handle_open, handle_unlink, handle_readlink):
9012 Use it.
9013
9014 2013-07-01 Pedro Alves <palves@redhat.com>
9015
9016 * server.h: Include "pathmax.h".
9017 * linux-low.c: Don't include sys/param.h.
9018 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9019 MAXPATHLEN.
9020 * win32-low.c: Don't include sys/param.h.
9021 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9022
9023 2013-07-01 Pedro Alves <palves@redhat.com>
9024
9025 * event-loop.c: Don't check HAVE_UNISTD_H before including
9026 <unistd.h>.
9027 * gdbreplay.c: Likewise.
9028 * remote-utils.c: Likewise.
9029 * server.c: Likewise.
9030 * configure.ac: Don't check for unistd.h.
9031 * configure: Regenerate.
9032
9033 2013-06-28 Tom Tromey <tromey@redhat.com>
9034
9035 * Makefile.in (version.c): Use version.in, not
9036 common/version.in.
9037
9038 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9039
9040 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9041 * configure: Rebuild.
9042 * Makefile.in (version_host, version_target): Get from configure.
9043 (version.c): Use $(version_host) and $(version_target).
9044
9045 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9046
9047 Fix trace-status to output user name without trailing colon.
9048 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9049
9050 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9051
9052 Fix trace-status to output proper start-time and stop-time.
9053 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9054 output start time and stop time in hex as gdb expects.
9055
9056 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9057
9058 * tracepoint.c (build_traceframe_info_xml): Output trace state
9059 variables present in the trace buffer.
9060
9061 2013-06-24 Tom Tromey <tromey@redhat.com>
9062
9063 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9064 create-version.sh.
9065 (version.o): Remove.
9066 * gdbreplay.c: Include version.h.
9067 (version, host_name): Don't declare.
9068 * server.h: Include version.h.
9069 (version, host_name): Don't declare.
9070
9071 2013-06-12 Pedro Alves <palves@redhat.com>
9072
9073 * linux-x86-low.c (linux_is_elf64): Delete global.
9074 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9075 with local linux_pid_exe_is_elf_64_file use.
9076
9077 2013-06-11 Pedro Alves <palves@redhat.com>
9078
9079 * linux-low.c (regset_disabled, disable_regset): New functions.
9080 (regsets_fetch_inferior_registers)
9081 (regsets_store_inferior_registers): Use them.
9082 (initialize_regsets_info); Don't allocate the disabled_regsets
9083 array here.
9084 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9085 comment.
9086
9087 2013-06-11 Pedro Alves <palves@redhat.com>
9088
9089 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9090 xmalloc.
9091
9092 2013-06-11 Pedro Alves <palves@redhat.com>
9093
9094 * linux-x86-low.c (initialize_low_arch): Call
9095 init_registers_x32_avx_linux.
9096
9097 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9098
9099 Fix compatibility with Android Bionic.
9100 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9101 it is not empty.
9102
9103 2013-06-07 Pedro Alves <palves@redhat.com>
9104
9105 PR server/14823
9106 * Makefile.in (OBS): Add tdesc.o.
9107 (IPA_OBJS): Add tdesc-ipa.o.
9108 (tdesc-ipa.o): New rule.
9109 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9110 interface.
9111 * linux-low.c (new_inferior): Delete.
9112 (disabled_regsets, num_regsets): Delete.
9113 (linux_add_process): Adjust to set the new per-process
9114 new_inferior flag.
9115 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9116 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9117 was a stop. When calling arch_setup, switch the current inferior
9118 to the thread that got an event.
9119 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9120 (regsets_fetch_inferior_registers)
9121 (regsets_store_inferior_registers): New regsets_info parameter.
9122 Adjust to use it.
9123 (linux_register_in_regsets): New regs_info parameter. Adjust to
9124 use it.
9125 (register_addr, fetch_register, store_register): New usrregs_info
9126 parameter. Adjust to use it.
9127 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9128 parameter regs_info. Adjust to use it.
9129 (linux_fetch_registers): Get the current inferior's regs_info, and
9130 adjust to use it.
9131 (linux_store_registers): Ditto.
9132 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9133 (initialize_low): Don't initialize the target_regsets here. Call
9134 initialize_low_arch.
9135 * linux-low.h (target_regsets): Delete declaration.
9136 (struct regsets_info): New.
9137 (struct usrregs_info): New.
9138 (struct regs_info): New.
9139 (struct process_info_private) <new_inferior>: New field.
9140 (struct linux_target_ops): Delete the num_regs, regmap, and
9141 regset_bitmap fields. New field regs_info.
9142 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9143 * i387-fp.c (num_xmm_registers): Delete.
9144 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9145 calls to new interface.
9146 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9147 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9148 Infer the number of xmm registers from the regcache's target
9149 description.
9150 * i387-fp.h (num_xmm_registers): Delete.
9151 * inferiors.c (add_thread): Don't install the thread's regcache
9152 here.
9153 * proc-service.c (gregset_info): Fetch the current inferior's
9154 regs_info. Adjust to use it.
9155 * regcache.c: Include tdesc.h.
9156 (register_bytes, reg_defs, num_registers)
9157 (gdbserver_expedite_regs): Delete.
9158 (get_thread_regcache): If the thread doesn't have a regcache yet,
9159 create one, instead of aborting gdbserver.
9160 (regcache_invalidate_one): Rename to ...
9161 (regcache_invalidate_thread): ... this.
9162 (regcache_invalidate_one): New.
9163 (regcache_invalidate): Only invalidate registers of the current
9164 process.
9165 (init_register_cache): Add target_desc parameter, and use it.
9166 (new_register_cache): Ditto. Assert the target description has a
9167 non zero registers_size.
9168 (regcache_cpy): Add assertions. Adjust.
9169 (realloc_register_cache, set_register_cache): Delete.
9170 (registers_to_string, registers_from_string): Adjust.
9171 (find_register_by_name, find_regno, find_register_by_number)
9172 (register_cache_size): Add target_desc parameter, and use it.
9173 (free_register_cache_thread, free_register_cache_thread_one)
9174 (regcache_release, register_cache_size): New.
9175 (register_size): Add target_desc parameter, and use it.
9176 (register_data, supply_register, supply_register_zeroed)
9177 (supply_regblock, supply_register_by_name, collect_register)
9178 (collect_register_as_string, collect_register_by_name): Adjust.
9179 * regcache.h (struct target_desc): Forward declare.
9180 (struct regcache) <tdesc>: New field.
9181 (init_register_cache, new_register_cache): Add target_desc
9182 parameter.
9183 (regcache_invalidate_thread): Declare.
9184 (regcache_invalidate_one): Delete declaration.
9185 (regcache_release): Declare.
9186 (find_register_by_number, register_cache_size, register_size)
9187 (find_regno): Add target_desc parameter.
9188 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9189 declarations.
9190 * remote-utils.c: Include tdesc.h.
9191 (outreg, prepare_resume_reply): Adjust.
9192 * server.c: Include tdesc.h.
9193 (gdbserver_xmltarget): Delete declaration.
9194 (get_features_xml, process_serial_event): Adjust.
9195 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9196 declare.
9197 (struct process_info) <tdesc>: New field.
9198 (ipa_tdesc): Declare.
9199 * tdesc.c: New file.
9200 * tdesc.h: New file.
9201 * tracepoint.c: Include tdesc.h.
9202 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9203 (get_context_regcache): Adjust to pass ipa_tdesc down.
9204 (do_action_at_tracepoint): Adjust to get the register cache size
9205 from the context regcache's description.
9206 (traceframe_walk_blocks): Adjust to get the register cache size
9207 from the current trace frame's description.
9208 (traceframe_get_pc): Adjust to get current trace frame's
9209 description and pass it down.
9210 (gdb_collect): Adjust to get the register cache size from the
9211 IPA's description.
9212 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9213 (gdbserver_xmltarget): Delete.
9214 (initialize_low_tracepoint): Set the ipa's target description.
9215 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9216 (initialize_low_tracepoint): Set the ipa's target description.
9217 * linux-x86-low.c: Include tdesc.h.
9218 [__x86_64__] (is_64bit_tdesc): New.
9219 (ps_get_thread_area, x86_get_thread_area): Use it.
9220 (i386_cannot_store_register): Rename to ...
9221 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9222 (i386_cannot_fetch_register): Rename to ...
9223 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9224 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9225 to new interface.
9226 (target_regsets): Rename to ...
9227 (x86_regsets): ... this.
9228 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9229 interface.
9230 (x86_siginfo_fixup): Use is_64bit_tdesc.
9231 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9232 (tdesc_x32_avx_linux, tdesc_x32_linux)
9233 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9234 Declare.
9235 (x86_linux_update_xmltarget): Delete.
9236 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9237 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9238 (AMD64_LINUX_USER64_CS): New.
9239 (x86_linux_read_description): New, based on
9240 x86_linux_update_xmltarget.
9241 (same_process_callback): New.
9242 (x86_arch_setup_process_callback): New.
9243 (x86_linux_update_xmltarget): New.
9244 (x86_regsets_info): New.
9245 (amd64_linux_regs_info): New.
9246 (i386_linux_usrregs_info): New.
9247 (i386_linux_regs_info): New.
9248 (x86_linux_regs_info): New.
9249 (x86_arch_setup): Reimplement.
9250 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9251 (x86_emit_ops): Ditto.
9252 (the_low_target): Adjust. Install x86_linux_regs_info,
9253 x86_cannot_fetch_register, and x86_cannot_store_register.
9254 (initialize_low_arch): New.
9255 * linux-ia64-low.c (tdesc_ia64): Declare.
9256 (ia64_fetch_register): Adjust.
9257 (ia64_usrregs_info, regs_info): New globals.
9258 (ia64_regs_info): New function.
9259 (the_low_target): Adjust.
9260 (initialize_low_arch): New function.
9261 * linux-sparc-low.c (tdesc_sparc64): Declare.
9262 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9263 Adjust.
9264 (sparc_arch_setup): New function.
9265 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9266 (the_low_target): Adjust.
9267 (initialize_low_arch): New function.
9268 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9269 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9270 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9271 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9272 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9273 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9274 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9275 (tdesc_powerpc_isa205_vsx64l): Declare.
9276 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9277 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9278 (ppc_set_pc, ppc_get_hwcap): Adjust.
9279 (ppc_usrregs_info): Forward declare.
9280 (!__powerpc64__) ppc_regmap_adjusted: New global.
9281 (ppc_arch_setup): Adjust to the current process'es target
9282 description.
9283 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9284 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9285 (ppc_store_evrregset): Adjust.
9286 (target_regsets): Rename to ...
9287 (ppc_regsets): ... this, and make static.
9288 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9289 (ppc_regs_info): New function.
9290 (the_low_target): Adjust.
9291 (initialize_low_arch): New function.
9292 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9293 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9294 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9295 (tdesc_s390x_linux64v2): Declare.
9296 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9297 (s390_fill_gregset, s390_store_last_break): Adjust.
9298 (target_regsets): Rename to ...
9299 (s390_regsets): ... this, and make static.
9300 (s390_get_pc, s390_set_pc): Adjust.
9301 (s390_get_hwcap): New target_desc parameter, and use it.
9302 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9303 (s390_arch_setup): Adjust to set the current process'es target
9304 description. Don't adjust the regmap.
9305 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9306 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9307 (regs_info_3264): New globals.
9308 (s390_regs_info): New function.
9309 (the_low_target): Adjust.
9310 (initialize_low_arch): New function.
9311 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9312 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9313 [__mips64] (init_registers_mips_linux)
9314 (init_registers_mips_dsp_linux): Delete defines.
9315 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9316 (have_dsp): New global.
9317 (mips_read_description): New, based on mips_arch_setup.
9318 (mips_arch_setup): Reimplement.
9319 (get_usrregs_info): New function.
9320 (mips_cannot_fetch_register, mips_cannot_store_register)
9321 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9322 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9323 (target_regsets): Rename to ...
9324 (mips_regsets): ... this, and make static.
9325 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9326 (dsp_regs_info, regs_info): New globals.
9327 (mips_regs_info): New function.
9328 (the_low_target): Adjust.
9329 (initialize_low_arch): New function.
9330 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9331 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9332 Declare.
9333 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9334 (arm_read_description): New, with bits factored from
9335 arm_arch_setup.
9336 (arm_arch_setup): Reimplement.
9337 (target_regsets): Rename to ...
9338 (arm_regsets): ... this, and make static.
9339 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9340 (arm_regs_info): New function.
9341 (the_low_target): Adjust.
9342 (initialize_low_arch): New function.
9343 * linux-m68k-low.c (tdesc_m68k): Declare.
9344 (target_regsets): Rename to ...
9345 (m68k_regsets): ... this, and make static.
9346 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9347 (m68k_regs_info): New function.
9348 (m68k_arch_setup): New function.
9349 (the_low_target): Adjust.
9350 (initialize_low_arch): New function.
9351 * linux-sh-low.c (tdesc_sharch): Declare.
9352 (target_regsets): Rename to ...
9353 (sh_regsets): ... this, and make static.
9354 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9355 (sh_regs_info, sh_arch_setup): New functions.
9356 (the_low_target): Adjust.
9357 (initialize_low_arch): New function.
9358 * linux-bfin-low.c (tdesc_bfin): Declare.
9359 (bfin_arch_setup): New function.
9360 (bfin_usrregs_info, regs_info): New globals.
9361 (bfin_regs_info): New function.
9362 (the_low_target): Adjust.
9363 (initialize_low_arch): New function.
9364 * linux-cris-low.c (tdesc_cris): Declare.
9365 (cris_arch_setup): New function.
9366 (cris_usrregs_info, regs_info): New globals.
9367 (cris_regs_info): New function.
9368 (the_low_target): Adjust.
9369 (initialize_low_arch): New function.
9370 * linux-cris-low.c (tdesc_crisv32): Declare.
9371 (cris_arch_setup): New function.
9372 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9373 (cris_regs_info): New function.
9374 (the_low_target): Adjust.
9375 (initialize_low_arch): New function.
9376 * linux-m32r-low.c (tdesc_m32r): Declare.
9377 (m32r_arch_setup): New function.
9378 (m32r_usrregs_info, regs_info): New globals.
9379 (m32r_regs_info): Adjust.
9380 (initialize_low_arch): New function.
9381 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9382 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9383 (tic6x_usrregs_info): Forward declare.
9384 (tic6x_read_description): New function, based on ...
9385 (tic6x_arch_setup): ... this. Reimplement.
9386 (target_regsets): Rename to ...
9387 (tic6x_regsets): ... this, and make static.
9388 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9389 (tic6x_regs_info): New function.
9390 (the_low_target): Adjust.
9391 (initialize_low_arch): New function.
9392 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9393 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9394 (target_regsets): Rename to ...
9395 (xtensa_regsets): ... this, and make static.
9396 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9397 globals.
9398 (xtensa_arch_setup, xtensa_regs_info): New functions.
9399 (the_low_target): Adjust.
9400 (initialize_low_arch): New function.
9401 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9402 (nios2_arch_setup): Set the current process'es tdesc.
9403 (target_regsets): Rename to ...
9404 (nios2_regsets): ... this.
9405 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9406 (nios2_regs_info): New function.
9407 (the_low_target): Adjust.
9408 (initialize_low_arch): New function.
9409 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9410 (aarch64_arch_setup): Set the current process'es tdesc.
9411 (target_regsets): Rename to ...
9412 (aarch64_regsets): ... this.
9413 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9414 (aarch64_regs_info): New function.
9415 (the_low_target): Adjust.
9416 (initialize_low_arch): New function.
9417 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9418 globals.
9419 (target_regsets): Rename to ...
9420 (tile_regsets): ... this.
9421 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9422 (tile_regs_info): New function.
9423 (tile_arch_setup): Set the current process'es tdesc.
9424 (the_low_target): Adjust.
9425 (initialize_low_arch): New function.
9426 * spu-low.c (tdesc_spu): Declare.
9427 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9428 * win32-arm-low.c (tdesc_arm): Declare.
9429 (arm_arch_setup): New function.
9430 (the_low_target): Install arm_arch_setup instead of
9431 init_registers_arm.
9432 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9433 (init_windows_x86): Rename to ...
9434 (i386_arch_setup): ... this. Set `win32_tdesc'.
9435 (the_low_target): Adjust.
9436 * win32-low.c (win32_tdesc): New global.
9437 (child_add_thread): Don't create the thread cache here.
9438 (do_initial_child_stuff): Set the new process'es tdesc.
9439 * win32-low.h (struct target_desc): Forward declare.
9440 (win32_tdesc): Declare.
9441 * lynx-i386-low.c (tdesc_i386): Declare global.
9442 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9443 * lynx-low.c (lynx_tdesc): New global.
9444 (lynx_add_process): Set the new process'es tdesc.
9445 * lynx-low.h (struct target_desc): Forward declare.
9446 (lynx_tdesc): Declare global.
9447 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9448 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9449 * nto-low.c (nto_tdesc): New global.
9450 (do_attach): Set the new process'es tdesc.
9451 * nto-low.h (struct target_desc): Forward declare.
9452 (nto_tdesc): Declare.
9453 * nto-x86-low.c (tdesc_i386): Declare.
9454 (nto_x86_arch_setup): Set `nto_tdesc'.
9455
9456 2013-06-04 Gary Benson <gbenson@redhat.com>
9457
9458 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9459 to qSupported response when appropriate.
9460 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9461 with nonzero-length annex.
9462 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9463 arguments supplied in annex.
9464
9465 2013-05-31 Doug Evans <dje@google.com>
9466
9467 PR server/15594
9468 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9469 64 bits in 64-cross-32 environment.
9470
9471 2013-05-28 Pedro Alves <palves@redhat.com>
9472
9473 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9474 (aarch64-without-fpu.c): Delete rule.
9475 * configure.srv (aarch64*-*-linux*): Remove references to
9476 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9477 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9478 declaration.
9479
9480 2013-05-24 Pedro Alves <palves@redhat.com>
9481
9482 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9483 instead of strchr/decode_address. Error if the range isn't split
9484 with a ','. Don't assume there's be a ':' in the action.
9485
9486 2013-05-23 Yao Qi <yao@codesourcery.com>
9487 Pedro Alves <palves@redhat.com>
9488
9489 * linux-low.c (lwp_in_step_range): New function.
9490 (linux_wait_1): If the thread was range stepping and stopped
9491 outside the stepping range, report the stop to GDB. Otherwise,
9492 continue stepping. Add range stepping debug output.
9493 (linux_set_resume_request): Copy the step range from the resume
9494 request to the lwp.
9495 (linux_supports_range_stepping): New.
9496 (linux_target_ops) <supports_range_stepping>: Set to
9497 linux_supports_range_stepping.
9498 * linux-low.h (struct linux_target_ops)
9499 <supports_range_stepping>: New field.
9500 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9501 * linux-x86-low.c (x86_supports_range_stepping): New.
9502 (the_low_target) <supports_range_stepping>: Set to
9503 x86_supports_range_stepping.
9504 * server.c (handle_v_cont): Handle 'r' action.
9505 (handle_v_requests): Append ";r" if the target supports range
9506 stepping.
9507 * target.h (struct thread_resume) <step_range_start,
9508 step_range_end>: New fields.
9509 (struct target_ops) <supports_range_stepping>:
9510 New field.
9511 (target_supports_range_stepping): New macro.
9512
9513 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9514
9515 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9516 confusion in comment.
9517
9518 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9519
9520 * lynx-low.c (struct process_info_private): New type.
9521 (lynx_add_process): New function.
9522 (lynx_create_inferior, lynx_attach): Replace calls to
9523 add_process by calls to lynx_add_process.
9524 (lynx_resume): If PTID is null, then try using
9525 current_process()->private->last_wait_event_ptid.
9526 Add comments.
9527 (lynx_clear_inferiors): Delete. The contents of that function
9528 has been inlined in lynx_mourn;
9529 (lynx_wait_1): Save the ptid in the process's private data.
9530 (lynx_mourn): Free the process' private data. Replace call
9531 to lynx_clear_inferiors by call to clear_inferiors.
9532
9533 2013-05-17 Yao Qi <yao@codesourcery.com>
9534
9535 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9536 the right place.
9537
9538 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9539
9540 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9541 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9542 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9543 PT_TEXT_END_ADDR guards. Update comments.
9544 (linux_target_op) <read_offsets>: Conditionally define to
9545 linux_read_offsets if the target is UCLIBC and if it defines
9546 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9547
9548 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9549 Andrew Jenner <andrew@codesourcery.com>
9550
9551 * Makefile.in (SFILES): Add linux-nios2-low.c.
9552 (clean): Add action to delete nios2-linux.c.
9553 (nios2-linux.c): New rule.
9554 * configure.srv: Add nios2*-*-linux*.
9555 * linux-nios2-low.c: New.
9556
9557 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9558
9559 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9560
9561 2013-04-25 Hui Zhu <hui@codesourcery.com>
9562
9563 PR gdb/15186
9564 * ax.c (ax_printf): Add fflush.
9565
9566 2013-04-22 Tom Tromey <tromey@redhat.com>
9567
9568 * Makefile.in (SFILES): Add filestuff.c.
9569 (OBS): Add filestuff.o.
9570 (filestuff.o): New target.
9571 * config.in, configure: Rebuild.
9572 * configure.ac: Check for fdwalk, pipe2.
9573
9574 2013-04-17 Pedro Alves <palves@redhat.com>
9575
9576 * configure.ac (USE_THREAD_DB): Delete variable.
9577 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9578 Don't AC_SUBST USE_THREAD_DB.
9579 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9580 * config.in, configure: Regenerate.
9581
9582 2013-04-16 Pedro Alves <palves@redhat.com>
9583
9584 * linux-low.h (struct lwp_info) <thread_known>: Move under
9585 the USE_THREAD_DB #ifdef.
9586
9587 2013-04-16 Pedro Alves <palves@redhat.com>
9588
9589 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9590 (linux-low.o): Delete rule.
9591 * linux-low.h: Always include "gdb_thread_db.h" instead of
9592 conditionally including thread_db.h.
9593 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9594 HAVE_THREAD_DB_H.
9595
9596 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9597
9598 * Makefile.in (install-only): Fix make install regression.
9599
9600 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9601
9602 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9603 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9604 installation.
9605 * gdbserver.1: Remove.
9606
9607 2013-03-22 Pedro Alves <palves@redhat.com>
9608
9609 * linux-low.c (handle_extended_wait): Don't call
9610 linux_enable_event_reporting.
9611
9612 2013-03-15 Tony Theodore <tonyt@logyst.com>
9613
9614 PR build/9098:
9615 * Makefile.in (SHELL): Use @SHELL@.
9616
9617 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9618
9619 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9620 compiler warning.
9621
9622 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9623
9624 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9625 Remove extraneous NULL element.
9626
9627 2013-03-13 Yao Qi <yao@codesourcery.com>
9628
9629 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9630 'V' block in trace frame.
9631
9632 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9633
9634 * target.h (struct target_ops): Add btrace ops.
9635 (target_supports_btrace): New macro.
9636 (target_enable_btrace): New macro.
9637 (target_disable_btrace): New macro.
9638 (target_read_btrace): New macro.
9639 * gdbthread.h (struct thread_info): Add btrace field.
9640 * server.c: Include btrace-common.h.
9641 (handle_btrace_general_set): New function.
9642 (handle_btrace_enable): New function.
9643 (handle_btrace_disable): New function.
9644 (handle_general_set): Call handle_btrace_general_set.
9645 (handle_qxfer_btrace): New function.
9646 (struct qxfer qxfer_packets[]): Add btrace entry.
9647 * inferiors.c (remove_thread): Disable btrace.
9648 * linux-low: Include linux-btrace.h.
9649 (linux_low_enable_btrace): New function.
9650 (linux_low_read_btrace): New function.
9651 (linux_target_ops): Add btrace ops.
9652 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9653 Add srv_linux_btrace=yes.
9654 (x86_64-*-linux*): Add linux-btrace.o.
9655 Add srv_linux_btrace=yes.
9656 * configure.ac: Define HAVE_LINUX_BTRACE.
9657 * config.in: Regenerated.
9658 * configure: Regenerated.
9659
9660 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9661
9662 * server.c (handle_qxfer): Preserve error message if -3 is
9663 returned.
9664 (qxfer): Document the -3 return value.
9665
9666 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9667
9668 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9669 (linux_btrace_h): New variable.
9670 (linux-btrace.o): New rule.
9671
9672 2013-03-08 Stan Shebs <stan@codesourcery.com>
9673 Hafiz Abid Qadeer <abidh@codesourcery.com>
9674
9675 * tracepoint.c (trace_buffer_size): New global.
9676 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9677 (init_trace_buffer): Change to one-argument function. Allocate
9678 trace buffer memory.
9679 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9680 handle QTBuffer:size packet.
9681 (cmd_bigqtbuffer_size): New function.
9682 (initialize_tracepoint): Call init_trace_buffer with
9683 DEFAULT_TRACE_BUFFER_SIZE.
9684 * server.c (handle_query): Add QTBuffer:size in the
9685 supported packets.
9686
9687 2013-03-07 Yao Qi <yao@codesourcery.com>
9688
9689 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9690 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9691 of -1.
9692 (cmd_qtsp): Adjust condition. Do post increment.
9693 Set cur_action and cur_step_action back to 0.
9694
9695 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9696
9697 PR server/15236
9698 * linux-low.c (linux_write_memory): Return early success if LEN is
9699 zero.
9700
9701 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9702
9703 * configure.srv: Add x86_64-*-cygwin* as target.
9704
9705 2013-02-28 Tom Tromey <tromey@redhat.com>
9706
9707 * configure.ac: Invoke AC_SYS_LARGEFILE.
9708 * configure, config.in: Rebuild.
9709
9710 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9711
9712 * win32-low.c: Throughout, fix format strings and casts of
9713 printf-like functions to avoid type related warnings on all
9714 platforms.
9715 (get_child_debug_event): Print dwDebugEventCode as hex since
9716 that's how it's usually documented.
9717
9718 2013-02-28 Yao Qi <yao@codesourcery.com>
9719
9720 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9721 pulongest.
9722
9723 2013-02-27 Jiong Wang <jiwang@tilera.com>
9724
9725 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9726 (reg-tilegx32.c): New rule.
9727 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9728 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9729 different register info initializer according to elf class.
9730 (init_registers_tilgx32): New function. The tilegx32 register info
9731 initializer.
9732 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9733 (tile_store_gregset): Likewise.
9734
9735 2013-02-27 Yao Qi <yao@codesourcery.com>
9736
9737 * server.c (process_point_options): Print debug message when
9738 debug_threads is true.
9739
9740 2013-02-26 Yao Qi <yao@codesourcery.com>
9741
9742 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9743
9744 2013-02-19 Pedro Alves <palves@redhat.com>
9745 Kai Tietz <ktietz@redhat.com>
9746
9747 PR gdb/15161
9748
9749 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9750 instead of strtoul to extract address from packet.
9751 (process_serial_event) <'z'>: Likewise.
9752
9753 2013-02-18 Yao Qi <yao@codesourcery.com>
9754
9755 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9756
9757 2013-02-14 Pedro Alves <palves@redhat.com>
9758
9759 Plug memory leak.
9760
9761 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9762 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9763
9764 2013-02-14 Pedro Alves <palves@redhat.com>
9765
9766 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9767
9768 2013-02-14 Pedro Alves <palves@redhat.com>
9769
9770 * tracepoint.c (save_string): Delete.
9771 (add_tracepoint_action): Use savestring instead of save_string.
9772
9773 2013-02-12 Pedro Alves <palves@redhat.com>
9774
9775 * linux-xtensa-low.c: Ditto.
9776 * xtensa-xtregs.c: Ditto.
9777
9778 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9779
9780 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9781 thread_db.
9782
9783 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9784
9785 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9786 aarch64_num_wp_regs and aarch64_num_bp_regs to
9787 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9788
9789 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9790
9791 * linux-aarch64-low.c (ps_get_thread_area): Replace
9792 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9793
9794 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9795 Marcus Shawcroft <marcus.shawcroft@arm.com>
9796 Nigel Stephens <nigel.stephens@arm.com>
9797 Yufeng Zhang <yufeng.zhang@arm.com>
9798
9799 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9800 (aarch64.c, aarch64-without-fpu.c): New targets.
9801 * configure.srv (aarch64*-*-linux*): New.
9802 * linux-aarch64-low.c: New file.
9803
9804 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9805
9806 * linux-low.c (handle_extended_wait, linux_create_inferior)
9807 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9808 (dequeue_one_deferred_signal, linux_resume_one_thread)
9809 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9810 (linux_tracefork_grandchild, linux_test_for_tracefork)
9811 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9812 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9813 where the argument is 0.
9814
9815 2013-01-25 Yao Qi <yao@codesourcery.com>
9816
9817 * event-loop.c: Include "queue.h".
9818 (gdb_event_p): New typedef.
9819 (struct gdb_event) <next_event>: Remove.
9820 (event_queue): Change to QUEUE(gdb_event_p).
9821 (async_queue_event): Remove.
9822 (gdb_event_xfree): New.
9823 (initialize_event_loop): New.
9824 (process_event): Use API from QUEUE.
9825 (wait_for_event): Likewise.
9826 * server.c (main): Call initialize_event_loop.
9827 * server.h (initialize_event_loop): Declare.
9828
9829 2013-01-18 Yao Qi <yao@codesourcery.com>
9830
9831 * ax.h (struct eval_agent_expr_context): New.
9832 (gdb_eval_agent_expr): Update declaration.
9833 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9834 TFRAME. Add new argument CTX.
9835 * server.h (struct eval_agent_expr_context): Declare.
9836 (agent_mem_read, agent_tsv_read): Update declaration.
9837 (agent_mem_read_string): Likewise.
9838 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9839 (add_traceframe_block): Add new argument TPOINT.
9840 Increase TPOINT->traceframe_usage.
9841 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9842 eval_tracepoint_agent_expr.
9843 (condition_true_at_tracepoint): Likewise.
9844 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9845 (agent_mem_read_string, agent_tsv_read): Likewise.
9846
9847 2013-01-16 Yao Qi <yao@codesourcery.com>
9848
9849 * linux-low.c (linux_resume_one_lwp): Don't check
9850 'lwp->bp_reinsert != 0'.
9851
9852 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9853 Pedro Alves <palves@redhat.com>
9854
9855 * lynx-low.c (ptrace_request_to_str): Define a temporary
9856 macro and use it to simplify this function's implementation.
9857
9858 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9859
9860 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9861 sets errno.
9862
9863 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9864
9865 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9866
9867 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9868
9869 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9870
9871 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9872
9873 * lynx-low.c (lynx_resume): Use the resume_info parameter
9874 to determine the ptid for the lynx_ptrace call, unless
9875 it is equal to minus_one_ptid, in which case we use the
9876 ptid of the current_inferior.
9877 (lynx_wait_1): After having received a thread create/exit
9878 event, resume the inferior's execution using the signaling
9879 thread's ptid, rather than the old ptid.
9880
9881 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9882
9883 * lynx-low.c (lynx_resume): Delete variable ret.
9884
9885 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9886
9887 * gdbreplay.c (gdbreplay_version): Update copyright year.
9888 * server.c (gdbserver_version): Likewise.
9889
9890 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9891
9892 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9893 new thread.
9894
9895 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9896
9897 * lynx-low.c (ptrace_request_to_str): Add handling for
9898 PTRACE_GETTRACESIG.
9899
9900 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9901
9902 * lynx-low.c (lynx_attach): Delete variable new_process.
9903
9904 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9905
9906 * lynx-low.c (lynx_create_inferior): Delete variable
9907 new_process.
9908
9909 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9910
9911 * lynx-low.c (ptrace_request_to_str): Do not handle
9912 PTRACE_GETTHREADLIST if this macro does not exist.
9913
9914 2012-12-15 Yao Qi <yao@codesourcery.com>
9915
9916 * Makefile.in (OBS): Add notif.o.
9917 * notif.c, notif.h: New.
9918 * server.c: Include "notif.h".
9919 (struct vstop_notif) <next>: Remove.
9920 <base>: New field.
9921 (queue_stop_reply): Update.
9922 (push_event, send_next_stop_reply): Remove.
9923 (discard_queued_stop_replies): Update.
9924 (notif_stop): New variable.
9925 (handle_v_stopped): Remove.
9926 (handle_v_requests): Don't call handle_v_stopped. Call
9927 handle_ack_notif instead.
9928 (queue_stop_reply_callback): Call notif_event_enque instead
9929 of queue_stop_reply.
9930 (handle_status): Don't call send_next_stop_reply, call
9931 notif_write_event instead.
9932 (kill_inferior_callback): Likewise.
9933 (detach_or_kill_inferior_callback): Likewise.
9934 (main): Call initialize_notif.
9935 (process_serial_event): Call QUEUE_is_empty.
9936 (handle_target_event): Call notif_push instead of push event.
9937 * server.h (push_event): Remove declaration.
9938
9939 2012-12-10 Tom Tromey <tromey@redhat.com>
9940
9941 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9942 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9943 macros.
9944 (.c.o): Rewrite.
9945 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9946 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9947 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9948 (amd64-linux-ipa.o, ax.o): Rewrite.
9949 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9950 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9951 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9952 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9953 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9954 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9955 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9956 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9957 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9958 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9959 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9960 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9961 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9962 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9963 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9964 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9965 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9966 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9967 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9968 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9969 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9970 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9971 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9972 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9973 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9974 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9975 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9976 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9977 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9978 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9979 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9980 (reg-tilegx.o): Remove.
9981 (all_object_files): New macro.
9982 Include .deps files.
9983 * aclocal.m4, configure: Rebuild.
9984 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9985 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9986 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9987
9988 2012-12-05 Tom Tromey <tromey@redhat.com>
9989
9990 PR gdb/14917:
9991 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9992
9993 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9994
9995 * configure.ac: Check for linux/perf_event.h.
9996 * config.in: Regenerated.
9997 * configure: Regenerated.
9998
9999 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10000
10001 * hostio.c (handle_readlink): Decrease buffer size
10002 parameter passed to readlink by one byte.
10003
10004 2012-11-26 Yao Qi <yao@codesourcery.com>
10005
10006 * configure.ac (build_warnings): Append '-Wempty-body'.
10007 * configure: Regenerated.
10008 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10009 body.
10010
10011 2012-11-15 Pierre Muller <muller@sourceware.org>
10012
10013 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10014 * config.in: Regenerate.
10015 * configure: Regenerate.
10016 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10017 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10018 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10019 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10020 header.
10021 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10022 instead of <sys/wait.h> header.
10023 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10024
10025 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10026
10027 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10028 (various make rules): Remove -DGDBSERVER
10029
10030 2012-11-09 Yao Qi <yao@codesourcery.com>
10031
10032 * spu-low.c (current_ptid): Move it to ..
10033 * gdbthread.h: ... here. New.
10034 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10035 * server.c (myresume, process_serial_event): Likewise.
10036 * thread-db.c (thread_db_find_new_threads): Likewise.
10037 * tracepoint.c (run_inferior_command): Likewise.
10038
10039 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10040
10041 * server.c (handle_search_memory_1): Include access length in
10042 warning message.
10043
10044 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10045
10046 * linux-crisv32-low.c: Fix compile errors.
10047
10048 2012-09-04 Yao Qi <yao@codesourcery.com>
10049
10050 * tracepoint.c (cmd_qtsv): Adjust debug message.
10051 Don't check CUR_TPOINT.
10052
10053 2012-08-28 Yao Qi <yao@codesourcery.com>
10054
10055 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10056 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10057 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10058 Remove declarations of xmalloc, xreallloc, xstrdup and
10059 freeargv.
10060 * Makefile.in (libiberty_h): New.
10061 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10062 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10063
10064 2012-08-23 Yao Qi <yao@codesourcery.com>
10065
10066 * server.h: Remove declaration of 'xsnprintf'.
10067
10068 2012-08-22 Keith Seitz <keiths@redhat.com>
10069
10070 * server.h: Include build-gnulib-gbserver/config.h.
10071 * gdbreplay.c: Likewise.
10072
10073 2012-08-08 Doug Evans <dje@google.com>
10074
10075 * Makefile.in (SFILES): Add gdb_vecs.c.
10076 (OBS): Add gdb_vecs.o.
10077 (gdb_vecs_h, host_defs_h): New variables.
10078 (thread-db.o): Add $(gdb_vecs_h) dependency.
10079 (gdb_vecs.o): New rule.
10080 * thread-db.c: #include "gdb_vecs.h".
10081 (thread_db_load_search): Use a vector to iterate over path elements.
10082 Handle text appearing after "$pdir".
10083
10084 * configure.ac: Add check for strstr.
10085 * config.in: Regenerate.
10086 * configure: Regenerate.
10087
10088 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10089
10090 * hostio.c (handle_pread): If pread fails, fall back to attempting
10091 lseek/read.
10092 (handle_pwrite): Likewise for pwrite.
10093
10094 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10095
10096 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10097 between unsupported TYPE and unimplementable ADDR/LEN combination.
10098 (arm_insert_point): Act on new return value.
10099
10100 2012-07-31 Pedro Alves <palves@redhat.com>
10101
10102 * server.c (process_point_options): Only skip tokens if we find
10103 one that is unrecognized. Don't treat 'X' specially while
10104 skipping unrecognized tokens.
10105
10106 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10107
10108 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10109 to 4-byte-align HW breakpoint addresses for Thumb.
10110
10111 2012-07-27 Yao Qi <yao@codesourcery.com>
10112
10113 PR remote/14161.
10114
10115 * server.h: Declare gdb_agent_about_to_close.
10116 * target.c (kill_inferior): Include "agent.h".
10117 New. Send command 'kill'.
10118 * target.h (kill_inferior): Removed macro.
10119 * tracepoint.c (gdb_agent_about_to_close): New.
10120 (gdb_agent_helper_thread): Handle command 'close'.
10121 Wait endlessly until the inferior stops.
10122 Install gdb_agent_remove_socket to atexit hook.
10123 (agent_socket_name): New static variable.
10124 (gdb_agent_socket_init): Replace local variable 'name' with
10125 'agent_socket_name'.
10126 (gdb_agent_remove_socket): New.
10127
10128 2012-07-27 Yao Qi <yao@codesourcery.com>
10129
10130 * server.c (process_point_options): Stop at 'X' when parsing.
10131
10132 2012-07-19 Michael Eager <eager@eagercon.com>
10133
10134 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10135 to hw_execute.
10136 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10137 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10138 hardware breakpoint.
10139
10140 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10141
10142 * gdbserver/linux-low.c (initialize_low): Call
10143 linux_ptrace_init_warnings.
10144
10145 2012-07-02 Doug Evans <dje@google.com>
10146
10147 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10148 pointer to int.
10149
10150 2012-07-02 Stan Shebs <stan@codesourcery.com>
10151
10152 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10153 (ax.o): Add it to build rule.
10154 (ax-ipa.o): Ditto.
10155 (OBS): Add format.o.
10156 (IPA_OBS): Add format.o.
10157 * server.c (handle_query): Claim support for breakpoint commands.
10158 (process_point_options): Add command case.
10159 (process_serial_event): Leave running if there are printfs in
10160 effect.
10161 * mem-break.h (any_persistent_commands): Declare.
10162 (add_breakpoint_commands): Declare.
10163 (gdb_no_commands_at_breakpoint): Declare.
10164 (run_breakpoint_commands): Declare.
10165 * mem-break.c (struct point_command_list): New struct.
10166 (struct breakpoint): New field command_list.
10167 (any_persistent_commands): New function.
10168 (add_commands_to_breakpoint): New function.
10169 (add_breakpoint_commands): New function.
10170 (gdb_no_commands_at_breakpoint): New function.
10171 (run_breakpoint_commands): New function.
10172 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10173 locally.
10174 * ax.c: Include format.h.
10175 (ax_printf): New function.
10176 (gdb_eval_agent_expr): Add printf opcode.
10177
10178 2012-06-13 Yao Qi <yao@codesourcery.com>
10179
10180 * server.c (start_inferior): Remove duplicated writes to fields
10181 'last_resume_kind' and 'last_status' of 'current_inferior'.
10182
10183 2012-06-12 Yao Qi <yao@codesourcery.com>
10184 Pedro Alves <palves@redhat.com>
10185
10186 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10187 comment.
10188 * server.c (handle_v_cont): Extend comment.
10189
10190 2012-06-11 Yao Qi <yao@codesourcery.com>
10191
10192 * linux-low.c (linux_attach): Add 'static'.
10193
10194 2012-06-06 Yao Qi <yao@codesourcery.com>
10195
10196 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10197
10198 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10199
10200 Fix gcc -flto compilation warning.
10201 * server.c (main): Make variable multi_mode and attach volatile.
10202
10203 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10204
10205 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10206 if the platform doesn't know about it.
10207
10208 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10209
10210 * Makefile.in (SFILES): Add linux-tile-low.c.
10211 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10212 * configure.srv: Handle tilegx-*-linux*.
10213 * linux-tile-low.c: New file.
10214
10215 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10216
10217 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10218
10219 2012-05-24 Pedro Alves <palves@redhat.com>
10220
10221 PR gdb/7205
10222
10223 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10224
10225 2012-05-24 Pedro Alves <palves@redhat.com>
10226
10227 PR gdb/7205
10228
10229 Replace target_signal with gdb_signal throughout.
10230
10231 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10232
10233 * linux-low.c (linux_store_registers): Avoid the copying sequence
10234 when no data has been retrieved by ptrace.
10235
10236 2012-05-22 Will Deacon <will.deacon@arm.com>
10237
10238 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10239 Include asm/ptrace.h.
10240 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10241 already defined.
10242
10243 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10244
10245 * linux-low.c (linux_store_registers): Don't re-retrieve data
10246 with ptrace that has already been obtained from /proc. Always
10247 copy any data retrieved with ptrace to the buffer supplied.
10248
10249 2012-05-11 Yao Qi <yao@codesourcery.com>
10250 Pedro Alves <palves@redhat.com>
10251
10252 * linux-low.c (enum stopping_threads_kind): New.
10253 (stopping_threads): Change type to `enum stopping_threads_kind'.
10254 (handle_extended_wait): If stopping and suspending threads, leave
10255 the new_lwp suspended too.
10256 (linux_wait_for_event): Adjust.
10257 (stop_all_lwps): Set `stopping_threads' to
10258 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10259 whether we're suspending threads or just stopping them. Assert no
10260 recursion happens.
10261
10262 2012-04-29 Yao Qi <yao@codesourcery.com>
10263
10264 * server.h: Move some code to ...
10265 * gdbthread.h: ... here. New.
10266 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10267 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10268 (nto-low.o, win32-low.o): Likewise.
10269 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10270 * regcache.c, remote-utils.c, server.c: Likewise.
10271 * target.c, tracepoint.c, win32-low.c: Likewise.
10272
10273 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10274
10275 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10276 (PTRACE_ARG4_TYPE): Likewise.
10277 (PTRACE_XFER_TYPE): Likewise.
10278 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10279 ptrace to PTRACE_ARG3_TYPE.
10280 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10281 (PTRACE_ARG4_TYPE): Likewise.
10282 (PTRACE_XFER_TYPE): Likewise.
10283 (linux_detach_one_lwp): Cast fourth argument of
10284 ptrace to long then PTRACE_ARG4_TYPE.
10285 (regsets_fetch_inferior_registers): Cast third argument of
10286 ptrace to long then PTRACE_ARG3_TYPE.
10287 (regsets_store_inferior_registers): Likewise.
10288
10289 2012-04-20 Pedro Alves <palves@redhat.com>
10290
10291 * configure: Regenerate.
10292
10293 2012-04-19 Pedro Alves <palves@redhat.com>
10294
10295 * Makefile.in (GNULIB_BUILDDIR): New.
10296 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10297 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10298 (all, install-only, uninstall, clean-info, all-lib, clean): No
10299 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10300 (maintainer-clean realclean distclean): Use subdir_do.
10301 (subdir_do): New.
10302 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10303 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10304 * acinclude.m4: Include acx_configure_dir.m4.
10305 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10306 calls. Call AC_PROG_RANLIB. Configure gnulib using
10307 ACX_CONFIGURE_DIR.
10308 (GNULIB): New.
10309 (GNULIB_STDINT_H): Adjust.
10310 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10311 * gdbreplay.c: Include build-gnulib/config.h.
10312 * server.h: Likewise.
10313 * aclocal.m4: Regenerate.
10314 * config.in: Regenerate.
10315 * configure: Regenerate.
10316
10317 2012-04-19 Pedro Alves <palves@redhat.com>
10318
10319 * Makefile.in (LIBGNU, INCGNU): Adjust.
10320 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10321 (all, install-only, uninstall, clean-info, all-lib, clean)
10322 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10323 * configure.ac: Adjust AC_OUTPUT output.
10324 * aclocal.m4: Regenerate.
10325 * configure: Regenerate.
10326
10327 2012-04-19 Pedro Alves <palves@redhat.com>
10328
10329 * Makefile.in (generated_files): New.
10330 (server_h): Remove the explicit dependency on config.h, and depend
10331 on $generated_files.
10332
10333 2012-04-19 Pedro Alves <palves@redhat.com>
10334
10335 * Makefile.in (INCGNU): Add -Ignulib.
10336
10337 2012-04-19 Pedro Alves <palves@redhat.com>
10338
10339 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10340 (INCGNU): ... this, and spell out -I here.
10341 (GNULIB_LIB): Rename to ...
10342 (LIBGNU): ... this.
10343 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10344
10345 2012-04-19 Pedro Alves <palves@redhat.com>
10346
10347 * config.in: Regenerate.
10348
10349 2012-04-19 Pedro Alves <palves@redhat.com>
10350
10351 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10352 * server.h (memmem): Remove declaration.
10353 * config.in: Regenerate.
10354 * configure: Regenerate.
10355
10356 2012-04-19 Yao Qi <yao@codesourcery.com>
10357
10358 * Makefile.in (SFILES): Add common/vec.c.
10359 (OBS): Add vec.o.
10360 (vec.o): New rule.
10361
10362 2012-04-19 Yao Qi <yao@codesourcery.com>
10363
10364 * remote-utils.c (prepare_resume_reply): Replace with macro
10365 target_core_of_thread.
10366 * server.c (handle_qxfer_threads_proper): Likewise.
10367 * target.h (traget_core_of_thread): New macro.
10368
10369 2012-04-18 Pedro Alves <palves@redhat.com>
10370
10371 * aclocal.m4: Regenerate.
10372 * configure: Regenerate.
10373
10374 2012-04-16 Yao Qi <yao@codesourcery.com>
10375
10376 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10377 duplicated on address.
10378
10379 2012-04-16 Yao Qi <yao@codesourcery.com>
10380
10381 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10382 (struct tracepoint_action_ops) <send>: New field.
10383 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10384 (agent_expr_send, x_tracepoint_action_send): New.
10385 (l_tracepoint_action_send): New.
10386 (cmd_qtdp): Download and install tracepoint
10387 according to `use_agent'.
10388 (run_inferior_command): Add one more parameter `len'.
10389 Update callers.
10390 (tracepoint_send_agent): New.
10391 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10392
10393 2012-04-16 Yao Qi <yao@codesourcery.com>
10394
10395 * tracepoint.c (download_tracepoints): Moved to ...
10396 (cmd_qtstart): ... here.
10397
10398 2012-04-14 Yao Qi <yao@codesourcery.com>
10399
10400 * tracepoint.c: Include inttypes.h.
10401 (struct collect_memory_action): Use sized types.
10402 (struct tracepoint): Likewise.
10403 (cmd_qtdp, stop_tracing): Update print specifiers.
10404 (cmd_qtp, response_tracepoint): Likewise.
10405 (collect_data_at_tracepoint): Likewise.
10406 (collect_data_at_step): Likewise.
10407
10408 2012-04-14 Yao Qi <yao@codesourcery.com>
10409
10410 Import gnulib module inttypes.
10411 * aclocal.m4, config.in, configure: Regenerated.
10412
10413 2012-04-14 Yao Qi <yao@codesourcery.com>
10414
10415 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10416 Makefile and config.status at last.
10417
10418 2012-04-13 Yao Qi <yao@codesourcery.com>
10419
10420 * tracepoint.c: Include stdint.h unconditionally.
10421
10422 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10423
10424 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10425 on BFD_HAVE_SYS_PROCFS_TYPE.
10426 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10427 * configure: Regenerate.
10428 * config.in: Likewise.
10429
10430 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10431
10432 * Makefile.in (clean): Also remove x32.c x32-linux.c
10433 x32-avx.c x32-avx-linux.c.
10434 (x32.o): New target.
10435 (x32.c): Likewise.
10436 (x32-linux.o): Likewise.
10437 (x32-linux.c): Likewise.
10438 (x32-avx.o): Likewise.
10439 (x32-avx.c): Likewise.
10440 (x32-avx-linux.o): Likewise.
10441 (x32-avx-linux.c): Likewise.
10442
10443 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10444 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10445 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10446 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10447 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10448 i386/x32-avx-linux.xml.
10449
10450 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10451 (init_registers_x32_avx_linux): Likwise.
10452 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10453 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10454
10455 2012-04-13 Pedro Alves <palves@redhat.com>
10456
10457 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10458 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10459 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10460 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10461 the sub-make.
10462
10463 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10464
10465 * linux-x86-low.c (compat_x32_clock_t): New.
10466 (compat_x32_siginfo_t): Likewise.
10467 (compat_x32_siginfo_from_siginfo): Likewise.
10468 (siginfo_from_compat_x32_siginfo): Likewise.
10469 (linux_is_elf64): Likewise.
10470 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10471 and siginfo_from_compat_x32_siginfo for x32.
10472 (x86_arch_setup): Set linux_is_elf64.
10473
10474 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10475
10476 PR gdb/13969
10477 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10478 e_machine field.
10479 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10480 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10481 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10482 compatible with process.
10483
10484 2012-04-12 Yao Qi <yao@codesourcery.com>
10485
10486 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10487 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10488 (install-only, install-info, clean): Handle sub dir gnulib.
10489 (all-lib, am--refresh): New targets.
10490 (memmem.o): Remove target.
10491 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10492 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10493 (AC_REPLACE_FUNCS): Remove memmem.
10494 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10495 (AC_OUTPUT): Generate Makefile in gnulib/.
10496 * aclocal.m4, config.in, configure: Regenerated.
10497
10498 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10499
10500 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10501
10502 2012-04-05 Pedro Alves <palves@redhat.com>
10503
10504 -Werror=strict-aliasing
10505
10506 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10507 pointer.
10508
10509 2012-04-04 Pedro Alves <palves@redhat.com>
10510
10511 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10512 (sparc_store_gregset_from_stack, sparc_store_gregset)
10513 (sparc_breakpoint_at): Fix formatting.
10514
10515 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10516
10517 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10518 are available.
10519 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10520 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10521 * config.in: Regenerate.
10522 * configure: Likewise.
10523
10524 2012-03-29 Pedro Alves <palves@redhat.com>
10525
10526 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10527 Correct ptrace arguments.
10528
10529 2012-03-28 Pedro Alves <palves@redhat.com>
10530
10531 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10532 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10533 (IA64_FR1_REGNUM): New defines.
10534 (ia64_fetch_register): New.
10535 (the_low_target): Install it.
10536 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10537 field.
10538 * linux-low.c (linux_fetch_registers): Try the
10539 the_low_target.fetch_register hook first.
10540
10541 * linux-arm-low.c (the_low_target): Adjust.
10542 * linux-bfin-low.c (the_low_target): Adjust.
10543 * linux-cris-low.c (the_low_target): Adjust.
10544 * linux-crisv32-low.c (the_low_target): Adjust.
10545 * linux-m32r-low.c (the_low_target): Adjust.
10546 * linux-m68k-low.c (the_low_target): Adjust.
10547 * linux-mips-low.c (the_low_target): Adjust.
10548 * linux-ppc-low.c (the_low_target): Adjust.
10549 * linux-s390-low.c (the_low_target): Adjust.
10550 * linux-sh-low.c (the_low_target): Adjust.
10551 * linux-sparc-low.c (the_low_target): Adjust.
10552 * linux-tic6x-low.c (the_low_target): Adjust.
10553 * linux-x86-low.c (the_low_target): Adjust.
10554 * linux-xtensa-low.c (the_low_target): Adjust.
10555
10556 2012-03-26 Pedro Alves <palves@redhat.com>
10557
10558 * server.c (handle_qxfer_libraries): Don't bail early if
10559 the_target->qxfer_libraries_svr4 is not NULL.
10560
10561 2012-03-26 Pedro Alves <palves@redhat.com>
10562
10563 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10564
10565 2012-03-23 Pedro Alves <palves@redhat.com>
10566
10567 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10568 "library-list-svr4" element's start tag when the the DSO list is
10569 empty.
10570
10571 2012-03-23 Pedro Alves <palves@redhat.com>
10572
10573 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10574 a variable whose type size is the same as the inferior's pointer
10575 size.
10576
10577 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10578
10579 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10580 struct siginfo.
10581 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10582 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10583 * linux-low.h: Include <signal.h>.
10584 (struct siginfo): Remove forward declaration.
10585 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10586 struct siginfo.
10587
10588 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10589
10590 * .gitignore: Ignore more files.
10591
10592 2012-03-19 Pedro Alves <palves@redhat.com>
10593 Jan Kratochvil <jan.kratochvil@redhat.com>
10594
10595 * server.c (cont_thread, general_thread): Add describing comments.
10596 (start_inferior): Clear `cont_thread'.
10597 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10598 of a process.
10599
10600 2012-03-15 Yao Qi <yao@codesourcery.com>
10601
10602 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10603 handling to ...
10604 (cmd_qtdp): ... here.
10605
10606 2012-03-15 Yao Qi <yao@codesourcery.com>
10607
10608 * tracepoint.c (struct tracepoint_action_ops): New.
10609 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10610 (m_tracepoint_action_download): New.
10611 (r_tracepoint_action_download): New.
10612 (x_tracepoint_action_download): New.
10613 (l_tracepoint_action_download): New.
10614 (add_tracepoint_action): Install `action->ops' according type.
10615 (download_tracepoint_1): Move code `download' function pointer
10616 of various tracepoint_action_ops.
10617
10618 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10619
10620 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10621 linux_ptrace_attach_warnings.
10622
10623 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10624
10625 * Makefile.in (linux-ptrace.o): New.
10626 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10627 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10628 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10629 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10630 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10631 of these targets.
10632 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10633
10634 2012-03-08 Yao Qi <yao@codesourcery.com>
10635 Pedro Alves <palves@redhat.com>
10636
10637 Fix PR server/13392.
10638 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10639 offset of JMP insn.
10640 * tracepoint.c (remove_tracepoint): New.
10641 (cmd_qtdp): Call remove_tracepoint when failed to install.
10642
10643 2012-03-07 Pedro Alves <palves@redhat.com>
10644
10645 * linux-low.c (get_detach_signal): New.
10646 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10647 Pass on pending signals to PTRACE_DETACH. Check the result of the
10648 ptrace call.
10649 * server.c (program_signals, program_signals_p): New.
10650 (handle_general_set): Handle QProgramSignals.
10651 * server.h (program_signals, program_signals_p): Declare.
10652
10653 2012-03-05 Pedro Alves <palves@redhat.com>
10654 Jan Kratochvil <jan.kratochvil@redhat.com>
10655
10656 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10657 New comment why.
10658
10659 2012-03-03 Yao Qi <yao@codesourcery.com>
10660
10661 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10662 agent_look_up_symbols.
10663
10664 2012-03-03 Yao Qi <yao@codesourcery.com>
10665
10666 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10667 (linux-x86-low.o): Likewise.
10668 * server.h: Remove in_process_agent_loaded.
10669 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10670 common/agent.c.
10671 Update callers.
10672
10673 2012-03-03 Yao Qi <yao@codesourcery.com>
10674
10675 * tracepoint.c (gdb_agent_capability): New global.
10676 (in_process_agent_loaded_ust): Renamed to
10677 `in_process_agent_supports_ust'.
10678 Update callers.
10679 (in_process_agent_supports_ust): Call agent_capability_check.
10680 (clear_installed_tracepoints): Assert that agent supports
10681 agent.
10682
10683 2012-03-03 Yao Qi <yao@codesourcery.com>
10684
10685 * linux-low.c (linux_supports_agent): New.
10686 (linux_target_ops): Initialize field `supports_agent' with
10687 linux_supports_agent.
10688 * target.h (struct target_ops) <supports_agent>: New.
10689 (target_supports_agent): New macro.
10690 * server.c (handle_general_set): Handle packet 'QAgent'.
10691 (handle_query): Send `QAgent+'.
10692 * Makefile.in (server.o): Depends on agent.h.
10693
10694 2012-03-03 Yao Qi <yao@codesourcery.com>
10695
10696 * Makefile.in (OBS): Add agent.o.
10697 Add new rule for agent.o.
10698 Track dependence of tracepoint.c on agent.h.
10699 * tracepoint.c (run_inferior_command_1):
10700 (run_inferior_command): Call agent_run_command.
10701 (gdb_ust_connect_sync_socket): Deleted. Move it to
10702 common/agent.c.
10703 (resume_thread, stop_thread): Likewise.
10704 (gdb_ust_socket_init): Renamed to ...
10705 (gdb_agent_socket_init): ... New.
10706 (gdb_ust_thread): Renamed to ...
10707 (gdb_agent_helper_thread): ... New.
10708 (gdb_ust_init): Move some code to ...
10709 (gdb_agent_init): ... here. New.
10710 [HAVE_UST]: Call gdb_ust_init.
10711 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10712 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10713 * config.in, configure: Regenerated.
10714
10715 2012-03-02 Pedro Alves <palves@redhat.com>
10716
10717 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10718 * linux-low.c (struct simple_pid_list): New.
10719 (stopped_pids): New a struct simple_pid_list pointer.
10720 (add_to_pid_list, pull_pid_from_list): New.
10721 (handle_extended_wait): Don't assume the first signal new children
10722 report is SIGSTOP. Adjust call to pull_pid_from_list.
10723 (linux_wait_for_lwp): Adjust.
10724
10725 2012-03-02 Yao Qi <yao@codesourcery.com>
10726
10727 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10728 debug log.
10729
10730 2012-03-02 Yao Qi <yao@codesourcery.com>
10731
10732 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10733 `stop_pc' and `tpoint'. Update caller.
10734
10735 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10736
10737 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10738 * linux-low.c (use_linux_regsets): New macro.
10739 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10740 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10741 (linux_register_in_regsets): New function.
10742 (usr_fetch_inferior_registers): Skip registers covered by
10743 regsets.
10744 (usr_store_inferior_registers): Likewise.
10745 (usr_fetch_inferior_registers): New macro.
10746 (usr_store_inferior_registers): Likewise.
10747 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10748 (linux_store_registers): Likewise.
10749 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10750 prototype.
10751 (init_registers_mips64_dsp_linux): Likewise.
10752 (init_registers_mips_linux): New macro.
10753 (init_registers_mips_dsp_linux): Likewise.
10754 (mips_dsp_num_regs): Likewise.
10755 (DSP_BASE, DSP_CONTROL): New fallback macros.
10756 (mips_base_regs): New macro.
10757 (mips_regmap): Use it. Fix the size.
10758 (mips_dsp_regmap): New variable.
10759 (mips_dsp_regset_bitmap): Likewise.
10760 (mips_arch_setup): New function.
10761 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10762 than mips_regmap.
10763 (mips_cannot_store_register): Likewise.
10764 (the_low_target): Update .arch_setup, .num_regs and .regmap
10765 initializers. Add .regset_bitmap initializer.
10766 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10767 initializer.
10768 * linux-bfin-low.c (the_low_target): Likewise.
10769 * linux-cris-low.c (the_low_target): Likewise.
10770 * linux-crisv32-low.c (the_low_target): Likewise.
10771 * linux-ia64-low.c (the_low_target): Likewise.
10772 * linux-m32r-low.c (the_low_target): Likewise.
10773 * linux-m68k-low.c (the_low_target): Likewise.
10774 * linux-ppc-low.c (the_low_target): Likewise.
10775 * linux-s390-low.c (the_low_target): Likewise.
10776 * linux-sh-low.c (the_low_target): Likewise.
10777 * linux-sparc-low.c (the_low_target): Likewise.
10778 * linux-tic6x-low.c (the_low_target): Likewise.
10779 * linux-x86-low.c (the_low_target): Likewise.
10780 * linux-xtensa-low.c (the_low_target): Likewise.
10781 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10782 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10783 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10784 srv_xmlfiles.
10785 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10786 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10787
10788 2012-02-29 Yao Qi <yao@codesourcery.com>
10789 Pedro Alves <palves@redhat.com>
10790
10791 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10792 `step_over_finished' is true.
10793
10794 2012-02-27 Pedro Alves <palves@redhat.com>
10795
10796 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10797 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10798
10799 2012-02-27 Pedro Alves <palves@redhat.com>
10800
10801 PR server/9684
10802 * linux-low.c (pid_is_stopped): New.
10803 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10804
10805 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10806
10807 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10808 of conditions.
10809
10810 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10811
10812 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10813
10814 2012-02-24 Luis Machado <lgustavo@codesourcery>
10815
10816 * server.c (handle_query): Advertise support for target-side
10817 breakpoint condition evaluation.
10818 (process_point_options): New function.
10819 (process_serial_event): When inserting a breakpoint, check for
10820 a target-side condition that should be evaluated.
10821
10822 * mem-break.c: Include regcache.h and ax.h.
10823 (point_cond_list_t): New data structure.
10824 (breakpoint) <cond_list>: New field.
10825 (find_gdb_breakpoint_at): Make non-static.
10826 (delete_gdb_breakpoint_at): Clear any target-side
10827 conditions.
10828 (clear_gdb_breakpoint_conditions): New function.
10829 (add_condition_to_breakpoint): Likewise.
10830 (add_breakpoint_condition): Likewise.
10831 (gdb_condition_true_at_breakpoint): Likewise.
10832 (gdb_breakpoint_here): Return result directly instead
10833 of going through a local variable.
10834
10835 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10836 (clear_gdb_breakpoint_conditions): Likewise.
10837 (add_breakpoint_condition): Likewise.
10838 (gdb_condition_true_at_breakpoint): Likewise.
10839
10840 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10841 (need_step_over_p): Take target-side breakpoint condition into
10842 consideration.
10843
10844 2012-02-24 Luis Machado <lgustavo@codesourcery>
10845
10846 * server.h: Include tracepoint.h.
10847 (agent_mem_read, agent_get_trace_state_variable_value,
10848 agent_set_trace_state_variable_value,
10849 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10850 get_set_tsv_func_addr): New prototypes.
10851
10852 * ax.h: New include file.
10853 * ax.c: New source file.
10854
10855 * tracepoint.c: Include ax.h.
10856 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10857 agent_expr, eval_result_type): Move to ax.h.
10858 (parse_agent_expr): Rename to ...
10859 (gdb_parse_agent_expr): ... this, make it non-static and move
10860 to ax.h.
10861 (unparse_agent_expr) Rename to ...
10862 (gdb_unparse_agent_expr): ... this, make it non-static and move
10863 to ax.h.
10864 (eval_agent_expr): Rename to ...
10865 (eval_tracepoint_agent_expr): ... this.
10866 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10867 forward declarations.
10868 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10869 (agent_get_trace_state_variable_value): New function.
10870 (agent_set_trace_state_variable_value): New function.
10871 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10872 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10873 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10874 (condition_true_at_tracepoint): Likewise.
10875 (parse_agent_expr): Rename to ...
10876 (gdb_parse_agent_expr): ... this and move to ax.c.
10877 (unparse_agent_expr): Rename to ...
10878 (gdb_unparse_agent_expr): ... this and move to ax.c.
10879 (gdb_agent_op_name): Move to ax.c.
10880 (eval_agent_expr): Rename to ...
10881 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10882 and move to ax.c.
10883 (eval_tracepoint_agent_expr): New function.
10884 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10885 non-static.
10886 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10887 ax.c.
10888 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10889 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10890 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10891 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10892 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10893 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10894 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10895 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10896 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10897 (compile_bytecodes): Remove forward declaration.
10898 (is_goto_target): Move to ax.c.
10899 (compile_bytecodes): Move to ax.c and call
10900 agent_get_trace_state_variable_value (...) and
10901 agent_set_trace_state_variable_value (...).
10902
10903 * Makefile.in: Update ax.c and IPA dependencies.
10904
10905 2012-02-24 Pedro Alves <palves@redhat.com>
10906
10907 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10908 (cmd_bigqtbuffer_circular): ... this. Only handle
10909 'QTBuffer:circular:'.
10910 (handle_tracepoint_general_set): Adjust.
10911
10912 2012-02-16 Yao Qi <yao@codesourcery.com>
10913
10914 * inferiors.c: Move code to ...
10915 * dll.c: .... here. New.
10916 * server.h: Declare clear_dlls.
10917 * Makefile.in (SFILES): Add dll.c.
10918 (OBS): Add dll.o
10919 (dll.o): New rule.
10920
10921 2012-02-11 Yao Qi <yao@codesourcery.com>
10922
10923 * server.c: (handle_monitor_command): Add a new parameter
10924 `own_buf'.
10925 (handle_query): Update caller.
10926
10927 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10928
10929 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10930 * configure, config.in: Regenerate.
10931 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10932 is not defined.
10933
10934 2012-02-02 Pedro Alves <palves@redhat.com>
10935
10936 Try SIGKILL first, then PTRACE_KILL.
10937 * linux-low.c (linux_kill_one_lwp): New.
10938 (linux_kill_one_lwp): Rename to ...
10939 (kill_one_lwp_callback): ... this. Use the new
10940 linux_kill_one_lwp.
10941
10942 2012-02-02 Pedro Alves <palves@redhat.com>
10943
10944 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10945 inferior.
10946
10947 2012-01-27 Pedro Alves <palves@redhat.com>
10948
10949 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10950 (elf_64_file_p): Make static.
10951 (linux_pid_exe_is_elf_64_file): New.
10952 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10953 Delete declarations.
10954 (linux_pid_exe_is_elf_64_file): Declare.
10955 * linux-x86-low.c (x86_arch_setup): Use
10956 linux_pid_exe_is_elf_64_file.
10957
10958 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10959
10960 * linux-low.c (linux_wait_for_event_1): Rename to ...
10961 (linux_wait_for_event): ... here and merge it with former
10962 linux_wait_for_event - new variable wait_ptid, use it.
10963 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10964
10965 2012-01-23 Pedro Alves <palves@redhat.com>
10966
10967 * server.c (main): Avoid yet another case of infinite loop while
10968 detaching/killing after a longjmp.
10969
10970 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10971
10972 Code cleanup.
10973 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10974
10975 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10976
10977 * hostio.c (handle_readlink): New function.
10978 (handle_vFile): Call it to handle "vFile:readlink" packets.
10979
10980 2012-01-20 Pedro Alves <palves@redhat.com>
10981 Ulrich Weigand <ulrich.weigand@linaro.org>
10982
10983 * server.c (handle_v_requests): Only support vAttach and vRun to
10984 start multiple processes when in extended protocol mode.
10985
10986 2012-01-17 Pedro Alves <palves@redhat.com>
10987
10988 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10989 memalign plus mprotect to allocate the scratch buffer.
10990
10991 2012-01-13 Pedro Alves <palves@redhat.com>
10992
10993 * server.c (attach_inferior): Clear `cont_thread'.
10994
10995 2012-01-13 Pedro Alves <palves@redhat.com>
10996
10997 * server.c (main): Avoid infinite loop while detaching/killing
10998 after a longjmp.
10999
11000 2012-01-09 Doug Evans <dje@google.com>
11001
11002 * server.c (start_inferior): Set last_ptid in --wrapper case.
11003
11004 2012-01-06 Yao Qi <yao@codesourcery.com>
11005
11006 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11007 defined.
11008 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11009
11010 2012-01-04 Yao Qi <yao@codesourcery.com>
11011
11012 * tracepoint.c (cmd_qtdp): Print debug message
11013 for static tracepoint.
11014
11015 2012-01-04 Yao Qi <yao@codesourcery.com>
11016
11017 * tracepoint.c (trace_vdebug): Differentiate debug message
11018 between gdbserver and IPA.
11019
11020 2012-01-03 Yao Qi <yao@codesourcery.com>
11021
11022 * tracepoint.c (tracepoint_was_hit): Don't collect for
11023 static tracepoint.
11024
11025 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11026
11027 * terminal.h: Reformat copyright header.
11028
11029 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11030
11031 * server.c (gdbserver_version): Update copyright year.
11032 * gdbreplay.c (gdbreplay_version): Likewise.
11033
11034 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11035
11036 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11037
11038 Revert:
11039 2011-12-18 Hui Zhu <teawater@gmail.com>
11040 * linux-low.c (linux_create_inferior): Save return value to ret.
11041
11042 2011-12-18 Hui Zhu <teawater@gmail.com>
11043
11044 * linux-low.c (linux_create_inferior): Save return value to ret.
11045
11046 2011-12-16 Doug Evans <dje@google.com>
11047
11048 * linux-low.c (linux_create_inferior): If stdio connection,
11049 redirect stdin from /dev/null, stdout to stderr.
11050 * remote-utils.c (remote_is_stdio): New static global.
11051 (remote_connection_is_stdio): New function.
11052 (remote_prepare): Handle stdio connection.
11053 (remote_open): Ditto.
11054 (remote_close): Don't close stdin for stdio connections.
11055 (read_prim,write_prim): New functions. Replace all calls to
11056 read/write to these.
11057 * server.c (main): Watch for "-" argument. Move call to
11058 remote_prepare before start_inferior.
11059 * server.h (STDIO_CONNECTION_NAME): New macro.
11060 (remote_connection_is_stdio): Declare.
11061
11062 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11063 in debugging output.
11064
11065 2011-12-15 Yao Qi <yao@codesourcery.com>
11066
11067 * tracepoint.c: Include sys/syscall.h.
11068 (gdb_ust_thread): Remove preprocessor conditional.
11069
11070 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11071
11072 * linux-low.c (linux_detach_one_lwp): Call
11073 the_low_target.prepare_to_resume before detaching.
11074
11075 2011-12-14 Yao Qi <yao@codesourcery.com>
11076
11077 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11078 of write.
11079
11080 2011-12-14 Yao Qi <yao@codesourcery.com>
11081
11082 * i386-low.c (i386_low_stopped_data_address): Initialize local
11083 variable `control'.
11084
11085 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11086
11087 PR remote/13492
11088
11089 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11090 DR_CONTROL unless necessary. Extend comments.
11091 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11092 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11093
11094 2011-12-13 Yao Qi <yao@codesourcery.com>
11095
11096 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11097 macros.
11098 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11099
11100 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11101
11102 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11103 Print new debug message for such case.
11104
11105 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11106
11107 Fix overlapping memcpy.
11108 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11109 the read_inferior_memory transfer.
11110 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11111 write_inferior_memory transfer.
11112 (set_fast_tracepoint_jump): New variable buf. Use it for the
11113 read_inferior_memory and write_inferior_memory transfers.
11114 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11115 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11116 Use it for the write_inferior_memory transfer.
11117 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11118 buffers.
11119
11120 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11121
11122 * linux-low.c (fetch_register, store_register): Make code
11123 consistent, fix formatting.
11124
11125 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11126
11127 * linux-low.c (usr_store_inferior_registers): Factor out code
11128 to handle individual registers into...
11129 (store_register): ... this new function.
11130
11131 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11132
11133 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11134 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11135 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11136 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11137 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11138 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11139 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11140 (srv_xmlfiles): Add new XML files.
11141
11142 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11143 and <sys/uio.h>.
11144 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11145 (init_registers_s390_linux32v1): Add prototype.
11146 (init_registers_s390_linux32v2): Likewise.
11147 (init_registers_s390_linux64v1): Likewise.
11148 (init_registers_s390_linux64v2): Likewise.
11149 (init_registers_s390x_linux64v1): Likewise.
11150 (init_registers_s390x_linux64v2): Likewise.
11151 (s390_num_regs): Increment to 52.
11152 (s390_regmap): Add orig_r2 register.
11153 (s390_num_regs_3264): Increment to 68.
11154 (s390_regmap_3264): Add orig_r2 register.
11155 (s390_collect_ptrace_register): Handle orig_r2 register.
11156 (s390_supply_ptrace_register): Likewise.
11157 (s390_fill_last_break): New function.
11158 (s390_store_last_break): Likewise.
11159 (s390_fill_system_call): New function.
11160 (s390_store_system_call): Likewise.
11161 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11162 register sets.
11163 (s390_check_regset): New function.
11164 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11165 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11166 Update target_regsets for available register sets.
11167
11168 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11169 Jan Kratochvil <jan.kratochvil@redhat.com>
11170
11171 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11172 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11173 New.
11174 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11175 * linux-low.h (struct process_info_private): New member r_debug.
11176 * server.c (handle_qxfer_libraries): Call
11177 the_target->qxfer_libraries_svr4.
11178 (handle_qxfer_libraries_svr4): New function.
11179 (qxfer_packets): New entry "libraries-svr4".
11180 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11181 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11182 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11183 PACKET_qXfer_libraries_svr4.
11184
11185 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11186
11187 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11188 PSW address/mask between 8-byte and 16-byte formats.
11189 (s390_supply_ptrace_register): Likewise.
11190 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11191 basic addressing mode bit.
11192
11193 2011-11-24 Stan Shebs <stan@codesourcery.com>
11194
11195 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11196
11197 2011-11-17 Stan Shebs <stan@codesourcery.com>
11198
11199 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11200 (tracing_start_time): New global.
11201 (tracing_stop_time): New global.
11202 (tracing_user_name): New global.
11203 (tracing_notes): New global.
11204 (tracing_stop_note): New global.
11205 (cmd_qtstart): Set traceframe_usage, start_time.
11206 (stop_tracing): Set stop_time.
11207 (cmd_qtstatus): Report additional status.
11208 (cmd_qtp): New function.
11209 (handle_tracepoint_query): Call it.
11210 (cmd_qtnotes): New function.
11211 (handle_tracepoint_general_set): Call it.
11212 (get_timestamp): Rename from tsv_get_timestamp.
11213
11214 2011-11-14 Stan Shebs <stan@codesourcery.com>
11215 Kwok Cheung Yeung <kcy@codesourcery.com>
11216
11217 * linux-x86-low.c (small_jump_insn): New.
11218 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11219 trampoline and error message, build a trampoline and issue a small
11220 jump instruction to it.
11221 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11222 trampoline and error message.
11223 (x86_get_min_fast_tracepoint_insn_len): New.
11224 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11225 * linux-low.h (struct linux_target_ops): Add arguments to
11226 install_fast_tracepoint_jump_pad operation, add new operation.
11227 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11228 arguments.
11229 (linux_get_min_fast_tracepoint_insn_len): New function.
11230 (linux_target_op): Add new operation.
11231 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11232 (gdb_trampoline_buffer_end): Ditto.
11233 (gdb_trampoline_buffer_error): Ditto.
11234 (struct ipa_sym_addresses): Add fields for new IPA variables.
11235 (symbol_list): Add entries for new IPA variables.
11236 (struct tracepoint): Add fields to hold the address range of the
11237 trampoline used by the tracepoint.
11238 (trampoline_buffer_head): New static variable.
11239 (trampoline_buffer_tail): Ditto.
11240 (claim_trampoline_space): New function.
11241 (have_fast_tracepoint_trampoline_buffer): New function.
11242 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11243 structure.
11244 (install_fast_tracepoint): Ditto, also add error buffer argument.
11245 (cmd_qtminftpilen): New function.
11246 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11247 (fast_tracepoint_from_trampoline_address): New function.
11248 (fast_tracepoint_collecting): Handle trampoline as part of jump
11249 pad space.
11250 (set_trampoline_buffer_space): New function.
11251 (initialize_tracepoint): Initialize new IPA variables.
11252 * target.h (struct target_ops): Add arguments to
11253 install_fast_tracepoint_jump_pad operation, add new
11254 get_min_fast_tracepoint_insn_len operation.
11255 (target_get_min_fast_tracepoint_insn_len): New.
11256 (install_fast_tracepoint_jump_pad): Add arguments.
11257 * server.h (IPA_BUFSIZ): Define.
11258 * linux-i386-ipa.c: Include extra header files.
11259 (initialize_fast_tracepoint_trampoline_buffer): New function.
11260 (initialize_low_tracepoint): Call it.
11261 * server.h (set_trampoline_buffer_space): Declare.
11262 (claim_trampoline_space): Ditto.
11263 (have_fast_tracepoint_trampoline_buffer): Ditto.
11264
11265 2011-11-14 Yao Qi <yao@codesourcery.com>
11266
11267 * server.c (handle_query): Handle InstallInTrace for qSupported.
11268 * tracepoint.c (add_tracepoint): Sort list.
11269 (install_tracepoint, download_tracepoint): New.
11270 (cmd_qtdp): Call them to install and download tracepoints.
11271 (sort_tracepoints): Removed.
11272 (cmd_qtstart): Update.
11273
11274 2011-11-14 Yao Qi <yao@codesourcery.com>
11275
11276 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11277 * mem-break.h: Declare.
11278 * tracepoint.c (cmd_qtstart): Move some code to ...
11279 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11280 New.
11281 (download_tracepoints): Move some code to ...
11282 (download_tracepoint_1): ... here. New.
11283
11284 2011-11-08 Yao Qi <yao@codesourcery.com>
11285
11286 * remote-utils.c (relocate_instruction): A comment fix.
11287
11288 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11289
11290 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11291 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11292 dr_status_mirror and dr_control_mirror from debug_reg_state.
11293 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11294 (i386_initial_stuff): Remove use of deleted globals.
11295 (i386_get_thread_context, i386_set_thread_context,
11296 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11297 from debug_reg_state.
11298
11299 2011-11-05 Yao Qi <yao@codesourcery.com>
11300
11301 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11302 address as TPOINT's.
11303
11304 2011-11-02 Stan Shebs <stan@codesourcery.com>
11305
11306 * tracepoint.c (agent_mem_read_string): New function.
11307 (eval_agent_expr): Call it for tracenz.
11308 * server.c (handle_query): Report support for tracenz.
11309
11310 2011-11-02 Yao Qi <yao@codesourcery.com>
11311
11312 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11313
11314 2011-11-02 Yao Qi <yao@codesourcery.com>
11315
11316 * target.h: Fix a typo in comment.
11317
11318 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11319
11320 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11321 clobber the breakpoints' shadows with fast tracepoint jumps.
11322 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11323 * target.c (write_inferior_memory): Also pass MYADDR down to
11324 check_mem_write.
11325
11326 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11327
11328 * configure.ac: Check support for personality routine.
11329 * configure: Regenerate.
11330 * config.in: Likewise.
11331 * linux-low.c: Include <sys/personality.h>.
11332 Define ADDR_NO_RANDOMIZE if necessary.
11333 (linux_create_inferior): Disable address space randomization when
11334 forking inferior, if requested.
11335 (linux_supports_disable_randomization): New function.
11336 (linux_target_ops): Install it.
11337 * server.h (disable_randomization): Declare.
11338 * server.c (disable_randomization): New global variable.
11339 (handle_general_set): Handle QDisableRandomization.
11340 (handle_query): Likewise for qSupported.
11341 (main): Support --disable-randomization and --no-disable-randomization
11342 command line arguments.
11343 * target.h (struct target_ops): Add supports_disable_randomization.
11344 (target_supports_disable_randomization): New macro.
11345
11346 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11347
11348 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11349 ifdef check.
11350 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11351 [!PT_GETDSBT] (target_loadmap): New definition.
11352 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11353 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11354 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11355 and PT_GETDSBT to LINUX_LOADMAP.
11356 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11357 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11358
11359 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11360
11361 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11362 (arm_linux_hwbp_cap): New static variable.
11363 (arm_linux_get_hwbp_cap): Replace by ...
11364 (arm_linux_init_hwbp_cap): ... this new function.
11365 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11366 (arm_linux_get_hw_watchpoint_count): Likewise.
11367 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11368 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11369 (arm_prepare_to_resume): Use perror_with_name instead of error.
11370
11371 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11372
11373 * linux-arm-low.c: Include <signal.h>.
11374 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11375 (struct arm_linux_hwbp_cap): New data type.
11376 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11377 (struct arm_linux_hw_breakpoint): New data type.
11378 (MAX_BPTS, MAX_WPTS): Define.
11379 (struct arch_process_info, struct arch_lwp_info): New data types.
11380 (arm_linux_get_hwbp_cap): New function.
11381 (arm_linux_get_hw_breakpoint_count): Likewise.
11382 (arm_linux_get_hw_watchpoint_count): Likewise.
11383 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11384 (arm_hwbp_control_initialize): Likewise.
11385 (arm_hwbp_control_is_enabled): Likewise.
11386 (arm_hwbp_control_is_initialized): Likewise.
11387 (arm_hwbp_control_disable): Likewise.
11388 (arm_linux_hw_breakpoint_equal): Likewise.
11389 (arm_linux_hw_point_initialize): Likewise.
11390 (struct update_registers_data): New data structure.
11391 (update_registers_callback: New function.
11392 (arm_insert_point): Likewise.
11393 (arm_remove_point): Likewise.
11394 (arm_stopped_by_watchpoint): Likewise.
11395 (arm_stopped_data_address): Likewise.
11396 (arm_new_process): Likewise.
11397 (arm_new_thread): Likewise.
11398 (arm_prepare_to_resume): Likewise.
11399 (the_low_target): Register arm_insert_point, arm_remove_point,
11400 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11401 arm_new_thread, and arm_prepare_to_resume.
11402
11403 2011-09-15 Stan Shebs <stan@codesourcery.com>
11404
11405 * server.h (struct emit_ops): Add compare-goto fields.
11406 * tracepoint.c (gdb_agent_op_sizes): New table.
11407 (emit_eq_goto): New function.
11408 (emit_ne_goto): New function.
11409 (emit_lt_goto): New function.
11410 (emit_le_goto): New function.
11411 (emit_gt_goto): New function.
11412 (emit_ge_goto): New function.
11413 (is_goto_target): New function.
11414 (compile_bytecodes): Recognize special cases of compare-goto
11415 combinations and call specialized emitters for them.
11416 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11417 (amd64_emit_ne_goto): New function.
11418 (amd64_emit_lt_goto): New function.
11419 (amd64_emit_le_goto): New function.
11420 (amd64_emit_gt_goto): New function.
11421 (amd64_emit_ge_goto): New function.
11422 (amd64_emit_ops): Add the new functions.
11423 (i386_emit_eq_goto): New function.
11424 (i386_emit_ne_goto): New function.
11425 (i386_emit_lt_goto): New function.
11426 (i386_emit_le_goto): New function.
11427 (i386_emit_gt_goto): New function.
11428 (i386_emit_ge_goto): New function.
11429 (i386_emit_ops): Add the new functions.
11430
11431 2011-09-08 Stan Shebs <stan@codesourcery.com>
11432
11433 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11434 (i386_emit_epilogue): Restore %ebx.
11435
11436 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11437
11438 * server.c (step_thread): Remove definition.
11439 (process_serial_event): Don't handle Hs.
11440 * server.h (step_thread): Remove declaration.
11441 * target.c (set_desired_inferior): Remove use of step_thread.
11442
11443 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11444
11445 * linux-low.c: Include linux-procfs.h.
11446 (linux_attach_lwp_1): Update comments.
11447 (linux_attach): Scan for existing threads when attaching to a
11448 process that is the tgid.
11449 * Makefile.in: Update dependencies.
11450
11451 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11452
11453 * configure.srv: Add linux-procfs.o dependencies.
11454
11455 2011-08-14 Yao Qi <yao@codesourcery.com>
11456
11457 * target.h (struct target_ops): Fix indent.
11458 * win32-low.c (win32_target_ops): Fix comment.
11459
11460 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11461 Yao Qi <yao@codesourcery.com>
11462
11463 * Makefile.in (clean): Remove tic6x-*.c files.
11464 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11465 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11466 (tic6x-c64xp-linux.c): Likewise.
11467 * configure.srv: Add support for tic6x-*-uclinux.
11468 * linux-tic6x-low.c: New.
11469 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11470
11471 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11472 Yao Qi <yao@codesourcery.com>
11473
11474 * target.h (struct target_ops): Add read_loadmap.
11475 * linux-low.c (struct target_loadseg): New type.
11476 (struct target_loadmap): New type.
11477 (linux_read_loadmap): New function.
11478 (linux_target_ops): Add linux_read_loadmap.
11479 * server.c (handle_query): Support qXfer:fdpic:read packet.
11480 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11481 to NULL.
11482
11483 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11484
11485 * win32-low.c: Include <stdint.h>.
11486
11487 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11488
11489 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11490 to the inferior here.
11491 (i386_remove_aligned_watchpoint): Ditto.
11492 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11493 fit part of the watchpoint in the debug registers.
11494 (i386_update_inferior_debug_regs): New.
11495 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11496 registers, and only update the inferior on success.
11497 (i386_low_remove_watchpoint): Ditto.
11498
11499 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11500
11501 * linux-low.c (compare_ints, unique, list_threads, show_process,
11502 linux_core_of_thread): Delete.
11503 (linux_target_ops): Change linux_core_of_thread to
11504 linux_common_core_of_thread.
11505 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11506 * utils.c (malloc_failure): Change type of argument.
11507 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11508 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11509 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11510 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11511 (IPA_OBJS): Add common-utils-ipa.o.
11512 (ptid_h, linux_osdata_h): New macros.
11513 (server_h): Add common/common-utils.h, common/xml-utils.h,
11514 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11515 common/ptid.h.
11516 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11517 ptid.o, buffer.o): New rules.
11518 (linux-low.o): Add common/linux-osdata.h as a dependency.
11519 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11520 * configure.ac: Add AC_HEADER_DIRENT check.
11521 * config.in: Regenerate.
11522 * configure: Regenerate.
11523 * remote-utils.c (xml_escape_text): Delete.
11524 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11525 buffer_xml_printf): Move to common/buffer.c.
11526 * server.c (main): Remove call to initialize_inferiors.
11527 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11528 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11529 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11530 internal_error, gdb_assert, gdb_assert_fail): Delete.
11531 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11532 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11533 common/buffer.h.
11534 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11535 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11536 initialize_inferiors): Delete.
11537
11538 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11539
11540 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11541 symbol error.
11542
11543 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11544
11545 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11546 assertion.
11547 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11548
11549 2011-05-26 Yao Qi <yao@codesourcery.com>
11550
11551 * Makefile.in (thread-db.o): Track dependence to
11552 common/gdb_thread_db.h.
11553 * thread-db.c: include gdb_thread_db.h from right place.
11554
11555 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11556
11557 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11558 __FILE__ and __LINE__ to internal_error.
11559
11560 2011-05-13 Doug Evans <dje@google.com>
11561
11562 * thread-db.c (try_thread_db_load_from_sdir): New function.
11563 (try_thread_db_load_from_dir): New function.
11564 (thread_db_load_search): Handle $sdir, ignore $pdir.
11565 Remove trying of system directories if search of
11566 libthread-db-search-path fails, that is now done via $sdir.
11567
11568 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11569
11570 * server.c (handle_query): Add EnableDisableTracepoints to the list
11571 of supported features.
11572 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11573 tracepoints.
11574 (cmd_qtenable_disable): New.
11575 (cmd_qtstart): Install tracepoints even if disabled.
11576 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11577 receiving a QTEnable or QTDisable packet.
11578 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11579 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11580 tracepoints.
11581 (gdb_probe): Skip data collection if static tracepoint is disabled.
11582
11583 2011-05-10 Doug Evans <dje@google.com>
11584
11585 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11586
11587 2011-05-04 Doug Evans <dje@google.com>
11588
11589 * linux-low.c (linux_join): Skip process lookup.
11590 * spu-low.c (spu_join): Ditto.
11591 * server.c (join_inferiors_callback): Delete.
11592 (process_serial_event): For 'D' packet (detach) call join_inferior
11593 directly.
11594
11595 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11596
11597 * README: Don't mention xscale*-*-linux*.
11598 * configure.srv (xscale*-*-linux*): Don't handle target.
11599
11600 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11601
11602 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11603 casting pointers.
11604 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11605 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11606 (i386_emit_void_call_2): Likewise.
11607
11608 2011-04-26 Yao Qi <yao@codesourcery.com>
11609
11610 * linux-low.c: Move common macros to linux-ptrace.h.
11611 Include linux-ptrace.h.
11612 * Makefile.in (linux_ptrace_h): New.
11613 (linux-low.o): Depends on linux-ptrace.h.
11614
11615 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11616
11617 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11618 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11619 (remote_prepare): New function with most of the TCP code from ...
11620 (remote_open): ... here. Detect PORT here unconditionally. Move also
11621 setting transport_is_reliable.
11622 * server.c (run_once): New variable.
11623 (gdbserver_usage): Document it.
11624 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11625 the first run if RUN_ONCE.
11626 * server.h (run_once, remote_prepare): New declarations.
11627
11628 2011-04-19 Tom Tromey <tromey@redhat.com>
11629
11630 * win32-low.c (handle_load_dll): Remove duplicate "the".
11631
11632 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11633
11634 Remove support for old Cygwin 1.5 versions.
11635 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11636 function to avoid warning.
11637 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11638 warning.
11639
11640 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11641
11642 * gdbserver/server.h (Macro _): Define it if not available.
11643
11644 2011-03-14 Michael Snyder <msnyder@vmware.com>
11645
11646 * hostio.c (handle_close): Remove unnecessary null test.
11647
11648 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11649
11650 * Makefile.in (maintainer-clean realclean distclean): Remove
11651 "make ... subdir_do" command.
11652
11653 2011-03-10 Michael Snyder <msnyder@vmware.com>
11654
11655 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11656
11657 * server.c (handle_v_run): Free alloced buffer on early return.
11658
11659 2011-03-09 Yao Qi <yao@codesourcery.com>
11660
11661 Revert:
11662 2011-03-04 Yao Qi <yao@codesourcery.com>
11663
11664 * Makefile.in: Remove GNU make feature --directory.
11665
11666 2011-03-05 Yao Qi <yao@codesourcery.com>
11667
11668 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11669 (subdir_do): New make target. Copied from gdb/Makefile.
11670 (maintainer-clean, realclean, distclean, clean): Call corresponding
11671 make targets in common/Makefile.
11672
11673 2011-02-11 Yao Qi <yao@codesourcery.com>
11674
11675 * configure.ac: Call AC_PROG_RANLIB.
11676 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11677 * configure: Regenerate.
11678
11679 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11680
11681 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11682
11683 2011-03-06 Yao Qi <yao@codesourcery.com>
11684
11685 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11686
11687 2011-03-05 Yao Qi <yao@codesourcery.com>
11688
11689 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11690 (subdir_do): New make target. Copied from gdb/Makefile.
11691 (maintainer-clean, realclean, distclean, clean): Call corresponding
11692 make targets in common/Makefile.
11693
11694 2011-03-04 Yao Qi <yao@codesourcery.com>
11695
11696 * Makefile.in: Remove GNU make feature --directory.
11697
11698 2011-03-04 Michael Snyder <msnyder@vmware.com>
11699
11700 * server.c (queue_stop_reply): Call xmalloc not malloc.
11701
11702 2011-03-02 Michael Snyder <msnyder@vmware.com>
11703
11704 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11705
11706 2011-02-28 Michael Snyder <msnyder@vmware.com>
11707
11708 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11709 (cmd_qtframe): Ditto.
11710 (cmd_qtbuffer): Ditto.
11711 (cmd_bigqtbuffer): Ditto.
11712
11713 * utils.c (decimal2str): Initialize 'width' to nine, then
11714 don't mess with it.
11715
11716 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11717
11718 * hostio.c (require_data): Free *data, not data.
11719
11720 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11721
11722 * hostio.c (require_data): Use free, not xfree.
11723
11724 2011-02-27 Michael Snyder <msnyder@vmware.com>
11725
11726 * server.c (handle_query): Discard unused value.
11727
11728 * hostio.c (require_data): Free malloc memory before returning
11729 error.
11730
11731 2011-02-26 Michael Snyder <msnyder@vmware.com>
11732
11733 * linux-low.c (list_threads): Call closedir for dirent.
11734
11735 2011-02-27 Michael Snyder <msnyder@vmware.com>
11736
11737 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11738 a case statement falls through.
11739
11740 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11741
11742 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11743 in comparison.
11744
11745 2011-02-26 Michael Snyder <msnyder@vmware.com>
11746
11747 * utils.c (decimal2str): Eliminate dead code and dead param.
11748 (pulongest): Drop dead param from call to decimal2str.
11749 (plongest): Ditto.
11750
11751 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11752
11753 Revert the following patch (not approved yet):
11754 2011-02-21 Hui Zhu <teawater@gmail.com>
11755 * tracepoint.c (tp_printf): New function.
11756 (eval_agent_expr): Handle gdb_agent_op_printf.
11757
11758 2011-02-21 Hui Zhu <teawater@gmail.com>
11759
11760 * tracepoint.c (tp_printf): New function.
11761 (eval_agent_expr): Handle gdb_agent_op_printf.
11762
11763 2011-02-18 Tom Tromey <tromey@redhat.com>
11764
11765 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11766 (tracepoint.o): Likewise.
11767 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11768 (gdb_agent_op_names): Likewise.
11769
11770 2011-02-18 Tom Tromey <tromey@redhat.com>
11771
11772 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11773 gdb_agent_op_rot>: New constants.
11774 (gdb_agent_op_names): Add pick and roll.
11775 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11776 cases.
11777
11778 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11779
11780 * aclocal.m4: Regenerated with aclocal-1.11.1.
11781
11782 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11783
11784 * server.c (handle_qxfer_traceframe_info): New.
11785 (qxfer_packets): Register "traceframe-info".
11786 (handle_query): Report support for qXfer:traceframe-info:read+.
11787 * tracepoint.c (match_blocktype): New.
11788 (traceframe_find_block_type): Rename to ...
11789 (traceframe_walk_blocks): ... this. Add callback filter argument,
11790 and use it.
11791 (traceframe_find_block_type): New, reimplemented on top of
11792 traceframe_walk_blocks.
11793 (build_traceframe_info_xml): New.
11794 (traceframe_read_info): New.
11795 * server.h (traceframe_read_info): Declare.
11796
11797 2011-02-11 Yao Qi <yao@codesourcery.com>
11798
11799 * configure.ac: Call AC_PROG_RANLIB.
11800 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11801 * configure: Regenerate.
11802
11803 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11804
11805 * server.c (gdb_read_memory): Change return semantics to allow
11806 partial transfers.
11807 (handle_search_memory_1): Adjust.
11808 (process_serial_event) <'m' packet>: Handle partial transfers.
11809 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11810
11811 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11812
11813 * regcache.c (init_register_cache): Initialize
11814 regcache->register_status.
11815 (free_register_cache): Release regcache->register_status.
11816 (regcache_cpy): Copy register_status.
11817 (registers_to_string): Print 'x's for unavailable registers.
11818 (supply_register): Mark the register's status valid or
11819 unavailable, depending on whether a buffer was passed in or not.
11820 (supply_register_zeroed): New.
11821 (supply_regblock): Mark the registers' status valid or
11822 unavailable, depending on whether a buffer was passed in or not.
11823 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11824 (struct regcache): New `register_status' field.
11825 (supply_register_zeroed): Declare.
11826 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11827 supply_register_zeroed, rather than passing a NULL buffer to
11828 supply_register.
11829 * tracepoint.c (fetch_traceframe_registers): Update comment.
11830
11831 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11832
11833 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11834 buffer explicit.
11835
11836 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11837
11838 * server.h (decode_xfer_write): Change prototype.
11839 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11840 and don't extract the annex here.
11841 * server.c (decode_xfer_read): Remove `annex' parameter,
11842 and don't extract the annex here.
11843 (decode_xfer): New.
11844 (struct qxfer): New.
11845 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11846 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11847 (handle_qxfer_statictrace): New functions, abstracted out from
11848 handle_query, and made to use the struct qxfer interface.
11849 (handle_threads_qxfer_proper): Rename to ...
11850 (handle_qxfer_threads_proper): ... this.
11851 (handle_threads_qxfer): Rename to ...
11852 (handle_qxfer_threads): ... this. Adjust.
11853 (qxfer_packets): New array.
11854 (handle_qxfer): New function.
11855 (handle_query): Use handle_qxfer.
11856
11857 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11858
11859 * gdbreplay.c: Shorten lines of >= 80 columns.
11860 * linux-low.c: Ditto.
11861 * linux-ppc-low.c: Ditto.
11862 * linux-s390-low.c: Ditto.
11863 * linux-sparc-low.c: Ditto.
11864 * linux-x86-low.c: Ditto.
11865 * linux-xtensa-low.c: Ditto.
11866 * mem-break.c: Ditto.
11867 * nto-low.c: Ditto.
11868 * regcache.h: Ditto.
11869 * remote-utils.c: Ditto.
11870 * server.c: Ditto.
11871 * server.h: Ditto.
11872 * thread-db.c: Ditto.
11873 * tracepoint.c: Ditto.
11874 * utils.c: Ditto.
11875 * win32-low.h: Ditto.
11876
11877 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11878
11879 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11880 update.
11881
11882 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11883
11884 * server.c (gdbserver_version): Update copyright year in version
11885 output.
11886 * gdbreplay.c (gdbreplay_version): Ditto.
11887
11888 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11889
11890 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11891 * linux-bfin-low.c: New file.
11892 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11893 PT_DATA_ADDR for BFIN targets.
11894 * Makefile.in (SFILES): Add linux-bfin-low.c.
11895 (clean): Remove reg-bfin.c.
11896 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11897 * README: Mention supported Blackfin targets.
11898
11899 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11900
11901 * .gitignore: New file.
11902
11903 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11904
11905 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11906
11907 2010-10-22 Jie Zhang <jie@codesourcery.com>
11908
11909 * Makefile.in: Add FLAGS_TO_PASS variable.
11910 (install): Remove dependency of install-only and recursively
11911 invoke make for install-only.
11912
11913 2010-10-04 Doug Evans <dje@google.com>
11914
11915 * Makefile.in (uninstall): Use $(DESTDIR).
11916
11917 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11918
11919 PR gdb/11842
11920
11921 * linux-x86-low.c (compat_siginfo_from_siginfo)
11922 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11923 si_code is < 0. Check for si_code == SI_TIMER before checking for
11924 si_code < 0.
11925
11926 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11927
11928 * lynx-i386-low.c: New file.
11929 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11930
11931 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11932
11933 * lynx-low.c (ptrace_request_to_str): Remove handling for
11934 request values that have been removed in LynxOS 5.x.
11935
11936 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11937
11938 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11939 <ptrace.h>
11940
11941 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11942
11943 * configure.ac: Add --enable-inprocess-agent option.
11944 * configure: Rebuilt.
11945
11946 2010-09-06 Yao Qi <yao@codesourcery.com>
11947
11948 * linux-low.c (linux_kill): Remove unused variable.
11949 (linux_stabilize_threads): Likewise.
11950 * server.c (start_inferior): Likewise.
11951 (queue_stop_reply_callback): Likewise.
11952 * tracepoint.c (do_action_at_tracepoint): Likewise.
11953
11954 2010-09-06 Yao Qi <yao@codesourcery.com>
11955
11956 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11957 on return.
11958
11959 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11960
11961 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11962
11963 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11964
11965 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11966 "$(IPA_DEPFILES)".
11967
11968 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11969
11970 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11971 gdbserver/lynx-ppc-low.c: New files.
11972 * Makefile.in (lynx_low_h): New variable.
11973 (lynx-low.o, lynx-ppc-low.o): New rules.
11974 * configure.ac: On LynxOS, link with -lnetinet.
11975 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11976 * configure: regenerate.
11977
11978 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11979
11980 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11981 * configure.ac: Add check for vasprintf and vsnprintf.
11982 * configure, config.in: Regenerate.
11983 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11984
11985 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11986
11987 * gdbreplay.c: Move include of alloca.h up, next to include of
11988 malloc.h.
11989 * server.h: Add include of malloc.h.
11990 * mem-break.c: Remove include of malloc.h.
11991 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11992
11993 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11994
11995 * Makefile.in (memmem.o): Build with -Wno-error.
11996
11997 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11998
11999 * utils.c (xsnprintf): Make non-static.
12000 * server.h: Add xsnprintf declaration.
12001 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12002 replace calls to snprintf by calls to xsnprintf throughout.
12003
12004 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12005
12006 * configure.ac: Add configure check for alloca.
12007 * configure, config.in: Regenerate.
12008 * server.h: Include alloca.h if it exists.
12009 * gdbreplay.c: Include alloca.h if it exists.
12010
12011 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12012
12013 * linux-low.c (__SIGRTMIN): Define if not already defined.
12014 (linux_create_inferior): Check for __ANDROID__ rather than
12015 __SIGRTMIN.
12016 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12017 are already deferred.
12018 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12019 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12020 stopped and already has a pending signal to report.
12021 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12022 a pending signal to report or is moving out of a jump pad.
12023 (linux_init_signals): Check for __ANDROID__ rather than
12024 __SIGRTMIN.
12025
12026 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12027
12028 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12029 debug_threads check. Avoid a linear search when not doing debug
12030 output.
12031
12032 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12033
12034 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12035 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12036 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12037 (process_event): Change local fd's type to gdb_fildes_t.
12038 (create_file_handler): Adjust prototype.
12039 (delete_file_handler): Adjust prototype.
12040 (handle_file_event): Adjust prototype. Use pfildes.
12041 (create_file_event): Adjsut prototype.
12042 * remote-utils.c (remote_desc, listen_desc): Change type to
12043 gdb_fildes_t.
12044 * server.h: New gdb_fildes_t typedef.
12045 [USE_WIN32API]: Include winsock2.h.
12046 (delete_file_handler, add_file_handler): Adjust prototypes.
12047 (pfildes): Declare.
12048 * utils.c (pfildes): New.
12049
12050 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12051
12052 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12053 * configure: Regenerate.
12054
12055 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12056
12057 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12058 (linux_done_accessing_memory): ... this.
12059 (linux_target_ops): Adjust.
12060 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12061 * nto-low.c (nto_target_ops): Adjust comment.
12062 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12063 * spu-low.c (spu_target_ops): Adjust comment.
12064 * target.h (target_ops): Rename unprepare_to_access_memory field
12065 to done_accessing_memory.
12066 (unprepare_to_access_memory): Rename to ...
12067 (done_accessing_memory): ... this.
12068
12069 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12070
12071 * linux-low.c (linux_prepare_to_access_memory): New.
12072 (linux_unprepare_to_access_memory): New.
12073 (linux_target_ops): Install them.
12074 * server.c (read_memory): Rename to ...
12075 (gdb_read_memory): ... this. Use
12076 prepare_to_access_memory/prepare_to_access_memory.
12077 (write_memory): Rename to ...
12078 (gdb_write_memory): ... this. Use
12079 prepare_to_access_memory/prepare_to_access_memory.
12080 (handle_search_memory_1): Adjust.
12081 (process_serial_event): Adjust.
12082 * target.h (struct target_ops): New fields
12083 prepare_to_access_memory and unprepare_to_access_memory.
12084 (prepare_to_access_memory, unprepare_to_access_memory): New.
12085 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12086 prepare_to_access_memory/prepare_to_access_memory.
12087 * nto-low.c (nto_target_ops): Adjust.
12088 * spu-low.c (spu_target_ops): Adjust.
12089 * win32-low.c (win32_target_ops): Adjust.
12090
12091 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12092
12093 * Makefile.in (WARN_CFLAGS): Get it from configure.
12094 (WERROR_CFLAGS): New.
12095 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12096 * configure.ac: Introduce --enable-werror, which adds -Werror to
12097 the compiler command line. Enabled by default. Disable with
12098 --disable-werror. Add -Wdeclaration-after-statement
12099 Wpointer-arith and -Wformat-nonliteral to warning flags.
12100 * configure: Regenerate.
12101
12102 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12103
12104 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12105
12106 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12107
12108 * gdbreplay.c (remote_error): New.
12109 (gdbchar): New.
12110 (expect): Use gdbchar. Check for error reading from GDB.
12111 Clarify sync error output.
12112 (play): Check for errors writing to GDB.
12113 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12114 * remote-utils.c (getpkt): Check for errors writing to the remote
12115 descriptor.
12116
12117 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12118
12119 * linux-low.c (linux_wait_1): Move non-debugging code out of
12120 `debug_threads' control.
12121
12122 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12123
12124 * linux-low.c (linux_wait_1): Don't set last_status here.
12125 * server.c (push_event, queue_stop_reply_callback): Assert we're
12126 not pushing a TARGET_WAITKIND_IGNORE event.
12127 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12128 (myresume, handle_target_event): Set the thread's last_resume_kind
12129 and last_status from the target returned status.
12130
12131 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12132
12133 PR threads/10729
12134
12135 * linux-x86-low.c (update_debug_registers_callback): New.
12136 (i386_dr_low_set_addr): Use it.
12137 (i386_dr_low_get_addr): New.
12138 (i386_dr_low_set_control): Use update_debug_registers_callback.
12139 (i386_dr_low_get_control): New.
12140 (i386_dr_low_get_status): Adjust.
12141 * linux-low.c (linux_stop_lwp): New.
12142 * linux-low.h (linux_stop_lwp): Declare.
12143
12144 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12145 argument instead of a i386_debug_reg_state.
12146 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12147 a i386_debug_reg_state.
12148 (i386_insert_aligned_watchpoint): Adjust.
12149 (i386_remove_aligned_watchpoint): Adjust.
12150 (i386_low_stopped_data_address): Read the debug registers from the
12151 inferior instead of from the mirrors.
12152 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12153 (i386_dr_low_get_addr): Declare.
12154 (i386_dr_low_get_control): Declare.
12155 (i386_dr_low_get_status): Change prototype.
12156
12157 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12158 (i386_dr_low_get_addr): New.
12159 (i386_dr_low_get_control): New.
12160 (i386_dr_low_get_status): Adjust prototype. Return
12161 dr_status_mirror.
12162 (i386_initial_stuff): Clear dr_status_mirror and
12163 dr_control_mirror.
12164 (i386_get_thread_context): Adjust.
12165 (i386_set_thread_context): Adjust.
12166 (i386_thread_added): Adjust.
12167
12168 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12169
12170 * linux-low.h (linux_thread_area): Delete declaration.
12171
12172 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12173
12174 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12175 after its termination.
12176
12177 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12178
12179 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12180 (gdb_wants_all_stopped): Delete.
12181 (linux_wait_1): Don't call them.
12182 * server.c (handle_v_cont): Tag all threads as want-stopped.
12183 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12184 stopped as "client-wants-stopped".
12185
12186 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12187
12188 * Makefile.in (signals_h): New.
12189 (server_h): Depend on it.
12190 (server.o): Don't depend on $(signals_def).
12191 (signals.o): Depend on $(signals_def).
12192
12193 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12194
12195 * Makefile.in (signals_def): New.
12196 (server_h): Append include/gdb/signals.h and signals_def.
12197 (server.o): Append signals_def.
12198
12199 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12200
12201 * server.c (handle_target_event): Use target_signal_to_host for
12202 resume_info.sig initialization.
12203 * target.h (struct thread_resume) <sig>: New comment.
12204
12205 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12206
12207 * server.c (handle_query): strcpy() the returned string from paddress()
12208 instead of sprintf().
12209 * utils.c (paddress): Return phex_nz().
12210
12211 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12212
12213 * server.c (handle_v_cont): Call mourn_inferior if process
12214 just exited.
12215 (myresume): Likewise.
12216
12217 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12218
12219 Static tracepoints, and integration with UST.
12220
12221 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12222 * mem-break.c (uninsert_all_breakpoints)
12223 (reinsert_all_breakpoints): New.
12224 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12225 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12226 (gdb_agent_ust_loaded, helper_thread_id)
12227 (gdb_agent_helper_thread_id): New macros.
12228 (struct ipa_sym_addresses): Add addr_ust_loaded,
12229 addr_helper_thread_id, addr_cmd_buf.
12230 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12231 (in_process_agent_loaded_ust): New.
12232 (write_e_ust_not_loaded): New.
12233 (maybe_write_ipa_ust_not_loaded): New.
12234 (struct collect_static_trace_data_action): New.
12235 (enum tracepoint_type) <static_tracepoint>: New.
12236 (struct tracepoint) <handle>: Mention static tracepoints.
12237 (struct static_tracepoint_ctx): New.
12238 (CMD_BUF_SIZE): New.
12239 (add_tracepoint_action): Handle static tracepoint actions.
12240 (unprobe_marker_at): New.
12241 (clear_installed_tracepoints): Handle static tracepoints.
12242 (cmd_qtdp): Handle static tracepoints.
12243 (probe_marker_at): New.
12244 (cmd_qtstart): Handle static tracepoints.
12245 (response_tracepoint): Handle static tracepoints.
12246 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12247 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12248 (get_context_regcache): Handle static tracepoints.
12249 (do_action_at_tracepoint): Handle static tracepoint actions.
12250 (traceframe_find_block_type): Handle static trace data blocks.
12251 (traceframe_read_sdata): New.
12252 (download_tracepoints): Download static tracepoint actions.
12253 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12254 (GDB_PROBE_NAME): New.
12255 (ust_ops): New.
12256 (GET_UST_SYM): New.
12257 (USTF): New.
12258 (dlsym_ust): New.
12259 (ust_marker_to_static_tracepoint): New.
12260 (gdb_probe): New.
12261 (collect_ust_data_at_tracepoint): New.
12262 (gdb_ust_probe): New.
12263 (UNIX_PATH_MAX, SOCK_DIR): New.
12264 (gdb_ust_connect_sync_socket): New.
12265 (resume_thread, stop_thread): New.
12266 (run_inferior_command): New.
12267 (init_named_socket): New.
12268 (gdb_ust_socket_init): New.
12269 (cstr_to_hexstr): New.
12270 (next_st): New.
12271 (first_marker, next_marker): New.
12272 (response_ust_marker): New.
12273 (cmd_qtfstm, cmd_qtsstm): New.
12274 (unprobe_marker_at, probe_marker_at): New.
12275 (cmd_qtstmat, gdb_ust_thread): New.
12276 (gdb_ust_init): New.
12277 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12278 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12279 (ST_REGENTRY): New.
12280 (x86_64_st_collect_regmap): New.
12281 (X86_64_NUM_ST_COLLECT_GREGS): New.
12282 (AMD64_RIP_REGNUM): New.
12283 (supply_static_tracepoint_registers): New.
12284 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12285 (ST_REGENTRY): New.
12286 (i386_st_collect_regmap): New.
12287 (i386_NUM_ST_COLLECT_GREGS): New.
12288 (supply_static_tracepoint_registers): New.
12289 * server.c (handle_query): Handle qXfer:statictrace:read.
12290 <qSupported>: Report support for StaticTracepoints, and
12291 qXfer:statictrace:read features.
12292 * server.h (traceframe_read_sdata)
12293 (supply_static_tracepoint_registers): Declare.
12294 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12295 (unpack_varlen_hex): Include in IPA build.
12296 * Makefile.in (ustlibs, ustinc): New.
12297 (IPA_OBJS): Add remote-utils-ipa.o.
12298 ($(IPA_LIB)): Link -ldl and -lpthread.
12299 (UST_CFLAGS): New.
12300 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12301 * config.in, configure: Regenerate.
12302
12303 2010-06-20 Ian Lance Taylor <iant@google.com>
12304 Pedro Alves <pedro@codesourcery.com>
12305
12306 * linux-x86-low.c (always_true): Delete.
12307 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12308 trying to fool the compiler with always_true.
12309
12310 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12311
12312 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12313 conditions in gdbserver.
12314
12315 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12316
12317 * spu-low.c (spu_read_memory): Wrap around local store limit.
12318 (spu_write_memory): Likewise.
12319
12320 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12321
12322 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12323 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12324 LONGEST uses.
12325 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12326 uses.
12327 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12328 uses with LONGEST uses.
12329
12330 2010-06-14 Stan Shebs <stan@codesourcery.com>
12331 Pedro Alves <pedro@codesourcery.com>
12332
12333 Bytecode compiler.
12334
12335 * linux-x86-low.c: Include limits.h.
12336 (add_insns): New.
12337 (always_true): New.
12338 (EMIT_ASM): New.
12339 (EMIT_ASM32): New.
12340 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12341 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12342 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12343 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12344 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12345 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12346 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12347 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12348 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12349 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12350 (amd64_emit_void_call_2): New.
12351 (amd64_emit_ops): New.
12352 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12353 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12354 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12355 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12356 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12357 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12358 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12359 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12360 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12361 (i386_emit_stack_adjust, i386_emit_int_call_1)
12362 (i386_emit_void_call_2): New.
12363 (i386_emit_ops): New.
12364 (x86_emit_ops): New.
12365 (the_low_target): Install x86_emit_ops.
12366 * server.h (struct emit_ops): New.
12367 (get_raw_reg_func_addr): Declare.
12368 (current_insn_ptr, emit_error): Declare.
12369 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12370 (set_trace_state_variable_value): New defines.
12371 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12372 addr_get_trace_state_variable_value and
12373 addr_set_trace_state_variable_value.
12374 (symbol_list): New fields for get_raw_reg,
12375 get_trace_state_variable_value and set_trace_state_variable_value.
12376 (condfn): New typedef.
12377 (struct tracepoint): New field `compiled_cond'.
12378 (do_action_at_tracepoint): Clear compiled_cond.
12379 (get_trace_state_variable_value, set_trace_state_variable_value):
12380 Export in the IPA.
12381 (condition_true_at_tracepoint): If there's a compiled condition,
12382 run that.
12383 (current_insn_ptr, emit_error): New globals.
12384 (struct bytecode_address): New.
12385 (get_raw_reg_func_addr): New.
12386 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12387 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12388 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12389 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12390 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12391 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12392 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12393 (compile_tracepoint_condition, compile_bytecodes): New.
12394 * target.h (emit_ops): Forward declare.
12395 (struct target_ops): New field emit_ops.
12396 (target_emit_ops): New.
12397 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12398 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12399 * linux-low.c (linux_emit_ops): New.
12400 (linux_target_ops): Install it.
12401 * linux-low.h (struct linux_target_ops): New field emit_ops.
12402
12403 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12404
12405 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12406 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12407
12408 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12409 Stan Shebs <stan@codesourcery.com>
12410
12411 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12412 (all): Depend on $(extra_libraries).
12413 (install-only): Install the IPA.
12414 (IPA_OBJS, IPA_LIB): New.
12415 (clean): Remove the IPA lib.
12416 (IPAGENT_CFLAGS): New.
12417 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12418 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12419 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12420 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12421 * configure.ac: Check for atomic builtins support in the compiler.
12422 (IPA_DEPFILES, extra_libraries): Define.
12423 * configure.srv (ipa_obj): Add description.
12424 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12425 (i[34567]86-*-linux*): Set ipa_obj.
12426 (x86_64-*-linux*): Set ipa_obj.
12427 * linux-low.c (stabilizing_threads): New.
12428 (supports_fast_tracepoints): New.
12429 (linux_detach): Stabilize threads before detaching.
12430 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12431 the lwp is either not stabilizing, or is moving out of a jump pad.
12432 (linux_fast_tracepoint_collecting): New.
12433 (maybe_move_out_of_jump_pad): New.
12434 (enqueue_one_deferred_signal): New.
12435 (dequeue_one_deferred_signal): New.
12436 (linux_wait_for_event_1): If moving out of a jump pad, defer
12437 pending signals to later.
12438 (linux_stabilize_threads): New.
12439 (linux_wait_1): Check if threads need moving out of jump pads, and
12440 do it if so.
12441 (stuck_in_jump_pad_callback): New.
12442 (move_out_of_jump_pad_callback): New.
12443 (lwp_running): New.
12444 (linux_resume_one_lwp): Handle moving out of jump pads.
12445 (linux_set_resume_request): Dequeue deferred signals.
12446 (need_step_over_p): Also step over fast tracepoint jumps.
12447 (start_step_over): Also uninsert fast tracepoint jumps.
12448 (finish_step_over): Also reinsert fast tracepoint jumps.
12449 (linux_install_fast_tracepoint_jump): New.
12450 (linux_target_ops): Install linux_stabilize_threads and
12451 linux_install_fast_tracepoint_jump_pad.
12452 * linux-low.h (linux_target_ops) <get_thread_area,
12453 install_fast_tracepoint_jump_pad>: New fields.
12454 (struct lwp_info) <collecting_fast_tracepoint,
12455 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12456 (linux_get_thread_area): Declare.
12457 * linux-x86-low.c (jump_insn): New.
12458 (x86_get_thread_area): New.
12459 (append_insns): New.
12460 (push_opcode): New.
12461 (amd64_install_fast_tracepoint_jump_pad): New.
12462 (i386_install_fast_tracepoint_jump_pad): New.
12463 (x86_install_fast_tracepoint_jump_pad): New.
12464 (the_low_target): Install x86_get_thread_area and
12465 x86_install_fast_tracepoint_jump_pad.
12466 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12467 (struct fast_tracepoint_jump): New.
12468 (fast_tracepoint_jump_insn): New.
12469 (fast_tracepoint_jump_shadow): New.
12470 (find_fast_tracepoint_jump_at): New.
12471 (fast_tracepoint_jump_here): New.
12472 (delete_fast_tracepoint_jump): New.
12473 (set_fast_tracepoint_jump): New.
12474 (uninsert_fast_tracepoint_jumps_at): New.
12475 (reinsert_fast_tracepoint_jumps_at): New.
12476 (set_breakpoint_at): Use write_inferior_memory.
12477 (uninsert_raw_breakpoint): Use write_inferior_memory.
12478 (check_mem_read): Mask out fast tracepoint jumps.
12479 (check_mem_write): Mask out fast tracepoint jumps.
12480 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12481 (set_fast_tracepoint_jump): Declare.
12482 (delete_fast_tracepoint_jump)
12483 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12484 (reinsert_fast_tracepoint_jumps_at): Declare.
12485 * regcache.c: Don't compile many functions when building the
12486 in-process agent library.
12487 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12488 the register buffer in the heap.
12489 (free_register_cache): If the register buffer isn't owned by the
12490 regcache, don't free it.
12491 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12492 pre-existing register caches.
12493 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12494 type.
12495 (convert_ascii_to_int): : Constify `from' parameter type.
12496 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12497 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12498 the needed buffer in-place.
12499 (relocate_instruction): New.
12500 * server.c (handle_query) <qSymbols>: If the target supports
12501 tracepoints, give it a chance of looking up symbols. Report
12502 support for fast tracepoints.
12503 (handle_status): Stabilize threads.
12504 (process_serial_event): Adjust.
12505 * server.h (struct fast_tracepoint_jump): Forward declare.
12506 (struct process_info) <fast_tracepoint_jumps>: New field.
12507 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12508 (decode_X_packet, decode_M_packet): Adjust.
12509 (relocate_instruction): Declare.
12510 (in_process_agent_loaded): Declare.
12511 (tracepoint_look_up_symbols): Declare.
12512 (struct fast_tpoint_collect_status): Declare.
12513 (fast_tracepoint_collecting): Declare.
12514 (force_unlock_trace_buffer): Declare.
12515 (handle_tracepoint_bkpts): Declare.
12516 (initialize_low_tracepoint)
12517 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12518 * target.h (struct target_ops) <stabilize_threads,
12519 install_fast_tracepoint_jump_pad>: New fields.
12520 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12521 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12522 [HAVE_STDINT_H]: Include stdint.h.
12523 (trace_debug_1): Rename to ...
12524 (trace_vdebug): ... this.
12525 (trace_debug): Rename to ...
12526 (trace_debug_1): ... this. Add `level' parameter.
12527 (trace_debug): New.
12528 (ATTR_USED, ATTR_NOINLINE): New.
12529 (IP_AGENT_EXPORT): New.
12530 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12531 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12532 (about_to_request_buffer_space, trace_buffer_is_full)
12533 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12534 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12535 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12536 (traceframe_write_count, traceframes_created)
12537 (trace_state_variables)
12538 New renaming defines.
12539 (struct ipa_sym_addresses): New.
12540 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12541 (symbol_list): New.
12542 (ipa_sym_addrs): New.
12543 (all_tracepoint_symbols_looked_up): New.
12544 (in_process_agent_loaded): New.
12545 (write_e_ipa_not_loaded): New.
12546 (maybe_write_ipa_not_loaded): New.
12547 (tracepoint_look_up_symbols): New.
12548 (debug_threads) [IN_PROCESS_AGENT]: New.
12549 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12550 (UNKNOWN_SIDE_EFFECTS): New.
12551 (stop_tracing): New.
12552 (flush_trace_buffer): New.
12553 (stop_tracing_bkpt): New.
12554 (flush_trace_buffer_bkpt): New.
12555 (read_inferior_integer): New.
12556 (read_inferior_uinteger): New.
12557 (read_inferior_data_pointer): New.
12558 (write_inferior_data_pointer): New.
12559 (write_inferior_integer): New.
12560 (write_inferior_uinteger): New.
12561 (struct collect_static_trace_data_action): Delete.
12562 (enum tracepoint_type): New.
12563 (struct tracepoint) <type>: New field `type'.
12564 <actions_str, step_actions, step_actions_str>: Only include in
12565 GDBserver.
12566 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12567 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12568 (tracepoints): Use IP_AGENT_EXPORT.
12569 (last_tracepoint): Don't include in the IPA.
12570 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12571 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12572 (alloced_trace_state_variables): New.
12573 (trace_state_variables): Use IP_AGENT_EXPORT.
12574 (traceframe_t): Delete unused variable.
12575 (circular_trace_buffer): Don't include in the IPA.
12576 (trace_buffer_start): Delete.
12577 (struct trace_buffer_control): New.
12578 (trace_buffer_free): Delete.
12579 (struct ipa_trace_buffer_control): New.
12580 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12581 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12582 New.
12583 (trace_buffer_ctrl): New.
12584 (TRACE_BUFFER_CTRL_CURR): New.
12585 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12586 Reimplement as macros.
12587 (trace_buffer_wrap): Delete.
12588 (traceframe_write_count, traceframe_read_count)
12589 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12590 (struct tracepoint_hit_ctx) <type>: New field.
12591 (struct fast_tracepoint_ctx): New.
12592 (memory_barrier): New.
12593 (cmpxchg): New.
12594 (record_tracepoint_error): Update atomically in the IPA.
12595 (clear_inferior_trace_buffer): New.
12596 (about_to_request_buffer_space): New.
12597 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12598 updating the same buffer.
12599 (add_tracepoint): Default the tracepoint's type to trap
12600 tracepoint, and orig_size to -1.
12601 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12602 internal variables.
12603 (create_trace_state_variable): New parameter `gdb'. Handle it.
12604 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12605 (cmd_qtdp): Handle fast tracepoints.
12606 (cmd_qtdv): Adjust.
12607 (max_jump_pad_size): New.
12608 (gdb_jump_pad_head): New.
12609 (get_jump_space_head): New.
12610 (claim_jump_space): New.
12611 (sort_tracepoints): New.
12612 (MAX_JUMP_SIZE): New.
12613 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12614 IPA.
12615 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12616 support. Upload fast traceframes, and delete internal IPA
12617 breakpoints.
12618 (stop_tracing_handler): New.
12619 (flush_trace_buffer_handler): New.
12620 (cmd_qtstop): Upload fast tracepoints.
12621 (response_tracepoint): Handle fast tracepoints.
12622 (tracepoint_finished_step): Upload fast traceframes. Set the
12623 tracepoint hit context's tracepoint type.
12624 (handle_tracepoint_bkpts): New.
12625 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12626 type. Add comment about fast tracepoints.
12627 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12628 non-existing action_str field.
12629 (get_context_regcache): Handle fast tracepoints.
12630 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12631 to the regcache.
12632 (fast_tracepoint_from_jump_pad_address): New.
12633 (fast_tracepoint_from_ipa_tpoint_address): New.
12634 (collecting_t): New.
12635 (force_unlock_trace_buffer): New.
12636 (fast_tracepoint_collecting): New.
12637 (collecting): New.
12638 (gdb_collect): New.
12639 (write_inferior_data_ptr): New.
12640 (target_tp_heap): New.
12641 (target_malloc): New.
12642 (download_agent_expr): New.
12643 (UALIGN): New.
12644 (download_tracepoints): New.
12645 (download_trace_state_variables): New.
12646 (upload_fast_traceframes): New.
12647 (IPA_FIRST_TRACEFRAME): New.
12648 (IPA_NEXT_TRACEFRAME_1): New.
12649 (IPA_NEXT_TRACEFRAME): New.
12650 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12651 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12652 (gdb_jump_pad_buffer_end): New.
12653 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12654 (initialize_tracepoint): Adjust.
12655 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12656 buffer. Initialize the low module.
12657 * utils.c (PREFIX, TOOLNAME): New.
12658 (malloc_failure): Use PREFIX.
12659 (error): In the IPA, an error causes an exit.
12660 (fatal, warning): Use PREFIX.
12661 (internal_error): Use TOOLNAME.
12662 (NUMCELLS): Increase to 10.
12663 * configure, config.in: Regenerate.
12664
12665 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12666
12667 * server.c (handle_query) <qSupported>: Do two passes over the
12668 qSupported string to avoid nesting strtok.
12669
12670 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12671
12672 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12673 (CDEPS): New.
12674 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12675 -Wl,--dynamic-list.
12676 * configure: Regenerate.
12677 * proc-service.list: New.
12678
12679 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12680
12681 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12682 New comment.
12683
12684 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12685
12686 * gdbreplay.c (remote_open): Check error return from socket() call by
12687 its equality to -1 not by it being negative.
12688 * remote-utils.c (remote_open): Likewise.
12689
12690 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12691
12692 * config.h: Regenerate.
12693
12694 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12695
12696 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12697 doesn't provide PTRACE_GET_THREAD_AREA.
12698
12699 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12700
12701 * linux-m68k-low.c: Include <asm/ptrace.h>
12702 (ps_get_thread_area): Implement.
12703
12704 2010-05-03 Doug Evans <dje@google.com>
12705
12706 * event-loop.c (struct callback_event): New struct.
12707 (callback_list): New global.
12708 (append_callback_event, delete_callback_event): New functions.
12709 (process_callback): New function.
12710 (start_event_loop): Call it.
12711 * remote-utils.c (NOT_SCHEDULED): Define.
12712 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12713 moved out of readchar.
12714 (readchar): Rewrite. Call reschedule before returning.
12715 (reset_readchar): New function.
12716 (remote_close): Call it.
12717 (process_remaining, reschedule): New functions.
12718 * server.h (callback_handler_func): New typedef.
12719 (append_callback_event, delete_callback_event): Declare.
12720
12721 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12722
12723 * proc-service.c (ps_pglobal_lookup): Use
12724 thread_db_look_up_one_symbol.
12725 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12726 parameter. Use it instead of all_symbols_looked_up.
12727 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12728 field.
12729 (all_symbols_looked_up): Don't declare.
12730 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12731 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12732 field.
12733 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12734 Set all_symbols_looked_up here.
12735 (thread_db_look_up_one_symbol): New.
12736 (thread_db_get_tls_address): Adjust.
12737 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12738 thread_db object on the heap, and tentatively set it in the
12739 process structure.
12740 (thread_db_init): Don't set all_symbols_looked_up here.
12741 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12742
12743 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12744
12745 * linux-low.c (linux_kill, linux_detach): Adjust.
12746 (status_pending_p_callback): Remove redundant statement. Check
12747 for !TARGET_WAITIKIND_IGNORE, instead of
12748 TARGET_WAITKIND_STOPPED.
12749 (handle_tracepoints): Make sure LWP is locked. Adjust.
12750 (linux_wait_for_event_1): Adjust.
12751 (linux_cancel_breakpoints): New.
12752 (unsuspend_one_lwp): New.
12753 (unsuspend_all_lwps): New.
12754 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12755 (send_sigstop_callback): Change return type to int, add new
12756 `except' parameter and handle it.
12757 (suspend_and_send_sigstop_callback): New.
12758 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12759 pass them down. If SUSPEND, also increment the lwp's suspend
12760 count.
12761 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12762 (need_step_over_p): Don't consider suspended LWPs.
12763 (start_step_over): Adjust.
12764 (proceed_one_lwp): Change return type to int, add new `except'
12765 parameter and handle it.
12766 (unsuspend_and_proceed_one_lwp): New.
12767 (proceed_all_lwps): Use find_inferior instead of
12768 for_each_inferior.
12769 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12770 also decrement the suspend count of LWPs. Pass `except' down,
12771 instead of hacking its suspend count.
12772 (linux_pause_all): Add `freeze' parameter. Adjust.
12773 (linux_unpause_all): New.
12774 (linux_target_ops): Install linux_unpause_all.
12775 * server.c (handle_status): Adjust.
12776 * target.h (struct target_ops): New fields `unpause_all' and
12777 `cancel_breakpoints'. Add new parameter to `pause_all'.
12778 (pause_all): Add new `freeze' parameter.
12779 (unpause_all): New.
12780 (cancel_breakpoints): New.
12781 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12782 cancel breakpoints.
12783 (cmd_qtstart): Pause threads.
12784 (stop_tracing): Pause threads, and cancel breakpoints.
12785 * win32-low.c (win32_target_ops): Adjust.
12786
12787 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12788
12789 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12790 the inferior right away from here...
12791 (linux_wait_1): ... to here, and adjust to check the thread's
12792 last_resume_kind instead of the lwp's step or stop_expected flags.
12793
12794 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12795
12796 * README: Use consistent `GDB' and `GDBserver' spellings.
12797
12798 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12799
12800 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12801 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12802 (linux_detach_one_lwp): Assume the lwp is stopped.
12803 (any_thread_of): Delete.
12804 (linux_detach): Stop all lwps here. Don't blindly delete all
12805 breakpoints.
12806 (delete_lwp_callback): New.
12807 (linux_mourn): Delete all lwps of the process that is gone.
12808 (linux_wait_1): Don't delete the last lwp of the process here.
12809 * mem-break.h (mark_breakpoints_out): Declare.
12810 * mem-break.c (mark_breakpoints_out): New.
12811 (free_all_breakpoints): Use it.
12812 * server.c (handle_target_event): If the process is gone, mark
12813 breakpoints out.
12814 * thread-db.c (struct thread_db) <create_bp>: New field.
12815 (thread_db_enable_reporting): Fix prototype. Store a thread event
12816 breakpoint reference in the thread_db struct.
12817 (thread_db_load_search): Clear the thread_db object.
12818 (try_thread_db_load_1): Ditto.
12819 (switch_to_process): New.
12820 (disable_thread_event_reporting): Use it.
12821 (remove_thread_event_breakpoints): New.
12822 (thread_db_detach, thread_db_mourn): Use it.
12823
12824 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12825
12826 * linux-low.c (linux_enable_event_reporting): New.
12827 (linux_wait_for_event_1, handle_extended_wait): Use it.
12828
12829 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12830
12831 * linux-low.c (linux_kill_one_lwp, linux_kill)
12832 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12833 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12834 SIGSTOP even if the LWP is stopped.
12835 (send_sigstop_callback): New.
12836 (stop_all_lwps): Use send_sigstop_callback instead.
12837 (linux_resume_one_thread): Adjust.
12838 (proceed_one_lwp): Still proceed an LWP that the client has
12839 requested to stop, if we haven't reported it as stopped yet. Make
12840 sure that LWPs the client want stopped, have a pending SIGSTOP.
12841
12842 2010-04-26 Doug Evans <dje@google.com>
12843
12844 * server.c (handle_general_set): Make static.
12845
12846 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12847 Print received char after testing for error/eof instead of before.
12848 (input_interrupt): Tweak comment.
12849
12850 2010-04-23 Doug Evans <dje@google.com>
12851
12852 * server.c (start_inferior): Print inferior argv if --debug.
12853
12854 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12855
12856 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12857 * nto-x86-low.c: Include server.h
12858
12859 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12860
12861 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12862 be consistent with other sources of this directory.
12863 (init_registers_amd64): Correct name of source file of this function
12864 in the comment.
12865
12866 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12867
12868 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12869 64-bit executables.
12870
12871 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12872
12873 * win32-i386-low.c: Add 64-bit support.
12874 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12875 (init_registers_amd64): Declare.
12876 (mappings): Add 64-bit version of array.
12877 (init_windows_x86): New function.
12878 (the_low_target): Change init_arch field to init_windows_x86.
12879
12880 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12881
12882 * win32-low.c: Adapt to support also 64-bit architecture.
12883 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12884 (get_image_name): Use SIZE_T type for local variable `done'.
12885 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12886 (toolhelp_get_dll_name): Idem.
12887 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12888 Use uintptr_t typecast to avoid warning.
12889 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12890 (handle_exception): Use phex_nz to avoid warning.
12891 (win32_wait): Remove unused local variable `process'.
12892
12893 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12894
12895 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12896 `amd64-avx.o'.
12897
12898 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12899
12900 * configure.ac: Use `ws2_32' library for srv_mingw.
12901 * configure: Regenerate.
12902 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12903 * remote-utils.c: Likewise.
12904
12905 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12906
12907 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12908 if __x86_64__ is defined.
12909
12910 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12911
12912 * configure: Regenerate.
12913
12914 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12915
12916 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12917 * target.h (target_ops): New get_tib_address field.
12918 * win32-low.h (win32_thread_info): Add thread_local_base field.
12919 * win32-low.c (child_add_thread): Add tlb argument.
12920 Set thread_local_base field to TLB.
12921 (get_child_debug_event): Adapt to child_add_thread change.
12922 (win32_get_tib_address): New function.
12923 (win32_target_ops): Set get_tib_address field to
12924 win32_get_tib_address.
12925 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12926
12927 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12928
12929 * linux-low.c (linux_mourn): Also remove the process.
12930 * server.c (handle_target_event): Don't remove the process here.
12931 * nto-low.c (nto_mourn): New.
12932 (nto_target_ops): Install it.
12933 * spu-low.c (spu_mourn): New.
12934 (spu_target_ops): Install it.
12935 * win32-low.c (win32_mourn): New.
12936 (win32_target_ops): Install it.
12937
12938 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12939
12940 * server.h (buffer_xml_printf): Remove redundant `;'.
12941
12942 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12943
12944 * regcache.c (set_register_cache): Invalidate regcaches before
12945 changing the register cache layout.
12946 (regcache_invalidate_one): Allow a NULL regcache.
12947 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12948 regcaches before changing the register cache layout or the target
12949 regsets.
12950
12951 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12952
12953 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12954 variable warning on Linux/x86-64.
12955
12956 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12957
12958 GDBserver disconnected tracing support.
12959
12960 * linux-low.c (linux_remove_process): Delete.
12961 (add_lwp): Don't set last_resume_kind here.
12962 (linux_kill): Use `mourn'.
12963 (linux_detach): Use `thread_db_detach', and `mourn'.
12964 (linux_mourn): New.
12965 (linux_attach_lwp_1): Adjust comment.
12966 (linux_attach): last_resume_kind moved the thread_info; adjust.
12967 (status_pending_p_callback): Adjust.
12968 (linux_wait_for_event_1): Adjust.
12969 (count_events_callback, select_singlestep_lwp_callback)
12970 (select_event_lwp_callback, cancel_breakpoints_callback)
12971 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12972 (proceed_one_lwp): Adjust.
12973 (linux_async): Add debug output.
12974 (linux_thread_stopped): New.
12975 (linux_pause_all): New.
12976 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12977 linux_pause_all.
12978 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12979 (thread_db_free): Delete declaration.
12980 (thread_db_detach, thread_db_mourn): Declare.
12981 * thread-db.c (thread_db_init): Use thread_db_mourn.
12982 (thread_db_free): Delete, split in two.
12983 (disable_thread_event_reporting): New.
12984 (thread_db_detach): New.
12985 (thread_db_mourn): New.
12986
12987 * server.h (struct thread_info) <last_resume_kind>: New field.
12988 <attached>: Add comment.
12989 <gdb_detached>: New field.
12990 (handler_func): Change return type to int.
12991 (handle_serial_event, handle_target_event): Ditto.
12992 (gdb_connected): Declare.
12993 (tracing): Delete.
12994 (disconnected_tracing): Declare.
12995 (stop_tracing): Declare.
12996
12997 * server.c (handle_query) <qSupported>: Report support for
12998 disconnected tracing.
12999 (queue_stop_reply_callback): Account for running threads.
13000 (gdb_wants_thread_stopped): New.
13001 (gdb_wants_all_threads_stopped): New.
13002 (gdb_reattached_process): New.
13003 (handle_status): Clear the `gdb_detached' flag of all processes.
13004 In all-stop, stop all threads.
13005 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13006 (process_serial_event): If the remote connection breaks, or if an
13007 exit was forced with "monitor exit", force an event loop exit.
13008 Handle disconnected tracing on detach.
13009 (handle_serial_event): Adjust.
13010 (handle_target_event): If GDB isn't connected, forward events back
13011 to the inferior, unless the last process exited, in which case,
13012 exit gdbserver. Adjust interface.
13013
13014 * remote-utils.c (remote_open): Don't block in accept. Instead
13015 register an event loop source on the listen socket file
13016 descriptor. Refactor bits into ...
13017 (listen_desc): ... this new global.
13018 (gdb_connected): ... this new function.
13019 (enable_async_notification): ... this new function.
13020 (handle_accept_event): ... this new function.
13021 (remote_close): Clear remote_desc.
13022
13023 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13024
13025 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13026 New fields.
13027 (mourn_inferior): Define.
13028 (target_process_qsupported): Avoid the dangling else problem.
13029 (thread_stopped): Define.
13030 (pause_all): Define.
13031 (target_waitstatus_to_string): Declare.
13032 * target.c (target_waitstatus_to_string): New.
13033
13034 * tracepoint.c (tracing): Make extern.
13035 (disconnected_tracing): New.
13036 (stop_tracing): Make extern. Handle tracing stops due to GDB
13037 disconnecting.
13038 (cmd_qtdisconnected): New.
13039 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13040 (handle_tracepoint_general_set): Handle QTDisconnected.
13041
13042 * event-loop.c (event_handler_func): Change return type to int.
13043 (process_event): Bail out if the event handler wants the event
13044 loop to stop.
13045 (handle_file_event): Ditto.
13046 (start_event_loop): Bail out if the event handler wants the event
13047 loop to stop.
13048
13049 * nto-low.c (nto_target_ops): Adjust.
13050 * spu-low.c (spu_wait): Don't remove the process here.
13051 (spu_target_ops): Adjust.
13052 * win32-low.c (win32_wait): Don't remove the process here.
13053 (win32_target_ops): Adjust.
13054
13055 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13056
13057 * regcache.c (realloc_register_cache): Invalidate inferior's
13058 regcache before recreating it.
13059
13060 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13061
13062 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13063
13064 2010-04-09 Stan Shebs <stan@codesourcery.com>
13065 Pedro Alves <pedro@codesourcery.com>
13066
13067 * server.h (LONGEST): New.
13068 (struct thread_info) <while_stepping>: New field.
13069 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13070 Declare.
13071 (initialize_tracepoint, handle_tracepoint_general_set)
13072 (handle_tracepoint_query, tracepoint_finished_step)
13073 (tracepoint_was_hit, release_while_stepping_state_list):
13074 (current_traceframe): Declare.
13075 * server.c (handle_general_set): Handle tracepoint packets.
13076 (read_memory): New.
13077 (write_memory): New.
13078 (handle_search_memory_1): Use read_memory.
13079 (handle_query): Report support for conditional tracepoints, trace
13080 state variables, and tracepoint sources. Handle tracepoint
13081 queries.
13082 (main): Initialize the tracepoints module.
13083 (process_serial_event): Handle traceframe reads/writes.
13084
13085 * linux-low.c (handle_tracepoints): New.
13086 (linux_wait_1): Call it.
13087 (linux_resume_one_lwp): Handle while-stepping.
13088 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13089 (linux_target_ops): Install them.
13090 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13091 New field.
13092 * linux-x86-low.c (x86_supports_tracepoints): New.
13093 (the_low_target). Install it.
13094
13095 * mem-break.h (delete_breakpoint): Declare.
13096 * mem-break.c (delete_breakpoint): Make external.
13097
13098 * target.h (struct target_ops): Add `supports_tracepoints',
13099 `read_pc', and `write_pc' fields.
13100 (target_supports_tracepoints): Define.
13101 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13102 (phex_nz): New.
13103
13104 * regcache.h (struct regcache) <registers_owned>: New field.
13105 (init_register_cache, regcache_cpy): Declare.
13106 (regcache_read_pc, regcache_write_pc): Declare.
13107 (register_cache_size): Declare.
13108 (supply_regblock): Declare.
13109 * regcache.c (init_register_cache): New.
13110 (new_register_cache): Use it.
13111 (regcache_cpy): New.
13112 (register_cache_size): New.
13113 (supply_regblock): New.
13114 (regcache_read_pc, regcache_write_pc): New.
13115
13116 * tracepoint.c: New.
13117
13118 * Makefile.in (OBS): Add tracepoint.o.
13119 (tracepoint.o): New rule.
13120
13121 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13122
13123 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13124 (i386-mmx.o): New.
13125 (i386-mmx.c): Likewise.
13126 (i386-mmx-linux.o): Likewise.
13127 (i386-mmx-linux.c): Likewise.
13128
13129 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13130 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13131 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13132 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13133
13134 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13135 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13136 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13137
13138 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13139
13140 * Makefile.in (clean): Updated.
13141 (i386-avx.o): New.
13142 (i386-avx.c): Likewise.
13143 (i386-avx-linux.o): Likewise.
13144 (i386-avx-linux.c): Likewise.
13145 (amd64-avx.o): Likewise.
13146 (amd64-avx.c): Likewise.
13147 (amd64-avx-linux.o): Likewise.
13148 (amd64-avx-linux.c): Likewise.
13149
13150 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13151 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13152 (srv_amd64_regobj): Add amd64-avx.o.
13153 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13154 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13155 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13156 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13157 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13158 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13159 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13160
13161 * i387-fp.c: Include "i386-xstate.h".
13162 (i387_xsave): New.
13163 (i387_cache_to_xsave): Likewise.
13164 (i387_xsave_to_cache): Likewise.
13165 (x86_xcr0): Likewise.
13166
13167 * i387-fp.h (i387_cache_to_xsave): Likewise.
13168 (i387_xsave_to_cache): Likewise.
13169 (x86_xcr0): Likewise.
13170
13171 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13172 * linux-crisv32-low.c (target_regsets): Likewise.
13173 * linux-m68k-low.c (target_regsets): Likewise.
13174 * linux-mips-low.c (target_regsets): Likewise.
13175 * linux-ppc-low.c (target_regsets): Likewise.
13176 * linux-s390-low.c (target_regsets): Likewise.
13177 * linux-sh-low.c (target_regsets): Likewise.
13178 * linux-sparc-low.c (target_regsets): Likewise.
13179 * linux-xtensa-low.c (target_regsets): Likewise.
13180
13181 * linux-low.c: Include <sys/uio.h>.
13182 (regsets_fetch_inferior_registers): Support nt_type.
13183 (regsets_store_inferior_registers): Likewise.
13184 (linux_process_qsupported): New.
13185 (linux_target_ops): Add linux_process_qsupported.
13186
13187 * linux-low.h (regset_info): Add nt_type.
13188 (linux_target_ops): Add process_qsupported.
13189
13190 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13191 and <sys/uio.h>.
13192 (init_registers_i386_avx_linux): New.
13193 (init_registers_amd64_avx_linux): Likewise.
13194 (xmltarget_i386_linux_no_xml): Likewise.
13195 (xmltarget_amd64_linux_no_xml): Likewise.
13196 (PTRACE_GETREGSET): Likewise.
13197 (PTRACE_SETREGSET): Likewise.
13198 (x86_fill_xstateregset): Likewise.
13199 (x86_store_xstateregset): Likewise.
13200 (use_xml): Likewise.
13201 (x86_linux_update_xmltarget): Likewise.
13202 (x86_linux_process_qsupported): Likewise.
13203 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13204 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13205 init_registers_i386_linux here. Call
13206 x86_linux_update_xmltarget.
13207 (the_low_target): Add x86_linux_process_qsupported.
13208
13209 * server.c (handle_query): Call target_process_qsupported.
13210
13211 * target.h (target_ops): Add process_qsupported.
13212 (target_process_qsupported): New.
13213
13214 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13215
13216 * inferiors.c (add_thread): Set last_status kind to
13217 TARGET_WAITKIND_IGNORE.
13218 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13219 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13220 (linux_wait_1): Move `thread' local definition to block that uses
13221 it. Don't NULL initialize `event_child'.
13222 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13223 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13224 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13225
13226 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13227
13228 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13229 an extended waitstatus, or by a watchpoint.
13230 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13231 thread was stepping or has been stopped by a watchpoint.
13232
13233 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13234
13235 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13236 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13237 of another, then delete the previous, and validate all
13238 breakpoints.
13239 (validate_inserted_breakpoint): New.
13240 (delete_disabled_breakpoints): New.
13241 (validate_breakpoints): New.
13242 (check_mem_read): Validate breakpoints before trusting their
13243 shadow. Delete disabled breakpoints.
13244 (check_mem_write): Validate breakpoints before trusting they
13245 should be inserted. Delete disabled breakpoints.
13246 * mem-break.h (validate_breakpoints):
13247 * server.c (handle_query): Validate breakpoints when we see a
13248 qSymbol query.
13249
13250 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13251
13252 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13253 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13254 if we could tell there's a GDB breakpoint at stop_pc.
13255 (need_step_over_p): Don't do a step over if we find a GDB
13256 breakpoint at the resume PC.
13257
13258 * mem-break.c (struct raw_breakpoint): New.
13259 (enum bkpt_type): New type `gdb_breakpoint'.
13260 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13261 fields. New field `raw'.
13262 (find_raw_breakpoint_at): New.
13263 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13264 breakpoint instead.
13265 (set_breakpoint_at): Adjust.
13266 (delete_raw_breakpoint): New.
13267 (release_breakpoint): New.
13268 (delete_breakpoint): Rename to...
13269 (delete_breakpoint_1): ... this. Add proc parameter. Use
13270 release_breakpoint. Return ENOENT.
13271 (delete_breakpoint): Reimplement.
13272 (find_breakpoint_at): Delete.
13273 (find_gdb_breakpoint_at): New.
13274 (delete_breakpoint_at): Delete.
13275 (set_gdb_breakpoint_at): New.
13276 (delete_gdb_breakpoint_at): New.
13277 (gdb_breakpoint_here): New.
13278 (set_reinsert_breakpoint): Use release_breakpoint.
13279 (uninsert_breakpoint): Rename to ...
13280 (uninsert_raw_breakpoint): ... this.
13281 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13282 (reinsert_raw_breakpoint): Change parameter type to
13283 raw_breakpoint.
13284 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13285 instead.
13286 (check_breakpoints): Adjust. Use release_breakpoint.
13287 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13288 (breakpoint_inserted_here): Ditto.
13289 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13290 Don't trust the breakpoint's shadow if it is not inserted.
13291 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13292 (delete_all_breakpoints): Adjust.
13293 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13294 use delete_breakpoint_1.
13295
13296 * mem-break.h (breakpoints_supported): Delete declaration.
13297 (set_gdb_breakpoint_at): Declare.
13298 (gdb_breakpoint_here): Declare.
13299 (delete_breakpoint_at): Delete.
13300 (delete_gdb_breakpoint_at): Declare.
13301
13302 * server.h (struct raw_breakpoint): Forward declare.
13303 (struct process_info): New field `raw_breakpoints'.
13304
13305 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13306 breakpoints.
13307
13308 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13309
13310 * linux-low.c (status_pending_p_callback): Fix comment.
13311 (linux_wait_for_event_1): Move most of the internal breakpoint
13312 handling from here...
13313 (linux_wait_1): ... to here.
13314 (count_events_callback): New.
13315 (select_singlestep_lwp_callback): New.
13316 (select_event_lwp_callback): New.
13317 (cancel_breakpoints_callback): New.
13318 (select_event_lwp): New.
13319 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13320 priority to all LWPs that have had events that should be reported
13321 to the client. Cancel breakpoints when about to reporting the
13322 event to the client, not while stopping lwps. No longer cancel
13323 finished single-steps here.
13324 (cancel_finished_single_step): Delete.
13325 (cancel_finished_single_steps): Delete.
13326
13327 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13328
13329 * mem-break.c (enum bkpt_type): New.
13330 (struct breakpoint): New field `type'.
13331 (set_breakpoint_at): Change return type to struct breakpoint
13332 pointer. Set type to `other_breakpoint' by default.
13333 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13334 in the breakpoint list.
13335 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13336 (reinsert_breakpoint): Rename to ...
13337 (reinsert_raw_breakpoint): ... this.
13338 (reinsert_breakpoints_at): Adjust.
13339 * mem-break.h (struct breakpoint): Declare.
13340 (set_breakpoint_at): Change return type to struct breakpoint
13341 pointer.
13342
13343 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13344
13345 * server.c (handle_query): Assign, not compare.
13346
13347 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13348
13349 Teach linux gdbserver to step-over-breakpoints.
13350
13351 * linux-low.c (can_hardware_single_step): New.
13352 (supports_breakpoints): New.
13353 (handle_extended_wait): If stopping threads, read the stop pc of
13354 the new cloned LWP.
13355 (get_pc): New.
13356 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13357 low target doesn't support retrieving the PC.
13358 (add_lwp): Set last_resume_kind to resume_continue.
13359 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13360 (linux_attach): Don't clear stop_expected. Set the lwp's
13361 last_resume_kind to resume_stop.
13362 (linux_detach_one_lwp): Don't check for removed breakpoints.
13363 (check_removed_breakpoint): Delete.
13364 (status_pending_p): Rename to ...
13365 (status_pending_p_callback): ... this. Don't check for removed
13366 breakpoints. Don't consider threads that are stopped from GDB's
13367 perspective.
13368 (linux_wait_for_lwp): Always read the stop_pc here.
13369 (cancel_breakpoint): New.
13370 (step_over_bkpt): New global.
13371 (linux_wait_for_event_1): Implement stepping over breakpoints.
13372 (gdb_wants_lwp_stopped): New.
13373 (gdb_wants_all_stopped): New.
13374 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13375 single-step traps here. Store the thread's last reported target
13376 wait status.
13377 (send_sigstop): Don't clear stop_expected. Always set it,
13378 instead.
13379 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13380 (cancel_finished_single_step): New.
13381 (cancel_finished_single_steps): New.
13382 (wait_for_sigstop): Don't cancel finished single-step traps here.
13383 (linux_resume_one_lwp): Don't check for removed breakpoints.
13384 Don't set `step' on non-hardware step archs.
13385 (linux_set_resume_request): Ignore resume_stop requests if already
13386 stopping or stopped. Set the lwp's last_resume_kind.
13387 (resume_status_pending_p): Don't check for removed breakpoints.
13388 (need_step_over_p): New.
13389 (start_step_over): New.
13390 (finish_step_over): New.
13391 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13392 requests. Clear the thread's last reported target waitstatus.
13393 Don't use the `suspended' flag. Don't consider pending breakpoints.
13394 (linux_resume): Start a step-over if necessary.
13395 (proceed_one_lwp): New.
13396 (proceed_all_lwps): New.
13397 (unstop_all_lwps): New.
13398 * linux-low.h (struct lwp_info): Rewrite comment for the
13399 `suspended' flag. Add the `stop_pc' field. Delete the
13400 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13401 Add `'last_resume_kind' and `need_step_over' fields.
13402 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13403 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13404 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13405 (set_raw_breakpoint_at): New.
13406 (set_breakpoint_at): Rewrite to use it.
13407 (reinsert_breakpoint_handler): Delete.
13408 (set_reinsert_breakpoint): New.
13409 (reinsert_breakpoint_by_bp): Delete.
13410 (delete_reinsert_breakpoints): New.
13411 (uninsert_breakpoint): Rewrite.
13412 (uninsert_breakpoints_at): New.
13413 (reinsert_breakpoint): Rewrite.
13414 (reinsert_breakpoints_at): New.
13415 (check_breakpoints): Rewrite.
13416 (breakpoint_here): New.
13417 (breakpoint_inserted_here): New.
13418 (check_mem_read): Adjust.
13419 * mem-break.h (breakpoints_supported, breakpoint_here)
13420 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13421 (reinsert_breakpoint_by_bp): Delete declaration.
13422 (delete_reinsert_breakpoints): Declare.
13423 (reinsert_breakpoint): Delete declaration.
13424 (reinsert_breakpoints_at): Declare.
13425 (uninsert_breakpoint): Delete declaration.
13426 (uninsert_breakpoints_at): Declare.
13427 (check_breakpoints): Adjust prototype.
13428 * server.h: Adjust include order.
13429 (struct thread_info): Declare here. Add a `last_status' field.
13430
13431 2010-03-23 Michael Snyder <msnyder@vmware.com>
13432
13433 * server.c (crc32): New function.
13434 (handle_query): Add handling for 'qCRC:' request.
13435
13436 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13437
13438 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13439 lwp had been stopped by a watchpoint.
13440
13441 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13442
13443 * server.h (internal_error): Declare.
13444 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13445 * utils.c (internal_error): New function.
13446
13447 2010-03-15 Andreas Schwab <schwab@redhat.com>
13448
13449 * configure.srv: Fix typo setting srv_regobj.
13450
13451 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13452
13453 * linux-low.c (fetch_register): Avoid passing a non string literal
13454 format to `error'.
13455 (usr_store_inferior_registers): Ditto.
13456
13457 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13458
13459 * linux-low.c (linux_write_memory): Bail out early if peeking
13460 memory failed.
13461
13462 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13463
13464 * linux-low.h (struct lwp_info): New fields
13465 `stopped_by_watchpoint' and `stopped_data_address'.
13466 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13467 here, and cache them in the lwp object.
13468 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13469 directly.
13470 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13471 field.
13472 (linux_stopped_by_watchpoint): Rewrite.
13473 (linux_stopped_data_address): Rewrite.
13474
13475 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13476
13477 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13478 switching the current inferior, not before.
13479
13480 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13481
13482 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13483 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13484 i386-linux.c and amd64-linux.c.
13485 (reg-i386.o): Removed.
13486 (reg-i386.c): Likewise.
13487 (reg-i386-linux.o): Likewise.
13488 (reg-i386-linux.c): Likewise.
13489 (reg-x86-64.o): Likewise.
13490 (reg-x86-64.c): Likewise.
13491 (reg-x86-64-linux.o): Likewise.
13492 (reg-x86-64-linux.c): Likewise.
13493 (i386.o): New.
13494 (i386.c): Likewise.
13495 (i386-linux.o): Likewise.
13496 (i386-linux.c): Likewise.
13497 (amd64.o): Likewise.
13498 (amd64.c): Likewise.
13499 (amd64-linux.o): Likewise.
13500 (amd64-linux.c): Likewise.
13501
13502 * configure.srv (srv_i386_regobj): New.
13503 (srv_i386_linux_regobj): Likewise.
13504 (srv_amd64_regobj): Likewise.
13505 (srv_amd64_linux_regobj): Likewise.
13506 (srv_i386_32bit_xmlfiles): Likewise.
13507 (srv_i386_64bit_xmlfiles): Likewise.
13508 (srv_i386_xmlfiles): Likewise.
13509 (srv_amd64_xmlfiles): Likewise.
13510 (srv_i386_linux_xmlfiles): Likewise.
13511 (srv_amd64_linux_xmlfiles): Likewise.
13512 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13513 srv_xmlfiles to $srv_i386_xmlfiles.
13514 (i[34567]86-*-mingw32ce*): Likewise.
13515 (i[34567]86-*-mingw*): Likewise.
13516 (i[34567]86-*-nto*): Likewise.
13517 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13518 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13519 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13520 (x86_64-*-linux*): Likewise.
13521
13522 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13523 (init_registers_amd64_linux): New.
13524 (x86_arch_setup): Replace init_registers_x86_64_linux with
13525 init_registers_amd64_linux.
13526
13527 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13528
13529 * configure.ac: Check for libdl. If it is not available link against
13530 static libthread_db.
13531 * configure: Regenerate.
13532
13533 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13534
13535 PR9605
13536
13537 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13538 handing a read watchpoint.
13539 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13540
13541 2010-02-12 Doug Evans <dje@google.com>
13542
13543 * linux-low.c (linux_supports_tracefork_flag): Document.
13544 (linux_look_up_symbols): Add comment.
13545
13546 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13547
13548 * regcache.c (supply_register): Clear regcache if buf is NULL.
13549
13550 2010-02-02 Nicolas Roche <roche@sourceware.org>
13551 Joel Brobecker <brobecker@adacore.com>
13552
13553 * inferiors.c (find_inferior): Add function documentation.
13554 (unloaded_dll): Handle the case where the unloaded dll has not
13555 been previously registered in the dll list.
13556
13557 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13558
13559 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13560 (thumb2_breakpoint): New.
13561 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13562
13563 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13564
13565 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13566 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13567 breakpoints.
13568
13569 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13570
13571 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13572
13573 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13574
13575 * linux-s390-low.c (s390_collect_ptrace_register)
13576 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13577
13578 2010-01-21 Doug Evans <dje@google.com>
13579
13580 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13581 (PTRACE_ARG4_TYPE): New macro.
13582 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13583 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13584 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13585 (usr_store_inferior_registers): Ditto.
13586 (linux_read_memory, linux_write_memory): Ditto.
13587 (linux_test_for_tracefork): Ditto.
13588
13589 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13590 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13591
13592 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13593
13594 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13595 target.
13596
13597 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13598
13599 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13600 prototype to take a regcache. Adjust.
13601
13602 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13603
13604 * regcache.h (struct thread_info): Forward declare.
13605 (struct regcache): New.
13606 (new_register_cache): Adjust prototype.
13607 (get_thread_regcache): Declare.
13608 (free_register_cache): Adjust prototype.
13609 (registers_to_string, registers_from_string): Ditto.
13610 (supply_register, supply_register_by_name, collect_register)
13611 (collect_register_as_string, collect_register_by_name): Ditto.
13612 * regcache.c (struct inferior_regcache_data): Delete.
13613 (get_regcache): Rename to ...
13614 (get_thread_regcache): ... this. Adjust. Switch inferior before
13615 fetching registers.
13616 (regcache_invalidate_one): Adjust.
13617 (regcache_invalidate): Fix prototype.
13618 (new_register_cache): Return the new register cache.
13619 (free_register_cache): Change prototype.
13620 (realloc_register_cache): Adjust.
13621 (registers_to_string): Change prototype to take a regcache. Adjust.
13622 (registers_from_string): Ditto.
13623 (register_data): Ditto.
13624 (supply_register): Ditto.
13625 (supply_register_by_name): Ditto.
13626 (collect_register): Ditto.
13627 (collect_register_as_string): Ditto.
13628 (collect_register_by_name): Ditto.
13629 * server.c (process_serial_event): Adjust.
13630 * linux-low.h (regset_fill_func, regset_store_func): Change
13631 prototype.
13632 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13633 Change prototype.
13634 * linux-low.c (get_stop_pc): Adjust.
13635 (check_removed_breakpoint): Adjust.
13636 (linux_wait_for_event): Adjust.
13637 (linux_resume_one_lwp): Adjust.
13638 (fetch_register): Add regcache parameter. Adjust.
13639 (usr_store_inferior_registers): Ditto.
13640 (regsets_fetch_inferior_registers): Ditto.
13641 (regsets_store_inferior_registers): Ditto.
13642 (linux_fetch_registers, linux_store_registers): Ditto.
13643 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13644 regcache. Adjust.
13645 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13646 Ditto.
13647 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13648 prototype to take a regcache.
13649 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13650 * remote-utils.c (convert_ascii_to_int, outreg)
13651 (prepare_resume_reply): Change prototype to take a regcache.
13652 Adjust.
13653 * target.h (struct target_ops) <fetch_registers, store_registers>:
13654 Change prototype to take a regcache.
13655 (fetch_inferior_registers, store_inferior_registers): Change
13656 prototype to take a regcache. Adjust.
13657 * proc-service.c (ps_lgetregs): Adjust.
13658 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13659 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13660 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13661 take a regcache. Adjust.
13662 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13663 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13664 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13665 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13666 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13667 (cris_cannot_fetch_register):
13668 (cris_breakpoint_at): Change prototype to take a regcache.
13669 Adjust.
13670 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13671 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13672 to take a regcache. Adjust.
13673 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13674 Adjust.
13675 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13676 take a regcache. Adjust.
13677 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13678 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13679 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13680 * linux-mips-low.c (mips_get_pc):
13681 (mips_set_pc): Change prototype to take a regcache. Adjust.
13682 (mips_reinsert_addr): Adjust.
13683 (mips_collect_register): Change prototype to take a regcache.
13684 Adjust.
13685 (mips_supply_register):
13686 (mips_collect_register_32bit, mips_supply_register_32bit)
13687 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13688 (mips_store_fpregset): Ditto.
13689 * linux-ppc-low.c (ppc_supply_ptrace_register)
13690 (ppc_supply_ptrace_register): Ditto.
13691 (parse_spufs_run): Adjust.
13692 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13693 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13694 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13695 take a regcache. Adjust.
13696 * linux-s390-low.c (s390_collect_ptrace_register)
13697 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13698 (s390_set_pc): Change prototype to take a regcache. Adjust.
13699 (s390_arch_setup): Adjust.
13700 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13701 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13702 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13703 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13704 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13705 regcache. Adjust.
13706 (sparc_breakpoint_at): Adjust.
13707 * linux-xtensa-low.c (xtensa_fill_gregset):
13708 (xtensa_store_gregset):
13709 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13710 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13711 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13712 prototype to take a regcache. Adjust.
13713 * win32-arm-low.c (arm_fetch_inferior_register)
13714 (arm_store_inferior_register): Change prototype to take a
13715 regcache. Adjust.
13716 * win32-i386-low.c (i386_fetch_inferior_register)
13717 (i386_store_inferior_register): Change prototype to take a
13718 regcache. Adjust.
13719 * win32-low.c (child_fetch_inferior_registers)
13720 (child_store_inferior_registers): Change prototype to take a
13721 regcache. Adjust.
13722 (win32_wait): Adjust.
13723 (win32_fetch_inferior_registers): Change prototype to take a
13724 regcache. Adjust.
13725 (win32_store_inferior_registers): Adjust.
13726 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13727 store_inferior_register>: Change prototype to take a regcache.
13728
13729 2010-01-20 Doug Evans <dje@google.com>
13730
13731 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13732 #ifdef.
13733 (linux_wait_for_event1, linux_init_signals): Ditto.
13734 (W_STOPCODE): Provide definition if missing.
13735
13736 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13737
13738 * linux-low.c (linux_core_of_thread): New.
13739 (compare_ints, show_process, list_threads): New.
13740 (linux_qxfer_osdata): Report threads and cores.
13741 (linux_target_op): Register linux_core_of_thread.
13742 * remote-utils.c (prepare_resume_reply): Report the core.
13743 (buffer_xml_printf): Support %d specifier.
13744 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13745 New.
13746 (handle_query): Handle qXfer:threads. Announce availability
13747 thereof.
13748 * target.h (struct target_ops): New field core_of_thread.
13749
13750 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13751
13752 * Makefile.in (clean): Remove new generated files.
13753 (reg-s390.o, reg-s390.c): Remove rules.
13754 (reg-s390x.o, reg-s390x.c): Likewise.
13755 (s390-linux32.o, s390-linux32.c): Add rules.
13756 (s390-linux64.o, s390-linux64.c): Likewise.
13757 (s390x-linux64.o, s390x-linux64.c): Likewise.
13758 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13759 * linux-s390-low.c: Include <elf.h>.
13760 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13761 (init_registers_s390): Remove prototype.
13762 (init_registers_s390x): Likewise.
13763 (init_registers_s390_linux32): Add prototype.
13764 (init_registers_s390_linux64): Likewise.
13765 (init_registers_s390x_linux64): Likewise.
13766 (s390_num_regs_3264): New define.
13767 (s390_regmap_3264): New global variable.
13768 (s390_cannot_fetch_register): Remove obsolete check.
13769 (s390_cannot_store_register): Likewise.
13770 (s390_collect_ptrace_register): Handle upper/lower register halves.
13771 (s390_supply_ptrace_register): Likewise.
13772 (s390_fill_gregset): Update to register number changes.
13773 (s390_get_hwcap): New routine.
13774 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13775 Install appropriate regmap and register set.
13776
13777 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13778
13779 * server.c (gdbserver_version): Update copyright year to 2010.
13780 * gdbreplay.c (gdbreplay_version): Likewise.
13781
13782 2009-12-28 Doug Evans <dje@google.com>
13783
13784 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13785 elf/external.h. Include <elf.h> instead but only if necessary.
13786
13787 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13788
13789 * linux-low.c (linux_remove_process): Remove `detaching'
13790 parameter. Don't release/detach from thread_db here.
13791 (linux_kill): Release/detach from thread_db here, ...
13792 (linux_detach): ... and here, before actually detaching.
13793 (linux_wait_1): ... and here, when a process exits.
13794 * thread-db.c (any_thread_of): New.
13795 (thread_db_free): Switch the current inferior to a thread of the
13796 passed in process.
13797
13798 2009-12-21 Doug Evans <dje@google.com>
13799
13800 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13801
13802 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13803 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13804 warning ifndef __NR_tkill. Move setting of errno there too.
13805 Delete unnecessary resetting of errno after syscall.
13806 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13807
13808 * configure.ac: Check for dladdr.
13809 * config.in: Regenerate.
13810 * configure: Regenerate.
13811 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13812 (try_thread_db_load): Update.
13813
13814 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13815
13816 2009-12-18 Doug Evans <dje@google.com>
13817
13818 * event-loop.c: Include unistd.h if it exists.
13819
13820 * linux-low.c (my_waitpid): Move definition away from being in
13821 between linux_tracefork_child/linux_test_for_tracefork.
13822
13823 * gdb_proc_service.h (psaddr_t): Fix type.
13824 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13825 signature to match glibc.
13826
13827 2009-12-16 Doug Evans <dje@google.com>
13828
13829 * linux-low.c (linux_read_memory): Fix argument to read.
13830
13831 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13832
13833 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13834 events, don't leave current_inferior pointing at null.
13835
13836 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13837
13838 * win32-low.c (LOG): Delete.
13839 (OUTMSG): Output to stderr.
13840 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13841 on compile time LOG macro.
13842 (win32_wait): Fix debug output.
13843
13844 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13845
13846 * win32-low.c (win32_add_one_solib): If the dll name is
13847 "ntdll.dll", prepend the system directory to the dll path.
13848
13849 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13850
13851 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13852
13853 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13854 Vladimir Prus <vladimir@codesourcery.com>
13855
13856 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13857 * configure.ac: Check for __mcoldfire__ and set
13858 gdb_cv_m68k_is_coldfire.
13859 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13860 reg-cf.o and reg-m68k.o.
13861 * configure: Regenerated.
13862
13863 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13864
13865 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13866 Pass it to thread_db_free.
13867 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13868 proper `detaching' argument to linux_remove_process.
13869 * linux-low.h (thread_db_free): Add `detaching' parameter.
13870 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13871 to thread_db_free.
13872 (thread_db_free): Add `detaching' parameter. Only
13873 call td_ta_clear_event if detaching from process.
13874
13875 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13876
13877 * thread-db.c (thread_db_free): Fix typo.
13878
13879 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13880
13881 PR gdb/10838
13882 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13883
13884 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13885
13886 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13887 with an i686 compiler.
13888 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13889 needed.
13890 * configure: Rebuilt.
13891
13892 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13893
13894 PR gdb/10783
13895
13896 * server.c (handle_search_memory_1): Correct read_addr initialization
13897 in loop for searching subsequent chunks.
13898
13899 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13900
13901 * configure.ac: New --with-libthread-db option.
13902 * thread-db.c: Allow direct dependence on libthread_db.
13903 (thread_db_free): Adjust.
13904 * config.in: Regenerate.
13905 * configure: Likewise.
13906
13907 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13908
13909 PR gdb/10757
13910 * thread-db.c (attach_thread): New function.
13911 (maybe_attach_thread): Return success/failure.
13912 (find_new_threads_callback): Adjust.
13913 (thread_db_find_new_threads): Loop until no new threads.
13914
13915 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13916
13917 * proc-service.c (ps_lgetregs): Formatting.
13918
13919 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13920
13921 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13922 * configure.ac: Adjust.
13923 * linux-low.h (struct process_info_private): Move members to struct
13924 thread_db.
13925 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13926 * linux-low.c (linux_remove_process): Adjust.
13927 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13928 * server.c (handle_query): Move code ...
13929 (handle_monitor_command): ... here. New function.
13930 * target.h (struct target_ops): New member.
13931 * thread-db.c (struct thread_db): New.
13932 (libthread_db_search_path): New variable.
13933 (thread_db_create_event, thread_db_enable_reporting)
13934 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13935 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13936 (try_thread_db_load_1, dladdr_to_soname): New functions.
13937 (try_thread_db_load, thread_db_load_search): New functions.
13938 (thread_db_init): Search for libthread_db.
13939 (thread_db_free): New function.
13940 (thread_db_handle_monitor_command): Likewise.
13941 * config.in: Regenerate.
13942 * configure: Regenerate.
13943
13944 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13945
13946 * spu-low.c (spu_kill): Wait for inferior to terminate.
13947 Call clear_inferiors.
13948 (spu_detach): Call clear_inferiors.
13949
13950 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13951
13952 * aclocal.m4: Regenerate.
13953 * config.in: Likewise.
13954 * configure: Likewise.
13955
13956 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13957
13958 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13959 (parse_spufs_run): New function.
13960 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13961 (ppc_breakpoint_at): Handle SPU breakpoints.
13962
13963 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13964
13965 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13966 (SPUFS_MAGIC): Define.
13967 (spu_enumerate_spu_ids): New function.
13968 (linux_qxfer_spu): New function.
13969 (linux_target_ops): Install linux_qxfer_spu.
13970
13971 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13972
13973 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13974 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13975 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13976 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13977 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13978 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13979 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13980 (init_registers_powerpc_cell32l): Add prototype.
13981 (init_registers_powerpc_cell64l): Likewise.
13982 (ppc_arch_setup): Detect Cell/B.E. architecture.
13983
13984 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13985
13986 * Makefile.in (datarootdir): New variable.
13987
13988 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13989
13990 * linux-low.c (linux_write_memory): Update debugging output.
13991 * Makefile.in (clean): Add new descriptions.
13992 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13993 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13994 * configure.srv: Add new files for arm*-*-linux*.
13995 * linux-arm-low.c: Add new declarations.
13996 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13997 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13998 (HWCAP_VFPv3D16): New.
13999 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14000 instead of __IWMMXT__.
14001 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14002 (arm_arch_setup): New.
14003 (target_regsets): Remove #ifdef. Add VFP regset.
14004 (the_low_target): Use arm_arch_setup.
14005
14006 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14007
14008 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14009 the main thread again.
14010
14011 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14012
14013 Adding Neutrino gdbserver.
14014 * configure: Regenerated.
14015 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14016 * configure.srv (i[34567]86-*-nto*): New target.
14017 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14018 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14019 (nto_comctrl) [__QNX__]: New function.
14020 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14021
14022 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14023
14024 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14025 srv_tgtobj.
14026
14027 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14028 Pedro Alves <pedro@codesourcery.com>
14029
14030 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14031 don't support CONTEXT_EXTENDED_REGISTERS.
14032 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14033 (the_low_target): Install them.
14034 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14035 failing with ERROR_PIPE_NOT_CONNECTED.
14036
14037 2009-06-30 Doug Evans <dje@google.com>
14038 Pierre Muller <muller@ics.u-strasbg.fr>
14039
14040 Add h/w watchpoint support to x86-linux, win32-i386.
14041 * Makefile.in (SFILES): Add i386-low.c
14042 (i386_low_h): Define.
14043 (i386-low.o): Add dependencies.
14044 (linux-x86-low.o): Add i386-low.h dependency.
14045 (win32-i386-low.o): Ditto.
14046 * i386-low.c: New file.
14047 * i386-low.h: New file.
14048 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14049 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14050 * linux-low.c (linux_add_process): Initialize arch_private.
14051 (linux_remove_process): Free arch_private.
14052 (add_lwp): Initialize arch_private.
14053 (delete_lwp): Free arch_private.
14054 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14055 provided.
14056 * linux-low.h (process_info_private): New member arch_private.
14057 (lwp_info): New member arch_private.
14058 (linux_target_ops): New members new_process, new_thread,
14059 prepare_to_resume.
14060 (ptid_of): New macro.
14061 * linux-x86-low.c: Include stddef.h, i386-low.h.
14062 (arch_process_info): New struct.
14063 (arch_lwp_info): New struct.
14064 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14065 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14066 (i386_dr_low_get_status): New function.
14067 (x86_insert_point, x86_remove_point): New functions.
14068 (x86_stopped_by_watchpoint): New function.
14069 (x86_stopped_data_address): New function.
14070 (x86_linux_new_process, x86_linux_new_thread): New functions.
14071 (x86_linux_prepare_to_resume): New function.
14072 (the_low_target): Add entries for insert_point, remove_point,
14073 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14074 prepare_to_resume.
14075 * server.c (debug_hw_points): New global.
14076 (monitor_show_help): Document set debug-hw-points.
14077 (handle_query): Process "set debug-hw-points".
14078 * server.h (debug_hw_points): Declare.
14079 (paddress): Declare.
14080 * utils.c (NUMCELLS, CELLSIZE): New macros.
14081 (get_sell, xsnprintf, paddress): New functions.
14082 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14083 remove_point, stopped_by_watchpoint, stopped_data_address.
14084 * win32-i386-low.c: Include i386-low.h.
14085 (debug_reg_state): Replaces dr.
14086 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14087 (i386_dr_low_get_status): New function.
14088 (i386_insert_point, i386_remove_point): New functions.
14089 (i386_stopped_by_watchpoint): New function.
14090 (i386_stopped_data_address): New function.
14091 (i386_initial_stuff): Update.
14092 (get_thread_context,set_thread_context,i386_thread_added): Update.
14093 (the_low_target): Add entries for insert_point,
14094 remove_point, stopped_by_watchpoint, stopped_data_address.
14095 * win32-low.c (win32_insert_watchpoint): New function.
14096 (win32_remove_watchpoint): New function.
14097 (win32_stopped_by_watchpoint): New function.
14098 (win32_stopped_data_address): New function.
14099 (win32_target_ops): Add entries for insert_watchpoint,
14100 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14101 * win32-low.h (win32_target_ops): New members insert_point,
14102 remove_point, stopped_by_watchpoint, stopped_data_address.
14103
14104 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14105
14106 * server.c (process_serial_event): Re-return unsupported, not
14107 error, if the type isn't recognized. Re-allow supporting only
14108 insert or remove packets. Also call require_running for
14109 breakpoints. Add missing break statement to default case. Tidy.
14110 * target.h (struct target_ops): Rename insert_watchpoint to
14111 insert_point, and remove_watchpoint to remove_point.
14112
14113 * linux-low.h (struct linux_target_ops): Likewise.
14114 * linux-low.c (linux_insert_watchpoint): Rename to ...
14115 (linux_insert_point): ... this. Adjust.
14116 (linux_remove_watchpoint): Rename to ...
14117 (linux_remove_point): ... this. Adjust.
14118 (linux_target_ops): Adjust.
14119 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14120 (cris_insert_point): ... this.
14121 (cris_remove_watchpoint): Rename to ...
14122 (cris_remove_point): ... this.
14123 (the_low_target): Adjust.
14124
14125 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14126
14127 * server.c (handle_v_kill): Pass signal_pid to
14128 kill_inferior if multi_process is zero.
14129
14130 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14131
14132 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14133 * target.h (target_ops): Comment for *_watchpoint to make it clear
14134 the functions can get types '0' and '1'.
14135
14136 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14137
14138 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14139 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14140 * regcache.c (get_regcache): Likewise.
14141 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14142 * win32-low.c (child_fetch_inferior_registers): Remove check for
14143 regno 0.
14144
14145 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14146 Pedro Alves <pedro@codesourcery.com>
14147
14148 * target.h (struct target_ops) <supports_multi_process>: New
14149 callback.
14150 (target_supports_multi_process): New.
14151 * server.c (handle_query): Even if GDB reports support, only
14152 enable multi-process if the target also supports it. Report
14153 multi-process support only if the target backend supports it.
14154 * linux-low.c (linux_supports_multi_process): New function.
14155 (linux_target_ops): Install it as target_supports_multi_process
14156 callback.
14157
14158 2009-05-24 Doug Evans <dje@google.com>
14159
14160 Global renaming of find_thread_pid to find_thread_ptid.
14161 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14162 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14163 All callers updated.
14164
14165 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14166 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14167 directly.
14168
14169 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14170 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14171 (linux_resume_one_lwp): Ditto.
14172
14173 2009-05-23 Doug Evans <dje@google.com>
14174
14175 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14176 from struct inferior_list_entry * to struct lwp_info *.
14177 All callers updated.
14178
14179 2009-05-13 Doug Evans <dje@google.com>
14180
14181 * linux-x86-low.c: Don't include assert.h.
14182 (x86_siginfo_fixup): Use fatal, not assert.
14183 (x86_arch_setup): Fix comment.
14184
14185 2009-05-12 Doug Evans <dje@google.com>
14186
14187 Biarch support for i386/amd64 gdbserver.
14188 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14189 Add linux-x86-low.c.
14190 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14191 (linux-x86-low.o): Add.
14192 * linux-x86-64-low.c: Delete.
14193 * linux-i386-low.c: Delete.
14194 * linux-x86-low.c: New file.
14195 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14196 linux-x86-low.o.
14197 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14198 linux-x86-low.o.
14199 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14200 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14201 (linux_child_pid_to_exec_file): New function.
14202 (elf_64_header_p, elf_64_file_p): New functions.
14203 (siginfo_fixup): New function.
14204 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14205 give target a chance to convert layout.
14206 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14207 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14208
14209 2009-05-07 Doug Evans <dje@google.com>
14210
14211 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14212 (regsets_store_inferior_registers): Ditto.
14213
14214 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14215
14216 PR server/10048
14217
14218 * linux-low.c (must_set_ptrace_flags): Delete.
14219 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14220 of the global.
14221 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14222 `lwp->must_set_ptrace_flags' instead.
14223 (linux_wait_for_event_1): Set ptrace options here.
14224 (linux_wait_1): ... not here.
14225
14226 2009-04-30 Doug Evans <dje@google.com>
14227
14228 * inferiors.c (started_inferior_callback): New function.
14229 (attached_inferior_callback): New function.
14230 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14231 * server.c (print_started_pid, print_attached_pid): New functions.
14232 (detach_or_kill_for_exit): New function.
14233 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14234 * server.h (have_started_inferiors_p): Declare.
14235 (have_attached_inferiors_p): Declare.
14236
14237 * inferiors.c (remove_process): Fix memory leak, free process.
14238 * linux-low.c (linux_remove_process): New function.
14239 (linux_kill): Call it instead of remove_process.
14240 (linux_detach, linux_wait_1): Ditto.
14241
14242 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14243
14244 * configure.srv: Add x86 Windows CE target.
14245
14246 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14247
14248 * inferiors.c (get_thread_process): Make global.
14249 * server.h (get_thread_process): Add prototype.
14250 * thread-db.c (find_one_thread): Use get_thread_process
14251 instead of current_process.
14252 (thread_db_get_tls_address): Do not crash if called when
14253 thread layer is not yet initialized.
14254
14255 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14256
14257 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14258 * spu-low.c (current_tid): Rename to ...
14259 (current_ptid): ... this.
14260 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14261 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14262 ptid_get_lwp (current_ptid) instead of current_tid.
14263 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14264 instead of current_tid. Use find_process_pid to verify pid
14265 argument is valid. Pass proper argument to remove_process.
14266 (spu_thread_alive): Compare current_ptid instead of current_tid.
14267 (spu_resume): Likewise.
14268
14269 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14270
14271 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14272 variable.
14273
14274 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14275
14276 Implement the multiprocess extensions, and add linux multiprocess
14277 support.
14278
14279 * server.h (ULONGEST): Declare.
14280 (struct ptid, ptid_t): New.
14281 (minus_one_ptid, null_ptid): Declare.
14282 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14283 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14284 (struct inferior_list_entry): Change `id' type from unsigned from
14285 to ptid_t.
14286 (struct sym_cache, struct breakpoint, struct
14287 process_info_private): Forward declare.
14288 (struct process_info): Declare.
14289 (current_process): Declare.
14290 (all_processes): Declare.
14291 (initialize_inferiors): Declare.
14292 (add_thread): Adjust to use ptid_t.
14293 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14294 (add_process, remove_process, find_thread_pid): Declare.
14295 (find_inferior_id): Adjust to use ptid_t.
14296 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14297 (multi_process): Declare.
14298 (push_event): Adjust to use ptid_t.
14299 (read_ptid, write_ptid): Declare.
14300 (prepare_resume_reply): Adjust to use ptid_t.
14301 (clear_symbol_cache): Declare.
14302 * inferiors.c (all_processes): New.
14303 (null_ptid, minus_one_ptid): New.
14304 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14305 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14306 (add_thread): Change unsigned long to ptid. Remove gdb_id
14307 parameter. Adjust.
14308 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14309 (gdb_id_to_thread): Rename to ...
14310 (find_thread_pid): ... this. Change unsigned long to ptid.
14311 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14312 (loaded_dll, pull_pid_from_list): Adjust.
14313 (add_process, remove_process, find_process_pid)
14314 (get_thread_process, current_process, initialize_inferiors): New.
14315 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14316 (struct target_waitstatus) <related_pid>: Ditto.
14317 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14318 return type to int.
14319 (struct target_ops) <join>: Add `pid' argument.
14320 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14321 (struct target_ops) <wait>: Add `ptid' field. Change return type
14322 to ptid.
14323 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14324 (mywait): Add `ptid' argument. Change return type to ptid_t.
14325 (target_pid_to_str): Declare.
14326 * target.c (set_desired_inferior): Adjust to use ptids.
14327 (mywait): Add new `ptid' argument. Adjust.
14328 (target_pid_to_str): New.
14329 * mem-break.h (free_all_breakpoints): Declare.
14330 * mem-break.c (breakpoints): Delelete.
14331 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14332 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14333 to use per-process breakpoint list.
14334 (free_all_breakpoints): New.
14335 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14336 (symbol_cache, all_symbols_looked_up): Delete.
14337 (hexchars): New.
14338 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14339 read_ptid): New.
14340 (prepare_resume_reply): Change ptid argument's type from unsigned
14341 long to ptid_t. Adjust. Implement W;process and X;process.
14342 (free_sym_cache, clear_symbol_cache): New.
14343 (look_up_one_symbol): Adjust to per-process symbol cache. *
14344 * server.c (cont_thread, general_thread, step_thread): Change type
14345 to ptid_t.
14346 (attached): Delete.
14347 (multi_process): New.
14348 (last_ptid): Change type to ptid_t.
14349 (struct vstop_notif) <ptid>: Change type to ptid_t.
14350 (queue_stop_reply, push_event): Change `ptid' argument's type to
14351 ptid_t.
14352 (discard_queued_stop_replies): Add `pid' argument.
14353 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14354 changes. Don't reference the `attached' global.
14355 (attach_inferior): Adjust to mywait interface changes.
14356 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14357 features. Handle and report "multiprocess+". Handle
14358 "qAttached:PID".
14359 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14360 changes.
14361 (handle_v_kill): New.
14362 (handle_v_stopped): Adjust to use target_pid_to_str.
14363 (handle_v_requests): Allow multiple attaches and runs when
14364 multiprocess extensions are in effect. Handle "vKill".
14365 (myresume): Adjust to use ptids.
14366 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14367 (handle_status): Adjust to discard_queued_stop_replies interface
14368 change.
14369 (first_thread_of, kill_inferior_callback)
14370 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14371 (main): Call initialize_inferiors. Adjust to use ptids, killing
14372 and detaching from all inferiors. Handle multiprocess packet
14373 variants.
14374 * linux-low.h: Include gdb_proc_service.h.
14375 (struct process_info_private): New.
14376 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14377 <lwpid_of>: Use ptid_get_lwp.
14378 (get_lwp_thread): Adjust.
14379 (struct lwp_info): Add `dead' member.
14380 (find_lwp_pid): Declare.
14381 * linux-low.c (thread_db_active): Delete.
14382 (new_inferior): Adjust comment.
14383 (inferior_pid): Delete.
14384 (linux_add_process): New.
14385 (handle_extended_wait): Adjust.
14386 (add_lwp): Change unsigned long to ptid.
14387 (linux_create_inferior): Add process to processes table. Adjust
14388 to use ptids. Don't set new_inferior here.
14389 (linux_attach_lwp): Rename to ...
14390 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14391 it. Adjust to use ptids.
14392 (linux_attach_lwp): New.
14393 (linux_attach): Add process to processes table. Don't set
14394 new_inferior here.
14395 (struct counter): New.
14396 (second_thread_of_pid_p, last_thread_of_process_p): New.
14397 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14398 multiple processes.
14399 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14400 processes. Remove process from process table.
14401 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14402 to multiple processes.
14403 (any_thread_of): New.
14404 (linux_detach): Add `pid' argument, and handle it. Remove process
14405 from processes table.
14406 (linux_join): Add `pid' argument. Handle it.
14407 (linux_thread_alive): Change unsighed long argument to ptid_t.
14408 Consider dead lwps as not being alive.
14409 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14410 threads we're not interested in.
14411 (same_lwp, find_lwp_pid): New.
14412 (linux_wait_for_lwp): Change `pid' argument's type from int to
14413 ptid_t. Adjust.
14414 (linux_wait_for_event): Rename to ...
14415 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14416 from int to ptid_t. Adjust.
14417 (linux_wait_for_event): New.
14418 (linux_wait_1): Add `ptid' argument. Change return type to
14419 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14420 that exit from the process table.
14421 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14422 Adjust.
14423 (mark_lwp_dead): New.
14424 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14425 stopping all threads, mark its main lwp as dead.
14426 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14427 ptids.
14428 (fetch_register, usr_store_inferior_registers)
14429 (regsets_fetch_inferior_registers)
14430 (regsets_store_inferior_registers, linux_read_memory)
14431 (linux_write_memory): Inline `inferior_pid'.
14432 (linux_look_up_symbols): Adjust to use per-process
14433 `thread_db_active'.
14434 (linux_request_interrupt): Adjust to use ptids.
14435 (linux_read_auxv): Inline `inferior_pid'.
14436 (initialize_low): Don't reference thread_db_active.
14437 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14438 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14439 (ps_getpid): Return the pid of the current inferior.
14440 * thread-db.c (proc_handle, thread_agent): Delete.
14441 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14442 per-process data.
14443 (find_one_thread): Change argument type to ptid_t. Adjust to
14444 per-process data.
14445 (maybe_attach_thread): Adjust to per-process data and ptids.
14446 (thread_db_find_new_threads): Ditto.
14447 (thread_db_init): Ditto.
14448 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14449 processes table. Adjust to use ptids.
14450 (spu_kill, spu_detach): Adjust interface. Remove process from
14451 processes table.
14452 (spu_join, spu_thread_alive): Adjust interface.
14453 (spu_wait): Adjust interface. Remove process from processes
14454 table. Adjust to use ptids.
14455 * win32-low.c (current_inferior_tid): Delete.
14456 (current_inferior_ptid): New.
14457 (debug_event_ptid): New.
14458 (thread_rec): Take a ptid. Adjust.
14459 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14460 (child_delete_thread): Ditto.
14461 (do_initial_child_stuff): Add `attached' argument. Add process to
14462 processes table.
14463 (child_fetch_inferior_registers, child_store_inferior_registers):
14464 Adjust.
14465 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14466 (win32_attach): Pass 1 to do_initial_child_stuff.
14467 (win32_kill): Adjust interface. Remove process from processes
14468 table.
14469 (win32_detach): Ditto.
14470 (win32_join): Adjust interface.
14471 (win32_thread_alive): Take a ptid.
14472 (win32_resume): Adjust to use ptids.
14473 (get_child_debug_event): Ditto.
14474 (win32_wait): Adjust interface. Remove exiting process from
14475 processes table.
14476
14477 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14478
14479 Non-stop mode support.
14480
14481 * server.h (non_stop): Declare.
14482 (gdb_client_data, handler_func): Declare.
14483 (delete_file_handler, add_file_handler, start_event_loop):
14484 Declare.
14485 (handle_serial_event, handle_target_event, push_event)
14486 (putpkt_notif): Declare.
14487 * target.h (enum resume_kind): New.
14488 (struct thread_resume): Replace `step' field by `kind' field.
14489 (TARGET_WNOHANG): Define.
14490 (struct target_ops) <wait>: Add `options' argument.
14491 <supports_non_stop, async, start_non_stop>: New fields.
14492 (target_supports_non_stop, target_async): New.
14493 (start_non_stop): Declare.
14494 (mywait): Add `options' argument.
14495 * target.c (mywait): Add `options' argument. Print child exit
14496 notifications here.
14497 (start_non_stop): New.
14498 * server.c (non_stop, own_buf, mem_buf): New globals.
14499 (struct vstop_notif): New.
14500 (notif_queue): New global.
14501 (queue_stop_reply, push_event, discard_queued_stop_replies)
14502 (send_next_stop_reply): New.
14503 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14504 interface changes.
14505 (attach_inferior): In non-stop mode, don't wait for the target
14506 here.
14507 (handle_general_set): Handle QNonStop.
14508 (handle_query): When handling qC, return the current general
14509 thread, instead of the first thread of the list.
14510 (handle_query): If the backend supports non-stop mode, include
14511 QNonStop+ in the qSupported query response.
14512 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14513 and non-stop mode.
14514 (handle_v_attach, handle_v_run): Handle non-stop mode.
14515 (handle_v_stopped): New.
14516 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14517 (myresume): Adjust to use resume_kind. Handle non-stop.
14518 (queue_stop_reply_callback): New.
14519 (handle_status): Handle non-stop mode.
14520 (main): Clear non_stop flag on reconnection. Use the event-loop.
14521 Refactor serial protocol handling from here ...
14522 (process_serial_event): ... to this new function. When GDB
14523 selects any thread, select one here. In non-stop mode, wait until
14524 GDB acks all pending events before exiting.
14525 (handle_serial_event, handle_target_event): New.
14526 * remote-utils.c (remote_open): Install remote_desc in the event
14527 loop.
14528 (remote_close): Remove remote_desc from the event loop.
14529 (putpkt_binary): Rename to...
14530 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14531 (putpkt_binary): New as wrapper around putpkt_binary_1.
14532 (putpkt_notif): New.
14533 (prepare_resume_reply): In non-stop mode, don't change the
14534 general_thread.
14535 * event-loop.c: New.
14536 * Makefile.in (OBJ): Add event-loop.o.
14537 (event-loop.o): New rule.
14538
14539 * linux-low.h (pid_of): Moved here.
14540 (lwpid_of): New.
14541 (get_lwp_thread): Use lwpid_of.
14542 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14543 * linux-low.c (pid_of): Delete.
14544 (inferior_pid): Use lwpid_of.
14545 (linux_event_pipe): New.
14546 (target_is_async_p): New.
14547 (delete_lwp): New.
14548 (handle_extended_wait): Use lwpid_of.
14549 (add_lwp): Don't set lwpid field.
14550 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14551 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14552 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14553 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14554 first. Adjust to linux_wait_for_event interface changes. Use
14555 lwpid_of.
14556 (linux_detach): Don't delete the main lwp here.
14557 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14558 (status_pending_p): Don't consider explicitly suspended lwps.
14559 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14560 pointer. Add OPTIONS argument. Change return type to int. Use
14561 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14562 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14563 pointer. Add status pointer argument. Return a pid instead of a
14564 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14565 changes. In non-stop mode, don't switch to a random thread.
14566 (linux_wait): Rename to...
14567 (linux_wait_1): ... this. Add target_options argument, and handle
14568 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14569 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14570 clean exit and signal exit code. Don't stop all threads in
14571 non-stop mode. In all-stop mode, only stop all threads when
14572 reporting a stop to GDB. Handle explicit thread stop requests.
14573 (async_file_flush, async_file_mark): New.
14574 (linux_wait): New.
14575 (send_sigstop): Use lwpid_of.
14576 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14577 interface changes. In non-stop mode, don't switch to a random
14578 thread.
14579 (linux_resume_one_lwp): Use lwpid_of.
14580 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14581 (linux_resume_one_thread): ... this. Handle resume_stop. In
14582 non-stop mode, don't look for pending flag in all threads.
14583 (resume_status_pending_p): Don't consider explicitly suspended
14584 threads.
14585 (my_waitpid): Reimplement. Emulate __WALL.
14586 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14587 Use lwpid_of.
14588 (sigchld_handler, linux_supports_non_stop, linux_async)
14589 (linux_start_non_stop): New.
14590 (linux_target_ops): Register linux_supports_non_stop, linux_async
14591 and linux_start_non_stop.
14592 (initialize_low): Install SIGCHLD handler.
14593 * thread-db.c (thread_db_create_event, find_one_thread)
14594 (thread_db_get_tls_address): Use lwpid_of.
14595 * win32-low.c (win32_detach): Adjust to use resume_kind.
14596 (win32_wait): Add `options' argument.
14597 * spu-low.c (spu_resume): Adjust to use resume_kind.
14598 (spu_wait): Add `options' argument.
14599
14600 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14601
14602 Decouple target code from remote protocol.
14603
14604 * target.h (enum target_waitkind): New.
14605 (struct target_waitstatus): New.
14606 (struct target_ops) <wait>: Return an unsigned long. Take a
14607 target_waitstatus pointer instead of a char pointer.
14608 (mywait): Likewise.
14609 * target.c (mywait): Change prototype to return an unsigned long.
14610 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14611 * server.h (thread_from_wait, old_thread_from_wait): Delete
14612 declarations.
14613 (prepare_resume_reply): Change prototype to take a
14614 target_waitstatus.
14615 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14616 (last_status, last_ptid): New.
14617 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14618 pid instead of a signal.
14619 (attach_inferior): Remove "status" and "signal" parameters.
14620 Adjust.
14621 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14622 not as an address.
14623 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14624 (handle_v_requests, myresume): Remove "status" and "signal"
14625 parameters. Adjust.
14626 (handle_status): New.
14627 (main): Delete local `status'. Adjust.
14628 * remote-utils.c: Include target.h.
14629 (prepare_resume_reply): Change prototype to take a
14630 target_waitstatus. Adjust.
14631
14632 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14633 interface.
14634 * spu-low.c (spu_wait): Adjust.
14635 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14636 Delete.
14637 (win32_wait): Adjust.
14638
14639 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14640
14641 * target.h (struct thread_resume): Delete leave_stopped member.
14642 (struct target_ops): Add a `n' argument to the `resume' callback.
14643 * server.c (start_inferior): Adjust.
14644 (handle_v_cont, myresume): Adjust.
14645 * linux-low.c (check_removed_breakpoint): Adjust to resume
14646 interface change, and to removed leave_stopped field.
14647 (resume_ptr): Delete.
14648 (struct thread_resume_array): New.
14649 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14650 resume interface change.
14651 (linux_continue_one_thread, linux_queue_one_thread)
14652 (resume_status_pending_p): Check if the resume field is NULL
14653 instead of checking the leave_stopped member.
14654 (linux_resume): Adjust to the target resume interface change.
14655 * spu-low.c (spu_resume): Adjust to the target resume interface
14656 change.
14657 * win32-low.c (win32_detach, win32_resume): Ditto.
14658
14659 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14660
14661 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14662 flag.
14663 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14664 pending.
14665 (linux_continue_one_thread): Only preserve the stepping flag if
14666 there's a pending breakpoint.
14667
14668 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14669
14670 * server.c (main): After the inferior having exited, call
14671 remote_close before exiting gdbserver.
14672
14673 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14674
14675 Fix size of FPSCR in Power 7 processors.
14676 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14677 (PPC_FEATURE_HAS_DFP): New #define.
14678 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14679 size of the FPSCR.
14680
14681 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14682
14683 * server.c (handle_query) Whitespace and formatting.
14684
14685 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14686
14687 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14688 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14689 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14690 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14691 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14692 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14693 Makefile.in, configure.ac: Fix whitespace throughout.
14694 * configure: Regenerate.
14695
14696 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14697
14698 * inferiors.c (find_inferior): Make it safe for the callback
14699 function to delete the currently iterated inferior.
14700
14701 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14702
14703 * Makefile.in (linuw_low_h): Move higher.
14704 (thread-db.o): Depend on $(linux_low_h).
14705
14706 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14707
14708 Rename "process" to "lwp" throughout.
14709
14710 * linux-low.c (all_processes): Rename to...
14711 (all_lwps): ... this.
14712 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14713 (add_process): Rename to ...
14714 (add_lwp): ... this. Adjust.
14715 (linux_create_inferior): Adjust.
14716 (linux_attach_lwp): Adjust.
14717 (linux_attach): Adjust.
14718 (linux_kill_one_process): Rename to ...
14719 (linux_kill_one_lwp): ... this. Adjust.
14720 (linux_kill): Adjust.
14721 (linux_detach_one_process): Rename to ...
14722 (linux_detach_one_lwp): ... this. Adjust.
14723 (linux_detach): Adjust.
14724 (check_removed_breakpoint): Adjust.
14725 (status_pending_p): Adjust.
14726 (linux_wait_for_process): Rename to ...
14727 (linux_wait_for_lwp): ... this. Adjust.
14728 (linux_wait_for_event): Adjust.
14729 (send_sigstop): Adjust.
14730 (wait_for_sigstop): Adjust.
14731 (stop_all_processes): Rename to ...
14732 (stop_all_lwps): ... this.
14733 (linux_resume_one_process): Rename to ...
14734 (linux_resume_one_lwp): ... this. Adjust.
14735 (linux_set_resume_request, linux_continue_one_thread)
14736 (linux_queue_one_thread, resume_status_pending_p)
14737 (usr_store_inferior_registers, regsets_store_inferior_registers)
14738 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14739 Adjust.
14740 * linux-low.h (get_process): Rename to ...
14741 (get_lwp): ... this. Adjust.
14742 (get_thread_process): Rename to ...
14743 (get_thread_lwp): ... this. Adjust.
14744 (get_process_thread): Rename to ...
14745 (get_lwp_thread): ... this. Adjust.
14746 (struct process_info): Rename to ...
14747 (struct lwp_info): ... this.
14748 (all_processes): Rename to ...
14749 (all_lwps): ... this.
14750 * proc-service.c (ps_lgetregs): Adjust.
14751 * thread-db.c (thread_db_create_event, find_one_thread)
14752 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14753
14754 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14755
14756 * server.c (handle_query): Handle "qAttached".
14757
14758 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14759
14760 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14761 GPLv3, update license URL.
14762
14763 2009-03-01 Doug Evans <dje@google.com>
14764
14765 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14766 (server_h): Add gdb_signals.h.
14767 (signals.o): Update.
14768 * server.h (target_signal_from_host,target_signal_to_host_p)
14769 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14770
14771 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14772
14773 * remote-utils.c (getpkt): Also generate remote-debug
14774 information if noack_mode is set.
14775
14776 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14777
14778 * server.c (handle_query): Report qXfer:siginfo:read and
14779 qXfer:siginfo:write as supported and handle them.
14780 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14781 * linux-low.c (linux_xfer_siginfo): New.
14782 (linux_target_ops): Set it.
14783
14784 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14785
14786 * server.c (gdbserver_usage): Mention --remote-debug.
14787 (main): Accept '--remote-debug' switch.
14788
14789 2009-01-18 Doug Evans <dje@google.com>
14790
14791 * regcache.c (new_register_cache): No need to check result of xcalloc.
14792 * server.c (handle_search_memory): Back out calls to xmalloc,
14793 result is checked and error is returned to user upon failure.
14794 (handle_query): Ditto. Add more checks for result of malloc.
14795 (handle_v_cont): Check result of malloc, report error back to
14796 user upon failure.
14797 (handle_v_run): Ditto. Call freeargv.
14798 * server.h (freeargv): Declare.
14799 * utils.c (freeargv): New fn.
14800
14801 2009-01-15 Doug Evans <dje@google.com>
14802
14803 * gdbreplay.c (perror_with_name): Make arg const char *.
14804 * server.h (target_signal_to_name): Make return type const char *.
14805 * thread-db.c (thread_db_err_str): Make return type const char *.
14806 * utils.c (perror_with_name): Make arg const char *.
14807
14808 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14809
14810 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14811 when handling a EXIT_PROCESS_DEBUG_EVENT.
14812
14813 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14814
14815 * gdbreplay.c (gdbreplay_version): Update copyright year.
14816 * server.c (gdbserver_version): Likewise.
14817
14818 2009-01-05 Doug Evans <dje@google.com>
14819
14820 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14821 (handle_extended_wait): Improve comment.
14822
14823 2008-12-13 Doug Evans <dje@google.com>
14824
14825 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14826 * server.h (ATTR_MALLOC): New macro.
14827 (xmalloc,xcalloc,xstrdup): Declare.
14828 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14829 * inferiors.c: Ditto.
14830 * linux-low.c: Ditto.
14831 * mem-break.c: Ditto.
14832 * regcache.c: Ditto.
14833 * remote-utils.c: Ditto.
14834 * server.c: Ditto.
14835 * target.c: Ditto.
14836 * win32-low.c: Ditto.
14837
14838 2008-12-12 Doug Evans <dje@google.com>
14839
14840 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14841 in debugging printf.
14842
14843 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14844
14845 2008-12-09 Doug Evans <dje@google.com>
14846
14847 * linux-low.h (struct process_info): Delete member tid, unused.
14848 * thread-db.c (find_one_thread): Update.
14849 (maybe_attach_thread): Update.
14850
14851 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14852
14853 * target.h (struct target_ops): Add qxfer_osdata member.
14854 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14855 and dirent.h.
14856 (linux_qxfer_osdata): New functions.
14857 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14858 callback.
14859 * server.c (handle_query): Handle "qXfer:osdata:read:".
14860 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14861 (buffer_xml_printf): New functions.
14862 * server.h (struct buffer): New.
14863 (buffer_grow_str, buffer_grow_str0): New macros.
14864 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14865 (buffer_xml_printf): Declare.
14866
14867 2008-11-24 Doug Evans <dje@google.com>
14868
14869 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14870
14871 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14872
14873 * server.c (handle_v_run): Always use the supplied argument list.
14874
14875 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14876
14877 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14878 (xtensa_regmap_table): Add entry for scompare1.
14879
14880 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14881
14882 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14883 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14884 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14885 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14886 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14887 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14888 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14889 XML target descriptions.
14890 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14891 when inferior is running on an ISA 2.05 or later processor. Add
14892 special case to return offset for full 64-bit slot of FPSCR when
14893 in 32-bits.
14894
14895 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14896
14897 * Makefile.in (SFILES, clean): Added sparc64 files.
14898 (reg-sparc64.o, reg-sparc64.c): New.
14899 * configure.srv (sparc*-*-linux*): New configuration.
14900 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14901 syscall arguments for SPARC.
14902 (regsets_store_inferior_registers): Likewise.
14903 * linux-sparc-low.c: New file.
14904
14905 2008-10-21 Doug Evans <dje@google.com>
14906
14907 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14908 (READLINE_DIR,READLINE_DEP): Delete.
14909 (INTERNAL_CFLAGS): Update.
14910 (LINTFLAGS): Update.
14911
14912 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14913
14914 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14915 whole argv from the last run, not just argv[0].
14916
14917 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14918
14919 * regcache.c (new_register_cache): Return NULL if the register
14920 cache size isn't known yet.
14921 (free_register_cache): Avoid dereferencing a NULL regcache.
14922
14923 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14924
14925 * configure.srv: Merge MIPS and MIPS64.
14926
14927 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14928
14929 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14930
14931 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14932
14933 * Makefile.in: Add required vsx dependencies.
14934
14935 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14936 Declare init_registers_powerpc_vsx32l.
14937 Declare init_registers_powerpc_vsx64l.
14938 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14939 (ppc_arch_setup): Check for VSX in hwcap.
14940 (ppc_fill_vsxregset): New function.
14941 (ppc_store_vsxregset): New function.
14942 Add new VSX entry in regset_info target_regsets.
14943
14944 * configure.srv: Add new VSX dependencies.
14945
14946 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14947
14948 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14949 (remote_open): Set or clear transport_is_reliable.
14950 (putpkt_binary): Don't expect acks in noack mode.
14951 (getpkt): Don't send ack/nac in noack mode.
14952 * server.c (handle_general_set): Handle QStartNoAckMode.
14953 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14954 qSupported.
14955 (main): Reset noack_mode on every connection.
14956 * server.h (noack_mode): Declare.
14957
14958 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14959
14960 * Makefile.in (GDBREPLAY_OBS): New variable.
14961 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14962
14963 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14964 Daniel Jacobowitz <dan@codesourcery.com>
14965
14966 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14967 (usr_store_inferior_registers): Likewise.
14968 (regsets_store_inferior_registers): Likewise.
14969
14970 2008-07-31 Rolf Jansen <rj@surtec.com>
14971 Pedro Alves <pedro@codesourcery.com>
14972
14973 * configure.ac: Check for memmem declaration.
14974 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14975 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14976 (disable_packet_qfThreadInfo): Unconditionally compile.
14977 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14978 * configure, config.in: Regenerate.
14979
14980 2008-07-28 Doug Kwan <dougkwan@google.com>
14981
14982 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14983 (linux_write_memory): Remove declaration of errno.
14984
14985 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14986
14987 * linux-low.c (handle_extended_wait): Do not use "status"
14988 variable uninitialized.
14989
14990 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14991
14992 * server.c (handle_v_attach): Inhibit reporting dll changes.
14993
14994 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14995
14996 * remote-utils.c (prepare_resume_reply): If requested, don't
14997 output "thread:TID" in the T stop reply.
14998
14999 * server.c (disable_packet_vCont, disable_packet_Tthread)
15000 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15001 (handle_query): If requested, disable support for qC, qfThreadInfo
15002 and qsThreadInfo.
15003 (handle_v_requests): If requested, disable support for vCont.
15004 (gdbserver_show_disableable): New.
15005 (main): Handle --disable-packet and --disable-packet=LIST.
15006
15007 * server.h (disable_packet_vCont, disable_packet_Tthread)
15008 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15009
15010 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15011
15012 * server.c (gdbserver_usage): Mention --version.
15013
15014 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15015
15016 * Makefile.in (gdbreplay.o): New rule.
15017
15018 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15019
15020 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15021 message, not gdbserver.
15022
15023 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15024 Nathan Sidwell <nathan@codesourcery.com>
15025 Joseph Myers <joseph@codesourcery.com>
15026
15027 * acinclude.m4: Include ../../config/acx.m4.
15028 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15029 * configure, config.in: Regenerate.
15030 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15031 * server.c (gdbserver_version): Print PKGVERSION.
15032 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15033 (main): Adjust gdbserver_usage calls.
15034 * gdbreplay.c (version, host_name): Add declarations.
15035 (gdbreplay_version, gdbreplay_usage): New.
15036 (main): Accept --version and --help options.
15037
15038 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15039
15040 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15041 (arm_breakpoint_at): Handle Thumb.
15042 (the_low_target): Add comment.
15043
15044 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15045
15046 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15047
15048 2008-05-09 Doug Evans <dje@google.com>
15049
15050 * server.h (decode_search_memory_packet): Declare.
15051 * remote-utils.c (decode_search_memory_packet): New fn.
15052 * server.c (handle_search_memory_1): New fn.
15053 (handle_search_memory): New fn.
15054 (handle_query): Process qSearch:memory packets.
15055
15056 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15057
15058 * regcache.c (registers_length): Remove.
15059 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15060 full register packet.
15061 * regcache.h (registers_length): Remove prototype.
15062 * server.h (PBUFSIZ): Define to 16384.
15063
15064 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15065
15066 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15067 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15068 powerpc-64l.o, and powerpc-altivec64l.o.
15069 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15070 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15071 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15072 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15073 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15074 to srv_xmlfiles.
15075
15076 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15077 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15078 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15079 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15080 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15081 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15082 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15083 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15084 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15085 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15086 (clean): Update.
15087
15088 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15089 (init_registers_powerpc_32l): ... this new prototype.
15090 (init_registers_powerpc_32): Remove, replace by ...
15091 (init_registers_powerpc_altivec32l): ... this new prototype.
15092 (init_registers_powerpc_e500): Remove, replace by ...
15093 (init_registers_powerpc_e500l): ... this new prototype.
15094 (init_registers_ppc64): Remove, replace by ...
15095 (init_registers_powerpc_64l): ... this new prototype.
15096 (init_registers_powerpc_64): Remove, replace by ...
15097 (init_registers_powerpc_altivec64l): ... this new prototype.
15098 (ppc_num_regs): Set to 73.
15099 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15100 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15101 (ppc_cannot_store_register): Handle orig_r3 and trap.
15102 (ppc_arch_setup): Update init_registers_... calls.
15103 (ppc_fill_gregset): Handle orig_r3 and trap.
15104
15105 * inferiors.c (clear_inferiors): Reset current_inferior.
15106
15107 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15108
15109 * acinclude.m4: Add override.m4.
15110 * configure: Regenerate.
15111
15112 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15113
15114 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15115 initial call to init_register_ppc64.
15116
15117 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15118
15119 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15120 single powerpc*-*-linux* case.
15121 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15122
15123 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15124
15125 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15126 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15127 from reg_xmlfiles.
15128 * linux-ppc-low.c: Include <elf.h>.
15129 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15130 (ppc_hwcap): New global variable.
15131 (ppc_regmap): Remove __SPE__ #ifdef sections.
15132 (ppc_regmap_e500): New global variable.
15133 (ppc_cannot_store_register): Update __SPE__ special case.
15134 (ppc_get_hwcap): New function.
15135 (ppc_arch_setup): Use it to determine whether inferior supports
15136 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15137 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15138 Do not access registers if target does not support AltiVec.
15139 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15140 Do not access registers if target does not support SPE.
15141 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15142
15143 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15144
15145 * linux-low.c (disabled_regsets, num_regsets): New.
15146 (use_regsets_p): Delete.
15147 (linux_wait_for_process): Clear disabled_regsets.
15148 (regsets_fetch_inferior_registers): Check and set it.
15149 (regsets_store_inferior_registers): Likewise.
15150 (linux_fetch_registers, linux_store_registers): Do not use
15151 use_regsets_p.
15152 (initialize_low): Allocate disabled_regsets.
15153
15154 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15155
15156 * Makefile.in (LIBOBJS): New.
15157 (OBS): Use LIBOBJS.
15158 (memmem.o): New rule.
15159 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15160 * configure: Regenerated.
15161
15162 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15163
15164 * server.c (handle_query): Never return "unsupported" for
15165 qXfer:features:read queries.
15166
15167 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15168
15169 * server.c (get_features_xml): Fix inverted condition.
15170 (handle_query): Always support qXfer:feature:read.
15171
15172 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15173
15174 * server.c (wrapper_argv): New.
15175 (start_inferior): Handle wrapper_argv. If set, expect an extra
15176 trap.
15177 (gdbserver_usage): Document --wrapper.
15178 (main): Parse --wrapper.
15179
15180 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15181
15182 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15183 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15184 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15185 (ppc_set_pc): Likewise.
15186 (ppc_arch_setup): New function.
15187 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15188 of collect_register.
15189 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15190
15191 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15192
15193 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15194 instead of linux-ppc64-low.o.
15195 * linux-ppc64-low.c: Remove file.
15196 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15197 (linux-ppc64-low.o): Remove rule.
15198
15199 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15200 (init_registers_powerpc_64): Likewise.
15201 (ppc_regmap): Conditionally define depending on __powerpc64__.
15202 (ppc_cannot_store_register): Do not special-case "fpscr" when
15203 compiled on __powerpc64__.
15204 (ppc_collect_ptrace_register): New function.
15205 (ppc_supply_ptrace_register): New function.
15206 (ppc_breakpoint): Change type to "unsigned int".
15207 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15208 (the_low_target): Conditionally provide initializers for the
15209 arch_setup member depending on __powerpc64__. Install
15210 collect_ptrace_register and supply_ptrace_register members.
15211
15212 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15213
15214 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15215 * server.c (gdbserver_xmltarget): Define.
15216 (get_features_xml): Use it to replace "target.xml" and arch_string.
15217
15218 * configure.srv: Remove srv_xmltarget. Add XML files that were
15219 mentioned there to srv_xmlfiles instead. Remove conditional tests
15220 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15221 srv_xmlfiles and srv_regobj to include all possible choices.
15222 * configure.ac (srv_xmltarget): Remove.
15223 (srv_xmlfiles): Do not add "target.xml".
15224 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15225 checks for supplementary target information.
15226 * configure: Regenerate.
15227 * Makefile.in (XML_TARGET): Remove.
15228 (target.xml): Remove rule.
15229 (clean): Do not clean up target.xml.
15230 (.PRECIOUS): Do not mention target.xml.
15231
15232 * target.h (struct target_ops): Remove arch_string member.
15233 * linux-low.c (linux_arch_string): Remove.
15234 (linux_target_ops): Remove arch_string initializer.
15235 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15236 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15237 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15238 * spu-low.c (spu_arch_string): Remove.
15239 (spu_target_ops): Remove arch_string initializer.
15240 * win32-low.c (win32_arch_string): Remove.
15241 (win32_target_ops): Remove arch_string initializer.
15242 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15243 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15244 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15245
15246 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15247
15248 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15249 by collect_ptrace_register and supply_ptrace_register hooks.
15250 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15251 instead of checking for the_low_target.left_pad_xfer.
15252 (usr_store_inferior_registers): Use collect_ptrace_register callback
15253 instead of checking for the_low_target.left_pad_xfer.
15254
15255 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15256 (s390_supply_ptrace_register): Likewise.
15257 (s390_fill_gregset): Call s390_collect_ptrace_register.
15258 (the_low_target): Update.
15259
15260 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15261 (ppc_supply_ptrace_register): Likewise.
15262 (the_low_target): Update.
15263
15264 * linux-i386-low.c (the_low_target): Update.
15265 * linux-x86-64-low.c (the_low_target): Update.
15266
15267 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15268
15269 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15270 reg-s390.o and reg-s390x.o.
15271
15272 * linux-low.c (new_inferior): New global variable.
15273 (linux_create_inferior, linux_attach): Set it.
15274 (linux_wait_for_process): Call the_low_target.arch_setup after the
15275 target has stopped for the first time.
15276 (initialize_low): Do not call the_low_target.arch_setup.
15277
15278 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15279 (s390_set_pc): Likewise.
15280 (s390_arch_setup): New function.
15281 (the_low_target): Use s390_arch_setup as arch_setup routine.
15282
15283 * regcache.c (realloc_register_cache): New function.
15284 (set_register_cache): Call it for each existing regcache.
15285
15286 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15287
15288 * server.h (init_registers): Remove prototype.
15289
15290 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15291 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15292 instead of init_registers ().
15293 * linux-arm-low.c (init_registers_arm): Add prototype.
15294 (init_registers_arm_with_iwmmxt): Likewise.
15295 (the_low_target): Add initializer for arch_setup field.
15296 * linux-cris-low.c (init_registers_cris): Add prototype.
15297 (the_low_target): Add initializer for arch_setup field.
15298 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15299 (the_low_target): Add initializer for arch_setup field.
15300 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15301 (the_low_target): Add initializer for arch_setup field.
15302 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15303 (the_low_target): Add initializer for arch_setup field.
15304 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15305 (the_low_target): Add initializer for arch_setup field.
15306 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15307 (the_low_target): Add initializer for arch_setup field.
15308 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15309 (init_registers_mips64_linux): Likewise.
15310 (the_low_target): Add initializer for arch_setup field.
15311 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15312 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15313 (the_low_target): Add initializer for arch_setup field.
15314 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15315 (init_registers_powerpc_64): Likewise.
15316 (the_low_target): Add initializer for arch_setup field.
15317 * linux-s390-low.c (init_registers_s390): Add prototype.
15318 (init_registers_s390x): Likewise.
15319 (the_low_target): Add initializer for arch_setup field.
15320 * linux-sh-low.c (init_registers_sh): Add prototype.
15321 (the_low_target): Add initializer for arch_setup field.
15322 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15323 (the_low_target): Add initializer for arch_setup field.
15324 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15325 (the_low_target): Add initializer for arch_setup field.
15326
15327 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15328 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15329 instead of init_registers ().
15330 * win32-arm-low.c (init_registers_arm): Add prototype.
15331 (the_low_target): Add initializer for arch_setup field.
15332 * win32-i386-low.c (init_registers_i386): Add prototype.
15333 (the_low_target): Add initializer for arch_setup field.
15334
15335 * spu-low.c (init_registers_spu): Add prototype.
15336 (initialize_low): Call initialie_registers_spu () instead of
15337 initialize_registers ().
15338
15339 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15340
15341 * server.c (handle_v_requests): When handling the vRun and vAttach
15342 packets, if already debugging a process, don't kill it. Return an
15343 error instead.
15344
15345 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15346
15347 * server.c (handle_query): Correct length check.
15348
15349 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15350
15351 * win32-low.c (do_initial_child_stuff): Add process handle
15352 parameter. Set current_process_handle and current_process_id from the
15353 parameters. Clear globals.
15354 (win32_create_inferior): Don't set current_process_handle and
15355 current_process_id here. Instead pass them on the call to
15356 do_initial_child_stuff.
15357 (win32_attach): Likewise.
15358 (win32_clear_inferiors): New.
15359 (win32_kill): Don't close the current process handle or the
15360 current thread handle here. Instead call win32_clear_inferiors.
15361 (win32_detach): Don't open a new handle to the process. Call
15362 win32_clear_inferiors.
15363 (win32_join): Don't rely on current_process_handle; open a new
15364 handle using the process id.
15365 (win32_wait): Call win32_clear_inferiors when the inferior process
15366 has exited.
15367
15368 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15369
15370 * server.c (monitor_show_help): Add "exit".
15371
15372 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15373
15374 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15375 (clean): Add reg-xtensa.c.
15376 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15377 * configure.srv (xtensa*-*-linux*) New target.
15378 * linux-xtensa-low.c: New.
15379 * xtensa-xtregs.c: New.
15380
15381 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15382
15383 * hostio.c: Don't include errno.h.
15384 (errno_to_fileio_errno): Move to hostio-errno.
15385 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15386 error number outputting to the target->hostio_last_error callback.
15387 (hostio_packet_error): Use FILEIO_EINVAL directly.
15388 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15389 calls to hostio_error.
15390 * hostio-errno.c: New.
15391 * server.h (hostio_last_error_from_errno): Declare.
15392 * target.h (target_ops): Add hostio_last_error member.
15393 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15394 as hostio_last_error handler.
15395 * spu-low.c (spu_target_ops): Likewise.
15396 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15397 (wince_hostio_last_error): New functions.
15398 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15399 as hostio_last_error handler.
15400 (win32_target_ops) [!_WIN32_WCE]: Register
15401 hostio_last_error_from_errno as hostio_last_error handler.
15402 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15403 (hostio-errno.o): New rule.
15404 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15405 * configure.srv (srv_hostio_err_objs): New variable. Default to
15406 hostio-errno.o.
15407 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15408 * configure: Regenerate.
15409
15410 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15411
15412 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15413 (linux_kill, linux_detach): Clean up the process list.
15414 * remote-utils.c (remote_open): Improve port number parsing.
15415 (putpkt_binary, input_interrupt): Only send interrupts if the target
15416 is running.
15417 * server.c (extended_protocol): Make static.
15418 (attached): Define earlier.
15419 (exit_requested, response_needed, program_argv): New variables.
15420 (target_running): New.
15421 (start_inferior): Clear attached here.
15422 (attach_inferior): Set attached here.
15423 (require_running): Define.
15424 (handle_query): Use require_running and target_running. Implement
15425 "monitor exit".
15426 (handle_v_attach, handle_v_run): New.
15427 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15428 (gdbserver_usage): Update.
15429 (main): Redo argument parsing. Handle --debug and --multi. Handle
15430 --attach along with other options or after the port. Save
15431 program_argv. Support no initial program. Resynchronize
15432 communication with GDB after an error. Handle "monitor exit".
15433 Use require_running and target_running. Always allow the extended
15434 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15435 restart in extended mode.
15436 * README: Refer to the GDB manual. Update --attach usage.
15437
15438 2007-12-20 Andreas Schwab <schwab@suse.de>
15439
15440 * linux-low.c (STACK_SIZE): Define.
15441 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15442 (linux_test_for_tracefork): Likewise.
15443
15444 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15445
15446 * linux-low.c (linux_wait_for_event): Update messages. Do not
15447 reinsert auto-delete breakpoints.
15448 * mem-break.c (struct breakpoint): Change return type of handler to
15449 int.
15450 (set_breakpoint_at): Update handler type.
15451 (reinsert_breakpoint_handler): Return 1 instead of calling
15452 delete_breakpoint.
15453 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15454 setting a new one.
15455 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15456 * mem-break.h (set_breakpoint_at): Update handler type.
15457 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15458 * win32-low.c (auto_delete_breakpoint): New.
15459 (get_child_debug_event): Use it.
15460
15461 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15462
15463 * configure.ac: Check for pread and pwrite.
15464 * hostio.c (handle_pread): Fall back to lseek and read.
15465 (handle_pwrite): Fall back to lseek and write.
15466 * config.in, configure: Regenerated.
15467
15468 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15469
15470 * server.c (myresume): Add own_buf argument.
15471 (main): Update calls.
15472
15473 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15474
15475 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15476 * remote-utils.c (remote_open): Do not call disable_async_io.
15477 (block_async_io): Delete.
15478 (unblock_async_io): Make static.
15479 (initialize_async_io): New.
15480 * server.c (handle_v_cont): Handle async I/O here.
15481 (myresume): Likewise. Move other common resume tasks here...
15482 (main): ... from here. Call initialize_async_io. Disable async
15483 I/O before the main loop.
15484 * server.h (initialize_async_io): Declare.
15485 (block_async_io, unblock_async_io): Delete prototypes.
15486 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15487
15488 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15489
15490 * remote-utils.c (readchar): Allow binary data in received messages.
15491
15492 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15493
15494 * win32-low.c (attaching): New global.
15495 (win32_create_inferior): Clear the `attaching' global.
15496 (win32_attach): Set the `attaching' global.
15497 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15498 attaching. Only set a breakpoint at the entry point if not
15499 attaching.
15500
15501 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15502
15503 * server.c (main): Don't report dll events on the initial
15504 connection on attaches.
15505
15506 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15507
15508 * server.c (main): Relax numerical bases supported for the pid of
15509 the --attach command line argument.
15510
15511 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15512
15513 * win32-low.c (win32_attach): Call OpenProcess before
15514 DebugActiveProcess, not after. Add last error output to error
15515 call.
15516
15517 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15518
15519 * win32-low.c (win32_get_thread_context)
15520 (win32_set_thread_context): New functions.
15521 (thread_rec): Use win32_get_thread_context.
15522 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15523 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15524 field.
15525
15526 2007-12-03 Leo Zayas
15527 Pedro Alves <pedro_alves@portugalmail.pt>
15528
15529 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15530 global variables.
15531 (child_add_thread): Minor cleanup.
15532 (child_continue): Resume artificially suspended threads before
15533 calling ContinueDebugEvent.
15534 (suspend_one_thread): New.
15535 (fake_breakpoint_event): New.
15536 (get_child_debug_event): Change return type to int. Check here if
15537 gdb sent an interrupt request. If a soft interrupt was requested,
15538 fake a breakpoint event. Return 0 if there is no event to handle,
15539 and 1 otherwise.
15540 (win32_wait): Don't check here if gdb sent an interrupt request.
15541 Ensure there is a valid event to handle.
15542 (win32_request_interrupt): Add soft interruption method as last
15543 resort.
15544
15545 2007-12-03 Leo Zayas
15546 Pedro Alves <pedro_alves@portugalmail.pt>
15547
15548 * win32-low.h (win32_thread_info): Add descriptions to the
15549 structure members. Replace `suspend_count' counter by a
15550 `suspended' flag.
15551 * win32-low.c (thread_rec): Update condition of when to get the
15552 context from the inferior. Rely on ContextFlags being set if it
15553 has already been retrieved. Only suspend the inferior thread if
15554 we haven't already. Warn if that fails.
15555 (continue_one_thread): s/suspend_count/suspended/. Only call
15556 ResumeThread once. Warn if that fails.
15557
15558 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15559
15560 * win32-low.c (win32_wait): Don't read from the inferior when it
15561 has already exited.
15562
15563 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15564
15565 * Makefile.in (win32_low_h): New variable.
15566 (win32-low.o): Add dependency on $(win32_low_h).
15567 (win32-arm-low.o, win32-i386-low.o): New rules.
15568
15569 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15570
15571 * hostio.c: Correct copyright year.
15572
15573 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15574
15575 * Makefile.in (OBS): Add hostio.o.
15576 (hostio.o): New rule.
15577 * server.h (handle_vFile): Declare.
15578 * hostio.c: New file.
15579 * server.c (handle_v_requests): Take packet_len and new_packet_len
15580 for binary packets. Call handle_vFile.
15581 (main): Update call to handle_v_requests.
15582
15583 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15584
15585 * linux-low.c: Include <sched.h>.
15586
15587 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15588
15589 * linux-low.c (linux_tracefork_grandchild): New.
15590 (linux_tracefork_child): Use clone.
15591 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15592
15593 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15594
15595 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15596
15597 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15598
15599 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15600
15601 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15602
15603 * inferiors.c (change_inferior_id): Delete.
15604 (add_pid_to_list, pull_pid_from_list): New.
15605 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15606 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15607 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15608 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15609 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15610 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15611 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15612 (using_threads): Always set to 1.
15613 (handle_extended_wait): New.
15614 (add_process): Do not set TID.
15615 (linux_create_inferior): Set must_set_ptrace_flags.
15616 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15617 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15618 (linux_thread_alive): Rename TID argument to LWPID.
15619 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15620 (linux_wait_for_event): Do not use TID or check using_threads. Update
15621 call to dead_thread_notify. Call handle_extended_wait.
15622 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15623 (send_sigstop): Delete sigstop_sent.
15624 (wait_for_sigstop): Avoid TID.
15625 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15626 (linux_test_for_tracefork): New.
15627 (linux_lookup_signals): Use thread_db_active and
15628 linux_supports_tracefork_flag.
15629 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15630 * linux-low.h (get_process_thread): Avoid TID.
15631 (struct process_ifo): Move thread_known and tid to the end. Remove
15632 sigstop_sent.
15633 (linux_attach_lwp, thread_db_init): Update prototypes.
15634 * server.h (change_inferior_id): Delete prototype.
15635 (add_pid_to_list, pull_pid_from_list): New prototypes.
15636 * thread-db.c (thread_db_use_events): New.
15637 (find_first_thread): Rename to...
15638 (find_one_thread): ...this. Update callers and messages. Do not
15639 call fatal. Check thread_db_use_events. Do not call
15640 change_inferior_id or new_thread_notify.
15641 (maybe_attach_thread): Update. Do not call new_thread_notify.
15642 (thread_db_init): Set thread_db_use_events. Check use_events.
15643 * utils.c (fatal, warning): Correct message prefix.
15644
15645 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15646
15647 * Makefile.in (clean): Remove new files.
15648 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15649 (powerpc-64.o, powerpc-64.c): New rules.
15650 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15651 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15652 with SPE.
15653 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15654 SPE targets.
15655 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15656 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15657 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15658 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15659 (target_regsets): Add AltiVec and SPE register sets.
15660 * configure.ac: Check for AltiVec and SPE.
15661 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15662 (ppc_fill_vrregset, ppc_store_vrregset): New.
15663 (target_regsets): Add AltiVec register set.
15664 * configure: Regenerated.
15665
15666 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15667
15668 * linux-low.c (O_LARGEFILE): Define.
15669 (linux_read_memory): Use /proc/PID/mem.
15670 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15671 * configure, config.in: Regenerated.
15672
15673 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15674
15675 * linux-low.c (linux_wait_for_event): Do not pass signals while
15676 single-stepping.
15677
15678 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15679
15680 * win32-low.c (create_process): New.
15681 (win32_create_inferior): Use create_process instead of
15682 CreateProcess. If create_process failed retry appending an ".exe"
15683 suffix. Store the GetLastError result immediatelly after
15684 create_process calls and use it on the call to error.
15685
15686 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15687
15688 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15689
15690 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15691
15692 * configure.ac: Switch license to GPLv3.
15693
15694 2007-08-01 Michael Snyder <msnyder@access-company.com>
15695
15696 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15697
15698 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15699
15700 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15701 typedef.
15702 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15703 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15704 CloseToolhelp32Snapshot.
15705 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15706 CloseToolhelp32Snapshot.
15707
15708 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15709
15710 * server.c (main): Check for inferior exit before main loop.
15711
15712 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15713
15714 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15715 instead of on tmp_desc.
15716
15717 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15718 Daniel Jacobowitz <dan@codesourcery.com>
15719
15720 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15721 (add_thread): Minor cleanups.
15722 (clear_inferiors): Move lower in the file. Clear the DLL
15723 list.
15724 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15725 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15726 (xml_escape_text): New.
15727 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15728 for qSupported.
15729 (handle_v_cont): Report errors.
15730 (gdbserver_version): Update.
15731 (main): Correct size of own_buf. Do not report initial DLL events.
15732 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15733 (unloaded_dll, xml_escape_text): New.
15734 * win32-low.c (enum target_waitkind): Update comments.
15735 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15736 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15737 (win32_EnumProcessModules, win32_GetModuleInformation)
15738 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15739 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15740 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15741 (win32_Module32First, win32_Module32Next, load_toolhelp)
15742 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15743 (get_child_debug_event): Handle DLL events.
15744 (win32_wait): Likewise.
15745
15746 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15747
15748 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15749 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15750
15751 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15752
15753 * win32-low.c (handle_output_debug_string): Ignore event if not
15754 waiting.
15755
15756 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15757
15758 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15759
15760 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15761
15762 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15763
15764 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15765
15766 * inferiors.c (change_inferior_id): Add comment.
15767 * linux-low.c (check_removed_breakpoint): Add an early
15768 prototype. Improve debug output.
15769 (linux_attach): Doc update.
15770 (linux_detach_one_process, linux_detach): Clean up before releasing
15771 each process.
15772 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15773 * linux-low.h (struct process_info): Doc improvement.
15774 * mem-break.c (delete_all_breakpoints): New.
15775 * mem-break.h (delete_all_breakpoints): New prototype.
15776 * thread-db.c (find_first_thread): New.
15777 (thread_db_create_event): Call it instead of
15778 thread_db_find_new_threads. Clean up unused variables.
15779 (maybe_attach_thread): Remove first thread handling.
15780 (thread_db_find_new_threads): Use find_first_thread.
15781 (thread_db_get_tls_address): Likewise.
15782
15783 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15784
15785 * thread-db.c (thread_db_find_new_threads): Add prototype.
15786 (thread_db_create_event): Check for the main thread before adding
15787 a new thread.
15788 (maybe_attach_thread): Only enable event reporting if TID == 0.
15789 (thread_db_get_tls_address): Check for new threads.
15790
15791 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15792
15793 * linux-low.c (linux_create_inferior): Try execv before execvp.
15794 * spu-low.c (spu_create_inferior): Likewise.
15795
15796 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15797
15798 * linux-low.c (linux_create_inferior): Change execv to execvp.
15799 * spu-low.c (spu_create_inferior): Likewies.
15800
15801 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15802
15803 * Makefile.in (clean): Clean new files instead of deleted ones.
15804 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15805 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15806 rules.
15807 * configure.srv: Specify XML files and new regformats for MIPS and
15808 MIPS64 GNU/Linux.
15809 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15810 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15811 an entry for the restart register.
15812 (mips_cannot_fetch_register, mips_cannot_store_register)
15813 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15814 register names to match the XML descriptions.
15815 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15816 restart register instead of $0.
15817
15818 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15819 Markus Deuling <deuling@de.ibm.com>
15820
15821 * remote-utils.c (decode_xfer_write): New function.
15822 * server.h (decode_xfer_write): Add prototype.
15823 * server.c (handle_query): Add PACKET_LEN argument. Support
15824 qXfer:spu:read and qXfer:spu:write packets.
15825 (main): Pass packet_len to handle_query.
15826 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15827 * target.h (target_ops): Add qxfer_spu.
15828
15829 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15830
15831 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15832 accessing non-seekable spufs files.
15833
15834 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15835
15836 * server.c (handle_query): Add reply for qC packet.
15837
15838 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15839 Leo Zayas <lerele@champenstudios@com>
15840
15841 * server.h (check_remote_input_interrupt_request): New function.
15842 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15843 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15844 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15845 (check_remote_input_interrupt_request): New function.
15846 * server.h (check_remote_input_interrupt_request): Declare.
15847 * win32-low.c (winapi_DebugBreakProcess,
15848 winapi_GenerateConsoleCtrlEvent): New typedefs.
15849 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15850 to 250 ms.
15851 (win32_wait): Check for remote interrupt request
15852 with check_remote_input_interrupt_request.
15853 (win32_request_interrupt): New function.
15854 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15855
15856 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15857
15858 * win32-low.c (debug_registers_changed,
15859 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15860 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15861 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15862 (thread_rec): Get context using the low target.
15863 (child_add_thread): Call thread_added on the low target,
15864 which does the same thing.
15865 (regptr): Delete.
15866 (do_initial_child_stuff): Remove debug registers references.
15867 Set context using the low target. Resume threads after
15868 setting the contexts.
15869 (child_continue): Remove dead variable. Remove debug
15870 registers references.
15871 (child_fetch_inferior_registers): Go through the low target.
15872 (do_child_store_inferior_registers): Remove.
15873 (child_store_inferior_registers): Go through the low target.
15874 (win32_resume): Remove debug registers references.
15875 Set context using the low target.
15876 (handle_exception): Change return type to void. Don't record
15877 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15878 first chance exception.
15879 (get_child_debug_event): Change return type to void. Remove
15880 goto loop. Always return after waiting for debug event.
15881 (win32_wait): Convert to switch statement. Handle spurious
15882 events.
15883
15884 * win32-i386-low.c (debug_registers_changed,
15885 debug_registers_used): New.
15886 (initial_stuff): Rename to ...
15887 (i386_initial_stuff): ... this. Clear debug registers
15888 state variables.
15889 (store_debug_registers): Delete.
15890 (i386_get_thread_context): New.
15891 (load_debug_registers): Delete.
15892 (i386_set_thread_context): New.
15893 (i386_thread_added): New.
15894 (single_step): Rename to ...
15895 (i386_single_step): ... this.
15896 (do_fetch_inferior_registers): Rename to ...
15897 (i386_fetch_inferior_register): ... this.
15898 (i386_store_inferior_register): New.
15899 (the_low_target): Adapt to new interface.
15900
15901 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15902 (arm_get_thread_context): New.
15903 (arm_set_thread_context): New.
15904 (regptr): New.
15905 (do_fetch_inferior_registers): Rename to ...
15906 (arm_fetch_inferior_register): ... this.
15907 (arm_store_inferior_register): New.
15908 (arm_wince_breakpoint): Reimplement as unsigned long.
15909 (arm_wince_breakpoint_len): Define.
15910 (the_low_target): Adapt to new interface.
15911
15912 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15913 load_debug_registers. Add get_thread_context, set_thread_context,
15914 thread_added and store_inferior_register. Rename
15915 fetch_inferior_registers to fetch_inferior_register.
15916 (regptr): Remove declaration.
15917
15918 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15919
15920 * linux-low.c (linux_detach): Change return type to int. Return 0.
15921 * spu-low.c (spu_detach): Likewise.
15922
15923 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15924
15925 * target.h (target_ops): Change return type of detach to int.
15926 Add join.
15927 (join_inferior): New.
15928 * server.c (main): Don't skip detach support on mingw32.
15929 If the inferior doesn't support detaching return error.
15930 Call join_inferior instead of using waitpid.
15931 * linux-low.c (linux_join): New.
15932 (linux_target_op): Add linux_join.
15933 * spu-low.c (spu_join): New.
15934 (spu_target_ops): Add spu_join.
15935 * win32-low.c (win32_detach): Adapt to new interface.
15936 Reopen current_process_handle before detaching. Issue a child
15937 resume before detaching.
15938 (win32_join): New.
15939 (win32_target_op): Add win32_join.
15940
15941 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15942
15943 * win32-low.c (win32-attach): Fix return value.
15944 * target.h (target_ops): Describe ATTACH return values.
15945
15946 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15947
15948 * win32-low.c (GETPROCADDRESS): Define.
15949 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15950 (winapi_DebugSetProcessKillOnExit): Likewise.
15951 (win32_create_inferior): Force usage of ansi CreateProcessA.
15952 (win32_attach): Use GETPROCADDRESS.
15953 (win32_detach): Likewise.
15954
15955 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15956
15957 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15958
15959 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15960
15961 * win32-low.c: Commit leftover changes from 2007-03-29.
15962
15963 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15964
15965 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15966 fields short instead of int. Add explicit padding.
15967 (i387_cache_to_fsave): Remove unnecessary casts.
15968 (i387_fsave_to_cache): Doc fix.
15969 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15970
15971 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15972
15973 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15974 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15975
15976 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15977
15978 * configure.srv (arm*-*-mingw32ce*): Move near the other
15979 arm targets.
15980
15981 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15982
15983 * configure.ac: Add errno checking.
15984 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15985 sys/file.h and malloc.h.
15986 (AC_CHECK_DECLS): Add perror.
15987 (srv_mingwce): Handle.
15988 * configure.srv (i[34567]86-*-cygwin*): Add
15989 win32-i386-low.o to srv_tgtobj.
15990 (i[34567]86-*-mingw*): Likewise.
15991 (arm*-*-mingw32ce*): Add case.
15992 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15993 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15994 [__MINGW32CE__] (strerror): New function.
15995 [__MINGW32CE__] (errno): Define to GetLastError.
15996 [__MINGW32CE__] (COUNTOF): New macro.
15997 (remote_open): Remove extra close call.
15998 * mem-break.c (delete_breakpoint_at): New function.
15999 * mem-break.h (delete_breakpoint_at): Declare.
16000 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16001 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16002 [USE_WIN32API] (read, write): Add char* casts.
16003 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16004 * server.h: Include wincecompat.h on Windows CE.
16005 [HAVE_ERRNO_H]: Check.
16006 (perror): Declare if not declared.
16007 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16008 (perror_with_name): Remove errno declaration.
16009 * wincecompat.h: New.
16010 * wincecompat.c: New.
16011 * win32-low.h: New.
16012 * win32-arm-low.c: New.
16013 * win32-i386-low.c: New.
16014 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16015 (OUTMSG2): Make it safe.
16016 (_T): New macro.
16017 (COUNTOF): New macro.
16018 (NUM_REGS): Get it from the low target.
16019 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16020 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16021 (thread_rec): Let low target handle debug registers.
16022 (child_add_thread): Likewise.
16023 (child_init_thread_list): Likewise.
16024 (continue_one_thread): Likewise.
16025 (regptr): New.
16026 (do_child_fetch_inferior_registers): Move to ...
16027 * win32-i386-low.c: ... here, and rename to ...
16028 (do_fetch_inferior_registers): ... this.
16029 * win32-low.c (child_fetch_inferior_registers):
16030 Go through the low target.
16031 (do_child_store_inferior_registers): Use regptr.
16032 (strwinerror): New function.
16033 (win32_create_inferior): Handle Windows CE.
16034 Use strwinerror instead of strerror on Windows error
16035 codes. Add program to the error output.
16036 Don't close the main thread handle on Windows CE.
16037 (win32_attach): Use coredll.dll on Windows CE.
16038 (win32_kill): Close current process and current
16039 thread handles.
16040 (win32_detach): Use coredll.dll on Windows CE.
16041 (win32_resume): Let low target handle debug registers, and
16042 step request.
16043 (handle_exception): Add/Remove initial breakpoint. Avoid
16044 non-existant WSTOPSIG on Windows CE.
16045 (win32_read_inferior_memory): Cast to remove warning.
16046 (win32_arch_string): Go through the low target.
16047 (initialize_low): Call set_breakpoint_data with the low
16048 target's breakpoint.
16049 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16050 FOP_REGNUM, mappings): Move to ...
16051 * win32-i386-low.c: ... here.
16052 * win32-low.c (win32_thread_info): Move to ...
16053 * win32-low.h: ... here.
16054 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16055 win32-arm-low.c and wincecompat.c.
16056 (all:): Add $EXEEXT.
16057 (install-only:): Likewise.
16058 (gdbserver:): Likewise.
16059 (gdbreplay:): Likewise.
16060 * config.in: Regenerate.
16061 * configure: Regenerate.
16062
16063 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16064
16065 * win32-low.c: Rename typedef thread_info to
16066 win32_thread_info throughout.
16067
16068 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16069
16070 * win32-i386-low.c: Rename to ...
16071 * win32-low.c: ... this.
16072 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16073 * Makefile.in: Likewise.
16074
16075 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16076
16077 * remote-utils.c (monitor_output): Constify msg parameter.
16078 * server.h (monitor_output): Likewise.
16079 * win32-i386-low.c (handle_output_debug_string): New.
16080 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16081 handle_output_debug_string.
16082 (get_child_debug_event): Likewise.
16083
16084 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16085
16086 * server.c (main): Correct strtoul check.
16087
16088 2007-03-27 Jon Ringle <jon@ringle.org>
16089
16090 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16091
16092 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16093
16094 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16095
16096 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16097
16098 * terminal.h: Check HAVE_SGTTY_H.
16099
16100 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16101
16102 * remote-utils.c (remote_open): Print out the assigned port number.
16103
16104 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16105
16106 * remote-utils.c (monitor_output): New function.
16107 * server.c (debug_threads): Define here.
16108 (monitor_show_help): New function.
16109 (handle_query): Handle qRcmd.
16110 (main): Do not handle 'd' packet.
16111 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16112 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16113 of debug_threads.
16114
16115 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16116
16117 * Makefile.in (EXEEXT): New.
16118 (clean): Use $(EXEEXT).
16119
16120 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16121
16122 * target.h (target_ops): Rename send_signal to request_interrupt,
16123 and remove enum target_signal parameter.
16124 * linux-low.c (linux_request_interrupt): Rename from
16125 linux_send_signal, and always send SIGINT.
16126 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16127 and always send SIGINT.
16128 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16129 of send_signal.
16130 (input_interrupt): Likewise.
16131
16132 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16133
16134 * server.c (get_features_xml): Check if target implemented
16135 arch_string.
16136 * win32-i386-low.c (win32_arch_string): New.
16137 (win32_target_ops): Add win32_arch_string as arch_string member.
16138
16139 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16140
16141 * spu-low.c (spu_arch_string): New.
16142 (spu_target_ops): Add spu_arch_string.
16143
16144 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16145
16146 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16147 * configure.ac: Do not check for terminal.h.
16148 * configure, config.in: Regenerated.
16149
16150 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16151
16152 * Makefile.in (OBS): Add $(XML_BUILTIN).
16153 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16154 (clean): Update.
16155 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16156 (arm-with-iwmmxt.c): New.
16157 * config.in, configure: Regenerate.
16158 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16159 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16160 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16161 (arm*-*-linux*): Add iWMMXt and regset support.
16162 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16163 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16164 (arm_store_wmmxregset, target_regsets): New.
16165 * server.c (get_features_xml): Take annex argument. Check builtin
16166 XML documents.
16167 (handle_query): Handle multiple annexes.
16168
16169 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16170
16171 * remote-utils.c [USE_WIN32API] (read, write): Define.
16172 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16173 write.
16174
16175 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16176
16177 * linux-i386-low.c (the_low_target): Set arch_string.
16178 * linux-x86-64-low.c (the_low_target): Likewise.
16179 * linux-low.c (linux_arch_string): New.
16180 (linux_target_ops): Add it.
16181 * linux-low.h (struct linux_target_ops): Add arch_string.
16182 * server.c (write_qxfer_response): Use const void * for DATA.
16183 (get_features_xml): New.
16184 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16185 * target.h (struct target_ops): Add arch_string method.
16186
16187 2007-01-03 Denis Pilat <denis.pilat@st.com>
16188 Daniel Jacobowitz <dan@codesourcery.com>
16189
16190 * linux-low.c (linux_kill): Handle being called with no threads.
16191 * win32-i386-low.c (win32_kill): Likewise.
16192 (get_child_debug_event): Clear current_process_handle.
16193
16194 2006-12-30 Denis PILAT <denis.pilat@st.com>
16195 Daniel Jacobowitz <dan@codesourcery.com>
16196
16197 * remote-utils.c (remote_open): Check the type of specified
16198 serial port devices before opening them.
16199 * server.c (main): Kill the inferior if an error occurs during
16200 the first remote_open.
16201
16202 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16203
16204 * README: Update supported targets.
16205
16206 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16207
16208 * Makefile.in (clean): Remove reg-mips64.c.
16209 (reg-mips64.c, reg-mips64.o): New rules.
16210 * configure.srv: Handle mips64. Include regset support for mips.
16211 * linux-mips-low.c (union mips_register): New.
16212 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16213 (mips_breakpoint, mips_breakpoint_at): Use int.
16214 (mips_collect_register, mips_supply_register)
16215 (mips_collect_register_32bit, mips_supply_register_32bit)
16216 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16217 (mips_store_fpregset, target_regsets): New.
16218 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16219
16220 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16221
16222 * configure.srv: Add target "spu*-*-*".
16223 * Makefile.in (clean): Remove reg-spu.c.
16224 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16225 * spu-low.c: New file.
16226
16227 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16228
16229 * configure.ac: Correct td_thr_tls_get_addr test.
16230 * configure: Regenerated.
16231
16232 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16233
16234 * linux-low.c (linux_wait_for_event): Reformat. Use the
16235 pass_signals array.
16236 * remote-utils.c (decode_address_to_semicolon): New.
16237 * server.c (pass_signals, handle_general_set): New.
16238 (handle_query): Mention QPassSignals for qSupported.
16239 (main): Call handle_general_set.
16240 * server.h (pass_signals, decode_address_to_semicolon): New.
16241
16242 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16243
16244 * server.c (handle_query): Correct error handling for read_auxv.
16245
16246 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16247
16248 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16249 and srv_linux_thread_db to yes.
16250 * linux-s390-low.c (s390_fill_gregset): New function.
16251 (target_regsets): Define data structure.
16252
16253 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16254
16255 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16256 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16257 * config.in, configure: Regenerated.
16258 * inferiors.c (gdb_id_to_thread): New function.
16259 (gdb_id_to_thread_id): Use it.
16260 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16261 * linux-low.h (struct process_info): Add th member.
16262 (thread_db_get_tls_address): New prototype.
16263 * remote-utils.c (decode_address): Make non-static.
16264 * server.c (handle_query): Handle qGetTLSAddr.
16265 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16266 * target.h (struct target_ops): Add get_tls_address.
16267 * thread-db.c (maybe_attach_thread): Save the thread handle.
16268 (thread_db_get_tls_address): New.
16269
16270 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16271
16272 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16273 (linux_resume_one_process): Take a siginfo_t *. Update all
16274 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16275 (struct pending_signals): Add a siginfo_t.
16276 (linux_wait_for_process): Always set last_status.
16277 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16278 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16279 * linux-low.h (struct process_info): Add last_status.
16280
16281 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16282
16283 * remote-utils.c (try_rle): New function.
16284 (putpkt_binary): Use it.
16285
16286 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16287
16288 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16289 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16290 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16291 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16292 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16293 point registers.
16294
16295 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16296
16297 * server.c (terminal_fd): New variable.
16298 (old_foreground_pgrp): Likewise.
16299 (restore_old_foreground_pgrp): New function.
16300 (start_inferior): Record the terminal file descriptor in terminal_fd
16301 and its original foreground group in old_foreground_pgrp. Register
16302 restore_old_foreground_pgrp with atexit().
16303
16304 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16305
16306 * server.c (handle_query): Correct qPart to qXfer.
16307
16308 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16309
16310 * configure.ac: Check for more headers which are missing on
16311 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16312 * configure.srv: Add Cygwin and mingw32.
16313 * remote-utils.c: Don't include headers unconditionally which
16314 are missing on mingw32. Include <winsock.h> for mingw32.
16315 (remote_open): Adjust for mingw32 support. Flush
16316 standard error after writing to it.
16317 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16318 (unblock_async_io, enable_async_io, disable_async_io)
16319 (readchar, getpkt): Update for Winsock support.
16320 (prepare_resume_reply): Expect a protocol signal number.
16321 * server.c: Disable <sys/wait.h> on mingw32.
16322 (start_inferior): Adjust for mingw32 support. Flush
16323 standard error after writing to it.
16324 (attach_inferior): Likewise. Use protocol signal
16325 numbers.
16326 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16327 and names.
16328 * win32-i386-low.c: New file.
16329 * Makefile.in (XM_CLIBS): Set.
16330 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16331 (win32-i386-low.o): New dependency rule.
16332 * linux-low.c (linux_wait): Use target signal numbers.
16333 * target.h (struct target_ops): Doc fix.
16334 * server.h (target_signal_to_name): New prototype.
16335 * gdbreplay.c: Don't include headers unconditionally which
16336 are missing on mingw32. Include <winsock.h> for mingw32.
16337 (remote_close, remote_open): Adjust for Winsock support.
16338 * configure, config.in: Regenerated.
16339
16340 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16341
16342 * server.c (decode_xfer_read, write_qxfer_response): New.
16343 (handle_query): Take a packet length argument. Handle
16344 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16345 the qSupported response.
16346 (main): Update call to handle_query.
16347
16348 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16349
16350 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16351 (putpkt_binary): Renamed from putpkt and adjusted for binary
16352 data.
16353 (putpkt): New wrapper for putpkt_binary.
16354 (readchar): Don't mask off the high bit.
16355 (decode_X_packet): New function.
16356 * server.c (main): Call putpkt_binary if a handler sets the packet
16357 length. Save the length of the incoming packet. Handle 'X'.
16358 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16359
16360 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16361
16362 * server.c (handle_query): Handle qSupported.
16363
16364 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16365
16366 * remote-utils.c (all_symbols_looked_up): New variable.
16367 (look_up_one_symbol): Check it.
16368 * server.h (look_up_one_symbol): New declaration.
16369 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16370
16371 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16372
16373 * Makefile.in (linux-arm-low.o): Update dependencies.
16374 * linux-arm-low.c: Include "gdb_proc_service.h".
16375 (PTRACE_GET_THREAD_AREA): Define.
16376 (ps_get_thread_area): New function.
16377
16378 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16379
16380 * configure.srv (m68k*-*-uclinux*): New target.
16381 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16382 (linux_resume_one_process): Remove extraneous cast.
16383 (linux_read_offsets): New.
16384 (linux_target_op): Add linux_read_offsets on mmuless systems.
16385 * server.c (handle_query): Add qOffsets logic.
16386 * target.h (struct target_ops): Add read_offsets.
16387
16388 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16389
16390 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16391 (PTRACE_GET_THREAD_AREA): Define.
16392 (ps_get_thread_area): New function.
16393 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16394 (linux-x86-64-low.o): Update.
16395
16396 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16397
16398 * configure.ac: Remove checks for prfpregset_t.
16399 * gdb_proc_service.h: New file.
16400 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16401 new "gdb_proc_service.h".
16402 * proc-service.c: Likewise.
16403 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16404 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16405 * Makefile.in (gdb_proc_service_h): Updated.
16406 * configure, config.in: Regenerated.
16407
16408 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16409
16410 * remote-utils.c (prepare_resume_reply): Move declaration
16411 of gdb_id_from_wait to the top of the block.
16412
16413 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16414
16415 * linux-low.c (regsets_store_inferior_registers): Read the regset
16416 from the target before filling it.
16417
16418 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16419
16420 * server.c (attach_inferior): Return SIGTRAP for a successful
16421 attach.
16422
16423 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16424
16425 * Makefile.in (OBS): Add version.o.
16426 (STAGESTUFF): Delete.
16427 (version.o): Add dependencies.
16428 (version.c): Replace rule.
16429 (clean): Remove version.c.
16430 * server.c (gdbserver_version): New.
16431 (gdbserver_usage): Use printf.
16432 (main): Handle --version and --help.
16433 * server.h (version, host_name): Add declarations.
16434
16435 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16436
16437 * linux-arm-low.c:
16438 * linux-arm-low.c:
16439 * inferiors.c:
16440 * i387-fp.h:
16441 * i387-fp.c:
16442 * gdbreplay.c:
16443 * regcache.c:
16444 * proc-service.c:
16445 * mem-break.h:
16446 * mem-break.c:
16447 * linux-x86-64-low.c:
16448 * linux-sh-low.c:
16449 * linux-s390-low.c:
16450 * linux-ppc64-low.c:
16451 * linux-ppc-low.c:
16452 * linux-mips-low.c:
16453 * linux-m68k-low.c:
16454 * linux-m32r-low.c:
16455 * linux-low.h:
16456 * linux-low.c:
16457 * linux-ia64-low.c:
16458 * linux-i386-low.c:
16459 * linux-crisv32-low.c:
16460 * thread-db.c:
16461 * terminal.h:
16462 * target.h:
16463 * target.c:
16464 * server.h:
16465 * server.c:
16466 * remote-utils.c:
16467 * regcache.h:
16468 * utils.c:
16469 * Makefile.in:
16470 * configure.ac:
16471 * gdbserver.1: Add (C) after Copyright. Update the FSF
16472 address.
16473
16474 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16475
16476 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16477 (arm_breakpoint_at): Recognize both breakpoints.
16478 (the_low_target): Use the correct breakpoint instruction.
16479
16480 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16481
16482 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16483 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16484 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16485 (the_low_target): Update.
16486
16487 2005-10-25 Andreas Schwab <schwab@suse.de>
16488
16489 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16490
16491 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16492 (ia64_num_regs): Reduce to 462.
16493
16494 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16495
16496 * acinclude.m4: Correct quoting.
16497 * aclocal.m4: Regenerated.
16498
16499 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16500 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16501 (thread_db_init): Call thread_db_err_str.
16502 * configure.ac: Check for TD_VERSION.
16503 * config.in, configure: Regenerated.
16504
16505 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16506
16507 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16508
16509 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16510
16511 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16512 is not available. Define HAVE_PTRACE_GETREGS if it is.
16513 * config.in, configure: Regenerated.
16514 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16515 * linux-i386-low.c, linux-m68k-low.c: Update to use
16516 HAVE_PTRACE_GETREGS.
16517 * linux-low.c (regsets_fetch_inferior_registers)
16518 (regsets_store_inferior_registers): Only return 0 if we processed
16519 GENERAL_REGS.
16520 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16521 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16522
16523 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16524
16525 * inferiors.c (struct thread_info): Add gdb_id.
16526 (add_thread): Add gdb_id argument.
16527 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16528 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16529 calls to add_thread.
16530 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16531 * server.c (handle_query): Use thread_to_gdb_id.
16532 (handle_v_cont, main): Use gdb_id_to_thread_id.
16533 * server.h (add_thread): Update prototype.
16534 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16535 prototypes.
16536
16537 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16538
16539 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16540 left-padded registers.
16541 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16542 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16543
16544 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16545
16546 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16547 * configure: Regenerate.
16548 * config.in: Regenerate.
16549 * server.h (NEED_DECLARATION_STRERROR):
16550 Replace with !HAVE_DECL_STRERROR.
16551
16552 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16553
16554 * linux-low.c (linux_wait, linux_send_signal): Don't test
16555 an unsigned long variable for > 0 if it could be MAX_ULONG.
16556 * server.c (myresume): Likewise.
16557 * target.c (set_desired_inferior): Likewise.
16558
16559 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16560
16561 * configure.ac: Simplify and improve check for socklen_t.
16562 * configure, config.in: Regenerate.
16563
16564 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16565
16566 * acconfig.h: Remove.
16567 * configure.ac: Add a test for socklen_t. Use three-argument
16568 AC_DEFINE throughout.
16569 * config.in: Regenerated using autoheader 2.59.
16570 * configure: Regenerated.
16571
16572 * gdbreplay.c (socklen_t): Provide a default.
16573 (remote_open): Use socklen_t.
16574 * remote-utils.c (socklen_t): Provide a default.
16575 (remote_open): Use socklen_t.
16576 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16577 unsigned char.
16578
16579 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16580 char for buffers.
16581 * linux-low.c (linux_read_memory, linux_write_memory)
16582 (linux_read_auxv): Likewise.
16583 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16584 (check_mem_write): Likewise.
16585 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16586 Likewise.
16587 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16588 (registers_from_string, register_data): Likewise.
16589 * server.c (handle_query, main): Likewise.
16590 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16591 (decode_M_packet): Likewise.
16592 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16593 * target.h (struct target_ops): Update read_memory, write_memory,
16594 and read_auxv.
16595 (read_inferior_memory, write_inferior_memory): Update.
16596 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16597 to unsigned char *.
16598 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16599 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16600 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16601 linux-s390-low.c, linux-sh-low.c: Update for changes in
16602 read_inferior_memory and the_low_target->breakpoint.
16603
16604 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16605
16606 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16607 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16608 * configure.srv: Add powerpc64-*-linux*.
16609 * linux-ppc64-low.c: New file.
16610
16611 2005-05-23 Orjan Friberg <orjanf@axis.com>
16612
16613 * linux-cris-low.c: New file with support for CRIS.
16614 * linux-crisv32-low.c: Ditto for CRISv32.
16615 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16616 (clean): Add reg-cris.c and reg-crisv32.c.
16617 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16618 reg-crisv32.o, and reg-crisv32.c to make rules.
16619 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16620 recognized targets.
16621
16622 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16623
16624 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16625 of sizeof (PTRACE_XFER_TYPE).
16626 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16627
16628 2005-05-12 Orjan Friberg <orjanf@axis.com>
16629
16630 * target.h (struct target_ops): Add insert_watchpoint,
16631 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16632 pointers for hardware watchpoint support.
16633 * linux-low.h (struct linux_target_ops): Ditto.
16634 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16635 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16636 to linux_target_ops.
16637 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16638 reply packet.
16639 * server.c (main): Recognize 'Z' and 'z' packets.
16640
16641 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16642
16643 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16644 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16645 (the_low_target): Add new members.
16646
16647 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16648
16649 * proc-service.c (ps_lgetregs): Search all_processes instead of
16650 all_threads.
16651
16652 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16653
16654 * server.c (start_inferior): Change return type to int.
16655 (attach_inferior): Change sigptr to int *.
16656 (handle_v_cont, handle_v_requests): Change signal to int *.
16657 (main): Change signal to int.
16658
16659 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16660
16661 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16662 * configure.srv: Add m32r*-*-linux*.
16663 * linux-m32r-low.c: New file.
16664
16665 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16666
16667 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16668
16669 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16670
16671 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16672 Take unsigned long arguments for PIDs.
16673 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16674 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16675 (wait_for_sigstop, linux_resume_one_process)
16676 (regsets_fetch_inferior_registers, linux_send_signal)
16677 (linux_read_auxv): Likewise. Update the types of variables holding
16678 PIDs. Update format string specifiers.
16679 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16680 * remote-utils.c (prepare_resume_reply): Likewise.
16681 * server.c (cont_thread, general_thread, step_thread)
16682 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16683 unsigned long.
16684 (handle_query): Update format specifiers.
16685 (handle_v_cont, main): Use strtoul for thread IDs.
16686 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16687 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16688 (general_thread, step_thread, thread_from_wait)
16689 (old_thread_from_wait): Update.
16690 * target.h (struct thread_resume): Use unsigned long for THREAD.
16691 (struct target_ops): Use unsigned long for arguments to attach and
16692 thread_alive.
16693
16694 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16695
16696 * acinclude.m4: Include bfd/bfd.m4 directly.
16697 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16698 <agriffis@toolchain.org>.
16699 * aclocal.m4, configure: Regenerated.
16700
16701 2005-01-07 Andrew Cagney <cagney@gnu.org>
16702
16703 * configure.ac: Rename configure.in, require autoconf 2.59.
16704 * configure: Re-generate.
16705
16706 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16707
16708 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16709 LIBS when finished.
16710 * aclocal.m4: Regenerated.
16711 * configure: Regenerated.
16712
16713 2004-11-21 Andreas Schwab <schwab@suse.de>
16714
16715 * linux-m68k-low.c (m68k_num_gregs): Define.
16716 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16717 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16718 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16719 (m68k_breakpoint_at): New. Add to the_low_target.
16720
16721 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16722 srv_linux_thread_db to yes.
16723
16724 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16725
16726 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16727 (ARCH_SET_FS): Likewise.
16728 (ARCH_GET_FS): Likewise.
16729 (ARCH_GET_GS): Likewise.
16730
16731 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16732
16733 * linux-i386-low.c (ps_get_thread_area): New.
16734 * linux-x86-64-low.c (ps_get_thread_area): New.
16735 * linux-low.c: Include <sys/syscall.h>.
16736 (linux_kill_one_process): Don't kill the first thread here.
16737 (linux_kill): Kill the first thread here.
16738 (kill_lwp): New function.
16739 (send_sigstop, linux_send_signal): Use it.
16740 * proc-service.c: Clean up #ifdefs.
16741 (fpregset_info): Delete.
16742 (ps_lgetregs): Update and enable implementation.
16743 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16744 implementations.
16745 * remote-utils.c (struct sym_cache, symbol_cache): New.
16746 (input_interrupt): Print a clearer message.
16747 (async_io_enabled): New variable.
16748 (enable_async_io, disable_async_io): Use it. Update comments.
16749 (look_up_one_symbol): Use the symbol cache.
16750 * thread-db.c (thread_db_look_up_symbols): New function.
16751 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16752
16753 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16754
16755 * configure.in: Test for -rdynamic.
16756 * configure: Regenerated.
16757 * Makefile (INTERNAL_LDFLAGS): New.
16758 (gdbserver, gdbreplay): Use it.
16759
16760 2004-09-02 Andrew Cagney <cagney@gnu.org>
16761
16762 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16763
16764 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16765
16766 * linux-low.c (linux_wait): Clear all_processes list also.
16767
16768 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16769
16770 * linux-low.c: Include <errno.h>. Remove extern declaration of
16771 errno.
16772
16773 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16774
16775 * gdbreplay.c, server.h, utils.c: Update copyright years.
16776
16777 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16778
16779 * server.c (main): Print child status or termination signal from
16780 variable 'signal', not 'sig'.
16781
16782 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16783
16784 * linux-low.c (linux_read_memory): Change return type to
16785 int. Check for and return error from ptrace().
16786 * target.c (read_inferior_memory): Change return type to int. Pass
16787 back return status from the_target->read_memory().
16788 * target.h (struct target_ops): Adapt *read_memory() prototype.
16789 Update comment.
16790 (read_inferior_memory): Adapt prototype.
16791 * server.c (main): Return an error packet if
16792 read_inferior_memory() returns an error.
16793
16794 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16795
16796 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16797 Unify with other clean targets.
16798
16799 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16800
16801 * server.c (handle_v_cont): Call set_desired_inferior.
16802
16803 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16804
16805 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16806
16807 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16808
16809 * linux-low.c (linux_wait): Unblock async I/O.
16810 (linux_resume): Block and enable async I/O.
16811 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16812 * server.h (block_async_io, unblock_async_io): Add prototypes.
16813
16814 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16815
16816 * remote-utils.c (remote_open): Print a status notice after
16817 opening a TCP port.
16818 * server.c (attach_inferior): Print a status notice after
16819 attaching.
16820
16821 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16822
16823 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16824
16825 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16826
16827 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16828 error packet.
16829 * server.c, target.h: Update copyright years.
16830
16831 2004-02-25 Roland McGrath <roland@redhat.com>
16832
16833 * target.h (struct target_ops): New member `read_auxv'.
16834 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16835 * linux-low.c (linux_read_auxv): New function.
16836 (linux_target_ops): Initialize `read_auxv' member to that.
16837
16838 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16839
16840 Committed by Jim Blandy <jimb@redhat.com>.
16841
16842 * linux-s390-low.c (s390_num_regs): Update.
16843 (s390_regmap): Remove control registers. Use __s390x__ predefine
16844 instead of GPR_SIZE to distiguish s390 and s390x targets.
16845
16846 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16847
16848 * linux-low.c: Update copyright year.
16849 (check_removed_breakpoint): Clear pending_is_breakpoint.
16850 (linux_set_resume_request, linux_queue_one_thread)
16851 (resume_status_pending_p): New functions.
16852 (linux_continue_one_thread): Use process->resume.
16853 (linux_resume): Only resume threads if there are no pending events.
16854 * linux-low.h (struct process_info): Add resume request
16855 pointer.
16856
16857 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16858
16859 * regcache.c (new_register_cache): Clear the allocated register
16860 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16861
16862 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16863
16864 * linux-low.c (linux_resume): Take a struct thread_resume *
16865 argument.
16866 (linux_wait): Update call.
16867 (resume_ptr): New static variable.
16868 (linux_continue_one_thread): Renamed from
16869 linux_continue_one_process. Use resume_ptr.
16870 (linux_resume): Use linux_continue_one_thread.
16871 * server.c (handle_v_cont, handle_v_requests): New functions.
16872 (myresume): New function.
16873 (main): Handle 'v' case.
16874 * target.h (struct thread_resume): New type.
16875 (struct target_ops): Change argument of "resume" to struct
16876 thread_resume *.
16877 (myresume): Delete macro.
16878
16879 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16880
16881 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16882 (uninstall): Support DESTDIR.
16883
16884 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16885
16886 * configure.srv: Add xscale*linux copy of arm*linux entry.
16887
16888 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16889
16890 * linux-arm-low.c (arm_reinsert_addr): New function.
16891 (the_low_target): Add arm_reinsert_addr.
16892
16893 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16894
16895 * mem-break.c: Remove whitespace at end of file.
16896
16897 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16898
16899 * configure.in: Check whether we need to prototype strerror.
16900 * server.h: Optionally prototype strerror.
16901 * gdbreplay.c (perror_with_name): Use strerror.
16902 * linux-low.c (linux_attach_lwp): Use strerror.
16903 * utils.c (perror_with_name): Use strerror.
16904 * config.in, configure: Regenerated.
16905
16906 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16907
16908 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16909 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16910
16911 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16912
16913 * Makefile.in (SFILES): Update.
16914 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16915 low-sun3.c: Remove files.
16916
16917 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16918
16919 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16920 (linux_detach_one_process, linux_detach): New functions.
16921 (linux_target_ops): Add linux_detach.
16922 * server.c (main): Handle 'D' packet.
16923 * target.h (struct target_ops): Add "detach" member.
16924 (detach_inferior): Define.
16925
16926 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16927
16928 From Kelley Cook <kelleycook@wideopenwest.com>:
16929 * configure.srv: Accept i[34567]86 variants.
16930
16931 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16932
16933 * linux-low.c (linux_wait_for_event): Correct comment typos.
16934 (linux_resume_one_process): Call check_removed_breakpoint.
16935 (linux_send_signal): New function.
16936 (linux_target_ops): Add linux_send_signal.
16937 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16938 of kill.
16939 * target.h (struct target_ops): Add send_signal.
16940
16941 2003-05-29 Jim Blandy <jimb@redhat.com>
16942
16943 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16944 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16945 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16946 away part of the register's value.
16947
16948 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16949
16950 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16951 (linux_wait_for_event, linux_init_signals): Likewise.
16952
16953 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16954
16955 * configure.in: Check for stdlib.h.
16956 * configure: Regenerated.
16957 * config.in: Regenerated.
16958
16959 2003-01-04 Andreas Schwab <schwab@suse.de>
16960
16961 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16962
16963 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16964
16965 * Makefile.in: Remove obsolete code.
16966
16967 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16968
16969 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16970 defined(PT_FPR0_HI).
16971
16972 2002-11-17 Stuart Hughes <seh@zee2.com>
16973
16974 * linux-arm-low.c (arm_num_regs): Increase.
16975 (arm_regmap): Include status register.
16976
16977 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16978
16979 * linux-low.c (register_addr): Remove incorrect -1 check.
16980
16981 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16982
16983 * linux-low.c (linux_create_inferior): Call setpgid. Return
16984 the new PID.
16985 (unstopped_p, linux_signal_pid): Remove.
16986 (linux_target_ops): Remove linux_signal_pid.
16987 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16988 global instead of target method.
16989 * target.h (struct target_ops): Remove signal_pid. Update comment
16990 for create_inferior.
16991 * server.c (signal_pid): New variable.
16992 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16993 gdbserver. Set the child to be the foreground process group.
16994 (attach_inferior): Set signal_pid.
16995
16996 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16997
16998 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16999
17000 2002-08-20 Jim Blandy <jimb@redhat.com>
17001
17002 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17003 default for this.
17004
17005 2002-08-01 Andrew Cagney <cagney@redhat.com>
17006
17007 * Makefile.in: Make chill references obsolete.
17008
17009 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17010
17011 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17012 * configure: Regenerate.
17013 * config.in: Regenerate.
17014
17015 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17016
17017 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17018 (perror_with_name, remote_close, remote_open, expect, play): Static.
17019
17020 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17021
17022 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17023 byte offsets instead of an array of indexes.
17024 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17025
17026 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17027
17028 * regcache.c: Add comment.
17029
17030 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17031
17032 * thread-db.c: New file.
17033 * proc-service.c: New file.
17034 * acinclude.m4: New file.
17035 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17036 proc-service.o, and thread-db.o.
17037 (linux-low.o): Add USE_THREAD_DB.
17038 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17039 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17040 * aclocal.m4: Regenerated.
17041 * config.in: Regenerated.
17042 * configure: Regenerated.
17043 * configure.in: Check for proc_service.h, sys/procfs.h,
17044 thread_db.h, and linux/elf.h headrs.
17045 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17046 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17047 Check for -lthread_db and thread support.
17048 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17049 PowerPC, and SuperH.
17050 * i387-fp.c: Constify arguments.
17051 * i387-fp.h: Likewise.
17052 * inferiors.c: (struct thread_info): Renamed from
17053 `struct inferior_info'. Remove PID member. Use generic inferior
17054 list header. All uses updated.
17055 (inferiors, signal_pid): Removed.
17056 (all_threads): New variable.
17057 (get_thread): Define.
17058 (add_inferior_to_list): New function.
17059 (for_each_inferior): New function.
17060 (change_inferior_id): New function.
17061 (add_inferior): Removed.
17062 (remove_inferior): New function.
17063 (add_thread): New function.
17064 (free_one_thread): New function.
17065 (remove_thread): New function.
17066 (clear_inferiors): Use for_each_inferior and free_one_thread.
17067 (find_inferior): New function.
17068 (find_inferior_id): New function.
17069 (inferior_target_data): Update argument type.
17070 (set_inferior_target_data): Likewise.
17071 (inferior_regcache_data): Likewise.
17072 (set_inferior_regcache_data): Likewise.
17073 * linux-low.c (linux_bp_reinsert): Remove.
17074 (all_processes, stopping_threads, using_thrads)
17075 (struct pending_signals, debug_threads, pid_of): New.
17076 (inferior_pid): Replace with macro.
17077 (struct inferior_linux_data): Remove.
17078 (get_stop_pc, add_process): New functions.
17079 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17080 Use add_process and add_thread.
17081 (linux_attach_lwp): New function, based on old linux_attach. Use
17082 add_process and add_thread. Set stop_expected for new threads.
17083 (linux_attach): New function.
17084 (linux_kill_one_process): New function.
17085 (linux_kill): Kill all LWPs.
17086 (linux_thread_alive): Use find_inferior_id.
17087 (check_removed_breakpoints, status_pending_p): New functions.
17088 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17089 Update. Use WNOHANG. Wait for cloned processes also. Update process
17090 struct for the found process.
17091 (linux_wait_for_event): New function.
17092 (linux_wait): Use it. Support LWPs.
17093 (send_sigstop, wait_for_sigstop, stop_all_processes)
17094 (linux_resume_one_process, linux_continue_one_process): New functions.
17095 (linux_resume): Support LWPs.
17096 (REGISTER_RAW_SIZE): Remove.
17097 (fetch_register): Use register_size instead. Call supply_register.
17098 (usr_store_inferior_registers): Likewise. Call collect_register.
17099 Fix recursive case.
17100 (regsets_fetch_inferior_registers): Improve error message.
17101 (regsets_store_inferior_registers): Add debugging.
17102 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17103 (unstopped_p, linux_signal_pid): New functions.
17104 (linux_target_ops): Add linux_signal_pid.
17105 (linux_init_signals): New function.
17106 (initialize_low): Call it. Initialize using_threads.
17107 * regcache.c (inferior_regcache_data): Add valid
17108 flag.
17109 (get_regcache): Fetch registers lazily. Add fetch argument
17110 and update all callers.
17111 (regcache_invalidate_one, regcache_invalidate): New
17112 functions.
17113 (new_register_cache): Renamed from create_register_cache.
17114 Return the new regcache.
17115 (free_register_cache): Change argument to a void *.
17116 (registers_to_string, registers_from_string): Call get_regcache
17117 with fetch flag set.
17118 (register_data): Make static. Pass fetch flag to get_regcache.
17119 (supply_register): Call get_regcache with fetch flag clear.
17120 (collect_register): Call get_regcache with fetch flag set.
17121 (collect_register_as_string): New function.
17122 * regcache.h: Update.
17123 * remote-utils.c (putpkt): Flush after debug output and use
17124 stderr.
17125 Handle input interrupts while waiting for an ACK.
17126 (input_interrupt): Use signal_pid method.
17127 (getpkt): Flush after debug output and use stderr.
17128 (outreg): Use collect_register_as_string.
17129 (new_thread_notify, dead_thread_notify): New functions.
17130 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17131 and general_thread.
17132 (look_up_one_symbol): Flush after debug output.
17133 * server.c (step_thread, server_waiting): New variables.
17134 (start_inferior): Don't use signal_pid. Update call to mywait.
17135 (attach_inferior): Update call to mywait.
17136 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17137 (main): Don't fetch/store registers explicitly. Use
17138 set_desired_inferior. Support proposed ``Hs'' packet. Update
17139 calls to mywait.
17140 * server.h: Update.
17141 (struct inferior_list, struct_inferior_list_entry): New.
17142 * target.c (set_desired_inferior): New.
17143 (write_inferior_memory): Constify.
17144 (mywait): New function.
17145 * target.h: Update.
17146 (struct target_ops): New signal_pid method.
17147 (mywait): Removed macro, added prototype.
17148
17149 * linux-low.h (regset_func): Removed.
17150 (regset_fill_func, regset_store_func): New.
17151 (enum regset_type): New.
17152 (struct regset_info): Add type field. Use new operation types.
17153 (struct linux_target_ops): stop_pc renamed to get_pc.
17154 Add decr_pc_after_break and breakpoint_at.
17155 (get_process, get_thread_proess, get_process_thread)
17156 (strut process_info, all_processes, linux_attach_lwp)
17157 (thread_db_init): New.
17158
17159 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17160 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17161 (the_low_target): Add new members.
17162 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17163 (i386_store_fpxregset): Constify.
17164 (target_regsets): Add new kind identifier.
17165 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17166 (i386_set_pc): Add debugging.
17167 (i386_breakpoint_at): New function.
17168 (the_low_target): Add new members.
17169 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17170 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17171 (mips_breakpoint_at): New.
17172 (the_low_target): Add new members.
17173 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17174 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17175 (the_low_target): Add new members.
17176 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17177 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17178 (the_low_target): Add new members.
17179 * linux-x86-64-low.c (target_regsets): Add new kind
17180 identifier.
17181
17182 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17183
17184 From Martin Pool <mbp@samba.org>:
17185 * server.c (gdbserver_usage): New function.
17186 (main): Call it.
17187
17188 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17189
17190 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17191 stop_at -> stop_pc.
17192
17193 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17194
17195 * Makefile.in: Remove obsolete code.
17196
17197 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17198
17199 * linux-low.c (regsets_fetch_inferior_registers),
17200 (regsets_store_inferior_registers): Removed cast to int from
17201 ptrace() calls.
17202 * regcache.h: Added declaration of struct inferior_info.
17203
17204 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17205
17206 * inferiors.c (struct inferior_info): Add regcache_data.
17207 (add_inferior): Call create_register_cache.
17208 (clear_inferiors): Call free_register_cache.
17209 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17210 * regcache.c (struct inferior_regcache_data): New.
17211 (registers): Remove.
17212 (get_regcache): New function.
17213 (create_register_cache, free_register_cache): New functions.
17214 (set_register_cache): Don't initialize the register cache here.
17215 (registers_to_string, registers_from_string, register_data): Call
17216 get_regcache.
17217 * regcache.h: Add prototypes.
17218 * server.h: Likewise.
17219
17220 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17221
17222 * mem-break.c: New file.
17223 * mem-break.h: New file.
17224 * Makefile.in: Add mem-break.o rule; update server.h
17225 dependencies.
17226 * inferiors.c (struct inferior_info): Add target_data
17227 member.
17228 (clear_inferiors): Free target_data member if set.
17229 (inferior_target_data, set_inferior_target_data): New functions.
17230 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17231 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17232 * linux-low.c (linux_bp_reinsert): New variable.
17233 (struct inferior_linux_data): New.
17234 (linux_create_inferior): Use set_inferior_target_data.
17235 (linux_attach): Likewise. Call add_inferior.
17236 (linux_wait_for_one_inferior): New function.
17237 (linux_wait): Call it.
17238 (linux_write_memory): Add const.
17239 (initialize_low): Call set_breakpoint_data.
17240 * linux-low.h (struct linux_target_ops): Add breakpoint
17241 handling members.
17242 * server.c (attach_inferior): Remove extra add_inferior
17243 call.
17244 * server.h: Include mem-break.h. Update inferior.c
17245 prototypes.
17246 * target.c (read_inferior_memory)
17247 (write_inferior_memory): New functions.
17248 * target.h (read_inferior_memory)
17249 (write_inferior_memory): Change macros to prototypes.
17250 (struct target_ops): Update comments. Add const to write_memory
17251 definition.
17252
17253 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17254
17255 * linux-low.c (usr_store_inferior_registers): Support
17256 registers which are allowed to fail to store.
17257 * linux-low.h (linux_target_ops): Likewise.
17258 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17259 (ppc_cannot_store_register): FPSCR may not be storable.
17260
17261 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17262
17263 * server.h: Include <string.h> if HAVE_STRING_H.
17264 * ChangeLog: Correct paths in last ChangeLog entry.
17265
17266 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17267
17268 * linux-low.h: Remove obsolete prototypes.
17269 (struct linux_target_ops): New.
17270 (extern the_low_target): New.
17271 * linux-low.c (num_regs, regmap): Remove declarations.
17272 (register_addr): Use the_low_target explicitly.
17273 (fetch_register): Likewise.
17274 (usr_fetch_inferior_registers): Likewise.
17275 (usr_store_inferior_registers): Likewise.
17276 * linux-arm-low.c (num_regs): Remove.
17277 (arm_num_regs): Define.
17278 (arm_regmap): Renamed from regmap, made static.
17279 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17280 made static.
17281 (arm_cannot_store_register): Renamed from cannot_store_register,
17282 made static.
17283 (the_low_target): New.
17284 * linux-i386-low.c (num_regs): Remove.
17285 (i386_num_regs): Define.
17286 (i386_regmap): Renamed from regmap, made static.
17287 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17288 made static.
17289 (i386_cannot_store_register): Renamed from cannot_store_register,
17290 made static.
17291 (the_low_target): New.
17292 * linux-ia64-low.c (num_regs): Remove.
17293 (ia64_num_regs): Define.
17294 (ia64_regmap): Renamed from regmap, made static.
17295 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17296 made static.
17297 (ia64_cannot_store_register): Renamed from cannot_store_register,
17298 made static.
17299 (the_low_target): New.
17300 * linux-m68k-low.c (num_regs): Remove.
17301 (m68k_num_regs): Define.
17302 (m68k_regmap): Renamed from regmap, made static.
17303 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17304 made static.
17305 (m68k_cannot_store_register): Renamed from cannot_store_register,
17306 made static.
17307 (the_low_target): New.
17308 * linux-mips-low.c (num_regs): Remove.
17309 (mips_num_regs): Define.
17310 (mips_regmap): Renamed from regmap, made static.
17311 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17312 made static.
17313 (mips_cannot_store_register): Renamed from cannot_store_register,
17314 made static.
17315 (the_low_target): New.
17316 * linux-ppc-low.c (num_regs): Remove.
17317 (ppc_num_regs): Define.
17318 (ppc_regmap): Renamed from regmap, made static.
17319 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17320 made static.
17321 (ppc_cannot_store_register): Renamed from cannot_store_register,
17322 made static.
17323 (the_low_target): New.
17324 * linux-s390-low.c (num_regs): Remove.
17325 (s390_num_regs): Define.
17326 (s390_regmap): Renamed from regmap, made static.
17327 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17328 made static.
17329 (s390_cannot_store_register): Renamed from cannot_store_register,
17330 made static.
17331 (the_low_target): New.
17332 * linux-sh-low.c (num_regs): Remove.
17333 (sh_num_regs): Define.
17334 (sh_regmap): Renamed from regmap, made static.
17335 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17336 made static.
17337 (sh_cannot_store_register): Renamed from cannot_store_register,
17338 made static.
17339 (the_low_target): New.
17340 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17341 (the_low_target): New.
17342
17343 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17344
17345 * Makefile.in: Add stamp-h target.
17346 * configure.in: Create stamp-h.
17347 * configure: Regenerated.
17348
17349 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17350
17351 * inferiors.c: New file.
17352 * target.c: New file.
17353 * target.h: New file.
17354 * Makefile.in: Add target.o and inferiors.o. Update
17355 dependencies.
17356 * linux-low.c (inferior_pid): New static variable,
17357 moved from server.c.
17358 (linux_create_inferior): Renamed from create_inferior.
17359 Call add_inferior. Return 0 on success instead of a PID.
17360 (linux_attach): Renamed from myattach.
17361 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17362 (linux_thread_alive): Renamed from mythread_alive.
17363 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17364 child dies.
17365 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17366 (regsets_store_inferior_registers): Correct error message.
17367 Add missing ``return 0''.
17368 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17369 (linux_store_registers): Renamed from store_inferior_registers.
17370 (linux_read_memory): Renamed from read_inferior_memory.
17371 (linux_write_memory): Renamed from write_inferior_memory.
17372 (linux_target_ops): New structure.
17373 (initialize_low): Call set_target_ops ().
17374 * remote-utils.c (unhexify): New function.
17375 (hexify): New function.
17376 (input_interrupt): Send signals to ``signal_pid''.
17377 * server.c (inferior_pid): Remove.
17378 (start_inferior): Update create_inferior call.
17379 (attach_inferior): Call add_inferior.
17380 (handle_query): New function.
17381 (main): Call handle_query for `q' packets.
17382 * server.h: Include "target.h". Remove obsolete prototypes.
17383 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17384
17385 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17386
17387 * Makefile.in: Add WARN_CFLAGS. Update configury
17388 dependencies.
17389 * configure.in: Check for <string.h>
17390 * configure: Regenerate.
17391 * config.in: Regenerate.
17392 * gdbreplay.c: Include needed system headers.
17393 (remote_open): Remove strchr prototype.
17394 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17395 * regcache.c (supply_register): Change buf argument to const void *.
17396 (supply_register_by_name): Likewise.
17397 (collect_register): Change buf argument to void *.
17398 (collect_register_by_name): Likewise.
17399 * regcache.h: Add missing prototypes.
17400 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17401 * server.c (handle_query): New function.
17402 (attached): New static variable, moved out of main.
17403 (main): Quiet longjmp clobber warnings.
17404 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17405 * utils.c (error): Remove NORETURN.
17406 (fatal): Likewise.
This page took 0.451623 seconds and 5 git commands to generate.