460daab6ea073533cf0a9c28fdbee057c1ca7b7d
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-06-11 Tom Tromey <tom@tromey.com>
2
3 * Makefile.in (SFILES): Add alloc.c.
4 (OBS): Add alloc.o.
5 (IPA_OBJS): Add alloc-ipa.o.
6 (alloc-ipa.o): New target.
7 (%.o: ../%.c): New pattern rule.
8
9 2019-06-10 Tom Tromey <tromey@adacore.com>
10
11 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
12 end warning with a newline.
13 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
14 newline.
15 * thread-db.c (attach_thread): Don't end warning with a newline.
16 (thread_db_notice_clone): Likewise.
17 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
18 newline.
19 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
20 end warning with a newline.
21
22 2019-06-04 Pedro Alves <palves@redhat.com>
23
24 * server.c (captured_main): Use make_unique_xstrdup.
25
26 2019-06-02 Tom Tromey <tom@tromey.com>
27
28 * gdbreplay.c (fromhex): Remove.
29 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
30
31 2019-05-29 Tom Tromey <tromey@adacore.com>
32
33 * configure: Rebuild.
34
35 2019-05-06 Kevin Buettner <kevinb@redhat.com>
36
37 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
38 sign extension code on 32-bit builds.
39
40 2019-05-03 Eli Zaretskii <eliz@gnu.org>
41
42 * remote-utils.c:
43 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
44
45 2019-04-19 Tom Tromey <tom@tromey.com>
46
47 * server.c (struct vstop_notif): Derive from notif_event.
48 <base>: Remove.
49 (queue_stop_reply): Update.
50 (remove_all_on_match_ptid): Change type. Rewrite.
51 (discard_queued_stop_replies): Rewrite.
52 (in_queued_stop_replies_ptid): Change type.
53 (in_queued_stop_replies): Rewrite.
54 (notif_stop): Update.
55 (queue_stop_reply_callback): Update.
56 (captured_main): Don't call initialize_notif.
57 (push_stop_notification): Update.
58 * notif.c (notif_write_event, handle_notif_ack)
59 (notif_event_enque, notif_push): Update.
60 (notif_event_xfree, initialize_notif): Remove.
61 * notif.h (struct notif_event): Include <list>, not
62 "common/queue.h".
63 (struct notif_server) <queue>: Now a std::list.
64 (notif_event_p): Remove typedef.
65 (initialize_notif): Don't declare.
66 (struct notif_event): Add virtual destructor.
67
68 2019-04-17 Alan Hayward <alan.hayward@arm.com>
69
70 * ax.c (ax_vdebug): Call debug_printf.
71 * debug.c (debug_write): New function.
72 * debug.h (debug_write): New declaration.
73 * linux-low.c (sigchld_handler): Call debug_write.
74
75 2019-04-17 Alan Hayward <alan.hayward@arm.com>
76
77 * debug.c (debug_set_output): New function.
78 (debug_vprintf): Send output to debug_file.
79 (debug_flush): Likewise.
80 * debug.h (debug_set_output): New declaration.
81 * server.c (handle_monitor_command): Add debug-file option.
82 (captured_main): Likewise.
83
84 2019-04-17 Alan Hayward <alan.hayward@arm.com>
85
86 * debug.c (remote_debug): Add definition.
87 * debug.h (remote_debug): Add declaration.
88 * hostio.c (remote_debug): Remove declaration.
89 * remote-utils.c (struct ui_file): Likewise.
90 (remote_debug): Likewise.
91 * remote-utils.h (remote_debug): Likewise,
92 * server.c (remote_debug): Remove definition.
93
94 2019-04-10 Kevin Buettner <kevinb@redhat.com>
95
96 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
97 when using a 64-bit gdbserver.
98
99 2019-04-09 Tom Tromey <tromey@adacore.com>
100
101 * linux-low.c (select_event_lwp): Use find_thread_in_random.
102
103 2019-04-08 Tom Tromey <tom@tromey.com>
104
105 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
106 throw.
107 (linux_resume_one_lwp): Likewise.
108
109 2019-04-08 Tom Tromey <tom@tromey.com>
110
111 * gdbreplay.c: Update.
112 * linux-low.c: Update.
113 * server.c: Update.
114
115 2019-04-08 Tom Tromey <tom@tromey.com>
116
117 * server.c: Use C++ exception handling.
118 * linux-low.c: Use C++ exception handling.
119 * gdbreplay.c: Use C++ exception handling.
120
121 2019-04-08 Tom Tromey <tom@tromey.com>
122
123 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
124 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
125 (captured_main, main): Update.
126 * gdbreplay.c (main): Update.
127
128 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
129
130 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
131 value in argument pointer, return 1 if the entry is found and 0
132 otherwise. Move comment.
133 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
134 * linux-low.h (linux_get_auxv): Declare.
135 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
136
137 2019-04-05 Tom Tromey <tromey@adacore.com>
138
139 * server.c (gdbserver_usage): Use upper-case for metasyntactic
140 variables.
141
142 2019-03-28 Alan Hayward <alan.hayward@arm.com>
143
144 * linux-low.c (AT_HWCAP2): Add define if not already included.
145
146 2019-03-26 Alan Hayward <alan.hayward@arm.com>
147
148 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
149 (aarch64_arch_setup): Call linux_get_hwcap.
150 * linux-arm-low.c (arm_get_hwcap): Remove function.
151 (arm_read_description): Call linux_get_hwcap.
152 * linux-low.c (linux_get_auxv): New function.
153 (linux_get_hwcap): Likewise.
154 (linux_get_hwcap2): Likewise.
155 * linux-low.h (linux_get_hwcap): New declaration.
156 (linux_get_hwcap2): Likewise.
157 * linux-ppc-low.c (ppc_get_auxv): Remove function.
158 (ppc_arch_setup): Call linux_get_hwcap.
159 * linux-s390-low.c (s390_get_hwcap): Remove function.
160 (s390_arch_setup): Call linux_get_hwcap.
161
162 2019-03-22 Alan Hayward <alan.hayward@arm.com>
163 Jiong Wang <jiong.wang@arm.com>
164
165 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
166 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
167 to fail.
168 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
169
170 2019-03-22 Alan Hayward <alan.hayward@arm.com>
171 Jiong Wang <jiong.wang@arm.com>
172
173 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
174 (aarch64_get_hwcap): New function.
175 (aarch64_arch_setup): Read APIA hwcap.
176
177 2019-03-22 Alan Hayward <alan.hayward@arm.com>
178 Jiong Wang <jiong.wang@arm.com>
179
180 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
181 (initialize_low_tracepoint): Likewise.
182 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
183 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
184 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
185 (aarch64_linux_read_description): Likewise.
186 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
187
188 2019-03-12 John Baldwin <jhb@FreeBSD.org>
189
190 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
191 i386_create_target_description for 'segments' parameter.
192 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
193 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
194 * win32-i386-low.c (i386_arch_setup): Likewise.
195
196 2019-03-12 Tom Tromey <tromey@adacore.com>
197
198 * linux-low.c (iterate_over_lwps): Update.
199
200 2019-03-06 Tom Tromey <tom@tromey.com>
201
202 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
203 (captured_main): Use SCOPE_EXIT.
204
205 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
206
207 * configure.srv: Use '$enable_unittest' instead of '$development'
208 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
209 case.
210
211 2019-02-27 Tom Tromey <tromey@adacore.com>
212
213 * gdbreplay.c (logchar): Handle \r\n.
214
215 2019-02-07 Alan Hayward <alan.hayward@arm.com>
216
217 * linux-low.c (linux_attach): Add process before lwp.
218 * server.c (attach_inferior): Check if already attached.
219
220 2019-02-07 Tom Tromey <tom@tromey.com>
221
222 * x86-tdesc.h: Rename include guard.
223 * x86-low.h: Add include guard.
224 * wincecompat.h: Rename include guard.
225 * win32-low.h: Add include guard.
226 * utils.h: Rename include guard.
227 * tracepoint.h: Rename include guard.
228 * tdesc.h: Rename include guard.
229 * target.h: Rename include guard.
230 * server.h: Rename include guard.
231 * remote-utils.h: Rename include guard.
232 * regcache.h: Rename include guard.
233 * nto-low.h: Rename include guard.
234 * notif.h: Add include guard.
235 * mem-break.h: Rename include guard.
236 * lynx-low.h: Add include guard.
237 * linux-x86-tdesc.h: Add include guard.
238 * linux-s390-tdesc.h: Add include guard.
239 * linux-ppc-tdesc-init.h: Add include guard.
240 * linux-low.h: Add include guard.
241 * linux-aarch64-tdesc.h: Add include guard.
242 * linux-aarch32-low.h: Add include guard.
243 * inferiors.h: Rename include guard.
244 * i387-fp.h: Rename include guard.
245 * hostio.h: Rename include guard.
246 * gdbthread.h: Rename include guard.
247 * gdb_proc_service.h: Rename include guard.
248 * event-loop.h: Rename include guard.
249 * dll.h: Rename include guard.
250 * debug.h: Rename include guard.
251 * ax.h: Rename include guard.
252
253 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
254
255 PR gdb/23985
256 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
257 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
258
259 2019-01-25 Tom Tromey <tom@tromey.com>
260
261 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
262
263 2019-01-25 Tom Tromey <tom@tromey.com>
264
265 * win32-low.c: Fix common/ includes.
266 * win32-i386-low.c: Fix common/ includes.
267 * tracepoint.c: Fix common/ includes.
268 * thread-db.c: Fix common/ includes.
269 * target.h: Fix common/ includes.
270 * symbol.c: Fix common/ includes.
271 * spu-low.c: Fix common/ includes.
272 * server.h: Fix common/ includes.
273 * server.c: Fix common/ includes.
274 * remote-utils.c: Fix common/ includes.
275 * regcache.h: Fix common/ includes.
276 * regcache.c: Fix common/ includes.
277 * nto-x86-low.c: Fix common/ includes.
278 * notif.h: Fix common/ includes.
279 * mem-break.h: Fix common/ includes.
280 * lynx-low.c: Fix common/ includes.
281 * lynx-i386-low.c: Fix common/ includes.
282 * linux-x86-tdesc-selftest.c: Fix common/ includes.
283 * linux-x86-low.c: Fix common/ includes.
284 * linux-low.c: Fix common/ includes.
285 * inferiors.h: Fix common/ includes.
286 * i387-fp.c: Fix common/ includes.
287 * hostio.c: Fix common/ includes.
288 * hostio-errno.c: Fix common/ includes.
289 * gdbthread.h: Fix common/ includes.
290 * gdbreplay.c: Fix common/ includes.
291 * fork-child.c: Fix common/ includes.
292 * event-loop.c: Fix common/ includes.
293 * ax.c:
294 (enum gdb_agent_op): Fix common/ includes.
295
296 2019-01-21 Tom Tromey <tom@tromey.com>
297
298 * tracepoint.c: Fix includes.
299 * remote-utils.c: Fix includes.
300 * linux-x86-low.c: Fix includes.
301
302 2019-01-01 Joel Brobecker <brobecker@adacore.com>
303
304 * gdbreplay.c (gdbreplay_version): Update copyright year in
305 version message.
306 * server.c (gdbserver_version): Likewise.
307
308 2018-12-05 Alan Hayward <alan.hayward@arm.com>
309
310 * linux-low.c (add_lwp): Switch ordering.
311
312 2018-11-29 Tom Tromey <tom@tromey.com>
313
314 * win32-low.c (win32_join): Take pid, not process.
315 * target.h (struct target_ops) <join>: Change argument type.
316 (join_inferior): Change argument name.
317 * spu-low.c (spu_join): Take pid, not process.
318 * server.c (handle_detach): Preserve pid before destroying
319 process.
320 * lynx-low.c (lynx_join): Take pid, not process.
321 * linux-low.c (linux_join): Take pid, not process.
322
323 2018-11-23 Alan Hayward <alan.hayward@arm.com>
324
325 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
326 (aarch64_cannot_fetch_register): Likewise.
327 (struct linux_target_ops): Update references.
328
329 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
330
331 * linux-ppc-low.c: Include nat/linux-ptrace.h.
332
333 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
334
335 * configure.srv (ipa_ppc_linux_regobj): Add
336 powerpc-isa207-htm-vsx32l-ipa.o and
337 powerpc-isa207-htm-vsx64l-ipa.o.
338 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
339 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
340 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
341 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
342 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
343 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
344 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
345 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
346 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
347 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
348 (init_registers_powerpc_isa207_htm_vsx32l)
349 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
350 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
351 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
352 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
353 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
354 (ppc_store_tm_ctarregset): New functions.
355 (ppc_regsets): Add entries for HTM regsets.
356 (ppc_arch_setup): Set htm in features struct when needed. Set
357 sizes for the HTM regsets.
358 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
359 (initialize_low_arch): Call
360 init_registers_powerpc_isa207_htm_vsx32l and
361 init_registers_powerpc_isa207_htm_vsx64l.
362 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
363 PPC_TDESC_ISA207_HTM_VSX.
364 (initialize_low_tracepoint): Call
365 init_registers_powerpc_isa207_htm_vsx32l and
366 init_registers_powerpc_isa207_htm_vsx64l.
367
368 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
369
370 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
371 rs6000/power-linux-pmu.xml to srv_xmlfiles.
372 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
373 (ppc_store_pmuregset): New functions.
374 (ppc_regsets): Add entries for ebb and pmu regsets.
375 (ppc_arch_setup): Set isa207 in features struct if the ebb and
376 pmu regsets are available. Set sizes for these regsets.
377
378 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
379
380 * configure.srv (ipa_ppc_linux_regobj): Add
381 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
382 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
383 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
384 rs6000/powerpc-isa207-vsx32l.xml, and
385 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
386 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
387 <PPC_TDESC_ISA207_VSX>: New enum value.
388 (init_registers_powerpc_isa207_vsx32l): Declare.
389 (init_registers_powerpc_isa207_vsx64l): Declare.
390 * linux-ppc-low.c (ppc_fill_tarregset): New function.
391 (ppc_store_tarregset): New function.
392 (ppc_regsets): Add entry for the TAR regset.
393 (ppc_arch_setup): Set isa207 in features struct when needed. Set
394 size for the TAR regsets.
395 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
396 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
397 and init_registers_powerpc_isa207_vsx64l.
398 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
399 (initialize_low_tracepoint): Call
400 init_registers_powerpc_isa207_vsx32l and
401 init_registers_powerpc_isa207_vsx64l.
402
403 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
404 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
405
406 * configure.srv (ipa_ppc_linux_regobj): Add
407 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
408 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
409 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
410 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
411 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
412 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
413 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
414 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
415 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
416 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
417 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
418 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
419 (ppc_hwcap): Add comment.
420 (ppc_hwcap2): New global.
421 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
422 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
423 (ppc_regsets): Add entries for the DSCR and PPR regsets.
424 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
425 when needed. Set sizes for the the DSCR and PPR regsets.
426 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
427 (initialize_low_arch): Call
428 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
429 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
430 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
431 PPC_TDESC_ISA205_PPR_DSCR_VSX.
432 (initialize_low_tracepoint): Call
433 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
434 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
435
436 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
437
438 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
439
440 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
441 Simon Marchi <simark@simark.ca>
442
443 * acinclude.m4: Include "../selftest.m4".
444 * configure: Regenerate.
445 * configure.ac: Use "GDB_AC_SELFTEST".
446 * configure.srv: Use "$enable_unittests" instead of
447 "$development" when checking whether unit tests have been
448 enabled.
449 * server.c (captured_main): Update message informing that
450 selftests have been disabled.
451
452 2018-10-04 Tom Tromey <tom@tromey.com>
453
454 * configure: Rebuild.
455
456 2018-10-04 Tom Tromey <tom@tromey.com>
457
458 * server.c (handle_status): Rename inner "thread".
459 (process_serial_event): Declare "res" in 'm' case.
460 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
461 (iterate_over_lwps): Rename inner "thread".
462 (linux_qxfer_libraries_svr4): Rename inner "len".
463 * gdbthread.h (find_thread_in_random): Rename inner "thread".
464
465 2018-10-01 Gary Benson <gbenson@redhat.com>
466
467 * gdb_proc_service.h: Moved common code to
468 common/gdb_proc_service.h.
469
470 2018-10-01 Gary Benson <gbenson@redhat.com>
471
472 * gdb_proc_service.h: Synchronize comments and whitespace with
473 GDB's version of this file.
474
475 2018-09-25 Tom Tromey <tom@tromey.com>
476
477 * configure: Rebuild.
478 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
479
480 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
481
482 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
483 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
484 ($(IPA_LIB)): Sort IPA_OBJS.
485
486 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
487
488 * Makefile.in: Remove references to $(ADD_DEPS).
489
490 2018-09-16 Tom Tromey <tom@tromey.com>
491
492 * remote-utils.c (remote_open): Use GNU style for metasyntactic
493 variables.
494 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
495 variables.
496
497 2018-09-05 Tom Tromey <tom@tromey.com>
498
499 * configure: Rebuild.
500
501 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
502
503 PR build/23399
504 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
505
506 2018-08-27 Tom Tromey <tom@tromey.com>
507
508 PR build/23087:
509 * configure: Rebuild.
510
511 2018-08-27 Tom Tromey <tom@tromey.com>
512
513 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
514 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
515 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
516 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
517 (s390x_emit_stack_adjust): Add casts to unsigned char.
518
519 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
520
521 PR gdb/23374
522 PR gdb/23375
523 * server.h (struct client_state) <disable_randomization>:
524 Initialize to 1.
525
526 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
527
528 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
529 variable.
530 (mips_supply_ptrace_register): Likewise.
531
532 2018-07-22 Tom Tromey <tom@tromey.com>
533
534 * configure: Rebuild.
535
536 2018-07-22 Tom Tromey <tom@tromey.com>
537
538 * win32-low.c (win32_create_inferior): Remove unused variables.
539 * gdbreplay.c (remote_open): Remove unused variable.
540 * remote-utils.c (remote_prepare): Remove unused variable.
541 * x86-tdesc.h (X86_TDESC_H): Define.
542 (amd64_expedite_regs): Define conditionally.
543 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
544 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
545 * remote-utils.c (readchar): Remove unused variable.
546
547 2018-07-13 Pedro Alves <palves@redhat.com>
548
549 * linux-low.c (linux_kill): Change parameter to process_info
550 pointer instead of pid. Adjust.
551 * lynx-low.c (lynx_kill): Likewise.
552 * nto-low.c (nto_kill): Likewise.
553 * spu-low.c (spu_kill): Likewise.
554 * win32-low.c (win32_kill): Likewise.
555 * server.c (handle_v_kill, kill_inferior_callback)
556 (detach_or_kill_for_exit): Adjust.
557 * target.c (kill_inferior): Change parameter to process_info
558 pointer instead of pid. Adjust.
559 * target.h (struct target_ops) <kill>: Change parameter to
560 process_info pointer instead of pid. Adjust all implementations
561 and callers.
562 (kill_inferior): Likewise.
563
564 2018-07-13 Pedro Alves <palves@redhat.com>
565
566 * linux-low.c (linux_detach, linux_join): Change parameter to
567 process_info pointer instead of pid. Adjust.
568 * lynx-low.c (lynx_detach, lynx_join): Likewise.
569 * nto-low.c (nto_detach): Likewise.
570 * spu-low.c (spu_detach, spu_join): Likewise.
571 * win32-low.c (win32_detach, win32_join): Likewise.
572 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
573 * target.h (struct target_ops) <detach, join>: Change parameter to
574 process_info pointer instead of pid. Adjust all implementations
575 and callers.
576 (detach_inferior, join_inferior): Rename 'pid' parameter to
577 'proc'.
578
579 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
580 Jan Kratochvil <jan.kratochvil@redhat.com>
581 Paul Fertser <fercerpav@gmail.com>
582 Tsutomu Seki <sekiriki@gmail.com>
583
584 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
585 (OBS): Add 'common/netstuff.o'.
586 (GDBREPLAY_OBS): Likewise.
587 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
588 (remote_open): Implement support for IPv6
589 connections.
590 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
591 and 'wspiapi.h'.
592 (handle_accept_event): Accept connections from IPv6 sources.
593 (remote_prepare): Handle IPv6-style hostnames; implement
594 support for IPv6 connections.
595 (remote_open): Implement support for printing connections from
596 IPv6 sources.
597
598 2018-07-11 Pedro Alves <palves@redhat.com>
599
600 PR gdb/23377
601 * mem-break.c (any_persistent_commands): Add process_info
602 parameter and use it instead of relying on the current process.
603 Change return type to bool.
604 * mem-break.h (any_persistent_commands): Add process_info
605 parameter and change return type to bool.
606 * server.c (handle_detach): Remove require_running_or_return call.
607 Look up the process_info for the process we're about to detach.
608 If not found, return back error to GDB. Adjust
609 any_persistent_commands call to pass down a process pointer.
610
611 2018-07-11 Pedro Alves <palves@redhat.com>
612
613 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
614 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
615 instead of collect_register_by_name.
616 * regcache.c (regcache_raw_get_unsigned_by_name): New.
617 * regcache.h (regcache_raw_get_unsigned_by_name): New.
618
619 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
620 Pedro Alves <palves@redhat.com>
621
622 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
623
624 2018-07-03 Tom Tromey <tom@tromey.com>
625
626 * linux-low.c: Update.
627 * lynx-low.c: Update.
628 * mem-break.c: Update.
629 * nto-low.c: Update.
630 * remote-utils.c: Update.
631 * server.c: Update.
632 * spu-low.c: Update.
633 * target.c: Update.
634 * win32-low.c: Update.
635
636 2018-07-03 Tom Tromey <tom@tromey.com>
637
638 * server.c: Update.
639
640 2018-07-03 Tom Tromey <tom@tromey.com>
641
642 * linux-low.c: Update.
643
644 2018-07-03 Tom Tromey <tom@tromey.com>
645
646 * target.c: Update.
647
648 2018-07-03 Tom Tromey <tom@tromey.com>
649
650 * linux-low.c: Update.
651 * linux-mips-low.c: Update.
652 * lynx-low.c: Update.
653 * nto-low.c: Update.
654 * remote-utils.c: Update.
655 * server.c: Update.
656 * spu-low.c: Update.
657 * target.c: Update.
658 * thread-db.c: Update.
659
660 2018-07-03 Tom Tromey <tom@tromey.com>
661
662 * linux-low.c: Update.
663 * linux-mips-low.c: Update.
664 * lynx-low.c: Update.
665 * mem-break.c: Update.
666 * nto-low.c: Update.
667 * remote-utils.c: Update.
668 * server.c: Update.
669 * spu-low.c: Update.
670 * target.c: Update.
671 * tracepoint.c: Update.
672
673 2018-07-03 Tom Tromey <tom@tromey.com>
674
675 * linux-low.c: Update.
676 * linux-ppc-low.c: Update.
677 * linux-x86-low.c: Update.
678 * proc-service.c: Update.
679 * server.c: Update.
680 * spu-low.c: Update.
681 * thread-db.c: Update.
682 * win32-low.c: Update.
683
684 2018-07-03 Tom Tromey <tom@tromey.com>
685
686 * linux-low.c: Update.
687 * lynx-low.c: Update.
688 * nto-low.c: Update.
689 * remote-utils.c: Update.
690 * spu-low.c: Update.
691 * thread-db.c: Update.
692 * win32-low.c: Update.
693
694 2018-06-29 Joel Brobecker <brobecker@adacore.com>
695
696 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
697 parameter in call to 'amd64_create_target_description'.
698
699 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
700
701 * x86-tdesc.h: Remove executable permission flag.
702
703 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
704
705 * configure.ac: Remove AC_PREREQ, add missing quoting.
706 * configure: Re-generate.
707 * config.in: Re-generate.
708 * aclocal.m4: Re-generate.
709
710 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
711
712 * tracepoint.h (current_traceframe): Remove declaration.
713
714 2018-06-18 Alan Hayward <alan.hayward@arm.com>
715
716 * linux-aarch64-low.c (is_sve_tdesc): New function.
717 (aarch64_sve_regs_copy_to_regcache): Likewise.
718 (aarch64_sve_regs_copy_from_regcache): Likewise.
719 (aarch64_regs_info): Add SVE checks.
720 (initialize_low_arch): Initialize SVE.
721
722 2018-06-18 Alan Hayward <alan.hayward@arm.com>
723
724 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
725
726 2018-06-11 Alan Hayward <alan.hayward@arm.com>
727
728 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
729 (initialize_low_tracepoint): Likewise
730 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
731 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
732 param.
733 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
734 checks.
735 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
736
737 2018-06-11 Alan Hayward <alan.hayward@arm.com>
738
739 * server.h (PBUFSIZ): Increase size
740
741 2018-06-11 Alan Hayward <alan.hayward@arm.com>
742
743 * regcache.c (regcache::raw_compare): New function.
744 * regcache.h (regcache::raw_compare): New declaration.
745
746 2018-06-11 Alan Hayward <alan.hayward@arm.com>
747
748 * regcache.c (new_register_cache): Use new.
749 (free_register_cache): Use delete.
750 (register_data): Use const.
751 (supply_register): Move body inside regcache.
752 (regcache::raw_supply): New override function.
753 (collect_register): Move body inside regcache.
754 (regcache::raw_collect): New override function.
755 (regcache::get_register_status): New override function.
756 * regcache.h (struct regcache): Inherit from reg_buffer_common.
757
758 2018-06-09 Tom Tromey <tom@tromey.com>
759
760 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
761 declare queue.
762 (event_queue): Use std::queue.
763 (gdb_event_xfree): Remove.
764 (initialize_event_loop, process_event, wait_for_event): Update.
765
766 2018-06-08 Stan Cox <scox@redhat.com>
767
768 * win32-low.c (win32_create_inferior): last_ptid and last_status
769 moved to client_state.
770
771 2018-06-08 Pedro Alves <palves@redhat.com>
772
773 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
774 common/common-exceptions.o, common/common-utils.o,
775 common/errors.o, common/print-utils.o and utils.o.
776 * gdbreplay.c: Include "common-defs.h" instead of the two
777 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
778 string.h or alloca.h.
779 (perror_with_name): Delete.
780 (remote_open): Use xstrdup instead of strdup.
781 (main): Rename to ...
782 (captured_main): ... this.
783 (main): New.
784
785 2018-06-08 Tom Tromey <tom@tromey.com>
786
787 * linux-low.c (linux_low_read_btrace): Update.
788
789 2018-06-04 Stan Cox <scox@redhat.com>
790
791 * server.h (struct client_state): New.
792 * server.c (cont_thread, general_thread, multi_process)
793 (report_fork_events, report_vfork_events, report_exec_events)
794 (report_thread_events, swbreak_feature, hwbreak_feature)
795 (vCont_supported, disable_randomization, pass_signals)
796 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
797 Moved to client_state.
798 * remote-utils.c (remote_debug, noack_mode)
799 (transport_is_reliable): Moved to client_state.
800 * tracepoint.c (current_traceframe): Moved to client_state.
801
802 Update all callers.
803 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
804 linux-low.c, remote-utils.h, target.c: Use client_state.
805
806 2018-05-31 Alan Hayward <alan.hayward@arm.com>
807
808 * configure.srv: Add new c/h file.
809
810 2018-05-31 Alan Hayward <alan.hayward@arm.com>
811
812 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
813 null VQ.
814
815 2018-05-25 Maciej W. Rozycki <macro@mips.com>
816
817 * gdb.arch/mips-fpregset-core.exp: New test.
818 * gdb.arch/mips-fpregset-core.c: New test source.
819
820 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
821
822 PR server/23198
823 * hostio.c (require_int): Do not report overflow for integers
824 between 0xfffffff and 0x7fffffff.
825
826 2018-05-22 Maciej W. Rozycki <macro@mips.com>
827
828 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
829 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
830 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
831 functions.
832 (the_low_target): Wire them.
833
834 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
835
836 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
837 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
838 mode. Call collect_register_by_name with vscr using
839 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
840 (ppc_store_vrregset): Add and set vscr_offset variable as in
841 ppc_fill_vrregset. Call supply_register_by_name with vscr using
842 vscr_offset.
843
844 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
845
846 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
847 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
848 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
849
850 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
851
852 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
853 (ppc_store_vsxregset): Likewise.
854 (ppc_fill_vrregset): Likewise.
855 (ppc_store_vrregset): Likewise.
856 (ppc_fill_evrregset): Likewise.
857 (ppc_store_evrregset): Likewise.
858 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
859 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
860 needed.
861
862 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
863
864 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
865 wordsize of the inferior. Call ppc_linux_target_wordsize.
866
867 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
868
869 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
870 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
871 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
872 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
873 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
874 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
875 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
876 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
877 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
878 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
879 (tdesc_powerpc_e500l): Remove.
880 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
881 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
882 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
883 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
884 linux-ppc-tdesc.h.
885 (ppc_arch_setup): Remove target description matching code. Fill a
886 ppc_linux_features struct and call ppc_linux_match_description
887 with it.
888
889 2018-05-22 Maciej W. Rozycki <macro@mips.com>
890
891 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
892 width of the requested register exceeds the width of the
893 `ptrace' data type.
894 (mips_cannot_store_register): Likewise.
895
896 2018-05-21 Maciej W. Rozycki <macro@mips.com>
897
898 * linux-mips-low.c (mips_fetch_register): New function. Update
899 preceding comment.
900 (mips_store_gregset): Supply 0 rather than $restart for $zero.
901 (the_low_target): Wire `mips_fetch_register'.
902
903 2018-05-10 Joel Brobecker <brobecker@adacore.com>
904
905 * lynx-i386-low.c (LYNXOS_178): New macro.
906 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
907 the layout on LynxOS-178.
908 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
909 handle floating point registers that are not supported by
910 LynxOS-178.
911
912 2018-05-10 Tom Tromey <tom@tromey.com>
913
914 * configure: Rebuild.
915
916 2018-05-10 Joel Brobecker <brobecker@adacore.com>
917
918 PR server/23158:
919 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
920 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
921 Use it to set the expedite_regs field in the given tdesc.
922 * x86-tdesc.h: New file.
923 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
924 Adjust following the addition of the new expedite_regs parameter
925 to init_target_desc.
926 * linux-tic6x-low.c (tic6x_read_description): Likewise.
927 * linux-x86-tdesc.c: #include "x86-tdesc.h".
928 (i386_linux_read_description, amd64_linux_read_description):
929 Adjust following the addition of the new expedite_regs parameter
930 to init_target_desc.
931 * lynx-i386-low.c: #include "x86-tdesc.h".
932 (lynx_i386_arch_setup): Adjust following the addition of the new
933 expedite_regs parameter to init_target_desc.
934 * nto-x86-low.c: #include "x86-tdesc.h".
935 (nto_x86_arch_setup): Adjust following the addition of the new
936 expedite_regs parameter to init_target_desc.
937 * win32-i386-low.c: #include "x86-tdesc.h".
938 (i386_arch_setup): Adjust following the addition of the new
939 expedite_regs parameter to init_target_desc.
940
941 2018-05-10 Joel Brobecker <brobecker@adacore.com>
942
943 PR server/23158:
944 * win32-low.c (win32_create_inferior): Add call to my_wait
945 setting last_status global.
946
947 2018-05-10 Joel Brobecker <brobecker@adacore.com>
948
949 PR server/23158:
950 * win32-low.c (create_process): Only call gdb_tilde_expand if
951 inferior_cwd is not NULL.
952
953 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
954
955 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
956 registers to the cache if their values have changed.
957 (i387_xsave_to_cache): Provide default values for x87 control
958 registers when these features are available, but disabled.
959 * regcache.c (supply_register_by_name_zeroed): New function.
960 * regcache.h (supply_register_by_name_zeroed): Declare new
961 function.
962
963 2018-05-07 Tom Tromey <tom@tromey.com>
964
965 * configure: Rebuild.
966
967 2018-05-04 Tom Tromey <tom@tromey.com>
968
969 * configure: Rebuild.
970
971 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
972 Pedro Alves <palves@redhat.com>
973
974 * linux-aarch64-low.c (aarch64_stopped_data_address):
975 Likewise.
976
977 2018-04-27 Tom Tromey <tom@tromey.com>
978
979 * configure: Rebuild.
980
981 2018-04-23 Tom Tromey <tom@tromey.com>
982
983 * configure: Rebuild.
984
985 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
986
987 * Makefile.in (depcomp): Add "..".
988 (all_deps_files): New and use it.
989
990 2018-04-18 Alan Hayward <alan.hayward@arm.com>
991
992 * configure.srv (aarch64*-*-linux*): Don't include xml.
993 (i[34567]86-*-cygwin*): Likewise.
994 (i[34567]86-*-linux*): Likewise.
995 (i[34567]86-*-lynxos*): Likewise.
996 (i[34567]86-*-mingw32ce*): Likewise.
997 (i[34567]86-*-mingw*): Likewise.
998 (i[34567]86-*-nto*): Likewise.
999 (tic6x-*-uclinux): Likewise.
1000 (x86_64-*-linux*): Likewise.
1001 (x86_64-*-mingw*): Likewise.
1002 (x86_64-*-cygwin*): Likewise.
1003
1004 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1005
1006 * tdesc.c: Remove xml parameter.
1007
1008 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1009
1010 * server.c (get_features_xml): Remove cast.
1011 * tdesc.c (void target_desc::accept): Fill in function.
1012 (tdesc_get_features_xml): Remove old xml creation.
1013 (print_xml_feature::visit_pre): Add xml vistor.
1014 * tdesc.h (struct target_desc): Make xmltarget mutable.
1015 (tdesc_get_features_xml): Remove declaration.
1016
1017 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1018
1019 * tdesc.c (tdesc_architecture_name): Add new function.
1020 (tdesc_osabi_name): Likewise.
1021 (tdesc_get_features_xml): Use new functions.
1022
1023 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1024
1025 * tdesc.c (tdesc_create_flags): Remove.
1026 (tdesc_add_flag): Likewise.
1027 (tdesc_named_type): Likewise.
1028 (tdesc_create_union): Likewise.
1029 (tdesc_create_struct): Likewise.
1030 (tdesc_create_vector): Likewise.
1031 (tdesc_add_bitfield): Likewise.
1032 (tdesc_add_field): Likewise.
1033 (tdesc_set_struct_size): Likewise.
1034
1035 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1036
1037 * tdesc.c (~target_desc): Remove implictly deleted items.
1038 (init_target_desc): Iterate all features.
1039 (tdesc_get_features_xml): Use vector.
1040 (tdesc_create_feature): Create feature.
1041 * tdesc.h (tdesc_feature) Remove
1042 (target_desc): Add features.
1043
1044 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1045
1046 * Makefile.in: Add common/tdesc.c
1047 * tdesc.c (init_target_desc): init all reg_defs from register
1048 vector.
1049 (tdesc_create_reg): Create tdesc_reg.
1050 * tdesc.h (tdesc_feature): Add register vector.
1051
1052 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1053
1054 * tdesc.h (struct target_desc) <features>: Change type to
1055 std::vector<std::string>.
1056 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1057 changes.
1058 (tdesc_get_features_xml): Likewise.
1059 (tdesc_create_feature): Likewise.
1060
1061 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1062
1063 * regcache.c (find_register_by_number): Return a ref.
1064 (find_regno): Use references.
1065 (register_size): Likewise.
1066 (register_data): Likewise.
1067 * tdesc.c (target_desc::~target_desc): Remove free calls.
1068 (target_desc::operator==): Use std::vector compare.
1069 (init_target_desc): Use reference.
1070 (tdesc_create_reg): Use reg constructors.
1071 * tdesc.h (struct target_desc): Replace pointer with object.
1072
1073 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1074
1075 * regcache.c (find_register_by_number): Make static.
1076 (find_regno): Use find_register_by_number
1077 * regcache.h (struct reg): Remove declaration.
1078
1079 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1080
1081 * tdesc.c (target_desc::~target_desc): Move to here.
1082 (target_desc::operator==): Likewise.
1083 * tdesc.h (target_desc::~target_desc): Move from here.
1084 (target_desc::operator==): Likewise.
1085
1086 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1087
1088 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1089
1090 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1091
1092 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1093 S390_TDESC_GS.
1094 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1095 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1096 and init_registers_s390_gs_linux64.
1097
1098 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1099
1100 * linux-s390-low.c (s390_fill_gs): Remove function.
1101 (s390_fill_gsbc): Remove function.
1102 (s390_regsets): Set fill functions for the guarded storage regsets
1103 to NULL.
1104
1105 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1106
1107 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1108 the word size. Add comment.
1109 (s390_get_wordsize): New function.
1110 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1111 pswm with it. Instead, use s390_get_wordsize to determine the
1112 word size first and derive the correct tdesc from that directly.
1113
1114 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1115
1116 * Makefile.in: Include silent-rules.mk.
1117 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1118 (COMPILE): Add ECHO_CXX.
1119 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1120 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1121 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1122 (version-generated.c): Add ECHO_GEN.
1123 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1124 (IPAGENT_COMPILE): Add ECHO_CXX.
1125 (%-generated.c): Add ECHO_REGDAT.
1126
1127 2018-03-14 Tom Tromey <tom@tromey.com>
1128
1129 PR cli/14977:
1130 * ax.c (ax_printf): Special case for NULL.
1131
1132 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1133
1134 * linux-low.c (linux_qxfer_libraries_svr4): Use
1135 xml_escape_text_append.
1136
1137 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1138
1139 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1140
1141 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1142
1143 * server.c (handle_general_set): Remove unnecessary xstrdup.
1144
1145 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1146
1147 * server.c (parse_debug_format_options): Adjust to
1148 delim_string_to_char_ptr_vec changes.
1149 * thread-db.c (thread_db_load_search): Adjust to
1150 dirnames_to_char_ptr_vec changes.
1151
1152 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1153
1154 * target.h (target_enable_btrace, target_disable_btrace)
1155 (target_read_btrace, target_read_btrace_conf): Turn macro into
1156 inline function. Throw error if target method is not defined.
1157 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1158 check for btrace target method. Be prepared to handle exceptions
1159 from btrace target methods.
1160
1161 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1162
1163 * server.c (captured_main): Change order of error message printed
1164 when the current working directory cannot be found.
1165
1166 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1167
1168 * server.c: Include "filenames.h" and "pathstuff.h".
1169 (program_name): Delete variable.
1170 (program_path): New anonymous class.
1171 (get_exec_wrapper): Use "program_path" instead of
1172 "program_name".
1173 (handle_v_run): Likewise.
1174 (captured_main): Likewise.
1175 (process_serial_event): Likewise.
1176
1177 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1178
1179 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1180 (OBJS): Add "pathstuff.o".
1181 * server.c (current_directory): New global variable.
1182 (captured_main): Initialize "current_directory".
1183
1184 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1185
1186 * tdesc.c: Use common/tdesc.h.
1187 * tdesc.h: Likewise.
1188
1189 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1190 Simon Marchi <simon.marchi@ericsson.com>
1191
1192 * Makefile.in: Switch order of make rules.
1193
1194 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1195
1196 * Makefile.in: Add common directory in build.
1197 * configure.ac: Add common reference.
1198 * configure: Regenerate.
1199
1200 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1201
1202 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1203 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1204 * spu-low.c (spu_target_ops): Likewise.
1205 * win32-low.c (win32_target_ops): Likewise.
1206 * server.c (supported_btrace_packets): Report packets unconditionally.
1207 * target.h (target_ops) <supports_btrace>: Remove.
1208 (target_supports_btrace): Remove.
1209
1210 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1211
1212 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1213 (handle_btrace_disable): Change return type to void. Use exceptions
1214 to report errors.
1215 (handle_btrace_general_set): Catch exception and copy message to
1216 return message.
1217
1218 2018-02-08 Tom Tromey <tom@tromey.com>
1219
1220 * linux-low.c (install_software_single_step_breakpoints): Use
1221 make_scoped_restore.
1222 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1223 (do_restore_current_thread_cleanup): Remove.
1224 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1225 declare.
1226
1227 2018-02-08 Tom Tromey <tom@tromey.com>
1228
1229 * mem-break.c (set_raw_breakpoint_at): Use
1230 gdb::unique_xmalloc_ptr.
1231
1232 2018-01-30 Pedro Alves <palves@redhat.com>
1233
1234 PR gdb/13211
1235 * target.c (target_terminal::terminal_state): Rename to ...
1236 (target_terminal::m_terminal_state): ... this.
1237
1238 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1239
1240 * linux-low.c (handle_extended_wait): Surround call to
1241 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1242
1243 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1244
1245 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1246 linux_ptrace_attach_fail_reason_string now returning an
1247 std::string.
1248 (linux_attach): Likewise.
1249 * thread-db.c (attach_thread): Likewise.
1250
1251 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1252
1253 PR gdb/21559
1254 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1255 checking for fs_base/gs_base fields in struct user_regs_struct.
1256 * configure: Regenerate.
1257
1258 2018-01-16 Yao Qi <yao.qi@linaro.org>
1259
1260 PR gdb/18749
1261 * linux-low.c (fetch_register): Call supply_register instead of
1262 error.
1263
1264 2018-01-08 Yao Qi <yao.qi@linaro.org>
1265 Simon Marchi <simon.marchi@ericsson.com>
1266
1267 * Makefile.in (OBS): Remove selftest.o.
1268 * configure.ac: Set srv_selftest_objs if $development is true.
1269 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1270 * configure: Re-generated.
1271 * server.c (captured_main): Wrap variable selftest_filter with
1272 GDB_SELF_TEST.
1273
1274 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1275
1276 * server.c (parse_debug_format_options): Return std::string.
1277 (handle_monitor_command, captured_main): Adjust.
1278
1279 2018-01-05 Pedro Alves <palves@redhat.com>
1280
1281 PR gdb/18653
1282 * server.c (captured_main): Pass quiet=false to
1283 save_original_signals_state.
1284
1285 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1286
1287 * gdbreplay.c (gdbreplay_version): Update copyright year in
1288 version message.
1289 * server.c (gdbserver_version): Likewise.
1290
1291 2017-12-08 Tom Tromey <tom@tromey.com>
1292
1293 * ax.c (ax_printf): Update.
1294
1295 2017-12-07 Yao Qi <yao.qi@linaro.org>
1296
1297 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1298 aarch64_linux_read_description.
1299 * linux-amd64-ipa.c (idx2mask): New array.
1300 (get_ipa_tdesc): Move idx2mask out.
1301 (initialize_low_tracepoint): Initialize target descriptions.
1302 * linux-i386-ipa.c (idx2mask): New array.
1303 (get_ipa_tdesc): Move idx2mask out.
1304 (initialize_low_tracepoint): Initialize target descriptions.
1305
1306 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1307
1308 * tdesc.c (struct tdesc_type): Change return type.
1309 (tdesc_add_flag): Change parameter type.
1310 (tdesc_add_bitfield): Likewise.
1311 (tdesc_add_field): Likewise.
1312 (tdesc_set_struct_size): Likewise.
1313
1314 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1315
1316 * regcache.c (registers_to_string): Remove unused variable.
1317
1318 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1319
1320 * inferiors.c (for_each_inferior_with_data): Remove.
1321 * inferiors.h (for_each_inferior_with_data): Remove.
1322 * server.c (handle_qxfer_threads_worker): Change parameter type.
1323 (handle_qxfer_threads_proper): Use for_each_thread.
1324
1325 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1326
1327 * inferiors.c (for_each_inferior): Remove.
1328 (clear_inferiors): Use for_each_thread.
1329 * inferiors.h (for_each_inferior): Remove.
1330 * linux-low.c (linux_wait_for_event_filtered): Use
1331 for_each_thread.
1332 (linux_stabilize_threads): Likewise.
1333 * regcache.c (regcache_release): Likewise.
1334 * server.c (gdb_wants_all_threads_stopped): Likewise.
1335 (clear_pending_status_callback): Remove.
1336 (handle_status): Use for_each_thread.
1337 (captured_main): Likewise.
1338 * win32-low.c (child_init_thread_list): Likewise.
1339 (win32_clear_inferiors): Likewise.
1340 (fake_breakpoint_event): Likewise.
1341
1342 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1343
1344 * inferiors.h (find_inferior): Remove.
1345 * inferiors.c (find_inferior): Remove.
1346
1347 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1348
1349 * linux-low.c (resume_status_pending_p): Update comment.
1350 (need_step_over_p): Update comment.
1351
1352 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1353
1354 * linux-low.c (proceed_one_lwp): Return void, change parameter
1355 type.
1356 (unsuspend_and_proceed_one_lwp): Likewise.
1357 (proceed_all_lwps): Use for_each_thread.
1358 (unstop_all_lwps): Likewise.
1359
1360 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1361
1362 * linux-low.c (linux_resume_one_thread): Return void, take
1363 parameter directly.
1364 (linux_resume): Use for_each_thread.
1365
1366 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1367
1368 * linux-low.c (send_sigstop_callback): Return void, change
1369 parameter type. Rename to...
1370 (send_sigstop): ... this.
1371 (suspend_and_send_sigstop_callback): Return void, change parameter
1372 type. Rename to...
1373 (suspend_and_send_sigstop): ... this.
1374 (stop_all_lwps): Use for_each_thread.
1375
1376 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1377
1378 * linux-low.c (lwp_running): Return bool, remove unused
1379 argument.
1380 (linux_stabilize_threads): Use find_thread.
1381
1382 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1383
1384 * linux-low.c (select_singlestep_lwp_callback): Remove.
1385 (count_events_callback): Remove.
1386 (select_event_lwp_callback): Remove.
1387 (select_event_lwp): Use find_thread/for_each_thread.
1388
1389 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1390
1391 * linux-low.c (not_stopped_callback): Return bool, take filter
1392 argument directly.
1393 (linux_wait_for_event_filtered): Use find_thread.
1394 (linux_wait_1): Likewise.
1395
1396 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1397
1398 * linux-low.c (same_lwp): Remove.
1399 (find_lwp_pid): Use find_thread.
1400
1401 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1402
1403 * linux-low.c (delete_lwp_callback): Remove.
1404 (linux_mourn): Use for_each_thread.
1405
1406 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1407
1408 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1409 args parameter, don't check for pid.
1410 (linux_detach): Use for_each_thread.
1411
1412 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1413
1414 * linux-low.c (struct counter): Remove.
1415 (second_thread_of_pid_p): Remove.
1416 (last_thread_of_process_p): Use find_thread.
1417
1418 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1419
1420 * inferiors.c (find_inferior_in_random): Remove.
1421 * inferiors.h (find_inferior_in_random): Remove.
1422 * linux-low.c (status_pending_p_callback): Return bool, accept
1423 parameter ptid directly.
1424 (linux_wait_for_event_filtered): Use find_thread_in_random.
1425 (linux_wait_1): Likewise.
1426
1427 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1428
1429 * inferiors.c (find_inferior_id): Remove.
1430 (find_thread_ptid): Move implemention from find_inferior_id to
1431 here.
1432 * inferiors.h (find_inferior_id): Remove.
1433 * server.c (handle_status): Use find_thread_ptid.
1434 (process_serial_event): Likewise.
1435 * thread-db.c (find_one_thread): Likewise.
1436 (thread_db_thread_handle): Likewise.
1437 * win32-low.c (thread_rec): Likewise.
1438 (child_delete_thread): Likewise.
1439 (win32_thread_alive): Likewise.
1440 (get_child_debug_event): Likewise.
1441
1442 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1443
1444 * linux-mips-low.c (update_watch_registers_callback): Return
1445 void, remove pid_p parameter, don't check for pid.
1446 (mips_insert_point, mips_remove_point): Use for_each_thread.
1447
1448 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1449
1450 * lynx.low (lynx_delete_thread_callback): Remove.
1451 (lynx_mourn): Use for_each_thread.
1452
1453 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1454
1455 * regcache.c (regcache_invalidate_one): Remove.
1456 (regcache_invalidate_pid): use for_each_thread.
1457
1458 2017-11-26 Tom Tromey <tom@tromey.com>
1459
1460 * linux-low.c (linux_create_inferior): Update.
1461
1462 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1463
1464 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1465
1466 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1467
1468 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1469 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1470 * linux-aarch64-tdesc-selftest.c: New file.
1471 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1472
1473 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1474
1475 * configure.srv: Add new file.
1476 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1477 * linux-aarch64-tdesc-selftest.c: New file.
1478 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1479
1480 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1481
1482 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1483 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1484 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1485
1486 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1487
1488 * configure.srv: Add new files.
1489 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1490 aarch64_linux_read_description.
1491 * linux-aarch64-low.c (aarch64_linux_read_description):
1492 Merge with aarch64_arch_setup.
1493 (aarch64_arch_setup): Call aarch64_linux_read_description.
1494 * linux-aarch64-tdesc.c: New file.
1495 * linux-aarch64-tdesc.h: New file.
1496
1497 2017-11-24 Yao Qi <yao.qi@linaro.org>
1498
1499 * configure.srv: Set $srv_regobj for tic6x-linux.
1500 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1501 (tic6x_read_description): Move some code to tic6x_arch_setup.
1502 (tic6x_tdesc_test): New function.
1503 (initialize_low_arch): Call selftests::register_test.
1504
1505 2017-11-22 Yao Qi <yao.qi@linaro.org>
1506
1507 * remote-utils.c (prepare_resume_reply): Use memcpy.
1508
1509 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1510
1511 * linux-low.c (kill_one_lwp_callback): Return void, take
1512 argument directly, don't filter on pid.
1513 (linux_kill): Use for_each_thread.
1514
1515 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1516
1517 * linux-low.c (need_step_over_p): Return bool, remove dummy
1518 argument.
1519 (linux_resume, proceed_all_lwps): Use find_thread.
1520
1521 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1522
1523 * linux-low.c (resume_status_pending_p): Return bool, remove
1524 flag_p argument.
1525 (linux_resume): Use find_thread.
1526
1527 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1528
1529 * linux-low.c (struct thread_resume_array): Remove.
1530 (linux_set_resume_request): Return void, take arguments
1531 directly.
1532 (linux_resume): Use for_each_thread.
1533
1534 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1535
1536 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1537 return bool, remove data argument.
1538 (linux_stabilize_threads): Use find_thread.
1539
1540 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1541
1542 * linux-low.c (unsuspend_one_lwp): Remove.
1543 (unsuspend_all_lwps): Use for_each_thread, inline code from
1544 unsuspend_one_lwp.
1545
1546 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1547
1548 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1549 * linux-low.c (struct iterate_over_lwps_args): Remove.
1550 (iterate_over_lwps_filter): Remove.
1551 (iterate_over_lwps): Use find_thread.
1552
1553 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1554
1555 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1556 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1557 code from reset_lwp_ptrace_options_callback.
1558
1559 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1560
1561 * linux-arm-low.c (struct update_registers_data): Remove.
1562 (update_registers_callback): Return void, take arguments
1563 directly, don't check thread's pid.
1564 (arm_insert_point, arm_remove_point): Use for_each_thread.
1565
1566 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1567
1568 * win32-low.c (continue_one_thread): Return void, take argument
1569 directly.
1570 (child_continue): Use for_each_thread.
1571
1572 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1573
1574 * win32-i386-low.c (update_debug_registers_callback): Rename
1575 to ...
1576 (update_debug_registers): ... this, return void, remove pid_p arg.
1577 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1578
1579 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1580
1581 * inferiors.h (struct process_info): Add constructor, initialize
1582 fields..
1583 <syscalls_to_catch>: Change type to std::vector<int>.
1584 * inferiors.c (add_process): Allocate process_info with new.
1585 (remove_process): Free process_info with delete.
1586 * linux-low.c (handle_extended_wait): Adjust.
1587 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1588 * server.c (handle_general_set): Adjust.
1589
1590 2017-11-16 Pedro Alves <palves@redhat.com>
1591
1592 * remote-utils.c (remote_close): Block SIGIO signals instead of
1593 uninstalling the SIGIO handler.
1594
1595 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1596
1597 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1598
1599 2017-11-16 Yao Qi <yao.qi@linaro.org>
1600
1601 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1602 (tic6x_store_gregset): Likewise.
1603 (tic6x_usrregs_info): Move it up.
1604
1605 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1606
1607 * Makefile.in: Update arch rules.
1608 * configure.srv: Explicitly mark arch/ files.
1609
1610 2017-11-13 Andreas Schwab <schwab@suse.de>
1611
1612 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1613 function.
1614 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1615
1616 2017-11-06 Pedro Alves <palves@redhat.com>
1617
1618 * config.in, configure: Regenerate.
1619
1620 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1621
1622 * target.c (struct thread_search): Remove.
1623 (thread_search_callback): Remove.
1624 (prepare_to_access_memory): Use for_each_thread instead of
1625 find_inferior. Inline code from thread_search_callback.
1626
1627 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1628
1629 * server.c (struct visit_actioned_threads_data): Remove.
1630 (visit_actioned_threads): Change prototype to take arguments
1631 directly.
1632 (resume): Use find_thread instead of find_inferior.
1633
1634 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1635
1636 * server.c (queue_stop_reply_callback): Change prototype, return
1637 void.
1638 (find_status_pending_thread_callback): Remove.
1639 (handle_status): Replace find_inferior with find_thread and
1640 for_each_thread.
1641
1642 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1643
1644 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1645 with REGNO.
1646 (aarch64_store_gregset): Likewise.
1647 (aarch64_fill_fpregset): Likewise.
1648 (aarch64_store_fpregset): Likewise.
1649
1650 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1651
1652 * gdbthread.h (find_thread, for_each_thread): New functions.
1653 * inferiors.c (thread_of_pid): Remove.
1654 (find_any_thread_of_pid): Use find_thread.
1655 * linux-low.c (num_lwps): Use for_each_thread.
1656
1657 2017-10-17 Yao Qi <yao.qi@linaro.org>
1658
1659 * Makefile.in: Remove one rule.
1660 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1661
1662 2017-10-17 Yao Qi <yao.qi@linaro.org>
1663
1664 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1665 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1666
1667 2017-10-17 Yao Qi <yao.qi@linaro.org>
1668
1669 * configure.srv: Rename arm.o with arch/arm.o.
1670
1671 2017-10-17 Yao Qi <yao.qi@linaro.org>
1672
1673 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1674 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1675 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1676 (arch-i386.o, arch-amd64.o): Remove rules.
1677 (arch/%.o): New rule.
1678 Update POSTCOMPILE and COMPILE.pre.
1679 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1680 * configure: Re-generated.
1681 * configure.srv: Replace arch-i386.o with arch/i386.o.
1682 Replace arch-amd64.o with arch/amd64.o.
1683
1684 2017-10-16 Yao Qi <yao.qi@linaro.org>
1685
1686 * configure: Regenerated.
1687
1688 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1689
1690 * inferiors.h: (struct inferior_list): Remove.
1691 (struct inferior_list_entry); Remove.
1692 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1693 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1694 get_first_inferior): Remove.
1695 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1696 find_inferior_id, find_inferior_in_random): Change signature.
1697 * inferiors.c (all_threads): Change type to
1698 std::list<thread_info *>.
1699 (get_thread): Remove macro.
1700 (find_inferior, find_inferior_id): Change signature, implement
1701 using find_thread.
1702 (find_inferior_in_random): Change signature, implement using
1703 find_thread_in_random.
1704 (for_each_inferior, for_each_inferior_with_data): Change
1705 signature, implement using for_each_thread.
1706 (add_inferior_to_list, remove_inferior): Remove.
1707 (add_thread, get_first_thread, thread_of_pid,
1708 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1709 (get_first_inferior, one_inferior_p, clear_inferior_list):
1710 Remove.
1711 (clear_inferiors, get_thread_process): Update.
1712 * gdbthread.h: Include <list>.
1713 (struct thread_info) <entry>: Remove field.
1714 <id>: New field.
1715 (all_threads): Change type to std::list<thread_info *>.
1716 (get_first_inferior): Add doc.
1717 (find_thread, for_each_thread, find_thread_in_random): New
1718 functions.
1719 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1720 * linux-arm-low.c (update_registers_callback): Update.
1721 * linux-low.c (second_thread_of_pid_p): Update.
1722 (kill_one_lwp_callback, linux_detach_lwp_callback,
1723 delete_lwp_callback, status_pending_p_callback, same_lwp,
1724 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1725 iterate_over_lwps, not_stopped_callback,
1726 resume_stopped_resumed_lwps, count_events_callback,
1727 select_singlestep_lwp_callback, select_event_lwp_callback,
1728 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1729 suspend_and_send_sigstop_callback, wait_for_sigstop,
1730 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1731 lwp_running, linux_set_resume_request, resume_status_pending_p,
1732 need_step_over_p, start_step_over, linux_resume_one_thread,
1733 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1734 reset_lwp_ptrace_options_callback): Update.
1735 * linux-mips-low.c (update_watch_registers_callback): Update.
1736 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1737 Update.
1738 (free_register_cache_thread_one): Remove.
1739 (regcache_release): Update.
1740 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1741 handle_qxfer_threads_worker): Update.
1742 (handle_query): Update, use list iterator.
1743 (visit_actioned_threads, handle_pending_status,
1744 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1745 clear_pending_status_callback, set_pending_status_callback,
1746 find_status_pending_thread_callback, handle_status,
1747 process_serial_event): Update.
1748 * target.c (thread_search_callback): Update.
1749 * thread-db.c (thread_db_get_tls_address): Update.
1750 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1751 Update.
1752 * win32-i386-low.c (update_debug_registers_callback): Update.
1753 * win32-low.c (delete_thread_info, child_delete_thread,
1754 continue_one_thread, suspend_one_thread,
1755 get_child_debug_event): Adjust.
1756
1757 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1758
1759 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1760 * inferiors.h: Include <list>.
1761 (struct process_info) <entry>: Remove field.
1762 <pid>: New field.
1763 (pid_of): Change macro to function.
1764 (ptid_of, lwpid_of): Remove macro.
1765 (all_processes): Change type to std::list<process_info *>.
1766 (ALL_PROCESSES): Remove macro.
1767 (for_each_process, find_process): New function.
1768 * inferiors.c (all_processes): Change type to
1769 std::list<process_info *>.
1770 (find_thread_process): Adjust.
1771 (add_process): Likewise.
1772 (remove_process): Likewise.
1773 (find_process_pid): Likewise.
1774 (get_first_process): Likewise.
1775 (started_inferior_callback): Remove.
1776 (have_started_inferiors_p): Adjust.
1777 (attached_inferior_callback): Remove.
1778 (have_attached_inferiors_p): Adjust.
1779 * linux-low.c (check_zombie_leaders): Likewise.
1780 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1781 (x86_linux_update_xmltarget): Adjust.
1782 * server.c (handle_query): Likewise.
1783 (gdb_reattached_process): Remove.
1784 (handle_status): Adjust.
1785 (kill_inferior_callback): Likewise.
1786 (detach_or_kill_inferior): Remove.
1787 (print_started_pid): Likewise.
1788 (print_attached_pid): Likewise.
1789 (detach_or_kill_for_exit): Update.
1790 (process_serial_event): Likewise.
1791 * linux-arm-low.c (arm_new_fork): Likewise.
1792
1793 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1794
1795 * dll.h: Include <list>.
1796 (struct dll_info): Add constructor.
1797 <entry>: Remove field.
1798 (all_dlls): Change type to std::list<dll_info>.
1799 * dll.c: Include <algorithm>.
1800 (get_dll): Remove macro.
1801 (all_dlls): Change type to std::list<dll_info *>.
1802 (free_one_dll): Remove.
1803 (match_dll): Likewise.
1804 (loaded_dll): Adjust.
1805 (unloaded_dll): Adjust to all_dlls type change, use
1806 std::find_if. Inline code from match_dll.
1807 (clear_dlls): Adjust to all_dlls type change.
1808 * server.c (emit_dll_description): Remove.
1809 (handle_qxfer_libraries): Adjust to all_dlls type change,
1810 integrate emit_dll_description's functionality.
1811
1812 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1813
1814 * linux-low.h (struct linux_target_ops) <delete_process>: New
1815 field.
1816 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1817 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1818 (struct linux_target_ops): Add delete_process callback.
1819 * linux-arm-low.c (arm_delete_process): New.
1820 (struct linux_target_ops): Add delete_process callback.
1821 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1822 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1823 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1824 * linux-mips-low.c (mips_linux_delete_process): New.
1825 (struct linux_target_ops): Add delete_process callback.
1826 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1827 * linux-s390-low.c (struct linux_target_ops): Likewise.
1828 * linux-sh-low.c (struct linux_target_ops): Likewise.
1829 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1830 * linux-tile-low.c (struct linux_target_ops): Likewise.
1831 * linux-x86-low.c (x86_linux_delete_process): New.
1832 (struct linux_target_ops): Add delete_process callback.
1833 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1834
1835 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1836
1837 * linux-aarch64-low.c (the_low_target): Add thread delete
1838 callback.
1839 * linux-arm-low.c (arm_delete_thread): New function.
1840 (the_low_target): Add thread delete callback.
1841 * linux-bfin-low.c (the_low_target): Likewise.
1842 * linux-crisv32-low.c (the_low_target): Likewise.
1843 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1844 set.
1845 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1846 field.
1847 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1848 * linux-mips-low.c (mips_linux_delete_thread): New function.
1849 (the_low_target): Add thread delete callback.
1850 * linux-ppc-low.c (the_low_target): Likewise.
1851 * linux-s390-low.c (the_low_target): Likewise.
1852 * linux-sh-low.c (the_low_target): Likewise.
1853 * linux-tic6x-low.c (the_low_target): Likewise.
1854 * linux-tile-low.c (the_low_target): Likewise.
1855 * linux-x86-low.c (the_low_target): Likewise.
1856 * linux-xtensa-low.c (the_low_target): Likewise.
1857
1858 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1859
1860 * win32-low.c: Include "common-inferior.h".
1861
1862 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1863
1864 * inferiors.c (set_inferior_cwd): New function.
1865 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1866 (handle_query): Inform that QSetWorkingDir is supported.
1867 * win32-low.c (create_process): Pass the inferior's cwd to
1868 CreateProcess.
1869
1870 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1871
1872 * inferiors.c (current_inferior_cwd): New global variable.
1873 (get_inferior_cwd): New function.
1874 * inferiors.h (struct process_info) <cwd>: New field.
1875
1876 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1877
1878 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1879 (OBS): Add gdb_tilde_expand.o.
1880
1881 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1882
1883 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1884 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1885
1886 2017-09-29 Pedro Alves <palves@redhat.com>
1887
1888 * ax.c (gdb_parse_agent_expr): Constify.
1889 * ax.h (gdb_parse_agent_expr): Constify.
1890 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1891 Constify.
1892 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1893 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1894 * remote-utils.h (read_ptid): Constify.
1895 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1896 (process_point_options, process_serial_event): Constify.
1897 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1898 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1899 (cmd_qtbuffer): Constify.
1900
1901 2017-09-29 Pedro Alves <palves@redhat.com>
1902
1903 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1904 fails.
1905
1906 2017-09-29 Pedro Alves <palves@redhat.com>
1907
1908 * linux-low.c (handle_extended_wait): Pass parent thread instead
1909 of process to thread_db_notice_clone.
1910 * linux-low.h (thread_db_notice_clone): Replace parent process
1911 parameter with parent thread parameter.
1912 * thread-db.c (find_one_thread): Add comment.
1913 (thread_db_notice_clone): Replace parent process parameter with
1914 parent thread parameter. Temporarily switch to the parent thread.
1915
1916 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1917
1918 * gdbthread.h: Include "common-gdbthread.h".
1919 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1920 "if" when validating the ptid.
1921 * remote-utils.c: Include "gdbthread.h".
1922 (prepare_resume_reply): Use "switch_to_thread".
1923 * target.c (done_accessing_memory): Likewise.
1924
1925 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1926
1927 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1928 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1929 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1930 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1931 s390x-gs-linux64-ipa.o to ipa_obj.
1932 * linux-s390-low.c (HWCAP_S390_GS): New define.
1933 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1934 New functions.
1935 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1936 (s390_arch_setup): Check for guarded-storage support and choose
1937 appropriate tdesc.
1938 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1939 init_registers_s390x_gs_linux64.
1940 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1941 enum value.
1942 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1943 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1944
1945 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1946
1947 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1948
1949 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1950
1951 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1952 (thread_db_thread_handle): Declare.
1953 * linux-low.c (linux_target_ops): Initialize thread_handle.
1954 * server.c (handle_qxfer_threads_worker): Add support for
1955 "handle" attribute.
1956 * target.h (struct target_ops): Add new function pointer,
1957 thread_handle.
1958 (target_thread_handle): Define.
1959 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1960 field in lwp.
1961 (thread_db_thread_handle): New function.
1962
1963 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1964
1965 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1966 * linux-low.h (thread_db_notice_clone): Declare.
1967 * thread-db.c (thread_db_notice_clone): New function.
1968
1969 2017-09-21 Pedro Alves <palves@redhat.com>
1970
1971 * server.c (gdb_read_memory, handle_status, process_serial_event)
1972 (handle_serial_event, handle_target_event): Adjust to
1973 set_desired_thread prototype change.
1974 * target.c (set_desired_thread): Remove 'use_general' parameter
1975 and adjust.
1976 * target.h (set_desired_thread): Remove 'use_general' parameter.
1977
1978 2017-09-20 Tom Tromey <tom@tromey.com>
1979
1980 * target.c (target_terminal::terminal_state): Define.
1981 (target_terminal::init): Rename from target_terminal_init.
1982 (target_terminal::inferior): Rename from
1983 target_terminal_inferior.
1984 (target_terminal::ours): Rename from target_terminal_ours.
1985 (target_terminal::ours_for_output, target_terminal::info): New.
1986
1987 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1988
1989 * server.c (accumulate_file_name_length): Remove.
1990 (emit_dll_description): Adjust to std::string change.
1991 (handle_qxfer_libraries): Use std::string to hold document.
1992
1993 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1994
1995 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1996 return type of xml_escape_text.
1997 * server.c (emit_dll_description): Likewise.
1998
1999 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2000
2001 * server.c (captured_main): Accept argument for --selftest.
2002 Update run_tests call.
2003 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2004 when registering selftests.
2005
2006 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2007
2008 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2009 instead of "VEC" for "target_desc.reg_defs".
2010 (regcache_cpy): Likewise.
2011 (registers_to_string): Likewise.
2012 (registers_from_string): Likewise.
2013 (find_regno): Likewise.
2014 (supply_regblock): Likewise.
2015 (regcache_raw_read_unsigned): Likewise.
2016 * tdesc.c (init_target_desc): Likewise.
2017 (tdesc_create_reg): Likewise.
2018 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2019 (struct target_desc) <reg_defs>: Convert to "std::vector".
2020 (target_desc): Do not initialize "reg_defs".
2021 (~target_desc): Update code to use "std::vector" instead of "VEC"
2022 for "target_desc.reg_defs".
2023 (operator==): Likewise.
2024
2025 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2026
2027 * inferiors.h (thread_to_gdb_id): Remove.
2028 * inferiors.c (thread_to_gdb_id): Remove.
2029 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2030 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2031 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2032 Likewise.
2033 * nto-low.c (nto_fetch_registers, nto_store_registers,
2034 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2035
2036 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2037
2038 * inferiors.h (gdb_id_to_thread_id): Remove.
2039 * inferiors.c (gdb_id_to_thread_id): Remove.
2040 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2041 removal. Move pid declaration closer to where it's used.
2042
2043 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2044
2045 * server.c (handle_detach): New function.
2046 (process_serial_event): Move code out, call handle_detach.
2047
2048 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2049
2050 * server.c (require_running): Rename to ...
2051 (require_running_or_return): ... this ...
2052 (require_running_or_break): ... and this.
2053 (handle_query, process_serial_event): Adjust.
2054
2055 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2056
2057 * linux-low.c (linux_set_resume_request): Remove unused
2058 variables.
2059
2060 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2061
2062 * server.c (first_thread_of): Remove.
2063 (process_serial_event): Replace usage of first_thread_of with
2064 find_any_thread_of_pid.
2065 * tracepoint.c (same_process_p): Remove.
2066 (gdb_agent_about_to_close): Replace usage of same_process_p with
2067 find_any_thread_of_pid.
2068 * linux-x86-low.c (same_process_callback): Remove.
2069 (x86_arch_setup_process_callback): Replace usage of
2070 same_process_callback with find_any_thread_of_pid.
2071 * thread-db.c (any_thread_of): Remove.
2072 (switch_to_process): Replace usage of any_thread_of with
2073 find_any_thread_of_pid.
2074 * inferiors.c (thread_pid_matches_callback): Remove.
2075 (find_thread_process): Adjust to use find_any_thread_of_pid.
2076
2077 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2078
2079 * regcache.c (get_thread_regcache): Guard calls to "memset"
2080 with "!VEC_empty".
2081
2082 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2083
2084 * linux-low.c (handle_extended_wait): Use
2085 "allocate_target_description" instead of "XNEW".
2086 * linux-x86-low.c (initialize_low_arch): Likewise.
2087
2088 2017-09-05 Yao Qi <yao.qi@linaro.org>
2089
2090 * configure.srv (srv_i386_regobj): Remove.
2091 (srv_amd64_regobj): Remove.
2092 (srv_regobj): Set it to "" for x86 non-linux targets.
2093 * linux-x86-tdesc.c (i386_linux_read_description):
2094 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2095 (init_registers_i386): Remove the declaration.
2096 (tdesc_i386): Remove the declaration.
2097 (lynx_i386_arch_setup): Call i386_create_target_description.
2098 * nto-x86-low.c: Likewise.
2099 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2100 [!__x86_64__]: include arch/i386.h.
2101 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2102
2103 2017-09-05 Yao Qi <yao.qi@linaro.org>
2104
2105 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2106 i386/amd64-XXX-linux from it.
2107
2108 2017-09-05 Yao Qi <yao.qi@linaro.org>
2109
2110 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2111 false.
2112 (ipa_amd64_linux_regobj): Remove.
2113 (ipa_x32_linux_regobj): Remove.
2114
2115 2017-09-05 Yao Qi <yao.qi@linaro.org>
2116
2117 * Makefile.in (arch-amd64.o): New rule.
2118 * configure.srv: Append arch-amd64.o.
2119 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2120 (get_ipa_tdesc): Call amd64_linux_read_description.
2121 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2122 and init_registers_amd64_XXX.
2123 * linux-x86-low.c (x86_linux_read_description): Call
2124 amd64_linux_read_description.
2125 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2126 (initialize_low_arch): Don't call init_registers_x32_XXX and
2127 init_registers_amd64_XXX.
2128 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2129 and tdesc_amd64_XXX.
2130 [__x86_64__] (amd64_tdesc_test): New function.
2131 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2132 and init_registers_amd64_XXX.
2133 * linux-x86-tdesc.c: Include arch/amd64.h.
2134 (xcr0_to_tdesc_idx): New function.
2135 (i386_linux_read_description): New function.
2136 (amd64_get_ipa_tdesc_idx): New function.
2137 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2138 (amd64_get_ipa_tdesc): Declare.
2139
2140 2017-09-05 Yao Qi <yao.qi@linaro.org>
2141
2142 * configure.srv (srv_i386_linux_xmlfiles): Remove
2143 i386/i386-XXX-linux.xml from it.
2144
2145 2017-09-05 Yao Qi <yao.qi@linaro.org>
2146
2147 * configure.srv: Set srv_i386_linux_regobj empty if $development
2148 is false.
2149 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2150 initialize_low_tdesc.
2151 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2152 with #if initialize_low_tdesc.
2153 * linux-x86-tdesc-selftest.c: New file.
2154 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2155
2156 2017-09-05 Yao Qi <yao.qi@linaro.org>
2157
2158 * Makefile.in (arch-i386.o): New rule.
2159 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2160 (x86_64-*-linux*): Likewise.
2161 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2162 include arch/i386.h.
2163 (i386_linux_read_description): Remove code and call
2164 i386_create_target_description.
2165 * tdesc.c (allocate_target_description): New function.
2166 * tdesc.h (set_tdesc_architecture): Remove declaration.
2167 (set_tdesc_osabi): Likewise.
2168
2169 2017-09-05 Yao Qi <yao.qi@linaro.org>
2170
2171 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2172 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2173 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2174 .xmltarget.
2175 * server.c (get_features_xml): Call tdesc_get_features_xml.
2176 * tdesc.c (set_tdesc_architecture): New function.
2177 (set_tdesc_osabi): New function.
2178 (tdesc_get_features_xml): New function.
2179 (tdesc_create_feature): Add an argument.
2180 * tdesc.h (struct target_desc) <features>: New field.
2181 <arch, osabi>: New field.
2182 (~target_desc): xfree features, arch, and osabi.
2183 (target_desc::oerator==): Don't compare .xmltarget.
2184 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2185 (set_tdesc_osabi): Likewise.
2186 (tdesc_get_features_xml): Likewise.
2187
2188 2017-09-05 Yao Qi <yao.qi@linaro.org>
2189
2190 * linux-x86-tdesc.c: Include selftest.h.
2191 (i386_tdesc_test): New function.
2192 (initialize_low_tdesc): Call selftests::register_test.
2193 * tdesc.h: Include regdef.h.
2194 (target_desc): Override operator == and !=.
2195
2196 2017-09-05 Yao Qi <yao.qi@linaro.org>
2197
2198 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2199 (ipa_obj): Likewise.
2200 * linux-i386-ipa.c: Include common/x86-xstate.h
2201 (get_ipa_tdesc): Call i386_linux_read_description.
2202 (initialize_low_tracepoint): Don't call init_registers_XXX
2203 functions, call initialize_low_tdesc instead.
2204 * linux-x86-low.c (x86_linux_read_description): Call
2205 i386_linux_read_description.
2206 (initialize_low_arch): Don't call init_registers_i386_XXX
2207 functions, call initialize_low_tdesc.
2208 * linux-x86-tdesc.c: New file.
2209 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2210 (i386_get_ipa_tdesc_idx): Declare.
2211 (i386_get_ipa_tdesc): Declare.
2212 (initialize_low_tdesc): Declare.
2213
2214 2017-09-05 Yao Qi <yao.qi@linaro.org>
2215
2216 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2217 instead of 0.
2218
2219 2017-09-05 Yao Qi <yao.qi@linaro.org>
2220
2221 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2222 * regcache.c (get_thread_regcache): Use VEC_length.
2223 (init_register_cache): Likewise.
2224 (regcache_cpy): Likewise.
2225 (registers_to_string): Iterate reg_defs via VEC_iterate.
2226 (find_regno): Likewise.
2227 (find_register_by_number): Use VEC_index.
2228 (register_size): Call find_register_by_number.
2229 (register_data): Call find_register_by_number.
2230 (supply_regblock): Use VEC_length.
2231 (regcache_raw_read_unsigned): Likewise.
2232 * tdesc.c (init_target_desc): Iterate reg_defs via
2233 VEC_iterate.
2234 (default_description): Update initializer.
2235 (copy_target_description): Don't update field num_registers.
2236 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2237 <num_registers>: Remove.
2238
2239 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2240
2241 * Makefile.in (.SECONDARY): Define target.
2242
2243 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2244
2245 * linux-low.c (linux_wait_1): Adjust.
2246 * server.c (queue_stop_reply_callback): Adjust.
2247
2248 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2249
2250 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2251 QEnvironmentUnset and QEnvironmentReset packets.
2252 (handle_query): Inform remote that QEnvironmentHexEncoded,
2253 QEnvironmentUnset and QEnvironmentReset are supported.
2254
2255 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2256
2257 * inferiors.h (inferior_target_data): Rename to ...
2258 (thread_target_data): ... this.
2259 (inferior_regcache_data): Rename to ...
2260 (thread_regcache_data): ... this.
2261 (set_inferior_regcache_data): Rename to ...
2262 (set_thread_regcache_data): ... this.
2263 * inferiors.c (inferior_target_data): Rename to ...
2264 (thread_target_data): ... this.
2265 (inferior_regcache_data): Rename to ...
2266 (thread_regcache_data): ... this.
2267 (set_inferior_regcache_data): Rename to ...
2268 (set_thread_regcache_data): ... this.
2269 (free_one_thread): Update.
2270 * linux-low.h (get_thread_lwp): Update.
2271 * regcache.c (get_thread_regcache): Update.
2272 (regcache_invalidate_thread): Update.
2273 (free_register_cache_thread): Update.
2274 * win32-i386-low.c (update_debug_registers_callback): Update.
2275 (win32_get_current_dr): Update.
2276 * win32-low.c (thread_rec): Update.
2277 (delete_thread_info): Update.
2278 (continue_one_thread): Update.
2279 (suspend_one_thread): Update.
2280
2281 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2282
2283 * inferiors.c (set_inferior_target_data): Remove.
2284 * inferiors.h (set_inferior_target_data): Remove.
2285
2286 2017-08-18 Yao Qi <yao.qi@linaro.org>
2287
2288 * Makefile.in (OBS): Add selftest.o.
2289 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2290 * configure, config.in: Re-generated.
2291 * server.c: Include common/sefltest.h.
2292 (captured_main): Handle option --selftest.
2293
2294 2017-08-09 Yao Qi <yao.qi@linaro.org>
2295
2296 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2297 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2298 i386-avx-mpx.o and i386-mmx.o.
2299 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2300 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2301 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2302 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2303 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2304 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2305 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2306 i386/amd64-avx-mpx.xml.
2307
2308 2017-08-09 Yao Qi <yao.qi@linaro.org>
2309
2310 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2311 and x32-avx-avx512.o.
2312 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2313 i386/x32-avx-avx512.xml.
2314
2315 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2316
2317 * tracepoint.h (enum class fast_tpoint_collect_result): New
2318 enumeration.
2319 (fast_tracepoint_collecting): Change return type to
2320 fast_tpoint_collect_result.
2321 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2322 * linux-low.h: Include tracepoint.h.
2323 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2324 fast_tpoint_collect_result.
2325 * linux-low.c (handle_tracepoints): Adjust.
2326 (linux_fast_tracepoint_collecting): Change return type to
2327 fast_tpoint_collect_result.
2328 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2329 linux_wait_1, stuck_in_jump_pad_callback,
2330 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2331 proceed_one_lwp): Adjust to type change.
2332
2333 2017-07-10 Yao Qi <yao.qi@linaro.org>
2334
2335 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2336
2337 2017-06-29 Yao Qi <yao.qi@linaro.org>
2338
2339 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2340 Remove.
2341 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2342
2343 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2344
2345 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2346
2347 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2348
2349 * linux-low.c (linux_create_inferior): Adjust code to access the
2350 environment information via 'gdb_environ' class.
2351 * lynx-low.c (lynx_create_inferior): Likewise.
2352 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2353 (get_environ): Return a pointer to 'our_environ'.
2354 (captured_main): Initialize 'our_environ'.
2355 * server.h (get_environ): Adjust prototype.
2356 * spu-low.c (spu_create_inferior): Adjust code to access the
2357 environment information via 'gdb_environ' class.
2358
2359 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2360
2361 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2362 usage of "register" keyword.
2363
2364 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2365
2366 * configure: Re-generate.
2367
2368 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2369
2370 * configure: Re-generate.
2371
2372 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2373
2374 * Makefile.in (COMPILE.pre): Add "-x c++".
2375
2376 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2377
2378 * fork-child.c: Conditionally include <signal.h>.
2379
2380 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2381
2382 * server.c (handle_general_set): Handle new packet
2383 "QStartupWithShell".
2384 (handle_query): Add "QStartupWithShell" to the list of supported
2385 packets.
2386 (gdbserver_usage): Add help text explaining the
2387 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2388 options.
2389 (captured_main): Recognize and act upon the presence of the new
2390 CLI options.
2391
2392 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2393 Pedro Alves <palves@redhat.com>
2394
2395 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2396 * configure: Regenerate.
2397 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2398 "fork-inferior.o".
2399 (i[34567]86-*-lynxos*): Likewise.
2400 (spu*-*-*): Likewise.
2401 * fork-child.c: New file.
2402 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2403 and "environ.h".
2404 (linux_ptrace_fun): New function.
2405 (linux_create_inferior): Adjust function prototype to reflect
2406 change on "target.h". Adjust function code to use
2407 "fork_inferior".
2408 (linux_request_interrupt): Delete "signal_pid".
2409 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2410 (lynx_ptrace_fun): New function.
2411 (lynx_create_inferior): Adjust function prototype to reflect
2412 change on "target.h". Adjust function code to use
2413 "fork_inferior".
2414 * nto-low.c (nto_create_inferior): Adjust function prototype and
2415 code to reflect change on "target.h". Update comments.
2416 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2417 "common-terminal.h" and "environ.h".
2418 (terminal_fd): Moved to fork-child.c.
2419 (old_foreground_pgrp): Likewise.
2420 (restore_old_foreground_pgrp): Likewise.
2421 (last_status): Make it global.
2422 (last_ptid): Likewise.
2423 (our_environ): New variable.
2424 (startup_with_shell): Likewise.
2425 (program_name): Likewise.
2426 (program_argv): Rename to...
2427 (program_args): ...this.
2428 (wrapper_argv): New variable.
2429 (start_inferior): Delete function.
2430 (get_exec_wrapper): New function.
2431 (get_exec_file): Likewise.
2432 (get_environ): Likewise.
2433 (prefork_hook): Likewise.
2434 (post_fork_inferior): Likewise.
2435 (postfork_hook): Likewise.
2436 (postfork_child_hook): Likewise.
2437 (handle_v_run): Update code to deal with arguments coming from the
2438 remote host. Update calls from "start_inferior" to
2439 "create_inferior".
2440 (captured_main): Likewise. Initialize environment variable. Call
2441 "have_job_control".
2442 * server.h (post_fork_inferior): New prototype.
2443 (get_environ): Likewise.
2444 (last_status): Declare.
2445 (last_ptid): Likewise.
2446 (signal_pid): Likewise.
2447 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2448 (spu_ptrace_fun): New function.
2449 (spu_create_inferior): Adjust function prototype to reflect change
2450 on "target.h". Adjust function code to use "fork_inferior".
2451 * target.c (target_terminal_init): New function.
2452 (target_terminal_inferior): Likewise.
2453 (target_terminal_ours): Likewise.
2454 * target.h: Include <vector>.
2455 (struct target_ops) <create_inferior>: Update prototype.
2456 (create_inferior): Update macro.
2457 * utils.c (gdb_flush_out_err): New function.
2458 * win32-low.c (win32_create_inferior): Adjust function prototype
2459 and code to reflect change on "target.h".
2460
2461 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2462
2463 * inferiors.c (switch_to_thread): New function.
2464
2465 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2466
2467 * Makefile.in (SFILE): Add "common/job-control.c".
2468 (OBS): Add "job-control.o".
2469
2470 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2471
2472 * Makefile: Remove "@host_makefile_frag@".
2473
2474 2017-05-05 Pedro Alves <palves@redhat.com>
2475
2476 * configure: Regenerate.
2477
2478 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2479
2480 * configure: Regenerate.
2481
2482 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2483
2484 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2485 software_single_step change of return type to
2486 std::vector<CORE_ADDR>.
2487 * linux-low.c (install_software_single_step_breakpoints):
2488 Likewise.
2489 * linux-low.h (install_software_single_step_breakpoints):
2490 Likewise.
2491
2492 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2493
2494 * remote-utils.c: Include "gdb_termios.h" instead of
2495 "terminal.h".
2496 * terminal.h: Delete file.
2497
2498 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2499
2500 * server.c: Include <vector>.
2501 <program_argv, wrapper_argv>: Convert to std::vector.
2502 (start_inferior): Rewrite function to use C++.
2503 (handle_v_run): Likewise. Update code that calculates the argv
2504 based on the vRun packet; use C++.
2505 (captured_main): Likewise.
2506
2507 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2508
2509 * server.c (handle_v_cont): Initialize thread_resume::thread
2510 with null_ptid.
2511
2512 2017-04-05 Pedro Alves <palves@redhat.com>
2513
2514 * configure: Regenerate.
2515
2516 2017-04-05 Pedro Alves <palves@redhat.com>
2517
2518 * gdbreplay.c (sync_error): Constify.
2519 * linux-x86-low.c (push_opcode): Constify.
2520
2521 2017-04-05 Pedro Alves <palves@redhat.com>
2522
2523 * win32-low.c (get_child_debug_event)
2524 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2525 Report TARGET_WAITKIND_SPURIOUS instead.
2526
2527 2017-04-05 Pedro Alves <palves@redhat.com>
2528
2529 * remote-utils.c (remote_prepare, remote_open): Constify.
2530 * remote-utils.h (remote_prepare, remote_open): Constify.
2531 * server.c (captured_main): Constify 'port' handling.
2532
2533 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2534
2535 * Makefile.in (clean): Clear .deps.
2536
2537 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2538
2539 * .gitignore: Remove generated files, replace with wildcard.
2540 * (clean): Replace removal of generated files with wildcard.
2541 (version.c): Replace with...
2542 (version-generated.c): ...this.
2543 (xml-builtin.c): Replace with...
2544 (xml-builtin-generated.c): ...this.
2545 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2546 (%.c: *regformats*): Replace with...
2547 (%-generated.c: *regformats*): ...this.
2548
2549 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2550
2551 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2552 (xtensa_fill_gregset): Call collect_register_by_name for
2553 threadptr register.
2554 (xtensa_store_gregset): Call supply_register_by_name for
2555 threadptr register.
2556
2557 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2558
2559 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2560 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2561 (xtensa_store_gregset): Call supply_register for all registers in
2562 a0_regnum..a0_regnum + C0_NREGS range.
2563
2564 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2565
2566 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2567 (ax-ipa.o: ax.c): Remove.
2568 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2569 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2570 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2571 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2572 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2573
2574 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2575
2576 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2577 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2578 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2579 (errors-ipa.o: ../common/errors.c): Remove.
2580 (format-ipa.o: ../common/format.c): Remove.
2581 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2582
2583 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2584
2585 * Makefile.in (%-ipa.o: %.c): New rule.
2586 (tracepoint-ipa.o: tracepoint.c): Remove.
2587 (utils-ipa.o: utils.c): Remove.
2588 (remote-utils-ipa.o: remote-utils.c): Remove.
2589 (regcache-ipa.o: regcache.c): Remove.
2590 (i386-linux-ipa.o: i386-linux.c): Remove.
2591 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2592 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2593 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2594 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2595 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2596 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2597 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2598 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2599 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2600 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2601 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2602 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2603 (aarch64-ipa.o: aarch64.c): Remove.
2604 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2605 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2606 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2607 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2608 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2609 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2610 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2611 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2612 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2613 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2614 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2615 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2616 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2617 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2618 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2619 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2620 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2621 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2622 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2623 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2624 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2625 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2626 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2627 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2628 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2629 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2630 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2631 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2632 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2633 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2634 (tdesc-ipa.o: tdesc.c): Remove.
2635 (x32-linux-ipa.o: x32-linux.c): Remove.
2636 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2637 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2638
2639 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2640
2641 * Makefile.in (%.o: ../arch/%.c): New rule.
2642 (arm.o: ../arch/arm.c): Remove.
2643 (arm-linux.o: ../arch/arm-linux.c): Remove.
2644 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2645 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2646
2647 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2648
2649 * Makefile.in (%.o: ../nat/%.c): New rule.
2650 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2651 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2652 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2653 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2654 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2655 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2656 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2657 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2658 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2659 (linux-personality.o: ../nat/linux-personality.c): Remove.
2660 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2661 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2662 (x86-linux.o: ../nat/x86-linux.c): Remove.
2663 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2664 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2665
2666 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2667
2668 * Makefile.in (%.o: ../common/%.c): New rule.
2669 (signals.o: ../common/signals.c): Remove.
2670 (print-utils.o: ../common/print-utils.c): Remove.
2671 (rsp-low.o: ../common/rsp-low.c): Remove.
2672 (common-utils.o: ../common/common-utils.c): Remove.
2673 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2674 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2675 (vec.o: ../common/vec.c): Remove.
2676 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2677 (xml-utils.o: ../common/xml-utils.c): Remove.
2678 (ptid.o: ../common/ptid.c): Remove.
2679 (buffer.o: ../common/buffer.c): Remove.
2680 (format.o: ../common/format.c): Remove.
2681 (filestuff.o: ../common/filestuff.c): Remove.
2682 (agent.o: ../common/agent.c): Remove.
2683 (errors.o: ../common/errors.c): Remove.
2684 (environ.o: ../common/environ.c): Remove.
2685 (common-debug.o: ../common/common-debug.c): Remove.
2686 (cleanups.o: ../common/cleanups.c): Remove.
2687 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2688 (fileio.o: ../common/fileio.c): Remove.
2689 (common-regcache.o: ../common/common-regcache.c): Remove.
2690 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2691 (new-op.o: ../common/new-op.c): Remove.
2692 (btrace-common.o: ../common/btrace-common.c): Remove.
2693
2694 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2695
2696 * Makefile.in (%.o: ../target/%.c): New rule.
2697 (waitstatus.o: ../target/waitstatus.c): Remove.
2698
2699 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2700
2701 * Makefile.in
2702 (%.c: ../regformats/%.dat,
2703 (%.c: ../regformats/arm/%.dat,
2704 (%.c: ../regformats/i386/%.dat,
2705 (%.c: ../regformats/rs6000/%.dat): New rules.
2706 (aarch64.c): Remove.
2707 (reg-arm.c): Remove.
2708 (arm-with-iwmmxt.c): Remove.
2709 (arm-with-vfpv2.c): Remove.
2710 (arm-with-vfpv3.c): Remove.
2711 (arm-with-neon.c): Remove.
2712 (reg-bfin.c): Remove.
2713 (reg-cris.c): Remove.
2714 (reg-crisv32.c): Remove.
2715 (i386.c): Remove.
2716 (i386-linux.c): Remove.
2717 (i386-avx.c): Remove.
2718 (i386-avx-linux.c): Remove.
2719 (i386-avx-avx512.c): Remove.
2720 (i386-avx-avx512-linux.c): Remove.
2721 (i386-mpx.c): Remove.
2722 (i386-mpx-linux.c): Remove.
2723 (i386-avx-mpx-avx512-pku.c): Remove.
2724 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2725 (i386-avx-mpx.c): Remove.
2726 (i386-avx-mpx-linux.c): Remove.
2727 (i386-mmx.c): Remove.
2728 (i386-mmx-linux.c): Remove.
2729 (reg-ia64.c): Remove.
2730 (reg-m32r.c): Remove.
2731 (reg-m68k.c): Remove.
2732 (reg-cf.c): Remove.
2733 (mips-linux.c): Remove.
2734 (mips-dsp-linux.c): Remove.
2735 (mips64-linux.c): Remove.
2736 (mips64-dsp-linux.c): Remove.
2737 (nios2-linux.c): Remove.
2738 (powerpc-32.c): Remove.
2739 (powerpc-32l.c): Remove.
2740 (powerpc-altivec32l.c): Remove.
2741 (powerpc-cell32l.c): Remove.
2742 (powerpc-vsx32l.c): Remove.
2743 (powerpc-isa205-32l.c): Remove.
2744 (powerpc-isa205-altivec32l.c): Remove.
2745 (powerpc-isa205-vsx32l.c): Remove.
2746 (powerpc-e500l.c): Remove.
2747 (powerpc-64l.c): Remove.
2748 (powerpc-altivec64l.c): Remove.
2749 (powerpc-cell64l.c): Remove.
2750 (powerpc-vsx64l.c): Remove.
2751 (powerpc-isa205-64l.c): Remove.
2752 (powerpc-isa205-altivec64l.c): Remove.
2753 (powerpc-isa205-vsx64l.c): Remove.
2754 (s390-linux32.c): Remove.
2755 (s390-linux32v1.c): Remove.
2756 (s390-linux32v2.c): Remove.
2757 (s390-linux64.c): Remove.
2758 (s390-linux64v1.c): Remove.
2759 (s390-linux64v2.c): Remove.
2760 (s390-te-linux64.c): Remove.
2761 (s390-vx-linux64.c): Remove.
2762 (s390-tevx-linux64.c): Remove.
2763 (s390x-linux64.c): Remove.
2764 (s390x-linux64v1.c): Remove.
2765 (s390x-linux64v2.c): Remove.
2766 (s390x-te-linux64.c): Remove.
2767 (s390x-vx-linux64.c): Remove.
2768 (s390x-tevx-linux64.c): Remove.
2769 (tic6x-c64xp-linux.c): Remove.
2770 (tic6x-c64x-linux.c): Remove.
2771 (tic6x-c62x-linux.c): Remove.
2772 (reg-sh.c): Remove.
2773 (reg-sparc64.c): Remove.
2774 (reg-spu.c): Remove.
2775 (amd64.c): Remove.
2776 (amd64-linux.c): Remove.
2777 (amd64-avx.c): Remove.
2778 (amd64-avx-linux.c): Remove.
2779 (amd64-avx-avx512.c): Remove.
2780 (amd64-avx-avx512-linux.c): Remove.
2781 (amd64-mpx.c): Remove.
2782 (amd64-mpx-linux.c): Remove.
2783 (amd64-avx-mpx-avx512-pku.c): Remove.
2784 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2785 (amd64-avx-mpx.c): Remove.
2786 (amd64-avx-mpx-linux.c): Remove.
2787 (x32.c): Remove.
2788 (x32-linux.c): Remove.
2789 (x32-avx.c): Remove.
2790 (x32-avx-linux.c): Remove.
2791 (x32-avx-avx512.c): Remove.
2792 (x32-avx-avx512-linux.c): Remove.
2793 (reg-xtensa.c): Remove.
2794 (reg-tilegx.c): Remove.
2795 (reg-tilegx32.c): Remove.
2796
2797 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2798
2799 * Makefile.in (SFILES): Add "common/environ.c".
2800 (OBJS): Add "common/environ.h".
2801
2802 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2803
2804 * configure.ac: Check if the fs_base and gs_base members of
2805 `struct user_regs_struct' exist.
2806 * config.in: Regenerated.
2807 * configure: Likewise.
2808
2809 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2810
2811 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2812 target_read_memory.
2813 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2814 (get_next_pcs_syscall_next_pc): Likewise.
2815
2816 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2817
2818 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2819 * nto-x86-low.c: Likewise.
2820
2821 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2822
2823 * Makefile.in: Include disable-implicit-rules.mk.
2824
2825 2016-11-23 Pedro Alves <palves@redhat.com>
2826
2827 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2828 (debug_vprintf): Use std::chrono::steady_clock instead of
2829 gettimeofday. Use '.' instead of ':'.
2830 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2831 (get_timestamp): Use std::chrono::steady_clock instead of
2832 gettimeofday.
2833
2834 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2835
2836 * Makefile.in: Fix whitespace formatting.
2837
2838 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2839
2840 * Makefile.in (SFILES, OBS): Flatten list and order
2841 alphabetically.
2842
2843 2016-11-23 Pedro Alves <palves@redhat.com>
2844
2845 * event-loop.c (handle_file_event): Use warning.
2846 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2847 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2848 Use warning.
2849
2850 2016-11-23 Pedro Alves <palves@redhat.com>
2851
2852 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2853 output.
2854 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2855 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2856 debug_printf and debug_flush for debug output.
2857 * server.c (handle_general_set): Likewise.
2858 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2859 output.
2860
2861 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2862
2863 * Makefile.in (.c.o): Replace rule with ...
2864 (%.o: %.c): ... this one.
2865
2866 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2867
2868 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2869 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2870 make.
2871 * configure.ac: Remove checks for the make program.
2872 * configure: Re-generate.
2873
2874 2016-10-28 Pedro Alves <palves@redhat.com>
2875
2876 * Makefile.in (CXX_DIALECT): Get from configure.
2877 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2878 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2879 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2880 * config.in: Regenerate.
2881 * configure: Regenerate.
2882
2883 2016-10-27 Yao Qi <yao.qi@linaro.org>
2884
2885 * linux-low.c (linux_supports_range_stepping): Return true if
2886 can_software_single_step return true.
2887
2888 2016-10-27 Yao Qi <yao.qi@linaro.org>
2889
2890 * inferiors.c (find_inferior_in_random): New function.
2891 * inferiors.h (find_inferior_in_random): Declare.
2892 * linux-low.c (linux_wait_for_event_filtered): Call
2893 find_inferior_in_random instead of find_inferior.
2894
2895 2016-10-27 Yao Qi <yao.qi@linaro.org>
2896
2897 * linux-low.c (linux_wait_1): If single-step breakpoints are
2898 inserted, remove them.
2899
2900 2016-10-26 Pedro Alves <palves@redhat.com>
2901
2902 * linux-low.c (handle_extended_wait): Link parent/child fork
2903 threads.
2904 (linux_wait_1): Unlink them.
2905 (linux_set_resume_request): Ignore resume requests for
2906 already-resumed and unhandled fork child threads.
2907 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2908 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2909 New functions.
2910 (handle_v_requests) <vCont>: Don't call require_running.
2911 * server.h (in_queued_stop_replies): New declaration.
2912
2913 2016-10-24 Yao Qi <yao.qi@linaro.org>
2914
2915 PR server/20733
2916 * linux-aarch64-low.c (append_insns): Cast the return value to
2917 'uint32_t *'.
2918
2919 2016-10-10 Yao Qi <yao.qi@linaro.org>
2920
2921 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2922
2923 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2924
2925 * target.c (target_supports_multi_process): New function, moved
2926 from...
2927 * target.h (target_supports_multi_process): ... here. Remove
2928 macro.
2929
2930 2016-10-05 Tom Tromey <tom@tromey.com>
2931
2932 PR remote/20655:
2933 * tracepoint.c (handle_tracepoint_bkpts): Check
2934 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2935
2936 2016-10-05 Yao Qi <yao.qi@linaro.org>
2937
2938 * configure.srv: Update the path of arm-*.xml files.
2939
2940 2016-10-05 Terry Guo <terry.guo@arm.com>
2941 Yao Qi <yao.qi@linaro.org>
2942
2943 * Makefile.in: Adjust the path of rules.
2944 * configure.srv: Update the path of xml files.
2945 * regformats/arm-with-iwmmxt.dat: Regenerated.
2946 * regformats/arm-with-neon.dat: Likewise.
2947 * regformats/arm-with-vfpv2.dat: Likewise.
2948 * regformats/arm-with-vfpv3.dat Likewise.
2949
2950 2016-09-30 Yao Qi <yao.qi@linaro.org>
2951
2952 PR gdbserver/20627
2953 * target.c (target_stop_and_wait): Don't call
2954 target_continue_no_signal, use resume_stop instead.
2955
2956 2016-09-26 Yao Qi <yao.qi@linaro.org>
2957
2958 * linux-low.c (linux_wait_1): Call debug_exit.
2959
2960 2016-09-23 Pedro Alves <palves@redhat.com>
2961
2962 * Makefile.in (SFILES): Add common/new-op.c.
2963 (OBS): Add common/new-op.o.
2964 (new-op.o): New rule.
2965
2966 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2967
2968 * .gitinore: Ignore more files.
2969
2970 2016-09-21 Yao Qi <yao.qi@linaro.org>
2971
2972 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2973 23.
2974
2975 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2976
2977 * server.c (start_inferior): Call target_mourn_inferior instead of
2978 mourn_inferior; pass ptid_t argument to it.
2979 (resume): Likewise.
2980 (handle_target_event): Likewise.
2981 * target.c (target_mourn_inferior): New function.
2982 * target.h (mourn_inferior): Delete macro.
2983
2984 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2985
2986 * linux-low.c (lwp_is_stepping): New function.
2987
2988 2016-09-06 Carl Love <cel@us.ibm.com>
2989
2990 * server.c (start_inferior): Fixed comment, requested comment change
2991 didn't get updated correctly. Removed reference to ptrace () call as
2992 it is only true on Linux systems.
2993
2994 2016-09-06 Carl Love <cel@us.ibm.com>
2995
2996 * server.c (start_inferior): Do not call
2997 function target_post_create_inferior () if the
2998 inferior process has already exited.
2999
3000 2016-09-05 Pedro Alves <palves@redhat.com>
3001
3002 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3003 (COMPILE.pre, CC_LD): Use CXX directly.
3004 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3005 * acinclude.m4: Don't include build-with-cxx.m4.
3006 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3007 * configure: Regenerate.
3008
3009 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3010
3011 PR gdb/19495
3012 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3013 call writing data to own_buf.
3014
3015 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3016
3017 * target.c (mywait): Call target_wait instead of
3018 the_target->wait.
3019 (target_wait): New function.
3020
3021 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3022
3023 * server.c (start_inferior): New variable 'ptid'. Replace calls
3024 to the_target->resume by target_continue{,_no_signal}, depending
3025 on the case.
3026 * target.c (target_stop_and_wait): Call target_continue_no_signal
3027 instead of the_target->resume.
3028 (target_continue): New function.
3029
3030 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3031
3032 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3033
3034 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3035
3036 PR server/20491
3037 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3038 ps_prochandle.
3039 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3040 * linux-arm-low.c (ps_get_thread_area): Likewise.
3041 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3042 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3043 * linux-mips-low.c (ps_get_thread_area): Likewise.
3044 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3045 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3046 * linux-x86-low.c (ps_get_thread_area): Likewise.
3047 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3048
3049 2016-08-19 Pedro Alves <palves@redhat.com>
3050
3051 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3052
3053 2016-08-19 Pedro Alves <palves@redhat.com>
3054
3055 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3056 comment. Use memcpy instead of casting through unsigned long.
3057
3058 2016-08-19 Pedro Alves <palves@redhat.com>
3059
3060 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3061 allocating around 0x80000000.
3062
3063 2016-08-19 Pedro Alves <palves@redhat.com>
3064
3065 PR gdb/20415
3066 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3067 (x32-avx512-linux-ipa.o): New rules.
3068 * configure.ac (x86_64-*-linux*): New x32 check.
3069 * configure.srv (ipa_x32_linux_regobj): New.
3070 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3071 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3072 descriptions.
3073 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3074 descriptions.
3075 * configure: Regenerate.
3076
3077 2016-08-09 Pedro Alves <palves@redhat.com>
3078
3079 PR gdb/18653
3080 * Makefile.in (OBS): Add signals-state-save-restore.o.
3081 (signals-state-save-restore.o): New rule.
3082 * config.in: Regenerate.
3083 * configure: Regenerate.
3084 * linux-low.c: Include "signals-state-save-restore.h".
3085 (linux_create_inferior): Call
3086 restore_original_signals_state.
3087 * server.c: Include "dispositions-save-restore.h".
3088 (captured_main): Call save_original_signals_state.
3089
3090 2016-08-05 Pedro Alves <palves@redhat.com>
3091
3092 * configure: Regenerate.
3093
3094 2016-08-04 Yao Qi <yao.qi@linaro.org>
3095
3096 * linux-low.c (regsets_fetch_inferior_registers): Check
3097 errno is ESRCH or not.
3098
3099 2016-08-02 Yao Qi <yao.qi@linaro.org>
3100
3101 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3102 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3103 (thread_db_load_search): Update.
3104 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3105 td_ta_set_event and td_ta_event_getmsg.
3106
3107 2016-07-26 Pedro Alves <palves@redhat.com>
3108
3109 PR server/20414
3110 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3111 of unsigned long for 64-bit registers and use uint32_t instead of
3112 unsigned int for 32-bit registers.
3113
3114 2016-07-26 Pedro Alves <palves@redhat.com>
3115
3116 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3117 to 'ptrace'.
3118
3119 2016-07-21 Tom Tromey <tom@tromey.com>
3120
3121 * configure: Rebuild.
3122
3123 2016-07-21 Yao Qi <yao.qi@linaro.org>
3124
3125 * mem-break.c (find_gdb_breakpoint): Cast bp to
3126 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3127
3128 2016-07-21 Yao Qi <yao.qi@linaro.org>
3129
3130 * server.c (handle_v_requests): Support s and S actions
3131 if target_supports_software_single_step return true.
3132
3133 2016-07-21 Yao Qi <yao.qi@linaro.org>
3134
3135 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3136 is resume_step, call maybe_hw_step.
3137 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3138 and unstop them.
3139 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3140 breakpoints or not.
3141 (proceed_one_lwp): If resume request is resume_step, install
3142 reinsert breakpoints and call maybe_hw_step.
3143
3144 2016-07-21 Yao Qi <yao.qi@linaro.org>
3145
3146 * linux-low.c (proceed_one_lwp): Declare.
3147 (linux_resume_one_thread): Remove local variable 'step'.
3148 Lift code enqueue signal. Call proceed_one_lwp instead of
3149 linux_resume_one_lwp.
3150
3151 2016-07-21 Yao Qi <yao.qi@linaro.org>
3152
3153 * linux-low.c (linux_resume_one_thread): Call
3154 enqueue_pending_signal.
3155
3156 2016-07-21 Yao Qi <yao.qi@linaro.org>
3157
3158 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3159 * inferiors.c (do_restore_current_thread_cleanup): New function.
3160 (make_cleanup_restore_current_thread): Likewise.
3161 * linux-low.c (install_software_single_step_breakpoints): Call
3162 make_cleanup_restore_current_thread. Switch current_thread to
3163 thread.
3164
3165 2016-07-21 Yao Qi <yao.qi@linaro.org>
3166
3167 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3168 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3169 (clone_one_breakpoint): Likewise.
3170 (delete_reinsert_breakpoints): Change parameter to thread.
3171 Callers updated.
3172 (has_reinsert_breakpoints): Likewise.
3173 (uninsert_reinsert_breakpoints): Likewise.
3174 (reinsert_reinsert_breakpoints): Likewise.
3175 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3176 (delete_reinsert_breakpoints): Likewise.
3177 (reinsert_reinsert_breakpoints): Likewise.
3178 (uninsert_reinsert_breakpoints): Likewise.
3179 (has_reinsert_breakpoints): Likewise.
3180
3181 2016-07-21 Yao Qi <yao.qi@linaro.org>
3182
3183 * inferiors.c (get_thread_process): Make parameter const.
3184 * inferiors.h (get_thread_process): Update declaration.
3185 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3186 Add new parameters child_thread and parent_thread. Callers
3187 updated.
3188 * mem-break.h (clone_all_breakpoints): Update declaration.
3189
3190 2016-07-21 Yao Qi <yao.qi@linaro.org>
3191
3192 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3193 <command_list, handler>: Remove.
3194 (struct gdb_breakpoint): New.
3195 (struct other_breakpoint): New.
3196 (struct reinsert_breakpoint): New.
3197 (is_gdb_breakpoint): New function.
3198 (any_persistent_commands): Update command_list if
3199 is_gdb_breakpoint returns true.
3200 (set_breakpoint): Create breakpoints according to their types.
3201 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3202 (set_gdb_breakpoint_1): Likewise.
3203 (set_gdb_breakpoint): Likewise.
3204 (clear_breakpoint_conditions): Change parameter type to
3205 'struct gdb_breakpoint *'.
3206 (clear_breakpoint_commands): Likewise.
3207 (clear_breakpoint_conditions_and_commands): Likewise.
3208 (add_condition_to_breakpoint): Likewise.
3209 (add_breakpoint_condition): Likewise.
3210 (add_commands_to_breakpoint): Likewise.
3211 (check_breakpoints): Check other_breakpoint.
3212 (clone_one_breakpoint): Clone breakpopint according to its type.
3213 * mem-break.h (struct gdb_breakpoint): Declare.
3214 (set_gdb_breakpoint): Update declaration.
3215 (clear_breakpoint_conditions_and_commands): Likewise.
3216 (add_breakpoint_condition): Likewise.
3217 (add_breakpoint_commands): Likewise.
3218 * server.c (process_point_options): Change parameter type to
3219 'struct gdb_breakpoint *'.
3220
3221 2016-07-21 Yao Qi <yao.qi@linaro.org>
3222
3223 * mem-break.c (set_breakpoint_at): Rename it to ...
3224 (set_breakpoint_type_at): ... it.
3225 (set_breakpoint_at): Call set_breakpoint_type_at.
3226 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3227 * mem-break.h (set_breakpoint_at): Update comments.
3228
3229 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3230
3231 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3232 to buf parameter.
3233 (nios2_store_gregset): Likewise.
3234
3235 2016-07-01 Pedro Alves <palves@redhat.com>
3236 Antoine Tremblay <antoine.tremblay@ericsson.com>
3237
3238 * linux-low.c: Change interface to take the target lwp_info
3239 pointer directly and return void. Handle detaching from a zombie
3240 thread.
3241 (linux_detach_lwp_callback): New function.
3242 (linux_detach): Detach from the leader thread after detaching from
3243 the clone threads.
3244
3245 2016-06-28 Yao Qi <yao.qi@linaro.org>
3246
3247 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3248 for variable new_offset.
3249 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3250 (aarch64_ftrace_insn_reloc_cb): Likewise.
3251 (aarch64_ftrace_insn_reloc_tb): Likewise.
3252 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3253 PRIx64 instead of PRIx32.
3254
3255 2016-06-28 Yao Qi <yao.qi@linaro.org>
3256
3257 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3258 (the_low_target): Install arm_get_syscall_trapinfo.
3259
3260 2016-06-28 Yao Qi <yao.qi@linaro.org>
3261
3262 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3263 function.
3264 (the_low_target): Install aarch64_get_syscall_trapinfo.
3265
3266 2016-06-28 Yao Qi <yao.qi@linaro.org>
3267
3268 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3269 Callers updated.
3270 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3271 Remove parameter sysno.
3272 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3273 sysret.
3274
3275 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3276
3277 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3278 (s390_emit_ne_goto): Likewise.
3279 (s390_emit_lt_goto): Likewise.
3280 (s390_emit_le_goto): Likewise.
3281 (s390_emit_gt_goto): Likewise.
3282 (s390_emit_ge_goto): Likewise.
3283 (s390x_emit_eq_goto): Likewise.
3284 (s390x_emit_ne_goto): Likewise.
3285 (s390x_emit_lt_goto): Likewise.
3286 (s390x_emit_le_goto): Likewise.
3287 (s390x_emit_gt_goto): Likewise.
3288 (s390x_emit_ge_goto): Likewise.
3289 (s390_emit_ops_impl): Mark variable static.
3290 (s390x_emit_ops): Likewise.
3291
3292 2016-06-17 Yao Qi <yao.qi@linaro.org>
3293
3294 * linux-low.c (handle_extended_wait): Call
3295 uninsert_reinsert_breakpoints for the parent process. Remove
3296 reinsert breakpoints from the child process. Reinsert them to
3297 the parent process when vfork is done.
3298 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3299 (reinsert_reinsert_breakpoints): New function.
3300 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3301 (reinsert_reinsert_breakpoints): Declare.
3302
3303 2016-06-17 Yao Qi <yao.qi@linaro.org>
3304
3305 * linux-low.c (handle_extended_wait): If the parent is doing
3306 step-over, remove the reinsert breakpoints from the forked child.
3307
3308 2016-06-17 Yao Qi <yao.qi@linaro.org>
3309
3310 * linux-low.c (unsuspend_all_lwps): Declare.
3311 (linux_low_filter_event): If thread exited, call finish_step_over.
3312 If step-over is finished, unsuspend other threads.
3313
3314 2016-06-17 Yao Qi <yao.qi@linaro.org>
3315
3316 * linux-low.c (linux_resume_one_lwp_throw): Assert
3317 has_reinsert_breakpoints returns false.
3318 * mem-break.c (delete_disabled_breakpoints): Assert
3319 bp type isn't reinsert_breakpoint.
3320
3321 2016-06-17 Yao Qi <yao.qi@linaro.org>
3322
3323 * linux-low.c (maybe_hw_step): New function.
3324 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3325 (finish_step_over): Switch current_thread to lwp temporarily,
3326 and assert has_reinsert_breakpoints returns true.
3327 (proceed_one_lwp): Call maybe_hw_step.
3328 * mem-break.c (has_reinsert_breakpoints): New function.
3329 * mem-break.h (has_reinsert_breakpoints): Declare.
3330
3331 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3332
3333 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3334
3335 2016-05-17 Yao Qi <yao.qi@linaro.org>
3336
3337 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3338 instead of find_inferior.
3339
3340 2016-05-05 Yao Qi <yao.qi@linaro.org>
3341
3342 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3343 Initialize res to zero.
3344
3345 2016-05-05 Yao Qi <yao.qi@linaro.org>
3346
3347 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3348 to uint32_t.
3349
3350 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3351
3352 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3353 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3354 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3355
3356 2016-04-28 Par Olsson <par.olsson@windriver.com>
3357 Simon Marchi <simon.marchi@ericsson.com>
3358
3359 * tracepoint.c (write_inferior_int8): New function.
3360 (cmd_qtenable_disable): Write enable flag using
3361 write_inferior_int8.
3362
3363 2016-04-25 Yao Qi <yao.qi@linaro.org>
3364
3365 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3366 (need_step_over_p): Return zero if the LWP has pending signals
3367 can be delivered on software single step target.
3368
3369 2016-04-25 Yao Qi <yao.qi@linaro.org>
3370
3371 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3372 return instead of error.
3373
3374 2016-04-22 Yao Qi <yao.qi@linaro.org>
3375
3376 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3377 to 23.
3378
3379 2016-04-22 Yao Qi <yao.qi@linaro.org>
3380
3381 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3382 signal when stepping over breakpoint with software single
3383 step.
3384
3385 2016-04-21 Pedro Alves <palves@redhat.com>
3386
3387 * linux-s390-low.c (s390_collect_ptrace_register)
3388 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3389 add casts.
3390 (s390_check_regset): Use void * instead of gdb_byte *.
3391
3392 2016-04-20 Pedro Alves <palves@redhat.com>
3393
3394 * configure: Renegerate.
3395
3396 2016-04-20 Yao Qi <yao.qi@linaro.org>
3397
3398 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3399 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3400 number 16.
3401 (arm_store_gregset): Likewise.
3402
3403 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3404
3405 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3406 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3407 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3408 (amd64-avx-mpx-linux.c): New rules.
3409 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3410 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3411 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3412 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3413 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3414 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3415 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3416 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3417 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3418 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3419 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3420 * linux-x86-low.c (x86_linux_read_description): Add case for
3421 X86_XSTATE_AVX_MPX_MASK.
3422 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3423 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3424 init_registers_i386_avx_mpx_linux.
3425 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3426 (initialize_low_tracepoint): Call
3427 init_registers_i386_avx_mpx_linux.
3428 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3429 (initialize_low_tracepoint): Call
3430 init_registers_amd64_avx_mpx_linux.
3431 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3432 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3433 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3434 declarations.
3435
3436 2016-04-18 Pedro Alves <palves@redhat.com>
3437
3438 * configure: Regenerate.
3439
3440 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3441
3442 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3443 (aarch64_emit_sub): Likewise.
3444
3445 2016-04-12 Pedro Alves <palves@redhat.com>
3446
3447 * utils.c (prepare_to_throw_exception): Delete.
3448
3449 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3450
3451 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3452
3453 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3454
3455 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3456
3457 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3458
3459 * linux-aarch64-ipa.c: Add <elf.h> include.
3460 * linux-ppc-ipa.c: Add <elf.h> include.
3461 * linux-s390-ipa.c: Add <elf.h> include.
3462
3463 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3464
3465 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3466 (get_raw_reg_ptr): Likewise.
3467 (get_trace_state_variable_value_ptr): Likewise.
3468 (set_trace_state_variable_value_ptr): Likewise.
3469 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3470 char *.
3471
3472 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3473 Marcin Kościelnicki <koriakin@0x04.net>
3474
3475 PR/17221
3476 * linux-ppc-low.c (emit_insns): New function.
3477 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3478 (ppc_emit_prologue): New function.
3479 (ppc_emit_epilogue): New function.
3480 (ppc_emit_add): New function.
3481 (ppc_emit_sub): New function.
3482 (ppc_emit_mul): New function.
3483 (ppc_emit_lsh): New function.
3484 (ppc_emit_rsh_signed): New function.
3485 (ppc_emit_rsh_unsigned): New function.
3486 (ppc_emit_ext): New function.
3487 (ppc_emit_zero_ext): New function.
3488 (ppc_emit_log_not): New function.
3489 (ppc_emit_bit_and): New function.
3490 (ppc_emit_bit_or): New function.
3491 (ppc_emit_bit_xor): New function.
3492 (ppc_emit_bit_not): New function.
3493 (ppc_emit_equal): New function.
3494 (ppc_emit_less_signed): New function.
3495 (ppc_emit_less_unsigned): New function.
3496 (ppc_emit_ref): New function.
3497 (ppc_emit_const): New function.
3498 (ppc_emit_reg): New function.
3499 (ppc_emit_pop): New function.
3500 (ppc_emit_stack_flush): New function.
3501 (ppc_emit_swap): New function.
3502 (ppc_emit_stack_adjust): New function.
3503 (ppc_emit_call): New function.
3504 (ppc_emit_int_call_1): New function.
3505 (ppc_emit_void_call_2): New function.
3506 (ppc_emit_if_goto): New function.
3507 (ppc_emit_goto): New function.
3508 (ppc_emit_eq_goto): New function.
3509 (ppc_emit_ne_goto): New function.
3510 (ppc_emit_lt_goto): New function.
3511 (ppc_emit_le_goto): New function.
3512 (ppc_emit_gt_goto): New function.
3513 (ppc_emit_ge_goto): New function.
3514 (ppc_write_goto_address): New function.
3515 (ppc_emit_ops_impl): New static variable.
3516 (ppc64v1_emit_prologue): New function.
3517 (ppc64v2_emit_prologue): New function.
3518 (ppc64_emit_epilogue): New function.
3519 (ppc64_emit_add): New function.
3520 (ppc64_emit_sub): New function.
3521 (ppc64_emit_mul): New function.
3522 (ppc64_emit_lsh): New function.
3523 (ppc64_emit_rsh_signed): New function.
3524 (ppc64_emit_rsh_unsigned): New function.
3525 (ppc64_emit_ext): New function.
3526 (ppc64_emit_zero_ext): New function.
3527 (ppc64_emit_log_not): New function.
3528 (ppc64_emit_bit_and): New function.
3529 (ppc64_emit_bit_or): New function.
3530 (ppc64_emit_bit_xor): New function.
3531 (ppc64_emit_bit_not): New function.
3532 (ppc64_emit_equal): New function.
3533 (ppc64_emit_less_signed): New function.
3534 (ppc64_emit_less_unsigned): New function.
3535 (ppc64_emit_ref): New function.
3536 (ppc64_emit_const): New function.
3537 (ppc64v1_emit_reg): New function.
3538 (ppc64v2_emit_reg): New function.
3539 (ppc64_emit_pop): New function.
3540 (ppc64_emit_stack_flush): New function.
3541 (ppc64_emit_swap): New function.
3542 (ppc64v1_emit_call): New function.
3543 (ppc64v2_emit_call): New function.
3544 (ppc64v1_emit_int_call_1): New function.
3545 (ppc64v2_emit_int_call_1): New function.
3546 (ppc64v1_emit_void_call_2): New function.
3547 (ppc64v2_emit_void_call_2): New function.
3548 (ppc64_emit_if_goto): New function.
3549 (ppc64_emit_eq_goto): New function.
3550 (ppc64_emit_ne_goto): New function.
3551 (ppc64_emit_lt_goto): New function.
3552 (ppc64_emit_le_goto): New function.
3553 (ppc64_emit_gt_goto): New function.
3554 (ppc64_emit_ge_goto): New function.
3555 (ppc64v1_emit_ops_impl): New static variable.
3556 (ppc64v2_emit_ops_impl): New static variable.
3557 (ppc_emit_ops): New function.
3558 (linux_low_target): Wire in ppc_emit_ops.
3559
3560 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3561 Marcin Kościelnicki <koriakin@0x04.net>
3562
3563 PR/17221
3564 * Makefile.in: Add powerpc-*-ipa.o
3565 * configure.srv: Add ipa_obj for powerpc*-linux.
3566 * linux-ppc-ipa.c: New file.
3567 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3568 includes.
3569 (PPC_FIELD): New macro.
3570 (PPC_SEXT): New macro.
3571 (PPC_OP6): New macro.
3572 (PPC_BO): New macro.
3573 (PPC_LI): New macro.
3574 (PPC_BD): New macro.
3575 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3576 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3577 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3578 (ppc_get_thread_area): New function.
3579 (is_elfv2_inferior): New function.
3580 (gen_ds_form): New function.
3581 (GEN_STD): New macro.
3582 (GEN_STDU): New macro.
3583 (GEN_LD): New macro.
3584 (GEN_LDU): New macro.
3585 (gen_d_form): New function.
3586 (GEN_ADDI): New macro.
3587 (GEN_ADDIS): New macro.
3588 (GEN_LI): New macro.
3589 (GEN_LIS): New macro.
3590 (GEN_ORI): New macro.
3591 (GEN_ORIS): New macro.
3592 (GEN_LWZ): New macro.
3593 (GEN_STW): New macro.
3594 (GEN_STWU): New macro.
3595 (gen_xfx_form): New function.
3596 (GEN_MFSPR): New macro.
3597 (GEN_MTSPR): New macro.
3598 (GEN_MFCR): New macro.
3599 (GEN_MTCR): New macro.
3600 (GEN_SYNC): New macro.
3601 (GEN_LWSYNC): New macro.
3602 (gen_x_form): New function.
3603 (GEN_OR): New macro.
3604 (GEN_MR): New macro.
3605 (GEN_LWARX): New macro.
3606 (GEN_STWCX): New macro.
3607 (GEN_CMPW): New macro.
3608 (gen_md_form): New function.
3609 (GEN_RLDICL): New macro.
3610 (GEN_RLDICR): New macro.
3611 (gen_i_form): New function.
3612 (GEN_B): New macro.
3613 (GEN_BL): New macro.
3614 (gen_b_form): New function.
3615 (GEN_BNE): New macro.
3616 (GEN_LOAD): New macro.
3617 (GEN_STORE): New macro.
3618 (gen_limm): New function.
3619 (gen_atomic_xchg): New function.
3620 (gen_call): New function.
3621 (ppc_relocate_instruction): New function.
3622 (ppc_install_fast_tracepoint_jump_pad): New function.
3623 (ppc_get_min_fast_tracepoint_insn_len): New function.
3624 (ppc_get_ipa_tdesc_idx): New function.
3625 (the_low_target): Wire in the new functions.
3626 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3627 tdescs.
3628 * linux-ppc-tdesc.h: New file.
3629
3630 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3631
3632 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3633 (alloc_jump_pad_buffer): New function.
3634 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3635 (alloc_jump_pad_buffer): New function.
3636 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3637 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3638 (alloc_jump_pad_buffer): New function.
3639 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3640 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3641 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3642 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3643
3644 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3645
3646 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3647 * linux-amd64-ipa.c: Likewise.
3648 * linux-i386-ipa.c: Likewise.
3649 * linux-s390-ipa.c: Likewise.
3650 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3651 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3652 set_trace_state_variable_value_ptr.
3653 (struct ipa_sym_addresses): Likewise.
3654 (symbol_list): Likewise.
3655 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3656 accessing gdb_collect directly.
3657 (gdb_collect_ptr_type): New typedef.
3658 (get_raw_reg_ptr_type): New typedef.
3659 (get_trace_state_variable_value_ptr_type): New typedef.
3660 (set_trace_state_variable_value_ptr_type): New typedef.
3661 (gdb_collect_ptr): New global.
3662 (get_raw_reg_ptr): New global.
3663 (get_trace_state_variable_value_ptr): New global.
3664 (set_trace_state_variable_value_ptr): New global.
3665 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3666 accessing get_raw_reg directly.
3667 (get_get_tsv_func_addr): Likewise for
3668 get_trace_state_variable_value_ptr.
3669 (get_set_tsv_func_addr): Likewise for
3670 set_trace_state_variable_value_ptr.
3671 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3672
3673 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3674
3675 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3676
3677 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3678
3679 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3680 packets.
3681 (relocate_instruction): Remove own_buf.
3682 * server.c (own_buf): Make global.
3683 (handle_v_requests): Make global.
3684 * server.h (own_buf): New declaration.
3685 (handle_v_requests): New prototype.
3686
3687 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3688
3689 PR 18377
3690 * linux-s390-low.c (add_insns): New function.
3691 (s390_emit_prologue): New function.
3692 (s390_emit_epilogue): New function.
3693 (s390_emit_add): New function.
3694 (s390_emit_sub): New function.
3695 (s390_emit_mul): New function.
3696 (s390_emit_lsh): New function.
3697 (s390_emit_rsh_signed): New function.
3698 (s390_emit_rsh_unsigned): New function.
3699 (s390_emit_ext): New function.
3700 (s390_emit_log_not): New function.
3701 (s390_emit_bit_and): New function.
3702 (s390_emit_bit_or): New function.
3703 (s390_emit_bit_xor): New function.
3704 (s390_emit_bit_not): New function.
3705 (s390_emit_equal): New function.
3706 (s390_emit_less_signed): New function.
3707 (s390_emit_less_unsigned): New function.
3708 (s390_emit_ref): New function.
3709 (s390_emit_if_goto): New function.
3710 (s390_emit_goto): New function.
3711 (s390_write_goto_address): New function.
3712 (s390_emit_litpool): New function.
3713 (s390_emit_const): New function.
3714 (s390_emit_call): New function.
3715 (s390_emit_reg): New function.
3716 (s390_emit_pop): New function.
3717 (s390_emit_stack_flush): New function.
3718 (s390_emit_zero_ext): New function.
3719 (s390_emit_swap): New function.
3720 (s390_emit_stack_adjust): New function.
3721 (s390_emit_set_r2): New function.
3722 (s390_emit_int_call_1): New function.
3723 (s390_emit_void_call_2): New function.
3724 (s390_emit_eq_goto): New function.
3725 (s390_emit_ne_goto): New function.
3726 (s390_emit_lt_goto): New function.
3727 (s390_emit_le_goto): New function.
3728 (s390_emit_gt_goto): New function.
3729 (s390_emit_ge_goto): New function.
3730 (s390x_emit_prologue): New function.
3731 (s390x_emit_epilogue): New function.
3732 (s390x_emit_add): New function.
3733 (s390x_emit_sub): New function.
3734 (s390x_emit_mul): New function.
3735 (s390x_emit_lsh): New function.
3736 (s390x_emit_rsh_signed): New function.
3737 (s390x_emit_rsh_unsigned): New function.
3738 (s390x_emit_ext): New function.
3739 (s390x_emit_log_not): New function.
3740 (s390x_emit_bit_and): New function.
3741 (s390x_emit_bit_or): New function.
3742 (s390x_emit_bit_xor): New function.
3743 (s390x_emit_bit_not): New function.
3744 (s390x_emit_equal): New function.
3745 (s390x_emit_less_signed): New function.
3746 (s390x_emit_less_unsigned): New function.
3747 (s390x_emit_ref): New function.
3748 (s390x_emit_if_goto): New function.
3749 (s390x_emit_const): New function.
3750 (s390x_emit_call): New function.
3751 (s390x_emit_reg): New function.
3752 (s390x_emit_pop): New function.
3753 (s390x_emit_stack_flush): New function.
3754 (s390x_emit_zero_ext): New function.
3755 (s390x_emit_swap): New function.
3756 (s390x_emit_stack_adjust): New function.
3757 (s390x_emit_int_call_1): New function.
3758 (s390x_emit_void_call_2): New function.
3759 (s390x_emit_eq_goto): New function.
3760 (s390x_emit_ne_goto): New function.
3761 (s390x_emit_lt_goto): New function.
3762 (s390x_emit_le_goto): New function.
3763 (s390x_emit_gt_goto): New function.
3764 (s390x_emit_ge_goto): New function.
3765 (s390_emit_ops): New function.
3766 (struct linux_target_ops): Fill in emit_ops hook.
3767
3768 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3769
3770 PR 18377
3771 * Makefile.in: Add s390 IPA files.
3772 * configure.srv: Build IPA for s390.
3773 * linux-s390-ipa.c: New file.
3774 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3775 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3776 (tdesc_s390_linux32): Likewise.
3777 (init_registers_s390_linux32v1): Likewise.
3778 (tdesc_s390_linux32v1): Likewise.
3779 (init_registers_s390_linux32v2): Likewise.
3780 (tdesc_s390_linux32v2): Likewise.
3781 (init_registers_s390_linux64): Likewise.
3782 (tdesc_s390_linux64): Likewise.
3783 (init_registers_s390_linux64v1): Likewise.
3784 (tdesc_s390_linux64v1): Likewise.
3785 (init_registers_s390_linux64v2): Likewise.
3786 (tdesc_s390_linux64v2): Likewise.
3787 (init_registers_s390_te_linux64): Likewise.
3788 (tdesc_s390_te_linux64): Likewise.
3789 (init_registers_s390_vx_linux64): Likewise.
3790 (tdesc_s390_vx_linux64): Likewise.
3791 (init_registers_s390_tevx_linux64): Likewise.
3792 (tdesc_s390_tevx_linux64): Likewise.
3793 (init_registers_s390x_linux64): Likewise.
3794 (tdesc_s390x_linux64): Likewise.
3795 (init_registers_s390x_linux64v1): Likewise.
3796 (tdesc_s390x_linux64v1): Likewise.
3797 (init_registers_s390x_linux64v2): Likewise.
3798 (tdesc_s390x_linux64v2): Likewise.
3799 (init_registers_s390x_te_linux64): Likewise.
3800 (tdesc_s390x_te_linux64): Likewise.
3801 (init_registers_s390x_vx_linux64): Likewise.
3802 (tdesc_s390x_vx_linux64): Likewise.
3803 (init_registers_s390x_tevx_linux64): Likewise.
3804 (tdesc_s390x_tevx_linux64): Likewise.
3805 (have_hwcap_s390_vx): New static variable.
3806 (s390_arch_setup): Fill have_hwcap_s390_vx.
3807 (s390_get_thread_area): New function.
3808 (s390_ft_entry_gpr_esa): New const.
3809 (s390_ft_entry_gpr_zarch): New const.
3810 (s390_ft_entry_misc): New const.
3811 (s390_ft_entry_fr): New const.
3812 (s390_ft_entry_vr): New const.
3813 (s390_ft_main_31): New const.
3814 (s390_ft_main_64): New const.
3815 (s390_ft_exit_fr): New const.
3816 (s390_ft_exit_vr): New const.
3817 (s390_ft_exit_misc): New const.
3818 (s390_ft_exit_gpr_esa): New const.
3819 (s390_ft_exit_gpr_zarch): New const.
3820 (append_insns): New function.
3821 (s390_relocate_instruction): New function.
3822 (s390_install_fast_tracepoint_jump_pad): New function.
3823 (s390_get_min_fast_tracepoint_insn_len): New function.
3824 (s390_get_ipa_tdesc_idx): New function.
3825 (struct linux_target_ops): Wire in the above functions.
3826 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3827 * linux-s390-tdesc.h: New file.
3828
3829 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3830
3831 * linux-s390-low.c (s390_supports_tracepoints): New function.
3832 (struct linux_target_ops): Fill supports_tracepoints hook.
3833
3834 2016-03-18 Yao Qi <yao.qi@linaro.org>
3835
3836 * linux-low.c (lwp_signal_can_be_delivered): New function.
3837 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3838
3839 2016-03-18 Yao Qi <yao.qi@linaro.org>
3840
3841 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3842 0 if signal is enqueued. Remove 'signal' from one debugging
3843 message. Move one debugging message to some lines below.
3844 Remove code setting 'signal' to 0.
3845
3846 2016-03-18 Yao Qi <yao.qi@linaro.org>
3847
3848 * linux-low.c (linux_low_filter_event): Remove redundant
3849 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3850
3851 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3852
3853 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3854 (struct linux_target_ops): Wire in the above.
3855
3856 2016-03-03 Yao Qi <yao.qi@linaro.org>
3857
3858 * linux-low.c: Update comments to start_step_over.
3859
3860 2016-03-03 Yao Qi <yao.qi@linaro.org>
3861
3862 PR server/19736
3863 * linux-low.c (handle_extended_wait): Set child suspended
3864 if event_lwp->bp_reinsert isn't zero.
3865
3866 2016-03-02 Yao Qi <yao.qi@linaro.org>
3867
3868 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3869 enqueue_pending_signal.
3870
3871 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3872
3873 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3874 is actually loaded.
3875
3876 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3877
3878 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3879 (s390_regmap_3264) [!__s390x__]: New global.
3880 (s390_collect_ptrace_register): Skip map entries containing -1.
3881 (s390_supply_ptrace_register): Ditto.
3882 (s390_fill_gprs_high): New function.
3883 (s390_store_gprs_high): New function.
3884 (s390_regsets): Add NT_S390_HIGH_GPRS.
3885 (s390_get_hwcap): Enable on 31-bit.
3886 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3887 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3888 Detect NT_S390_HIGH_GPRS.
3889 (s390_usrregs_info_3264): Enable on 31-bit.
3890 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3891 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3892
3893 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3894
3895 PR gdb/13808
3896 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3897 * configure.srv: Ditto.
3898 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3899 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3900 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3901 (init_registers_amd64_linux): Remove prototype.
3902 (tdesc_amd64_linux): Remove declaration.
3903 (get_ipa_tdesc): New function.
3904 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3905 initialize remaining tdescs.
3906 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3907 (init_registers_i386_linux): Remove prototype.
3908 (tdesc_i386_linux): Remove declaration.
3909 (get_ipa_tdesc): New function.
3910 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3911 initialize remaining tdescs.
3912 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3913 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3914 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3915 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3916 (x86_get_ipa_tdesc_idx): New function.
3917 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3918 * linux-x86-tdesc.h: New file.
3919 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3920 (target_get_ipa_tdesc_idx): New macro.
3921 * tracepoint.c (ipa_tdesc_idx): New macro.
3922 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3923 (symbol_list): Add ipa_tdesc_idx.
3924 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3925 (ipa_tdesc): Remove.
3926 (ipa_tdesc_idx): New variable.
3927 (get_context_regcache): Use get_ipa_tdesc.
3928 (gdb_collect): Ditto.
3929 (gdb_probe): Ditto.
3930 * tracepoint.h (get_ipa_tdesc): New prototype.
3931 (ipa_tdesc): Remove.
3932
3933 2016-02-24 Pedro Alves <palves@redhat.com>
3934
3935 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3936 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3937 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3938 Factor out common code between the USE_SIGTRAP_SIGINFO and
3939 !USE_SIGTRAP_SIGINFO blocks.
3940 (linux_low_filter_event): Call save_stop_reason instead of
3941 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3942 Update comments.
3943 (linux_wait_1): Update comments.
3944
3945 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3946
3947 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3948 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3949 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3950 ppc_insert_point, ppc_remove_point.
3951
3952 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3953
3954 * linux-s390-low.c (s390_supports_z_point_type): New function.
3955 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3956
3957 2016-02-16 Yao Qi <yao.qi@linaro.org>
3958
3959 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3960 PC. Get pc from regcache_read_pc.
3961
3962 2016-02-12 Yao Qi <yao.qi@linaro.org>
3963
3964 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3965 or linux_get_pc_32bit.
3966 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3967
3968 2016-02-12 Yao Qi <yao.qi@linaro.org>
3969
3970 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3971 arm_linux_get_next_pcs_fixup.
3972
3973 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3974
3975 * tracepoint.c (x_tracepoint_action_download): Change
3976 write_inferior_data_ptr to write_inferior_data_pointer.
3977 (cmd_qtstart): Likewise.
3978 (write_inferior_data_ptr): Remove.
3979 (download_agent_expr): Change write_inferior_data_ptr to
3980 write_inferior_data_pointer.
3981 (download_tracepoint_1): Likewise.
3982 (download_tracepoint): Likewise.
3983 (download_trace_state_variables): Likewise.
3984
3985 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3986 Marcin Kościelnicki <koriakin@0x04.net>
3987
3988 * tracepoint.c (struct tracepoint_action_ops): Remove.
3989 (struct tracepoint_action): Remove ops.
3990 (m_tracepoint_action_download, r_tracepoint_action_download)
3991 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3992 size and offset accordingly.
3993 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3994 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3995 (tracepoint_action_send, tracepoint_action_download): New functions.
3996 Helpers for trace action handlers.
3997 (add_tracepoint_action): Remove setup actions ops.
3998 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3999
4000 2016-02-10 Yao Qi <yao.qi@linaro.org>
4001
4002 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4003
4004 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4005
4006 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4007 to AC_OUTPUT.
4008 * configure: Regenerate.
4009
4010 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4011
4012 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4013 void * to gdb_byte *.
4014 * linux-low.c (siginfo_fixup): Likewise.
4015 (linux_xfer_siginfo): Likewise.
4016 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4017 Likewise.
4018 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4019
4020 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4021
4022 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4023 to srv_tgtobj.
4024 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4025 to srv_tgtobj.
4026 * linux-x86-low.c [__x86_64__]: Include
4027 "nat/amd64-linux-siginfo.h".
4028 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4029 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4030 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4031 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4032 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4033 (cpt_si_fd, si_timerid, si_overrun): Move from
4034 nat/amd64-linux-siginfo.c.
4035 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4036
4037 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4038
4039 * server.c (skip_to_semicolon): Remove.
4040 (process_point_options): Use strchrnul instead of
4041 skip_to_semicolon.
4042
4043 2016-01-26 Yao Qi <yao.qi@linaro.org>
4044
4045 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4046 * linux-low.c (install_software_single_step_breakpoints): Don't
4047 call regcache_read_pc.
4048 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4049 argument pc.
4050
4051 2016-01-26 Yao Qi <yao.qi@linaro.org>
4052
4053 * linux-low.c (install_software_single_step_breakpoints): Call
4054 regcache_read_pc instead of get_pc.
4055
4056 2016-01-26 Yao Qi <yao.qi@linaro.org>
4057
4058 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4059 (unblock_async_io): Rename to ...
4060 (block_unblock_async_io): ... it. New function.
4061 (enable_async_io): Don't install SIGIO handler. Unblock it
4062 instead.
4063 (disable_async_io): Don't ignore SIGIO. Block it instead.
4064 (initialize_async_io): Install SIGIO handler. Don't call
4065 unblock_async_io.
4066
4067 2016-01-26 Yao Qi <yao.qi@linaro.org>
4068
4069 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4070 first character is '\003', call *the_target->request_interrupt.
4071
4072 2016-01-25 Yao Qi <yao.qi@linaro.org>
4073
4074 * remote-utils.c (new_thread_notify): Remove.
4075 (dead_thread_notify): Likewise.
4076 * remote-utils.h (new_thread_notify): Remove declaration.
4077 (dead_thread_notify): Likewise.
4078
4079 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4080
4081 * gdb.trace/pending.exp: Fix expected message on continue.
4082
4083 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4084
4085 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4086 it works properly on big-endian machines where sizeof (CORE_ADDR)
4087 != sizeof (void *).
4088
4089 2016-01-21 Pedro Alves <palves@redhat.com>
4090
4091 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4092 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4093 * configure: Regenerate.
4094
4095 2016-01-21 Yao Qi <yao.qi@linaro.org>
4096
4097 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4098 is_thumb and set it according to CPSR saved on the stack.
4099 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4100 arm_sigreturn_next_pc.
4101
4102 2016-01-18 Yao Qi <yao.qi@linaro.org>
4103
4104 * linux-low.c (linux_set_pc_64bit): New function.
4105 (linux_get_pc_64bit): New function.
4106 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4107 Declare.
4108 * linux-sparc-low.c (debug_threads): Remove declaration.
4109 (sparc_get_pc): Remove.
4110 (the_low_target): Use linux_get_pc_64bit instead of
4111 sparc_get_pc.
4112 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4113 (the_low_target): Use linux_get_pc_64bit and
4114 linux_set_pc_64bit.
4115
4116 2016-01-18 Yao Qi <yao.qi@linaro.org>
4117
4118 * linux-arm-low.c (debug_threads): Remove declaration.
4119 (arm_get_pc, arm_set_pc): Remove.
4120 (the_low_target): Use linux_get_pc_32bit and
4121 linux_set_pc_32bit.
4122 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4123 (the_low_target): Use linux_get_pc_32bit and
4124 linux_set_pc_32bit.
4125 * linux-cris-low.c (debug_threads): Remove declaration.
4126 (cris_get_pc, cris_set_pc,): Remove.
4127 (the_low_target): Use linux_get_pc_32bit and
4128 linux_set_pc_32bit.
4129 * linux-crisv32-low.c (debug_threads): Remove declaration.
4130 (cris_get_pc, cris_set_pc): Remove.
4131 (the_low_target): Use linux_get_pc_32bit and
4132 linux_set_pc_32bit.
4133 * linux-low.c: Include inttypes.h.
4134 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4135 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4136 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4137 (the_low_target): Use linux_get_pc_32bit and
4138 linux_set_pc_32bit.
4139 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4140 (the_low_target): Use linux_get_pc_32bit and
4141 linux_set_pc_32bit.
4142 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4143 (the_low_target): Use linux_get_pc_32bit and
4144 linux_set_pc_32bit.
4145 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4146 (the_low_target): Use linux_get_pc_32bit and
4147 linux_set_pc_32bit.
4148 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4149 (the_low_target): Use linux_get_pc_32bit and
4150 linux_set_pc_32bit.
4151
4152 2016-01-18 Gary Benson <gbenson@redhat.com>
4153
4154 * configure.ac (AC_FUNC_FORK): New check.
4155 * config.in: Regenerate.
4156 * configure: Likewise.
4157
4158 2016-01-14 Yao Qi <yao.qi@linaro.org>
4159
4160 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4161 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4162 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4163 arm_get_next_pcs_ctor.
4164
4165 2016-01-12 Josh Stone <jistone@redhat.com>
4166 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4167
4168 * inferiors.h: Include "gdb_vecs.h".
4169 (struct process_info): Add syscalls_to_catch.
4170 * inferiors.c (remove_process): Free syscalls_to_catch.
4171 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4172 syscall_return stops.
4173 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4174 * server.c (handle_general_set): Handle QCatchSyscalls.
4175 (handle_query): Report support for QCatchSyscalls.
4176 * target.h (struct target_ops): Add supports_catch_syscall.
4177 (target_supports_catch_syscall): New macro.
4178 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4179 (struct lwp_info): Add syscall_state.
4180 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4181 Maintain syscall_state and syscalls_to_catch across exec.
4182 (get_syscall_trapinfo): New function, proxy to the_low_target.
4183 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4184 (linux_low_filter_event): Toggle syscall_state entry/return for
4185 syscall traps, and set it ignored for all others.
4186 (gdb_catching_syscalls_p): New function.
4187 (gdb_catch_this_syscall_p): New function.
4188 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4189 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4190 (linux_supports_catch_syscall): New function.
4191 (linux_target_ops): Install it.
4192 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4193 (the_low_target): Install it.
4194
4195 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4196
4197 * acinclude.m4: Include new ../warning.m4 file.
4198 * configure: Regenerated.
4199 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4200
4201 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4202
4203 * ax.c (is_goto_target): Mark static.
4204 * linux-low.c (register_addr): Likewise.
4205 (linux_fetch_registers, linux_store_registers): Likewise.
4206 * mem-break.c (any_persistent_commands): Fix old prototype.
4207 (add_commands_to_breakpoint): Mark static.
4208 * regcache.c (find_register_by_name): Delete unused func.
4209 * remote-utils.c (hex_or_minus_one): Mark static.
4210 * server.c (monitor_show_help): Mark static.
4211 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4212 handle_v_requests): Likewise.
4213
4214 2016-01-12 Pedro Alves <palves@redhat.com>
4215
4216 Remove use of the registered trademark symbol throughout.
4217
4218 2016-01-08 Yao Qi <yao.qi@linaro.org>
4219
4220 * remote-utils.c (getpkt): If c is '\003', call target hook
4221 request_interrupt.
4222
4223 2016-01-06 Yao Qi <yao.qi@linaro.org>
4224
4225 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4226 linux-aarch32-low.c.
4227 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4228 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4229 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4230 (thumb2_breakpoint): Declare.
4231 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4232 linux-aarch32-low.h.
4233 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4234 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4235 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4236
4237 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4238
4239 * gdbreplay.c (gdbreplay_version): Change copyright year in
4240 version message.
4241 * server.c (gdbserver_version): Likewise.
4242
4243 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4244
4245 * server.c (crc32_table): Delete.
4246 (crc32): Use libiberty's xcrc32 function.
4247
4248 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4249
4250 * lynx-low.c (lynx_delete_thread_callback): New function.
4251 (lynx_mourn): Properly delete our process and all of its
4252 threads. Remove call to clear_inferiors.
4253
4254 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4255
4256 * target.c (thread_search_callback): Add check that
4257 the thread_stopped target callback is not NULL before
4258 calling it.
4259
4260 2015-12-21 Yao Qi <yao.qi@linaro.org>
4261
4262 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4263 arm breakpoint.
4264
4265 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4266
4267 * server.c (handle_query): Call target_supports_software_single_step.
4268
4269 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4270
4271 * linux-low.c (single_step): New function.
4272 (linux_resume_one_lwp_throw): Call single_step.
4273 (start_step_over): Likewise.
4274
4275 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4276
4277 * Makefile.in (SFILES): Append arch/arm-linux.c,
4278 arch/arm-get-next-pcs.c.
4279 (arm-linux.o): New rule.
4280 (arm-get-next-pcs.o): New rule.
4281 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4282 arm-linux.o.
4283 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4284 to linux-aarch32-low.c.
4285 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4286 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4287 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4288 (thumb2_breakpoint_len): Likewise.
4289 (arm_is_thumb_mode): Make non-static.
4290 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4291 from linux-aarch32-low.c.
4292 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4293 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4294 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4295 (thumb2_breakpoint_len): Likewise.
4296 (arm_is_thumb_mode): New declaration.
4297 * linux-arm-low.c: Include arch/arm-linux.h
4298 aarch/arm-get-next-pcs.h, sys/syscall.h.
4299 (get_next_pcs_ops): New struct.
4300 (get_next_pcs_addr_bits_remove): New function.
4301 (get_next_pcs_is_thumb): New function.
4302 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4303 (arm_sigreturn_next_pc): Likewise.
4304 (get_next_pcs_syscall_next_pc): Likewise.
4305 (arm_gdbserver_get_next_pcs): Likewise.
4306 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4307 Initialize.
4308 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4309 * server.h: Include gdb_vecs.h.
4310
4311 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4312
4313 * Makefile.in (SFILES): Append common/common-regcache.c.
4314 (OBS): Append common-regcache.o.
4315 (common-regcache.o): New rule.
4316 * regcache.c (init_register_cache): Initialize cache to
4317 REG_UNAVAILABLE.
4318 (regcache_raw_read_unsigned): New function.
4319 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4320 register_status enum.
4321
4322 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4323
4324 * linux-aarch64-low.c (the_low_targets): Rename
4325 breakpoint_reinsert_addr to get_next_pcs.
4326 * linux-arm-low.c (the_low_targets): Likewise.
4327 * linux-bfin-low.c (the_low_targets): Likewise.
4328 * linux-cris-low.c (the_low_targets): Likewise.
4329 * linux-crisv32-low.c (the_low_targets): Likewise.
4330 * linux-low.c (can_software_single_step): Likewise.
4331 (install_software_single_step_breakpoints): New function.
4332 (start_step_over): Use install_software_single_step_breakpoints.
4333 * linux-low.h: New CORE_ADDR vector.
4334 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4335 get_next_pcs.
4336 * linux-mips-low.c (the_low_targets): Likewise.
4337 * linux-nios2-low.c (the_low_targets): Likewise.
4338 * linux-sparc-low.c (the_low_targets): Likewise.
4339
4340 2015-12-17 Pedro Alves <palves@redhat.com>
4341
4342 * linux-low.c (linux_kill_one_lwp): Remove references to
4343 LinuxThreads.
4344 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4345 to 'kill'.
4346 (linux_init_signals): Delete.
4347 (initialize_low): Adjust.
4348 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4349
4350 2015-12-16 Pedro Alves <palves@redhat.com>
4351
4352 * configure.ac (compiler warning flags): When testing a
4353 -Wno-foo option, check whether -Wfoo works instead.
4354 * configure: Regenerate.
4355
4356 2015-12-11 Don Breazeal <donb@codesourcery.com>
4357
4358 * server.c (process_serial_event): Don't exit from gdbserver
4359 in remote mode if there are still active inferiors.
4360
4361 2015-12-11 Yao Qi <yao.qi@linaro.org>
4362
4363 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4364 arm_breakpoint_at if the process is 32-bit.
4365
4366 2015-12-11 Yao Qi <yao.qi@linaro.org>
4367
4368 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4369 arm breakpoint.
4370
4371 2015-12-07 Yao Qi <yao.qi@linaro.org>
4372
4373 * configure.srv: Append arm.o to srv_tgtobj for
4374 aarch64*-*-linux* target.
4375 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4376 from linux-arm-low.c.
4377 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4378 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4379 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4380 (thumb2_breakpoint_len): Likewise.
4381 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4382 (arm_breakpoint_kinds): Likewise.
4383 (arm_breakpoint_kind_from_pc): Likewise.
4384 (arm_sw_breakpoint_from_kind): Likewise.
4385 (arm_breakpoint_kind_from_current_state): Likewise.
4386 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4387 (arm_sw_breakpoint_from_kind): Declare.
4388 (arm_breakpoint_kind_from_current_state): Declare.
4389 (arm_breakpoint_at): Declare.
4390 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4391 arm_sw_breakpoint_from_kind if process is 32-bit.
4392 (aarch64_breakpoint_kind_from_pc): New function.
4393 (aarch64_breakpoint_kind_from_current_state): New function.
4394 (the_low_target): Initialize fields breakpoint_kind_from_pc
4395 and breakpoint_kind_from_current_state.
4396 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4397 linux-aarch32-low.c.
4398 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4399 (arm_breakpoint, arm_breakpoint_len): Likewise.
4400 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4401 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4402 (arm_is_thumb_mode): Likewise.
4403 (arm_breakpoint_at): Likewise.
4404 (arm_breakpoint_kind_from_pc): Likewise.
4405 (arm_sw_breakpoint_from_kind): Likewise.
4406 (arm_breakpoint_kind_from_current_state): Likewise.
4407
4408 Revert:
4409 2015-08-04 Yao Qi <yao.qi@linaro.org>
4410
4411 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4412 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4413 * server.c (extended_protocol): Remove "static".
4414 * server.h (extended_protocol): Declare it.
4415
4416 2015-12-04 Josh Stone <jistone@redhat.com>
4417
4418 * target.h (struct target_ops) <arch_setup>: Rename to ...
4419 (struct target_ops) <post_create_inferior>: ... this.
4420 (target_arch_setup): Rename to ...
4421 (target_post_create_inferior): ... this, calling post_create_inferior.
4422 * server.c (start_inferior): Update target_arch_setup calls to
4423 target_post_create_inferior.
4424 * linux-low.c (linux_low_ptrace_options): Forward declare.
4425 (linux_arch_setup): Update its comment for general use.
4426 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4427 (struct linux_target_ops): Use linux_post_create_inferior.
4428 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4429 to post_create_inferior.
4430 * nto-low.c (struct nto_target_ops): Likewise.
4431 * spu-low.c (struct spu_target_ops): Likewise.
4432 * win32-low.c (struct win32_target_ops): Likewise.
4433
4434 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4435
4436 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4437
4438 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4439
4440 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4441 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4442 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4443 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4444 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4445 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4446 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4447 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4448 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4449 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4450 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4451 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4452
4453 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4454
4455 * linux-low.c (linux_look_up_symbols): Don't call
4456 linux_supports_traceclone.
4457 * linux-low.h (thread_db_init): Remove use_events argument.
4458 * thread-db.c (thread_db_use_event): Remove global variable.
4459 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4460 (struct thread_db) <td_create_bp>: Remove field.
4461 (thread_db_create_event): Remove function.
4462 (thread_db_enable_reporting): Likewise.
4463 (find_one_thread): Don't check for thread_db_use_events.
4464 (attach_thread): Likewise.
4465 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4466 (try_thread_db_load_1): Don't check for thread_db_use_events.
4467 (thread_db_init): Remove use_events argument and thread events
4468 handling.
4469 (remove_thread_event_breakpoints): Remove function.
4470 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4471
4472 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4473
4474 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4475 New function.
4476 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4477 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4478 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4479 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4480 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4481 Initialize.
4482 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4483 New function.
4484 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4485 * linux-low.c (can_hardware_single_step): Use
4486 supports_hardware_single_step.
4487 (can_software_single_step): New function.
4488 (start_step_over): Call can_software_single_step.
4489 (linux_supports_hardware_single_step): New function.
4490 (struct target_ops) <supports_software_single_step>: Initialize.
4491 * linux-low.h (struct linux_target_ops)
4492 <supports_hardware_single_step>: Initialize.
4493 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4494 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4495 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4496 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4497 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4498 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4499 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4500 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4501 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4502 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4503 Initialize.
4504 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4505 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4506 Initialize.
4507 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4508 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4509 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4510 New function.
4511 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4512 * target.h (struct target_ops): <supports_software_single_step>:
4513 New field.
4514 (target_supports_software_single_step): New macro.
4515
4516 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4517
4518 * linux-low.c (linux_wait_1): Fix pc advance condition.
4519 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4520 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4521
4522 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4523
4524 * linux-arm-low.c (arm_is_thumb_mode): New function.
4525 (arm_breakpoint_at): Use arm_is_thumb_mode.
4526 (arm_breakpoint_kind_from_current_state): New function.
4527 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4528 Initialize.
4529 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4530 (linux_breakpoint_kind_from_current_state): New function.
4531 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4532 * linux-low.h (struct linux_target_ops)
4533 <breakpoint_kind_from_current_state>: New field.
4534 * target.h (struct target_ops): Likewise.
4535 (target_breakpoint_kind_from_current_state): New macro.
4536
4537 2015-11-30 Pedro Alves <palves@redhat.com>
4538
4539 * linux-low.c (linux_resume): Wake up the event loop before
4540 returning.
4541
4542 2015-11-30 Pedro Alves <palves@redhat.com>
4543
4544 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4545 check.
4546 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4547 to -1.
4548 * target.c (struct thread_search): New structure.
4549 (thread_search_callback): New function.
4550 (prev_general_thread): New global.
4551 (prepare_to_access_memory, done_accessing_memory): New functions.
4552 * target.h (prepare_to_access_memory, done_accessing_memory):
4553 Replace macros with function declarations.
4554
4555 2015-11-30 Pedro Alves <palves@redhat.com>
4556
4557 PR 14618
4558 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4559 report TARGET_WAITKIND_NO_RESUMED.
4560 * remote-utils.c (prepare_resume_reply): Handle
4561 TARGET_WAITKIND_NO_RESUMED.
4562 * server.c (report_no_resumed): New global.
4563 (handle_query) <qSupported>: Handle "no-resumed+". Report
4564 "no-resumed+" support.
4565 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4566 return error if the client doesn't support no-resumed events.
4567 (push_stop_notification): New function.
4568 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4569 events if the client supports them.
4570
4571 2015-11-30 Pedro Alves <palves@redhat.com>
4572
4573 * linux-low.c (thread_still_has_status_pending_p): Don't check
4574 vCont;t here.
4575 (lwp_resumed): New function.
4576 (status_pending_p_callback): Return early if the LWP is not
4577 supposed to be resumed.
4578
4579 2015-11-30 Pedro Alves <palves@redhat.com>
4580
4581 * linux-low.c (handle_extended_wait): Assert that the LWP's
4582 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4583 thread create events, leave the new child's status pending.
4584 (linux_low_filter_event): If GDB wants to hear about thread exit
4585 events, leave the LWP marked dead and don't delete it.
4586 (linux_wait_for_event_filtered): Don't check for thread exit.
4587 (filter_exit_event): New function.
4588 (linux_wait_1): Use it, when returning an exit event.
4589 (linux_resume_one_lwp_throw): Assert that the LWP's
4590 waitstatus is TARGET_WAITKIND_IGNORE.
4591 * remote-utils.c (prepare_resume_reply): Handle
4592 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4593 * server.c (report_thread_events): New global.
4594 (handle_general_set): Handle QThreadEvents.
4595 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4596 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4597 TARGET_WAITKIND_THREAD_EXITED.
4598 * server.h (report_thread_events): Declare.
4599
4600 2015-11-30 Pedro Alves <palves@redhat.com>
4601
4602 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4603 the thread's last_resume_kind was resume_stop.
4604
4605 2015-11-30 Pedro Alves <palves@redhat.com>
4606
4607 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4608 before returning.
4609
4610 2015-11-30 Pedro Alves <palves@redhat.com>
4611
4612 * server.c (handle_v_requests): Handle vCtrlC.
4613
4614 2015-11-30 Pedro Alves <palves@redhat.com>
4615
4616 * gdbthread.h (find_any_thread_of_pid): Declare.
4617 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4618 functions.
4619 * server.c (handle_query): If current_thread is NULL, look for
4620 another thread of the selected process.
4621
4622 2015-11-26 Daniel Colascione <dancol@dancol.org>
4623 Simon Marchi <simon.marchi@ericsson.com>
4624
4625 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4626 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4627 name in reply.
4628 * target.h (struct target_ops) <thread_name>: New field.
4629 (target_thread_name): New macro.
4630
4631 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4632
4633 * regcache.h (regcache_invalidate_pid): Add declaration.
4634 * regcache.c (regcache_invalidate_pid): New function, extracted
4635 from regcache_invalidate.
4636 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4637 Add trivial documentation comment.
4638 * lynx-low.c: Use regcache_invalidate_pid instead of
4639 regcache_invalidate.
4640
4641 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4642
4643 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4644 and Elf64_auxv_t if the target is Android.
4645
4646 2015-11-22 Doug Evans <xdje42@gmail.com>
4647
4648 * target.h: #include <sys/types.h>.
4649
4650 2015-11-19 Pedro Alves <palves@redhat.com>
4651
4652 * linux-low.c (linux_process_qsupported): Change prototype.
4653 Adjust.
4654 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4655 Change prototype.
4656 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4657 and adjust to loop over all features.
4658 * server.c (handle_query) <qSupported>: Adjust to call
4659 target_process_qsupported once, passing it a vector of unprocessed
4660 features.
4661 * target.h (struct target_ops) <process_qsupported>: Change
4662 prototype.
4663 (target_process_qsupported): Adjust.
4664
4665 2015-11-19 Pedro Alves <palves@redhat.com>
4666
4667 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4668 mode.
4669 * configure: Regenerate.
4670
4671 2015-11-19 Pedro Alves <palves@redhat.com>
4672
4673 * configure: Regenerate.
4674
4675 2015-11-19 Yao Qi <yao.qi@linaro.org>
4676
4677 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4678 type to uint32_t.
4679
4680 2015-11-19 Yao Qi <yao.qi@linaro.org>
4681
4682 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4683 (struct aarch64_operand): Move enum out.
4684
4685 2015-11-19 Yao Qi <yao.qi@linaro.org>
4686
4687 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4688 struct user_fpsimd_state *.
4689 (aarch64_store_fpregset): Likewise.
4690
4691 2015-11-19 Yao Qi <yao.qi@linaro.org>
4692
4693 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4694 struct user_pt_regs *.
4695 (aarch64_store_gregset): Likewise.
4696
4697 2015-11-18 Pedro Alves <palves@redhat.com>
4698
4699 * Makefile.in (all_object_files): Add $IPA_OBJS.
4700
4701 2015-11-17 Pedro Alves <palves@redhat.com>
4702
4703 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4704 GDB_SIGNAL_0 and gdb_signal_to_string.
4705
4706 2015-11-17 Pedro Alves <palves@redhat.com>
4707
4708 * win32-low.c (handle_output_debug_string): Remove parameter.
4709 (win32_kill): Remove our_status local and adjust call to
4710 handle_output_debug_string.
4711 (get_child_debug_event): Adjust call to
4712 handle_output_debug_string.
4713
4714 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4715
4716 * linux-mips-low.c (mips_fill_gregset): Add cast.
4717 (mips_store_gregset): Likewise.
4718 (mips_fill_fpregset): Likewise.
4719 (mips_store_fpregset): Likewise.
4720
4721 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4722
4723 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4724 priv.
4725
4726 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4727
4728 * linux-mips-low.c (mips_linux_new_thread): Change type of
4729 watch_type to enum target_hw_bp_type.
4730
4731 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4732
4733 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4734 Change return type to arm_hwbp_type.
4735
4736 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4737
4738 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4739 (arm_store_gregset): Likewise.
4740 * linux-arm-low.c (arm_get_hwcap): Likewise.
4741 (arm_read_description): Likewise.
4742
4743 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4744
4745 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4746
4747 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4748
4749 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4750 (ppc_fill_vsxregset): Likewise.
4751 (ppc_store_vsxregset): Likewise.
4752 (ppc_fill_vrregset): Likewise.
4753 (ppc_store_vrregset): Likewise.
4754 (ppc_fill_evrregset): Likewise.
4755 (ppc_store_evrregset): Likewise.
4756
4757 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4758
4759 * linux-ppc-low.c (ppc_usrregs_info): Remove
4760 forward-declaration.
4761 (ppc_arch_setup): Move lower in file.
4762
4763 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4764
4765 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4766 (ps_pdwrite): Likewise.
4767
4768 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4769
4770 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4771 to after assert checks.
4772
4773 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4774
4775 * proc-service.c (ps_pdread): Add/adjust casts.
4776 (ps_pdwrite): Add/adjust casts.
4777
4778 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4779
4780 * server.c (handle_search_memory_1): Cast return value of
4781 memmem.
4782
4783 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4784
4785 * server.c (write_qxfer_response): Change type of data to
4786 gdb_byte *.
4787
4788 2015-10-29 Pedro Alves <palves@redhat.com>
4789
4790 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4791
4792 2015-10-29 Pedro Alves <palves@redhat.com>
4793
4794 * tracepoint.c (clear_installed_tracepoints): Add casts.
4795
4796 2015-10-29 Pedro Alves <palves@redhat.com>
4797
4798 * server.c (handle_v_cont, process_serial_event): Add enum
4799 gdb_signal casts to signal parsing code.
4800
4801 2015-10-29 Pedro Alves <palves@redhat.com>
4802
4803 * linux-low.h (NULL_REGSET): Define.
4804 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4805 * linux-arm-low.c (arm_regsets): Likewise.
4806 * linux-crisv32-low.c (cris_regsets): Likewise.
4807 * linux-m68k-low.c (m68k_regsets): Likewise.
4808 * linux-mips-low.c (mips_regsets): Likewise.
4809 * linux-nios2-low.c (nios2_regsets): Likewise.
4810 * linux-ppc-low.c (ppc_regsets): Likewise.
4811 * linux-s390-low.c (s390_regsets): Likewise.
4812 * linux-sh-low.c (sh_regsets): Likewise.
4813 * linux-sparc-low.c (sparc_regsets): Likewise.
4814 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4815 * linux-tile-low.c (tile_regsets): Likewise.
4816 * linux-x86-low.c (x86_regsets): Likewise.
4817 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4818
4819 2015-10-29 Pedro Alves <palves@redhat.com>
4820
4821 * linux-low.h (NULL_REGSET): Define.
4822 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4823 * linux-arm-low.c (arm_regsets): Likewise.
4824 * linux-crisv32-low.c (cris_regsets): Likewise.
4825 * linux-m68k-low.c (m68k_regsets): Likewise.
4826 * linux-mips-low.c (mips_regsets): Likewise.
4827 * linux-nios2-low.c (nios2_regsets): Likewise.
4828 * linux-ppc-low.c (ppc_regsets): Likewise.
4829 * linux-s390-low.c (s390_regsets): Likewise.
4830 * linux-sh-low.c (sh_regsets): Likewise.
4831 * linux-sparc-low.c (sparc_regsets): Likewise.
4832 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4833 * linux-tile-low.c (tile_regsets): Likewise.
4834 * linux-x86-low.c (x86_regsets): Likewise.
4835 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4836
4837 2015-10-26 Doug Evans <dje@google.com>
4838
4839 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4840
4841 2015-10-26 Doug Evans <dje@google.com>
4842
4843 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4844
4845 2015-10-26 Doug Evans <dje@google.com>
4846
4847 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4848 for debug_printf.
4849 (attach_thread, find_new_threads_callback): Ditto.
4850
4851 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4852
4853 * mem-break.h (set_breakpoint_data): Remove.
4854
4855 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4856
4857 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4858 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4859 (initialize_low): Remove set_breakpoint_data call.
4860 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4861 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4862 (initialize_low): Remove set_breakpoint_data call.
4863 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4864 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4865 (initialize_low): Remove set_breakpoint_data call.
4866
4867 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4868
4869 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4870 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4871 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4872 * target.h (target_breakpoint_kind_from_pc): New macro.
4873
4874 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4875
4876 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4877 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4878 the default breakpoint kind.
4879
4880 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4881
4882 * linux-arm-low.c (arm_supports_z_point_type): Add software
4883 breakpoint support.
4884
4885 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4886
4887 * linux-arm-low.c: Refactor breakpoint definitions.
4888 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4889 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4890
4891 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4892
4893 * Makefile.in: Add arm.c/o.
4894 * configure.srv: Likewise.
4895 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4896 (arm_breakpoint_kind_from_pc): New function.
4897 (arm_sw_breakpoint_from_kind): Return proper kind.
4898 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4899
4900 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4901
4902 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4903 removal.
4904 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4905 (struct raw_breakpoint) <size>: Remove.
4906 (struct raw_breakpoint) <kind>: Add.
4907 (bp_size): New function.
4908 (bp_opcode): Likewise.
4909 (find_raw_breakpoint_at): Adjust for kind.
4910 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4911 (remove_memory_breakpoint): Adjust for kind call bp_size.
4912 (set_raw_breakpoint_at): Adjust for kind.
4913 (set_breakpoint): Likewise.
4914 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4915 (delete_raw_breakpoint): Adjust for kind.
4916 (delete_breakpoint): Likewise.
4917 (find_gdb_breakpoint): Likewise.
4918 (set_gdb_breakpoint_1): Likewise.
4919 (set_gdb_breakpoint): Likewise.
4920 (delete_gdb_breakpoint_1): Likewise.
4921 (delete_gdb_breakpoint): Likewise.
4922 (uninsert_raw_breakpoint): Likewise.
4923 (reinsert_raw_breakpoint): Likewise.
4924 (set_breakpoint_data): Remove.
4925 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4926 (check_mem_read): Adjust for kind call bp_size.
4927 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4928 (clone_one_breakpoint): Adjust for kind.
4929 * mem-break.h (set_gdb_breakpoint): Likewise.
4930 (delete_gdb_breakpoint): Likewise.
4931 * server.c (process_serial_event): Likewise.
4932
4933 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4934
4935 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4936 (struct linux_target_ops) <breakpoint>: Remove.
4937 (struct linux_target_ops) <breakpoint_len>: Remove.
4938 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4939 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4940 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4941 (arm_sw_breakpoint_from_kind): New function.
4942 * linux-bfin-low.c (bfin_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-cris-low.c (cris_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-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4958 and sw_breakpoint_from_kind to increment the pc.
4959 (linux_breakpoint_kind_from_pc): New function.
4960 (linux_sw_breakpoint_from_kind): New function.
4961 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4962 (initialize_low): Call breakpoint_kind_from_pc and
4963 sw_breakpoint_from_kind to replace breakpoint_data/len.
4964 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4965 New field.
4966 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4967 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4988 (struct linux_target_ops) <breakpoint>: Remove.
4989 (struct linux_target_ops) <breakpoint_len>: Remove.
4990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4991 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4992 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4993 (struct linux_target_ops) <breakpoint>: Remove.
4994 (struct linux_target_ops) <breakpoint_len>: Remove.
4995 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4996 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4997 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4998 (struct linux_target_ops) <breakpoint>: Remove.
4999 (struct linux_target_ops) <breakpoint_len>: Remove.
5000 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5001 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5002 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5003 (struct linux_target_ops) <breakpoint>: Remove.
5004 (struct linux_target_ops) <breakpoint_len>: Remove.
5005 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5006 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5007 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5008 (struct linux_target_ops) <breakpoint>: Remove.
5009 (struct linux_target_ops) <breakpoint_len>: Remove.
5010 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5011 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5012 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5013 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5014 (struct linux_target_ops) <breakpoint>: Remove.
5015 (struct linux_target_ops) <breakpoint_len>: Remove.
5016 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5017 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5018 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5019 (struct linux_target_ops) <breakpoint>: Remove.
5020 (struct linux_target_ops) <breakpoint_len>: Remove.
5021 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5022 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5023
5024 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5025
5026 * linux-cris-low.c (cris_get_pc): Remove void arg.
5027
5028 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5029
5030 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5031 variable name.
5032
5033 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5034
5035 * inferiors.c (thread_pid_matches_callback): New function.
5036 (find_thread_process): New function.
5037 (remove_thread): Reset current_thread.
5038 (remove_process): Assert threads have been removed first.
5039
5040 2015-10-15 Yao Qi <yao.qi@linaro.org>
5041
5042 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5043 if it is 3.
5044 (aarch64_remove_point): Likewise.
5045 * regcache.c (regcache_register_size): New function.
5046
5047 2015-10-12 Yao Qi <yao.qi@linaro.org>
5048
5049 * linux-aarch64-low.c: Update all callers as emit_load_store
5050 is renamed to aarch64_emit_load_store.
5051
5052 2015-10-12 Yao Qi <yao.qi@linaro.org>
5053
5054 * linux-aarch64-low.c: Update all callers of function renaming
5055 from emit_insn to aarch64_emit_insn.
5056
5057 2015-10-12 Yao Qi <yao.qi@linaro.org>
5058
5059 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5060 arch/aarch64-insn.h.
5061 (struct aarch64_memory_operand): Likewise.
5062 (ENCODE): Likewise.
5063 (emit_insn): Move to arch/aarch64-insn.c.
5064 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5065 (emit_load_store): Move to arch/aarch64-insn.c.
5066 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5067 (can_encode_int32): Remove.
5068
5069 2015-10-12 Yao Qi <yao.qi@linaro.org>
5070
5071 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5072 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5073 (aarch64_relocate_instruction): Likewise.
5074 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5075 (struct aarch64_insn_visitor): Likewise.
5076
5077 2015-10-12 Yao Qi <yao.qi@linaro.org>
5078
5079 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5080 (struct aarch64_insn_visitor): New.
5081 (struct aarch64_insn_relocation_data): New.
5082 (aarch64_ftrace_insn_reloc_b): New function.
5083 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5084 (aarch64_ftrace_insn_reloc_cb): Likewise.
5085 (aarch64_ftrace_insn_reloc_tb): Likewise.
5086 (aarch64_ftrace_insn_reloc_adr): Likewise.
5087 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5088 (aarch64_ftrace_insn_reloc_others): Likewise.
5089 (visitor): New.
5090 (aarch64_relocate_instruction): Use visitor.
5091
5092 2015-10-12 Yao Qi <yao.qi@linaro.org>
5093
5094 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5095 int. Add argument buf.
5096 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5097 aarch64_relocate_instruction.
5098
5099 2015-10-12 Yao Qi <yao.qi@linaro.org>
5100
5101 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5102 argument insn. Remove local variable insn. Don't call
5103 target_read_uint32.
5104 (aarch64_install_fast_tracepoint_jump_pad): Call
5105 target_read_uint32.
5106
5107 2015-09-30 Yao Qi <yao.qi@linaro.org>
5108
5109 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5110 (emit_load_store_pair): Likewise.
5111
5112 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5113
5114 * dll.c (match_dll): Add cast(s).
5115 (unloaded_dll): Likewise.
5116 * linux-low.c (second_thread_of_pid_p): Likewise.
5117 (delete_lwp_callback): Likewise.
5118 (count_events_callback): Likewise.
5119 (select_event_lwp_callback): Likewise.
5120 (linux_set_resume_request): Likewise.
5121 * server.c (accumulate_file_name_length): Likewise.
5122 (emit_dll_description): Likewise.
5123 (handle_qxfer_threads_worker): Likewise.
5124 (visit_actioned_threads): Likewise.
5125 * thread-db.c (any_thread_of): Likewise.
5126 * tracepoint.c (same_process_p): Likewise.
5127 (match_blocktype): Likewise.
5128 (build_traceframe_info_xml): Likewise.
5129
5130 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5131
5132 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5133 assignment.
5134 (gdb_unparse_agent_expr): Likewise.
5135 * hostio.c (require_data): Likewise.
5136 (handle_pread): Likewise.
5137 * linux-low.c (disable_regset): Likewise.
5138 (fetch_register): Likewise.
5139 (store_register): Likewise.
5140 (get_dynamic): Likewise.
5141 (linux_qxfer_libraries_svr4): Likewise.
5142 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5143 (set_fast_tracepoint_jump): Likewise.
5144 (uninsert_fast_tracepoint_jumps_at): Likewise.
5145 (reinsert_fast_tracepoint_jumps_at): Likewise.
5146 (validate_inserted_breakpoint): Likewise.
5147 (clone_agent_expr): Likewise.
5148 * regcache.c (init_register_cache): Likewise.
5149 * remote-utils.c (putpkt_binary_1): Likewise.
5150 (decode_M_packet): Likewise.
5151 (decode_X_packet): Likewise.
5152 (look_up_one_symbol): Likewise.
5153 (relocate_instruction): Likewise.
5154 (monitor_output): Likewise.
5155 * server.c (handle_search_memory): Likewise.
5156 (handle_qxfer_exec_file): Likewise.
5157 (handle_qxfer_libraries): Likewise.
5158 (handle_qxfer): Likewise.
5159 (handle_query): Likewise.
5160 (handle_v_cont): Likewise.
5161 (handle_v_run): Likewise.
5162 (captured_main): Likewise.
5163 * target.c (write_inferior_memory): Likewise.
5164 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5165 * tracepoint.c (init_trace_buffer): Likewise.
5166 (add_tracepoint_action): Likewise.
5167 (add_traceframe): Likewise.
5168 (add_traceframe_block): Likewise.
5169 (cmd_qtdpsrc): Likewise.
5170 (cmd_qtdv): Likewise.
5171 (cmd_qtstatus): Likewise.
5172 (response_source): Likewise.
5173 (response_tsv): Likewise.
5174 (cmd_qtnotes): Likewise.
5175 (gdb_collect): Likewise.
5176 (initialize_tracepoint): Likewise.
5177
5178 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5179
5180 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5181 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5182 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5183 <NOP>: New.
5184 (enum aarch64_condition_codes): New enum.
5185 (w0): New static global.
5186 (fp): Likewise.
5187 (lr): Likewise.
5188 (struct aarch64_memory_operand) <type>: New
5189 MEMORY_OPERAND_POSTINDEX type.
5190 (postindex_memory_operand): New helper function.
5191 (emit_ret): New function.
5192 (emit_load_store_pair): New function, factored out of emit_stp
5193 with support for MEMORY_OPERAND_POSTINDEX.
5194 (emit_stp): Rewrite using emit_load_store_pair.
5195 (emit_ldp): New function.
5196 (emit_load_store): Likewise.
5197 (emit_ldr): Mention post-index instruction in comment.
5198 (emit_ldrh): New function.
5199 (emit_ldrb): New function.
5200 (emit_ldrsw): Mention post-index instruction in comment.
5201 (emit_str): Likewise.
5202 (emit_subs): New function.
5203 (emit_cmp): Likewise.
5204 (emit_and): Likewise.
5205 (emit_orr): Likewise.
5206 (emit_orn): Likewise.
5207 (emit_eor): Likewise.
5208 (emit_mvn): Likewise.
5209 (emit_lslv): Likewise.
5210 (emit_lsrv): Likewise.
5211 (emit_asrv): Likewise.
5212 (emit_mul): Likewise.
5213 (emit_sbfm): Likewise.
5214 (emit_sbfx): Likewise.
5215 (emit_ubfm): Likewise.
5216 (emit_ubfx): Likewise.
5217 (emit_csinc): Likewise.
5218 (emit_cset): Likewise.
5219 (emit_nop): Likewise.
5220 (emit_ops_insns): New helper function.
5221 (emit_pop): Likewise.
5222 (emit_push): Likewise.
5223 (aarch64_emit_prologue): New function.
5224 (aarch64_emit_epilogue): Likewise.
5225 (aarch64_emit_add): Likewise.
5226 (aarch64_emit_sub): Likewise.
5227 (aarch64_emit_mul): Likewise.
5228 (aarch64_emit_lsh): Likewise.
5229 (aarch64_emit_rsh_signed): Likewise.
5230 (aarch64_emit_rsh_unsigned): Likewise.
5231 (aarch64_emit_ext): Likewise.
5232 (aarch64_emit_log_not): Likewise.
5233 (aarch64_emit_bit_and): Likewise.
5234 (aarch64_emit_bit_or): Likewise.
5235 (aarch64_emit_bit_xor): Likewise.
5236 (aarch64_emit_bit_not): Likewise.
5237 (aarch64_emit_equal): Likewise.
5238 (aarch64_emit_less_signed): Likewise.
5239 (aarch64_emit_less_unsigned): Likewise.
5240 (aarch64_emit_ref): Likewise.
5241 (aarch64_emit_if_goto): Likewise.
5242 (aarch64_emit_goto): Likewise.
5243 (aarch64_write_goto_address): Likewise.
5244 (aarch64_emit_const): Likewise.
5245 (aarch64_emit_call): Likewise.
5246 (aarch64_emit_reg): Likewise.
5247 (aarch64_emit_pop): Likewise.
5248 (aarch64_emit_stack_flush): Likewise.
5249 (aarch64_emit_zero_ext): Likewise.
5250 (aarch64_emit_swap): Likewise.
5251 (aarch64_emit_stack_adjust): Likewise.
5252 (aarch64_emit_int_call_1): Likewise.
5253 (aarch64_emit_void_call_2): Likewise.
5254 (aarch64_emit_eq_goto): Likewise.
5255 (aarch64_emit_ne_goto): Likewise.
5256 (aarch64_emit_lt_goto): Likewise.
5257 (aarch64_emit_le_goto): Likewise.
5258 (aarch64_emit_gt_goto): Likewise.
5259 (aarch64_emit_ge_got): Likewise.
5260 (aarch64_emit_ops_impl): New static global variable.
5261 (aarch64_emit_ops): New target function, return
5262 &aarch64_emit_ops_impl.
5263 (struct linux_target_ops): Install it.
5264
5265 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5266
5267 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5268 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5269 aarch64-ipa.o.
5270 * linux-aarch64-ipa.c: New file.
5271 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5272 and endian.h.
5273 (aarch64_get_thread_area): New target method.
5274 (extract_signed_bitfield): New helper function.
5275 (aarch64_decode_ldr_literal): New function.
5276 (enum aarch64_opcodes): New enum.
5277 (struct aarch64_register): New struct.
5278 (struct aarch64_operand): New struct.
5279 (x0): New static global.
5280 (x1): Likewise.
5281 (x2): Likewise.
5282 (x3): Likewise.
5283 (x4): Likewise.
5284 (w2): Likewise.
5285 (ip0): Likewise.
5286 (sp): Likewise.
5287 (xzr): Likewise.
5288 (aarch64_register): New helper function.
5289 (register_operand): Likewise.
5290 (immediate_operand): Likewise.
5291 (struct aarch64_memory_operand): New struct.
5292 (offset_memory_operand): New helper function.
5293 (preindex_memory_operand): Likewise.
5294 (enum aarch64_system_control_registers): New enum.
5295 (ENCODE): New macro.
5296 (emit_insn): New helper function.
5297 (emit_b): New function.
5298 (emit_bcond): Likewise.
5299 (emit_cb): Likewise.
5300 (emit_tb): Likewise.
5301 (emit_blr): Likewise.
5302 (emit_stp): Likewise.
5303 (emit_ldp_q_offset): Likewise.
5304 (emit_stp_q_offset): Likewise.
5305 (emit_load_store): Likewise.
5306 (emit_ldr): Likewise.
5307 (emit_ldrsw): Likewise.
5308 (emit_str): Likewise.
5309 (emit_ldaxr): Likewise.
5310 (emit_stxr): Likewise.
5311 (emit_stlr): Likewise.
5312 (emit_data_processing_reg): Likewise.
5313 (emit_data_processing): Likewise.
5314 (emit_add): Likewise.
5315 (emit_sub): Likewise.
5316 (emit_mov): Likewise.
5317 (emit_movk): Likewise.
5318 (emit_mov_addr): Likewise.
5319 (emit_mrs): Likewise.
5320 (emit_msr): Likewise.
5321 (emit_sevl): Likewise.
5322 (emit_wfe): Likewise.
5323 (append_insns): Likewise.
5324 (can_encode_int32_in): New helper function.
5325 (aarch64_relocate_instruction): New function.
5326 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5327 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5328 (struct linux_target_ops): Install aarch64_get_thread_area,
5329 aarch64_install_fast_tracepoint_jump_pad and
5330 aarch64_get_min_fast_tracepoint_insn_len.
5331
5332 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5333
5334 * Makefile.in (aarch64-insn.o): New rule.
5335 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5336
5337 2015-09-21 Yao Qi <yao.qi@linaro.org>
5338
5339 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5340
5341 2015-09-21 Yao Qi <yao.qi@linaro.org>
5342
5343 * tracepoint.c (max_jump_pad_size): Remove.
5344
5345 2015-09-18 Yao Qi <yao.qi@linaro.org>
5346
5347 * linux-aarch64-low.c: Don't include sys/uio.h.
5348 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5349
5350 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5351
5352 * tracepoint.c (eval_result_type): Change prototype.
5353 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5354
5355 2015-09-15 Pedro Alves <palves@redhat.com>
5356
5357 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5358 Check whether to report exec events instead of checking whether
5359 multiprocess is enabled.
5360
5361 2015-09-15 Pedro Alves <palves@redhat.com>
5362
5363 PR remote/18965
5364 * remote-utils.c (prepare_resume_reply): Merge
5365 TARGET_WAITKIND_VFORK_DONE switch case with the
5366 TARGET_WAITKIND_FORKED case.
5367
5368 2015-09-15 Yao Qi <yao.qi@linaro.org>
5369
5370 * server.c (handle_query): Check string comparison using
5371 "else if" instead of "if".
5372
5373 2015-09-15 Yao Qi <yao.qi@linaro.org>
5374
5375 * server.c (vCont_supported): New global variable.
5376 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5377 matches. Append ";vContSupported+" to own_buf.
5378 (handle_v_requests): Append ";s;S" to own_buf if target supports
5379 hardware single step or vCont_supported is false.
5380 (capture_main): Set vCont_supported to zero.
5381
5382 2015-09-15 Yao Qi <yao.qi@linaro.org>
5383
5384 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5385 it to ...
5386 (linux_supports_hardware_single_step): ... New function.
5387 (linux_target_ops): Update.
5388 * lynx-low.c (lynx_target_ops): Set field
5389 supports_hardware_single_step to target_can_do_hardware_single_step.
5390 * nto-low.c (nto_target_ops): Likewise.
5391 * spu-low.c (spu_target_ops): Likewise.
5392 * win32-low.c (win32_target_ops): Likewise.
5393 * target.c (target_can_do_hardware_single_step): New function.
5394 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5395 Remove. <supports_hardware_single_step>: New field.
5396 (target_supports_conditional_breakpoints): Remove.
5397 (target_supports_hardware_single_step): New macro.
5398 (target_can_do_hardware_single_step): Declare.
5399 * server.c (handle_query): Use target_supports_hardware_single_step
5400 instead of target_supports_conditional_breakpoints.
5401
5402 2015-09-15 Yao Qi <yao.qi@linaro.org>
5403
5404 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5405 function.
5406 (struct linux_target_ops the_low_target): Install
5407 aarch64_linux_siginfo_fixup.
5408
5409 2015-09-11 Don Breazeal <donb@codesourcery.com>
5410 Luis Machado <lgustavo@codesourcery.com>
5411
5412 * linux-low.c (linux_mourn): Static declaration.
5413 (linux_arch_setup): Move in front of
5414 handle_extended_wait.
5415 (linux_arch_setup_thread): New function.
5416 (handle_extended_wait): Handle exec events. Call
5417 linux_arch_setup_thread. Make event_lwp argument a
5418 pointer-to-a-pointer.
5419 (check_zombie_leaders): Do not check stopped threads.
5420 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5421 (linux_low_filter_event): Add lwp and thread for exec'ing
5422 non-leader thread if leader thread has been deleted.
5423 Refactor code into linux_arch_setup_thread and call it.
5424 Pass child lwp pointer by reference to handle_extended_wait.
5425 (linux_wait_for_event_filtered): Update comment.
5426 (linux_wait_1): Prevent clobbering exec event status.
5427 (linux_supports_exec_events): New function.
5428 (linux_target_ops) <supports_exec_events>: Initialize new member.
5429 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5430 new member.
5431 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5432 * server.c (report_exec_events): New global variable.
5433 (handle_query): Handle qSupported query for exec-events feature.
5434 (captured_main): Initialize report_exec_events.
5435 * server.h (report_exec_events): Declare new global variable.
5436 * target.h (struct target_ops) <supports_exec_events>: New
5437 member.
5438 (target_supports_exec_events): New macro.
5439 * win32-low.c (win32_target_ops) <supports_exec_events>:
5440 Initialize new member.
5441
5442 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5443
5444 * linux-low.c (linux_low_enable_btrace): Remove.
5445 (linux_target_ops): Replace linux_low_enable_btrace with
5446 linux_enable_btrace.
5447
5448 2015-09-03 Yao Qi <yao.qi@linaro.org>
5449
5450 * linux-aarch64-low.c (aarch64_insert_point): Call
5451 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5452 returns true.
5453
5454 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5455
5456 * linux-low.c (check_stopped_by_breakpoint): Use
5457 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5458
5459 2015-08-27 Pedro Alves <palves@redhat.com>
5460
5461 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5462
5463 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5464
5465 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5466 the XNEW-family equivalent.
5467 (compile_bytecodes): Likewise.
5468 * dll.c (loaded_dll): Likewise.
5469 * event-loop.c (append_callback_event): Likewise.
5470 (create_file_handler): Likewise.
5471 (create_file_event): Likewise.
5472 * hostio.c (handle_open): Likewise.
5473 * inferiors.c (add_thread): Likewise.
5474 (add_process): Likewise.
5475 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5476 * linux-arm-low.c (arm_new_process): Likewise.
5477 (arm_new_thread): Likewise.
5478 * linux-low.c (add_to_pid_list): Likewise.
5479 (linux_add_process): Likewise.
5480 (handle_extended_wait): Likewise.
5481 (add_lwp): Likewise.
5482 (enqueue_one_deferred_signal): Likewise.
5483 (enqueue_pending_signal): Likewise.
5484 (linux_resume_one_lwp_throw): Likewise.
5485 (linux_resume_one_thread): Likewise.
5486 (linux_read_memory): Likewise.
5487 (linux_write_memory): Likewise.
5488 * linux-mips-low.c (mips_linux_new_process): Likewise.
5489 (mips_linux_new_thread): Likewise.
5490 (mips_add_watchpoint): Likewise.
5491 * linux-x86-low.c (initialize_low_arch): Likewise.
5492 * lynx-low.c (lynx_add_process): Likewise.
5493 * mem-break.c (set_raw_breakpoint_at): Likewise.
5494 (set_breakpoint): Likewise.
5495 (add_condition_to_breakpoint): Likewise.
5496 (add_commands_to_breakpoint): Likewise.
5497 (clone_agent_expr): Likewise.
5498 (clone_one_breakpoint): Likewise.
5499 * regcache.c (new_register_cache): Likewise.
5500 * remote-utils.c (look_up_one_symbol): Likewise.
5501 * server.c (queue_stop_reply): Likewise.
5502 (start_inferior): Likewise.
5503 (queue_stop_reply_callback): Likewise.
5504 (handle_target_event): Likewise.
5505 * spu-low.c (fetch_ppc_memory): Likewise.
5506 (store_ppc_memory): Likewise.
5507 * target.c (set_target_ops): Likewise.
5508 * thread-db.c (thread_db_load_search): Likewise.
5509 (try_thread_db_load_1): Likewise.
5510 * tracepoint.c (add_tracepoint): Likewise.
5511 (add_tracepoint_action): Likewise.
5512 (create_trace_state_variable): Likewise.
5513 (cmd_qtdpsrc): Likewise.
5514 (cmd_qtro): Likewise.
5515 (add_while_stepping_state): Likewise.
5516 * win32-low.c (child_add_thread): Likewise.
5517 (get_image_name): Likewise.
5518
5519 2015-08-25 Yao Qi <yao.qi@linaro.org>
5520
5521 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5522
5523 2015-08-25 Yao Qi <yao.qi@linaro.org>
5524
5525 * Makefile.in (aarch64-linux.o): New rule.
5526 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5527 srv_tgtobj.
5528 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5529 (aarch64_init_debug_reg_state): Make it extern.
5530 (aarch64_linux_prepare_to_resume): Remove.
5531
5532 2015-08-25 Yao Qi <yao.qi@linaro.org>
5533
5534 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5535 lwp_arch_private_info and ptid_of_lwp.
5536
5537 2015-08-25 Yao Qi <yao.qi@linaro.org>
5538
5539 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5540 Find proc_info by find_process_pid. All callers updated.
5541
5542 2015-08-25 Yao Qi <yao.qi@linaro.org>
5543
5544 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5545 Remove.
5546 (debug_reg_change_callback): Remove.
5547 (aarch64_notify_debug_reg_change): Remove.
5548
5549 2015-08-25 Yao Qi <yao.qi@linaro.org>
5550
5551 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5552 Call current_lwp_ptid.
5553
5554 2015-08-25 Yao Qi <yao.qi@linaro.org>
5555
5556 * linux-aarch64-low.c (debug_reg_change_callback): Use
5557 debug_printf.
5558
5559 2015-08-25 Yao Qi <yao.qi@linaro.org>
5560
5561 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5562
5563 2015-08-25 Yao Qi <yao.qi@linaro.org>
5564
5565 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5566
5567 2015-08-25 Yao Qi <yao.qi@linaro.org>
5568
5569 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5570 the code.
5571
5572 2015-08-25 Yao Qi <yao.qi@linaro.org>
5573
5574 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5575 Remove.
5576 (debug_reg_change_callback): Remove argument entry and add argument
5577 lwp. Remove local variable thread. Don't print thread id in the
5578 debugging output. Don't check whether pid of thread equals to pid.
5579 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5580 iterate_over_lwps instead find_inferior.
5581
5582 2015-08-24 Pedro Alves <palves@redhat.com>
5583
5584 * inferiors.c (get_first_process): New function.
5585 * inferiors.h (get_first_process): New declaration.
5586 * remote-utils.c (read_ptid): Default to the first process in the
5587 list, instead of to the current thread's process.
5588
5589 2015-08-24 Pedro Alves <palves@redhat.com>
5590
5591 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5592 * event-loop.c: Likewise.
5593 * remote-utils.c: Likewise.
5594 * tracepoint.c: Likewise.
5595
5596 2015-08-24 Pedro Alves <palves@redhat.com>
5597
5598 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5599 ptid_get_lwp.
5600
5601 2015-08-21 Pedro Alves <palves@redhat.com>
5602
5603 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5604 instead of literal 1.
5605
5606 2015-08-21 Pedro Alves <palves@redhat.com>
5607
5608 * tdesc.c (default_description): Explicitly zero-initialize.
5609
5610 2015-08-21 Pedro Alves <palves@redhat.com>
5611
5612 PR gdb/18749
5613 * inferiors.c (remove_thread): Discard any pending stop reply for
5614 this thread.
5615 * server.c (remove_all_on_match_pid): Rename to ...
5616 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5617 instead of a pid.
5618 (discard_queued_stop_replies): Change parameter to a ptid. Now
5619 extern.
5620 (handle_v_kill, kill_inferior_callback, captured_main)
5621 (process_serial_event): Adjust.
5622 * server.h (discard_queued_stop_replies): Declare.
5623
5624 2015-08-21 Pedro Alves <palves@redhat.com>
5625
5626 * linux-low.c (wait_for_sigstop): Always switch to no thread
5627 selected if the previously current thread dies.
5628 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5629 process instead of the current thread's.
5630 * remote-utils.c (input_interrupt): Don't check if there's no
5631 current thread.
5632 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5633 current thread to the general thread fails, error out.
5634 (handle_qxfer_auxv, handle_qxfer_libraries)
5635 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5636 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5637 (handle_query): Check if there's a thread selected instead of
5638 checking whether there's any thread in the thread list.
5639 (handle_qxfer_threads, handle_qxfer_btrace)
5640 (handle_qxfer_btrace_conf): Don't error out early if there's no
5641 thread in the thread list.
5642 (handle_v_cont, myresume): Don't set the current thread to the
5643 continue thread.
5644 (process_serial_event) <Hg handling>: Also set thread_id if the
5645 previous general thread is still alive.
5646 (process_serial_event) <g/G handling>: If setting the current
5647 thread to the general thread fails, error out.
5648 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5649 thread's lwp instead of the current thread's.
5650 * target.c (set_desired_thread): If the desired thread was not
5651 found, leave the current thread pointing to NULL. Return an int
5652 (boolean) indicating success.
5653 * target.h (set_desired_thread): Change return type to int.
5654
5655 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5656
5657 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5658 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5659 #includes.
5660 (ps_get_thread_area): New function.
5661
5662 2015-08-19 Gary Benson <gbenson@redhat.com>
5663
5664 * hostio.c (handle_pread): Do not attempt to read more data
5665 than hostio_reply_with_data can fit in a packet.
5666
5667 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5668
5669 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5670
5671 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5672
5673 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5674
5675 2015-08-06 Pedro Alves <palves@redhat.com>
5676
5677 * tracepoint.c (expr_eval_result): Now an int.
5678
5679 2015-08-06 Pedro Alves <palves@redhat.com>
5680
5681 * gdbthread.h (struct regcache): Forward declare.
5682 (struct thread_info) <regcache_data>: Now a struct regcache
5683 pointer.
5684 * inferiors.c (inferior_regcache_data)
5685 (set_inferior_regcache_data): Now work with struct regcache
5686 pointers.
5687 * inferiors.h (struct regcache): Forward declare.
5688 (inferior_regcache_data, set_inferior_regcache_data): Now work
5689 with struct regcache pointers.
5690 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5691 (free_register_cache_thread): Remove struct regcache pointer
5692 casts.
5693
5694 2015-08-06 Pedro Alves <palves@redhat.com>
5695
5696 * server.c (captured_main): On error, print the exception message
5697 to stderr, and if run_once is set, throw a quit.
5698
5699 2015-08-06 Pedro Alves <palves@redhat.com>
5700
5701 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5702 the current thread.
5703
5704 2015-08-06 Pedro Alves <palves@redhat.com>
5705
5706 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5707 reading beyond the passed in buffer length.
5708
5709 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5710
5711 * tracepoint.c (symbol_list) <required>: Remove.
5712
5713 2015-08-06 Pedro Alves <palves@redhat.com>
5714
5715 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5716 count if stopping and suspending threads.
5717 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5718 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5719 (linux_detach): Complete an ongoing step-over.
5720 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5721 throughout.
5722 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5723 (linux_wait_1): If passing a signal to the inferior after
5724 finishing a step-over, unsuspend and re-resume all lwps. If we
5725 see a single-step event but the thread should be continuing, don't
5726 pass the trap to gdb.
5727 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5728 internal_error instead of gdb_assert.
5729 (enqueue_pending_signal): New function.
5730 (check_ptrace_stopped_lwp_gone): Add debug output.
5731 (start_step_over): Use internal_error instead of gdb_assert.
5732 (complete_ongoing_step_over): New function.
5733 (linux_resume_one_thread): Don't resume a suspended thread.
5734 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5735 it stepping.
5736
5737 2015-08-06 Pedro Alves <palves@redhat.com>
5738
5739 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5740 (linux_thread_alive): Use lwp_is_marked_dead.
5741 (extended_event_reported): Delete.
5742 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5743 instead of extended_event_reported.
5744 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5745 as well.
5746 (lwp_is_marked_dead): New function.
5747 (lwp_running): Use lwp_is_marked_dead.
5748 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5749 comment.
5750
5751 2015-08-06 Pedro Alves <palves@redhat.com>
5752
5753 * linux-low.c (linux_wait_1): Move fork event output out of the
5754 !report_to_gdb check. Pass event_child->waitstatus to
5755 target_waitstatus_to_string instead of ourstatus.
5756
5757 2015-08-04 Yao Qi <yao.qi@linaro.org>
5758
5759 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5760 if current_thread is 32 bit.
5761
5762 2015-08-04 Yao Qi <yao.qi@linaro.org>
5763
5764 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5765 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5766 * server.c (extended_protocol): Remove "static".
5767 * server.h (extended_protocol): Declare it.
5768
5769 2015-08-04 Yao Qi <yao.qi@linaro.org>
5770
5771 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5772 both aarch64 and aarch32.
5773 (aarch64_set_pc): Likewise.
5774
5775 2015-08-04 Yao Qi <yao.qi@linaro.org>
5776
5777 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5778 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5779 arm-with-neon.xml to srv_xmlfiles.
5780 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5781 (is_64bit_tdesc): New function.
5782 (aarch64_linux_read_description): New function.
5783 (aarch64_arch_setup): Call aarch64_linux_read_description.
5784 (regs_info): Rename to regs_info_aarch64.
5785 (aarch64_regs_info): Return right regs_info.
5786 (initialize_low_arch): Call initialize_low_arch_aarch32.
5787
5788 2015-08-04 Yao Qi <yao.qi@linaro.org>
5789
5790 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5791 * linux-aarch32-low.c: New file.
5792 * linux-aarch32-low.h: New file.
5793 * linux-arm-low.c (arm_fill_gregset): Move it to
5794 linux-aarch32-low.c.
5795 (arm_store_gregset): Likewise.
5796 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5797 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5798 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5799 (regs_info): Rename to regs_info_arm.
5800 (arm_regs_info): Return regs_info_aarch32 if
5801 have_ptrace_getregset is 1 and target description is
5802 arm_with_neon or arm_with_vfpv3.
5803 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5804 Call initialize_low_arch_aarch32 instead.
5805
5806 2015-08-04 Yao Qi <yao.qi@linaro.org>
5807
5808 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5809 * linux-low.c: ... here.
5810 * linux-low.h (have_ptrace_getregset): Declare it.
5811
5812 2015-08-04 Pedro Alves <palves@redhat.com>
5813
5814 * thread-db.c (struct thread_db): Use new typedefs.
5815 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5816 CHK calls.
5817 (disable_thread_event_reporting): Cast result of dlsym to
5818 destination function pointer type.
5819 (thread_db_mourn): Use td_ta_delete_ftype.
5820
5821 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5822
5823 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5824 arch variant.
5825 (CDX_BREAKPOINT): Define for R2.
5826 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5827 (the_low_target): Add comments.
5828
5829 2015-07-30 Yao Qi <yao.qi@linaro.org>
5830
5831 * linux-arm-low.c (arm_hwcap): Remove it.
5832 (arm_read_description): New local variable arm_hwcap. Don't
5833 set arm_hwcap to zero.
5834
5835 2015-07-30 Yao Qi <yao.qi@linaro.org>
5836
5837 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5838 Use regcache->tdesc instead.
5839 (arm_store_wmmxregset): Likewise.
5840 (arm_fill_vfpregset): Likewise.
5841 (arm_store_vfpregset): Likewise.
5842
5843 2015-07-30 Yao Qi <yao.qi@linaro.org>
5844
5845 * linux-arm-low.c: Include arch/arm.h.
5846 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5847 (arm_store_gregset): Likewise.
5848
5849 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5850
5851 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5852 ptrace's 4th parameter.
5853
5854 2015-07-27 Yao Qi <yao.qi@linaro.org>
5855
5856 * configure.srv (case aarch64*-*-linux*): Don't set
5857 srv_linux_usrregs.
5858
5859 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5860
5861 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5862 sys/ptrace.h.
5863 * linux-arm-low.c: Likewise.
5864 * linux-cris-low.c: Likewise.
5865 * linux-crisv32-low.c: Likewise.
5866 * linux-low.c: Likewise.
5867 * linux-m68k-low.c: Likewise.
5868 * linux-mips-low.c: Likewise.
5869 * linux-nios2-low.c: Likewise.
5870 * linux-s390-low.c: Likewise.
5871 * linux-sparc-low.c: Likewise.
5872 * linux-tic6x-low.c: Likewise.
5873 * linux-tile-low.c: Likewise.
5874 * linux-x86-low.c: Likewise.
5875
5876 2015-07-24 Pedro Alves <palves@redhat.com>
5877
5878 * config.in: Regenerate.
5879 * configure: Regenerate.
5880
5881 2015-07-24 Pedro Alves <palves@redhat.com>
5882
5883 * acinclude.m4: Include ../ptrace.m4.
5884 * configure.ac: Call GDB_AC_PTRACE.
5885 * config.in, configure: Regenerate.
5886
5887 2015-07-24 Yao Qi <yao.qi@linaro.org>
5888
5889 * linux-low.c (linux_create_inferior): Remove setting to
5890 proc->priv->new_inferior.
5891 (linux_attach): Likewise.
5892 (linux_low_filter_event): Likewise.
5893 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5894
5895 2015-07-24 Yao Qi <yao.qi@linaro.org>
5896
5897 * linux-low.c (linux_arch_setup): New function.
5898 (linux_low_filter_event): If proc->tdesc is NULL and
5899 proc->attached is true, call the_low_target.arch_setup.
5900 Otherwise, keep status pending, and return.
5901 (linux_resume_one_lwp_throw): Don't call get_pc if
5902 thread->while_stepping isn't NULL. Don't call
5903 get_thread_regcache if proc->tdesc is NULL.
5904 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5905 (linux_target_ops): Install arch_setup.
5906 * server.c (start_inferior): Call the_target->arch_setup.
5907 * target.h (struct target_ops) <arch_setup>: New field.
5908 (target_arch_setup): New marco.
5909 * lynx-low.c (lynx_target_ops): Update.
5910 * nto-low.c (nto_target_ops): Update.
5911 * spu-low.c (spu_target_ops): Update.
5912 * win32-low.c (win32_target_ops): Update.
5913
5914 2015-07-24 Yao Qi <yao.qi@linaro.org>
5915
5916 * linux-low.c (linux_add_process): Don't set
5917 proc->priv->new_inferior.
5918 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5919 (linux_attach): Likewise.
5920
5921 2015-07-24 Yao Qi <yao.qi@linaro.org>
5922
5923 * server.c (start_inferior): Code refactor.
5924
5925 2015-07-24 Yao Qi <yao.qi@linaro.org>
5926
5927 * server.c (process_serial_event): Set general_thread.
5928
5929 2015-07-21 Yao Qi <yao.qi@linaro.org>
5930
5931 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5932 aarch64_linux_get_debug_reg_capacity.
5933
5934 2015-07-17 Yao Qi <yao.qi@linaro.org>
5935
5936 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5937 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5938 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5939 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5940 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5941 (AARCH64_HWP_ALIGNMENT): Likewise.
5942 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5943 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5944 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5945 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5946 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5947 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5948 (struct aarch64_debug_reg_state): Likewise.
5949 (struct arch_lwp_info): Likewise.
5950 (aarch64_align_watchpoint): Likewise.
5951 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5952 (aarch64_watchpoint_length): Likewise.
5953 (aarch64_point_encode_ctrl_reg): Likewise
5954 (aarch64_point_is_aligned): Likewise.
5955 (aarch64_align_watchpoint): Likewise.
5956 (aarch64_linux_set_debug_regs):
5957 (aarch64_dr_state_insert_one_point): Likewise.
5958 (aarch64_dr_state_remove_one_point): Likewise.
5959 (aarch64_handle_breakpoint): Likewise.
5960 (aarch64_handle_aligned_watchpoint): Likewise.
5961 (aarch64_handle_unaligned_watchpoint): Likewise.
5962 (aarch64_handle_watchpoint): Likewise.
5963
5964 2015-07-17 Yao Qi <yao.qi@linaro.org>
5965
5966 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5967 and don't aarch64_get_debug_reg_state. All callers update.
5968 (aarch64_handle_aligned_watchpoint): Likewise.
5969 (aarch64_handle_unaligned_watchpoint): Likewise.
5970 (aarch64_handle_watchpoint): Likewise.
5971 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5972 (aarch64_remove_point): Likewise.
5973
5974 2015-07-17 Yao Qi <yao.qi@linaro.org>
5975
5976 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5977 debug_printf.
5978 (aarch64_handle_unaligned_watchpoint): Likewise.
5979
5980 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5981
5982 Revert the previous 3 commits:
5983 Move gdb_regex* to common/
5984 Move linux_find_memory_regions_full & co.
5985 gdbserver build-id attribute generator
5986
5987 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5988 Jan Kratochvil <jan.kratochvil@redhat.com>
5989
5990 gdbserver build-id attribute generator.
5991 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5992 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5993 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5994 (find_phdr): New.
5995 (get_dynamic): Use find_pdhr to traverse program headers.
5996 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5997 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5998 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5999 (get_hex_build_id): New.
6000 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6001 to reply XML document.
6002
6003 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6004 Jan Kratochvil <jan.kratochvil@redhat.com>
6005
6006 * target.c: Include target/target-utils.h and fcntl.h.
6007 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6008 (target_fileio_read_stralloc): New functions.
6009
6010 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6011
6012 * Makefile.in (OBS): Add gdb_regex.o.
6013 (gdb_regex.o): New.
6014 * config.in: Rebuilt.
6015 * configure: Rebuilt.
6016
6017 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6018 Jan Kratochvil <jan.kratochvil@redhat.com>
6019
6020 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6021 * Makefile.in (OBS): Add target-utils.o.
6022 (linux-maps.o, target-utils.o): New.
6023 * configure.srv (srv_linux_obj): Add linux-maps.o.
6024
6025 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6026
6027 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6028 function, return 1.
6029 (the_low_target): Install it.
6030
6031 2015-07-14 Pedro Alves <palves@redhat.com>
6032
6033 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6034 Instead, ignore ECHILD, and throw an error for other errnos.
6035
6036 2015-07-10 Pedro Alves <palves@redhat.com>
6037
6038 * event-loop.c (struct callback_event) <data>: Change type to
6039 gdb_client_data instance instead of gdb_client_data pointer.
6040 (append_callback_event): Adjust.
6041
6042 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6043
6044 * linux-aarch64-low.c: Add comments for each linux_target_ops
6045 method. Remove comments already covered in target_ops and
6046 linux_target_ops definitions.
6047 (the_low_target): Add comments for each unimplemented method.
6048
6049 2015-07-09 Yao Qi <yao.qi@linaro.org>
6050
6051 * linux-aarch64-low.c (aarch64_regmap): Remove.
6052 (aarch64_usrregs_info): Remove.
6053 (regs_info): Set field usrregs to NULL.
6054
6055 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6056
6057 * linux-low.c: Include "rsp-low.h"
6058 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6059 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6060 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6061 (handle_btrace_enable_pt): New.
6062 (handle_btrace_general_set): Support "pt".
6063 (handle_btrace_conf_general_set): Support "pt:size".
6064
6065 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6066
6067 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6068 Z_PACKET_SW_BP.
6069
6070 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6071
6072 * linux-aarch64-low.c: Remove comment about endianness.
6073 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6074 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6075 memcmp.
6076
6077 2015-06-24 Gary Benson <gbenson@redhat.com>
6078
6079 * linux-i386-ipa.c (stdint.h): Do not include.
6080 * lynx-i386-low.c (stdint.h): Likewise.
6081 * lynx-ppc-low.c (stdint.h): Likewise.
6082 * mem-break.c (stdint.h): Likewise.
6083 * thread-db.c (stdint.h): Likewise.
6084 * tracepoint.c (stdint.h): Likewise.
6085 * win32-low.c (stdint.h): Likewise.
6086
6087 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6088
6089 * server.c (write_qxfer_response): Update call to
6090 remote_escape_output.
6091
6092 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6093 Jan Kratochvil <jan.kratochvil@redhat.com>
6094
6095 Merge multiple hex conversions.
6096 * gdbreplay.c (tohex): Rename to 'fromhex'.
6097 (logchar): Use fromhex.
6098
6099 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6100
6101 * server.c (handle_qxfer_libraries): Set `version' attribute for
6102 <library-list>.
6103
6104 2015-06-10 Gary Benson <gbenson@redhat.com>
6105
6106 * target.h (struct target_ops) <multifs_open>: New field.
6107 <multifs_unlink>: Likewise.
6108 <multifs_readlink>: Likewise.
6109 * linux-low.c (nat/linux-namespaces.h): New include.
6110 (linux_target_ops): Initialize the_target->multifs_open,
6111 the_target->multifs_unlink and the_target->multifs_readlink.
6112 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6113 * hostio.c (hostio_fs_pid): New static variable.
6114 (hostio_handle_new_gdb_connection): New function.
6115 (handle_setfs): Likewise.
6116 (handle_open): Use the_target->multifs_open as appropriate.
6117 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6118 (handle_readlink): Use the_target->multifs_readlink as
6119 appropriate.
6120 (handle_vFile): Handle vFile:setfs packets.
6121 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6122 after target_handle_new_gdb_connection.
6123
6124 2015-06-10 Gary Benson <gbenson@redhat.com>
6125
6126 * configure.ac (AC_CHECK_FUNCS): Add setns.
6127 * config.in: Regenerate.
6128 * configure: Likewise.
6129 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6130 (linux-namespaces.o): New rule.
6131 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6132
6133 2015-06-09 Gary Benson <gbenson@redhat.com>
6134
6135 * hostio.c (handle_open): Process mode argument with
6136 fileio_to_host_mode.
6137
6138 2015-06-01 Yao Qi <yao.qi@linaro.org>
6139
6140 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6141 * linux-x86-low.c: Likewise.
6142
6143 2015-05-28 Don Breazeal <donb@codesourcery.com>
6144
6145 * linux-low.c (handle_extended_wait): Initialize
6146 thread_info.last_resume_kind for new fork children.
6147
6148 2015-05-15 Pedro Alves <palves@redhat.com>
6149
6150 * target.h (target_handle_new_gdb_connection): Rewrite using if
6151 wrapped in do/while.
6152
6153 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6154
6155 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6156 * configure, config.in: Regenerate.
6157 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6158 Declare typedef.
6159
6160 2015-05-12 Don Breazeal <donb@codesourcery.com>
6161
6162 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6163 PTRACE_EVENT_VFORK_DONE.
6164 (linux_low_ptrace_options, extended_event_reported): Add vfork
6165 events.
6166 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6167 and "vforkdone" for RSP 'T' Stop Reply Packet.
6168 * server.h (report_vfork_events): Declare
6169 global variable.
6170
6171 2015-05-12 Don Breazeal <donb@codesourcery.com>
6172
6173 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6174 (the_low_target) <new_fork>: Initialize new member.
6175 * linux-arm-low.c (arm_new_fork): New function.
6176 (the_low_target) <new_fork>: Initialize new member.
6177 * linux-low.c (handle_extended_wait): Call new target function
6178 new_fork.
6179 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6180 * linux-mips-low.c (mips_add_watchpoint): New function
6181 extracted from mips_insert_point.
6182 (the_low_target) <new_fork>: Initialize new member.
6183 (mips_linux_new_fork): New function.
6184 (mips_insert_point): Call mips_add_watchpoint.
6185 * linux-x86-low.c (x86_linux_new_fork): New function.
6186 (the_low_target) <new_fork>: Initialize new member.
6187
6188 2015-05-12 Don Breazeal <donb@codesourcery.com>
6189
6190 * linux-low.c (handle_extended_wait): Implement return value,
6191 rename argument 'event_child' to 'event_lwp', handle
6192 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6193 (linux_low_ptrace_options): New function.
6194 (linux_low_filter_event): Call linux_low_ptrace_options,
6195 use different argument fo linux_enable_event_reporting,
6196 use return value from handle_extended_wait.
6197 (extended_event_reported): New function.
6198 (linux_wait_1): Call extended_event_reported and set
6199 status to report fork events.
6200 (linux_write_memory): Add pid to debug message.
6201 (reset_lwp_ptrace_options_callback): New function.
6202 (linux_handle_new_gdb_connection): New function.
6203 (linux_target_ops): Initialize new structure member.
6204 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6205 * lynx-low.c: Initialize new structure member.
6206 * remote-utils.c (prepare_resume_reply): Implement stop reason
6207 "fork" for "T" stop message.
6208 * server.c (handle_query): Call handle_new_gdb_connection.
6209 * server.h (report_fork_events): Declare global flag.
6210 * target.h (struct target_ops) <handle_new_gdb_connection>:
6211 New member.
6212 (target_handle_new_gdb_connection): New macro.
6213 * win32-low.c: Initialize new structure member.
6214
6215 2015-05-12 Don Breazeal <donb@codesourcery.com>
6216
6217 * mem-break.c (APPEND_TO_LIST): Define macro.
6218 (clone_agent_expr): New function.
6219 (clone_one_breakpoint): New function.
6220 (clone_all_breakpoints): New function.
6221 * mem-break.h: Declare new functions.
6222
6223 2015-05-12 Don Breazeal <donb@codesourcery.com>
6224
6225 * linux-low.c (linux_supports_fork_events): New function.
6226 (linux_supports_vfork_events): New function.
6227 (linux_target_ops): Initialize new structure members.
6228 (initialize_low): Call linux_check_ptrace_features.
6229 * lynx-low.c (lynx_target_ops): Initialize new structure
6230 members.
6231 * server.c (report_fork_events, report_vfork_events):
6232 New global flags.
6233 (handle_query): Add new features to qSupported packet and
6234 response.
6235 (captured_main): Initialize new global variables.
6236 * target.h (struct target_ops) <supports_fork_events>:
6237 New member.
6238 <supports_vfork_events>: New member.
6239 (target_supports_fork_events): New macro.
6240 (target_supports_vfork_events): New macro.
6241 * win32-low.c (win32_target_ops): Initialize new structure
6242 members.
6243
6244 2015-05-12 Gary Benson <gbenson@redhat.com>
6245
6246 * server.c (handle_qxfer_exec_file): Use current process
6247 if annex is empty.
6248
6249 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6250
6251 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6252 Remove HAVE_PTRACE_GETREGS conditionals.
6253 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6254 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6255
6256 2015-05-08 Yao Qi <yao.qi@linaro.org>
6257
6258 * linux-low.c (linux_supports_conditional_breakpoints): New
6259 function.
6260 (linux_target_ops): Install new target method.
6261 * lynx-low.c (lynx_target_ops): Install NULL hook for
6262 supports_conditional_breakpoints.
6263 * nto-low.c (nto_target_ops): Likewise.
6264 * spu-low.c (spu_target_ops): Likewise.
6265 * win32-low.c (win32_target_ops): Likewise.
6266 * server.c (handle_query): Check
6267 target_supports_conditional_breakpoints.
6268 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6269 New field.
6270 (target_supports_conditional_breakpoints): New macro.
6271
6272 2015-05-06 Pedro Alves <palves@redhat.com>
6273
6274 PR server/18081
6275 * server.c (start_inferior): If the process exits, mourn it.
6276
6277 2015-04-21 Gary Benson <gbenson@redhat.com>
6278
6279 * hostio.c (fileio_open_flags_to_host): Factored out to
6280 fileio_to_host_openflags in common/fileio.c. Single use
6281 updated.
6282
6283 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6284
6285 * linux-xtensa-low.c (xtensa_fill_gregset)
6286 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6287 XCHAL_HAVE_LOOP.
6288
6289 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6290
6291 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6292 (regs_info): Replace usrregs pointer with NULL.
6293
6294 2015-04-17 Gary Benson <gbenson@redhat.com>
6295
6296 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6297 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6298 * server.c (handle_qxfer_exec_file): New function.
6299 (qxfer_packets): Add exec-file entry.
6300 (handle_query): Report qXfer:exec-file:read as supported packet.
6301
6302 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6303
6304 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6305
6306 2015-04-09 Gary Benson <gbenson@redhat.com>
6307
6308 * hostio-errno.c (errno_to_fileio_error): Remove function.
6309 Update caller to use remote_fileio_to_fio_error.
6310
6311 2015-04-09 Yao Qi <yao.qi@linaro.org>
6312
6313 * linux-low.c (linux_insert_point): Call
6314 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6315 (linux_remove_point): Call remove_memory_breakpoint if type is
6316 raw_bkpt_type_sw.
6317 * linux-x86-low.c (x86_insert_point): Don't call
6318 insert_memory_breakpoint.
6319 (x86_remove_point): Don't call remove_memory_breakpoint.
6320
6321 2015-04-01 Pedro Alves <palves@redhat.com>
6322 Cleber Rosa <crosa@redhat.com>
6323
6324 * server.c (gdbserver_usage): Reorganize and extend the usage
6325 message.
6326
6327 2015-03-24 Pedro Alves <palves@redhat.com>
6328
6329 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6330 output. Also dump TRAP_TRACE.
6331 (linux_low_filter_event): In debug output, distinguish a
6332 resume_stop SIGSTOP from a delayed SIGSTOP.
6333
6334 2015-03-24 Gary Benson <gbenson@redhat.com>
6335
6336 * linux-x86-low.c (x86_linux_new_thread): Moved to
6337 nat/x86-linux.c.
6338 (x86_linux_prepare_to_resume): Likewise.
6339
6340 2015-03-24 Gary Benson <gbenson@redhat.com>
6341
6342 * Makefile.in (x86-linux-dregs.o): New rule.
6343 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6344 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6345 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6346 (x86_linux_dr_get): Likewise.
6347 (x86_linux_dr_set): Likewise.
6348 (update_debug_registers_callback): Likewise.
6349 (x86_linux_dr_set_addr): Likewise.
6350 (x86_linux_dr_get_addr): Likewise.
6351 (x86_linux_dr_set_control): Likewise.
6352 (x86_linux_dr_get_control): Likewise.
6353 (x86_linux_dr_get_status): Likewise.
6354 (x86_linux_update_debug_registers): Likewise.
6355
6356 2015-03-24 Gary Benson <gbenson@redhat.com>
6357
6358 * linux-x86-low.c (x86_linux_update_debug_registers):
6359 New function, factored out from...
6360 (x86_linux_prepare_to_resume): ...this.
6361
6362 2015-03-24 Gary Benson <gbenson@redhat.com>
6363
6364 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6365 (x86_linux_dr_set): Likewise.
6366 (update_debug_registers_callback): Likewise.
6367 (x86_linux_dr_set_addr): Likewise.
6368 (x86_linux_dr_get_addr): Likewise.
6369 (x86_linux_dr_set_control): Likewise.
6370 (x86_linux_dr_get_control): Likewise.
6371 (x86_linux_dr_get_status): Likewise.
6372 (x86_linux_prepare_to_resume): Likewise.
6373
6374 2015-03-24 Gary Benson <gbenson@redhat.com>
6375
6376 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6377 Use perror_with_name. Pass string through gettext.
6378 (x86_linux_dr_set): Likewise.
6379
6380 2015-03-24 Gary Benson <gbenson@redhat.com>
6381
6382 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6383 (x86_linux_dr_set_addr): ...this.
6384 (x86_dr_low_get_addr): Rename to...
6385 (x86_linux_dr_get_addr): ...this.
6386 (x86_dr_low_set_control): Rename to...
6387 (x86_linux_dr_set_control): ...this.
6388 (x86_dr_low_get_control): Rename to...
6389 (x86_linux_dr_get_control): ...this.
6390 (x86_dr_low_get_status): Rename to...
6391 (x86_linux_dr_get_status): ...this.
6392 (x86_dr_low): Update with new function names.
6393
6394 2015-03-24 Gary Benson <gbenson@redhat.com>
6395
6396 * Makefile.in (x86-linux.o): New rule.
6397 * configure.srv: Add x86-linux.o to relevant targets.
6398 * linux-low.c (lwp_set_arch_private_info): New function.
6399 (lwp_arch_private_info): Likewise.
6400 * linux-x86-low.c: Include nat/x86-linux.h.
6401 (arch_lwp_info): Removed structure.
6402 (update_debug_registers_callback):
6403 Use lwp_set_debug_registers_changed.
6404 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6405 and lwp_set_debug_registers_changed.
6406 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6407
6408 2015-03-24 Gary Benson <gbenson@redhat.com>
6409
6410 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6411 * linux-arm-low.c (arm_new_thread): Likewise.
6412 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6413 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6414 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6415 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6416
6417 2015-03-24 Gary Benson <gbenson@redhat.com>
6418
6419 * linux-low.c (ptid_of_lwp): New function.
6420 (lwp_is_stopped): Likewise.
6421 (lwp_stop_reason): Likewise.
6422 * linux-x86-low.c (update_debug_registers_callback):
6423 Use lwp_is_stopped.
6424 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6425 lwp_stop_reason.
6426
6427 2015-03-24 Gary Benson <gbenson@redhat.com>
6428
6429 * linux-low.h (linux_stop_lwp): Remove declaration.
6430
6431 2015-03-24 Gary Benson <gbenson@redhat.com>
6432
6433 * linux-low.h: Include nat/linux-nat.h.
6434 * linux-low.c (iterate_over_lwps_args): New structure.
6435 (iterate_over_lwps_filter): New function.
6436 (iterate_over_lwps): Likewise.
6437 * linux-x86-low.c (update_debug_registers_callback):
6438 Update signature to what iterate_over_lwps expects.
6439 Remove PID check that iterate_over_lwps now performs.
6440 (x86_dr_low_set_addr): Use iterate_over_lwps.
6441 (x86_dr_low_set_control): Likewise.
6442
6443 2015-03-24 Gary Benson <gbenson@redhat.com>
6444
6445 * linux-x86-low.c (x86_debug_reg_state): New function.
6446 (x86_linux_prepare_to_resume): Use the above.
6447
6448 2015-03-24 Gary Benson <gbenson@redhat.com>
6449
6450 * linux-low.c (current_lwp_ptid): New function.
6451 * linux-x86-low.c: Include nat/linux-nat.h.
6452 (x86_dr_low_get_addr): Use current_lwp_ptid.
6453 (x86_dr_low_get_control): Likewise.
6454 (x86_dr_low_get_status): Likewise.
6455
6456 2015-03-20 Pedro Alves <palves@redhat.com>
6457
6458 * tracepoint.c (cmd_qtstatus): Make "str" const.
6459
6460 2015-03-20 Pedro Alves <palves@redhat.com>
6461
6462 * server.c (handle_general_set): Make "req_str" const.
6463
6464 2015-03-19 Pedro Alves <palves@redhat.com>
6465
6466 * linux-low.c (linux_resume_one_lwp): Rename to ...
6467 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6468 instead call perror_with_name.
6469 (check_ptrace_stopped_lwp_gone): New function.
6470 (linux_resume_one_lwp): Reimplement as wrapper around
6471 linux_resume_one_lwp_throw that swallows errors if the LWP is
6472 gone.
6473
6474 2015-03-19 Pedro Alves <palves@redhat.com>
6475
6476 * linux-low.c (count_events_callback, select_event_lwp_callback):
6477 No longer check whether the thread has resume_stop as last resume
6478 kind.
6479
6480 2015-03-19 Pedro Alves <palves@redhat.com>
6481
6482 * linux-low.c (count_events_callback, select_event_lwp_callback):
6483 Use the lwp's status_pending_p field, not the thread's.
6484
6485 2015-03-19 Pedro Alves <palves@redhat.com>
6486
6487 * linux-low.c (select_event_lwp_callback): Update comments to
6488 no longer mention SIGTRAP.
6489
6490 2015-03-18 Gary Benson <gbenson@redhat.com>
6491
6492 * server.c (handle_query): Do not report vFile:fstat as supported.
6493
6494 2015-03-11 Gary Benson <gbenson@redhat.com>
6495
6496 * hostio.c (sys/types.h): New include.
6497 (sys/stat.h): Likewise.
6498 (common-remote-fileio.h): Likewise.
6499 (handle_fstat): New function.
6500 (handle_vFile): Handle vFile:fstat packets.
6501
6502 2015-03-11 Gary Benson <gbenson@redhat.com>
6503
6504 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6505 struct stat.st_blocks and struct stat.st_blksize.
6506 * configure: Regenerate.
6507 * config.in: Likewise.
6508 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6509 (OBS): Add common-remote-fileio.o.
6510 (common-remote-fileio.o): New rule.
6511
6512 2015-03-09 Pedro Alves <palves@redhat.com>
6513
6514 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6515 'struct sockaddr' pointer in 'accept' call.
6516
6517 2015-03-09 Pedro Alves <palves@redhat.com>
6518
6519 Revert:
6520 2015-03-07 Pedro Alves <palves@redhat.com>
6521 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6522 or <winsock2.h> here. Instead include "gdb_socket.h".
6523 (remote_open): Use union gdb_sockaddr_u.
6524 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6525 or <winsock2.h> here. Instead include "gdb_socket.h".
6526 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6527 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6528 or <sys/un.h>.
6529 (init_named_socket, gdb_agent_helper_thread): Use union
6530 gdb_sockaddr_u.
6531
6532 2015-03-07 Pedro Alves <palves@redhat.com>
6533
6534 * configure.ac (build_warnings): Move
6535 -Wdeclaration-after-statement to the C-specific set.
6536 * configure: Regenerate.
6537
6538 2015-03-07 Pedro Alves <palves@redhat.com>
6539
6540 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6541 or <winsock2.h> here. Instead include "gdb_socket.h".
6542 (remote_open): Use union gdb_sockaddr_u.
6543 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6544 or <winsock2.h> here. Instead include "gdb_socket.h".
6545 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6546 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6547 or <sys/un.h>.
6548 (init_named_socket, gdb_agent_helper_thread): Use union
6549 gdb_sockaddr_u.
6550
6551 2015-03-07 Pedro Alves <palves@redhat.com>
6552
6553 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6554 instead.
6555
6556 2015-03-06 Yao Qi <yao.qi@linaro.org>
6557
6558 * linux-aarch64-low.c (aarch64_insert_point): Use
6559 show_debug_regs as a boolean.
6560 (aarch64_remove_point): Likewise.
6561
6562 2015-03-05 Pedro Alves <palves@redhat.com>
6563
6564 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6565 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6566 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6567 * nto-low.c (nto_target_ops): Likewise.
6568 * spu-low.c (spu_target_ops): Likewise.
6569 * win32-low.c (win32_target_ops): Likewise.
6570
6571 2015-03-04 Pedro Alves <palves@redhat.com>
6572
6573 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6574 Decide whether a breakpoint triggered based on the SIGTRAP's
6575 siginfo.si_code.
6576 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6577 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6578 (linux_low_filter_event): Check for breakpoints before checking
6579 watchpoints.
6580 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6581 siginfo.si_code.
6582 (linux_stopped_by_sw_breakpoint)
6583 (linux_supports_stopped_by_sw_breakpoint)
6584 (linux_stopped_by_hw_breakpoint)
6585 (linux_supports_stopped_by_hw_breakpoint): New functions.
6586 (linux_target_ops): Install new target methods.
6587
6588 2015-03-04 Pedro Alves <palves@redhat.com>
6589
6590 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6591 * server.c (swbreak_feature, hwbreak_feature): New globals.
6592 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6593 (captured_main): Clear swbreak_feature and hwbreak_feature.
6594 * server.h (swbreak_feature, hwbreak_feature): Declare.
6595 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6596 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6597 supports_stopped_by_hw_breakpoint>: New fields.
6598 (target_supports_stopped_by_sw_breakpoint)
6599 (target_stopped_by_sw_breakpoint)
6600 (target_supports_stopped_by_hw_breakpoint)
6601 (target_stopped_by_hw_breakpoint): Declare.
6602
6603 2015-03-04 Pedro Alves <palves@redhat.com>
6604
6605 enum lwp_stop_reason -> enum target_stop_reason
6606 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6607 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6608 (linux_wait_1, stuck_in_jump_pad_callback)
6609 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6610 (linux_stopped_by_watchpoint):
6611 * linux-low.h (enum lwp_stop_reason): Delete.
6612 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6613 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6614
6615 2015-03-04 Yao Qi <yao.qi@linaro.org>
6616
6617 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6618
6619 2015-03-03 Gary Benson <gbenson@redhat.com>
6620
6621 * hostio.c (handle_vFile): Fix prefix lengths.
6622
6623 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6624
6625 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6626 ptr_bits.
6627
6628 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6629
6630 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6631 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6632 (clean): Add "rm -f" for above C files.
6633 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6634 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6635 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6636 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6637 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6638 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6639 (init_registers_s390x_vx_linux64)
6640 (init_registers_s390x_tevx_linux64)
6641 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6642 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6643 declarations.
6644 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6645 (s390_store_vxrs_high): New functions.
6646 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6647 NT_S390_VXRS_HIGH.
6648 (s390_arch_setup): Add logic for selecting one of the new target
6649 descriptions. Activate the new vector regsets if applicable.
6650 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6651 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6652 and init_registers_s390x_tevx_linux64.
6653
6654 2015-03-01 Pedro Alves <palves@redhat.com>
6655
6656 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6657 parameter.
6658
6659 2015-02-27 Pedro Alves <palves@redhat.com>
6660
6661 * linux-x86-low.c (u_debugreg_offset): New function.
6662 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6663
6664 2015-02-27 Pedro Alves <palves@redhat.com>
6665
6666 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6667 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6668 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6669 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6670 (ps_lsetfpregs, ps_getpid)
6671 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6672 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6673 (ps_lsetxregs, ps_plog): Declare.
6674
6675 2015-02-27 Pedro Alves <palves@redhat.com>
6676
6677 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6678 IP_AGENT_EXPORT_FUNC.
6679 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6680 IP_AGENT_EXPORT_FUNC.
6681 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6682 (IP_AGENT_EXPORT): Delete.
6683 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6684 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6685 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6686 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6687 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6688 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6689 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6690 (traceframe_read_count, traceframe_write_count)
6691 (traceframes_created, trace_state_variables, get_raw_reg)
6692 (get_trace_state_variable_value, set_trace_state_variable_value)
6693 (ust_loaded, helper_thread_id, cmd_buf): Use
6694 IPA_SYM_EXPORTED_NAME.
6695 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6696 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6697 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6698 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6699 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6700 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6701 EXTERN_C_PUSH/EXTERN_C_POP.
6702 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6703 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6704 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6705 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6706 (traceframe_write_count, traceframe_read_count)
6707 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6708 (about_to_request_buffer_space, get_trace_state_variable_value)
6709 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6710 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6711 EXTERN_C_PUSH/EXTERN_C_POP.
6712 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6713 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6714 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6715 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6716 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6717 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6718 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6719 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6720 Define.
6721 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6722 (IP_AGENT_EXPORT_VAR_DECL): Define.
6723 (tracing): Declare.
6724 (gdb_agent_get_raw_reg): Declare.
6725
6726 2015-02-27 Tom Tromey <tromey@redhat.com>
6727 Pedro Alves <palves@redhat.com>
6728
6729 Rename symbols whose names are reserved C++ keywords throughout.
6730
6731 2015-02-27 Pedro Alves <palves@redhat.com>
6732
6733 * Makefile.in (COMPILER): New, get it from autoconf.
6734 (CXX): Get from autoconf instead.
6735 (COMPILE.pre): Use COMPILER.
6736 (CC-LD): Rename to ...
6737 (CC_LD): ... this. Use COMPILER.
6738 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6739 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6740 * acinclude.m4: Include build-with-cxx.m4.
6741 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6742 Disable -Werror by default if building in C++ mode.
6743 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6744 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6745 the C++ compiler. Save/restore CXXFLAGS too.
6746 * configure: Regenerate.
6747
6748 2015-02-27 Pedro Alves <palves@redhat.com>
6749
6750 * acinclude.m4: Include libiberty.m4.
6751 * configure.ac: Call libiberty_INIT.
6752 * config.in, configure: Regenerate.
6753
6754 2015-02-26 Pedro Alves <palves@redhat.com>
6755
6756 * linux-low.c (linux_wait_1): When incrementing the PC past a
6757 program breakpoint always use the_low_target.breakpoint_len as
6758 increment, rather than the maximum between that and
6759 the_low_target.decr_pc_after_break.
6760
6761 2015-02-23 Pedro Alves <palves@redhat.com>
6762
6763 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6764 thread was doing a step-over; always adjust the PC if
6765 we stepped over a permanent breakpoint.
6766 (linux_wait_1): If we stepped over breakpoint that was on top of a
6767 permanent breakpoint, manually advance the PC past it.
6768
6769 2015-02-23 Pedro Alves <palves@redhat.com>
6770
6771 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6772 modes.
6773 (x86_fill_gregset, x86_store_gregset): Use it when handling
6774 $orig_eax.
6775
6776 2015-02-20 Pedro Alves <palves@redhat.com>
6777
6778 * thread-db.c: Include "nat/linux-procfs.h".
6779 (thread_db_init): Skip listing new threads if the kernel supports
6780 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6781
6782 2015-02-20 Pedro Alves <palves@redhat.com>
6783
6784 * linux-low.c (status_pending_p_callback): Use ptid_match.
6785
6786 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6787
6788 PR breakpoints/16812
6789 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6790 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6791 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6792
6793 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6794
6795 PR breakpoints/15956
6796 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6797
6798 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6799
6800 * linux-low.c (linux_low_btrace_conf): Print size.
6801 * server.c (handle_btrace_conf_general_set): New.
6802 (hanle_general_set): Call handle_btrace_conf_general_set.
6803 (handle_query): Report Qbtrace-conf:bts:size as supported.
6804
6805 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6806
6807 * linux-low.c (linux_low_enable_btrace): Update parameters.
6808 (linux_low_btrace_conf): New.
6809 (linux_target_ops)<to_btrace_conf>: Initialize.
6810 * server.c (current_btrace_conf): New.
6811 (handle_btrace_enable): Rename to ...
6812 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6813 to target_enable_btrace. Update comment. Update users.
6814 (handle_qxfer_btrace_conf): New.
6815 (qxfer_packets): Add btrace-conf entry.
6816 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6817 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6818 (target_ops)<read_btrace_conf>: New.
6819 (target_enable_btrace): Update parameters.
6820 (target_read_btrace_conf): New.
6821
6822 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6823
6824 * server.c (handle_btrace_general_set): Remove call to
6825 target_supports_btrace.
6826 (supported_btrace_packets): New.
6827 (handle_query): Call supported_btrace_packets.
6828 * target.h: include btrace-common.h.
6829 (btrace_target_info): Removed.
6830 (supports_btrace, target_supports_btrace): Update parameters.
6831
6832 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6833
6834 * Makefile.in (SFILES): Add common/btrace-common.c.
6835 (OBS): Add common/btrace-common.o.
6836 (btrace-common.o): Add build rules.
6837 * linux-low: Include btrace-common.h.
6838 (linux_low_read_btrace): Use struct btrace_data. Call
6839 btrace_data_init and btrace_data_fini.
6840
6841 2015-02-06 Pedro Alves <palves@redhat.com>
6842
6843 * thread-db.c (find_new_threads_callback): Add debug output.
6844
6845 2015-02-04 Pedro Alves <palves@redhat.com>
6846
6847 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6848 (resume_stopped_resumed_lwps): New function.
6849 (linux_wait_for_event_filtered): Use it.
6850
6851 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6852
6853 * Makefile.in (SFILES): Add linux-personality.c.
6854 (linux-personality.o): New rule.
6855 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6856 list of objects to be built.
6857 * linux-low.c: Include nat/linux-personality.h.
6858 (linux_create_inferior): Remove code to disable address space
6859 randomization (moved to ../nat/linux-personality.c). Create
6860 cleanup to disable address space randomization.
6861
6862 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6863
6864 * Makefile.in (posix-strerror.o): New rule.
6865 (mingw-strerror.o): Likewise.
6866 * configure: Regenerated.
6867 * configure.ac: Source file ../common/common.host. Initialize new
6868 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6869
6870 2015-01-14 Yao Qi <yao@codesourcery.com>
6871
6872 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6873 (ppc-linux.o): New rule.
6874 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6875 * configure.ac: AC_CHECK_FUNCS(getauxval).
6876 * config.in: Re-generated.
6877 * configure: Re-generated.
6878 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6879 ppc64_64bit_inferior_p
6880
6881 2015-01-14 Yao Qi <yao@codesourcery.com>
6882
6883 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6884 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6885 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6886 (PT_ORIG_R3, PT_TRAP): Likewise.
6887 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6888 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6889 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6890
6891 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6892
6893 * i387-fp.c (i387_cache_to_xsave): In look over
6894 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6895 zmmh_low_space field by use of zmmh_high_space.
6896
6897 2015-01-09 Pedro Alves <palves@redhat.com>
6898
6899 * linux-low.c (step_over_bkpt): Move higher up in the file.
6900 (handle_extended_wait): Don't store the stop_pc here.
6901 (get_stop_pc): Adjust comments and rename to ...
6902 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6903 stopped for a software breakpoint or hardware breakpoint.
6904 (thread_still_has_status_pending_p): New function.
6905 (status_pending_p_callback): Use
6906 thread_still_has_status_pending_p. If the event is no longer
6907 interesting, resume the LWP.
6908 (handle_tracepoints): Add assert.
6909 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6910 (wstatus_maybe_breakpoint): New function.
6911 (cancel_breakpoint): Delete function.
6912 (check_stopped_by_watchpoint): New function, factored out from
6913 linux_low_filter_event.
6914 (lp_status_maybe_breakpoint): Delete function.
6915 (linux_low_filter_event): Remove filter_ptid argument.
6916 Leave thread group exits pending here. Store the LWP's stop PC.
6917 Always leave events pending.
6918 (linux_wait_for_event_filtered): Pull all events out of the
6919 kernel, and leave them all pending.
6920 (count_events_callback, select_event_lwp_callback): Consider all
6921 events.
6922 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6923 (select_event_lwp): Only give preference to the stepping LWP in
6924 all-stop mode. Adjust comments.
6925 (ignore_event): New function.
6926 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6927 references to cancel_breakpoints. Adjust to renames. Also give
6928 equal priority to all LWPs that have had events in non-stop mode.
6929 If reporting a software breakpoint event, unadjust the LWP's PC.
6930 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6931 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6932 Adjust.
6933 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6934 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6935 (linux_stopped_by_watchpoint): Adjust.
6936 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6937 * linux-low.h (enum lwp_stop_reason): New.
6938 (struct lwp_info) <stop_pc>: Adjust comment.
6939 <stopped_by_watchpoint>: Delete field.
6940 <stop_reason>: New field.
6941 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6942 * mem-break.c (software_breakpoint_inserted_here)
6943 (hardware_breakpoint_inserted_here): New function.
6944 * mem-break.h (software_breakpoint_inserted_here)
6945 (hardware_breakpoint_inserted_here): Declare.
6946 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6947 (cancel_breakpoints): Delete.
6948 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6949 (upload_fast_traceframes): Remove references to
6950 cancel_breakpoints.
6951
6952 2015-01-09 Pedro Alves <palves@redhat.com>
6953
6954 * thread-db.c (find_new_threads_callback): Ignore thread if the
6955 kernel thread ID is -1.
6956
6957 2015-01-09 Pedro Alves <palves@redhat.com>
6958
6959 * linux-low.c (linux_attach_fail_reason_string): Move to
6960 nat/linux-ptrace.c, and rename.
6961 (linux_attach_lwp): Update comment.
6962 (attach_proc_task_lwp_callback): New function.
6963 (linux_attach): Adjust to rename and use
6964 linux_proc_attach_tgid_threads.
6965 (linux_attach_fail_reason_string): Delete declaration.
6966
6967 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6968
6969 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6970 * server.c (gdbserver_version): Likewise.
6971
6972 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6973
6974 * remote-utils.c: Include ctype.h.
6975 (input_interrupt): Explicitly handle the case when the char
6976 received is the NUL byte. Improve the printing of non-ASCII
6977 characters.
6978
6979 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6980
6981 * linux-low.c (linux_low_filter_event): Update call to
6982 linux_enable_event_reporting following the addition of
6983 a new parameter to that function.
6984
6985 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6986
6987 PR server/17457
6988 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6989 (AARCH64_FPCR_REGNO): Likewise.
6990 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6991 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6992 (aarch64_store_fpregset): Likewise.
6993
6994 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6995
6996 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6997 Remove FIXME comment about assumption about N.
6998
6999 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7000
7001 * configure.ac: If large-file support is disabled in GDBserver,
7002 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7003 * configure: Regenerate.
7004
7005 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7006
7007 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7008 warning upon ENODATA from ptrace.
7009 * linux-s390-low.c (s390_store_tdb): New.
7010 (s390_regsets): Add regset for NT_S390_TDB.
7011
7012 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7013
7014 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7015 without a fill_function.
7016 * linux-s390-low.c (s390_fill_last_break): Remove.
7017 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7018 (s390_arch_setup): Use regset's size instead of fill_function for
7019 loop end condition.
7020
7021 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7022
7023 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7024 the regset's store function when ptrace returned an error.
7025 * regcache.c (get_thread_regcache): Invalidate register cache
7026 before fetching inferior's registers.
7027
7028 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7029
7030 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7031 while-loop as for-loop.
7032 (regsets_store_inferior_registers): Likewise.
7033
7034 2014-11-28 Yao Qi <yao@codesourcery.com>
7035
7036 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7037 * config.in, configure: Re-generate.
7038 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7039 is defined.
7040
7041 2014-11-21 Yao Qi <yao@codesourcery.com>
7042
7043 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7044 (AC_CHECK_HEADERS): Remove malloc.h.
7045 * configure: Re-generated.
7046 * config.in: Re-generated.
7047 * server.h: Don't include alloca.h and malloc.h.
7048 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7049 Don't include malloc.h.
7050
7051 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7052
7053 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7054 corresponding ERRNO check in same block.
7055
7056 2014-11-12 Pedro Alves <palves@redhat.com>
7057
7058 * server.c (cont_thread): Update comment.
7059 (start_inferior, attach_inferior): No longer clear cont_thread.
7060 (handle_v_cont): No longer set cont_thread.
7061 (captured_main): Clear cont_thread each time a GDB connects.
7062
7063 2014-11-12 Pedro Alves <palves@redhat.com>
7064
7065 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7066 thread, and don't resume all threads if the Hc thread has exited.
7067
7068 2014-11-12 Pedro Alves <palves@redhat.com>
7069
7070 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7071 the process group instead of to a specific LWP.
7072
7073 2014-10-15 Pedro Alves <palves@redhat.com>
7074
7075 PR server/17487
7076 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7077 parameter.
7078 (arm_set_thread_context): Delete.
7079 (the_low_target): Adjust.
7080 * win32-i386-low.c (debug_registers_changed)
7081 (debug_registers_used): Delete.
7082 (update_debug_registers_callback): New function.
7083 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7084 needing to update their debug registers.
7085 (win32_get_current_dr): New function.
7086 (x86_dr_low_get_addr, x86_dr_low_get_control)
7087 (x86_dr_low_get_status): Fetch the debug register from the thread
7088 record's context.
7089 (i386_initial_stuff): Adjust.
7090 (i386_get_thread_context): Remove current_event parameter. Don't
7091 clear debug_registers_changed nor copy DR values to
7092 debug_reg_state.
7093 (i386_set_thread_context): Delete.
7094 (i386_prepare_to_resume): New function.
7095 (i386_thread_added): Mark the thread as needing to update irs
7096 debug registers.
7097 (the_low_target): Remove i386_set_thread_context and install
7098 i386_prepare_to_resume.
7099 * win32-low.c (win32_get_thread_context): Adjust.
7100 (win32_set_thread_context): Use SetThreadContext
7101 directly.
7102 (win32_prepare_to_resume): New function.
7103 (win32_require_context): New function, factored out from ...
7104 (thread_rec): ... this.
7105 (continue_one_thread): Call win32_prepare_to_resume on each thread
7106 we're about to continue.
7107 (win32_resume): Call win32_prepare_to_resume on the event thread.
7108 * win32-low.h (struct win32_thread_info)
7109 <debug_registers_changed>: New field.
7110 (struct win32_target_ops): Change prototype of set_thread_context,
7111 delete set_thread_context and add prepare_to_resume.
7112 (win32_require_context): New declaration.
7113
7114 2014-10-08 Gary Benson <gbenson@redhat.com>
7115
7116 * server.h: Do not include common-exceptions.h.
7117
7118 2014-10-08 Gary Benson <gbenson@redhat.com>
7119
7120 * server.h: Do not include cleanups.h.
7121
7122 2014-09-30 James Hogan <james.hogan@imgtec.com>
7123
7124 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7125 mips64-dsp-linux.c.
7126
7127 2014-09-23 Yao Qi <yao@codesourcery.com>
7128
7129 * linux-low.c (lp_status_maybe_breakpoint): New function.
7130 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7131 (count_events_callback): Likewise.
7132 (select_event_lwp_callback): Likewise.
7133 (cancel_breakpoints_callback): Likewise.
7134
7135 2014-09-19 Don Breazeal <donb@codesourcery.com>
7136
7137 * linux-low.c (handle_extended_wait): Call
7138 linux_ptrace_get_extended_event.
7139 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7140 linux_is_extended_waitstatus.
7141
7142 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7143
7144 * Makefile.in (CPPFLAGS): Define.
7145 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7146 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7147
7148 2014-09-16 Gary Benson <gbenson@redhat.com>
7149
7150 * inferiors.h (current_inferior): Renamed as...
7151 (current_thread): New variable. All uses updated.
7152 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7153 (maybe_move_out_of_jump_pad): Likewise.
7154 (cancel_breakpoint): Likewise.
7155 (linux_low_filter_event): Likewise.
7156 (wait_for_sigstop): Likewise.
7157 (linux_resume_one_lwp): Likewise.
7158 (need_step_over_p): Likewise.
7159 (start_step_over): Likewise.
7160 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7161 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7162 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7163 and save_inferior as saved_thread.
7164 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7165 saved_thread.
7166 (regcache_invalidate_thread): Likewise.
7167 * remote-utils.c (prepare_resume_reply): Likewise.
7168 * thread-db.c (thread_db_get_tls_address): Likewise.
7169 (disable_thread_event_reporting): Likewise.
7170 (remove_thread_event_breakpoints): Likewise.
7171 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7172 as saved_thread.
7173 * target.h (set_desired_inferior): Renamed as...
7174 (set_desired_thread): New declaration. All uses updated.
7175 * server.c (myresume): Updated comment to reference thread instead
7176 of inferior.
7177 (handle_serial_event): Likewise.
7178 (handle_target_event): Likewise.
7179
7180 2014-09-12 Tom Tromey <tromey@redhat.com>
7181 Gary Benson <gbenson@redhat.com>
7182
7183 * regcache.h: Include common-regcache.h.
7184 (regcache_read_pc): Don't declare.
7185 * regcache.c (get_thread_regcache_for_ptid): New function.
7186
7187 2014-09-11 Tom Tromey <tromey@redhat.com>
7188 Gary Benson <gbenson@redhat.com>
7189
7190 * symbol.c: New file.
7191 * Makefile.in (SFILES): Add symbol.c.
7192 (OBS): Add symbol.o.
7193
7194 2014-09-11 Gary Benson <gbenson@redhat.com>
7195
7196 * target.c (target_stop_ptid, target_continue_ptid): New
7197 functions.
7198
7199 2014-09-11 Tom Tromey <tromey@redhat.com>
7200 Gary Benson <gbenson@redhat.com>
7201
7202 * target.h: Include target/target.h.
7203 * target.c (target_read_memory, target_read_uint32)
7204 (target_write_memory): New functions.
7205
7206 2014-09-11 Gary Benson <gbenson@redhat.com>
7207
7208 * server.h (debug_hw_points): Don't declare.
7209 * server.c (debug_hw_points): Don't define. Replace all uses
7210 with show_debug_regs.
7211 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7212 all uses with show_debug_regs.
7213
7214 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7215
7216 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7217 endianness into account.
7218 (ppc_supply_ptrace_register): Likewise.
7219
7220 2014-09-03 James Hogan <james.hogan@imgtec.com>
7221
7222 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7223 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7224
7225 2014-09-03 Gary Benson <gbenson@redhat.com>
7226
7227 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7228 ALL_DEBUG_ADDRESS_REGISTERS.
7229
7230 2014-09-02 Gary Benson <gbenson@redhat.com>
7231
7232 * i386-low.h: Renamed as...
7233 * x86-low.h: New file. All type, function and variable name
7234 prefixes changed from "i386_" to "x86_". All references updated.
7235 * i386-low.c: Renamed as...
7236 * x86-low.c: New file. All type, function and variable name
7237 prefixes changed from "i386_" to "x86_". All references updated.
7238
7239 2014-09-02 Gary Benson <gbenson@redhat.com>
7240
7241 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7242 (x86_linux_new_thread): Likewise.
7243
7244 2014-08-29 Gary Benson <gbenson@redhat.com>
7245
7246 * server.h (setjmp.h): Do not include.
7247 (toplevel): Do not declare.
7248 (common-exceptions.h): Include.
7249 (cleanups.h): Likewise.
7250 * server.c (toplevel): Do not define.
7251 (exit_code): New static global.
7252 (detach_or_kill_for_exit_cleanup): New function.
7253 (main): New function. Original main renamed to...
7254 (captured_main): New function.
7255 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7256
7257 2014-08-29 Gary Benson <gbenson@redhat.com>
7258
7259 * Makefile.in (SFILES): Add common/common-exceptions.c.
7260 (OBS): Add common-exceptions.o.
7261 (common-exceptions.o): New rule.
7262 * utils.c (prepare_to_throw_exception): New function.
7263
7264 2014-08-29 Gary Benson <gbenson@redhat.com>
7265
7266 * config.in: Regenerate.
7267 * configure: Likewise.
7268
7269 2014-08-29 Gary Benson <gbenson@redhat.com>
7270
7271 * Makefile.in (SFILES): Add common/cleanups.c.
7272 (OBS): cleanups.o.
7273 (cleanups.o): New rule.
7274
7275 2014-08-29 Gary Benson <gbenson@redhat.com>
7276
7277 * utils.c (internal_vwarning): New function.
7278
7279 2014-08-28 Gary Benson <gbenson@redhat.com>
7280
7281 * utils.h (fatal): Remove declaration.
7282 * utils.c (fatal): Remove function.
7283
7284 2014-08-28 Gary Benson <gbenson@redhat.com>
7285
7286 * tracepoint.c (gdb_agent_init): Replace fatal with
7287 perror_with_name.
7288 (initialize_tracepoint): Likewise.
7289
7290 2014-08-28 Gary Benson <gbenson@redhat.com>
7291
7292 * remote-utils.c (remote_prepare): Replace fatal with error.
7293
7294 2014-08-28 Gary Benson <gbenson@redhat.com>
7295
7296 * linux-low.c (linux_async): Replace fatal with warning.
7297 Tidy up and return.
7298 (linux_start_non_stop): Return -1 if linux_async failed.
7299
7300 2014-08-28 Gary Benson <gbenson@redhat.com>
7301
7302 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7303 gdb_assert.
7304 (i386_dr_low_get_addr): Remove vague comment.
7305 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7306 gdb_assert.
7307
7308 2014-08-28 Gary Benson <gbenson@redhat.com>
7309
7310 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7311 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7312 internal_error.
7313 (linux_resume_one_lwp): Likewise.
7314 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7315 gdb_assert.
7316 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7317 with internal_error.
7318 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7319 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7320 (find_register_by_name): Replace fatal with internal_error.
7321 (find_regno): Likewise.
7322 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7323 * thread-db.c (thread_db_create_event): Likewise.
7324 (thread_db_load_search): Likewise.
7325 (try_thread_db_load_1): Likewise.
7326 * tracepoint.c (get_jump_space_head): Replace fatal with
7327 internal_error.
7328 (claim_trampoline_space): Likewise.
7329 (have_fast_tracepoint_trampoline_buffer): Likewise.
7330 (cmd_qtstart): Likewise.
7331 (stop_tracing): Likewise.
7332 (fast_tracepoint_collecting): Likewise.
7333 (target_malloc): Likewise.
7334 (download_tracepoint): Likewise.
7335 (download_trace_state_variables): Replace check with gdb_assert.
7336 (upload_fast_traceframes): Replace fatal with internal_error.
7337
7338 2014-08-19 Tom Tromey <tromey@redhat.com>
7339 Gary Benson <gbenson@redhat.com>
7340
7341 * Makefile.in (SFILES): Add common/common-debug.c.
7342 (OBS): Add common-debug.o.
7343 (common-debug.o): New rule.
7344 * debug.h (debug_printf): Don't declare.
7345 * debug.c (debug_printf): Renamed and rewritten as...
7346 (debug_vprintf): New function.
7347
7348 2014-08-19 Gary Benson <gbenson@redhat.com>
7349
7350 * utils.h: Do not include print-utils.h.
7351
7352 2014-08-19 Tom Tromey <tromey@redhat.com>
7353 Gary Benson <gbenson@redhat.com>
7354
7355 * server.h: Add static assertion.
7356 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7357
7358 2014-08-19 Tom Tromey <tromey@redhat.com>
7359 Gary Benson <gbenson@redhat.com>
7360
7361 * Makefile.in (SFILES): Add common/errors.c.
7362 (OBS): Add errors.o.
7363 (IPA_OBS): Add errors-ipa.o.
7364 (errors.o): New rule.
7365 (errors-ipa.o): Likewise.
7366 * utils.h (perror_with_name, error, warning): Don't declare.
7367 * utils.c (warning): Renamed and rewritten as...
7368 (vwarning): New function.
7369 (error): Renamed and rewritten as...
7370 (verror): New function.
7371 (internal_error): Renamed and rewritten as...
7372 (internal_verror): New function.
7373
7374 2014-08-07 Gary Benson <gbenson@redhat.com>
7375
7376 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7377 * configure: Regenerate.
7378 * config.in: Likewise.
7379 * server.h: Do not include errno.h.
7380 * event-loop.c: Likewise.
7381 * hostio-errno.c: Likewise.
7382 * linux-low.c: Likewise.
7383 * remote-utils.c: Likewise.
7384 * spu-low.c: Likewise.
7385 * utils.c: Likewise.
7386 * gdbreplay.c: Unconditionally include errno.h.
7387
7388 2014-08-07 Gary Benson <gbenson@redhat.com>
7389
7390 * server.h: Do not include string.h.
7391 * event-loop.c: Likewise.
7392 * linux-low.c: Likewise.
7393 * regcache.c: Likewise.
7394 * remote-utils.c: Likewise.
7395 * spu-low.c: Likewise.
7396 * utils.c: Likewise.
7397
7398 2014-08-07 Gary Benson <gbenson@redhat.com>
7399
7400 * server.h: Do not include gdb_assert.h.
7401
7402 2014-08-07 Gary Benson <gbenson@redhat.com>
7403
7404 * server.h: Do not include common-utils.h.
7405
7406 2014-08-07 Gary Benson <gbenson@redhat.com>
7407
7408 * server.h: Do not include ptid.h.
7409 * notif.h: Likewise.
7410
7411 2014-08-07 Gary Benson <gbenson@redhat.com>
7412
7413 * server.h: Do not include gdb_locale.h.
7414
7415 2014-08-07 Gary Benson <gbenson@redhat.com>
7416
7417 * server.h: Do not include gdb/signals.h.
7418 * win32-low.c: Likewise.
7419
7420 2014-08-07 Gary Benson <gbenson@redhat.com>
7421
7422 * server.h: Do not include pathmax.h.
7423
7424 2014-08-07 Gary Benson <gbenson@redhat.com>
7425
7426 * server.h: Do not include libiberty.h.
7427 * linux-bfin-low.c: Likewise.
7428
7429 2014-08-07 Gary Benson <gbenson@redhat.com>
7430
7431 * server.h: Do not include ansidecl.h.
7432
7433 2014-08-07 Gary Benson <gbenson@redhat.com>
7434
7435 * linux-x86-low.c: Do not include stddef.h.
7436 * lynx-ppc-low.c: Likewise.
7437 * tracepoint.c: Likewise.
7438
7439 2014-08-07 Gary Benson <gbenson@redhat.com>
7440
7441 * server.h: Do not include stdarg.h.
7442 * nto-low.c: Likewise.
7443
7444 2014-08-07 Gary Benson <gbenson@redhat.com>
7445
7446 * server.h: Do not include stdlib.h.
7447 * inferiors.c: Likewise.
7448 * linux-low.c: Likewise.
7449 * regcache.c: Likewise.
7450 * spu-low.c: Likewise.
7451 * tracepoint.c: Likewise.
7452 * utils.c: Likewise.
7453
7454 2014-08-07 Gary Benson <gbenson@redhat.com>
7455
7456 * server.h: Do not include stdio.h.
7457 * linux-low.c: Likewise.
7458 * remote-utils.c: Likewise.
7459 * spu-low.c: Likewise.
7460 * utils.c: Likewise.
7461 * wincecompat.c: Likewise.
7462
7463 2014-08-06 Gary Benson <gbenson@redhat.com>
7464
7465 * regcache.c (init_register_cache): Move conditionals inside if.
7466
7467 2014-08-06 Gary Benson <gbenson@redhat.com>
7468
7469 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7470
7471 2014-07-31 Gary Benson <gbenson@redhat.com>
7472
7473 * ax.h: Do not include server.h.
7474 * gdbthread.h: Likewise.
7475 * lynx-low.h: Likewise.
7476 * notif.h: Likewise.
7477
7478 2014-07-30 Gary Benson <gbenson@redhat.com>
7479
7480 * server.h: Include common-defs.h.
7481 Do not include config.h or build-gnulib-gdbserver/config.h.
7482
7483 2014-07-30 Gary Benson <gbenson@redhat.com>
7484
7485 * hostio-errno.c: Move server.h to top of includes list.
7486 * inferiors.c: Likewise.
7487 * linux-x86-low.c: Likewise.
7488 * notif.c: Include server.h.
7489
7490 2014-07-24 Tom Tromey <tromey@redhat.com>
7491 Gary Benson <gbenson@redhat.com>
7492
7493 * server.h (CORE_ADDR): Now unsigned.
7494
7495 2014-07-16 Pedro Alves <palves@redhat.com>
7496
7497 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7498
7499 2014-07-15 Pedro Alves <palves@redhat.com>
7500
7501 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7502 copy.
7503
7504 2014-07-11 Pedro Alves <palves@redhat.com>
7505
7506 * linux-low.c (kill_wait_lwp): New function, based on
7507 kill_one_lwp_callback, but use my_waitpid directly.
7508 (kill_one_lwp_callback, linux_kill): Use it.
7509
7510 2014-06-23 Pedro Alves <palves@redhat.com>
7511
7512 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7513 before setting DR0..DR3.
7514
7515 2014-06-20 Gary Benson <gbenson@redhat.com>
7516
7517 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7518 * configure: Regenerated.
7519 * config.in: Likewise.
7520
7521 2014-06-20 Gary Benson <gbenson@redhat.com>
7522
7523 * Makefile.in (SFILES): Update locations for files moved
7524 from common to nat.
7525 (object file files): Reordered.
7526
7527 2014-06-20 Gary Benson <gbenson@redhat.com>
7528
7529 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7530 (i386_dr_low_set_addr): Likewise.
7531 (i386_dr_low_get_addr): Likewise.
7532 (i386_dr_low_can_set_control): Likewise.
7533 (i386_dr_low_set_control): Likewise.
7534 (i386_dr_low_get_control): Likewise.
7535 (i386_dr_low_get_status): Likewise.
7536 (i386_get_debug_register_length): Likewise.
7537 * linux-x86-low.c (i386_dr_low_set_addr):
7538 Changed signature. Made static.
7539 (i386_dr_low_get_addr): Likewise.
7540 (i386_dr_low_set_control): Likewise.
7541 (i386_dr_low_get_control): Likewise.
7542 (i386_dr_low_get_status): Likewise.
7543 (i386_dr_low): New global variable.
7544 * win32-i386-low.c (i386_dr_low_set_addr):
7545 Changed signature. Made static.
7546 (i386_dr_low_get_addr): Likewise.
7547 (i386_dr_low_set_control): Likewise.
7548 (i386_dr_low_get_control): Likewise.
7549 (i386_dr_low_get_status): Likewise.
7550 (i386_dr_low): New global variable.
7551
7552 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7553
7554 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7555 * Makefile.in (AR, AR_FLAGS): Define.
7556 * configure: Regenerate.
7557
7558 2014-06-19 Gary Benson <gbenson@redhat.com>
7559
7560 * Makefile.in (i386-dregs.o): New rule.
7561 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7562 * i386-low.c (target.h): Remove include.
7563 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7564 (DR_CONTROL_SHIFT): Likewise.
7565 (DR_CONTROL_SIZE): Likewise.
7566 (DR_RW_EXECUTE): Likewise.
7567 (DR_RW_WRITE): Likewise.
7568 (DR_RW_READ): Likewise.
7569 (DR_RW_IORW): Likewise.
7570 (DR_LEN_1): Likewise.
7571 (DR_LEN_2): Likewise.
7572 (DR_LEN_4): Likewise.
7573 (DR_LEN_8): Likewise.
7574 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7575 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7576 (DR_ENABLE_SIZE): Likewise.
7577 (DR_LOCAL_SLOWDOWN): Likewise.
7578 (DR_GLOBAL_SLOWDOWN): Likewise.
7579 (DR_CONTROL_RESERVED): Likewise.
7580 (I386_DR_CONTROL_MASK): Likewise.
7581 (I386_DR_VACANT): Likewise.
7582 (I386_DR_LOCAL_ENABLE): Likewise.
7583 (I386_DR_GLOBAL_ENABLE): Likewise.
7584 (I386_DR_DISABLE): Likewise.
7585 (I386_DR_SET_RW_LEN): Likewise.
7586 (I386_DR_GET_RW_LEN): Likewise.
7587 (I386_DR_WATCH_HIT): Likewise.
7588 (i386_wp_op_t): Likewise.
7589 (i386_show_dr): Likewise.
7590 (i386_length_and_rw_bits): Likewise.
7591 (i386_insert_aligned_watchpoint): Likewise.
7592 (i386_remove_aligned_watchpoint): Likewise.
7593 (i386_handle_nonaligned_watchpoint): Likewise.
7594 i386_update_inferior_debug_regs(): Likewise.
7595 (i386_dr_insert_watchpoint): Likewise.
7596 (i386_dr_remove_watchpoint): Likewise.
7597 (i386_dr_region_ok_for_watchpoint): Likewise.
7598 (i386_dr_stopped_data_address): Likewise.
7599 (i386_dr_stopped_by_watchpoint): Likewise.
7600
7601 2014-06-19 Gary Benson <gbenson@redhat.com>
7602
7603 * i386-low.c (i386_dr_show): Renamed to
7604 i386_show_dr and made static. All uses updated.
7605 (i386_dr_length_and_rw_bits): Renamed to
7606 i386_length_and_rw_bits and made static.
7607 All uses updated.
7608 (i386_dr_insert_aligned_watchpoint): Renamed to
7609 i386_insert_aligned_watchpoint and made static.
7610 All uses updated.
7611 (i386_dr_remove_aligned_watchpoint): Renamed to
7612 i386_remove_aligned_watchpoint and made static.
7613 All uses updated.
7614 (i386_dr_update_inferior_debug_regs): Renamed to
7615 i386_update_inferior_debug_regs and made static.
7616 All uses updated.
7617
7618 2014-06-18 Gary Benson <gbenson@redhat.com>
7619
7620 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7621 (i386_dr_low_can_set_control): Likewise.
7622 (i386_get_debug_register_length): Likewise.
7623 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7624 (i386_dr_low_can_set_control): Likewise.
7625 (i386_get_debug_register_length): Likewise.
7626
7627 2014-06-17 Gary Benson <gbenson@redhat.com>
7628
7629 * i386-low.h (i386-dregs.h): New include.
7630 (DR_FIRSTADDR): Now in i386-dregs.h.
7631 (DR_LASTADDR): Likewise.
7632 (DR_NADDR): Likewise.
7633 (DR_STATUS): Likewise.
7634 (DR_CONTROL): Likewise.
7635 (i386_debug_reg_state): Likewise.
7636 (i386_dr_insert_watchpoint): Likewise.
7637 (i386_dr_remove_watchpoint): Likewise.
7638 (i386_dr_region_ok_for_watchpoint): Likewise.
7639 (i386_dr_stopped_data_address): Likewise.
7640 (i386_dr_stopped_by_watchpoint): Likewise.
7641 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7642
7643 2014-06-18 Gary Benson <gbenson@redhat.com>
7644
7645 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7646 i386_dr_insert_watchpoint.
7647 (i386_low_remove_watchpoint): Renamed to
7648 i386_dr_remove_watchpoint.
7649 (i386_low_region_ok_for_watchpoint): Renamed to
7650 i386_dr_region_ok_for_watchpoint.
7651 (i386_low_stopped_data_address): Renamed to
7652 i386_dr_stopped_data_address.
7653 (i386_low_stopped_by_watchpoint): Renamed to
7654 i386_dr_stopped_by_watchpoint.
7655 * i386-low.c (i386_show_dr): Renamed to
7656 i386_dr_show and made nonstatic. All uses updated.
7657 (i386_length_and_rw_bits): Renamed to
7658 i386_dr_length_and_rw_bits and made nonstatic.
7659 All uses updated.
7660 (i386_insert_aligned_watchpoint): Renamed to
7661 i386_dr_insert_aligned_watchpoint and made nonstatic.
7662 All uses updated.
7663 (i386_remove_aligned_watchpoint): Renamed to
7664 i386_dr_remove_aligned_watchpoint and made nonstatic.
7665 All uses updated.
7666 (i386_update_inferior_debug_regs): Renamed to
7667 i386_dr_update_inferior_debug_regs and made nonstatic.
7668 All uses updated.
7669 (i386_low_insert_watchpoint): Renamed to
7670 i386_dr_insert_watchpoint. All uses updated.
7671 (i386_low_remove_watchpoint): Renamed to
7672 i386_dr_remove_watchpoint. All uses updated.
7673 (i386_low_region_ok_for_watchpoint): Renamed to
7674 i386_dr_region_ok_for_watchpoint. All uses updated.
7675 (i386_low_stopped_data_address): Renamed to
7676 i386_dr_stopped_data_address. All uses updated.
7677 (i386_low_stopped_by_watchpoint): Renamed to
7678 i386_dr_stopped_by_watchpoint. All uses updated.
7679
7680 2014-06-18 Gary Benson <gbenson@redhat.com>
7681
7682 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7683 (i386_dr_low_can_set_control): Likewise.
7684 (i386_insert_aligned_watchpoint): New check.
7685
7686 2014-06-18 Gary Benson <gbenson@redhat.com>
7687
7688 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7689 Renamed to state.
7690
7691 2014-06-18 Gary Benson <gbenson@redhat.com>
7692
7693 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7694 instead of fatal and error.
7695 (i386_handle_nonaligned_watchpoint): Likewise.
7696
7697 2014-06-18 Gary Benson <gbenson@redhat.com>
7698
7699 * i386-low.c (i386_get_debug_register_length): New macro.
7700 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7701 (i386_show_dr): Use debug_printf instead of fprintf. Use
7702 phex to format values.
7703
7704 2014-06-18 Gary Benson <gbenson@redhat.com>
7705
7706 * i386-low.h: Comment changes.
7707 * i386-low.c: Likewise.
7708
7709 2014-06-18 Gary Benson <gbenson@redhat.com>
7710
7711 * i386-low.c: Whitespace changes.
7712
7713 2014-06-12 Tom Tromey <tromey@redhat.com>
7714
7715 * utils.c (freeargv): Remove.
7716
7717 2014-06-12 Tom Tromey <tromey@redhat.com>
7718
7719 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7720 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7721 (parse_debug_format_options): Likewise.
7722 (gdbserver_usage): Likewise.
7723 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7724 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7725 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7726 against libiberty.
7727 ($(LIBGNU)): Depend on libiberty.
7728 (all-lib): Recurse into all subdirs.
7729 (install-only): Invoke "install" target in subdirs.
7730 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7731 targets.
7732 * configure: Rebuild.
7733 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7734 for vasprintf, vsnprintf, or gettimeofday.
7735 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7736 srv_tgtobj.
7737
7738 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7739
7740 * development.sh: Delete.
7741 * Makefile.in (config.status): Adjust dependency on development.sh.
7742 * configure.ac: Adjust development.sh source call.
7743 * configure: Regenerate.
7744
7745 2014-06-02 Pedro Alves <palves@redhat.com>
7746
7747 * ax.c (gdb_free_agent_expr): New function.
7748 * ax.h (gdb_free_agent_expr): New declaration.
7749 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7750 list.
7751 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7752 static.
7753 (clear_breakpoint_conditions_and_commands): New function.
7754 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7755 (clear_breakpoint_conditions_and_commands): New declaration.
7756
7757 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7758
7759 * linux-aarch64-low.c (asm/ptrace.h): Include.
7760
7761 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7762
7763 Fix TLS access for -static -pthread.
7764 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7765 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7766 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7767
7768 2014-05-20 Pedro Alves <palves@redhat.com>
7769
7770 * linux-aarch64-low.c (aarch64_insert_point)
7771 (aarch64_remove_point): No longer check whether the type is
7772 supported here. Adjust to new interface.
7773 (the_low_target): Install aarch64_supports_z_point_type as
7774 supports_z_point_type method.
7775 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7776 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7777 instead of a Z packet char. Adjust.
7778 (arm_supports_z_point_type): New function.
7779 (arm_insert_point, arm_remove_point): Adjust to new interface.
7780 (the_low_target): Install arm_supports_z_point_type.
7781 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7782 (cris_insert_point, cris_remove_point): Adjust to new interface.
7783 Don't check whether the type is supported here.
7784 (the_low_target): Install cris_supports_z_point_type.
7785 * linux-low.c (linux_supports_z_point_type): New function.
7786 (linux_insert_point, linux_remove_point): Adjust to new interface.
7787 * linux-low.h (struct linux_target_ops) <insert_point,
7788 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7789 raw_breakpoint pointer parameter.
7790 <supports_z_point_type>: New method.
7791 * linux-mips-low.c (mips_supports_z_point_type): New function.
7792 (mips_insert_point, mips_remove_point): Adjust to new interface.
7793 Use mips_supports_z_point_type.
7794 (the_low_target): Install mips_supports_z_point_type.
7795 * linux-ppc-low.c (the_low_target): Install NULL as
7796 supports_z_point_type method.
7797 * linux-s390-low.c (the_low_target): Install NULL as
7798 supports_z_point_type method.
7799 * linux-sparc-low.c (the_low_target): Install NULL as
7800 supports_z_point_type method.
7801 * linux-x86-low.c (x86_supports_z_point_type): New function.
7802 (x86_insert_point): Adjust to new insert_point interface. Use
7803 insert_memory_breakpoint. Adjust to new
7804 i386_low_insert_watchpoint interface.
7805 (x86_remove_point): Adjust to remove_point interface. Use
7806 remove_memory_breakpoint. Adjust to new
7807 i386_low_remove_watchpoint interface.
7808 (the_low_target): Install x86_supports_z_point_type.
7809 * lynx-low.c (lynx_target_ops): Install NULL as
7810 supports_z_point_type callback.
7811 * nto-low.c (nto_supports_z_point_type): New.
7812 (nto_insert_point, nto_remove_point): Adjust to new interface.
7813 (nto_target_ops): Install nto_supports_z_point_type.
7814 * mem-break.c: Adjust intro comment.
7815 (struct raw_breakpoint) <raw_type, size>: New fields.
7816 <inserted>: Update comment.
7817 <shlib_disabled>: Delete field.
7818 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7819 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7820 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7821 (raw_bkpt_type_to_target_hw_bp_type): New function.
7822 (find_enabled_raw_code_breakpoint_at): New function.
7823 (find_raw_breakpoint_at): New type and size parameters. Use them.
7824 (insert_memory_breakpoint): New function, based off
7825 set_raw_breakpoint_at.
7826 (remove_memory_breakpoint): New function.
7827 (set_raw_breakpoint_at): Reimplement.
7828 (set_breakpoint): New, based on set_breakpoint_at.
7829 (set_breakpoint_at): Reimplement.
7830 (delete_raw_breakpoint): Go through the_target->remove_point
7831 instead of assuming memory breakpoints.
7832 (find_gdb_breakpoint_at): Delete.
7833 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7834 (find_gdb_breakpoint): New function.
7835 (set_gdb_breakpoint_at): Delete.
7836 (z_type_supported): New function.
7837 (set_gdb_breakpoint_1): New function, loosely based off
7838 set_gdb_breakpoint_at.
7839 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7840 (delete_gdb_breakpoint_at): Delete.
7841 (delete_gdb_breakpoint_1): New function, loosely based off
7842 delete_gdb_breakpoint_at.
7843 (delete_gdb_breakpoint): New function.
7844 (clear_gdb_breakpoint_conditions): Rename to ...
7845 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7846 breakpoint.
7847 (add_condition_to_breakpoint): Make static.
7848 (add_breakpoint_condition): Take a struct breakpoint pointer
7849 instead of an address. Adjust.
7850 (gdb_condition_true_at_breakpoint): Rename to ...
7851 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7852 z_type parameter.
7853 (gdb_condition_true_at_breakpoint): Reimplement.
7854 (add_breakpoint_commands): Take a struct breakpoint pointer
7855 instead of an address. Adjust.
7856 (gdb_no_commands_at_breakpoint): Rename to ...
7857 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7858 parameter. Return true if no breakpoint was found. Change debug
7859 output.
7860 (gdb_no_commands_at_breakpoint): Reimplement.
7861 (run_breakpoint_commands): Rename to ...
7862 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7863 and change return type to boolean.
7864 (run_breakpoint_commands): New function.
7865 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7866 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7867 breakpoint. Go through the_target->remove_point instead of
7868 assuming memory breakpoint.
7869 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7870 software and hardware breakpoints.
7871 (reinsert_raw_breakpoint): Go through the_target->insert_point
7872 instead of assuming memory breakpoint.
7873 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7874 software and hardware breakpoints.
7875 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7876 Check both software and hardware breakpoints.
7877 (validate_inserted_breakpoint): Assert the breakpoint is a
7878 software breakpoint. Set the inserted flag to -1 instead of
7879 setting shlib_disabled.
7880 (delete_disabled_breakpoints): Adjust.
7881 (validate_breakpoints): Only validate software breakpoints.
7882 Adjust to inserted flag change.
7883 (check_mem_read, check_mem_write): Skip breakpoint types other
7884 than software breakpoints. Adjust to inserted flag change.
7885 * mem-break.h (enum raw_bkpt_type): New enum.
7886 (raw_breakpoint, struct process_info): Forward declare.
7887 (Z_packet_to_target_hw_bp_type): Delete declaration.
7888 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7889 (set_gdb_breakpoint, delete_gdb_breakpoint)
7890 (clear_breakpoint_conditions): New declarations.
7891 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7892 (breakpoint_inserted_here): Update comment.
7893 (add_breakpoint_condition, add_breakpoint_commands): Replace
7894 address parameter with a breakpoint pointer parameter.
7895 (gdb_breakpoint_here): Update comment.
7896 (delete_gdb_breakpoint_at): Delete.
7897 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7898 * server.c (process_point_options): Take a struct breakpoint
7899 pointer instead of an address. Adjust.
7900 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7901 delete_gdb_breakpoint.
7902 * spu-low.c (spu_target_ops): Install NULL as
7903 supports_z_point_type method.
7904 * target.h: Include mem-break.h.
7905 (struct target_ops) <prepare_to_access_memory>: Update comment.
7906 <supports_z_point_type>: New field.
7907 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7908 instead of a char. Also take a raw breakpoint pointer.
7909 * win32-arm-low.c (the_low_target): Install NULL as
7910 supports_z_point_type.
7911 * win32-i386-low.c (i386_supports_z_point_type): New function.
7912 (i386_insert_point, i386_remove_point): Adjust to new interface.
7913 (the_low_target): Install i386_supports_z_point_type.
7914 * win32-low.c (win32_supports_z_point_type): New function.
7915 (win32_insert_point, win32_remove_point): Adjust to new interface.
7916 (win32_target_ops): Install win32_supports_z_point_type.
7917 * win32-low.h (struct win32_target_ops):
7918 <supports_z_point_type>: New method.
7919 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7920 instead of a char. Also take a raw breakpoint pointer.
7921
7922 2014-05-20 Pedro Alves <palves@redhat.com>
7923
7924 * mem-break.h: Include break-common.h.
7925 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7926 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7927 (Z_packet_to_target_hw_bp_type): New declaration.
7928 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7929 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7930 (Z_PACKET_ACCESS_WP): Delete macros.
7931 (Z_packet_to_hw_type): Delete function.
7932 * i386-low.h: Don't include break-common.h here.
7933 (Z_packet_to_hw_type): Delete declaration.
7934 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7935 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7936 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7937 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7938 * linux-aarch64-low.c: Don't include break-common.h here.
7939 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7940 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7941 (Z_packet_to_target_hw_bp_type): Delete function.
7942 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7943 function.
7944 (mips_insert_point, mips_remove_point): Use
7945 Z_packet_to_target_hw_bp_type.
7946
7947 2014-05-20 Pedro Alves <palves@redhat.com>
7948
7949 * linux-aarch64-low.c: Include break-common.h.
7950 (enum target_point_type): Delete.
7951 (Z_packet_to_point_type): Rename to ...
7952 (Z_packet_to_target_hw_bp_type): ... this, and return a
7953 target_hw_bp_type instead.
7954 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7955 instead of an enum target_point_type.
7956 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7957 breakpoint type.
7958 (aarch64_dr_state_insert_one_point)
7959 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7960 (aarch64_handle_aligned_watchpoint)
7961 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7962 Take an enum target_hw_bp_type instead of an enum
7963 target_point_type.
7964 (aarch64_supports_z_point_type): New function.
7965 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7966 use Z_packet_to_target_hw_bp_type.
7967
7968 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7969
7970 * configure.ac: Only use -Werror by default when DEVELOPMENT
7971 is true.
7972 * configure: Regenerate.
7973
7974 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7975
7976 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7977 * linux-x86-low.c (X86_64_USER_REGS): New.
7978 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7979
7980 2014-04-28 Yao Qi <yao@codesourcery.com>
7981
7982 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7983 name.
7984
7985 2014-04-25 Pedro Alves <palves@redhat.com>
7986
7987 PR server/16255
7988 * linux-low.c (linux_attach_fail_reason_string): New function.
7989 (linux_attach_lwp): Delete.
7990 (linux_attach_lwp_1): Rename to ...
7991 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7992 argument. Remove "initial" parameter. Return int instead of
7993 void. Don't error or warn here.
7994 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7995 failure to attach to the tgid. Call warning when failing to
7996 attach to an lwp.
7997 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7998 argument. Remove "initial" parameter. Return int instead of
7999 void. Don't error or warn here.
8000 (linux_attach_fail_reason_string): New declaration.
8001 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8002 interface change. Use linux_attach_fail_reason_string.
8003
8004 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8005 Walfred Tedeschi <walfred.tedeschi@intel.com>
8006
8007 * Makefile.in: Added rules to handle new files
8008 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8009 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8010 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8011 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8012 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8013 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8014 x32-avx512-linux.o.
8015 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8016 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8017 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8018 i386/x32-avx512.xml.
8019 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8020 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8021 i386/x32-avx512-linux.xml.
8022 * i387-fp.c (num_avx512_k_registers): New constant for number
8023 of K registers.
8024 (num_avx512_zmmh_low_registers): New constant for number of
8025 lower ZMM registers (0-15).
8026 (num_avx512_zmmh_high_registers): New constant for number of
8027 higher ZMM registers (16-31).
8028 (num_avx512_ymmh_registers): New contant for number of higher
8029 YMM registers (ymm16-31 added by avx521 on x86_64).
8030 (num_avx512_xmm_registers): New constant for number of higher
8031 XMM registers (xmm16-31 added by AVX512 on x86_64).
8032 (struct i387_xsave): Add space for AVX512 registers.
8033 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8034 Add code to handle AVX512 registers.
8035 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8036 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8037 prototypei from generated file.
8038 (tdesc_amd64_avx512_linux): Likewise.
8039 (init_registers_x32_avx512_linux): Likewise.
8040 (tdesc_x32_avx512_linux): Likewise.
8041 (init_registers_i386_avx512_linux): Likewise.
8042 (tdesc_i386_avx512_linux): Likewise.
8043 (x86_64_regmap): Add AVX512 registers.
8044 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8045 mask.
8046 (initialize_low_arch): Add code to initialize AVX512 registers.
8047
8048 2014-04-23 Pedro Alves <palves@redhat.com>
8049
8050 * mem-break.c (find_gdb_breakpoint_at): Make static.
8051 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8052
8053 2014-04-23 Pedro Alves <palves@redhat.com>
8054
8055 * i386-low.c: Don't include break-common.h here.
8056 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8057 prototype to take target_hw_bp_type as argument instead of a Z
8058 packet char.
8059 * i386-low.h: Include break-common.h here.
8060 (Z_packet_to_hw_type): Declare.
8061 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8062 prototypes.
8063 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8064 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8065 (x86_remove_point): Convert the packet number to a
8066 target_hw_bp_type before calling i386_low_remove_watchpoint.
8067 * win32-i386-low.c (i386_insert_point): Convert the packet number
8068 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8069 (i386_remove_point): Convert the packet number to a
8070 target_hw_bp_type before calling i386_low_remove_watchpoint.
8071
8072 2014-04-23 Pedro Alves <palves@redhat.com>
8073
8074 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8075
8076 2014-04-10 Pedro Alves <palves@redhat.com>
8077
8078 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8079 Check if the condition or command is NULL before checking if the
8080 breakpoint is known. On success, return true.
8081 * mem-break.h (add_breakpoint_condition): Document return.
8082 (add_breakpoint_commands): Add describing comment.
8083 * server.c (skip_to_semicolon): New function.
8084 (process_point_options): Use it.
8085
8086 2014-04-09 Pedro Alves <palves@redhat.com>
8087
8088 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8089 to lwpid_of.
8090
8091 2014-02-27 Pedro Alves <palves@redhat.com>
8092
8093 PR 12702
8094 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8095 macros.
8096 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8097 output.
8098 (last_thread_of_process_p): Take a PID argument instead of a
8099 thread pointer.
8100 (linux_wait_for_lwp): Delete.
8101 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8102 functions.
8103 (linux_low_filter_event): New function, party factored out from
8104 linux_wait_for_event.
8105 (linux_wait_for_event): Rename to ...
8106 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8107 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8108 sigsuspend. Check for zombie leaders.
8109 (linux_wait_for_event): Reimplement as wrapper around
8110 linux_wait_for_event_filtered.
8111 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8112 a normal or signal exit is seen, it's the whole process exiting.
8113 (wait_for_sigstop): No longer a for_each_inferior callback.
8114 Rewrite on top of linux_wait_for_event_filtered.
8115 (stop_all_lwps): Call wait_for_sigstop directly.
8116 * server.c (resume, handle_target_event): Handle
8117 TARGET_WAITKIND_NO_RESUMED.
8118
8119 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8120
8121 * win32-low.c (psapi_get_dll_name,
8122 * win32_CreateToolhelp32Snapshot): Delete.
8123 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8124 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8125 Delete.
8126 (handle_load_dll): Add function description.
8127 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8128
8129 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8130
8131 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8132 Add comment.
8133 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8134 base address when calling win32_add_one_solib.
8135 (handle_load_dll): Delete local variable load_addr.
8136 Remove 0x1000 offset applied to DLL base address when calling
8137 win32_add_one_solib.
8138 (handle_unload_dll): Add comment.
8139
8140 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8141
8142 * win32-low.c (win32_add_all_dlls): Renames
8143 win32_ensure_ntdll_loaded. Rewrite function documentation.
8144 Adjust implementation to always load all DLLs.
8145 Add 0x1000 offset to DLL base address when calling
8146 win32_add_one_solib.
8147 (child_initialization_done): New static global.
8148 (do_initial_child_stuff): Set child_initialization_done to
8149 zero during child initialization, and 1 after. Replace call
8150 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8151 Add comment.
8152 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8153 (handle_unload_dll): Add function documentation.
8154 (get_child_debug_event): Ignore load and unload DLL events
8155 during child initialization.
8156
8157 2014-02-20 Doug Evans <dje@google.com>
8158
8159 Remove global all_lwps.
8160 * inferiors.h (ptid_of): Move here from linux-low.h.
8161 (pid_of, lwpid_of): Ditto.
8162 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8163 parameter is a struct thread_info * now.
8164 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8165 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8166 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8167 directly.
8168 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8169 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8170 * linux-arm-low.c (update_registers_callback): Update, "entry"
8171 parameter is a struct thread_info * now.
8172 Fetch lwpid from current_inferior directly.
8173 (arm_insert_point): Pass &all_threads to find_inferior instead of
8174 &all_lwps.
8175 (arm_remove_point): Ditto.
8176 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8177 (arm_prepare_to_resume): Fetch pid from thread.
8178 (arm_read_description): Fetch lwpid from current_inferior directly.
8179 * linux-low.c (all_lwps): Delete.
8180 (delete_lwp): Delete call to remove_inferior.
8181 (handle_extended_wait): Fetch lwpid from thread.
8182 (add_lwp): Don't set lwp->entry.id. Remove call to
8183 add_inferior_to_list.
8184 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8185 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8186 (kill_one_lwp_callback): Ditto.
8187 (linux_kill): Don't dereference NULL pointer.
8188 Fetch ptid,lwpid from thread.
8189 (get_detach_signal): Fetch ptid from thread.
8190 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8191 Simplify call to regcache_invalidate_thread.
8192 (delete_lwp_callback): Update, "entry" parameter is a
8193 struct thread_info * now. Fetch pid from thread.
8194 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8195 (status_pending_p_callback): Update, "entry" parameter is a
8196 struct thread_info * now. Fetch ptid from thread.
8197 (find_lwp_pid): Update, "entry" parameter is a
8198 struct thread_info * now.
8199 (linux_wait_for_lwp): Fetch pid from thread.
8200 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8201 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8202 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8203 (dequeue_one_deferred_signal): Ditto.
8204 (cancel_breakpoint): Fetch ptid from current_inferior.
8205 (linux_wait_for_event): Pass &all_threads to find_inferior,
8206 not &all_lwps. Fetch ptid, lwpid from thread.
8207 (count_events_callback): Update, "entry" parameter is a
8208 struct thread_info * now.
8209 (select_singlestep_lwp_callback): Ditto.
8210 (select_event_lwp_callback): Ditto.
8211 (cancel_breakpoints_callback): Ditto.
8212 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8213 not &all_lwps.
8214 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8215 (unsuspend_one_lwp): Update, "entry" parameter is a
8216 struct thread_info * now.
8217 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8218 not &all_lwps.
8219 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8220 Fetch lwpid from thread, not lwp.
8221 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8222 Pass &all_threads to find_inferior, not &all_lwps.
8223 (send_sigstop): Fetch lwpid from thread, not lwp.
8224 (send_sigstop_callback): Update, "entry" parameter is a
8225 struct thread_info * now.
8226 (suspend_and_send_sigstop_callback): Ditto.
8227 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8228 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8229 struct thread_info * now.
8230 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8231 from thread, lwp.
8232 (lwp_running): Update, "entry" parameter is a
8233 struct thread_info * now.
8234 (stop_all_lwps): Fetch ptid from thread.
8235 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8236 (linux_resume_one_lwp): Fetch lwpid from thread.
8237 (linux_set_resume_request): Update, "entry" parameter is a
8238 struct thread_info * now. Fetch pid, lwpid from thread.
8239 (resume_status_pending_p): Update, "entry" parameter is a
8240 struct thread_info * now.
8241 (need_step_over_p): Ditto. Fetch lwpid from thread.
8242 (start_step_over): Fetch lwpid from thread.
8243 (linux_resume_one_thread): Update, "entry" parameter is a
8244 struct thread_info * now. Fetch lwpid from thread.
8245 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8246 (proceed_one_lwp): Update, "entry" parameter is a
8247 struct thread_info * now. Fetch lwpid from thread.
8248 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8249 struct thread_info * now.
8250 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8251 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8252 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8253 directly.
8254 (regsets_store_inferior_registers): Ditto.
8255 (fetch_register, store_register): Ditto.
8256 (linux_read_memory, linux_write_memory): Ditto.
8257 (linux_request_interrupt): Ditto.
8258 (linux_read_auxv): Ditto.
8259 (linux_xfer_siginfo): Ditto.
8260 (linux_qxfer_spu): Ditto.
8261 (linux_qxfer_libraries_svr4): Ditto.
8262 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8263 moved to inferiors.h.
8264 (get_lwp): Delete.
8265 (get_thread_lwp): Update.
8266 (struct lwp_info): Delete member "entry". Simplify comment for
8267 member "thread".
8268 (all_lwps): Delete.
8269 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8270 current_inferior directly.
8271 (update_watch_registers_callback): Update, "entry" parameter is a
8272 struct thread_info * now. Fetch pid from thread.
8273 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8274 (mips_insert_point): Fetch lwpid from current_inferior.
8275 Pass &all_threads to find_inferior, not &all_lwps.
8276 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8277 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8278 directly.
8279 (mips_stopped_data_address): Ditto.
8280 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8281 directly.
8282 * linux-tile-low.c (tile_arch_setup): Ditto.
8283 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8284 (update_debug_registers_callback): Update, "entry" parameter is a
8285 struct thread_info * now. Fetch pid from thread.
8286 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8287 Pass &all_threads to find_inferior, not &all_lwps.
8288 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8289 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8290 Pass &all_threads to find_inferior, not &all_lwps.
8291 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8292 (i386_dr_low_get_status): Ditto.
8293 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8294 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8295 (x86_linux_read_description): Ditto.
8296 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8297
8298 2014-02-20 Doug Evans <dje@google.com>
8299
8300 * inferiors.c (get_first_inferior): Fix buglet.
8301
8302 2014-02-19 Doug Evans <dje@google.com>
8303
8304 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8305 * inferiors.c (add_thread): Change result type to struct thread_info *.
8306 All callers updated.
8307 (add_lwp): Call add_thread here instead of in callers.
8308 All callers updated.
8309 * linux-low.h (get_lwp_thread): Rewrite.
8310 (struct lwp_info): New member "thread".
8311
8312 2014-02-19 Doug Evans <dje@google.com>
8313
8314 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8315 All callers updated.
8316
8317 2014-02-19 Doug Evans <dje@google.com>
8318
8319 * inferiors.c (add_thread): Fix whitespace.
8320
8321 2014-02-19 Doug Evans <dje@google.com>
8322
8323 * dll.c (clear_dlls): Replace accessing list implemention details
8324 with API function.
8325 * gdbthread.h (get_first_thread): Declare.
8326 * inferiors.c (for_each_inferior_with_data): New function.
8327 (get_first_thread): New function.
8328 (find_thread_ptid): Simplify.
8329 (get_first_inferior): New function.
8330 (clear_list): Delete.
8331 (one_inferior_p): New function.
8332 (clear_inferior_list): New function.
8333 (clear_inferiors): Update.
8334 * inferiors.h (for_each_inferior_with_data): Declare.
8335 (clear_inferior_list): Declare.
8336 (one_inferior_p): Declare.
8337 (get_first_inferior): Declare.
8338 * linux-low.c (linux_wait_for_event): Replace accessing list
8339 implemention details with API function.
8340 * server.c (target_running): Ditto.
8341 (accumulate_file_name_length): New function.
8342 (emit_dll_description): New function.
8343 (handle_qxfer_libraries): Replace accessing list implemention
8344 details with API function.
8345 (handle_qxfer_threads_worker): New function.
8346 (handle_qxfer_threads_proper): Replace accessing list implemention
8347 details with API function.
8348 (handle_query): Ditto.
8349 (visit_actioned_threads_callback_ftype): New typedef.
8350 (visit_actioned_threads_data): New struct.
8351 (visit_actioned_threads): Rewrite to be find_inferior callback.
8352 (resume): Call find_inferior.
8353 (handle_status): Replace accessing list implemention
8354 details with API function.
8355 (process_serial_event): Replace accessing list implemention details
8356 with API function.
8357 * target.c (set_desired_inferior): Replace accessing list implemention
8358 details with API function.
8359 * tracepoint.c (same_process_p): New function.
8360 (gdb_agent_about_to_close): Replace accessing list implemention
8361 details with API function.
8362 * win32-low.c (child_delete_thread): Replace accessing list
8363 implemention details with API function.
8364 (match_dll_by_basename): New function.
8365 (dll_is_loaded_by_basename): New function.
8366 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8367 details call to dll_is_loaded_by_basename.
8368
8369 2014-02-19 Doug Evans <dje@google.com>
8370
8371 * dll.h (struct dll_info): Add comment.
8372 * gdbthread.h (struct thread_info): Add comment.
8373 (current_ptid): Simplify.
8374 * inferiors.c (add_process): Update.
8375 (remove_process): Update.
8376 * inferiors.h (struct process_info): Rename member "head" to "entry".
8377 * linux-low.c (delete_lwp): Update.
8378 (add_lwp): Update.
8379 (last_thread_of_process_p): Update.
8380 (kill_one_lwp_callback, linux_kill): Update.
8381 (status_pending_p_callback): Update.
8382 (wait_for_sigstop): Update. Simplify read of ptid.
8383 (start_step_over): Update.
8384 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8385 (get_lwp_thread): Update.
8386 (struct lwp_info): Rename member "head" to "entry".
8387 * regcache.h (inferior_list_entry): Delete.
8388 * server.c (kill_inferior_callback): Update.
8389 (detach_or_kill_inferior_callback): Update.
8390 (print_started_pid): Update.
8391 (print_attached_pid): Update.
8392 (process_serial_event): Simplify read of ptid.
8393 * thread-db.c (thread_db_create_event): Update.
8394 (thread_db_get_tls_address): Update.
8395 * win32-low.c (current_inferior_ptid): Simplify.
8396
8397 2014-02-19 Tom Tromey <tromey@redhat.com>
8398
8399 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8400 argument.
8401 (target_supports_btrace): Update.
8402
8403 2014-02-14 Yao Qi <yao@codesourcery.com>
8404
8405 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8406 (rsp-low-ipa.o): New target.
8407
8408 2014-02-12 Tom Tromey <tromey@redhat.com>
8409
8410 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8411 convert_ascii_to_int.
8412 * regcache.c (registers_to_string): Likewise.
8413 * remote-utils.c (decode_M_packet): Likewise.
8414 * server.c (process_serial_event): Likewise.
8415
8416 2014-02-12 Tom Tromey <tromey@redhat.com>
8417
8418 * server.c (handle_query, handle_v_run): Use hex2bin, not
8419 unhexify.
8420 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8421
8422 2014-02-12 Tom Tromey <tromey@redhat.com>
8423
8424 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8425 convert_int_to_ascii.
8426 * regcache.c (registers_to_string, collect_register_as_string):
8427 Likewise.
8428 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8429 Likewise.
8430 * server.c (process_serial_event): Likewise.
8431 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8432 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8433
8434 2014-02-12 Tom Tromey <tromey@redhat.com>
8435
8436 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8437 bin2hex, not hexify.
8438 * tracepoint.c (cmd_qtstatus): Likewise.
8439
8440 2014-02-12 Tom Tromey <tromey@redhat.com>
8441
8442 * remote-utils.c (monitor_output): Pass explicit length to
8443 hexify.
8444
8445 2014-02-12 Tom Tromey <tromey@redhat.com>
8446
8447 * tracepoint.c: Include rsp-low.h.
8448 * server.c: Include rsp-low.h.
8449 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8450 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8451 declare.
8452 * remote-utils.c: Include rsp-low.h.
8453 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8454 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8455 (convert_int_to_ascii, convert_ascii_to_int): Move to
8456 common/rsp-low.c.
8457 * regcache.c: Include rsp-low.h.
8458 * ax.c: Include rsp-low.h.
8459 * Makefile.in (SFILES): Add common/rsp-low.c.
8460 (OBS): Add rsp-low.o.
8461 (rsp-low.o): New target.
8462
8463 2014-02-12 Tom Tromey <tromey@redhat.com>
8464
8465 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8466 Include print-utils.h.
8467 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8468 (plongest, thirty_two, phex_nz): Remove.
8469 * Makefile.in (SFILES): Add common/print-utils.c.
8470 (OBS): Add print-utils.o.
8471 (print-utils-ipa.o): New target.
8472 (print-utils.o): New target.
8473 (IPA_OBJS): Add print-utils-ipa.o.
8474
8475 2014-02-06 Tom Tromey <tromey@redhat.com>
8476
8477 * Makefile.in (SFILES): Fix indentation.
8478
8479 2014-02-05 Doug Evans <dje@google.com>
8480
8481 * linux-low.c (linux_wait_for_event): Improve comment.
8482 (linux_wait_1): Keep current_inferior in sync with event_child.
8483
8484 2014-01-22 Doug Evans <dje@google.com>
8485
8486 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8487
8488 2014-01-22 Doug Evans <dje@google.com>
8489
8490 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8491 * configure: Regenerate.
8492 * config.in: Regenerate.
8493 * Makefile.in (SFILES): Add debug.c.
8494 (OBS): Add debug.o.
8495 * debug.c: New file.
8496 * debug.h: New file.
8497 * linux-aarch64-low.c (*): Update all debugging printfs to use
8498 debug_printf instead of fprintf.
8499 * linux-arm-low.c (*): Ditto.
8500 * linux-cris-low.c (*): Ditto.
8501 * linux-crisv32-low.c (*): Ditto.
8502 * linux-m32r-low.c (*): Ditto.
8503 * linux-sparc-low.c (*): Ditto.
8504 * linux-x86.c (*): Ditto.
8505 * linux-low.c (*): Ditto.
8506 (linux_wait_1): Add calls to debug_enter, debug_exit.
8507 (linux_wait): Remove redundant debugging printf.
8508 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8509 (linux_resume, unstop_all_lwps): Ditto.
8510 * mem-break.c (*): Update all debugging printfs to use
8511 debug_printf instead of fprintf.
8512 * remote-utils.c (*): Ditto.
8513 * thread-db.c (*): Ditto.
8514 * server.c #include <ctype.h>, "gdb_vecs.h".
8515 (debug_threads): Moved to debug.c.
8516 (*): Update all debugging printfs to use debug_printf instead of
8517 fprintf.
8518 (start_inferior): Replace call to fflush with call to debug_flush.
8519 (monitor_show_help): Mention set debug-format.
8520 (parse_debug_format_options): New function.
8521 (handle_monitor_command): Handle "monitor set debug-format".
8522 (gdbserver_usage): Mention --debug-format.
8523 (main): Parse --debug-format.
8524 * server.h (debug_threads): Declaration moved to debug.h.
8525 #include "debug.h".
8526 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8527 trace_debug_1 that uses debug_printf.
8528 (tracepoint_look_up_symbols): Update all debugging printfs to use
8529 debug_printf instead of fprintf.
8530
8531 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8532
8533 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8534 sys/ptrace.h.
8535
8536 2014-01-17 Pedro Alves <palves@redhat.com>
8537
8538 PR build/16445
8539 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8540 defined after including gdb_proc_service.h.
8541
8542 2014-01-16 Doug Evans <dje@google.com>
8543
8544 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8545 (match_dll): Use it.
8546
8547 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8548
8549 * target.h (target_ops) <read_btrace>: Change parameters and
8550 return type to allow error reporting.
8551 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8552 trace reading errors on.
8553 * linux-low.c (linux_low_read_btrace): Pass trace reading
8554 errors on.
8555 (linux_low_disable_btrace): New.
8556
8557 2014-01-15 Doug Evans <dje@google.com>
8558
8559 * inferiors.c (thread_id_to_gdb_id): Delete.
8560 * inferiors.h (thread_id_to_gdb_id): Delete.
8561
8562 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8563
8564 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8565 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8566 versions.
8567
8568 2014-01-08 Pedro Alves <palves@redhat.com>
8569
8570 * server.c (handle_status): Don't discard previous queued stop
8571 replies or thread's pending status here.
8572 (main) <disconnection>: Do it here instead.
8573
8574 2014-01-08 Pedro Alves <palves@redhat.com>
8575
8576 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8577 * server.c (visit_actioned_threads, handle_pending_status): New
8578 function.
8579 (handle_v_cont): Factor out parts to ...
8580 (resume): ... this new function. If in all-stop, and a thread
8581 being resumed has a pending status, report it without actually
8582 resuming.
8583 (myresume): Adjust to use the new 'resume' function.
8584 (clear_pending_status_callback, set_pending_status_callback)
8585 (find_status_pending_thread_callback): New functions.
8586 (handle_status): Handle the case of multiple threads having
8587 interesting statuses to report. Report threads' real last signal
8588 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8589 with an interesting thread to report the status for, instead of
8590 always reporting the status of the first thread.
8591
8592 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8593
8594 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8595 * gdbreplay.c (gdbreplay_version): Likewise.
8596
8597 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8598
8599 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8600 iov.iov_len with the real length in use.
8601
8602 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8603
8604 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8605 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8606 for all targets that use win32-low.c.
8607 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8608 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8609
8610 2013-12-13 Pedro Alves <palves@redhat.com>
8611
8612 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8613 if equal to TARGET_WAITKIND_LOADED.
8614 * win32-low.c (cached_status): New static global.
8615 (win32_wait): Add declaration.
8616 (do_initial_child_stuff): Flush all initial pending debug events
8617 up to the initial breakpoint.
8618 (win32_wait): If CACHED_STATUS was set, return that instead
8619 of doing a real wait. Remove the code resuming the execution
8620 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8621 during the initial phase. Also remove the code changing
8622 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8623 TARGET_WAITKIND_STOPPED.
8624
8625 2013-12-11 Yao Qi <yao@codesourcery.com>
8626
8627 * notif.c (handle_notif_ack): Return 0 if no notification
8628 matches.
8629
8630 2013-11-20 Doug Evans <dje@google.com>
8631
8632 * linux-low.c (linux_set_resume_request): Fix comment.
8633
8634 2013-11-20 Doug Evans <dje@google.com>
8635
8636 * linux-low.c (resume_status_pending_p): Tweak comment.
8637
8638 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8639
8640 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8641 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8642 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8643 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8644 (srv_amd64_regobj): Add amd64-mpx.o.
8645 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8646 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8647 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8648 * i387-fp.c (num_pl_bnd_register) Added constant.
8649 (num_pl_bnd_cfg_registers) Added constant.
8650 (struct i387_xsave) Added reserved area and MPX fields.
8651 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8652 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8653 function.
8654 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8655 (init_registers_amd64_mpx_linux): Declare new function.
8656 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8657 (x86_64_regmap): Add MPX registers.
8658 (x86_linux_read_description): Add MPX case.
8659 (initialize_low_arch): Initialize MPX targets.
8660
8661 2013-11-18 Tom Tromey <tromey@redhat.com>
8662
8663 * configure: Rebuild.
8664 * configure.ac: Don't check for stdlib.h.
8665 * gdbreplay.c: Unconditionally include stdlib.h.
8666
8667 2013-11-18 Tom Tromey <tromey@redhat.com>
8668
8669 * config.in: Rebuild.
8670 * configure: Rebuild.
8671 * configure.ac: Don't use AC_HEADER_DIRENT.
8672
8673 2013-11-18 Tom Tromey <tromey@redhat.com>
8674
8675 * server.h: Don't check HAVE_STRING_H.
8676 * gdbreplay.c: Don't check HAVE_STRING_H.
8677 * configure: Rebuild.
8678
8679 2013-11-18 Tom Tromey <tromey@redhat.com>
8680
8681 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8682 LIBGNU.
8683
8684 2013-11-08 Tom Tromey <tromey@redhat.com>
8685
8686 * configure, config.in: Rebuild.
8687 * configure.ac: Remove unused configury.
8688
8689 2013-11-08 Tom Tromey <tromey@redhat.com>
8690
8691 * acinclude.m4: Include common.m4, codeset.m4.
8692 * configure, config.in: Rebuild.
8693 * configure.ac: Use GDB_AC_COMMON.
8694
8695 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8696
8697 * linux-s390-low.c (HWCAP_S390_TE): New define.
8698 (s390_arch_setup): Consider the TE field in the HWCAP for
8699 determining 'have_regset_tdb'.
8700
8701 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8702
8703 PR gdb/16014
8704 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8705 call to sizeof.
8706
8707 2013-10-02 Pedro Alves <palves@redhat.com>
8708
8709 * server.c (process_serial_event): Don't output "GDBserver
8710 exiting" if GDB is connected through stdio.
8711 * target.c (mywait): Likewise, be silent if GDB is connected
8712 through stdio.
8713
8714 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8715
8716 * lynx-low.c (lynx_add_threads_after_attach): New function.
8717 (lynx_attach): Remove call to add_thread. Add call to
8718 lynx_add_threads_after_attach instead.
8719
8720 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8721
8722 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8723 * config.in, configure: Regenerated.
8724
8725 2013-09-18 Yao Qi <yao@codesourcery.com>
8726
8727 PR server/15959
8728 * server.c (start_inferior): Clear 'resume_info'.
8729
8730 2013-09-16 Jiong Wang <jiwang@tilera.com>
8731
8732 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8733 for each register.
8734
8735 2013-09-16 Jiong Wang <jiwang@tilera.com>
8736
8737 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8738 linux-tile-low.o to srv_tgtobj.
8739
8740 2013-09-16 Will Newton <will.newton@linaro.org>
8741
8742 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8743 out regs.
8744
8745 2013-09-06 Pedro Alves <palves@redhat.com>
8746
8747 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8748 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8749 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8750 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8751 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8752 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8753
8754 2013-09-06 Pedro Alves <palves@redhat.com>
8755
8756 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8757 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8758
8759 2013-09-06 Pedro Alves <palves@redhat.com>
8760
8761 * linux-amd64-ipa.c: Include tracepoint.h.
8762 * linux-i386-ipa.c: Include tracepoint.h.
8763
8764 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8765
8766 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8767 (ps_get_thread_area): New function.
8768
8769 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8770
8771 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8772 (initialize_low_arch): Call init_registers_crisv32 rather than
8773 init_register_crisv32.
8774
8775 2013-09-05 Pedro Alves <palves@redhat.com>
8776
8777 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8778 to ...
8779 * hostio.h: ... this new file.
8780 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8781 win32-low.c: Include hostio.h.
8782
8783 2013-09-05 Pedro Alves <palves@redhat.com>
8784
8785 * server.h (gdb_client_data, handler_func, callback_handler_func)
8786 (delete_file_handler, add_file_handler, append_callback_event)
8787 (delete_callback_event, start_event_loop, initialize_event_loop):
8788 Move to event-loop.h and include it.
8789 * event-loop.h: New file.
8790
8791 2013-09-05 Pedro Alves <palves@redhat.com>
8792
8793 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8794 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8795 (loaded_dll, unloaded_dll): Move to ...
8796 * dll.h: ... this new file.
8797 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8798
8799 2013-09-05 Pedro Alves <palves@redhat.com>
8800
8801 * server.h (current_process, get_thread_process, all_processes)
8802 (add_inferior_to_list, for_each_inferior, current_inferior)
8803 (remove_inferior, add_process, remove_process, find_process_pid)
8804 (have_started_inferiors_p, have_attached_inferiors_p)
8805 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8806 (clear_inferiors, find_inferior, find_inferior_id)
8807 (inferior_target_data, set_inferior_target_data)
8808 (inferior_regcache_data, set_inferior_regcache_data): Move to
8809 inferiors.h, and include it.
8810 * inferiors.h: New file.
8811
8812 2013-09-05 Pedro Alves <palves@redhat.com>
8813
8814 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8815 Move ...
8816 * ax.h: ... here.
8817
8818 2013-09-05 Pedro Alves <palves@redhat.com>
8819
8820 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8821 tracepoint.h.
8822 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8823 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8824 (handle_tracepoint_general_set, handle_tracepoint_query)
8825 (tracepoint_finished_step, tracepoint_was_hit)
8826 (release_while_stepping_state_list, current_traceframe)
8827 (in_readonly_region, traceframe_read_mem)
8828 (fetch_traceframe_registers, traceframe_read_sdata)
8829 (traceframe_read_info, struct fast_tpoint_collect_status)
8830 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8831 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8832 (supply_fast_tracepoint_registers)
8833 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8834 (ipa_tdesc, claim_trampoline_space)
8835 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8836 (agent_mem_read, agent_get_trace_state_variable_value)
8837 (agent_set_trace_state_variable_value, agent_tsv_read)
8838 (agent_mem_read_string, get_raw_reg_func_addr)
8839 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8840 * tracepoint.h: ... this new file.
8841
8842 2013-09-05 Pedro Alves <palves@redhat.com>
8843
8844 * server.h (perror_with_name, error, fatal, warning, paddress)
8845 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8846 include it.
8847 * utils.h: New file.
8848
8849 2013-09-05 Pedro Alves <palves@redhat.com>
8850
8851 * server.h (remote_debug, noack_mode, transport_is_reliable)
8852 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8853 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8854 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8855 (write_enn, initialize_async_io, enable_async_io)
8856 (disable_async_io, check_remote_input_interrupt_request)
8857 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8858 (dead_thread_notify, prepare_resume_reply)
8859 (decode_address_to_semicolon, decode_address, decode_m_packet)
8860 (decode_M_packet, decode_X_packet, decode_xfer_write)
8861 (decode_search_memory_packet, unhexify, hexify)
8862 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8863 (look_up_one_symbol, relocate_instruction)
8864 (monitor_output): Move to remote-utils.h, and include it.
8865 * remote-utils.h: New file.
8866
8867 2013-09-05 Pedro Alves <palves@redhat.com>
8868
8869 * server.h (_): Delete.
8870
8871 2013-09-02 Pedro Alves <palves@redhat.com>
8872
8873 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8874 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8875 allocated.
8876 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8877
8878 2013-09-02 Pierre Muller <muller@sourceware.org>
8879
8880 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8881 or WriteProcessMemory complete successfully and handle
8882 ERROR_PARTIAL_COPY error.
8883
8884 2013-09-02 Pedro Alves <palves@redhat.com>
8885
8886 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8887 error instead of EIO.
8888
8889 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8890
8891 PR server/15604
8892 * linux-low.c: Include filestuff.h.
8893 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8894 * lynx-low.c: Include filestuff.h.
8895 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8896 * server.c: Include filestuff.h.
8897 (main): Call notice_open_fds.
8898 * spu-low.c: Include filestuff.h.
8899 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8900
8901 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8902
8903 * Makefile.in: Explain why ../target and ../nat are not
8904 listed as include file search paths.
8905 (linux-waitpid.o): New object file rule.
8906 * configure.srv (srv_native_linux_obj): New variable.
8907 Replace all occurrences of linux native object files with
8908 $srv_native_linux_obj.
8909 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8910 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8911 (linux_enable_event_reporting): Remove declaration.
8912 (my_waitpid): Moved to common/linux-waitpid.c.
8913 (linux_wait_for_event): Pass ptid when calling
8914 linux_enable_event_reporting.
8915 (linux_supports_tracefork_flag): Remove.
8916 (linux_enable_event_reporting): Likewise.
8917 (linux_tracefork_grandchild): Remove.
8918 (STACK_SIZE): Moved to common/linux-ptrace.c.
8919 (linux_tracefork_child): Remove.
8920 (linux_test_for_tracefork): Remove.
8921 (linux_look_up_symbols): Call linux_supports_traceclone.
8922 (initialize_low): Remove call to linux_test_for_tracefork.
8923 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8924 common/linux-ptrace.h.
8925 (PTRACE_TYPE_ARG4): Likewise.
8926 Include linux-ptrace.h.
8927
8928 2013-08-21 Pedro Alves <palves@redhat.com>
8929
8930 * config.in: Renegerate.
8931
8932 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8933
8934 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8935 (SFILES): Remove $(srcdir)/common/target-common.c and
8936 add $(srcdir)/target/waitstatus.c.
8937 (OBS): Remove target-common.o and add waitstatus.o.
8938 (server_h): Remove $(srcdir)/../common/target-common.h and
8939 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8940 and $(srcdir)/../target/waitstatus.h.
8941 (target-common.o): Remove.
8942 (waitstatus.o): New target object file.
8943 * target.h: Do not include target-common.h and
8944 include target/resume.h, target/wait.h and
8945 target/waitstatus.h.
8946
8947 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8948
8949 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8950 to PTRACE_TYPE_ARG3.
8951 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8952 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8953 PTRACE_TYPE_ARG4.
8954 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8955 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8956
8957 2013-07-27 Jie Zhang <jie@codesourcery.com>
8958 Daniel Jacobowitz <dan@codesourcery.com>
8959 Yao Qi <yao@codesourcery.com>
8960
8961 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8962 (mips-linux-watch.o): New rule.
8963 (mips_linux_watch_h): New variable.
8964 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8965 srv_tgtobj.
8966 * linux-mips-low.c: Include mips-linux-watch.h.
8967 (struct arch_process_info, struct arch_lwp_info): New.
8968 (update_watch_registers_callback): New function.
8969 (mips_linux_new_process, mips_linux_new_thread) New functions.
8970 (mips_linux_prepare_to_resume, mips_insert_point): New
8971 functions.
8972 (mips_remove_point, mips_stopped_by_watchpoint): New
8973 functions.
8974 (rsp_bp_type_to_target_hw_bp_type): New function.
8975 (mips_stopped_data_address): New function.
8976 (the_low_target): Add watchpoint support functions.
8977
8978 2013-07-27 Yao Qi <yao@codesourcery.com>
8979
8980 * i386-low.c: Include break-common.h.
8981 (enum target_hw_bp_type): Remove.
8982
8983 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8984
8985 * Makefile.in (SFILES): /common/target-common.c.
8986 (OBS): Add target-common.o.
8987 (server_h): Add $(srcdir)/../common/target-common.h.
8988 (target-common.o): New target.
8989 * server.c (queue_stop_reply_callback): Free
8990 status string after use.
8991 * target.c (target_waitstatus_to_string): Remove.
8992 * target.h: Include target-common.h.
8993 (resume_kind): Likewise.
8994 (target_waitkind): Likewise.
8995 (target_waitstatus): Likewise.
8996 (TARGET_WNOHANG): Likewise.
8997
8998 2013-07-04 Yao Qi <yao@codesourcery.com>
8999
9000 * Makefile.in (host_alias): Use @host_noncanonical@.
9001 (target_alias): Use @target_noncanonical@.
9002 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9003 ACX_NONCANONICAL_HOST.
9004 * configure: Regenerated.
9005
9006 Revert:
9007 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9008
9009 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9010 * configure: Rebuild.
9011 * Makefile.in (version_host, version_target): Get from configure.
9012 (version.c): Use $(version_host) and $(version_target).
9013
9014 2013-07-03 Pedro Alves <palves@redhat.com>
9015
9016 * Makefile.in (config.status): Depend on development.sh.
9017 * acinclude.m4: Include libmcheck.m4.
9018 * configure: Regenerate.
9019
9020 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9021
9022 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9023 attribute inside the parentheses.
9024 (winapi_DebugSetProcessKillOnExit): Ditto.
9025 (winapi_DebugBreakProcess): Ditto.
9026 (winapi_GenerateConsoleCtrlEvent): Ditto.
9027
9028 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9029
9030 * notif.h (notif_event): Add a dummy member to avoid compiler
9031 errors.
9032
9033 2013-07-01 Pedro Alves <palves@redhat.com>
9034
9035 * hostio.c (HOSTIO_PATH_MAX): Define.
9036 (require_filename, handle_open, handle_unlink, handle_readlink):
9037 Use it.
9038
9039 2013-07-01 Pedro Alves <palves@redhat.com>
9040
9041 * server.h: Include "pathmax.h".
9042 * linux-low.c: Don't include sys/param.h.
9043 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9044 MAXPATHLEN.
9045 * win32-low.c: Don't include sys/param.h.
9046 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9047
9048 2013-07-01 Pedro Alves <palves@redhat.com>
9049
9050 * event-loop.c: Don't check HAVE_UNISTD_H before including
9051 <unistd.h>.
9052 * gdbreplay.c: Likewise.
9053 * remote-utils.c: Likewise.
9054 * server.c: Likewise.
9055 * configure.ac: Don't check for unistd.h.
9056 * configure: Regenerate.
9057
9058 2013-06-28 Tom Tromey <tromey@redhat.com>
9059
9060 * Makefile.in (version.c): Use version.in, not
9061 common/version.in.
9062
9063 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9064
9065 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9066 * configure: Rebuild.
9067 * Makefile.in (version_host, version_target): Get from configure.
9068 (version.c): Use $(version_host) and $(version_target).
9069
9070 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9071
9072 Fix trace-status to output user name without trailing colon.
9073 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9074
9075 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9076
9077 Fix trace-status to output proper start-time and stop-time.
9078 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9079 output start time and stop time in hex as gdb expects.
9080
9081 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9082
9083 * tracepoint.c (build_traceframe_info_xml): Output trace state
9084 variables present in the trace buffer.
9085
9086 2013-06-24 Tom Tromey <tromey@redhat.com>
9087
9088 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9089 create-version.sh.
9090 (version.o): Remove.
9091 * gdbreplay.c: Include version.h.
9092 (version, host_name): Don't declare.
9093 * server.h: Include version.h.
9094 (version, host_name): Don't declare.
9095
9096 2013-06-12 Pedro Alves <palves@redhat.com>
9097
9098 * linux-x86-low.c (linux_is_elf64): Delete global.
9099 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9100 with local linux_pid_exe_is_elf_64_file use.
9101
9102 2013-06-11 Pedro Alves <palves@redhat.com>
9103
9104 * linux-low.c (regset_disabled, disable_regset): New functions.
9105 (regsets_fetch_inferior_registers)
9106 (regsets_store_inferior_registers): Use them.
9107 (initialize_regsets_info); Don't allocate the disabled_regsets
9108 array here.
9109 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9110 comment.
9111
9112 2013-06-11 Pedro Alves <palves@redhat.com>
9113
9114 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9115 xmalloc.
9116
9117 2013-06-11 Pedro Alves <palves@redhat.com>
9118
9119 * linux-x86-low.c (initialize_low_arch): Call
9120 init_registers_x32_avx_linux.
9121
9122 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9123
9124 Fix compatibility with Android Bionic.
9125 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9126 it is not empty.
9127
9128 2013-06-07 Pedro Alves <palves@redhat.com>
9129
9130 PR server/14823
9131 * Makefile.in (OBS): Add tdesc.o.
9132 (IPA_OBJS): Add tdesc-ipa.o.
9133 (tdesc-ipa.o): New rule.
9134 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9135 interface.
9136 * linux-low.c (new_inferior): Delete.
9137 (disabled_regsets, num_regsets): Delete.
9138 (linux_add_process): Adjust to set the new per-process
9139 new_inferior flag.
9140 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9141 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9142 was a stop. When calling arch_setup, switch the current inferior
9143 to the thread that got an event.
9144 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9145 (regsets_fetch_inferior_registers)
9146 (regsets_store_inferior_registers): New regsets_info parameter.
9147 Adjust to use it.
9148 (linux_register_in_regsets): New regs_info parameter. Adjust to
9149 use it.
9150 (register_addr, fetch_register, store_register): New usrregs_info
9151 parameter. Adjust to use it.
9152 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9153 parameter regs_info. Adjust to use it.
9154 (linux_fetch_registers): Get the current inferior's regs_info, and
9155 adjust to use it.
9156 (linux_store_registers): Ditto.
9157 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9158 (initialize_low): Don't initialize the target_regsets here. Call
9159 initialize_low_arch.
9160 * linux-low.h (target_regsets): Delete declaration.
9161 (struct regsets_info): New.
9162 (struct usrregs_info): New.
9163 (struct regs_info): New.
9164 (struct process_info_private) <new_inferior>: New field.
9165 (struct linux_target_ops): Delete the num_regs, regmap, and
9166 regset_bitmap fields. New field regs_info.
9167 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9168 * i387-fp.c (num_xmm_registers): Delete.
9169 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9170 calls to new interface.
9171 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9172 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9173 Infer the number of xmm registers from the regcache's target
9174 description.
9175 * i387-fp.h (num_xmm_registers): Delete.
9176 * inferiors.c (add_thread): Don't install the thread's regcache
9177 here.
9178 * proc-service.c (gregset_info): Fetch the current inferior's
9179 regs_info. Adjust to use it.
9180 * regcache.c: Include tdesc.h.
9181 (register_bytes, reg_defs, num_registers)
9182 (gdbserver_expedite_regs): Delete.
9183 (get_thread_regcache): If the thread doesn't have a regcache yet,
9184 create one, instead of aborting gdbserver.
9185 (regcache_invalidate_one): Rename to ...
9186 (regcache_invalidate_thread): ... this.
9187 (regcache_invalidate_one): New.
9188 (regcache_invalidate): Only invalidate registers of the current
9189 process.
9190 (init_register_cache): Add target_desc parameter, and use it.
9191 (new_register_cache): Ditto. Assert the target description has a
9192 non zero registers_size.
9193 (regcache_cpy): Add assertions. Adjust.
9194 (realloc_register_cache, set_register_cache): Delete.
9195 (registers_to_string, registers_from_string): Adjust.
9196 (find_register_by_name, find_regno, find_register_by_number)
9197 (register_cache_size): Add target_desc parameter, and use it.
9198 (free_register_cache_thread, free_register_cache_thread_one)
9199 (regcache_release, register_cache_size): New.
9200 (register_size): Add target_desc parameter, and use it.
9201 (register_data, supply_register, supply_register_zeroed)
9202 (supply_regblock, supply_register_by_name, collect_register)
9203 (collect_register_as_string, collect_register_by_name): Adjust.
9204 * regcache.h (struct target_desc): Forward declare.
9205 (struct regcache) <tdesc>: New field.
9206 (init_register_cache, new_register_cache): Add target_desc
9207 parameter.
9208 (regcache_invalidate_thread): Declare.
9209 (regcache_invalidate_one): Delete declaration.
9210 (regcache_release): Declare.
9211 (find_register_by_number, register_cache_size, register_size)
9212 (find_regno): Add target_desc parameter.
9213 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9214 declarations.
9215 * remote-utils.c: Include tdesc.h.
9216 (outreg, prepare_resume_reply): Adjust.
9217 * server.c: Include tdesc.h.
9218 (gdbserver_xmltarget): Delete declaration.
9219 (get_features_xml, process_serial_event): Adjust.
9220 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9221 declare.
9222 (struct process_info) <tdesc>: New field.
9223 (ipa_tdesc): Declare.
9224 * tdesc.c: New file.
9225 * tdesc.h: New file.
9226 * tracepoint.c: Include tdesc.h.
9227 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9228 (get_context_regcache): Adjust to pass ipa_tdesc down.
9229 (do_action_at_tracepoint): Adjust to get the register cache size
9230 from the context regcache's description.
9231 (traceframe_walk_blocks): Adjust to get the register cache size
9232 from the current trace frame's description.
9233 (traceframe_get_pc): Adjust to get current trace frame's
9234 description and pass it down.
9235 (gdb_collect): Adjust to get the register cache size from the
9236 IPA's description.
9237 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9238 (gdbserver_xmltarget): Delete.
9239 (initialize_low_tracepoint): Set the ipa's target description.
9240 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9241 (initialize_low_tracepoint): Set the ipa's target description.
9242 * linux-x86-low.c: Include tdesc.h.
9243 [__x86_64__] (is_64bit_tdesc): New.
9244 (ps_get_thread_area, x86_get_thread_area): Use it.
9245 (i386_cannot_store_register): Rename to ...
9246 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9247 (i386_cannot_fetch_register): Rename to ...
9248 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9249 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9250 to new interface.
9251 (target_regsets): Rename to ...
9252 (x86_regsets): ... this.
9253 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9254 interface.
9255 (x86_siginfo_fixup): Use is_64bit_tdesc.
9256 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9257 (tdesc_x32_avx_linux, tdesc_x32_linux)
9258 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9259 Declare.
9260 (x86_linux_update_xmltarget): Delete.
9261 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9262 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9263 (AMD64_LINUX_USER64_CS): New.
9264 (x86_linux_read_description): New, based on
9265 x86_linux_update_xmltarget.
9266 (same_process_callback): New.
9267 (x86_arch_setup_process_callback): New.
9268 (x86_linux_update_xmltarget): New.
9269 (x86_regsets_info): New.
9270 (amd64_linux_regs_info): New.
9271 (i386_linux_usrregs_info): New.
9272 (i386_linux_regs_info): New.
9273 (x86_linux_regs_info): New.
9274 (x86_arch_setup): Reimplement.
9275 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9276 (x86_emit_ops): Ditto.
9277 (the_low_target): Adjust. Install x86_linux_regs_info,
9278 x86_cannot_fetch_register, and x86_cannot_store_register.
9279 (initialize_low_arch): New.
9280 * linux-ia64-low.c (tdesc_ia64): Declare.
9281 (ia64_fetch_register): Adjust.
9282 (ia64_usrregs_info, regs_info): New globals.
9283 (ia64_regs_info): New function.
9284 (the_low_target): Adjust.
9285 (initialize_low_arch): New function.
9286 * linux-sparc-low.c (tdesc_sparc64): Declare.
9287 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9288 Adjust.
9289 (sparc_arch_setup): New function.
9290 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9291 (the_low_target): Adjust.
9292 (initialize_low_arch): New function.
9293 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9294 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9295 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9296 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9297 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9298 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9299 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9300 (tdesc_powerpc_isa205_vsx64l): Declare.
9301 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9302 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9303 (ppc_set_pc, ppc_get_hwcap): Adjust.
9304 (ppc_usrregs_info): Forward declare.
9305 (!__powerpc64__) ppc_regmap_adjusted: New global.
9306 (ppc_arch_setup): Adjust to the current process'es target
9307 description.
9308 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9309 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9310 (ppc_store_evrregset): Adjust.
9311 (target_regsets): Rename to ...
9312 (ppc_regsets): ... this, and make static.
9313 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9314 (ppc_regs_info): New function.
9315 (the_low_target): Adjust.
9316 (initialize_low_arch): New function.
9317 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9318 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9319 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9320 (tdesc_s390x_linux64v2): Declare.
9321 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9322 (s390_fill_gregset, s390_store_last_break): Adjust.
9323 (target_regsets): Rename to ...
9324 (s390_regsets): ... this, and make static.
9325 (s390_get_pc, s390_set_pc): Adjust.
9326 (s390_get_hwcap): New target_desc parameter, and use it.
9327 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9328 (s390_arch_setup): Adjust to set the current process'es target
9329 description. Don't adjust the regmap.
9330 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9331 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9332 (regs_info_3264): New globals.
9333 (s390_regs_info): New function.
9334 (the_low_target): Adjust.
9335 (initialize_low_arch): New function.
9336 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9337 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9338 [__mips64] (init_registers_mips_linux)
9339 (init_registers_mips_dsp_linux): Delete defines.
9340 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9341 (have_dsp): New global.
9342 (mips_read_description): New, based on mips_arch_setup.
9343 (mips_arch_setup): Reimplement.
9344 (get_usrregs_info): New function.
9345 (mips_cannot_fetch_register, mips_cannot_store_register)
9346 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9347 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9348 (target_regsets): Rename to ...
9349 (mips_regsets): ... this, and make static.
9350 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9351 (dsp_regs_info, regs_info): New globals.
9352 (mips_regs_info): New function.
9353 (the_low_target): Adjust.
9354 (initialize_low_arch): New function.
9355 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9356 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9357 Declare.
9358 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9359 (arm_read_description): New, with bits factored from
9360 arm_arch_setup.
9361 (arm_arch_setup): Reimplement.
9362 (target_regsets): Rename to ...
9363 (arm_regsets): ... this, and make static.
9364 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9365 (arm_regs_info): New function.
9366 (the_low_target): Adjust.
9367 (initialize_low_arch): New function.
9368 * linux-m68k-low.c (tdesc_m68k): Declare.
9369 (target_regsets): Rename to ...
9370 (m68k_regsets): ... this, and make static.
9371 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9372 (m68k_regs_info): New function.
9373 (m68k_arch_setup): New function.
9374 (the_low_target): Adjust.
9375 (initialize_low_arch): New function.
9376 * linux-sh-low.c (tdesc_sharch): Declare.
9377 (target_regsets): Rename to ...
9378 (sh_regsets): ... this, and make static.
9379 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9380 (sh_regs_info, sh_arch_setup): New functions.
9381 (the_low_target): Adjust.
9382 (initialize_low_arch): New function.
9383 * linux-bfin-low.c (tdesc_bfin): Declare.
9384 (bfin_arch_setup): New function.
9385 (bfin_usrregs_info, regs_info): New globals.
9386 (bfin_regs_info): New function.
9387 (the_low_target): Adjust.
9388 (initialize_low_arch): New function.
9389 * linux-cris-low.c (tdesc_cris): Declare.
9390 (cris_arch_setup): New function.
9391 (cris_usrregs_info, regs_info): New globals.
9392 (cris_regs_info): New function.
9393 (the_low_target): Adjust.
9394 (initialize_low_arch): New function.
9395 * linux-cris-low.c (tdesc_crisv32): Declare.
9396 (cris_arch_setup): New function.
9397 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9398 (cris_regs_info): New function.
9399 (the_low_target): Adjust.
9400 (initialize_low_arch): New function.
9401 * linux-m32r-low.c (tdesc_m32r): Declare.
9402 (m32r_arch_setup): New function.
9403 (m32r_usrregs_info, regs_info): New globals.
9404 (m32r_regs_info): Adjust.
9405 (initialize_low_arch): New function.
9406 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9407 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9408 (tic6x_usrregs_info): Forward declare.
9409 (tic6x_read_description): New function, based on ...
9410 (tic6x_arch_setup): ... this. Reimplement.
9411 (target_regsets): Rename to ...
9412 (tic6x_regsets): ... this, and make static.
9413 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9414 (tic6x_regs_info): New function.
9415 (the_low_target): Adjust.
9416 (initialize_low_arch): New function.
9417 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9418 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9419 (target_regsets): Rename to ...
9420 (xtensa_regsets): ... this, and make static.
9421 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9422 globals.
9423 (xtensa_arch_setup, xtensa_regs_info): New functions.
9424 (the_low_target): Adjust.
9425 (initialize_low_arch): New function.
9426 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9427 (nios2_arch_setup): Set the current process'es tdesc.
9428 (target_regsets): Rename to ...
9429 (nios2_regsets): ... this.
9430 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9431 (nios2_regs_info): New function.
9432 (the_low_target): Adjust.
9433 (initialize_low_arch): New function.
9434 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9435 (aarch64_arch_setup): Set the current process'es tdesc.
9436 (target_regsets): Rename to ...
9437 (aarch64_regsets): ... this.
9438 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9439 (aarch64_regs_info): New function.
9440 (the_low_target): Adjust.
9441 (initialize_low_arch): New function.
9442 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9443 globals.
9444 (target_regsets): Rename to ...
9445 (tile_regsets): ... this.
9446 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9447 (tile_regs_info): New function.
9448 (tile_arch_setup): Set the current process'es tdesc.
9449 (the_low_target): Adjust.
9450 (initialize_low_arch): New function.
9451 * spu-low.c (tdesc_spu): Declare.
9452 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9453 * win32-arm-low.c (tdesc_arm): Declare.
9454 (arm_arch_setup): New function.
9455 (the_low_target): Install arm_arch_setup instead of
9456 init_registers_arm.
9457 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9458 (init_windows_x86): Rename to ...
9459 (i386_arch_setup): ... this. Set `win32_tdesc'.
9460 (the_low_target): Adjust.
9461 * win32-low.c (win32_tdesc): New global.
9462 (child_add_thread): Don't create the thread cache here.
9463 (do_initial_child_stuff): Set the new process'es tdesc.
9464 * win32-low.h (struct target_desc): Forward declare.
9465 (win32_tdesc): Declare.
9466 * lynx-i386-low.c (tdesc_i386): Declare global.
9467 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9468 * lynx-low.c (lynx_tdesc): New global.
9469 (lynx_add_process): Set the new process'es tdesc.
9470 * lynx-low.h (struct target_desc): Forward declare.
9471 (lynx_tdesc): Declare global.
9472 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9473 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9474 * nto-low.c (nto_tdesc): New global.
9475 (do_attach): Set the new process'es tdesc.
9476 * nto-low.h (struct target_desc): Forward declare.
9477 (nto_tdesc): Declare.
9478 * nto-x86-low.c (tdesc_i386): Declare.
9479 (nto_x86_arch_setup): Set `nto_tdesc'.
9480
9481 2013-06-04 Gary Benson <gbenson@redhat.com>
9482
9483 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9484 to qSupported response when appropriate.
9485 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9486 with nonzero-length annex.
9487 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9488 arguments supplied in annex.
9489
9490 2013-05-31 Doug Evans <dje@google.com>
9491
9492 PR server/15594
9493 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9494 64 bits in 64-cross-32 environment.
9495
9496 2013-05-28 Pedro Alves <palves@redhat.com>
9497
9498 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9499 (aarch64-without-fpu.c): Delete rule.
9500 * configure.srv (aarch64*-*-linux*): Remove references to
9501 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9502 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9503 declaration.
9504
9505 2013-05-24 Pedro Alves <palves@redhat.com>
9506
9507 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9508 instead of strchr/decode_address. Error if the range isn't split
9509 with a ','. Don't assume there's be a ':' in the action.
9510
9511 2013-05-23 Yao Qi <yao@codesourcery.com>
9512 Pedro Alves <palves@redhat.com>
9513
9514 * linux-low.c (lwp_in_step_range): New function.
9515 (linux_wait_1): If the thread was range stepping and stopped
9516 outside the stepping range, report the stop to GDB. Otherwise,
9517 continue stepping. Add range stepping debug output.
9518 (linux_set_resume_request): Copy the step range from the resume
9519 request to the lwp.
9520 (linux_supports_range_stepping): New.
9521 (linux_target_ops) <supports_range_stepping>: Set to
9522 linux_supports_range_stepping.
9523 * linux-low.h (struct linux_target_ops)
9524 <supports_range_stepping>: New field.
9525 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9526 * linux-x86-low.c (x86_supports_range_stepping): New.
9527 (the_low_target) <supports_range_stepping>: Set to
9528 x86_supports_range_stepping.
9529 * server.c (handle_v_cont): Handle 'r' action.
9530 (handle_v_requests): Append ";r" if the target supports range
9531 stepping.
9532 * target.h (struct thread_resume) <step_range_start,
9533 step_range_end>: New fields.
9534 (struct target_ops) <supports_range_stepping>:
9535 New field.
9536 (target_supports_range_stepping): New macro.
9537
9538 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9539
9540 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9541 confusion in comment.
9542
9543 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9544
9545 * lynx-low.c (struct process_info_private): New type.
9546 (lynx_add_process): New function.
9547 (lynx_create_inferior, lynx_attach): Replace calls to
9548 add_process by calls to lynx_add_process.
9549 (lynx_resume): If PTID is null, then try using
9550 current_process()->private->last_wait_event_ptid.
9551 Add comments.
9552 (lynx_clear_inferiors): Delete. The contents of that function
9553 has been inlined in lynx_mourn;
9554 (lynx_wait_1): Save the ptid in the process's private data.
9555 (lynx_mourn): Free the process' private data. Replace call
9556 to lynx_clear_inferiors by call to clear_inferiors.
9557
9558 2013-05-17 Yao Qi <yao@codesourcery.com>
9559
9560 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9561 the right place.
9562
9563 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9564
9565 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9566 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9567 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9568 PT_TEXT_END_ADDR guards. Update comments.
9569 (linux_target_op) <read_offsets>: Conditionally define to
9570 linux_read_offsets if the target is UCLIBC and if it defines
9571 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9572
9573 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9574 Andrew Jenner <andrew@codesourcery.com>
9575
9576 * Makefile.in (SFILES): Add linux-nios2-low.c.
9577 (clean): Add action to delete nios2-linux.c.
9578 (nios2-linux.c): New rule.
9579 * configure.srv: Add nios2*-*-linux*.
9580 * linux-nios2-low.c: New.
9581
9582 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9583
9584 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9585
9586 2013-04-25 Hui Zhu <hui@codesourcery.com>
9587
9588 PR gdb/15186
9589 * ax.c (ax_printf): Add fflush.
9590
9591 2013-04-22 Tom Tromey <tromey@redhat.com>
9592
9593 * Makefile.in (SFILES): Add filestuff.c.
9594 (OBS): Add filestuff.o.
9595 (filestuff.o): New target.
9596 * config.in, configure: Rebuild.
9597 * configure.ac: Check for fdwalk, pipe2.
9598
9599 2013-04-17 Pedro Alves <palves@redhat.com>
9600
9601 * configure.ac (USE_THREAD_DB): Delete variable.
9602 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9603 Don't AC_SUBST USE_THREAD_DB.
9604 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9605 * config.in, configure: Regenerate.
9606
9607 2013-04-16 Pedro Alves <palves@redhat.com>
9608
9609 * linux-low.h (struct lwp_info) <thread_known>: Move under
9610 the USE_THREAD_DB #ifdef.
9611
9612 2013-04-16 Pedro Alves <palves@redhat.com>
9613
9614 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9615 (linux-low.o): Delete rule.
9616 * linux-low.h: Always include "gdb_thread_db.h" instead of
9617 conditionally including thread_db.h.
9618 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9619 HAVE_THREAD_DB_H.
9620
9621 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9622
9623 * Makefile.in (install-only): Fix make install regression.
9624
9625 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9626
9627 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9628 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9629 installation.
9630 * gdbserver.1: Remove.
9631
9632 2013-03-22 Pedro Alves <palves@redhat.com>
9633
9634 * linux-low.c (handle_extended_wait): Don't call
9635 linux_enable_event_reporting.
9636
9637 2013-03-15 Tony Theodore <tonyt@logyst.com>
9638
9639 PR build/9098:
9640 * Makefile.in (SHELL): Use @SHELL@.
9641
9642 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9643
9644 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9645 compiler warning.
9646
9647 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9648
9649 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9650 Remove extraneous NULL element.
9651
9652 2013-03-13 Yao Qi <yao@codesourcery.com>
9653
9654 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9655 'V' block in trace frame.
9656
9657 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9658
9659 * target.h (struct target_ops): Add btrace ops.
9660 (target_supports_btrace): New macro.
9661 (target_enable_btrace): New macro.
9662 (target_disable_btrace): New macro.
9663 (target_read_btrace): New macro.
9664 * gdbthread.h (struct thread_info): Add btrace field.
9665 * server.c: Include btrace-common.h.
9666 (handle_btrace_general_set): New function.
9667 (handle_btrace_enable): New function.
9668 (handle_btrace_disable): New function.
9669 (handle_general_set): Call handle_btrace_general_set.
9670 (handle_qxfer_btrace): New function.
9671 (struct qxfer qxfer_packets[]): Add btrace entry.
9672 * inferiors.c (remove_thread): Disable btrace.
9673 * linux-low: Include linux-btrace.h.
9674 (linux_low_enable_btrace): New function.
9675 (linux_low_read_btrace): New function.
9676 (linux_target_ops): Add btrace ops.
9677 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9678 Add srv_linux_btrace=yes.
9679 (x86_64-*-linux*): Add linux-btrace.o.
9680 Add srv_linux_btrace=yes.
9681 * configure.ac: Define HAVE_LINUX_BTRACE.
9682 * config.in: Regenerated.
9683 * configure: Regenerated.
9684
9685 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9686
9687 * server.c (handle_qxfer): Preserve error message if -3 is
9688 returned.
9689 (qxfer): Document the -3 return value.
9690
9691 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9692
9693 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9694 (linux_btrace_h): New variable.
9695 (linux-btrace.o): New rule.
9696
9697 2013-03-08 Stan Shebs <stan@codesourcery.com>
9698 Hafiz Abid Qadeer <abidh@codesourcery.com>
9699
9700 * tracepoint.c (trace_buffer_size): New global.
9701 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9702 (init_trace_buffer): Change to one-argument function. Allocate
9703 trace buffer memory.
9704 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9705 handle QTBuffer:size packet.
9706 (cmd_bigqtbuffer_size): New function.
9707 (initialize_tracepoint): Call init_trace_buffer with
9708 DEFAULT_TRACE_BUFFER_SIZE.
9709 * server.c (handle_query): Add QTBuffer:size in the
9710 supported packets.
9711
9712 2013-03-07 Yao Qi <yao@codesourcery.com>
9713
9714 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9715 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9716 of -1.
9717 (cmd_qtsp): Adjust condition. Do post increment.
9718 Set cur_action and cur_step_action back to 0.
9719
9720 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9721
9722 PR server/15236
9723 * linux-low.c (linux_write_memory): Return early success if LEN is
9724 zero.
9725
9726 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9727
9728 * configure.srv: Add x86_64-*-cygwin* as target.
9729
9730 2013-02-28 Tom Tromey <tromey@redhat.com>
9731
9732 * configure.ac: Invoke AC_SYS_LARGEFILE.
9733 * configure, config.in: Rebuild.
9734
9735 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9736
9737 * win32-low.c: Throughout, fix format strings and casts of
9738 printf-like functions to avoid type related warnings on all
9739 platforms.
9740 (get_child_debug_event): Print dwDebugEventCode as hex since
9741 that's how it's usually documented.
9742
9743 2013-02-28 Yao Qi <yao@codesourcery.com>
9744
9745 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9746 pulongest.
9747
9748 2013-02-27 Jiong Wang <jiwang@tilera.com>
9749
9750 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9751 (reg-tilegx32.c): New rule.
9752 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9753 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9754 different register info initializer according to elf class.
9755 (init_registers_tilgx32): New function. The tilegx32 register info
9756 initializer.
9757 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9758 (tile_store_gregset): Likewise.
9759
9760 2013-02-27 Yao Qi <yao@codesourcery.com>
9761
9762 * server.c (process_point_options): Print debug message when
9763 debug_threads is true.
9764
9765 2013-02-26 Yao Qi <yao@codesourcery.com>
9766
9767 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9768
9769 2013-02-19 Pedro Alves <palves@redhat.com>
9770 Kai Tietz <ktietz@redhat.com>
9771
9772 PR gdb/15161
9773
9774 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9775 instead of strtoul to extract address from packet.
9776 (process_serial_event) <'z'>: Likewise.
9777
9778 2013-02-18 Yao Qi <yao@codesourcery.com>
9779
9780 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9781
9782 2013-02-14 Pedro Alves <palves@redhat.com>
9783
9784 Plug memory leak.
9785
9786 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9787 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9788
9789 2013-02-14 Pedro Alves <palves@redhat.com>
9790
9791 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9792
9793 2013-02-14 Pedro Alves <palves@redhat.com>
9794
9795 * tracepoint.c (save_string): Delete.
9796 (add_tracepoint_action): Use savestring instead of save_string.
9797
9798 2013-02-12 Pedro Alves <palves@redhat.com>
9799
9800 * linux-xtensa-low.c: Ditto.
9801 * xtensa-xtregs.c: Ditto.
9802
9803 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9804
9805 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9806 thread_db.
9807
9808 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9809
9810 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9811 aarch64_num_wp_regs and aarch64_num_bp_regs to
9812 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9813
9814 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9815
9816 * linux-aarch64-low.c (ps_get_thread_area): Replace
9817 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9818
9819 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9820 Marcus Shawcroft <marcus.shawcroft@arm.com>
9821 Nigel Stephens <nigel.stephens@arm.com>
9822 Yufeng Zhang <yufeng.zhang@arm.com>
9823
9824 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9825 (aarch64.c, aarch64-without-fpu.c): New targets.
9826 * configure.srv (aarch64*-*-linux*): New.
9827 * linux-aarch64-low.c: New file.
9828
9829 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9830
9831 * linux-low.c (handle_extended_wait, linux_create_inferior)
9832 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9833 (dequeue_one_deferred_signal, linux_resume_one_thread)
9834 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9835 (linux_tracefork_grandchild, linux_test_for_tracefork)
9836 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9837 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9838 where the argument is 0.
9839
9840 2013-01-25 Yao Qi <yao@codesourcery.com>
9841
9842 * event-loop.c: Include "queue.h".
9843 (gdb_event_p): New typedef.
9844 (struct gdb_event) <next_event>: Remove.
9845 (event_queue): Change to QUEUE(gdb_event_p).
9846 (async_queue_event): Remove.
9847 (gdb_event_xfree): New.
9848 (initialize_event_loop): New.
9849 (process_event): Use API from QUEUE.
9850 (wait_for_event): Likewise.
9851 * server.c (main): Call initialize_event_loop.
9852 * server.h (initialize_event_loop): Declare.
9853
9854 2013-01-18 Yao Qi <yao@codesourcery.com>
9855
9856 * ax.h (struct eval_agent_expr_context): New.
9857 (gdb_eval_agent_expr): Update declaration.
9858 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9859 TFRAME. Add new argument CTX.
9860 * server.h (struct eval_agent_expr_context): Declare.
9861 (agent_mem_read, agent_tsv_read): Update declaration.
9862 (agent_mem_read_string): Likewise.
9863 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9864 (add_traceframe_block): Add new argument TPOINT.
9865 Increase TPOINT->traceframe_usage.
9866 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9867 eval_tracepoint_agent_expr.
9868 (condition_true_at_tracepoint): Likewise.
9869 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9870 (agent_mem_read_string, agent_tsv_read): Likewise.
9871
9872 2013-01-16 Yao Qi <yao@codesourcery.com>
9873
9874 * linux-low.c (linux_resume_one_lwp): Don't check
9875 'lwp->bp_reinsert != 0'.
9876
9877 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9878 Pedro Alves <palves@redhat.com>
9879
9880 * lynx-low.c (ptrace_request_to_str): Define a temporary
9881 macro and use it to simplify this function's implementation.
9882
9883 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9884
9885 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9886 sets errno.
9887
9888 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9889
9890 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9891
9892 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9893
9894 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9895
9896 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9897
9898 * lynx-low.c (lynx_resume): Use the resume_info parameter
9899 to determine the ptid for the lynx_ptrace call, unless
9900 it is equal to minus_one_ptid, in which case we use the
9901 ptid of the current_inferior.
9902 (lynx_wait_1): After having received a thread create/exit
9903 event, resume the inferior's execution using the signaling
9904 thread's ptid, rather than the old ptid.
9905
9906 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9907
9908 * lynx-low.c (lynx_resume): Delete variable ret.
9909
9910 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9911
9912 * gdbreplay.c (gdbreplay_version): Update copyright year.
9913 * server.c (gdbserver_version): Likewise.
9914
9915 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9916
9917 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9918 new thread.
9919
9920 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9921
9922 * lynx-low.c (ptrace_request_to_str): Add handling for
9923 PTRACE_GETTRACESIG.
9924
9925 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9926
9927 * lynx-low.c (lynx_attach): Delete variable new_process.
9928
9929 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9930
9931 * lynx-low.c (lynx_create_inferior): Delete variable
9932 new_process.
9933
9934 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9935
9936 * lynx-low.c (ptrace_request_to_str): Do not handle
9937 PTRACE_GETTHREADLIST if this macro does not exist.
9938
9939 2012-12-15 Yao Qi <yao@codesourcery.com>
9940
9941 * Makefile.in (OBS): Add notif.o.
9942 * notif.c, notif.h: New.
9943 * server.c: Include "notif.h".
9944 (struct vstop_notif) <next>: Remove.
9945 <base>: New field.
9946 (queue_stop_reply): Update.
9947 (push_event, send_next_stop_reply): Remove.
9948 (discard_queued_stop_replies): Update.
9949 (notif_stop): New variable.
9950 (handle_v_stopped): Remove.
9951 (handle_v_requests): Don't call handle_v_stopped. Call
9952 handle_ack_notif instead.
9953 (queue_stop_reply_callback): Call notif_event_enque instead
9954 of queue_stop_reply.
9955 (handle_status): Don't call send_next_stop_reply, call
9956 notif_write_event instead.
9957 (kill_inferior_callback): Likewise.
9958 (detach_or_kill_inferior_callback): Likewise.
9959 (main): Call initialize_notif.
9960 (process_serial_event): Call QUEUE_is_empty.
9961 (handle_target_event): Call notif_push instead of push event.
9962 * server.h (push_event): Remove declaration.
9963
9964 2012-12-10 Tom Tromey <tromey@redhat.com>
9965
9966 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9967 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9968 macros.
9969 (.c.o): Rewrite.
9970 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9971 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9972 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9973 (amd64-linux-ipa.o, ax.o): Rewrite.
9974 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9975 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9976 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9977 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9978 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9979 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9980 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9981 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9982 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9983 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9984 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9985 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9986 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9987 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9988 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9989 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9990 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9991 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9992 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9993 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9994 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9995 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9996 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9997 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9998 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9999 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10000 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10001 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10002 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10003 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10004 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10005 (reg-tilegx.o): Remove.
10006 (all_object_files): New macro.
10007 Include .deps files.
10008 * aclocal.m4, configure: Rebuild.
10009 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10010 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10011 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10012
10013 2012-12-05 Tom Tromey <tromey@redhat.com>
10014
10015 PR gdb/14917:
10016 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10017
10018 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10019
10020 * configure.ac: Check for linux/perf_event.h.
10021 * config.in: Regenerated.
10022 * configure: Regenerated.
10023
10024 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10025
10026 * hostio.c (handle_readlink): Decrease buffer size
10027 parameter passed to readlink by one byte.
10028
10029 2012-11-26 Yao Qi <yao@codesourcery.com>
10030
10031 * configure.ac (build_warnings): Append '-Wempty-body'.
10032 * configure: Regenerated.
10033 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10034 body.
10035
10036 2012-11-15 Pierre Muller <muller@sourceware.org>
10037
10038 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10039 * config.in: Regenerate.
10040 * configure: Regenerate.
10041 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10042 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10043 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10044 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10045 header.
10046 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10047 instead of <sys/wait.h> header.
10048 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10049
10050 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10051
10052 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10053 (various make rules): Remove -DGDBSERVER
10054
10055 2012-11-09 Yao Qi <yao@codesourcery.com>
10056
10057 * spu-low.c (current_ptid): Move it to ..
10058 * gdbthread.h: ... here. New.
10059 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10060 * server.c (myresume, process_serial_event): Likewise.
10061 * thread-db.c (thread_db_find_new_threads): Likewise.
10062 * tracepoint.c (run_inferior_command): Likewise.
10063
10064 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10065
10066 * server.c (handle_search_memory_1): Include access length in
10067 warning message.
10068
10069 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10070
10071 * linux-crisv32-low.c: Fix compile errors.
10072
10073 2012-09-04 Yao Qi <yao@codesourcery.com>
10074
10075 * tracepoint.c (cmd_qtsv): Adjust debug message.
10076 Don't check CUR_TPOINT.
10077
10078 2012-08-28 Yao Qi <yao@codesourcery.com>
10079
10080 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10081 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10082 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10083 Remove declarations of xmalloc, xreallloc, xstrdup and
10084 freeargv.
10085 * Makefile.in (libiberty_h): New.
10086 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10087 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10088
10089 2012-08-23 Yao Qi <yao@codesourcery.com>
10090
10091 * server.h: Remove declaration of 'xsnprintf'.
10092
10093 2012-08-22 Keith Seitz <keiths@redhat.com>
10094
10095 * server.h: Include build-gnulib-gbserver/config.h.
10096 * gdbreplay.c: Likewise.
10097
10098 2012-08-08 Doug Evans <dje@google.com>
10099
10100 * Makefile.in (SFILES): Add gdb_vecs.c.
10101 (OBS): Add gdb_vecs.o.
10102 (gdb_vecs_h, host_defs_h): New variables.
10103 (thread-db.o): Add $(gdb_vecs_h) dependency.
10104 (gdb_vecs.o): New rule.
10105 * thread-db.c: #include "gdb_vecs.h".
10106 (thread_db_load_search): Use a vector to iterate over path elements.
10107 Handle text appearing after "$pdir".
10108
10109 * configure.ac: Add check for strstr.
10110 * config.in: Regenerate.
10111 * configure: Regenerate.
10112
10113 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10114
10115 * hostio.c (handle_pread): If pread fails, fall back to attempting
10116 lseek/read.
10117 (handle_pwrite): Likewise for pwrite.
10118
10119 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10120
10121 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10122 between unsupported TYPE and unimplementable ADDR/LEN combination.
10123 (arm_insert_point): Act on new return value.
10124
10125 2012-07-31 Pedro Alves <palves@redhat.com>
10126
10127 * server.c (process_point_options): Only skip tokens if we find
10128 one that is unrecognized. Don't treat 'X' specially while
10129 skipping unrecognized tokens.
10130
10131 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10132
10133 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10134 to 4-byte-align HW breakpoint addresses for Thumb.
10135
10136 2012-07-27 Yao Qi <yao@codesourcery.com>
10137
10138 PR remote/14161.
10139
10140 * server.h: Declare gdb_agent_about_to_close.
10141 * target.c (kill_inferior): Include "agent.h".
10142 New. Send command 'kill'.
10143 * target.h (kill_inferior): Removed macro.
10144 * tracepoint.c (gdb_agent_about_to_close): New.
10145 (gdb_agent_helper_thread): Handle command 'close'.
10146 Wait endlessly until the inferior stops.
10147 Install gdb_agent_remove_socket to atexit hook.
10148 (agent_socket_name): New static variable.
10149 (gdb_agent_socket_init): Replace local variable 'name' with
10150 'agent_socket_name'.
10151 (gdb_agent_remove_socket): New.
10152
10153 2012-07-27 Yao Qi <yao@codesourcery.com>
10154
10155 * server.c (process_point_options): Stop at 'X' when parsing.
10156
10157 2012-07-19 Michael Eager <eager@eagercon.com>
10158
10159 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10160 to hw_execute.
10161 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10162 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10163 hardware breakpoint.
10164
10165 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10166
10167 * gdbserver/linux-low.c (initialize_low): Call
10168 linux_ptrace_init_warnings.
10169
10170 2012-07-02 Doug Evans <dje@google.com>
10171
10172 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10173 pointer to int.
10174
10175 2012-07-02 Stan Shebs <stan@codesourcery.com>
10176
10177 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10178 (ax.o): Add it to build rule.
10179 (ax-ipa.o): Ditto.
10180 (OBS): Add format.o.
10181 (IPA_OBS): Add format.o.
10182 * server.c (handle_query): Claim support for breakpoint commands.
10183 (process_point_options): Add command case.
10184 (process_serial_event): Leave running if there are printfs in
10185 effect.
10186 * mem-break.h (any_persistent_commands): Declare.
10187 (add_breakpoint_commands): Declare.
10188 (gdb_no_commands_at_breakpoint): Declare.
10189 (run_breakpoint_commands): Declare.
10190 * mem-break.c (struct point_command_list): New struct.
10191 (struct breakpoint): New field command_list.
10192 (any_persistent_commands): New function.
10193 (add_commands_to_breakpoint): New function.
10194 (add_breakpoint_commands): New function.
10195 (gdb_no_commands_at_breakpoint): New function.
10196 (run_breakpoint_commands): New function.
10197 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10198 locally.
10199 * ax.c: Include format.h.
10200 (ax_printf): New function.
10201 (gdb_eval_agent_expr): Add printf opcode.
10202
10203 2012-06-13 Yao Qi <yao@codesourcery.com>
10204
10205 * server.c (start_inferior): Remove duplicated writes to fields
10206 'last_resume_kind' and 'last_status' of 'current_inferior'.
10207
10208 2012-06-12 Yao Qi <yao@codesourcery.com>
10209 Pedro Alves <palves@redhat.com>
10210
10211 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10212 comment.
10213 * server.c (handle_v_cont): Extend comment.
10214
10215 2012-06-11 Yao Qi <yao@codesourcery.com>
10216
10217 * linux-low.c (linux_attach): Add 'static'.
10218
10219 2012-06-06 Yao Qi <yao@codesourcery.com>
10220
10221 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10222
10223 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10224
10225 Fix gcc -flto compilation warning.
10226 * server.c (main): Make variable multi_mode and attach volatile.
10227
10228 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10229
10230 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10231 if the platform doesn't know about it.
10232
10233 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10234
10235 * Makefile.in (SFILES): Add linux-tile-low.c.
10236 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10237 * configure.srv: Handle tilegx-*-linux*.
10238 * linux-tile-low.c: New file.
10239
10240 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10241
10242 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10243
10244 2012-05-24 Pedro Alves <palves@redhat.com>
10245
10246 PR gdb/7205
10247
10248 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10249
10250 2012-05-24 Pedro Alves <palves@redhat.com>
10251
10252 PR gdb/7205
10253
10254 Replace target_signal with gdb_signal throughout.
10255
10256 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10257
10258 * linux-low.c (linux_store_registers): Avoid the copying sequence
10259 when no data has been retrieved by ptrace.
10260
10261 2012-05-22 Will Deacon <will.deacon@arm.com>
10262
10263 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10264 Include asm/ptrace.h.
10265 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10266 already defined.
10267
10268 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10269
10270 * linux-low.c (linux_store_registers): Don't re-retrieve data
10271 with ptrace that has already been obtained from /proc. Always
10272 copy any data retrieved with ptrace to the buffer supplied.
10273
10274 2012-05-11 Yao Qi <yao@codesourcery.com>
10275 Pedro Alves <palves@redhat.com>
10276
10277 * linux-low.c (enum stopping_threads_kind): New.
10278 (stopping_threads): Change type to `enum stopping_threads_kind'.
10279 (handle_extended_wait): If stopping and suspending threads, leave
10280 the new_lwp suspended too.
10281 (linux_wait_for_event): Adjust.
10282 (stop_all_lwps): Set `stopping_threads' to
10283 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10284 whether we're suspending threads or just stopping them. Assert no
10285 recursion happens.
10286
10287 2012-04-29 Yao Qi <yao@codesourcery.com>
10288
10289 * server.h: Move some code to ...
10290 * gdbthread.h: ... here. New.
10291 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10292 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10293 (nto-low.o, win32-low.o): Likewise.
10294 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10295 * regcache.c, remote-utils.c, server.c: Likewise.
10296 * target.c, tracepoint.c, win32-low.c: Likewise.
10297
10298 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10299
10300 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10301 (PTRACE_ARG4_TYPE): Likewise.
10302 (PTRACE_XFER_TYPE): Likewise.
10303 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10304 ptrace to PTRACE_ARG3_TYPE.
10305 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10306 (PTRACE_ARG4_TYPE): Likewise.
10307 (PTRACE_XFER_TYPE): Likewise.
10308 (linux_detach_one_lwp): Cast fourth argument of
10309 ptrace to long then PTRACE_ARG4_TYPE.
10310 (regsets_fetch_inferior_registers): Cast third argument of
10311 ptrace to long then PTRACE_ARG3_TYPE.
10312 (regsets_store_inferior_registers): Likewise.
10313
10314 2012-04-20 Pedro Alves <palves@redhat.com>
10315
10316 * configure: Regenerate.
10317
10318 2012-04-19 Pedro Alves <palves@redhat.com>
10319
10320 * Makefile.in (GNULIB_BUILDDIR): New.
10321 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10322 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10323 (all, install-only, uninstall, clean-info, all-lib, clean): No
10324 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10325 (maintainer-clean realclean distclean): Use subdir_do.
10326 (subdir_do): New.
10327 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10328 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10329 * acinclude.m4: Include acx_configure_dir.m4.
10330 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10331 calls. Call AC_PROG_RANLIB. Configure gnulib using
10332 ACX_CONFIGURE_DIR.
10333 (GNULIB): New.
10334 (GNULIB_STDINT_H): Adjust.
10335 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10336 * gdbreplay.c: Include build-gnulib/config.h.
10337 * server.h: Likewise.
10338 * aclocal.m4: Regenerate.
10339 * config.in: Regenerate.
10340 * configure: Regenerate.
10341
10342 2012-04-19 Pedro Alves <palves@redhat.com>
10343
10344 * Makefile.in (LIBGNU, INCGNU): Adjust.
10345 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10346 (all, install-only, uninstall, clean-info, all-lib, clean)
10347 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10348 * configure.ac: Adjust AC_OUTPUT output.
10349 * aclocal.m4: Regenerate.
10350 * configure: Regenerate.
10351
10352 2012-04-19 Pedro Alves <palves@redhat.com>
10353
10354 * Makefile.in (generated_files): New.
10355 (server_h): Remove the explicit dependency on config.h, and depend
10356 on $generated_files.
10357
10358 2012-04-19 Pedro Alves <palves@redhat.com>
10359
10360 * Makefile.in (INCGNU): Add -Ignulib.
10361
10362 2012-04-19 Pedro Alves <palves@redhat.com>
10363
10364 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10365 (INCGNU): ... this, and spell out -I here.
10366 (GNULIB_LIB): Rename to ...
10367 (LIBGNU): ... this.
10368 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10369
10370 2012-04-19 Pedro Alves <palves@redhat.com>
10371
10372 * config.in: Regenerate.
10373
10374 2012-04-19 Pedro Alves <palves@redhat.com>
10375
10376 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10377 * server.h (memmem): Remove declaration.
10378 * config.in: Regenerate.
10379 * configure: Regenerate.
10380
10381 2012-04-19 Yao Qi <yao@codesourcery.com>
10382
10383 * Makefile.in (SFILES): Add common/vec.c.
10384 (OBS): Add vec.o.
10385 (vec.o): New rule.
10386
10387 2012-04-19 Yao Qi <yao@codesourcery.com>
10388
10389 * remote-utils.c (prepare_resume_reply): Replace with macro
10390 target_core_of_thread.
10391 * server.c (handle_qxfer_threads_proper): Likewise.
10392 * target.h (traget_core_of_thread): New macro.
10393
10394 2012-04-18 Pedro Alves <palves@redhat.com>
10395
10396 * aclocal.m4: Regenerate.
10397 * configure: Regenerate.
10398
10399 2012-04-16 Yao Qi <yao@codesourcery.com>
10400
10401 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10402 duplicated on address.
10403
10404 2012-04-16 Yao Qi <yao@codesourcery.com>
10405
10406 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10407 (struct tracepoint_action_ops) <send>: New field.
10408 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10409 (agent_expr_send, x_tracepoint_action_send): New.
10410 (l_tracepoint_action_send): New.
10411 (cmd_qtdp): Download and install tracepoint
10412 according to `use_agent'.
10413 (run_inferior_command): Add one more parameter `len'.
10414 Update callers.
10415 (tracepoint_send_agent): New.
10416 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10417
10418 2012-04-16 Yao Qi <yao@codesourcery.com>
10419
10420 * tracepoint.c (download_tracepoints): Moved to ...
10421 (cmd_qtstart): ... here.
10422
10423 2012-04-14 Yao Qi <yao@codesourcery.com>
10424
10425 * tracepoint.c: Include inttypes.h.
10426 (struct collect_memory_action): Use sized types.
10427 (struct tracepoint): Likewise.
10428 (cmd_qtdp, stop_tracing): Update print specifiers.
10429 (cmd_qtp, response_tracepoint): Likewise.
10430 (collect_data_at_tracepoint): Likewise.
10431 (collect_data_at_step): Likewise.
10432
10433 2012-04-14 Yao Qi <yao@codesourcery.com>
10434
10435 Import gnulib module inttypes.
10436 * aclocal.m4, config.in, configure: Regenerated.
10437
10438 2012-04-14 Yao Qi <yao@codesourcery.com>
10439
10440 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10441 Makefile and config.status at last.
10442
10443 2012-04-13 Yao Qi <yao@codesourcery.com>
10444
10445 * tracepoint.c: Include stdint.h unconditionally.
10446
10447 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10448
10449 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10450 on BFD_HAVE_SYS_PROCFS_TYPE.
10451 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10452 * configure: Regenerate.
10453 * config.in: Likewise.
10454
10455 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10456
10457 * Makefile.in (clean): Also remove x32.c x32-linux.c
10458 x32-avx.c x32-avx-linux.c.
10459 (x32.o): New target.
10460 (x32.c): Likewise.
10461 (x32-linux.o): Likewise.
10462 (x32-linux.c): Likewise.
10463 (x32-avx.o): Likewise.
10464 (x32-avx.c): Likewise.
10465 (x32-avx-linux.o): Likewise.
10466 (x32-avx-linux.c): Likewise.
10467
10468 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10469 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10470 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10471 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10472 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10473 i386/x32-avx-linux.xml.
10474
10475 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10476 (init_registers_x32_avx_linux): Likwise.
10477 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10478 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10479
10480 2012-04-13 Pedro Alves <palves@redhat.com>
10481
10482 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10483 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10484 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10485 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10486 the sub-make.
10487
10488 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10489
10490 * linux-x86-low.c (compat_x32_clock_t): New.
10491 (compat_x32_siginfo_t): Likewise.
10492 (compat_x32_siginfo_from_siginfo): Likewise.
10493 (siginfo_from_compat_x32_siginfo): Likewise.
10494 (linux_is_elf64): Likewise.
10495 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10496 and siginfo_from_compat_x32_siginfo for x32.
10497 (x86_arch_setup): Set linux_is_elf64.
10498
10499 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10500
10501 PR gdb/13969
10502 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10503 e_machine field.
10504 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10505 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10506 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10507 compatible with process.
10508
10509 2012-04-12 Yao Qi <yao@codesourcery.com>
10510
10511 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10512 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10513 (install-only, install-info, clean): Handle sub dir gnulib.
10514 (all-lib, am--refresh): New targets.
10515 (memmem.o): Remove target.
10516 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10517 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10518 (AC_REPLACE_FUNCS): Remove memmem.
10519 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10520 (AC_OUTPUT): Generate Makefile in gnulib/.
10521 * aclocal.m4, config.in, configure: Regenerated.
10522
10523 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10524
10525 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10526
10527 2012-04-05 Pedro Alves <palves@redhat.com>
10528
10529 -Werror=strict-aliasing
10530
10531 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10532 pointer.
10533
10534 2012-04-04 Pedro Alves <palves@redhat.com>
10535
10536 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10537 (sparc_store_gregset_from_stack, sparc_store_gregset)
10538 (sparc_breakpoint_at): Fix formatting.
10539
10540 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10541
10542 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10543 are available.
10544 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10545 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10546 * config.in: Regenerate.
10547 * configure: Likewise.
10548
10549 2012-03-29 Pedro Alves <palves@redhat.com>
10550
10551 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10552 Correct ptrace arguments.
10553
10554 2012-03-28 Pedro Alves <palves@redhat.com>
10555
10556 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10557 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10558 (IA64_FR1_REGNUM): New defines.
10559 (ia64_fetch_register): New.
10560 (the_low_target): Install it.
10561 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10562 field.
10563 * linux-low.c (linux_fetch_registers): Try the
10564 the_low_target.fetch_register hook first.
10565
10566 * linux-arm-low.c (the_low_target): Adjust.
10567 * linux-bfin-low.c (the_low_target): Adjust.
10568 * linux-cris-low.c (the_low_target): Adjust.
10569 * linux-crisv32-low.c (the_low_target): Adjust.
10570 * linux-m32r-low.c (the_low_target): Adjust.
10571 * linux-m68k-low.c (the_low_target): Adjust.
10572 * linux-mips-low.c (the_low_target): Adjust.
10573 * linux-ppc-low.c (the_low_target): Adjust.
10574 * linux-s390-low.c (the_low_target): Adjust.
10575 * linux-sh-low.c (the_low_target): Adjust.
10576 * linux-sparc-low.c (the_low_target): Adjust.
10577 * linux-tic6x-low.c (the_low_target): Adjust.
10578 * linux-x86-low.c (the_low_target): Adjust.
10579 * linux-xtensa-low.c (the_low_target): Adjust.
10580
10581 2012-03-26 Pedro Alves <palves@redhat.com>
10582
10583 * server.c (handle_qxfer_libraries): Don't bail early if
10584 the_target->qxfer_libraries_svr4 is not NULL.
10585
10586 2012-03-26 Pedro Alves <palves@redhat.com>
10587
10588 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10589
10590 2012-03-23 Pedro Alves <palves@redhat.com>
10591
10592 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10593 "library-list-svr4" element's start tag when the the DSO list is
10594 empty.
10595
10596 2012-03-23 Pedro Alves <palves@redhat.com>
10597
10598 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10599 a variable whose type size is the same as the inferior's pointer
10600 size.
10601
10602 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10603
10604 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10605 struct siginfo.
10606 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10607 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10608 * linux-low.h: Include <signal.h>.
10609 (struct siginfo): Remove forward declaration.
10610 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10611 struct siginfo.
10612
10613 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10614
10615 * .gitignore: Ignore more files.
10616
10617 2012-03-19 Pedro Alves <palves@redhat.com>
10618 Jan Kratochvil <jan.kratochvil@redhat.com>
10619
10620 * server.c (cont_thread, general_thread): Add describing comments.
10621 (start_inferior): Clear `cont_thread'.
10622 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10623 of a process.
10624
10625 2012-03-15 Yao Qi <yao@codesourcery.com>
10626
10627 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10628 handling to ...
10629 (cmd_qtdp): ... here.
10630
10631 2012-03-15 Yao Qi <yao@codesourcery.com>
10632
10633 * tracepoint.c (struct tracepoint_action_ops): New.
10634 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10635 (m_tracepoint_action_download): New.
10636 (r_tracepoint_action_download): New.
10637 (x_tracepoint_action_download): New.
10638 (l_tracepoint_action_download): New.
10639 (add_tracepoint_action): Install `action->ops' according type.
10640 (download_tracepoint_1): Move code `download' function pointer
10641 of various tracepoint_action_ops.
10642
10643 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10644
10645 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10646 linux_ptrace_attach_warnings.
10647
10648 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10649
10650 * Makefile.in (linux-ptrace.o): New.
10651 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10652 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10653 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10654 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10655 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10656 of these targets.
10657 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10658
10659 2012-03-08 Yao Qi <yao@codesourcery.com>
10660 Pedro Alves <palves@redhat.com>
10661
10662 Fix PR server/13392.
10663 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10664 offset of JMP insn.
10665 * tracepoint.c (remove_tracepoint): New.
10666 (cmd_qtdp): Call remove_tracepoint when failed to install.
10667
10668 2012-03-07 Pedro Alves <palves@redhat.com>
10669
10670 * linux-low.c (get_detach_signal): New.
10671 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10672 Pass on pending signals to PTRACE_DETACH. Check the result of the
10673 ptrace call.
10674 * server.c (program_signals, program_signals_p): New.
10675 (handle_general_set): Handle QProgramSignals.
10676 * server.h (program_signals, program_signals_p): Declare.
10677
10678 2012-03-05 Pedro Alves <palves@redhat.com>
10679 Jan Kratochvil <jan.kratochvil@redhat.com>
10680
10681 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10682 New comment why.
10683
10684 2012-03-03 Yao Qi <yao@codesourcery.com>
10685
10686 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10687 agent_look_up_symbols.
10688
10689 2012-03-03 Yao Qi <yao@codesourcery.com>
10690
10691 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10692 (linux-x86-low.o): Likewise.
10693 * server.h: Remove in_process_agent_loaded.
10694 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10695 common/agent.c.
10696 Update callers.
10697
10698 2012-03-03 Yao Qi <yao@codesourcery.com>
10699
10700 * tracepoint.c (gdb_agent_capability): New global.
10701 (in_process_agent_loaded_ust): Renamed to
10702 `in_process_agent_supports_ust'.
10703 Update callers.
10704 (in_process_agent_supports_ust): Call agent_capability_check.
10705 (clear_installed_tracepoints): Assert that agent supports
10706 agent.
10707
10708 2012-03-03 Yao Qi <yao@codesourcery.com>
10709
10710 * linux-low.c (linux_supports_agent): New.
10711 (linux_target_ops): Initialize field `supports_agent' with
10712 linux_supports_agent.
10713 * target.h (struct target_ops) <supports_agent>: New.
10714 (target_supports_agent): New macro.
10715 * server.c (handle_general_set): Handle packet 'QAgent'.
10716 (handle_query): Send `QAgent+'.
10717 * Makefile.in (server.o): Depends on agent.h.
10718
10719 2012-03-03 Yao Qi <yao@codesourcery.com>
10720
10721 * Makefile.in (OBS): Add agent.o.
10722 Add new rule for agent.o.
10723 Track dependence of tracepoint.c on agent.h.
10724 * tracepoint.c (run_inferior_command_1):
10725 (run_inferior_command): Call agent_run_command.
10726 (gdb_ust_connect_sync_socket): Deleted. Move it to
10727 common/agent.c.
10728 (resume_thread, stop_thread): Likewise.
10729 (gdb_ust_socket_init): Renamed to ...
10730 (gdb_agent_socket_init): ... New.
10731 (gdb_ust_thread): Renamed to ...
10732 (gdb_agent_helper_thread): ... New.
10733 (gdb_ust_init): Move some code to ...
10734 (gdb_agent_init): ... here. New.
10735 [HAVE_UST]: Call gdb_ust_init.
10736 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10737 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10738 * config.in, configure: Regenerated.
10739
10740 2012-03-02 Pedro Alves <palves@redhat.com>
10741
10742 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10743 * linux-low.c (struct simple_pid_list): New.
10744 (stopped_pids): New a struct simple_pid_list pointer.
10745 (add_to_pid_list, pull_pid_from_list): New.
10746 (handle_extended_wait): Don't assume the first signal new children
10747 report is SIGSTOP. Adjust call to pull_pid_from_list.
10748 (linux_wait_for_lwp): Adjust.
10749
10750 2012-03-02 Yao Qi <yao@codesourcery.com>
10751
10752 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10753 debug log.
10754
10755 2012-03-02 Yao Qi <yao@codesourcery.com>
10756
10757 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10758 `stop_pc' and `tpoint'. Update caller.
10759
10760 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10761
10762 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10763 * linux-low.c (use_linux_regsets): New macro.
10764 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10765 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10766 (linux_register_in_regsets): New function.
10767 (usr_fetch_inferior_registers): Skip registers covered by
10768 regsets.
10769 (usr_store_inferior_registers): Likewise.
10770 (usr_fetch_inferior_registers): New macro.
10771 (usr_store_inferior_registers): Likewise.
10772 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10773 (linux_store_registers): Likewise.
10774 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10775 prototype.
10776 (init_registers_mips64_dsp_linux): Likewise.
10777 (init_registers_mips_linux): New macro.
10778 (init_registers_mips_dsp_linux): Likewise.
10779 (mips_dsp_num_regs): Likewise.
10780 (DSP_BASE, DSP_CONTROL): New fallback macros.
10781 (mips_base_regs): New macro.
10782 (mips_regmap): Use it. Fix the size.
10783 (mips_dsp_regmap): New variable.
10784 (mips_dsp_regset_bitmap): Likewise.
10785 (mips_arch_setup): New function.
10786 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10787 than mips_regmap.
10788 (mips_cannot_store_register): Likewise.
10789 (the_low_target): Update .arch_setup, .num_regs and .regmap
10790 initializers. Add .regset_bitmap initializer.
10791 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10792 initializer.
10793 * linux-bfin-low.c (the_low_target): Likewise.
10794 * linux-cris-low.c (the_low_target): Likewise.
10795 * linux-crisv32-low.c (the_low_target): Likewise.
10796 * linux-ia64-low.c (the_low_target): Likewise.
10797 * linux-m32r-low.c (the_low_target): Likewise.
10798 * linux-m68k-low.c (the_low_target): Likewise.
10799 * linux-ppc-low.c (the_low_target): Likewise.
10800 * linux-s390-low.c (the_low_target): Likewise.
10801 * linux-sh-low.c (the_low_target): Likewise.
10802 * linux-sparc-low.c (the_low_target): Likewise.
10803 * linux-tic6x-low.c (the_low_target): Likewise.
10804 * linux-x86-low.c (the_low_target): Likewise.
10805 * linux-xtensa-low.c (the_low_target): Likewise.
10806 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10807 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10808 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10809 srv_xmlfiles.
10810 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10811 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10812
10813 2012-02-29 Yao Qi <yao@codesourcery.com>
10814 Pedro Alves <palves@redhat.com>
10815
10816 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10817 `step_over_finished' is true.
10818
10819 2012-02-27 Pedro Alves <palves@redhat.com>
10820
10821 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10822 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10823
10824 2012-02-27 Pedro Alves <palves@redhat.com>
10825
10826 PR server/9684
10827 * linux-low.c (pid_is_stopped): New.
10828 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10829
10830 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10831
10832 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10833 of conditions.
10834
10835 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10836
10837 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10838
10839 2012-02-24 Luis Machado <lgustavo@codesourcery>
10840
10841 * server.c (handle_query): Advertise support for target-side
10842 breakpoint condition evaluation.
10843 (process_point_options): New function.
10844 (process_serial_event): When inserting a breakpoint, check for
10845 a target-side condition that should be evaluated.
10846
10847 * mem-break.c: Include regcache.h and ax.h.
10848 (point_cond_list_t): New data structure.
10849 (breakpoint) <cond_list>: New field.
10850 (find_gdb_breakpoint_at): Make non-static.
10851 (delete_gdb_breakpoint_at): Clear any target-side
10852 conditions.
10853 (clear_gdb_breakpoint_conditions): New function.
10854 (add_condition_to_breakpoint): Likewise.
10855 (add_breakpoint_condition): Likewise.
10856 (gdb_condition_true_at_breakpoint): Likewise.
10857 (gdb_breakpoint_here): Return result directly instead
10858 of going through a local variable.
10859
10860 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10861 (clear_gdb_breakpoint_conditions): Likewise.
10862 (add_breakpoint_condition): Likewise.
10863 (gdb_condition_true_at_breakpoint): Likewise.
10864
10865 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10866 (need_step_over_p): Take target-side breakpoint condition into
10867 consideration.
10868
10869 2012-02-24 Luis Machado <lgustavo@codesourcery>
10870
10871 * server.h: Include tracepoint.h.
10872 (agent_mem_read, agent_get_trace_state_variable_value,
10873 agent_set_trace_state_variable_value,
10874 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10875 get_set_tsv_func_addr): New prototypes.
10876
10877 * ax.h: New include file.
10878 * ax.c: New source file.
10879
10880 * tracepoint.c: Include ax.h.
10881 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10882 agent_expr, eval_result_type): Move to ax.h.
10883 (parse_agent_expr): Rename to ...
10884 (gdb_parse_agent_expr): ... this, make it non-static and move
10885 to ax.h.
10886 (unparse_agent_expr) Rename to ...
10887 (gdb_unparse_agent_expr): ... this, make it non-static and move
10888 to ax.h.
10889 (eval_agent_expr): Rename to ...
10890 (eval_tracepoint_agent_expr): ... this.
10891 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10892 forward declarations.
10893 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10894 (agent_get_trace_state_variable_value): New function.
10895 (agent_set_trace_state_variable_value): New function.
10896 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10897 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10898 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10899 (condition_true_at_tracepoint): Likewise.
10900 (parse_agent_expr): Rename to ...
10901 (gdb_parse_agent_expr): ... this and move to ax.c.
10902 (unparse_agent_expr): Rename to ...
10903 (gdb_unparse_agent_expr): ... this and move to ax.c.
10904 (gdb_agent_op_name): Move to ax.c.
10905 (eval_agent_expr): Rename to ...
10906 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10907 and move to ax.c.
10908 (eval_tracepoint_agent_expr): New function.
10909 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10910 non-static.
10911 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10912 ax.c.
10913 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10914 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10915 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10916 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10917 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10918 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10919 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10920 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10921 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10922 (compile_bytecodes): Remove forward declaration.
10923 (is_goto_target): Move to ax.c.
10924 (compile_bytecodes): Move to ax.c and call
10925 agent_get_trace_state_variable_value (...) and
10926 agent_set_trace_state_variable_value (...).
10927
10928 * Makefile.in: Update ax.c and IPA dependencies.
10929
10930 2012-02-24 Pedro Alves <palves@redhat.com>
10931
10932 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10933 (cmd_bigqtbuffer_circular): ... this. Only handle
10934 'QTBuffer:circular:'.
10935 (handle_tracepoint_general_set): Adjust.
10936
10937 2012-02-16 Yao Qi <yao@codesourcery.com>
10938
10939 * inferiors.c: Move code to ...
10940 * dll.c: .... here. New.
10941 * server.h: Declare clear_dlls.
10942 * Makefile.in (SFILES): Add dll.c.
10943 (OBS): Add dll.o
10944 (dll.o): New rule.
10945
10946 2012-02-11 Yao Qi <yao@codesourcery.com>
10947
10948 * server.c: (handle_monitor_command): Add a new parameter
10949 `own_buf'.
10950 (handle_query): Update caller.
10951
10952 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10953
10954 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10955 * configure, config.in: Regenerate.
10956 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10957 is not defined.
10958
10959 2012-02-02 Pedro Alves <palves@redhat.com>
10960
10961 Try SIGKILL first, then PTRACE_KILL.
10962 * linux-low.c (linux_kill_one_lwp): New.
10963 (linux_kill_one_lwp): Rename to ...
10964 (kill_one_lwp_callback): ... this. Use the new
10965 linux_kill_one_lwp.
10966
10967 2012-02-02 Pedro Alves <palves@redhat.com>
10968
10969 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10970 inferior.
10971
10972 2012-01-27 Pedro Alves <palves@redhat.com>
10973
10974 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10975 (elf_64_file_p): Make static.
10976 (linux_pid_exe_is_elf_64_file): New.
10977 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10978 Delete declarations.
10979 (linux_pid_exe_is_elf_64_file): Declare.
10980 * linux-x86-low.c (x86_arch_setup): Use
10981 linux_pid_exe_is_elf_64_file.
10982
10983 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10984
10985 * linux-low.c (linux_wait_for_event_1): Rename to ...
10986 (linux_wait_for_event): ... here and merge it with former
10987 linux_wait_for_event - new variable wait_ptid, use it.
10988 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10989
10990 2012-01-23 Pedro Alves <palves@redhat.com>
10991
10992 * server.c (main): Avoid yet another case of infinite loop while
10993 detaching/killing after a longjmp.
10994
10995 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10996
10997 Code cleanup.
10998 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10999
11000 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11001
11002 * hostio.c (handle_readlink): New function.
11003 (handle_vFile): Call it to handle "vFile:readlink" packets.
11004
11005 2012-01-20 Pedro Alves <palves@redhat.com>
11006 Ulrich Weigand <ulrich.weigand@linaro.org>
11007
11008 * server.c (handle_v_requests): Only support vAttach and vRun to
11009 start multiple processes when in extended protocol mode.
11010
11011 2012-01-17 Pedro Alves <palves@redhat.com>
11012
11013 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11014 memalign plus mprotect to allocate the scratch buffer.
11015
11016 2012-01-13 Pedro Alves <palves@redhat.com>
11017
11018 * server.c (attach_inferior): Clear `cont_thread'.
11019
11020 2012-01-13 Pedro Alves <palves@redhat.com>
11021
11022 * server.c (main): Avoid infinite loop while detaching/killing
11023 after a longjmp.
11024
11025 2012-01-09 Doug Evans <dje@google.com>
11026
11027 * server.c (start_inferior): Set last_ptid in --wrapper case.
11028
11029 2012-01-06 Yao Qi <yao@codesourcery.com>
11030
11031 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11032 defined.
11033 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11034
11035 2012-01-04 Yao Qi <yao@codesourcery.com>
11036
11037 * tracepoint.c (cmd_qtdp): Print debug message
11038 for static tracepoint.
11039
11040 2012-01-04 Yao Qi <yao@codesourcery.com>
11041
11042 * tracepoint.c (trace_vdebug): Differentiate debug message
11043 between gdbserver and IPA.
11044
11045 2012-01-03 Yao Qi <yao@codesourcery.com>
11046
11047 * tracepoint.c (tracepoint_was_hit): Don't collect for
11048 static tracepoint.
11049
11050 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11051
11052 * terminal.h: Reformat copyright header.
11053
11054 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11055
11056 * server.c (gdbserver_version): Update copyright year.
11057 * gdbreplay.c (gdbreplay_version): Likewise.
11058
11059 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11060
11061 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11062
11063 Revert:
11064 2011-12-18 Hui Zhu <teawater@gmail.com>
11065 * linux-low.c (linux_create_inferior): Save return value to ret.
11066
11067 2011-12-18 Hui Zhu <teawater@gmail.com>
11068
11069 * linux-low.c (linux_create_inferior): Save return value to ret.
11070
11071 2011-12-16 Doug Evans <dje@google.com>
11072
11073 * linux-low.c (linux_create_inferior): If stdio connection,
11074 redirect stdin from /dev/null, stdout to stderr.
11075 * remote-utils.c (remote_is_stdio): New static global.
11076 (remote_connection_is_stdio): New function.
11077 (remote_prepare): Handle stdio connection.
11078 (remote_open): Ditto.
11079 (remote_close): Don't close stdin for stdio connections.
11080 (read_prim,write_prim): New functions. Replace all calls to
11081 read/write to these.
11082 * server.c (main): Watch for "-" argument. Move call to
11083 remote_prepare before start_inferior.
11084 * server.h (STDIO_CONNECTION_NAME): New macro.
11085 (remote_connection_is_stdio): Declare.
11086
11087 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11088 in debugging output.
11089
11090 2011-12-15 Yao Qi <yao@codesourcery.com>
11091
11092 * tracepoint.c: Include sys/syscall.h.
11093 (gdb_ust_thread): Remove preprocessor conditional.
11094
11095 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11096
11097 * linux-low.c (linux_detach_one_lwp): Call
11098 the_low_target.prepare_to_resume before detaching.
11099
11100 2011-12-14 Yao Qi <yao@codesourcery.com>
11101
11102 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11103 of write.
11104
11105 2011-12-14 Yao Qi <yao@codesourcery.com>
11106
11107 * i386-low.c (i386_low_stopped_data_address): Initialize local
11108 variable `control'.
11109
11110 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11111
11112 PR remote/13492
11113
11114 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11115 DR_CONTROL unless necessary. Extend comments.
11116 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11117 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11118
11119 2011-12-13 Yao Qi <yao@codesourcery.com>
11120
11121 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11122 macros.
11123 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11124
11125 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11126
11127 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11128 Print new debug message for such case.
11129
11130 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11131
11132 Fix overlapping memcpy.
11133 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11134 the read_inferior_memory transfer.
11135 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11136 write_inferior_memory transfer.
11137 (set_fast_tracepoint_jump): New variable buf. Use it for the
11138 read_inferior_memory and write_inferior_memory transfers.
11139 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11140 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11141 Use it for the write_inferior_memory transfer.
11142 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11143 buffers.
11144
11145 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11146
11147 * linux-low.c (fetch_register, store_register): Make code
11148 consistent, fix formatting.
11149
11150 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11151
11152 * linux-low.c (usr_store_inferior_registers): Factor out code
11153 to handle individual registers into...
11154 (store_register): ... this new function.
11155
11156 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11157
11158 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11159 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11160 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11161 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11162 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11163 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11164 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11165 (srv_xmlfiles): Add new XML files.
11166
11167 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11168 and <sys/uio.h>.
11169 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11170 (init_registers_s390_linux32v1): Add prototype.
11171 (init_registers_s390_linux32v2): Likewise.
11172 (init_registers_s390_linux64v1): Likewise.
11173 (init_registers_s390_linux64v2): Likewise.
11174 (init_registers_s390x_linux64v1): Likewise.
11175 (init_registers_s390x_linux64v2): Likewise.
11176 (s390_num_regs): Increment to 52.
11177 (s390_regmap): Add orig_r2 register.
11178 (s390_num_regs_3264): Increment to 68.
11179 (s390_regmap_3264): Add orig_r2 register.
11180 (s390_collect_ptrace_register): Handle orig_r2 register.
11181 (s390_supply_ptrace_register): Likewise.
11182 (s390_fill_last_break): New function.
11183 (s390_store_last_break): Likewise.
11184 (s390_fill_system_call): New function.
11185 (s390_store_system_call): Likewise.
11186 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11187 register sets.
11188 (s390_check_regset): New function.
11189 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11190 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11191 Update target_regsets for available register sets.
11192
11193 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11194 Jan Kratochvil <jan.kratochvil@redhat.com>
11195
11196 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11197 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11198 New.
11199 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11200 * linux-low.h (struct process_info_private): New member r_debug.
11201 * server.c (handle_qxfer_libraries): Call
11202 the_target->qxfer_libraries_svr4.
11203 (handle_qxfer_libraries_svr4): New function.
11204 (qxfer_packets): New entry "libraries-svr4".
11205 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11206 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11207 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11208 PACKET_qXfer_libraries_svr4.
11209
11210 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11211
11212 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11213 PSW address/mask between 8-byte and 16-byte formats.
11214 (s390_supply_ptrace_register): Likewise.
11215 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11216 basic addressing mode bit.
11217
11218 2011-11-24 Stan Shebs <stan@codesourcery.com>
11219
11220 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11221
11222 2011-11-17 Stan Shebs <stan@codesourcery.com>
11223
11224 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11225 (tracing_start_time): New global.
11226 (tracing_stop_time): New global.
11227 (tracing_user_name): New global.
11228 (tracing_notes): New global.
11229 (tracing_stop_note): New global.
11230 (cmd_qtstart): Set traceframe_usage, start_time.
11231 (stop_tracing): Set stop_time.
11232 (cmd_qtstatus): Report additional status.
11233 (cmd_qtp): New function.
11234 (handle_tracepoint_query): Call it.
11235 (cmd_qtnotes): New function.
11236 (handle_tracepoint_general_set): Call it.
11237 (get_timestamp): Rename from tsv_get_timestamp.
11238
11239 2011-11-14 Stan Shebs <stan@codesourcery.com>
11240 Kwok Cheung Yeung <kcy@codesourcery.com>
11241
11242 * linux-x86-low.c (small_jump_insn): New.
11243 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11244 trampoline and error message, build a trampoline and issue a small
11245 jump instruction to it.
11246 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11247 trampoline and error message.
11248 (x86_get_min_fast_tracepoint_insn_len): New.
11249 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11250 * linux-low.h (struct linux_target_ops): Add arguments to
11251 install_fast_tracepoint_jump_pad operation, add new operation.
11252 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11253 arguments.
11254 (linux_get_min_fast_tracepoint_insn_len): New function.
11255 (linux_target_op): Add new operation.
11256 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11257 (gdb_trampoline_buffer_end): Ditto.
11258 (gdb_trampoline_buffer_error): Ditto.
11259 (struct ipa_sym_addresses): Add fields for new IPA variables.
11260 (symbol_list): Add entries for new IPA variables.
11261 (struct tracepoint): Add fields to hold the address range of the
11262 trampoline used by the tracepoint.
11263 (trampoline_buffer_head): New static variable.
11264 (trampoline_buffer_tail): Ditto.
11265 (claim_trampoline_space): New function.
11266 (have_fast_tracepoint_trampoline_buffer): New function.
11267 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11268 structure.
11269 (install_fast_tracepoint): Ditto, also add error buffer argument.
11270 (cmd_qtminftpilen): New function.
11271 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11272 (fast_tracepoint_from_trampoline_address): New function.
11273 (fast_tracepoint_collecting): Handle trampoline as part of jump
11274 pad space.
11275 (set_trampoline_buffer_space): New function.
11276 (initialize_tracepoint): Initialize new IPA variables.
11277 * target.h (struct target_ops): Add arguments to
11278 install_fast_tracepoint_jump_pad operation, add new
11279 get_min_fast_tracepoint_insn_len operation.
11280 (target_get_min_fast_tracepoint_insn_len): New.
11281 (install_fast_tracepoint_jump_pad): Add arguments.
11282 * server.h (IPA_BUFSIZ): Define.
11283 * linux-i386-ipa.c: Include extra header files.
11284 (initialize_fast_tracepoint_trampoline_buffer): New function.
11285 (initialize_low_tracepoint): Call it.
11286 * server.h (set_trampoline_buffer_space): Declare.
11287 (claim_trampoline_space): Ditto.
11288 (have_fast_tracepoint_trampoline_buffer): Ditto.
11289
11290 2011-11-14 Yao Qi <yao@codesourcery.com>
11291
11292 * server.c (handle_query): Handle InstallInTrace for qSupported.
11293 * tracepoint.c (add_tracepoint): Sort list.
11294 (install_tracepoint, download_tracepoint): New.
11295 (cmd_qtdp): Call them to install and download tracepoints.
11296 (sort_tracepoints): Removed.
11297 (cmd_qtstart): Update.
11298
11299 2011-11-14 Yao Qi <yao@codesourcery.com>
11300
11301 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11302 * mem-break.h: Declare.
11303 * tracepoint.c (cmd_qtstart): Move some code to ...
11304 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11305 New.
11306 (download_tracepoints): Move some code to ...
11307 (download_tracepoint_1): ... here. New.
11308
11309 2011-11-08 Yao Qi <yao@codesourcery.com>
11310
11311 * remote-utils.c (relocate_instruction): A comment fix.
11312
11313 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11314
11315 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11316 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11317 dr_status_mirror and dr_control_mirror from debug_reg_state.
11318 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11319 (i386_initial_stuff): Remove use of deleted globals.
11320 (i386_get_thread_context, i386_set_thread_context,
11321 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11322 from debug_reg_state.
11323
11324 2011-11-05 Yao Qi <yao@codesourcery.com>
11325
11326 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11327 address as TPOINT's.
11328
11329 2011-11-02 Stan Shebs <stan@codesourcery.com>
11330
11331 * tracepoint.c (agent_mem_read_string): New function.
11332 (eval_agent_expr): Call it for tracenz.
11333 * server.c (handle_query): Report support for tracenz.
11334
11335 2011-11-02 Yao Qi <yao@codesourcery.com>
11336
11337 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11338
11339 2011-11-02 Yao Qi <yao@codesourcery.com>
11340
11341 * target.h: Fix a typo in comment.
11342
11343 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11344
11345 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11346 clobber the breakpoints' shadows with fast tracepoint jumps.
11347 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11348 * target.c (write_inferior_memory): Also pass MYADDR down to
11349 check_mem_write.
11350
11351 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11352
11353 * configure.ac: Check support for personality routine.
11354 * configure: Regenerate.
11355 * config.in: Likewise.
11356 * linux-low.c: Include <sys/personality.h>.
11357 Define ADDR_NO_RANDOMIZE if necessary.
11358 (linux_create_inferior): Disable address space randomization when
11359 forking inferior, if requested.
11360 (linux_supports_disable_randomization): New function.
11361 (linux_target_ops): Install it.
11362 * server.h (disable_randomization): Declare.
11363 * server.c (disable_randomization): New global variable.
11364 (handle_general_set): Handle QDisableRandomization.
11365 (handle_query): Likewise for qSupported.
11366 (main): Support --disable-randomization and --no-disable-randomization
11367 command line arguments.
11368 * target.h (struct target_ops): Add supports_disable_randomization.
11369 (target_supports_disable_randomization): New macro.
11370
11371 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11372
11373 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11374 ifdef check.
11375 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11376 [!PT_GETDSBT] (target_loadmap): New definition.
11377 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11378 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11379 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11380 and PT_GETDSBT to LINUX_LOADMAP.
11381 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11382 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11383
11384 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11385
11386 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11387 (arm_linux_hwbp_cap): New static variable.
11388 (arm_linux_get_hwbp_cap): Replace by ...
11389 (arm_linux_init_hwbp_cap): ... this new function.
11390 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11391 (arm_linux_get_hw_watchpoint_count): Likewise.
11392 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11393 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11394 (arm_prepare_to_resume): Use perror_with_name instead of error.
11395
11396 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11397
11398 * linux-arm-low.c: Include <signal.h>.
11399 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11400 (struct arm_linux_hwbp_cap): New data type.
11401 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11402 (struct arm_linux_hw_breakpoint): New data type.
11403 (MAX_BPTS, MAX_WPTS): Define.
11404 (struct arch_process_info, struct arch_lwp_info): New data types.
11405 (arm_linux_get_hwbp_cap): New function.
11406 (arm_linux_get_hw_breakpoint_count): Likewise.
11407 (arm_linux_get_hw_watchpoint_count): Likewise.
11408 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11409 (arm_hwbp_control_initialize): Likewise.
11410 (arm_hwbp_control_is_enabled): Likewise.
11411 (arm_hwbp_control_is_initialized): Likewise.
11412 (arm_hwbp_control_disable): Likewise.
11413 (arm_linux_hw_breakpoint_equal): Likewise.
11414 (arm_linux_hw_point_initialize): Likewise.
11415 (struct update_registers_data): New data structure.
11416 (update_registers_callback: New function.
11417 (arm_insert_point): Likewise.
11418 (arm_remove_point): Likewise.
11419 (arm_stopped_by_watchpoint): Likewise.
11420 (arm_stopped_data_address): Likewise.
11421 (arm_new_process): Likewise.
11422 (arm_new_thread): Likewise.
11423 (arm_prepare_to_resume): Likewise.
11424 (the_low_target): Register arm_insert_point, arm_remove_point,
11425 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11426 arm_new_thread, and arm_prepare_to_resume.
11427
11428 2011-09-15 Stan Shebs <stan@codesourcery.com>
11429
11430 * server.h (struct emit_ops): Add compare-goto fields.
11431 * tracepoint.c (gdb_agent_op_sizes): New table.
11432 (emit_eq_goto): New function.
11433 (emit_ne_goto): New function.
11434 (emit_lt_goto): New function.
11435 (emit_le_goto): New function.
11436 (emit_gt_goto): New function.
11437 (emit_ge_goto): New function.
11438 (is_goto_target): New function.
11439 (compile_bytecodes): Recognize special cases of compare-goto
11440 combinations and call specialized emitters for them.
11441 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11442 (amd64_emit_ne_goto): New function.
11443 (amd64_emit_lt_goto): New function.
11444 (amd64_emit_le_goto): New function.
11445 (amd64_emit_gt_goto): New function.
11446 (amd64_emit_ge_goto): New function.
11447 (amd64_emit_ops): Add the new functions.
11448 (i386_emit_eq_goto): New function.
11449 (i386_emit_ne_goto): New function.
11450 (i386_emit_lt_goto): New function.
11451 (i386_emit_le_goto): New function.
11452 (i386_emit_gt_goto): New function.
11453 (i386_emit_ge_goto): New function.
11454 (i386_emit_ops): Add the new functions.
11455
11456 2011-09-08 Stan Shebs <stan@codesourcery.com>
11457
11458 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11459 (i386_emit_epilogue): Restore %ebx.
11460
11461 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11462
11463 * server.c (step_thread): Remove definition.
11464 (process_serial_event): Don't handle Hs.
11465 * server.h (step_thread): Remove declaration.
11466 * target.c (set_desired_inferior): Remove use of step_thread.
11467
11468 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11469
11470 * linux-low.c: Include linux-procfs.h.
11471 (linux_attach_lwp_1): Update comments.
11472 (linux_attach): Scan for existing threads when attaching to a
11473 process that is the tgid.
11474 * Makefile.in: Update dependencies.
11475
11476 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11477
11478 * configure.srv: Add linux-procfs.o dependencies.
11479
11480 2011-08-14 Yao Qi <yao@codesourcery.com>
11481
11482 * target.h (struct target_ops): Fix indent.
11483 * win32-low.c (win32_target_ops): Fix comment.
11484
11485 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11486 Yao Qi <yao@codesourcery.com>
11487
11488 * Makefile.in (clean): Remove tic6x-*.c files.
11489 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11490 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11491 (tic6x-c64xp-linux.c): Likewise.
11492 * configure.srv: Add support for tic6x-*-uclinux.
11493 * linux-tic6x-low.c: New.
11494 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11495
11496 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11497 Yao Qi <yao@codesourcery.com>
11498
11499 * target.h (struct target_ops): Add read_loadmap.
11500 * linux-low.c (struct target_loadseg): New type.
11501 (struct target_loadmap): New type.
11502 (linux_read_loadmap): New function.
11503 (linux_target_ops): Add linux_read_loadmap.
11504 * server.c (handle_query): Support qXfer:fdpic:read packet.
11505 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11506 to NULL.
11507
11508 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11509
11510 * win32-low.c: Include <stdint.h>.
11511
11512 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11513
11514 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11515 to the inferior here.
11516 (i386_remove_aligned_watchpoint): Ditto.
11517 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11518 fit part of the watchpoint in the debug registers.
11519 (i386_update_inferior_debug_regs): New.
11520 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11521 registers, and only update the inferior on success.
11522 (i386_low_remove_watchpoint): Ditto.
11523
11524 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11525
11526 * linux-low.c (compare_ints, unique, list_threads, show_process,
11527 linux_core_of_thread): Delete.
11528 (linux_target_ops): Change linux_core_of_thread to
11529 linux_common_core_of_thread.
11530 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11531 * utils.c (malloc_failure): Change type of argument.
11532 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11533 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11534 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11535 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11536 (IPA_OBJS): Add common-utils-ipa.o.
11537 (ptid_h, linux_osdata_h): New macros.
11538 (server_h): Add common/common-utils.h, common/xml-utils.h,
11539 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11540 common/ptid.h.
11541 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11542 ptid.o, buffer.o): New rules.
11543 (linux-low.o): Add common/linux-osdata.h as a dependency.
11544 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11545 * configure.ac: Add AC_HEADER_DIRENT check.
11546 * config.in: Regenerate.
11547 * configure: Regenerate.
11548 * remote-utils.c (xml_escape_text): Delete.
11549 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11550 buffer_xml_printf): Move to common/buffer.c.
11551 * server.c (main): Remove call to initialize_inferiors.
11552 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11553 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11554 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11555 internal_error, gdb_assert, gdb_assert_fail): Delete.
11556 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11557 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11558 common/buffer.h.
11559 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11560 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11561 initialize_inferiors): Delete.
11562
11563 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11564
11565 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11566 symbol error.
11567
11568 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11569
11570 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11571 assertion.
11572 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11573
11574 2011-05-26 Yao Qi <yao@codesourcery.com>
11575
11576 * Makefile.in (thread-db.o): Track dependence to
11577 common/gdb_thread_db.h.
11578 * thread-db.c: include gdb_thread_db.h from right place.
11579
11580 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11581
11582 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11583 __FILE__ and __LINE__ to internal_error.
11584
11585 2011-05-13 Doug Evans <dje@google.com>
11586
11587 * thread-db.c (try_thread_db_load_from_sdir): New function.
11588 (try_thread_db_load_from_dir): New function.
11589 (thread_db_load_search): Handle $sdir, ignore $pdir.
11590 Remove trying of system directories if search of
11591 libthread-db-search-path fails, that is now done via $sdir.
11592
11593 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11594
11595 * server.c (handle_query): Add EnableDisableTracepoints to the list
11596 of supported features.
11597 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11598 tracepoints.
11599 (cmd_qtenable_disable): New.
11600 (cmd_qtstart): Install tracepoints even if disabled.
11601 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11602 receiving a QTEnable or QTDisable packet.
11603 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11604 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11605 tracepoints.
11606 (gdb_probe): Skip data collection if static tracepoint is disabled.
11607
11608 2011-05-10 Doug Evans <dje@google.com>
11609
11610 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11611
11612 2011-05-04 Doug Evans <dje@google.com>
11613
11614 * linux-low.c (linux_join): Skip process lookup.
11615 * spu-low.c (spu_join): Ditto.
11616 * server.c (join_inferiors_callback): Delete.
11617 (process_serial_event): For 'D' packet (detach) call join_inferior
11618 directly.
11619
11620 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11621
11622 * README: Don't mention xscale*-*-linux*.
11623 * configure.srv (xscale*-*-linux*): Don't handle target.
11624
11625 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11626
11627 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11628 casting pointers.
11629 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11630 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11631 (i386_emit_void_call_2): Likewise.
11632
11633 2011-04-26 Yao Qi <yao@codesourcery.com>
11634
11635 * linux-low.c: Move common macros to linux-ptrace.h.
11636 Include linux-ptrace.h.
11637 * Makefile.in (linux_ptrace_h): New.
11638 (linux-low.o): Depends on linux-ptrace.h.
11639
11640 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11641
11642 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11643 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11644 (remote_prepare): New function with most of the TCP code from ...
11645 (remote_open): ... here. Detect PORT here unconditionally. Move also
11646 setting transport_is_reliable.
11647 * server.c (run_once): New variable.
11648 (gdbserver_usage): Document it.
11649 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11650 the first run if RUN_ONCE.
11651 * server.h (run_once, remote_prepare): New declarations.
11652
11653 2011-04-19 Tom Tromey <tromey@redhat.com>
11654
11655 * win32-low.c (handle_load_dll): Remove duplicate "the".
11656
11657 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11658
11659 Remove support for old Cygwin 1.5 versions.
11660 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11661 function to avoid warning.
11662 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11663 warning.
11664
11665 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11666
11667 * gdbserver/server.h (Macro _): Define it if not available.
11668
11669 2011-03-14 Michael Snyder <msnyder@vmware.com>
11670
11671 * hostio.c (handle_close): Remove unnecessary null test.
11672
11673 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11674
11675 * Makefile.in (maintainer-clean realclean distclean): Remove
11676 "make ... subdir_do" command.
11677
11678 2011-03-10 Michael Snyder <msnyder@vmware.com>
11679
11680 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11681
11682 * server.c (handle_v_run): Free alloced buffer on early return.
11683
11684 2011-03-09 Yao Qi <yao@codesourcery.com>
11685
11686 Revert:
11687 2011-03-04 Yao Qi <yao@codesourcery.com>
11688
11689 * Makefile.in: Remove GNU make feature --directory.
11690
11691 2011-03-05 Yao Qi <yao@codesourcery.com>
11692
11693 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11694 (subdir_do): New make target. Copied from gdb/Makefile.
11695 (maintainer-clean, realclean, distclean, clean): Call corresponding
11696 make targets in common/Makefile.
11697
11698 2011-02-11 Yao Qi <yao@codesourcery.com>
11699
11700 * configure.ac: Call AC_PROG_RANLIB.
11701 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11702 * configure: Regenerate.
11703
11704 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11705
11706 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11707
11708 2011-03-06 Yao Qi <yao@codesourcery.com>
11709
11710 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11711
11712 2011-03-05 Yao Qi <yao@codesourcery.com>
11713
11714 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11715 (subdir_do): New make target. Copied from gdb/Makefile.
11716 (maintainer-clean, realclean, distclean, clean): Call corresponding
11717 make targets in common/Makefile.
11718
11719 2011-03-04 Yao Qi <yao@codesourcery.com>
11720
11721 * Makefile.in: Remove GNU make feature --directory.
11722
11723 2011-03-04 Michael Snyder <msnyder@vmware.com>
11724
11725 * server.c (queue_stop_reply): Call xmalloc not malloc.
11726
11727 2011-03-02 Michael Snyder <msnyder@vmware.com>
11728
11729 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11730
11731 2011-02-28 Michael Snyder <msnyder@vmware.com>
11732
11733 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11734 (cmd_qtframe): Ditto.
11735 (cmd_qtbuffer): Ditto.
11736 (cmd_bigqtbuffer): Ditto.
11737
11738 * utils.c (decimal2str): Initialize 'width' to nine, then
11739 don't mess with it.
11740
11741 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11742
11743 * hostio.c (require_data): Free *data, not data.
11744
11745 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11746
11747 * hostio.c (require_data): Use free, not xfree.
11748
11749 2011-02-27 Michael Snyder <msnyder@vmware.com>
11750
11751 * server.c (handle_query): Discard unused value.
11752
11753 * hostio.c (require_data): Free malloc memory before returning
11754 error.
11755
11756 2011-02-26 Michael Snyder <msnyder@vmware.com>
11757
11758 * linux-low.c (list_threads): Call closedir for dirent.
11759
11760 2011-02-27 Michael Snyder <msnyder@vmware.com>
11761
11762 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11763 a case statement falls through.
11764
11765 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11766
11767 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11768 in comparison.
11769
11770 2011-02-26 Michael Snyder <msnyder@vmware.com>
11771
11772 * utils.c (decimal2str): Eliminate dead code and dead param.
11773 (pulongest): Drop dead param from call to decimal2str.
11774 (plongest): Ditto.
11775
11776 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11777
11778 Revert the following patch (not approved yet):
11779 2011-02-21 Hui Zhu <teawater@gmail.com>
11780 * tracepoint.c (tp_printf): New function.
11781 (eval_agent_expr): Handle gdb_agent_op_printf.
11782
11783 2011-02-21 Hui Zhu <teawater@gmail.com>
11784
11785 * tracepoint.c (tp_printf): New function.
11786 (eval_agent_expr): Handle gdb_agent_op_printf.
11787
11788 2011-02-18 Tom Tromey <tromey@redhat.com>
11789
11790 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11791 (tracepoint.o): Likewise.
11792 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11793 (gdb_agent_op_names): Likewise.
11794
11795 2011-02-18 Tom Tromey <tromey@redhat.com>
11796
11797 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11798 gdb_agent_op_rot>: New constants.
11799 (gdb_agent_op_names): Add pick and roll.
11800 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11801 cases.
11802
11803 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11804
11805 * aclocal.m4: Regenerated with aclocal-1.11.1.
11806
11807 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11808
11809 * server.c (handle_qxfer_traceframe_info): New.
11810 (qxfer_packets): Register "traceframe-info".
11811 (handle_query): Report support for qXfer:traceframe-info:read+.
11812 * tracepoint.c (match_blocktype): New.
11813 (traceframe_find_block_type): Rename to ...
11814 (traceframe_walk_blocks): ... this. Add callback filter argument,
11815 and use it.
11816 (traceframe_find_block_type): New, reimplemented on top of
11817 traceframe_walk_blocks.
11818 (build_traceframe_info_xml): New.
11819 (traceframe_read_info): New.
11820 * server.h (traceframe_read_info): Declare.
11821
11822 2011-02-11 Yao Qi <yao@codesourcery.com>
11823
11824 * configure.ac: Call AC_PROG_RANLIB.
11825 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11826 * configure: Regenerate.
11827
11828 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11829
11830 * server.c (gdb_read_memory): Change return semantics to allow
11831 partial transfers.
11832 (handle_search_memory_1): Adjust.
11833 (process_serial_event) <'m' packet>: Handle partial transfers.
11834 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11835
11836 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11837
11838 * regcache.c (init_register_cache): Initialize
11839 regcache->register_status.
11840 (free_register_cache): Release regcache->register_status.
11841 (regcache_cpy): Copy register_status.
11842 (registers_to_string): Print 'x's for unavailable registers.
11843 (supply_register): Mark the register's status valid or
11844 unavailable, depending on whether a buffer was passed in or not.
11845 (supply_register_zeroed): New.
11846 (supply_regblock): Mark the registers' status valid or
11847 unavailable, depending on whether a buffer was passed in or not.
11848 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11849 (struct regcache): New `register_status' field.
11850 (supply_register_zeroed): Declare.
11851 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11852 supply_register_zeroed, rather than passing a NULL buffer to
11853 supply_register.
11854 * tracepoint.c (fetch_traceframe_registers): Update comment.
11855
11856 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11857
11858 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11859 buffer explicit.
11860
11861 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11862
11863 * server.h (decode_xfer_write): Change prototype.
11864 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11865 and don't extract the annex here.
11866 * server.c (decode_xfer_read): Remove `annex' parameter,
11867 and don't extract the annex here.
11868 (decode_xfer): New.
11869 (struct qxfer): New.
11870 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11871 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11872 (handle_qxfer_statictrace): New functions, abstracted out from
11873 handle_query, and made to use the struct qxfer interface.
11874 (handle_threads_qxfer_proper): Rename to ...
11875 (handle_qxfer_threads_proper): ... this.
11876 (handle_threads_qxfer): Rename to ...
11877 (handle_qxfer_threads): ... this. Adjust.
11878 (qxfer_packets): New array.
11879 (handle_qxfer): New function.
11880 (handle_query): Use handle_qxfer.
11881
11882 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11883
11884 * gdbreplay.c: Shorten lines of >= 80 columns.
11885 * linux-low.c: Ditto.
11886 * linux-ppc-low.c: Ditto.
11887 * linux-s390-low.c: Ditto.
11888 * linux-sparc-low.c: Ditto.
11889 * linux-x86-low.c: Ditto.
11890 * linux-xtensa-low.c: Ditto.
11891 * mem-break.c: Ditto.
11892 * nto-low.c: Ditto.
11893 * regcache.h: Ditto.
11894 * remote-utils.c: Ditto.
11895 * server.c: Ditto.
11896 * server.h: Ditto.
11897 * thread-db.c: Ditto.
11898 * tracepoint.c: Ditto.
11899 * utils.c: Ditto.
11900 * win32-low.h: Ditto.
11901
11902 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11903
11904 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11905 update.
11906
11907 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11908
11909 * server.c (gdbserver_version): Update copyright year in version
11910 output.
11911 * gdbreplay.c (gdbreplay_version): Ditto.
11912
11913 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11914
11915 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11916 * linux-bfin-low.c: New file.
11917 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11918 PT_DATA_ADDR for BFIN targets.
11919 * Makefile.in (SFILES): Add linux-bfin-low.c.
11920 (clean): Remove reg-bfin.c.
11921 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11922 * README: Mention supported Blackfin targets.
11923
11924 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11925
11926 * .gitignore: New file.
11927
11928 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11929
11930 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11931
11932 2010-10-22 Jie Zhang <jie@codesourcery.com>
11933
11934 * Makefile.in: Add FLAGS_TO_PASS variable.
11935 (install): Remove dependency of install-only and recursively
11936 invoke make for install-only.
11937
11938 2010-10-04 Doug Evans <dje@google.com>
11939
11940 * Makefile.in (uninstall): Use $(DESTDIR).
11941
11942 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11943
11944 PR gdb/11842
11945
11946 * linux-x86-low.c (compat_siginfo_from_siginfo)
11947 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11948 si_code is < 0. Check for si_code == SI_TIMER before checking for
11949 si_code < 0.
11950
11951 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11952
11953 * lynx-i386-low.c: New file.
11954 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11955
11956 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11957
11958 * lynx-low.c (ptrace_request_to_str): Remove handling for
11959 request values that have been removed in LynxOS 5.x.
11960
11961 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11962
11963 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11964 <ptrace.h>
11965
11966 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11967
11968 * configure.ac: Add --enable-inprocess-agent option.
11969 * configure: Rebuilt.
11970
11971 2010-09-06 Yao Qi <yao@codesourcery.com>
11972
11973 * linux-low.c (linux_kill): Remove unused variable.
11974 (linux_stabilize_threads): Likewise.
11975 * server.c (start_inferior): Likewise.
11976 (queue_stop_reply_callback): Likewise.
11977 * tracepoint.c (do_action_at_tracepoint): Likewise.
11978
11979 2010-09-06 Yao Qi <yao@codesourcery.com>
11980
11981 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11982 on return.
11983
11984 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11985
11986 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11987
11988 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11989
11990 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11991 "$(IPA_DEPFILES)".
11992
11993 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11994
11995 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11996 gdbserver/lynx-ppc-low.c: New files.
11997 * Makefile.in (lynx_low_h): New variable.
11998 (lynx-low.o, lynx-ppc-low.o): New rules.
11999 * configure.ac: On LynxOS, link with -lnetinet.
12000 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12001 * configure: regenerate.
12002
12003 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12004
12005 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12006 * configure.ac: Add check for vasprintf and vsnprintf.
12007 * configure, config.in: Regenerate.
12008 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12009
12010 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12011
12012 * gdbreplay.c: Move include of alloca.h up, next to include of
12013 malloc.h.
12014 * server.h: Add include of malloc.h.
12015 * mem-break.c: Remove include of malloc.h.
12016 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12017
12018 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12019
12020 * Makefile.in (memmem.o): Build with -Wno-error.
12021
12022 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12023
12024 * utils.c (xsnprintf): Make non-static.
12025 * server.h: Add xsnprintf declaration.
12026 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12027 replace calls to snprintf by calls to xsnprintf throughout.
12028
12029 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12030
12031 * configure.ac: Add configure check for alloca.
12032 * configure, config.in: Regenerate.
12033 * server.h: Include alloca.h if it exists.
12034 * gdbreplay.c: Include alloca.h if it exists.
12035
12036 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12037
12038 * linux-low.c (__SIGRTMIN): Define if not already defined.
12039 (linux_create_inferior): Check for __ANDROID__ rather than
12040 __SIGRTMIN.
12041 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12042 are already deferred.
12043 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12044 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12045 stopped and already has a pending signal to report.
12046 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12047 a pending signal to report or is moving out of a jump pad.
12048 (linux_init_signals): Check for __ANDROID__ rather than
12049 __SIGRTMIN.
12050
12051 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12052
12053 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12054 debug_threads check. Avoid a linear search when not doing debug
12055 output.
12056
12057 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12058
12059 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12060 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12061 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12062 (process_event): Change local fd's type to gdb_fildes_t.
12063 (create_file_handler): Adjust prototype.
12064 (delete_file_handler): Adjust prototype.
12065 (handle_file_event): Adjust prototype. Use pfildes.
12066 (create_file_event): Adjsut prototype.
12067 * remote-utils.c (remote_desc, listen_desc): Change type to
12068 gdb_fildes_t.
12069 * server.h: New gdb_fildes_t typedef.
12070 [USE_WIN32API]: Include winsock2.h.
12071 (delete_file_handler, add_file_handler): Adjust prototypes.
12072 (pfildes): Declare.
12073 * utils.c (pfildes): New.
12074
12075 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12076
12077 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12078 * configure: Regenerate.
12079
12080 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12081
12082 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12083 (linux_done_accessing_memory): ... this.
12084 (linux_target_ops): Adjust.
12085 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12086 * nto-low.c (nto_target_ops): Adjust comment.
12087 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12088 * spu-low.c (spu_target_ops): Adjust comment.
12089 * target.h (target_ops): Rename unprepare_to_access_memory field
12090 to done_accessing_memory.
12091 (unprepare_to_access_memory): Rename to ...
12092 (done_accessing_memory): ... this.
12093
12094 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12095
12096 * linux-low.c (linux_prepare_to_access_memory): New.
12097 (linux_unprepare_to_access_memory): New.
12098 (linux_target_ops): Install them.
12099 * server.c (read_memory): Rename to ...
12100 (gdb_read_memory): ... this. Use
12101 prepare_to_access_memory/prepare_to_access_memory.
12102 (write_memory): Rename to ...
12103 (gdb_write_memory): ... this. Use
12104 prepare_to_access_memory/prepare_to_access_memory.
12105 (handle_search_memory_1): Adjust.
12106 (process_serial_event): Adjust.
12107 * target.h (struct target_ops): New fields
12108 prepare_to_access_memory and unprepare_to_access_memory.
12109 (prepare_to_access_memory, unprepare_to_access_memory): New.
12110 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12111 prepare_to_access_memory/prepare_to_access_memory.
12112 * nto-low.c (nto_target_ops): Adjust.
12113 * spu-low.c (spu_target_ops): Adjust.
12114 * win32-low.c (win32_target_ops): Adjust.
12115
12116 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12117
12118 * Makefile.in (WARN_CFLAGS): Get it from configure.
12119 (WERROR_CFLAGS): New.
12120 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12121 * configure.ac: Introduce --enable-werror, which adds -Werror to
12122 the compiler command line. Enabled by default. Disable with
12123 --disable-werror. Add -Wdeclaration-after-statement
12124 Wpointer-arith and -Wformat-nonliteral to warning flags.
12125 * configure: Regenerate.
12126
12127 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12128
12129 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12130
12131 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12132
12133 * gdbreplay.c (remote_error): New.
12134 (gdbchar): New.
12135 (expect): Use gdbchar. Check for error reading from GDB.
12136 Clarify sync error output.
12137 (play): Check for errors writing to GDB.
12138 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12139 * remote-utils.c (getpkt): Check for errors writing to the remote
12140 descriptor.
12141
12142 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12143
12144 * linux-low.c (linux_wait_1): Move non-debugging code out of
12145 `debug_threads' control.
12146
12147 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12148
12149 * linux-low.c (linux_wait_1): Don't set last_status here.
12150 * server.c (push_event, queue_stop_reply_callback): Assert we're
12151 not pushing a TARGET_WAITKIND_IGNORE event.
12152 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12153 (myresume, handle_target_event): Set the thread's last_resume_kind
12154 and last_status from the target returned status.
12155
12156 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12157
12158 PR threads/10729
12159
12160 * linux-x86-low.c (update_debug_registers_callback): New.
12161 (i386_dr_low_set_addr): Use it.
12162 (i386_dr_low_get_addr): New.
12163 (i386_dr_low_set_control): Use update_debug_registers_callback.
12164 (i386_dr_low_get_control): New.
12165 (i386_dr_low_get_status): Adjust.
12166 * linux-low.c (linux_stop_lwp): New.
12167 * linux-low.h (linux_stop_lwp): Declare.
12168
12169 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12170 argument instead of a i386_debug_reg_state.
12171 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12172 a i386_debug_reg_state.
12173 (i386_insert_aligned_watchpoint): Adjust.
12174 (i386_remove_aligned_watchpoint): Adjust.
12175 (i386_low_stopped_data_address): Read the debug registers from the
12176 inferior instead of from the mirrors.
12177 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12178 (i386_dr_low_get_addr): Declare.
12179 (i386_dr_low_get_control): Declare.
12180 (i386_dr_low_get_status): Change prototype.
12181
12182 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12183 (i386_dr_low_get_addr): New.
12184 (i386_dr_low_get_control): New.
12185 (i386_dr_low_get_status): Adjust prototype. Return
12186 dr_status_mirror.
12187 (i386_initial_stuff): Clear dr_status_mirror and
12188 dr_control_mirror.
12189 (i386_get_thread_context): Adjust.
12190 (i386_set_thread_context): Adjust.
12191 (i386_thread_added): Adjust.
12192
12193 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12194
12195 * linux-low.h (linux_thread_area): Delete declaration.
12196
12197 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12198
12199 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12200 after its termination.
12201
12202 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12203
12204 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12205 (gdb_wants_all_stopped): Delete.
12206 (linux_wait_1): Don't call them.
12207 * server.c (handle_v_cont): Tag all threads as want-stopped.
12208 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12209 stopped as "client-wants-stopped".
12210
12211 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12212
12213 * Makefile.in (signals_h): New.
12214 (server_h): Depend on it.
12215 (server.o): Don't depend on $(signals_def).
12216 (signals.o): Depend on $(signals_def).
12217
12218 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12219
12220 * Makefile.in (signals_def): New.
12221 (server_h): Append include/gdb/signals.h and signals_def.
12222 (server.o): Append signals_def.
12223
12224 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12225
12226 * server.c (handle_target_event): Use target_signal_to_host for
12227 resume_info.sig initialization.
12228 * target.h (struct thread_resume) <sig>: New comment.
12229
12230 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12231
12232 * server.c (handle_query): strcpy() the returned string from paddress()
12233 instead of sprintf().
12234 * utils.c (paddress): Return phex_nz().
12235
12236 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12237
12238 * server.c (handle_v_cont): Call mourn_inferior if process
12239 just exited.
12240 (myresume): Likewise.
12241
12242 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12243
12244 Static tracepoints, and integration with UST.
12245
12246 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12247 * mem-break.c (uninsert_all_breakpoints)
12248 (reinsert_all_breakpoints): New.
12249 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12250 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12251 (gdb_agent_ust_loaded, helper_thread_id)
12252 (gdb_agent_helper_thread_id): New macros.
12253 (struct ipa_sym_addresses): Add addr_ust_loaded,
12254 addr_helper_thread_id, addr_cmd_buf.
12255 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12256 (in_process_agent_loaded_ust): New.
12257 (write_e_ust_not_loaded): New.
12258 (maybe_write_ipa_ust_not_loaded): New.
12259 (struct collect_static_trace_data_action): New.
12260 (enum tracepoint_type) <static_tracepoint>: New.
12261 (struct tracepoint) <handle>: Mention static tracepoints.
12262 (struct static_tracepoint_ctx): New.
12263 (CMD_BUF_SIZE): New.
12264 (add_tracepoint_action): Handle static tracepoint actions.
12265 (unprobe_marker_at): New.
12266 (clear_installed_tracepoints): Handle static tracepoints.
12267 (cmd_qtdp): Handle static tracepoints.
12268 (probe_marker_at): New.
12269 (cmd_qtstart): Handle static tracepoints.
12270 (response_tracepoint): Handle static tracepoints.
12271 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12272 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12273 (get_context_regcache): Handle static tracepoints.
12274 (do_action_at_tracepoint): Handle static tracepoint actions.
12275 (traceframe_find_block_type): Handle static trace data blocks.
12276 (traceframe_read_sdata): New.
12277 (download_tracepoints): Download static tracepoint actions.
12278 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12279 (GDB_PROBE_NAME): New.
12280 (ust_ops): New.
12281 (GET_UST_SYM): New.
12282 (USTF): New.
12283 (dlsym_ust): New.
12284 (ust_marker_to_static_tracepoint): New.
12285 (gdb_probe): New.
12286 (collect_ust_data_at_tracepoint): New.
12287 (gdb_ust_probe): New.
12288 (UNIX_PATH_MAX, SOCK_DIR): New.
12289 (gdb_ust_connect_sync_socket): New.
12290 (resume_thread, stop_thread): New.
12291 (run_inferior_command): New.
12292 (init_named_socket): New.
12293 (gdb_ust_socket_init): New.
12294 (cstr_to_hexstr): New.
12295 (next_st): New.
12296 (first_marker, next_marker): New.
12297 (response_ust_marker): New.
12298 (cmd_qtfstm, cmd_qtsstm): New.
12299 (unprobe_marker_at, probe_marker_at): New.
12300 (cmd_qtstmat, gdb_ust_thread): New.
12301 (gdb_ust_init): New.
12302 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12303 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12304 (ST_REGENTRY): New.
12305 (x86_64_st_collect_regmap): New.
12306 (X86_64_NUM_ST_COLLECT_GREGS): New.
12307 (AMD64_RIP_REGNUM): New.
12308 (supply_static_tracepoint_registers): New.
12309 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12310 (ST_REGENTRY): New.
12311 (i386_st_collect_regmap): New.
12312 (i386_NUM_ST_COLLECT_GREGS): New.
12313 (supply_static_tracepoint_registers): New.
12314 * server.c (handle_query): Handle qXfer:statictrace:read.
12315 <qSupported>: Report support for StaticTracepoints, and
12316 qXfer:statictrace:read features.
12317 * server.h (traceframe_read_sdata)
12318 (supply_static_tracepoint_registers): Declare.
12319 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12320 (unpack_varlen_hex): Include in IPA build.
12321 * Makefile.in (ustlibs, ustinc): New.
12322 (IPA_OBJS): Add remote-utils-ipa.o.
12323 ($(IPA_LIB)): Link -ldl and -lpthread.
12324 (UST_CFLAGS): New.
12325 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12326 * config.in, configure: Regenerate.
12327
12328 2010-06-20 Ian Lance Taylor <iant@google.com>
12329 Pedro Alves <pedro@codesourcery.com>
12330
12331 * linux-x86-low.c (always_true): Delete.
12332 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12333 trying to fool the compiler with always_true.
12334
12335 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12336
12337 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12338 conditions in gdbserver.
12339
12340 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12341
12342 * spu-low.c (spu_read_memory): Wrap around local store limit.
12343 (spu_write_memory): Likewise.
12344
12345 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12346
12347 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12348 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12349 LONGEST uses.
12350 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12351 uses.
12352 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12353 uses with LONGEST uses.
12354
12355 2010-06-14 Stan Shebs <stan@codesourcery.com>
12356 Pedro Alves <pedro@codesourcery.com>
12357
12358 Bytecode compiler.
12359
12360 * linux-x86-low.c: Include limits.h.
12361 (add_insns): New.
12362 (always_true): New.
12363 (EMIT_ASM): New.
12364 (EMIT_ASM32): New.
12365 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12366 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12367 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12368 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12369 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12370 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12371 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12372 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12373 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12374 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12375 (amd64_emit_void_call_2): New.
12376 (amd64_emit_ops): New.
12377 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12378 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12379 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12380 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12381 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12382 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12383 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12384 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12385 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12386 (i386_emit_stack_adjust, i386_emit_int_call_1)
12387 (i386_emit_void_call_2): New.
12388 (i386_emit_ops): New.
12389 (x86_emit_ops): New.
12390 (the_low_target): Install x86_emit_ops.
12391 * server.h (struct emit_ops): New.
12392 (get_raw_reg_func_addr): Declare.
12393 (current_insn_ptr, emit_error): Declare.
12394 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12395 (set_trace_state_variable_value): New defines.
12396 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12397 addr_get_trace_state_variable_value and
12398 addr_set_trace_state_variable_value.
12399 (symbol_list): New fields for get_raw_reg,
12400 get_trace_state_variable_value and set_trace_state_variable_value.
12401 (condfn): New typedef.
12402 (struct tracepoint): New field `compiled_cond'.
12403 (do_action_at_tracepoint): Clear compiled_cond.
12404 (get_trace_state_variable_value, set_trace_state_variable_value):
12405 Export in the IPA.
12406 (condition_true_at_tracepoint): If there's a compiled condition,
12407 run that.
12408 (current_insn_ptr, emit_error): New globals.
12409 (struct bytecode_address): New.
12410 (get_raw_reg_func_addr): New.
12411 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12412 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12413 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12414 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12415 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12416 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12417 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12418 (compile_tracepoint_condition, compile_bytecodes): New.
12419 * target.h (emit_ops): Forward declare.
12420 (struct target_ops): New field emit_ops.
12421 (target_emit_ops): New.
12422 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12423 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12424 * linux-low.c (linux_emit_ops): New.
12425 (linux_target_ops): Install it.
12426 * linux-low.h (struct linux_target_ops): New field emit_ops.
12427
12428 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12429
12430 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12431 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12432
12433 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12434 Stan Shebs <stan@codesourcery.com>
12435
12436 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12437 (all): Depend on $(extra_libraries).
12438 (install-only): Install the IPA.
12439 (IPA_OBJS, IPA_LIB): New.
12440 (clean): Remove the IPA lib.
12441 (IPAGENT_CFLAGS): New.
12442 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12443 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12444 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12445 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12446 * configure.ac: Check for atomic builtins support in the compiler.
12447 (IPA_DEPFILES, extra_libraries): Define.
12448 * configure.srv (ipa_obj): Add description.
12449 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12450 (i[34567]86-*-linux*): Set ipa_obj.
12451 (x86_64-*-linux*): Set ipa_obj.
12452 * linux-low.c (stabilizing_threads): New.
12453 (supports_fast_tracepoints): New.
12454 (linux_detach): Stabilize threads before detaching.
12455 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12456 the lwp is either not stabilizing, or is moving out of a jump pad.
12457 (linux_fast_tracepoint_collecting): New.
12458 (maybe_move_out_of_jump_pad): New.
12459 (enqueue_one_deferred_signal): New.
12460 (dequeue_one_deferred_signal): New.
12461 (linux_wait_for_event_1): If moving out of a jump pad, defer
12462 pending signals to later.
12463 (linux_stabilize_threads): New.
12464 (linux_wait_1): Check if threads need moving out of jump pads, and
12465 do it if so.
12466 (stuck_in_jump_pad_callback): New.
12467 (move_out_of_jump_pad_callback): New.
12468 (lwp_running): New.
12469 (linux_resume_one_lwp): Handle moving out of jump pads.
12470 (linux_set_resume_request): Dequeue deferred signals.
12471 (need_step_over_p): Also step over fast tracepoint jumps.
12472 (start_step_over): Also uninsert fast tracepoint jumps.
12473 (finish_step_over): Also reinsert fast tracepoint jumps.
12474 (linux_install_fast_tracepoint_jump): New.
12475 (linux_target_ops): Install linux_stabilize_threads and
12476 linux_install_fast_tracepoint_jump_pad.
12477 * linux-low.h (linux_target_ops) <get_thread_area,
12478 install_fast_tracepoint_jump_pad>: New fields.
12479 (struct lwp_info) <collecting_fast_tracepoint,
12480 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12481 (linux_get_thread_area): Declare.
12482 * linux-x86-low.c (jump_insn): New.
12483 (x86_get_thread_area): New.
12484 (append_insns): New.
12485 (push_opcode): New.
12486 (amd64_install_fast_tracepoint_jump_pad): New.
12487 (i386_install_fast_tracepoint_jump_pad): New.
12488 (x86_install_fast_tracepoint_jump_pad): New.
12489 (the_low_target): Install x86_get_thread_area and
12490 x86_install_fast_tracepoint_jump_pad.
12491 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12492 (struct fast_tracepoint_jump): New.
12493 (fast_tracepoint_jump_insn): New.
12494 (fast_tracepoint_jump_shadow): New.
12495 (find_fast_tracepoint_jump_at): New.
12496 (fast_tracepoint_jump_here): New.
12497 (delete_fast_tracepoint_jump): New.
12498 (set_fast_tracepoint_jump): New.
12499 (uninsert_fast_tracepoint_jumps_at): New.
12500 (reinsert_fast_tracepoint_jumps_at): New.
12501 (set_breakpoint_at): Use write_inferior_memory.
12502 (uninsert_raw_breakpoint): Use write_inferior_memory.
12503 (check_mem_read): Mask out fast tracepoint jumps.
12504 (check_mem_write): Mask out fast tracepoint jumps.
12505 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12506 (set_fast_tracepoint_jump): Declare.
12507 (delete_fast_tracepoint_jump)
12508 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12509 (reinsert_fast_tracepoint_jumps_at): Declare.
12510 * regcache.c: Don't compile many functions when building the
12511 in-process agent library.
12512 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12513 the register buffer in the heap.
12514 (free_register_cache): If the register buffer isn't owned by the
12515 regcache, don't free it.
12516 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12517 pre-existing register caches.
12518 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12519 type.
12520 (convert_ascii_to_int): : Constify `from' parameter type.
12521 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12522 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12523 the needed buffer in-place.
12524 (relocate_instruction): New.
12525 * server.c (handle_query) <qSymbols>: If the target supports
12526 tracepoints, give it a chance of looking up symbols. Report
12527 support for fast tracepoints.
12528 (handle_status): Stabilize threads.
12529 (process_serial_event): Adjust.
12530 * server.h (struct fast_tracepoint_jump): Forward declare.
12531 (struct process_info) <fast_tracepoint_jumps>: New field.
12532 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12533 (decode_X_packet, decode_M_packet): Adjust.
12534 (relocate_instruction): Declare.
12535 (in_process_agent_loaded): Declare.
12536 (tracepoint_look_up_symbols): Declare.
12537 (struct fast_tpoint_collect_status): Declare.
12538 (fast_tracepoint_collecting): Declare.
12539 (force_unlock_trace_buffer): Declare.
12540 (handle_tracepoint_bkpts): Declare.
12541 (initialize_low_tracepoint)
12542 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12543 * target.h (struct target_ops) <stabilize_threads,
12544 install_fast_tracepoint_jump_pad>: New fields.
12545 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12546 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12547 [HAVE_STDINT_H]: Include stdint.h.
12548 (trace_debug_1): Rename to ...
12549 (trace_vdebug): ... this.
12550 (trace_debug): Rename to ...
12551 (trace_debug_1): ... this. Add `level' parameter.
12552 (trace_debug): New.
12553 (ATTR_USED, ATTR_NOINLINE): New.
12554 (IP_AGENT_EXPORT): New.
12555 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12556 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12557 (about_to_request_buffer_space, trace_buffer_is_full)
12558 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12559 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12560 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12561 (traceframe_write_count, traceframes_created)
12562 (trace_state_variables)
12563 New renaming defines.
12564 (struct ipa_sym_addresses): New.
12565 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12566 (symbol_list): New.
12567 (ipa_sym_addrs): New.
12568 (all_tracepoint_symbols_looked_up): New.
12569 (in_process_agent_loaded): New.
12570 (write_e_ipa_not_loaded): New.
12571 (maybe_write_ipa_not_loaded): New.
12572 (tracepoint_look_up_symbols): New.
12573 (debug_threads) [IN_PROCESS_AGENT]: New.
12574 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12575 (UNKNOWN_SIDE_EFFECTS): New.
12576 (stop_tracing): New.
12577 (flush_trace_buffer): New.
12578 (stop_tracing_bkpt): New.
12579 (flush_trace_buffer_bkpt): New.
12580 (read_inferior_integer): New.
12581 (read_inferior_uinteger): New.
12582 (read_inferior_data_pointer): New.
12583 (write_inferior_data_pointer): New.
12584 (write_inferior_integer): New.
12585 (write_inferior_uinteger): New.
12586 (struct collect_static_trace_data_action): Delete.
12587 (enum tracepoint_type): New.
12588 (struct tracepoint) <type>: New field `type'.
12589 <actions_str, step_actions, step_actions_str>: Only include in
12590 GDBserver.
12591 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12592 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12593 (tracepoints): Use IP_AGENT_EXPORT.
12594 (last_tracepoint): Don't include in the IPA.
12595 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12596 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12597 (alloced_trace_state_variables): New.
12598 (trace_state_variables): Use IP_AGENT_EXPORT.
12599 (traceframe_t): Delete unused variable.
12600 (circular_trace_buffer): Don't include in the IPA.
12601 (trace_buffer_start): Delete.
12602 (struct trace_buffer_control): New.
12603 (trace_buffer_free): Delete.
12604 (struct ipa_trace_buffer_control): New.
12605 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12606 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12607 New.
12608 (trace_buffer_ctrl): New.
12609 (TRACE_BUFFER_CTRL_CURR): New.
12610 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12611 Reimplement as macros.
12612 (trace_buffer_wrap): Delete.
12613 (traceframe_write_count, traceframe_read_count)
12614 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12615 (struct tracepoint_hit_ctx) <type>: New field.
12616 (struct fast_tracepoint_ctx): New.
12617 (memory_barrier): New.
12618 (cmpxchg): New.
12619 (record_tracepoint_error): Update atomically in the IPA.
12620 (clear_inferior_trace_buffer): New.
12621 (about_to_request_buffer_space): New.
12622 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12623 updating the same buffer.
12624 (add_tracepoint): Default the tracepoint's type to trap
12625 tracepoint, and orig_size to -1.
12626 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12627 internal variables.
12628 (create_trace_state_variable): New parameter `gdb'. Handle it.
12629 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12630 (cmd_qtdp): Handle fast tracepoints.
12631 (cmd_qtdv): Adjust.
12632 (max_jump_pad_size): New.
12633 (gdb_jump_pad_head): New.
12634 (get_jump_space_head): New.
12635 (claim_jump_space): New.
12636 (sort_tracepoints): New.
12637 (MAX_JUMP_SIZE): New.
12638 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12639 IPA.
12640 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12641 support. Upload fast traceframes, and delete internal IPA
12642 breakpoints.
12643 (stop_tracing_handler): New.
12644 (flush_trace_buffer_handler): New.
12645 (cmd_qtstop): Upload fast tracepoints.
12646 (response_tracepoint): Handle fast tracepoints.
12647 (tracepoint_finished_step): Upload fast traceframes. Set the
12648 tracepoint hit context's tracepoint type.
12649 (handle_tracepoint_bkpts): New.
12650 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12651 type. Add comment about fast tracepoints.
12652 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12653 non-existing action_str field.
12654 (get_context_regcache): Handle fast tracepoints.
12655 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12656 to the regcache.
12657 (fast_tracepoint_from_jump_pad_address): New.
12658 (fast_tracepoint_from_ipa_tpoint_address): New.
12659 (collecting_t): New.
12660 (force_unlock_trace_buffer): New.
12661 (fast_tracepoint_collecting): New.
12662 (collecting): New.
12663 (gdb_collect): New.
12664 (write_inferior_data_ptr): New.
12665 (target_tp_heap): New.
12666 (target_malloc): New.
12667 (download_agent_expr): New.
12668 (UALIGN): New.
12669 (download_tracepoints): New.
12670 (download_trace_state_variables): New.
12671 (upload_fast_traceframes): New.
12672 (IPA_FIRST_TRACEFRAME): New.
12673 (IPA_NEXT_TRACEFRAME_1): New.
12674 (IPA_NEXT_TRACEFRAME): New.
12675 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12676 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12677 (gdb_jump_pad_buffer_end): New.
12678 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12679 (initialize_tracepoint): Adjust.
12680 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12681 buffer. Initialize the low module.
12682 * utils.c (PREFIX, TOOLNAME): New.
12683 (malloc_failure): Use PREFIX.
12684 (error): In the IPA, an error causes an exit.
12685 (fatal, warning): Use PREFIX.
12686 (internal_error): Use TOOLNAME.
12687 (NUMCELLS): Increase to 10.
12688 * configure, config.in: Regenerate.
12689
12690 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12691
12692 * server.c (handle_query) <qSupported>: Do two passes over the
12693 qSupported string to avoid nesting strtok.
12694
12695 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12696
12697 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12698 (CDEPS): New.
12699 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12700 -Wl,--dynamic-list.
12701 * configure: Regenerate.
12702 * proc-service.list: New.
12703
12704 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12705
12706 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12707 New comment.
12708
12709 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12710
12711 * gdbreplay.c (remote_open): Check error return from socket() call by
12712 its equality to -1 not by it being negative.
12713 * remote-utils.c (remote_open): Likewise.
12714
12715 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12716
12717 * config.h: Regenerate.
12718
12719 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12720
12721 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12722 doesn't provide PTRACE_GET_THREAD_AREA.
12723
12724 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12725
12726 * linux-m68k-low.c: Include <asm/ptrace.h>
12727 (ps_get_thread_area): Implement.
12728
12729 2010-05-03 Doug Evans <dje@google.com>
12730
12731 * event-loop.c (struct callback_event): New struct.
12732 (callback_list): New global.
12733 (append_callback_event, delete_callback_event): New functions.
12734 (process_callback): New function.
12735 (start_event_loop): Call it.
12736 * remote-utils.c (NOT_SCHEDULED): Define.
12737 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12738 moved out of readchar.
12739 (readchar): Rewrite. Call reschedule before returning.
12740 (reset_readchar): New function.
12741 (remote_close): Call it.
12742 (process_remaining, reschedule): New functions.
12743 * server.h (callback_handler_func): New typedef.
12744 (append_callback_event, delete_callback_event): Declare.
12745
12746 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12747
12748 * proc-service.c (ps_pglobal_lookup): Use
12749 thread_db_look_up_one_symbol.
12750 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12751 parameter. Use it instead of all_symbols_looked_up.
12752 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12753 field.
12754 (all_symbols_looked_up): Don't declare.
12755 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12756 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12757 field.
12758 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12759 Set all_symbols_looked_up here.
12760 (thread_db_look_up_one_symbol): New.
12761 (thread_db_get_tls_address): Adjust.
12762 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12763 thread_db object on the heap, and tentatively set it in the
12764 process structure.
12765 (thread_db_init): Don't set all_symbols_looked_up here.
12766 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12767
12768 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12769
12770 * linux-low.c (linux_kill, linux_detach): Adjust.
12771 (status_pending_p_callback): Remove redundant statement. Check
12772 for !TARGET_WAITIKIND_IGNORE, instead of
12773 TARGET_WAITKIND_STOPPED.
12774 (handle_tracepoints): Make sure LWP is locked. Adjust.
12775 (linux_wait_for_event_1): Adjust.
12776 (linux_cancel_breakpoints): New.
12777 (unsuspend_one_lwp): New.
12778 (unsuspend_all_lwps): New.
12779 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12780 (send_sigstop_callback): Change return type to int, add new
12781 `except' parameter and handle it.
12782 (suspend_and_send_sigstop_callback): New.
12783 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12784 pass them down. If SUSPEND, also increment the lwp's suspend
12785 count.
12786 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12787 (need_step_over_p): Don't consider suspended LWPs.
12788 (start_step_over): Adjust.
12789 (proceed_one_lwp): Change return type to int, add new `except'
12790 parameter and handle it.
12791 (unsuspend_and_proceed_one_lwp): New.
12792 (proceed_all_lwps): Use find_inferior instead of
12793 for_each_inferior.
12794 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12795 also decrement the suspend count of LWPs. Pass `except' down,
12796 instead of hacking its suspend count.
12797 (linux_pause_all): Add `freeze' parameter. Adjust.
12798 (linux_unpause_all): New.
12799 (linux_target_ops): Install linux_unpause_all.
12800 * server.c (handle_status): Adjust.
12801 * target.h (struct target_ops): New fields `unpause_all' and
12802 `cancel_breakpoints'. Add new parameter to `pause_all'.
12803 (pause_all): Add new `freeze' parameter.
12804 (unpause_all): New.
12805 (cancel_breakpoints): New.
12806 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12807 cancel breakpoints.
12808 (cmd_qtstart): Pause threads.
12809 (stop_tracing): Pause threads, and cancel breakpoints.
12810 * win32-low.c (win32_target_ops): Adjust.
12811
12812 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12813
12814 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12815 the inferior right away from here...
12816 (linux_wait_1): ... to here, and adjust to check the thread's
12817 last_resume_kind instead of the lwp's step or stop_expected flags.
12818
12819 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12820
12821 * README: Use consistent `GDB' and `GDBserver' spellings.
12822
12823 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12824
12825 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12826 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12827 (linux_detach_one_lwp): Assume the lwp is stopped.
12828 (any_thread_of): Delete.
12829 (linux_detach): Stop all lwps here. Don't blindly delete all
12830 breakpoints.
12831 (delete_lwp_callback): New.
12832 (linux_mourn): Delete all lwps of the process that is gone.
12833 (linux_wait_1): Don't delete the last lwp of the process here.
12834 * mem-break.h (mark_breakpoints_out): Declare.
12835 * mem-break.c (mark_breakpoints_out): New.
12836 (free_all_breakpoints): Use it.
12837 * server.c (handle_target_event): If the process is gone, mark
12838 breakpoints out.
12839 * thread-db.c (struct thread_db) <create_bp>: New field.
12840 (thread_db_enable_reporting): Fix prototype. Store a thread event
12841 breakpoint reference in the thread_db struct.
12842 (thread_db_load_search): Clear the thread_db object.
12843 (try_thread_db_load_1): Ditto.
12844 (switch_to_process): New.
12845 (disable_thread_event_reporting): Use it.
12846 (remove_thread_event_breakpoints): New.
12847 (thread_db_detach, thread_db_mourn): Use it.
12848
12849 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12850
12851 * linux-low.c (linux_enable_event_reporting): New.
12852 (linux_wait_for_event_1, handle_extended_wait): Use it.
12853
12854 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12855
12856 * linux-low.c (linux_kill_one_lwp, linux_kill)
12857 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12858 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12859 SIGSTOP even if the LWP is stopped.
12860 (send_sigstop_callback): New.
12861 (stop_all_lwps): Use send_sigstop_callback instead.
12862 (linux_resume_one_thread): Adjust.
12863 (proceed_one_lwp): Still proceed an LWP that the client has
12864 requested to stop, if we haven't reported it as stopped yet. Make
12865 sure that LWPs the client want stopped, have a pending SIGSTOP.
12866
12867 2010-04-26 Doug Evans <dje@google.com>
12868
12869 * server.c (handle_general_set): Make static.
12870
12871 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12872 Print received char after testing for error/eof instead of before.
12873 (input_interrupt): Tweak comment.
12874
12875 2010-04-23 Doug Evans <dje@google.com>
12876
12877 * server.c (start_inferior): Print inferior argv if --debug.
12878
12879 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12880
12881 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12882 * nto-x86-low.c: Include server.h
12883
12884 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12885
12886 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12887 be consistent with other sources of this directory.
12888 (init_registers_amd64): Correct name of source file of this function
12889 in the comment.
12890
12891 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12892
12893 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12894 64-bit executables.
12895
12896 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12897
12898 * win32-i386-low.c: Add 64-bit support.
12899 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12900 (init_registers_amd64): Declare.
12901 (mappings): Add 64-bit version of array.
12902 (init_windows_x86): New function.
12903 (the_low_target): Change init_arch field to init_windows_x86.
12904
12905 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12906
12907 * win32-low.c: Adapt to support also 64-bit architecture.
12908 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12909 (get_image_name): Use SIZE_T type for local variable `done'.
12910 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12911 (toolhelp_get_dll_name): Idem.
12912 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12913 Use uintptr_t typecast to avoid warning.
12914 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12915 (handle_exception): Use phex_nz to avoid warning.
12916 (win32_wait): Remove unused local variable `process'.
12917
12918 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12919
12920 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12921 `amd64-avx.o'.
12922
12923 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12924
12925 * configure.ac: Use `ws2_32' library for srv_mingw.
12926 * configure: Regenerate.
12927 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12928 * remote-utils.c: Likewise.
12929
12930 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12931
12932 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12933 if __x86_64__ is defined.
12934
12935 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12936
12937 * configure: Regenerate.
12938
12939 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12940
12941 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12942 * target.h (target_ops): New get_tib_address field.
12943 * win32-low.h (win32_thread_info): Add thread_local_base field.
12944 * win32-low.c (child_add_thread): Add tlb argument.
12945 Set thread_local_base field to TLB.
12946 (get_child_debug_event): Adapt to child_add_thread change.
12947 (win32_get_tib_address): New function.
12948 (win32_target_ops): Set get_tib_address field to
12949 win32_get_tib_address.
12950 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12951
12952 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12953
12954 * linux-low.c (linux_mourn): Also remove the process.
12955 * server.c (handle_target_event): Don't remove the process here.
12956 * nto-low.c (nto_mourn): New.
12957 (nto_target_ops): Install it.
12958 * spu-low.c (spu_mourn): New.
12959 (spu_target_ops): Install it.
12960 * win32-low.c (win32_mourn): New.
12961 (win32_target_ops): Install it.
12962
12963 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12964
12965 * server.h (buffer_xml_printf): Remove redundant `;'.
12966
12967 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12968
12969 * regcache.c (set_register_cache): Invalidate regcaches before
12970 changing the register cache layout.
12971 (regcache_invalidate_one): Allow a NULL regcache.
12972 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12973 regcaches before changing the register cache layout or the target
12974 regsets.
12975
12976 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12977
12978 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12979 variable warning on Linux/x86-64.
12980
12981 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12982
12983 GDBserver disconnected tracing support.
12984
12985 * linux-low.c (linux_remove_process): Delete.
12986 (add_lwp): Don't set last_resume_kind here.
12987 (linux_kill): Use `mourn'.
12988 (linux_detach): Use `thread_db_detach', and `mourn'.
12989 (linux_mourn): New.
12990 (linux_attach_lwp_1): Adjust comment.
12991 (linux_attach): last_resume_kind moved the thread_info; adjust.
12992 (status_pending_p_callback): Adjust.
12993 (linux_wait_for_event_1): Adjust.
12994 (count_events_callback, select_singlestep_lwp_callback)
12995 (select_event_lwp_callback, cancel_breakpoints_callback)
12996 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12997 (proceed_one_lwp): Adjust.
12998 (linux_async): Add debug output.
12999 (linux_thread_stopped): New.
13000 (linux_pause_all): New.
13001 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13002 linux_pause_all.
13003 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13004 (thread_db_free): Delete declaration.
13005 (thread_db_detach, thread_db_mourn): Declare.
13006 * thread-db.c (thread_db_init): Use thread_db_mourn.
13007 (thread_db_free): Delete, split in two.
13008 (disable_thread_event_reporting): New.
13009 (thread_db_detach): New.
13010 (thread_db_mourn): New.
13011
13012 * server.h (struct thread_info) <last_resume_kind>: New field.
13013 <attached>: Add comment.
13014 <gdb_detached>: New field.
13015 (handler_func): Change return type to int.
13016 (handle_serial_event, handle_target_event): Ditto.
13017 (gdb_connected): Declare.
13018 (tracing): Delete.
13019 (disconnected_tracing): Declare.
13020 (stop_tracing): Declare.
13021
13022 * server.c (handle_query) <qSupported>: Report support for
13023 disconnected tracing.
13024 (queue_stop_reply_callback): Account for running threads.
13025 (gdb_wants_thread_stopped): New.
13026 (gdb_wants_all_threads_stopped): New.
13027 (gdb_reattached_process): New.
13028 (handle_status): Clear the `gdb_detached' flag of all processes.
13029 In all-stop, stop all threads.
13030 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13031 (process_serial_event): If the remote connection breaks, or if an
13032 exit was forced with "monitor exit", force an event loop exit.
13033 Handle disconnected tracing on detach.
13034 (handle_serial_event): Adjust.
13035 (handle_target_event): If GDB isn't connected, forward events back
13036 to the inferior, unless the last process exited, in which case,
13037 exit gdbserver. Adjust interface.
13038
13039 * remote-utils.c (remote_open): Don't block in accept. Instead
13040 register an event loop source on the listen socket file
13041 descriptor. Refactor bits into ...
13042 (listen_desc): ... this new global.
13043 (gdb_connected): ... this new function.
13044 (enable_async_notification): ... this new function.
13045 (handle_accept_event): ... this new function.
13046 (remote_close): Clear remote_desc.
13047
13048 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13049
13050 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13051 New fields.
13052 (mourn_inferior): Define.
13053 (target_process_qsupported): Avoid the dangling else problem.
13054 (thread_stopped): Define.
13055 (pause_all): Define.
13056 (target_waitstatus_to_string): Declare.
13057 * target.c (target_waitstatus_to_string): New.
13058
13059 * tracepoint.c (tracing): Make extern.
13060 (disconnected_tracing): New.
13061 (stop_tracing): Make extern. Handle tracing stops due to GDB
13062 disconnecting.
13063 (cmd_qtdisconnected): New.
13064 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13065 (handle_tracepoint_general_set): Handle QTDisconnected.
13066
13067 * event-loop.c (event_handler_func): Change return type to int.
13068 (process_event): Bail out if the event handler wants the event
13069 loop to stop.
13070 (handle_file_event): Ditto.
13071 (start_event_loop): Bail out if the event handler wants the event
13072 loop to stop.
13073
13074 * nto-low.c (nto_target_ops): Adjust.
13075 * spu-low.c (spu_wait): Don't remove the process here.
13076 (spu_target_ops): Adjust.
13077 * win32-low.c (win32_wait): Don't remove the process here.
13078 (win32_target_ops): Adjust.
13079
13080 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13081
13082 * regcache.c (realloc_register_cache): Invalidate inferior's
13083 regcache before recreating it.
13084
13085 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13086
13087 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13088
13089 2010-04-09 Stan Shebs <stan@codesourcery.com>
13090 Pedro Alves <pedro@codesourcery.com>
13091
13092 * server.h (LONGEST): New.
13093 (struct thread_info) <while_stepping>: New field.
13094 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13095 Declare.
13096 (initialize_tracepoint, handle_tracepoint_general_set)
13097 (handle_tracepoint_query, tracepoint_finished_step)
13098 (tracepoint_was_hit, release_while_stepping_state_list):
13099 (current_traceframe): Declare.
13100 * server.c (handle_general_set): Handle tracepoint packets.
13101 (read_memory): New.
13102 (write_memory): New.
13103 (handle_search_memory_1): Use read_memory.
13104 (handle_query): Report support for conditional tracepoints, trace
13105 state variables, and tracepoint sources. Handle tracepoint
13106 queries.
13107 (main): Initialize the tracepoints module.
13108 (process_serial_event): Handle traceframe reads/writes.
13109
13110 * linux-low.c (handle_tracepoints): New.
13111 (linux_wait_1): Call it.
13112 (linux_resume_one_lwp): Handle while-stepping.
13113 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13114 (linux_target_ops): Install them.
13115 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13116 New field.
13117 * linux-x86-low.c (x86_supports_tracepoints): New.
13118 (the_low_target). Install it.
13119
13120 * mem-break.h (delete_breakpoint): Declare.
13121 * mem-break.c (delete_breakpoint): Make external.
13122
13123 * target.h (struct target_ops): Add `supports_tracepoints',
13124 `read_pc', and `write_pc' fields.
13125 (target_supports_tracepoints): Define.
13126 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13127 (phex_nz): New.
13128
13129 * regcache.h (struct regcache) <registers_owned>: New field.
13130 (init_register_cache, regcache_cpy): Declare.
13131 (regcache_read_pc, regcache_write_pc): Declare.
13132 (register_cache_size): Declare.
13133 (supply_regblock): Declare.
13134 * regcache.c (init_register_cache): New.
13135 (new_register_cache): Use it.
13136 (regcache_cpy): New.
13137 (register_cache_size): New.
13138 (supply_regblock): New.
13139 (regcache_read_pc, regcache_write_pc): New.
13140
13141 * tracepoint.c: New.
13142
13143 * Makefile.in (OBS): Add tracepoint.o.
13144 (tracepoint.o): New rule.
13145
13146 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13147
13148 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13149 (i386-mmx.o): New.
13150 (i386-mmx.c): Likewise.
13151 (i386-mmx-linux.o): Likewise.
13152 (i386-mmx-linux.c): Likewise.
13153
13154 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13155 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13156 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13157 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13158
13159 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13160 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13161 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13162
13163 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13164
13165 * Makefile.in (clean): Updated.
13166 (i386-avx.o): New.
13167 (i386-avx.c): Likewise.
13168 (i386-avx-linux.o): Likewise.
13169 (i386-avx-linux.c): Likewise.
13170 (amd64-avx.o): Likewise.
13171 (amd64-avx.c): Likewise.
13172 (amd64-avx-linux.o): Likewise.
13173 (amd64-avx-linux.c): Likewise.
13174
13175 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13176 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13177 (srv_amd64_regobj): Add amd64-avx.o.
13178 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13179 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13180 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13181 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13182 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13183 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13184 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13185
13186 * i387-fp.c: Include "i386-xstate.h".
13187 (i387_xsave): New.
13188 (i387_cache_to_xsave): Likewise.
13189 (i387_xsave_to_cache): Likewise.
13190 (x86_xcr0): Likewise.
13191
13192 * i387-fp.h (i387_cache_to_xsave): Likewise.
13193 (i387_xsave_to_cache): Likewise.
13194 (x86_xcr0): Likewise.
13195
13196 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13197 * linux-crisv32-low.c (target_regsets): Likewise.
13198 * linux-m68k-low.c (target_regsets): Likewise.
13199 * linux-mips-low.c (target_regsets): Likewise.
13200 * linux-ppc-low.c (target_regsets): Likewise.
13201 * linux-s390-low.c (target_regsets): Likewise.
13202 * linux-sh-low.c (target_regsets): Likewise.
13203 * linux-sparc-low.c (target_regsets): Likewise.
13204 * linux-xtensa-low.c (target_regsets): Likewise.
13205
13206 * linux-low.c: Include <sys/uio.h>.
13207 (regsets_fetch_inferior_registers): Support nt_type.
13208 (regsets_store_inferior_registers): Likewise.
13209 (linux_process_qsupported): New.
13210 (linux_target_ops): Add linux_process_qsupported.
13211
13212 * linux-low.h (regset_info): Add nt_type.
13213 (linux_target_ops): Add process_qsupported.
13214
13215 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13216 and <sys/uio.h>.
13217 (init_registers_i386_avx_linux): New.
13218 (init_registers_amd64_avx_linux): Likewise.
13219 (xmltarget_i386_linux_no_xml): Likewise.
13220 (xmltarget_amd64_linux_no_xml): Likewise.
13221 (PTRACE_GETREGSET): Likewise.
13222 (PTRACE_SETREGSET): Likewise.
13223 (x86_fill_xstateregset): Likewise.
13224 (x86_store_xstateregset): Likewise.
13225 (use_xml): Likewise.
13226 (x86_linux_update_xmltarget): Likewise.
13227 (x86_linux_process_qsupported): Likewise.
13228 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13229 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13230 init_registers_i386_linux here. Call
13231 x86_linux_update_xmltarget.
13232 (the_low_target): Add x86_linux_process_qsupported.
13233
13234 * server.c (handle_query): Call target_process_qsupported.
13235
13236 * target.h (target_ops): Add process_qsupported.
13237 (target_process_qsupported): New.
13238
13239 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13240
13241 * inferiors.c (add_thread): Set last_status kind to
13242 TARGET_WAITKIND_IGNORE.
13243 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13244 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13245 (linux_wait_1): Move `thread' local definition to block that uses
13246 it. Don't NULL initialize `event_child'.
13247 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13248 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13249 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13250
13251 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13252
13253 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13254 an extended waitstatus, or by a watchpoint.
13255 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13256 thread was stepping or has been stopped by a watchpoint.
13257
13258 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13259
13260 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13261 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13262 of another, then delete the previous, and validate all
13263 breakpoints.
13264 (validate_inserted_breakpoint): New.
13265 (delete_disabled_breakpoints): New.
13266 (validate_breakpoints): New.
13267 (check_mem_read): Validate breakpoints before trusting their
13268 shadow. Delete disabled breakpoints.
13269 (check_mem_write): Validate breakpoints before trusting they
13270 should be inserted. Delete disabled breakpoints.
13271 * mem-break.h (validate_breakpoints):
13272 * server.c (handle_query): Validate breakpoints when we see a
13273 qSymbol query.
13274
13275 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13276
13277 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13278 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13279 if we could tell there's a GDB breakpoint at stop_pc.
13280 (need_step_over_p): Don't do a step over if we find a GDB
13281 breakpoint at the resume PC.
13282
13283 * mem-break.c (struct raw_breakpoint): New.
13284 (enum bkpt_type): New type `gdb_breakpoint'.
13285 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13286 fields. New field `raw'.
13287 (find_raw_breakpoint_at): New.
13288 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13289 breakpoint instead.
13290 (set_breakpoint_at): Adjust.
13291 (delete_raw_breakpoint): New.
13292 (release_breakpoint): New.
13293 (delete_breakpoint): Rename to...
13294 (delete_breakpoint_1): ... this. Add proc parameter. Use
13295 release_breakpoint. Return ENOENT.
13296 (delete_breakpoint): Reimplement.
13297 (find_breakpoint_at): Delete.
13298 (find_gdb_breakpoint_at): New.
13299 (delete_breakpoint_at): Delete.
13300 (set_gdb_breakpoint_at): New.
13301 (delete_gdb_breakpoint_at): New.
13302 (gdb_breakpoint_here): New.
13303 (set_reinsert_breakpoint): Use release_breakpoint.
13304 (uninsert_breakpoint): Rename to ...
13305 (uninsert_raw_breakpoint): ... this.
13306 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13307 (reinsert_raw_breakpoint): Change parameter type to
13308 raw_breakpoint.
13309 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13310 instead.
13311 (check_breakpoints): Adjust. Use release_breakpoint.
13312 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13313 (breakpoint_inserted_here): Ditto.
13314 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13315 Don't trust the breakpoint's shadow if it is not inserted.
13316 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13317 (delete_all_breakpoints): Adjust.
13318 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13319 use delete_breakpoint_1.
13320
13321 * mem-break.h (breakpoints_supported): Delete declaration.
13322 (set_gdb_breakpoint_at): Declare.
13323 (gdb_breakpoint_here): Declare.
13324 (delete_breakpoint_at): Delete.
13325 (delete_gdb_breakpoint_at): Declare.
13326
13327 * server.h (struct raw_breakpoint): Forward declare.
13328 (struct process_info): New field `raw_breakpoints'.
13329
13330 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13331 breakpoints.
13332
13333 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13334
13335 * linux-low.c (status_pending_p_callback): Fix comment.
13336 (linux_wait_for_event_1): Move most of the internal breakpoint
13337 handling from here...
13338 (linux_wait_1): ... to here.
13339 (count_events_callback): New.
13340 (select_singlestep_lwp_callback): New.
13341 (select_event_lwp_callback): New.
13342 (cancel_breakpoints_callback): New.
13343 (select_event_lwp): New.
13344 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13345 priority to all LWPs that have had events that should be reported
13346 to the client. Cancel breakpoints when about to reporting the
13347 event to the client, not while stopping lwps. No longer cancel
13348 finished single-steps here.
13349 (cancel_finished_single_step): Delete.
13350 (cancel_finished_single_steps): Delete.
13351
13352 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13353
13354 * mem-break.c (enum bkpt_type): New.
13355 (struct breakpoint): New field `type'.
13356 (set_breakpoint_at): Change return type to struct breakpoint
13357 pointer. Set type to `other_breakpoint' by default.
13358 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13359 in the breakpoint list.
13360 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13361 (reinsert_breakpoint): Rename to ...
13362 (reinsert_raw_breakpoint): ... this.
13363 (reinsert_breakpoints_at): Adjust.
13364 * mem-break.h (struct breakpoint): Declare.
13365 (set_breakpoint_at): Change return type to struct breakpoint
13366 pointer.
13367
13368 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13369
13370 * server.c (handle_query): Assign, not compare.
13371
13372 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13373
13374 Teach linux gdbserver to step-over-breakpoints.
13375
13376 * linux-low.c (can_hardware_single_step): New.
13377 (supports_breakpoints): New.
13378 (handle_extended_wait): If stopping threads, read the stop pc of
13379 the new cloned LWP.
13380 (get_pc): New.
13381 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13382 low target doesn't support retrieving the PC.
13383 (add_lwp): Set last_resume_kind to resume_continue.
13384 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13385 (linux_attach): Don't clear stop_expected. Set the lwp's
13386 last_resume_kind to resume_stop.
13387 (linux_detach_one_lwp): Don't check for removed breakpoints.
13388 (check_removed_breakpoint): Delete.
13389 (status_pending_p): Rename to ...
13390 (status_pending_p_callback): ... this. Don't check for removed
13391 breakpoints. Don't consider threads that are stopped from GDB's
13392 perspective.
13393 (linux_wait_for_lwp): Always read the stop_pc here.
13394 (cancel_breakpoint): New.
13395 (step_over_bkpt): New global.
13396 (linux_wait_for_event_1): Implement stepping over breakpoints.
13397 (gdb_wants_lwp_stopped): New.
13398 (gdb_wants_all_stopped): New.
13399 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13400 single-step traps here. Store the thread's last reported target
13401 wait status.
13402 (send_sigstop): Don't clear stop_expected. Always set it,
13403 instead.
13404 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13405 (cancel_finished_single_step): New.
13406 (cancel_finished_single_steps): New.
13407 (wait_for_sigstop): Don't cancel finished single-step traps here.
13408 (linux_resume_one_lwp): Don't check for removed breakpoints.
13409 Don't set `step' on non-hardware step archs.
13410 (linux_set_resume_request): Ignore resume_stop requests if already
13411 stopping or stopped. Set the lwp's last_resume_kind.
13412 (resume_status_pending_p): Don't check for removed breakpoints.
13413 (need_step_over_p): New.
13414 (start_step_over): New.
13415 (finish_step_over): New.
13416 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13417 requests. Clear the thread's last reported target waitstatus.
13418 Don't use the `suspended' flag. Don't consider pending breakpoints.
13419 (linux_resume): Start a step-over if necessary.
13420 (proceed_one_lwp): New.
13421 (proceed_all_lwps): New.
13422 (unstop_all_lwps): New.
13423 * linux-low.h (struct lwp_info): Rewrite comment for the
13424 `suspended' flag. Add the `stop_pc' field. Delete the
13425 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13426 Add `'last_resume_kind' and `need_step_over' fields.
13427 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13428 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13429 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13430 (set_raw_breakpoint_at): New.
13431 (set_breakpoint_at): Rewrite to use it.
13432 (reinsert_breakpoint_handler): Delete.
13433 (set_reinsert_breakpoint): New.
13434 (reinsert_breakpoint_by_bp): Delete.
13435 (delete_reinsert_breakpoints): New.
13436 (uninsert_breakpoint): Rewrite.
13437 (uninsert_breakpoints_at): New.
13438 (reinsert_breakpoint): Rewrite.
13439 (reinsert_breakpoints_at): New.
13440 (check_breakpoints): Rewrite.
13441 (breakpoint_here): New.
13442 (breakpoint_inserted_here): New.
13443 (check_mem_read): Adjust.
13444 * mem-break.h (breakpoints_supported, breakpoint_here)
13445 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13446 (reinsert_breakpoint_by_bp): Delete declaration.
13447 (delete_reinsert_breakpoints): Declare.
13448 (reinsert_breakpoint): Delete declaration.
13449 (reinsert_breakpoints_at): Declare.
13450 (uninsert_breakpoint): Delete declaration.
13451 (uninsert_breakpoints_at): Declare.
13452 (check_breakpoints): Adjust prototype.
13453 * server.h: Adjust include order.
13454 (struct thread_info): Declare here. Add a `last_status' field.
13455
13456 2010-03-23 Michael Snyder <msnyder@vmware.com>
13457
13458 * server.c (crc32): New function.
13459 (handle_query): Add handling for 'qCRC:' request.
13460
13461 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13462
13463 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13464 lwp had been stopped by a watchpoint.
13465
13466 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13467
13468 * server.h (internal_error): Declare.
13469 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13470 * utils.c (internal_error): New function.
13471
13472 2010-03-15 Andreas Schwab <schwab@redhat.com>
13473
13474 * configure.srv: Fix typo setting srv_regobj.
13475
13476 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13477
13478 * linux-low.c (fetch_register): Avoid passing a non string literal
13479 format to `error'.
13480 (usr_store_inferior_registers): Ditto.
13481
13482 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13483
13484 * linux-low.c (linux_write_memory): Bail out early if peeking
13485 memory failed.
13486
13487 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13488
13489 * linux-low.h (struct lwp_info): New fields
13490 `stopped_by_watchpoint' and `stopped_data_address'.
13491 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13492 here, and cache them in the lwp object.
13493 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13494 directly.
13495 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13496 field.
13497 (linux_stopped_by_watchpoint): Rewrite.
13498 (linux_stopped_data_address): Rewrite.
13499
13500 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13501
13502 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13503 switching the current inferior, not before.
13504
13505 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13506
13507 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13508 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13509 i386-linux.c and amd64-linux.c.
13510 (reg-i386.o): Removed.
13511 (reg-i386.c): Likewise.
13512 (reg-i386-linux.o): Likewise.
13513 (reg-i386-linux.c): Likewise.
13514 (reg-x86-64.o): Likewise.
13515 (reg-x86-64.c): Likewise.
13516 (reg-x86-64-linux.o): Likewise.
13517 (reg-x86-64-linux.c): Likewise.
13518 (i386.o): New.
13519 (i386.c): Likewise.
13520 (i386-linux.o): Likewise.
13521 (i386-linux.c): Likewise.
13522 (amd64.o): Likewise.
13523 (amd64.c): Likewise.
13524 (amd64-linux.o): Likewise.
13525 (amd64-linux.c): Likewise.
13526
13527 * configure.srv (srv_i386_regobj): New.
13528 (srv_i386_linux_regobj): Likewise.
13529 (srv_amd64_regobj): Likewise.
13530 (srv_amd64_linux_regobj): Likewise.
13531 (srv_i386_32bit_xmlfiles): Likewise.
13532 (srv_i386_64bit_xmlfiles): Likewise.
13533 (srv_i386_xmlfiles): Likewise.
13534 (srv_amd64_xmlfiles): Likewise.
13535 (srv_i386_linux_xmlfiles): Likewise.
13536 (srv_amd64_linux_xmlfiles): Likewise.
13537 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13538 srv_xmlfiles to $srv_i386_xmlfiles.
13539 (i[34567]86-*-mingw32ce*): Likewise.
13540 (i[34567]86-*-mingw*): Likewise.
13541 (i[34567]86-*-nto*): Likewise.
13542 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13543 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13544 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13545 (x86_64-*-linux*): Likewise.
13546
13547 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13548 (init_registers_amd64_linux): New.
13549 (x86_arch_setup): Replace init_registers_x86_64_linux with
13550 init_registers_amd64_linux.
13551
13552 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13553
13554 * configure.ac: Check for libdl. If it is not available link against
13555 static libthread_db.
13556 * configure: Regenerate.
13557
13558 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13559
13560 PR9605
13561
13562 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13563 handing a read watchpoint.
13564 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13565
13566 2010-02-12 Doug Evans <dje@google.com>
13567
13568 * linux-low.c (linux_supports_tracefork_flag): Document.
13569 (linux_look_up_symbols): Add comment.
13570
13571 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13572
13573 * regcache.c (supply_register): Clear regcache if buf is NULL.
13574
13575 2010-02-02 Nicolas Roche <roche@sourceware.org>
13576 Joel Brobecker <brobecker@adacore.com>
13577
13578 * inferiors.c (find_inferior): Add function documentation.
13579 (unloaded_dll): Handle the case where the unloaded dll has not
13580 been previously registered in the dll list.
13581
13582 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13583
13584 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13585 (thumb2_breakpoint): New.
13586 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13587
13588 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13589
13590 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13591 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13592 breakpoints.
13593
13594 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13595
13596 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13597
13598 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13599
13600 * linux-s390-low.c (s390_collect_ptrace_register)
13601 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13602
13603 2010-01-21 Doug Evans <dje@google.com>
13604
13605 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13606 (PTRACE_ARG4_TYPE): New macro.
13607 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13608 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13609 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13610 (usr_store_inferior_registers): Ditto.
13611 (linux_read_memory, linux_write_memory): Ditto.
13612 (linux_test_for_tracefork): Ditto.
13613
13614 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13615 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13616
13617 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13618
13619 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13620 target.
13621
13622 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13623
13624 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13625 prototype to take a regcache. Adjust.
13626
13627 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13628
13629 * regcache.h (struct thread_info): Forward declare.
13630 (struct regcache): New.
13631 (new_register_cache): Adjust prototype.
13632 (get_thread_regcache): Declare.
13633 (free_register_cache): Adjust prototype.
13634 (registers_to_string, registers_from_string): Ditto.
13635 (supply_register, supply_register_by_name, collect_register)
13636 (collect_register_as_string, collect_register_by_name): Ditto.
13637 * regcache.c (struct inferior_regcache_data): Delete.
13638 (get_regcache): Rename to ...
13639 (get_thread_regcache): ... this. Adjust. Switch inferior before
13640 fetching registers.
13641 (regcache_invalidate_one): Adjust.
13642 (regcache_invalidate): Fix prototype.
13643 (new_register_cache): Return the new register cache.
13644 (free_register_cache): Change prototype.
13645 (realloc_register_cache): Adjust.
13646 (registers_to_string): Change prototype to take a regcache. Adjust.
13647 (registers_from_string): Ditto.
13648 (register_data): Ditto.
13649 (supply_register): Ditto.
13650 (supply_register_by_name): Ditto.
13651 (collect_register): Ditto.
13652 (collect_register_as_string): Ditto.
13653 (collect_register_by_name): Ditto.
13654 * server.c (process_serial_event): Adjust.
13655 * linux-low.h (regset_fill_func, regset_store_func): Change
13656 prototype.
13657 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13658 Change prototype.
13659 * linux-low.c (get_stop_pc): Adjust.
13660 (check_removed_breakpoint): Adjust.
13661 (linux_wait_for_event): Adjust.
13662 (linux_resume_one_lwp): Adjust.
13663 (fetch_register): Add regcache parameter. Adjust.
13664 (usr_store_inferior_registers): Ditto.
13665 (regsets_fetch_inferior_registers): Ditto.
13666 (regsets_store_inferior_registers): Ditto.
13667 (linux_fetch_registers, linux_store_registers): Ditto.
13668 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13669 regcache. Adjust.
13670 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13671 Ditto.
13672 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13673 prototype to take a regcache.
13674 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13675 * remote-utils.c (convert_ascii_to_int, outreg)
13676 (prepare_resume_reply): Change prototype to take a regcache.
13677 Adjust.
13678 * target.h (struct target_ops) <fetch_registers, store_registers>:
13679 Change prototype to take a regcache.
13680 (fetch_inferior_registers, store_inferior_registers): Change
13681 prototype to take a regcache. Adjust.
13682 * proc-service.c (ps_lgetregs): Adjust.
13683 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13684 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13685 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13686 take a regcache. Adjust.
13687 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13688 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13689 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13690 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13691 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13692 (cris_cannot_fetch_register):
13693 (cris_breakpoint_at): Change prototype to take a regcache.
13694 Adjust.
13695 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13696 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13697 to take a regcache. Adjust.
13698 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13699 Adjust.
13700 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13701 take a regcache. Adjust.
13702 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13703 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13704 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13705 * linux-mips-low.c (mips_get_pc):
13706 (mips_set_pc): Change prototype to take a regcache. Adjust.
13707 (mips_reinsert_addr): Adjust.
13708 (mips_collect_register): Change prototype to take a regcache.
13709 Adjust.
13710 (mips_supply_register):
13711 (mips_collect_register_32bit, mips_supply_register_32bit)
13712 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13713 (mips_store_fpregset): Ditto.
13714 * linux-ppc-low.c (ppc_supply_ptrace_register)
13715 (ppc_supply_ptrace_register): Ditto.
13716 (parse_spufs_run): Adjust.
13717 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13718 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13719 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13720 take a regcache. Adjust.
13721 * linux-s390-low.c (s390_collect_ptrace_register)
13722 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13723 (s390_set_pc): Change prototype to take a regcache. Adjust.
13724 (s390_arch_setup): Adjust.
13725 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13726 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13727 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13728 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13729 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13730 regcache. Adjust.
13731 (sparc_breakpoint_at): Adjust.
13732 * linux-xtensa-low.c (xtensa_fill_gregset):
13733 (xtensa_store_gregset):
13734 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13735 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13736 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13737 prototype to take a regcache. Adjust.
13738 * win32-arm-low.c (arm_fetch_inferior_register)
13739 (arm_store_inferior_register): Change prototype to take a
13740 regcache. Adjust.
13741 * win32-i386-low.c (i386_fetch_inferior_register)
13742 (i386_store_inferior_register): Change prototype to take a
13743 regcache. Adjust.
13744 * win32-low.c (child_fetch_inferior_registers)
13745 (child_store_inferior_registers): Change prototype to take a
13746 regcache. Adjust.
13747 (win32_wait): Adjust.
13748 (win32_fetch_inferior_registers): Change prototype to take a
13749 regcache. Adjust.
13750 (win32_store_inferior_registers): Adjust.
13751 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13752 store_inferior_register>: Change prototype to take a regcache.
13753
13754 2010-01-20 Doug Evans <dje@google.com>
13755
13756 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13757 #ifdef.
13758 (linux_wait_for_event1, linux_init_signals): Ditto.
13759 (W_STOPCODE): Provide definition if missing.
13760
13761 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13762
13763 * linux-low.c (linux_core_of_thread): New.
13764 (compare_ints, show_process, list_threads): New.
13765 (linux_qxfer_osdata): Report threads and cores.
13766 (linux_target_op): Register linux_core_of_thread.
13767 * remote-utils.c (prepare_resume_reply): Report the core.
13768 (buffer_xml_printf): Support %d specifier.
13769 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13770 New.
13771 (handle_query): Handle qXfer:threads. Announce availability
13772 thereof.
13773 * target.h (struct target_ops): New field core_of_thread.
13774
13775 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13776
13777 * Makefile.in (clean): Remove new generated files.
13778 (reg-s390.o, reg-s390.c): Remove rules.
13779 (reg-s390x.o, reg-s390x.c): Likewise.
13780 (s390-linux32.o, s390-linux32.c): Add rules.
13781 (s390-linux64.o, s390-linux64.c): Likewise.
13782 (s390x-linux64.o, s390x-linux64.c): Likewise.
13783 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13784 * linux-s390-low.c: Include <elf.h>.
13785 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13786 (init_registers_s390): Remove prototype.
13787 (init_registers_s390x): Likewise.
13788 (init_registers_s390_linux32): Add prototype.
13789 (init_registers_s390_linux64): Likewise.
13790 (init_registers_s390x_linux64): Likewise.
13791 (s390_num_regs_3264): New define.
13792 (s390_regmap_3264): New global variable.
13793 (s390_cannot_fetch_register): Remove obsolete check.
13794 (s390_cannot_store_register): Likewise.
13795 (s390_collect_ptrace_register): Handle upper/lower register halves.
13796 (s390_supply_ptrace_register): Likewise.
13797 (s390_fill_gregset): Update to register number changes.
13798 (s390_get_hwcap): New routine.
13799 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13800 Install appropriate regmap and register set.
13801
13802 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13803
13804 * server.c (gdbserver_version): Update copyright year to 2010.
13805 * gdbreplay.c (gdbreplay_version): Likewise.
13806
13807 2009-12-28 Doug Evans <dje@google.com>
13808
13809 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13810 elf/external.h. Include <elf.h> instead but only if necessary.
13811
13812 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13813
13814 * linux-low.c (linux_remove_process): Remove `detaching'
13815 parameter. Don't release/detach from thread_db here.
13816 (linux_kill): Release/detach from thread_db here, ...
13817 (linux_detach): ... and here, before actually detaching.
13818 (linux_wait_1): ... and here, when a process exits.
13819 * thread-db.c (any_thread_of): New.
13820 (thread_db_free): Switch the current inferior to a thread of the
13821 passed in process.
13822
13823 2009-12-21 Doug Evans <dje@google.com>
13824
13825 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13826
13827 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13828 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13829 warning ifndef __NR_tkill. Move setting of errno there too.
13830 Delete unnecessary resetting of errno after syscall.
13831 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13832
13833 * configure.ac: Check for dladdr.
13834 * config.in: Regenerate.
13835 * configure: Regenerate.
13836 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13837 (try_thread_db_load): Update.
13838
13839 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13840
13841 2009-12-18 Doug Evans <dje@google.com>
13842
13843 * event-loop.c: Include unistd.h if it exists.
13844
13845 * linux-low.c (my_waitpid): Move definition away from being in
13846 between linux_tracefork_child/linux_test_for_tracefork.
13847
13848 * gdb_proc_service.h (psaddr_t): Fix type.
13849 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13850 signature to match glibc.
13851
13852 2009-12-16 Doug Evans <dje@google.com>
13853
13854 * linux-low.c (linux_read_memory): Fix argument to read.
13855
13856 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13857
13858 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13859 events, don't leave current_inferior pointing at null.
13860
13861 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13862
13863 * win32-low.c (LOG): Delete.
13864 (OUTMSG): Output to stderr.
13865 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13866 on compile time LOG macro.
13867 (win32_wait): Fix debug output.
13868
13869 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13870
13871 * win32-low.c (win32_add_one_solib): If the dll name is
13872 "ntdll.dll", prepend the system directory to the dll path.
13873
13874 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13875
13876 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13877
13878 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13879 Vladimir Prus <vladimir@codesourcery.com>
13880
13881 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13882 * configure.ac: Check for __mcoldfire__ and set
13883 gdb_cv_m68k_is_coldfire.
13884 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13885 reg-cf.o and reg-m68k.o.
13886 * configure: Regenerated.
13887
13888 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13889
13890 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13891 Pass it to thread_db_free.
13892 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13893 proper `detaching' argument to linux_remove_process.
13894 * linux-low.h (thread_db_free): Add `detaching' parameter.
13895 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13896 to thread_db_free.
13897 (thread_db_free): Add `detaching' parameter. Only
13898 call td_ta_clear_event if detaching from process.
13899
13900 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13901
13902 * thread-db.c (thread_db_free): Fix typo.
13903
13904 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13905
13906 PR gdb/10838
13907 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13908
13909 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13910
13911 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13912 with an i686 compiler.
13913 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13914 needed.
13915 * configure: Rebuilt.
13916
13917 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13918
13919 PR gdb/10783
13920
13921 * server.c (handle_search_memory_1): Correct read_addr initialization
13922 in loop for searching subsequent chunks.
13923
13924 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13925
13926 * configure.ac: New --with-libthread-db option.
13927 * thread-db.c: Allow direct dependence on libthread_db.
13928 (thread_db_free): Adjust.
13929 * config.in: Regenerate.
13930 * configure: Likewise.
13931
13932 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13933
13934 PR gdb/10757
13935 * thread-db.c (attach_thread): New function.
13936 (maybe_attach_thread): Return success/failure.
13937 (find_new_threads_callback): Adjust.
13938 (thread_db_find_new_threads): Loop until no new threads.
13939
13940 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13941
13942 * proc-service.c (ps_lgetregs): Formatting.
13943
13944 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13945
13946 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13947 * configure.ac: Adjust.
13948 * linux-low.h (struct process_info_private): Move members to struct
13949 thread_db.
13950 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13951 * linux-low.c (linux_remove_process): Adjust.
13952 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13953 * server.c (handle_query): Move code ...
13954 (handle_monitor_command): ... here. New function.
13955 * target.h (struct target_ops): New member.
13956 * thread-db.c (struct thread_db): New.
13957 (libthread_db_search_path): New variable.
13958 (thread_db_create_event, thread_db_enable_reporting)
13959 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13960 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13961 (try_thread_db_load_1, dladdr_to_soname): New functions.
13962 (try_thread_db_load, thread_db_load_search): New functions.
13963 (thread_db_init): Search for libthread_db.
13964 (thread_db_free): New function.
13965 (thread_db_handle_monitor_command): Likewise.
13966 * config.in: Regenerate.
13967 * configure: Regenerate.
13968
13969 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13970
13971 * spu-low.c (spu_kill): Wait for inferior to terminate.
13972 Call clear_inferiors.
13973 (spu_detach): Call clear_inferiors.
13974
13975 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13976
13977 * aclocal.m4: Regenerate.
13978 * config.in: Likewise.
13979 * configure: Likewise.
13980
13981 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13982
13983 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13984 (parse_spufs_run): New function.
13985 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13986 (ppc_breakpoint_at): Handle SPU breakpoints.
13987
13988 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13989
13990 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13991 (SPUFS_MAGIC): Define.
13992 (spu_enumerate_spu_ids): New function.
13993 (linux_qxfer_spu): New function.
13994 (linux_target_ops): Install linux_qxfer_spu.
13995
13996 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13997
13998 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13999 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14000 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14001 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14002 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14003 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14004 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14005 (init_registers_powerpc_cell32l): Add prototype.
14006 (init_registers_powerpc_cell64l): Likewise.
14007 (ppc_arch_setup): Detect Cell/B.E. architecture.
14008
14009 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14010
14011 * Makefile.in (datarootdir): New variable.
14012
14013 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14014
14015 * linux-low.c (linux_write_memory): Update debugging output.
14016 * Makefile.in (clean): Add new descriptions.
14017 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14018 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14019 * configure.srv: Add new files for arm*-*-linux*.
14020 * linux-arm-low.c: Add new declarations.
14021 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14022 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14023 (HWCAP_VFPv3D16): New.
14024 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14025 instead of __IWMMXT__.
14026 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14027 (arm_arch_setup): New.
14028 (target_regsets): Remove #ifdef. Add VFP regset.
14029 (the_low_target): Use arm_arch_setup.
14030
14031 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14032
14033 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14034 the main thread again.
14035
14036 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14037
14038 Adding Neutrino gdbserver.
14039 * configure: Regenerated.
14040 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14041 * configure.srv (i[34567]86-*-nto*): New target.
14042 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14043 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14044 (nto_comctrl) [__QNX__]: New function.
14045 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14046
14047 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14048
14049 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14050 srv_tgtobj.
14051
14052 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14053 Pedro Alves <pedro@codesourcery.com>
14054
14055 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14056 don't support CONTEXT_EXTENDED_REGISTERS.
14057 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14058 (the_low_target): Install them.
14059 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14060 failing with ERROR_PIPE_NOT_CONNECTED.
14061
14062 2009-06-30 Doug Evans <dje@google.com>
14063 Pierre Muller <muller@ics.u-strasbg.fr>
14064
14065 Add h/w watchpoint support to x86-linux, win32-i386.
14066 * Makefile.in (SFILES): Add i386-low.c
14067 (i386_low_h): Define.
14068 (i386-low.o): Add dependencies.
14069 (linux-x86-low.o): Add i386-low.h dependency.
14070 (win32-i386-low.o): Ditto.
14071 * i386-low.c: New file.
14072 * i386-low.h: New file.
14073 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14074 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14075 * linux-low.c (linux_add_process): Initialize arch_private.
14076 (linux_remove_process): Free arch_private.
14077 (add_lwp): Initialize arch_private.
14078 (delete_lwp): Free arch_private.
14079 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14080 provided.
14081 * linux-low.h (process_info_private): New member arch_private.
14082 (lwp_info): New member arch_private.
14083 (linux_target_ops): New members new_process, new_thread,
14084 prepare_to_resume.
14085 (ptid_of): New macro.
14086 * linux-x86-low.c: Include stddef.h, i386-low.h.
14087 (arch_process_info): New struct.
14088 (arch_lwp_info): New struct.
14089 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14090 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14091 (i386_dr_low_get_status): New function.
14092 (x86_insert_point, x86_remove_point): New functions.
14093 (x86_stopped_by_watchpoint): New function.
14094 (x86_stopped_data_address): New function.
14095 (x86_linux_new_process, x86_linux_new_thread): New functions.
14096 (x86_linux_prepare_to_resume): New function.
14097 (the_low_target): Add entries for insert_point, remove_point,
14098 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14099 prepare_to_resume.
14100 * server.c (debug_hw_points): New global.
14101 (monitor_show_help): Document set debug-hw-points.
14102 (handle_query): Process "set debug-hw-points".
14103 * server.h (debug_hw_points): Declare.
14104 (paddress): Declare.
14105 * utils.c (NUMCELLS, CELLSIZE): New macros.
14106 (get_sell, xsnprintf, paddress): New functions.
14107 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14108 remove_point, stopped_by_watchpoint, stopped_data_address.
14109 * win32-i386-low.c: Include i386-low.h.
14110 (debug_reg_state): Replaces dr.
14111 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14112 (i386_dr_low_get_status): New function.
14113 (i386_insert_point, i386_remove_point): New functions.
14114 (i386_stopped_by_watchpoint): New function.
14115 (i386_stopped_data_address): New function.
14116 (i386_initial_stuff): Update.
14117 (get_thread_context,set_thread_context,i386_thread_added): Update.
14118 (the_low_target): Add entries for insert_point,
14119 remove_point, stopped_by_watchpoint, stopped_data_address.
14120 * win32-low.c (win32_insert_watchpoint): New function.
14121 (win32_remove_watchpoint): New function.
14122 (win32_stopped_by_watchpoint): New function.
14123 (win32_stopped_data_address): New function.
14124 (win32_target_ops): Add entries for insert_watchpoint,
14125 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14126 * win32-low.h (win32_target_ops): New members insert_point,
14127 remove_point, stopped_by_watchpoint, stopped_data_address.
14128
14129 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14130
14131 * server.c (process_serial_event): Re-return unsupported, not
14132 error, if the type isn't recognized. Re-allow supporting only
14133 insert or remove packets. Also call require_running for
14134 breakpoints. Add missing break statement to default case. Tidy.
14135 * target.h (struct target_ops): Rename insert_watchpoint to
14136 insert_point, and remove_watchpoint to remove_point.
14137
14138 * linux-low.h (struct linux_target_ops): Likewise.
14139 * linux-low.c (linux_insert_watchpoint): Rename to ...
14140 (linux_insert_point): ... this. Adjust.
14141 (linux_remove_watchpoint): Rename to ...
14142 (linux_remove_point): ... this. Adjust.
14143 (linux_target_ops): Adjust.
14144 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14145 (cris_insert_point): ... this.
14146 (cris_remove_watchpoint): Rename to ...
14147 (cris_remove_point): ... this.
14148 (the_low_target): Adjust.
14149
14150 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14151
14152 * server.c (handle_v_kill): Pass signal_pid to
14153 kill_inferior if multi_process is zero.
14154
14155 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14156
14157 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14158 * target.h (target_ops): Comment for *_watchpoint to make it clear
14159 the functions can get types '0' and '1'.
14160
14161 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14162
14163 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14164 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14165 * regcache.c (get_regcache): Likewise.
14166 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14167 * win32-low.c (child_fetch_inferior_registers): Remove check for
14168 regno 0.
14169
14170 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14171 Pedro Alves <pedro@codesourcery.com>
14172
14173 * target.h (struct target_ops) <supports_multi_process>: New
14174 callback.
14175 (target_supports_multi_process): New.
14176 * server.c (handle_query): Even if GDB reports support, only
14177 enable multi-process if the target also supports it. Report
14178 multi-process support only if the target backend supports it.
14179 * linux-low.c (linux_supports_multi_process): New function.
14180 (linux_target_ops): Install it as target_supports_multi_process
14181 callback.
14182
14183 2009-05-24 Doug Evans <dje@google.com>
14184
14185 Global renaming of find_thread_pid to find_thread_ptid.
14186 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14187 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14188 All callers updated.
14189
14190 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14191 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14192 directly.
14193
14194 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14195 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14196 (linux_resume_one_lwp): Ditto.
14197
14198 2009-05-23 Doug Evans <dje@google.com>
14199
14200 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14201 from struct inferior_list_entry * to struct lwp_info *.
14202 All callers updated.
14203
14204 2009-05-13 Doug Evans <dje@google.com>
14205
14206 * linux-x86-low.c: Don't include assert.h.
14207 (x86_siginfo_fixup): Use fatal, not assert.
14208 (x86_arch_setup): Fix comment.
14209
14210 2009-05-12 Doug Evans <dje@google.com>
14211
14212 Biarch support for i386/amd64 gdbserver.
14213 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14214 Add linux-x86-low.c.
14215 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14216 (linux-x86-low.o): Add.
14217 * linux-x86-64-low.c: Delete.
14218 * linux-i386-low.c: Delete.
14219 * linux-x86-low.c: New file.
14220 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14221 linux-x86-low.o.
14222 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14223 linux-x86-low.o.
14224 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14225 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14226 (linux_child_pid_to_exec_file): New function.
14227 (elf_64_header_p, elf_64_file_p): New functions.
14228 (siginfo_fixup): New function.
14229 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14230 give target a chance to convert layout.
14231 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14232 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14233
14234 2009-05-07 Doug Evans <dje@google.com>
14235
14236 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14237 (regsets_store_inferior_registers): Ditto.
14238
14239 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14240
14241 PR server/10048
14242
14243 * linux-low.c (must_set_ptrace_flags): Delete.
14244 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14245 of the global.
14246 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14247 `lwp->must_set_ptrace_flags' instead.
14248 (linux_wait_for_event_1): Set ptrace options here.
14249 (linux_wait_1): ... not here.
14250
14251 2009-04-30 Doug Evans <dje@google.com>
14252
14253 * inferiors.c (started_inferior_callback): New function.
14254 (attached_inferior_callback): New function.
14255 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14256 * server.c (print_started_pid, print_attached_pid): New functions.
14257 (detach_or_kill_for_exit): New function.
14258 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14259 * server.h (have_started_inferiors_p): Declare.
14260 (have_attached_inferiors_p): Declare.
14261
14262 * inferiors.c (remove_process): Fix memory leak, free process.
14263 * linux-low.c (linux_remove_process): New function.
14264 (linux_kill): Call it instead of remove_process.
14265 (linux_detach, linux_wait_1): Ditto.
14266
14267 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14268
14269 * configure.srv: Add x86 Windows CE target.
14270
14271 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14272
14273 * inferiors.c (get_thread_process): Make global.
14274 * server.h (get_thread_process): Add prototype.
14275 * thread-db.c (find_one_thread): Use get_thread_process
14276 instead of current_process.
14277 (thread_db_get_tls_address): Do not crash if called when
14278 thread layer is not yet initialized.
14279
14280 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14281
14282 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14283 * spu-low.c (current_tid): Rename to ...
14284 (current_ptid): ... this.
14285 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14286 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14287 ptid_get_lwp (current_ptid) instead of current_tid.
14288 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14289 instead of current_tid. Use find_process_pid to verify pid
14290 argument is valid. Pass proper argument to remove_process.
14291 (spu_thread_alive): Compare current_ptid instead of current_tid.
14292 (spu_resume): Likewise.
14293
14294 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14295
14296 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14297 variable.
14298
14299 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14300
14301 Implement the multiprocess extensions, and add linux multiprocess
14302 support.
14303
14304 * server.h (ULONGEST): Declare.
14305 (struct ptid, ptid_t): New.
14306 (minus_one_ptid, null_ptid): Declare.
14307 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14308 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14309 (struct inferior_list_entry): Change `id' type from unsigned from
14310 to ptid_t.
14311 (struct sym_cache, struct breakpoint, struct
14312 process_info_private): Forward declare.
14313 (struct process_info): Declare.
14314 (current_process): Declare.
14315 (all_processes): Declare.
14316 (initialize_inferiors): Declare.
14317 (add_thread): Adjust to use ptid_t.
14318 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14319 (add_process, remove_process, find_thread_pid): Declare.
14320 (find_inferior_id): Adjust to use ptid_t.
14321 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14322 (multi_process): Declare.
14323 (push_event): Adjust to use ptid_t.
14324 (read_ptid, write_ptid): Declare.
14325 (prepare_resume_reply): Adjust to use ptid_t.
14326 (clear_symbol_cache): Declare.
14327 * inferiors.c (all_processes): New.
14328 (null_ptid, minus_one_ptid): New.
14329 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14330 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14331 (add_thread): Change unsigned long to ptid. Remove gdb_id
14332 parameter. Adjust.
14333 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14334 (gdb_id_to_thread): Rename to ...
14335 (find_thread_pid): ... this. Change unsigned long to ptid.
14336 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14337 (loaded_dll, pull_pid_from_list): Adjust.
14338 (add_process, remove_process, find_process_pid)
14339 (get_thread_process, current_process, initialize_inferiors): New.
14340 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14341 (struct target_waitstatus) <related_pid>: Ditto.
14342 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14343 return type to int.
14344 (struct target_ops) <join>: Add `pid' argument.
14345 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14346 (struct target_ops) <wait>: Add `ptid' field. Change return type
14347 to ptid.
14348 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14349 (mywait): Add `ptid' argument. Change return type to ptid_t.
14350 (target_pid_to_str): Declare.
14351 * target.c (set_desired_inferior): Adjust to use ptids.
14352 (mywait): Add new `ptid' argument. Adjust.
14353 (target_pid_to_str): New.
14354 * mem-break.h (free_all_breakpoints): Declare.
14355 * mem-break.c (breakpoints): Delelete.
14356 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14357 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14358 to use per-process breakpoint list.
14359 (free_all_breakpoints): New.
14360 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14361 (symbol_cache, all_symbols_looked_up): Delete.
14362 (hexchars): New.
14363 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14364 read_ptid): New.
14365 (prepare_resume_reply): Change ptid argument's type from unsigned
14366 long to ptid_t. Adjust. Implement W;process and X;process.
14367 (free_sym_cache, clear_symbol_cache): New.
14368 (look_up_one_symbol): Adjust to per-process symbol cache. *
14369 * server.c (cont_thread, general_thread, step_thread): Change type
14370 to ptid_t.
14371 (attached): Delete.
14372 (multi_process): New.
14373 (last_ptid): Change type to ptid_t.
14374 (struct vstop_notif) <ptid>: Change type to ptid_t.
14375 (queue_stop_reply, push_event): Change `ptid' argument's type to
14376 ptid_t.
14377 (discard_queued_stop_replies): Add `pid' argument.
14378 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14379 changes. Don't reference the `attached' global.
14380 (attach_inferior): Adjust to mywait interface changes.
14381 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14382 features. Handle and report "multiprocess+". Handle
14383 "qAttached:PID".
14384 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14385 changes.
14386 (handle_v_kill): New.
14387 (handle_v_stopped): Adjust to use target_pid_to_str.
14388 (handle_v_requests): Allow multiple attaches and runs when
14389 multiprocess extensions are in effect. Handle "vKill".
14390 (myresume): Adjust to use ptids.
14391 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14392 (handle_status): Adjust to discard_queued_stop_replies interface
14393 change.
14394 (first_thread_of, kill_inferior_callback)
14395 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14396 (main): Call initialize_inferiors. Adjust to use ptids, killing
14397 and detaching from all inferiors. Handle multiprocess packet
14398 variants.
14399 * linux-low.h: Include gdb_proc_service.h.
14400 (struct process_info_private): New.
14401 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14402 <lwpid_of>: Use ptid_get_lwp.
14403 (get_lwp_thread): Adjust.
14404 (struct lwp_info): Add `dead' member.
14405 (find_lwp_pid): Declare.
14406 * linux-low.c (thread_db_active): Delete.
14407 (new_inferior): Adjust comment.
14408 (inferior_pid): Delete.
14409 (linux_add_process): New.
14410 (handle_extended_wait): Adjust.
14411 (add_lwp): Change unsigned long to ptid.
14412 (linux_create_inferior): Add process to processes table. Adjust
14413 to use ptids. Don't set new_inferior here.
14414 (linux_attach_lwp): Rename to ...
14415 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14416 it. Adjust to use ptids.
14417 (linux_attach_lwp): New.
14418 (linux_attach): Add process to processes table. Don't set
14419 new_inferior here.
14420 (struct counter): New.
14421 (second_thread_of_pid_p, last_thread_of_process_p): New.
14422 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14423 multiple processes.
14424 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14425 processes. Remove process from process table.
14426 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14427 to multiple processes.
14428 (any_thread_of): New.
14429 (linux_detach): Add `pid' argument, and handle it. Remove process
14430 from processes table.
14431 (linux_join): Add `pid' argument. Handle it.
14432 (linux_thread_alive): Change unsighed long argument to ptid_t.
14433 Consider dead lwps as not being alive.
14434 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14435 threads we're not interested in.
14436 (same_lwp, find_lwp_pid): New.
14437 (linux_wait_for_lwp): Change `pid' argument's type from int to
14438 ptid_t. Adjust.
14439 (linux_wait_for_event): Rename to ...
14440 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14441 from int to ptid_t. Adjust.
14442 (linux_wait_for_event): New.
14443 (linux_wait_1): Add `ptid' argument. Change return type to
14444 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14445 that exit from the process table.
14446 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14447 Adjust.
14448 (mark_lwp_dead): New.
14449 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14450 stopping all threads, mark its main lwp as dead.
14451 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14452 ptids.
14453 (fetch_register, usr_store_inferior_registers)
14454 (regsets_fetch_inferior_registers)
14455 (regsets_store_inferior_registers, linux_read_memory)
14456 (linux_write_memory): Inline `inferior_pid'.
14457 (linux_look_up_symbols): Adjust to use per-process
14458 `thread_db_active'.
14459 (linux_request_interrupt): Adjust to use ptids.
14460 (linux_read_auxv): Inline `inferior_pid'.
14461 (initialize_low): Don't reference thread_db_active.
14462 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14463 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14464 (ps_getpid): Return the pid of the current inferior.
14465 * thread-db.c (proc_handle, thread_agent): Delete.
14466 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14467 per-process data.
14468 (find_one_thread): Change argument type to ptid_t. Adjust to
14469 per-process data.
14470 (maybe_attach_thread): Adjust to per-process data and ptids.
14471 (thread_db_find_new_threads): Ditto.
14472 (thread_db_init): Ditto.
14473 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14474 processes table. Adjust to use ptids.
14475 (spu_kill, spu_detach): Adjust interface. Remove process from
14476 processes table.
14477 (spu_join, spu_thread_alive): Adjust interface.
14478 (spu_wait): Adjust interface. Remove process from processes
14479 table. Adjust to use ptids.
14480 * win32-low.c (current_inferior_tid): Delete.
14481 (current_inferior_ptid): New.
14482 (debug_event_ptid): New.
14483 (thread_rec): Take a ptid. Adjust.
14484 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14485 (child_delete_thread): Ditto.
14486 (do_initial_child_stuff): Add `attached' argument. Add process to
14487 processes table.
14488 (child_fetch_inferior_registers, child_store_inferior_registers):
14489 Adjust.
14490 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14491 (win32_attach): Pass 1 to do_initial_child_stuff.
14492 (win32_kill): Adjust interface. Remove process from processes
14493 table.
14494 (win32_detach): Ditto.
14495 (win32_join): Adjust interface.
14496 (win32_thread_alive): Take a ptid.
14497 (win32_resume): Adjust to use ptids.
14498 (get_child_debug_event): Ditto.
14499 (win32_wait): Adjust interface. Remove exiting process from
14500 processes table.
14501
14502 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14503
14504 Non-stop mode support.
14505
14506 * server.h (non_stop): Declare.
14507 (gdb_client_data, handler_func): Declare.
14508 (delete_file_handler, add_file_handler, start_event_loop):
14509 Declare.
14510 (handle_serial_event, handle_target_event, push_event)
14511 (putpkt_notif): Declare.
14512 * target.h (enum resume_kind): New.
14513 (struct thread_resume): Replace `step' field by `kind' field.
14514 (TARGET_WNOHANG): Define.
14515 (struct target_ops) <wait>: Add `options' argument.
14516 <supports_non_stop, async, start_non_stop>: New fields.
14517 (target_supports_non_stop, target_async): New.
14518 (start_non_stop): Declare.
14519 (mywait): Add `options' argument.
14520 * target.c (mywait): Add `options' argument. Print child exit
14521 notifications here.
14522 (start_non_stop): New.
14523 * server.c (non_stop, own_buf, mem_buf): New globals.
14524 (struct vstop_notif): New.
14525 (notif_queue): New global.
14526 (queue_stop_reply, push_event, discard_queued_stop_replies)
14527 (send_next_stop_reply): New.
14528 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14529 interface changes.
14530 (attach_inferior): In non-stop mode, don't wait for the target
14531 here.
14532 (handle_general_set): Handle QNonStop.
14533 (handle_query): When handling qC, return the current general
14534 thread, instead of the first thread of the list.
14535 (handle_query): If the backend supports non-stop mode, include
14536 QNonStop+ in the qSupported query response.
14537 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14538 and non-stop mode.
14539 (handle_v_attach, handle_v_run): Handle non-stop mode.
14540 (handle_v_stopped): New.
14541 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14542 (myresume): Adjust to use resume_kind. Handle non-stop.
14543 (queue_stop_reply_callback): New.
14544 (handle_status): Handle non-stop mode.
14545 (main): Clear non_stop flag on reconnection. Use the event-loop.
14546 Refactor serial protocol handling from here ...
14547 (process_serial_event): ... to this new function. When GDB
14548 selects any thread, select one here. In non-stop mode, wait until
14549 GDB acks all pending events before exiting.
14550 (handle_serial_event, handle_target_event): New.
14551 * remote-utils.c (remote_open): Install remote_desc in the event
14552 loop.
14553 (remote_close): Remove remote_desc from the event loop.
14554 (putpkt_binary): Rename to...
14555 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14556 (putpkt_binary): New as wrapper around putpkt_binary_1.
14557 (putpkt_notif): New.
14558 (prepare_resume_reply): In non-stop mode, don't change the
14559 general_thread.
14560 * event-loop.c: New.
14561 * Makefile.in (OBJ): Add event-loop.o.
14562 (event-loop.o): New rule.
14563
14564 * linux-low.h (pid_of): Moved here.
14565 (lwpid_of): New.
14566 (get_lwp_thread): Use lwpid_of.
14567 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14568 * linux-low.c (pid_of): Delete.
14569 (inferior_pid): Use lwpid_of.
14570 (linux_event_pipe): New.
14571 (target_is_async_p): New.
14572 (delete_lwp): New.
14573 (handle_extended_wait): Use lwpid_of.
14574 (add_lwp): Don't set lwpid field.
14575 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14576 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14577 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14578 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14579 first. Adjust to linux_wait_for_event interface changes. Use
14580 lwpid_of.
14581 (linux_detach): Don't delete the main lwp here.
14582 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14583 (status_pending_p): Don't consider explicitly suspended lwps.
14584 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14585 pointer. Add OPTIONS argument. Change return type to int. Use
14586 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14587 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14588 pointer. Add status pointer argument. Return a pid instead of a
14589 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14590 changes. In non-stop mode, don't switch to a random thread.
14591 (linux_wait): Rename to...
14592 (linux_wait_1): ... this. Add target_options argument, and handle
14593 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14594 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14595 clean exit and signal exit code. Don't stop all threads in
14596 non-stop mode. In all-stop mode, only stop all threads when
14597 reporting a stop to GDB. Handle explicit thread stop requests.
14598 (async_file_flush, async_file_mark): New.
14599 (linux_wait): New.
14600 (send_sigstop): Use lwpid_of.
14601 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14602 interface changes. In non-stop mode, don't switch to a random
14603 thread.
14604 (linux_resume_one_lwp): Use lwpid_of.
14605 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14606 (linux_resume_one_thread): ... this. Handle resume_stop. In
14607 non-stop mode, don't look for pending flag in all threads.
14608 (resume_status_pending_p): Don't consider explicitly suspended
14609 threads.
14610 (my_waitpid): Reimplement. Emulate __WALL.
14611 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14612 Use lwpid_of.
14613 (sigchld_handler, linux_supports_non_stop, linux_async)
14614 (linux_start_non_stop): New.
14615 (linux_target_ops): Register linux_supports_non_stop, linux_async
14616 and linux_start_non_stop.
14617 (initialize_low): Install SIGCHLD handler.
14618 * thread-db.c (thread_db_create_event, find_one_thread)
14619 (thread_db_get_tls_address): Use lwpid_of.
14620 * win32-low.c (win32_detach): Adjust to use resume_kind.
14621 (win32_wait): Add `options' argument.
14622 * spu-low.c (spu_resume): Adjust to use resume_kind.
14623 (spu_wait): Add `options' argument.
14624
14625 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14626
14627 Decouple target code from remote protocol.
14628
14629 * target.h (enum target_waitkind): New.
14630 (struct target_waitstatus): New.
14631 (struct target_ops) <wait>: Return an unsigned long. Take a
14632 target_waitstatus pointer instead of a char pointer.
14633 (mywait): Likewise.
14634 * target.c (mywait): Change prototype to return an unsigned long.
14635 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14636 * server.h (thread_from_wait, old_thread_from_wait): Delete
14637 declarations.
14638 (prepare_resume_reply): Change prototype to take a
14639 target_waitstatus.
14640 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14641 (last_status, last_ptid): New.
14642 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14643 pid instead of a signal.
14644 (attach_inferior): Remove "status" and "signal" parameters.
14645 Adjust.
14646 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14647 not as an address.
14648 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14649 (handle_v_requests, myresume): Remove "status" and "signal"
14650 parameters. Adjust.
14651 (handle_status): New.
14652 (main): Delete local `status'. Adjust.
14653 * remote-utils.c: Include target.h.
14654 (prepare_resume_reply): Change prototype to take a
14655 target_waitstatus. Adjust.
14656
14657 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14658 interface.
14659 * spu-low.c (spu_wait): Adjust.
14660 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14661 Delete.
14662 (win32_wait): Adjust.
14663
14664 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14665
14666 * target.h (struct thread_resume): Delete leave_stopped member.
14667 (struct target_ops): Add a `n' argument to the `resume' callback.
14668 * server.c (start_inferior): Adjust.
14669 (handle_v_cont, myresume): Adjust.
14670 * linux-low.c (check_removed_breakpoint): Adjust to resume
14671 interface change, and to removed leave_stopped field.
14672 (resume_ptr): Delete.
14673 (struct thread_resume_array): New.
14674 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14675 resume interface change.
14676 (linux_continue_one_thread, linux_queue_one_thread)
14677 (resume_status_pending_p): Check if the resume field is NULL
14678 instead of checking the leave_stopped member.
14679 (linux_resume): Adjust to the target resume interface change.
14680 * spu-low.c (spu_resume): Adjust to the target resume interface
14681 change.
14682 * win32-low.c (win32_detach, win32_resume): Ditto.
14683
14684 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14685
14686 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14687 flag.
14688 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14689 pending.
14690 (linux_continue_one_thread): Only preserve the stepping flag if
14691 there's a pending breakpoint.
14692
14693 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14694
14695 * server.c (main): After the inferior having exited, call
14696 remote_close before exiting gdbserver.
14697
14698 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14699
14700 Fix size of FPSCR in Power 7 processors.
14701 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14702 (PPC_FEATURE_HAS_DFP): New #define.
14703 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14704 size of the FPSCR.
14705
14706 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14707
14708 * server.c (handle_query) Whitespace and formatting.
14709
14710 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14711
14712 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14713 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14714 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14715 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14716 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14717 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14718 Makefile.in, configure.ac: Fix whitespace throughout.
14719 * configure: Regenerate.
14720
14721 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14722
14723 * inferiors.c (find_inferior): Make it safe for the callback
14724 function to delete the currently iterated inferior.
14725
14726 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14727
14728 * Makefile.in (linuw_low_h): Move higher.
14729 (thread-db.o): Depend on $(linux_low_h).
14730
14731 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14732
14733 Rename "process" to "lwp" throughout.
14734
14735 * linux-low.c (all_processes): Rename to...
14736 (all_lwps): ... this.
14737 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14738 (add_process): Rename to ...
14739 (add_lwp): ... this. Adjust.
14740 (linux_create_inferior): Adjust.
14741 (linux_attach_lwp): Adjust.
14742 (linux_attach): Adjust.
14743 (linux_kill_one_process): Rename to ...
14744 (linux_kill_one_lwp): ... this. Adjust.
14745 (linux_kill): Adjust.
14746 (linux_detach_one_process): Rename to ...
14747 (linux_detach_one_lwp): ... this. Adjust.
14748 (linux_detach): Adjust.
14749 (check_removed_breakpoint): Adjust.
14750 (status_pending_p): Adjust.
14751 (linux_wait_for_process): Rename to ...
14752 (linux_wait_for_lwp): ... this. Adjust.
14753 (linux_wait_for_event): Adjust.
14754 (send_sigstop): Adjust.
14755 (wait_for_sigstop): Adjust.
14756 (stop_all_processes): Rename to ...
14757 (stop_all_lwps): ... this.
14758 (linux_resume_one_process): Rename to ...
14759 (linux_resume_one_lwp): ... this. Adjust.
14760 (linux_set_resume_request, linux_continue_one_thread)
14761 (linux_queue_one_thread, resume_status_pending_p)
14762 (usr_store_inferior_registers, regsets_store_inferior_registers)
14763 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14764 Adjust.
14765 * linux-low.h (get_process): Rename to ...
14766 (get_lwp): ... this. Adjust.
14767 (get_thread_process): Rename to ...
14768 (get_thread_lwp): ... this. Adjust.
14769 (get_process_thread): Rename to ...
14770 (get_lwp_thread): ... this. Adjust.
14771 (struct process_info): Rename to ...
14772 (struct lwp_info): ... this.
14773 (all_processes): Rename to ...
14774 (all_lwps): ... this.
14775 * proc-service.c (ps_lgetregs): Adjust.
14776 * thread-db.c (thread_db_create_event, find_one_thread)
14777 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14778
14779 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14780
14781 * server.c (handle_query): Handle "qAttached".
14782
14783 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14784
14785 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14786 GPLv3, update license URL.
14787
14788 2009-03-01 Doug Evans <dje@google.com>
14789
14790 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14791 (server_h): Add gdb_signals.h.
14792 (signals.o): Update.
14793 * server.h (target_signal_from_host,target_signal_to_host_p)
14794 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14795
14796 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14797
14798 * remote-utils.c (getpkt): Also generate remote-debug
14799 information if noack_mode is set.
14800
14801 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14802
14803 * server.c (handle_query): Report qXfer:siginfo:read and
14804 qXfer:siginfo:write as supported and handle them.
14805 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14806 * linux-low.c (linux_xfer_siginfo): New.
14807 (linux_target_ops): Set it.
14808
14809 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14810
14811 * server.c (gdbserver_usage): Mention --remote-debug.
14812 (main): Accept '--remote-debug' switch.
14813
14814 2009-01-18 Doug Evans <dje@google.com>
14815
14816 * regcache.c (new_register_cache): No need to check result of xcalloc.
14817 * server.c (handle_search_memory): Back out calls to xmalloc,
14818 result is checked and error is returned to user upon failure.
14819 (handle_query): Ditto. Add more checks for result of malloc.
14820 (handle_v_cont): Check result of malloc, report error back to
14821 user upon failure.
14822 (handle_v_run): Ditto. Call freeargv.
14823 * server.h (freeargv): Declare.
14824 * utils.c (freeargv): New fn.
14825
14826 2009-01-15 Doug Evans <dje@google.com>
14827
14828 * gdbreplay.c (perror_with_name): Make arg const char *.
14829 * server.h (target_signal_to_name): Make return type const char *.
14830 * thread-db.c (thread_db_err_str): Make return type const char *.
14831 * utils.c (perror_with_name): Make arg const char *.
14832
14833 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14834
14835 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14836 when handling a EXIT_PROCESS_DEBUG_EVENT.
14837
14838 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14839
14840 * gdbreplay.c (gdbreplay_version): Update copyright year.
14841 * server.c (gdbserver_version): Likewise.
14842
14843 2009-01-05 Doug Evans <dje@google.com>
14844
14845 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14846 (handle_extended_wait): Improve comment.
14847
14848 2008-12-13 Doug Evans <dje@google.com>
14849
14850 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14851 * server.h (ATTR_MALLOC): New macro.
14852 (xmalloc,xcalloc,xstrdup): Declare.
14853 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14854 * inferiors.c: Ditto.
14855 * linux-low.c: Ditto.
14856 * mem-break.c: Ditto.
14857 * regcache.c: Ditto.
14858 * remote-utils.c: Ditto.
14859 * server.c: Ditto.
14860 * target.c: Ditto.
14861 * win32-low.c: Ditto.
14862
14863 2008-12-12 Doug Evans <dje@google.com>
14864
14865 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14866 in debugging printf.
14867
14868 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14869
14870 2008-12-09 Doug Evans <dje@google.com>
14871
14872 * linux-low.h (struct process_info): Delete member tid, unused.
14873 * thread-db.c (find_one_thread): Update.
14874 (maybe_attach_thread): Update.
14875
14876 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14877
14878 * target.h (struct target_ops): Add qxfer_osdata member.
14879 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14880 and dirent.h.
14881 (linux_qxfer_osdata): New functions.
14882 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14883 callback.
14884 * server.c (handle_query): Handle "qXfer:osdata:read:".
14885 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14886 (buffer_xml_printf): New functions.
14887 * server.h (struct buffer): New.
14888 (buffer_grow_str, buffer_grow_str0): New macros.
14889 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14890 (buffer_xml_printf): Declare.
14891
14892 2008-11-24 Doug Evans <dje@google.com>
14893
14894 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14895
14896 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14897
14898 * server.c (handle_v_run): Always use the supplied argument list.
14899
14900 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14901
14902 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14903 (xtensa_regmap_table): Add entry for scompare1.
14904
14905 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14906
14907 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14908 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14909 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14910 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14911 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14912 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14913 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14914 XML target descriptions.
14915 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14916 when inferior is running on an ISA 2.05 or later processor. Add
14917 special case to return offset for full 64-bit slot of FPSCR when
14918 in 32-bits.
14919
14920 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14921
14922 * Makefile.in (SFILES, clean): Added sparc64 files.
14923 (reg-sparc64.o, reg-sparc64.c): New.
14924 * configure.srv (sparc*-*-linux*): New configuration.
14925 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14926 syscall arguments for SPARC.
14927 (regsets_store_inferior_registers): Likewise.
14928 * linux-sparc-low.c: New file.
14929
14930 2008-10-21 Doug Evans <dje@google.com>
14931
14932 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14933 (READLINE_DIR,READLINE_DEP): Delete.
14934 (INTERNAL_CFLAGS): Update.
14935 (LINTFLAGS): Update.
14936
14937 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14938
14939 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14940 whole argv from the last run, not just argv[0].
14941
14942 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14943
14944 * regcache.c (new_register_cache): Return NULL if the register
14945 cache size isn't known yet.
14946 (free_register_cache): Avoid dereferencing a NULL regcache.
14947
14948 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14949
14950 * configure.srv: Merge MIPS and MIPS64.
14951
14952 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14953
14954 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14955
14956 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14957
14958 * Makefile.in: Add required vsx dependencies.
14959
14960 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14961 Declare init_registers_powerpc_vsx32l.
14962 Declare init_registers_powerpc_vsx64l.
14963 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14964 (ppc_arch_setup): Check for VSX in hwcap.
14965 (ppc_fill_vsxregset): New function.
14966 (ppc_store_vsxregset): New function.
14967 Add new VSX entry in regset_info target_regsets.
14968
14969 * configure.srv: Add new VSX dependencies.
14970
14971 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14972
14973 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14974 (remote_open): Set or clear transport_is_reliable.
14975 (putpkt_binary): Don't expect acks in noack mode.
14976 (getpkt): Don't send ack/nac in noack mode.
14977 * server.c (handle_general_set): Handle QStartNoAckMode.
14978 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14979 qSupported.
14980 (main): Reset noack_mode on every connection.
14981 * server.h (noack_mode): Declare.
14982
14983 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14984
14985 * Makefile.in (GDBREPLAY_OBS): New variable.
14986 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14987
14988 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14989 Daniel Jacobowitz <dan@codesourcery.com>
14990
14991 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14992 (usr_store_inferior_registers): Likewise.
14993 (regsets_store_inferior_registers): Likewise.
14994
14995 2008-07-31 Rolf Jansen <rj@surtec.com>
14996 Pedro Alves <pedro@codesourcery.com>
14997
14998 * configure.ac: Check for memmem declaration.
14999 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15000 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15001 (disable_packet_qfThreadInfo): Unconditionally compile.
15002 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15003 * configure, config.in: Regenerate.
15004
15005 2008-07-28 Doug Kwan <dougkwan@google.com>
15006
15007 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15008 (linux_write_memory): Remove declaration of errno.
15009
15010 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15011
15012 * linux-low.c (handle_extended_wait): Do not use "status"
15013 variable uninitialized.
15014
15015 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15016
15017 * server.c (handle_v_attach): Inhibit reporting dll changes.
15018
15019 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15020
15021 * remote-utils.c (prepare_resume_reply): If requested, don't
15022 output "thread:TID" in the T stop reply.
15023
15024 * server.c (disable_packet_vCont, disable_packet_Tthread)
15025 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15026 (handle_query): If requested, disable support for qC, qfThreadInfo
15027 and qsThreadInfo.
15028 (handle_v_requests): If requested, disable support for vCont.
15029 (gdbserver_show_disableable): New.
15030 (main): Handle --disable-packet and --disable-packet=LIST.
15031
15032 * server.h (disable_packet_vCont, disable_packet_Tthread)
15033 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15034
15035 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15036
15037 * server.c (gdbserver_usage): Mention --version.
15038
15039 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15040
15041 * Makefile.in (gdbreplay.o): New rule.
15042
15043 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15044
15045 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15046 message, not gdbserver.
15047
15048 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15049 Nathan Sidwell <nathan@codesourcery.com>
15050 Joseph Myers <joseph@codesourcery.com>
15051
15052 * acinclude.m4: Include ../../config/acx.m4.
15053 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15054 * configure, config.in: Regenerate.
15055 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15056 * server.c (gdbserver_version): Print PKGVERSION.
15057 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15058 (main): Adjust gdbserver_usage calls.
15059 * gdbreplay.c (version, host_name): Add declarations.
15060 (gdbreplay_version, gdbreplay_usage): New.
15061 (main): Accept --version and --help options.
15062
15063 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15064
15065 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15066 (arm_breakpoint_at): Handle Thumb.
15067 (the_low_target): Add comment.
15068
15069 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15070
15071 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15072
15073 2008-05-09 Doug Evans <dje@google.com>
15074
15075 * server.h (decode_search_memory_packet): Declare.
15076 * remote-utils.c (decode_search_memory_packet): New fn.
15077 * server.c (handle_search_memory_1): New fn.
15078 (handle_search_memory): New fn.
15079 (handle_query): Process qSearch:memory packets.
15080
15081 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15082
15083 * regcache.c (registers_length): Remove.
15084 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15085 full register packet.
15086 * regcache.h (registers_length): Remove prototype.
15087 * server.h (PBUFSIZ): Define to 16384.
15088
15089 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15090
15091 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15092 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15093 powerpc-64l.o, and powerpc-altivec64l.o.
15094 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15095 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15096 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15097 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15098 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15099 to srv_xmlfiles.
15100
15101 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15102 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15103 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15104 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15105 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15106 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15107 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15108 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15109 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15110 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15111 (clean): Update.
15112
15113 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15114 (init_registers_powerpc_32l): ... this new prototype.
15115 (init_registers_powerpc_32): Remove, replace by ...
15116 (init_registers_powerpc_altivec32l): ... this new prototype.
15117 (init_registers_powerpc_e500): Remove, replace by ...
15118 (init_registers_powerpc_e500l): ... this new prototype.
15119 (init_registers_ppc64): Remove, replace by ...
15120 (init_registers_powerpc_64l): ... this new prototype.
15121 (init_registers_powerpc_64): Remove, replace by ...
15122 (init_registers_powerpc_altivec64l): ... this new prototype.
15123 (ppc_num_regs): Set to 73.
15124 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15125 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15126 (ppc_cannot_store_register): Handle orig_r3 and trap.
15127 (ppc_arch_setup): Update init_registers_... calls.
15128 (ppc_fill_gregset): Handle orig_r3 and trap.
15129
15130 * inferiors.c (clear_inferiors): Reset current_inferior.
15131
15132 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15133
15134 * acinclude.m4: Add override.m4.
15135 * configure: Regenerate.
15136
15137 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15138
15139 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15140 initial call to init_register_ppc64.
15141
15142 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15143
15144 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15145 single powerpc*-*-linux* case.
15146 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15147
15148 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15149
15150 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15151 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15152 from reg_xmlfiles.
15153 * linux-ppc-low.c: Include <elf.h>.
15154 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15155 (ppc_hwcap): New global variable.
15156 (ppc_regmap): Remove __SPE__ #ifdef sections.
15157 (ppc_regmap_e500): New global variable.
15158 (ppc_cannot_store_register): Update __SPE__ special case.
15159 (ppc_get_hwcap): New function.
15160 (ppc_arch_setup): Use it to determine whether inferior supports
15161 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15162 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15163 Do not access registers if target does not support AltiVec.
15164 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15165 Do not access registers if target does not support SPE.
15166 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15167
15168 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15169
15170 * linux-low.c (disabled_regsets, num_regsets): New.
15171 (use_regsets_p): Delete.
15172 (linux_wait_for_process): Clear disabled_regsets.
15173 (regsets_fetch_inferior_registers): Check and set it.
15174 (regsets_store_inferior_registers): Likewise.
15175 (linux_fetch_registers, linux_store_registers): Do not use
15176 use_regsets_p.
15177 (initialize_low): Allocate disabled_regsets.
15178
15179 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15180
15181 * Makefile.in (LIBOBJS): New.
15182 (OBS): Use LIBOBJS.
15183 (memmem.o): New rule.
15184 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15185 * configure: Regenerated.
15186
15187 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15188
15189 * server.c (handle_query): Never return "unsupported" for
15190 qXfer:features:read queries.
15191
15192 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15193
15194 * server.c (get_features_xml): Fix inverted condition.
15195 (handle_query): Always support qXfer:feature:read.
15196
15197 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15198
15199 * server.c (wrapper_argv): New.
15200 (start_inferior): Handle wrapper_argv. If set, expect an extra
15201 trap.
15202 (gdbserver_usage): Document --wrapper.
15203 (main): Parse --wrapper.
15204
15205 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15206
15207 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15208 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15209 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15210 (ppc_set_pc): Likewise.
15211 (ppc_arch_setup): New function.
15212 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15213 of collect_register.
15214 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15215
15216 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15217
15218 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15219 instead of linux-ppc64-low.o.
15220 * linux-ppc64-low.c: Remove file.
15221 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15222 (linux-ppc64-low.o): Remove rule.
15223
15224 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15225 (init_registers_powerpc_64): Likewise.
15226 (ppc_regmap): Conditionally define depending on __powerpc64__.
15227 (ppc_cannot_store_register): Do not special-case "fpscr" when
15228 compiled on __powerpc64__.
15229 (ppc_collect_ptrace_register): New function.
15230 (ppc_supply_ptrace_register): New function.
15231 (ppc_breakpoint): Change type to "unsigned int".
15232 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15233 (the_low_target): Conditionally provide initializers for the
15234 arch_setup member depending on __powerpc64__. Install
15235 collect_ptrace_register and supply_ptrace_register members.
15236
15237 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15238
15239 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15240 * server.c (gdbserver_xmltarget): Define.
15241 (get_features_xml): Use it to replace "target.xml" and arch_string.
15242
15243 * configure.srv: Remove srv_xmltarget. Add XML files that were
15244 mentioned there to srv_xmlfiles instead. Remove conditional tests
15245 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15246 srv_xmlfiles and srv_regobj to include all possible choices.
15247 * configure.ac (srv_xmltarget): Remove.
15248 (srv_xmlfiles): Do not add "target.xml".
15249 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15250 checks for supplementary target information.
15251 * configure: Regenerate.
15252 * Makefile.in (XML_TARGET): Remove.
15253 (target.xml): Remove rule.
15254 (clean): Do not clean up target.xml.
15255 (.PRECIOUS): Do not mention target.xml.
15256
15257 * target.h (struct target_ops): Remove arch_string member.
15258 * linux-low.c (linux_arch_string): Remove.
15259 (linux_target_ops): Remove arch_string initializer.
15260 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15261 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15262 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15263 * spu-low.c (spu_arch_string): Remove.
15264 (spu_target_ops): Remove arch_string initializer.
15265 * win32-low.c (win32_arch_string): Remove.
15266 (win32_target_ops): Remove arch_string initializer.
15267 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15268 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15269 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15270
15271 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15272
15273 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15274 by collect_ptrace_register and supply_ptrace_register hooks.
15275 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15276 instead of checking for the_low_target.left_pad_xfer.
15277 (usr_store_inferior_registers): Use collect_ptrace_register callback
15278 instead of checking for the_low_target.left_pad_xfer.
15279
15280 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15281 (s390_supply_ptrace_register): Likewise.
15282 (s390_fill_gregset): Call s390_collect_ptrace_register.
15283 (the_low_target): Update.
15284
15285 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15286 (ppc_supply_ptrace_register): Likewise.
15287 (the_low_target): Update.
15288
15289 * linux-i386-low.c (the_low_target): Update.
15290 * linux-x86-64-low.c (the_low_target): Update.
15291
15292 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15293
15294 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15295 reg-s390.o and reg-s390x.o.
15296
15297 * linux-low.c (new_inferior): New global variable.
15298 (linux_create_inferior, linux_attach): Set it.
15299 (linux_wait_for_process): Call the_low_target.arch_setup after the
15300 target has stopped for the first time.
15301 (initialize_low): Do not call the_low_target.arch_setup.
15302
15303 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15304 (s390_set_pc): Likewise.
15305 (s390_arch_setup): New function.
15306 (the_low_target): Use s390_arch_setup as arch_setup routine.
15307
15308 * regcache.c (realloc_register_cache): New function.
15309 (set_register_cache): Call it for each existing regcache.
15310
15311 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15312
15313 * server.h (init_registers): Remove prototype.
15314
15315 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15316 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15317 instead of init_registers ().
15318 * linux-arm-low.c (init_registers_arm): Add prototype.
15319 (init_registers_arm_with_iwmmxt): Likewise.
15320 (the_low_target): Add initializer for arch_setup field.
15321 * linux-cris-low.c (init_registers_cris): Add prototype.
15322 (the_low_target): Add initializer for arch_setup field.
15323 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15324 (the_low_target): Add initializer for arch_setup field.
15325 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15326 (the_low_target): Add initializer for arch_setup field.
15327 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15328 (the_low_target): Add initializer for arch_setup field.
15329 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15330 (the_low_target): Add initializer for arch_setup field.
15331 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15332 (the_low_target): Add initializer for arch_setup field.
15333 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15334 (init_registers_mips64_linux): Likewise.
15335 (the_low_target): Add initializer for arch_setup field.
15336 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15337 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15338 (the_low_target): Add initializer for arch_setup field.
15339 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15340 (init_registers_powerpc_64): Likewise.
15341 (the_low_target): Add initializer for arch_setup field.
15342 * linux-s390-low.c (init_registers_s390): Add prototype.
15343 (init_registers_s390x): Likewise.
15344 (the_low_target): Add initializer for arch_setup field.
15345 * linux-sh-low.c (init_registers_sh): Add prototype.
15346 (the_low_target): Add initializer for arch_setup field.
15347 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15348 (the_low_target): Add initializer for arch_setup field.
15349 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15350 (the_low_target): Add initializer for arch_setup field.
15351
15352 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15353 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15354 instead of init_registers ().
15355 * win32-arm-low.c (init_registers_arm): Add prototype.
15356 (the_low_target): Add initializer for arch_setup field.
15357 * win32-i386-low.c (init_registers_i386): Add prototype.
15358 (the_low_target): Add initializer for arch_setup field.
15359
15360 * spu-low.c (init_registers_spu): Add prototype.
15361 (initialize_low): Call initialie_registers_spu () instead of
15362 initialize_registers ().
15363
15364 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15365
15366 * server.c (handle_v_requests): When handling the vRun and vAttach
15367 packets, if already debugging a process, don't kill it. Return an
15368 error instead.
15369
15370 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15371
15372 * server.c (handle_query): Correct length check.
15373
15374 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15375
15376 * win32-low.c (do_initial_child_stuff): Add process handle
15377 parameter. Set current_process_handle and current_process_id from the
15378 parameters. Clear globals.
15379 (win32_create_inferior): Don't set current_process_handle and
15380 current_process_id here. Instead pass them on the call to
15381 do_initial_child_stuff.
15382 (win32_attach): Likewise.
15383 (win32_clear_inferiors): New.
15384 (win32_kill): Don't close the current process handle or the
15385 current thread handle here. Instead call win32_clear_inferiors.
15386 (win32_detach): Don't open a new handle to the process. Call
15387 win32_clear_inferiors.
15388 (win32_join): Don't rely on current_process_handle; open a new
15389 handle using the process id.
15390 (win32_wait): Call win32_clear_inferiors when the inferior process
15391 has exited.
15392
15393 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15394
15395 * server.c (monitor_show_help): Add "exit".
15396
15397 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15398
15399 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15400 (clean): Add reg-xtensa.c.
15401 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15402 * configure.srv (xtensa*-*-linux*) New target.
15403 * linux-xtensa-low.c: New.
15404 * xtensa-xtregs.c: New.
15405
15406 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15407
15408 * hostio.c: Don't include errno.h.
15409 (errno_to_fileio_errno): Move to hostio-errno.
15410 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15411 error number outputting to the target->hostio_last_error callback.
15412 (hostio_packet_error): Use FILEIO_EINVAL directly.
15413 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15414 calls to hostio_error.
15415 * hostio-errno.c: New.
15416 * server.h (hostio_last_error_from_errno): Declare.
15417 * target.h (target_ops): Add hostio_last_error member.
15418 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15419 as hostio_last_error handler.
15420 * spu-low.c (spu_target_ops): Likewise.
15421 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15422 (wince_hostio_last_error): New functions.
15423 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15424 as hostio_last_error handler.
15425 (win32_target_ops) [!_WIN32_WCE]: Register
15426 hostio_last_error_from_errno as hostio_last_error handler.
15427 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15428 (hostio-errno.o): New rule.
15429 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15430 * configure.srv (srv_hostio_err_objs): New variable. Default to
15431 hostio-errno.o.
15432 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15433 * configure: Regenerate.
15434
15435 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15436
15437 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15438 (linux_kill, linux_detach): Clean up the process list.
15439 * remote-utils.c (remote_open): Improve port number parsing.
15440 (putpkt_binary, input_interrupt): Only send interrupts if the target
15441 is running.
15442 * server.c (extended_protocol): Make static.
15443 (attached): Define earlier.
15444 (exit_requested, response_needed, program_argv): New variables.
15445 (target_running): New.
15446 (start_inferior): Clear attached here.
15447 (attach_inferior): Set attached here.
15448 (require_running): Define.
15449 (handle_query): Use require_running and target_running. Implement
15450 "monitor exit".
15451 (handle_v_attach, handle_v_run): New.
15452 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15453 (gdbserver_usage): Update.
15454 (main): Redo argument parsing. Handle --debug and --multi. Handle
15455 --attach along with other options or after the port. Save
15456 program_argv. Support no initial program. Resynchronize
15457 communication with GDB after an error. Handle "monitor exit".
15458 Use require_running and target_running. Always allow the extended
15459 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15460 restart in extended mode.
15461 * README: Refer to the GDB manual. Update --attach usage.
15462
15463 2007-12-20 Andreas Schwab <schwab@suse.de>
15464
15465 * linux-low.c (STACK_SIZE): Define.
15466 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15467 (linux_test_for_tracefork): Likewise.
15468
15469 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15470
15471 * linux-low.c (linux_wait_for_event): Update messages. Do not
15472 reinsert auto-delete breakpoints.
15473 * mem-break.c (struct breakpoint): Change return type of handler to
15474 int.
15475 (set_breakpoint_at): Update handler type.
15476 (reinsert_breakpoint_handler): Return 1 instead of calling
15477 delete_breakpoint.
15478 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15479 setting a new one.
15480 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15481 * mem-break.h (set_breakpoint_at): Update handler type.
15482 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15483 * win32-low.c (auto_delete_breakpoint): New.
15484 (get_child_debug_event): Use it.
15485
15486 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15487
15488 * configure.ac: Check for pread and pwrite.
15489 * hostio.c (handle_pread): Fall back to lseek and read.
15490 (handle_pwrite): Fall back to lseek and write.
15491 * config.in, configure: Regenerated.
15492
15493 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15494
15495 * server.c (myresume): Add own_buf argument.
15496 (main): Update calls.
15497
15498 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15499
15500 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15501 * remote-utils.c (remote_open): Do not call disable_async_io.
15502 (block_async_io): Delete.
15503 (unblock_async_io): Make static.
15504 (initialize_async_io): New.
15505 * server.c (handle_v_cont): Handle async I/O here.
15506 (myresume): Likewise. Move other common resume tasks here...
15507 (main): ... from here. Call initialize_async_io. Disable async
15508 I/O before the main loop.
15509 * server.h (initialize_async_io): Declare.
15510 (block_async_io, unblock_async_io): Delete prototypes.
15511 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15512
15513 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15514
15515 * remote-utils.c (readchar): Allow binary data in received messages.
15516
15517 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15518
15519 * win32-low.c (attaching): New global.
15520 (win32_create_inferior): Clear the `attaching' global.
15521 (win32_attach): Set the `attaching' global.
15522 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15523 attaching. Only set a breakpoint at the entry point if not
15524 attaching.
15525
15526 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15527
15528 * server.c (main): Don't report dll events on the initial
15529 connection on attaches.
15530
15531 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15532
15533 * server.c (main): Relax numerical bases supported for the pid of
15534 the --attach command line argument.
15535
15536 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15537
15538 * win32-low.c (win32_attach): Call OpenProcess before
15539 DebugActiveProcess, not after. Add last error output to error
15540 call.
15541
15542 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15543
15544 * win32-low.c (win32_get_thread_context)
15545 (win32_set_thread_context): New functions.
15546 (thread_rec): Use win32_get_thread_context.
15547 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15548 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15549 field.
15550
15551 2007-12-03 Leo Zayas
15552 Pedro Alves <pedro_alves@portugalmail.pt>
15553
15554 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15555 global variables.
15556 (child_add_thread): Minor cleanup.
15557 (child_continue): Resume artificially suspended threads before
15558 calling ContinueDebugEvent.
15559 (suspend_one_thread): New.
15560 (fake_breakpoint_event): New.
15561 (get_child_debug_event): Change return type to int. Check here if
15562 gdb sent an interrupt request. If a soft interrupt was requested,
15563 fake a breakpoint event. Return 0 if there is no event to handle,
15564 and 1 otherwise.
15565 (win32_wait): Don't check here if gdb sent an interrupt request.
15566 Ensure there is a valid event to handle.
15567 (win32_request_interrupt): Add soft interruption method as last
15568 resort.
15569
15570 2007-12-03 Leo Zayas
15571 Pedro Alves <pedro_alves@portugalmail.pt>
15572
15573 * win32-low.h (win32_thread_info): Add descriptions to the
15574 structure members. Replace `suspend_count' counter by a
15575 `suspended' flag.
15576 * win32-low.c (thread_rec): Update condition of when to get the
15577 context from the inferior. Rely on ContextFlags being set if it
15578 has already been retrieved. Only suspend the inferior thread if
15579 we haven't already. Warn if that fails.
15580 (continue_one_thread): s/suspend_count/suspended/. Only call
15581 ResumeThread once. Warn if that fails.
15582
15583 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15584
15585 * win32-low.c (win32_wait): Don't read from the inferior when it
15586 has already exited.
15587
15588 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15589
15590 * Makefile.in (win32_low_h): New variable.
15591 (win32-low.o): Add dependency on $(win32_low_h).
15592 (win32-arm-low.o, win32-i386-low.o): New rules.
15593
15594 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15595
15596 * hostio.c: Correct copyright year.
15597
15598 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15599
15600 * Makefile.in (OBS): Add hostio.o.
15601 (hostio.o): New rule.
15602 * server.h (handle_vFile): Declare.
15603 * hostio.c: New file.
15604 * server.c (handle_v_requests): Take packet_len and new_packet_len
15605 for binary packets. Call handle_vFile.
15606 (main): Update call to handle_v_requests.
15607
15608 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15609
15610 * linux-low.c: Include <sched.h>.
15611
15612 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15613
15614 * linux-low.c (linux_tracefork_grandchild): New.
15615 (linux_tracefork_child): Use clone.
15616 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15617
15618 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15619
15620 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15621
15622 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15623
15624 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15625
15626 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15627
15628 * inferiors.c (change_inferior_id): Delete.
15629 (add_pid_to_list, pull_pid_from_list): New.
15630 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15631 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15632 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15633 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15634 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15635 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15636 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15637 (using_threads): Always set to 1.
15638 (handle_extended_wait): New.
15639 (add_process): Do not set TID.
15640 (linux_create_inferior): Set must_set_ptrace_flags.
15641 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15642 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15643 (linux_thread_alive): Rename TID argument to LWPID.
15644 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15645 (linux_wait_for_event): Do not use TID or check using_threads. Update
15646 call to dead_thread_notify. Call handle_extended_wait.
15647 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15648 (send_sigstop): Delete sigstop_sent.
15649 (wait_for_sigstop): Avoid TID.
15650 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15651 (linux_test_for_tracefork): New.
15652 (linux_lookup_signals): Use thread_db_active and
15653 linux_supports_tracefork_flag.
15654 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15655 * linux-low.h (get_process_thread): Avoid TID.
15656 (struct process_ifo): Move thread_known and tid to the end. Remove
15657 sigstop_sent.
15658 (linux_attach_lwp, thread_db_init): Update prototypes.
15659 * server.h (change_inferior_id): Delete prototype.
15660 (add_pid_to_list, pull_pid_from_list): New prototypes.
15661 * thread-db.c (thread_db_use_events): New.
15662 (find_first_thread): Rename to...
15663 (find_one_thread): ...this. Update callers and messages. Do not
15664 call fatal. Check thread_db_use_events. Do not call
15665 change_inferior_id or new_thread_notify.
15666 (maybe_attach_thread): Update. Do not call new_thread_notify.
15667 (thread_db_init): Set thread_db_use_events. Check use_events.
15668 * utils.c (fatal, warning): Correct message prefix.
15669
15670 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15671
15672 * Makefile.in (clean): Remove new files.
15673 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15674 (powerpc-64.o, powerpc-64.c): New rules.
15675 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15676 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15677 with SPE.
15678 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15679 SPE targets.
15680 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15681 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15682 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15683 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15684 (target_regsets): Add AltiVec and SPE register sets.
15685 * configure.ac: Check for AltiVec and SPE.
15686 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15687 (ppc_fill_vrregset, ppc_store_vrregset): New.
15688 (target_regsets): Add AltiVec register set.
15689 * configure: Regenerated.
15690
15691 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15692
15693 * linux-low.c (O_LARGEFILE): Define.
15694 (linux_read_memory): Use /proc/PID/mem.
15695 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15696 * configure, config.in: Regenerated.
15697
15698 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15699
15700 * linux-low.c (linux_wait_for_event): Do not pass signals while
15701 single-stepping.
15702
15703 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15704
15705 * win32-low.c (create_process): New.
15706 (win32_create_inferior): Use create_process instead of
15707 CreateProcess. If create_process failed retry appending an ".exe"
15708 suffix. Store the GetLastError result immediatelly after
15709 create_process calls and use it on the call to error.
15710
15711 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15712
15713 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15714
15715 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15716
15717 * configure.ac: Switch license to GPLv3.
15718
15719 2007-08-01 Michael Snyder <msnyder@access-company.com>
15720
15721 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15722
15723 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15724
15725 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15726 typedef.
15727 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15728 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15729 CloseToolhelp32Snapshot.
15730 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15731 CloseToolhelp32Snapshot.
15732
15733 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15734
15735 * server.c (main): Check for inferior exit before main loop.
15736
15737 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15738
15739 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15740 instead of on tmp_desc.
15741
15742 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15743 Daniel Jacobowitz <dan@codesourcery.com>
15744
15745 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15746 (add_thread): Minor cleanups.
15747 (clear_inferiors): Move lower in the file. Clear the DLL
15748 list.
15749 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15750 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15751 (xml_escape_text): New.
15752 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15753 for qSupported.
15754 (handle_v_cont): Report errors.
15755 (gdbserver_version): Update.
15756 (main): Correct size of own_buf. Do not report initial DLL events.
15757 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15758 (unloaded_dll, xml_escape_text): New.
15759 * win32-low.c (enum target_waitkind): Update comments.
15760 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15761 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15762 (win32_EnumProcessModules, win32_GetModuleInformation)
15763 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15764 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15765 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15766 (win32_Module32First, win32_Module32Next, load_toolhelp)
15767 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15768 (get_child_debug_event): Handle DLL events.
15769 (win32_wait): Likewise.
15770
15771 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15772
15773 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15774 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15775
15776 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15777
15778 * win32-low.c (handle_output_debug_string): Ignore event if not
15779 waiting.
15780
15781 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15782
15783 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15784
15785 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15786
15787 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15788
15789 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15790
15791 * inferiors.c (change_inferior_id): Add comment.
15792 * linux-low.c (check_removed_breakpoint): Add an early
15793 prototype. Improve debug output.
15794 (linux_attach): Doc update.
15795 (linux_detach_one_process, linux_detach): Clean up before releasing
15796 each process.
15797 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15798 * linux-low.h (struct process_info): Doc improvement.
15799 * mem-break.c (delete_all_breakpoints): New.
15800 * mem-break.h (delete_all_breakpoints): New prototype.
15801 * thread-db.c (find_first_thread): New.
15802 (thread_db_create_event): Call it instead of
15803 thread_db_find_new_threads. Clean up unused variables.
15804 (maybe_attach_thread): Remove first thread handling.
15805 (thread_db_find_new_threads): Use find_first_thread.
15806 (thread_db_get_tls_address): Likewise.
15807
15808 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15809
15810 * thread-db.c (thread_db_find_new_threads): Add prototype.
15811 (thread_db_create_event): Check for the main thread before adding
15812 a new thread.
15813 (maybe_attach_thread): Only enable event reporting if TID == 0.
15814 (thread_db_get_tls_address): Check for new threads.
15815
15816 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15817
15818 * linux-low.c (linux_create_inferior): Try execv before execvp.
15819 * spu-low.c (spu_create_inferior): Likewise.
15820
15821 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15822
15823 * linux-low.c (linux_create_inferior): Change execv to execvp.
15824 * spu-low.c (spu_create_inferior): Likewies.
15825
15826 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15827
15828 * Makefile.in (clean): Clean new files instead of deleted ones.
15829 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15830 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15831 rules.
15832 * configure.srv: Specify XML files and new regformats for MIPS and
15833 MIPS64 GNU/Linux.
15834 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15835 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15836 an entry for the restart register.
15837 (mips_cannot_fetch_register, mips_cannot_store_register)
15838 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15839 register names to match the XML descriptions.
15840 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15841 restart register instead of $0.
15842
15843 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15844 Markus Deuling <deuling@de.ibm.com>
15845
15846 * remote-utils.c (decode_xfer_write): New function.
15847 * server.h (decode_xfer_write): Add prototype.
15848 * server.c (handle_query): Add PACKET_LEN argument. Support
15849 qXfer:spu:read and qXfer:spu:write packets.
15850 (main): Pass packet_len to handle_query.
15851 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15852 * target.h (target_ops): Add qxfer_spu.
15853
15854 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15855
15856 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15857 accessing non-seekable spufs files.
15858
15859 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15860
15861 * server.c (handle_query): Add reply for qC packet.
15862
15863 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15864 Leo Zayas <lerele@champenstudios@com>
15865
15866 * server.h (check_remote_input_interrupt_request): New function.
15867 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15868 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15869 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15870 (check_remote_input_interrupt_request): New function.
15871 * server.h (check_remote_input_interrupt_request): Declare.
15872 * win32-low.c (winapi_DebugBreakProcess,
15873 winapi_GenerateConsoleCtrlEvent): New typedefs.
15874 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15875 to 250 ms.
15876 (win32_wait): Check for remote interrupt request
15877 with check_remote_input_interrupt_request.
15878 (win32_request_interrupt): New function.
15879 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15880
15881 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15882
15883 * win32-low.c (debug_registers_changed,
15884 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15885 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15886 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15887 (thread_rec): Get context using the low target.
15888 (child_add_thread): Call thread_added on the low target,
15889 which does the same thing.
15890 (regptr): Delete.
15891 (do_initial_child_stuff): Remove debug registers references.
15892 Set context using the low target. Resume threads after
15893 setting the contexts.
15894 (child_continue): Remove dead variable. Remove debug
15895 registers references.
15896 (child_fetch_inferior_registers): Go through the low target.
15897 (do_child_store_inferior_registers): Remove.
15898 (child_store_inferior_registers): Go through the low target.
15899 (win32_resume): Remove debug registers references.
15900 Set context using the low target.
15901 (handle_exception): Change return type to void. Don't record
15902 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15903 first chance exception.
15904 (get_child_debug_event): Change return type to void. Remove
15905 goto loop. Always return after waiting for debug event.
15906 (win32_wait): Convert to switch statement. Handle spurious
15907 events.
15908
15909 * win32-i386-low.c (debug_registers_changed,
15910 debug_registers_used): New.
15911 (initial_stuff): Rename to ...
15912 (i386_initial_stuff): ... this. Clear debug registers
15913 state variables.
15914 (store_debug_registers): Delete.
15915 (i386_get_thread_context): New.
15916 (load_debug_registers): Delete.
15917 (i386_set_thread_context): New.
15918 (i386_thread_added): New.
15919 (single_step): Rename to ...
15920 (i386_single_step): ... this.
15921 (do_fetch_inferior_registers): Rename to ...
15922 (i386_fetch_inferior_register): ... this.
15923 (i386_store_inferior_register): New.
15924 (the_low_target): Adapt to new interface.
15925
15926 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15927 (arm_get_thread_context): New.
15928 (arm_set_thread_context): New.
15929 (regptr): New.
15930 (do_fetch_inferior_registers): Rename to ...
15931 (arm_fetch_inferior_register): ... this.
15932 (arm_store_inferior_register): New.
15933 (arm_wince_breakpoint): Reimplement as unsigned long.
15934 (arm_wince_breakpoint_len): Define.
15935 (the_low_target): Adapt to new interface.
15936
15937 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15938 load_debug_registers. Add get_thread_context, set_thread_context,
15939 thread_added and store_inferior_register. Rename
15940 fetch_inferior_registers to fetch_inferior_register.
15941 (regptr): Remove declaration.
15942
15943 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15944
15945 * linux-low.c (linux_detach): Change return type to int. Return 0.
15946 * spu-low.c (spu_detach): Likewise.
15947
15948 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15949
15950 * target.h (target_ops): Change return type of detach to int.
15951 Add join.
15952 (join_inferior): New.
15953 * server.c (main): Don't skip detach support on mingw32.
15954 If the inferior doesn't support detaching return error.
15955 Call join_inferior instead of using waitpid.
15956 * linux-low.c (linux_join): New.
15957 (linux_target_op): Add linux_join.
15958 * spu-low.c (spu_join): New.
15959 (spu_target_ops): Add spu_join.
15960 * win32-low.c (win32_detach): Adapt to new interface.
15961 Reopen current_process_handle before detaching. Issue a child
15962 resume before detaching.
15963 (win32_join): New.
15964 (win32_target_op): Add win32_join.
15965
15966 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15967
15968 * win32-low.c (win32-attach): Fix return value.
15969 * target.h (target_ops): Describe ATTACH return values.
15970
15971 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15972
15973 * win32-low.c (GETPROCADDRESS): Define.
15974 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15975 (winapi_DebugSetProcessKillOnExit): Likewise.
15976 (win32_create_inferior): Force usage of ansi CreateProcessA.
15977 (win32_attach): Use GETPROCADDRESS.
15978 (win32_detach): Likewise.
15979
15980 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15981
15982 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15983
15984 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15985
15986 * win32-low.c: Commit leftover changes from 2007-03-29.
15987
15988 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15989
15990 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15991 fields short instead of int. Add explicit padding.
15992 (i387_cache_to_fsave): Remove unnecessary casts.
15993 (i387_fsave_to_cache): Doc fix.
15994 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15995
15996 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15997
15998 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15999 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16000
16001 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16002
16003 * configure.srv (arm*-*-mingw32ce*): Move near the other
16004 arm targets.
16005
16006 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16007
16008 * configure.ac: Add errno checking.
16009 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16010 sys/file.h and malloc.h.
16011 (AC_CHECK_DECLS): Add perror.
16012 (srv_mingwce): Handle.
16013 * configure.srv (i[34567]86-*-cygwin*): Add
16014 win32-i386-low.o to srv_tgtobj.
16015 (i[34567]86-*-mingw*): Likewise.
16016 (arm*-*-mingw32ce*): Add case.
16017 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16018 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16019 [__MINGW32CE__] (strerror): New function.
16020 [__MINGW32CE__] (errno): Define to GetLastError.
16021 [__MINGW32CE__] (COUNTOF): New macro.
16022 (remote_open): Remove extra close call.
16023 * mem-break.c (delete_breakpoint_at): New function.
16024 * mem-break.h (delete_breakpoint_at): Declare.
16025 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16026 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16027 [USE_WIN32API] (read, write): Add char* casts.
16028 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16029 * server.h: Include wincecompat.h on Windows CE.
16030 [HAVE_ERRNO_H]: Check.
16031 (perror): Declare if not declared.
16032 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16033 (perror_with_name): Remove errno declaration.
16034 * wincecompat.h: New.
16035 * wincecompat.c: New.
16036 * win32-low.h: New.
16037 * win32-arm-low.c: New.
16038 * win32-i386-low.c: New.
16039 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16040 (OUTMSG2): Make it safe.
16041 (_T): New macro.
16042 (COUNTOF): New macro.
16043 (NUM_REGS): Get it from the low target.
16044 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16045 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16046 (thread_rec): Let low target handle debug registers.
16047 (child_add_thread): Likewise.
16048 (child_init_thread_list): Likewise.
16049 (continue_one_thread): Likewise.
16050 (regptr): New.
16051 (do_child_fetch_inferior_registers): Move to ...
16052 * win32-i386-low.c: ... here, and rename to ...
16053 (do_fetch_inferior_registers): ... this.
16054 * win32-low.c (child_fetch_inferior_registers):
16055 Go through the low target.
16056 (do_child_store_inferior_registers): Use regptr.
16057 (strwinerror): New function.
16058 (win32_create_inferior): Handle Windows CE.
16059 Use strwinerror instead of strerror on Windows error
16060 codes. Add program to the error output.
16061 Don't close the main thread handle on Windows CE.
16062 (win32_attach): Use coredll.dll on Windows CE.
16063 (win32_kill): Close current process and current
16064 thread handles.
16065 (win32_detach): Use coredll.dll on Windows CE.
16066 (win32_resume): Let low target handle debug registers, and
16067 step request.
16068 (handle_exception): Add/Remove initial breakpoint. Avoid
16069 non-existant WSTOPSIG on Windows CE.
16070 (win32_read_inferior_memory): Cast to remove warning.
16071 (win32_arch_string): Go through the low target.
16072 (initialize_low): Call set_breakpoint_data with the low
16073 target's breakpoint.
16074 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16075 FOP_REGNUM, mappings): Move to ...
16076 * win32-i386-low.c: ... here.
16077 * win32-low.c (win32_thread_info): Move to ...
16078 * win32-low.h: ... here.
16079 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16080 win32-arm-low.c and wincecompat.c.
16081 (all:): Add $EXEEXT.
16082 (install-only:): Likewise.
16083 (gdbserver:): Likewise.
16084 (gdbreplay:): Likewise.
16085 * config.in: Regenerate.
16086 * configure: Regenerate.
16087
16088 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16089
16090 * win32-low.c: Rename typedef thread_info to
16091 win32_thread_info throughout.
16092
16093 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16094
16095 * win32-i386-low.c: Rename to ...
16096 * win32-low.c: ... this.
16097 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16098 * Makefile.in: Likewise.
16099
16100 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16101
16102 * remote-utils.c (monitor_output): Constify msg parameter.
16103 * server.h (monitor_output): Likewise.
16104 * win32-i386-low.c (handle_output_debug_string): New.
16105 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16106 handle_output_debug_string.
16107 (get_child_debug_event): Likewise.
16108
16109 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16110
16111 * server.c (main): Correct strtoul check.
16112
16113 2007-03-27 Jon Ringle <jon@ringle.org>
16114
16115 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16116
16117 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16118
16119 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16120
16121 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16122
16123 * terminal.h: Check HAVE_SGTTY_H.
16124
16125 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16126
16127 * remote-utils.c (remote_open): Print out the assigned port number.
16128
16129 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16130
16131 * remote-utils.c (monitor_output): New function.
16132 * server.c (debug_threads): Define here.
16133 (monitor_show_help): New function.
16134 (handle_query): Handle qRcmd.
16135 (main): Do not handle 'd' packet.
16136 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16137 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16138 of debug_threads.
16139
16140 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16141
16142 * Makefile.in (EXEEXT): New.
16143 (clean): Use $(EXEEXT).
16144
16145 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16146
16147 * target.h (target_ops): Rename send_signal to request_interrupt,
16148 and remove enum target_signal parameter.
16149 * linux-low.c (linux_request_interrupt): Rename from
16150 linux_send_signal, and always send SIGINT.
16151 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16152 and always send SIGINT.
16153 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16154 of send_signal.
16155 (input_interrupt): Likewise.
16156
16157 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16158
16159 * server.c (get_features_xml): Check if target implemented
16160 arch_string.
16161 * win32-i386-low.c (win32_arch_string): New.
16162 (win32_target_ops): Add win32_arch_string as arch_string member.
16163
16164 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16165
16166 * spu-low.c (spu_arch_string): New.
16167 (spu_target_ops): Add spu_arch_string.
16168
16169 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16170
16171 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16172 * configure.ac: Do not check for terminal.h.
16173 * configure, config.in: Regenerated.
16174
16175 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16176
16177 * Makefile.in (OBS): Add $(XML_BUILTIN).
16178 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16179 (clean): Update.
16180 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16181 (arm-with-iwmmxt.c): New.
16182 * config.in, configure: Regenerate.
16183 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16184 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16185 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16186 (arm*-*-linux*): Add iWMMXt and regset support.
16187 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16188 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16189 (arm_store_wmmxregset, target_regsets): New.
16190 * server.c (get_features_xml): Take annex argument. Check builtin
16191 XML documents.
16192 (handle_query): Handle multiple annexes.
16193
16194 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16195
16196 * remote-utils.c [USE_WIN32API] (read, write): Define.
16197 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16198 write.
16199
16200 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16201
16202 * linux-i386-low.c (the_low_target): Set arch_string.
16203 * linux-x86-64-low.c (the_low_target): Likewise.
16204 * linux-low.c (linux_arch_string): New.
16205 (linux_target_ops): Add it.
16206 * linux-low.h (struct linux_target_ops): Add arch_string.
16207 * server.c (write_qxfer_response): Use const void * for DATA.
16208 (get_features_xml): New.
16209 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16210 * target.h (struct target_ops): Add arch_string method.
16211
16212 2007-01-03 Denis Pilat <denis.pilat@st.com>
16213 Daniel Jacobowitz <dan@codesourcery.com>
16214
16215 * linux-low.c (linux_kill): Handle being called with no threads.
16216 * win32-i386-low.c (win32_kill): Likewise.
16217 (get_child_debug_event): Clear current_process_handle.
16218
16219 2006-12-30 Denis PILAT <denis.pilat@st.com>
16220 Daniel Jacobowitz <dan@codesourcery.com>
16221
16222 * remote-utils.c (remote_open): Check the type of specified
16223 serial port devices before opening them.
16224 * server.c (main): Kill the inferior if an error occurs during
16225 the first remote_open.
16226
16227 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16228
16229 * README: Update supported targets.
16230
16231 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16232
16233 * Makefile.in (clean): Remove reg-mips64.c.
16234 (reg-mips64.c, reg-mips64.o): New rules.
16235 * configure.srv: Handle mips64. Include regset support for mips.
16236 * linux-mips-low.c (union mips_register): New.
16237 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16238 (mips_breakpoint, mips_breakpoint_at): Use int.
16239 (mips_collect_register, mips_supply_register)
16240 (mips_collect_register_32bit, mips_supply_register_32bit)
16241 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16242 (mips_store_fpregset, target_regsets): New.
16243 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16244
16245 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16246
16247 * configure.srv: Add target "spu*-*-*".
16248 * Makefile.in (clean): Remove reg-spu.c.
16249 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16250 * spu-low.c: New file.
16251
16252 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16253
16254 * configure.ac: Correct td_thr_tls_get_addr test.
16255 * configure: Regenerated.
16256
16257 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16258
16259 * linux-low.c (linux_wait_for_event): Reformat. Use the
16260 pass_signals array.
16261 * remote-utils.c (decode_address_to_semicolon): New.
16262 * server.c (pass_signals, handle_general_set): New.
16263 (handle_query): Mention QPassSignals for qSupported.
16264 (main): Call handle_general_set.
16265 * server.h (pass_signals, decode_address_to_semicolon): New.
16266
16267 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16268
16269 * server.c (handle_query): Correct error handling for read_auxv.
16270
16271 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16272
16273 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16274 and srv_linux_thread_db to yes.
16275 * linux-s390-low.c (s390_fill_gregset): New function.
16276 (target_regsets): Define data structure.
16277
16278 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16279
16280 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16281 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16282 * config.in, configure: Regenerated.
16283 * inferiors.c (gdb_id_to_thread): New function.
16284 (gdb_id_to_thread_id): Use it.
16285 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16286 * linux-low.h (struct process_info): Add th member.
16287 (thread_db_get_tls_address): New prototype.
16288 * remote-utils.c (decode_address): Make non-static.
16289 * server.c (handle_query): Handle qGetTLSAddr.
16290 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16291 * target.h (struct target_ops): Add get_tls_address.
16292 * thread-db.c (maybe_attach_thread): Save the thread handle.
16293 (thread_db_get_tls_address): New.
16294
16295 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16296
16297 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16298 (linux_resume_one_process): Take a siginfo_t *. Update all
16299 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16300 (struct pending_signals): Add a siginfo_t.
16301 (linux_wait_for_process): Always set last_status.
16302 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16303 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16304 * linux-low.h (struct process_info): Add last_status.
16305
16306 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16307
16308 * remote-utils.c (try_rle): New function.
16309 (putpkt_binary): Use it.
16310
16311 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16312
16313 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16314 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16315 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16316 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16317 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16318 point registers.
16319
16320 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16321
16322 * server.c (terminal_fd): New variable.
16323 (old_foreground_pgrp): Likewise.
16324 (restore_old_foreground_pgrp): New function.
16325 (start_inferior): Record the terminal file descriptor in terminal_fd
16326 and its original foreground group in old_foreground_pgrp. Register
16327 restore_old_foreground_pgrp with atexit().
16328
16329 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16330
16331 * server.c (handle_query): Correct qPart to qXfer.
16332
16333 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16334
16335 * configure.ac: Check for more headers which are missing on
16336 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16337 * configure.srv: Add Cygwin and mingw32.
16338 * remote-utils.c: Don't include headers unconditionally which
16339 are missing on mingw32. Include <winsock.h> for mingw32.
16340 (remote_open): Adjust for mingw32 support. Flush
16341 standard error after writing to it.
16342 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16343 (unblock_async_io, enable_async_io, disable_async_io)
16344 (readchar, getpkt): Update for Winsock support.
16345 (prepare_resume_reply): Expect a protocol signal number.
16346 * server.c: Disable <sys/wait.h> on mingw32.
16347 (start_inferior): Adjust for mingw32 support. Flush
16348 standard error after writing to it.
16349 (attach_inferior): Likewise. Use protocol signal
16350 numbers.
16351 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16352 and names.
16353 * win32-i386-low.c: New file.
16354 * Makefile.in (XM_CLIBS): Set.
16355 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16356 (win32-i386-low.o): New dependency rule.
16357 * linux-low.c (linux_wait): Use target signal numbers.
16358 * target.h (struct target_ops): Doc fix.
16359 * server.h (target_signal_to_name): New prototype.
16360 * gdbreplay.c: Don't include headers unconditionally which
16361 are missing on mingw32. Include <winsock.h> for mingw32.
16362 (remote_close, remote_open): Adjust for Winsock support.
16363 * configure, config.in: Regenerated.
16364
16365 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16366
16367 * server.c (decode_xfer_read, write_qxfer_response): New.
16368 (handle_query): Take a packet length argument. Handle
16369 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16370 the qSupported response.
16371 (main): Update call to handle_query.
16372
16373 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16374
16375 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16376 (putpkt_binary): Renamed from putpkt and adjusted for binary
16377 data.
16378 (putpkt): New wrapper for putpkt_binary.
16379 (readchar): Don't mask off the high bit.
16380 (decode_X_packet): New function.
16381 * server.c (main): Call putpkt_binary if a handler sets the packet
16382 length. Save the length of the incoming packet. Handle 'X'.
16383 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16384
16385 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16386
16387 * server.c (handle_query): Handle qSupported.
16388
16389 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16390
16391 * remote-utils.c (all_symbols_looked_up): New variable.
16392 (look_up_one_symbol): Check it.
16393 * server.h (look_up_one_symbol): New declaration.
16394 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16395
16396 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16397
16398 * Makefile.in (linux-arm-low.o): Update dependencies.
16399 * linux-arm-low.c: Include "gdb_proc_service.h".
16400 (PTRACE_GET_THREAD_AREA): Define.
16401 (ps_get_thread_area): New function.
16402
16403 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16404
16405 * configure.srv (m68k*-*-uclinux*): New target.
16406 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16407 (linux_resume_one_process): Remove extraneous cast.
16408 (linux_read_offsets): New.
16409 (linux_target_op): Add linux_read_offsets on mmuless systems.
16410 * server.c (handle_query): Add qOffsets logic.
16411 * target.h (struct target_ops): Add read_offsets.
16412
16413 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16414
16415 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16416 (PTRACE_GET_THREAD_AREA): Define.
16417 (ps_get_thread_area): New function.
16418 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16419 (linux-x86-64-low.o): Update.
16420
16421 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16422
16423 * configure.ac: Remove checks for prfpregset_t.
16424 * gdb_proc_service.h: New file.
16425 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16426 new "gdb_proc_service.h".
16427 * proc-service.c: Likewise.
16428 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16429 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16430 * Makefile.in (gdb_proc_service_h): Updated.
16431 * configure, config.in: Regenerated.
16432
16433 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16434
16435 * remote-utils.c (prepare_resume_reply): Move declaration
16436 of gdb_id_from_wait to the top of the block.
16437
16438 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16439
16440 * linux-low.c (regsets_store_inferior_registers): Read the regset
16441 from the target before filling it.
16442
16443 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16444
16445 * server.c (attach_inferior): Return SIGTRAP for a successful
16446 attach.
16447
16448 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16449
16450 * Makefile.in (OBS): Add version.o.
16451 (STAGESTUFF): Delete.
16452 (version.o): Add dependencies.
16453 (version.c): Replace rule.
16454 (clean): Remove version.c.
16455 * server.c (gdbserver_version): New.
16456 (gdbserver_usage): Use printf.
16457 (main): Handle --version and --help.
16458 * server.h (version, host_name): Add declarations.
16459
16460 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16461
16462 * linux-arm-low.c:
16463 * linux-arm-low.c:
16464 * inferiors.c:
16465 * i387-fp.h:
16466 * i387-fp.c:
16467 * gdbreplay.c:
16468 * regcache.c:
16469 * proc-service.c:
16470 * mem-break.h:
16471 * mem-break.c:
16472 * linux-x86-64-low.c:
16473 * linux-sh-low.c:
16474 * linux-s390-low.c:
16475 * linux-ppc64-low.c:
16476 * linux-ppc-low.c:
16477 * linux-mips-low.c:
16478 * linux-m68k-low.c:
16479 * linux-m32r-low.c:
16480 * linux-low.h:
16481 * linux-low.c:
16482 * linux-ia64-low.c:
16483 * linux-i386-low.c:
16484 * linux-crisv32-low.c:
16485 * thread-db.c:
16486 * terminal.h:
16487 * target.h:
16488 * target.c:
16489 * server.h:
16490 * server.c:
16491 * remote-utils.c:
16492 * regcache.h:
16493 * utils.c:
16494 * Makefile.in:
16495 * configure.ac:
16496 * gdbserver.1: Add (C) after Copyright. Update the FSF
16497 address.
16498
16499 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16500
16501 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16502 (arm_breakpoint_at): Recognize both breakpoints.
16503 (the_low_target): Use the correct breakpoint instruction.
16504
16505 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16506
16507 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16508 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16509 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16510 (the_low_target): Update.
16511
16512 2005-10-25 Andreas Schwab <schwab@suse.de>
16513
16514 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16515
16516 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16517 (ia64_num_regs): Reduce to 462.
16518
16519 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16520
16521 * acinclude.m4: Correct quoting.
16522 * aclocal.m4: Regenerated.
16523
16524 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16525 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16526 (thread_db_init): Call thread_db_err_str.
16527 * configure.ac: Check for TD_VERSION.
16528 * config.in, configure: Regenerated.
16529
16530 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16531
16532 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16533
16534 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16535
16536 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16537 is not available. Define HAVE_PTRACE_GETREGS if it is.
16538 * config.in, configure: Regenerated.
16539 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16540 * linux-i386-low.c, linux-m68k-low.c: Update to use
16541 HAVE_PTRACE_GETREGS.
16542 * linux-low.c (regsets_fetch_inferior_registers)
16543 (regsets_store_inferior_registers): Only return 0 if we processed
16544 GENERAL_REGS.
16545 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16546 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16547
16548 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16549
16550 * inferiors.c (struct thread_info): Add gdb_id.
16551 (add_thread): Add gdb_id argument.
16552 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16553 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16554 calls to add_thread.
16555 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16556 * server.c (handle_query): Use thread_to_gdb_id.
16557 (handle_v_cont, main): Use gdb_id_to_thread_id.
16558 * server.h (add_thread): Update prototype.
16559 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16560 prototypes.
16561
16562 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16563
16564 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16565 left-padded registers.
16566 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16567 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16568
16569 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16570
16571 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16572 * configure: Regenerate.
16573 * config.in: Regenerate.
16574 * server.h (NEED_DECLARATION_STRERROR):
16575 Replace with !HAVE_DECL_STRERROR.
16576
16577 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16578
16579 * linux-low.c (linux_wait, linux_send_signal): Don't test
16580 an unsigned long variable for > 0 if it could be MAX_ULONG.
16581 * server.c (myresume): Likewise.
16582 * target.c (set_desired_inferior): Likewise.
16583
16584 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16585
16586 * configure.ac: Simplify and improve check for socklen_t.
16587 * configure, config.in: Regenerate.
16588
16589 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16590
16591 * acconfig.h: Remove.
16592 * configure.ac: Add a test for socklen_t. Use three-argument
16593 AC_DEFINE throughout.
16594 * config.in: Regenerated using autoheader 2.59.
16595 * configure: Regenerated.
16596
16597 * gdbreplay.c (socklen_t): Provide a default.
16598 (remote_open): Use socklen_t.
16599 * remote-utils.c (socklen_t): Provide a default.
16600 (remote_open): Use socklen_t.
16601 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16602 unsigned char.
16603
16604 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16605 char for buffers.
16606 * linux-low.c (linux_read_memory, linux_write_memory)
16607 (linux_read_auxv): Likewise.
16608 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16609 (check_mem_write): Likewise.
16610 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16611 Likewise.
16612 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16613 (registers_from_string, register_data): Likewise.
16614 * server.c (handle_query, main): Likewise.
16615 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16616 (decode_M_packet): Likewise.
16617 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16618 * target.h (struct target_ops): Update read_memory, write_memory,
16619 and read_auxv.
16620 (read_inferior_memory, write_inferior_memory): Update.
16621 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16622 to unsigned char *.
16623 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16624 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16625 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16626 linux-s390-low.c, linux-sh-low.c: Update for changes in
16627 read_inferior_memory and the_low_target->breakpoint.
16628
16629 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16630
16631 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16632 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16633 * configure.srv: Add powerpc64-*-linux*.
16634 * linux-ppc64-low.c: New file.
16635
16636 2005-05-23 Orjan Friberg <orjanf@axis.com>
16637
16638 * linux-cris-low.c: New file with support for CRIS.
16639 * linux-crisv32-low.c: Ditto for CRISv32.
16640 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16641 (clean): Add reg-cris.c and reg-crisv32.c.
16642 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16643 reg-crisv32.o, and reg-crisv32.c to make rules.
16644 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16645 recognized targets.
16646
16647 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16648
16649 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16650 of sizeof (PTRACE_XFER_TYPE).
16651 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16652
16653 2005-05-12 Orjan Friberg <orjanf@axis.com>
16654
16655 * target.h (struct target_ops): Add insert_watchpoint,
16656 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16657 pointers for hardware watchpoint support.
16658 * linux-low.h (struct linux_target_ops): Ditto.
16659 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16660 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16661 to linux_target_ops.
16662 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16663 reply packet.
16664 * server.c (main): Recognize 'Z' and 'z' packets.
16665
16666 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16667
16668 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16669 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16670 (the_low_target): Add new members.
16671
16672 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16673
16674 * proc-service.c (ps_lgetregs): Search all_processes instead of
16675 all_threads.
16676
16677 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16678
16679 * server.c (start_inferior): Change return type to int.
16680 (attach_inferior): Change sigptr to int *.
16681 (handle_v_cont, handle_v_requests): Change signal to int *.
16682 (main): Change signal to int.
16683
16684 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16685
16686 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16687 * configure.srv: Add m32r*-*-linux*.
16688 * linux-m32r-low.c: New file.
16689
16690 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16691
16692 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16693
16694 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16695
16696 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16697 Take unsigned long arguments for PIDs.
16698 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16699 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16700 (wait_for_sigstop, linux_resume_one_process)
16701 (regsets_fetch_inferior_registers, linux_send_signal)
16702 (linux_read_auxv): Likewise. Update the types of variables holding
16703 PIDs. Update format string specifiers.
16704 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16705 * remote-utils.c (prepare_resume_reply): Likewise.
16706 * server.c (cont_thread, general_thread, step_thread)
16707 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16708 unsigned long.
16709 (handle_query): Update format specifiers.
16710 (handle_v_cont, main): Use strtoul for thread IDs.
16711 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16712 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16713 (general_thread, step_thread, thread_from_wait)
16714 (old_thread_from_wait): Update.
16715 * target.h (struct thread_resume): Use unsigned long for THREAD.
16716 (struct target_ops): Use unsigned long for arguments to attach and
16717 thread_alive.
16718
16719 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16720
16721 * acinclude.m4: Include bfd/bfd.m4 directly.
16722 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16723 <agriffis@toolchain.org>.
16724 * aclocal.m4, configure: Regenerated.
16725
16726 2005-01-07 Andrew Cagney <cagney@gnu.org>
16727
16728 * configure.ac: Rename configure.in, require autoconf 2.59.
16729 * configure: Re-generate.
16730
16731 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16732
16733 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16734 LIBS when finished.
16735 * aclocal.m4: Regenerated.
16736 * configure: Regenerated.
16737
16738 2004-11-21 Andreas Schwab <schwab@suse.de>
16739
16740 * linux-m68k-low.c (m68k_num_gregs): Define.
16741 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16742 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16743 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16744 (m68k_breakpoint_at): New. Add to the_low_target.
16745
16746 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16747 srv_linux_thread_db to yes.
16748
16749 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16750
16751 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16752 (ARCH_SET_FS): Likewise.
16753 (ARCH_GET_FS): Likewise.
16754 (ARCH_GET_GS): Likewise.
16755
16756 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16757
16758 * linux-i386-low.c (ps_get_thread_area): New.
16759 * linux-x86-64-low.c (ps_get_thread_area): New.
16760 * linux-low.c: Include <sys/syscall.h>.
16761 (linux_kill_one_process): Don't kill the first thread here.
16762 (linux_kill): Kill the first thread here.
16763 (kill_lwp): New function.
16764 (send_sigstop, linux_send_signal): Use it.
16765 * proc-service.c: Clean up #ifdefs.
16766 (fpregset_info): Delete.
16767 (ps_lgetregs): Update and enable implementation.
16768 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16769 implementations.
16770 * remote-utils.c (struct sym_cache, symbol_cache): New.
16771 (input_interrupt): Print a clearer message.
16772 (async_io_enabled): New variable.
16773 (enable_async_io, disable_async_io): Use it. Update comments.
16774 (look_up_one_symbol): Use the symbol cache.
16775 * thread-db.c (thread_db_look_up_symbols): New function.
16776 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16777
16778 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16779
16780 * configure.in: Test for -rdynamic.
16781 * configure: Regenerated.
16782 * Makefile (INTERNAL_LDFLAGS): New.
16783 (gdbserver, gdbreplay): Use it.
16784
16785 2004-09-02 Andrew Cagney <cagney@gnu.org>
16786
16787 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16788
16789 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16790
16791 * linux-low.c (linux_wait): Clear all_processes list also.
16792
16793 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16794
16795 * linux-low.c: Include <errno.h>. Remove extern declaration of
16796 errno.
16797
16798 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16799
16800 * gdbreplay.c, server.h, utils.c: Update copyright years.
16801
16802 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16803
16804 * server.c (main): Print child status or termination signal from
16805 variable 'signal', not 'sig'.
16806
16807 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16808
16809 * linux-low.c (linux_read_memory): Change return type to
16810 int. Check for and return error from ptrace().
16811 * target.c (read_inferior_memory): Change return type to int. Pass
16812 back return status from the_target->read_memory().
16813 * target.h (struct target_ops): Adapt *read_memory() prototype.
16814 Update comment.
16815 (read_inferior_memory): Adapt prototype.
16816 * server.c (main): Return an error packet if
16817 read_inferior_memory() returns an error.
16818
16819 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16820
16821 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16822 Unify with other clean targets.
16823
16824 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16825
16826 * server.c (handle_v_cont): Call set_desired_inferior.
16827
16828 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16829
16830 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16831
16832 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16833
16834 * linux-low.c (linux_wait): Unblock async I/O.
16835 (linux_resume): Block and enable async I/O.
16836 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16837 * server.h (block_async_io, unblock_async_io): Add prototypes.
16838
16839 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16840
16841 * remote-utils.c (remote_open): Print a status notice after
16842 opening a TCP port.
16843 * server.c (attach_inferior): Print a status notice after
16844 attaching.
16845
16846 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16847
16848 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16849
16850 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16851
16852 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16853 error packet.
16854 * server.c, target.h: Update copyright years.
16855
16856 2004-02-25 Roland McGrath <roland@redhat.com>
16857
16858 * target.h (struct target_ops): New member `read_auxv'.
16859 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16860 * linux-low.c (linux_read_auxv): New function.
16861 (linux_target_ops): Initialize `read_auxv' member to that.
16862
16863 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16864
16865 Committed by Jim Blandy <jimb@redhat.com>.
16866
16867 * linux-s390-low.c (s390_num_regs): Update.
16868 (s390_regmap): Remove control registers. Use __s390x__ predefine
16869 instead of GPR_SIZE to distiguish s390 and s390x targets.
16870
16871 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16872
16873 * linux-low.c: Update copyright year.
16874 (check_removed_breakpoint): Clear pending_is_breakpoint.
16875 (linux_set_resume_request, linux_queue_one_thread)
16876 (resume_status_pending_p): New functions.
16877 (linux_continue_one_thread): Use process->resume.
16878 (linux_resume): Only resume threads if there are no pending events.
16879 * linux-low.h (struct process_info): Add resume request
16880 pointer.
16881
16882 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16883
16884 * regcache.c (new_register_cache): Clear the allocated register
16885 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16886
16887 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16888
16889 * linux-low.c (linux_resume): Take a struct thread_resume *
16890 argument.
16891 (linux_wait): Update call.
16892 (resume_ptr): New static variable.
16893 (linux_continue_one_thread): Renamed from
16894 linux_continue_one_process. Use resume_ptr.
16895 (linux_resume): Use linux_continue_one_thread.
16896 * server.c (handle_v_cont, handle_v_requests): New functions.
16897 (myresume): New function.
16898 (main): Handle 'v' case.
16899 * target.h (struct thread_resume): New type.
16900 (struct target_ops): Change argument of "resume" to struct
16901 thread_resume *.
16902 (myresume): Delete macro.
16903
16904 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16905
16906 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16907 (uninstall): Support DESTDIR.
16908
16909 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16910
16911 * configure.srv: Add xscale*linux copy of arm*linux entry.
16912
16913 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16914
16915 * linux-arm-low.c (arm_reinsert_addr): New function.
16916 (the_low_target): Add arm_reinsert_addr.
16917
16918 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16919
16920 * mem-break.c: Remove whitespace at end of file.
16921
16922 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16923
16924 * configure.in: Check whether we need to prototype strerror.
16925 * server.h: Optionally prototype strerror.
16926 * gdbreplay.c (perror_with_name): Use strerror.
16927 * linux-low.c (linux_attach_lwp): Use strerror.
16928 * utils.c (perror_with_name): Use strerror.
16929 * config.in, configure: Regenerated.
16930
16931 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16932
16933 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16934 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16935
16936 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16937
16938 * Makefile.in (SFILES): Update.
16939 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16940 low-sun3.c: Remove files.
16941
16942 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16943
16944 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16945 (linux_detach_one_process, linux_detach): New functions.
16946 (linux_target_ops): Add linux_detach.
16947 * server.c (main): Handle 'D' packet.
16948 * target.h (struct target_ops): Add "detach" member.
16949 (detach_inferior): Define.
16950
16951 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16952
16953 From Kelley Cook <kelleycook@wideopenwest.com>:
16954 * configure.srv: Accept i[34567]86 variants.
16955
16956 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16957
16958 * linux-low.c (linux_wait_for_event): Correct comment typos.
16959 (linux_resume_one_process): Call check_removed_breakpoint.
16960 (linux_send_signal): New function.
16961 (linux_target_ops): Add linux_send_signal.
16962 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16963 of kill.
16964 * target.h (struct target_ops): Add send_signal.
16965
16966 2003-05-29 Jim Blandy <jimb@redhat.com>
16967
16968 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16969 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16970 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16971 away part of the register's value.
16972
16973 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16974
16975 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16976 (linux_wait_for_event, linux_init_signals): Likewise.
16977
16978 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16979
16980 * configure.in: Check for stdlib.h.
16981 * configure: Regenerated.
16982 * config.in: Regenerated.
16983
16984 2003-01-04 Andreas Schwab <schwab@suse.de>
16985
16986 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16987
16988 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16989
16990 * Makefile.in: Remove obsolete code.
16991
16992 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16993
16994 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16995 defined(PT_FPR0_HI).
16996
16997 2002-11-17 Stuart Hughes <seh@zee2.com>
16998
16999 * linux-arm-low.c (arm_num_regs): Increase.
17000 (arm_regmap): Include status register.
17001
17002 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17003
17004 * linux-low.c (register_addr): Remove incorrect -1 check.
17005
17006 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17007
17008 * linux-low.c (linux_create_inferior): Call setpgid. Return
17009 the new PID.
17010 (unstopped_p, linux_signal_pid): Remove.
17011 (linux_target_ops): Remove linux_signal_pid.
17012 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17013 global instead of target method.
17014 * target.h (struct target_ops): Remove signal_pid. Update comment
17015 for create_inferior.
17016 * server.c (signal_pid): New variable.
17017 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17018 gdbserver. Set the child to be the foreground process group.
17019 (attach_inferior): Set signal_pid.
17020
17021 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17022
17023 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17024
17025 2002-08-20 Jim Blandy <jimb@redhat.com>
17026
17027 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17028 default for this.
17029
17030 2002-08-01 Andrew Cagney <cagney@redhat.com>
17031
17032 * Makefile.in: Make chill references obsolete.
17033
17034 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17035
17036 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17037 * configure: Regenerate.
17038 * config.in: Regenerate.
17039
17040 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17041
17042 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17043 (perror_with_name, remote_close, remote_open, expect, play): Static.
17044
17045 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17046
17047 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17048 byte offsets instead of an array of indexes.
17049 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17050
17051 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17052
17053 * regcache.c: Add comment.
17054
17055 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17056
17057 * thread-db.c: New file.
17058 * proc-service.c: New file.
17059 * acinclude.m4: New file.
17060 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17061 proc-service.o, and thread-db.o.
17062 (linux-low.o): Add USE_THREAD_DB.
17063 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17064 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17065 * aclocal.m4: Regenerated.
17066 * config.in: Regenerated.
17067 * configure: Regenerated.
17068 * configure.in: Check for proc_service.h, sys/procfs.h,
17069 thread_db.h, and linux/elf.h headrs.
17070 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17071 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17072 Check for -lthread_db and thread support.
17073 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17074 PowerPC, and SuperH.
17075 * i387-fp.c: Constify arguments.
17076 * i387-fp.h: Likewise.
17077 * inferiors.c: (struct thread_info): Renamed from
17078 `struct inferior_info'. Remove PID member. Use generic inferior
17079 list header. All uses updated.
17080 (inferiors, signal_pid): Removed.
17081 (all_threads): New variable.
17082 (get_thread): Define.
17083 (add_inferior_to_list): New function.
17084 (for_each_inferior): New function.
17085 (change_inferior_id): New function.
17086 (add_inferior): Removed.
17087 (remove_inferior): New function.
17088 (add_thread): New function.
17089 (free_one_thread): New function.
17090 (remove_thread): New function.
17091 (clear_inferiors): Use for_each_inferior and free_one_thread.
17092 (find_inferior): New function.
17093 (find_inferior_id): New function.
17094 (inferior_target_data): Update argument type.
17095 (set_inferior_target_data): Likewise.
17096 (inferior_regcache_data): Likewise.
17097 (set_inferior_regcache_data): Likewise.
17098 * linux-low.c (linux_bp_reinsert): Remove.
17099 (all_processes, stopping_threads, using_thrads)
17100 (struct pending_signals, debug_threads, pid_of): New.
17101 (inferior_pid): Replace with macro.
17102 (struct inferior_linux_data): Remove.
17103 (get_stop_pc, add_process): New functions.
17104 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17105 Use add_process and add_thread.
17106 (linux_attach_lwp): New function, based on old linux_attach. Use
17107 add_process and add_thread. Set stop_expected for new threads.
17108 (linux_attach): New function.
17109 (linux_kill_one_process): New function.
17110 (linux_kill): Kill all LWPs.
17111 (linux_thread_alive): Use find_inferior_id.
17112 (check_removed_breakpoints, status_pending_p): New functions.
17113 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17114 Update. Use WNOHANG. Wait for cloned processes also. Update process
17115 struct for the found process.
17116 (linux_wait_for_event): New function.
17117 (linux_wait): Use it. Support LWPs.
17118 (send_sigstop, wait_for_sigstop, stop_all_processes)
17119 (linux_resume_one_process, linux_continue_one_process): New functions.
17120 (linux_resume): Support LWPs.
17121 (REGISTER_RAW_SIZE): Remove.
17122 (fetch_register): Use register_size instead. Call supply_register.
17123 (usr_store_inferior_registers): Likewise. Call collect_register.
17124 Fix recursive case.
17125 (regsets_fetch_inferior_registers): Improve error message.
17126 (regsets_store_inferior_registers): Add debugging.
17127 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17128 (unstopped_p, linux_signal_pid): New functions.
17129 (linux_target_ops): Add linux_signal_pid.
17130 (linux_init_signals): New function.
17131 (initialize_low): Call it. Initialize using_threads.
17132 * regcache.c (inferior_regcache_data): Add valid
17133 flag.
17134 (get_regcache): Fetch registers lazily. Add fetch argument
17135 and update all callers.
17136 (regcache_invalidate_one, regcache_invalidate): New
17137 functions.
17138 (new_register_cache): Renamed from create_register_cache.
17139 Return the new regcache.
17140 (free_register_cache): Change argument to a void *.
17141 (registers_to_string, registers_from_string): Call get_regcache
17142 with fetch flag set.
17143 (register_data): Make static. Pass fetch flag to get_regcache.
17144 (supply_register): Call get_regcache with fetch flag clear.
17145 (collect_register): Call get_regcache with fetch flag set.
17146 (collect_register_as_string): New function.
17147 * regcache.h: Update.
17148 * remote-utils.c (putpkt): Flush after debug output and use
17149 stderr.
17150 Handle input interrupts while waiting for an ACK.
17151 (input_interrupt): Use signal_pid method.
17152 (getpkt): Flush after debug output and use stderr.
17153 (outreg): Use collect_register_as_string.
17154 (new_thread_notify, dead_thread_notify): New functions.
17155 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17156 and general_thread.
17157 (look_up_one_symbol): Flush after debug output.
17158 * server.c (step_thread, server_waiting): New variables.
17159 (start_inferior): Don't use signal_pid. Update call to mywait.
17160 (attach_inferior): Update call to mywait.
17161 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17162 (main): Don't fetch/store registers explicitly. Use
17163 set_desired_inferior. Support proposed ``Hs'' packet. Update
17164 calls to mywait.
17165 * server.h: Update.
17166 (struct inferior_list, struct_inferior_list_entry): New.
17167 * target.c (set_desired_inferior): New.
17168 (write_inferior_memory): Constify.
17169 (mywait): New function.
17170 * target.h: Update.
17171 (struct target_ops): New signal_pid method.
17172 (mywait): Removed macro, added prototype.
17173
17174 * linux-low.h (regset_func): Removed.
17175 (regset_fill_func, regset_store_func): New.
17176 (enum regset_type): New.
17177 (struct regset_info): Add type field. Use new operation types.
17178 (struct linux_target_ops): stop_pc renamed to get_pc.
17179 Add decr_pc_after_break and breakpoint_at.
17180 (get_process, get_thread_proess, get_process_thread)
17181 (strut process_info, all_processes, linux_attach_lwp)
17182 (thread_db_init): New.
17183
17184 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17185 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17186 (the_low_target): Add new members.
17187 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17188 (i386_store_fpxregset): Constify.
17189 (target_regsets): Add new kind identifier.
17190 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17191 (i386_set_pc): Add debugging.
17192 (i386_breakpoint_at): New function.
17193 (the_low_target): Add new members.
17194 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17195 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17196 (mips_breakpoint_at): New.
17197 (the_low_target): Add new members.
17198 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17199 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17200 (the_low_target): Add new members.
17201 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17202 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17203 (the_low_target): Add new members.
17204 * linux-x86-64-low.c (target_regsets): Add new kind
17205 identifier.
17206
17207 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17208
17209 From Martin Pool <mbp@samba.org>:
17210 * server.c (gdbserver_usage): New function.
17211 (main): Call it.
17212
17213 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17214
17215 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17216 stop_at -> stop_pc.
17217
17218 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17219
17220 * Makefile.in: Remove obsolete code.
17221
17222 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17223
17224 * linux-low.c (regsets_fetch_inferior_registers),
17225 (regsets_store_inferior_registers): Removed cast to int from
17226 ptrace() calls.
17227 * regcache.h: Added declaration of struct inferior_info.
17228
17229 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17230
17231 * inferiors.c (struct inferior_info): Add regcache_data.
17232 (add_inferior): Call create_register_cache.
17233 (clear_inferiors): Call free_register_cache.
17234 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17235 * regcache.c (struct inferior_regcache_data): New.
17236 (registers): Remove.
17237 (get_regcache): New function.
17238 (create_register_cache, free_register_cache): New functions.
17239 (set_register_cache): Don't initialize the register cache here.
17240 (registers_to_string, registers_from_string, register_data): Call
17241 get_regcache.
17242 * regcache.h: Add prototypes.
17243 * server.h: Likewise.
17244
17245 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17246
17247 * mem-break.c: New file.
17248 * mem-break.h: New file.
17249 * Makefile.in: Add mem-break.o rule; update server.h
17250 dependencies.
17251 * inferiors.c (struct inferior_info): Add target_data
17252 member.
17253 (clear_inferiors): Free target_data member if set.
17254 (inferior_target_data, set_inferior_target_data): New functions.
17255 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17256 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17257 * linux-low.c (linux_bp_reinsert): New variable.
17258 (struct inferior_linux_data): New.
17259 (linux_create_inferior): Use set_inferior_target_data.
17260 (linux_attach): Likewise. Call add_inferior.
17261 (linux_wait_for_one_inferior): New function.
17262 (linux_wait): Call it.
17263 (linux_write_memory): Add const.
17264 (initialize_low): Call set_breakpoint_data.
17265 * linux-low.h (struct linux_target_ops): Add breakpoint
17266 handling members.
17267 * server.c (attach_inferior): Remove extra add_inferior
17268 call.
17269 * server.h: Include mem-break.h. Update inferior.c
17270 prototypes.
17271 * target.c (read_inferior_memory)
17272 (write_inferior_memory): New functions.
17273 * target.h (read_inferior_memory)
17274 (write_inferior_memory): Change macros to prototypes.
17275 (struct target_ops): Update comments. Add const to write_memory
17276 definition.
17277
17278 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17279
17280 * linux-low.c (usr_store_inferior_registers): Support
17281 registers which are allowed to fail to store.
17282 * linux-low.h (linux_target_ops): Likewise.
17283 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17284 (ppc_cannot_store_register): FPSCR may not be storable.
17285
17286 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17287
17288 * server.h: Include <string.h> if HAVE_STRING_H.
17289 * ChangeLog: Correct paths in last ChangeLog entry.
17290
17291 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17292
17293 * linux-low.h: Remove obsolete prototypes.
17294 (struct linux_target_ops): New.
17295 (extern the_low_target): New.
17296 * linux-low.c (num_regs, regmap): Remove declarations.
17297 (register_addr): Use the_low_target explicitly.
17298 (fetch_register): Likewise.
17299 (usr_fetch_inferior_registers): Likewise.
17300 (usr_store_inferior_registers): Likewise.
17301 * linux-arm-low.c (num_regs): Remove.
17302 (arm_num_regs): Define.
17303 (arm_regmap): Renamed from regmap, made static.
17304 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17305 made static.
17306 (arm_cannot_store_register): Renamed from cannot_store_register,
17307 made static.
17308 (the_low_target): New.
17309 * linux-i386-low.c (num_regs): Remove.
17310 (i386_num_regs): Define.
17311 (i386_regmap): Renamed from regmap, made static.
17312 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17313 made static.
17314 (i386_cannot_store_register): Renamed from cannot_store_register,
17315 made static.
17316 (the_low_target): New.
17317 * linux-ia64-low.c (num_regs): Remove.
17318 (ia64_num_regs): Define.
17319 (ia64_regmap): Renamed from regmap, made static.
17320 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17321 made static.
17322 (ia64_cannot_store_register): Renamed from cannot_store_register,
17323 made static.
17324 (the_low_target): New.
17325 * linux-m68k-low.c (num_regs): Remove.
17326 (m68k_num_regs): Define.
17327 (m68k_regmap): Renamed from regmap, made static.
17328 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17329 made static.
17330 (m68k_cannot_store_register): Renamed from cannot_store_register,
17331 made static.
17332 (the_low_target): New.
17333 * linux-mips-low.c (num_regs): Remove.
17334 (mips_num_regs): Define.
17335 (mips_regmap): Renamed from regmap, made static.
17336 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17337 made static.
17338 (mips_cannot_store_register): Renamed from cannot_store_register,
17339 made static.
17340 (the_low_target): New.
17341 * linux-ppc-low.c (num_regs): Remove.
17342 (ppc_num_regs): Define.
17343 (ppc_regmap): Renamed from regmap, made static.
17344 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17345 made static.
17346 (ppc_cannot_store_register): Renamed from cannot_store_register,
17347 made static.
17348 (the_low_target): New.
17349 * linux-s390-low.c (num_regs): Remove.
17350 (s390_num_regs): Define.
17351 (s390_regmap): Renamed from regmap, made static.
17352 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17353 made static.
17354 (s390_cannot_store_register): Renamed from cannot_store_register,
17355 made static.
17356 (the_low_target): New.
17357 * linux-sh-low.c (num_regs): Remove.
17358 (sh_num_regs): Define.
17359 (sh_regmap): Renamed from regmap, made static.
17360 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17361 made static.
17362 (sh_cannot_store_register): Renamed from cannot_store_register,
17363 made static.
17364 (the_low_target): New.
17365 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17366 (the_low_target): New.
17367
17368 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17369
17370 * Makefile.in: Add stamp-h target.
17371 * configure.in: Create stamp-h.
17372 * configure: Regenerated.
17373
17374 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17375
17376 * inferiors.c: New file.
17377 * target.c: New file.
17378 * target.h: New file.
17379 * Makefile.in: Add target.o and inferiors.o. Update
17380 dependencies.
17381 * linux-low.c (inferior_pid): New static variable,
17382 moved from server.c.
17383 (linux_create_inferior): Renamed from create_inferior.
17384 Call add_inferior. Return 0 on success instead of a PID.
17385 (linux_attach): Renamed from myattach.
17386 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17387 (linux_thread_alive): Renamed from mythread_alive.
17388 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17389 child dies.
17390 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17391 (regsets_store_inferior_registers): Correct error message.
17392 Add missing ``return 0''.
17393 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17394 (linux_store_registers): Renamed from store_inferior_registers.
17395 (linux_read_memory): Renamed from read_inferior_memory.
17396 (linux_write_memory): Renamed from write_inferior_memory.
17397 (linux_target_ops): New structure.
17398 (initialize_low): Call set_target_ops ().
17399 * remote-utils.c (unhexify): New function.
17400 (hexify): New function.
17401 (input_interrupt): Send signals to ``signal_pid''.
17402 * server.c (inferior_pid): Remove.
17403 (start_inferior): Update create_inferior call.
17404 (attach_inferior): Call add_inferior.
17405 (handle_query): New function.
17406 (main): Call handle_query for `q' packets.
17407 * server.h: Include "target.h". Remove obsolete prototypes.
17408 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17409
17410 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17411
17412 * Makefile.in: Add WARN_CFLAGS. Update configury
17413 dependencies.
17414 * configure.in: Check for <string.h>
17415 * configure: Regenerate.
17416 * config.in: Regenerate.
17417 * gdbreplay.c: Include needed system headers.
17418 (remote_open): Remove strchr prototype.
17419 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17420 * regcache.c (supply_register): Change buf argument to const void *.
17421 (supply_register_by_name): Likewise.
17422 (collect_register): Change buf argument to void *.
17423 (collect_register_by_name): Likewise.
17424 * regcache.h: Add missing prototypes.
17425 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17426 * server.c (handle_query): New function.
17427 (attached): New static variable, moved out of main.
17428 (main): Quiet longjmp clobber warnings.
17429 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17430 * utils.c (error): Remove NORETURN.
17431 (fatal): Likewise.
This page took 0.456432 seconds and 4 git commands to generate.