Move gnulib to top level
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-06-14 Tom Tromey <tom@tromey.com>
2
3 * configure.ac: Use new path to gnulib.
4 * configure: Rebuild.
5 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
6 to gnulib.
7
8 2019-06-11 Tom Tromey <tom@tromey.com>
9
10 * Makefile.in (SFILES): Add alloc.c.
11 (OBS): Add alloc.o.
12 (IPA_OBJS): Add alloc-ipa.o.
13 (alloc-ipa.o): New target.
14 (%.o: ../%.c): New pattern rule.
15
16 2019-06-10 Tom Tromey <tromey@adacore.com>
17
18 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
19 end warning with a newline.
20 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
21 newline.
22 * thread-db.c (attach_thread): Don't end warning with a newline.
23 (thread_db_notice_clone): Likewise.
24 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
25 newline.
26 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
27 end warning with a newline.
28
29 2019-06-04 Pedro Alves <palves@redhat.com>
30
31 * server.c (captured_main): Use make_unique_xstrdup.
32
33 2019-06-02 Tom Tromey <tom@tromey.com>
34
35 * gdbreplay.c (fromhex): Remove.
36 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
37
38 2019-05-29 Tom Tromey <tromey@adacore.com>
39
40 * configure: Rebuild.
41
42 2019-05-06 Kevin Buettner <kevinb@redhat.com>
43
44 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
45 sign extension code on 32-bit builds.
46
47 2019-05-03 Eli Zaretskii <eliz@gnu.org>
48
49 * remote-utils.c:
50 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
51
52 2019-04-19 Tom Tromey <tom@tromey.com>
53
54 * server.c (struct vstop_notif): Derive from notif_event.
55 <base>: Remove.
56 (queue_stop_reply): Update.
57 (remove_all_on_match_ptid): Change type. Rewrite.
58 (discard_queued_stop_replies): Rewrite.
59 (in_queued_stop_replies_ptid): Change type.
60 (in_queued_stop_replies): Rewrite.
61 (notif_stop): Update.
62 (queue_stop_reply_callback): Update.
63 (captured_main): Don't call initialize_notif.
64 (push_stop_notification): Update.
65 * notif.c (notif_write_event, handle_notif_ack)
66 (notif_event_enque, notif_push): Update.
67 (notif_event_xfree, initialize_notif): Remove.
68 * notif.h (struct notif_event): Include <list>, not
69 "common/queue.h".
70 (struct notif_server) <queue>: Now a std::list.
71 (notif_event_p): Remove typedef.
72 (initialize_notif): Don't declare.
73 (struct notif_event): Add virtual destructor.
74
75 2019-04-17 Alan Hayward <alan.hayward@arm.com>
76
77 * ax.c (ax_vdebug): Call debug_printf.
78 * debug.c (debug_write): New function.
79 * debug.h (debug_write): New declaration.
80 * linux-low.c (sigchld_handler): Call debug_write.
81
82 2019-04-17 Alan Hayward <alan.hayward@arm.com>
83
84 * debug.c (debug_set_output): New function.
85 (debug_vprintf): Send output to debug_file.
86 (debug_flush): Likewise.
87 * debug.h (debug_set_output): New declaration.
88 * server.c (handle_monitor_command): Add debug-file option.
89 (captured_main): Likewise.
90
91 2019-04-17 Alan Hayward <alan.hayward@arm.com>
92
93 * debug.c (remote_debug): Add definition.
94 * debug.h (remote_debug): Add declaration.
95 * hostio.c (remote_debug): Remove declaration.
96 * remote-utils.c (struct ui_file): Likewise.
97 (remote_debug): Likewise.
98 * remote-utils.h (remote_debug): Likewise,
99 * server.c (remote_debug): Remove definition.
100
101 2019-04-10 Kevin Buettner <kevinb@redhat.com>
102
103 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
104 when using a 64-bit gdbserver.
105
106 2019-04-09 Tom Tromey <tromey@adacore.com>
107
108 * linux-low.c (select_event_lwp): Use find_thread_in_random.
109
110 2019-04-08 Tom Tromey <tom@tromey.com>
111
112 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
113 throw.
114 (linux_resume_one_lwp): Likewise.
115
116 2019-04-08 Tom Tromey <tom@tromey.com>
117
118 * gdbreplay.c: Update.
119 * linux-low.c: Update.
120 * server.c: Update.
121
122 2019-04-08 Tom Tromey <tom@tromey.com>
123
124 * server.c: Use C++ exception handling.
125 * linux-low.c: Use C++ exception handling.
126 * gdbreplay.c: Use C++ exception handling.
127
128 2019-04-08 Tom Tromey <tom@tromey.com>
129
130 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
131 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
132 (captured_main, main): Update.
133 * gdbreplay.c (main): Update.
134
135 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
136
137 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
138 value in argument pointer, return 1 if the entry is found and 0
139 otherwise. Move comment.
140 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
141 * linux-low.h (linux_get_auxv): Declare.
142 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
143
144 2019-04-05 Tom Tromey <tromey@adacore.com>
145
146 * server.c (gdbserver_usage): Use upper-case for metasyntactic
147 variables.
148
149 2019-03-28 Alan Hayward <alan.hayward@arm.com>
150
151 * linux-low.c (AT_HWCAP2): Add define if not already included.
152
153 2019-03-26 Alan Hayward <alan.hayward@arm.com>
154
155 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
156 (aarch64_arch_setup): Call linux_get_hwcap.
157 * linux-arm-low.c (arm_get_hwcap): Remove function.
158 (arm_read_description): Call linux_get_hwcap.
159 * linux-low.c (linux_get_auxv): New function.
160 (linux_get_hwcap): Likewise.
161 (linux_get_hwcap2): Likewise.
162 * linux-low.h (linux_get_hwcap): New declaration.
163 (linux_get_hwcap2): Likewise.
164 * linux-ppc-low.c (ppc_get_auxv): Remove function.
165 (ppc_arch_setup): Call linux_get_hwcap.
166 * linux-s390-low.c (s390_get_hwcap): Remove function.
167 (s390_arch_setup): Call linux_get_hwcap.
168
169 2019-03-22 Alan Hayward <alan.hayward@arm.com>
170 Jiong Wang <jiong.wang@arm.com>
171
172 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
173 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
174 to fail.
175 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
176
177 2019-03-22 Alan Hayward <alan.hayward@arm.com>
178 Jiong Wang <jiong.wang@arm.com>
179
180 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
181 (aarch64_get_hwcap): New function.
182 (aarch64_arch_setup): Read APIA hwcap.
183
184 2019-03-22 Alan Hayward <alan.hayward@arm.com>
185 Jiong Wang <jiong.wang@arm.com>
186
187 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
188 (initialize_low_tracepoint): Likewise.
189 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
190 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
191 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
192 (aarch64_linux_read_description): Likewise.
193 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
194
195 2019-03-12 John Baldwin <jhb@FreeBSD.org>
196
197 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
198 i386_create_target_description for 'segments' parameter.
199 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
200 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
201 * win32-i386-low.c (i386_arch_setup): Likewise.
202
203 2019-03-12 Tom Tromey <tromey@adacore.com>
204
205 * linux-low.c (iterate_over_lwps): Update.
206
207 2019-03-06 Tom Tromey <tom@tromey.com>
208
209 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
210 (captured_main): Use SCOPE_EXIT.
211
212 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
213
214 * configure.srv: Use '$enable_unittest' instead of '$development'
215 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
216 case.
217
218 2019-02-27 Tom Tromey <tromey@adacore.com>
219
220 * gdbreplay.c (logchar): Handle \r\n.
221
222 2019-02-07 Alan Hayward <alan.hayward@arm.com>
223
224 * linux-low.c (linux_attach): Add process before lwp.
225 * server.c (attach_inferior): Check if already attached.
226
227 2019-02-07 Tom Tromey <tom@tromey.com>
228
229 * x86-tdesc.h: Rename include guard.
230 * x86-low.h: Add include guard.
231 * wincecompat.h: Rename include guard.
232 * win32-low.h: Add include guard.
233 * utils.h: Rename include guard.
234 * tracepoint.h: Rename include guard.
235 * tdesc.h: Rename include guard.
236 * target.h: Rename include guard.
237 * server.h: Rename include guard.
238 * remote-utils.h: Rename include guard.
239 * regcache.h: Rename include guard.
240 * nto-low.h: Rename include guard.
241 * notif.h: Add include guard.
242 * mem-break.h: Rename include guard.
243 * lynx-low.h: Add include guard.
244 * linux-x86-tdesc.h: Add include guard.
245 * linux-s390-tdesc.h: Add include guard.
246 * linux-ppc-tdesc-init.h: Add include guard.
247 * linux-low.h: Add include guard.
248 * linux-aarch64-tdesc.h: Add include guard.
249 * linux-aarch32-low.h: Add include guard.
250 * inferiors.h: Rename include guard.
251 * i387-fp.h: Rename include guard.
252 * hostio.h: Rename include guard.
253 * gdbthread.h: Rename include guard.
254 * gdb_proc_service.h: Rename include guard.
255 * event-loop.h: Rename include guard.
256 * dll.h: Rename include guard.
257 * debug.h: Rename include guard.
258 * ax.h: Rename include guard.
259
260 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
261
262 PR gdb/23985
263 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
264 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
265
266 2019-01-25 Tom Tromey <tom@tromey.com>
267
268 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
269
270 2019-01-25 Tom Tromey <tom@tromey.com>
271
272 * win32-low.c: Fix common/ includes.
273 * win32-i386-low.c: Fix common/ includes.
274 * tracepoint.c: Fix common/ includes.
275 * thread-db.c: Fix common/ includes.
276 * target.h: Fix common/ includes.
277 * symbol.c: Fix common/ includes.
278 * spu-low.c: Fix common/ includes.
279 * server.h: Fix common/ includes.
280 * server.c: Fix common/ includes.
281 * remote-utils.c: Fix common/ includes.
282 * regcache.h: Fix common/ includes.
283 * regcache.c: Fix common/ includes.
284 * nto-x86-low.c: Fix common/ includes.
285 * notif.h: Fix common/ includes.
286 * mem-break.h: Fix common/ includes.
287 * lynx-low.c: Fix common/ includes.
288 * lynx-i386-low.c: Fix common/ includes.
289 * linux-x86-tdesc-selftest.c: Fix common/ includes.
290 * linux-x86-low.c: Fix common/ includes.
291 * linux-low.c: Fix common/ includes.
292 * inferiors.h: Fix common/ includes.
293 * i387-fp.c: Fix common/ includes.
294 * hostio.c: Fix common/ includes.
295 * hostio-errno.c: Fix common/ includes.
296 * gdbthread.h: Fix common/ includes.
297 * gdbreplay.c: Fix common/ includes.
298 * fork-child.c: Fix common/ includes.
299 * event-loop.c: Fix common/ includes.
300 * ax.c:
301 (enum gdb_agent_op): Fix common/ includes.
302
303 2019-01-21 Tom Tromey <tom@tromey.com>
304
305 * tracepoint.c: Fix includes.
306 * remote-utils.c: Fix includes.
307 * linux-x86-low.c: Fix includes.
308
309 2019-01-01 Joel Brobecker <brobecker@adacore.com>
310
311 * gdbreplay.c (gdbreplay_version): Update copyright year in
312 version message.
313 * server.c (gdbserver_version): Likewise.
314
315 2018-12-05 Alan Hayward <alan.hayward@arm.com>
316
317 * linux-low.c (add_lwp): Switch ordering.
318
319 2018-11-29 Tom Tromey <tom@tromey.com>
320
321 * win32-low.c (win32_join): Take pid, not process.
322 * target.h (struct target_ops) <join>: Change argument type.
323 (join_inferior): Change argument name.
324 * spu-low.c (spu_join): Take pid, not process.
325 * server.c (handle_detach): Preserve pid before destroying
326 process.
327 * lynx-low.c (lynx_join): Take pid, not process.
328 * linux-low.c (linux_join): Take pid, not process.
329
330 2018-11-23 Alan Hayward <alan.hayward@arm.com>
331
332 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
333 (aarch64_cannot_fetch_register): Likewise.
334 (struct linux_target_ops): Update references.
335
336 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
337
338 * linux-ppc-low.c: Include nat/linux-ptrace.h.
339
340 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
341
342 * configure.srv (ipa_ppc_linux_regobj): Add
343 powerpc-isa207-htm-vsx32l-ipa.o and
344 powerpc-isa207-htm-vsx64l-ipa.o.
345 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
346 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
347 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
348 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
349 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
350 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
351 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
352 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
353 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
354 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
355 (init_registers_powerpc_isa207_htm_vsx32l)
356 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
357 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
358 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
359 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
360 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
361 (ppc_store_tm_ctarregset): New functions.
362 (ppc_regsets): Add entries for HTM regsets.
363 (ppc_arch_setup): Set htm in features struct when needed. Set
364 sizes for the HTM regsets.
365 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
366 (initialize_low_arch): Call
367 init_registers_powerpc_isa207_htm_vsx32l and
368 init_registers_powerpc_isa207_htm_vsx64l.
369 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
370 PPC_TDESC_ISA207_HTM_VSX.
371 (initialize_low_tracepoint): Call
372 init_registers_powerpc_isa207_htm_vsx32l and
373 init_registers_powerpc_isa207_htm_vsx64l.
374
375 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
376
377 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
378 rs6000/power-linux-pmu.xml to srv_xmlfiles.
379 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
380 (ppc_store_pmuregset): New functions.
381 (ppc_regsets): Add entries for ebb and pmu regsets.
382 (ppc_arch_setup): Set isa207 in features struct if the ebb and
383 pmu regsets are available. Set sizes for these regsets.
384
385 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
386
387 * configure.srv (ipa_ppc_linux_regobj): Add
388 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
389 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
390 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
391 rs6000/powerpc-isa207-vsx32l.xml, and
392 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
393 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
394 <PPC_TDESC_ISA207_VSX>: New enum value.
395 (init_registers_powerpc_isa207_vsx32l): Declare.
396 (init_registers_powerpc_isa207_vsx64l): Declare.
397 * linux-ppc-low.c (ppc_fill_tarregset): New function.
398 (ppc_store_tarregset): New function.
399 (ppc_regsets): Add entry for the TAR regset.
400 (ppc_arch_setup): Set isa207 in features struct when needed. Set
401 size for the TAR regsets.
402 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
403 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
404 and init_registers_powerpc_isa207_vsx64l.
405 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
406 (initialize_low_tracepoint): Call
407 init_registers_powerpc_isa207_vsx32l and
408 init_registers_powerpc_isa207_vsx64l.
409
410 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
411 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
412
413 * configure.srv (ipa_ppc_linux_regobj): Add
414 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
415 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
416 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
417 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
418 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
419 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
420 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
421 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
422 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
423 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
424 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
425 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
426 (ppc_hwcap): Add comment.
427 (ppc_hwcap2): New global.
428 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
429 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
430 (ppc_regsets): Add entries for the DSCR and PPR regsets.
431 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
432 when needed. Set sizes for the the DSCR and PPR regsets.
433 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
434 (initialize_low_arch): Call
435 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
436 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
437 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
438 PPC_TDESC_ISA205_PPR_DSCR_VSX.
439 (initialize_low_tracepoint): Call
440 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
441 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
442
443 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
444
445 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
446
447 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
448 Simon Marchi <simark@simark.ca>
449
450 * acinclude.m4: Include "../selftest.m4".
451 * configure: Regenerate.
452 * configure.ac: Use "GDB_AC_SELFTEST".
453 * configure.srv: Use "$enable_unittests" instead of
454 "$development" when checking whether unit tests have been
455 enabled.
456 * server.c (captured_main): Update message informing that
457 selftests have been disabled.
458
459 2018-10-04 Tom Tromey <tom@tromey.com>
460
461 * configure: Rebuild.
462
463 2018-10-04 Tom Tromey <tom@tromey.com>
464
465 * server.c (handle_status): Rename inner "thread".
466 (process_serial_event): Declare "res" in 'm' case.
467 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
468 (iterate_over_lwps): Rename inner "thread".
469 (linux_qxfer_libraries_svr4): Rename inner "len".
470 * gdbthread.h (find_thread_in_random): Rename inner "thread".
471
472 2018-10-01 Gary Benson <gbenson@redhat.com>
473
474 * gdb_proc_service.h: Moved common code to
475 common/gdb_proc_service.h.
476
477 2018-10-01 Gary Benson <gbenson@redhat.com>
478
479 * gdb_proc_service.h: Synchronize comments and whitespace with
480 GDB's version of this file.
481
482 2018-09-25 Tom Tromey <tom@tromey.com>
483
484 * configure: Rebuild.
485 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
486
487 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
488
489 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
490 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
491 ($(IPA_LIB)): Sort IPA_OBJS.
492
493 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
494
495 * Makefile.in: Remove references to $(ADD_DEPS).
496
497 2018-09-16 Tom Tromey <tom@tromey.com>
498
499 * remote-utils.c (remote_open): Use GNU style for metasyntactic
500 variables.
501 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
502 variables.
503
504 2018-09-05 Tom Tromey <tom@tromey.com>
505
506 * configure: Rebuild.
507
508 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
509
510 PR build/23399
511 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
512
513 2018-08-27 Tom Tromey <tom@tromey.com>
514
515 PR build/23087:
516 * configure: Rebuild.
517
518 2018-08-27 Tom Tromey <tom@tromey.com>
519
520 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
521 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
522 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
523 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
524 (s390x_emit_stack_adjust): Add casts to unsigned char.
525
526 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
527
528 PR gdb/23374
529 PR gdb/23375
530 * server.h (struct client_state) <disable_randomization>:
531 Initialize to 1.
532
533 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
534
535 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
536 variable.
537 (mips_supply_ptrace_register): Likewise.
538
539 2018-07-22 Tom Tromey <tom@tromey.com>
540
541 * configure: Rebuild.
542
543 2018-07-22 Tom Tromey <tom@tromey.com>
544
545 * win32-low.c (win32_create_inferior): Remove unused variables.
546 * gdbreplay.c (remote_open): Remove unused variable.
547 * remote-utils.c (remote_prepare): Remove unused variable.
548 * x86-tdesc.h (X86_TDESC_H): Define.
549 (amd64_expedite_regs): Define conditionally.
550 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
551 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
552 * remote-utils.c (readchar): Remove unused variable.
553
554 2018-07-13 Pedro Alves <palves@redhat.com>
555
556 * linux-low.c (linux_kill): Change parameter to process_info
557 pointer instead of pid. Adjust.
558 * lynx-low.c (lynx_kill): Likewise.
559 * nto-low.c (nto_kill): Likewise.
560 * spu-low.c (spu_kill): Likewise.
561 * win32-low.c (win32_kill): Likewise.
562 * server.c (handle_v_kill, kill_inferior_callback)
563 (detach_or_kill_for_exit): Adjust.
564 * target.c (kill_inferior): Change parameter to process_info
565 pointer instead of pid. Adjust.
566 * target.h (struct target_ops) <kill>: Change parameter to
567 process_info pointer instead of pid. Adjust all implementations
568 and callers.
569 (kill_inferior): Likewise.
570
571 2018-07-13 Pedro Alves <palves@redhat.com>
572
573 * linux-low.c (linux_detach, linux_join): Change parameter to
574 process_info pointer instead of pid. Adjust.
575 * lynx-low.c (lynx_detach, lynx_join): Likewise.
576 * nto-low.c (nto_detach): Likewise.
577 * spu-low.c (spu_detach, spu_join): Likewise.
578 * win32-low.c (win32_detach, win32_join): Likewise.
579 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
580 * target.h (struct target_ops) <detach, join>: Change parameter to
581 process_info pointer instead of pid. Adjust all implementations
582 and callers.
583 (detach_inferior, join_inferior): Rename 'pid' parameter to
584 'proc'.
585
586 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
587 Jan Kratochvil <jan.kratochvil@redhat.com>
588 Paul Fertser <fercerpav@gmail.com>
589 Tsutomu Seki <sekiriki@gmail.com>
590
591 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
592 (OBS): Add 'common/netstuff.o'.
593 (GDBREPLAY_OBS): Likewise.
594 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
595 (remote_open): Implement support for IPv6
596 connections.
597 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
598 and 'wspiapi.h'.
599 (handle_accept_event): Accept connections from IPv6 sources.
600 (remote_prepare): Handle IPv6-style hostnames; implement
601 support for IPv6 connections.
602 (remote_open): Implement support for printing connections from
603 IPv6 sources.
604
605 2018-07-11 Pedro Alves <palves@redhat.com>
606
607 PR gdb/23377
608 * mem-break.c (any_persistent_commands): Add process_info
609 parameter and use it instead of relying on the current process.
610 Change return type to bool.
611 * mem-break.h (any_persistent_commands): Add process_info
612 parameter and change return type to bool.
613 * server.c (handle_detach): Remove require_running_or_return call.
614 Look up the process_info for the process we're about to detach.
615 If not found, return back error to GDB. Adjust
616 any_persistent_commands call to pass down a process pointer.
617
618 2018-07-11 Pedro Alves <palves@redhat.com>
619
620 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
621 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
622 instead of collect_register_by_name.
623 * regcache.c (regcache_raw_get_unsigned_by_name): New.
624 * regcache.h (regcache_raw_get_unsigned_by_name): New.
625
626 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
627 Pedro Alves <palves@redhat.com>
628
629 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
630
631 2018-07-03 Tom Tromey <tom@tromey.com>
632
633 * linux-low.c: Update.
634 * lynx-low.c: Update.
635 * mem-break.c: Update.
636 * nto-low.c: Update.
637 * remote-utils.c: Update.
638 * server.c: Update.
639 * spu-low.c: Update.
640 * target.c: Update.
641 * win32-low.c: Update.
642
643 2018-07-03 Tom Tromey <tom@tromey.com>
644
645 * server.c: Update.
646
647 2018-07-03 Tom Tromey <tom@tromey.com>
648
649 * linux-low.c: Update.
650
651 2018-07-03 Tom Tromey <tom@tromey.com>
652
653 * target.c: Update.
654
655 2018-07-03 Tom Tromey <tom@tromey.com>
656
657 * linux-low.c: Update.
658 * linux-mips-low.c: Update.
659 * lynx-low.c: Update.
660 * nto-low.c: Update.
661 * remote-utils.c: Update.
662 * server.c: Update.
663 * spu-low.c: Update.
664 * target.c: Update.
665 * thread-db.c: Update.
666
667 2018-07-03 Tom Tromey <tom@tromey.com>
668
669 * linux-low.c: Update.
670 * linux-mips-low.c: Update.
671 * lynx-low.c: Update.
672 * mem-break.c: Update.
673 * nto-low.c: Update.
674 * remote-utils.c: Update.
675 * server.c: Update.
676 * spu-low.c: Update.
677 * target.c: Update.
678 * tracepoint.c: Update.
679
680 2018-07-03 Tom Tromey <tom@tromey.com>
681
682 * linux-low.c: Update.
683 * linux-ppc-low.c: Update.
684 * linux-x86-low.c: Update.
685 * proc-service.c: Update.
686 * server.c: Update.
687 * spu-low.c: Update.
688 * thread-db.c: Update.
689 * win32-low.c: Update.
690
691 2018-07-03 Tom Tromey <tom@tromey.com>
692
693 * linux-low.c: Update.
694 * lynx-low.c: Update.
695 * nto-low.c: Update.
696 * remote-utils.c: Update.
697 * spu-low.c: Update.
698 * thread-db.c: Update.
699 * win32-low.c: Update.
700
701 2018-06-29 Joel Brobecker <brobecker@adacore.com>
702
703 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
704 parameter in call to 'amd64_create_target_description'.
705
706 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
707
708 * x86-tdesc.h: Remove executable permission flag.
709
710 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
711
712 * configure.ac: Remove AC_PREREQ, add missing quoting.
713 * configure: Re-generate.
714 * config.in: Re-generate.
715 * aclocal.m4: Re-generate.
716
717 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
718
719 * tracepoint.h (current_traceframe): Remove declaration.
720
721 2018-06-18 Alan Hayward <alan.hayward@arm.com>
722
723 * linux-aarch64-low.c (is_sve_tdesc): New function.
724 (aarch64_sve_regs_copy_to_regcache): Likewise.
725 (aarch64_sve_regs_copy_from_regcache): Likewise.
726 (aarch64_regs_info): Add SVE checks.
727 (initialize_low_arch): Initialize SVE.
728
729 2018-06-18 Alan Hayward <alan.hayward@arm.com>
730
731 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
732
733 2018-06-11 Alan Hayward <alan.hayward@arm.com>
734
735 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
736 (initialize_low_tracepoint): Likewise
737 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
738 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
739 param.
740 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
741 checks.
742 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
743
744 2018-06-11 Alan Hayward <alan.hayward@arm.com>
745
746 * server.h (PBUFSIZ): Increase size
747
748 2018-06-11 Alan Hayward <alan.hayward@arm.com>
749
750 * regcache.c (regcache::raw_compare): New function.
751 * regcache.h (regcache::raw_compare): New declaration.
752
753 2018-06-11 Alan Hayward <alan.hayward@arm.com>
754
755 * regcache.c (new_register_cache): Use new.
756 (free_register_cache): Use delete.
757 (register_data): Use const.
758 (supply_register): Move body inside regcache.
759 (regcache::raw_supply): New override function.
760 (collect_register): Move body inside regcache.
761 (regcache::raw_collect): New override function.
762 (regcache::get_register_status): New override function.
763 * regcache.h (struct regcache): Inherit from reg_buffer_common.
764
765 2018-06-09 Tom Tromey <tom@tromey.com>
766
767 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
768 declare queue.
769 (event_queue): Use std::queue.
770 (gdb_event_xfree): Remove.
771 (initialize_event_loop, process_event, wait_for_event): Update.
772
773 2018-06-08 Stan Cox <scox@redhat.com>
774
775 * win32-low.c (win32_create_inferior): last_ptid and last_status
776 moved to client_state.
777
778 2018-06-08 Pedro Alves <palves@redhat.com>
779
780 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
781 common/common-exceptions.o, common/common-utils.o,
782 common/errors.o, common/print-utils.o and utils.o.
783 * gdbreplay.c: Include "common-defs.h" instead of the two
784 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
785 string.h or alloca.h.
786 (perror_with_name): Delete.
787 (remote_open): Use xstrdup instead of strdup.
788 (main): Rename to ...
789 (captured_main): ... this.
790 (main): New.
791
792 2018-06-08 Tom Tromey <tom@tromey.com>
793
794 * linux-low.c (linux_low_read_btrace): Update.
795
796 2018-06-04 Stan Cox <scox@redhat.com>
797
798 * server.h (struct client_state): New.
799 * server.c (cont_thread, general_thread, multi_process)
800 (report_fork_events, report_vfork_events, report_exec_events)
801 (report_thread_events, swbreak_feature, hwbreak_feature)
802 (vCont_supported, disable_randomization, pass_signals)
803 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
804 Moved to client_state.
805 * remote-utils.c (remote_debug, noack_mode)
806 (transport_is_reliable): Moved to client_state.
807 * tracepoint.c (current_traceframe): Moved to client_state.
808
809 Update all callers.
810 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
811 linux-low.c, remote-utils.h, target.c: Use client_state.
812
813 2018-05-31 Alan Hayward <alan.hayward@arm.com>
814
815 * configure.srv: Add new c/h file.
816
817 2018-05-31 Alan Hayward <alan.hayward@arm.com>
818
819 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
820 null VQ.
821
822 2018-05-25 Maciej W. Rozycki <macro@mips.com>
823
824 * gdb.arch/mips-fpregset-core.exp: New test.
825 * gdb.arch/mips-fpregset-core.c: New test source.
826
827 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
828
829 PR server/23198
830 * hostio.c (require_int): Do not report overflow for integers
831 between 0xfffffff and 0x7fffffff.
832
833 2018-05-22 Maciej W. Rozycki <macro@mips.com>
834
835 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
836 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
837 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
838 functions.
839 (the_low_target): Wire them.
840
841 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
842
843 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
844 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
845 mode. Call collect_register_by_name with vscr using
846 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
847 (ppc_store_vrregset): Add and set vscr_offset variable as in
848 ppc_fill_vrregset. Call supply_register_by_name with vscr using
849 vscr_offset.
850
851 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
852
853 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
854 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
855 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
856
857 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
858
859 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
860 (ppc_store_vsxregset): Likewise.
861 (ppc_fill_vrregset): Likewise.
862 (ppc_store_vrregset): Likewise.
863 (ppc_fill_evrregset): Likewise.
864 (ppc_store_evrregset): Likewise.
865 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
866 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
867 needed.
868
869 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
870
871 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
872 wordsize of the inferior. Call ppc_linux_target_wordsize.
873
874 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
875
876 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
877 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
878 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
879 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
880 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
881 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
882 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
883 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
884 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
885 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
886 (tdesc_powerpc_e500l): Remove.
887 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
888 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
889 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
890 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
891 linux-ppc-tdesc.h.
892 (ppc_arch_setup): Remove target description matching code. Fill a
893 ppc_linux_features struct and call ppc_linux_match_description
894 with it.
895
896 2018-05-22 Maciej W. Rozycki <macro@mips.com>
897
898 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
899 width of the requested register exceeds the width of the
900 `ptrace' data type.
901 (mips_cannot_store_register): Likewise.
902
903 2018-05-21 Maciej W. Rozycki <macro@mips.com>
904
905 * linux-mips-low.c (mips_fetch_register): New function. Update
906 preceding comment.
907 (mips_store_gregset): Supply 0 rather than $restart for $zero.
908 (the_low_target): Wire `mips_fetch_register'.
909
910 2018-05-10 Joel Brobecker <brobecker@adacore.com>
911
912 * lynx-i386-low.c (LYNXOS_178): New macro.
913 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
914 the layout on LynxOS-178.
915 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
916 handle floating point registers that are not supported by
917 LynxOS-178.
918
919 2018-05-10 Tom Tromey <tom@tromey.com>
920
921 * configure: Rebuild.
922
923 2018-05-10 Joel Brobecker <brobecker@adacore.com>
924
925 PR server/23158:
926 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
927 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
928 Use it to set the expedite_regs field in the given tdesc.
929 * x86-tdesc.h: New file.
930 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
931 Adjust following the addition of the new expedite_regs parameter
932 to init_target_desc.
933 * linux-tic6x-low.c (tic6x_read_description): Likewise.
934 * linux-x86-tdesc.c: #include "x86-tdesc.h".
935 (i386_linux_read_description, amd64_linux_read_description):
936 Adjust following the addition of the new expedite_regs parameter
937 to init_target_desc.
938 * lynx-i386-low.c: #include "x86-tdesc.h".
939 (lynx_i386_arch_setup): Adjust following the addition of the new
940 expedite_regs parameter to init_target_desc.
941 * nto-x86-low.c: #include "x86-tdesc.h".
942 (nto_x86_arch_setup): Adjust following the addition of the new
943 expedite_regs parameter to init_target_desc.
944 * win32-i386-low.c: #include "x86-tdesc.h".
945 (i386_arch_setup): Adjust following the addition of the new
946 expedite_regs parameter to init_target_desc.
947
948 2018-05-10 Joel Brobecker <brobecker@adacore.com>
949
950 PR server/23158:
951 * win32-low.c (win32_create_inferior): Add call to my_wait
952 setting last_status global.
953
954 2018-05-10 Joel Brobecker <brobecker@adacore.com>
955
956 PR server/23158:
957 * win32-low.c (create_process): Only call gdb_tilde_expand if
958 inferior_cwd is not NULL.
959
960 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
961
962 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
963 registers to the cache if their values have changed.
964 (i387_xsave_to_cache): Provide default values for x87 control
965 registers when these features are available, but disabled.
966 * regcache.c (supply_register_by_name_zeroed): New function.
967 * regcache.h (supply_register_by_name_zeroed): Declare new
968 function.
969
970 2018-05-07 Tom Tromey <tom@tromey.com>
971
972 * configure: Rebuild.
973
974 2018-05-04 Tom Tromey <tom@tromey.com>
975
976 * configure: Rebuild.
977
978 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
979 Pedro Alves <palves@redhat.com>
980
981 * linux-aarch64-low.c (aarch64_stopped_data_address):
982 Likewise.
983
984 2018-04-27 Tom Tromey <tom@tromey.com>
985
986 * configure: Rebuild.
987
988 2018-04-23 Tom Tromey <tom@tromey.com>
989
990 * configure: Rebuild.
991
992 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
993
994 * Makefile.in (depcomp): Add "..".
995 (all_deps_files): New and use it.
996
997 2018-04-18 Alan Hayward <alan.hayward@arm.com>
998
999 * configure.srv (aarch64*-*-linux*): Don't include xml.
1000 (i[34567]86-*-cygwin*): Likewise.
1001 (i[34567]86-*-linux*): Likewise.
1002 (i[34567]86-*-lynxos*): Likewise.
1003 (i[34567]86-*-mingw32ce*): Likewise.
1004 (i[34567]86-*-mingw*): Likewise.
1005 (i[34567]86-*-nto*): Likewise.
1006 (tic6x-*-uclinux): Likewise.
1007 (x86_64-*-linux*): Likewise.
1008 (x86_64-*-mingw*): Likewise.
1009 (x86_64-*-cygwin*): Likewise.
1010
1011 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1012
1013 * tdesc.c: Remove xml parameter.
1014
1015 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1016
1017 * server.c (get_features_xml): Remove cast.
1018 * tdesc.c (void target_desc::accept): Fill in function.
1019 (tdesc_get_features_xml): Remove old xml creation.
1020 (print_xml_feature::visit_pre): Add xml vistor.
1021 * tdesc.h (struct target_desc): Make xmltarget mutable.
1022 (tdesc_get_features_xml): Remove declaration.
1023
1024 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1025
1026 * tdesc.c (tdesc_architecture_name): Add new function.
1027 (tdesc_osabi_name): Likewise.
1028 (tdesc_get_features_xml): Use new functions.
1029
1030 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1031
1032 * tdesc.c (tdesc_create_flags): Remove.
1033 (tdesc_add_flag): Likewise.
1034 (tdesc_named_type): Likewise.
1035 (tdesc_create_union): Likewise.
1036 (tdesc_create_struct): Likewise.
1037 (tdesc_create_vector): Likewise.
1038 (tdesc_add_bitfield): Likewise.
1039 (tdesc_add_field): Likewise.
1040 (tdesc_set_struct_size): Likewise.
1041
1042 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1043
1044 * tdesc.c (~target_desc): Remove implictly deleted items.
1045 (init_target_desc): Iterate all features.
1046 (tdesc_get_features_xml): Use vector.
1047 (tdesc_create_feature): Create feature.
1048 * tdesc.h (tdesc_feature) Remove
1049 (target_desc): Add features.
1050
1051 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1052
1053 * Makefile.in: Add common/tdesc.c
1054 * tdesc.c (init_target_desc): init all reg_defs from register
1055 vector.
1056 (tdesc_create_reg): Create tdesc_reg.
1057 * tdesc.h (tdesc_feature): Add register vector.
1058
1059 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1060
1061 * tdesc.h (struct target_desc) <features>: Change type to
1062 std::vector<std::string>.
1063 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1064 changes.
1065 (tdesc_get_features_xml): Likewise.
1066 (tdesc_create_feature): Likewise.
1067
1068 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1069
1070 * regcache.c (find_register_by_number): Return a ref.
1071 (find_regno): Use references.
1072 (register_size): Likewise.
1073 (register_data): Likewise.
1074 * tdesc.c (target_desc::~target_desc): Remove free calls.
1075 (target_desc::operator==): Use std::vector compare.
1076 (init_target_desc): Use reference.
1077 (tdesc_create_reg): Use reg constructors.
1078 * tdesc.h (struct target_desc): Replace pointer with object.
1079
1080 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1081
1082 * regcache.c (find_register_by_number): Make static.
1083 (find_regno): Use find_register_by_number
1084 * regcache.h (struct reg): Remove declaration.
1085
1086 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1087
1088 * tdesc.c (target_desc::~target_desc): Move to here.
1089 (target_desc::operator==): Likewise.
1090 * tdesc.h (target_desc::~target_desc): Move from here.
1091 (target_desc::operator==): Likewise.
1092
1093 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1094
1095 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1096
1097 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1098
1099 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1100 S390_TDESC_GS.
1101 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1102 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1103 and init_registers_s390_gs_linux64.
1104
1105 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1106
1107 * linux-s390-low.c (s390_fill_gs): Remove function.
1108 (s390_fill_gsbc): Remove function.
1109 (s390_regsets): Set fill functions for the guarded storage regsets
1110 to NULL.
1111
1112 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1113
1114 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1115 the word size. Add comment.
1116 (s390_get_wordsize): New function.
1117 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1118 pswm with it. Instead, use s390_get_wordsize to determine the
1119 word size first and derive the correct tdesc from that directly.
1120
1121 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1122
1123 * Makefile.in: Include silent-rules.mk.
1124 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1125 (COMPILE): Add ECHO_CXX.
1126 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1127 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1128 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1129 (version-generated.c): Add ECHO_GEN.
1130 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1131 (IPAGENT_COMPILE): Add ECHO_CXX.
1132 (%-generated.c): Add ECHO_REGDAT.
1133
1134 2018-03-14 Tom Tromey <tom@tromey.com>
1135
1136 PR cli/14977:
1137 * ax.c (ax_printf): Special case for NULL.
1138
1139 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1140
1141 * linux-low.c (linux_qxfer_libraries_svr4): Use
1142 xml_escape_text_append.
1143
1144 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1145
1146 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1147
1148 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1149
1150 * server.c (handle_general_set): Remove unnecessary xstrdup.
1151
1152 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1153
1154 * server.c (parse_debug_format_options): Adjust to
1155 delim_string_to_char_ptr_vec changes.
1156 * thread-db.c (thread_db_load_search): Adjust to
1157 dirnames_to_char_ptr_vec changes.
1158
1159 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1160
1161 * target.h (target_enable_btrace, target_disable_btrace)
1162 (target_read_btrace, target_read_btrace_conf): Turn macro into
1163 inline function. Throw error if target method is not defined.
1164 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1165 check for btrace target method. Be prepared to handle exceptions
1166 from btrace target methods.
1167
1168 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1169
1170 * server.c (captured_main): Change order of error message printed
1171 when the current working directory cannot be found.
1172
1173 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1174
1175 * server.c: Include "filenames.h" and "pathstuff.h".
1176 (program_name): Delete variable.
1177 (program_path): New anonymous class.
1178 (get_exec_wrapper): Use "program_path" instead of
1179 "program_name".
1180 (handle_v_run): Likewise.
1181 (captured_main): Likewise.
1182 (process_serial_event): Likewise.
1183
1184 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1185
1186 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1187 (OBJS): Add "pathstuff.o".
1188 * server.c (current_directory): New global variable.
1189 (captured_main): Initialize "current_directory".
1190
1191 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1192
1193 * tdesc.c: Use common/tdesc.h.
1194 * tdesc.h: Likewise.
1195
1196 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1197 Simon Marchi <simon.marchi@ericsson.com>
1198
1199 * Makefile.in: Switch order of make rules.
1200
1201 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1202
1203 * Makefile.in: Add common directory in build.
1204 * configure.ac: Add common reference.
1205 * configure: Regenerate.
1206
1207 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1208
1209 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1210 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1211 * spu-low.c (spu_target_ops): Likewise.
1212 * win32-low.c (win32_target_ops): Likewise.
1213 * server.c (supported_btrace_packets): Report packets unconditionally.
1214 * target.h (target_ops) <supports_btrace>: Remove.
1215 (target_supports_btrace): Remove.
1216
1217 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1218
1219 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1220 (handle_btrace_disable): Change return type to void. Use exceptions
1221 to report errors.
1222 (handle_btrace_general_set): Catch exception and copy message to
1223 return message.
1224
1225 2018-02-08 Tom Tromey <tom@tromey.com>
1226
1227 * linux-low.c (install_software_single_step_breakpoints): Use
1228 make_scoped_restore.
1229 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1230 (do_restore_current_thread_cleanup): Remove.
1231 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1232 declare.
1233
1234 2018-02-08 Tom Tromey <tom@tromey.com>
1235
1236 * mem-break.c (set_raw_breakpoint_at): Use
1237 gdb::unique_xmalloc_ptr.
1238
1239 2018-01-30 Pedro Alves <palves@redhat.com>
1240
1241 PR gdb/13211
1242 * target.c (target_terminal::terminal_state): Rename to ...
1243 (target_terminal::m_terminal_state): ... this.
1244
1245 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1246
1247 * linux-low.c (handle_extended_wait): Surround call to
1248 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1249
1250 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1251
1252 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1253 linux_ptrace_attach_fail_reason_string now returning an
1254 std::string.
1255 (linux_attach): Likewise.
1256 * thread-db.c (attach_thread): Likewise.
1257
1258 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1259
1260 PR gdb/21559
1261 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1262 checking for fs_base/gs_base fields in struct user_regs_struct.
1263 * configure: Regenerate.
1264
1265 2018-01-16 Yao Qi <yao.qi@linaro.org>
1266
1267 PR gdb/18749
1268 * linux-low.c (fetch_register): Call supply_register instead of
1269 error.
1270
1271 2018-01-08 Yao Qi <yao.qi@linaro.org>
1272 Simon Marchi <simon.marchi@ericsson.com>
1273
1274 * Makefile.in (OBS): Remove selftest.o.
1275 * configure.ac: Set srv_selftest_objs if $development is true.
1276 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1277 * configure: Re-generated.
1278 * server.c (captured_main): Wrap variable selftest_filter with
1279 GDB_SELF_TEST.
1280
1281 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1282
1283 * server.c (parse_debug_format_options): Return std::string.
1284 (handle_monitor_command, captured_main): Adjust.
1285
1286 2018-01-05 Pedro Alves <palves@redhat.com>
1287
1288 PR gdb/18653
1289 * server.c (captured_main): Pass quiet=false to
1290 save_original_signals_state.
1291
1292 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1293
1294 * gdbreplay.c (gdbreplay_version): Update copyright year in
1295 version message.
1296 * server.c (gdbserver_version): Likewise.
1297
1298 2017-12-08 Tom Tromey <tom@tromey.com>
1299
1300 * ax.c (ax_printf): Update.
1301
1302 2017-12-07 Yao Qi <yao.qi@linaro.org>
1303
1304 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1305 aarch64_linux_read_description.
1306 * linux-amd64-ipa.c (idx2mask): New array.
1307 (get_ipa_tdesc): Move idx2mask out.
1308 (initialize_low_tracepoint): Initialize target descriptions.
1309 * linux-i386-ipa.c (idx2mask): New array.
1310 (get_ipa_tdesc): Move idx2mask out.
1311 (initialize_low_tracepoint): Initialize target descriptions.
1312
1313 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1314
1315 * tdesc.c (struct tdesc_type): Change return type.
1316 (tdesc_add_flag): Change parameter type.
1317 (tdesc_add_bitfield): Likewise.
1318 (tdesc_add_field): Likewise.
1319 (tdesc_set_struct_size): Likewise.
1320
1321 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1322
1323 * regcache.c (registers_to_string): Remove unused variable.
1324
1325 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1326
1327 * inferiors.c (for_each_inferior_with_data): Remove.
1328 * inferiors.h (for_each_inferior_with_data): Remove.
1329 * server.c (handle_qxfer_threads_worker): Change parameter type.
1330 (handle_qxfer_threads_proper): Use for_each_thread.
1331
1332 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1333
1334 * inferiors.c (for_each_inferior): Remove.
1335 (clear_inferiors): Use for_each_thread.
1336 * inferiors.h (for_each_inferior): Remove.
1337 * linux-low.c (linux_wait_for_event_filtered): Use
1338 for_each_thread.
1339 (linux_stabilize_threads): Likewise.
1340 * regcache.c (regcache_release): Likewise.
1341 * server.c (gdb_wants_all_threads_stopped): Likewise.
1342 (clear_pending_status_callback): Remove.
1343 (handle_status): Use for_each_thread.
1344 (captured_main): Likewise.
1345 * win32-low.c (child_init_thread_list): Likewise.
1346 (win32_clear_inferiors): Likewise.
1347 (fake_breakpoint_event): Likewise.
1348
1349 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1350
1351 * inferiors.h (find_inferior): Remove.
1352 * inferiors.c (find_inferior): Remove.
1353
1354 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1355
1356 * linux-low.c (resume_status_pending_p): Update comment.
1357 (need_step_over_p): Update comment.
1358
1359 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1360
1361 * linux-low.c (proceed_one_lwp): Return void, change parameter
1362 type.
1363 (unsuspend_and_proceed_one_lwp): Likewise.
1364 (proceed_all_lwps): Use for_each_thread.
1365 (unstop_all_lwps): Likewise.
1366
1367 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1368
1369 * linux-low.c (linux_resume_one_thread): Return void, take
1370 parameter directly.
1371 (linux_resume): Use for_each_thread.
1372
1373 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1374
1375 * linux-low.c (send_sigstop_callback): Return void, change
1376 parameter type. Rename to...
1377 (send_sigstop): ... this.
1378 (suspend_and_send_sigstop_callback): Return void, change parameter
1379 type. Rename to...
1380 (suspend_and_send_sigstop): ... this.
1381 (stop_all_lwps): Use for_each_thread.
1382
1383 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1384
1385 * linux-low.c (lwp_running): Return bool, remove unused
1386 argument.
1387 (linux_stabilize_threads): Use find_thread.
1388
1389 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1390
1391 * linux-low.c (select_singlestep_lwp_callback): Remove.
1392 (count_events_callback): Remove.
1393 (select_event_lwp_callback): Remove.
1394 (select_event_lwp): Use find_thread/for_each_thread.
1395
1396 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1397
1398 * linux-low.c (not_stopped_callback): Return bool, take filter
1399 argument directly.
1400 (linux_wait_for_event_filtered): Use find_thread.
1401 (linux_wait_1): Likewise.
1402
1403 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1404
1405 * linux-low.c (same_lwp): Remove.
1406 (find_lwp_pid): Use find_thread.
1407
1408 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1409
1410 * linux-low.c (delete_lwp_callback): Remove.
1411 (linux_mourn): Use for_each_thread.
1412
1413 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1414
1415 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1416 args parameter, don't check for pid.
1417 (linux_detach): Use for_each_thread.
1418
1419 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1420
1421 * linux-low.c (struct counter): Remove.
1422 (second_thread_of_pid_p): Remove.
1423 (last_thread_of_process_p): Use find_thread.
1424
1425 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1426
1427 * inferiors.c (find_inferior_in_random): Remove.
1428 * inferiors.h (find_inferior_in_random): Remove.
1429 * linux-low.c (status_pending_p_callback): Return bool, accept
1430 parameter ptid directly.
1431 (linux_wait_for_event_filtered): Use find_thread_in_random.
1432 (linux_wait_1): Likewise.
1433
1434 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1435
1436 * inferiors.c (find_inferior_id): Remove.
1437 (find_thread_ptid): Move implemention from find_inferior_id to
1438 here.
1439 * inferiors.h (find_inferior_id): Remove.
1440 * server.c (handle_status): Use find_thread_ptid.
1441 (process_serial_event): Likewise.
1442 * thread-db.c (find_one_thread): Likewise.
1443 (thread_db_thread_handle): Likewise.
1444 * win32-low.c (thread_rec): Likewise.
1445 (child_delete_thread): Likewise.
1446 (win32_thread_alive): Likewise.
1447 (get_child_debug_event): Likewise.
1448
1449 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1450
1451 * linux-mips-low.c (update_watch_registers_callback): Return
1452 void, remove pid_p parameter, don't check for pid.
1453 (mips_insert_point, mips_remove_point): Use for_each_thread.
1454
1455 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1456
1457 * lynx.low (lynx_delete_thread_callback): Remove.
1458 (lynx_mourn): Use for_each_thread.
1459
1460 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1461
1462 * regcache.c (regcache_invalidate_one): Remove.
1463 (regcache_invalidate_pid): use for_each_thread.
1464
1465 2017-11-26 Tom Tromey <tom@tromey.com>
1466
1467 * linux-low.c (linux_create_inferior): Update.
1468
1469 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1470
1471 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1472
1473 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1474
1475 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
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 * configure.srv: Add new file.
1483 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1484 * linux-aarch64-tdesc-selftest.c: New file.
1485 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1486
1487 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1488
1489 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1490 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1491 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1492
1493 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1494
1495 * configure.srv: Add new files.
1496 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1497 aarch64_linux_read_description.
1498 * linux-aarch64-low.c (aarch64_linux_read_description):
1499 Merge with aarch64_arch_setup.
1500 (aarch64_arch_setup): Call aarch64_linux_read_description.
1501 * linux-aarch64-tdesc.c: New file.
1502 * linux-aarch64-tdesc.h: New file.
1503
1504 2017-11-24 Yao Qi <yao.qi@linaro.org>
1505
1506 * configure.srv: Set $srv_regobj for tic6x-linux.
1507 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1508 (tic6x_read_description): Move some code to tic6x_arch_setup.
1509 (tic6x_tdesc_test): New function.
1510 (initialize_low_arch): Call selftests::register_test.
1511
1512 2017-11-22 Yao Qi <yao.qi@linaro.org>
1513
1514 * remote-utils.c (prepare_resume_reply): Use memcpy.
1515
1516 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1517
1518 * linux-low.c (kill_one_lwp_callback): Return void, take
1519 argument directly, don't filter on pid.
1520 (linux_kill): Use for_each_thread.
1521
1522 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1523
1524 * linux-low.c (need_step_over_p): Return bool, remove dummy
1525 argument.
1526 (linux_resume, proceed_all_lwps): Use find_thread.
1527
1528 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1529
1530 * linux-low.c (resume_status_pending_p): Return bool, remove
1531 flag_p argument.
1532 (linux_resume): Use find_thread.
1533
1534 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1535
1536 * linux-low.c (struct thread_resume_array): Remove.
1537 (linux_set_resume_request): Return void, take arguments
1538 directly.
1539 (linux_resume): Use for_each_thread.
1540
1541 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1542
1543 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1544 return bool, remove data argument.
1545 (linux_stabilize_threads): Use find_thread.
1546
1547 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1548
1549 * linux-low.c (unsuspend_one_lwp): Remove.
1550 (unsuspend_all_lwps): Use for_each_thread, inline code from
1551 unsuspend_one_lwp.
1552
1553 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1554
1555 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1556 * linux-low.c (struct iterate_over_lwps_args): Remove.
1557 (iterate_over_lwps_filter): Remove.
1558 (iterate_over_lwps): Use find_thread.
1559
1560 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1561
1562 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1563 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1564 code from reset_lwp_ptrace_options_callback.
1565
1566 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1567
1568 * linux-arm-low.c (struct update_registers_data): Remove.
1569 (update_registers_callback): Return void, take arguments
1570 directly, don't check thread's pid.
1571 (arm_insert_point, arm_remove_point): Use for_each_thread.
1572
1573 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1574
1575 * win32-low.c (continue_one_thread): Return void, take argument
1576 directly.
1577 (child_continue): Use for_each_thread.
1578
1579 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1580
1581 * win32-i386-low.c (update_debug_registers_callback): Rename
1582 to ...
1583 (update_debug_registers): ... this, return void, remove pid_p arg.
1584 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1585
1586 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1587
1588 * inferiors.h (struct process_info): Add constructor, initialize
1589 fields..
1590 <syscalls_to_catch>: Change type to std::vector<int>.
1591 * inferiors.c (add_process): Allocate process_info with new.
1592 (remove_process): Free process_info with delete.
1593 * linux-low.c (handle_extended_wait): Adjust.
1594 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1595 * server.c (handle_general_set): Adjust.
1596
1597 2017-11-16 Pedro Alves <palves@redhat.com>
1598
1599 * remote-utils.c (remote_close): Block SIGIO signals instead of
1600 uninstalling the SIGIO handler.
1601
1602 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1603
1604 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1605
1606 2017-11-16 Yao Qi <yao.qi@linaro.org>
1607
1608 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1609 (tic6x_store_gregset): Likewise.
1610 (tic6x_usrregs_info): Move it up.
1611
1612 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1613
1614 * Makefile.in: Update arch rules.
1615 * configure.srv: Explicitly mark arch/ files.
1616
1617 2017-11-13 Andreas Schwab <schwab@suse.de>
1618
1619 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1620 function.
1621 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1622
1623 2017-11-06 Pedro Alves <palves@redhat.com>
1624
1625 * config.in, configure: Regenerate.
1626
1627 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1628
1629 * target.c (struct thread_search): Remove.
1630 (thread_search_callback): Remove.
1631 (prepare_to_access_memory): Use for_each_thread instead of
1632 find_inferior. Inline code from thread_search_callback.
1633
1634 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1635
1636 * server.c (struct visit_actioned_threads_data): Remove.
1637 (visit_actioned_threads): Change prototype to take arguments
1638 directly.
1639 (resume): Use find_thread instead of find_inferior.
1640
1641 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1642
1643 * server.c (queue_stop_reply_callback): Change prototype, return
1644 void.
1645 (find_status_pending_thread_callback): Remove.
1646 (handle_status): Replace find_inferior with find_thread and
1647 for_each_thread.
1648
1649 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1650
1651 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1652 with REGNO.
1653 (aarch64_store_gregset): Likewise.
1654 (aarch64_fill_fpregset): Likewise.
1655 (aarch64_store_fpregset): Likewise.
1656
1657 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1658
1659 * gdbthread.h (find_thread, for_each_thread): New functions.
1660 * inferiors.c (thread_of_pid): Remove.
1661 (find_any_thread_of_pid): Use find_thread.
1662 * linux-low.c (num_lwps): Use for_each_thread.
1663
1664 2017-10-17 Yao Qi <yao.qi@linaro.org>
1665
1666 * Makefile.in: Remove one rule.
1667 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1668
1669 2017-10-17 Yao Qi <yao.qi@linaro.org>
1670
1671 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1672 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1673
1674 2017-10-17 Yao Qi <yao.qi@linaro.org>
1675
1676 * configure.srv: Rename arm.o with arch/arm.o.
1677
1678 2017-10-17 Yao Qi <yao.qi@linaro.org>
1679
1680 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1681 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1682 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1683 (arch-i386.o, arch-amd64.o): Remove rules.
1684 (arch/%.o): New rule.
1685 Update POSTCOMPILE and COMPILE.pre.
1686 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1687 * configure: Re-generated.
1688 * configure.srv: Replace arch-i386.o with arch/i386.o.
1689 Replace arch-amd64.o with arch/amd64.o.
1690
1691 2017-10-16 Yao Qi <yao.qi@linaro.org>
1692
1693 * configure: Regenerated.
1694
1695 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1696
1697 * inferiors.h: (struct inferior_list): Remove.
1698 (struct inferior_list_entry); Remove.
1699 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1700 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1701 get_first_inferior): Remove.
1702 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1703 find_inferior_id, find_inferior_in_random): Change signature.
1704 * inferiors.c (all_threads): Change type to
1705 std::list<thread_info *>.
1706 (get_thread): Remove macro.
1707 (find_inferior, find_inferior_id): Change signature, implement
1708 using find_thread.
1709 (find_inferior_in_random): Change signature, implement using
1710 find_thread_in_random.
1711 (for_each_inferior, for_each_inferior_with_data): Change
1712 signature, implement using for_each_thread.
1713 (add_inferior_to_list, remove_inferior): Remove.
1714 (add_thread, get_first_thread, thread_of_pid,
1715 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1716 (get_first_inferior, one_inferior_p, clear_inferior_list):
1717 Remove.
1718 (clear_inferiors, get_thread_process): Update.
1719 * gdbthread.h: Include <list>.
1720 (struct thread_info) <entry>: Remove field.
1721 <id>: New field.
1722 (all_threads): Change type to std::list<thread_info *>.
1723 (get_first_inferior): Add doc.
1724 (find_thread, for_each_thread, find_thread_in_random): New
1725 functions.
1726 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1727 * linux-arm-low.c (update_registers_callback): Update.
1728 * linux-low.c (second_thread_of_pid_p): Update.
1729 (kill_one_lwp_callback, linux_detach_lwp_callback,
1730 delete_lwp_callback, status_pending_p_callback, same_lwp,
1731 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1732 iterate_over_lwps, not_stopped_callback,
1733 resume_stopped_resumed_lwps, count_events_callback,
1734 select_singlestep_lwp_callback, select_event_lwp_callback,
1735 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1736 suspend_and_send_sigstop_callback, wait_for_sigstop,
1737 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1738 lwp_running, linux_set_resume_request, resume_status_pending_p,
1739 need_step_over_p, start_step_over, linux_resume_one_thread,
1740 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1741 reset_lwp_ptrace_options_callback): Update.
1742 * linux-mips-low.c (update_watch_registers_callback): Update.
1743 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1744 Update.
1745 (free_register_cache_thread_one): Remove.
1746 (regcache_release): Update.
1747 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1748 handle_qxfer_threads_worker): Update.
1749 (handle_query): Update, use list iterator.
1750 (visit_actioned_threads, handle_pending_status,
1751 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1752 clear_pending_status_callback, set_pending_status_callback,
1753 find_status_pending_thread_callback, handle_status,
1754 process_serial_event): Update.
1755 * target.c (thread_search_callback): Update.
1756 * thread-db.c (thread_db_get_tls_address): Update.
1757 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1758 Update.
1759 * win32-i386-low.c (update_debug_registers_callback): Update.
1760 * win32-low.c (delete_thread_info, child_delete_thread,
1761 continue_one_thread, suspend_one_thread,
1762 get_child_debug_event): Adjust.
1763
1764 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1765
1766 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1767 * inferiors.h: Include <list>.
1768 (struct process_info) <entry>: Remove field.
1769 <pid>: New field.
1770 (pid_of): Change macro to function.
1771 (ptid_of, lwpid_of): Remove macro.
1772 (all_processes): Change type to std::list<process_info *>.
1773 (ALL_PROCESSES): Remove macro.
1774 (for_each_process, find_process): New function.
1775 * inferiors.c (all_processes): Change type to
1776 std::list<process_info *>.
1777 (find_thread_process): Adjust.
1778 (add_process): Likewise.
1779 (remove_process): Likewise.
1780 (find_process_pid): Likewise.
1781 (get_first_process): Likewise.
1782 (started_inferior_callback): Remove.
1783 (have_started_inferiors_p): Adjust.
1784 (attached_inferior_callback): Remove.
1785 (have_attached_inferiors_p): Adjust.
1786 * linux-low.c (check_zombie_leaders): Likewise.
1787 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1788 (x86_linux_update_xmltarget): Adjust.
1789 * server.c (handle_query): Likewise.
1790 (gdb_reattached_process): Remove.
1791 (handle_status): Adjust.
1792 (kill_inferior_callback): Likewise.
1793 (detach_or_kill_inferior): Remove.
1794 (print_started_pid): Likewise.
1795 (print_attached_pid): Likewise.
1796 (detach_or_kill_for_exit): Update.
1797 (process_serial_event): Likewise.
1798 * linux-arm-low.c (arm_new_fork): Likewise.
1799
1800 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1801
1802 * dll.h: Include <list>.
1803 (struct dll_info): Add constructor.
1804 <entry>: Remove field.
1805 (all_dlls): Change type to std::list<dll_info>.
1806 * dll.c: Include <algorithm>.
1807 (get_dll): Remove macro.
1808 (all_dlls): Change type to std::list<dll_info *>.
1809 (free_one_dll): Remove.
1810 (match_dll): Likewise.
1811 (loaded_dll): Adjust.
1812 (unloaded_dll): Adjust to all_dlls type change, use
1813 std::find_if. Inline code from match_dll.
1814 (clear_dlls): Adjust to all_dlls type change.
1815 * server.c (emit_dll_description): Remove.
1816 (handle_qxfer_libraries): Adjust to all_dlls type change,
1817 integrate emit_dll_description's functionality.
1818
1819 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1820
1821 * linux-low.h (struct linux_target_ops) <delete_process>: New
1822 field.
1823 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1824 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1825 (struct linux_target_ops): Add delete_process callback.
1826 * linux-arm-low.c (arm_delete_process): New.
1827 (struct linux_target_ops): Add delete_process callback.
1828 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1829 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1830 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1831 * linux-mips-low.c (mips_linux_delete_process): New.
1832 (struct linux_target_ops): Add delete_process callback.
1833 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1834 * linux-s390-low.c (struct linux_target_ops): Likewise.
1835 * linux-sh-low.c (struct linux_target_ops): Likewise.
1836 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1837 * linux-tile-low.c (struct linux_target_ops): Likewise.
1838 * linux-x86-low.c (x86_linux_delete_process): New.
1839 (struct linux_target_ops): Add delete_process callback.
1840 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1841
1842 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1843
1844 * linux-aarch64-low.c (the_low_target): Add thread delete
1845 callback.
1846 * linux-arm-low.c (arm_delete_thread): New function.
1847 (the_low_target): Add thread delete callback.
1848 * linux-bfin-low.c (the_low_target): Likewise.
1849 * linux-crisv32-low.c (the_low_target): Likewise.
1850 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1851 set.
1852 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1853 field.
1854 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1855 * linux-mips-low.c (mips_linux_delete_thread): New function.
1856 (the_low_target): Add thread delete callback.
1857 * linux-ppc-low.c (the_low_target): Likewise.
1858 * linux-s390-low.c (the_low_target): Likewise.
1859 * linux-sh-low.c (the_low_target): Likewise.
1860 * linux-tic6x-low.c (the_low_target): Likewise.
1861 * linux-tile-low.c (the_low_target): Likewise.
1862 * linux-x86-low.c (the_low_target): Likewise.
1863 * linux-xtensa-low.c (the_low_target): Likewise.
1864
1865 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1866
1867 * win32-low.c: Include "common-inferior.h".
1868
1869 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1870
1871 * inferiors.c (set_inferior_cwd): New function.
1872 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1873 (handle_query): Inform that QSetWorkingDir is supported.
1874 * win32-low.c (create_process): Pass the inferior's cwd to
1875 CreateProcess.
1876
1877 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1878
1879 * inferiors.c (current_inferior_cwd): New global variable.
1880 (get_inferior_cwd): New function.
1881 * inferiors.h (struct process_info) <cwd>: New field.
1882
1883 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1884
1885 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1886 (OBS): Add gdb_tilde_expand.o.
1887
1888 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1889
1890 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1891 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1892
1893 2017-09-29 Pedro Alves <palves@redhat.com>
1894
1895 * ax.c (gdb_parse_agent_expr): Constify.
1896 * ax.h (gdb_parse_agent_expr): Constify.
1897 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1898 Constify.
1899 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1900 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1901 * remote-utils.h (read_ptid): Constify.
1902 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1903 (process_point_options, process_serial_event): Constify.
1904 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1905 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1906 (cmd_qtbuffer): Constify.
1907
1908 2017-09-29 Pedro Alves <palves@redhat.com>
1909
1910 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1911 fails.
1912
1913 2017-09-29 Pedro Alves <palves@redhat.com>
1914
1915 * linux-low.c (handle_extended_wait): Pass parent thread instead
1916 of process to thread_db_notice_clone.
1917 * linux-low.h (thread_db_notice_clone): Replace parent process
1918 parameter with parent thread parameter.
1919 * thread-db.c (find_one_thread): Add comment.
1920 (thread_db_notice_clone): Replace parent process parameter with
1921 parent thread parameter. Temporarily switch to the parent thread.
1922
1923 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1924
1925 * gdbthread.h: Include "common-gdbthread.h".
1926 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1927 "if" when validating the ptid.
1928 * remote-utils.c: Include "gdbthread.h".
1929 (prepare_resume_reply): Use "switch_to_thread".
1930 * target.c (done_accessing_memory): Likewise.
1931
1932 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1933
1934 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1935 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1936 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1937 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1938 s390x-gs-linux64-ipa.o to ipa_obj.
1939 * linux-s390-low.c (HWCAP_S390_GS): New define.
1940 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1941 New functions.
1942 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1943 (s390_arch_setup): Check for guarded-storage support and choose
1944 appropriate tdesc.
1945 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1946 init_registers_s390x_gs_linux64.
1947 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1948 enum value.
1949 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1950 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1951
1952 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1953
1954 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1955
1956 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1957
1958 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1959 (thread_db_thread_handle): Declare.
1960 * linux-low.c (linux_target_ops): Initialize thread_handle.
1961 * server.c (handle_qxfer_threads_worker): Add support for
1962 "handle" attribute.
1963 * target.h (struct target_ops): Add new function pointer,
1964 thread_handle.
1965 (target_thread_handle): Define.
1966 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1967 field in lwp.
1968 (thread_db_thread_handle): New function.
1969
1970 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1971
1972 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1973 * linux-low.h (thread_db_notice_clone): Declare.
1974 * thread-db.c (thread_db_notice_clone): New function.
1975
1976 2017-09-21 Pedro Alves <palves@redhat.com>
1977
1978 * server.c (gdb_read_memory, handle_status, process_serial_event)
1979 (handle_serial_event, handle_target_event): Adjust to
1980 set_desired_thread prototype change.
1981 * target.c (set_desired_thread): Remove 'use_general' parameter
1982 and adjust.
1983 * target.h (set_desired_thread): Remove 'use_general' parameter.
1984
1985 2017-09-20 Tom Tromey <tom@tromey.com>
1986
1987 * target.c (target_terminal::terminal_state): Define.
1988 (target_terminal::init): Rename from target_terminal_init.
1989 (target_terminal::inferior): Rename from
1990 target_terminal_inferior.
1991 (target_terminal::ours): Rename from target_terminal_ours.
1992 (target_terminal::ours_for_output, target_terminal::info): New.
1993
1994 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1995
1996 * server.c (accumulate_file_name_length): Remove.
1997 (emit_dll_description): Adjust to std::string change.
1998 (handle_qxfer_libraries): Use std::string to hold document.
1999
2000 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2001
2002 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2003 return type of xml_escape_text.
2004 * server.c (emit_dll_description): Likewise.
2005
2006 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2007
2008 * server.c (captured_main): Accept argument for --selftest.
2009 Update run_tests call.
2010 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2011 when registering selftests.
2012
2013 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2014
2015 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2016 instead of "VEC" for "target_desc.reg_defs".
2017 (regcache_cpy): Likewise.
2018 (registers_to_string): Likewise.
2019 (registers_from_string): Likewise.
2020 (find_regno): Likewise.
2021 (supply_regblock): Likewise.
2022 (regcache_raw_read_unsigned): Likewise.
2023 * tdesc.c (init_target_desc): Likewise.
2024 (tdesc_create_reg): Likewise.
2025 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2026 (struct target_desc) <reg_defs>: Convert to "std::vector".
2027 (target_desc): Do not initialize "reg_defs".
2028 (~target_desc): Update code to use "std::vector" instead of "VEC"
2029 for "target_desc.reg_defs".
2030 (operator==): Likewise.
2031
2032 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2033
2034 * inferiors.h (thread_to_gdb_id): Remove.
2035 * inferiors.c (thread_to_gdb_id): Remove.
2036 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2037 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2038 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2039 Likewise.
2040 * nto-low.c (nto_fetch_registers, nto_store_registers,
2041 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2042
2043 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2044
2045 * inferiors.h (gdb_id_to_thread_id): Remove.
2046 * inferiors.c (gdb_id_to_thread_id): Remove.
2047 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2048 removal. Move pid declaration closer to where it's used.
2049
2050 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2051
2052 * server.c (handle_detach): New function.
2053 (process_serial_event): Move code out, call handle_detach.
2054
2055 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2056
2057 * server.c (require_running): Rename to ...
2058 (require_running_or_return): ... this ...
2059 (require_running_or_break): ... and this.
2060 (handle_query, process_serial_event): Adjust.
2061
2062 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2063
2064 * linux-low.c (linux_set_resume_request): Remove unused
2065 variables.
2066
2067 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2068
2069 * server.c (first_thread_of): Remove.
2070 (process_serial_event): Replace usage of first_thread_of with
2071 find_any_thread_of_pid.
2072 * tracepoint.c (same_process_p): Remove.
2073 (gdb_agent_about_to_close): Replace usage of same_process_p with
2074 find_any_thread_of_pid.
2075 * linux-x86-low.c (same_process_callback): Remove.
2076 (x86_arch_setup_process_callback): Replace usage of
2077 same_process_callback with find_any_thread_of_pid.
2078 * thread-db.c (any_thread_of): Remove.
2079 (switch_to_process): Replace usage of any_thread_of with
2080 find_any_thread_of_pid.
2081 * inferiors.c (thread_pid_matches_callback): Remove.
2082 (find_thread_process): Adjust to use find_any_thread_of_pid.
2083
2084 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2085
2086 * regcache.c (get_thread_regcache): Guard calls to "memset"
2087 with "!VEC_empty".
2088
2089 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2090
2091 * linux-low.c (handle_extended_wait): Use
2092 "allocate_target_description" instead of "XNEW".
2093 * linux-x86-low.c (initialize_low_arch): Likewise.
2094
2095 2017-09-05 Yao Qi <yao.qi@linaro.org>
2096
2097 * configure.srv (srv_i386_regobj): Remove.
2098 (srv_amd64_regobj): Remove.
2099 (srv_regobj): Set it to "" for x86 non-linux targets.
2100 * linux-x86-tdesc.c (i386_linux_read_description):
2101 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2102 (init_registers_i386): Remove the declaration.
2103 (tdesc_i386): Remove the declaration.
2104 (lynx_i386_arch_setup): Call i386_create_target_description.
2105 * nto-x86-low.c: Likewise.
2106 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2107 [!__x86_64__]: include arch/i386.h.
2108 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2109
2110 2017-09-05 Yao Qi <yao.qi@linaro.org>
2111
2112 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2113 i386/amd64-XXX-linux from it.
2114
2115 2017-09-05 Yao Qi <yao.qi@linaro.org>
2116
2117 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2118 false.
2119 (ipa_amd64_linux_regobj): Remove.
2120 (ipa_x32_linux_regobj): Remove.
2121
2122 2017-09-05 Yao Qi <yao.qi@linaro.org>
2123
2124 * Makefile.in (arch-amd64.o): New rule.
2125 * configure.srv: Append arch-amd64.o.
2126 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2127 (get_ipa_tdesc): Call amd64_linux_read_description.
2128 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2129 and init_registers_amd64_XXX.
2130 * linux-x86-low.c (x86_linux_read_description): Call
2131 amd64_linux_read_description.
2132 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2133 (initialize_low_arch): Don't call init_registers_x32_XXX and
2134 init_registers_amd64_XXX.
2135 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2136 and tdesc_amd64_XXX.
2137 [__x86_64__] (amd64_tdesc_test): New function.
2138 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2139 and init_registers_amd64_XXX.
2140 * linux-x86-tdesc.c: Include arch/amd64.h.
2141 (xcr0_to_tdesc_idx): New function.
2142 (i386_linux_read_description): New function.
2143 (amd64_get_ipa_tdesc_idx): New function.
2144 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2145 (amd64_get_ipa_tdesc): Declare.
2146
2147 2017-09-05 Yao Qi <yao.qi@linaro.org>
2148
2149 * configure.srv (srv_i386_linux_xmlfiles): Remove
2150 i386/i386-XXX-linux.xml from it.
2151
2152 2017-09-05 Yao Qi <yao.qi@linaro.org>
2153
2154 * configure.srv: Set srv_i386_linux_regobj empty if $development
2155 is false.
2156 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2157 initialize_low_tdesc.
2158 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2159 with #if initialize_low_tdesc.
2160 * linux-x86-tdesc-selftest.c: New file.
2161 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2162
2163 2017-09-05 Yao Qi <yao.qi@linaro.org>
2164
2165 * Makefile.in (arch-i386.o): New rule.
2166 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2167 (x86_64-*-linux*): Likewise.
2168 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2169 include arch/i386.h.
2170 (i386_linux_read_description): Remove code and call
2171 i386_create_target_description.
2172 * tdesc.c (allocate_target_description): New function.
2173 * tdesc.h (set_tdesc_architecture): Remove declaration.
2174 (set_tdesc_osabi): Likewise.
2175
2176 2017-09-05 Yao Qi <yao.qi@linaro.org>
2177
2178 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2179 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2180 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2181 .xmltarget.
2182 * server.c (get_features_xml): Call tdesc_get_features_xml.
2183 * tdesc.c (set_tdesc_architecture): New function.
2184 (set_tdesc_osabi): New function.
2185 (tdesc_get_features_xml): New function.
2186 (tdesc_create_feature): Add an argument.
2187 * tdesc.h (struct target_desc) <features>: New field.
2188 <arch, osabi>: New field.
2189 (~target_desc): xfree features, arch, and osabi.
2190 (target_desc::oerator==): Don't compare .xmltarget.
2191 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2192 (set_tdesc_osabi): Likewise.
2193 (tdesc_get_features_xml): Likewise.
2194
2195 2017-09-05 Yao Qi <yao.qi@linaro.org>
2196
2197 * linux-x86-tdesc.c: Include selftest.h.
2198 (i386_tdesc_test): New function.
2199 (initialize_low_tdesc): Call selftests::register_test.
2200 * tdesc.h: Include regdef.h.
2201 (target_desc): Override operator == and !=.
2202
2203 2017-09-05 Yao Qi <yao.qi@linaro.org>
2204
2205 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2206 (ipa_obj): Likewise.
2207 * linux-i386-ipa.c: Include common/x86-xstate.h
2208 (get_ipa_tdesc): Call i386_linux_read_description.
2209 (initialize_low_tracepoint): Don't call init_registers_XXX
2210 functions, call initialize_low_tdesc instead.
2211 * linux-x86-low.c (x86_linux_read_description): Call
2212 i386_linux_read_description.
2213 (initialize_low_arch): Don't call init_registers_i386_XXX
2214 functions, call initialize_low_tdesc.
2215 * linux-x86-tdesc.c: New file.
2216 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2217 (i386_get_ipa_tdesc_idx): Declare.
2218 (i386_get_ipa_tdesc): Declare.
2219 (initialize_low_tdesc): Declare.
2220
2221 2017-09-05 Yao Qi <yao.qi@linaro.org>
2222
2223 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2224 instead of 0.
2225
2226 2017-09-05 Yao Qi <yao.qi@linaro.org>
2227
2228 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2229 * regcache.c (get_thread_regcache): Use VEC_length.
2230 (init_register_cache): Likewise.
2231 (regcache_cpy): Likewise.
2232 (registers_to_string): Iterate reg_defs via VEC_iterate.
2233 (find_regno): Likewise.
2234 (find_register_by_number): Use VEC_index.
2235 (register_size): Call find_register_by_number.
2236 (register_data): Call find_register_by_number.
2237 (supply_regblock): Use VEC_length.
2238 (regcache_raw_read_unsigned): Likewise.
2239 * tdesc.c (init_target_desc): Iterate reg_defs via
2240 VEC_iterate.
2241 (default_description): Update initializer.
2242 (copy_target_description): Don't update field num_registers.
2243 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2244 <num_registers>: Remove.
2245
2246 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2247
2248 * Makefile.in (.SECONDARY): Define target.
2249
2250 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2251
2252 * linux-low.c (linux_wait_1): Adjust.
2253 * server.c (queue_stop_reply_callback): Adjust.
2254
2255 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2256
2257 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2258 QEnvironmentUnset and QEnvironmentReset packets.
2259 (handle_query): Inform remote that QEnvironmentHexEncoded,
2260 QEnvironmentUnset and QEnvironmentReset are supported.
2261
2262 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2263
2264 * inferiors.h (inferior_target_data): Rename to ...
2265 (thread_target_data): ... this.
2266 (inferior_regcache_data): Rename to ...
2267 (thread_regcache_data): ... this.
2268 (set_inferior_regcache_data): Rename to ...
2269 (set_thread_regcache_data): ... this.
2270 * inferiors.c (inferior_target_data): Rename to ...
2271 (thread_target_data): ... this.
2272 (inferior_regcache_data): Rename to ...
2273 (thread_regcache_data): ... this.
2274 (set_inferior_regcache_data): Rename to ...
2275 (set_thread_regcache_data): ... this.
2276 (free_one_thread): Update.
2277 * linux-low.h (get_thread_lwp): Update.
2278 * regcache.c (get_thread_regcache): Update.
2279 (regcache_invalidate_thread): Update.
2280 (free_register_cache_thread): Update.
2281 * win32-i386-low.c (update_debug_registers_callback): Update.
2282 (win32_get_current_dr): Update.
2283 * win32-low.c (thread_rec): Update.
2284 (delete_thread_info): Update.
2285 (continue_one_thread): Update.
2286 (suspend_one_thread): Update.
2287
2288 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2289
2290 * inferiors.c (set_inferior_target_data): Remove.
2291 * inferiors.h (set_inferior_target_data): Remove.
2292
2293 2017-08-18 Yao Qi <yao.qi@linaro.org>
2294
2295 * Makefile.in (OBS): Add selftest.o.
2296 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2297 * configure, config.in: Re-generated.
2298 * server.c: Include common/sefltest.h.
2299 (captured_main): Handle option --selftest.
2300
2301 2017-08-09 Yao Qi <yao.qi@linaro.org>
2302
2303 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2304 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2305 i386-avx-mpx.o and i386-mmx.o.
2306 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2307 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2308 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2309 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2310 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2311 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2312 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2313 i386/amd64-avx-mpx.xml.
2314
2315 2017-08-09 Yao Qi <yao.qi@linaro.org>
2316
2317 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2318 and x32-avx-avx512.o.
2319 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2320 i386/x32-avx-avx512.xml.
2321
2322 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2323
2324 * tracepoint.h (enum class fast_tpoint_collect_result): New
2325 enumeration.
2326 (fast_tracepoint_collecting): Change return type to
2327 fast_tpoint_collect_result.
2328 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2329 * linux-low.h: Include tracepoint.h.
2330 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2331 fast_tpoint_collect_result.
2332 * linux-low.c (handle_tracepoints): Adjust.
2333 (linux_fast_tracepoint_collecting): Change return type to
2334 fast_tpoint_collect_result.
2335 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2336 linux_wait_1, stuck_in_jump_pad_callback,
2337 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2338 proceed_one_lwp): Adjust to type change.
2339
2340 2017-07-10 Yao Qi <yao.qi@linaro.org>
2341
2342 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2343
2344 2017-06-29 Yao Qi <yao.qi@linaro.org>
2345
2346 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2347 Remove.
2348 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2349
2350 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2351
2352 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2353
2354 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2355
2356 * linux-low.c (linux_create_inferior): Adjust code to access the
2357 environment information via 'gdb_environ' class.
2358 * lynx-low.c (lynx_create_inferior): Likewise.
2359 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2360 (get_environ): Return a pointer to 'our_environ'.
2361 (captured_main): Initialize 'our_environ'.
2362 * server.h (get_environ): Adjust prototype.
2363 * spu-low.c (spu_create_inferior): Adjust code to access the
2364 environment information via 'gdb_environ' class.
2365
2366 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2367
2368 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2369 usage of "register" keyword.
2370
2371 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2372
2373 * configure: Re-generate.
2374
2375 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2376
2377 * configure: Re-generate.
2378
2379 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2380
2381 * Makefile.in (COMPILE.pre): Add "-x c++".
2382
2383 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2384
2385 * fork-child.c: Conditionally include <signal.h>.
2386
2387 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2388
2389 * server.c (handle_general_set): Handle new packet
2390 "QStartupWithShell".
2391 (handle_query): Add "QStartupWithShell" to the list of supported
2392 packets.
2393 (gdbserver_usage): Add help text explaining the
2394 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2395 options.
2396 (captured_main): Recognize and act upon the presence of the new
2397 CLI options.
2398
2399 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2400 Pedro Alves <palves@redhat.com>
2401
2402 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2403 * configure: Regenerate.
2404 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2405 "fork-inferior.o".
2406 (i[34567]86-*-lynxos*): Likewise.
2407 (spu*-*-*): Likewise.
2408 * fork-child.c: New file.
2409 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2410 and "environ.h".
2411 (linux_ptrace_fun): New function.
2412 (linux_create_inferior): Adjust function prototype to reflect
2413 change on "target.h". Adjust function code to use
2414 "fork_inferior".
2415 (linux_request_interrupt): Delete "signal_pid".
2416 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2417 (lynx_ptrace_fun): New function.
2418 (lynx_create_inferior): Adjust function prototype to reflect
2419 change on "target.h". Adjust function code to use
2420 "fork_inferior".
2421 * nto-low.c (nto_create_inferior): Adjust function prototype and
2422 code to reflect change on "target.h". Update comments.
2423 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2424 "common-terminal.h" and "environ.h".
2425 (terminal_fd): Moved to fork-child.c.
2426 (old_foreground_pgrp): Likewise.
2427 (restore_old_foreground_pgrp): Likewise.
2428 (last_status): Make it global.
2429 (last_ptid): Likewise.
2430 (our_environ): New variable.
2431 (startup_with_shell): Likewise.
2432 (program_name): Likewise.
2433 (program_argv): Rename to...
2434 (program_args): ...this.
2435 (wrapper_argv): New variable.
2436 (start_inferior): Delete function.
2437 (get_exec_wrapper): New function.
2438 (get_exec_file): Likewise.
2439 (get_environ): Likewise.
2440 (prefork_hook): Likewise.
2441 (post_fork_inferior): Likewise.
2442 (postfork_hook): Likewise.
2443 (postfork_child_hook): Likewise.
2444 (handle_v_run): Update code to deal with arguments coming from the
2445 remote host. Update calls from "start_inferior" to
2446 "create_inferior".
2447 (captured_main): Likewise. Initialize environment variable. Call
2448 "have_job_control".
2449 * server.h (post_fork_inferior): New prototype.
2450 (get_environ): Likewise.
2451 (last_status): Declare.
2452 (last_ptid): Likewise.
2453 (signal_pid): Likewise.
2454 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2455 (spu_ptrace_fun): New function.
2456 (spu_create_inferior): Adjust function prototype to reflect change
2457 on "target.h". Adjust function code to use "fork_inferior".
2458 * target.c (target_terminal_init): New function.
2459 (target_terminal_inferior): Likewise.
2460 (target_terminal_ours): Likewise.
2461 * target.h: Include <vector>.
2462 (struct target_ops) <create_inferior>: Update prototype.
2463 (create_inferior): Update macro.
2464 * utils.c (gdb_flush_out_err): New function.
2465 * win32-low.c (win32_create_inferior): Adjust function prototype
2466 and code to reflect change on "target.h".
2467
2468 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2469
2470 * inferiors.c (switch_to_thread): New function.
2471
2472 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2473
2474 * Makefile.in (SFILE): Add "common/job-control.c".
2475 (OBS): Add "job-control.o".
2476
2477 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2478
2479 * Makefile: Remove "@host_makefile_frag@".
2480
2481 2017-05-05 Pedro Alves <palves@redhat.com>
2482
2483 * configure: Regenerate.
2484
2485 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2486
2487 * configure: Regenerate.
2488
2489 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2490
2491 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2492 software_single_step change of return type to
2493 std::vector<CORE_ADDR>.
2494 * linux-low.c (install_software_single_step_breakpoints):
2495 Likewise.
2496 * linux-low.h (install_software_single_step_breakpoints):
2497 Likewise.
2498
2499 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2500
2501 * remote-utils.c: Include "gdb_termios.h" instead of
2502 "terminal.h".
2503 * terminal.h: Delete file.
2504
2505 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2506
2507 * server.c: Include <vector>.
2508 <program_argv, wrapper_argv>: Convert to std::vector.
2509 (start_inferior): Rewrite function to use C++.
2510 (handle_v_run): Likewise. Update code that calculates the argv
2511 based on the vRun packet; use C++.
2512 (captured_main): Likewise.
2513
2514 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2515
2516 * server.c (handle_v_cont): Initialize thread_resume::thread
2517 with null_ptid.
2518
2519 2017-04-05 Pedro Alves <palves@redhat.com>
2520
2521 * configure: Regenerate.
2522
2523 2017-04-05 Pedro Alves <palves@redhat.com>
2524
2525 * gdbreplay.c (sync_error): Constify.
2526 * linux-x86-low.c (push_opcode): Constify.
2527
2528 2017-04-05 Pedro Alves <palves@redhat.com>
2529
2530 * win32-low.c (get_child_debug_event)
2531 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2532 Report TARGET_WAITKIND_SPURIOUS instead.
2533
2534 2017-04-05 Pedro Alves <palves@redhat.com>
2535
2536 * remote-utils.c (remote_prepare, remote_open): Constify.
2537 * remote-utils.h (remote_prepare, remote_open): Constify.
2538 * server.c (captured_main): Constify 'port' handling.
2539
2540 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2541
2542 * Makefile.in (clean): Clear .deps.
2543
2544 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2545
2546 * .gitignore: Remove generated files, replace with wildcard.
2547 * (clean): Replace removal of generated files with wildcard.
2548 (version.c): Replace with...
2549 (version-generated.c): ...this.
2550 (xml-builtin.c): Replace with...
2551 (xml-builtin-generated.c): ...this.
2552 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2553 (%.c: *regformats*): Replace with...
2554 (%-generated.c: *regformats*): ...this.
2555
2556 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2557
2558 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2559 (xtensa_fill_gregset): Call collect_register_by_name for
2560 threadptr register.
2561 (xtensa_store_gregset): Call supply_register_by_name for
2562 threadptr register.
2563
2564 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2565
2566 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2567 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2568 (xtensa_store_gregset): Call supply_register for all registers in
2569 a0_regnum..a0_regnum + C0_NREGS range.
2570
2571 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2572
2573 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2574 (ax-ipa.o: ax.c): Remove.
2575 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2576 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2577 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2578 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2579 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2580
2581 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2582
2583 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2584 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2585 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2586 (errors-ipa.o: ../common/errors.c): Remove.
2587 (format-ipa.o: ../common/format.c): Remove.
2588 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2589
2590 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2591
2592 * Makefile.in (%-ipa.o: %.c): New rule.
2593 (tracepoint-ipa.o: tracepoint.c): Remove.
2594 (utils-ipa.o: utils.c): Remove.
2595 (remote-utils-ipa.o: remote-utils.c): Remove.
2596 (regcache-ipa.o: regcache.c): Remove.
2597 (i386-linux-ipa.o: i386-linux.c): Remove.
2598 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2599 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2600 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2601 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2602 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2603 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2604 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2605 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2606 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2607 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2608 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2609 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2610 (aarch64-ipa.o: aarch64.c): Remove.
2611 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2612 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2613 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2614 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2615 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2616 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2617 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2618 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2619 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2620 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2621 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2622 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2623 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2624 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2625 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2626 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2627 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2628 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2629 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2630 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2631 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2632 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2633 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2634 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2635 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2636 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2637 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2638 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2639 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2640 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2641 (tdesc-ipa.o: tdesc.c): Remove.
2642 (x32-linux-ipa.o: x32-linux.c): Remove.
2643 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2644 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2645
2646 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2647
2648 * Makefile.in (%.o: ../arch/%.c): New rule.
2649 (arm.o: ../arch/arm.c): Remove.
2650 (arm-linux.o: ../arch/arm-linux.c): Remove.
2651 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2652 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2653
2654 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2655
2656 * Makefile.in (%.o: ../nat/%.c): New rule.
2657 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2658 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2659 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2660 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2661 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2662 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2663 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2664 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2665 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2666 (linux-personality.o: ../nat/linux-personality.c): Remove.
2667 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2668 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2669 (x86-linux.o: ../nat/x86-linux.c): Remove.
2670 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2671 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2672
2673 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2674
2675 * Makefile.in (%.o: ../common/%.c): New rule.
2676 (signals.o: ../common/signals.c): Remove.
2677 (print-utils.o: ../common/print-utils.c): Remove.
2678 (rsp-low.o: ../common/rsp-low.c): Remove.
2679 (common-utils.o: ../common/common-utils.c): Remove.
2680 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2681 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2682 (vec.o: ../common/vec.c): Remove.
2683 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2684 (xml-utils.o: ../common/xml-utils.c): Remove.
2685 (ptid.o: ../common/ptid.c): Remove.
2686 (buffer.o: ../common/buffer.c): Remove.
2687 (format.o: ../common/format.c): Remove.
2688 (filestuff.o: ../common/filestuff.c): Remove.
2689 (agent.o: ../common/agent.c): Remove.
2690 (errors.o: ../common/errors.c): Remove.
2691 (environ.o: ../common/environ.c): Remove.
2692 (common-debug.o: ../common/common-debug.c): Remove.
2693 (cleanups.o: ../common/cleanups.c): Remove.
2694 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2695 (fileio.o: ../common/fileio.c): Remove.
2696 (common-regcache.o: ../common/common-regcache.c): Remove.
2697 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2698 (new-op.o: ../common/new-op.c): Remove.
2699 (btrace-common.o: ../common/btrace-common.c): Remove.
2700
2701 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2702
2703 * Makefile.in (%.o: ../target/%.c): New rule.
2704 (waitstatus.o: ../target/waitstatus.c): Remove.
2705
2706 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2707
2708 * Makefile.in
2709 (%.c: ../regformats/%.dat,
2710 (%.c: ../regformats/arm/%.dat,
2711 (%.c: ../regformats/i386/%.dat,
2712 (%.c: ../regformats/rs6000/%.dat): New rules.
2713 (aarch64.c): Remove.
2714 (reg-arm.c): Remove.
2715 (arm-with-iwmmxt.c): Remove.
2716 (arm-with-vfpv2.c): Remove.
2717 (arm-with-vfpv3.c): Remove.
2718 (arm-with-neon.c): Remove.
2719 (reg-bfin.c): Remove.
2720 (reg-cris.c): Remove.
2721 (reg-crisv32.c): Remove.
2722 (i386.c): Remove.
2723 (i386-linux.c): Remove.
2724 (i386-avx.c): Remove.
2725 (i386-avx-linux.c): Remove.
2726 (i386-avx-avx512.c): Remove.
2727 (i386-avx-avx512-linux.c): Remove.
2728 (i386-mpx.c): Remove.
2729 (i386-mpx-linux.c): Remove.
2730 (i386-avx-mpx-avx512-pku.c): Remove.
2731 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2732 (i386-avx-mpx.c): Remove.
2733 (i386-avx-mpx-linux.c): Remove.
2734 (i386-mmx.c): Remove.
2735 (i386-mmx-linux.c): Remove.
2736 (reg-ia64.c): Remove.
2737 (reg-m32r.c): Remove.
2738 (reg-m68k.c): Remove.
2739 (reg-cf.c): Remove.
2740 (mips-linux.c): Remove.
2741 (mips-dsp-linux.c): Remove.
2742 (mips64-linux.c): Remove.
2743 (mips64-dsp-linux.c): Remove.
2744 (nios2-linux.c): Remove.
2745 (powerpc-32.c): Remove.
2746 (powerpc-32l.c): Remove.
2747 (powerpc-altivec32l.c): Remove.
2748 (powerpc-cell32l.c): Remove.
2749 (powerpc-vsx32l.c): Remove.
2750 (powerpc-isa205-32l.c): Remove.
2751 (powerpc-isa205-altivec32l.c): Remove.
2752 (powerpc-isa205-vsx32l.c): Remove.
2753 (powerpc-e500l.c): Remove.
2754 (powerpc-64l.c): Remove.
2755 (powerpc-altivec64l.c): Remove.
2756 (powerpc-cell64l.c): Remove.
2757 (powerpc-vsx64l.c): Remove.
2758 (powerpc-isa205-64l.c): Remove.
2759 (powerpc-isa205-altivec64l.c): Remove.
2760 (powerpc-isa205-vsx64l.c): Remove.
2761 (s390-linux32.c): Remove.
2762 (s390-linux32v1.c): Remove.
2763 (s390-linux32v2.c): Remove.
2764 (s390-linux64.c): Remove.
2765 (s390-linux64v1.c): Remove.
2766 (s390-linux64v2.c): Remove.
2767 (s390-te-linux64.c): Remove.
2768 (s390-vx-linux64.c): Remove.
2769 (s390-tevx-linux64.c): Remove.
2770 (s390x-linux64.c): Remove.
2771 (s390x-linux64v1.c): Remove.
2772 (s390x-linux64v2.c): Remove.
2773 (s390x-te-linux64.c): Remove.
2774 (s390x-vx-linux64.c): Remove.
2775 (s390x-tevx-linux64.c): Remove.
2776 (tic6x-c64xp-linux.c): Remove.
2777 (tic6x-c64x-linux.c): Remove.
2778 (tic6x-c62x-linux.c): Remove.
2779 (reg-sh.c): Remove.
2780 (reg-sparc64.c): Remove.
2781 (reg-spu.c): Remove.
2782 (amd64.c): Remove.
2783 (amd64-linux.c): Remove.
2784 (amd64-avx.c): Remove.
2785 (amd64-avx-linux.c): Remove.
2786 (amd64-avx-avx512.c): Remove.
2787 (amd64-avx-avx512-linux.c): Remove.
2788 (amd64-mpx.c): Remove.
2789 (amd64-mpx-linux.c): Remove.
2790 (amd64-avx-mpx-avx512-pku.c): Remove.
2791 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2792 (amd64-avx-mpx.c): Remove.
2793 (amd64-avx-mpx-linux.c): Remove.
2794 (x32.c): Remove.
2795 (x32-linux.c): Remove.
2796 (x32-avx.c): Remove.
2797 (x32-avx-linux.c): Remove.
2798 (x32-avx-avx512.c): Remove.
2799 (x32-avx-avx512-linux.c): Remove.
2800 (reg-xtensa.c): Remove.
2801 (reg-tilegx.c): Remove.
2802 (reg-tilegx32.c): Remove.
2803
2804 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2805
2806 * Makefile.in (SFILES): Add "common/environ.c".
2807 (OBJS): Add "common/environ.h".
2808
2809 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2810
2811 * configure.ac: Check if the fs_base and gs_base members of
2812 `struct user_regs_struct' exist.
2813 * config.in: Regenerated.
2814 * configure: Likewise.
2815
2816 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2817
2818 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2819 target_read_memory.
2820 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2821 (get_next_pcs_syscall_next_pc): Likewise.
2822
2823 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2824
2825 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2826 * nto-x86-low.c: Likewise.
2827
2828 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2829
2830 * Makefile.in: Include disable-implicit-rules.mk.
2831
2832 2016-11-23 Pedro Alves <palves@redhat.com>
2833
2834 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2835 (debug_vprintf): Use std::chrono::steady_clock instead of
2836 gettimeofday. Use '.' instead of ':'.
2837 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2838 (get_timestamp): Use std::chrono::steady_clock instead of
2839 gettimeofday.
2840
2841 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2842
2843 * Makefile.in: Fix whitespace formatting.
2844
2845 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2846
2847 * Makefile.in (SFILES, OBS): Flatten list and order
2848 alphabetically.
2849
2850 2016-11-23 Pedro Alves <palves@redhat.com>
2851
2852 * event-loop.c (handle_file_event): Use warning.
2853 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2854 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2855 Use warning.
2856
2857 2016-11-23 Pedro Alves <palves@redhat.com>
2858
2859 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2860 output.
2861 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2862 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2863 debug_printf and debug_flush for debug output.
2864 * server.c (handle_general_set): Likewise.
2865 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2866 output.
2867
2868 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2869
2870 * Makefile.in (.c.o): Replace rule with ...
2871 (%.o: %.c): ... this one.
2872
2873 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2874
2875 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2876 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2877 make.
2878 * configure.ac: Remove checks for the make program.
2879 * configure: Re-generate.
2880
2881 2016-10-28 Pedro Alves <palves@redhat.com>
2882
2883 * Makefile.in (CXX_DIALECT): Get from configure.
2884 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2885 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2886 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2887 * config.in: Regenerate.
2888 * configure: Regenerate.
2889
2890 2016-10-27 Yao Qi <yao.qi@linaro.org>
2891
2892 * linux-low.c (linux_supports_range_stepping): Return true if
2893 can_software_single_step return true.
2894
2895 2016-10-27 Yao Qi <yao.qi@linaro.org>
2896
2897 * inferiors.c (find_inferior_in_random): New function.
2898 * inferiors.h (find_inferior_in_random): Declare.
2899 * linux-low.c (linux_wait_for_event_filtered): Call
2900 find_inferior_in_random instead of find_inferior.
2901
2902 2016-10-27 Yao Qi <yao.qi@linaro.org>
2903
2904 * linux-low.c (linux_wait_1): If single-step breakpoints are
2905 inserted, remove them.
2906
2907 2016-10-26 Pedro Alves <palves@redhat.com>
2908
2909 * linux-low.c (handle_extended_wait): Link parent/child fork
2910 threads.
2911 (linux_wait_1): Unlink them.
2912 (linux_set_resume_request): Ignore resume requests for
2913 already-resumed and unhandled fork child threads.
2914 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2915 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2916 New functions.
2917 (handle_v_requests) <vCont>: Don't call require_running.
2918 * server.h (in_queued_stop_replies): New declaration.
2919
2920 2016-10-24 Yao Qi <yao.qi@linaro.org>
2921
2922 PR server/20733
2923 * linux-aarch64-low.c (append_insns): Cast the return value to
2924 'uint32_t *'.
2925
2926 2016-10-10 Yao Qi <yao.qi@linaro.org>
2927
2928 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2929
2930 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2931
2932 * target.c (target_supports_multi_process): New function, moved
2933 from...
2934 * target.h (target_supports_multi_process): ... here. Remove
2935 macro.
2936
2937 2016-10-05 Tom Tromey <tom@tromey.com>
2938
2939 PR remote/20655:
2940 * tracepoint.c (handle_tracepoint_bkpts): Check
2941 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2942
2943 2016-10-05 Yao Qi <yao.qi@linaro.org>
2944
2945 * configure.srv: Update the path of arm-*.xml files.
2946
2947 2016-10-05 Terry Guo <terry.guo@arm.com>
2948 Yao Qi <yao.qi@linaro.org>
2949
2950 * Makefile.in: Adjust the path of rules.
2951 * configure.srv: Update the path of xml files.
2952 * regformats/arm-with-iwmmxt.dat: Regenerated.
2953 * regformats/arm-with-neon.dat: Likewise.
2954 * regformats/arm-with-vfpv2.dat: Likewise.
2955 * regformats/arm-with-vfpv3.dat Likewise.
2956
2957 2016-09-30 Yao Qi <yao.qi@linaro.org>
2958
2959 PR gdbserver/20627
2960 * target.c (target_stop_and_wait): Don't call
2961 target_continue_no_signal, use resume_stop instead.
2962
2963 2016-09-26 Yao Qi <yao.qi@linaro.org>
2964
2965 * linux-low.c (linux_wait_1): Call debug_exit.
2966
2967 2016-09-23 Pedro Alves <palves@redhat.com>
2968
2969 * Makefile.in (SFILES): Add common/new-op.c.
2970 (OBS): Add common/new-op.o.
2971 (new-op.o): New rule.
2972
2973 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2974
2975 * .gitinore: Ignore more files.
2976
2977 2016-09-21 Yao Qi <yao.qi@linaro.org>
2978
2979 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2980 23.
2981
2982 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2983
2984 * server.c (start_inferior): Call target_mourn_inferior instead of
2985 mourn_inferior; pass ptid_t argument to it.
2986 (resume): Likewise.
2987 (handle_target_event): Likewise.
2988 * target.c (target_mourn_inferior): New function.
2989 * target.h (mourn_inferior): Delete macro.
2990
2991 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2992
2993 * linux-low.c (lwp_is_stepping): New function.
2994
2995 2016-09-06 Carl Love <cel@us.ibm.com>
2996
2997 * server.c (start_inferior): Fixed comment, requested comment change
2998 didn't get updated correctly. Removed reference to ptrace () call as
2999 it is only true on Linux systems.
3000
3001 2016-09-06 Carl Love <cel@us.ibm.com>
3002
3003 * server.c (start_inferior): Do not call
3004 function target_post_create_inferior () if the
3005 inferior process has already exited.
3006
3007 2016-09-05 Pedro Alves <palves@redhat.com>
3008
3009 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3010 (COMPILE.pre, CC_LD): Use CXX directly.
3011 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3012 * acinclude.m4: Don't include build-with-cxx.m4.
3013 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3014 * configure: Regenerate.
3015
3016 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3017
3018 PR gdb/19495
3019 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3020 call writing data to own_buf.
3021
3022 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3023
3024 * target.c (mywait): Call target_wait instead of
3025 the_target->wait.
3026 (target_wait): New function.
3027
3028 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3029
3030 * server.c (start_inferior): New variable 'ptid'. Replace calls
3031 to the_target->resume by target_continue{,_no_signal}, depending
3032 on the case.
3033 * target.c (target_stop_and_wait): Call target_continue_no_signal
3034 instead of the_target->resume.
3035 (target_continue): New function.
3036
3037 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3038
3039 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3040
3041 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3042
3043 PR server/20491
3044 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3045 ps_prochandle.
3046 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3047 * linux-arm-low.c (ps_get_thread_area): Likewise.
3048 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3049 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3050 * linux-mips-low.c (ps_get_thread_area): Likewise.
3051 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3052 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3053 * linux-x86-low.c (ps_get_thread_area): Likewise.
3054 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3055
3056 2016-08-19 Pedro Alves <palves@redhat.com>
3057
3058 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3059
3060 2016-08-19 Pedro Alves <palves@redhat.com>
3061
3062 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3063 comment. Use memcpy instead of casting through unsigned long.
3064
3065 2016-08-19 Pedro Alves <palves@redhat.com>
3066
3067 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3068 allocating around 0x80000000.
3069
3070 2016-08-19 Pedro Alves <palves@redhat.com>
3071
3072 PR gdb/20415
3073 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3074 (x32-avx512-linux-ipa.o): New rules.
3075 * configure.ac (x86_64-*-linux*): New x32 check.
3076 * configure.srv (ipa_x32_linux_regobj): New.
3077 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3078 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3079 descriptions.
3080 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3081 descriptions.
3082 * configure: Regenerate.
3083
3084 2016-08-09 Pedro Alves <palves@redhat.com>
3085
3086 PR gdb/18653
3087 * Makefile.in (OBS): Add signals-state-save-restore.o.
3088 (signals-state-save-restore.o): New rule.
3089 * config.in: Regenerate.
3090 * configure: Regenerate.
3091 * linux-low.c: Include "signals-state-save-restore.h".
3092 (linux_create_inferior): Call
3093 restore_original_signals_state.
3094 * server.c: Include "dispositions-save-restore.h".
3095 (captured_main): Call save_original_signals_state.
3096
3097 2016-08-05 Pedro Alves <palves@redhat.com>
3098
3099 * configure: Regenerate.
3100
3101 2016-08-04 Yao Qi <yao.qi@linaro.org>
3102
3103 * linux-low.c (regsets_fetch_inferior_registers): Check
3104 errno is ESRCH or not.
3105
3106 2016-08-02 Yao Qi <yao.qi@linaro.org>
3107
3108 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3109 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3110 (thread_db_load_search): Update.
3111 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3112 td_ta_set_event and td_ta_event_getmsg.
3113
3114 2016-07-26 Pedro Alves <palves@redhat.com>
3115
3116 PR server/20414
3117 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3118 of unsigned long for 64-bit registers and use uint32_t instead of
3119 unsigned int for 32-bit registers.
3120
3121 2016-07-26 Pedro Alves <palves@redhat.com>
3122
3123 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3124 to 'ptrace'.
3125
3126 2016-07-21 Tom Tromey <tom@tromey.com>
3127
3128 * configure: Rebuild.
3129
3130 2016-07-21 Yao Qi <yao.qi@linaro.org>
3131
3132 * mem-break.c (find_gdb_breakpoint): Cast bp to
3133 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3134
3135 2016-07-21 Yao Qi <yao.qi@linaro.org>
3136
3137 * server.c (handle_v_requests): Support s and S actions
3138 if target_supports_software_single_step return true.
3139
3140 2016-07-21 Yao Qi <yao.qi@linaro.org>
3141
3142 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3143 is resume_step, call maybe_hw_step.
3144 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3145 and unstop them.
3146 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3147 breakpoints or not.
3148 (proceed_one_lwp): If resume request is resume_step, install
3149 reinsert breakpoints and call maybe_hw_step.
3150
3151 2016-07-21 Yao Qi <yao.qi@linaro.org>
3152
3153 * linux-low.c (proceed_one_lwp): Declare.
3154 (linux_resume_one_thread): Remove local variable 'step'.
3155 Lift code enqueue signal. Call proceed_one_lwp instead of
3156 linux_resume_one_lwp.
3157
3158 2016-07-21 Yao Qi <yao.qi@linaro.org>
3159
3160 * linux-low.c (linux_resume_one_thread): Call
3161 enqueue_pending_signal.
3162
3163 2016-07-21 Yao Qi <yao.qi@linaro.org>
3164
3165 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3166 * inferiors.c (do_restore_current_thread_cleanup): New function.
3167 (make_cleanup_restore_current_thread): Likewise.
3168 * linux-low.c (install_software_single_step_breakpoints): Call
3169 make_cleanup_restore_current_thread. Switch current_thread to
3170 thread.
3171
3172 2016-07-21 Yao Qi <yao.qi@linaro.org>
3173
3174 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3175 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3176 (clone_one_breakpoint): Likewise.
3177 (delete_reinsert_breakpoints): Change parameter to thread.
3178 Callers updated.
3179 (has_reinsert_breakpoints): Likewise.
3180 (uninsert_reinsert_breakpoints): Likewise.
3181 (reinsert_reinsert_breakpoints): Likewise.
3182 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3183 (delete_reinsert_breakpoints): Likewise.
3184 (reinsert_reinsert_breakpoints): Likewise.
3185 (uninsert_reinsert_breakpoints): Likewise.
3186 (has_reinsert_breakpoints): Likewise.
3187
3188 2016-07-21 Yao Qi <yao.qi@linaro.org>
3189
3190 * inferiors.c (get_thread_process): Make parameter const.
3191 * inferiors.h (get_thread_process): Update declaration.
3192 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3193 Add new parameters child_thread and parent_thread. Callers
3194 updated.
3195 * mem-break.h (clone_all_breakpoints): Update declaration.
3196
3197 2016-07-21 Yao Qi <yao.qi@linaro.org>
3198
3199 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3200 <command_list, handler>: Remove.
3201 (struct gdb_breakpoint): New.
3202 (struct other_breakpoint): New.
3203 (struct reinsert_breakpoint): New.
3204 (is_gdb_breakpoint): New function.
3205 (any_persistent_commands): Update command_list if
3206 is_gdb_breakpoint returns true.
3207 (set_breakpoint): Create breakpoints according to their types.
3208 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3209 (set_gdb_breakpoint_1): Likewise.
3210 (set_gdb_breakpoint): Likewise.
3211 (clear_breakpoint_conditions): Change parameter type to
3212 'struct gdb_breakpoint *'.
3213 (clear_breakpoint_commands): Likewise.
3214 (clear_breakpoint_conditions_and_commands): Likewise.
3215 (add_condition_to_breakpoint): Likewise.
3216 (add_breakpoint_condition): Likewise.
3217 (add_commands_to_breakpoint): Likewise.
3218 (check_breakpoints): Check other_breakpoint.
3219 (clone_one_breakpoint): Clone breakpopint according to its type.
3220 * mem-break.h (struct gdb_breakpoint): Declare.
3221 (set_gdb_breakpoint): Update declaration.
3222 (clear_breakpoint_conditions_and_commands): Likewise.
3223 (add_breakpoint_condition): Likewise.
3224 (add_breakpoint_commands): Likewise.
3225 * server.c (process_point_options): Change parameter type to
3226 'struct gdb_breakpoint *'.
3227
3228 2016-07-21 Yao Qi <yao.qi@linaro.org>
3229
3230 * mem-break.c (set_breakpoint_at): Rename it to ...
3231 (set_breakpoint_type_at): ... it.
3232 (set_breakpoint_at): Call set_breakpoint_type_at.
3233 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3234 * mem-break.h (set_breakpoint_at): Update comments.
3235
3236 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3237
3238 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3239 to buf parameter.
3240 (nios2_store_gregset): Likewise.
3241
3242 2016-07-01 Pedro Alves <palves@redhat.com>
3243 Antoine Tremblay <antoine.tremblay@ericsson.com>
3244
3245 * linux-low.c: Change interface to take the target lwp_info
3246 pointer directly and return void. Handle detaching from a zombie
3247 thread.
3248 (linux_detach_lwp_callback): New function.
3249 (linux_detach): Detach from the leader thread after detaching from
3250 the clone threads.
3251
3252 2016-06-28 Yao Qi <yao.qi@linaro.org>
3253
3254 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3255 for variable new_offset.
3256 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3257 (aarch64_ftrace_insn_reloc_cb): Likewise.
3258 (aarch64_ftrace_insn_reloc_tb): Likewise.
3259 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3260 PRIx64 instead of PRIx32.
3261
3262 2016-06-28 Yao Qi <yao.qi@linaro.org>
3263
3264 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3265 (the_low_target): Install arm_get_syscall_trapinfo.
3266
3267 2016-06-28 Yao Qi <yao.qi@linaro.org>
3268
3269 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3270 function.
3271 (the_low_target): Install aarch64_get_syscall_trapinfo.
3272
3273 2016-06-28 Yao Qi <yao.qi@linaro.org>
3274
3275 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3276 Callers updated.
3277 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3278 Remove parameter sysno.
3279 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3280 sysret.
3281
3282 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3283
3284 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3285 (s390_emit_ne_goto): Likewise.
3286 (s390_emit_lt_goto): Likewise.
3287 (s390_emit_le_goto): Likewise.
3288 (s390_emit_gt_goto): Likewise.
3289 (s390_emit_ge_goto): Likewise.
3290 (s390x_emit_eq_goto): Likewise.
3291 (s390x_emit_ne_goto): Likewise.
3292 (s390x_emit_lt_goto): Likewise.
3293 (s390x_emit_le_goto): Likewise.
3294 (s390x_emit_gt_goto): Likewise.
3295 (s390x_emit_ge_goto): Likewise.
3296 (s390_emit_ops_impl): Mark variable static.
3297 (s390x_emit_ops): Likewise.
3298
3299 2016-06-17 Yao Qi <yao.qi@linaro.org>
3300
3301 * linux-low.c (handle_extended_wait): Call
3302 uninsert_reinsert_breakpoints for the parent process. Remove
3303 reinsert breakpoints from the child process. Reinsert them to
3304 the parent process when vfork is done.
3305 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3306 (reinsert_reinsert_breakpoints): New function.
3307 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3308 (reinsert_reinsert_breakpoints): Declare.
3309
3310 2016-06-17 Yao Qi <yao.qi@linaro.org>
3311
3312 * linux-low.c (handle_extended_wait): If the parent is doing
3313 step-over, remove the reinsert breakpoints from the forked child.
3314
3315 2016-06-17 Yao Qi <yao.qi@linaro.org>
3316
3317 * linux-low.c (unsuspend_all_lwps): Declare.
3318 (linux_low_filter_event): If thread exited, call finish_step_over.
3319 If step-over is finished, unsuspend other threads.
3320
3321 2016-06-17 Yao Qi <yao.qi@linaro.org>
3322
3323 * linux-low.c (linux_resume_one_lwp_throw): Assert
3324 has_reinsert_breakpoints returns false.
3325 * mem-break.c (delete_disabled_breakpoints): Assert
3326 bp type isn't reinsert_breakpoint.
3327
3328 2016-06-17 Yao Qi <yao.qi@linaro.org>
3329
3330 * linux-low.c (maybe_hw_step): New function.
3331 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3332 (finish_step_over): Switch current_thread to lwp temporarily,
3333 and assert has_reinsert_breakpoints returns true.
3334 (proceed_one_lwp): Call maybe_hw_step.
3335 * mem-break.c (has_reinsert_breakpoints): New function.
3336 * mem-break.h (has_reinsert_breakpoints): Declare.
3337
3338 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3339
3340 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3341
3342 2016-05-17 Yao Qi <yao.qi@linaro.org>
3343
3344 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3345 instead of find_inferior.
3346
3347 2016-05-05 Yao Qi <yao.qi@linaro.org>
3348
3349 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3350 Initialize res to zero.
3351
3352 2016-05-05 Yao Qi <yao.qi@linaro.org>
3353
3354 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3355 to uint32_t.
3356
3357 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3358
3359 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3360 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3361 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3362
3363 2016-04-28 Par Olsson <par.olsson@windriver.com>
3364 Simon Marchi <simon.marchi@ericsson.com>
3365
3366 * tracepoint.c (write_inferior_int8): New function.
3367 (cmd_qtenable_disable): Write enable flag using
3368 write_inferior_int8.
3369
3370 2016-04-25 Yao Qi <yao.qi@linaro.org>
3371
3372 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3373 (need_step_over_p): Return zero if the LWP has pending signals
3374 can be delivered on software single step target.
3375
3376 2016-04-25 Yao Qi <yao.qi@linaro.org>
3377
3378 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3379 return instead of error.
3380
3381 2016-04-22 Yao Qi <yao.qi@linaro.org>
3382
3383 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3384 to 23.
3385
3386 2016-04-22 Yao Qi <yao.qi@linaro.org>
3387
3388 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3389 signal when stepping over breakpoint with software single
3390 step.
3391
3392 2016-04-21 Pedro Alves <palves@redhat.com>
3393
3394 * linux-s390-low.c (s390_collect_ptrace_register)
3395 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3396 add casts.
3397 (s390_check_regset): Use void * instead of gdb_byte *.
3398
3399 2016-04-20 Pedro Alves <palves@redhat.com>
3400
3401 * configure: Renegerate.
3402
3403 2016-04-20 Yao Qi <yao.qi@linaro.org>
3404
3405 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3406 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3407 number 16.
3408 (arm_store_gregset): Likewise.
3409
3410 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3411
3412 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3413 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3414 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3415 (amd64-avx-mpx-linux.c): New rules.
3416 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3417 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3418 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3419 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3420 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3421 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3422 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3423 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3424 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3425 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3426 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3427 * linux-x86-low.c (x86_linux_read_description): Add case for
3428 X86_XSTATE_AVX_MPX_MASK.
3429 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3430 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3431 init_registers_i386_avx_mpx_linux.
3432 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3433 (initialize_low_tracepoint): Call
3434 init_registers_i386_avx_mpx_linux.
3435 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3436 (initialize_low_tracepoint): Call
3437 init_registers_amd64_avx_mpx_linux.
3438 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3439 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3440 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3441 declarations.
3442
3443 2016-04-18 Pedro Alves <palves@redhat.com>
3444
3445 * configure: Regenerate.
3446
3447 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3448
3449 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3450 (aarch64_emit_sub): Likewise.
3451
3452 2016-04-12 Pedro Alves <palves@redhat.com>
3453
3454 * utils.c (prepare_to_throw_exception): Delete.
3455
3456 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3457
3458 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3459
3460 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3461
3462 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3463
3464 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3465
3466 * linux-aarch64-ipa.c: Add <elf.h> include.
3467 * linux-ppc-ipa.c: Add <elf.h> include.
3468 * linux-s390-ipa.c: Add <elf.h> include.
3469
3470 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3471
3472 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3473 (get_raw_reg_ptr): Likewise.
3474 (get_trace_state_variable_value_ptr): Likewise.
3475 (set_trace_state_variable_value_ptr): Likewise.
3476 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3477 char *.
3478
3479 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3480 Marcin Kościelnicki <koriakin@0x04.net>
3481
3482 PR/17221
3483 * linux-ppc-low.c (emit_insns): New function.
3484 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3485 (ppc_emit_prologue): New function.
3486 (ppc_emit_epilogue): New function.
3487 (ppc_emit_add): New function.
3488 (ppc_emit_sub): New function.
3489 (ppc_emit_mul): New function.
3490 (ppc_emit_lsh): New function.
3491 (ppc_emit_rsh_signed): New function.
3492 (ppc_emit_rsh_unsigned): New function.
3493 (ppc_emit_ext): New function.
3494 (ppc_emit_zero_ext): New function.
3495 (ppc_emit_log_not): New function.
3496 (ppc_emit_bit_and): New function.
3497 (ppc_emit_bit_or): New function.
3498 (ppc_emit_bit_xor): New function.
3499 (ppc_emit_bit_not): New function.
3500 (ppc_emit_equal): New function.
3501 (ppc_emit_less_signed): New function.
3502 (ppc_emit_less_unsigned): New function.
3503 (ppc_emit_ref): New function.
3504 (ppc_emit_const): New function.
3505 (ppc_emit_reg): New function.
3506 (ppc_emit_pop): New function.
3507 (ppc_emit_stack_flush): New function.
3508 (ppc_emit_swap): New function.
3509 (ppc_emit_stack_adjust): New function.
3510 (ppc_emit_call): New function.
3511 (ppc_emit_int_call_1): New function.
3512 (ppc_emit_void_call_2): New function.
3513 (ppc_emit_if_goto): New function.
3514 (ppc_emit_goto): New function.
3515 (ppc_emit_eq_goto): New function.
3516 (ppc_emit_ne_goto): New function.
3517 (ppc_emit_lt_goto): New function.
3518 (ppc_emit_le_goto): New function.
3519 (ppc_emit_gt_goto): New function.
3520 (ppc_emit_ge_goto): New function.
3521 (ppc_write_goto_address): New function.
3522 (ppc_emit_ops_impl): New static variable.
3523 (ppc64v1_emit_prologue): New function.
3524 (ppc64v2_emit_prologue): New function.
3525 (ppc64_emit_epilogue): New function.
3526 (ppc64_emit_add): New function.
3527 (ppc64_emit_sub): New function.
3528 (ppc64_emit_mul): New function.
3529 (ppc64_emit_lsh): New function.
3530 (ppc64_emit_rsh_signed): New function.
3531 (ppc64_emit_rsh_unsigned): New function.
3532 (ppc64_emit_ext): New function.
3533 (ppc64_emit_zero_ext): New function.
3534 (ppc64_emit_log_not): New function.
3535 (ppc64_emit_bit_and): New function.
3536 (ppc64_emit_bit_or): New function.
3537 (ppc64_emit_bit_xor): New function.
3538 (ppc64_emit_bit_not): New function.
3539 (ppc64_emit_equal): New function.
3540 (ppc64_emit_less_signed): New function.
3541 (ppc64_emit_less_unsigned): New function.
3542 (ppc64_emit_ref): New function.
3543 (ppc64_emit_const): New function.
3544 (ppc64v1_emit_reg): New function.
3545 (ppc64v2_emit_reg): New function.
3546 (ppc64_emit_pop): New function.
3547 (ppc64_emit_stack_flush): New function.
3548 (ppc64_emit_swap): New function.
3549 (ppc64v1_emit_call): New function.
3550 (ppc64v2_emit_call): New function.
3551 (ppc64v1_emit_int_call_1): New function.
3552 (ppc64v2_emit_int_call_1): New function.
3553 (ppc64v1_emit_void_call_2): New function.
3554 (ppc64v2_emit_void_call_2): New function.
3555 (ppc64_emit_if_goto): New function.
3556 (ppc64_emit_eq_goto): New function.
3557 (ppc64_emit_ne_goto): New function.
3558 (ppc64_emit_lt_goto): New function.
3559 (ppc64_emit_le_goto): New function.
3560 (ppc64_emit_gt_goto): New function.
3561 (ppc64_emit_ge_goto): New function.
3562 (ppc64v1_emit_ops_impl): New static variable.
3563 (ppc64v2_emit_ops_impl): New static variable.
3564 (ppc_emit_ops): New function.
3565 (linux_low_target): Wire in ppc_emit_ops.
3566
3567 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3568 Marcin Kościelnicki <koriakin@0x04.net>
3569
3570 PR/17221
3571 * Makefile.in: Add powerpc-*-ipa.o
3572 * configure.srv: Add ipa_obj for powerpc*-linux.
3573 * linux-ppc-ipa.c: New file.
3574 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3575 includes.
3576 (PPC_FIELD): New macro.
3577 (PPC_SEXT): New macro.
3578 (PPC_OP6): New macro.
3579 (PPC_BO): New macro.
3580 (PPC_LI): New macro.
3581 (PPC_BD): New macro.
3582 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3583 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3584 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3585 (ppc_get_thread_area): New function.
3586 (is_elfv2_inferior): New function.
3587 (gen_ds_form): New function.
3588 (GEN_STD): New macro.
3589 (GEN_STDU): New macro.
3590 (GEN_LD): New macro.
3591 (GEN_LDU): New macro.
3592 (gen_d_form): New function.
3593 (GEN_ADDI): New macro.
3594 (GEN_ADDIS): New macro.
3595 (GEN_LI): New macro.
3596 (GEN_LIS): New macro.
3597 (GEN_ORI): New macro.
3598 (GEN_ORIS): New macro.
3599 (GEN_LWZ): New macro.
3600 (GEN_STW): New macro.
3601 (GEN_STWU): New macro.
3602 (gen_xfx_form): New function.
3603 (GEN_MFSPR): New macro.
3604 (GEN_MTSPR): New macro.
3605 (GEN_MFCR): New macro.
3606 (GEN_MTCR): New macro.
3607 (GEN_SYNC): New macro.
3608 (GEN_LWSYNC): New macro.
3609 (gen_x_form): New function.
3610 (GEN_OR): New macro.
3611 (GEN_MR): New macro.
3612 (GEN_LWARX): New macro.
3613 (GEN_STWCX): New macro.
3614 (GEN_CMPW): New macro.
3615 (gen_md_form): New function.
3616 (GEN_RLDICL): New macro.
3617 (GEN_RLDICR): New macro.
3618 (gen_i_form): New function.
3619 (GEN_B): New macro.
3620 (GEN_BL): New macro.
3621 (gen_b_form): New function.
3622 (GEN_BNE): New macro.
3623 (GEN_LOAD): New macro.
3624 (GEN_STORE): New macro.
3625 (gen_limm): New function.
3626 (gen_atomic_xchg): New function.
3627 (gen_call): New function.
3628 (ppc_relocate_instruction): New function.
3629 (ppc_install_fast_tracepoint_jump_pad): New function.
3630 (ppc_get_min_fast_tracepoint_insn_len): New function.
3631 (ppc_get_ipa_tdesc_idx): New function.
3632 (the_low_target): Wire in the new functions.
3633 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3634 tdescs.
3635 * linux-ppc-tdesc.h: New file.
3636
3637 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3638
3639 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3640 (alloc_jump_pad_buffer): New function.
3641 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3642 (alloc_jump_pad_buffer): New function.
3643 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3644 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3645 (alloc_jump_pad_buffer): New function.
3646 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3647 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3648 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3649 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3650
3651 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3652
3653 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3654 * linux-amd64-ipa.c: Likewise.
3655 * linux-i386-ipa.c: Likewise.
3656 * linux-s390-ipa.c: Likewise.
3657 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3658 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3659 set_trace_state_variable_value_ptr.
3660 (struct ipa_sym_addresses): Likewise.
3661 (symbol_list): Likewise.
3662 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3663 accessing gdb_collect directly.
3664 (gdb_collect_ptr_type): New typedef.
3665 (get_raw_reg_ptr_type): New typedef.
3666 (get_trace_state_variable_value_ptr_type): New typedef.
3667 (set_trace_state_variable_value_ptr_type): New typedef.
3668 (gdb_collect_ptr): New global.
3669 (get_raw_reg_ptr): New global.
3670 (get_trace_state_variable_value_ptr): New global.
3671 (set_trace_state_variable_value_ptr): New global.
3672 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3673 accessing get_raw_reg directly.
3674 (get_get_tsv_func_addr): Likewise for
3675 get_trace_state_variable_value_ptr.
3676 (get_set_tsv_func_addr): Likewise for
3677 set_trace_state_variable_value_ptr.
3678 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3679
3680 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3681
3682 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3683
3684 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3685
3686 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3687 packets.
3688 (relocate_instruction): Remove own_buf.
3689 * server.c (own_buf): Make global.
3690 (handle_v_requests): Make global.
3691 * server.h (own_buf): New declaration.
3692 (handle_v_requests): New prototype.
3693
3694 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3695
3696 PR 18377
3697 * linux-s390-low.c (add_insns): New function.
3698 (s390_emit_prologue): New function.
3699 (s390_emit_epilogue): New function.
3700 (s390_emit_add): New function.
3701 (s390_emit_sub): New function.
3702 (s390_emit_mul): New function.
3703 (s390_emit_lsh): New function.
3704 (s390_emit_rsh_signed): New function.
3705 (s390_emit_rsh_unsigned): New function.
3706 (s390_emit_ext): New function.
3707 (s390_emit_log_not): New function.
3708 (s390_emit_bit_and): New function.
3709 (s390_emit_bit_or): New function.
3710 (s390_emit_bit_xor): New function.
3711 (s390_emit_bit_not): New function.
3712 (s390_emit_equal): New function.
3713 (s390_emit_less_signed): New function.
3714 (s390_emit_less_unsigned): New function.
3715 (s390_emit_ref): New function.
3716 (s390_emit_if_goto): New function.
3717 (s390_emit_goto): New function.
3718 (s390_write_goto_address): New function.
3719 (s390_emit_litpool): New function.
3720 (s390_emit_const): New function.
3721 (s390_emit_call): New function.
3722 (s390_emit_reg): New function.
3723 (s390_emit_pop): New function.
3724 (s390_emit_stack_flush): New function.
3725 (s390_emit_zero_ext): New function.
3726 (s390_emit_swap): New function.
3727 (s390_emit_stack_adjust): New function.
3728 (s390_emit_set_r2): New function.
3729 (s390_emit_int_call_1): New function.
3730 (s390_emit_void_call_2): New function.
3731 (s390_emit_eq_goto): New function.
3732 (s390_emit_ne_goto): New function.
3733 (s390_emit_lt_goto): New function.
3734 (s390_emit_le_goto): New function.
3735 (s390_emit_gt_goto): New function.
3736 (s390_emit_ge_goto): New function.
3737 (s390x_emit_prologue): New function.
3738 (s390x_emit_epilogue): New function.
3739 (s390x_emit_add): New function.
3740 (s390x_emit_sub): New function.
3741 (s390x_emit_mul): New function.
3742 (s390x_emit_lsh): New function.
3743 (s390x_emit_rsh_signed): New function.
3744 (s390x_emit_rsh_unsigned): New function.
3745 (s390x_emit_ext): New function.
3746 (s390x_emit_log_not): New function.
3747 (s390x_emit_bit_and): New function.
3748 (s390x_emit_bit_or): New function.
3749 (s390x_emit_bit_xor): New function.
3750 (s390x_emit_bit_not): New function.
3751 (s390x_emit_equal): New function.
3752 (s390x_emit_less_signed): New function.
3753 (s390x_emit_less_unsigned): New function.
3754 (s390x_emit_ref): New function.
3755 (s390x_emit_if_goto): New function.
3756 (s390x_emit_const): New function.
3757 (s390x_emit_call): New function.
3758 (s390x_emit_reg): New function.
3759 (s390x_emit_pop): New function.
3760 (s390x_emit_stack_flush): New function.
3761 (s390x_emit_zero_ext): New function.
3762 (s390x_emit_swap): New function.
3763 (s390x_emit_stack_adjust): New function.
3764 (s390x_emit_int_call_1): New function.
3765 (s390x_emit_void_call_2): New function.
3766 (s390x_emit_eq_goto): New function.
3767 (s390x_emit_ne_goto): New function.
3768 (s390x_emit_lt_goto): New function.
3769 (s390x_emit_le_goto): New function.
3770 (s390x_emit_gt_goto): New function.
3771 (s390x_emit_ge_goto): New function.
3772 (s390_emit_ops): New function.
3773 (struct linux_target_ops): Fill in emit_ops hook.
3774
3775 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3776
3777 PR 18377
3778 * Makefile.in: Add s390 IPA files.
3779 * configure.srv: Build IPA for s390.
3780 * linux-s390-ipa.c: New file.
3781 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3782 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3783 (tdesc_s390_linux32): Likewise.
3784 (init_registers_s390_linux32v1): Likewise.
3785 (tdesc_s390_linux32v1): Likewise.
3786 (init_registers_s390_linux32v2): Likewise.
3787 (tdesc_s390_linux32v2): Likewise.
3788 (init_registers_s390_linux64): Likewise.
3789 (tdesc_s390_linux64): Likewise.
3790 (init_registers_s390_linux64v1): Likewise.
3791 (tdesc_s390_linux64v1): Likewise.
3792 (init_registers_s390_linux64v2): Likewise.
3793 (tdesc_s390_linux64v2): Likewise.
3794 (init_registers_s390_te_linux64): Likewise.
3795 (tdesc_s390_te_linux64): Likewise.
3796 (init_registers_s390_vx_linux64): Likewise.
3797 (tdesc_s390_vx_linux64): Likewise.
3798 (init_registers_s390_tevx_linux64): Likewise.
3799 (tdesc_s390_tevx_linux64): Likewise.
3800 (init_registers_s390x_linux64): Likewise.
3801 (tdesc_s390x_linux64): Likewise.
3802 (init_registers_s390x_linux64v1): Likewise.
3803 (tdesc_s390x_linux64v1): Likewise.
3804 (init_registers_s390x_linux64v2): Likewise.
3805 (tdesc_s390x_linux64v2): Likewise.
3806 (init_registers_s390x_te_linux64): Likewise.
3807 (tdesc_s390x_te_linux64): Likewise.
3808 (init_registers_s390x_vx_linux64): Likewise.
3809 (tdesc_s390x_vx_linux64): Likewise.
3810 (init_registers_s390x_tevx_linux64): Likewise.
3811 (tdesc_s390x_tevx_linux64): Likewise.
3812 (have_hwcap_s390_vx): New static variable.
3813 (s390_arch_setup): Fill have_hwcap_s390_vx.
3814 (s390_get_thread_area): New function.
3815 (s390_ft_entry_gpr_esa): New const.
3816 (s390_ft_entry_gpr_zarch): New const.
3817 (s390_ft_entry_misc): New const.
3818 (s390_ft_entry_fr): New const.
3819 (s390_ft_entry_vr): New const.
3820 (s390_ft_main_31): New const.
3821 (s390_ft_main_64): New const.
3822 (s390_ft_exit_fr): New const.
3823 (s390_ft_exit_vr): New const.
3824 (s390_ft_exit_misc): New const.
3825 (s390_ft_exit_gpr_esa): New const.
3826 (s390_ft_exit_gpr_zarch): New const.
3827 (append_insns): New function.
3828 (s390_relocate_instruction): New function.
3829 (s390_install_fast_tracepoint_jump_pad): New function.
3830 (s390_get_min_fast_tracepoint_insn_len): New function.
3831 (s390_get_ipa_tdesc_idx): New function.
3832 (struct linux_target_ops): Wire in the above functions.
3833 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3834 * linux-s390-tdesc.h: New file.
3835
3836 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3837
3838 * linux-s390-low.c (s390_supports_tracepoints): New function.
3839 (struct linux_target_ops): Fill supports_tracepoints hook.
3840
3841 2016-03-18 Yao Qi <yao.qi@linaro.org>
3842
3843 * linux-low.c (lwp_signal_can_be_delivered): New function.
3844 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3845
3846 2016-03-18 Yao Qi <yao.qi@linaro.org>
3847
3848 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3849 0 if signal is enqueued. Remove 'signal' from one debugging
3850 message. Move one debugging message to some lines below.
3851 Remove code setting 'signal' to 0.
3852
3853 2016-03-18 Yao Qi <yao.qi@linaro.org>
3854
3855 * linux-low.c (linux_low_filter_event): Remove redundant
3856 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3857
3858 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3859
3860 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3861 (struct linux_target_ops): Wire in the above.
3862
3863 2016-03-03 Yao Qi <yao.qi@linaro.org>
3864
3865 * linux-low.c: Update comments to start_step_over.
3866
3867 2016-03-03 Yao Qi <yao.qi@linaro.org>
3868
3869 PR server/19736
3870 * linux-low.c (handle_extended_wait): Set child suspended
3871 if event_lwp->bp_reinsert isn't zero.
3872
3873 2016-03-02 Yao Qi <yao.qi@linaro.org>
3874
3875 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3876 enqueue_pending_signal.
3877
3878 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3879
3880 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3881 is actually loaded.
3882
3883 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3884
3885 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3886 (s390_regmap_3264) [!__s390x__]: New global.
3887 (s390_collect_ptrace_register): Skip map entries containing -1.
3888 (s390_supply_ptrace_register): Ditto.
3889 (s390_fill_gprs_high): New function.
3890 (s390_store_gprs_high): New function.
3891 (s390_regsets): Add NT_S390_HIGH_GPRS.
3892 (s390_get_hwcap): Enable on 31-bit.
3893 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3894 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3895 Detect NT_S390_HIGH_GPRS.
3896 (s390_usrregs_info_3264): Enable on 31-bit.
3897 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3898 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3899
3900 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3901
3902 PR gdb/13808
3903 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3904 * configure.srv: Ditto.
3905 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3906 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3907 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3908 (init_registers_amd64_linux): Remove prototype.
3909 (tdesc_amd64_linux): Remove declaration.
3910 (get_ipa_tdesc): New function.
3911 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3912 initialize remaining tdescs.
3913 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3914 (init_registers_i386_linux): Remove prototype.
3915 (tdesc_i386_linux): Remove declaration.
3916 (get_ipa_tdesc): New function.
3917 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3918 initialize remaining tdescs.
3919 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3920 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3921 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3922 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3923 (x86_get_ipa_tdesc_idx): New function.
3924 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3925 * linux-x86-tdesc.h: New file.
3926 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3927 (target_get_ipa_tdesc_idx): New macro.
3928 * tracepoint.c (ipa_tdesc_idx): New macro.
3929 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3930 (symbol_list): Add ipa_tdesc_idx.
3931 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3932 (ipa_tdesc): Remove.
3933 (ipa_tdesc_idx): New variable.
3934 (get_context_regcache): Use get_ipa_tdesc.
3935 (gdb_collect): Ditto.
3936 (gdb_probe): Ditto.
3937 * tracepoint.h (get_ipa_tdesc): New prototype.
3938 (ipa_tdesc): Remove.
3939
3940 2016-02-24 Pedro Alves <palves@redhat.com>
3941
3942 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3943 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3944 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3945 Factor out common code between the USE_SIGTRAP_SIGINFO and
3946 !USE_SIGTRAP_SIGINFO blocks.
3947 (linux_low_filter_event): Call save_stop_reason instead of
3948 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3949 Update comments.
3950 (linux_wait_1): Update comments.
3951
3952 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3953
3954 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3955 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3956 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3957 ppc_insert_point, ppc_remove_point.
3958
3959 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3960
3961 * linux-s390-low.c (s390_supports_z_point_type): New function.
3962 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3963
3964 2016-02-16 Yao Qi <yao.qi@linaro.org>
3965
3966 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3967 PC. Get pc from regcache_read_pc.
3968
3969 2016-02-12 Yao Qi <yao.qi@linaro.org>
3970
3971 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3972 or linux_get_pc_32bit.
3973 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3974
3975 2016-02-12 Yao Qi <yao.qi@linaro.org>
3976
3977 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3978 arm_linux_get_next_pcs_fixup.
3979
3980 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3981
3982 * tracepoint.c (x_tracepoint_action_download): Change
3983 write_inferior_data_ptr to write_inferior_data_pointer.
3984 (cmd_qtstart): Likewise.
3985 (write_inferior_data_ptr): Remove.
3986 (download_agent_expr): Change write_inferior_data_ptr to
3987 write_inferior_data_pointer.
3988 (download_tracepoint_1): Likewise.
3989 (download_tracepoint): Likewise.
3990 (download_trace_state_variables): Likewise.
3991
3992 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3993 Marcin Kościelnicki <koriakin@0x04.net>
3994
3995 * tracepoint.c (struct tracepoint_action_ops): Remove.
3996 (struct tracepoint_action): Remove ops.
3997 (m_tracepoint_action_download, r_tracepoint_action_download)
3998 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3999 size and offset accordingly.
4000 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4001 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4002 (tracepoint_action_send, tracepoint_action_download): New functions.
4003 Helpers for trace action handlers.
4004 (add_tracepoint_action): Remove setup actions ops.
4005 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4006
4007 2016-02-10 Yao Qi <yao.qi@linaro.org>
4008
4009 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4010
4011 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4012
4013 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4014 to AC_OUTPUT.
4015 * configure: Regenerate.
4016
4017 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4018
4019 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4020 void * to gdb_byte *.
4021 * linux-low.c (siginfo_fixup): Likewise.
4022 (linux_xfer_siginfo): Likewise.
4023 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4024 Likewise.
4025 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4026
4027 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4028
4029 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4030 to srv_tgtobj.
4031 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4032 to srv_tgtobj.
4033 * linux-x86-low.c [__x86_64__]: Include
4034 "nat/amd64-linux-siginfo.h".
4035 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4036 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4037 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4038 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4039 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4040 (cpt_si_fd, si_timerid, si_overrun): Move from
4041 nat/amd64-linux-siginfo.c.
4042 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4043
4044 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4045
4046 * server.c (skip_to_semicolon): Remove.
4047 (process_point_options): Use strchrnul instead of
4048 skip_to_semicolon.
4049
4050 2016-01-26 Yao Qi <yao.qi@linaro.org>
4051
4052 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4053 * linux-low.c (install_software_single_step_breakpoints): Don't
4054 call regcache_read_pc.
4055 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4056 argument pc.
4057
4058 2016-01-26 Yao Qi <yao.qi@linaro.org>
4059
4060 * linux-low.c (install_software_single_step_breakpoints): Call
4061 regcache_read_pc instead of get_pc.
4062
4063 2016-01-26 Yao Qi <yao.qi@linaro.org>
4064
4065 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4066 (unblock_async_io): Rename to ...
4067 (block_unblock_async_io): ... it. New function.
4068 (enable_async_io): Don't install SIGIO handler. Unblock it
4069 instead.
4070 (disable_async_io): Don't ignore SIGIO. Block it instead.
4071 (initialize_async_io): Install SIGIO handler. Don't call
4072 unblock_async_io.
4073
4074 2016-01-26 Yao Qi <yao.qi@linaro.org>
4075
4076 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4077 first character is '\003', call *the_target->request_interrupt.
4078
4079 2016-01-25 Yao Qi <yao.qi@linaro.org>
4080
4081 * remote-utils.c (new_thread_notify): Remove.
4082 (dead_thread_notify): Likewise.
4083 * remote-utils.h (new_thread_notify): Remove declaration.
4084 (dead_thread_notify): Likewise.
4085
4086 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4087
4088 * gdb.trace/pending.exp: Fix expected message on continue.
4089
4090 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4091
4092 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4093 it works properly on big-endian machines where sizeof (CORE_ADDR)
4094 != sizeof (void *).
4095
4096 2016-01-21 Pedro Alves <palves@redhat.com>
4097
4098 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4099 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4100 * configure: Regenerate.
4101
4102 2016-01-21 Yao Qi <yao.qi@linaro.org>
4103
4104 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4105 is_thumb and set it according to CPSR saved on the stack.
4106 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4107 arm_sigreturn_next_pc.
4108
4109 2016-01-18 Yao Qi <yao.qi@linaro.org>
4110
4111 * linux-low.c (linux_set_pc_64bit): New function.
4112 (linux_get_pc_64bit): New function.
4113 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4114 Declare.
4115 * linux-sparc-low.c (debug_threads): Remove declaration.
4116 (sparc_get_pc): Remove.
4117 (the_low_target): Use linux_get_pc_64bit instead of
4118 sparc_get_pc.
4119 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4120 (the_low_target): Use linux_get_pc_64bit and
4121 linux_set_pc_64bit.
4122
4123 2016-01-18 Yao Qi <yao.qi@linaro.org>
4124
4125 * linux-arm-low.c (debug_threads): Remove declaration.
4126 (arm_get_pc, arm_set_pc): Remove.
4127 (the_low_target): Use linux_get_pc_32bit and
4128 linux_set_pc_32bit.
4129 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4130 (the_low_target): Use linux_get_pc_32bit and
4131 linux_set_pc_32bit.
4132 * linux-cris-low.c (debug_threads): Remove declaration.
4133 (cris_get_pc, cris_set_pc,): Remove.
4134 (the_low_target): Use linux_get_pc_32bit and
4135 linux_set_pc_32bit.
4136 * linux-crisv32-low.c (debug_threads): Remove declaration.
4137 (cris_get_pc, cris_set_pc): Remove.
4138 (the_low_target): Use linux_get_pc_32bit and
4139 linux_set_pc_32bit.
4140 * linux-low.c: Include inttypes.h.
4141 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4142 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4143 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4144 (the_low_target): Use linux_get_pc_32bit and
4145 linux_set_pc_32bit.
4146 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4147 (the_low_target): Use linux_get_pc_32bit and
4148 linux_set_pc_32bit.
4149 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4150 (the_low_target): Use linux_get_pc_32bit and
4151 linux_set_pc_32bit.
4152 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4153 (the_low_target): Use linux_get_pc_32bit and
4154 linux_set_pc_32bit.
4155 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4156 (the_low_target): Use linux_get_pc_32bit and
4157 linux_set_pc_32bit.
4158
4159 2016-01-18 Gary Benson <gbenson@redhat.com>
4160
4161 * configure.ac (AC_FUNC_FORK): New check.
4162 * config.in: Regenerate.
4163 * configure: Likewise.
4164
4165 2016-01-14 Yao Qi <yao.qi@linaro.org>
4166
4167 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4168 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4169 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4170 arm_get_next_pcs_ctor.
4171
4172 2016-01-12 Josh Stone <jistone@redhat.com>
4173 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4174
4175 * inferiors.h: Include "gdb_vecs.h".
4176 (struct process_info): Add syscalls_to_catch.
4177 * inferiors.c (remove_process): Free syscalls_to_catch.
4178 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4179 syscall_return stops.
4180 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4181 * server.c (handle_general_set): Handle QCatchSyscalls.
4182 (handle_query): Report support for QCatchSyscalls.
4183 * target.h (struct target_ops): Add supports_catch_syscall.
4184 (target_supports_catch_syscall): New macro.
4185 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4186 (struct lwp_info): Add syscall_state.
4187 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4188 Maintain syscall_state and syscalls_to_catch across exec.
4189 (get_syscall_trapinfo): New function, proxy to the_low_target.
4190 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4191 (linux_low_filter_event): Toggle syscall_state entry/return for
4192 syscall traps, and set it ignored for all others.
4193 (gdb_catching_syscalls_p): New function.
4194 (gdb_catch_this_syscall_p): New function.
4195 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4196 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4197 (linux_supports_catch_syscall): New function.
4198 (linux_target_ops): Install it.
4199 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4200 (the_low_target): Install it.
4201
4202 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4203
4204 * acinclude.m4: Include new ../warning.m4 file.
4205 * configure: Regenerated.
4206 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4207
4208 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4209
4210 * ax.c (is_goto_target): Mark static.
4211 * linux-low.c (register_addr): Likewise.
4212 (linux_fetch_registers, linux_store_registers): Likewise.
4213 * mem-break.c (any_persistent_commands): Fix old prototype.
4214 (add_commands_to_breakpoint): Mark static.
4215 * regcache.c (find_register_by_name): Delete unused func.
4216 * remote-utils.c (hex_or_minus_one): Mark static.
4217 * server.c (monitor_show_help): Mark static.
4218 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4219 handle_v_requests): Likewise.
4220
4221 2016-01-12 Pedro Alves <palves@redhat.com>
4222
4223 Remove use of the registered trademark symbol throughout.
4224
4225 2016-01-08 Yao Qi <yao.qi@linaro.org>
4226
4227 * remote-utils.c (getpkt): If c is '\003', call target hook
4228 request_interrupt.
4229
4230 2016-01-06 Yao Qi <yao.qi@linaro.org>
4231
4232 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4233 linux-aarch32-low.c.
4234 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4235 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4236 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4237 (thumb2_breakpoint): Declare.
4238 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4239 linux-aarch32-low.h.
4240 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4241 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4242 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4243
4244 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4245
4246 * gdbreplay.c (gdbreplay_version): Change copyright year in
4247 version message.
4248 * server.c (gdbserver_version): Likewise.
4249
4250 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4251
4252 * server.c (crc32_table): Delete.
4253 (crc32): Use libiberty's xcrc32 function.
4254
4255 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4256
4257 * lynx-low.c (lynx_delete_thread_callback): New function.
4258 (lynx_mourn): Properly delete our process and all of its
4259 threads. Remove call to clear_inferiors.
4260
4261 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4262
4263 * target.c (thread_search_callback): Add check that
4264 the thread_stopped target callback is not NULL before
4265 calling it.
4266
4267 2015-12-21 Yao Qi <yao.qi@linaro.org>
4268
4269 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4270 arm breakpoint.
4271
4272 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4273
4274 * server.c (handle_query): Call target_supports_software_single_step.
4275
4276 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4277
4278 * linux-low.c (single_step): New function.
4279 (linux_resume_one_lwp_throw): Call single_step.
4280 (start_step_over): Likewise.
4281
4282 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4283
4284 * Makefile.in (SFILES): Append arch/arm-linux.c,
4285 arch/arm-get-next-pcs.c.
4286 (arm-linux.o): New rule.
4287 (arm-get-next-pcs.o): New rule.
4288 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4289 arm-linux.o.
4290 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4291 to 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): Make non-static.
4297 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4298 from linux-aarch32-low.c.
4299 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4300 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4301 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4302 (thumb2_breakpoint_len): Likewise.
4303 (arm_is_thumb_mode): New declaration.
4304 * linux-arm-low.c: Include arch/arm-linux.h
4305 aarch/arm-get-next-pcs.h, sys/syscall.h.
4306 (get_next_pcs_ops): New struct.
4307 (get_next_pcs_addr_bits_remove): New function.
4308 (get_next_pcs_is_thumb): New function.
4309 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4310 (arm_sigreturn_next_pc): Likewise.
4311 (get_next_pcs_syscall_next_pc): Likewise.
4312 (arm_gdbserver_get_next_pcs): Likewise.
4313 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4314 Initialize.
4315 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4316 * server.h: Include gdb_vecs.h.
4317
4318 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4319
4320 * Makefile.in (SFILES): Append common/common-regcache.c.
4321 (OBS): Append common-regcache.o.
4322 (common-regcache.o): New rule.
4323 * regcache.c (init_register_cache): Initialize cache to
4324 REG_UNAVAILABLE.
4325 (regcache_raw_read_unsigned): New function.
4326 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4327 register_status enum.
4328
4329 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4330
4331 * linux-aarch64-low.c (the_low_targets): Rename
4332 breakpoint_reinsert_addr to get_next_pcs.
4333 * linux-arm-low.c (the_low_targets): Likewise.
4334 * linux-bfin-low.c (the_low_targets): Likewise.
4335 * linux-cris-low.c (the_low_targets): Likewise.
4336 * linux-crisv32-low.c (the_low_targets): Likewise.
4337 * linux-low.c (can_software_single_step): Likewise.
4338 (install_software_single_step_breakpoints): New function.
4339 (start_step_over): Use install_software_single_step_breakpoints.
4340 * linux-low.h: New CORE_ADDR vector.
4341 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4342 get_next_pcs.
4343 * linux-mips-low.c (the_low_targets): Likewise.
4344 * linux-nios2-low.c (the_low_targets): Likewise.
4345 * linux-sparc-low.c (the_low_targets): Likewise.
4346
4347 2015-12-17 Pedro Alves <palves@redhat.com>
4348
4349 * linux-low.c (linux_kill_one_lwp): Remove references to
4350 LinuxThreads.
4351 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4352 to 'kill'.
4353 (linux_init_signals): Delete.
4354 (initialize_low): Adjust.
4355 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4356
4357 2015-12-16 Pedro Alves <palves@redhat.com>
4358
4359 * configure.ac (compiler warning flags): When testing a
4360 -Wno-foo option, check whether -Wfoo works instead.
4361 * configure: Regenerate.
4362
4363 2015-12-11 Don Breazeal <donb@codesourcery.com>
4364
4365 * server.c (process_serial_event): Don't exit from gdbserver
4366 in remote mode if there are still active inferiors.
4367
4368 2015-12-11 Yao Qi <yao.qi@linaro.org>
4369
4370 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4371 arm_breakpoint_at if the process is 32-bit.
4372
4373 2015-12-11 Yao Qi <yao.qi@linaro.org>
4374
4375 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4376 arm breakpoint.
4377
4378 2015-12-07 Yao Qi <yao.qi@linaro.org>
4379
4380 * configure.srv: Append arm.o to srv_tgtobj for
4381 aarch64*-*-linux* target.
4382 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4383 from linux-arm-low.c.
4384 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4385 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4386 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4387 (thumb2_breakpoint_len): Likewise.
4388 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4389 (arm_breakpoint_kinds): Likewise.
4390 (arm_breakpoint_kind_from_pc): Likewise.
4391 (arm_sw_breakpoint_from_kind): Likewise.
4392 (arm_breakpoint_kind_from_current_state): Likewise.
4393 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4394 (arm_sw_breakpoint_from_kind): Declare.
4395 (arm_breakpoint_kind_from_current_state): Declare.
4396 (arm_breakpoint_at): Declare.
4397 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4398 arm_sw_breakpoint_from_kind if process is 32-bit.
4399 (aarch64_breakpoint_kind_from_pc): New function.
4400 (aarch64_breakpoint_kind_from_current_state): New function.
4401 (the_low_target): Initialize fields breakpoint_kind_from_pc
4402 and breakpoint_kind_from_current_state.
4403 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4404 linux-aarch32-low.c.
4405 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4406 (arm_breakpoint, arm_breakpoint_len): Likewise.
4407 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4408 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4409 (arm_is_thumb_mode): Likewise.
4410 (arm_breakpoint_at): Likewise.
4411 (arm_breakpoint_kind_from_pc): Likewise.
4412 (arm_sw_breakpoint_from_kind): Likewise.
4413 (arm_breakpoint_kind_from_current_state): Likewise.
4414
4415 Revert:
4416 2015-08-04 Yao Qi <yao.qi@linaro.org>
4417
4418 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4419 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4420 * server.c (extended_protocol): Remove "static".
4421 * server.h (extended_protocol): Declare it.
4422
4423 2015-12-04 Josh Stone <jistone@redhat.com>
4424
4425 * target.h (struct target_ops) <arch_setup>: Rename to ...
4426 (struct target_ops) <post_create_inferior>: ... this.
4427 (target_arch_setup): Rename to ...
4428 (target_post_create_inferior): ... this, calling post_create_inferior.
4429 * server.c (start_inferior): Update target_arch_setup calls to
4430 target_post_create_inferior.
4431 * linux-low.c (linux_low_ptrace_options): Forward declare.
4432 (linux_arch_setup): Update its comment for general use.
4433 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4434 (struct linux_target_ops): Use linux_post_create_inferior.
4435 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4436 to post_create_inferior.
4437 * nto-low.c (struct nto_target_ops): Likewise.
4438 * spu-low.c (struct spu_target_ops): Likewise.
4439 * win32-low.c (struct win32_target_ops): Likewise.
4440
4441 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4442
4443 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4444
4445 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4446
4447 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4448 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4449 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4450 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4451 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4452 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4453 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4454 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4455 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4456 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4457 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4458 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4459
4460 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4461
4462 * linux-low.c (linux_look_up_symbols): Don't call
4463 linux_supports_traceclone.
4464 * linux-low.h (thread_db_init): Remove use_events argument.
4465 * thread-db.c (thread_db_use_event): Remove global variable.
4466 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4467 (struct thread_db) <td_create_bp>: Remove field.
4468 (thread_db_create_event): Remove function.
4469 (thread_db_enable_reporting): Likewise.
4470 (find_one_thread): Don't check for thread_db_use_events.
4471 (attach_thread): Likewise.
4472 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4473 (try_thread_db_load_1): Don't check for thread_db_use_events.
4474 (thread_db_init): Remove use_events argument and thread events
4475 handling.
4476 (remove_thread_event_breakpoints): Remove function.
4477 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4478
4479 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4480
4481 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4482 New function.
4483 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4484 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4485 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4486 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4487 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4488 Initialize.
4489 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4490 New function.
4491 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4492 * linux-low.c (can_hardware_single_step): Use
4493 supports_hardware_single_step.
4494 (can_software_single_step): New function.
4495 (start_step_over): Call can_software_single_step.
4496 (linux_supports_hardware_single_step): New function.
4497 (struct target_ops) <supports_software_single_step>: Initialize.
4498 * linux-low.h (struct linux_target_ops)
4499 <supports_hardware_single_step>: Initialize.
4500 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4501 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4502 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4503 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4504 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4505 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4506 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4507 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4508 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4509 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4510 Initialize.
4511 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4512 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4513 Initialize.
4514 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4515 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4516 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4517 New function.
4518 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4519 * target.h (struct target_ops): <supports_software_single_step>:
4520 New field.
4521 (target_supports_software_single_step): New macro.
4522
4523 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4524
4525 * linux-low.c (linux_wait_1): Fix pc advance condition.
4526 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4527 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4528
4529 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4530
4531 * linux-arm-low.c (arm_is_thumb_mode): New function.
4532 (arm_breakpoint_at): Use arm_is_thumb_mode.
4533 (arm_breakpoint_kind_from_current_state): New function.
4534 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4535 Initialize.
4536 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4537 (linux_breakpoint_kind_from_current_state): New function.
4538 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4539 * linux-low.h (struct linux_target_ops)
4540 <breakpoint_kind_from_current_state>: New field.
4541 * target.h (struct target_ops): Likewise.
4542 (target_breakpoint_kind_from_current_state): New macro.
4543
4544 2015-11-30 Pedro Alves <palves@redhat.com>
4545
4546 * linux-low.c (linux_resume): Wake up the event loop before
4547 returning.
4548
4549 2015-11-30 Pedro Alves <palves@redhat.com>
4550
4551 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4552 check.
4553 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4554 to -1.
4555 * target.c (struct thread_search): New structure.
4556 (thread_search_callback): New function.
4557 (prev_general_thread): New global.
4558 (prepare_to_access_memory, done_accessing_memory): New functions.
4559 * target.h (prepare_to_access_memory, done_accessing_memory):
4560 Replace macros with function declarations.
4561
4562 2015-11-30 Pedro Alves <palves@redhat.com>
4563
4564 PR 14618
4565 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4566 report TARGET_WAITKIND_NO_RESUMED.
4567 * remote-utils.c (prepare_resume_reply): Handle
4568 TARGET_WAITKIND_NO_RESUMED.
4569 * server.c (report_no_resumed): New global.
4570 (handle_query) <qSupported>: Handle "no-resumed+". Report
4571 "no-resumed+" support.
4572 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4573 return error if the client doesn't support no-resumed events.
4574 (push_stop_notification): New function.
4575 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4576 events if the client supports them.
4577
4578 2015-11-30 Pedro Alves <palves@redhat.com>
4579
4580 * linux-low.c (thread_still_has_status_pending_p): Don't check
4581 vCont;t here.
4582 (lwp_resumed): New function.
4583 (status_pending_p_callback): Return early if the LWP is not
4584 supposed to be resumed.
4585
4586 2015-11-30 Pedro Alves <palves@redhat.com>
4587
4588 * linux-low.c (handle_extended_wait): Assert that the LWP's
4589 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4590 thread create events, leave the new child's status pending.
4591 (linux_low_filter_event): If GDB wants to hear about thread exit
4592 events, leave the LWP marked dead and don't delete it.
4593 (linux_wait_for_event_filtered): Don't check for thread exit.
4594 (filter_exit_event): New function.
4595 (linux_wait_1): Use it, when returning an exit event.
4596 (linux_resume_one_lwp_throw): Assert that the LWP's
4597 waitstatus is TARGET_WAITKIND_IGNORE.
4598 * remote-utils.c (prepare_resume_reply): Handle
4599 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4600 * server.c (report_thread_events): New global.
4601 (handle_general_set): Handle QThreadEvents.
4602 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4603 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4604 TARGET_WAITKIND_THREAD_EXITED.
4605 * server.h (report_thread_events): Declare.
4606
4607 2015-11-30 Pedro Alves <palves@redhat.com>
4608
4609 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4610 the thread's last_resume_kind was resume_stop.
4611
4612 2015-11-30 Pedro Alves <palves@redhat.com>
4613
4614 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4615 before returning.
4616
4617 2015-11-30 Pedro Alves <palves@redhat.com>
4618
4619 * server.c (handle_v_requests): Handle vCtrlC.
4620
4621 2015-11-30 Pedro Alves <palves@redhat.com>
4622
4623 * gdbthread.h (find_any_thread_of_pid): Declare.
4624 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4625 functions.
4626 * server.c (handle_query): If current_thread is NULL, look for
4627 another thread of the selected process.
4628
4629 2015-11-26 Daniel Colascione <dancol@dancol.org>
4630 Simon Marchi <simon.marchi@ericsson.com>
4631
4632 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4633 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4634 name in reply.
4635 * target.h (struct target_ops) <thread_name>: New field.
4636 (target_thread_name): New macro.
4637
4638 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4639
4640 * regcache.h (regcache_invalidate_pid): Add declaration.
4641 * regcache.c (regcache_invalidate_pid): New function, extracted
4642 from regcache_invalidate.
4643 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4644 Add trivial documentation comment.
4645 * lynx-low.c: Use regcache_invalidate_pid instead of
4646 regcache_invalidate.
4647
4648 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4649
4650 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4651 and Elf64_auxv_t if the target is Android.
4652
4653 2015-11-22 Doug Evans <xdje42@gmail.com>
4654
4655 * target.h: #include <sys/types.h>.
4656
4657 2015-11-19 Pedro Alves <palves@redhat.com>
4658
4659 * linux-low.c (linux_process_qsupported): Change prototype.
4660 Adjust.
4661 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4662 Change prototype.
4663 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4664 and adjust to loop over all features.
4665 * server.c (handle_query) <qSupported>: Adjust to call
4666 target_process_qsupported once, passing it a vector of unprocessed
4667 features.
4668 * target.h (struct target_ops) <process_qsupported>: Change
4669 prototype.
4670 (target_process_qsupported): Adjust.
4671
4672 2015-11-19 Pedro Alves <palves@redhat.com>
4673
4674 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4675 mode.
4676 * configure: Regenerate.
4677
4678 2015-11-19 Pedro Alves <palves@redhat.com>
4679
4680 * configure: Regenerate.
4681
4682 2015-11-19 Yao Qi <yao.qi@linaro.org>
4683
4684 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4685 type to uint32_t.
4686
4687 2015-11-19 Yao Qi <yao.qi@linaro.org>
4688
4689 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4690 (struct aarch64_operand): Move enum out.
4691
4692 2015-11-19 Yao Qi <yao.qi@linaro.org>
4693
4694 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4695 struct user_fpsimd_state *.
4696 (aarch64_store_fpregset): Likewise.
4697
4698 2015-11-19 Yao Qi <yao.qi@linaro.org>
4699
4700 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4701 struct user_pt_regs *.
4702 (aarch64_store_gregset): Likewise.
4703
4704 2015-11-18 Pedro Alves <palves@redhat.com>
4705
4706 * Makefile.in (all_object_files): Add $IPA_OBJS.
4707
4708 2015-11-17 Pedro Alves <palves@redhat.com>
4709
4710 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4711 GDB_SIGNAL_0 and gdb_signal_to_string.
4712
4713 2015-11-17 Pedro Alves <palves@redhat.com>
4714
4715 * win32-low.c (handle_output_debug_string): Remove parameter.
4716 (win32_kill): Remove our_status local and adjust call to
4717 handle_output_debug_string.
4718 (get_child_debug_event): Adjust call to
4719 handle_output_debug_string.
4720
4721 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4722
4723 * linux-mips-low.c (mips_fill_gregset): Add cast.
4724 (mips_store_gregset): Likewise.
4725 (mips_fill_fpregset): Likewise.
4726 (mips_store_fpregset): Likewise.
4727
4728 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4729
4730 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4731 priv.
4732
4733 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4734
4735 * linux-mips-low.c (mips_linux_new_thread): Change type of
4736 watch_type to enum target_hw_bp_type.
4737
4738 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4739
4740 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4741 Change return type to arm_hwbp_type.
4742
4743 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4744
4745 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4746 (arm_store_gregset): Likewise.
4747 * linux-arm-low.c (arm_get_hwcap): Likewise.
4748 (arm_read_description): Likewise.
4749
4750 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4751
4752 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4753
4754 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4755
4756 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4757 (ppc_fill_vsxregset): Likewise.
4758 (ppc_store_vsxregset): Likewise.
4759 (ppc_fill_vrregset): Likewise.
4760 (ppc_store_vrregset): Likewise.
4761 (ppc_fill_evrregset): Likewise.
4762 (ppc_store_evrregset): Likewise.
4763
4764 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4765
4766 * linux-ppc-low.c (ppc_usrregs_info): Remove
4767 forward-declaration.
4768 (ppc_arch_setup): Move lower in file.
4769
4770 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4771
4772 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4773 (ps_pdwrite): Likewise.
4774
4775 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4776
4777 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4778 to after assert checks.
4779
4780 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4781
4782 * proc-service.c (ps_pdread): Add/adjust casts.
4783 (ps_pdwrite): Add/adjust casts.
4784
4785 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4786
4787 * server.c (handle_search_memory_1): Cast return value of
4788 memmem.
4789
4790 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4791
4792 * server.c (write_qxfer_response): Change type of data to
4793 gdb_byte *.
4794
4795 2015-10-29 Pedro Alves <palves@redhat.com>
4796
4797 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4798
4799 2015-10-29 Pedro Alves <palves@redhat.com>
4800
4801 * tracepoint.c (clear_installed_tracepoints): Add casts.
4802
4803 2015-10-29 Pedro Alves <palves@redhat.com>
4804
4805 * server.c (handle_v_cont, process_serial_event): Add enum
4806 gdb_signal casts to signal parsing code.
4807
4808 2015-10-29 Pedro Alves <palves@redhat.com>
4809
4810 * linux-low.h (NULL_REGSET): Define.
4811 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4812 * linux-arm-low.c (arm_regsets): Likewise.
4813 * linux-crisv32-low.c (cris_regsets): Likewise.
4814 * linux-m68k-low.c (m68k_regsets): Likewise.
4815 * linux-mips-low.c (mips_regsets): Likewise.
4816 * linux-nios2-low.c (nios2_regsets): Likewise.
4817 * linux-ppc-low.c (ppc_regsets): Likewise.
4818 * linux-s390-low.c (s390_regsets): Likewise.
4819 * linux-sh-low.c (sh_regsets): Likewise.
4820 * linux-sparc-low.c (sparc_regsets): Likewise.
4821 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4822 * linux-tile-low.c (tile_regsets): Likewise.
4823 * linux-x86-low.c (x86_regsets): Likewise.
4824 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4825
4826 2015-10-29 Pedro Alves <palves@redhat.com>
4827
4828 * linux-low.h (NULL_REGSET): Define.
4829 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4830 * linux-arm-low.c (arm_regsets): Likewise.
4831 * linux-crisv32-low.c (cris_regsets): Likewise.
4832 * linux-m68k-low.c (m68k_regsets): Likewise.
4833 * linux-mips-low.c (mips_regsets): Likewise.
4834 * linux-nios2-low.c (nios2_regsets): Likewise.
4835 * linux-ppc-low.c (ppc_regsets): Likewise.
4836 * linux-s390-low.c (s390_regsets): Likewise.
4837 * linux-sh-low.c (sh_regsets): Likewise.
4838 * linux-sparc-low.c (sparc_regsets): Likewise.
4839 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4840 * linux-tile-low.c (tile_regsets): Likewise.
4841 * linux-x86-low.c (x86_regsets): Likewise.
4842 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4843
4844 2015-10-26 Doug Evans <dje@google.com>
4845
4846 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4847
4848 2015-10-26 Doug Evans <dje@google.com>
4849
4850 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4851
4852 2015-10-26 Doug Evans <dje@google.com>
4853
4854 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4855 for debug_printf.
4856 (attach_thread, find_new_threads_callback): Ditto.
4857
4858 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4859
4860 * mem-break.h (set_breakpoint_data): Remove.
4861
4862 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4863
4864 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4865 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4866 (initialize_low): Remove set_breakpoint_data call.
4867 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4868 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4869 (initialize_low): Remove set_breakpoint_data call.
4870 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4871 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4872 (initialize_low): Remove set_breakpoint_data call.
4873
4874 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4875
4876 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4877 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4878 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4879 * target.h (target_breakpoint_kind_from_pc): New macro.
4880
4881 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4882
4883 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4884 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4885 the default breakpoint kind.
4886
4887 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4888
4889 * linux-arm-low.c (arm_supports_z_point_type): Add software
4890 breakpoint support.
4891
4892 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4893
4894 * linux-arm-low.c: Refactor breakpoint definitions.
4895 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4896 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4897
4898 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4899
4900 * Makefile.in: Add arm.c/o.
4901 * configure.srv: Likewise.
4902 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4903 (arm_breakpoint_kind_from_pc): New function.
4904 (arm_sw_breakpoint_from_kind): Return proper kind.
4905 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4906
4907 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4908
4909 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4910 removal.
4911 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4912 (struct raw_breakpoint) <size>: Remove.
4913 (struct raw_breakpoint) <kind>: Add.
4914 (bp_size): New function.
4915 (bp_opcode): Likewise.
4916 (find_raw_breakpoint_at): Adjust for kind.
4917 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4918 (remove_memory_breakpoint): Adjust for kind call bp_size.
4919 (set_raw_breakpoint_at): Adjust for kind.
4920 (set_breakpoint): Likewise.
4921 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4922 (delete_raw_breakpoint): Adjust for kind.
4923 (delete_breakpoint): Likewise.
4924 (find_gdb_breakpoint): Likewise.
4925 (set_gdb_breakpoint_1): Likewise.
4926 (set_gdb_breakpoint): Likewise.
4927 (delete_gdb_breakpoint_1): Likewise.
4928 (delete_gdb_breakpoint): Likewise.
4929 (uninsert_raw_breakpoint): Likewise.
4930 (reinsert_raw_breakpoint): Likewise.
4931 (set_breakpoint_data): Remove.
4932 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4933 (check_mem_read): Adjust for kind call bp_size.
4934 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4935 (clone_one_breakpoint): Adjust for kind.
4936 * mem-break.h (set_gdb_breakpoint): Likewise.
4937 (delete_gdb_breakpoint): Likewise.
4938 * server.c (process_serial_event): Likewise.
4939
4940 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4941
4942 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4948 (arm_sw_breakpoint_from_kind): New function.
4949 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4950 (struct linux_target_ops) <breakpoint>: Remove.
4951 (struct linux_target_ops) <breakpoint_len>: Remove.
4952 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4953 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4954 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4955 (struct linux_target_ops) <breakpoint>: Remove.
4956 (struct linux_target_ops) <breakpoint_len>: Remove.
4957 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4958 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4959 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4960 (struct linux_target_ops) <breakpoint>: Remove.
4961 (struct linux_target_ops) <breakpoint_len>: Remove.
4962 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4963 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4964 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4965 and sw_breakpoint_from_kind to increment the pc.
4966 (linux_breakpoint_kind_from_pc): New function.
4967 (linux_sw_breakpoint_from_kind): New function.
4968 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4969 (initialize_low): Call breakpoint_kind_from_pc and
4970 sw_breakpoint_from_kind to replace breakpoint_data/len.
4971 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4972 New field.
4973 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4974 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4975 (struct linux_target_ops) <breakpoint>: Remove.
4976 (struct linux_target_ops) <breakpoint_len>: Remove.
4977 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4978 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4979 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4980 (struct linux_target_ops) <breakpoint>: Remove.
4981 (struct linux_target_ops) <breakpoint_len>: Remove.
4982 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4983 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4984 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4985 (struct linux_target_ops) <breakpoint>: Remove.
4986 (struct linux_target_ops) <breakpoint_len>: Remove.
4987 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4988 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4989 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4990 (struct linux_target_ops) <breakpoint>: Remove.
4991 (struct linux_target_ops) <breakpoint_len>: Remove.
4992 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4993 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4994 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4995 (struct linux_target_ops) <breakpoint>: Remove.
4996 (struct linux_target_ops) <breakpoint_len>: Remove.
4997 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4998 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4999 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5000 (struct linux_target_ops) <breakpoint>: Remove.
5001 (struct linux_target_ops) <breakpoint_len>: Remove.
5002 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5003 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5004 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5005 (struct linux_target_ops) <breakpoint>: Remove.
5006 (struct linux_target_ops) <breakpoint_len>: Remove.
5007 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5008 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5009 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5010 (struct linux_target_ops) <breakpoint>: Remove.
5011 (struct linux_target_ops) <breakpoint_len>: Remove.
5012 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5013 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5014 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5015 (struct linux_target_ops) <breakpoint>: Remove.
5016 (struct linux_target_ops) <breakpoint_len>: Remove.
5017 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5018 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5019 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5020 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5021 (struct linux_target_ops) <breakpoint>: Remove.
5022 (struct linux_target_ops) <breakpoint_len>: Remove.
5023 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5024 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5025 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5026 (struct linux_target_ops) <breakpoint>: Remove.
5027 (struct linux_target_ops) <breakpoint_len>: Remove.
5028 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5029 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5030
5031 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5032
5033 * linux-cris-low.c (cris_get_pc): Remove void arg.
5034
5035 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5036
5037 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5038 variable name.
5039
5040 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5041
5042 * inferiors.c (thread_pid_matches_callback): New function.
5043 (find_thread_process): New function.
5044 (remove_thread): Reset current_thread.
5045 (remove_process): Assert threads have been removed first.
5046
5047 2015-10-15 Yao Qi <yao.qi@linaro.org>
5048
5049 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5050 if it is 3.
5051 (aarch64_remove_point): Likewise.
5052 * regcache.c (regcache_register_size): New function.
5053
5054 2015-10-12 Yao Qi <yao.qi@linaro.org>
5055
5056 * linux-aarch64-low.c: Update all callers as emit_load_store
5057 is renamed to aarch64_emit_load_store.
5058
5059 2015-10-12 Yao Qi <yao.qi@linaro.org>
5060
5061 * linux-aarch64-low.c: Update all callers of function renaming
5062 from emit_insn to aarch64_emit_insn.
5063
5064 2015-10-12 Yao Qi <yao.qi@linaro.org>
5065
5066 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5067 arch/aarch64-insn.h.
5068 (struct aarch64_memory_operand): Likewise.
5069 (ENCODE): Likewise.
5070 (emit_insn): Move to arch/aarch64-insn.c.
5071 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5072 (emit_load_store): Move to arch/aarch64-insn.c.
5073 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5074 (can_encode_int32): Remove.
5075
5076 2015-10-12 Yao Qi <yao.qi@linaro.org>
5077
5078 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5079 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5080 (aarch64_relocate_instruction): Likewise.
5081 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5082 (struct aarch64_insn_visitor): Likewise.
5083
5084 2015-10-12 Yao Qi <yao.qi@linaro.org>
5085
5086 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5087 (struct aarch64_insn_visitor): New.
5088 (struct aarch64_insn_relocation_data): New.
5089 (aarch64_ftrace_insn_reloc_b): New function.
5090 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5091 (aarch64_ftrace_insn_reloc_cb): Likewise.
5092 (aarch64_ftrace_insn_reloc_tb): Likewise.
5093 (aarch64_ftrace_insn_reloc_adr): Likewise.
5094 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5095 (aarch64_ftrace_insn_reloc_others): Likewise.
5096 (visitor): New.
5097 (aarch64_relocate_instruction): Use visitor.
5098
5099 2015-10-12 Yao Qi <yao.qi@linaro.org>
5100
5101 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5102 int. Add argument buf.
5103 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5104 aarch64_relocate_instruction.
5105
5106 2015-10-12 Yao Qi <yao.qi@linaro.org>
5107
5108 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5109 argument insn. Remove local variable insn. Don't call
5110 target_read_uint32.
5111 (aarch64_install_fast_tracepoint_jump_pad): Call
5112 target_read_uint32.
5113
5114 2015-09-30 Yao Qi <yao.qi@linaro.org>
5115
5116 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5117 (emit_load_store_pair): Likewise.
5118
5119 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5120
5121 * dll.c (match_dll): Add cast(s).
5122 (unloaded_dll): Likewise.
5123 * linux-low.c (second_thread_of_pid_p): Likewise.
5124 (delete_lwp_callback): Likewise.
5125 (count_events_callback): Likewise.
5126 (select_event_lwp_callback): Likewise.
5127 (linux_set_resume_request): Likewise.
5128 * server.c (accumulate_file_name_length): Likewise.
5129 (emit_dll_description): Likewise.
5130 (handle_qxfer_threads_worker): Likewise.
5131 (visit_actioned_threads): Likewise.
5132 * thread-db.c (any_thread_of): Likewise.
5133 * tracepoint.c (same_process_p): Likewise.
5134 (match_blocktype): Likewise.
5135 (build_traceframe_info_xml): Likewise.
5136
5137 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5138
5139 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5140 assignment.
5141 (gdb_unparse_agent_expr): Likewise.
5142 * hostio.c (require_data): Likewise.
5143 (handle_pread): Likewise.
5144 * linux-low.c (disable_regset): Likewise.
5145 (fetch_register): Likewise.
5146 (store_register): Likewise.
5147 (get_dynamic): Likewise.
5148 (linux_qxfer_libraries_svr4): Likewise.
5149 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5150 (set_fast_tracepoint_jump): Likewise.
5151 (uninsert_fast_tracepoint_jumps_at): Likewise.
5152 (reinsert_fast_tracepoint_jumps_at): Likewise.
5153 (validate_inserted_breakpoint): Likewise.
5154 (clone_agent_expr): Likewise.
5155 * regcache.c (init_register_cache): Likewise.
5156 * remote-utils.c (putpkt_binary_1): Likewise.
5157 (decode_M_packet): Likewise.
5158 (decode_X_packet): Likewise.
5159 (look_up_one_symbol): Likewise.
5160 (relocate_instruction): Likewise.
5161 (monitor_output): Likewise.
5162 * server.c (handle_search_memory): Likewise.
5163 (handle_qxfer_exec_file): Likewise.
5164 (handle_qxfer_libraries): Likewise.
5165 (handle_qxfer): Likewise.
5166 (handle_query): Likewise.
5167 (handle_v_cont): Likewise.
5168 (handle_v_run): Likewise.
5169 (captured_main): Likewise.
5170 * target.c (write_inferior_memory): Likewise.
5171 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5172 * tracepoint.c (init_trace_buffer): Likewise.
5173 (add_tracepoint_action): Likewise.
5174 (add_traceframe): Likewise.
5175 (add_traceframe_block): Likewise.
5176 (cmd_qtdpsrc): Likewise.
5177 (cmd_qtdv): Likewise.
5178 (cmd_qtstatus): Likewise.
5179 (response_source): Likewise.
5180 (response_tsv): Likewise.
5181 (cmd_qtnotes): Likewise.
5182 (gdb_collect): Likewise.
5183 (initialize_tracepoint): Likewise.
5184
5185 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5186
5187 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5188 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5189 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5190 <NOP>: New.
5191 (enum aarch64_condition_codes): New enum.
5192 (w0): New static global.
5193 (fp): Likewise.
5194 (lr): Likewise.
5195 (struct aarch64_memory_operand) <type>: New
5196 MEMORY_OPERAND_POSTINDEX type.
5197 (postindex_memory_operand): New helper function.
5198 (emit_ret): New function.
5199 (emit_load_store_pair): New function, factored out of emit_stp
5200 with support for MEMORY_OPERAND_POSTINDEX.
5201 (emit_stp): Rewrite using emit_load_store_pair.
5202 (emit_ldp): New function.
5203 (emit_load_store): Likewise.
5204 (emit_ldr): Mention post-index instruction in comment.
5205 (emit_ldrh): New function.
5206 (emit_ldrb): New function.
5207 (emit_ldrsw): Mention post-index instruction in comment.
5208 (emit_str): Likewise.
5209 (emit_subs): New function.
5210 (emit_cmp): Likewise.
5211 (emit_and): Likewise.
5212 (emit_orr): Likewise.
5213 (emit_orn): Likewise.
5214 (emit_eor): Likewise.
5215 (emit_mvn): Likewise.
5216 (emit_lslv): Likewise.
5217 (emit_lsrv): Likewise.
5218 (emit_asrv): Likewise.
5219 (emit_mul): Likewise.
5220 (emit_sbfm): Likewise.
5221 (emit_sbfx): Likewise.
5222 (emit_ubfm): Likewise.
5223 (emit_ubfx): Likewise.
5224 (emit_csinc): Likewise.
5225 (emit_cset): Likewise.
5226 (emit_nop): Likewise.
5227 (emit_ops_insns): New helper function.
5228 (emit_pop): Likewise.
5229 (emit_push): Likewise.
5230 (aarch64_emit_prologue): New function.
5231 (aarch64_emit_epilogue): Likewise.
5232 (aarch64_emit_add): Likewise.
5233 (aarch64_emit_sub): Likewise.
5234 (aarch64_emit_mul): Likewise.
5235 (aarch64_emit_lsh): Likewise.
5236 (aarch64_emit_rsh_signed): Likewise.
5237 (aarch64_emit_rsh_unsigned): Likewise.
5238 (aarch64_emit_ext): Likewise.
5239 (aarch64_emit_log_not): Likewise.
5240 (aarch64_emit_bit_and): Likewise.
5241 (aarch64_emit_bit_or): Likewise.
5242 (aarch64_emit_bit_xor): Likewise.
5243 (aarch64_emit_bit_not): Likewise.
5244 (aarch64_emit_equal): Likewise.
5245 (aarch64_emit_less_signed): Likewise.
5246 (aarch64_emit_less_unsigned): Likewise.
5247 (aarch64_emit_ref): Likewise.
5248 (aarch64_emit_if_goto): Likewise.
5249 (aarch64_emit_goto): Likewise.
5250 (aarch64_write_goto_address): Likewise.
5251 (aarch64_emit_const): Likewise.
5252 (aarch64_emit_call): Likewise.
5253 (aarch64_emit_reg): Likewise.
5254 (aarch64_emit_pop): Likewise.
5255 (aarch64_emit_stack_flush): Likewise.
5256 (aarch64_emit_zero_ext): Likewise.
5257 (aarch64_emit_swap): Likewise.
5258 (aarch64_emit_stack_adjust): Likewise.
5259 (aarch64_emit_int_call_1): Likewise.
5260 (aarch64_emit_void_call_2): Likewise.
5261 (aarch64_emit_eq_goto): Likewise.
5262 (aarch64_emit_ne_goto): Likewise.
5263 (aarch64_emit_lt_goto): Likewise.
5264 (aarch64_emit_le_goto): Likewise.
5265 (aarch64_emit_gt_goto): Likewise.
5266 (aarch64_emit_ge_got): Likewise.
5267 (aarch64_emit_ops_impl): New static global variable.
5268 (aarch64_emit_ops): New target function, return
5269 &aarch64_emit_ops_impl.
5270 (struct linux_target_ops): Install it.
5271
5272 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5273
5274 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5275 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5276 aarch64-ipa.o.
5277 * linux-aarch64-ipa.c: New file.
5278 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5279 and endian.h.
5280 (aarch64_get_thread_area): New target method.
5281 (extract_signed_bitfield): New helper function.
5282 (aarch64_decode_ldr_literal): New function.
5283 (enum aarch64_opcodes): New enum.
5284 (struct aarch64_register): New struct.
5285 (struct aarch64_operand): New struct.
5286 (x0): New static global.
5287 (x1): Likewise.
5288 (x2): Likewise.
5289 (x3): Likewise.
5290 (x4): Likewise.
5291 (w2): Likewise.
5292 (ip0): Likewise.
5293 (sp): Likewise.
5294 (xzr): Likewise.
5295 (aarch64_register): New helper function.
5296 (register_operand): Likewise.
5297 (immediate_operand): Likewise.
5298 (struct aarch64_memory_operand): New struct.
5299 (offset_memory_operand): New helper function.
5300 (preindex_memory_operand): Likewise.
5301 (enum aarch64_system_control_registers): New enum.
5302 (ENCODE): New macro.
5303 (emit_insn): New helper function.
5304 (emit_b): New function.
5305 (emit_bcond): Likewise.
5306 (emit_cb): Likewise.
5307 (emit_tb): Likewise.
5308 (emit_blr): Likewise.
5309 (emit_stp): Likewise.
5310 (emit_ldp_q_offset): Likewise.
5311 (emit_stp_q_offset): Likewise.
5312 (emit_load_store): Likewise.
5313 (emit_ldr): Likewise.
5314 (emit_ldrsw): Likewise.
5315 (emit_str): Likewise.
5316 (emit_ldaxr): Likewise.
5317 (emit_stxr): Likewise.
5318 (emit_stlr): Likewise.
5319 (emit_data_processing_reg): Likewise.
5320 (emit_data_processing): Likewise.
5321 (emit_add): Likewise.
5322 (emit_sub): Likewise.
5323 (emit_mov): Likewise.
5324 (emit_movk): Likewise.
5325 (emit_mov_addr): Likewise.
5326 (emit_mrs): Likewise.
5327 (emit_msr): Likewise.
5328 (emit_sevl): Likewise.
5329 (emit_wfe): Likewise.
5330 (append_insns): Likewise.
5331 (can_encode_int32_in): New helper function.
5332 (aarch64_relocate_instruction): New function.
5333 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5334 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5335 (struct linux_target_ops): Install aarch64_get_thread_area,
5336 aarch64_install_fast_tracepoint_jump_pad and
5337 aarch64_get_min_fast_tracepoint_insn_len.
5338
5339 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5340
5341 * Makefile.in (aarch64-insn.o): New rule.
5342 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5343
5344 2015-09-21 Yao Qi <yao.qi@linaro.org>
5345
5346 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5347
5348 2015-09-21 Yao Qi <yao.qi@linaro.org>
5349
5350 * tracepoint.c (max_jump_pad_size): Remove.
5351
5352 2015-09-18 Yao Qi <yao.qi@linaro.org>
5353
5354 * linux-aarch64-low.c: Don't include sys/uio.h.
5355 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5356
5357 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5358
5359 * tracepoint.c (eval_result_type): Change prototype.
5360 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5361
5362 2015-09-15 Pedro Alves <palves@redhat.com>
5363
5364 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5365 Check whether to report exec events instead of checking whether
5366 multiprocess is enabled.
5367
5368 2015-09-15 Pedro Alves <palves@redhat.com>
5369
5370 PR remote/18965
5371 * remote-utils.c (prepare_resume_reply): Merge
5372 TARGET_WAITKIND_VFORK_DONE switch case with the
5373 TARGET_WAITKIND_FORKED case.
5374
5375 2015-09-15 Yao Qi <yao.qi@linaro.org>
5376
5377 * server.c (handle_query): Check string comparison using
5378 "else if" instead of "if".
5379
5380 2015-09-15 Yao Qi <yao.qi@linaro.org>
5381
5382 * server.c (vCont_supported): New global variable.
5383 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5384 matches. Append ";vContSupported+" to own_buf.
5385 (handle_v_requests): Append ";s;S" to own_buf if target supports
5386 hardware single step or vCont_supported is false.
5387 (capture_main): Set vCont_supported to zero.
5388
5389 2015-09-15 Yao Qi <yao.qi@linaro.org>
5390
5391 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5392 it to ...
5393 (linux_supports_hardware_single_step): ... New function.
5394 (linux_target_ops): Update.
5395 * lynx-low.c (lynx_target_ops): Set field
5396 supports_hardware_single_step to target_can_do_hardware_single_step.
5397 * nto-low.c (nto_target_ops): Likewise.
5398 * spu-low.c (spu_target_ops): Likewise.
5399 * win32-low.c (win32_target_ops): Likewise.
5400 * target.c (target_can_do_hardware_single_step): New function.
5401 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5402 Remove. <supports_hardware_single_step>: New field.
5403 (target_supports_conditional_breakpoints): Remove.
5404 (target_supports_hardware_single_step): New macro.
5405 (target_can_do_hardware_single_step): Declare.
5406 * server.c (handle_query): Use target_supports_hardware_single_step
5407 instead of target_supports_conditional_breakpoints.
5408
5409 2015-09-15 Yao Qi <yao.qi@linaro.org>
5410
5411 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5412 function.
5413 (struct linux_target_ops the_low_target): Install
5414 aarch64_linux_siginfo_fixup.
5415
5416 2015-09-11 Don Breazeal <donb@codesourcery.com>
5417 Luis Machado <lgustavo@codesourcery.com>
5418
5419 * linux-low.c (linux_mourn): Static declaration.
5420 (linux_arch_setup): Move in front of
5421 handle_extended_wait.
5422 (linux_arch_setup_thread): New function.
5423 (handle_extended_wait): Handle exec events. Call
5424 linux_arch_setup_thread. Make event_lwp argument a
5425 pointer-to-a-pointer.
5426 (check_zombie_leaders): Do not check stopped threads.
5427 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5428 (linux_low_filter_event): Add lwp and thread for exec'ing
5429 non-leader thread if leader thread has been deleted.
5430 Refactor code into linux_arch_setup_thread and call it.
5431 Pass child lwp pointer by reference to handle_extended_wait.
5432 (linux_wait_for_event_filtered): Update comment.
5433 (linux_wait_1): Prevent clobbering exec event status.
5434 (linux_supports_exec_events): New function.
5435 (linux_target_ops) <supports_exec_events>: Initialize new member.
5436 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5437 new member.
5438 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5439 * server.c (report_exec_events): New global variable.
5440 (handle_query): Handle qSupported query for exec-events feature.
5441 (captured_main): Initialize report_exec_events.
5442 * server.h (report_exec_events): Declare new global variable.
5443 * target.h (struct target_ops) <supports_exec_events>: New
5444 member.
5445 (target_supports_exec_events): New macro.
5446 * win32-low.c (win32_target_ops) <supports_exec_events>:
5447 Initialize new member.
5448
5449 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5450
5451 * linux-low.c (linux_low_enable_btrace): Remove.
5452 (linux_target_ops): Replace linux_low_enable_btrace with
5453 linux_enable_btrace.
5454
5455 2015-09-03 Yao Qi <yao.qi@linaro.org>
5456
5457 * linux-aarch64-low.c (aarch64_insert_point): Call
5458 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5459 returns true.
5460
5461 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5462
5463 * linux-low.c (check_stopped_by_breakpoint): Use
5464 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5465
5466 2015-08-27 Pedro Alves <palves@redhat.com>
5467
5468 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5469
5470 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5471
5472 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5473 the XNEW-family equivalent.
5474 (compile_bytecodes): Likewise.
5475 * dll.c (loaded_dll): Likewise.
5476 * event-loop.c (append_callback_event): Likewise.
5477 (create_file_handler): Likewise.
5478 (create_file_event): Likewise.
5479 * hostio.c (handle_open): Likewise.
5480 * inferiors.c (add_thread): Likewise.
5481 (add_process): Likewise.
5482 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5483 * linux-arm-low.c (arm_new_process): Likewise.
5484 (arm_new_thread): Likewise.
5485 * linux-low.c (add_to_pid_list): Likewise.
5486 (linux_add_process): Likewise.
5487 (handle_extended_wait): Likewise.
5488 (add_lwp): Likewise.
5489 (enqueue_one_deferred_signal): Likewise.
5490 (enqueue_pending_signal): Likewise.
5491 (linux_resume_one_lwp_throw): Likewise.
5492 (linux_resume_one_thread): Likewise.
5493 (linux_read_memory): Likewise.
5494 (linux_write_memory): Likewise.
5495 * linux-mips-low.c (mips_linux_new_process): Likewise.
5496 (mips_linux_new_thread): Likewise.
5497 (mips_add_watchpoint): Likewise.
5498 * linux-x86-low.c (initialize_low_arch): Likewise.
5499 * lynx-low.c (lynx_add_process): Likewise.
5500 * mem-break.c (set_raw_breakpoint_at): Likewise.
5501 (set_breakpoint): Likewise.
5502 (add_condition_to_breakpoint): Likewise.
5503 (add_commands_to_breakpoint): Likewise.
5504 (clone_agent_expr): Likewise.
5505 (clone_one_breakpoint): Likewise.
5506 * regcache.c (new_register_cache): Likewise.
5507 * remote-utils.c (look_up_one_symbol): Likewise.
5508 * server.c (queue_stop_reply): Likewise.
5509 (start_inferior): Likewise.
5510 (queue_stop_reply_callback): Likewise.
5511 (handle_target_event): Likewise.
5512 * spu-low.c (fetch_ppc_memory): Likewise.
5513 (store_ppc_memory): Likewise.
5514 * target.c (set_target_ops): Likewise.
5515 * thread-db.c (thread_db_load_search): Likewise.
5516 (try_thread_db_load_1): Likewise.
5517 * tracepoint.c (add_tracepoint): Likewise.
5518 (add_tracepoint_action): Likewise.
5519 (create_trace_state_variable): Likewise.
5520 (cmd_qtdpsrc): Likewise.
5521 (cmd_qtro): Likewise.
5522 (add_while_stepping_state): Likewise.
5523 * win32-low.c (child_add_thread): Likewise.
5524 (get_image_name): Likewise.
5525
5526 2015-08-25 Yao Qi <yao.qi@linaro.org>
5527
5528 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5529
5530 2015-08-25 Yao Qi <yao.qi@linaro.org>
5531
5532 * Makefile.in (aarch64-linux.o): New rule.
5533 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5534 srv_tgtobj.
5535 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5536 (aarch64_init_debug_reg_state): Make it extern.
5537 (aarch64_linux_prepare_to_resume): Remove.
5538
5539 2015-08-25 Yao Qi <yao.qi@linaro.org>
5540
5541 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5542 lwp_arch_private_info and ptid_of_lwp.
5543
5544 2015-08-25 Yao Qi <yao.qi@linaro.org>
5545
5546 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5547 Find proc_info by find_process_pid. All callers updated.
5548
5549 2015-08-25 Yao Qi <yao.qi@linaro.org>
5550
5551 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5552 Remove.
5553 (debug_reg_change_callback): Remove.
5554 (aarch64_notify_debug_reg_change): Remove.
5555
5556 2015-08-25 Yao Qi <yao.qi@linaro.org>
5557
5558 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5559 Call current_lwp_ptid.
5560
5561 2015-08-25 Yao Qi <yao.qi@linaro.org>
5562
5563 * linux-aarch64-low.c (debug_reg_change_callback): Use
5564 debug_printf.
5565
5566 2015-08-25 Yao Qi <yao.qi@linaro.org>
5567
5568 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5569
5570 2015-08-25 Yao Qi <yao.qi@linaro.org>
5571
5572 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5573
5574 2015-08-25 Yao Qi <yao.qi@linaro.org>
5575
5576 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5577 the code.
5578
5579 2015-08-25 Yao Qi <yao.qi@linaro.org>
5580
5581 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5582 Remove.
5583 (debug_reg_change_callback): Remove argument entry and add argument
5584 lwp. Remove local variable thread. Don't print thread id in the
5585 debugging output. Don't check whether pid of thread equals to pid.
5586 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5587 iterate_over_lwps instead find_inferior.
5588
5589 2015-08-24 Pedro Alves <palves@redhat.com>
5590
5591 * inferiors.c (get_first_process): New function.
5592 * inferiors.h (get_first_process): New declaration.
5593 * remote-utils.c (read_ptid): Default to the first process in the
5594 list, instead of to the current thread's process.
5595
5596 2015-08-24 Pedro Alves <palves@redhat.com>
5597
5598 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5599 * event-loop.c: Likewise.
5600 * remote-utils.c: Likewise.
5601 * tracepoint.c: Likewise.
5602
5603 2015-08-24 Pedro Alves <palves@redhat.com>
5604
5605 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5606 ptid_get_lwp.
5607
5608 2015-08-21 Pedro Alves <palves@redhat.com>
5609
5610 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5611 instead of literal 1.
5612
5613 2015-08-21 Pedro Alves <palves@redhat.com>
5614
5615 * tdesc.c (default_description): Explicitly zero-initialize.
5616
5617 2015-08-21 Pedro Alves <palves@redhat.com>
5618
5619 PR gdb/18749
5620 * inferiors.c (remove_thread): Discard any pending stop reply for
5621 this thread.
5622 * server.c (remove_all_on_match_pid): Rename to ...
5623 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5624 instead of a pid.
5625 (discard_queued_stop_replies): Change parameter to a ptid. Now
5626 extern.
5627 (handle_v_kill, kill_inferior_callback, captured_main)
5628 (process_serial_event): Adjust.
5629 * server.h (discard_queued_stop_replies): Declare.
5630
5631 2015-08-21 Pedro Alves <palves@redhat.com>
5632
5633 * linux-low.c (wait_for_sigstop): Always switch to no thread
5634 selected if the previously current thread dies.
5635 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5636 process instead of the current thread's.
5637 * remote-utils.c (input_interrupt): Don't check if there's no
5638 current thread.
5639 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5640 current thread to the general thread fails, error out.
5641 (handle_qxfer_auxv, handle_qxfer_libraries)
5642 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5643 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5644 (handle_query): Check if there's a thread selected instead of
5645 checking whether there's any thread in the thread list.
5646 (handle_qxfer_threads, handle_qxfer_btrace)
5647 (handle_qxfer_btrace_conf): Don't error out early if there's no
5648 thread in the thread list.
5649 (handle_v_cont, myresume): Don't set the current thread to the
5650 continue thread.
5651 (process_serial_event) <Hg handling>: Also set thread_id if the
5652 previous general thread is still alive.
5653 (process_serial_event) <g/G handling>: If setting the current
5654 thread to the general thread fails, error out.
5655 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5656 thread's lwp instead of the current thread's.
5657 * target.c (set_desired_thread): If the desired thread was not
5658 found, leave the current thread pointing to NULL. Return an int
5659 (boolean) indicating success.
5660 * target.h (set_desired_thread): Change return type to int.
5661
5662 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5663
5664 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5665 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5666 #includes.
5667 (ps_get_thread_area): New function.
5668
5669 2015-08-19 Gary Benson <gbenson@redhat.com>
5670
5671 * hostio.c (handle_pread): Do not attempt to read more data
5672 than hostio_reply_with_data can fit in a packet.
5673
5674 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5675
5676 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5677
5678 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5679
5680 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5681
5682 2015-08-06 Pedro Alves <palves@redhat.com>
5683
5684 * tracepoint.c (expr_eval_result): Now an int.
5685
5686 2015-08-06 Pedro Alves <palves@redhat.com>
5687
5688 * gdbthread.h (struct regcache): Forward declare.
5689 (struct thread_info) <regcache_data>: Now a struct regcache
5690 pointer.
5691 * inferiors.c (inferior_regcache_data)
5692 (set_inferior_regcache_data): Now work with struct regcache
5693 pointers.
5694 * inferiors.h (struct regcache): Forward declare.
5695 (inferior_regcache_data, set_inferior_regcache_data): Now work
5696 with struct regcache pointers.
5697 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5698 (free_register_cache_thread): Remove struct regcache pointer
5699 casts.
5700
5701 2015-08-06 Pedro Alves <palves@redhat.com>
5702
5703 * server.c (captured_main): On error, print the exception message
5704 to stderr, and if run_once is set, throw a quit.
5705
5706 2015-08-06 Pedro Alves <palves@redhat.com>
5707
5708 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5709 the current thread.
5710
5711 2015-08-06 Pedro Alves <palves@redhat.com>
5712
5713 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5714 reading beyond the passed in buffer length.
5715
5716 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5717
5718 * tracepoint.c (symbol_list) <required>: Remove.
5719
5720 2015-08-06 Pedro Alves <palves@redhat.com>
5721
5722 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5723 count if stopping and suspending threads.
5724 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5725 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5726 (linux_detach): Complete an ongoing step-over.
5727 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5728 throughout.
5729 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5730 (linux_wait_1): If passing a signal to the inferior after
5731 finishing a step-over, unsuspend and re-resume all lwps. If we
5732 see a single-step event but the thread should be continuing, don't
5733 pass the trap to gdb.
5734 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5735 internal_error instead of gdb_assert.
5736 (enqueue_pending_signal): New function.
5737 (check_ptrace_stopped_lwp_gone): Add debug output.
5738 (start_step_over): Use internal_error instead of gdb_assert.
5739 (complete_ongoing_step_over): New function.
5740 (linux_resume_one_thread): Don't resume a suspended thread.
5741 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5742 it stepping.
5743
5744 2015-08-06 Pedro Alves <palves@redhat.com>
5745
5746 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5747 (linux_thread_alive): Use lwp_is_marked_dead.
5748 (extended_event_reported): Delete.
5749 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5750 instead of extended_event_reported.
5751 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5752 as well.
5753 (lwp_is_marked_dead): New function.
5754 (lwp_running): Use lwp_is_marked_dead.
5755 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5756 comment.
5757
5758 2015-08-06 Pedro Alves <palves@redhat.com>
5759
5760 * linux-low.c (linux_wait_1): Move fork event output out of the
5761 !report_to_gdb check. Pass event_child->waitstatus to
5762 target_waitstatus_to_string instead of ourstatus.
5763
5764 2015-08-04 Yao Qi <yao.qi@linaro.org>
5765
5766 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5767 if current_thread is 32 bit.
5768
5769 2015-08-04 Yao Qi <yao.qi@linaro.org>
5770
5771 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5772 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5773 * server.c (extended_protocol): Remove "static".
5774 * server.h (extended_protocol): Declare it.
5775
5776 2015-08-04 Yao Qi <yao.qi@linaro.org>
5777
5778 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5779 both aarch64 and aarch32.
5780 (aarch64_set_pc): Likewise.
5781
5782 2015-08-04 Yao Qi <yao.qi@linaro.org>
5783
5784 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5785 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5786 arm-with-neon.xml to srv_xmlfiles.
5787 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5788 (is_64bit_tdesc): New function.
5789 (aarch64_linux_read_description): New function.
5790 (aarch64_arch_setup): Call aarch64_linux_read_description.
5791 (regs_info): Rename to regs_info_aarch64.
5792 (aarch64_regs_info): Return right regs_info.
5793 (initialize_low_arch): Call initialize_low_arch_aarch32.
5794
5795 2015-08-04 Yao Qi <yao.qi@linaro.org>
5796
5797 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5798 * linux-aarch32-low.c: New file.
5799 * linux-aarch32-low.h: New file.
5800 * linux-arm-low.c (arm_fill_gregset): Move it to
5801 linux-aarch32-low.c.
5802 (arm_store_gregset): Likewise.
5803 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5804 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5805 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5806 (regs_info): Rename to regs_info_arm.
5807 (arm_regs_info): Return regs_info_aarch32 if
5808 have_ptrace_getregset is 1 and target description is
5809 arm_with_neon or arm_with_vfpv3.
5810 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5811 Call initialize_low_arch_aarch32 instead.
5812
5813 2015-08-04 Yao Qi <yao.qi@linaro.org>
5814
5815 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5816 * linux-low.c: ... here.
5817 * linux-low.h (have_ptrace_getregset): Declare it.
5818
5819 2015-08-04 Pedro Alves <palves@redhat.com>
5820
5821 * thread-db.c (struct thread_db): Use new typedefs.
5822 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5823 CHK calls.
5824 (disable_thread_event_reporting): Cast result of dlsym to
5825 destination function pointer type.
5826 (thread_db_mourn): Use td_ta_delete_ftype.
5827
5828 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5829
5830 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5831 arch variant.
5832 (CDX_BREAKPOINT): Define for R2.
5833 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5834 (the_low_target): Add comments.
5835
5836 2015-07-30 Yao Qi <yao.qi@linaro.org>
5837
5838 * linux-arm-low.c (arm_hwcap): Remove it.
5839 (arm_read_description): New local variable arm_hwcap. Don't
5840 set arm_hwcap to zero.
5841
5842 2015-07-30 Yao Qi <yao.qi@linaro.org>
5843
5844 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5845 Use regcache->tdesc instead.
5846 (arm_store_wmmxregset): Likewise.
5847 (arm_fill_vfpregset): Likewise.
5848 (arm_store_vfpregset): Likewise.
5849
5850 2015-07-30 Yao Qi <yao.qi@linaro.org>
5851
5852 * linux-arm-low.c: Include arch/arm.h.
5853 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5854 (arm_store_gregset): Likewise.
5855
5856 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5857
5858 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5859 ptrace's 4th parameter.
5860
5861 2015-07-27 Yao Qi <yao.qi@linaro.org>
5862
5863 * configure.srv (case aarch64*-*-linux*): Don't set
5864 srv_linux_usrregs.
5865
5866 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5867
5868 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5869 sys/ptrace.h.
5870 * linux-arm-low.c: Likewise.
5871 * linux-cris-low.c: Likewise.
5872 * linux-crisv32-low.c: Likewise.
5873 * linux-low.c: Likewise.
5874 * linux-m68k-low.c: Likewise.
5875 * linux-mips-low.c: Likewise.
5876 * linux-nios2-low.c: Likewise.
5877 * linux-s390-low.c: Likewise.
5878 * linux-sparc-low.c: Likewise.
5879 * linux-tic6x-low.c: Likewise.
5880 * linux-tile-low.c: Likewise.
5881 * linux-x86-low.c: Likewise.
5882
5883 2015-07-24 Pedro Alves <palves@redhat.com>
5884
5885 * config.in: Regenerate.
5886 * configure: Regenerate.
5887
5888 2015-07-24 Pedro Alves <palves@redhat.com>
5889
5890 * acinclude.m4: Include ../ptrace.m4.
5891 * configure.ac: Call GDB_AC_PTRACE.
5892 * config.in, configure: Regenerate.
5893
5894 2015-07-24 Yao Qi <yao.qi@linaro.org>
5895
5896 * linux-low.c (linux_create_inferior): Remove setting to
5897 proc->priv->new_inferior.
5898 (linux_attach): Likewise.
5899 (linux_low_filter_event): Likewise.
5900 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5901
5902 2015-07-24 Yao Qi <yao.qi@linaro.org>
5903
5904 * linux-low.c (linux_arch_setup): New function.
5905 (linux_low_filter_event): If proc->tdesc is NULL and
5906 proc->attached is true, call the_low_target.arch_setup.
5907 Otherwise, keep status pending, and return.
5908 (linux_resume_one_lwp_throw): Don't call get_pc if
5909 thread->while_stepping isn't NULL. Don't call
5910 get_thread_regcache if proc->tdesc is NULL.
5911 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5912 (linux_target_ops): Install arch_setup.
5913 * server.c (start_inferior): Call the_target->arch_setup.
5914 * target.h (struct target_ops) <arch_setup>: New field.
5915 (target_arch_setup): New marco.
5916 * lynx-low.c (lynx_target_ops): Update.
5917 * nto-low.c (nto_target_ops): Update.
5918 * spu-low.c (spu_target_ops): Update.
5919 * win32-low.c (win32_target_ops): Update.
5920
5921 2015-07-24 Yao Qi <yao.qi@linaro.org>
5922
5923 * linux-low.c (linux_add_process): Don't set
5924 proc->priv->new_inferior.
5925 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5926 (linux_attach): Likewise.
5927
5928 2015-07-24 Yao Qi <yao.qi@linaro.org>
5929
5930 * server.c (start_inferior): Code refactor.
5931
5932 2015-07-24 Yao Qi <yao.qi@linaro.org>
5933
5934 * server.c (process_serial_event): Set general_thread.
5935
5936 2015-07-21 Yao Qi <yao.qi@linaro.org>
5937
5938 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5939 aarch64_linux_get_debug_reg_capacity.
5940
5941 2015-07-17 Yao Qi <yao.qi@linaro.org>
5942
5943 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5944 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5945 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5946 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5947 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5948 (AARCH64_HWP_ALIGNMENT): Likewise.
5949 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5950 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5951 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5952 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5953 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5954 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5955 (struct aarch64_debug_reg_state): Likewise.
5956 (struct arch_lwp_info): Likewise.
5957 (aarch64_align_watchpoint): Likewise.
5958 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5959 (aarch64_watchpoint_length): Likewise.
5960 (aarch64_point_encode_ctrl_reg): Likewise
5961 (aarch64_point_is_aligned): Likewise.
5962 (aarch64_align_watchpoint): Likewise.
5963 (aarch64_linux_set_debug_regs):
5964 (aarch64_dr_state_insert_one_point): Likewise.
5965 (aarch64_dr_state_remove_one_point): Likewise.
5966 (aarch64_handle_breakpoint): Likewise.
5967 (aarch64_handle_aligned_watchpoint): Likewise.
5968 (aarch64_handle_unaligned_watchpoint): Likewise.
5969 (aarch64_handle_watchpoint): Likewise.
5970
5971 2015-07-17 Yao Qi <yao.qi@linaro.org>
5972
5973 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5974 and don't aarch64_get_debug_reg_state. All callers update.
5975 (aarch64_handle_aligned_watchpoint): Likewise.
5976 (aarch64_handle_unaligned_watchpoint): Likewise.
5977 (aarch64_handle_watchpoint): Likewise.
5978 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5979 (aarch64_remove_point): Likewise.
5980
5981 2015-07-17 Yao Qi <yao.qi@linaro.org>
5982
5983 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5984 debug_printf.
5985 (aarch64_handle_unaligned_watchpoint): Likewise.
5986
5987 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5988
5989 Revert the previous 3 commits:
5990 Move gdb_regex* to common/
5991 Move linux_find_memory_regions_full & co.
5992 gdbserver build-id attribute generator
5993
5994 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5995 Jan Kratochvil <jan.kratochvil@redhat.com>
5996
5997 gdbserver build-id attribute generator.
5998 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5999 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6000 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6001 (find_phdr): New.
6002 (get_dynamic): Use find_pdhr to traverse program headers.
6003 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6004 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6005 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6006 (get_hex_build_id): New.
6007 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6008 to reply XML document.
6009
6010 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6011 Jan Kratochvil <jan.kratochvil@redhat.com>
6012
6013 * target.c: Include target/target-utils.h and fcntl.h.
6014 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6015 (target_fileio_read_stralloc): New functions.
6016
6017 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6018
6019 * Makefile.in (OBS): Add gdb_regex.o.
6020 (gdb_regex.o): New.
6021 * config.in: Rebuilt.
6022 * configure: Rebuilt.
6023
6024 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6025 Jan Kratochvil <jan.kratochvil@redhat.com>
6026
6027 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6028 * Makefile.in (OBS): Add target-utils.o.
6029 (linux-maps.o, target-utils.o): New.
6030 * configure.srv (srv_linux_obj): Add linux-maps.o.
6031
6032 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6033
6034 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6035 function, return 1.
6036 (the_low_target): Install it.
6037
6038 2015-07-14 Pedro Alves <palves@redhat.com>
6039
6040 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6041 Instead, ignore ECHILD, and throw an error for other errnos.
6042
6043 2015-07-10 Pedro Alves <palves@redhat.com>
6044
6045 * event-loop.c (struct callback_event) <data>: Change type to
6046 gdb_client_data instance instead of gdb_client_data pointer.
6047 (append_callback_event): Adjust.
6048
6049 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6050
6051 * linux-aarch64-low.c: Add comments for each linux_target_ops
6052 method. Remove comments already covered in target_ops and
6053 linux_target_ops definitions.
6054 (the_low_target): Add comments for each unimplemented method.
6055
6056 2015-07-09 Yao Qi <yao.qi@linaro.org>
6057
6058 * linux-aarch64-low.c (aarch64_regmap): Remove.
6059 (aarch64_usrregs_info): Remove.
6060 (regs_info): Set field usrregs to NULL.
6061
6062 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6063
6064 * linux-low.c: Include "rsp-low.h"
6065 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6066 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6067 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6068 (handle_btrace_enable_pt): New.
6069 (handle_btrace_general_set): Support "pt".
6070 (handle_btrace_conf_general_set): Support "pt:size".
6071
6072 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6073
6074 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6075 Z_PACKET_SW_BP.
6076
6077 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6078
6079 * linux-aarch64-low.c: Remove comment about endianness.
6080 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6081 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6082 memcmp.
6083
6084 2015-06-24 Gary Benson <gbenson@redhat.com>
6085
6086 * linux-i386-ipa.c (stdint.h): Do not include.
6087 * lynx-i386-low.c (stdint.h): Likewise.
6088 * lynx-ppc-low.c (stdint.h): Likewise.
6089 * mem-break.c (stdint.h): Likewise.
6090 * thread-db.c (stdint.h): Likewise.
6091 * tracepoint.c (stdint.h): Likewise.
6092 * win32-low.c (stdint.h): Likewise.
6093
6094 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6095
6096 * server.c (write_qxfer_response): Update call to
6097 remote_escape_output.
6098
6099 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6100 Jan Kratochvil <jan.kratochvil@redhat.com>
6101
6102 Merge multiple hex conversions.
6103 * gdbreplay.c (tohex): Rename to 'fromhex'.
6104 (logchar): Use fromhex.
6105
6106 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6107
6108 * server.c (handle_qxfer_libraries): Set `version' attribute for
6109 <library-list>.
6110
6111 2015-06-10 Gary Benson <gbenson@redhat.com>
6112
6113 * target.h (struct target_ops) <multifs_open>: New field.
6114 <multifs_unlink>: Likewise.
6115 <multifs_readlink>: Likewise.
6116 * linux-low.c (nat/linux-namespaces.h): New include.
6117 (linux_target_ops): Initialize the_target->multifs_open,
6118 the_target->multifs_unlink and the_target->multifs_readlink.
6119 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6120 * hostio.c (hostio_fs_pid): New static variable.
6121 (hostio_handle_new_gdb_connection): New function.
6122 (handle_setfs): Likewise.
6123 (handle_open): Use the_target->multifs_open as appropriate.
6124 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6125 (handle_readlink): Use the_target->multifs_readlink as
6126 appropriate.
6127 (handle_vFile): Handle vFile:setfs packets.
6128 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6129 after target_handle_new_gdb_connection.
6130
6131 2015-06-10 Gary Benson <gbenson@redhat.com>
6132
6133 * configure.ac (AC_CHECK_FUNCS): Add setns.
6134 * config.in: Regenerate.
6135 * configure: Likewise.
6136 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6137 (linux-namespaces.o): New rule.
6138 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6139
6140 2015-06-09 Gary Benson <gbenson@redhat.com>
6141
6142 * hostio.c (handle_open): Process mode argument with
6143 fileio_to_host_mode.
6144
6145 2015-06-01 Yao Qi <yao.qi@linaro.org>
6146
6147 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6148 * linux-x86-low.c: Likewise.
6149
6150 2015-05-28 Don Breazeal <donb@codesourcery.com>
6151
6152 * linux-low.c (handle_extended_wait): Initialize
6153 thread_info.last_resume_kind for new fork children.
6154
6155 2015-05-15 Pedro Alves <palves@redhat.com>
6156
6157 * target.h (target_handle_new_gdb_connection): Rewrite using if
6158 wrapped in do/while.
6159
6160 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6161
6162 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6163 * configure, config.in: Regenerate.
6164 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6165 Declare typedef.
6166
6167 2015-05-12 Don Breazeal <donb@codesourcery.com>
6168
6169 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6170 PTRACE_EVENT_VFORK_DONE.
6171 (linux_low_ptrace_options, extended_event_reported): Add vfork
6172 events.
6173 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6174 and "vforkdone" for RSP 'T' Stop Reply Packet.
6175 * server.h (report_vfork_events): Declare
6176 global variable.
6177
6178 2015-05-12 Don Breazeal <donb@codesourcery.com>
6179
6180 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6181 (the_low_target) <new_fork>: Initialize new member.
6182 * linux-arm-low.c (arm_new_fork): New function.
6183 (the_low_target) <new_fork>: Initialize new member.
6184 * linux-low.c (handle_extended_wait): Call new target function
6185 new_fork.
6186 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6187 * linux-mips-low.c (mips_add_watchpoint): New function
6188 extracted from mips_insert_point.
6189 (the_low_target) <new_fork>: Initialize new member.
6190 (mips_linux_new_fork): New function.
6191 (mips_insert_point): Call mips_add_watchpoint.
6192 * linux-x86-low.c (x86_linux_new_fork): New function.
6193 (the_low_target) <new_fork>: Initialize new member.
6194
6195 2015-05-12 Don Breazeal <donb@codesourcery.com>
6196
6197 * linux-low.c (handle_extended_wait): Implement return value,
6198 rename argument 'event_child' to 'event_lwp', handle
6199 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6200 (linux_low_ptrace_options): New function.
6201 (linux_low_filter_event): Call linux_low_ptrace_options,
6202 use different argument fo linux_enable_event_reporting,
6203 use return value from handle_extended_wait.
6204 (extended_event_reported): New function.
6205 (linux_wait_1): Call extended_event_reported and set
6206 status to report fork events.
6207 (linux_write_memory): Add pid to debug message.
6208 (reset_lwp_ptrace_options_callback): New function.
6209 (linux_handle_new_gdb_connection): New function.
6210 (linux_target_ops): Initialize new structure member.
6211 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6212 * lynx-low.c: Initialize new structure member.
6213 * remote-utils.c (prepare_resume_reply): Implement stop reason
6214 "fork" for "T" stop message.
6215 * server.c (handle_query): Call handle_new_gdb_connection.
6216 * server.h (report_fork_events): Declare global flag.
6217 * target.h (struct target_ops) <handle_new_gdb_connection>:
6218 New member.
6219 (target_handle_new_gdb_connection): New macro.
6220 * win32-low.c: Initialize new structure member.
6221
6222 2015-05-12 Don Breazeal <donb@codesourcery.com>
6223
6224 * mem-break.c (APPEND_TO_LIST): Define macro.
6225 (clone_agent_expr): New function.
6226 (clone_one_breakpoint): New function.
6227 (clone_all_breakpoints): New function.
6228 * mem-break.h: Declare new functions.
6229
6230 2015-05-12 Don Breazeal <donb@codesourcery.com>
6231
6232 * linux-low.c (linux_supports_fork_events): New function.
6233 (linux_supports_vfork_events): New function.
6234 (linux_target_ops): Initialize new structure members.
6235 (initialize_low): Call linux_check_ptrace_features.
6236 * lynx-low.c (lynx_target_ops): Initialize new structure
6237 members.
6238 * server.c (report_fork_events, report_vfork_events):
6239 New global flags.
6240 (handle_query): Add new features to qSupported packet and
6241 response.
6242 (captured_main): Initialize new global variables.
6243 * target.h (struct target_ops) <supports_fork_events>:
6244 New member.
6245 <supports_vfork_events>: New member.
6246 (target_supports_fork_events): New macro.
6247 (target_supports_vfork_events): New macro.
6248 * win32-low.c (win32_target_ops): Initialize new structure
6249 members.
6250
6251 2015-05-12 Gary Benson <gbenson@redhat.com>
6252
6253 * server.c (handle_qxfer_exec_file): Use current process
6254 if annex is empty.
6255
6256 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6257
6258 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6259 Remove HAVE_PTRACE_GETREGS conditionals.
6260 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6261 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6262
6263 2015-05-08 Yao Qi <yao.qi@linaro.org>
6264
6265 * linux-low.c (linux_supports_conditional_breakpoints): New
6266 function.
6267 (linux_target_ops): Install new target method.
6268 * lynx-low.c (lynx_target_ops): Install NULL hook for
6269 supports_conditional_breakpoints.
6270 * nto-low.c (nto_target_ops): Likewise.
6271 * spu-low.c (spu_target_ops): Likewise.
6272 * win32-low.c (win32_target_ops): Likewise.
6273 * server.c (handle_query): Check
6274 target_supports_conditional_breakpoints.
6275 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6276 New field.
6277 (target_supports_conditional_breakpoints): New macro.
6278
6279 2015-05-06 Pedro Alves <palves@redhat.com>
6280
6281 PR server/18081
6282 * server.c (start_inferior): If the process exits, mourn it.
6283
6284 2015-04-21 Gary Benson <gbenson@redhat.com>
6285
6286 * hostio.c (fileio_open_flags_to_host): Factored out to
6287 fileio_to_host_openflags in common/fileio.c. Single use
6288 updated.
6289
6290 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6291
6292 * linux-xtensa-low.c (xtensa_fill_gregset)
6293 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6294 XCHAL_HAVE_LOOP.
6295
6296 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6297
6298 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6299 (regs_info): Replace usrregs pointer with NULL.
6300
6301 2015-04-17 Gary Benson <gbenson@redhat.com>
6302
6303 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6304 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6305 * server.c (handle_qxfer_exec_file): New function.
6306 (qxfer_packets): Add exec-file entry.
6307 (handle_query): Report qXfer:exec-file:read as supported packet.
6308
6309 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6310
6311 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6312
6313 2015-04-09 Gary Benson <gbenson@redhat.com>
6314
6315 * hostio-errno.c (errno_to_fileio_error): Remove function.
6316 Update caller to use remote_fileio_to_fio_error.
6317
6318 2015-04-09 Yao Qi <yao.qi@linaro.org>
6319
6320 * linux-low.c (linux_insert_point): Call
6321 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6322 (linux_remove_point): Call remove_memory_breakpoint if type is
6323 raw_bkpt_type_sw.
6324 * linux-x86-low.c (x86_insert_point): Don't call
6325 insert_memory_breakpoint.
6326 (x86_remove_point): Don't call remove_memory_breakpoint.
6327
6328 2015-04-01 Pedro Alves <palves@redhat.com>
6329 Cleber Rosa <crosa@redhat.com>
6330
6331 * server.c (gdbserver_usage): Reorganize and extend the usage
6332 message.
6333
6334 2015-03-24 Pedro Alves <palves@redhat.com>
6335
6336 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6337 output. Also dump TRAP_TRACE.
6338 (linux_low_filter_event): In debug output, distinguish a
6339 resume_stop SIGSTOP from a delayed SIGSTOP.
6340
6341 2015-03-24 Gary Benson <gbenson@redhat.com>
6342
6343 * linux-x86-low.c (x86_linux_new_thread): Moved to
6344 nat/x86-linux.c.
6345 (x86_linux_prepare_to_resume): Likewise.
6346
6347 2015-03-24 Gary Benson <gbenson@redhat.com>
6348
6349 * Makefile.in (x86-linux-dregs.o): New rule.
6350 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6351 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6352 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6353 (x86_linux_dr_get): Likewise.
6354 (x86_linux_dr_set): Likewise.
6355 (update_debug_registers_callback): Likewise.
6356 (x86_linux_dr_set_addr): Likewise.
6357 (x86_linux_dr_get_addr): Likewise.
6358 (x86_linux_dr_set_control): Likewise.
6359 (x86_linux_dr_get_control): Likewise.
6360 (x86_linux_dr_get_status): Likewise.
6361 (x86_linux_update_debug_registers): Likewise.
6362
6363 2015-03-24 Gary Benson <gbenson@redhat.com>
6364
6365 * linux-x86-low.c (x86_linux_update_debug_registers):
6366 New function, factored out from...
6367 (x86_linux_prepare_to_resume): ...this.
6368
6369 2015-03-24 Gary Benson <gbenson@redhat.com>
6370
6371 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6372 (x86_linux_dr_set): Likewise.
6373 (update_debug_registers_callback): Likewise.
6374 (x86_linux_dr_set_addr): Likewise.
6375 (x86_linux_dr_get_addr): Likewise.
6376 (x86_linux_dr_set_control): Likewise.
6377 (x86_linux_dr_get_control): Likewise.
6378 (x86_linux_dr_get_status): Likewise.
6379 (x86_linux_prepare_to_resume): Likewise.
6380
6381 2015-03-24 Gary Benson <gbenson@redhat.com>
6382
6383 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6384 Use perror_with_name. Pass string through gettext.
6385 (x86_linux_dr_set): Likewise.
6386
6387 2015-03-24 Gary Benson <gbenson@redhat.com>
6388
6389 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6390 (x86_linux_dr_set_addr): ...this.
6391 (x86_dr_low_get_addr): Rename to...
6392 (x86_linux_dr_get_addr): ...this.
6393 (x86_dr_low_set_control): Rename to...
6394 (x86_linux_dr_set_control): ...this.
6395 (x86_dr_low_get_control): Rename to...
6396 (x86_linux_dr_get_control): ...this.
6397 (x86_dr_low_get_status): Rename to...
6398 (x86_linux_dr_get_status): ...this.
6399 (x86_dr_low): Update with new function names.
6400
6401 2015-03-24 Gary Benson <gbenson@redhat.com>
6402
6403 * Makefile.in (x86-linux.o): New rule.
6404 * configure.srv: Add x86-linux.o to relevant targets.
6405 * linux-low.c (lwp_set_arch_private_info): New function.
6406 (lwp_arch_private_info): Likewise.
6407 * linux-x86-low.c: Include nat/x86-linux.h.
6408 (arch_lwp_info): Removed structure.
6409 (update_debug_registers_callback):
6410 Use lwp_set_debug_registers_changed.
6411 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6412 and lwp_set_debug_registers_changed.
6413 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6414
6415 2015-03-24 Gary Benson <gbenson@redhat.com>
6416
6417 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6418 * linux-arm-low.c (arm_new_thread): Likewise.
6419 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6420 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6421 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6422 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6423
6424 2015-03-24 Gary Benson <gbenson@redhat.com>
6425
6426 * linux-low.c (ptid_of_lwp): New function.
6427 (lwp_is_stopped): Likewise.
6428 (lwp_stop_reason): Likewise.
6429 * linux-x86-low.c (update_debug_registers_callback):
6430 Use lwp_is_stopped.
6431 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6432 lwp_stop_reason.
6433
6434 2015-03-24 Gary Benson <gbenson@redhat.com>
6435
6436 * linux-low.h (linux_stop_lwp): Remove declaration.
6437
6438 2015-03-24 Gary Benson <gbenson@redhat.com>
6439
6440 * linux-low.h: Include nat/linux-nat.h.
6441 * linux-low.c (iterate_over_lwps_args): New structure.
6442 (iterate_over_lwps_filter): New function.
6443 (iterate_over_lwps): Likewise.
6444 * linux-x86-low.c (update_debug_registers_callback):
6445 Update signature to what iterate_over_lwps expects.
6446 Remove PID check that iterate_over_lwps now performs.
6447 (x86_dr_low_set_addr): Use iterate_over_lwps.
6448 (x86_dr_low_set_control): Likewise.
6449
6450 2015-03-24 Gary Benson <gbenson@redhat.com>
6451
6452 * linux-x86-low.c (x86_debug_reg_state): New function.
6453 (x86_linux_prepare_to_resume): Use the above.
6454
6455 2015-03-24 Gary Benson <gbenson@redhat.com>
6456
6457 * linux-low.c (current_lwp_ptid): New function.
6458 * linux-x86-low.c: Include nat/linux-nat.h.
6459 (x86_dr_low_get_addr): Use current_lwp_ptid.
6460 (x86_dr_low_get_control): Likewise.
6461 (x86_dr_low_get_status): Likewise.
6462
6463 2015-03-20 Pedro Alves <palves@redhat.com>
6464
6465 * tracepoint.c (cmd_qtstatus): Make "str" const.
6466
6467 2015-03-20 Pedro Alves <palves@redhat.com>
6468
6469 * server.c (handle_general_set): Make "req_str" const.
6470
6471 2015-03-19 Pedro Alves <palves@redhat.com>
6472
6473 * linux-low.c (linux_resume_one_lwp): Rename to ...
6474 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6475 instead call perror_with_name.
6476 (check_ptrace_stopped_lwp_gone): New function.
6477 (linux_resume_one_lwp): Reimplement as wrapper around
6478 linux_resume_one_lwp_throw that swallows errors if the LWP is
6479 gone.
6480
6481 2015-03-19 Pedro Alves <palves@redhat.com>
6482
6483 * linux-low.c (count_events_callback, select_event_lwp_callback):
6484 No longer check whether the thread has resume_stop as last resume
6485 kind.
6486
6487 2015-03-19 Pedro Alves <palves@redhat.com>
6488
6489 * linux-low.c (count_events_callback, select_event_lwp_callback):
6490 Use the lwp's status_pending_p field, not the thread's.
6491
6492 2015-03-19 Pedro Alves <palves@redhat.com>
6493
6494 * linux-low.c (select_event_lwp_callback): Update comments to
6495 no longer mention SIGTRAP.
6496
6497 2015-03-18 Gary Benson <gbenson@redhat.com>
6498
6499 * server.c (handle_query): Do not report vFile:fstat as supported.
6500
6501 2015-03-11 Gary Benson <gbenson@redhat.com>
6502
6503 * hostio.c (sys/types.h): New include.
6504 (sys/stat.h): Likewise.
6505 (common-remote-fileio.h): Likewise.
6506 (handle_fstat): New function.
6507 (handle_vFile): Handle vFile:fstat packets.
6508
6509 2015-03-11 Gary Benson <gbenson@redhat.com>
6510
6511 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6512 struct stat.st_blocks and struct stat.st_blksize.
6513 * configure: Regenerate.
6514 * config.in: Likewise.
6515 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6516 (OBS): Add common-remote-fileio.o.
6517 (common-remote-fileio.o): New rule.
6518
6519 2015-03-09 Pedro Alves <palves@redhat.com>
6520
6521 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6522 'struct sockaddr' pointer in 'accept' call.
6523
6524 2015-03-09 Pedro Alves <palves@redhat.com>
6525
6526 Revert:
6527 2015-03-07 Pedro Alves <palves@redhat.com>
6528 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6529 or <winsock2.h> here. Instead include "gdb_socket.h".
6530 (remote_open): Use union gdb_sockaddr_u.
6531 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6532 or <winsock2.h> here. Instead include "gdb_socket.h".
6533 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6534 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6535 or <sys/un.h>.
6536 (init_named_socket, gdb_agent_helper_thread): Use union
6537 gdb_sockaddr_u.
6538
6539 2015-03-07 Pedro Alves <palves@redhat.com>
6540
6541 * configure.ac (build_warnings): Move
6542 -Wdeclaration-after-statement to the C-specific set.
6543 * configure: Regenerate.
6544
6545 2015-03-07 Pedro Alves <palves@redhat.com>
6546
6547 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6548 or <winsock2.h> here. Instead include "gdb_socket.h".
6549 (remote_open): Use union gdb_sockaddr_u.
6550 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6551 or <winsock2.h> here. Instead include "gdb_socket.h".
6552 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6553 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6554 or <sys/un.h>.
6555 (init_named_socket, gdb_agent_helper_thread): Use union
6556 gdb_sockaddr_u.
6557
6558 2015-03-07 Pedro Alves <palves@redhat.com>
6559
6560 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6561 instead.
6562
6563 2015-03-06 Yao Qi <yao.qi@linaro.org>
6564
6565 * linux-aarch64-low.c (aarch64_insert_point): Use
6566 show_debug_regs as a boolean.
6567 (aarch64_remove_point): Likewise.
6568
6569 2015-03-05 Pedro Alves <palves@redhat.com>
6570
6571 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6572 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6573 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6574 * nto-low.c (nto_target_ops): Likewise.
6575 * spu-low.c (spu_target_ops): Likewise.
6576 * win32-low.c (win32_target_ops): Likewise.
6577
6578 2015-03-04 Pedro Alves <palves@redhat.com>
6579
6580 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6581 Decide whether a breakpoint triggered based on the SIGTRAP's
6582 siginfo.si_code.
6583 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6584 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6585 (linux_low_filter_event): Check for breakpoints before checking
6586 watchpoints.
6587 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6588 siginfo.si_code.
6589 (linux_stopped_by_sw_breakpoint)
6590 (linux_supports_stopped_by_sw_breakpoint)
6591 (linux_stopped_by_hw_breakpoint)
6592 (linux_supports_stopped_by_hw_breakpoint): New functions.
6593 (linux_target_ops): Install new target methods.
6594
6595 2015-03-04 Pedro Alves <palves@redhat.com>
6596
6597 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6598 * server.c (swbreak_feature, hwbreak_feature): New globals.
6599 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6600 (captured_main): Clear swbreak_feature and hwbreak_feature.
6601 * server.h (swbreak_feature, hwbreak_feature): Declare.
6602 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6603 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6604 supports_stopped_by_hw_breakpoint>: New fields.
6605 (target_supports_stopped_by_sw_breakpoint)
6606 (target_stopped_by_sw_breakpoint)
6607 (target_supports_stopped_by_hw_breakpoint)
6608 (target_stopped_by_hw_breakpoint): Declare.
6609
6610 2015-03-04 Pedro Alves <palves@redhat.com>
6611
6612 enum lwp_stop_reason -> enum target_stop_reason
6613 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6614 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6615 (linux_wait_1, stuck_in_jump_pad_callback)
6616 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6617 (linux_stopped_by_watchpoint):
6618 * linux-low.h (enum lwp_stop_reason): Delete.
6619 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6620 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6621
6622 2015-03-04 Yao Qi <yao.qi@linaro.org>
6623
6624 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6625
6626 2015-03-03 Gary Benson <gbenson@redhat.com>
6627
6628 * hostio.c (handle_vFile): Fix prefix lengths.
6629
6630 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6631
6632 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6633 ptr_bits.
6634
6635 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6636
6637 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6638 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6639 (clean): Add "rm -f" for above C files.
6640 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6641 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6642 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6643 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6644 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6645 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6646 (init_registers_s390x_vx_linux64)
6647 (init_registers_s390x_tevx_linux64)
6648 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6649 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6650 declarations.
6651 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6652 (s390_store_vxrs_high): New functions.
6653 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6654 NT_S390_VXRS_HIGH.
6655 (s390_arch_setup): Add logic for selecting one of the new target
6656 descriptions. Activate the new vector regsets if applicable.
6657 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6658 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6659 and init_registers_s390x_tevx_linux64.
6660
6661 2015-03-01 Pedro Alves <palves@redhat.com>
6662
6663 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6664 parameter.
6665
6666 2015-02-27 Pedro Alves <palves@redhat.com>
6667
6668 * linux-x86-low.c (u_debugreg_offset): New function.
6669 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6670
6671 2015-02-27 Pedro Alves <palves@redhat.com>
6672
6673 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6674 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6675 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6676 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6677 (ps_lsetfpregs, ps_getpid)
6678 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6679 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6680 (ps_lsetxregs, ps_plog): Declare.
6681
6682 2015-02-27 Pedro Alves <palves@redhat.com>
6683
6684 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6685 IP_AGENT_EXPORT_FUNC.
6686 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6687 IP_AGENT_EXPORT_FUNC.
6688 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6689 (IP_AGENT_EXPORT): Delete.
6690 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6691 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6692 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6693 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6694 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6695 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6696 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6697 (traceframe_read_count, traceframe_write_count)
6698 (traceframes_created, trace_state_variables, get_raw_reg)
6699 (get_trace_state_variable_value, set_trace_state_variable_value)
6700 (ust_loaded, helper_thread_id, cmd_buf): Use
6701 IPA_SYM_EXPORTED_NAME.
6702 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6703 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6704 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6705 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6706 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6707 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6708 EXTERN_C_PUSH/EXTERN_C_POP.
6709 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6710 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6711 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6712 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6713 (traceframe_write_count, traceframe_read_count)
6714 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6715 (about_to_request_buffer_space, get_trace_state_variable_value)
6716 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6717 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6718 EXTERN_C_PUSH/EXTERN_C_POP.
6719 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6720 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6721 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6722 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6723 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6724 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6725 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6726 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6727 Define.
6728 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6729 (IP_AGENT_EXPORT_VAR_DECL): Define.
6730 (tracing): Declare.
6731 (gdb_agent_get_raw_reg): Declare.
6732
6733 2015-02-27 Tom Tromey <tromey@redhat.com>
6734 Pedro Alves <palves@redhat.com>
6735
6736 Rename symbols whose names are reserved C++ keywords throughout.
6737
6738 2015-02-27 Pedro Alves <palves@redhat.com>
6739
6740 * Makefile.in (COMPILER): New, get it from autoconf.
6741 (CXX): Get from autoconf instead.
6742 (COMPILE.pre): Use COMPILER.
6743 (CC-LD): Rename to ...
6744 (CC_LD): ... this. Use COMPILER.
6745 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6746 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6747 * acinclude.m4: Include build-with-cxx.m4.
6748 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6749 Disable -Werror by default if building in C++ mode.
6750 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6751 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6752 the C++ compiler. Save/restore CXXFLAGS too.
6753 * configure: Regenerate.
6754
6755 2015-02-27 Pedro Alves <palves@redhat.com>
6756
6757 * acinclude.m4: Include libiberty.m4.
6758 * configure.ac: Call libiberty_INIT.
6759 * config.in, configure: Regenerate.
6760
6761 2015-02-26 Pedro Alves <palves@redhat.com>
6762
6763 * linux-low.c (linux_wait_1): When incrementing the PC past a
6764 program breakpoint always use the_low_target.breakpoint_len as
6765 increment, rather than the maximum between that and
6766 the_low_target.decr_pc_after_break.
6767
6768 2015-02-23 Pedro Alves <palves@redhat.com>
6769
6770 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6771 thread was doing a step-over; always adjust the PC if
6772 we stepped over a permanent breakpoint.
6773 (linux_wait_1): If we stepped over breakpoint that was on top of a
6774 permanent breakpoint, manually advance the PC past it.
6775
6776 2015-02-23 Pedro Alves <palves@redhat.com>
6777
6778 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6779 modes.
6780 (x86_fill_gregset, x86_store_gregset): Use it when handling
6781 $orig_eax.
6782
6783 2015-02-20 Pedro Alves <palves@redhat.com>
6784
6785 * thread-db.c: Include "nat/linux-procfs.h".
6786 (thread_db_init): Skip listing new threads if the kernel supports
6787 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6788
6789 2015-02-20 Pedro Alves <palves@redhat.com>
6790
6791 * linux-low.c (status_pending_p_callback): Use ptid_match.
6792
6793 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6794
6795 PR breakpoints/16812
6796 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6797 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6798 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6799
6800 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6801
6802 PR breakpoints/15956
6803 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6804
6805 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6806
6807 * linux-low.c (linux_low_btrace_conf): Print size.
6808 * server.c (handle_btrace_conf_general_set): New.
6809 (hanle_general_set): Call handle_btrace_conf_general_set.
6810 (handle_query): Report Qbtrace-conf:bts:size as supported.
6811
6812 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6813
6814 * linux-low.c (linux_low_enable_btrace): Update parameters.
6815 (linux_low_btrace_conf): New.
6816 (linux_target_ops)<to_btrace_conf>: Initialize.
6817 * server.c (current_btrace_conf): New.
6818 (handle_btrace_enable): Rename to ...
6819 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6820 to target_enable_btrace. Update comment. Update users.
6821 (handle_qxfer_btrace_conf): New.
6822 (qxfer_packets): Add btrace-conf entry.
6823 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6824 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6825 (target_ops)<read_btrace_conf>: New.
6826 (target_enable_btrace): Update parameters.
6827 (target_read_btrace_conf): New.
6828
6829 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6830
6831 * server.c (handle_btrace_general_set): Remove call to
6832 target_supports_btrace.
6833 (supported_btrace_packets): New.
6834 (handle_query): Call supported_btrace_packets.
6835 * target.h: include btrace-common.h.
6836 (btrace_target_info): Removed.
6837 (supports_btrace, target_supports_btrace): Update parameters.
6838
6839 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6840
6841 * Makefile.in (SFILES): Add common/btrace-common.c.
6842 (OBS): Add common/btrace-common.o.
6843 (btrace-common.o): Add build rules.
6844 * linux-low: Include btrace-common.h.
6845 (linux_low_read_btrace): Use struct btrace_data. Call
6846 btrace_data_init and btrace_data_fini.
6847
6848 2015-02-06 Pedro Alves <palves@redhat.com>
6849
6850 * thread-db.c (find_new_threads_callback): Add debug output.
6851
6852 2015-02-04 Pedro Alves <palves@redhat.com>
6853
6854 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6855 (resume_stopped_resumed_lwps): New function.
6856 (linux_wait_for_event_filtered): Use it.
6857
6858 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6859
6860 * Makefile.in (SFILES): Add linux-personality.c.
6861 (linux-personality.o): New rule.
6862 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6863 list of objects to be built.
6864 * linux-low.c: Include nat/linux-personality.h.
6865 (linux_create_inferior): Remove code to disable address space
6866 randomization (moved to ../nat/linux-personality.c). Create
6867 cleanup to disable address space randomization.
6868
6869 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6870
6871 * Makefile.in (posix-strerror.o): New rule.
6872 (mingw-strerror.o): Likewise.
6873 * configure: Regenerated.
6874 * configure.ac: Source file ../common/common.host. Initialize new
6875 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6876
6877 2015-01-14 Yao Qi <yao@codesourcery.com>
6878
6879 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6880 (ppc-linux.o): New rule.
6881 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6882 * configure.ac: AC_CHECK_FUNCS(getauxval).
6883 * config.in: Re-generated.
6884 * configure: Re-generated.
6885 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6886 ppc64_64bit_inferior_p
6887
6888 2015-01-14 Yao Qi <yao@codesourcery.com>
6889
6890 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6891 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6892 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6893 (PT_ORIG_R3, PT_TRAP): Likewise.
6894 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6895 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6896 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6897
6898 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6899
6900 * i387-fp.c (i387_cache_to_xsave): In look over
6901 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6902 zmmh_low_space field by use of zmmh_high_space.
6903
6904 2015-01-09 Pedro Alves <palves@redhat.com>
6905
6906 * linux-low.c (step_over_bkpt): Move higher up in the file.
6907 (handle_extended_wait): Don't store the stop_pc here.
6908 (get_stop_pc): Adjust comments and rename to ...
6909 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6910 stopped for a software breakpoint or hardware breakpoint.
6911 (thread_still_has_status_pending_p): New function.
6912 (status_pending_p_callback): Use
6913 thread_still_has_status_pending_p. If the event is no longer
6914 interesting, resume the LWP.
6915 (handle_tracepoints): Add assert.
6916 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6917 (wstatus_maybe_breakpoint): New function.
6918 (cancel_breakpoint): Delete function.
6919 (check_stopped_by_watchpoint): New function, factored out from
6920 linux_low_filter_event.
6921 (lp_status_maybe_breakpoint): Delete function.
6922 (linux_low_filter_event): Remove filter_ptid argument.
6923 Leave thread group exits pending here. Store the LWP's stop PC.
6924 Always leave events pending.
6925 (linux_wait_for_event_filtered): Pull all events out of the
6926 kernel, and leave them all pending.
6927 (count_events_callback, select_event_lwp_callback): Consider all
6928 events.
6929 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6930 (select_event_lwp): Only give preference to the stepping LWP in
6931 all-stop mode. Adjust comments.
6932 (ignore_event): New function.
6933 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6934 references to cancel_breakpoints. Adjust to renames. Also give
6935 equal priority to all LWPs that have had events in non-stop mode.
6936 If reporting a software breakpoint event, unadjust the LWP's PC.
6937 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6938 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6939 Adjust.
6940 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6941 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6942 (linux_stopped_by_watchpoint): Adjust.
6943 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6944 * linux-low.h (enum lwp_stop_reason): New.
6945 (struct lwp_info) <stop_pc>: Adjust comment.
6946 <stopped_by_watchpoint>: Delete field.
6947 <stop_reason>: New field.
6948 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6949 * mem-break.c (software_breakpoint_inserted_here)
6950 (hardware_breakpoint_inserted_here): New function.
6951 * mem-break.h (software_breakpoint_inserted_here)
6952 (hardware_breakpoint_inserted_here): Declare.
6953 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6954 (cancel_breakpoints): Delete.
6955 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6956 (upload_fast_traceframes): Remove references to
6957 cancel_breakpoints.
6958
6959 2015-01-09 Pedro Alves <palves@redhat.com>
6960
6961 * thread-db.c (find_new_threads_callback): Ignore thread if the
6962 kernel thread ID is -1.
6963
6964 2015-01-09 Pedro Alves <palves@redhat.com>
6965
6966 * linux-low.c (linux_attach_fail_reason_string): Move to
6967 nat/linux-ptrace.c, and rename.
6968 (linux_attach_lwp): Update comment.
6969 (attach_proc_task_lwp_callback): New function.
6970 (linux_attach): Adjust to rename and use
6971 linux_proc_attach_tgid_threads.
6972 (linux_attach_fail_reason_string): Delete declaration.
6973
6974 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6975
6976 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6977 * server.c (gdbserver_version): Likewise.
6978
6979 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6980
6981 * remote-utils.c: Include ctype.h.
6982 (input_interrupt): Explicitly handle the case when the char
6983 received is the NUL byte. Improve the printing of non-ASCII
6984 characters.
6985
6986 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6987
6988 * linux-low.c (linux_low_filter_event): Update call to
6989 linux_enable_event_reporting following the addition of
6990 a new parameter to that function.
6991
6992 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6993
6994 PR server/17457
6995 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6996 (AARCH64_FPCR_REGNO): Likewise.
6997 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6998 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6999 (aarch64_store_fpregset): Likewise.
7000
7001 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7002
7003 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7004 Remove FIXME comment about assumption about N.
7005
7006 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7007
7008 * configure.ac: If large-file support is disabled in GDBserver,
7009 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7010 * configure: Regenerate.
7011
7012 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7013
7014 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7015 warning upon ENODATA from ptrace.
7016 * linux-s390-low.c (s390_store_tdb): New.
7017 (s390_regsets): Add regset for NT_S390_TDB.
7018
7019 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7020
7021 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7022 without a fill_function.
7023 * linux-s390-low.c (s390_fill_last_break): Remove.
7024 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7025 (s390_arch_setup): Use regset's size instead of fill_function for
7026 loop end condition.
7027
7028 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7029
7030 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7031 the regset's store function when ptrace returned an error.
7032 * regcache.c (get_thread_regcache): Invalidate register cache
7033 before fetching inferior's registers.
7034
7035 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7036
7037 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7038 while-loop as for-loop.
7039 (regsets_store_inferior_registers): Likewise.
7040
7041 2014-11-28 Yao Qi <yao@codesourcery.com>
7042
7043 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7044 * config.in, configure: Re-generate.
7045 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7046 is defined.
7047
7048 2014-11-21 Yao Qi <yao@codesourcery.com>
7049
7050 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7051 (AC_CHECK_HEADERS): Remove malloc.h.
7052 * configure: Re-generated.
7053 * config.in: Re-generated.
7054 * server.h: Don't include alloca.h and malloc.h.
7055 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7056 Don't include malloc.h.
7057
7058 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7059
7060 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7061 corresponding ERRNO check in same block.
7062
7063 2014-11-12 Pedro Alves <palves@redhat.com>
7064
7065 * server.c (cont_thread): Update comment.
7066 (start_inferior, attach_inferior): No longer clear cont_thread.
7067 (handle_v_cont): No longer set cont_thread.
7068 (captured_main): Clear cont_thread each time a GDB connects.
7069
7070 2014-11-12 Pedro Alves <palves@redhat.com>
7071
7072 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7073 thread, and don't resume all threads if the Hc thread has exited.
7074
7075 2014-11-12 Pedro Alves <palves@redhat.com>
7076
7077 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7078 the process group instead of to a specific LWP.
7079
7080 2014-10-15 Pedro Alves <palves@redhat.com>
7081
7082 PR server/17487
7083 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7084 parameter.
7085 (arm_set_thread_context): Delete.
7086 (the_low_target): Adjust.
7087 * win32-i386-low.c (debug_registers_changed)
7088 (debug_registers_used): Delete.
7089 (update_debug_registers_callback): New function.
7090 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7091 needing to update their debug registers.
7092 (win32_get_current_dr): New function.
7093 (x86_dr_low_get_addr, x86_dr_low_get_control)
7094 (x86_dr_low_get_status): Fetch the debug register from the thread
7095 record's context.
7096 (i386_initial_stuff): Adjust.
7097 (i386_get_thread_context): Remove current_event parameter. Don't
7098 clear debug_registers_changed nor copy DR values to
7099 debug_reg_state.
7100 (i386_set_thread_context): Delete.
7101 (i386_prepare_to_resume): New function.
7102 (i386_thread_added): Mark the thread as needing to update irs
7103 debug registers.
7104 (the_low_target): Remove i386_set_thread_context and install
7105 i386_prepare_to_resume.
7106 * win32-low.c (win32_get_thread_context): Adjust.
7107 (win32_set_thread_context): Use SetThreadContext
7108 directly.
7109 (win32_prepare_to_resume): New function.
7110 (win32_require_context): New function, factored out from ...
7111 (thread_rec): ... this.
7112 (continue_one_thread): Call win32_prepare_to_resume on each thread
7113 we're about to continue.
7114 (win32_resume): Call win32_prepare_to_resume on the event thread.
7115 * win32-low.h (struct win32_thread_info)
7116 <debug_registers_changed>: New field.
7117 (struct win32_target_ops): Change prototype of set_thread_context,
7118 delete set_thread_context and add prepare_to_resume.
7119 (win32_require_context): New declaration.
7120
7121 2014-10-08 Gary Benson <gbenson@redhat.com>
7122
7123 * server.h: Do not include common-exceptions.h.
7124
7125 2014-10-08 Gary Benson <gbenson@redhat.com>
7126
7127 * server.h: Do not include cleanups.h.
7128
7129 2014-09-30 James Hogan <james.hogan@imgtec.com>
7130
7131 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7132 mips64-dsp-linux.c.
7133
7134 2014-09-23 Yao Qi <yao@codesourcery.com>
7135
7136 * linux-low.c (lp_status_maybe_breakpoint): New function.
7137 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7138 (count_events_callback): Likewise.
7139 (select_event_lwp_callback): Likewise.
7140 (cancel_breakpoints_callback): Likewise.
7141
7142 2014-09-19 Don Breazeal <donb@codesourcery.com>
7143
7144 * linux-low.c (handle_extended_wait): Call
7145 linux_ptrace_get_extended_event.
7146 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7147 linux_is_extended_waitstatus.
7148
7149 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7150
7151 * Makefile.in (CPPFLAGS): Define.
7152 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7153 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7154
7155 2014-09-16 Gary Benson <gbenson@redhat.com>
7156
7157 * inferiors.h (current_inferior): Renamed as...
7158 (current_thread): New variable. All uses updated.
7159 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7160 (maybe_move_out_of_jump_pad): Likewise.
7161 (cancel_breakpoint): Likewise.
7162 (linux_low_filter_event): Likewise.
7163 (wait_for_sigstop): Likewise.
7164 (linux_resume_one_lwp): Likewise.
7165 (need_step_over_p): Likewise.
7166 (start_step_over): Likewise.
7167 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7168 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7169 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7170 and save_inferior as saved_thread.
7171 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7172 saved_thread.
7173 (regcache_invalidate_thread): Likewise.
7174 * remote-utils.c (prepare_resume_reply): Likewise.
7175 * thread-db.c (thread_db_get_tls_address): Likewise.
7176 (disable_thread_event_reporting): Likewise.
7177 (remove_thread_event_breakpoints): Likewise.
7178 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7179 as saved_thread.
7180 * target.h (set_desired_inferior): Renamed as...
7181 (set_desired_thread): New declaration. All uses updated.
7182 * server.c (myresume): Updated comment to reference thread instead
7183 of inferior.
7184 (handle_serial_event): Likewise.
7185 (handle_target_event): Likewise.
7186
7187 2014-09-12 Tom Tromey <tromey@redhat.com>
7188 Gary Benson <gbenson@redhat.com>
7189
7190 * regcache.h: Include common-regcache.h.
7191 (regcache_read_pc): Don't declare.
7192 * regcache.c (get_thread_regcache_for_ptid): New function.
7193
7194 2014-09-11 Tom Tromey <tromey@redhat.com>
7195 Gary Benson <gbenson@redhat.com>
7196
7197 * symbol.c: New file.
7198 * Makefile.in (SFILES): Add symbol.c.
7199 (OBS): Add symbol.o.
7200
7201 2014-09-11 Gary Benson <gbenson@redhat.com>
7202
7203 * target.c (target_stop_ptid, target_continue_ptid): New
7204 functions.
7205
7206 2014-09-11 Tom Tromey <tromey@redhat.com>
7207 Gary Benson <gbenson@redhat.com>
7208
7209 * target.h: Include target/target.h.
7210 * target.c (target_read_memory, target_read_uint32)
7211 (target_write_memory): New functions.
7212
7213 2014-09-11 Gary Benson <gbenson@redhat.com>
7214
7215 * server.h (debug_hw_points): Don't declare.
7216 * server.c (debug_hw_points): Don't define. Replace all uses
7217 with show_debug_regs.
7218 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7219 all uses with show_debug_regs.
7220
7221 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7222
7223 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7224 endianness into account.
7225 (ppc_supply_ptrace_register): Likewise.
7226
7227 2014-09-03 James Hogan <james.hogan@imgtec.com>
7228
7229 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7230 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7231
7232 2014-09-03 Gary Benson <gbenson@redhat.com>
7233
7234 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7235 ALL_DEBUG_ADDRESS_REGISTERS.
7236
7237 2014-09-02 Gary Benson <gbenson@redhat.com>
7238
7239 * i386-low.h: Renamed as...
7240 * x86-low.h: New file. All type, function and variable name
7241 prefixes changed from "i386_" to "x86_". All references updated.
7242 * i386-low.c: Renamed as...
7243 * x86-low.c: New file. All type, function and variable name
7244 prefixes changed from "i386_" to "x86_". All references updated.
7245
7246 2014-09-02 Gary Benson <gbenson@redhat.com>
7247
7248 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7249 (x86_linux_new_thread): Likewise.
7250
7251 2014-08-29 Gary Benson <gbenson@redhat.com>
7252
7253 * server.h (setjmp.h): Do not include.
7254 (toplevel): Do not declare.
7255 (common-exceptions.h): Include.
7256 (cleanups.h): Likewise.
7257 * server.c (toplevel): Do not define.
7258 (exit_code): New static global.
7259 (detach_or_kill_for_exit_cleanup): New function.
7260 (main): New function. Original main renamed to...
7261 (captured_main): New function.
7262 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7263
7264 2014-08-29 Gary Benson <gbenson@redhat.com>
7265
7266 * Makefile.in (SFILES): Add common/common-exceptions.c.
7267 (OBS): Add common-exceptions.o.
7268 (common-exceptions.o): New rule.
7269 * utils.c (prepare_to_throw_exception): New function.
7270
7271 2014-08-29 Gary Benson <gbenson@redhat.com>
7272
7273 * config.in: Regenerate.
7274 * configure: Likewise.
7275
7276 2014-08-29 Gary Benson <gbenson@redhat.com>
7277
7278 * Makefile.in (SFILES): Add common/cleanups.c.
7279 (OBS): cleanups.o.
7280 (cleanups.o): New rule.
7281
7282 2014-08-29 Gary Benson <gbenson@redhat.com>
7283
7284 * utils.c (internal_vwarning): New function.
7285
7286 2014-08-28 Gary Benson <gbenson@redhat.com>
7287
7288 * utils.h (fatal): Remove declaration.
7289 * utils.c (fatal): Remove function.
7290
7291 2014-08-28 Gary Benson <gbenson@redhat.com>
7292
7293 * tracepoint.c (gdb_agent_init): Replace fatal with
7294 perror_with_name.
7295 (initialize_tracepoint): Likewise.
7296
7297 2014-08-28 Gary Benson <gbenson@redhat.com>
7298
7299 * remote-utils.c (remote_prepare): Replace fatal with error.
7300
7301 2014-08-28 Gary Benson <gbenson@redhat.com>
7302
7303 * linux-low.c (linux_async): Replace fatal with warning.
7304 Tidy up and return.
7305 (linux_start_non_stop): Return -1 if linux_async failed.
7306
7307 2014-08-28 Gary Benson <gbenson@redhat.com>
7308
7309 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7310 gdb_assert.
7311 (i386_dr_low_get_addr): Remove vague comment.
7312 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7313 gdb_assert.
7314
7315 2014-08-28 Gary Benson <gbenson@redhat.com>
7316
7317 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7318 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7319 internal_error.
7320 (linux_resume_one_lwp): Likewise.
7321 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7322 gdb_assert.
7323 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7324 with internal_error.
7325 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7326 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7327 (find_register_by_name): Replace fatal with internal_error.
7328 (find_regno): Likewise.
7329 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7330 * thread-db.c (thread_db_create_event): Likewise.
7331 (thread_db_load_search): Likewise.
7332 (try_thread_db_load_1): Likewise.
7333 * tracepoint.c (get_jump_space_head): Replace fatal with
7334 internal_error.
7335 (claim_trampoline_space): Likewise.
7336 (have_fast_tracepoint_trampoline_buffer): Likewise.
7337 (cmd_qtstart): Likewise.
7338 (stop_tracing): Likewise.
7339 (fast_tracepoint_collecting): Likewise.
7340 (target_malloc): Likewise.
7341 (download_tracepoint): Likewise.
7342 (download_trace_state_variables): Replace check with gdb_assert.
7343 (upload_fast_traceframes): Replace fatal with internal_error.
7344
7345 2014-08-19 Tom Tromey <tromey@redhat.com>
7346 Gary Benson <gbenson@redhat.com>
7347
7348 * Makefile.in (SFILES): Add common/common-debug.c.
7349 (OBS): Add common-debug.o.
7350 (common-debug.o): New rule.
7351 * debug.h (debug_printf): Don't declare.
7352 * debug.c (debug_printf): Renamed and rewritten as...
7353 (debug_vprintf): New function.
7354
7355 2014-08-19 Gary Benson <gbenson@redhat.com>
7356
7357 * utils.h: Do not include print-utils.h.
7358
7359 2014-08-19 Tom Tromey <tromey@redhat.com>
7360 Gary Benson <gbenson@redhat.com>
7361
7362 * server.h: Add static assertion.
7363 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7364
7365 2014-08-19 Tom Tromey <tromey@redhat.com>
7366 Gary Benson <gbenson@redhat.com>
7367
7368 * Makefile.in (SFILES): Add common/errors.c.
7369 (OBS): Add errors.o.
7370 (IPA_OBS): Add errors-ipa.o.
7371 (errors.o): New rule.
7372 (errors-ipa.o): Likewise.
7373 * utils.h (perror_with_name, error, warning): Don't declare.
7374 * utils.c (warning): Renamed and rewritten as...
7375 (vwarning): New function.
7376 (error): Renamed and rewritten as...
7377 (verror): New function.
7378 (internal_error): Renamed and rewritten as...
7379 (internal_verror): New function.
7380
7381 2014-08-07 Gary Benson <gbenson@redhat.com>
7382
7383 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7384 * configure: Regenerate.
7385 * config.in: Likewise.
7386 * server.h: Do not include errno.h.
7387 * event-loop.c: Likewise.
7388 * hostio-errno.c: Likewise.
7389 * linux-low.c: Likewise.
7390 * remote-utils.c: Likewise.
7391 * spu-low.c: Likewise.
7392 * utils.c: Likewise.
7393 * gdbreplay.c: Unconditionally include errno.h.
7394
7395 2014-08-07 Gary Benson <gbenson@redhat.com>
7396
7397 * server.h: Do not include string.h.
7398 * event-loop.c: Likewise.
7399 * linux-low.c: Likewise.
7400 * regcache.c: Likewise.
7401 * remote-utils.c: Likewise.
7402 * spu-low.c: Likewise.
7403 * utils.c: Likewise.
7404
7405 2014-08-07 Gary Benson <gbenson@redhat.com>
7406
7407 * server.h: Do not include gdb_assert.h.
7408
7409 2014-08-07 Gary Benson <gbenson@redhat.com>
7410
7411 * server.h: Do not include common-utils.h.
7412
7413 2014-08-07 Gary Benson <gbenson@redhat.com>
7414
7415 * server.h: Do not include ptid.h.
7416 * notif.h: Likewise.
7417
7418 2014-08-07 Gary Benson <gbenson@redhat.com>
7419
7420 * server.h: Do not include gdb_locale.h.
7421
7422 2014-08-07 Gary Benson <gbenson@redhat.com>
7423
7424 * server.h: Do not include gdb/signals.h.
7425 * win32-low.c: Likewise.
7426
7427 2014-08-07 Gary Benson <gbenson@redhat.com>
7428
7429 * server.h: Do not include pathmax.h.
7430
7431 2014-08-07 Gary Benson <gbenson@redhat.com>
7432
7433 * server.h: Do not include libiberty.h.
7434 * linux-bfin-low.c: Likewise.
7435
7436 2014-08-07 Gary Benson <gbenson@redhat.com>
7437
7438 * server.h: Do not include ansidecl.h.
7439
7440 2014-08-07 Gary Benson <gbenson@redhat.com>
7441
7442 * linux-x86-low.c: Do not include stddef.h.
7443 * lynx-ppc-low.c: Likewise.
7444 * tracepoint.c: Likewise.
7445
7446 2014-08-07 Gary Benson <gbenson@redhat.com>
7447
7448 * server.h: Do not include stdarg.h.
7449 * nto-low.c: Likewise.
7450
7451 2014-08-07 Gary Benson <gbenson@redhat.com>
7452
7453 * server.h: Do not include stdlib.h.
7454 * inferiors.c: Likewise.
7455 * linux-low.c: Likewise.
7456 * regcache.c: Likewise.
7457 * spu-low.c: Likewise.
7458 * tracepoint.c: Likewise.
7459 * utils.c: Likewise.
7460
7461 2014-08-07 Gary Benson <gbenson@redhat.com>
7462
7463 * server.h: Do not include stdio.h.
7464 * linux-low.c: Likewise.
7465 * remote-utils.c: Likewise.
7466 * spu-low.c: Likewise.
7467 * utils.c: Likewise.
7468 * wincecompat.c: Likewise.
7469
7470 2014-08-06 Gary Benson <gbenson@redhat.com>
7471
7472 * regcache.c (init_register_cache): Move conditionals inside if.
7473
7474 2014-08-06 Gary Benson <gbenson@redhat.com>
7475
7476 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7477
7478 2014-07-31 Gary Benson <gbenson@redhat.com>
7479
7480 * ax.h: Do not include server.h.
7481 * gdbthread.h: Likewise.
7482 * lynx-low.h: Likewise.
7483 * notif.h: Likewise.
7484
7485 2014-07-30 Gary Benson <gbenson@redhat.com>
7486
7487 * server.h: Include common-defs.h.
7488 Do not include config.h or build-gnulib-gdbserver/config.h.
7489
7490 2014-07-30 Gary Benson <gbenson@redhat.com>
7491
7492 * hostio-errno.c: Move server.h to top of includes list.
7493 * inferiors.c: Likewise.
7494 * linux-x86-low.c: Likewise.
7495 * notif.c: Include server.h.
7496
7497 2014-07-24 Tom Tromey <tromey@redhat.com>
7498 Gary Benson <gbenson@redhat.com>
7499
7500 * server.h (CORE_ADDR): Now unsigned.
7501
7502 2014-07-16 Pedro Alves <palves@redhat.com>
7503
7504 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7505
7506 2014-07-15 Pedro Alves <palves@redhat.com>
7507
7508 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7509 copy.
7510
7511 2014-07-11 Pedro Alves <palves@redhat.com>
7512
7513 * linux-low.c (kill_wait_lwp): New function, based on
7514 kill_one_lwp_callback, but use my_waitpid directly.
7515 (kill_one_lwp_callback, linux_kill): Use it.
7516
7517 2014-06-23 Pedro Alves <palves@redhat.com>
7518
7519 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7520 before setting DR0..DR3.
7521
7522 2014-06-20 Gary Benson <gbenson@redhat.com>
7523
7524 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7525 * configure: Regenerated.
7526 * config.in: Likewise.
7527
7528 2014-06-20 Gary Benson <gbenson@redhat.com>
7529
7530 * Makefile.in (SFILES): Update locations for files moved
7531 from common to nat.
7532 (object file files): Reordered.
7533
7534 2014-06-20 Gary Benson <gbenson@redhat.com>
7535
7536 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7537 (i386_dr_low_set_addr): Likewise.
7538 (i386_dr_low_get_addr): Likewise.
7539 (i386_dr_low_can_set_control): Likewise.
7540 (i386_dr_low_set_control): Likewise.
7541 (i386_dr_low_get_control): Likewise.
7542 (i386_dr_low_get_status): Likewise.
7543 (i386_get_debug_register_length): Likewise.
7544 * linux-x86-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 * win32-i386-low.c (i386_dr_low_set_addr):
7552 Changed signature. Made static.
7553 (i386_dr_low_get_addr): Likewise.
7554 (i386_dr_low_set_control): Likewise.
7555 (i386_dr_low_get_control): Likewise.
7556 (i386_dr_low_get_status): Likewise.
7557 (i386_dr_low): New global variable.
7558
7559 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7560
7561 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7562 * Makefile.in (AR, AR_FLAGS): Define.
7563 * configure: Regenerate.
7564
7565 2014-06-19 Gary Benson <gbenson@redhat.com>
7566
7567 * Makefile.in (i386-dregs.o): New rule.
7568 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7569 * i386-low.c (target.h): Remove include.
7570 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7571 (DR_CONTROL_SHIFT): Likewise.
7572 (DR_CONTROL_SIZE): Likewise.
7573 (DR_RW_EXECUTE): Likewise.
7574 (DR_RW_WRITE): Likewise.
7575 (DR_RW_READ): Likewise.
7576 (DR_RW_IORW): Likewise.
7577 (DR_LEN_1): Likewise.
7578 (DR_LEN_2): Likewise.
7579 (DR_LEN_4): Likewise.
7580 (DR_LEN_8): Likewise.
7581 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7582 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7583 (DR_ENABLE_SIZE): Likewise.
7584 (DR_LOCAL_SLOWDOWN): Likewise.
7585 (DR_GLOBAL_SLOWDOWN): Likewise.
7586 (DR_CONTROL_RESERVED): Likewise.
7587 (I386_DR_CONTROL_MASK): Likewise.
7588 (I386_DR_VACANT): Likewise.
7589 (I386_DR_LOCAL_ENABLE): Likewise.
7590 (I386_DR_GLOBAL_ENABLE): Likewise.
7591 (I386_DR_DISABLE): Likewise.
7592 (I386_DR_SET_RW_LEN): Likewise.
7593 (I386_DR_GET_RW_LEN): Likewise.
7594 (I386_DR_WATCH_HIT): Likewise.
7595 (i386_wp_op_t): Likewise.
7596 (i386_show_dr): Likewise.
7597 (i386_length_and_rw_bits): Likewise.
7598 (i386_insert_aligned_watchpoint): Likewise.
7599 (i386_remove_aligned_watchpoint): Likewise.
7600 (i386_handle_nonaligned_watchpoint): Likewise.
7601 i386_update_inferior_debug_regs(): Likewise.
7602 (i386_dr_insert_watchpoint): Likewise.
7603 (i386_dr_remove_watchpoint): Likewise.
7604 (i386_dr_region_ok_for_watchpoint): Likewise.
7605 (i386_dr_stopped_data_address): Likewise.
7606 (i386_dr_stopped_by_watchpoint): Likewise.
7607
7608 2014-06-19 Gary Benson <gbenson@redhat.com>
7609
7610 * i386-low.c (i386_dr_show): Renamed to
7611 i386_show_dr and made static. All uses updated.
7612 (i386_dr_length_and_rw_bits): Renamed to
7613 i386_length_and_rw_bits and made static.
7614 All uses updated.
7615 (i386_dr_insert_aligned_watchpoint): Renamed to
7616 i386_insert_aligned_watchpoint and made static.
7617 All uses updated.
7618 (i386_dr_remove_aligned_watchpoint): Renamed to
7619 i386_remove_aligned_watchpoint and made static.
7620 All uses updated.
7621 (i386_dr_update_inferior_debug_regs): Renamed to
7622 i386_update_inferior_debug_regs and made static.
7623 All uses updated.
7624
7625 2014-06-18 Gary Benson <gbenson@redhat.com>
7626
7627 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7628 (i386_dr_low_can_set_control): Likewise.
7629 (i386_get_debug_register_length): Likewise.
7630 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7631 (i386_dr_low_can_set_control): Likewise.
7632 (i386_get_debug_register_length): Likewise.
7633
7634 2014-06-17 Gary Benson <gbenson@redhat.com>
7635
7636 * i386-low.h (i386-dregs.h): New include.
7637 (DR_FIRSTADDR): Now in i386-dregs.h.
7638 (DR_LASTADDR): Likewise.
7639 (DR_NADDR): Likewise.
7640 (DR_STATUS): Likewise.
7641 (DR_CONTROL): Likewise.
7642 (i386_debug_reg_state): Likewise.
7643 (i386_dr_insert_watchpoint): Likewise.
7644 (i386_dr_remove_watchpoint): Likewise.
7645 (i386_dr_region_ok_for_watchpoint): Likewise.
7646 (i386_dr_stopped_data_address): Likewise.
7647 (i386_dr_stopped_by_watchpoint): Likewise.
7648 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7649
7650 2014-06-18 Gary Benson <gbenson@redhat.com>
7651
7652 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7653 i386_dr_insert_watchpoint.
7654 (i386_low_remove_watchpoint): Renamed to
7655 i386_dr_remove_watchpoint.
7656 (i386_low_region_ok_for_watchpoint): Renamed to
7657 i386_dr_region_ok_for_watchpoint.
7658 (i386_low_stopped_data_address): Renamed to
7659 i386_dr_stopped_data_address.
7660 (i386_low_stopped_by_watchpoint): Renamed to
7661 i386_dr_stopped_by_watchpoint.
7662 * i386-low.c (i386_show_dr): Renamed to
7663 i386_dr_show and made nonstatic. All uses updated.
7664 (i386_length_and_rw_bits): Renamed to
7665 i386_dr_length_and_rw_bits and made nonstatic.
7666 All uses updated.
7667 (i386_insert_aligned_watchpoint): Renamed to
7668 i386_dr_insert_aligned_watchpoint and made nonstatic.
7669 All uses updated.
7670 (i386_remove_aligned_watchpoint): Renamed to
7671 i386_dr_remove_aligned_watchpoint and made nonstatic.
7672 All uses updated.
7673 (i386_update_inferior_debug_regs): Renamed to
7674 i386_dr_update_inferior_debug_regs and made nonstatic.
7675 All uses updated.
7676 (i386_low_insert_watchpoint): Renamed to
7677 i386_dr_insert_watchpoint. All uses updated.
7678 (i386_low_remove_watchpoint): Renamed to
7679 i386_dr_remove_watchpoint. All uses updated.
7680 (i386_low_region_ok_for_watchpoint): Renamed to
7681 i386_dr_region_ok_for_watchpoint. All uses updated.
7682 (i386_low_stopped_data_address): Renamed to
7683 i386_dr_stopped_data_address. All uses updated.
7684 (i386_low_stopped_by_watchpoint): Renamed to
7685 i386_dr_stopped_by_watchpoint. All uses updated.
7686
7687 2014-06-18 Gary Benson <gbenson@redhat.com>
7688
7689 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7690 (i386_dr_low_can_set_control): Likewise.
7691 (i386_insert_aligned_watchpoint): New check.
7692
7693 2014-06-18 Gary Benson <gbenson@redhat.com>
7694
7695 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7696 Renamed to state.
7697
7698 2014-06-18 Gary Benson <gbenson@redhat.com>
7699
7700 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7701 instead of fatal and error.
7702 (i386_handle_nonaligned_watchpoint): Likewise.
7703
7704 2014-06-18 Gary Benson <gbenson@redhat.com>
7705
7706 * i386-low.c (i386_get_debug_register_length): New macro.
7707 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7708 (i386_show_dr): Use debug_printf instead of fprintf. Use
7709 phex to format values.
7710
7711 2014-06-18 Gary Benson <gbenson@redhat.com>
7712
7713 * i386-low.h: Comment changes.
7714 * i386-low.c: Likewise.
7715
7716 2014-06-18 Gary Benson <gbenson@redhat.com>
7717
7718 * i386-low.c: Whitespace changes.
7719
7720 2014-06-12 Tom Tromey <tromey@redhat.com>
7721
7722 * utils.c (freeargv): Remove.
7723
7724 2014-06-12 Tom Tromey <tromey@redhat.com>
7725
7726 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7727 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7728 (parse_debug_format_options): Likewise.
7729 (gdbserver_usage): Likewise.
7730 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7731 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7732 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7733 against libiberty.
7734 ($(LIBGNU)): Depend on libiberty.
7735 (all-lib): Recurse into all subdirs.
7736 (install-only): Invoke "install" target in subdirs.
7737 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7738 targets.
7739 * configure: Rebuild.
7740 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7741 for vasprintf, vsnprintf, or gettimeofday.
7742 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7743 srv_tgtobj.
7744
7745 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7746
7747 * development.sh: Delete.
7748 * Makefile.in (config.status): Adjust dependency on development.sh.
7749 * configure.ac: Adjust development.sh source call.
7750 * configure: Regenerate.
7751
7752 2014-06-02 Pedro Alves <palves@redhat.com>
7753
7754 * ax.c (gdb_free_agent_expr): New function.
7755 * ax.h (gdb_free_agent_expr): New declaration.
7756 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7757 list.
7758 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7759 static.
7760 (clear_breakpoint_conditions_and_commands): New function.
7761 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7762 (clear_breakpoint_conditions_and_commands): New declaration.
7763
7764 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7765
7766 * linux-aarch64-low.c (asm/ptrace.h): Include.
7767
7768 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7769
7770 Fix TLS access for -static -pthread.
7771 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7772 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7773 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7774
7775 2014-05-20 Pedro Alves <palves@redhat.com>
7776
7777 * linux-aarch64-low.c (aarch64_insert_point)
7778 (aarch64_remove_point): No longer check whether the type is
7779 supported here. Adjust to new interface.
7780 (the_low_target): Install aarch64_supports_z_point_type as
7781 supports_z_point_type method.
7782 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7783 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7784 instead of a Z packet char. Adjust.
7785 (arm_supports_z_point_type): New function.
7786 (arm_insert_point, arm_remove_point): Adjust to new interface.
7787 (the_low_target): Install arm_supports_z_point_type.
7788 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7789 (cris_insert_point, cris_remove_point): Adjust to new interface.
7790 Don't check whether the type is supported here.
7791 (the_low_target): Install cris_supports_z_point_type.
7792 * linux-low.c (linux_supports_z_point_type): New function.
7793 (linux_insert_point, linux_remove_point): Adjust to new interface.
7794 * linux-low.h (struct linux_target_ops) <insert_point,
7795 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7796 raw_breakpoint pointer parameter.
7797 <supports_z_point_type>: New method.
7798 * linux-mips-low.c (mips_supports_z_point_type): New function.
7799 (mips_insert_point, mips_remove_point): Adjust to new interface.
7800 Use mips_supports_z_point_type.
7801 (the_low_target): Install mips_supports_z_point_type.
7802 * linux-ppc-low.c (the_low_target): Install NULL as
7803 supports_z_point_type method.
7804 * linux-s390-low.c (the_low_target): Install NULL as
7805 supports_z_point_type method.
7806 * linux-sparc-low.c (the_low_target): Install NULL as
7807 supports_z_point_type method.
7808 * linux-x86-low.c (x86_supports_z_point_type): New function.
7809 (x86_insert_point): Adjust to new insert_point interface. Use
7810 insert_memory_breakpoint. Adjust to new
7811 i386_low_insert_watchpoint interface.
7812 (x86_remove_point): Adjust to remove_point interface. Use
7813 remove_memory_breakpoint. Adjust to new
7814 i386_low_remove_watchpoint interface.
7815 (the_low_target): Install x86_supports_z_point_type.
7816 * lynx-low.c (lynx_target_ops): Install NULL as
7817 supports_z_point_type callback.
7818 * nto-low.c (nto_supports_z_point_type): New.
7819 (nto_insert_point, nto_remove_point): Adjust to new interface.
7820 (nto_target_ops): Install nto_supports_z_point_type.
7821 * mem-break.c: Adjust intro comment.
7822 (struct raw_breakpoint) <raw_type, size>: New fields.
7823 <inserted>: Update comment.
7824 <shlib_disabled>: Delete field.
7825 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7826 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7827 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7828 (raw_bkpt_type_to_target_hw_bp_type): New function.
7829 (find_enabled_raw_code_breakpoint_at): New function.
7830 (find_raw_breakpoint_at): New type and size parameters. Use them.
7831 (insert_memory_breakpoint): New function, based off
7832 set_raw_breakpoint_at.
7833 (remove_memory_breakpoint): New function.
7834 (set_raw_breakpoint_at): Reimplement.
7835 (set_breakpoint): New, based on set_breakpoint_at.
7836 (set_breakpoint_at): Reimplement.
7837 (delete_raw_breakpoint): Go through the_target->remove_point
7838 instead of assuming memory breakpoints.
7839 (find_gdb_breakpoint_at): Delete.
7840 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7841 (find_gdb_breakpoint): New function.
7842 (set_gdb_breakpoint_at): Delete.
7843 (z_type_supported): New function.
7844 (set_gdb_breakpoint_1): New function, loosely based off
7845 set_gdb_breakpoint_at.
7846 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7847 (delete_gdb_breakpoint_at): Delete.
7848 (delete_gdb_breakpoint_1): New function, loosely based off
7849 delete_gdb_breakpoint_at.
7850 (delete_gdb_breakpoint): New function.
7851 (clear_gdb_breakpoint_conditions): Rename to ...
7852 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7853 breakpoint.
7854 (add_condition_to_breakpoint): Make static.
7855 (add_breakpoint_condition): Take a struct breakpoint pointer
7856 instead of an address. Adjust.
7857 (gdb_condition_true_at_breakpoint): Rename to ...
7858 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7859 z_type parameter.
7860 (gdb_condition_true_at_breakpoint): Reimplement.
7861 (add_breakpoint_commands): Take a struct breakpoint pointer
7862 instead of an address. Adjust.
7863 (gdb_no_commands_at_breakpoint): Rename to ...
7864 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7865 parameter. Return true if no breakpoint was found. Change debug
7866 output.
7867 (gdb_no_commands_at_breakpoint): Reimplement.
7868 (run_breakpoint_commands): Rename to ...
7869 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7870 and change return type to boolean.
7871 (run_breakpoint_commands): New function.
7872 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7873 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7874 breakpoint. Go through the_target->remove_point instead of
7875 assuming memory breakpoint.
7876 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7877 software and hardware breakpoints.
7878 (reinsert_raw_breakpoint): Go through the_target->insert_point
7879 instead of assuming memory breakpoint.
7880 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7881 software and hardware breakpoints.
7882 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7883 Check both software and hardware breakpoints.
7884 (validate_inserted_breakpoint): Assert the breakpoint is a
7885 software breakpoint. Set the inserted flag to -1 instead of
7886 setting shlib_disabled.
7887 (delete_disabled_breakpoints): Adjust.
7888 (validate_breakpoints): Only validate software breakpoints.
7889 Adjust to inserted flag change.
7890 (check_mem_read, check_mem_write): Skip breakpoint types other
7891 than software breakpoints. Adjust to inserted flag change.
7892 * mem-break.h (enum raw_bkpt_type): New enum.
7893 (raw_breakpoint, struct process_info): Forward declare.
7894 (Z_packet_to_target_hw_bp_type): Delete declaration.
7895 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7896 (set_gdb_breakpoint, delete_gdb_breakpoint)
7897 (clear_breakpoint_conditions): New declarations.
7898 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7899 (breakpoint_inserted_here): Update comment.
7900 (add_breakpoint_condition, add_breakpoint_commands): Replace
7901 address parameter with a breakpoint pointer parameter.
7902 (gdb_breakpoint_here): Update comment.
7903 (delete_gdb_breakpoint_at): Delete.
7904 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7905 * server.c (process_point_options): Take a struct breakpoint
7906 pointer instead of an address. Adjust.
7907 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7908 delete_gdb_breakpoint.
7909 * spu-low.c (spu_target_ops): Install NULL as
7910 supports_z_point_type method.
7911 * target.h: Include mem-break.h.
7912 (struct target_ops) <prepare_to_access_memory>: Update comment.
7913 <supports_z_point_type>: New field.
7914 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7915 instead of a char. Also take a raw breakpoint pointer.
7916 * win32-arm-low.c (the_low_target): Install NULL as
7917 supports_z_point_type.
7918 * win32-i386-low.c (i386_supports_z_point_type): New function.
7919 (i386_insert_point, i386_remove_point): Adjust to new interface.
7920 (the_low_target): Install i386_supports_z_point_type.
7921 * win32-low.c (win32_supports_z_point_type): New function.
7922 (win32_insert_point, win32_remove_point): Adjust to new interface.
7923 (win32_target_ops): Install win32_supports_z_point_type.
7924 * win32-low.h (struct win32_target_ops):
7925 <supports_z_point_type>: New method.
7926 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7927 instead of a char. Also take a raw breakpoint pointer.
7928
7929 2014-05-20 Pedro Alves <palves@redhat.com>
7930
7931 * mem-break.h: Include break-common.h.
7932 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7933 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7934 (Z_packet_to_target_hw_bp_type): New declaration.
7935 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7936 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7937 (Z_PACKET_ACCESS_WP): Delete macros.
7938 (Z_packet_to_hw_type): Delete function.
7939 * i386-low.h: Don't include break-common.h here.
7940 (Z_packet_to_hw_type): Delete declaration.
7941 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7942 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7943 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7944 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7945 * linux-aarch64-low.c: Don't include break-common.h here.
7946 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7947 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7948 (Z_packet_to_target_hw_bp_type): Delete function.
7949 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7950 function.
7951 (mips_insert_point, mips_remove_point): Use
7952 Z_packet_to_target_hw_bp_type.
7953
7954 2014-05-20 Pedro Alves <palves@redhat.com>
7955
7956 * linux-aarch64-low.c: Include break-common.h.
7957 (enum target_point_type): Delete.
7958 (Z_packet_to_point_type): Rename to ...
7959 (Z_packet_to_target_hw_bp_type): ... this, and return a
7960 target_hw_bp_type instead.
7961 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7962 instead of an enum target_point_type.
7963 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7964 breakpoint type.
7965 (aarch64_dr_state_insert_one_point)
7966 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7967 (aarch64_handle_aligned_watchpoint)
7968 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7969 Take an enum target_hw_bp_type instead of an enum
7970 target_point_type.
7971 (aarch64_supports_z_point_type): New function.
7972 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7973 use Z_packet_to_target_hw_bp_type.
7974
7975 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7976
7977 * configure.ac: Only use -Werror by default when DEVELOPMENT
7978 is true.
7979 * configure: Regenerate.
7980
7981 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7982
7983 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7984 * linux-x86-low.c (X86_64_USER_REGS): New.
7985 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7986
7987 2014-04-28 Yao Qi <yao@codesourcery.com>
7988
7989 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7990 name.
7991
7992 2014-04-25 Pedro Alves <palves@redhat.com>
7993
7994 PR server/16255
7995 * linux-low.c (linux_attach_fail_reason_string): New function.
7996 (linux_attach_lwp): Delete.
7997 (linux_attach_lwp_1): Rename to ...
7998 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7999 argument. Remove "initial" parameter. Return int instead of
8000 void. Don't error or warn here.
8001 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8002 failure to attach to the tgid. Call warning when failing to
8003 attach to an lwp.
8004 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8005 argument. Remove "initial" parameter. Return int instead of
8006 void. Don't error or warn here.
8007 (linux_attach_fail_reason_string): New declaration.
8008 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8009 interface change. Use linux_attach_fail_reason_string.
8010
8011 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8012 Walfred Tedeschi <walfred.tedeschi@intel.com>
8013
8014 * Makefile.in: Added rules to handle new files
8015 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8016 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8017 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8018 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8019 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8020 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8021 x32-avx512-linux.o.
8022 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8023 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8024 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8025 i386/x32-avx512.xml.
8026 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8027 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8028 i386/x32-avx512-linux.xml.
8029 * i387-fp.c (num_avx512_k_registers): New constant for number
8030 of K registers.
8031 (num_avx512_zmmh_low_registers): New constant for number of
8032 lower ZMM registers (0-15).
8033 (num_avx512_zmmh_high_registers): New constant for number of
8034 higher ZMM registers (16-31).
8035 (num_avx512_ymmh_registers): New contant for number of higher
8036 YMM registers (ymm16-31 added by avx521 on x86_64).
8037 (num_avx512_xmm_registers): New constant for number of higher
8038 XMM registers (xmm16-31 added by AVX512 on x86_64).
8039 (struct i387_xsave): Add space for AVX512 registers.
8040 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8041 Add code to handle AVX512 registers.
8042 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8043 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8044 prototypei from generated file.
8045 (tdesc_amd64_avx512_linux): Likewise.
8046 (init_registers_x32_avx512_linux): Likewise.
8047 (tdesc_x32_avx512_linux): Likewise.
8048 (init_registers_i386_avx512_linux): Likewise.
8049 (tdesc_i386_avx512_linux): Likewise.
8050 (x86_64_regmap): Add AVX512 registers.
8051 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8052 mask.
8053 (initialize_low_arch): Add code to initialize AVX512 registers.
8054
8055 2014-04-23 Pedro Alves <palves@redhat.com>
8056
8057 * mem-break.c (find_gdb_breakpoint_at): Make static.
8058 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8059
8060 2014-04-23 Pedro Alves <palves@redhat.com>
8061
8062 * i386-low.c: Don't include break-common.h here.
8063 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8064 prototype to take target_hw_bp_type as argument instead of a Z
8065 packet char.
8066 * i386-low.h: Include break-common.h here.
8067 (Z_packet_to_hw_type): Declare.
8068 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8069 prototypes.
8070 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8071 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8072 (x86_remove_point): Convert the packet number to a
8073 target_hw_bp_type before calling i386_low_remove_watchpoint.
8074 * win32-i386-low.c (i386_insert_point): Convert the packet number
8075 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8076 (i386_remove_point): Convert the packet number to a
8077 target_hw_bp_type before calling i386_low_remove_watchpoint.
8078
8079 2014-04-23 Pedro Alves <palves@redhat.com>
8080
8081 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8082
8083 2014-04-10 Pedro Alves <palves@redhat.com>
8084
8085 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8086 Check if the condition or command is NULL before checking if the
8087 breakpoint is known. On success, return true.
8088 * mem-break.h (add_breakpoint_condition): Document return.
8089 (add_breakpoint_commands): Add describing comment.
8090 * server.c (skip_to_semicolon): New function.
8091 (process_point_options): Use it.
8092
8093 2014-04-09 Pedro Alves <palves@redhat.com>
8094
8095 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8096 to lwpid_of.
8097
8098 2014-02-27 Pedro Alves <palves@redhat.com>
8099
8100 PR 12702
8101 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8102 macros.
8103 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8104 output.
8105 (last_thread_of_process_p): Take a PID argument instead of a
8106 thread pointer.
8107 (linux_wait_for_lwp): Delete.
8108 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8109 functions.
8110 (linux_low_filter_event): New function, party factored out from
8111 linux_wait_for_event.
8112 (linux_wait_for_event): Rename to ...
8113 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8114 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8115 sigsuspend. Check for zombie leaders.
8116 (linux_wait_for_event): Reimplement as wrapper around
8117 linux_wait_for_event_filtered.
8118 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8119 a normal or signal exit is seen, it's the whole process exiting.
8120 (wait_for_sigstop): No longer a for_each_inferior callback.
8121 Rewrite on top of linux_wait_for_event_filtered.
8122 (stop_all_lwps): Call wait_for_sigstop directly.
8123 * server.c (resume, handle_target_event): Handle
8124 TARGET_WAITKIND_NO_RESUMED.
8125
8126 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8127
8128 * win32-low.c (psapi_get_dll_name,
8129 * win32_CreateToolhelp32Snapshot): Delete.
8130 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8131 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8132 Delete.
8133 (handle_load_dll): Add function description.
8134 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8135
8136 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8137
8138 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8139 Add comment.
8140 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8141 base address when calling win32_add_one_solib.
8142 (handle_load_dll): Delete local variable load_addr.
8143 Remove 0x1000 offset applied to DLL base address when calling
8144 win32_add_one_solib.
8145 (handle_unload_dll): Add comment.
8146
8147 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8148
8149 * win32-low.c (win32_add_all_dlls): Renames
8150 win32_ensure_ntdll_loaded. Rewrite function documentation.
8151 Adjust implementation to always load all DLLs.
8152 Add 0x1000 offset to DLL base address when calling
8153 win32_add_one_solib.
8154 (child_initialization_done): New static global.
8155 (do_initial_child_stuff): Set child_initialization_done to
8156 zero during child initialization, and 1 after. Replace call
8157 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8158 Add comment.
8159 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8160 (handle_unload_dll): Add function documentation.
8161 (get_child_debug_event): Ignore load and unload DLL events
8162 during child initialization.
8163
8164 2014-02-20 Doug Evans <dje@google.com>
8165
8166 Remove global all_lwps.
8167 * inferiors.h (ptid_of): Move here from linux-low.h.
8168 (pid_of, lwpid_of): Ditto.
8169 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8170 parameter is a struct thread_info * now.
8171 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8172 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8173 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8174 directly.
8175 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8176 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8177 * linux-arm-low.c (update_registers_callback): Update, "entry"
8178 parameter is a struct thread_info * now.
8179 Fetch lwpid from current_inferior directly.
8180 (arm_insert_point): Pass &all_threads to find_inferior instead of
8181 &all_lwps.
8182 (arm_remove_point): Ditto.
8183 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8184 (arm_prepare_to_resume): Fetch pid from thread.
8185 (arm_read_description): Fetch lwpid from current_inferior directly.
8186 * linux-low.c (all_lwps): Delete.
8187 (delete_lwp): Delete call to remove_inferior.
8188 (handle_extended_wait): Fetch lwpid from thread.
8189 (add_lwp): Don't set lwp->entry.id. Remove call to
8190 add_inferior_to_list.
8191 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8192 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8193 (kill_one_lwp_callback): Ditto.
8194 (linux_kill): Don't dereference NULL pointer.
8195 Fetch ptid,lwpid from thread.
8196 (get_detach_signal): Fetch ptid from thread.
8197 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8198 Simplify call to regcache_invalidate_thread.
8199 (delete_lwp_callback): Update, "entry" parameter is a
8200 struct thread_info * now. Fetch pid from thread.
8201 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8202 (status_pending_p_callback): Update, "entry" parameter is a
8203 struct thread_info * now. Fetch ptid from thread.
8204 (find_lwp_pid): Update, "entry" parameter is a
8205 struct thread_info * now.
8206 (linux_wait_for_lwp): Fetch pid from thread.
8207 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8208 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8209 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8210 (dequeue_one_deferred_signal): Ditto.
8211 (cancel_breakpoint): Fetch ptid from current_inferior.
8212 (linux_wait_for_event): Pass &all_threads to find_inferior,
8213 not &all_lwps. Fetch ptid, lwpid from thread.
8214 (count_events_callback): Update, "entry" parameter is a
8215 struct thread_info * now.
8216 (select_singlestep_lwp_callback): Ditto.
8217 (select_event_lwp_callback): Ditto.
8218 (cancel_breakpoints_callback): Ditto.
8219 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8220 not &all_lwps.
8221 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8222 (unsuspend_one_lwp): Update, "entry" parameter is a
8223 struct thread_info * now.
8224 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8225 not &all_lwps.
8226 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8227 Fetch lwpid from thread, not lwp.
8228 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8229 Pass &all_threads to find_inferior, not &all_lwps.
8230 (send_sigstop): Fetch lwpid from thread, not lwp.
8231 (send_sigstop_callback): Update, "entry" parameter is a
8232 struct thread_info * now.
8233 (suspend_and_send_sigstop_callback): Ditto.
8234 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8235 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8236 struct thread_info * now.
8237 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8238 from thread, lwp.
8239 (lwp_running): Update, "entry" parameter is a
8240 struct thread_info * now.
8241 (stop_all_lwps): Fetch ptid from thread.
8242 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8243 (linux_resume_one_lwp): Fetch lwpid from thread.
8244 (linux_set_resume_request): Update, "entry" parameter is a
8245 struct thread_info * now. Fetch pid, lwpid from thread.
8246 (resume_status_pending_p): Update, "entry" parameter is a
8247 struct thread_info * now.
8248 (need_step_over_p): Ditto. Fetch lwpid from thread.
8249 (start_step_over): Fetch lwpid from thread.
8250 (linux_resume_one_thread): Update, "entry" parameter is a
8251 struct thread_info * now. Fetch lwpid from thread.
8252 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8253 (proceed_one_lwp): Update, "entry" parameter is a
8254 struct thread_info * now. Fetch lwpid from thread.
8255 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8256 struct thread_info * now.
8257 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8258 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8259 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8260 directly.
8261 (regsets_store_inferior_registers): Ditto.
8262 (fetch_register, store_register): Ditto.
8263 (linux_read_memory, linux_write_memory): Ditto.
8264 (linux_request_interrupt): Ditto.
8265 (linux_read_auxv): Ditto.
8266 (linux_xfer_siginfo): Ditto.
8267 (linux_qxfer_spu): Ditto.
8268 (linux_qxfer_libraries_svr4): Ditto.
8269 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8270 moved to inferiors.h.
8271 (get_lwp): Delete.
8272 (get_thread_lwp): Update.
8273 (struct lwp_info): Delete member "entry". Simplify comment for
8274 member "thread".
8275 (all_lwps): Delete.
8276 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8277 current_inferior directly.
8278 (update_watch_registers_callback): Update, "entry" parameter is a
8279 struct thread_info * now. Fetch pid from thread.
8280 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8281 (mips_insert_point): Fetch lwpid from current_inferior.
8282 Pass &all_threads to find_inferior, not &all_lwps.
8283 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8284 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8285 directly.
8286 (mips_stopped_data_address): Ditto.
8287 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8288 directly.
8289 * linux-tile-low.c (tile_arch_setup): Ditto.
8290 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8291 (update_debug_registers_callback): Update, "entry" parameter is a
8292 struct thread_info * now. Fetch pid from thread.
8293 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8294 Pass &all_threads to find_inferior, not &all_lwps.
8295 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8296 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8297 Pass &all_threads to find_inferior, not &all_lwps.
8298 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8299 (i386_dr_low_get_status): Ditto.
8300 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8301 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8302 (x86_linux_read_description): Ditto.
8303 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8304
8305 2014-02-20 Doug Evans <dje@google.com>
8306
8307 * inferiors.c (get_first_inferior): Fix buglet.
8308
8309 2014-02-19 Doug Evans <dje@google.com>
8310
8311 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8312 * inferiors.c (add_thread): Change result type to struct thread_info *.
8313 All callers updated.
8314 (add_lwp): Call add_thread here instead of in callers.
8315 All callers updated.
8316 * linux-low.h (get_lwp_thread): Rewrite.
8317 (struct lwp_info): New member "thread".
8318
8319 2014-02-19 Doug Evans <dje@google.com>
8320
8321 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8322 All callers updated.
8323
8324 2014-02-19 Doug Evans <dje@google.com>
8325
8326 * inferiors.c (add_thread): Fix whitespace.
8327
8328 2014-02-19 Doug Evans <dje@google.com>
8329
8330 * dll.c (clear_dlls): Replace accessing list implemention details
8331 with API function.
8332 * gdbthread.h (get_first_thread): Declare.
8333 * inferiors.c (for_each_inferior_with_data): New function.
8334 (get_first_thread): New function.
8335 (find_thread_ptid): Simplify.
8336 (get_first_inferior): New function.
8337 (clear_list): Delete.
8338 (one_inferior_p): New function.
8339 (clear_inferior_list): New function.
8340 (clear_inferiors): Update.
8341 * inferiors.h (for_each_inferior_with_data): Declare.
8342 (clear_inferior_list): Declare.
8343 (one_inferior_p): Declare.
8344 (get_first_inferior): Declare.
8345 * linux-low.c (linux_wait_for_event): Replace accessing list
8346 implemention details with API function.
8347 * server.c (target_running): Ditto.
8348 (accumulate_file_name_length): New function.
8349 (emit_dll_description): New function.
8350 (handle_qxfer_libraries): Replace accessing list implemention
8351 details with API function.
8352 (handle_qxfer_threads_worker): New function.
8353 (handle_qxfer_threads_proper): Replace accessing list implemention
8354 details with API function.
8355 (handle_query): Ditto.
8356 (visit_actioned_threads_callback_ftype): New typedef.
8357 (visit_actioned_threads_data): New struct.
8358 (visit_actioned_threads): Rewrite to be find_inferior callback.
8359 (resume): Call find_inferior.
8360 (handle_status): Replace accessing list implemention
8361 details with API function.
8362 (process_serial_event): Replace accessing list implemention details
8363 with API function.
8364 * target.c (set_desired_inferior): Replace accessing list implemention
8365 details with API function.
8366 * tracepoint.c (same_process_p): New function.
8367 (gdb_agent_about_to_close): Replace accessing list implemention
8368 details with API function.
8369 * win32-low.c (child_delete_thread): Replace accessing list
8370 implemention details with API function.
8371 (match_dll_by_basename): New function.
8372 (dll_is_loaded_by_basename): New function.
8373 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8374 details call to dll_is_loaded_by_basename.
8375
8376 2014-02-19 Doug Evans <dje@google.com>
8377
8378 * dll.h (struct dll_info): Add comment.
8379 * gdbthread.h (struct thread_info): Add comment.
8380 (current_ptid): Simplify.
8381 * inferiors.c (add_process): Update.
8382 (remove_process): Update.
8383 * inferiors.h (struct process_info): Rename member "head" to "entry".
8384 * linux-low.c (delete_lwp): Update.
8385 (add_lwp): Update.
8386 (last_thread_of_process_p): Update.
8387 (kill_one_lwp_callback, linux_kill): Update.
8388 (status_pending_p_callback): Update.
8389 (wait_for_sigstop): Update. Simplify read of ptid.
8390 (start_step_over): Update.
8391 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8392 (get_lwp_thread): Update.
8393 (struct lwp_info): Rename member "head" to "entry".
8394 * regcache.h (inferior_list_entry): Delete.
8395 * server.c (kill_inferior_callback): Update.
8396 (detach_or_kill_inferior_callback): Update.
8397 (print_started_pid): Update.
8398 (print_attached_pid): Update.
8399 (process_serial_event): Simplify read of ptid.
8400 * thread-db.c (thread_db_create_event): Update.
8401 (thread_db_get_tls_address): Update.
8402 * win32-low.c (current_inferior_ptid): Simplify.
8403
8404 2014-02-19 Tom Tromey <tromey@redhat.com>
8405
8406 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8407 argument.
8408 (target_supports_btrace): Update.
8409
8410 2014-02-14 Yao Qi <yao@codesourcery.com>
8411
8412 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8413 (rsp-low-ipa.o): New target.
8414
8415 2014-02-12 Tom Tromey <tromey@redhat.com>
8416
8417 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8418 convert_ascii_to_int.
8419 * regcache.c (registers_to_string): Likewise.
8420 * remote-utils.c (decode_M_packet): Likewise.
8421 * server.c (process_serial_event): Likewise.
8422
8423 2014-02-12 Tom Tromey <tromey@redhat.com>
8424
8425 * server.c (handle_query, handle_v_run): Use hex2bin, not
8426 unhexify.
8427 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8428
8429 2014-02-12 Tom Tromey <tromey@redhat.com>
8430
8431 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8432 convert_int_to_ascii.
8433 * regcache.c (registers_to_string, collect_register_as_string):
8434 Likewise.
8435 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8436 Likewise.
8437 * server.c (process_serial_event): Likewise.
8438 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8439 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8440
8441 2014-02-12 Tom Tromey <tromey@redhat.com>
8442
8443 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8444 bin2hex, not hexify.
8445 * tracepoint.c (cmd_qtstatus): Likewise.
8446
8447 2014-02-12 Tom Tromey <tromey@redhat.com>
8448
8449 * remote-utils.c (monitor_output): Pass explicit length to
8450 hexify.
8451
8452 2014-02-12 Tom Tromey <tromey@redhat.com>
8453
8454 * tracepoint.c: Include rsp-low.h.
8455 * server.c: Include rsp-low.h.
8456 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8457 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8458 declare.
8459 * remote-utils.c: Include rsp-low.h.
8460 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8461 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8462 (convert_int_to_ascii, convert_ascii_to_int): Move to
8463 common/rsp-low.c.
8464 * regcache.c: Include rsp-low.h.
8465 * ax.c: Include rsp-low.h.
8466 * Makefile.in (SFILES): Add common/rsp-low.c.
8467 (OBS): Add rsp-low.o.
8468 (rsp-low.o): New target.
8469
8470 2014-02-12 Tom Tromey <tromey@redhat.com>
8471
8472 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8473 Include print-utils.h.
8474 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8475 (plongest, thirty_two, phex_nz): Remove.
8476 * Makefile.in (SFILES): Add common/print-utils.c.
8477 (OBS): Add print-utils.o.
8478 (print-utils-ipa.o): New target.
8479 (print-utils.o): New target.
8480 (IPA_OBJS): Add print-utils-ipa.o.
8481
8482 2014-02-06 Tom Tromey <tromey@redhat.com>
8483
8484 * Makefile.in (SFILES): Fix indentation.
8485
8486 2014-02-05 Doug Evans <dje@google.com>
8487
8488 * linux-low.c (linux_wait_for_event): Improve comment.
8489 (linux_wait_1): Keep current_inferior in sync with event_child.
8490
8491 2014-01-22 Doug Evans <dje@google.com>
8492
8493 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8494
8495 2014-01-22 Doug Evans <dje@google.com>
8496
8497 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8498 * configure: Regenerate.
8499 * config.in: Regenerate.
8500 * Makefile.in (SFILES): Add debug.c.
8501 (OBS): Add debug.o.
8502 * debug.c: New file.
8503 * debug.h: New file.
8504 * linux-aarch64-low.c (*): Update all debugging printfs to use
8505 debug_printf instead of fprintf.
8506 * linux-arm-low.c (*): Ditto.
8507 * linux-cris-low.c (*): Ditto.
8508 * linux-crisv32-low.c (*): Ditto.
8509 * linux-m32r-low.c (*): Ditto.
8510 * linux-sparc-low.c (*): Ditto.
8511 * linux-x86.c (*): Ditto.
8512 * linux-low.c (*): Ditto.
8513 (linux_wait_1): Add calls to debug_enter, debug_exit.
8514 (linux_wait): Remove redundant debugging printf.
8515 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8516 (linux_resume, unstop_all_lwps): Ditto.
8517 * mem-break.c (*): Update all debugging printfs to use
8518 debug_printf instead of fprintf.
8519 * remote-utils.c (*): Ditto.
8520 * thread-db.c (*): Ditto.
8521 * server.c #include <ctype.h>, "gdb_vecs.h".
8522 (debug_threads): Moved to debug.c.
8523 (*): Update all debugging printfs to use debug_printf instead of
8524 fprintf.
8525 (start_inferior): Replace call to fflush with call to debug_flush.
8526 (monitor_show_help): Mention set debug-format.
8527 (parse_debug_format_options): New function.
8528 (handle_monitor_command): Handle "monitor set debug-format".
8529 (gdbserver_usage): Mention --debug-format.
8530 (main): Parse --debug-format.
8531 * server.h (debug_threads): Declaration moved to debug.h.
8532 #include "debug.h".
8533 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8534 trace_debug_1 that uses debug_printf.
8535 (tracepoint_look_up_symbols): Update all debugging printfs to use
8536 debug_printf instead of fprintf.
8537
8538 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8539
8540 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8541 sys/ptrace.h.
8542
8543 2014-01-17 Pedro Alves <palves@redhat.com>
8544
8545 PR build/16445
8546 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8547 defined after including gdb_proc_service.h.
8548
8549 2014-01-16 Doug Evans <dje@google.com>
8550
8551 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8552 (match_dll): Use it.
8553
8554 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8555
8556 * target.h (target_ops) <read_btrace>: Change parameters and
8557 return type to allow error reporting.
8558 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8559 trace reading errors on.
8560 * linux-low.c (linux_low_read_btrace): Pass trace reading
8561 errors on.
8562 (linux_low_disable_btrace): New.
8563
8564 2014-01-15 Doug Evans <dje@google.com>
8565
8566 * inferiors.c (thread_id_to_gdb_id): Delete.
8567 * inferiors.h (thread_id_to_gdb_id): Delete.
8568
8569 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8570
8571 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8572 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8573 versions.
8574
8575 2014-01-08 Pedro Alves <palves@redhat.com>
8576
8577 * server.c (handle_status): Don't discard previous queued stop
8578 replies or thread's pending status here.
8579 (main) <disconnection>: Do it here instead.
8580
8581 2014-01-08 Pedro Alves <palves@redhat.com>
8582
8583 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8584 * server.c (visit_actioned_threads, handle_pending_status): New
8585 function.
8586 (handle_v_cont): Factor out parts to ...
8587 (resume): ... this new function. If in all-stop, and a thread
8588 being resumed has a pending status, report it without actually
8589 resuming.
8590 (myresume): Adjust to use the new 'resume' function.
8591 (clear_pending_status_callback, set_pending_status_callback)
8592 (find_status_pending_thread_callback): New functions.
8593 (handle_status): Handle the case of multiple threads having
8594 interesting statuses to report. Report threads' real last signal
8595 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8596 with an interesting thread to report the status for, instead of
8597 always reporting the status of the first thread.
8598
8599 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8600
8601 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8602 * gdbreplay.c (gdbreplay_version): Likewise.
8603
8604 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8605
8606 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8607 iov.iov_len with the real length in use.
8608
8609 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8610
8611 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8612 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8613 for all targets that use win32-low.c.
8614 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8615 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8616
8617 2013-12-13 Pedro Alves <palves@redhat.com>
8618
8619 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8620 if equal to TARGET_WAITKIND_LOADED.
8621 * win32-low.c (cached_status): New static global.
8622 (win32_wait): Add declaration.
8623 (do_initial_child_stuff): Flush all initial pending debug events
8624 up to the initial breakpoint.
8625 (win32_wait): If CACHED_STATUS was set, return that instead
8626 of doing a real wait. Remove the code resuming the execution
8627 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8628 during the initial phase. Also remove the code changing
8629 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8630 TARGET_WAITKIND_STOPPED.
8631
8632 2013-12-11 Yao Qi <yao@codesourcery.com>
8633
8634 * notif.c (handle_notif_ack): Return 0 if no notification
8635 matches.
8636
8637 2013-11-20 Doug Evans <dje@google.com>
8638
8639 * linux-low.c (linux_set_resume_request): Fix comment.
8640
8641 2013-11-20 Doug Evans <dje@google.com>
8642
8643 * linux-low.c (resume_status_pending_p): Tweak comment.
8644
8645 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8646
8647 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8648 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8649 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8650 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8651 (srv_amd64_regobj): Add amd64-mpx.o.
8652 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8653 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8654 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8655 * i387-fp.c (num_pl_bnd_register) Added constant.
8656 (num_pl_bnd_cfg_registers) Added constant.
8657 (struct i387_xsave) Added reserved area and MPX fields.
8658 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8659 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8660 function.
8661 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8662 (init_registers_amd64_mpx_linux): Declare new function.
8663 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8664 (x86_64_regmap): Add MPX registers.
8665 (x86_linux_read_description): Add MPX case.
8666 (initialize_low_arch): Initialize MPX targets.
8667
8668 2013-11-18 Tom Tromey <tromey@redhat.com>
8669
8670 * configure: Rebuild.
8671 * configure.ac: Don't check for stdlib.h.
8672 * gdbreplay.c: Unconditionally include stdlib.h.
8673
8674 2013-11-18 Tom Tromey <tromey@redhat.com>
8675
8676 * config.in: Rebuild.
8677 * configure: Rebuild.
8678 * configure.ac: Don't use AC_HEADER_DIRENT.
8679
8680 2013-11-18 Tom Tromey <tromey@redhat.com>
8681
8682 * server.h: Don't check HAVE_STRING_H.
8683 * gdbreplay.c: Don't check HAVE_STRING_H.
8684 * configure: Rebuild.
8685
8686 2013-11-18 Tom Tromey <tromey@redhat.com>
8687
8688 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8689 LIBGNU.
8690
8691 2013-11-08 Tom Tromey <tromey@redhat.com>
8692
8693 * configure, config.in: Rebuild.
8694 * configure.ac: Remove unused configury.
8695
8696 2013-11-08 Tom Tromey <tromey@redhat.com>
8697
8698 * acinclude.m4: Include common.m4, codeset.m4.
8699 * configure, config.in: Rebuild.
8700 * configure.ac: Use GDB_AC_COMMON.
8701
8702 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8703
8704 * linux-s390-low.c (HWCAP_S390_TE): New define.
8705 (s390_arch_setup): Consider the TE field in the HWCAP for
8706 determining 'have_regset_tdb'.
8707
8708 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8709
8710 PR gdb/16014
8711 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8712 call to sizeof.
8713
8714 2013-10-02 Pedro Alves <palves@redhat.com>
8715
8716 * server.c (process_serial_event): Don't output "GDBserver
8717 exiting" if GDB is connected through stdio.
8718 * target.c (mywait): Likewise, be silent if GDB is connected
8719 through stdio.
8720
8721 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8722
8723 * lynx-low.c (lynx_add_threads_after_attach): New function.
8724 (lynx_attach): Remove call to add_thread. Add call to
8725 lynx_add_threads_after_attach instead.
8726
8727 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8728
8729 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8730 * config.in, configure: Regenerated.
8731
8732 2013-09-18 Yao Qi <yao@codesourcery.com>
8733
8734 PR server/15959
8735 * server.c (start_inferior): Clear 'resume_info'.
8736
8737 2013-09-16 Jiong Wang <jiwang@tilera.com>
8738
8739 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8740 for each register.
8741
8742 2013-09-16 Jiong Wang <jiwang@tilera.com>
8743
8744 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8745 linux-tile-low.o to srv_tgtobj.
8746
8747 2013-09-16 Will Newton <will.newton@linaro.org>
8748
8749 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8750 out regs.
8751
8752 2013-09-06 Pedro Alves <palves@redhat.com>
8753
8754 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8755 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8756 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8757 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8758 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8759 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8760
8761 2013-09-06 Pedro Alves <palves@redhat.com>
8762
8763 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8764 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8765
8766 2013-09-06 Pedro Alves <palves@redhat.com>
8767
8768 * linux-amd64-ipa.c: Include tracepoint.h.
8769 * linux-i386-ipa.c: Include tracepoint.h.
8770
8771 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8772
8773 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8774 (ps_get_thread_area): New function.
8775
8776 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8777
8778 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8779 (initialize_low_arch): Call init_registers_crisv32 rather than
8780 init_register_crisv32.
8781
8782 2013-09-05 Pedro Alves <palves@redhat.com>
8783
8784 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8785 to ...
8786 * hostio.h: ... this new file.
8787 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8788 win32-low.c: Include hostio.h.
8789
8790 2013-09-05 Pedro Alves <palves@redhat.com>
8791
8792 * server.h (gdb_client_data, handler_func, callback_handler_func)
8793 (delete_file_handler, add_file_handler, append_callback_event)
8794 (delete_callback_event, start_event_loop, initialize_event_loop):
8795 Move to event-loop.h and include it.
8796 * event-loop.h: New file.
8797
8798 2013-09-05 Pedro Alves <palves@redhat.com>
8799
8800 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8801 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8802 (loaded_dll, unloaded_dll): Move to ...
8803 * dll.h: ... this new file.
8804 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8805
8806 2013-09-05 Pedro Alves <palves@redhat.com>
8807
8808 * server.h (current_process, get_thread_process, all_processes)
8809 (add_inferior_to_list, for_each_inferior, current_inferior)
8810 (remove_inferior, add_process, remove_process, find_process_pid)
8811 (have_started_inferiors_p, have_attached_inferiors_p)
8812 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8813 (clear_inferiors, find_inferior, find_inferior_id)
8814 (inferior_target_data, set_inferior_target_data)
8815 (inferior_regcache_data, set_inferior_regcache_data): Move to
8816 inferiors.h, and include it.
8817 * inferiors.h: New file.
8818
8819 2013-09-05 Pedro Alves <palves@redhat.com>
8820
8821 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8822 Move ...
8823 * ax.h: ... here.
8824
8825 2013-09-05 Pedro Alves <palves@redhat.com>
8826
8827 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8828 tracepoint.h.
8829 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8830 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8831 (handle_tracepoint_general_set, handle_tracepoint_query)
8832 (tracepoint_finished_step, tracepoint_was_hit)
8833 (release_while_stepping_state_list, current_traceframe)
8834 (in_readonly_region, traceframe_read_mem)
8835 (fetch_traceframe_registers, traceframe_read_sdata)
8836 (traceframe_read_info, struct fast_tpoint_collect_status)
8837 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8838 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8839 (supply_fast_tracepoint_registers)
8840 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8841 (ipa_tdesc, claim_trampoline_space)
8842 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8843 (agent_mem_read, agent_get_trace_state_variable_value)
8844 (agent_set_trace_state_variable_value, agent_tsv_read)
8845 (agent_mem_read_string, get_raw_reg_func_addr)
8846 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8847 * tracepoint.h: ... this new file.
8848
8849 2013-09-05 Pedro Alves <palves@redhat.com>
8850
8851 * server.h (perror_with_name, error, fatal, warning, paddress)
8852 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8853 include it.
8854 * utils.h: New file.
8855
8856 2013-09-05 Pedro Alves <palves@redhat.com>
8857
8858 * server.h (remote_debug, noack_mode, transport_is_reliable)
8859 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8860 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8861 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8862 (write_enn, initialize_async_io, enable_async_io)
8863 (disable_async_io, check_remote_input_interrupt_request)
8864 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8865 (dead_thread_notify, prepare_resume_reply)
8866 (decode_address_to_semicolon, decode_address, decode_m_packet)
8867 (decode_M_packet, decode_X_packet, decode_xfer_write)
8868 (decode_search_memory_packet, unhexify, hexify)
8869 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8870 (look_up_one_symbol, relocate_instruction)
8871 (monitor_output): Move to remote-utils.h, and include it.
8872 * remote-utils.h: New file.
8873
8874 2013-09-05 Pedro Alves <palves@redhat.com>
8875
8876 * server.h (_): Delete.
8877
8878 2013-09-02 Pedro Alves <palves@redhat.com>
8879
8880 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8881 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8882 allocated.
8883 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8884
8885 2013-09-02 Pierre Muller <muller@sourceware.org>
8886
8887 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8888 or WriteProcessMemory complete successfully and handle
8889 ERROR_PARTIAL_COPY error.
8890
8891 2013-09-02 Pedro Alves <palves@redhat.com>
8892
8893 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8894 error instead of EIO.
8895
8896 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8897
8898 PR server/15604
8899 * linux-low.c: Include filestuff.h.
8900 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8901 * lynx-low.c: Include filestuff.h.
8902 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8903 * server.c: Include filestuff.h.
8904 (main): Call notice_open_fds.
8905 * spu-low.c: Include filestuff.h.
8906 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8907
8908 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8909
8910 * Makefile.in: Explain why ../target and ../nat are not
8911 listed as include file search paths.
8912 (linux-waitpid.o): New object file rule.
8913 * configure.srv (srv_native_linux_obj): New variable.
8914 Replace all occurrences of linux native object files with
8915 $srv_native_linux_obj.
8916 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8917 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8918 (linux_enable_event_reporting): Remove declaration.
8919 (my_waitpid): Moved to common/linux-waitpid.c.
8920 (linux_wait_for_event): Pass ptid when calling
8921 linux_enable_event_reporting.
8922 (linux_supports_tracefork_flag): Remove.
8923 (linux_enable_event_reporting): Likewise.
8924 (linux_tracefork_grandchild): Remove.
8925 (STACK_SIZE): Moved to common/linux-ptrace.c.
8926 (linux_tracefork_child): Remove.
8927 (linux_test_for_tracefork): Remove.
8928 (linux_look_up_symbols): Call linux_supports_traceclone.
8929 (initialize_low): Remove call to linux_test_for_tracefork.
8930 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8931 common/linux-ptrace.h.
8932 (PTRACE_TYPE_ARG4): Likewise.
8933 Include linux-ptrace.h.
8934
8935 2013-08-21 Pedro Alves <palves@redhat.com>
8936
8937 * config.in: Renegerate.
8938
8939 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8940
8941 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8942 (SFILES): Remove $(srcdir)/common/target-common.c and
8943 add $(srcdir)/target/waitstatus.c.
8944 (OBS): Remove target-common.o and add waitstatus.o.
8945 (server_h): Remove $(srcdir)/../common/target-common.h and
8946 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8947 and $(srcdir)/../target/waitstatus.h.
8948 (target-common.o): Remove.
8949 (waitstatus.o): New target object file.
8950 * target.h: Do not include target-common.h and
8951 include target/resume.h, target/wait.h and
8952 target/waitstatus.h.
8953
8954 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8955
8956 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8957 to PTRACE_TYPE_ARG3.
8958 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8959 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8960 PTRACE_TYPE_ARG4.
8961 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8962 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8963
8964 2013-07-27 Jie Zhang <jie@codesourcery.com>
8965 Daniel Jacobowitz <dan@codesourcery.com>
8966 Yao Qi <yao@codesourcery.com>
8967
8968 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8969 (mips-linux-watch.o): New rule.
8970 (mips_linux_watch_h): New variable.
8971 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8972 srv_tgtobj.
8973 * linux-mips-low.c: Include mips-linux-watch.h.
8974 (struct arch_process_info, struct arch_lwp_info): New.
8975 (update_watch_registers_callback): New function.
8976 (mips_linux_new_process, mips_linux_new_thread) New functions.
8977 (mips_linux_prepare_to_resume, mips_insert_point): New
8978 functions.
8979 (mips_remove_point, mips_stopped_by_watchpoint): New
8980 functions.
8981 (rsp_bp_type_to_target_hw_bp_type): New function.
8982 (mips_stopped_data_address): New function.
8983 (the_low_target): Add watchpoint support functions.
8984
8985 2013-07-27 Yao Qi <yao@codesourcery.com>
8986
8987 * i386-low.c: Include break-common.h.
8988 (enum target_hw_bp_type): Remove.
8989
8990 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8991
8992 * Makefile.in (SFILES): /common/target-common.c.
8993 (OBS): Add target-common.o.
8994 (server_h): Add $(srcdir)/../common/target-common.h.
8995 (target-common.o): New target.
8996 * server.c (queue_stop_reply_callback): Free
8997 status string after use.
8998 * target.c (target_waitstatus_to_string): Remove.
8999 * target.h: Include target-common.h.
9000 (resume_kind): Likewise.
9001 (target_waitkind): Likewise.
9002 (target_waitstatus): Likewise.
9003 (TARGET_WNOHANG): Likewise.
9004
9005 2013-07-04 Yao Qi <yao@codesourcery.com>
9006
9007 * Makefile.in (host_alias): Use @host_noncanonical@.
9008 (target_alias): Use @target_noncanonical@.
9009 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9010 ACX_NONCANONICAL_HOST.
9011 * configure: Regenerated.
9012
9013 Revert:
9014 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9015
9016 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9017 * configure: Rebuild.
9018 * Makefile.in (version_host, version_target): Get from configure.
9019 (version.c): Use $(version_host) and $(version_target).
9020
9021 2013-07-03 Pedro Alves <palves@redhat.com>
9022
9023 * Makefile.in (config.status): Depend on development.sh.
9024 * acinclude.m4: Include libmcheck.m4.
9025 * configure: Regenerate.
9026
9027 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9028
9029 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9030 attribute inside the parentheses.
9031 (winapi_DebugSetProcessKillOnExit): Ditto.
9032 (winapi_DebugBreakProcess): Ditto.
9033 (winapi_GenerateConsoleCtrlEvent): Ditto.
9034
9035 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9036
9037 * notif.h (notif_event): Add a dummy member to avoid compiler
9038 errors.
9039
9040 2013-07-01 Pedro Alves <palves@redhat.com>
9041
9042 * hostio.c (HOSTIO_PATH_MAX): Define.
9043 (require_filename, handle_open, handle_unlink, handle_readlink):
9044 Use it.
9045
9046 2013-07-01 Pedro Alves <palves@redhat.com>
9047
9048 * server.h: Include "pathmax.h".
9049 * linux-low.c: Don't include sys/param.h.
9050 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9051 MAXPATHLEN.
9052 * win32-low.c: Don't include sys/param.h.
9053 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9054
9055 2013-07-01 Pedro Alves <palves@redhat.com>
9056
9057 * event-loop.c: Don't check HAVE_UNISTD_H before including
9058 <unistd.h>.
9059 * gdbreplay.c: Likewise.
9060 * remote-utils.c: Likewise.
9061 * server.c: Likewise.
9062 * configure.ac: Don't check for unistd.h.
9063 * configure: Regenerate.
9064
9065 2013-06-28 Tom Tromey <tromey@redhat.com>
9066
9067 * Makefile.in (version.c): Use version.in, not
9068 common/version.in.
9069
9070 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9071
9072 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9073 * configure: Rebuild.
9074 * Makefile.in (version_host, version_target): Get from configure.
9075 (version.c): Use $(version_host) and $(version_target).
9076
9077 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9078
9079 Fix trace-status to output user name without trailing colon.
9080 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9081
9082 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9083
9084 Fix trace-status to output proper start-time and stop-time.
9085 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9086 output start time and stop time in hex as gdb expects.
9087
9088 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9089
9090 * tracepoint.c (build_traceframe_info_xml): Output trace state
9091 variables present in the trace buffer.
9092
9093 2013-06-24 Tom Tromey <tromey@redhat.com>
9094
9095 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9096 create-version.sh.
9097 (version.o): Remove.
9098 * gdbreplay.c: Include version.h.
9099 (version, host_name): Don't declare.
9100 * server.h: Include version.h.
9101 (version, host_name): Don't declare.
9102
9103 2013-06-12 Pedro Alves <palves@redhat.com>
9104
9105 * linux-x86-low.c (linux_is_elf64): Delete global.
9106 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9107 with local linux_pid_exe_is_elf_64_file use.
9108
9109 2013-06-11 Pedro Alves <palves@redhat.com>
9110
9111 * linux-low.c (regset_disabled, disable_regset): New functions.
9112 (regsets_fetch_inferior_registers)
9113 (regsets_store_inferior_registers): Use them.
9114 (initialize_regsets_info); Don't allocate the disabled_regsets
9115 array here.
9116 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9117 comment.
9118
9119 2013-06-11 Pedro Alves <palves@redhat.com>
9120
9121 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9122 xmalloc.
9123
9124 2013-06-11 Pedro Alves <palves@redhat.com>
9125
9126 * linux-x86-low.c (initialize_low_arch): Call
9127 init_registers_x32_avx_linux.
9128
9129 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9130
9131 Fix compatibility with Android Bionic.
9132 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9133 it is not empty.
9134
9135 2013-06-07 Pedro Alves <palves@redhat.com>
9136
9137 PR server/14823
9138 * Makefile.in (OBS): Add tdesc.o.
9139 (IPA_OBJS): Add tdesc-ipa.o.
9140 (tdesc-ipa.o): New rule.
9141 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9142 interface.
9143 * linux-low.c (new_inferior): Delete.
9144 (disabled_regsets, num_regsets): Delete.
9145 (linux_add_process): Adjust to set the new per-process
9146 new_inferior flag.
9147 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9148 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9149 was a stop. When calling arch_setup, switch the current inferior
9150 to the thread that got an event.
9151 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9152 (regsets_fetch_inferior_registers)
9153 (regsets_store_inferior_registers): New regsets_info parameter.
9154 Adjust to use it.
9155 (linux_register_in_regsets): New regs_info parameter. Adjust to
9156 use it.
9157 (register_addr, fetch_register, store_register): New usrregs_info
9158 parameter. Adjust to use it.
9159 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9160 parameter regs_info. Adjust to use it.
9161 (linux_fetch_registers): Get the current inferior's regs_info, and
9162 adjust to use it.
9163 (linux_store_registers): Ditto.
9164 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9165 (initialize_low): Don't initialize the target_regsets here. Call
9166 initialize_low_arch.
9167 * linux-low.h (target_regsets): Delete declaration.
9168 (struct regsets_info): New.
9169 (struct usrregs_info): New.
9170 (struct regs_info): New.
9171 (struct process_info_private) <new_inferior>: New field.
9172 (struct linux_target_ops): Delete the num_regs, regmap, and
9173 regset_bitmap fields. New field regs_info.
9174 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9175 * i387-fp.c (num_xmm_registers): Delete.
9176 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9177 calls to new interface.
9178 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9179 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9180 Infer the number of xmm registers from the regcache's target
9181 description.
9182 * i387-fp.h (num_xmm_registers): Delete.
9183 * inferiors.c (add_thread): Don't install the thread's regcache
9184 here.
9185 * proc-service.c (gregset_info): Fetch the current inferior's
9186 regs_info. Adjust to use it.
9187 * regcache.c: Include tdesc.h.
9188 (register_bytes, reg_defs, num_registers)
9189 (gdbserver_expedite_regs): Delete.
9190 (get_thread_regcache): If the thread doesn't have a regcache yet,
9191 create one, instead of aborting gdbserver.
9192 (regcache_invalidate_one): Rename to ...
9193 (regcache_invalidate_thread): ... this.
9194 (regcache_invalidate_one): New.
9195 (regcache_invalidate): Only invalidate registers of the current
9196 process.
9197 (init_register_cache): Add target_desc parameter, and use it.
9198 (new_register_cache): Ditto. Assert the target description has a
9199 non zero registers_size.
9200 (regcache_cpy): Add assertions. Adjust.
9201 (realloc_register_cache, set_register_cache): Delete.
9202 (registers_to_string, registers_from_string): Adjust.
9203 (find_register_by_name, find_regno, find_register_by_number)
9204 (register_cache_size): Add target_desc parameter, and use it.
9205 (free_register_cache_thread, free_register_cache_thread_one)
9206 (regcache_release, register_cache_size): New.
9207 (register_size): Add target_desc parameter, and use it.
9208 (register_data, supply_register, supply_register_zeroed)
9209 (supply_regblock, supply_register_by_name, collect_register)
9210 (collect_register_as_string, collect_register_by_name): Adjust.
9211 * regcache.h (struct target_desc): Forward declare.
9212 (struct regcache) <tdesc>: New field.
9213 (init_register_cache, new_register_cache): Add target_desc
9214 parameter.
9215 (regcache_invalidate_thread): Declare.
9216 (regcache_invalidate_one): Delete declaration.
9217 (regcache_release): Declare.
9218 (find_register_by_number, register_cache_size, register_size)
9219 (find_regno): Add target_desc parameter.
9220 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9221 declarations.
9222 * remote-utils.c: Include tdesc.h.
9223 (outreg, prepare_resume_reply): Adjust.
9224 * server.c: Include tdesc.h.
9225 (gdbserver_xmltarget): Delete declaration.
9226 (get_features_xml, process_serial_event): Adjust.
9227 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9228 declare.
9229 (struct process_info) <tdesc>: New field.
9230 (ipa_tdesc): Declare.
9231 * tdesc.c: New file.
9232 * tdesc.h: New file.
9233 * tracepoint.c: Include tdesc.h.
9234 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9235 (get_context_regcache): Adjust to pass ipa_tdesc down.
9236 (do_action_at_tracepoint): Adjust to get the register cache size
9237 from the context regcache's description.
9238 (traceframe_walk_blocks): Adjust to get the register cache size
9239 from the current trace frame's description.
9240 (traceframe_get_pc): Adjust to get current trace frame's
9241 description and pass it down.
9242 (gdb_collect): Adjust to get the register cache size from the
9243 IPA's description.
9244 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9245 (gdbserver_xmltarget): Delete.
9246 (initialize_low_tracepoint): Set the ipa's target description.
9247 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9248 (initialize_low_tracepoint): Set the ipa's target description.
9249 * linux-x86-low.c: Include tdesc.h.
9250 [__x86_64__] (is_64bit_tdesc): New.
9251 (ps_get_thread_area, x86_get_thread_area): Use it.
9252 (i386_cannot_store_register): Rename to ...
9253 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9254 (i386_cannot_fetch_register): Rename to ...
9255 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9256 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9257 to new interface.
9258 (target_regsets): Rename to ...
9259 (x86_regsets): ... this.
9260 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9261 interface.
9262 (x86_siginfo_fixup): Use is_64bit_tdesc.
9263 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9264 (tdesc_x32_avx_linux, tdesc_x32_linux)
9265 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9266 Declare.
9267 (x86_linux_update_xmltarget): Delete.
9268 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9269 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9270 (AMD64_LINUX_USER64_CS): New.
9271 (x86_linux_read_description): New, based on
9272 x86_linux_update_xmltarget.
9273 (same_process_callback): New.
9274 (x86_arch_setup_process_callback): New.
9275 (x86_linux_update_xmltarget): New.
9276 (x86_regsets_info): New.
9277 (amd64_linux_regs_info): New.
9278 (i386_linux_usrregs_info): New.
9279 (i386_linux_regs_info): New.
9280 (x86_linux_regs_info): New.
9281 (x86_arch_setup): Reimplement.
9282 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9283 (x86_emit_ops): Ditto.
9284 (the_low_target): Adjust. Install x86_linux_regs_info,
9285 x86_cannot_fetch_register, and x86_cannot_store_register.
9286 (initialize_low_arch): New.
9287 * linux-ia64-low.c (tdesc_ia64): Declare.
9288 (ia64_fetch_register): Adjust.
9289 (ia64_usrregs_info, regs_info): New globals.
9290 (ia64_regs_info): New function.
9291 (the_low_target): Adjust.
9292 (initialize_low_arch): New function.
9293 * linux-sparc-low.c (tdesc_sparc64): Declare.
9294 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9295 Adjust.
9296 (sparc_arch_setup): New function.
9297 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9298 (the_low_target): Adjust.
9299 (initialize_low_arch): New function.
9300 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9301 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9302 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9303 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9304 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9305 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9306 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9307 (tdesc_powerpc_isa205_vsx64l): Declare.
9308 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9309 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9310 (ppc_set_pc, ppc_get_hwcap): Adjust.
9311 (ppc_usrregs_info): Forward declare.
9312 (!__powerpc64__) ppc_regmap_adjusted: New global.
9313 (ppc_arch_setup): Adjust to the current process'es target
9314 description.
9315 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9316 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9317 (ppc_store_evrregset): Adjust.
9318 (target_regsets): Rename to ...
9319 (ppc_regsets): ... this, and make static.
9320 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9321 (ppc_regs_info): New function.
9322 (the_low_target): Adjust.
9323 (initialize_low_arch): New function.
9324 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9325 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9326 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9327 (tdesc_s390x_linux64v2): Declare.
9328 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9329 (s390_fill_gregset, s390_store_last_break): Adjust.
9330 (target_regsets): Rename to ...
9331 (s390_regsets): ... this, and make static.
9332 (s390_get_pc, s390_set_pc): Adjust.
9333 (s390_get_hwcap): New target_desc parameter, and use it.
9334 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9335 (s390_arch_setup): Adjust to set the current process'es target
9336 description. Don't adjust the regmap.
9337 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9338 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9339 (regs_info_3264): New globals.
9340 (s390_regs_info): New function.
9341 (the_low_target): Adjust.
9342 (initialize_low_arch): New function.
9343 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9344 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9345 [__mips64] (init_registers_mips_linux)
9346 (init_registers_mips_dsp_linux): Delete defines.
9347 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9348 (have_dsp): New global.
9349 (mips_read_description): New, based on mips_arch_setup.
9350 (mips_arch_setup): Reimplement.
9351 (get_usrregs_info): New function.
9352 (mips_cannot_fetch_register, mips_cannot_store_register)
9353 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9354 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9355 (target_regsets): Rename to ...
9356 (mips_regsets): ... this, and make static.
9357 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9358 (dsp_regs_info, regs_info): New globals.
9359 (mips_regs_info): New function.
9360 (the_low_target): Adjust.
9361 (initialize_low_arch): New function.
9362 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9363 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9364 Declare.
9365 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9366 (arm_read_description): New, with bits factored from
9367 arm_arch_setup.
9368 (arm_arch_setup): Reimplement.
9369 (target_regsets): Rename to ...
9370 (arm_regsets): ... this, and make static.
9371 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9372 (arm_regs_info): New function.
9373 (the_low_target): Adjust.
9374 (initialize_low_arch): New function.
9375 * linux-m68k-low.c (tdesc_m68k): Declare.
9376 (target_regsets): Rename to ...
9377 (m68k_regsets): ... this, and make static.
9378 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9379 (m68k_regs_info): New function.
9380 (m68k_arch_setup): New function.
9381 (the_low_target): Adjust.
9382 (initialize_low_arch): New function.
9383 * linux-sh-low.c (tdesc_sharch): Declare.
9384 (target_regsets): Rename to ...
9385 (sh_regsets): ... this, and make static.
9386 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9387 (sh_regs_info, sh_arch_setup): New functions.
9388 (the_low_target): Adjust.
9389 (initialize_low_arch): New function.
9390 * linux-bfin-low.c (tdesc_bfin): Declare.
9391 (bfin_arch_setup): New function.
9392 (bfin_usrregs_info, regs_info): New globals.
9393 (bfin_regs_info): New function.
9394 (the_low_target): Adjust.
9395 (initialize_low_arch): New function.
9396 * linux-cris-low.c (tdesc_cris): Declare.
9397 (cris_arch_setup): New function.
9398 (cris_usrregs_info, regs_info): New globals.
9399 (cris_regs_info): New function.
9400 (the_low_target): Adjust.
9401 (initialize_low_arch): New function.
9402 * linux-cris-low.c (tdesc_crisv32): Declare.
9403 (cris_arch_setup): New function.
9404 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9405 (cris_regs_info): New function.
9406 (the_low_target): Adjust.
9407 (initialize_low_arch): New function.
9408 * linux-m32r-low.c (tdesc_m32r): Declare.
9409 (m32r_arch_setup): New function.
9410 (m32r_usrregs_info, regs_info): New globals.
9411 (m32r_regs_info): Adjust.
9412 (initialize_low_arch): New function.
9413 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9414 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9415 (tic6x_usrregs_info): Forward declare.
9416 (tic6x_read_description): New function, based on ...
9417 (tic6x_arch_setup): ... this. Reimplement.
9418 (target_regsets): Rename to ...
9419 (tic6x_regsets): ... this, and make static.
9420 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9421 (tic6x_regs_info): New function.
9422 (the_low_target): Adjust.
9423 (initialize_low_arch): New function.
9424 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9425 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9426 (target_regsets): Rename to ...
9427 (xtensa_regsets): ... this, and make static.
9428 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9429 globals.
9430 (xtensa_arch_setup, xtensa_regs_info): New functions.
9431 (the_low_target): Adjust.
9432 (initialize_low_arch): New function.
9433 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9434 (nios2_arch_setup): Set the current process'es tdesc.
9435 (target_regsets): Rename to ...
9436 (nios2_regsets): ... this.
9437 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9438 (nios2_regs_info): New function.
9439 (the_low_target): Adjust.
9440 (initialize_low_arch): New function.
9441 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9442 (aarch64_arch_setup): Set the current process'es tdesc.
9443 (target_regsets): Rename to ...
9444 (aarch64_regsets): ... this.
9445 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9446 (aarch64_regs_info): New function.
9447 (the_low_target): Adjust.
9448 (initialize_low_arch): New function.
9449 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9450 globals.
9451 (target_regsets): Rename to ...
9452 (tile_regsets): ... this.
9453 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9454 (tile_regs_info): New function.
9455 (tile_arch_setup): Set the current process'es tdesc.
9456 (the_low_target): Adjust.
9457 (initialize_low_arch): New function.
9458 * spu-low.c (tdesc_spu): Declare.
9459 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9460 * win32-arm-low.c (tdesc_arm): Declare.
9461 (arm_arch_setup): New function.
9462 (the_low_target): Install arm_arch_setup instead of
9463 init_registers_arm.
9464 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9465 (init_windows_x86): Rename to ...
9466 (i386_arch_setup): ... this. Set `win32_tdesc'.
9467 (the_low_target): Adjust.
9468 * win32-low.c (win32_tdesc): New global.
9469 (child_add_thread): Don't create the thread cache here.
9470 (do_initial_child_stuff): Set the new process'es tdesc.
9471 * win32-low.h (struct target_desc): Forward declare.
9472 (win32_tdesc): Declare.
9473 * lynx-i386-low.c (tdesc_i386): Declare global.
9474 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9475 * lynx-low.c (lynx_tdesc): New global.
9476 (lynx_add_process): Set the new process'es tdesc.
9477 * lynx-low.h (struct target_desc): Forward declare.
9478 (lynx_tdesc): Declare global.
9479 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9480 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9481 * nto-low.c (nto_tdesc): New global.
9482 (do_attach): Set the new process'es tdesc.
9483 * nto-low.h (struct target_desc): Forward declare.
9484 (nto_tdesc): Declare.
9485 * nto-x86-low.c (tdesc_i386): Declare.
9486 (nto_x86_arch_setup): Set `nto_tdesc'.
9487
9488 2013-06-04 Gary Benson <gbenson@redhat.com>
9489
9490 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9491 to qSupported response when appropriate.
9492 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9493 with nonzero-length annex.
9494 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9495 arguments supplied in annex.
9496
9497 2013-05-31 Doug Evans <dje@google.com>
9498
9499 PR server/15594
9500 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9501 64 bits in 64-cross-32 environment.
9502
9503 2013-05-28 Pedro Alves <palves@redhat.com>
9504
9505 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9506 (aarch64-without-fpu.c): Delete rule.
9507 * configure.srv (aarch64*-*-linux*): Remove references to
9508 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9509 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9510 declaration.
9511
9512 2013-05-24 Pedro Alves <palves@redhat.com>
9513
9514 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9515 instead of strchr/decode_address. Error if the range isn't split
9516 with a ','. Don't assume there's be a ':' in the action.
9517
9518 2013-05-23 Yao Qi <yao@codesourcery.com>
9519 Pedro Alves <palves@redhat.com>
9520
9521 * linux-low.c (lwp_in_step_range): New function.
9522 (linux_wait_1): If the thread was range stepping and stopped
9523 outside the stepping range, report the stop to GDB. Otherwise,
9524 continue stepping. Add range stepping debug output.
9525 (linux_set_resume_request): Copy the step range from the resume
9526 request to the lwp.
9527 (linux_supports_range_stepping): New.
9528 (linux_target_ops) <supports_range_stepping>: Set to
9529 linux_supports_range_stepping.
9530 * linux-low.h (struct linux_target_ops)
9531 <supports_range_stepping>: New field.
9532 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9533 * linux-x86-low.c (x86_supports_range_stepping): New.
9534 (the_low_target) <supports_range_stepping>: Set to
9535 x86_supports_range_stepping.
9536 * server.c (handle_v_cont): Handle 'r' action.
9537 (handle_v_requests): Append ";r" if the target supports range
9538 stepping.
9539 * target.h (struct thread_resume) <step_range_start,
9540 step_range_end>: New fields.
9541 (struct target_ops) <supports_range_stepping>:
9542 New field.
9543 (target_supports_range_stepping): New macro.
9544
9545 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9546
9547 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9548 confusion in comment.
9549
9550 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9551
9552 * lynx-low.c (struct process_info_private): New type.
9553 (lynx_add_process): New function.
9554 (lynx_create_inferior, lynx_attach): Replace calls to
9555 add_process by calls to lynx_add_process.
9556 (lynx_resume): If PTID is null, then try using
9557 current_process()->private->last_wait_event_ptid.
9558 Add comments.
9559 (lynx_clear_inferiors): Delete. The contents of that function
9560 has been inlined in lynx_mourn;
9561 (lynx_wait_1): Save the ptid in the process's private data.
9562 (lynx_mourn): Free the process' private data. Replace call
9563 to lynx_clear_inferiors by call to clear_inferiors.
9564
9565 2013-05-17 Yao Qi <yao@codesourcery.com>
9566
9567 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9568 the right place.
9569
9570 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9571
9572 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9573 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9574 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9575 PT_TEXT_END_ADDR guards. Update comments.
9576 (linux_target_op) <read_offsets>: Conditionally define to
9577 linux_read_offsets if the target is UCLIBC and if it defines
9578 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9579
9580 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9581 Andrew Jenner <andrew@codesourcery.com>
9582
9583 * Makefile.in (SFILES): Add linux-nios2-low.c.
9584 (clean): Add action to delete nios2-linux.c.
9585 (nios2-linux.c): New rule.
9586 * configure.srv: Add nios2*-*-linux*.
9587 * linux-nios2-low.c: New.
9588
9589 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9590
9591 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9592
9593 2013-04-25 Hui Zhu <hui@codesourcery.com>
9594
9595 PR gdb/15186
9596 * ax.c (ax_printf): Add fflush.
9597
9598 2013-04-22 Tom Tromey <tromey@redhat.com>
9599
9600 * Makefile.in (SFILES): Add filestuff.c.
9601 (OBS): Add filestuff.o.
9602 (filestuff.o): New target.
9603 * config.in, configure: Rebuild.
9604 * configure.ac: Check for fdwalk, pipe2.
9605
9606 2013-04-17 Pedro Alves <palves@redhat.com>
9607
9608 * configure.ac (USE_THREAD_DB): Delete variable.
9609 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9610 Don't AC_SUBST USE_THREAD_DB.
9611 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9612 * config.in, configure: Regenerate.
9613
9614 2013-04-16 Pedro Alves <palves@redhat.com>
9615
9616 * linux-low.h (struct lwp_info) <thread_known>: Move under
9617 the USE_THREAD_DB #ifdef.
9618
9619 2013-04-16 Pedro Alves <palves@redhat.com>
9620
9621 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9622 (linux-low.o): Delete rule.
9623 * linux-low.h: Always include "gdb_thread_db.h" instead of
9624 conditionally including thread_db.h.
9625 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9626 HAVE_THREAD_DB_H.
9627
9628 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9629
9630 * Makefile.in (install-only): Fix make install regression.
9631
9632 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9633
9634 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9635 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9636 installation.
9637 * gdbserver.1: Remove.
9638
9639 2013-03-22 Pedro Alves <palves@redhat.com>
9640
9641 * linux-low.c (handle_extended_wait): Don't call
9642 linux_enable_event_reporting.
9643
9644 2013-03-15 Tony Theodore <tonyt@logyst.com>
9645
9646 PR build/9098:
9647 * Makefile.in (SHELL): Use @SHELL@.
9648
9649 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9650
9651 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9652 compiler warning.
9653
9654 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9655
9656 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9657 Remove extraneous NULL element.
9658
9659 2013-03-13 Yao Qi <yao@codesourcery.com>
9660
9661 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9662 'V' block in trace frame.
9663
9664 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9665
9666 * target.h (struct target_ops): Add btrace ops.
9667 (target_supports_btrace): New macro.
9668 (target_enable_btrace): New macro.
9669 (target_disable_btrace): New macro.
9670 (target_read_btrace): New macro.
9671 * gdbthread.h (struct thread_info): Add btrace field.
9672 * server.c: Include btrace-common.h.
9673 (handle_btrace_general_set): New function.
9674 (handle_btrace_enable): New function.
9675 (handle_btrace_disable): New function.
9676 (handle_general_set): Call handle_btrace_general_set.
9677 (handle_qxfer_btrace): New function.
9678 (struct qxfer qxfer_packets[]): Add btrace entry.
9679 * inferiors.c (remove_thread): Disable btrace.
9680 * linux-low: Include linux-btrace.h.
9681 (linux_low_enable_btrace): New function.
9682 (linux_low_read_btrace): New function.
9683 (linux_target_ops): Add btrace ops.
9684 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9685 Add srv_linux_btrace=yes.
9686 (x86_64-*-linux*): Add linux-btrace.o.
9687 Add srv_linux_btrace=yes.
9688 * configure.ac: Define HAVE_LINUX_BTRACE.
9689 * config.in: Regenerated.
9690 * configure: Regenerated.
9691
9692 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9693
9694 * server.c (handle_qxfer): Preserve error message if -3 is
9695 returned.
9696 (qxfer): Document the -3 return value.
9697
9698 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9699
9700 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9701 (linux_btrace_h): New variable.
9702 (linux-btrace.o): New rule.
9703
9704 2013-03-08 Stan Shebs <stan@codesourcery.com>
9705 Hafiz Abid Qadeer <abidh@codesourcery.com>
9706
9707 * tracepoint.c (trace_buffer_size): New global.
9708 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9709 (init_trace_buffer): Change to one-argument function. Allocate
9710 trace buffer memory.
9711 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9712 handle QTBuffer:size packet.
9713 (cmd_bigqtbuffer_size): New function.
9714 (initialize_tracepoint): Call init_trace_buffer with
9715 DEFAULT_TRACE_BUFFER_SIZE.
9716 * server.c (handle_query): Add QTBuffer:size in the
9717 supported packets.
9718
9719 2013-03-07 Yao Qi <yao@codesourcery.com>
9720
9721 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9722 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9723 of -1.
9724 (cmd_qtsp): Adjust condition. Do post increment.
9725 Set cur_action and cur_step_action back to 0.
9726
9727 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9728
9729 PR server/15236
9730 * linux-low.c (linux_write_memory): Return early success if LEN is
9731 zero.
9732
9733 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9734
9735 * configure.srv: Add x86_64-*-cygwin* as target.
9736
9737 2013-02-28 Tom Tromey <tromey@redhat.com>
9738
9739 * configure.ac: Invoke AC_SYS_LARGEFILE.
9740 * configure, config.in: Rebuild.
9741
9742 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9743
9744 * win32-low.c: Throughout, fix format strings and casts of
9745 printf-like functions to avoid type related warnings on all
9746 platforms.
9747 (get_child_debug_event): Print dwDebugEventCode as hex since
9748 that's how it's usually documented.
9749
9750 2013-02-28 Yao Qi <yao@codesourcery.com>
9751
9752 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9753 pulongest.
9754
9755 2013-02-27 Jiong Wang <jiwang@tilera.com>
9756
9757 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9758 (reg-tilegx32.c): New rule.
9759 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9760 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9761 different register info initializer according to elf class.
9762 (init_registers_tilgx32): New function. The tilegx32 register info
9763 initializer.
9764 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9765 (tile_store_gregset): Likewise.
9766
9767 2013-02-27 Yao Qi <yao@codesourcery.com>
9768
9769 * server.c (process_point_options): Print debug message when
9770 debug_threads is true.
9771
9772 2013-02-26 Yao Qi <yao@codesourcery.com>
9773
9774 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9775
9776 2013-02-19 Pedro Alves <palves@redhat.com>
9777 Kai Tietz <ktietz@redhat.com>
9778
9779 PR gdb/15161
9780
9781 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9782 instead of strtoul to extract address from packet.
9783 (process_serial_event) <'z'>: Likewise.
9784
9785 2013-02-18 Yao Qi <yao@codesourcery.com>
9786
9787 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9788
9789 2013-02-14 Pedro Alves <palves@redhat.com>
9790
9791 Plug memory leak.
9792
9793 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9794 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9795
9796 2013-02-14 Pedro Alves <palves@redhat.com>
9797
9798 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9799
9800 2013-02-14 Pedro Alves <palves@redhat.com>
9801
9802 * tracepoint.c (save_string): Delete.
9803 (add_tracepoint_action): Use savestring instead of save_string.
9804
9805 2013-02-12 Pedro Alves <palves@redhat.com>
9806
9807 * linux-xtensa-low.c: Ditto.
9808 * xtensa-xtregs.c: Ditto.
9809
9810 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9811
9812 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9813 thread_db.
9814
9815 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9816
9817 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9818 aarch64_num_wp_regs and aarch64_num_bp_regs to
9819 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9820
9821 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9822
9823 * linux-aarch64-low.c (ps_get_thread_area): Replace
9824 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9825
9826 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9827 Marcus Shawcroft <marcus.shawcroft@arm.com>
9828 Nigel Stephens <nigel.stephens@arm.com>
9829 Yufeng Zhang <yufeng.zhang@arm.com>
9830
9831 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9832 (aarch64.c, aarch64-without-fpu.c): New targets.
9833 * configure.srv (aarch64*-*-linux*): New.
9834 * linux-aarch64-low.c: New file.
9835
9836 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9837
9838 * linux-low.c (handle_extended_wait, linux_create_inferior)
9839 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9840 (dequeue_one_deferred_signal, linux_resume_one_thread)
9841 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9842 (linux_tracefork_grandchild, linux_test_for_tracefork)
9843 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9844 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9845 where the argument is 0.
9846
9847 2013-01-25 Yao Qi <yao@codesourcery.com>
9848
9849 * event-loop.c: Include "queue.h".
9850 (gdb_event_p): New typedef.
9851 (struct gdb_event) <next_event>: Remove.
9852 (event_queue): Change to QUEUE(gdb_event_p).
9853 (async_queue_event): Remove.
9854 (gdb_event_xfree): New.
9855 (initialize_event_loop): New.
9856 (process_event): Use API from QUEUE.
9857 (wait_for_event): Likewise.
9858 * server.c (main): Call initialize_event_loop.
9859 * server.h (initialize_event_loop): Declare.
9860
9861 2013-01-18 Yao Qi <yao@codesourcery.com>
9862
9863 * ax.h (struct eval_agent_expr_context): New.
9864 (gdb_eval_agent_expr): Update declaration.
9865 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9866 TFRAME. Add new argument CTX.
9867 * server.h (struct eval_agent_expr_context): Declare.
9868 (agent_mem_read, agent_tsv_read): Update declaration.
9869 (agent_mem_read_string): Likewise.
9870 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9871 (add_traceframe_block): Add new argument TPOINT.
9872 Increase TPOINT->traceframe_usage.
9873 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9874 eval_tracepoint_agent_expr.
9875 (condition_true_at_tracepoint): Likewise.
9876 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9877 (agent_mem_read_string, agent_tsv_read): Likewise.
9878
9879 2013-01-16 Yao Qi <yao@codesourcery.com>
9880
9881 * linux-low.c (linux_resume_one_lwp): Don't check
9882 'lwp->bp_reinsert != 0'.
9883
9884 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9885 Pedro Alves <palves@redhat.com>
9886
9887 * lynx-low.c (ptrace_request_to_str): Define a temporary
9888 macro and use it to simplify this function's implementation.
9889
9890 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9891
9892 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9893 sets errno.
9894
9895 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9896
9897 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9898
9899 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9900
9901 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9902
9903 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9904
9905 * lynx-low.c (lynx_resume): Use the resume_info parameter
9906 to determine the ptid for the lynx_ptrace call, unless
9907 it is equal to minus_one_ptid, in which case we use the
9908 ptid of the current_inferior.
9909 (lynx_wait_1): After having received a thread create/exit
9910 event, resume the inferior's execution using the signaling
9911 thread's ptid, rather than the old ptid.
9912
9913 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9914
9915 * lynx-low.c (lynx_resume): Delete variable ret.
9916
9917 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9918
9919 * gdbreplay.c (gdbreplay_version): Update copyright year.
9920 * server.c (gdbserver_version): Likewise.
9921
9922 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9923
9924 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9925 new thread.
9926
9927 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9928
9929 * lynx-low.c (ptrace_request_to_str): Add handling for
9930 PTRACE_GETTRACESIG.
9931
9932 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9933
9934 * lynx-low.c (lynx_attach): Delete variable new_process.
9935
9936 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9937
9938 * lynx-low.c (lynx_create_inferior): Delete variable
9939 new_process.
9940
9941 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9942
9943 * lynx-low.c (ptrace_request_to_str): Do not handle
9944 PTRACE_GETTHREADLIST if this macro does not exist.
9945
9946 2012-12-15 Yao Qi <yao@codesourcery.com>
9947
9948 * Makefile.in (OBS): Add notif.o.
9949 * notif.c, notif.h: New.
9950 * server.c: Include "notif.h".
9951 (struct vstop_notif) <next>: Remove.
9952 <base>: New field.
9953 (queue_stop_reply): Update.
9954 (push_event, send_next_stop_reply): Remove.
9955 (discard_queued_stop_replies): Update.
9956 (notif_stop): New variable.
9957 (handle_v_stopped): Remove.
9958 (handle_v_requests): Don't call handle_v_stopped. Call
9959 handle_ack_notif instead.
9960 (queue_stop_reply_callback): Call notif_event_enque instead
9961 of queue_stop_reply.
9962 (handle_status): Don't call send_next_stop_reply, call
9963 notif_write_event instead.
9964 (kill_inferior_callback): Likewise.
9965 (detach_or_kill_inferior_callback): Likewise.
9966 (main): Call initialize_notif.
9967 (process_serial_event): Call QUEUE_is_empty.
9968 (handle_target_event): Call notif_push instead of push event.
9969 * server.h (push_event): Remove declaration.
9970
9971 2012-12-10 Tom Tromey <tromey@redhat.com>
9972
9973 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9974 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9975 macros.
9976 (.c.o): Rewrite.
9977 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9978 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9979 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9980 (amd64-linux-ipa.o, ax.o): Rewrite.
9981 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9982 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9983 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9984 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9985 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9986 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9987 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9988 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9989 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9990 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9991 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9992 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9993 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9994 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9995 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9996 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9997 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9998 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9999 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10000 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10001 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10002 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10003 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10004 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10005 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10006 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10007 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10008 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10009 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10010 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10011 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10012 (reg-tilegx.o): Remove.
10013 (all_object_files): New macro.
10014 Include .deps files.
10015 * aclocal.m4, configure: Rebuild.
10016 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10017 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10018 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10019
10020 2012-12-05 Tom Tromey <tromey@redhat.com>
10021
10022 PR gdb/14917:
10023 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10024
10025 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10026
10027 * configure.ac: Check for linux/perf_event.h.
10028 * config.in: Regenerated.
10029 * configure: Regenerated.
10030
10031 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10032
10033 * hostio.c (handle_readlink): Decrease buffer size
10034 parameter passed to readlink by one byte.
10035
10036 2012-11-26 Yao Qi <yao@codesourcery.com>
10037
10038 * configure.ac (build_warnings): Append '-Wempty-body'.
10039 * configure: Regenerated.
10040 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10041 body.
10042
10043 2012-11-15 Pierre Muller <muller@sourceware.org>
10044
10045 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10046 * config.in: Regenerate.
10047 * configure: Regenerate.
10048 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10049 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10050 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10051 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10052 header.
10053 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10054 instead of <sys/wait.h> header.
10055 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10056
10057 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10058
10059 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10060 (various make rules): Remove -DGDBSERVER
10061
10062 2012-11-09 Yao Qi <yao@codesourcery.com>
10063
10064 * spu-low.c (current_ptid): Move it to ..
10065 * gdbthread.h: ... here. New.
10066 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10067 * server.c (myresume, process_serial_event): Likewise.
10068 * thread-db.c (thread_db_find_new_threads): Likewise.
10069 * tracepoint.c (run_inferior_command): Likewise.
10070
10071 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10072
10073 * server.c (handle_search_memory_1): Include access length in
10074 warning message.
10075
10076 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10077
10078 * linux-crisv32-low.c: Fix compile errors.
10079
10080 2012-09-04 Yao Qi <yao@codesourcery.com>
10081
10082 * tracepoint.c (cmd_qtsv): Adjust debug message.
10083 Don't check CUR_TPOINT.
10084
10085 2012-08-28 Yao Qi <yao@codesourcery.com>
10086
10087 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10088 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10089 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10090 Remove declarations of xmalloc, xreallloc, xstrdup and
10091 freeargv.
10092 * Makefile.in (libiberty_h): New.
10093 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10094 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10095
10096 2012-08-23 Yao Qi <yao@codesourcery.com>
10097
10098 * server.h: Remove declaration of 'xsnprintf'.
10099
10100 2012-08-22 Keith Seitz <keiths@redhat.com>
10101
10102 * server.h: Include build-gnulib-gbserver/config.h.
10103 * gdbreplay.c: Likewise.
10104
10105 2012-08-08 Doug Evans <dje@google.com>
10106
10107 * Makefile.in (SFILES): Add gdb_vecs.c.
10108 (OBS): Add gdb_vecs.o.
10109 (gdb_vecs_h, host_defs_h): New variables.
10110 (thread-db.o): Add $(gdb_vecs_h) dependency.
10111 (gdb_vecs.o): New rule.
10112 * thread-db.c: #include "gdb_vecs.h".
10113 (thread_db_load_search): Use a vector to iterate over path elements.
10114 Handle text appearing after "$pdir".
10115
10116 * configure.ac: Add check for strstr.
10117 * config.in: Regenerate.
10118 * configure: Regenerate.
10119
10120 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10121
10122 * hostio.c (handle_pread): If pread fails, fall back to attempting
10123 lseek/read.
10124 (handle_pwrite): Likewise for pwrite.
10125
10126 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10127
10128 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10129 between unsupported TYPE and unimplementable ADDR/LEN combination.
10130 (arm_insert_point): Act on new return value.
10131
10132 2012-07-31 Pedro Alves <palves@redhat.com>
10133
10134 * server.c (process_point_options): Only skip tokens if we find
10135 one that is unrecognized. Don't treat 'X' specially while
10136 skipping unrecognized tokens.
10137
10138 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10139
10140 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10141 to 4-byte-align HW breakpoint addresses for Thumb.
10142
10143 2012-07-27 Yao Qi <yao@codesourcery.com>
10144
10145 PR remote/14161.
10146
10147 * server.h: Declare gdb_agent_about_to_close.
10148 * target.c (kill_inferior): Include "agent.h".
10149 New. Send command 'kill'.
10150 * target.h (kill_inferior): Removed macro.
10151 * tracepoint.c (gdb_agent_about_to_close): New.
10152 (gdb_agent_helper_thread): Handle command 'close'.
10153 Wait endlessly until the inferior stops.
10154 Install gdb_agent_remove_socket to atexit hook.
10155 (agent_socket_name): New static variable.
10156 (gdb_agent_socket_init): Replace local variable 'name' with
10157 'agent_socket_name'.
10158 (gdb_agent_remove_socket): New.
10159
10160 2012-07-27 Yao Qi <yao@codesourcery.com>
10161
10162 * server.c (process_point_options): Stop at 'X' when parsing.
10163
10164 2012-07-19 Michael Eager <eager@eagercon.com>
10165
10166 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10167 to hw_execute.
10168 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10169 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10170 hardware breakpoint.
10171
10172 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10173
10174 * gdbserver/linux-low.c (initialize_low): Call
10175 linux_ptrace_init_warnings.
10176
10177 2012-07-02 Doug Evans <dje@google.com>
10178
10179 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10180 pointer to int.
10181
10182 2012-07-02 Stan Shebs <stan@codesourcery.com>
10183
10184 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10185 (ax.o): Add it to build rule.
10186 (ax-ipa.o): Ditto.
10187 (OBS): Add format.o.
10188 (IPA_OBS): Add format.o.
10189 * server.c (handle_query): Claim support for breakpoint commands.
10190 (process_point_options): Add command case.
10191 (process_serial_event): Leave running if there are printfs in
10192 effect.
10193 * mem-break.h (any_persistent_commands): Declare.
10194 (add_breakpoint_commands): Declare.
10195 (gdb_no_commands_at_breakpoint): Declare.
10196 (run_breakpoint_commands): Declare.
10197 * mem-break.c (struct point_command_list): New struct.
10198 (struct breakpoint): New field command_list.
10199 (any_persistent_commands): New function.
10200 (add_commands_to_breakpoint): New function.
10201 (add_breakpoint_commands): New function.
10202 (gdb_no_commands_at_breakpoint): New function.
10203 (run_breakpoint_commands): New function.
10204 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10205 locally.
10206 * ax.c: Include format.h.
10207 (ax_printf): New function.
10208 (gdb_eval_agent_expr): Add printf opcode.
10209
10210 2012-06-13 Yao Qi <yao@codesourcery.com>
10211
10212 * server.c (start_inferior): Remove duplicated writes to fields
10213 'last_resume_kind' and 'last_status' of 'current_inferior'.
10214
10215 2012-06-12 Yao Qi <yao@codesourcery.com>
10216 Pedro Alves <palves@redhat.com>
10217
10218 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10219 comment.
10220 * server.c (handle_v_cont): Extend comment.
10221
10222 2012-06-11 Yao Qi <yao@codesourcery.com>
10223
10224 * linux-low.c (linux_attach): Add 'static'.
10225
10226 2012-06-06 Yao Qi <yao@codesourcery.com>
10227
10228 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10229
10230 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10231
10232 Fix gcc -flto compilation warning.
10233 * server.c (main): Make variable multi_mode and attach volatile.
10234
10235 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10236
10237 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10238 if the platform doesn't know about it.
10239
10240 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10241
10242 * Makefile.in (SFILES): Add linux-tile-low.c.
10243 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10244 * configure.srv: Handle tilegx-*-linux*.
10245 * linux-tile-low.c: New file.
10246
10247 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10248
10249 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10250
10251 2012-05-24 Pedro Alves <palves@redhat.com>
10252
10253 PR gdb/7205
10254
10255 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10256
10257 2012-05-24 Pedro Alves <palves@redhat.com>
10258
10259 PR gdb/7205
10260
10261 Replace target_signal with gdb_signal throughout.
10262
10263 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10264
10265 * linux-low.c (linux_store_registers): Avoid the copying sequence
10266 when no data has been retrieved by ptrace.
10267
10268 2012-05-22 Will Deacon <will.deacon@arm.com>
10269
10270 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10271 Include asm/ptrace.h.
10272 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10273 already defined.
10274
10275 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10276
10277 * linux-low.c (linux_store_registers): Don't re-retrieve data
10278 with ptrace that has already been obtained from /proc. Always
10279 copy any data retrieved with ptrace to the buffer supplied.
10280
10281 2012-05-11 Yao Qi <yao@codesourcery.com>
10282 Pedro Alves <palves@redhat.com>
10283
10284 * linux-low.c (enum stopping_threads_kind): New.
10285 (stopping_threads): Change type to `enum stopping_threads_kind'.
10286 (handle_extended_wait): If stopping and suspending threads, leave
10287 the new_lwp suspended too.
10288 (linux_wait_for_event): Adjust.
10289 (stop_all_lwps): Set `stopping_threads' to
10290 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10291 whether we're suspending threads or just stopping them. Assert no
10292 recursion happens.
10293
10294 2012-04-29 Yao Qi <yao@codesourcery.com>
10295
10296 * server.h: Move some code to ...
10297 * gdbthread.h: ... here. New.
10298 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10299 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10300 (nto-low.o, win32-low.o): Likewise.
10301 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10302 * regcache.c, remote-utils.c, server.c: Likewise.
10303 * target.c, tracepoint.c, win32-low.c: Likewise.
10304
10305 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10306
10307 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10308 (PTRACE_ARG4_TYPE): Likewise.
10309 (PTRACE_XFER_TYPE): Likewise.
10310 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10311 ptrace to PTRACE_ARG3_TYPE.
10312 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10313 (PTRACE_ARG4_TYPE): Likewise.
10314 (PTRACE_XFER_TYPE): Likewise.
10315 (linux_detach_one_lwp): Cast fourth argument of
10316 ptrace to long then PTRACE_ARG4_TYPE.
10317 (regsets_fetch_inferior_registers): Cast third argument of
10318 ptrace to long then PTRACE_ARG3_TYPE.
10319 (regsets_store_inferior_registers): Likewise.
10320
10321 2012-04-20 Pedro Alves <palves@redhat.com>
10322
10323 * configure: Regenerate.
10324
10325 2012-04-19 Pedro Alves <palves@redhat.com>
10326
10327 * Makefile.in (GNULIB_BUILDDIR): New.
10328 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10329 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10330 (all, install-only, uninstall, clean-info, all-lib, clean): No
10331 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10332 (maintainer-clean realclean distclean): Use subdir_do.
10333 (subdir_do): New.
10334 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10335 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10336 * acinclude.m4: Include acx_configure_dir.m4.
10337 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10338 calls. Call AC_PROG_RANLIB. Configure gnulib using
10339 ACX_CONFIGURE_DIR.
10340 (GNULIB): New.
10341 (GNULIB_STDINT_H): Adjust.
10342 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10343 * gdbreplay.c: Include build-gnulib/config.h.
10344 * server.h: Likewise.
10345 * aclocal.m4: Regenerate.
10346 * config.in: Regenerate.
10347 * configure: Regenerate.
10348
10349 2012-04-19 Pedro Alves <palves@redhat.com>
10350
10351 * Makefile.in (LIBGNU, INCGNU): Adjust.
10352 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10353 (all, install-only, uninstall, clean-info, all-lib, clean)
10354 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10355 * configure.ac: Adjust AC_OUTPUT output.
10356 * aclocal.m4: Regenerate.
10357 * configure: Regenerate.
10358
10359 2012-04-19 Pedro Alves <palves@redhat.com>
10360
10361 * Makefile.in (generated_files): New.
10362 (server_h): Remove the explicit dependency on config.h, and depend
10363 on $generated_files.
10364
10365 2012-04-19 Pedro Alves <palves@redhat.com>
10366
10367 * Makefile.in (INCGNU): Add -Ignulib.
10368
10369 2012-04-19 Pedro Alves <palves@redhat.com>
10370
10371 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10372 (INCGNU): ... this, and spell out -I here.
10373 (GNULIB_LIB): Rename to ...
10374 (LIBGNU): ... this.
10375 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10376
10377 2012-04-19 Pedro Alves <palves@redhat.com>
10378
10379 * config.in: Regenerate.
10380
10381 2012-04-19 Pedro Alves <palves@redhat.com>
10382
10383 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10384 * server.h (memmem): Remove declaration.
10385 * config.in: Regenerate.
10386 * configure: Regenerate.
10387
10388 2012-04-19 Yao Qi <yao@codesourcery.com>
10389
10390 * Makefile.in (SFILES): Add common/vec.c.
10391 (OBS): Add vec.o.
10392 (vec.o): New rule.
10393
10394 2012-04-19 Yao Qi <yao@codesourcery.com>
10395
10396 * remote-utils.c (prepare_resume_reply): Replace with macro
10397 target_core_of_thread.
10398 * server.c (handle_qxfer_threads_proper): Likewise.
10399 * target.h (traget_core_of_thread): New macro.
10400
10401 2012-04-18 Pedro Alves <palves@redhat.com>
10402
10403 * aclocal.m4: Regenerate.
10404 * configure: Regenerate.
10405
10406 2012-04-16 Yao Qi <yao@codesourcery.com>
10407
10408 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10409 duplicated on address.
10410
10411 2012-04-16 Yao Qi <yao@codesourcery.com>
10412
10413 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10414 (struct tracepoint_action_ops) <send>: New field.
10415 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10416 (agent_expr_send, x_tracepoint_action_send): New.
10417 (l_tracepoint_action_send): New.
10418 (cmd_qtdp): Download and install tracepoint
10419 according to `use_agent'.
10420 (run_inferior_command): Add one more parameter `len'.
10421 Update callers.
10422 (tracepoint_send_agent): New.
10423 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10424
10425 2012-04-16 Yao Qi <yao@codesourcery.com>
10426
10427 * tracepoint.c (download_tracepoints): Moved to ...
10428 (cmd_qtstart): ... here.
10429
10430 2012-04-14 Yao Qi <yao@codesourcery.com>
10431
10432 * tracepoint.c: Include inttypes.h.
10433 (struct collect_memory_action): Use sized types.
10434 (struct tracepoint): Likewise.
10435 (cmd_qtdp, stop_tracing): Update print specifiers.
10436 (cmd_qtp, response_tracepoint): Likewise.
10437 (collect_data_at_tracepoint): Likewise.
10438 (collect_data_at_step): Likewise.
10439
10440 2012-04-14 Yao Qi <yao@codesourcery.com>
10441
10442 Import gnulib module inttypes.
10443 * aclocal.m4, config.in, configure: Regenerated.
10444
10445 2012-04-14 Yao Qi <yao@codesourcery.com>
10446
10447 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10448 Makefile and config.status at last.
10449
10450 2012-04-13 Yao Qi <yao@codesourcery.com>
10451
10452 * tracepoint.c: Include stdint.h unconditionally.
10453
10454 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10455
10456 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10457 on BFD_HAVE_SYS_PROCFS_TYPE.
10458 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10459 * configure: Regenerate.
10460 * config.in: Likewise.
10461
10462 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10463
10464 * Makefile.in (clean): Also remove x32.c x32-linux.c
10465 x32-avx.c x32-avx-linux.c.
10466 (x32.o): New target.
10467 (x32.c): Likewise.
10468 (x32-linux.o): Likewise.
10469 (x32-linux.c): Likewise.
10470 (x32-avx.o): Likewise.
10471 (x32-avx.c): Likewise.
10472 (x32-avx-linux.o): Likewise.
10473 (x32-avx-linux.c): Likewise.
10474
10475 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10476 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10477 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10478 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10479 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10480 i386/x32-avx-linux.xml.
10481
10482 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10483 (init_registers_x32_avx_linux): Likwise.
10484 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10485 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10486
10487 2012-04-13 Pedro Alves <palves@redhat.com>
10488
10489 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10490 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10491 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10492 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10493 the sub-make.
10494
10495 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10496
10497 * linux-x86-low.c (compat_x32_clock_t): New.
10498 (compat_x32_siginfo_t): Likewise.
10499 (compat_x32_siginfo_from_siginfo): Likewise.
10500 (siginfo_from_compat_x32_siginfo): Likewise.
10501 (linux_is_elf64): Likewise.
10502 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10503 and siginfo_from_compat_x32_siginfo for x32.
10504 (x86_arch_setup): Set linux_is_elf64.
10505
10506 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10507
10508 PR gdb/13969
10509 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10510 e_machine field.
10511 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10512 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10513 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10514 compatible with process.
10515
10516 2012-04-12 Yao Qi <yao@codesourcery.com>
10517
10518 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10519 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10520 (install-only, install-info, clean): Handle sub dir gnulib.
10521 (all-lib, am--refresh): New targets.
10522 (memmem.o): Remove target.
10523 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10524 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10525 (AC_REPLACE_FUNCS): Remove memmem.
10526 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10527 (AC_OUTPUT): Generate Makefile in gnulib/.
10528 * aclocal.m4, config.in, configure: Regenerated.
10529
10530 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10531
10532 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10533
10534 2012-04-05 Pedro Alves <palves@redhat.com>
10535
10536 -Werror=strict-aliasing
10537
10538 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10539 pointer.
10540
10541 2012-04-04 Pedro Alves <palves@redhat.com>
10542
10543 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10544 (sparc_store_gregset_from_stack, sparc_store_gregset)
10545 (sparc_breakpoint_at): Fix formatting.
10546
10547 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10548
10549 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10550 are available.
10551 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10552 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10553 * config.in: Regenerate.
10554 * configure: Likewise.
10555
10556 2012-03-29 Pedro Alves <palves@redhat.com>
10557
10558 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10559 Correct ptrace arguments.
10560
10561 2012-03-28 Pedro Alves <palves@redhat.com>
10562
10563 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10564 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10565 (IA64_FR1_REGNUM): New defines.
10566 (ia64_fetch_register): New.
10567 (the_low_target): Install it.
10568 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10569 field.
10570 * linux-low.c (linux_fetch_registers): Try the
10571 the_low_target.fetch_register hook first.
10572
10573 * linux-arm-low.c (the_low_target): Adjust.
10574 * linux-bfin-low.c (the_low_target): Adjust.
10575 * linux-cris-low.c (the_low_target): Adjust.
10576 * linux-crisv32-low.c (the_low_target): Adjust.
10577 * linux-m32r-low.c (the_low_target): Adjust.
10578 * linux-m68k-low.c (the_low_target): Adjust.
10579 * linux-mips-low.c (the_low_target): Adjust.
10580 * linux-ppc-low.c (the_low_target): Adjust.
10581 * linux-s390-low.c (the_low_target): Adjust.
10582 * linux-sh-low.c (the_low_target): Adjust.
10583 * linux-sparc-low.c (the_low_target): Adjust.
10584 * linux-tic6x-low.c (the_low_target): Adjust.
10585 * linux-x86-low.c (the_low_target): Adjust.
10586 * linux-xtensa-low.c (the_low_target): Adjust.
10587
10588 2012-03-26 Pedro Alves <palves@redhat.com>
10589
10590 * server.c (handle_qxfer_libraries): Don't bail early if
10591 the_target->qxfer_libraries_svr4 is not NULL.
10592
10593 2012-03-26 Pedro Alves <palves@redhat.com>
10594
10595 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10596
10597 2012-03-23 Pedro Alves <palves@redhat.com>
10598
10599 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10600 "library-list-svr4" element's start tag when the the DSO list is
10601 empty.
10602
10603 2012-03-23 Pedro Alves <palves@redhat.com>
10604
10605 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10606 a variable whose type size is the same as the inferior's pointer
10607 size.
10608
10609 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10610
10611 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10612 struct siginfo.
10613 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10614 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10615 * linux-low.h: Include <signal.h>.
10616 (struct siginfo): Remove forward declaration.
10617 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10618 struct siginfo.
10619
10620 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10621
10622 * .gitignore: Ignore more files.
10623
10624 2012-03-19 Pedro Alves <palves@redhat.com>
10625 Jan Kratochvil <jan.kratochvil@redhat.com>
10626
10627 * server.c (cont_thread, general_thread): Add describing comments.
10628 (start_inferior): Clear `cont_thread'.
10629 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10630 of a process.
10631
10632 2012-03-15 Yao Qi <yao@codesourcery.com>
10633
10634 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10635 handling to ...
10636 (cmd_qtdp): ... here.
10637
10638 2012-03-15 Yao Qi <yao@codesourcery.com>
10639
10640 * tracepoint.c (struct tracepoint_action_ops): New.
10641 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10642 (m_tracepoint_action_download): New.
10643 (r_tracepoint_action_download): New.
10644 (x_tracepoint_action_download): New.
10645 (l_tracepoint_action_download): New.
10646 (add_tracepoint_action): Install `action->ops' according type.
10647 (download_tracepoint_1): Move code `download' function pointer
10648 of various tracepoint_action_ops.
10649
10650 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10651
10652 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10653 linux_ptrace_attach_warnings.
10654
10655 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10656
10657 * Makefile.in (linux-ptrace.o): New.
10658 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10659 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10660 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10661 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10662 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10663 of these targets.
10664 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10665
10666 2012-03-08 Yao Qi <yao@codesourcery.com>
10667 Pedro Alves <palves@redhat.com>
10668
10669 Fix PR server/13392.
10670 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10671 offset of JMP insn.
10672 * tracepoint.c (remove_tracepoint): New.
10673 (cmd_qtdp): Call remove_tracepoint when failed to install.
10674
10675 2012-03-07 Pedro Alves <palves@redhat.com>
10676
10677 * linux-low.c (get_detach_signal): New.
10678 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10679 Pass on pending signals to PTRACE_DETACH. Check the result of the
10680 ptrace call.
10681 * server.c (program_signals, program_signals_p): New.
10682 (handle_general_set): Handle QProgramSignals.
10683 * server.h (program_signals, program_signals_p): Declare.
10684
10685 2012-03-05 Pedro Alves <palves@redhat.com>
10686 Jan Kratochvil <jan.kratochvil@redhat.com>
10687
10688 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10689 New comment why.
10690
10691 2012-03-03 Yao Qi <yao@codesourcery.com>
10692
10693 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10694 agent_look_up_symbols.
10695
10696 2012-03-03 Yao Qi <yao@codesourcery.com>
10697
10698 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10699 (linux-x86-low.o): Likewise.
10700 * server.h: Remove in_process_agent_loaded.
10701 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10702 common/agent.c.
10703 Update callers.
10704
10705 2012-03-03 Yao Qi <yao@codesourcery.com>
10706
10707 * tracepoint.c (gdb_agent_capability): New global.
10708 (in_process_agent_loaded_ust): Renamed to
10709 `in_process_agent_supports_ust'.
10710 Update callers.
10711 (in_process_agent_supports_ust): Call agent_capability_check.
10712 (clear_installed_tracepoints): Assert that agent supports
10713 agent.
10714
10715 2012-03-03 Yao Qi <yao@codesourcery.com>
10716
10717 * linux-low.c (linux_supports_agent): New.
10718 (linux_target_ops): Initialize field `supports_agent' with
10719 linux_supports_agent.
10720 * target.h (struct target_ops) <supports_agent>: New.
10721 (target_supports_agent): New macro.
10722 * server.c (handle_general_set): Handle packet 'QAgent'.
10723 (handle_query): Send `QAgent+'.
10724 * Makefile.in (server.o): Depends on agent.h.
10725
10726 2012-03-03 Yao Qi <yao@codesourcery.com>
10727
10728 * Makefile.in (OBS): Add agent.o.
10729 Add new rule for agent.o.
10730 Track dependence of tracepoint.c on agent.h.
10731 * tracepoint.c (run_inferior_command_1):
10732 (run_inferior_command): Call agent_run_command.
10733 (gdb_ust_connect_sync_socket): Deleted. Move it to
10734 common/agent.c.
10735 (resume_thread, stop_thread): Likewise.
10736 (gdb_ust_socket_init): Renamed to ...
10737 (gdb_agent_socket_init): ... New.
10738 (gdb_ust_thread): Renamed to ...
10739 (gdb_agent_helper_thread): ... New.
10740 (gdb_ust_init): Move some code to ...
10741 (gdb_agent_init): ... here. New.
10742 [HAVE_UST]: Call gdb_ust_init.
10743 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10744 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10745 * config.in, configure: Regenerated.
10746
10747 2012-03-02 Pedro Alves <palves@redhat.com>
10748
10749 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10750 * linux-low.c (struct simple_pid_list): New.
10751 (stopped_pids): New a struct simple_pid_list pointer.
10752 (add_to_pid_list, pull_pid_from_list): New.
10753 (handle_extended_wait): Don't assume the first signal new children
10754 report is SIGSTOP. Adjust call to pull_pid_from_list.
10755 (linux_wait_for_lwp): Adjust.
10756
10757 2012-03-02 Yao Qi <yao@codesourcery.com>
10758
10759 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10760 debug log.
10761
10762 2012-03-02 Yao Qi <yao@codesourcery.com>
10763
10764 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10765 `stop_pc' and `tpoint'. Update caller.
10766
10767 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10768
10769 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10770 * linux-low.c (use_linux_regsets): New macro.
10771 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10772 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10773 (linux_register_in_regsets): New function.
10774 (usr_fetch_inferior_registers): Skip registers covered by
10775 regsets.
10776 (usr_store_inferior_registers): Likewise.
10777 (usr_fetch_inferior_registers): New macro.
10778 (usr_store_inferior_registers): Likewise.
10779 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10780 (linux_store_registers): Likewise.
10781 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10782 prototype.
10783 (init_registers_mips64_dsp_linux): Likewise.
10784 (init_registers_mips_linux): New macro.
10785 (init_registers_mips_dsp_linux): Likewise.
10786 (mips_dsp_num_regs): Likewise.
10787 (DSP_BASE, DSP_CONTROL): New fallback macros.
10788 (mips_base_regs): New macro.
10789 (mips_regmap): Use it. Fix the size.
10790 (mips_dsp_regmap): New variable.
10791 (mips_dsp_regset_bitmap): Likewise.
10792 (mips_arch_setup): New function.
10793 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10794 than mips_regmap.
10795 (mips_cannot_store_register): Likewise.
10796 (the_low_target): Update .arch_setup, .num_regs and .regmap
10797 initializers. Add .regset_bitmap initializer.
10798 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10799 initializer.
10800 * linux-bfin-low.c (the_low_target): Likewise.
10801 * linux-cris-low.c (the_low_target): Likewise.
10802 * linux-crisv32-low.c (the_low_target): Likewise.
10803 * linux-ia64-low.c (the_low_target): Likewise.
10804 * linux-m32r-low.c (the_low_target): Likewise.
10805 * linux-m68k-low.c (the_low_target): Likewise.
10806 * linux-ppc-low.c (the_low_target): Likewise.
10807 * linux-s390-low.c (the_low_target): Likewise.
10808 * linux-sh-low.c (the_low_target): Likewise.
10809 * linux-sparc-low.c (the_low_target): Likewise.
10810 * linux-tic6x-low.c (the_low_target): Likewise.
10811 * linux-x86-low.c (the_low_target): Likewise.
10812 * linux-xtensa-low.c (the_low_target): Likewise.
10813 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10814 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10815 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10816 srv_xmlfiles.
10817 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10818 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10819
10820 2012-02-29 Yao Qi <yao@codesourcery.com>
10821 Pedro Alves <palves@redhat.com>
10822
10823 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10824 `step_over_finished' is true.
10825
10826 2012-02-27 Pedro Alves <palves@redhat.com>
10827
10828 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10829 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10830
10831 2012-02-27 Pedro Alves <palves@redhat.com>
10832
10833 PR server/9684
10834 * linux-low.c (pid_is_stopped): New.
10835 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10836
10837 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10838
10839 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10840 of conditions.
10841
10842 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10843
10844 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10845
10846 2012-02-24 Luis Machado <lgustavo@codesourcery>
10847
10848 * server.c (handle_query): Advertise support for target-side
10849 breakpoint condition evaluation.
10850 (process_point_options): New function.
10851 (process_serial_event): When inserting a breakpoint, check for
10852 a target-side condition that should be evaluated.
10853
10854 * mem-break.c: Include regcache.h and ax.h.
10855 (point_cond_list_t): New data structure.
10856 (breakpoint) <cond_list>: New field.
10857 (find_gdb_breakpoint_at): Make non-static.
10858 (delete_gdb_breakpoint_at): Clear any target-side
10859 conditions.
10860 (clear_gdb_breakpoint_conditions): New function.
10861 (add_condition_to_breakpoint): Likewise.
10862 (add_breakpoint_condition): Likewise.
10863 (gdb_condition_true_at_breakpoint): Likewise.
10864 (gdb_breakpoint_here): Return result directly instead
10865 of going through a local variable.
10866
10867 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10868 (clear_gdb_breakpoint_conditions): Likewise.
10869 (add_breakpoint_condition): Likewise.
10870 (gdb_condition_true_at_breakpoint): Likewise.
10871
10872 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10873 (need_step_over_p): Take target-side breakpoint condition into
10874 consideration.
10875
10876 2012-02-24 Luis Machado <lgustavo@codesourcery>
10877
10878 * server.h: Include tracepoint.h.
10879 (agent_mem_read, agent_get_trace_state_variable_value,
10880 agent_set_trace_state_variable_value,
10881 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10882 get_set_tsv_func_addr): New prototypes.
10883
10884 * ax.h: New include file.
10885 * ax.c: New source file.
10886
10887 * tracepoint.c: Include ax.h.
10888 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10889 agent_expr, eval_result_type): Move to ax.h.
10890 (parse_agent_expr): Rename to ...
10891 (gdb_parse_agent_expr): ... this, make it non-static and move
10892 to ax.h.
10893 (unparse_agent_expr) Rename to ...
10894 (gdb_unparse_agent_expr): ... this, make it non-static and move
10895 to ax.h.
10896 (eval_agent_expr): Rename to ...
10897 (eval_tracepoint_agent_expr): ... this.
10898 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10899 forward declarations.
10900 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10901 (agent_get_trace_state_variable_value): New function.
10902 (agent_set_trace_state_variable_value): New function.
10903 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10904 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10905 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10906 (condition_true_at_tracepoint): Likewise.
10907 (parse_agent_expr): Rename to ...
10908 (gdb_parse_agent_expr): ... this and move to ax.c.
10909 (unparse_agent_expr): Rename to ...
10910 (gdb_unparse_agent_expr): ... this and move to ax.c.
10911 (gdb_agent_op_name): Move to ax.c.
10912 (eval_agent_expr): Rename to ...
10913 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10914 and move to ax.c.
10915 (eval_tracepoint_agent_expr): New function.
10916 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10917 non-static.
10918 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10919 ax.c.
10920 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10921 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10922 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10923 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10924 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10925 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10926 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10927 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10928 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10929 (compile_bytecodes): Remove forward declaration.
10930 (is_goto_target): Move to ax.c.
10931 (compile_bytecodes): Move to ax.c and call
10932 agent_get_trace_state_variable_value (...) and
10933 agent_set_trace_state_variable_value (...).
10934
10935 * Makefile.in: Update ax.c and IPA dependencies.
10936
10937 2012-02-24 Pedro Alves <palves@redhat.com>
10938
10939 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10940 (cmd_bigqtbuffer_circular): ... this. Only handle
10941 'QTBuffer:circular:'.
10942 (handle_tracepoint_general_set): Adjust.
10943
10944 2012-02-16 Yao Qi <yao@codesourcery.com>
10945
10946 * inferiors.c: Move code to ...
10947 * dll.c: .... here. New.
10948 * server.h: Declare clear_dlls.
10949 * Makefile.in (SFILES): Add dll.c.
10950 (OBS): Add dll.o
10951 (dll.o): New rule.
10952
10953 2012-02-11 Yao Qi <yao@codesourcery.com>
10954
10955 * server.c: (handle_monitor_command): Add a new parameter
10956 `own_buf'.
10957 (handle_query): Update caller.
10958
10959 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10960
10961 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10962 * configure, config.in: Regenerate.
10963 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10964 is not defined.
10965
10966 2012-02-02 Pedro Alves <palves@redhat.com>
10967
10968 Try SIGKILL first, then PTRACE_KILL.
10969 * linux-low.c (linux_kill_one_lwp): New.
10970 (linux_kill_one_lwp): Rename to ...
10971 (kill_one_lwp_callback): ... this. Use the new
10972 linux_kill_one_lwp.
10973
10974 2012-02-02 Pedro Alves <palves@redhat.com>
10975
10976 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10977 inferior.
10978
10979 2012-01-27 Pedro Alves <palves@redhat.com>
10980
10981 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10982 (elf_64_file_p): Make static.
10983 (linux_pid_exe_is_elf_64_file): New.
10984 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10985 Delete declarations.
10986 (linux_pid_exe_is_elf_64_file): Declare.
10987 * linux-x86-low.c (x86_arch_setup): Use
10988 linux_pid_exe_is_elf_64_file.
10989
10990 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10991
10992 * linux-low.c (linux_wait_for_event_1): Rename to ...
10993 (linux_wait_for_event): ... here and merge it with former
10994 linux_wait_for_event - new variable wait_ptid, use it.
10995 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10996
10997 2012-01-23 Pedro Alves <palves@redhat.com>
10998
10999 * server.c (main): Avoid yet another case of infinite loop while
11000 detaching/killing after a longjmp.
11001
11002 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11003
11004 Code cleanup.
11005 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11006
11007 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11008
11009 * hostio.c (handle_readlink): New function.
11010 (handle_vFile): Call it to handle "vFile:readlink" packets.
11011
11012 2012-01-20 Pedro Alves <palves@redhat.com>
11013 Ulrich Weigand <ulrich.weigand@linaro.org>
11014
11015 * server.c (handle_v_requests): Only support vAttach and vRun to
11016 start multiple processes when in extended protocol mode.
11017
11018 2012-01-17 Pedro Alves <palves@redhat.com>
11019
11020 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11021 memalign plus mprotect to allocate the scratch buffer.
11022
11023 2012-01-13 Pedro Alves <palves@redhat.com>
11024
11025 * server.c (attach_inferior): Clear `cont_thread'.
11026
11027 2012-01-13 Pedro Alves <palves@redhat.com>
11028
11029 * server.c (main): Avoid infinite loop while detaching/killing
11030 after a longjmp.
11031
11032 2012-01-09 Doug Evans <dje@google.com>
11033
11034 * server.c (start_inferior): Set last_ptid in --wrapper case.
11035
11036 2012-01-06 Yao Qi <yao@codesourcery.com>
11037
11038 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11039 defined.
11040 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11041
11042 2012-01-04 Yao Qi <yao@codesourcery.com>
11043
11044 * tracepoint.c (cmd_qtdp): Print debug message
11045 for static tracepoint.
11046
11047 2012-01-04 Yao Qi <yao@codesourcery.com>
11048
11049 * tracepoint.c (trace_vdebug): Differentiate debug message
11050 between gdbserver and IPA.
11051
11052 2012-01-03 Yao Qi <yao@codesourcery.com>
11053
11054 * tracepoint.c (tracepoint_was_hit): Don't collect for
11055 static tracepoint.
11056
11057 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11058
11059 * terminal.h: Reformat copyright header.
11060
11061 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11062
11063 * server.c (gdbserver_version): Update copyright year.
11064 * gdbreplay.c (gdbreplay_version): Likewise.
11065
11066 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11067
11068 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11069
11070 Revert:
11071 2011-12-18 Hui Zhu <teawater@gmail.com>
11072 * linux-low.c (linux_create_inferior): Save return value to ret.
11073
11074 2011-12-18 Hui Zhu <teawater@gmail.com>
11075
11076 * linux-low.c (linux_create_inferior): Save return value to ret.
11077
11078 2011-12-16 Doug Evans <dje@google.com>
11079
11080 * linux-low.c (linux_create_inferior): If stdio connection,
11081 redirect stdin from /dev/null, stdout to stderr.
11082 * remote-utils.c (remote_is_stdio): New static global.
11083 (remote_connection_is_stdio): New function.
11084 (remote_prepare): Handle stdio connection.
11085 (remote_open): Ditto.
11086 (remote_close): Don't close stdin for stdio connections.
11087 (read_prim,write_prim): New functions. Replace all calls to
11088 read/write to these.
11089 * server.c (main): Watch for "-" argument. Move call to
11090 remote_prepare before start_inferior.
11091 * server.h (STDIO_CONNECTION_NAME): New macro.
11092 (remote_connection_is_stdio): Declare.
11093
11094 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11095 in debugging output.
11096
11097 2011-12-15 Yao Qi <yao@codesourcery.com>
11098
11099 * tracepoint.c: Include sys/syscall.h.
11100 (gdb_ust_thread): Remove preprocessor conditional.
11101
11102 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11103
11104 * linux-low.c (linux_detach_one_lwp): Call
11105 the_low_target.prepare_to_resume before detaching.
11106
11107 2011-12-14 Yao Qi <yao@codesourcery.com>
11108
11109 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11110 of write.
11111
11112 2011-12-14 Yao Qi <yao@codesourcery.com>
11113
11114 * i386-low.c (i386_low_stopped_data_address): Initialize local
11115 variable `control'.
11116
11117 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11118
11119 PR remote/13492
11120
11121 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11122 DR_CONTROL unless necessary. Extend comments.
11123 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11124 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11125
11126 2011-12-13 Yao Qi <yao@codesourcery.com>
11127
11128 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11129 macros.
11130 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11131
11132 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11133
11134 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11135 Print new debug message for such case.
11136
11137 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11138
11139 Fix overlapping memcpy.
11140 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11141 the read_inferior_memory transfer.
11142 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11143 write_inferior_memory transfer.
11144 (set_fast_tracepoint_jump): New variable buf. Use it for the
11145 read_inferior_memory and write_inferior_memory transfers.
11146 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11147 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11148 Use it for the write_inferior_memory transfer.
11149 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11150 buffers.
11151
11152 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11153
11154 * linux-low.c (fetch_register, store_register): Make code
11155 consistent, fix formatting.
11156
11157 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11158
11159 * linux-low.c (usr_store_inferior_registers): Factor out code
11160 to handle individual registers into...
11161 (store_register): ... this new function.
11162
11163 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11164
11165 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11166 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11167 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11168 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11169 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11170 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11171 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11172 (srv_xmlfiles): Add new XML files.
11173
11174 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11175 and <sys/uio.h>.
11176 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11177 (init_registers_s390_linux32v1): Add prototype.
11178 (init_registers_s390_linux32v2): Likewise.
11179 (init_registers_s390_linux64v1): Likewise.
11180 (init_registers_s390_linux64v2): Likewise.
11181 (init_registers_s390x_linux64v1): Likewise.
11182 (init_registers_s390x_linux64v2): Likewise.
11183 (s390_num_regs): Increment to 52.
11184 (s390_regmap): Add orig_r2 register.
11185 (s390_num_regs_3264): Increment to 68.
11186 (s390_regmap_3264): Add orig_r2 register.
11187 (s390_collect_ptrace_register): Handle orig_r2 register.
11188 (s390_supply_ptrace_register): Likewise.
11189 (s390_fill_last_break): New function.
11190 (s390_store_last_break): Likewise.
11191 (s390_fill_system_call): New function.
11192 (s390_store_system_call): Likewise.
11193 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11194 register sets.
11195 (s390_check_regset): New function.
11196 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11197 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11198 Update target_regsets for available register sets.
11199
11200 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11201 Jan Kratochvil <jan.kratochvil@redhat.com>
11202
11203 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11204 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11205 New.
11206 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11207 * linux-low.h (struct process_info_private): New member r_debug.
11208 * server.c (handle_qxfer_libraries): Call
11209 the_target->qxfer_libraries_svr4.
11210 (handle_qxfer_libraries_svr4): New function.
11211 (qxfer_packets): New entry "libraries-svr4".
11212 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11213 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11214 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11215 PACKET_qXfer_libraries_svr4.
11216
11217 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11218
11219 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11220 PSW address/mask between 8-byte and 16-byte formats.
11221 (s390_supply_ptrace_register): Likewise.
11222 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11223 basic addressing mode bit.
11224
11225 2011-11-24 Stan Shebs <stan@codesourcery.com>
11226
11227 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11228
11229 2011-11-17 Stan Shebs <stan@codesourcery.com>
11230
11231 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11232 (tracing_start_time): New global.
11233 (tracing_stop_time): New global.
11234 (tracing_user_name): New global.
11235 (tracing_notes): New global.
11236 (tracing_stop_note): New global.
11237 (cmd_qtstart): Set traceframe_usage, start_time.
11238 (stop_tracing): Set stop_time.
11239 (cmd_qtstatus): Report additional status.
11240 (cmd_qtp): New function.
11241 (handle_tracepoint_query): Call it.
11242 (cmd_qtnotes): New function.
11243 (handle_tracepoint_general_set): Call it.
11244 (get_timestamp): Rename from tsv_get_timestamp.
11245
11246 2011-11-14 Stan Shebs <stan@codesourcery.com>
11247 Kwok Cheung Yeung <kcy@codesourcery.com>
11248
11249 * linux-x86-low.c (small_jump_insn): New.
11250 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11251 trampoline and error message, build a trampoline and issue a small
11252 jump instruction to it.
11253 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11254 trampoline and error message.
11255 (x86_get_min_fast_tracepoint_insn_len): New.
11256 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11257 * linux-low.h (struct linux_target_ops): Add arguments to
11258 install_fast_tracepoint_jump_pad operation, add new operation.
11259 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11260 arguments.
11261 (linux_get_min_fast_tracepoint_insn_len): New function.
11262 (linux_target_op): Add new operation.
11263 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11264 (gdb_trampoline_buffer_end): Ditto.
11265 (gdb_trampoline_buffer_error): Ditto.
11266 (struct ipa_sym_addresses): Add fields for new IPA variables.
11267 (symbol_list): Add entries for new IPA variables.
11268 (struct tracepoint): Add fields to hold the address range of the
11269 trampoline used by the tracepoint.
11270 (trampoline_buffer_head): New static variable.
11271 (trampoline_buffer_tail): Ditto.
11272 (claim_trampoline_space): New function.
11273 (have_fast_tracepoint_trampoline_buffer): New function.
11274 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11275 structure.
11276 (install_fast_tracepoint): Ditto, also add error buffer argument.
11277 (cmd_qtminftpilen): New function.
11278 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11279 (fast_tracepoint_from_trampoline_address): New function.
11280 (fast_tracepoint_collecting): Handle trampoline as part of jump
11281 pad space.
11282 (set_trampoline_buffer_space): New function.
11283 (initialize_tracepoint): Initialize new IPA variables.
11284 * target.h (struct target_ops): Add arguments to
11285 install_fast_tracepoint_jump_pad operation, add new
11286 get_min_fast_tracepoint_insn_len operation.
11287 (target_get_min_fast_tracepoint_insn_len): New.
11288 (install_fast_tracepoint_jump_pad): Add arguments.
11289 * server.h (IPA_BUFSIZ): Define.
11290 * linux-i386-ipa.c: Include extra header files.
11291 (initialize_fast_tracepoint_trampoline_buffer): New function.
11292 (initialize_low_tracepoint): Call it.
11293 * server.h (set_trampoline_buffer_space): Declare.
11294 (claim_trampoline_space): Ditto.
11295 (have_fast_tracepoint_trampoline_buffer): Ditto.
11296
11297 2011-11-14 Yao Qi <yao@codesourcery.com>
11298
11299 * server.c (handle_query): Handle InstallInTrace for qSupported.
11300 * tracepoint.c (add_tracepoint): Sort list.
11301 (install_tracepoint, download_tracepoint): New.
11302 (cmd_qtdp): Call them to install and download tracepoints.
11303 (sort_tracepoints): Removed.
11304 (cmd_qtstart): Update.
11305
11306 2011-11-14 Yao Qi <yao@codesourcery.com>
11307
11308 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11309 * mem-break.h: Declare.
11310 * tracepoint.c (cmd_qtstart): Move some code to ...
11311 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11312 New.
11313 (download_tracepoints): Move some code to ...
11314 (download_tracepoint_1): ... here. New.
11315
11316 2011-11-08 Yao Qi <yao@codesourcery.com>
11317
11318 * remote-utils.c (relocate_instruction): A comment fix.
11319
11320 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11321
11322 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11323 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11324 dr_status_mirror and dr_control_mirror from debug_reg_state.
11325 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11326 (i386_initial_stuff): Remove use of deleted globals.
11327 (i386_get_thread_context, i386_set_thread_context,
11328 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11329 from debug_reg_state.
11330
11331 2011-11-05 Yao Qi <yao@codesourcery.com>
11332
11333 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11334 address as TPOINT's.
11335
11336 2011-11-02 Stan Shebs <stan@codesourcery.com>
11337
11338 * tracepoint.c (agent_mem_read_string): New function.
11339 (eval_agent_expr): Call it for tracenz.
11340 * server.c (handle_query): Report support for tracenz.
11341
11342 2011-11-02 Yao Qi <yao@codesourcery.com>
11343
11344 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11345
11346 2011-11-02 Yao Qi <yao@codesourcery.com>
11347
11348 * target.h: Fix a typo in comment.
11349
11350 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11351
11352 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11353 clobber the breakpoints' shadows with fast tracepoint jumps.
11354 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11355 * target.c (write_inferior_memory): Also pass MYADDR down to
11356 check_mem_write.
11357
11358 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11359
11360 * configure.ac: Check support for personality routine.
11361 * configure: Regenerate.
11362 * config.in: Likewise.
11363 * linux-low.c: Include <sys/personality.h>.
11364 Define ADDR_NO_RANDOMIZE if necessary.
11365 (linux_create_inferior): Disable address space randomization when
11366 forking inferior, if requested.
11367 (linux_supports_disable_randomization): New function.
11368 (linux_target_ops): Install it.
11369 * server.h (disable_randomization): Declare.
11370 * server.c (disable_randomization): New global variable.
11371 (handle_general_set): Handle QDisableRandomization.
11372 (handle_query): Likewise for qSupported.
11373 (main): Support --disable-randomization and --no-disable-randomization
11374 command line arguments.
11375 * target.h (struct target_ops): Add supports_disable_randomization.
11376 (target_supports_disable_randomization): New macro.
11377
11378 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11379
11380 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11381 ifdef check.
11382 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11383 [!PT_GETDSBT] (target_loadmap): New definition.
11384 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11385 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11386 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11387 and PT_GETDSBT to LINUX_LOADMAP.
11388 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11389 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11390
11391 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11392
11393 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11394 (arm_linux_hwbp_cap): New static variable.
11395 (arm_linux_get_hwbp_cap): Replace by ...
11396 (arm_linux_init_hwbp_cap): ... this new function.
11397 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11398 (arm_linux_get_hw_watchpoint_count): Likewise.
11399 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11400 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11401 (arm_prepare_to_resume): Use perror_with_name instead of error.
11402
11403 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11404
11405 * linux-arm-low.c: Include <signal.h>.
11406 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11407 (struct arm_linux_hwbp_cap): New data type.
11408 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11409 (struct arm_linux_hw_breakpoint): New data type.
11410 (MAX_BPTS, MAX_WPTS): Define.
11411 (struct arch_process_info, struct arch_lwp_info): New data types.
11412 (arm_linux_get_hwbp_cap): New function.
11413 (arm_linux_get_hw_breakpoint_count): Likewise.
11414 (arm_linux_get_hw_watchpoint_count): Likewise.
11415 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11416 (arm_hwbp_control_initialize): Likewise.
11417 (arm_hwbp_control_is_enabled): Likewise.
11418 (arm_hwbp_control_is_initialized): Likewise.
11419 (arm_hwbp_control_disable): Likewise.
11420 (arm_linux_hw_breakpoint_equal): Likewise.
11421 (arm_linux_hw_point_initialize): Likewise.
11422 (struct update_registers_data): New data structure.
11423 (update_registers_callback: New function.
11424 (arm_insert_point): Likewise.
11425 (arm_remove_point): Likewise.
11426 (arm_stopped_by_watchpoint): Likewise.
11427 (arm_stopped_data_address): Likewise.
11428 (arm_new_process): Likewise.
11429 (arm_new_thread): Likewise.
11430 (arm_prepare_to_resume): Likewise.
11431 (the_low_target): Register arm_insert_point, arm_remove_point,
11432 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11433 arm_new_thread, and arm_prepare_to_resume.
11434
11435 2011-09-15 Stan Shebs <stan@codesourcery.com>
11436
11437 * server.h (struct emit_ops): Add compare-goto fields.
11438 * tracepoint.c (gdb_agent_op_sizes): New table.
11439 (emit_eq_goto): New function.
11440 (emit_ne_goto): New function.
11441 (emit_lt_goto): New function.
11442 (emit_le_goto): New function.
11443 (emit_gt_goto): New function.
11444 (emit_ge_goto): New function.
11445 (is_goto_target): New function.
11446 (compile_bytecodes): Recognize special cases of compare-goto
11447 combinations and call specialized emitters for them.
11448 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11449 (amd64_emit_ne_goto): New function.
11450 (amd64_emit_lt_goto): New function.
11451 (amd64_emit_le_goto): New function.
11452 (amd64_emit_gt_goto): New function.
11453 (amd64_emit_ge_goto): New function.
11454 (amd64_emit_ops): Add the new functions.
11455 (i386_emit_eq_goto): New function.
11456 (i386_emit_ne_goto): New function.
11457 (i386_emit_lt_goto): New function.
11458 (i386_emit_le_goto): New function.
11459 (i386_emit_gt_goto): New function.
11460 (i386_emit_ge_goto): New function.
11461 (i386_emit_ops): Add the new functions.
11462
11463 2011-09-08 Stan Shebs <stan@codesourcery.com>
11464
11465 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11466 (i386_emit_epilogue): Restore %ebx.
11467
11468 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11469
11470 * server.c (step_thread): Remove definition.
11471 (process_serial_event): Don't handle Hs.
11472 * server.h (step_thread): Remove declaration.
11473 * target.c (set_desired_inferior): Remove use of step_thread.
11474
11475 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11476
11477 * linux-low.c: Include linux-procfs.h.
11478 (linux_attach_lwp_1): Update comments.
11479 (linux_attach): Scan for existing threads when attaching to a
11480 process that is the tgid.
11481 * Makefile.in: Update dependencies.
11482
11483 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11484
11485 * configure.srv: Add linux-procfs.o dependencies.
11486
11487 2011-08-14 Yao Qi <yao@codesourcery.com>
11488
11489 * target.h (struct target_ops): Fix indent.
11490 * win32-low.c (win32_target_ops): Fix comment.
11491
11492 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11493 Yao Qi <yao@codesourcery.com>
11494
11495 * Makefile.in (clean): Remove tic6x-*.c files.
11496 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11497 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11498 (tic6x-c64xp-linux.c): Likewise.
11499 * configure.srv: Add support for tic6x-*-uclinux.
11500 * linux-tic6x-low.c: New.
11501 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11502
11503 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11504 Yao Qi <yao@codesourcery.com>
11505
11506 * target.h (struct target_ops): Add read_loadmap.
11507 * linux-low.c (struct target_loadseg): New type.
11508 (struct target_loadmap): New type.
11509 (linux_read_loadmap): New function.
11510 (linux_target_ops): Add linux_read_loadmap.
11511 * server.c (handle_query): Support qXfer:fdpic:read packet.
11512 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11513 to NULL.
11514
11515 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11516
11517 * win32-low.c: Include <stdint.h>.
11518
11519 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11520
11521 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11522 to the inferior here.
11523 (i386_remove_aligned_watchpoint): Ditto.
11524 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11525 fit part of the watchpoint in the debug registers.
11526 (i386_update_inferior_debug_regs): New.
11527 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11528 registers, and only update the inferior on success.
11529 (i386_low_remove_watchpoint): Ditto.
11530
11531 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11532
11533 * linux-low.c (compare_ints, unique, list_threads, show_process,
11534 linux_core_of_thread): Delete.
11535 (linux_target_ops): Change linux_core_of_thread to
11536 linux_common_core_of_thread.
11537 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11538 * utils.c (malloc_failure): Change type of argument.
11539 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11540 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11541 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11542 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11543 (IPA_OBJS): Add common-utils-ipa.o.
11544 (ptid_h, linux_osdata_h): New macros.
11545 (server_h): Add common/common-utils.h, common/xml-utils.h,
11546 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11547 common/ptid.h.
11548 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11549 ptid.o, buffer.o): New rules.
11550 (linux-low.o): Add common/linux-osdata.h as a dependency.
11551 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11552 * configure.ac: Add AC_HEADER_DIRENT check.
11553 * config.in: Regenerate.
11554 * configure: Regenerate.
11555 * remote-utils.c (xml_escape_text): Delete.
11556 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11557 buffer_xml_printf): Move to common/buffer.c.
11558 * server.c (main): Remove call to initialize_inferiors.
11559 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11560 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11561 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11562 internal_error, gdb_assert, gdb_assert_fail): Delete.
11563 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11564 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11565 common/buffer.h.
11566 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11567 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11568 initialize_inferiors): Delete.
11569
11570 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11571
11572 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11573 symbol error.
11574
11575 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11576
11577 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11578 assertion.
11579 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11580
11581 2011-05-26 Yao Qi <yao@codesourcery.com>
11582
11583 * Makefile.in (thread-db.o): Track dependence to
11584 common/gdb_thread_db.h.
11585 * thread-db.c: include gdb_thread_db.h from right place.
11586
11587 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11588
11589 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11590 __FILE__ and __LINE__ to internal_error.
11591
11592 2011-05-13 Doug Evans <dje@google.com>
11593
11594 * thread-db.c (try_thread_db_load_from_sdir): New function.
11595 (try_thread_db_load_from_dir): New function.
11596 (thread_db_load_search): Handle $sdir, ignore $pdir.
11597 Remove trying of system directories if search of
11598 libthread-db-search-path fails, that is now done via $sdir.
11599
11600 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11601
11602 * server.c (handle_query): Add EnableDisableTracepoints to the list
11603 of supported features.
11604 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11605 tracepoints.
11606 (cmd_qtenable_disable): New.
11607 (cmd_qtstart): Install tracepoints even if disabled.
11608 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11609 receiving a QTEnable or QTDisable packet.
11610 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11611 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11612 tracepoints.
11613 (gdb_probe): Skip data collection if static tracepoint is disabled.
11614
11615 2011-05-10 Doug Evans <dje@google.com>
11616
11617 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11618
11619 2011-05-04 Doug Evans <dje@google.com>
11620
11621 * linux-low.c (linux_join): Skip process lookup.
11622 * spu-low.c (spu_join): Ditto.
11623 * server.c (join_inferiors_callback): Delete.
11624 (process_serial_event): For 'D' packet (detach) call join_inferior
11625 directly.
11626
11627 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11628
11629 * README: Don't mention xscale*-*-linux*.
11630 * configure.srv (xscale*-*-linux*): Don't handle target.
11631
11632 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11633
11634 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11635 casting pointers.
11636 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11637 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11638 (i386_emit_void_call_2): Likewise.
11639
11640 2011-04-26 Yao Qi <yao@codesourcery.com>
11641
11642 * linux-low.c: Move common macros to linux-ptrace.h.
11643 Include linux-ptrace.h.
11644 * Makefile.in (linux_ptrace_h): New.
11645 (linux-low.o): Depends on linux-ptrace.h.
11646
11647 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11648
11649 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11650 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11651 (remote_prepare): New function with most of the TCP code from ...
11652 (remote_open): ... here. Detect PORT here unconditionally. Move also
11653 setting transport_is_reliable.
11654 * server.c (run_once): New variable.
11655 (gdbserver_usage): Document it.
11656 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11657 the first run if RUN_ONCE.
11658 * server.h (run_once, remote_prepare): New declarations.
11659
11660 2011-04-19 Tom Tromey <tromey@redhat.com>
11661
11662 * win32-low.c (handle_load_dll): Remove duplicate "the".
11663
11664 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11665
11666 Remove support for old Cygwin 1.5 versions.
11667 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11668 function to avoid warning.
11669 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11670 warning.
11671
11672 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11673
11674 * gdbserver/server.h (Macro _): Define it if not available.
11675
11676 2011-03-14 Michael Snyder <msnyder@vmware.com>
11677
11678 * hostio.c (handle_close): Remove unnecessary null test.
11679
11680 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11681
11682 * Makefile.in (maintainer-clean realclean distclean): Remove
11683 "make ... subdir_do" command.
11684
11685 2011-03-10 Michael Snyder <msnyder@vmware.com>
11686
11687 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11688
11689 * server.c (handle_v_run): Free alloced buffer on early return.
11690
11691 2011-03-09 Yao Qi <yao@codesourcery.com>
11692
11693 Revert:
11694 2011-03-04 Yao Qi <yao@codesourcery.com>
11695
11696 * Makefile.in: Remove GNU make feature --directory.
11697
11698 2011-03-05 Yao Qi <yao@codesourcery.com>
11699
11700 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11701 (subdir_do): New make target. Copied from gdb/Makefile.
11702 (maintainer-clean, realclean, distclean, clean): Call corresponding
11703 make targets in common/Makefile.
11704
11705 2011-02-11 Yao Qi <yao@codesourcery.com>
11706
11707 * configure.ac: Call AC_PROG_RANLIB.
11708 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11709 * configure: Regenerate.
11710
11711 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11712
11713 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11714
11715 2011-03-06 Yao Qi <yao@codesourcery.com>
11716
11717 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11718
11719 2011-03-05 Yao Qi <yao@codesourcery.com>
11720
11721 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11722 (subdir_do): New make target. Copied from gdb/Makefile.
11723 (maintainer-clean, realclean, distclean, clean): Call corresponding
11724 make targets in common/Makefile.
11725
11726 2011-03-04 Yao Qi <yao@codesourcery.com>
11727
11728 * Makefile.in: Remove GNU make feature --directory.
11729
11730 2011-03-04 Michael Snyder <msnyder@vmware.com>
11731
11732 * server.c (queue_stop_reply): Call xmalloc not malloc.
11733
11734 2011-03-02 Michael Snyder <msnyder@vmware.com>
11735
11736 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11737
11738 2011-02-28 Michael Snyder <msnyder@vmware.com>
11739
11740 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11741 (cmd_qtframe): Ditto.
11742 (cmd_qtbuffer): Ditto.
11743 (cmd_bigqtbuffer): Ditto.
11744
11745 * utils.c (decimal2str): Initialize 'width' to nine, then
11746 don't mess with it.
11747
11748 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11749
11750 * hostio.c (require_data): Free *data, not data.
11751
11752 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11753
11754 * hostio.c (require_data): Use free, not xfree.
11755
11756 2011-02-27 Michael Snyder <msnyder@vmware.com>
11757
11758 * server.c (handle_query): Discard unused value.
11759
11760 * hostio.c (require_data): Free malloc memory before returning
11761 error.
11762
11763 2011-02-26 Michael Snyder <msnyder@vmware.com>
11764
11765 * linux-low.c (list_threads): Call closedir for dirent.
11766
11767 2011-02-27 Michael Snyder <msnyder@vmware.com>
11768
11769 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11770 a case statement falls through.
11771
11772 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11773
11774 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11775 in comparison.
11776
11777 2011-02-26 Michael Snyder <msnyder@vmware.com>
11778
11779 * utils.c (decimal2str): Eliminate dead code and dead param.
11780 (pulongest): Drop dead param from call to decimal2str.
11781 (plongest): Ditto.
11782
11783 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11784
11785 Revert the following patch (not approved yet):
11786 2011-02-21 Hui Zhu <teawater@gmail.com>
11787 * tracepoint.c (tp_printf): New function.
11788 (eval_agent_expr): Handle gdb_agent_op_printf.
11789
11790 2011-02-21 Hui Zhu <teawater@gmail.com>
11791
11792 * tracepoint.c (tp_printf): New function.
11793 (eval_agent_expr): Handle gdb_agent_op_printf.
11794
11795 2011-02-18 Tom Tromey <tromey@redhat.com>
11796
11797 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11798 (tracepoint.o): Likewise.
11799 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11800 (gdb_agent_op_names): Likewise.
11801
11802 2011-02-18 Tom Tromey <tromey@redhat.com>
11803
11804 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11805 gdb_agent_op_rot>: New constants.
11806 (gdb_agent_op_names): Add pick and roll.
11807 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11808 cases.
11809
11810 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11811
11812 * aclocal.m4: Regenerated with aclocal-1.11.1.
11813
11814 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11815
11816 * server.c (handle_qxfer_traceframe_info): New.
11817 (qxfer_packets): Register "traceframe-info".
11818 (handle_query): Report support for qXfer:traceframe-info:read+.
11819 * tracepoint.c (match_blocktype): New.
11820 (traceframe_find_block_type): Rename to ...
11821 (traceframe_walk_blocks): ... this. Add callback filter argument,
11822 and use it.
11823 (traceframe_find_block_type): New, reimplemented on top of
11824 traceframe_walk_blocks.
11825 (build_traceframe_info_xml): New.
11826 (traceframe_read_info): New.
11827 * server.h (traceframe_read_info): Declare.
11828
11829 2011-02-11 Yao Qi <yao@codesourcery.com>
11830
11831 * configure.ac: Call AC_PROG_RANLIB.
11832 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11833 * configure: Regenerate.
11834
11835 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11836
11837 * server.c (gdb_read_memory): Change return semantics to allow
11838 partial transfers.
11839 (handle_search_memory_1): Adjust.
11840 (process_serial_event) <'m' packet>: Handle partial transfers.
11841 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11842
11843 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11844
11845 * regcache.c (init_register_cache): Initialize
11846 regcache->register_status.
11847 (free_register_cache): Release regcache->register_status.
11848 (regcache_cpy): Copy register_status.
11849 (registers_to_string): Print 'x's for unavailable registers.
11850 (supply_register): Mark the register's status valid or
11851 unavailable, depending on whether a buffer was passed in or not.
11852 (supply_register_zeroed): New.
11853 (supply_regblock): Mark the registers' status valid or
11854 unavailable, depending on whether a buffer was passed in or not.
11855 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11856 (struct regcache): New `register_status' field.
11857 (supply_register_zeroed): Declare.
11858 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11859 supply_register_zeroed, rather than passing a NULL buffer to
11860 supply_register.
11861 * tracepoint.c (fetch_traceframe_registers): Update comment.
11862
11863 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11864
11865 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11866 buffer explicit.
11867
11868 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11869
11870 * server.h (decode_xfer_write): Change prototype.
11871 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11872 and don't extract the annex here.
11873 * server.c (decode_xfer_read): Remove `annex' parameter,
11874 and don't extract the annex here.
11875 (decode_xfer): New.
11876 (struct qxfer): New.
11877 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11878 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11879 (handle_qxfer_statictrace): New functions, abstracted out from
11880 handle_query, and made to use the struct qxfer interface.
11881 (handle_threads_qxfer_proper): Rename to ...
11882 (handle_qxfer_threads_proper): ... this.
11883 (handle_threads_qxfer): Rename to ...
11884 (handle_qxfer_threads): ... this. Adjust.
11885 (qxfer_packets): New array.
11886 (handle_qxfer): New function.
11887 (handle_query): Use handle_qxfer.
11888
11889 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11890
11891 * gdbreplay.c: Shorten lines of >= 80 columns.
11892 * linux-low.c: Ditto.
11893 * linux-ppc-low.c: Ditto.
11894 * linux-s390-low.c: Ditto.
11895 * linux-sparc-low.c: Ditto.
11896 * linux-x86-low.c: Ditto.
11897 * linux-xtensa-low.c: Ditto.
11898 * mem-break.c: Ditto.
11899 * nto-low.c: Ditto.
11900 * regcache.h: Ditto.
11901 * remote-utils.c: Ditto.
11902 * server.c: Ditto.
11903 * server.h: Ditto.
11904 * thread-db.c: Ditto.
11905 * tracepoint.c: Ditto.
11906 * utils.c: Ditto.
11907 * win32-low.h: Ditto.
11908
11909 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11910
11911 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11912 update.
11913
11914 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11915
11916 * server.c (gdbserver_version): Update copyright year in version
11917 output.
11918 * gdbreplay.c (gdbreplay_version): Ditto.
11919
11920 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11921
11922 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11923 * linux-bfin-low.c: New file.
11924 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11925 PT_DATA_ADDR for BFIN targets.
11926 * Makefile.in (SFILES): Add linux-bfin-low.c.
11927 (clean): Remove reg-bfin.c.
11928 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11929 * README: Mention supported Blackfin targets.
11930
11931 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11932
11933 * .gitignore: New file.
11934
11935 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11936
11937 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11938
11939 2010-10-22 Jie Zhang <jie@codesourcery.com>
11940
11941 * Makefile.in: Add FLAGS_TO_PASS variable.
11942 (install): Remove dependency of install-only and recursively
11943 invoke make for install-only.
11944
11945 2010-10-04 Doug Evans <dje@google.com>
11946
11947 * Makefile.in (uninstall): Use $(DESTDIR).
11948
11949 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11950
11951 PR gdb/11842
11952
11953 * linux-x86-low.c (compat_siginfo_from_siginfo)
11954 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11955 si_code is < 0. Check for si_code == SI_TIMER before checking for
11956 si_code < 0.
11957
11958 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11959
11960 * lynx-i386-low.c: New file.
11961 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11962
11963 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11964
11965 * lynx-low.c (ptrace_request_to_str): Remove handling for
11966 request values that have been removed in LynxOS 5.x.
11967
11968 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11969
11970 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11971 <ptrace.h>
11972
11973 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11974
11975 * configure.ac: Add --enable-inprocess-agent option.
11976 * configure: Rebuilt.
11977
11978 2010-09-06 Yao Qi <yao@codesourcery.com>
11979
11980 * linux-low.c (linux_kill): Remove unused variable.
11981 (linux_stabilize_threads): Likewise.
11982 * server.c (start_inferior): Likewise.
11983 (queue_stop_reply_callback): Likewise.
11984 * tracepoint.c (do_action_at_tracepoint): Likewise.
11985
11986 2010-09-06 Yao Qi <yao@codesourcery.com>
11987
11988 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11989 on return.
11990
11991 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11992
11993 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11994
11995 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11996
11997 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11998 "$(IPA_DEPFILES)".
11999
12000 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12001
12002 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12003 gdbserver/lynx-ppc-low.c: New files.
12004 * Makefile.in (lynx_low_h): New variable.
12005 (lynx-low.o, lynx-ppc-low.o): New rules.
12006 * configure.ac: On LynxOS, link with -lnetinet.
12007 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12008 * configure: regenerate.
12009
12010 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12011
12012 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12013 * configure.ac: Add check for vasprintf and vsnprintf.
12014 * configure, config.in: Regenerate.
12015 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12016
12017 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12018
12019 * gdbreplay.c: Move include of alloca.h up, next to include of
12020 malloc.h.
12021 * server.h: Add include of malloc.h.
12022 * mem-break.c: Remove include of malloc.h.
12023 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12024
12025 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12026
12027 * Makefile.in (memmem.o): Build with -Wno-error.
12028
12029 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12030
12031 * utils.c (xsnprintf): Make non-static.
12032 * server.h: Add xsnprintf declaration.
12033 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12034 replace calls to snprintf by calls to xsnprintf throughout.
12035
12036 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12037
12038 * configure.ac: Add configure check for alloca.
12039 * configure, config.in: Regenerate.
12040 * server.h: Include alloca.h if it exists.
12041 * gdbreplay.c: Include alloca.h if it exists.
12042
12043 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12044
12045 * linux-low.c (__SIGRTMIN): Define if not already defined.
12046 (linux_create_inferior): Check for __ANDROID__ rather than
12047 __SIGRTMIN.
12048 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12049 are already deferred.
12050 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12051 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12052 stopped and already has a pending signal to report.
12053 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12054 a pending signal to report or is moving out of a jump pad.
12055 (linux_init_signals): Check for __ANDROID__ rather than
12056 __SIGRTMIN.
12057
12058 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12059
12060 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12061 debug_threads check. Avoid a linear search when not doing debug
12062 output.
12063
12064 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12065
12066 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12067 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12068 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12069 (process_event): Change local fd's type to gdb_fildes_t.
12070 (create_file_handler): Adjust prototype.
12071 (delete_file_handler): Adjust prototype.
12072 (handle_file_event): Adjust prototype. Use pfildes.
12073 (create_file_event): Adjsut prototype.
12074 * remote-utils.c (remote_desc, listen_desc): Change type to
12075 gdb_fildes_t.
12076 * server.h: New gdb_fildes_t typedef.
12077 [USE_WIN32API]: Include winsock2.h.
12078 (delete_file_handler, add_file_handler): Adjust prototypes.
12079 (pfildes): Declare.
12080 * utils.c (pfildes): New.
12081
12082 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12083
12084 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12085 * configure: Regenerate.
12086
12087 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12088
12089 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12090 (linux_done_accessing_memory): ... this.
12091 (linux_target_ops): Adjust.
12092 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12093 * nto-low.c (nto_target_ops): Adjust comment.
12094 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12095 * spu-low.c (spu_target_ops): Adjust comment.
12096 * target.h (target_ops): Rename unprepare_to_access_memory field
12097 to done_accessing_memory.
12098 (unprepare_to_access_memory): Rename to ...
12099 (done_accessing_memory): ... this.
12100
12101 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12102
12103 * linux-low.c (linux_prepare_to_access_memory): New.
12104 (linux_unprepare_to_access_memory): New.
12105 (linux_target_ops): Install them.
12106 * server.c (read_memory): Rename to ...
12107 (gdb_read_memory): ... this. Use
12108 prepare_to_access_memory/prepare_to_access_memory.
12109 (write_memory): Rename to ...
12110 (gdb_write_memory): ... this. Use
12111 prepare_to_access_memory/prepare_to_access_memory.
12112 (handle_search_memory_1): Adjust.
12113 (process_serial_event): Adjust.
12114 * target.h (struct target_ops): New fields
12115 prepare_to_access_memory and unprepare_to_access_memory.
12116 (prepare_to_access_memory, unprepare_to_access_memory): New.
12117 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12118 prepare_to_access_memory/prepare_to_access_memory.
12119 * nto-low.c (nto_target_ops): Adjust.
12120 * spu-low.c (spu_target_ops): Adjust.
12121 * win32-low.c (win32_target_ops): Adjust.
12122
12123 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12124
12125 * Makefile.in (WARN_CFLAGS): Get it from configure.
12126 (WERROR_CFLAGS): New.
12127 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12128 * configure.ac: Introduce --enable-werror, which adds -Werror to
12129 the compiler command line. Enabled by default. Disable with
12130 --disable-werror. Add -Wdeclaration-after-statement
12131 Wpointer-arith and -Wformat-nonliteral to warning flags.
12132 * configure: Regenerate.
12133
12134 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12135
12136 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12137
12138 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12139
12140 * gdbreplay.c (remote_error): New.
12141 (gdbchar): New.
12142 (expect): Use gdbchar. Check for error reading from GDB.
12143 Clarify sync error output.
12144 (play): Check for errors writing to GDB.
12145 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12146 * remote-utils.c (getpkt): Check for errors writing to the remote
12147 descriptor.
12148
12149 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12150
12151 * linux-low.c (linux_wait_1): Move non-debugging code out of
12152 `debug_threads' control.
12153
12154 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12155
12156 * linux-low.c (linux_wait_1): Don't set last_status here.
12157 * server.c (push_event, queue_stop_reply_callback): Assert we're
12158 not pushing a TARGET_WAITKIND_IGNORE event.
12159 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12160 (myresume, handle_target_event): Set the thread's last_resume_kind
12161 and last_status from the target returned status.
12162
12163 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12164
12165 PR threads/10729
12166
12167 * linux-x86-low.c (update_debug_registers_callback): New.
12168 (i386_dr_low_set_addr): Use it.
12169 (i386_dr_low_get_addr): New.
12170 (i386_dr_low_set_control): Use update_debug_registers_callback.
12171 (i386_dr_low_get_control): New.
12172 (i386_dr_low_get_status): Adjust.
12173 * linux-low.c (linux_stop_lwp): New.
12174 * linux-low.h (linux_stop_lwp): Declare.
12175
12176 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12177 argument instead of a i386_debug_reg_state.
12178 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12179 a i386_debug_reg_state.
12180 (i386_insert_aligned_watchpoint): Adjust.
12181 (i386_remove_aligned_watchpoint): Adjust.
12182 (i386_low_stopped_data_address): Read the debug registers from the
12183 inferior instead of from the mirrors.
12184 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12185 (i386_dr_low_get_addr): Declare.
12186 (i386_dr_low_get_control): Declare.
12187 (i386_dr_low_get_status): Change prototype.
12188
12189 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12190 (i386_dr_low_get_addr): New.
12191 (i386_dr_low_get_control): New.
12192 (i386_dr_low_get_status): Adjust prototype. Return
12193 dr_status_mirror.
12194 (i386_initial_stuff): Clear dr_status_mirror and
12195 dr_control_mirror.
12196 (i386_get_thread_context): Adjust.
12197 (i386_set_thread_context): Adjust.
12198 (i386_thread_added): Adjust.
12199
12200 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12201
12202 * linux-low.h (linux_thread_area): Delete declaration.
12203
12204 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12205
12206 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12207 after its termination.
12208
12209 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12210
12211 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12212 (gdb_wants_all_stopped): Delete.
12213 (linux_wait_1): Don't call them.
12214 * server.c (handle_v_cont): Tag all threads as want-stopped.
12215 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12216 stopped as "client-wants-stopped".
12217
12218 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12219
12220 * Makefile.in (signals_h): New.
12221 (server_h): Depend on it.
12222 (server.o): Don't depend on $(signals_def).
12223 (signals.o): Depend on $(signals_def).
12224
12225 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12226
12227 * Makefile.in (signals_def): New.
12228 (server_h): Append include/gdb/signals.h and signals_def.
12229 (server.o): Append signals_def.
12230
12231 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12232
12233 * server.c (handle_target_event): Use target_signal_to_host for
12234 resume_info.sig initialization.
12235 * target.h (struct thread_resume) <sig>: New comment.
12236
12237 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12238
12239 * server.c (handle_query): strcpy() the returned string from paddress()
12240 instead of sprintf().
12241 * utils.c (paddress): Return phex_nz().
12242
12243 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12244
12245 * server.c (handle_v_cont): Call mourn_inferior if process
12246 just exited.
12247 (myresume): Likewise.
12248
12249 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12250
12251 Static tracepoints, and integration with UST.
12252
12253 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12254 * mem-break.c (uninsert_all_breakpoints)
12255 (reinsert_all_breakpoints): New.
12256 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12257 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12258 (gdb_agent_ust_loaded, helper_thread_id)
12259 (gdb_agent_helper_thread_id): New macros.
12260 (struct ipa_sym_addresses): Add addr_ust_loaded,
12261 addr_helper_thread_id, addr_cmd_buf.
12262 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12263 (in_process_agent_loaded_ust): New.
12264 (write_e_ust_not_loaded): New.
12265 (maybe_write_ipa_ust_not_loaded): New.
12266 (struct collect_static_trace_data_action): New.
12267 (enum tracepoint_type) <static_tracepoint>: New.
12268 (struct tracepoint) <handle>: Mention static tracepoints.
12269 (struct static_tracepoint_ctx): New.
12270 (CMD_BUF_SIZE): New.
12271 (add_tracepoint_action): Handle static tracepoint actions.
12272 (unprobe_marker_at): New.
12273 (clear_installed_tracepoints): Handle static tracepoints.
12274 (cmd_qtdp): Handle static tracepoints.
12275 (probe_marker_at): New.
12276 (cmd_qtstart): Handle static tracepoints.
12277 (response_tracepoint): Handle static tracepoints.
12278 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12279 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12280 (get_context_regcache): Handle static tracepoints.
12281 (do_action_at_tracepoint): Handle static tracepoint actions.
12282 (traceframe_find_block_type): Handle static trace data blocks.
12283 (traceframe_read_sdata): New.
12284 (download_tracepoints): Download static tracepoint actions.
12285 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12286 (GDB_PROBE_NAME): New.
12287 (ust_ops): New.
12288 (GET_UST_SYM): New.
12289 (USTF): New.
12290 (dlsym_ust): New.
12291 (ust_marker_to_static_tracepoint): New.
12292 (gdb_probe): New.
12293 (collect_ust_data_at_tracepoint): New.
12294 (gdb_ust_probe): New.
12295 (UNIX_PATH_MAX, SOCK_DIR): New.
12296 (gdb_ust_connect_sync_socket): New.
12297 (resume_thread, stop_thread): New.
12298 (run_inferior_command): New.
12299 (init_named_socket): New.
12300 (gdb_ust_socket_init): New.
12301 (cstr_to_hexstr): New.
12302 (next_st): New.
12303 (first_marker, next_marker): New.
12304 (response_ust_marker): New.
12305 (cmd_qtfstm, cmd_qtsstm): New.
12306 (unprobe_marker_at, probe_marker_at): New.
12307 (cmd_qtstmat, gdb_ust_thread): New.
12308 (gdb_ust_init): New.
12309 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12310 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12311 (ST_REGENTRY): New.
12312 (x86_64_st_collect_regmap): New.
12313 (X86_64_NUM_ST_COLLECT_GREGS): New.
12314 (AMD64_RIP_REGNUM): New.
12315 (supply_static_tracepoint_registers): New.
12316 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12317 (ST_REGENTRY): New.
12318 (i386_st_collect_regmap): New.
12319 (i386_NUM_ST_COLLECT_GREGS): New.
12320 (supply_static_tracepoint_registers): New.
12321 * server.c (handle_query): Handle qXfer:statictrace:read.
12322 <qSupported>: Report support for StaticTracepoints, and
12323 qXfer:statictrace:read features.
12324 * server.h (traceframe_read_sdata)
12325 (supply_static_tracepoint_registers): Declare.
12326 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12327 (unpack_varlen_hex): Include in IPA build.
12328 * Makefile.in (ustlibs, ustinc): New.
12329 (IPA_OBJS): Add remote-utils-ipa.o.
12330 ($(IPA_LIB)): Link -ldl and -lpthread.
12331 (UST_CFLAGS): New.
12332 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12333 * config.in, configure: Regenerate.
12334
12335 2010-06-20 Ian Lance Taylor <iant@google.com>
12336 Pedro Alves <pedro@codesourcery.com>
12337
12338 * linux-x86-low.c (always_true): Delete.
12339 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12340 trying to fool the compiler with always_true.
12341
12342 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12343
12344 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12345 conditions in gdbserver.
12346
12347 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12348
12349 * spu-low.c (spu_read_memory): Wrap around local store limit.
12350 (spu_write_memory): Likewise.
12351
12352 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12353
12354 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12355 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12356 LONGEST uses.
12357 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12358 uses.
12359 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12360 uses with LONGEST uses.
12361
12362 2010-06-14 Stan Shebs <stan@codesourcery.com>
12363 Pedro Alves <pedro@codesourcery.com>
12364
12365 Bytecode compiler.
12366
12367 * linux-x86-low.c: Include limits.h.
12368 (add_insns): New.
12369 (always_true): New.
12370 (EMIT_ASM): New.
12371 (EMIT_ASM32): New.
12372 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12373 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12374 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12375 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12376 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12377 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12378 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12379 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12380 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12381 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12382 (amd64_emit_void_call_2): New.
12383 (amd64_emit_ops): New.
12384 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12385 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12386 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12387 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12388 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12389 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12390 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12391 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12392 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12393 (i386_emit_stack_adjust, i386_emit_int_call_1)
12394 (i386_emit_void_call_2): New.
12395 (i386_emit_ops): New.
12396 (x86_emit_ops): New.
12397 (the_low_target): Install x86_emit_ops.
12398 * server.h (struct emit_ops): New.
12399 (get_raw_reg_func_addr): Declare.
12400 (current_insn_ptr, emit_error): Declare.
12401 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12402 (set_trace_state_variable_value): New defines.
12403 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12404 addr_get_trace_state_variable_value and
12405 addr_set_trace_state_variable_value.
12406 (symbol_list): New fields for get_raw_reg,
12407 get_trace_state_variable_value and set_trace_state_variable_value.
12408 (condfn): New typedef.
12409 (struct tracepoint): New field `compiled_cond'.
12410 (do_action_at_tracepoint): Clear compiled_cond.
12411 (get_trace_state_variable_value, set_trace_state_variable_value):
12412 Export in the IPA.
12413 (condition_true_at_tracepoint): If there's a compiled condition,
12414 run that.
12415 (current_insn_ptr, emit_error): New globals.
12416 (struct bytecode_address): New.
12417 (get_raw_reg_func_addr): New.
12418 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12419 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12420 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12421 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12422 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12423 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12424 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12425 (compile_tracepoint_condition, compile_bytecodes): New.
12426 * target.h (emit_ops): Forward declare.
12427 (struct target_ops): New field emit_ops.
12428 (target_emit_ops): New.
12429 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12430 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12431 * linux-low.c (linux_emit_ops): New.
12432 (linux_target_ops): Install it.
12433 * linux-low.h (struct linux_target_ops): New field emit_ops.
12434
12435 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12436
12437 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12438 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12439
12440 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12441 Stan Shebs <stan@codesourcery.com>
12442
12443 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12444 (all): Depend on $(extra_libraries).
12445 (install-only): Install the IPA.
12446 (IPA_OBJS, IPA_LIB): New.
12447 (clean): Remove the IPA lib.
12448 (IPAGENT_CFLAGS): New.
12449 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12450 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12451 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12452 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12453 * configure.ac: Check for atomic builtins support in the compiler.
12454 (IPA_DEPFILES, extra_libraries): Define.
12455 * configure.srv (ipa_obj): Add description.
12456 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12457 (i[34567]86-*-linux*): Set ipa_obj.
12458 (x86_64-*-linux*): Set ipa_obj.
12459 * linux-low.c (stabilizing_threads): New.
12460 (supports_fast_tracepoints): New.
12461 (linux_detach): Stabilize threads before detaching.
12462 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12463 the lwp is either not stabilizing, or is moving out of a jump pad.
12464 (linux_fast_tracepoint_collecting): New.
12465 (maybe_move_out_of_jump_pad): New.
12466 (enqueue_one_deferred_signal): New.
12467 (dequeue_one_deferred_signal): New.
12468 (linux_wait_for_event_1): If moving out of a jump pad, defer
12469 pending signals to later.
12470 (linux_stabilize_threads): New.
12471 (linux_wait_1): Check if threads need moving out of jump pads, and
12472 do it if so.
12473 (stuck_in_jump_pad_callback): New.
12474 (move_out_of_jump_pad_callback): New.
12475 (lwp_running): New.
12476 (linux_resume_one_lwp): Handle moving out of jump pads.
12477 (linux_set_resume_request): Dequeue deferred signals.
12478 (need_step_over_p): Also step over fast tracepoint jumps.
12479 (start_step_over): Also uninsert fast tracepoint jumps.
12480 (finish_step_over): Also reinsert fast tracepoint jumps.
12481 (linux_install_fast_tracepoint_jump): New.
12482 (linux_target_ops): Install linux_stabilize_threads and
12483 linux_install_fast_tracepoint_jump_pad.
12484 * linux-low.h (linux_target_ops) <get_thread_area,
12485 install_fast_tracepoint_jump_pad>: New fields.
12486 (struct lwp_info) <collecting_fast_tracepoint,
12487 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12488 (linux_get_thread_area): Declare.
12489 * linux-x86-low.c (jump_insn): New.
12490 (x86_get_thread_area): New.
12491 (append_insns): New.
12492 (push_opcode): New.
12493 (amd64_install_fast_tracepoint_jump_pad): New.
12494 (i386_install_fast_tracepoint_jump_pad): New.
12495 (x86_install_fast_tracepoint_jump_pad): New.
12496 (the_low_target): Install x86_get_thread_area and
12497 x86_install_fast_tracepoint_jump_pad.
12498 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12499 (struct fast_tracepoint_jump): New.
12500 (fast_tracepoint_jump_insn): New.
12501 (fast_tracepoint_jump_shadow): New.
12502 (find_fast_tracepoint_jump_at): New.
12503 (fast_tracepoint_jump_here): New.
12504 (delete_fast_tracepoint_jump): New.
12505 (set_fast_tracepoint_jump): New.
12506 (uninsert_fast_tracepoint_jumps_at): New.
12507 (reinsert_fast_tracepoint_jumps_at): New.
12508 (set_breakpoint_at): Use write_inferior_memory.
12509 (uninsert_raw_breakpoint): Use write_inferior_memory.
12510 (check_mem_read): Mask out fast tracepoint jumps.
12511 (check_mem_write): Mask out fast tracepoint jumps.
12512 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12513 (set_fast_tracepoint_jump): Declare.
12514 (delete_fast_tracepoint_jump)
12515 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12516 (reinsert_fast_tracepoint_jumps_at): Declare.
12517 * regcache.c: Don't compile many functions when building the
12518 in-process agent library.
12519 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12520 the register buffer in the heap.
12521 (free_register_cache): If the register buffer isn't owned by the
12522 regcache, don't free it.
12523 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12524 pre-existing register caches.
12525 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12526 type.
12527 (convert_ascii_to_int): : Constify `from' parameter type.
12528 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12529 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12530 the needed buffer in-place.
12531 (relocate_instruction): New.
12532 * server.c (handle_query) <qSymbols>: If the target supports
12533 tracepoints, give it a chance of looking up symbols. Report
12534 support for fast tracepoints.
12535 (handle_status): Stabilize threads.
12536 (process_serial_event): Adjust.
12537 * server.h (struct fast_tracepoint_jump): Forward declare.
12538 (struct process_info) <fast_tracepoint_jumps>: New field.
12539 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12540 (decode_X_packet, decode_M_packet): Adjust.
12541 (relocate_instruction): Declare.
12542 (in_process_agent_loaded): Declare.
12543 (tracepoint_look_up_symbols): Declare.
12544 (struct fast_tpoint_collect_status): Declare.
12545 (fast_tracepoint_collecting): Declare.
12546 (force_unlock_trace_buffer): Declare.
12547 (handle_tracepoint_bkpts): Declare.
12548 (initialize_low_tracepoint)
12549 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12550 * target.h (struct target_ops) <stabilize_threads,
12551 install_fast_tracepoint_jump_pad>: New fields.
12552 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12553 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12554 [HAVE_STDINT_H]: Include stdint.h.
12555 (trace_debug_1): Rename to ...
12556 (trace_vdebug): ... this.
12557 (trace_debug): Rename to ...
12558 (trace_debug_1): ... this. Add `level' parameter.
12559 (trace_debug): New.
12560 (ATTR_USED, ATTR_NOINLINE): New.
12561 (IP_AGENT_EXPORT): New.
12562 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12563 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12564 (about_to_request_buffer_space, trace_buffer_is_full)
12565 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12566 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12567 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12568 (traceframe_write_count, traceframes_created)
12569 (trace_state_variables)
12570 New renaming defines.
12571 (struct ipa_sym_addresses): New.
12572 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12573 (symbol_list): New.
12574 (ipa_sym_addrs): New.
12575 (all_tracepoint_symbols_looked_up): New.
12576 (in_process_agent_loaded): New.
12577 (write_e_ipa_not_loaded): New.
12578 (maybe_write_ipa_not_loaded): New.
12579 (tracepoint_look_up_symbols): New.
12580 (debug_threads) [IN_PROCESS_AGENT]: New.
12581 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12582 (UNKNOWN_SIDE_EFFECTS): New.
12583 (stop_tracing): New.
12584 (flush_trace_buffer): New.
12585 (stop_tracing_bkpt): New.
12586 (flush_trace_buffer_bkpt): New.
12587 (read_inferior_integer): New.
12588 (read_inferior_uinteger): New.
12589 (read_inferior_data_pointer): New.
12590 (write_inferior_data_pointer): New.
12591 (write_inferior_integer): New.
12592 (write_inferior_uinteger): New.
12593 (struct collect_static_trace_data_action): Delete.
12594 (enum tracepoint_type): New.
12595 (struct tracepoint) <type>: New field `type'.
12596 <actions_str, step_actions, step_actions_str>: Only include in
12597 GDBserver.
12598 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12599 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12600 (tracepoints): Use IP_AGENT_EXPORT.
12601 (last_tracepoint): Don't include in the IPA.
12602 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12603 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12604 (alloced_trace_state_variables): New.
12605 (trace_state_variables): Use IP_AGENT_EXPORT.
12606 (traceframe_t): Delete unused variable.
12607 (circular_trace_buffer): Don't include in the IPA.
12608 (trace_buffer_start): Delete.
12609 (struct trace_buffer_control): New.
12610 (trace_buffer_free): Delete.
12611 (struct ipa_trace_buffer_control): New.
12612 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12613 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12614 New.
12615 (trace_buffer_ctrl): New.
12616 (TRACE_BUFFER_CTRL_CURR): New.
12617 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12618 Reimplement as macros.
12619 (trace_buffer_wrap): Delete.
12620 (traceframe_write_count, traceframe_read_count)
12621 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12622 (struct tracepoint_hit_ctx) <type>: New field.
12623 (struct fast_tracepoint_ctx): New.
12624 (memory_barrier): New.
12625 (cmpxchg): New.
12626 (record_tracepoint_error): Update atomically in the IPA.
12627 (clear_inferior_trace_buffer): New.
12628 (about_to_request_buffer_space): New.
12629 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12630 updating the same buffer.
12631 (add_tracepoint): Default the tracepoint's type to trap
12632 tracepoint, and orig_size to -1.
12633 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12634 internal variables.
12635 (create_trace_state_variable): New parameter `gdb'. Handle it.
12636 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12637 (cmd_qtdp): Handle fast tracepoints.
12638 (cmd_qtdv): Adjust.
12639 (max_jump_pad_size): New.
12640 (gdb_jump_pad_head): New.
12641 (get_jump_space_head): New.
12642 (claim_jump_space): New.
12643 (sort_tracepoints): New.
12644 (MAX_JUMP_SIZE): New.
12645 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12646 IPA.
12647 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12648 support. Upload fast traceframes, and delete internal IPA
12649 breakpoints.
12650 (stop_tracing_handler): New.
12651 (flush_trace_buffer_handler): New.
12652 (cmd_qtstop): Upload fast tracepoints.
12653 (response_tracepoint): Handle fast tracepoints.
12654 (tracepoint_finished_step): Upload fast traceframes. Set the
12655 tracepoint hit context's tracepoint type.
12656 (handle_tracepoint_bkpts): New.
12657 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12658 type. Add comment about fast tracepoints.
12659 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12660 non-existing action_str field.
12661 (get_context_regcache): Handle fast tracepoints.
12662 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12663 to the regcache.
12664 (fast_tracepoint_from_jump_pad_address): New.
12665 (fast_tracepoint_from_ipa_tpoint_address): New.
12666 (collecting_t): New.
12667 (force_unlock_trace_buffer): New.
12668 (fast_tracepoint_collecting): New.
12669 (collecting): New.
12670 (gdb_collect): New.
12671 (write_inferior_data_ptr): New.
12672 (target_tp_heap): New.
12673 (target_malloc): New.
12674 (download_agent_expr): New.
12675 (UALIGN): New.
12676 (download_tracepoints): New.
12677 (download_trace_state_variables): New.
12678 (upload_fast_traceframes): New.
12679 (IPA_FIRST_TRACEFRAME): New.
12680 (IPA_NEXT_TRACEFRAME_1): New.
12681 (IPA_NEXT_TRACEFRAME): New.
12682 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12683 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12684 (gdb_jump_pad_buffer_end): New.
12685 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12686 (initialize_tracepoint): Adjust.
12687 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12688 buffer. Initialize the low module.
12689 * utils.c (PREFIX, TOOLNAME): New.
12690 (malloc_failure): Use PREFIX.
12691 (error): In the IPA, an error causes an exit.
12692 (fatal, warning): Use PREFIX.
12693 (internal_error): Use TOOLNAME.
12694 (NUMCELLS): Increase to 10.
12695 * configure, config.in: Regenerate.
12696
12697 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12698
12699 * server.c (handle_query) <qSupported>: Do two passes over the
12700 qSupported string to avoid nesting strtok.
12701
12702 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12703
12704 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12705 (CDEPS): New.
12706 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12707 -Wl,--dynamic-list.
12708 * configure: Regenerate.
12709 * proc-service.list: New.
12710
12711 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12712
12713 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12714 New comment.
12715
12716 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12717
12718 * gdbreplay.c (remote_open): Check error return from socket() call by
12719 its equality to -1 not by it being negative.
12720 * remote-utils.c (remote_open): Likewise.
12721
12722 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12723
12724 * config.h: Regenerate.
12725
12726 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12727
12728 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12729 doesn't provide PTRACE_GET_THREAD_AREA.
12730
12731 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12732
12733 * linux-m68k-low.c: Include <asm/ptrace.h>
12734 (ps_get_thread_area): Implement.
12735
12736 2010-05-03 Doug Evans <dje@google.com>
12737
12738 * event-loop.c (struct callback_event): New struct.
12739 (callback_list): New global.
12740 (append_callback_event, delete_callback_event): New functions.
12741 (process_callback): New function.
12742 (start_event_loop): Call it.
12743 * remote-utils.c (NOT_SCHEDULED): Define.
12744 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12745 moved out of readchar.
12746 (readchar): Rewrite. Call reschedule before returning.
12747 (reset_readchar): New function.
12748 (remote_close): Call it.
12749 (process_remaining, reschedule): New functions.
12750 * server.h (callback_handler_func): New typedef.
12751 (append_callback_event, delete_callback_event): Declare.
12752
12753 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12754
12755 * proc-service.c (ps_pglobal_lookup): Use
12756 thread_db_look_up_one_symbol.
12757 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12758 parameter. Use it instead of all_symbols_looked_up.
12759 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12760 field.
12761 (all_symbols_looked_up): Don't declare.
12762 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12763 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12764 field.
12765 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12766 Set all_symbols_looked_up here.
12767 (thread_db_look_up_one_symbol): New.
12768 (thread_db_get_tls_address): Adjust.
12769 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12770 thread_db object on the heap, and tentatively set it in the
12771 process structure.
12772 (thread_db_init): Don't set all_symbols_looked_up here.
12773 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12774
12775 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12776
12777 * linux-low.c (linux_kill, linux_detach): Adjust.
12778 (status_pending_p_callback): Remove redundant statement. Check
12779 for !TARGET_WAITIKIND_IGNORE, instead of
12780 TARGET_WAITKIND_STOPPED.
12781 (handle_tracepoints): Make sure LWP is locked. Adjust.
12782 (linux_wait_for_event_1): Adjust.
12783 (linux_cancel_breakpoints): New.
12784 (unsuspend_one_lwp): New.
12785 (unsuspend_all_lwps): New.
12786 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12787 (send_sigstop_callback): Change return type to int, add new
12788 `except' parameter and handle it.
12789 (suspend_and_send_sigstop_callback): New.
12790 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12791 pass them down. If SUSPEND, also increment the lwp's suspend
12792 count.
12793 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12794 (need_step_over_p): Don't consider suspended LWPs.
12795 (start_step_over): Adjust.
12796 (proceed_one_lwp): Change return type to int, add new `except'
12797 parameter and handle it.
12798 (unsuspend_and_proceed_one_lwp): New.
12799 (proceed_all_lwps): Use find_inferior instead of
12800 for_each_inferior.
12801 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12802 also decrement the suspend count of LWPs. Pass `except' down,
12803 instead of hacking its suspend count.
12804 (linux_pause_all): Add `freeze' parameter. Adjust.
12805 (linux_unpause_all): New.
12806 (linux_target_ops): Install linux_unpause_all.
12807 * server.c (handle_status): Adjust.
12808 * target.h (struct target_ops): New fields `unpause_all' and
12809 `cancel_breakpoints'. Add new parameter to `pause_all'.
12810 (pause_all): Add new `freeze' parameter.
12811 (unpause_all): New.
12812 (cancel_breakpoints): New.
12813 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12814 cancel breakpoints.
12815 (cmd_qtstart): Pause threads.
12816 (stop_tracing): Pause threads, and cancel breakpoints.
12817 * win32-low.c (win32_target_ops): Adjust.
12818
12819 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12820
12821 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12822 the inferior right away from here...
12823 (linux_wait_1): ... to here, and adjust to check the thread's
12824 last_resume_kind instead of the lwp's step or stop_expected flags.
12825
12826 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12827
12828 * README: Use consistent `GDB' and `GDBserver' spellings.
12829
12830 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12831
12832 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12833 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12834 (linux_detach_one_lwp): Assume the lwp is stopped.
12835 (any_thread_of): Delete.
12836 (linux_detach): Stop all lwps here. Don't blindly delete all
12837 breakpoints.
12838 (delete_lwp_callback): New.
12839 (linux_mourn): Delete all lwps of the process that is gone.
12840 (linux_wait_1): Don't delete the last lwp of the process here.
12841 * mem-break.h (mark_breakpoints_out): Declare.
12842 * mem-break.c (mark_breakpoints_out): New.
12843 (free_all_breakpoints): Use it.
12844 * server.c (handle_target_event): If the process is gone, mark
12845 breakpoints out.
12846 * thread-db.c (struct thread_db) <create_bp>: New field.
12847 (thread_db_enable_reporting): Fix prototype. Store a thread event
12848 breakpoint reference in the thread_db struct.
12849 (thread_db_load_search): Clear the thread_db object.
12850 (try_thread_db_load_1): Ditto.
12851 (switch_to_process): New.
12852 (disable_thread_event_reporting): Use it.
12853 (remove_thread_event_breakpoints): New.
12854 (thread_db_detach, thread_db_mourn): Use it.
12855
12856 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12857
12858 * linux-low.c (linux_enable_event_reporting): New.
12859 (linux_wait_for_event_1, handle_extended_wait): Use it.
12860
12861 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12862
12863 * linux-low.c (linux_kill_one_lwp, linux_kill)
12864 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12865 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12866 SIGSTOP even if the LWP is stopped.
12867 (send_sigstop_callback): New.
12868 (stop_all_lwps): Use send_sigstop_callback instead.
12869 (linux_resume_one_thread): Adjust.
12870 (proceed_one_lwp): Still proceed an LWP that the client has
12871 requested to stop, if we haven't reported it as stopped yet. Make
12872 sure that LWPs the client want stopped, have a pending SIGSTOP.
12873
12874 2010-04-26 Doug Evans <dje@google.com>
12875
12876 * server.c (handle_general_set): Make static.
12877
12878 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12879 Print received char after testing for error/eof instead of before.
12880 (input_interrupt): Tweak comment.
12881
12882 2010-04-23 Doug Evans <dje@google.com>
12883
12884 * server.c (start_inferior): Print inferior argv if --debug.
12885
12886 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12887
12888 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12889 * nto-x86-low.c: Include server.h
12890
12891 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12892
12893 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12894 be consistent with other sources of this directory.
12895 (init_registers_amd64): Correct name of source file of this function
12896 in the comment.
12897
12898 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12899
12900 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12901 64-bit executables.
12902
12903 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12904
12905 * win32-i386-low.c: Add 64-bit support.
12906 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12907 (init_registers_amd64): Declare.
12908 (mappings): Add 64-bit version of array.
12909 (init_windows_x86): New function.
12910 (the_low_target): Change init_arch field to init_windows_x86.
12911
12912 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12913
12914 * win32-low.c: Adapt to support also 64-bit architecture.
12915 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12916 (get_image_name): Use SIZE_T type for local variable `done'.
12917 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12918 (toolhelp_get_dll_name): Idem.
12919 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12920 Use uintptr_t typecast to avoid warning.
12921 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12922 (handle_exception): Use phex_nz to avoid warning.
12923 (win32_wait): Remove unused local variable `process'.
12924
12925 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12926
12927 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12928 `amd64-avx.o'.
12929
12930 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12931
12932 * configure.ac: Use `ws2_32' library for srv_mingw.
12933 * configure: Regenerate.
12934 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12935 * remote-utils.c: Likewise.
12936
12937 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12938
12939 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12940 if __x86_64__ is defined.
12941
12942 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12943
12944 * configure: Regenerate.
12945
12946 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12947
12948 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12949 * target.h (target_ops): New get_tib_address field.
12950 * win32-low.h (win32_thread_info): Add thread_local_base field.
12951 * win32-low.c (child_add_thread): Add tlb argument.
12952 Set thread_local_base field to TLB.
12953 (get_child_debug_event): Adapt to child_add_thread change.
12954 (win32_get_tib_address): New function.
12955 (win32_target_ops): Set get_tib_address field to
12956 win32_get_tib_address.
12957 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12958
12959 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12960
12961 * linux-low.c (linux_mourn): Also remove the process.
12962 * server.c (handle_target_event): Don't remove the process here.
12963 * nto-low.c (nto_mourn): New.
12964 (nto_target_ops): Install it.
12965 * spu-low.c (spu_mourn): New.
12966 (spu_target_ops): Install it.
12967 * win32-low.c (win32_mourn): New.
12968 (win32_target_ops): Install it.
12969
12970 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12971
12972 * server.h (buffer_xml_printf): Remove redundant `;'.
12973
12974 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12975
12976 * regcache.c (set_register_cache): Invalidate regcaches before
12977 changing the register cache layout.
12978 (regcache_invalidate_one): Allow a NULL regcache.
12979 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12980 regcaches before changing the register cache layout or the target
12981 regsets.
12982
12983 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12984
12985 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12986 variable warning on Linux/x86-64.
12987
12988 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12989
12990 GDBserver disconnected tracing support.
12991
12992 * linux-low.c (linux_remove_process): Delete.
12993 (add_lwp): Don't set last_resume_kind here.
12994 (linux_kill): Use `mourn'.
12995 (linux_detach): Use `thread_db_detach', and `mourn'.
12996 (linux_mourn): New.
12997 (linux_attach_lwp_1): Adjust comment.
12998 (linux_attach): last_resume_kind moved the thread_info; adjust.
12999 (status_pending_p_callback): Adjust.
13000 (linux_wait_for_event_1): Adjust.
13001 (count_events_callback, select_singlestep_lwp_callback)
13002 (select_event_lwp_callback, cancel_breakpoints_callback)
13003 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13004 (proceed_one_lwp): Adjust.
13005 (linux_async): Add debug output.
13006 (linux_thread_stopped): New.
13007 (linux_pause_all): New.
13008 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13009 linux_pause_all.
13010 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13011 (thread_db_free): Delete declaration.
13012 (thread_db_detach, thread_db_mourn): Declare.
13013 * thread-db.c (thread_db_init): Use thread_db_mourn.
13014 (thread_db_free): Delete, split in two.
13015 (disable_thread_event_reporting): New.
13016 (thread_db_detach): New.
13017 (thread_db_mourn): New.
13018
13019 * server.h (struct thread_info) <last_resume_kind>: New field.
13020 <attached>: Add comment.
13021 <gdb_detached>: New field.
13022 (handler_func): Change return type to int.
13023 (handle_serial_event, handle_target_event): Ditto.
13024 (gdb_connected): Declare.
13025 (tracing): Delete.
13026 (disconnected_tracing): Declare.
13027 (stop_tracing): Declare.
13028
13029 * server.c (handle_query) <qSupported>: Report support for
13030 disconnected tracing.
13031 (queue_stop_reply_callback): Account for running threads.
13032 (gdb_wants_thread_stopped): New.
13033 (gdb_wants_all_threads_stopped): New.
13034 (gdb_reattached_process): New.
13035 (handle_status): Clear the `gdb_detached' flag of all processes.
13036 In all-stop, stop all threads.
13037 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13038 (process_serial_event): If the remote connection breaks, or if an
13039 exit was forced with "monitor exit", force an event loop exit.
13040 Handle disconnected tracing on detach.
13041 (handle_serial_event): Adjust.
13042 (handle_target_event): If GDB isn't connected, forward events back
13043 to the inferior, unless the last process exited, in which case,
13044 exit gdbserver. Adjust interface.
13045
13046 * remote-utils.c (remote_open): Don't block in accept. Instead
13047 register an event loop source on the listen socket file
13048 descriptor. Refactor bits into ...
13049 (listen_desc): ... this new global.
13050 (gdb_connected): ... this new function.
13051 (enable_async_notification): ... this new function.
13052 (handle_accept_event): ... this new function.
13053 (remote_close): Clear remote_desc.
13054
13055 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13056
13057 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13058 New fields.
13059 (mourn_inferior): Define.
13060 (target_process_qsupported): Avoid the dangling else problem.
13061 (thread_stopped): Define.
13062 (pause_all): Define.
13063 (target_waitstatus_to_string): Declare.
13064 * target.c (target_waitstatus_to_string): New.
13065
13066 * tracepoint.c (tracing): Make extern.
13067 (disconnected_tracing): New.
13068 (stop_tracing): Make extern. Handle tracing stops due to GDB
13069 disconnecting.
13070 (cmd_qtdisconnected): New.
13071 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13072 (handle_tracepoint_general_set): Handle QTDisconnected.
13073
13074 * event-loop.c (event_handler_func): Change return type to int.
13075 (process_event): Bail out if the event handler wants the event
13076 loop to stop.
13077 (handle_file_event): Ditto.
13078 (start_event_loop): Bail out if the event handler wants the event
13079 loop to stop.
13080
13081 * nto-low.c (nto_target_ops): Adjust.
13082 * spu-low.c (spu_wait): Don't remove the process here.
13083 (spu_target_ops): Adjust.
13084 * win32-low.c (win32_wait): Don't remove the process here.
13085 (win32_target_ops): Adjust.
13086
13087 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13088
13089 * regcache.c (realloc_register_cache): Invalidate inferior's
13090 regcache before recreating it.
13091
13092 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13093
13094 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13095
13096 2010-04-09 Stan Shebs <stan@codesourcery.com>
13097 Pedro Alves <pedro@codesourcery.com>
13098
13099 * server.h (LONGEST): New.
13100 (struct thread_info) <while_stepping>: New field.
13101 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13102 Declare.
13103 (initialize_tracepoint, handle_tracepoint_general_set)
13104 (handle_tracepoint_query, tracepoint_finished_step)
13105 (tracepoint_was_hit, release_while_stepping_state_list):
13106 (current_traceframe): Declare.
13107 * server.c (handle_general_set): Handle tracepoint packets.
13108 (read_memory): New.
13109 (write_memory): New.
13110 (handle_search_memory_1): Use read_memory.
13111 (handle_query): Report support for conditional tracepoints, trace
13112 state variables, and tracepoint sources. Handle tracepoint
13113 queries.
13114 (main): Initialize the tracepoints module.
13115 (process_serial_event): Handle traceframe reads/writes.
13116
13117 * linux-low.c (handle_tracepoints): New.
13118 (linux_wait_1): Call it.
13119 (linux_resume_one_lwp): Handle while-stepping.
13120 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13121 (linux_target_ops): Install them.
13122 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13123 New field.
13124 * linux-x86-low.c (x86_supports_tracepoints): New.
13125 (the_low_target). Install it.
13126
13127 * mem-break.h (delete_breakpoint): Declare.
13128 * mem-break.c (delete_breakpoint): Make external.
13129
13130 * target.h (struct target_ops): Add `supports_tracepoints',
13131 `read_pc', and `write_pc' fields.
13132 (target_supports_tracepoints): Define.
13133 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13134 (phex_nz): New.
13135
13136 * regcache.h (struct regcache) <registers_owned>: New field.
13137 (init_register_cache, regcache_cpy): Declare.
13138 (regcache_read_pc, regcache_write_pc): Declare.
13139 (register_cache_size): Declare.
13140 (supply_regblock): Declare.
13141 * regcache.c (init_register_cache): New.
13142 (new_register_cache): Use it.
13143 (regcache_cpy): New.
13144 (register_cache_size): New.
13145 (supply_regblock): New.
13146 (regcache_read_pc, regcache_write_pc): New.
13147
13148 * tracepoint.c: New.
13149
13150 * Makefile.in (OBS): Add tracepoint.o.
13151 (tracepoint.o): New rule.
13152
13153 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13154
13155 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13156 (i386-mmx.o): New.
13157 (i386-mmx.c): Likewise.
13158 (i386-mmx-linux.o): Likewise.
13159 (i386-mmx-linux.c): Likewise.
13160
13161 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13162 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13163 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13164 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13165
13166 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13167 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13168 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13169
13170 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13171
13172 * Makefile.in (clean): Updated.
13173 (i386-avx.o): New.
13174 (i386-avx.c): Likewise.
13175 (i386-avx-linux.o): Likewise.
13176 (i386-avx-linux.c): Likewise.
13177 (amd64-avx.o): Likewise.
13178 (amd64-avx.c): Likewise.
13179 (amd64-avx-linux.o): Likewise.
13180 (amd64-avx-linux.c): Likewise.
13181
13182 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13183 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13184 (srv_amd64_regobj): Add amd64-avx.o.
13185 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13186 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13187 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13188 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13189 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13190 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13191 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13192
13193 * i387-fp.c: Include "i386-xstate.h".
13194 (i387_xsave): New.
13195 (i387_cache_to_xsave): Likewise.
13196 (i387_xsave_to_cache): Likewise.
13197 (x86_xcr0): Likewise.
13198
13199 * i387-fp.h (i387_cache_to_xsave): Likewise.
13200 (i387_xsave_to_cache): Likewise.
13201 (x86_xcr0): Likewise.
13202
13203 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13204 * linux-crisv32-low.c (target_regsets): Likewise.
13205 * linux-m68k-low.c (target_regsets): Likewise.
13206 * linux-mips-low.c (target_regsets): Likewise.
13207 * linux-ppc-low.c (target_regsets): Likewise.
13208 * linux-s390-low.c (target_regsets): Likewise.
13209 * linux-sh-low.c (target_regsets): Likewise.
13210 * linux-sparc-low.c (target_regsets): Likewise.
13211 * linux-xtensa-low.c (target_regsets): Likewise.
13212
13213 * linux-low.c: Include <sys/uio.h>.
13214 (regsets_fetch_inferior_registers): Support nt_type.
13215 (regsets_store_inferior_registers): Likewise.
13216 (linux_process_qsupported): New.
13217 (linux_target_ops): Add linux_process_qsupported.
13218
13219 * linux-low.h (regset_info): Add nt_type.
13220 (linux_target_ops): Add process_qsupported.
13221
13222 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13223 and <sys/uio.h>.
13224 (init_registers_i386_avx_linux): New.
13225 (init_registers_amd64_avx_linux): Likewise.
13226 (xmltarget_i386_linux_no_xml): Likewise.
13227 (xmltarget_amd64_linux_no_xml): Likewise.
13228 (PTRACE_GETREGSET): Likewise.
13229 (PTRACE_SETREGSET): Likewise.
13230 (x86_fill_xstateregset): Likewise.
13231 (x86_store_xstateregset): Likewise.
13232 (use_xml): Likewise.
13233 (x86_linux_update_xmltarget): Likewise.
13234 (x86_linux_process_qsupported): Likewise.
13235 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13236 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13237 init_registers_i386_linux here. Call
13238 x86_linux_update_xmltarget.
13239 (the_low_target): Add x86_linux_process_qsupported.
13240
13241 * server.c (handle_query): Call target_process_qsupported.
13242
13243 * target.h (target_ops): Add process_qsupported.
13244 (target_process_qsupported): New.
13245
13246 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13247
13248 * inferiors.c (add_thread): Set last_status kind to
13249 TARGET_WAITKIND_IGNORE.
13250 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13251 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13252 (linux_wait_1): Move `thread' local definition to block that uses
13253 it. Don't NULL initialize `event_child'.
13254 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13255 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13256 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13257
13258 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13259
13260 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13261 an extended waitstatus, or by a watchpoint.
13262 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13263 thread was stepping or has been stopped by a watchpoint.
13264
13265 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13266
13267 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13268 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13269 of another, then delete the previous, and validate all
13270 breakpoints.
13271 (validate_inserted_breakpoint): New.
13272 (delete_disabled_breakpoints): New.
13273 (validate_breakpoints): New.
13274 (check_mem_read): Validate breakpoints before trusting their
13275 shadow. Delete disabled breakpoints.
13276 (check_mem_write): Validate breakpoints before trusting they
13277 should be inserted. Delete disabled breakpoints.
13278 * mem-break.h (validate_breakpoints):
13279 * server.c (handle_query): Validate breakpoints when we see a
13280 qSymbol query.
13281
13282 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13283
13284 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13285 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13286 if we could tell there's a GDB breakpoint at stop_pc.
13287 (need_step_over_p): Don't do a step over if we find a GDB
13288 breakpoint at the resume PC.
13289
13290 * mem-break.c (struct raw_breakpoint): New.
13291 (enum bkpt_type): New type `gdb_breakpoint'.
13292 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13293 fields. New field `raw'.
13294 (find_raw_breakpoint_at): New.
13295 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13296 breakpoint instead.
13297 (set_breakpoint_at): Adjust.
13298 (delete_raw_breakpoint): New.
13299 (release_breakpoint): New.
13300 (delete_breakpoint): Rename to...
13301 (delete_breakpoint_1): ... this. Add proc parameter. Use
13302 release_breakpoint. Return ENOENT.
13303 (delete_breakpoint): Reimplement.
13304 (find_breakpoint_at): Delete.
13305 (find_gdb_breakpoint_at): New.
13306 (delete_breakpoint_at): Delete.
13307 (set_gdb_breakpoint_at): New.
13308 (delete_gdb_breakpoint_at): New.
13309 (gdb_breakpoint_here): New.
13310 (set_reinsert_breakpoint): Use release_breakpoint.
13311 (uninsert_breakpoint): Rename to ...
13312 (uninsert_raw_breakpoint): ... this.
13313 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13314 (reinsert_raw_breakpoint): Change parameter type to
13315 raw_breakpoint.
13316 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13317 instead.
13318 (check_breakpoints): Adjust. Use release_breakpoint.
13319 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13320 (breakpoint_inserted_here): Ditto.
13321 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13322 Don't trust the breakpoint's shadow if it is not inserted.
13323 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13324 (delete_all_breakpoints): Adjust.
13325 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13326 use delete_breakpoint_1.
13327
13328 * mem-break.h (breakpoints_supported): Delete declaration.
13329 (set_gdb_breakpoint_at): Declare.
13330 (gdb_breakpoint_here): Declare.
13331 (delete_breakpoint_at): Delete.
13332 (delete_gdb_breakpoint_at): Declare.
13333
13334 * server.h (struct raw_breakpoint): Forward declare.
13335 (struct process_info): New field `raw_breakpoints'.
13336
13337 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13338 breakpoints.
13339
13340 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13341
13342 * linux-low.c (status_pending_p_callback): Fix comment.
13343 (linux_wait_for_event_1): Move most of the internal breakpoint
13344 handling from here...
13345 (linux_wait_1): ... to here.
13346 (count_events_callback): New.
13347 (select_singlestep_lwp_callback): New.
13348 (select_event_lwp_callback): New.
13349 (cancel_breakpoints_callback): New.
13350 (select_event_lwp): New.
13351 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13352 priority to all LWPs that have had events that should be reported
13353 to the client. Cancel breakpoints when about to reporting the
13354 event to the client, not while stopping lwps. No longer cancel
13355 finished single-steps here.
13356 (cancel_finished_single_step): Delete.
13357 (cancel_finished_single_steps): Delete.
13358
13359 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13360
13361 * mem-break.c (enum bkpt_type): New.
13362 (struct breakpoint): New field `type'.
13363 (set_breakpoint_at): Change return type to struct breakpoint
13364 pointer. Set type to `other_breakpoint' by default.
13365 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13366 in the breakpoint list.
13367 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13368 (reinsert_breakpoint): Rename to ...
13369 (reinsert_raw_breakpoint): ... this.
13370 (reinsert_breakpoints_at): Adjust.
13371 * mem-break.h (struct breakpoint): Declare.
13372 (set_breakpoint_at): Change return type to struct breakpoint
13373 pointer.
13374
13375 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13376
13377 * server.c (handle_query): Assign, not compare.
13378
13379 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13380
13381 Teach linux gdbserver to step-over-breakpoints.
13382
13383 * linux-low.c (can_hardware_single_step): New.
13384 (supports_breakpoints): New.
13385 (handle_extended_wait): If stopping threads, read the stop pc of
13386 the new cloned LWP.
13387 (get_pc): New.
13388 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13389 low target doesn't support retrieving the PC.
13390 (add_lwp): Set last_resume_kind to resume_continue.
13391 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13392 (linux_attach): Don't clear stop_expected. Set the lwp's
13393 last_resume_kind to resume_stop.
13394 (linux_detach_one_lwp): Don't check for removed breakpoints.
13395 (check_removed_breakpoint): Delete.
13396 (status_pending_p): Rename to ...
13397 (status_pending_p_callback): ... this. Don't check for removed
13398 breakpoints. Don't consider threads that are stopped from GDB's
13399 perspective.
13400 (linux_wait_for_lwp): Always read the stop_pc here.
13401 (cancel_breakpoint): New.
13402 (step_over_bkpt): New global.
13403 (linux_wait_for_event_1): Implement stepping over breakpoints.
13404 (gdb_wants_lwp_stopped): New.
13405 (gdb_wants_all_stopped): New.
13406 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13407 single-step traps here. Store the thread's last reported target
13408 wait status.
13409 (send_sigstop): Don't clear stop_expected. Always set it,
13410 instead.
13411 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13412 (cancel_finished_single_step): New.
13413 (cancel_finished_single_steps): New.
13414 (wait_for_sigstop): Don't cancel finished single-step traps here.
13415 (linux_resume_one_lwp): Don't check for removed breakpoints.
13416 Don't set `step' on non-hardware step archs.
13417 (linux_set_resume_request): Ignore resume_stop requests if already
13418 stopping or stopped. Set the lwp's last_resume_kind.
13419 (resume_status_pending_p): Don't check for removed breakpoints.
13420 (need_step_over_p): New.
13421 (start_step_over): New.
13422 (finish_step_over): New.
13423 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13424 requests. Clear the thread's last reported target waitstatus.
13425 Don't use the `suspended' flag. Don't consider pending breakpoints.
13426 (linux_resume): Start a step-over if necessary.
13427 (proceed_one_lwp): New.
13428 (proceed_all_lwps): New.
13429 (unstop_all_lwps): New.
13430 * linux-low.h (struct lwp_info): Rewrite comment for the
13431 `suspended' flag. Add the `stop_pc' field. Delete the
13432 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13433 Add `'last_resume_kind' and `need_step_over' fields.
13434 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13435 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13436 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13437 (set_raw_breakpoint_at): New.
13438 (set_breakpoint_at): Rewrite to use it.
13439 (reinsert_breakpoint_handler): Delete.
13440 (set_reinsert_breakpoint): New.
13441 (reinsert_breakpoint_by_bp): Delete.
13442 (delete_reinsert_breakpoints): New.
13443 (uninsert_breakpoint): Rewrite.
13444 (uninsert_breakpoints_at): New.
13445 (reinsert_breakpoint): Rewrite.
13446 (reinsert_breakpoints_at): New.
13447 (check_breakpoints): Rewrite.
13448 (breakpoint_here): New.
13449 (breakpoint_inserted_here): New.
13450 (check_mem_read): Adjust.
13451 * mem-break.h (breakpoints_supported, breakpoint_here)
13452 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13453 (reinsert_breakpoint_by_bp): Delete declaration.
13454 (delete_reinsert_breakpoints): Declare.
13455 (reinsert_breakpoint): Delete declaration.
13456 (reinsert_breakpoints_at): Declare.
13457 (uninsert_breakpoint): Delete declaration.
13458 (uninsert_breakpoints_at): Declare.
13459 (check_breakpoints): Adjust prototype.
13460 * server.h: Adjust include order.
13461 (struct thread_info): Declare here. Add a `last_status' field.
13462
13463 2010-03-23 Michael Snyder <msnyder@vmware.com>
13464
13465 * server.c (crc32): New function.
13466 (handle_query): Add handling for 'qCRC:' request.
13467
13468 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13469
13470 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13471 lwp had been stopped by a watchpoint.
13472
13473 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13474
13475 * server.h (internal_error): Declare.
13476 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13477 * utils.c (internal_error): New function.
13478
13479 2010-03-15 Andreas Schwab <schwab@redhat.com>
13480
13481 * configure.srv: Fix typo setting srv_regobj.
13482
13483 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13484
13485 * linux-low.c (fetch_register): Avoid passing a non string literal
13486 format to `error'.
13487 (usr_store_inferior_registers): Ditto.
13488
13489 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13490
13491 * linux-low.c (linux_write_memory): Bail out early if peeking
13492 memory failed.
13493
13494 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13495
13496 * linux-low.h (struct lwp_info): New fields
13497 `stopped_by_watchpoint' and `stopped_data_address'.
13498 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13499 here, and cache them in the lwp object.
13500 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13501 directly.
13502 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13503 field.
13504 (linux_stopped_by_watchpoint): Rewrite.
13505 (linux_stopped_data_address): Rewrite.
13506
13507 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13508
13509 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13510 switching the current inferior, not before.
13511
13512 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13513
13514 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13515 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13516 i386-linux.c and amd64-linux.c.
13517 (reg-i386.o): Removed.
13518 (reg-i386.c): Likewise.
13519 (reg-i386-linux.o): Likewise.
13520 (reg-i386-linux.c): Likewise.
13521 (reg-x86-64.o): Likewise.
13522 (reg-x86-64.c): Likewise.
13523 (reg-x86-64-linux.o): Likewise.
13524 (reg-x86-64-linux.c): Likewise.
13525 (i386.o): New.
13526 (i386.c): Likewise.
13527 (i386-linux.o): Likewise.
13528 (i386-linux.c): Likewise.
13529 (amd64.o): Likewise.
13530 (amd64.c): Likewise.
13531 (amd64-linux.o): Likewise.
13532 (amd64-linux.c): Likewise.
13533
13534 * configure.srv (srv_i386_regobj): New.
13535 (srv_i386_linux_regobj): Likewise.
13536 (srv_amd64_regobj): Likewise.
13537 (srv_amd64_linux_regobj): Likewise.
13538 (srv_i386_32bit_xmlfiles): Likewise.
13539 (srv_i386_64bit_xmlfiles): Likewise.
13540 (srv_i386_xmlfiles): Likewise.
13541 (srv_amd64_xmlfiles): Likewise.
13542 (srv_i386_linux_xmlfiles): Likewise.
13543 (srv_amd64_linux_xmlfiles): Likewise.
13544 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13545 srv_xmlfiles to $srv_i386_xmlfiles.
13546 (i[34567]86-*-mingw32ce*): Likewise.
13547 (i[34567]86-*-mingw*): Likewise.
13548 (i[34567]86-*-nto*): Likewise.
13549 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13550 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13551 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13552 (x86_64-*-linux*): Likewise.
13553
13554 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13555 (init_registers_amd64_linux): New.
13556 (x86_arch_setup): Replace init_registers_x86_64_linux with
13557 init_registers_amd64_linux.
13558
13559 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13560
13561 * configure.ac: Check for libdl. If it is not available link against
13562 static libthread_db.
13563 * configure: Regenerate.
13564
13565 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13566
13567 PR9605
13568
13569 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13570 handing a read watchpoint.
13571 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13572
13573 2010-02-12 Doug Evans <dje@google.com>
13574
13575 * linux-low.c (linux_supports_tracefork_flag): Document.
13576 (linux_look_up_symbols): Add comment.
13577
13578 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13579
13580 * regcache.c (supply_register): Clear regcache if buf is NULL.
13581
13582 2010-02-02 Nicolas Roche <roche@sourceware.org>
13583 Joel Brobecker <brobecker@adacore.com>
13584
13585 * inferiors.c (find_inferior): Add function documentation.
13586 (unloaded_dll): Handle the case where the unloaded dll has not
13587 been previously registered in the dll list.
13588
13589 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13590
13591 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13592 (thumb2_breakpoint): New.
13593 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13594
13595 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13596
13597 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13598 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13599 breakpoints.
13600
13601 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13602
13603 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13604
13605 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13606
13607 * linux-s390-low.c (s390_collect_ptrace_register)
13608 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13609
13610 2010-01-21 Doug Evans <dje@google.com>
13611
13612 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13613 (PTRACE_ARG4_TYPE): New macro.
13614 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13615 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13616 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13617 (usr_store_inferior_registers): Ditto.
13618 (linux_read_memory, linux_write_memory): Ditto.
13619 (linux_test_for_tracefork): Ditto.
13620
13621 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13622 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13623
13624 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13625
13626 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13627 target.
13628
13629 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13630
13631 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13632 prototype to take a regcache. Adjust.
13633
13634 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13635
13636 * regcache.h (struct thread_info): Forward declare.
13637 (struct regcache): New.
13638 (new_register_cache): Adjust prototype.
13639 (get_thread_regcache): Declare.
13640 (free_register_cache): Adjust prototype.
13641 (registers_to_string, registers_from_string): Ditto.
13642 (supply_register, supply_register_by_name, collect_register)
13643 (collect_register_as_string, collect_register_by_name): Ditto.
13644 * regcache.c (struct inferior_regcache_data): Delete.
13645 (get_regcache): Rename to ...
13646 (get_thread_regcache): ... this. Adjust. Switch inferior before
13647 fetching registers.
13648 (regcache_invalidate_one): Adjust.
13649 (regcache_invalidate): Fix prototype.
13650 (new_register_cache): Return the new register cache.
13651 (free_register_cache): Change prototype.
13652 (realloc_register_cache): Adjust.
13653 (registers_to_string): Change prototype to take a regcache. Adjust.
13654 (registers_from_string): Ditto.
13655 (register_data): Ditto.
13656 (supply_register): Ditto.
13657 (supply_register_by_name): Ditto.
13658 (collect_register): Ditto.
13659 (collect_register_as_string): Ditto.
13660 (collect_register_by_name): Ditto.
13661 * server.c (process_serial_event): Adjust.
13662 * linux-low.h (regset_fill_func, regset_store_func): Change
13663 prototype.
13664 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13665 Change prototype.
13666 * linux-low.c (get_stop_pc): Adjust.
13667 (check_removed_breakpoint): Adjust.
13668 (linux_wait_for_event): Adjust.
13669 (linux_resume_one_lwp): Adjust.
13670 (fetch_register): Add regcache parameter. Adjust.
13671 (usr_store_inferior_registers): Ditto.
13672 (regsets_fetch_inferior_registers): Ditto.
13673 (regsets_store_inferior_registers): Ditto.
13674 (linux_fetch_registers, linux_store_registers): Ditto.
13675 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13676 regcache. Adjust.
13677 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13678 Ditto.
13679 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13680 prototype to take a regcache.
13681 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13682 * remote-utils.c (convert_ascii_to_int, outreg)
13683 (prepare_resume_reply): Change prototype to take a regcache.
13684 Adjust.
13685 * target.h (struct target_ops) <fetch_registers, store_registers>:
13686 Change prototype to take a regcache.
13687 (fetch_inferior_registers, store_inferior_registers): Change
13688 prototype to take a regcache. Adjust.
13689 * proc-service.c (ps_lgetregs): Adjust.
13690 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13691 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13692 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13693 take a regcache. Adjust.
13694 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13695 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13696 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13697 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13698 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13699 (cris_cannot_fetch_register):
13700 (cris_breakpoint_at): Change prototype to take a regcache.
13701 Adjust.
13702 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13703 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13704 to take a regcache. Adjust.
13705 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13706 Adjust.
13707 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13708 take a regcache. Adjust.
13709 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13710 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13711 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13712 * linux-mips-low.c (mips_get_pc):
13713 (mips_set_pc): Change prototype to take a regcache. Adjust.
13714 (mips_reinsert_addr): Adjust.
13715 (mips_collect_register): Change prototype to take a regcache.
13716 Adjust.
13717 (mips_supply_register):
13718 (mips_collect_register_32bit, mips_supply_register_32bit)
13719 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13720 (mips_store_fpregset): Ditto.
13721 * linux-ppc-low.c (ppc_supply_ptrace_register)
13722 (ppc_supply_ptrace_register): Ditto.
13723 (parse_spufs_run): Adjust.
13724 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13725 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13726 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13727 take a regcache. Adjust.
13728 * linux-s390-low.c (s390_collect_ptrace_register)
13729 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13730 (s390_set_pc): Change prototype to take a regcache. Adjust.
13731 (s390_arch_setup): Adjust.
13732 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13733 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13734 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13735 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13736 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13737 regcache. Adjust.
13738 (sparc_breakpoint_at): Adjust.
13739 * linux-xtensa-low.c (xtensa_fill_gregset):
13740 (xtensa_store_gregset):
13741 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13742 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13743 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13744 prototype to take a regcache. Adjust.
13745 * win32-arm-low.c (arm_fetch_inferior_register)
13746 (arm_store_inferior_register): Change prototype to take a
13747 regcache. Adjust.
13748 * win32-i386-low.c (i386_fetch_inferior_register)
13749 (i386_store_inferior_register): Change prototype to take a
13750 regcache. Adjust.
13751 * win32-low.c (child_fetch_inferior_registers)
13752 (child_store_inferior_registers): Change prototype to take a
13753 regcache. Adjust.
13754 (win32_wait): Adjust.
13755 (win32_fetch_inferior_registers): Change prototype to take a
13756 regcache. Adjust.
13757 (win32_store_inferior_registers): Adjust.
13758 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13759 store_inferior_register>: Change prototype to take a regcache.
13760
13761 2010-01-20 Doug Evans <dje@google.com>
13762
13763 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13764 #ifdef.
13765 (linux_wait_for_event1, linux_init_signals): Ditto.
13766 (W_STOPCODE): Provide definition if missing.
13767
13768 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13769
13770 * linux-low.c (linux_core_of_thread): New.
13771 (compare_ints, show_process, list_threads): New.
13772 (linux_qxfer_osdata): Report threads and cores.
13773 (linux_target_op): Register linux_core_of_thread.
13774 * remote-utils.c (prepare_resume_reply): Report the core.
13775 (buffer_xml_printf): Support %d specifier.
13776 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13777 New.
13778 (handle_query): Handle qXfer:threads. Announce availability
13779 thereof.
13780 * target.h (struct target_ops): New field core_of_thread.
13781
13782 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13783
13784 * Makefile.in (clean): Remove new generated files.
13785 (reg-s390.o, reg-s390.c): Remove rules.
13786 (reg-s390x.o, reg-s390x.c): Likewise.
13787 (s390-linux32.o, s390-linux32.c): Add rules.
13788 (s390-linux64.o, s390-linux64.c): Likewise.
13789 (s390x-linux64.o, s390x-linux64.c): Likewise.
13790 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13791 * linux-s390-low.c: Include <elf.h>.
13792 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13793 (init_registers_s390): Remove prototype.
13794 (init_registers_s390x): Likewise.
13795 (init_registers_s390_linux32): Add prototype.
13796 (init_registers_s390_linux64): Likewise.
13797 (init_registers_s390x_linux64): Likewise.
13798 (s390_num_regs_3264): New define.
13799 (s390_regmap_3264): New global variable.
13800 (s390_cannot_fetch_register): Remove obsolete check.
13801 (s390_cannot_store_register): Likewise.
13802 (s390_collect_ptrace_register): Handle upper/lower register halves.
13803 (s390_supply_ptrace_register): Likewise.
13804 (s390_fill_gregset): Update to register number changes.
13805 (s390_get_hwcap): New routine.
13806 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13807 Install appropriate regmap and register set.
13808
13809 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13810
13811 * server.c (gdbserver_version): Update copyright year to 2010.
13812 * gdbreplay.c (gdbreplay_version): Likewise.
13813
13814 2009-12-28 Doug Evans <dje@google.com>
13815
13816 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13817 elf/external.h. Include <elf.h> instead but only if necessary.
13818
13819 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13820
13821 * linux-low.c (linux_remove_process): Remove `detaching'
13822 parameter. Don't release/detach from thread_db here.
13823 (linux_kill): Release/detach from thread_db here, ...
13824 (linux_detach): ... and here, before actually detaching.
13825 (linux_wait_1): ... and here, when a process exits.
13826 * thread-db.c (any_thread_of): New.
13827 (thread_db_free): Switch the current inferior to a thread of the
13828 passed in process.
13829
13830 2009-12-21 Doug Evans <dje@google.com>
13831
13832 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13833
13834 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13835 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13836 warning ifndef __NR_tkill. Move setting of errno there too.
13837 Delete unnecessary resetting of errno after syscall.
13838 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13839
13840 * configure.ac: Check for dladdr.
13841 * config.in: Regenerate.
13842 * configure: Regenerate.
13843 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13844 (try_thread_db_load): Update.
13845
13846 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13847
13848 2009-12-18 Doug Evans <dje@google.com>
13849
13850 * event-loop.c: Include unistd.h if it exists.
13851
13852 * linux-low.c (my_waitpid): Move definition away from being in
13853 between linux_tracefork_child/linux_test_for_tracefork.
13854
13855 * gdb_proc_service.h (psaddr_t): Fix type.
13856 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13857 signature to match glibc.
13858
13859 2009-12-16 Doug Evans <dje@google.com>
13860
13861 * linux-low.c (linux_read_memory): Fix argument to read.
13862
13863 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13864
13865 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13866 events, don't leave current_inferior pointing at null.
13867
13868 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13869
13870 * win32-low.c (LOG): Delete.
13871 (OUTMSG): Output to stderr.
13872 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13873 on compile time LOG macro.
13874 (win32_wait): Fix debug output.
13875
13876 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13877
13878 * win32-low.c (win32_add_one_solib): If the dll name is
13879 "ntdll.dll", prepend the system directory to the dll path.
13880
13881 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13882
13883 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13884
13885 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13886 Vladimir Prus <vladimir@codesourcery.com>
13887
13888 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13889 * configure.ac: Check for __mcoldfire__ and set
13890 gdb_cv_m68k_is_coldfire.
13891 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13892 reg-cf.o and reg-m68k.o.
13893 * configure: Regenerated.
13894
13895 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13896
13897 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13898 Pass it to thread_db_free.
13899 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13900 proper `detaching' argument to linux_remove_process.
13901 * linux-low.h (thread_db_free): Add `detaching' parameter.
13902 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13903 to thread_db_free.
13904 (thread_db_free): Add `detaching' parameter. Only
13905 call td_ta_clear_event if detaching from process.
13906
13907 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13908
13909 * thread-db.c (thread_db_free): Fix typo.
13910
13911 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13912
13913 PR gdb/10838
13914 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13915
13916 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13917
13918 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13919 with an i686 compiler.
13920 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13921 needed.
13922 * configure: Rebuilt.
13923
13924 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13925
13926 PR gdb/10783
13927
13928 * server.c (handle_search_memory_1): Correct read_addr initialization
13929 in loop for searching subsequent chunks.
13930
13931 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13932
13933 * configure.ac: New --with-libthread-db option.
13934 * thread-db.c: Allow direct dependence on libthread_db.
13935 (thread_db_free): Adjust.
13936 * config.in: Regenerate.
13937 * configure: Likewise.
13938
13939 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13940
13941 PR gdb/10757
13942 * thread-db.c (attach_thread): New function.
13943 (maybe_attach_thread): Return success/failure.
13944 (find_new_threads_callback): Adjust.
13945 (thread_db_find_new_threads): Loop until no new threads.
13946
13947 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13948
13949 * proc-service.c (ps_lgetregs): Formatting.
13950
13951 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13952
13953 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13954 * configure.ac: Adjust.
13955 * linux-low.h (struct process_info_private): Move members to struct
13956 thread_db.
13957 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13958 * linux-low.c (linux_remove_process): Adjust.
13959 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13960 * server.c (handle_query): Move code ...
13961 (handle_monitor_command): ... here. New function.
13962 * target.h (struct target_ops): New member.
13963 * thread-db.c (struct thread_db): New.
13964 (libthread_db_search_path): New variable.
13965 (thread_db_create_event, thread_db_enable_reporting)
13966 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13967 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13968 (try_thread_db_load_1, dladdr_to_soname): New functions.
13969 (try_thread_db_load, thread_db_load_search): New functions.
13970 (thread_db_init): Search for libthread_db.
13971 (thread_db_free): New function.
13972 (thread_db_handle_monitor_command): Likewise.
13973 * config.in: Regenerate.
13974 * configure: Regenerate.
13975
13976 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13977
13978 * spu-low.c (spu_kill): Wait for inferior to terminate.
13979 Call clear_inferiors.
13980 (spu_detach): Call clear_inferiors.
13981
13982 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13983
13984 * aclocal.m4: Regenerate.
13985 * config.in: Likewise.
13986 * configure: Likewise.
13987
13988 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13989
13990 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13991 (parse_spufs_run): New function.
13992 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13993 (ppc_breakpoint_at): Handle SPU breakpoints.
13994
13995 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13996
13997 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13998 (SPUFS_MAGIC): Define.
13999 (spu_enumerate_spu_ids): New function.
14000 (linux_qxfer_spu): New function.
14001 (linux_target_ops): Install linux_qxfer_spu.
14002
14003 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14004
14005 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14006 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14007 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14008 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14009 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14010 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14011 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14012 (init_registers_powerpc_cell32l): Add prototype.
14013 (init_registers_powerpc_cell64l): Likewise.
14014 (ppc_arch_setup): Detect Cell/B.E. architecture.
14015
14016 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14017
14018 * Makefile.in (datarootdir): New variable.
14019
14020 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14021
14022 * linux-low.c (linux_write_memory): Update debugging output.
14023 * Makefile.in (clean): Add new descriptions.
14024 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14025 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14026 * configure.srv: Add new files for arm*-*-linux*.
14027 * linux-arm-low.c: Add new declarations.
14028 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14029 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14030 (HWCAP_VFPv3D16): New.
14031 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14032 instead of __IWMMXT__.
14033 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14034 (arm_arch_setup): New.
14035 (target_regsets): Remove #ifdef. Add VFP regset.
14036 (the_low_target): Use arm_arch_setup.
14037
14038 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14039
14040 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14041 the main thread again.
14042
14043 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14044
14045 Adding Neutrino gdbserver.
14046 * configure: Regenerated.
14047 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14048 * configure.srv (i[34567]86-*-nto*): New target.
14049 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14050 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14051 (nto_comctrl) [__QNX__]: New function.
14052 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14053
14054 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14055
14056 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14057 srv_tgtobj.
14058
14059 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14060 Pedro Alves <pedro@codesourcery.com>
14061
14062 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14063 don't support CONTEXT_EXTENDED_REGISTERS.
14064 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14065 (the_low_target): Install them.
14066 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14067 failing with ERROR_PIPE_NOT_CONNECTED.
14068
14069 2009-06-30 Doug Evans <dje@google.com>
14070 Pierre Muller <muller@ics.u-strasbg.fr>
14071
14072 Add h/w watchpoint support to x86-linux, win32-i386.
14073 * Makefile.in (SFILES): Add i386-low.c
14074 (i386_low_h): Define.
14075 (i386-low.o): Add dependencies.
14076 (linux-x86-low.o): Add i386-low.h dependency.
14077 (win32-i386-low.o): Ditto.
14078 * i386-low.c: New file.
14079 * i386-low.h: New file.
14080 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14081 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14082 * linux-low.c (linux_add_process): Initialize arch_private.
14083 (linux_remove_process): Free arch_private.
14084 (add_lwp): Initialize arch_private.
14085 (delete_lwp): Free arch_private.
14086 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14087 provided.
14088 * linux-low.h (process_info_private): New member arch_private.
14089 (lwp_info): New member arch_private.
14090 (linux_target_ops): New members new_process, new_thread,
14091 prepare_to_resume.
14092 (ptid_of): New macro.
14093 * linux-x86-low.c: Include stddef.h, i386-low.h.
14094 (arch_process_info): New struct.
14095 (arch_lwp_info): New struct.
14096 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14097 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14098 (i386_dr_low_get_status): New function.
14099 (x86_insert_point, x86_remove_point): New functions.
14100 (x86_stopped_by_watchpoint): New function.
14101 (x86_stopped_data_address): New function.
14102 (x86_linux_new_process, x86_linux_new_thread): New functions.
14103 (x86_linux_prepare_to_resume): New function.
14104 (the_low_target): Add entries for insert_point, remove_point,
14105 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14106 prepare_to_resume.
14107 * server.c (debug_hw_points): New global.
14108 (monitor_show_help): Document set debug-hw-points.
14109 (handle_query): Process "set debug-hw-points".
14110 * server.h (debug_hw_points): Declare.
14111 (paddress): Declare.
14112 * utils.c (NUMCELLS, CELLSIZE): New macros.
14113 (get_sell, xsnprintf, paddress): New functions.
14114 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14115 remove_point, stopped_by_watchpoint, stopped_data_address.
14116 * win32-i386-low.c: Include i386-low.h.
14117 (debug_reg_state): Replaces dr.
14118 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14119 (i386_dr_low_get_status): New function.
14120 (i386_insert_point, i386_remove_point): New functions.
14121 (i386_stopped_by_watchpoint): New function.
14122 (i386_stopped_data_address): New function.
14123 (i386_initial_stuff): Update.
14124 (get_thread_context,set_thread_context,i386_thread_added): Update.
14125 (the_low_target): Add entries for insert_point,
14126 remove_point, stopped_by_watchpoint, stopped_data_address.
14127 * win32-low.c (win32_insert_watchpoint): New function.
14128 (win32_remove_watchpoint): New function.
14129 (win32_stopped_by_watchpoint): New function.
14130 (win32_stopped_data_address): New function.
14131 (win32_target_ops): Add entries for insert_watchpoint,
14132 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14133 * win32-low.h (win32_target_ops): New members insert_point,
14134 remove_point, stopped_by_watchpoint, stopped_data_address.
14135
14136 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14137
14138 * server.c (process_serial_event): Re-return unsupported, not
14139 error, if the type isn't recognized. Re-allow supporting only
14140 insert or remove packets. Also call require_running for
14141 breakpoints. Add missing break statement to default case. Tidy.
14142 * target.h (struct target_ops): Rename insert_watchpoint to
14143 insert_point, and remove_watchpoint to remove_point.
14144
14145 * linux-low.h (struct linux_target_ops): Likewise.
14146 * linux-low.c (linux_insert_watchpoint): Rename to ...
14147 (linux_insert_point): ... this. Adjust.
14148 (linux_remove_watchpoint): Rename to ...
14149 (linux_remove_point): ... this. Adjust.
14150 (linux_target_ops): Adjust.
14151 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14152 (cris_insert_point): ... this.
14153 (cris_remove_watchpoint): Rename to ...
14154 (cris_remove_point): ... this.
14155 (the_low_target): Adjust.
14156
14157 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14158
14159 * server.c (handle_v_kill): Pass signal_pid to
14160 kill_inferior if multi_process is zero.
14161
14162 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14163
14164 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14165 * target.h (target_ops): Comment for *_watchpoint to make it clear
14166 the functions can get types '0' and '1'.
14167
14168 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14169
14170 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14171 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14172 * regcache.c (get_regcache): Likewise.
14173 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14174 * win32-low.c (child_fetch_inferior_registers): Remove check for
14175 regno 0.
14176
14177 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14178 Pedro Alves <pedro@codesourcery.com>
14179
14180 * target.h (struct target_ops) <supports_multi_process>: New
14181 callback.
14182 (target_supports_multi_process): New.
14183 * server.c (handle_query): Even if GDB reports support, only
14184 enable multi-process if the target also supports it. Report
14185 multi-process support only if the target backend supports it.
14186 * linux-low.c (linux_supports_multi_process): New function.
14187 (linux_target_ops): Install it as target_supports_multi_process
14188 callback.
14189
14190 2009-05-24 Doug Evans <dje@google.com>
14191
14192 Global renaming of find_thread_pid to find_thread_ptid.
14193 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14194 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14195 All callers updated.
14196
14197 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14198 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14199 directly.
14200
14201 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14202 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14203 (linux_resume_one_lwp): Ditto.
14204
14205 2009-05-23 Doug Evans <dje@google.com>
14206
14207 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14208 from struct inferior_list_entry * to struct lwp_info *.
14209 All callers updated.
14210
14211 2009-05-13 Doug Evans <dje@google.com>
14212
14213 * linux-x86-low.c: Don't include assert.h.
14214 (x86_siginfo_fixup): Use fatal, not assert.
14215 (x86_arch_setup): Fix comment.
14216
14217 2009-05-12 Doug Evans <dje@google.com>
14218
14219 Biarch support for i386/amd64 gdbserver.
14220 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14221 Add linux-x86-low.c.
14222 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14223 (linux-x86-low.o): Add.
14224 * linux-x86-64-low.c: Delete.
14225 * linux-i386-low.c: Delete.
14226 * linux-x86-low.c: New file.
14227 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14228 linux-x86-low.o.
14229 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14230 linux-x86-low.o.
14231 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14232 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14233 (linux_child_pid_to_exec_file): New function.
14234 (elf_64_header_p, elf_64_file_p): New functions.
14235 (siginfo_fixup): New function.
14236 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14237 give target a chance to convert layout.
14238 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14239 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14240
14241 2009-05-07 Doug Evans <dje@google.com>
14242
14243 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14244 (regsets_store_inferior_registers): Ditto.
14245
14246 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14247
14248 PR server/10048
14249
14250 * linux-low.c (must_set_ptrace_flags): Delete.
14251 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14252 of the global.
14253 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14254 `lwp->must_set_ptrace_flags' instead.
14255 (linux_wait_for_event_1): Set ptrace options here.
14256 (linux_wait_1): ... not here.
14257
14258 2009-04-30 Doug Evans <dje@google.com>
14259
14260 * inferiors.c (started_inferior_callback): New function.
14261 (attached_inferior_callback): New function.
14262 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14263 * server.c (print_started_pid, print_attached_pid): New functions.
14264 (detach_or_kill_for_exit): New function.
14265 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14266 * server.h (have_started_inferiors_p): Declare.
14267 (have_attached_inferiors_p): Declare.
14268
14269 * inferiors.c (remove_process): Fix memory leak, free process.
14270 * linux-low.c (linux_remove_process): New function.
14271 (linux_kill): Call it instead of remove_process.
14272 (linux_detach, linux_wait_1): Ditto.
14273
14274 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14275
14276 * configure.srv: Add x86 Windows CE target.
14277
14278 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14279
14280 * inferiors.c (get_thread_process): Make global.
14281 * server.h (get_thread_process): Add prototype.
14282 * thread-db.c (find_one_thread): Use get_thread_process
14283 instead of current_process.
14284 (thread_db_get_tls_address): Do not crash if called when
14285 thread layer is not yet initialized.
14286
14287 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14288
14289 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14290 * spu-low.c (current_tid): Rename to ...
14291 (current_ptid): ... this.
14292 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14293 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14294 ptid_get_lwp (current_ptid) instead of current_tid.
14295 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14296 instead of current_tid. Use find_process_pid to verify pid
14297 argument is valid. Pass proper argument to remove_process.
14298 (spu_thread_alive): Compare current_ptid instead of current_tid.
14299 (spu_resume): Likewise.
14300
14301 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14302
14303 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14304 variable.
14305
14306 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14307
14308 Implement the multiprocess extensions, and add linux multiprocess
14309 support.
14310
14311 * server.h (ULONGEST): Declare.
14312 (struct ptid, ptid_t): New.
14313 (minus_one_ptid, null_ptid): Declare.
14314 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14315 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14316 (struct inferior_list_entry): Change `id' type from unsigned from
14317 to ptid_t.
14318 (struct sym_cache, struct breakpoint, struct
14319 process_info_private): Forward declare.
14320 (struct process_info): Declare.
14321 (current_process): Declare.
14322 (all_processes): Declare.
14323 (initialize_inferiors): Declare.
14324 (add_thread): Adjust to use ptid_t.
14325 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14326 (add_process, remove_process, find_thread_pid): Declare.
14327 (find_inferior_id): Adjust to use ptid_t.
14328 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14329 (multi_process): Declare.
14330 (push_event): Adjust to use ptid_t.
14331 (read_ptid, write_ptid): Declare.
14332 (prepare_resume_reply): Adjust to use ptid_t.
14333 (clear_symbol_cache): Declare.
14334 * inferiors.c (all_processes): New.
14335 (null_ptid, minus_one_ptid): New.
14336 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14337 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14338 (add_thread): Change unsigned long to ptid. Remove gdb_id
14339 parameter. Adjust.
14340 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14341 (gdb_id_to_thread): Rename to ...
14342 (find_thread_pid): ... this. Change unsigned long to ptid.
14343 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14344 (loaded_dll, pull_pid_from_list): Adjust.
14345 (add_process, remove_process, find_process_pid)
14346 (get_thread_process, current_process, initialize_inferiors): New.
14347 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14348 (struct target_waitstatus) <related_pid>: Ditto.
14349 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14350 return type to int.
14351 (struct target_ops) <join>: Add `pid' argument.
14352 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14353 (struct target_ops) <wait>: Add `ptid' field. Change return type
14354 to ptid.
14355 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14356 (mywait): Add `ptid' argument. Change return type to ptid_t.
14357 (target_pid_to_str): Declare.
14358 * target.c (set_desired_inferior): Adjust to use ptids.
14359 (mywait): Add new `ptid' argument. Adjust.
14360 (target_pid_to_str): New.
14361 * mem-break.h (free_all_breakpoints): Declare.
14362 * mem-break.c (breakpoints): Delelete.
14363 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14364 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14365 to use per-process breakpoint list.
14366 (free_all_breakpoints): New.
14367 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14368 (symbol_cache, all_symbols_looked_up): Delete.
14369 (hexchars): New.
14370 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14371 read_ptid): New.
14372 (prepare_resume_reply): Change ptid argument's type from unsigned
14373 long to ptid_t. Adjust. Implement W;process and X;process.
14374 (free_sym_cache, clear_symbol_cache): New.
14375 (look_up_one_symbol): Adjust to per-process symbol cache. *
14376 * server.c (cont_thread, general_thread, step_thread): Change type
14377 to ptid_t.
14378 (attached): Delete.
14379 (multi_process): New.
14380 (last_ptid): Change type to ptid_t.
14381 (struct vstop_notif) <ptid>: Change type to ptid_t.
14382 (queue_stop_reply, push_event): Change `ptid' argument's type to
14383 ptid_t.
14384 (discard_queued_stop_replies): Add `pid' argument.
14385 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14386 changes. Don't reference the `attached' global.
14387 (attach_inferior): Adjust to mywait interface changes.
14388 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14389 features. Handle and report "multiprocess+". Handle
14390 "qAttached:PID".
14391 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14392 changes.
14393 (handle_v_kill): New.
14394 (handle_v_stopped): Adjust to use target_pid_to_str.
14395 (handle_v_requests): Allow multiple attaches and runs when
14396 multiprocess extensions are in effect. Handle "vKill".
14397 (myresume): Adjust to use ptids.
14398 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14399 (handle_status): Adjust to discard_queued_stop_replies interface
14400 change.
14401 (first_thread_of, kill_inferior_callback)
14402 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14403 (main): Call initialize_inferiors. Adjust to use ptids, killing
14404 and detaching from all inferiors. Handle multiprocess packet
14405 variants.
14406 * linux-low.h: Include gdb_proc_service.h.
14407 (struct process_info_private): New.
14408 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14409 <lwpid_of>: Use ptid_get_lwp.
14410 (get_lwp_thread): Adjust.
14411 (struct lwp_info): Add `dead' member.
14412 (find_lwp_pid): Declare.
14413 * linux-low.c (thread_db_active): Delete.
14414 (new_inferior): Adjust comment.
14415 (inferior_pid): Delete.
14416 (linux_add_process): New.
14417 (handle_extended_wait): Adjust.
14418 (add_lwp): Change unsigned long to ptid.
14419 (linux_create_inferior): Add process to processes table. Adjust
14420 to use ptids. Don't set new_inferior here.
14421 (linux_attach_lwp): Rename to ...
14422 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14423 it. Adjust to use ptids.
14424 (linux_attach_lwp): New.
14425 (linux_attach): Add process to processes table. Don't set
14426 new_inferior here.
14427 (struct counter): New.
14428 (second_thread_of_pid_p, last_thread_of_process_p): New.
14429 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14430 multiple processes.
14431 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14432 processes. Remove process from process table.
14433 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14434 to multiple processes.
14435 (any_thread_of): New.
14436 (linux_detach): Add `pid' argument, and handle it. Remove process
14437 from processes table.
14438 (linux_join): Add `pid' argument. Handle it.
14439 (linux_thread_alive): Change unsighed long argument to ptid_t.
14440 Consider dead lwps as not being alive.
14441 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14442 threads we're not interested in.
14443 (same_lwp, find_lwp_pid): New.
14444 (linux_wait_for_lwp): Change `pid' argument's type from int to
14445 ptid_t. Adjust.
14446 (linux_wait_for_event): Rename to ...
14447 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14448 from int to ptid_t. Adjust.
14449 (linux_wait_for_event): New.
14450 (linux_wait_1): Add `ptid' argument. Change return type to
14451 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14452 that exit from the process table.
14453 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14454 Adjust.
14455 (mark_lwp_dead): New.
14456 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14457 stopping all threads, mark its main lwp as dead.
14458 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14459 ptids.
14460 (fetch_register, usr_store_inferior_registers)
14461 (regsets_fetch_inferior_registers)
14462 (regsets_store_inferior_registers, linux_read_memory)
14463 (linux_write_memory): Inline `inferior_pid'.
14464 (linux_look_up_symbols): Adjust to use per-process
14465 `thread_db_active'.
14466 (linux_request_interrupt): Adjust to use ptids.
14467 (linux_read_auxv): Inline `inferior_pid'.
14468 (initialize_low): Don't reference thread_db_active.
14469 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14470 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14471 (ps_getpid): Return the pid of the current inferior.
14472 * thread-db.c (proc_handle, thread_agent): Delete.
14473 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14474 per-process data.
14475 (find_one_thread): Change argument type to ptid_t. Adjust to
14476 per-process data.
14477 (maybe_attach_thread): Adjust to per-process data and ptids.
14478 (thread_db_find_new_threads): Ditto.
14479 (thread_db_init): Ditto.
14480 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14481 processes table. Adjust to use ptids.
14482 (spu_kill, spu_detach): Adjust interface. Remove process from
14483 processes table.
14484 (spu_join, spu_thread_alive): Adjust interface.
14485 (spu_wait): Adjust interface. Remove process from processes
14486 table. Adjust to use ptids.
14487 * win32-low.c (current_inferior_tid): Delete.
14488 (current_inferior_ptid): New.
14489 (debug_event_ptid): New.
14490 (thread_rec): Take a ptid. Adjust.
14491 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14492 (child_delete_thread): Ditto.
14493 (do_initial_child_stuff): Add `attached' argument. Add process to
14494 processes table.
14495 (child_fetch_inferior_registers, child_store_inferior_registers):
14496 Adjust.
14497 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14498 (win32_attach): Pass 1 to do_initial_child_stuff.
14499 (win32_kill): Adjust interface. Remove process from processes
14500 table.
14501 (win32_detach): Ditto.
14502 (win32_join): Adjust interface.
14503 (win32_thread_alive): Take a ptid.
14504 (win32_resume): Adjust to use ptids.
14505 (get_child_debug_event): Ditto.
14506 (win32_wait): Adjust interface. Remove exiting process from
14507 processes table.
14508
14509 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14510
14511 Non-stop mode support.
14512
14513 * server.h (non_stop): Declare.
14514 (gdb_client_data, handler_func): Declare.
14515 (delete_file_handler, add_file_handler, start_event_loop):
14516 Declare.
14517 (handle_serial_event, handle_target_event, push_event)
14518 (putpkt_notif): Declare.
14519 * target.h (enum resume_kind): New.
14520 (struct thread_resume): Replace `step' field by `kind' field.
14521 (TARGET_WNOHANG): Define.
14522 (struct target_ops) <wait>: Add `options' argument.
14523 <supports_non_stop, async, start_non_stop>: New fields.
14524 (target_supports_non_stop, target_async): New.
14525 (start_non_stop): Declare.
14526 (mywait): Add `options' argument.
14527 * target.c (mywait): Add `options' argument. Print child exit
14528 notifications here.
14529 (start_non_stop): New.
14530 * server.c (non_stop, own_buf, mem_buf): New globals.
14531 (struct vstop_notif): New.
14532 (notif_queue): New global.
14533 (queue_stop_reply, push_event, discard_queued_stop_replies)
14534 (send_next_stop_reply): New.
14535 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14536 interface changes.
14537 (attach_inferior): In non-stop mode, don't wait for the target
14538 here.
14539 (handle_general_set): Handle QNonStop.
14540 (handle_query): When handling qC, return the current general
14541 thread, instead of the first thread of the list.
14542 (handle_query): If the backend supports non-stop mode, include
14543 QNonStop+ in the qSupported query response.
14544 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14545 and non-stop mode.
14546 (handle_v_attach, handle_v_run): Handle non-stop mode.
14547 (handle_v_stopped): New.
14548 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14549 (myresume): Adjust to use resume_kind. Handle non-stop.
14550 (queue_stop_reply_callback): New.
14551 (handle_status): Handle non-stop mode.
14552 (main): Clear non_stop flag on reconnection. Use the event-loop.
14553 Refactor serial protocol handling from here ...
14554 (process_serial_event): ... to this new function. When GDB
14555 selects any thread, select one here. In non-stop mode, wait until
14556 GDB acks all pending events before exiting.
14557 (handle_serial_event, handle_target_event): New.
14558 * remote-utils.c (remote_open): Install remote_desc in the event
14559 loop.
14560 (remote_close): Remove remote_desc from the event loop.
14561 (putpkt_binary): Rename to...
14562 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14563 (putpkt_binary): New as wrapper around putpkt_binary_1.
14564 (putpkt_notif): New.
14565 (prepare_resume_reply): In non-stop mode, don't change the
14566 general_thread.
14567 * event-loop.c: New.
14568 * Makefile.in (OBJ): Add event-loop.o.
14569 (event-loop.o): New rule.
14570
14571 * linux-low.h (pid_of): Moved here.
14572 (lwpid_of): New.
14573 (get_lwp_thread): Use lwpid_of.
14574 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14575 * linux-low.c (pid_of): Delete.
14576 (inferior_pid): Use lwpid_of.
14577 (linux_event_pipe): New.
14578 (target_is_async_p): New.
14579 (delete_lwp): New.
14580 (handle_extended_wait): Use lwpid_of.
14581 (add_lwp): Don't set lwpid field.
14582 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14583 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14584 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14585 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14586 first. Adjust to linux_wait_for_event interface changes. Use
14587 lwpid_of.
14588 (linux_detach): Don't delete the main lwp here.
14589 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14590 (status_pending_p): Don't consider explicitly suspended lwps.
14591 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14592 pointer. Add OPTIONS argument. Change return type to int. Use
14593 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14594 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14595 pointer. Add status pointer argument. Return a pid instead of a
14596 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14597 changes. In non-stop mode, don't switch to a random thread.
14598 (linux_wait): Rename to...
14599 (linux_wait_1): ... this. Add target_options argument, and handle
14600 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14601 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14602 clean exit and signal exit code. Don't stop all threads in
14603 non-stop mode. In all-stop mode, only stop all threads when
14604 reporting a stop to GDB. Handle explicit thread stop requests.
14605 (async_file_flush, async_file_mark): New.
14606 (linux_wait): New.
14607 (send_sigstop): Use lwpid_of.
14608 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14609 interface changes. In non-stop mode, don't switch to a random
14610 thread.
14611 (linux_resume_one_lwp): Use lwpid_of.
14612 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14613 (linux_resume_one_thread): ... this. Handle resume_stop. In
14614 non-stop mode, don't look for pending flag in all threads.
14615 (resume_status_pending_p): Don't consider explicitly suspended
14616 threads.
14617 (my_waitpid): Reimplement. Emulate __WALL.
14618 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14619 Use lwpid_of.
14620 (sigchld_handler, linux_supports_non_stop, linux_async)
14621 (linux_start_non_stop): New.
14622 (linux_target_ops): Register linux_supports_non_stop, linux_async
14623 and linux_start_non_stop.
14624 (initialize_low): Install SIGCHLD handler.
14625 * thread-db.c (thread_db_create_event, find_one_thread)
14626 (thread_db_get_tls_address): Use lwpid_of.
14627 * win32-low.c (win32_detach): Adjust to use resume_kind.
14628 (win32_wait): Add `options' argument.
14629 * spu-low.c (spu_resume): Adjust to use resume_kind.
14630 (spu_wait): Add `options' argument.
14631
14632 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14633
14634 Decouple target code from remote protocol.
14635
14636 * target.h (enum target_waitkind): New.
14637 (struct target_waitstatus): New.
14638 (struct target_ops) <wait>: Return an unsigned long. Take a
14639 target_waitstatus pointer instead of a char pointer.
14640 (mywait): Likewise.
14641 * target.c (mywait): Change prototype to return an unsigned long.
14642 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14643 * server.h (thread_from_wait, old_thread_from_wait): Delete
14644 declarations.
14645 (prepare_resume_reply): Change prototype to take a
14646 target_waitstatus.
14647 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14648 (last_status, last_ptid): New.
14649 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14650 pid instead of a signal.
14651 (attach_inferior): Remove "status" and "signal" parameters.
14652 Adjust.
14653 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14654 not as an address.
14655 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14656 (handle_v_requests, myresume): Remove "status" and "signal"
14657 parameters. Adjust.
14658 (handle_status): New.
14659 (main): Delete local `status'. Adjust.
14660 * remote-utils.c: Include target.h.
14661 (prepare_resume_reply): Change prototype to take a
14662 target_waitstatus. Adjust.
14663
14664 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14665 interface.
14666 * spu-low.c (spu_wait): Adjust.
14667 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14668 Delete.
14669 (win32_wait): Adjust.
14670
14671 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14672
14673 * target.h (struct thread_resume): Delete leave_stopped member.
14674 (struct target_ops): Add a `n' argument to the `resume' callback.
14675 * server.c (start_inferior): Adjust.
14676 (handle_v_cont, myresume): Adjust.
14677 * linux-low.c (check_removed_breakpoint): Adjust to resume
14678 interface change, and to removed leave_stopped field.
14679 (resume_ptr): Delete.
14680 (struct thread_resume_array): New.
14681 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14682 resume interface change.
14683 (linux_continue_one_thread, linux_queue_one_thread)
14684 (resume_status_pending_p): Check if the resume field is NULL
14685 instead of checking the leave_stopped member.
14686 (linux_resume): Adjust to the target resume interface change.
14687 * spu-low.c (spu_resume): Adjust to the target resume interface
14688 change.
14689 * win32-low.c (win32_detach, win32_resume): Ditto.
14690
14691 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14692
14693 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14694 flag.
14695 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14696 pending.
14697 (linux_continue_one_thread): Only preserve the stepping flag if
14698 there's a pending breakpoint.
14699
14700 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14701
14702 * server.c (main): After the inferior having exited, call
14703 remote_close before exiting gdbserver.
14704
14705 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14706
14707 Fix size of FPSCR in Power 7 processors.
14708 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14709 (PPC_FEATURE_HAS_DFP): New #define.
14710 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14711 size of the FPSCR.
14712
14713 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14714
14715 * server.c (handle_query) Whitespace and formatting.
14716
14717 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14718
14719 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14720 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14721 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14722 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14723 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14724 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14725 Makefile.in, configure.ac: Fix whitespace throughout.
14726 * configure: Regenerate.
14727
14728 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14729
14730 * inferiors.c (find_inferior): Make it safe for the callback
14731 function to delete the currently iterated inferior.
14732
14733 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14734
14735 * Makefile.in (linuw_low_h): Move higher.
14736 (thread-db.o): Depend on $(linux_low_h).
14737
14738 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14739
14740 Rename "process" to "lwp" throughout.
14741
14742 * linux-low.c (all_processes): Rename to...
14743 (all_lwps): ... this.
14744 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14745 (add_process): Rename to ...
14746 (add_lwp): ... this. Adjust.
14747 (linux_create_inferior): Adjust.
14748 (linux_attach_lwp): Adjust.
14749 (linux_attach): Adjust.
14750 (linux_kill_one_process): Rename to ...
14751 (linux_kill_one_lwp): ... this. Adjust.
14752 (linux_kill): Adjust.
14753 (linux_detach_one_process): Rename to ...
14754 (linux_detach_one_lwp): ... this. Adjust.
14755 (linux_detach): Adjust.
14756 (check_removed_breakpoint): Adjust.
14757 (status_pending_p): Adjust.
14758 (linux_wait_for_process): Rename to ...
14759 (linux_wait_for_lwp): ... this. Adjust.
14760 (linux_wait_for_event): Adjust.
14761 (send_sigstop): Adjust.
14762 (wait_for_sigstop): Adjust.
14763 (stop_all_processes): Rename to ...
14764 (stop_all_lwps): ... this.
14765 (linux_resume_one_process): Rename to ...
14766 (linux_resume_one_lwp): ... this. Adjust.
14767 (linux_set_resume_request, linux_continue_one_thread)
14768 (linux_queue_one_thread, resume_status_pending_p)
14769 (usr_store_inferior_registers, regsets_store_inferior_registers)
14770 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14771 Adjust.
14772 * linux-low.h (get_process): Rename to ...
14773 (get_lwp): ... this. Adjust.
14774 (get_thread_process): Rename to ...
14775 (get_thread_lwp): ... this. Adjust.
14776 (get_process_thread): Rename to ...
14777 (get_lwp_thread): ... this. Adjust.
14778 (struct process_info): Rename to ...
14779 (struct lwp_info): ... this.
14780 (all_processes): Rename to ...
14781 (all_lwps): ... this.
14782 * proc-service.c (ps_lgetregs): Adjust.
14783 * thread-db.c (thread_db_create_event, find_one_thread)
14784 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14785
14786 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14787
14788 * server.c (handle_query): Handle "qAttached".
14789
14790 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14791
14792 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14793 GPLv3, update license URL.
14794
14795 2009-03-01 Doug Evans <dje@google.com>
14796
14797 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14798 (server_h): Add gdb_signals.h.
14799 (signals.o): Update.
14800 * server.h (target_signal_from_host,target_signal_to_host_p)
14801 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14802
14803 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14804
14805 * remote-utils.c (getpkt): Also generate remote-debug
14806 information if noack_mode is set.
14807
14808 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14809
14810 * server.c (handle_query): Report qXfer:siginfo:read and
14811 qXfer:siginfo:write as supported and handle them.
14812 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14813 * linux-low.c (linux_xfer_siginfo): New.
14814 (linux_target_ops): Set it.
14815
14816 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14817
14818 * server.c (gdbserver_usage): Mention --remote-debug.
14819 (main): Accept '--remote-debug' switch.
14820
14821 2009-01-18 Doug Evans <dje@google.com>
14822
14823 * regcache.c (new_register_cache): No need to check result of xcalloc.
14824 * server.c (handle_search_memory): Back out calls to xmalloc,
14825 result is checked and error is returned to user upon failure.
14826 (handle_query): Ditto. Add more checks for result of malloc.
14827 (handle_v_cont): Check result of malloc, report error back to
14828 user upon failure.
14829 (handle_v_run): Ditto. Call freeargv.
14830 * server.h (freeargv): Declare.
14831 * utils.c (freeargv): New fn.
14832
14833 2009-01-15 Doug Evans <dje@google.com>
14834
14835 * gdbreplay.c (perror_with_name): Make arg const char *.
14836 * server.h (target_signal_to_name): Make return type const char *.
14837 * thread-db.c (thread_db_err_str): Make return type const char *.
14838 * utils.c (perror_with_name): Make arg const char *.
14839
14840 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14841
14842 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14843 when handling a EXIT_PROCESS_DEBUG_EVENT.
14844
14845 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14846
14847 * gdbreplay.c (gdbreplay_version): Update copyright year.
14848 * server.c (gdbserver_version): Likewise.
14849
14850 2009-01-05 Doug Evans <dje@google.com>
14851
14852 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14853 (handle_extended_wait): Improve comment.
14854
14855 2008-12-13 Doug Evans <dje@google.com>
14856
14857 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14858 * server.h (ATTR_MALLOC): New macro.
14859 (xmalloc,xcalloc,xstrdup): Declare.
14860 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14861 * inferiors.c: Ditto.
14862 * linux-low.c: Ditto.
14863 * mem-break.c: Ditto.
14864 * regcache.c: Ditto.
14865 * remote-utils.c: Ditto.
14866 * server.c: Ditto.
14867 * target.c: Ditto.
14868 * win32-low.c: Ditto.
14869
14870 2008-12-12 Doug Evans <dje@google.com>
14871
14872 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14873 in debugging printf.
14874
14875 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14876
14877 2008-12-09 Doug Evans <dje@google.com>
14878
14879 * linux-low.h (struct process_info): Delete member tid, unused.
14880 * thread-db.c (find_one_thread): Update.
14881 (maybe_attach_thread): Update.
14882
14883 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14884
14885 * target.h (struct target_ops): Add qxfer_osdata member.
14886 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14887 and dirent.h.
14888 (linux_qxfer_osdata): New functions.
14889 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14890 callback.
14891 * server.c (handle_query): Handle "qXfer:osdata:read:".
14892 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14893 (buffer_xml_printf): New functions.
14894 * server.h (struct buffer): New.
14895 (buffer_grow_str, buffer_grow_str0): New macros.
14896 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14897 (buffer_xml_printf): Declare.
14898
14899 2008-11-24 Doug Evans <dje@google.com>
14900
14901 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14902
14903 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14904
14905 * server.c (handle_v_run): Always use the supplied argument list.
14906
14907 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14908
14909 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14910 (xtensa_regmap_table): Add entry for scompare1.
14911
14912 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14913
14914 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14915 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14916 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14917 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14918 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14919 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14920 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14921 XML target descriptions.
14922 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14923 when inferior is running on an ISA 2.05 or later processor. Add
14924 special case to return offset for full 64-bit slot of FPSCR when
14925 in 32-bits.
14926
14927 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14928
14929 * Makefile.in (SFILES, clean): Added sparc64 files.
14930 (reg-sparc64.o, reg-sparc64.c): New.
14931 * configure.srv (sparc*-*-linux*): New configuration.
14932 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14933 syscall arguments for SPARC.
14934 (regsets_store_inferior_registers): Likewise.
14935 * linux-sparc-low.c: New file.
14936
14937 2008-10-21 Doug Evans <dje@google.com>
14938
14939 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14940 (READLINE_DIR,READLINE_DEP): Delete.
14941 (INTERNAL_CFLAGS): Update.
14942 (LINTFLAGS): Update.
14943
14944 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14945
14946 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14947 whole argv from the last run, not just argv[0].
14948
14949 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14950
14951 * regcache.c (new_register_cache): Return NULL if the register
14952 cache size isn't known yet.
14953 (free_register_cache): Avoid dereferencing a NULL regcache.
14954
14955 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14956
14957 * configure.srv: Merge MIPS and MIPS64.
14958
14959 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14960
14961 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14962
14963 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14964
14965 * Makefile.in: Add required vsx dependencies.
14966
14967 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14968 Declare init_registers_powerpc_vsx32l.
14969 Declare init_registers_powerpc_vsx64l.
14970 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14971 (ppc_arch_setup): Check for VSX in hwcap.
14972 (ppc_fill_vsxregset): New function.
14973 (ppc_store_vsxregset): New function.
14974 Add new VSX entry in regset_info target_regsets.
14975
14976 * configure.srv: Add new VSX dependencies.
14977
14978 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14979
14980 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14981 (remote_open): Set or clear transport_is_reliable.
14982 (putpkt_binary): Don't expect acks in noack mode.
14983 (getpkt): Don't send ack/nac in noack mode.
14984 * server.c (handle_general_set): Handle QStartNoAckMode.
14985 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14986 qSupported.
14987 (main): Reset noack_mode on every connection.
14988 * server.h (noack_mode): Declare.
14989
14990 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14991
14992 * Makefile.in (GDBREPLAY_OBS): New variable.
14993 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14994
14995 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14996 Daniel Jacobowitz <dan@codesourcery.com>
14997
14998 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14999 (usr_store_inferior_registers): Likewise.
15000 (regsets_store_inferior_registers): Likewise.
15001
15002 2008-07-31 Rolf Jansen <rj@surtec.com>
15003 Pedro Alves <pedro@codesourcery.com>
15004
15005 * configure.ac: Check for memmem declaration.
15006 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15007 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15008 (disable_packet_qfThreadInfo): Unconditionally compile.
15009 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15010 * configure, config.in: Regenerate.
15011
15012 2008-07-28 Doug Kwan <dougkwan@google.com>
15013
15014 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15015 (linux_write_memory): Remove declaration of errno.
15016
15017 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15018
15019 * linux-low.c (handle_extended_wait): Do not use "status"
15020 variable uninitialized.
15021
15022 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15023
15024 * server.c (handle_v_attach): Inhibit reporting dll changes.
15025
15026 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15027
15028 * remote-utils.c (prepare_resume_reply): If requested, don't
15029 output "thread:TID" in the T stop reply.
15030
15031 * server.c (disable_packet_vCont, disable_packet_Tthread)
15032 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15033 (handle_query): If requested, disable support for qC, qfThreadInfo
15034 and qsThreadInfo.
15035 (handle_v_requests): If requested, disable support for vCont.
15036 (gdbserver_show_disableable): New.
15037 (main): Handle --disable-packet and --disable-packet=LIST.
15038
15039 * server.h (disable_packet_vCont, disable_packet_Tthread)
15040 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15041
15042 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15043
15044 * server.c (gdbserver_usage): Mention --version.
15045
15046 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15047
15048 * Makefile.in (gdbreplay.o): New rule.
15049
15050 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15051
15052 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15053 message, not gdbserver.
15054
15055 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15056 Nathan Sidwell <nathan@codesourcery.com>
15057 Joseph Myers <joseph@codesourcery.com>
15058
15059 * acinclude.m4: Include ../../config/acx.m4.
15060 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15061 * configure, config.in: Regenerate.
15062 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15063 * server.c (gdbserver_version): Print PKGVERSION.
15064 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15065 (main): Adjust gdbserver_usage calls.
15066 * gdbreplay.c (version, host_name): Add declarations.
15067 (gdbreplay_version, gdbreplay_usage): New.
15068 (main): Accept --version and --help options.
15069
15070 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15071
15072 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15073 (arm_breakpoint_at): Handle Thumb.
15074 (the_low_target): Add comment.
15075
15076 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15077
15078 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15079
15080 2008-05-09 Doug Evans <dje@google.com>
15081
15082 * server.h (decode_search_memory_packet): Declare.
15083 * remote-utils.c (decode_search_memory_packet): New fn.
15084 * server.c (handle_search_memory_1): New fn.
15085 (handle_search_memory): New fn.
15086 (handle_query): Process qSearch:memory packets.
15087
15088 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15089
15090 * regcache.c (registers_length): Remove.
15091 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15092 full register packet.
15093 * regcache.h (registers_length): Remove prototype.
15094 * server.h (PBUFSIZ): Define to 16384.
15095
15096 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15097
15098 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15099 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15100 powerpc-64l.o, and powerpc-altivec64l.o.
15101 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15102 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15103 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15104 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15105 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15106 to srv_xmlfiles.
15107
15108 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15109 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15110 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15111 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15112 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15113 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15114 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15115 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15116 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15117 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15118 (clean): Update.
15119
15120 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15121 (init_registers_powerpc_32l): ... this new prototype.
15122 (init_registers_powerpc_32): Remove, replace by ...
15123 (init_registers_powerpc_altivec32l): ... this new prototype.
15124 (init_registers_powerpc_e500): Remove, replace by ...
15125 (init_registers_powerpc_e500l): ... this new prototype.
15126 (init_registers_ppc64): Remove, replace by ...
15127 (init_registers_powerpc_64l): ... this new prototype.
15128 (init_registers_powerpc_64): Remove, replace by ...
15129 (init_registers_powerpc_altivec64l): ... this new prototype.
15130 (ppc_num_regs): Set to 73.
15131 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15132 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15133 (ppc_cannot_store_register): Handle orig_r3 and trap.
15134 (ppc_arch_setup): Update init_registers_... calls.
15135 (ppc_fill_gregset): Handle orig_r3 and trap.
15136
15137 * inferiors.c (clear_inferiors): Reset current_inferior.
15138
15139 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15140
15141 * acinclude.m4: Add override.m4.
15142 * configure: Regenerate.
15143
15144 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15145
15146 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15147 initial call to init_register_ppc64.
15148
15149 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15150
15151 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15152 single powerpc*-*-linux* case.
15153 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15154
15155 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15156
15157 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15158 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15159 from reg_xmlfiles.
15160 * linux-ppc-low.c: Include <elf.h>.
15161 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15162 (ppc_hwcap): New global variable.
15163 (ppc_regmap): Remove __SPE__ #ifdef sections.
15164 (ppc_regmap_e500): New global variable.
15165 (ppc_cannot_store_register): Update __SPE__ special case.
15166 (ppc_get_hwcap): New function.
15167 (ppc_arch_setup): Use it to determine whether inferior supports
15168 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15169 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15170 Do not access registers if target does not support AltiVec.
15171 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15172 Do not access registers if target does not support SPE.
15173 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15174
15175 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15176
15177 * linux-low.c (disabled_regsets, num_regsets): New.
15178 (use_regsets_p): Delete.
15179 (linux_wait_for_process): Clear disabled_regsets.
15180 (regsets_fetch_inferior_registers): Check and set it.
15181 (regsets_store_inferior_registers): Likewise.
15182 (linux_fetch_registers, linux_store_registers): Do not use
15183 use_regsets_p.
15184 (initialize_low): Allocate disabled_regsets.
15185
15186 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15187
15188 * Makefile.in (LIBOBJS): New.
15189 (OBS): Use LIBOBJS.
15190 (memmem.o): New rule.
15191 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15192 * configure: Regenerated.
15193
15194 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15195
15196 * server.c (handle_query): Never return "unsupported" for
15197 qXfer:features:read queries.
15198
15199 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15200
15201 * server.c (get_features_xml): Fix inverted condition.
15202 (handle_query): Always support qXfer:feature:read.
15203
15204 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15205
15206 * server.c (wrapper_argv): New.
15207 (start_inferior): Handle wrapper_argv. If set, expect an extra
15208 trap.
15209 (gdbserver_usage): Document --wrapper.
15210 (main): Parse --wrapper.
15211
15212 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15213
15214 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15215 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15216 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15217 (ppc_set_pc): Likewise.
15218 (ppc_arch_setup): New function.
15219 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15220 of collect_register.
15221 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15222
15223 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15224
15225 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15226 instead of linux-ppc64-low.o.
15227 * linux-ppc64-low.c: Remove file.
15228 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15229 (linux-ppc64-low.o): Remove rule.
15230
15231 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15232 (init_registers_powerpc_64): Likewise.
15233 (ppc_regmap): Conditionally define depending on __powerpc64__.
15234 (ppc_cannot_store_register): Do not special-case "fpscr" when
15235 compiled on __powerpc64__.
15236 (ppc_collect_ptrace_register): New function.
15237 (ppc_supply_ptrace_register): New function.
15238 (ppc_breakpoint): Change type to "unsigned int".
15239 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15240 (the_low_target): Conditionally provide initializers for the
15241 arch_setup member depending on __powerpc64__. Install
15242 collect_ptrace_register and supply_ptrace_register members.
15243
15244 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15245
15246 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15247 * server.c (gdbserver_xmltarget): Define.
15248 (get_features_xml): Use it to replace "target.xml" and arch_string.
15249
15250 * configure.srv: Remove srv_xmltarget. Add XML files that were
15251 mentioned there to srv_xmlfiles instead. Remove conditional tests
15252 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15253 srv_xmlfiles and srv_regobj to include all possible choices.
15254 * configure.ac (srv_xmltarget): Remove.
15255 (srv_xmlfiles): Do not add "target.xml".
15256 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15257 checks for supplementary target information.
15258 * configure: Regenerate.
15259 * Makefile.in (XML_TARGET): Remove.
15260 (target.xml): Remove rule.
15261 (clean): Do not clean up target.xml.
15262 (.PRECIOUS): Do not mention target.xml.
15263
15264 * target.h (struct target_ops): Remove arch_string member.
15265 * linux-low.c (linux_arch_string): Remove.
15266 (linux_target_ops): Remove arch_string initializer.
15267 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15268 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15269 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15270 * spu-low.c (spu_arch_string): Remove.
15271 (spu_target_ops): Remove arch_string initializer.
15272 * win32-low.c (win32_arch_string): Remove.
15273 (win32_target_ops): Remove arch_string initializer.
15274 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15275 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15276 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15277
15278 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15279
15280 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15281 by collect_ptrace_register and supply_ptrace_register hooks.
15282 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15283 instead of checking for the_low_target.left_pad_xfer.
15284 (usr_store_inferior_registers): Use collect_ptrace_register callback
15285 instead of checking for the_low_target.left_pad_xfer.
15286
15287 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15288 (s390_supply_ptrace_register): Likewise.
15289 (s390_fill_gregset): Call s390_collect_ptrace_register.
15290 (the_low_target): Update.
15291
15292 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15293 (ppc_supply_ptrace_register): Likewise.
15294 (the_low_target): Update.
15295
15296 * linux-i386-low.c (the_low_target): Update.
15297 * linux-x86-64-low.c (the_low_target): Update.
15298
15299 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15300
15301 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15302 reg-s390.o and reg-s390x.o.
15303
15304 * linux-low.c (new_inferior): New global variable.
15305 (linux_create_inferior, linux_attach): Set it.
15306 (linux_wait_for_process): Call the_low_target.arch_setup after the
15307 target has stopped for the first time.
15308 (initialize_low): Do not call the_low_target.arch_setup.
15309
15310 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15311 (s390_set_pc): Likewise.
15312 (s390_arch_setup): New function.
15313 (the_low_target): Use s390_arch_setup as arch_setup routine.
15314
15315 * regcache.c (realloc_register_cache): New function.
15316 (set_register_cache): Call it for each existing regcache.
15317
15318 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15319
15320 * server.h (init_registers): Remove prototype.
15321
15322 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15323 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15324 instead of init_registers ().
15325 * linux-arm-low.c (init_registers_arm): Add prototype.
15326 (init_registers_arm_with_iwmmxt): Likewise.
15327 (the_low_target): Add initializer for arch_setup field.
15328 * linux-cris-low.c (init_registers_cris): Add prototype.
15329 (the_low_target): Add initializer for arch_setup field.
15330 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15331 (the_low_target): Add initializer for arch_setup field.
15332 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15333 (the_low_target): Add initializer for arch_setup field.
15334 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15335 (the_low_target): Add initializer for arch_setup field.
15336 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15337 (the_low_target): Add initializer for arch_setup field.
15338 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15339 (the_low_target): Add initializer for arch_setup field.
15340 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15341 (init_registers_mips64_linux): Likewise.
15342 (the_low_target): Add initializer for arch_setup field.
15343 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15344 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15345 (the_low_target): Add initializer for arch_setup field.
15346 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15347 (init_registers_powerpc_64): Likewise.
15348 (the_low_target): Add initializer for arch_setup field.
15349 * linux-s390-low.c (init_registers_s390): Add prototype.
15350 (init_registers_s390x): Likewise.
15351 (the_low_target): Add initializer for arch_setup field.
15352 * linux-sh-low.c (init_registers_sh): Add prototype.
15353 (the_low_target): Add initializer for arch_setup field.
15354 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15355 (the_low_target): Add initializer for arch_setup field.
15356 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15357 (the_low_target): Add initializer for arch_setup field.
15358
15359 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15360 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15361 instead of init_registers ().
15362 * win32-arm-low.c (init_registers_arm): Add prototype.
15363 (the_low_target): Add initializer for arch_setup field.
15364 * win32-i386-low.c (init_registers_i386): Add prototype.
15365 (the_low_target): Add initializer for arch_setup field.
15366
15367 * spu-low.c (init_registers_spu): Add prototype.
15368 (initialize_low): Call initialie_registers_spu () instead of
15369 initialize_registers ().
15370
15371 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15372
15373 * server.c (handle_v_requests): When handling the vRun and vAttach
15374 packets, if already debugging a process, don't kill it. Return an
15375 error instead.
15376
15377 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15378
15379 * server.c (handle_query): Correct length check.
15380
15381 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15382
15383 * win32-low.c (do_initial_child_stuff): Add process handle
15384 parameter. Set current_process_handle and current_process_id from the
15385 parameters. Clear globals.
15386 (win32_create_inferior): Don't set current_process_handle and
15387 current_process_id here. Instead pass them on the call to
15388 do_initial_child_stuff.
15389 (win32_attach): Likewise.
15390 (win32_clear_inferiors): New.
15391 (win32_kill): Don't close the current process handle or the
15392 current thread handle here. Instead call win32_clear_inferiors.
15393 (win32_detach): Don't open a new handle to the process. Call
15394 win32_clear_inferiors.
15395 (win32_join): Don't rely on current_process_handle; open a new
15396 handle using the process id.
15397 (win32_wait): Call win32_clear_inferiors when the inferior process
15398 has exited.
15399
15400 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15401
15402 * server.c (monitor_show_help): Add "exit".
15403
15404 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15405
15406 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15407 (clean): Add reg-xtensa.c.
15408 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15409 * configure.srv (xtensa*-*-linux*) New target.
15410 * linux-xtensa-low.c: New.
15411 * xtensa-xtregs.c: New.
15412
15413 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15414
15415 * hostio.c: Don't include errno.h.
15416 (errno_to_fileio_errno): Move to hostio-errno.
15417 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15418 error number outputting to the target->hostio_last_error callback.
15419 (hostio_packet_error): Use FILEIO_EINVAL directly.
15420 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15421 calls to hostio_error.
15422 * hostio-errno.c: New.
15423 * server.h (hostio_last_error_from_errno): Declare.
15424 * target.h (target_ops): Add hostio_last_error member.
15425 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15426 as hostio_last_error handler.
15427 * spu-low.c (spu_target_ops): Likewise.
15428 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15429 (wince_hostio_last_error): New functions.
15430 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15431 as hostio_last_error handler.
15432 (win32_target_ops) [!_WIN32_WCE]: Register
15433 hostio_last_error_from_errno as hostio_last_error handler.
15434 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15435 (hostio-errno.o): New rule.
15436 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15437 * configure.srv (srv_hostio_err_objs): New variable. Default to
15438 hostio-errno.o.
15439 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15440 * configure: Regenerate.
15441
15442 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15443
15444 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15445 (linux_kill, linux_detach): Clean up the process list.
15446 * remote-utils.c (remote_open): Improve port number parsing.
15447 (putpkt_binary, input_interrupt): Only send interrupts if the target
15448 is running.
15449 * server.c (extended_protocol): Make static.
15450 (attached): Define earlier.
15451 (exit_requested, response_needed, program_argv): New variables.
15452 (target_running): New.
15453 (start_inferior): Clear attached here.
15454 (attach_inferior): Set attached here.
15455 (require_running): Define.
15456 (handle_query): Use require_running and target_running. Implement
15457 "monitor exit".
15458 (handle_v_attach, handle_v_run): New.
15459 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15460 (gdbserver_usage): Update.
15461 (main): Redo argument parsing. Handle --debug and --multi. Handle
15462 --attach along with other options or after the port. Save
15463 program_argv. Support no initial program. Resynchronize
15464 communication with GDB after an error. Handle "monitor exit".
15465 Use require_running and target_running. Always allow the extended
15466 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15467 restart in extended mode.
15468 * README: Refer to the GDB manual. Update --attach usage.
15469
15470 2007-12-20 Andreas Schwab <schwab@suse.de>
15471
15472 * linux-low.c (STACK_SIZE): Define.
15473 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15474 (linux_test_for_tracefork): Likewise.
15475
15476 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15477
15478 * linux-low.c (linux_wait_for_event): Update messages. Do not
15479 reinsert auto-delete breakpoints.
15480 * mem-break.c (struct breakpoint): Change return type of handler to
15481 int.
15482 (set_breakpoint_at): Update handler type.
15483 (reinsert_breakpoint_handler): Return 1 instead of calling
15484 delete_breakpoint.
15485 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15486 setting a new one.
15487 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15488 * mem-break.h (set_breakpoint_at): Update handler type.
15489 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15490 * win32-low.c (auto_delete_breakpoint): New.
15491 (get_child_debug_event): Use it.
15492
15493 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15494
15495 * configure.ac: Check for pread and pwrite.
15496 * hostio.c (handle_pread): Fall back to lseek and read.
15497 (handle_pwrite): Fall back to lseek and write.
15498 * config.in, configure: Regenerated.
15499
15500 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15501
15502 * server.c (myresume): Add own_buf argument.
15503 (main): Update calls.
15504
15505 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15506
15507 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15508 * remote-utils.c (remote_open): Do not call disable_async_io.
15509 (block_async_io): Delete.
15510 (unblock_async_io): Make static.
15511 (initialize_async_io): New.
15512 * server.c (handle_v_cont): Handle async I/O here.
15513 (myresume): Likewise. Move other common resume tasks here...
15514 (main): ... from here. Call initialize_async_io. Disable async
15515 I/O before the main loop.
15516 * server.h (initialize_async_io): Declare.
15517 (block_async_io, unblock_async_io): Delete prototypes.
15518 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15519
15520 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15521
15522 * remote-utils.c (readchar): Allow binary data in received messages.
15523
15524 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15525
15526 * win32-low.c (attaching): New global.
15527 (win32_create_inferior): Clear the `attaching' global.
15528 (win32_attach): Set the `attaching' global.
15529 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15530 attaching. Only set a breakpoint at the entry point if not
15531 attaching.
15532
15533 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15534
15535 * server.c (main): Don't report dll events on the initial
15536 connection on attaches.
15537
15538 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15539
15540 * server.c (main): Relax numerical bases supported for the pid of
15541 the --attach command line argument.
15542
15543 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15544
15545 * win32-low.c (win32_attach): Call OpenProcess before
15546 DebugActiveProcess, not after. Add last error output to error
15547 call.
15548
15549 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15550
15551 * win32-low.c (win32_get_thread_context)
15552 (win32_set_thread_context): New functions.
15553 (thread_rec): Use win32_get_thread_context.
15554 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15555 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15556 field.
15557
15558 2007-12-03 Leo Zayas
15559 Pedro Alves <pedro_alves@portugalmail.pt>
15560
15561 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15562 global variables.
15563 (child_add_thread): Minor cleanup.
15564 (child_continue): Resume artificially suspended threads before
15565 calling ContinueDebugEvent.
15566 (suspend_one_thread): New.
15567 (fake_breakpoint_event): New.
15568 (get_child_debug_event): Change return type to int. Check here if
15569 gdb sent an interrupt request. If a soft interrupt was requested,
15570 fake a breakpoint event. Return 0 if there is no event to handle,
15571 and 1 otherwise.
15572 (win32_wait): Don't check here if gdb sent an interrupt request.
15573 Ensure there is a valid event to handle.
15574 (win32_request_interrupt): Add soft interruption method as last
15575 resort.
15576
15577 2007-12-03 Leo Zayas
15578 Pedro Alves <pedro_alves@portugalmail.pt>
15579
15580 * win32-low.h (win32_thread_info): Add descriptions to the
15581 structure members. Replace `suspend_count' counter by a
15582 `suspended' flag.
15583 * win32-low.c (thread_rec): Update condition of when to get the
15584 context from the inferior. Rely on ContextFlags being set if it
15585 has already been retrieved. Only suspend the inferior thread if
15586 we haven't already. Warn if that fails.
15587 (continue_one_thread): s/suspend_count/suspended/. Only call
15588 ResumeThread once. Warn if that fails.
15589
15590 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15591
15592 * win32-low.c (win32_wait): Don't read from the inferior when it
15593 has already exited.
15594
15595 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15596
15597 * Makefile.in (win32_low_h): New variable.
15598 (win32-low.o): Add dependency on $(win32_low_h).
15599 (win32-arm-low.o, win32-i386-low.o): New rules.
15600
15601 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15602
15603 * hostio.c: Correct copyright year.
15604
15605 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15606
15607 * Makefile.in (OBS): Add hostio.o.
15608 (hostio.o): New rule.
15609 * server.h (handle_vFile): Declare.
15610 * hostio.c: New file.
15611 * server.c (handle_v_requests): Take packet_len and new_packet_len
15612 for binary packets. Call handle_vFile.
15613 (main): Update call to handle_v_requests.
15614
15615 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15616
15617 * linux-low.c: Include <sched.h>.
15618
15619 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15620
15621 * linux-low.c (linux_tracefork_grandchild): New.
15622 (linux_tracefork_child): Use clone.
15623 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15624
15625 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15626
15627 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15628
15629 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15630
15631 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15632
15633 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15634
15635 * inferiors.c (change_inferior_id): Delete.
15636 (add_pid_to_list, pull_pid_from_list): New.
15637 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15638 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15639 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15640 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15641 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15642 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15643 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15644 (using_threads): Always set to 1.
15645 (handle_extended_wait): New.
15646 (add_process): Do not set TID.
15647 (linux_create_inferior): Set must_set_ptrace_flags.
15648 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15649 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15650 (linux_thread_alive): Rename TID argument to LWPID.
15651 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15652 (linux_wait_for_event): Do not use TID or check using_threads. Update
15653 call to dead_thread_notify. Call handle_extended_wait.
15654 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15655 (send_sigstop): Delete sigstop_sent.
15656 (wait_for_sigstop): Avoid TID.
15657 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15658 (linux_test_for_tracefork): New.
15659 (linux_lookup_signals): Use thread_db_active and
15660 linux_supports_tracefork_flag.
15661 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15662 * linux-low.h (get_process_thread): Avoid TID.
15663 (struct process_ifo): Move thread_known and tid to the end. Remove
15664 sigstop_sent.
15665 (linux_attach_lwp, thread_db_init): Update prototypes.
15666 * server.h (change_inferior_id): Delete prototype.
15667 (add_pid_to_list, pull_pid_from_list): New prototypes.
15668 * thread-db.c (thread_db_use_events): New.
15669 (find_first_thread): Rename to...
15670 (find_one_thread): ...this. Update callers and messages. Do not
15671 call fatal. Check thread_db_use_events. Do not call
15672 change_inferior_id or new_thread_notify.
15673 (maybe_attach_thread): Update. Do not call new_thread_notify.
15674 (thread_db_init): Set thread_db_use_events. Check use_events.
15675 * utils.c (fatal, warning): Correct message prefix.
15676
15677 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15678
15679 * Makefile.in (clean): Remove new files.
15680 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15681 (powerpc-64.o, powerpc-64.c): New rules.
15682 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15683 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15684 with SPE.
15685 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15686 SPE targets.
15687 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15688 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15689 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15690 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15691 (target_regsets): Add AltiVec and SPE register sets.
15692 * configure.ac: Check for AltiVec and SPE.
15693 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15694 (ppc_fill_vrregset, ppc_store_vrregset): New.
15695 (target_regsets): Add AltiVec register set.
15696 * configure: Regenerated.
15697
15698 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15699
15700 * linux-low.c (O_LARGEFILE): Define.
15701 (linux_read_memory): Use /proc/PID/mem.
15702 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15703 * configure, config.in: Regenerated.
15704
15705 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15706
15707 * linux-low.c (linux_wait_for_event): Do not pass signals while
15708 single-stepping.
15709
15710 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15711
15712 * win32-low.c (create_process): New.
15713 (win32_create_inferior): Use create_process instead of
15714 CreateProcess. If create_process failed retry appending an ".exe"
15715 suffix. Store the GetLastError result immediatelly after
15716 create_process calls and use it on the call to error.
15717
15718 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15719
15720 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15721
15722 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15723
15724 * configure.ac: Switch license to GPLv3.
15725
15726 2007-08-01 Michael Snyder <msnyder@access-company.com>
15727
15728 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15729
15730 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15731
15732 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15733 typedef.
15734 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15735 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15736 CloseToolhelp32Snapshot.
15737 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15738 CloseToolhelp32Snapshot.
15739
15740 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15741
15742 * server.c (main): Check for inferior exit before main loop.
15743
15744 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15745
15746 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15747 instead of on tmp_desc.
15748
15749 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15750 Daniel Jacobowitz <dan@codesourcery.com>
15751
15752 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15753 (add_thread): Minor cleanups.
15754 (clear_inferiors): Move lower in the file. Clear the DLL
15755 list.
15756 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15757 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15758 (xml_escape_text): New.
15759 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15760 for qSupported.
15761 (handle_v_cont): Report errors.
15762 (gdbserver_version): Update.
15763 (main): Correct size of own_buf. Do not report initial DLL events.
15764 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15765 (unloaded_dll, xml_escape_text): New.
15766 * win32-low.c (enum target_waitkind): Update comments.
15767 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15768 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15769 (win32_EnumProcessModules, win32_GetModuleInformation)
15770 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15771 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15772 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15773 (win32_Module32First, win32_Module32Next, load_toolhelp)
15774 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15775 (get_child_debug_event): Handle DLL events.
15776 (win32_wait): Likewise.
15777
15778 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15779
15780 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15781 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15782
15783 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15784
15785 * win32-low.c (handle_output_debug_string): Ignore event if not
15786 waiting.
15787
15788 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15789
15790 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15791
15792 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15793
15794 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15795
15796 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15797
15798 * inferiors.c (change_inferior_id): Add comment.
15799 * linux-low.c (check_removed_breakpoint): Add an early
15800 prototype. Improve debug output.
15801 (linux_attach): Doc update.
15802 (linux_detach_one_process, linux_detach): Clean up before releasing
15803 each process.
15804 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15805 * linux-low.h (struct process_info): Doc improvement.
15806 * mem-break.c (delete_all_breakpoints): New.
15807 * mem-break.h (delete_all_breakpoints): New prototype.
15808 * thread-db.c (find_first_thread): New.
15809 (thread_db_create_event): Call it instead of
15810 thread_db_find_new_threads. Clean up unused variables.
15811 (maybe_attach_thread): Remove first thread handling.
15812 (thread_db_find_new_threads): Use find_first_thread.
15813 (thread_db_get_tls_address): Likewise.
15814
15815 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15816
15817 * thread-db.c (thread_db_find_new_threads): Add prototype.
15818 (thread_db_create_event): Check for the main thread before adding
15819 a new thread.
15820 (maybe_attach_thread): Only enable event reporting if TID == 0.
15821 (thread_db_get_tls_address): Check for new threads.
15822
15823 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15824
15825 * linux-low.c (linux_create_inferior): Try execv before execvp.
15826 * spu-low.c (spu_create_inferior): Likewise.
15827
15828 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15829
15830 * linux-low.c (linux_create_inferior): Change execv to execvp.
15831 * spu-low.c (spu_create_inferior): Likewies.
15832
15833 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15834
15835 * Makefile.in (clean): Clean new files instead of deleted ones.
15836 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15837 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15838 rules.
15839 * configure.srv: Specify XML files and new regformats for MIPS and
15840 MIPS64 GNU/Linux.
15841 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15842 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15843 an entry for the restart register.
15844 (mips_cannot_fetch_register, mips_cannot_store_register)
15845 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15846 register names to match the XML descriptions.
15847 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15848 restart register instead of $0.
15849
15850 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15851 Markus Deuling <deuling@de.ibm.com>
15852
15853 * remote-utils.c (decode_xfer_write): New function.
15854 * server.h (decode_xfer_write): Add prototype.
15855 * server.c (handle_query): Add PACKET_LEN argument. Support
15856 qXfer:spu:read and qXfer:spu:write packets.
15857 (main): Pass packet_len to handle_query.
15858 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15859 * target.h (target_ops): Add qxfer_spu.
15860
15861 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15862
15863 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15864 accessing non-seekable spufs files.
15865
15866 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15867
15868 * server.c (handle_query): Add reply for qC packet.
15869
15870 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15871 Leo Zayas <lerele@champenstudios@com>
15872
15873 * server.h (check_remote_input_interrupt_request): New function.
15874 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15875 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15876 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15877 (check_remote_input_interrupt_request): New function.
15878 * server.h (check_remote_input_interrupt_request): Declare.
15879 * win32-low.c (winapi_DebugBreakProcess,
15880 winapi_GenerateConsoleCtrlEvent): New typedefs.
15881 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15882 to 250 ms.
15883 (win32_wait): Check for remote interrupt request
15884 with check_remote_input_interrupt_request.
15885 (win32_request_interrupt): New function.
15886 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15887
15888 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15889
15890 * win32-low.c (debug_registers_changed,
15891 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15892 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15893 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15894 (thread_rec): Get context using the low target.
15895 (child_add_thread): Call thread_added on the low target,
15896 which does the same thing.
15897 (regptr): Delete.
15898 (do_initial_child_stuff): Remove debug registers references.
15899 Set context using the low target. Resume threads after
15900 setting the contexts.
15901 (child_continue): Remove dead variable. Remove debug
15902 registers references.
15903 (child_fetch_inferior_registers): Go through the low target.
15904 (do_child_store_inferior_registers): Remove.
15905 (child_store_inferior_registers): Go through the low target.
15906 (win32_resume): Remove debug registers references.
15907 Set context using the low target.
15908 (handle_exception): Change return type to void. Don't record
15909 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15910 first chance exception.
15911 (get_child_debug_event): Change return type to void. Remove
15912 goto loop. Always return after waiting for debug event.
15913 (win32_wait): Convert to switch statement. Handle spurious
15914 events.
15915
15916 * win32-i386-low.c (debug_registers_changed,
15917 debug_registers_used): New.
15918 (initial_stuff): Rename to ...
15919 (i386_initial_stuff): ... this. Clear debug registers
15920 state variables.
15921 (store_debug_registers): Delete.
15922 (i386_get_thread_context): New.
15923 (load_debug_registers): Delete.
15924 (i386_set_thread_context): New.
15925 (i386_thread_added): New.
15926 (single_step): Rename to ...
15927 (i386_single_step): ... this.
15928 (do_fetch_inferior_registers): Rename to ...
15929 (i386_fetch_inferior_register): ... this.
15930 (i386_store_inferior_register): New.
15931 (the_low_target): Adapt to new interface.
15932
15933 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15934 (arm_get_thread_context): New.
15935 (arm_set_thread_context): New.
15936 (regptr): New.
15937 (do_fetch_inferior_registers): Rename to ...
15938 (arm_fetch_inferior_register): ... this.
15939 (arm_store_inferior_register): New.
15940 (arm_wince_breakpoint): Reimplement as unsigned long.
15941 (arm_wince_breakpoint_len): Define.
15942 (the_low_target): Adapt to new interface.
15943
15944 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15945 load_debug_registers. Add get_thread_context, set_thread_context,
15946 thread_added and store_inferior_register. Rename
15947 fetch_inferior_registers to fetch_inferior_register.
15948 (regptr): Remove declaration.
15949
15950 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15951
15952 * linux-low.c (linux_detach): Change return type to int. Return 0.
15953 * spu-low.c (spu_detach): Likewise.
15954
15955 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15956
15957 * target.h (target_ops): Change return type of detach to int.
15958 Add join.
15959 (join_inferior): New.
15960 * server.c (main): Don't skip detach support on mingw32.
15961 If the inferior doesn't support detaching return error.
15962 Call join_inferior instead of using waitpid.
15963 * linux-low.c (linux_join): New.
15964 (linux_target_op): Add linux_join.
15965 * spu-low.c (spu_join): New.
15966 (spu_target_ops): Add spu_join.
15967 * win32-low.c (win32_detach): Adapt to new interface.
15968 Reopen current_process_handle before detaching. Issue a child
15969 resume before detaching.
15970 (win32_join): New.
15971 (win32_target_op): Add win32_join.
15972
15973 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15974
15975 * win32-low.c (win32-attach): Fix return value.
15976 * target.h (target_ops): Describe ATTACH return values.
15977
15978 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15979
15980 * win32-low.c (GETPROCADDRESS): Define.
15981 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15982 (winapi_DebugSetProcessKillOnExit): Likewise.
15983 (win32_create_inferior): Force usage of ansi CreateProcessA.
15984 (win32_attach): Use GETPROCADDRESS.
15985 (win32_detach): Likewise.
15986
15987 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15988
15989 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15990
15991 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15992
15993 * win32-low.c: Commit leftover changes from 2007-03-29.
15994
15995 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15996
15997 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15998 fields short instead of int. Add explicit padding.
15999 (i387_cache_to_fsave): Remove unnecessary casts.
16000 (i387_fsave_to_cache): Doc fix.
16001 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16002
16003 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16004
16005 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16006 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16007
16008 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16009
16010 * configure.srv (arm*-*-mingw32ce*): Move near the other
16011 arm targets.
16012
16013 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16014
16015 * configure.ac: Add errno checking.
16016 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16017 sys/file.h and malloc.h.
16018 (AC_CHECK_DECLS): Add perror.
16019 (srv_mingwce): Handle.
16020 * configure.srv (i[34567]86-*-cygwin*): Add
16021 win32-i386-low.o to srv_tgtobj.
16022 (i[34567]86-*-mingw*): Likewise.
16023 (arm*-*-mingw32ce*): Add case.
16024 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16025 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16026 [__MINGW32CE__] (strerror): New function.
16027 [__MINGW32CE__] (errno): Define to GetLastError.
16028 [__MINGW32CE__] (COUNTOF): New macro.
16029 (remote_open): Remove extra close call.
16030 * mem-break.c (delete_breakpoint_at): New function.
16031 * mem-break.h (delete_breakpoint_at): Declare.
16032 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16033 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16034 [USE_WIN32API] (read, write): Add char* casts.
16035 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16036 * server.h: Include wincecompat.h on Windows CE.
16037 [HAVE_ERRNO_H]: Check.
16038 (perror): Declare if not declared.
16039 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16040 (perror_with_name): Remove errno declaration.
16041 * wincecompat.h: New.
16042 * wincecompat.c: New.
16043 * win32-low.h: New.
16044 * win32-arm-low.c: New.
16045 * win32-i386-low.c: New.
16046 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16047 (OUTMSG2): Make it safe.
16048 (_T): New macro.
16049 (COUNTOF): New macro.
16050 (NUM_REGS): Get it from the low target.
16051 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16052 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16053 (thread_rec): Let low target handle debug registers.
16054 (child_add_thread): Likewise.
16055 (child_init_thread_list): Likewise.
16056 (continue_one_thread): Likewise.
16057 (regptr): New.
16058 (do_child_fetch_inferior_registers): Move to ...
16059 * win32-i386-low.c: ... here, and rename to ...
16060 (do_fetch_inferior_registers): ... this.
16061 * win32-low.c (child_fetch_inferior_registers):
16062 Go through the low target.
16063 (do_child_store_inferior_registers): Use regptr.
16064 (strwinerror): New function.
16065 (win32_create_inferior): Handle Windows CE.
16066 Use strwinerror instead of strerror on Windows error
16067 codes. Add program to the error output.
16068 Don't close the main thread handle on Windows CE.
16069 (win32_attach): Use coredll.dll on Windows CE.
16070 (win32_kill): Close current process and current
16071 thread handles.
16072 (win32_detach): Use coredll.dll on Windows CE.
16073 (win32_resume): Let low target handle debug registers, and
16074 step request.
16075 (handle_exception): Add/Remove initial breakpoint. Avoid
16076 non-existant WSTOPSIG on Windows CE.
16077 (win32_read_inferior_memory): Cast to remove warning.
16078 (win32_arch_string): Go through the low target.
16079 (initialize_low): Call set_breakpoint_data with the low
16080 target's breakpoint.
16081 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16082 FOP_REGNUM, mappings): Move to ...
16083 * win32-i386-low.c: ... here.
16084 * win32-low.c (win32_thread_info): Move to ...
16085 * win32-low.h: ... here.
16086 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16087 win32-arm-low.c and wincecompat.c.
16088 (all:): Add $EXEEXT.
16089 (install-only:): Likewise.
16090 (gdbserver:): Likewise.
16091 (gdbreplay:): Likewise.
16092 * config.in: Regenerate.
16093 * configure: Regenerate.
16094
16095 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16096
16097 * win32-low.c: Rename typedef thread_info to
16098 win32_thread_info throughout.
16099
16100 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16101
16102 * win32-i386-low.c: Rename to ...
16103 * win32-low.c: ... this.
16104 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16105 * Makefile.in: Likewise.
16106
16107 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16108
16109 * remote-utils.c (monitor_output): Constify msg parameter.
16110 * server.h (monitor_output): Likewise.
16111 * win32-i386-low.c (handle_output_debug_string): New.
16112 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16113 handle_output_debug_string.
16114 (get_child_debug_event): Likewise.
16115
16116 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16117
16118 * server.c (main): Correct strtoul check.
16119
16120 2007-03-27 Jon Ringle <jon@ringle.org>
16121
16122 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16123
16124 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16125
16126 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16127
16128 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16129
16130 * terminal.h: Check HAVE_SGTTY_H.
16131
16132 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16133
16134 * remote-utils.c (remote_open): Print out the assigned port number.
16135
16136 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16137
16138 * remote-utils.c (monitor_output): New function.
16139 * server.c (debug_threads): Define here.
16140 (monitor_show_help): New function.
16141 (handle_query): Handle qRcmd.
16142 (main): Do not handle 'd' packet.
16143 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16144 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16145 of debug_threads.
16146
16147 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16148
16149 * Makefile.in (EXEEXT): New.
16150 (clean): Use $(EXEEXT).
16151
16152 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16153
16154 * target.h (target_ops): Rename send_signal to request_interrupt,
16155 and remove enum target_signal parameter.
16156 * linux-low.c (linux_request_interrupt): Rename from
16157 linux_send_signal, and always send SIGINT.
16158 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16159 and always send SIGINT.
16160 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16161 of send_signal.
16162 (input_interrupt): Likewise.
16163
16164 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16165
16166 * server.c (get_features_xml): Check if target implemented
16167 arch_string.
16168 * win32-i386-low.c (win32_arch_string): New.
16169 (win32_target_ops): Add win32_arch_string as arch_string member.
16170
16171 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16172
16173 * spu-low.c (spu_arch_string): New.
16174 (spu_target_ops): Add spu_arch_string.
16175
16176 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16177
16178 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16179 * configure.ac: Do not check for terminal.h.
16180 * configure, config.in: Regenerated.
16181
16182 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16183
16184 * Makefile.in (OBS): Add $(XML_BUILTIN).
16185 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16186 (clean): Update.
16187 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16188 (arm-with-iwmmxt.c): New.
16189 * config.in, configure: Regenerate.
16190 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16191 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16192 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16193 (arm*-*-linux*): Add iWMMXt and regset support.
16194 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16195 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16196 (arm_store_wmmxregset, target_regsets): New.
16197 * server.c (get_features_xml): Take annex argument. Check builtin
16198 XML documents.
16199 (handle_query): Handle multiple annexes.
16200
16201 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16202
16203 * remote-utils.c [USE_WIN32API] (read, write): Define.
16204 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16205 write.
16206
16207 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16208
16209 * linux-i386-low.c (the_low_target): Set arch_string.
16210 * linux-x86-64-low.c (the_low_target): Likewise.
16211 * linux-low.c (linux_arch_string): New.
16212 (linux_target_ops): Add it.
16213 * linux-low.h (struct linux_target_ops): Add arch_string.
16214 * server.c (write_qxfer_response): Use const void * for DATA.
16215 (get_features_xml): New.
16216 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16217 * target.h (struct target_ops): Add arch_string method.
16218
16219 2007-01-03 Denis Pilat <denis.pilat@st.com>
16220 Daniel Jacobowitz <dan@codesourcery.com>
16221
16222 * linux-low.c (linux_kill): Handle being called with no threads.
16223 * win32-i386-low.c (win32_kill): Likewise.
16224 (get_child_debug_event): Clear current_process_handle.
16225
16226 2006-12-30 Denis PILAT <denis.pilat@st.com>
16227 Daniel Jacobowitz <dan@codesourcery.com>
16228
16229 * remote-utils.c (remote_open): Check the type of specified
16230 serial port devices before opening them.
16231 * server.c (main): Kill the inferior if an error occurs during
16232 the first remote_open.
16233
16234 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16235
16236 * README: Update supported targets.
16237
16238 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16239
16240 * Makefile.in (clean): Remove reg-mips64.c.
16241 (reg-mips64.c, reg-mips64.o): New rules.
16242 * configure.srv: Handle mips64. Include regset support for mips.
16243 * linux-mips-low.c (union mips_register): New.
16244 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16245 (mips_breakpoint, mips_breakpoint_at): Use int.
16246 (mips_collect_register, mips_supply_register)
16247 (mips_collect_register_32bit, mips_supply_register_32bit)
16248 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16249 (mips_store_fpregset, target_regsets): New.
16250 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16251
16252 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16253
16254 * configure.srv: Add target "spu*-*-*".
16255 * Makefile.in (clean): Remove reg-spu.c.
16256 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16257 * spu-low.c: New file.
16258
16259 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16260
16261 * configure.ac: Correct td_thr_tls_get_addr test.
16262 * configure: Regenerated.
16263
16264 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16265
16266 * linux-low.c (linux_wait_for_event): Reformat. Use the
16267 pass_signals array.
16268 * remote-utils.c (decode_address_to_semicolon): New.
16269 * server.c (pass_signals, handle_general_set): New.
16270 (handle_query): Mention QPassSignals for qSupported.
16271 (main): Call handle_general_set.
16272 * server.h (pass_signals, decode_address_to_semicolon): New.
16273
16274 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16275
16276 * server.c (handle_query): Correct error handling for read_auxv.
16277
16278 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16279
16280 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16281 and srv_linux_thread_db to yes.
16282 * linux-s390-low.c (s390_fill_gregset): New function.
16283 (target_regsets): Define data structure.
16284
16285 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16286
16287 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16288 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16289 * config.in, configure: Regenerated.
16290 * inferiors.c (gdb_id_to_thread): New function.
16291 (gdb_id_to_thread_id): Use it.
16292 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16293 * linux-low.h (struct process_info): Add th member.
16294 (thread_db_get_tls_address): New prototype.
16295 * remote-utils.c (decode_address): Make non-static.
16296 * server.c (handle_query): Handle qGetTLSAddr.
16297 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16298 * target.h (struct target_ops): Add get_tls_address.
16299 * thread-db.c (maybe_attach_thread): Save the thread handle.
16300 (thread_db_get_tls_address): New.
16301
16302 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16303
16304 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16305 (linux_resume_one_process): Take a siginfo_t *. Update all
16306 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16307 (struct pending_signals): Add a siginfo_t.
16308 (linux_wait_for_process): Always set last_status.
16309 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16310 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16311 * linux-low.h (struct process_info): Add last_status.
16312
16313 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16314
16315 * remote-utils.c (try_rle): New function.
16316 (putpkt_binary): Use it.
16317
16318 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16319
16320 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16321 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16322 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16323 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16324 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16325 point registers.
16326
16327 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16328
16329 * server.c (terminal_fd): New variable.
16330 (old_foreground_pgrp): Likewise.
16331 (restore_old_foreground_pgrp): New function.
16332 (start_inferior): Record the terminal file descriptor in terminal_fd
16333 and its original foreground group in old_foreground_pgrp. Register
16334 restore_old_foreground_pgrp with atexit().
16335
16336 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16337
16338 * server.c (handle_query): Correct qPart to qXfer.
16339
16340 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16341
16342 * configure.ac: Check for more headers which are missing on
16343 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16344 * configure.srv: Add Cygwin and mingw32.
16345 * remote-utils.c: Don't include headers unconditionally which
16346 are missing on mingw32. Include <winsock.h> for mingw32.
16347 (remote_open): Adjust for mingw32 support. Flush
16348 standard error after writing to it.
16349 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16350 (unblock_async_io, enable_async_io, disable_async_io)
16351 (readchar, getpkt): Update for Winsock support.
16352 (prepare_resume_reply): Expect a protocol signal number.
16353 * server.c: Disable <sys/wait.h> on mingw32.
16354 (start_inferior): Adjust for mingw32 support. Flush
16355 standard error after writing to it.
16356 (attach_inferior): Likewise. Use protocol signal
16357 numbers.
16358 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16359 and names.
16360 * win32-i386-low.c: New file.
16361 * Makefile.in (XM_CLIBS): Set.
16362 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16363 (win32-i386-low.o): New dependency rule.
16364 * linux-low.c (linux_wait): Use target signal numbers.
16365 * target.h (struct target_ops): Doc fix.
16366 * server.h (target_signal_to_name): New prototype.
16367 * gdbreplay.c: Don't include headers unconditionally which
16368 are missing on mingw32. Include <winsock.h> for mingw32.
16369 (remote_close, remote_open): Adjust for Winsock support.
16370 * configure, config.in: Regenerated.
16371
16372 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16373
16374 * server.c (decode_xfer_read, write_qxfer_response): New.
16375 (handle_query): Take a packet length argument. Handle
16376 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16377 the qSupported response.
16378 (main): Update call to handle_query.
16379
16380 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16381
16382 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16383 (putpkt_binary): Renamed from putpkt and adjusted for binary
16384 data.
16385 (putpkt): New wrapper for putpkt_binary.
16386 (readchar): Don't mask off the high bit.
16387 (decode_X_packet): New function.
16388 * server.c (main): Call putpkt_binary if a handler sets the packet
16389 length. Save the length of the incoming packet. Handle 'X'.
16390 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16391
16392 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16393
16394 * server.c (handle_query): Handle qSupported.
16395
16396 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16397
16398 * remote-utils.c (all_symbols_looked_up): New variable.
16399 (look_up_one_symbol): Check it.
16400 * server.h (look_up_one_symbol): New declaration.
16401 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16402
16403 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16404
16405 * Makefile.in (linux-arm-low.o): Update dependencies.
16406 * linux-arm-low.c: Include "gdb_proc_service.h".
16407 (PTRACE_GET_THREAD_AREA): Define.
16408 (ps_get_thread_area): New function.
16409
16410 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16411
16412 * configure.srv (m68k*-*-uclinux*): New target.
16413 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16414 (linux_resume_one_process): Remove extraneous cast.
16415 (linux_read_offsets): New.
16416 (linux_target_op): Add linux_read_offsets on mmuless systems.
16417 * server.c (handle_query): Add qOffsets logic.
16418 * target.h (struct target_ops): Add read_offsets.
16419
16420 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16421
16422 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16423 (PTRACE_GET_THREAD_AREA): Define.
16424 (ps_get_thread_area): New function.
16425 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16426 (linux-x86-64-low.o): Update.
16427
16428 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16429
16430 * configure.ac: Remove checks for prfpregset_t.
16431 * gdb_proc_service.h: New file.
16432 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16433 new "gdb_proc_service.h".
16434 * proc-service.c: Likewise.
16435 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16436 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16437 * Makefile.in (gdb_proc_service_h): Updated.
16438 * configure, config.in: Regenerated.
16439
16440 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16441
16442 * remote-utils.c (prepare_resume_reply): Move declaration
16443 of gdb_id_from_wait to the top of the block.
16444
16445 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16446
16447 * linux-low.c (regsets_store_inferior_registers): Read the regset
16448 from the target before filling it.
16449
16450 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16451
16452 * server.c (attach_inferior): Return SIGTRAP for a successful
16453 attach.
16454
16455 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16456
16457 * Makefile.in (OBS): Add version.o.
16458 (STAGESTUFF): Delete.
16459 (version.o): Add dependencies.
16460 (version.c): Replace rule.
16461 (clean): Remove version.c.
16462 * server.c (gdbserver_version): New.
16463 (gdbserver_usage): Use printf.
16464 (main): Handle --version and --help.
16465 * server.h (version, host_name): Add declarations.
16466
16467 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16468
16469 * linux-arm-low.c:
16470 * linux-arm-low.c:
16471 * inferiors.c:
16472 * i387-fp.h:
16473 * i387-fp.c:
16474 * gdbreplay.c:
16475 * regcache.c:
16476 * proc-service.c:
16477 * mem-break.h:
16478 * mem-break.c:
16479 * linux-x86-64-low.c:
16480 * linux-sh-low.c:
16481 * linux-s390-low.c:
16482 * linux-ppc64-low.c:
16483 * linux-ppc-low.c:
16484 * linux-mips-low.c:
16485 * linux-m68k-low.c:
16486 * linux-m32r-low.c:
16487 * linux-low.h:
16488 * linux-low.c:
16489 * linux-ia64-low.c:
16490 * linux-i386-low.c:
16491 * linux-crisv32-low.c:
16492 * thread-db.c:
16493 * terminal.h:
16494 * target.h:
16495 * target.c:
16496 * server.h:
16497 * server.c:
16498 * remote-utils.c:
16499 * regcache.h:
16500 * utils.c:
16501 * Makefile.in:
16502 * configure.ac:
16503 * gdbserver.1: Add (C) after Copyright. Update the FSF
16504 address.
16505
16506 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16507
16508 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16509 (arm_breakpoint_at): Recognize both breakpoints.
16510 (the_low_target): Use the correct breakpoint instruction.
16511
16512 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16513
16514 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16515 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16516 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16517 (the_low_target): Update.
16518
16519 2005-10-25 Andreas Schwab <schwab@suse.de>
16520
16521 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16522
16523 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16524 (ia64_num_regs): Reduce to 462.
16525
16526 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16527
16528 * acinclude.m4: Correct quoting.
16529 * aclocal.m4: Regenerated.
16530
16531 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16532 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16533 (thread_db_init): Call thread_db_err_str.
16534 * configure.ac: Check for TD_VERSION.
16535 * config.in, configure: Regenerated.
16536
16537 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16538
16539 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16540
16541 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16542
16543 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16544 is not available. Define HAVE_PTRACE_GETREGS if it is.
16545 * config.in, configure: Regenerated.
16546 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16547 * linux-i386-low.c, linux-m68k-low.c: Update to use
16548 HAVE_PTRACE_GETREGS.
16549 * linux-low.c (regsets_fetch_inferior_registers)
16550 (regsets_store_inferior_registers): Only return 0 if we processed
16551 GENERAL_REGS.
16552 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16553 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16554
16555 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16556
16557 * inferiors.c (struct thread_info): Add gdb_id.
16558 (add_thread): Add gdb_id argument.
16559 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16560 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16561 calls to add_thread.
16562 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16563 * server.c (handle_query): Use thread_to_gdb_id.
16564 (handle_v_cont, main): Use gdb_id_to_thread_id.
16565 * server.h (add_thread): Update prototype.
16566 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16567 prototypes.
16568
16569 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16570
16571 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16572 left-padded registers.
16573 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16574 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16575
16576 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16577
16578 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16579 * configure: Regenerate.
16580 * config.in: Regenerate.
16581 * server.h (NEED_DECLARATION_STRERROR):
16582 Replace with !HAVE_DECL_STRERROR.
16583
16584 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16585
16586 * linux-low.c (linux_wait, linux_send_signal): Don't test
16587 an unsigned long variable for > 0 if it could be MAX_ULONG.
16588 * server.c (myresume): Likewise.
16589 * target.c (set_desired_inferior): Likewise.
16590
16591 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16592
16593 * configure.ac: Simplify and improve check for socklen_t.
16594 * configure, config.in: Regenerate.
16595
16596 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16597
16598 * acconfig.h: Remove.
16599 * configure.ac: Add a test for socklen_t. Use three-argument
16600 AC_DEFINE throughout.
16601 * config.in: Regenerated using autoheader 2.59.
16602 * configure: Regenerated.
16603
16604 * gdbreplay.c (socklen_t): Provide a default.
16605 (remote_open): Use socklen_t.
16606 * remote-utils.c (socklen_t): Provide a default.
16607 (remote_open): Use socklen_t.
16608 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16609 unsigned char.
16610
16611 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16612 char for buffers.
16613 * linux-low.c (linux_read_memory, linux_write_memory)
16614 (linux_read_auxv): Likewise.
16615 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16616 (check_mem_write): Likewise.
16617 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16618 Likewise.
16619 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16620 (registers_from_string, register_data): Likewise.
16621 * server.c (handle_query, main): Likewise.
16622 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16623 (decode_M_packet): Likewise.
16624 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16625 * target.h (struct target_ops): Update read_memory, write_memory,
16626 and read_auxv.
16627 (read_inferior_memory, write_inferior_memory): Update.
16628 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16629 to unsigned char *.
16630 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16631 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16632 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16633 linux-s390-low.c, linux-sh-low.c: Update for changes in
16634 read_inferior_memory and the_low_target->breakpoint.
16635
16636 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16637
16638 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16639 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16640 * configure.srv: Add powerpc64-*-linux*.
16641 * linux-ppc64-low.c: New file.
16642
16643 2005-05-23 Orjan Friberg <orjanf@axis.com>
16644
16645 * linux-cris-low.c: New file with support for CRIS.
16646 * linux-crisv32-low.c: Ditto for CRISv32.
16647 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16648 (clean): Add reg-cris.c and reg-crisv32.c.
16649 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16650 reg-crisv32.o, and reg-crisv32.c to make rules.
16651 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16652 recognized targets.
16653
16654 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16655
16656 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16657 of sizeof (PTRACE_XFER_TYPE).
16658 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16659
16660 2005-05-12 Orjan Friberg <orjanf@axis.com>
16661
16662 * target.h (struct target_ops): Add insert_watchpoint,
16663 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16664 pointers for hardware watchpoint support.
16665 * linux-low.h (struct linux_target_ops): Ditto.
16666 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16667 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16668 to linux_target_ops.
16669 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16670 reply packet.
16671 * server.c (main): Recognize 'Z' and 'z' packets.
16672
16673 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16674
16675 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16676 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16677 (the_low_target): Add new members.
16678
16679 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16680
16681 * proc-service.c (ps_lgetregs): Search all_processes instead of
16682 all_threads.
16683
16684 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16685
16686 * server.c (start_inferior): Change return type to int.
16687 (attach_inferior): Change sigptr to int *.
16688 (handle_v_cont, handle_v_requests): Change signal to int *.
16689 (main): Change signal to int.
16690
16691 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16692
16693 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16694 * configure.srv: Add m32r*-*-linux*.
16695 * linux-m32r-low.c: New file.
16696
16697 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16698
16699 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16700
16701 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16702
16703 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16704 Take unsigned long arguments for PIDs.
16705 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16706 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16707 (wait_for_sigstop, linux_resume_one_process)
16708 (regsets_fetch_inferior_registers, linux_send_signal)
16709 (linux_read_auxv): Likewise. Update the types of variables holding
16710 PIDs. Update format string specifiers.
16711 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16712 * remote-utils.c (prepare_resume_reply): Likewise.
16713 * server.c (cont_thread, general_thread, step_thread)
16714 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16715 unsigned long.
16716 (handle_query): Update format specifiers.
16717 (handle_v_cont, main): Use strtoul for thread IDs.
16718 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16719 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16720 (general_thread, step_thread, thread_from_wait)
16721 (old_thread_from_wait): Update.
16722 * target.h (struct thread_resume): Use unsigned long for THREAD.
16723 (struct target_ops): Use unsigned long for arguments to attach and
16724 thread_alive.
16725
16726 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16727
16728 * acinclude.m4: Include bfd/bfd.m4 directly.
16729 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16730 <agriffis@toolchain.org>.
16731 * aclocal.m4, configure: Regenerated.
16732
16733 2005-01-07 Andrew Cagney <cagney@gnu.org>
16734
16735 * configure.ac: Rename configure.in, require autoconf 2.59.
16736 * configure: Re-generate.
16737
16738 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16739
16740 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16741 LIBS when finished.
16742 * aclocal.m4: Regenerated.
16743 * configure: Regenerated.
16744
16745 2004-11-21 Andreas Schwab <schwab@suse.de>
16746
16747 * linux-m68k-low.c (m68k_num_gregs): Define.
16748 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16749 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16750 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16751 (m68k_breakpoint_at): New. Add to the_low_target.
16752
16753 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16754 srv_linux_thread_db to yes.
16755
16756 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16757
16758 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16759 (ARCH_SET_FS): Likewise.
16760 (ARCH_GET_FS): Likewise.
16761 (ARCH_GET_GS): Likewise.
16762
16763 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16764
16765 * linux-i386-low.c (ps_get_thread_area): New.
16766 * linux-x86-64-low.c (ps_get_thread_area): New.
16767 * linux-low.c: Include <sys/syscall.h>.
16768 (linux_kill_one_process): Don't kill the first thread here.
16769 (linux_kill): Kill the first thread here.
16770 (kill_lwp): New function.
16771 (send_sigstop, linux_send_signal): Use it.
16772 * proc-service.c: Clean up #ifdefs.
16773 (fpregset_info): Delete.
16774 (ps_lgetregs): Update and enable implementation.
16775 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16776 implementations.
16777 * remote-utils.c (struct sym_cache, symbol_cache): New.
16778 (input_interrupt): Print a clearer message.
16779 (async_io_enabled): New variable.
16780 (enable_async_io, disable_async_io): Use it. Update comments.
16781 (look_up_one_symbol): Use the symbol cache.
16782 * thread-db.c (thread_db_look_up_symbols): New function.
16783 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16784
16785 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16786
16787 * configure.in: Test for -rdynamic.
16788 * configure: Regenerated.
16789 * Makefile (INTERNAL_LDFLAGS): New.
16790 (gdbserver, gdbreplay): Use it.
16791
16792 2004-09-02 Andrew Cagney <cagney@gnu.org>
16793
16794 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16795
16796 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16797
16798 * linux-low.c (linux_wait): Clear all_processes list also.
16799
16800 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16801
16802 * linux-low.c: Include <errno.h>. Remove extern declaration of
16803 errno.
16804
16805 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16806
16807 * gdbreplay.c, server.h, utils.c: Update copyright years.
16808
16809 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16810
16811 * server.c (main): Print child status or termination signal from
16812 variable 'signal', not 'sig'.
16813
16814 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16815
16816 * linux-low.c (linux_read_memory): Change return type to
16817 int. Check for and return error from ptrace().
16818 * target.c (read_inferior_memory): Change return type to int. Pass
16819 back return status from the_target->read_memory().
16820 * target.h (struct target_ops): Adapt *read_memory() prototype.
16821 Update comment.
16822 (read_inferior_memory): Adapt prototype.
16823 * server.c (main): Return an error packet if
16824 read_inferior_memory() returns an error.
16825
16826 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16827
16828 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16829 Unify with other clean targets.
16830
16831 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16832
16833 * server.c (handle_v_cont): Call set_desired_inferior.
16834
16835 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16836
16837 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16838
16839 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16840
16841 * linux-low.c (linux_wait): Unblock async I/O.
16842 (linux_resume): Block and enable async I/O.
16843 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16844 * server.h (block_async_io, unblock_async_io): Add prototypes.
16845
16846 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16847
16848 * remote-utils.c (remote_open): Print a status notice after
16849 opening a TCP port.
16850 * server.c (attach_inferior): Print a status notice after
16851 attaching.
16852
16853 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16854
16855 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16856
16857 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16858
16859 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16860 error packet.
16861 * server.c, target.h: Update copyright years.
16862
16863 2004-02-25 Roland McGrath <roland@redhat.com>
16864
16865 * target.h (struct target_ops): New member `read_auxv'.
16866 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16867 * linux-low.c (linux_read_auxv): New function.
16868 (linux_target_ops): Initialize `read_auxv' member to that.
16869
16870 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16871
16872 Committed by Jim Blandy <jimb@redhat.com>.
16873
16874 * linux-s390-low.c (s390_num_regs): Update.
16875 (s390_regmap): Remove control registers. Use __s390x__ predefine
16876 instead of GPR_SIZE to distiguish s390 and s390x targets.
16877
16878 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16879
16880 * linux-low.c: Update copyright year.
16881 (check_removed_breakpoint): Clear pending_is_breakpoint.
16882 (linux_set_resume_request, linux_queue_one_thread)
16883 (resume_status_pending_p): New functions.
16884 (linux_continue_one_thread): Use process->resume.
16885 (linux_resume): Only resume threads if there are no pending events.
16886 * linux-low.h (struct process_info): Add resume request
16887 pointer.
16888
16889 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16890
16891 * regcache.c (new_register_cache): Clear the allocated register
16892 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16893
16894 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16895
16896 * linux-low.c (linux_resume): Take a struct thread_resume *
16897 argument.
16898 (linux_wait): Update call.
16899 (resume_ptr): New static variable.
16900 (linux_continue_one_thread): Renamed from
16901 linux_continue_one_process. Use resume_ptr.
16902 (linux_resume): Use linux_continue_one_thread.
16903 * server.c (handle_v_cont, handle_v_requests): New functions.
16904 (myresume): New function.
16905 (main): Handle 'v' case.
16906 * target.h (struct thread_resume): New type.
16907 (struct target_ops): Change argument of "resume" to struct
16908 thread_resume *.
16909 (myresume): Delete macro.
16910
16911 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16912
16913 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16914 (uninstall): Support DESTDIR.
16915
16916 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16917
16918 * configure.srv: Add xscale*linux copy of arm*linux entry.
16919
16920 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16921
16922 * linux-arm-low.c (arm_reinsert_addr): New function.
16923 (the_low_target): Add arm_reinsert_addr.
16924
16925 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16926
16927 * mem-break.c: Remove whitespace at end of file.
16928
16929 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16930
16931 * configure.in: Check whether we need to prototype strerror.
16932 * server.h: Optionally prototype strerror.
16933 * gdbreplay.c (perror_with_name): Use strerror.
16934 * linux-low.c (linux_attach_lwp): Use strerror.
16935 * utils.c (perror_with_name): Use strerror.
16936 * config.in, configure: Regenerated.
16937
16938 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16939
16940 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16941 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16942
16943 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16944
16945 * Makefile.in (SFILES): Update.
16946 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16947 low-sun3.c: Remove files.
16948
16949 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16950
16951 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16952 (linux_detach_one_process, linux_detach): New functions.
16953 (linux_target_ops): Add linux_detach.
16954 * server.c (main): Handle 'D' packet.
16955 * target.h (struct target_ops): Add "detach" member.
16956 (detach_inferior): Define.
16957
16958 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16959
16960 From Kelley Cook <kelleycook@wideopenwest.com>:
16961 * configure.srv: Accept i[34567]86 variants.
16962
16963 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16964
16965 * linux-low.c (linux_wait_for_event): Correct comment typos.
16966 (linux_resume_one_process): Call check_removed_breakpoint.
16967 (linux_send_signal): New function.
16968 (linux_target_ops): Add linux_send_signal.
16969 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16970 of kill.
16971 * target.h (struct target_ops): Add send_signal.
16972
16973 2003-05-29 Jim Blandy <jimb@redhat.com>
16974
16975 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16976 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16977 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16978 away part of the register's value.
16979
16980 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16981
16982 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16983 (linux_wait_for_event, linux_init_signals): Likewise.
16984
16985 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16986
16987 * configure.in: Check for stdlib.h.
16988 * configure: Regenerated.
16989 * config.in: Regenerated.
16990
16991 2003-01-04 Andreas Schwab <schwab@suse.de>
16992
16993 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16994
16995 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16996
16997 * Makefile.in: Remove obsolete code.
16998
16999 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17000
17001 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17002 defined(PT_FPR0_HI).
17003
17004 2002-11-17 Stuart Hughes <seh@zee2.com>
17005
17006 * linux-arm-low.c (arm_num_regs): Increase.
17007 (arm_regmap): Include status register.
17008
17009 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17010
17011 * linux-low.c (register_addr): Remove incorrect -1 check.
17012
17013 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17014
17015 * linux-low.c (linux_create_inferior): Call setpgid. Return
17016 the new PID.
17017 (unstopped_p, linux_signal_pid): Remove.
17018 (linux_target_ops): Remove linux_signal_pid.
17019 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17020 global instead of target method.
17021 * target.h (struct target_ops): Remove signal_pid. Update comment
17022 for create_inferior.
17023 * server.c (signal_pid): New variable.
17024 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17025 gdbserver. Set the child to be the foreground process group.
17026 (attach_inferior): Set signal_pid.
17027
17028 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17029
17030 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17031
17032 2002-08-20 Jim Blandy <jimb@redhat.com>
17033
17034 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17035 default for this.
17036
17037 2002-08-01 Andrew Cagney <cagney@redhat.com>
17038
17039 * Makefile.in: Make chill references obsolete.
17040
17041 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17042
17043 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17044 * configure: Regenerate.
17045 * config.in: Regenerate.
17046
17047 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17048
17049 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17050 (perror_with_name, remote_close, remote_open, expect, play): Static.
17051
17052 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17053
17054 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17055 byte offsets instead of an array of indexes.
17056 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17057
17058 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17059
17060 * regcache.c: Add comment.
17061
17062 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17063
17064 * thread-db.c: New file.
17065 * proc-service.c: New file.
17066 * acinclude.m4: New file.
17067 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17068 proc-service.o, and thread-db.o.
17069 (linux-low.o): Add USE_THREAD_DB.
17070 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17071 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17072 * aclocal.m4: Regenerated.
17073 * config.in: Regenerated.
17074 * configure: Regenerated.
17075 * configure.in: Check for proc_service.h, sys/procfs.h,
17076 thread_db.h, and linux/elf.h headrs.
17077 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17078 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17079 Check for -lthread_db and thread support.
17080 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17081 PowerPC, and SuperH.
17082 * i387-fp.c: Constify arguments.
17083 * i387-fp.h: Likewise.
17084 * inferiors.c: (struct thread_info): Renamed from
17085 `struct inferior_info'. Remove PID member. Use generic inferior
17086 list header. All uses updated.
17087 (inferiors, signal_pid): Removed.
17088 (all_threads): New variable.
17089 (get_thread): Define.
17090 (add_inferior_to_list): New function.
17091 (for_each_inferior): New function.
17092 (change_inferior_id): New function.
17093 (add_inferior): Removed.
17094 (remove_inferior): New function.
17095 (add_thread): New function.
17096 (free_one_thread): New function.
17097 (remove_thread): New function.
17098 (clear_inferiors): Use for_each_inferior and free_one_thread.
17099 (find_inferior): New function.
17100 (find_inferior_id): New function.
17101 (inferior_target_data): Update argument type.
17102 (set_inferior_target_data): Likewise.
17103 (inferior_regcache_data): Likewise.
17104 (set_inferior_regcache_data): Likewise.
17105 * linux-low.c (linux_bp_reinsert): Remove.
17106 (all_processes, stopping_threads, using_thrads)
17107 (struct pending_signals, debug_threads, pid_of): New.
17108 (inferior_pid): Replace with macro.
17109 (struct inferior_linux_data): Remove.
17110 (get_stop_pc, add_process): New functions.
17111 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17112 Use add_process and add_thread.
17113 (linux_attach_lwp): New function, based on old linux_attach. Use
17114 add_process and add_thread. Set stop_expected for new threads.
17115 (linux_attach): New function.
17116 (linux_kill_one_process): New function.
17117 (linux_kill): Kill all LWPs.
17118 (linux_thread_alive): Use find_inferior_id.
17119 (check_removed_breakpoints, status_pending_p): New functions.
17120 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17121 Update. Use WNOHANG. Wait for cloned processes also. Update process
17122 struct for the found process.
17123 (linux_wait_for_event): New function.
17124 (linux_wait): Use it. Support LWPs.
17125 (send_sigstop, wait_for_sigstop, stop_all_processes)
17126 (linux_resume_one_process, linux_continue_one_process): New functions.
17127 (linux_resume): Support LWPs.
17128 (REGISTER_RAW_SIZE): Remove.
17129 (fetch_register): Use register_size instead. Call supply_register.
17130 (usr_store_inferior_registers): Likewise. Call collect_register.
17131 Fix recursive case.
17132 (regsets_fetch_inferior_registers): Improve error message.
17133 (regsets_store_inferior_registers): Add debugging.
17134 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17135 (unstopped_p, linux_signal_pid): New functions.
17136 (linux_target_ops): Add linux_signal_pid.
17137 (linux_init_signals): New function.
17138 (initialize_low): Call it. Initialize using_threads.
17139 * regcache.c (inferior_regcache_data): Add valid
17140 flag.
17141 (get_regcache): Fetch registers lazily. Add fetch argument
17142 and update all callers.
17143 (regcache_invalidate_one, regcache_invalidate): New
17144 functions.
17145 (new_register_cache): Renamed from create_register_cache.
17146 Return the new regcache.
17147 (free_register_cache): Change argument to a void *.
17148 (registers_to_string, registers_from_string): Call get_regcache
17149 with fetch flag set.
17150 (register_data): Make static. Pass fetch flag to get_regcache.
17151 (supply_register): Call get_regcache with fetch flag clear.
17152 (collect_register): Call get_regcache with fetch flag set.
17153 (collect_register_as_string): New function.
17154 * regcache.h: Update.
17155 * remote-utils.c (putpkt): Flush after debug output and use
17156 stderr.
17157 Handle input interrupts while waiting for an ACK.
17158 (input_interrupt): Use signal_pid method.
17159 (getpkt): Flush after debug output and use stderr.
17160 (outreg): Use collect_register_as_string.
17161 (new_thread_notify, dead_thread_notify): New functions.
17162 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17163 and general_thread.
17164 (look_up_one_symbol): Flush after debug output.
17165 * server.c (step_thread, server_waiting): New variables.
17166 (start_inferior): Don't use signal_pid. Update call to mywait.
17167 (attach_inferior): Update call to mywait.
17168 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17169 (main): Don't fetch/store registers explicitly. Use
17170 set_desired_inferior. Support proposed ``Hs'' packet. Update
17171 calls to mywait.
17172 * server.h: Update.
17173 (struct inferior_list, struct_inferior_list_entry): New.
17174 * target.c (set_desired_inferior): New.
17175 (write_inferior_memory): Constify.
17176 (mywait): New function.
17177 * target.h: Update.
17178 (struct target_ops): New signal_pid method.
17179 (mywait): Removed macro, added prototype.
17180
17181 * linux-low.h (regset_func): Removed.
17182 (regset_fill_func, regset_store_func): New.
17183 (enum regset_type): New.
17184 (struct regset_info): Add type field. Use new operation types.
17185 (struct linux_target_ops): stop_pc renamed to get_pc.
17186 Add decr_pc_after_break and breakpoint_at.
17187 (get_process, get_thread_proess, get_process_thread)
17188 (strut process_info, all_processes, linux_attach_lwp)
17189 (thread_db_init): New.
17190
17191 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17192 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17193 (the_low_target): Add new members.
17194 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17195 (i386_store_fpxregset): Constify.
17196 (target_regsets): Add new kind identifier.
17197 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17198 (i386_set_pc): Add debugging.
17199 (i386_breakpoint_at): New function.
17200 (the_low_target): Add new members.
17201 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17202 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17203 (mips_breakpoint_at): New.
17204 (the_low_target): Add new members.
17205 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17206 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17207 (the_low_target): Add new members.
17208 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17209 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17210 (the_low_target): Add new members.
17211 * linux-x86-64-low.c (target_regsets): Add new kind
17212 identifier.
17213
17214 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17215
17216 From Martin Pool <mbp@samba.org>:
17217 * server.c (gdbserver_usage): New function.
17218 (main): Call it.
17219
17220 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17221
17222 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17223 stop_at -> stop_pc.
17224
17225 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17226
17227 * Makefile.in: Remove obsolete code.
17228
17229 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17230
17231 * linux-low.c (regsets_fetch_inferior_registers),
17232 (regsets_store_inferior_registers): Removed cast to int from
17233 ptrace() calls.
17234 * regcache.h: Added declaration of struct inferior_info.
17235
17236 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17237
17238 * inferiors.c (struct inferior_info): Add regcache_data.
17239 (add_inferior): Call create_register_cache.
17240 (clear_inferiors): Call free_register_cache.
17241 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17242 * regcache.c (struct inferior_regcache_data): New.
17243 (registers): Remove.
17244 (get_regcache): New function.
17245 (create_register_cache, free_register_cache): New functions.
17246 (set_register_cache): Don't initialize the register cache here.
17247 (registers_to_string, registers_from_string, register_data): Call
17248 get_regcache.
17249 * regcache.h: Add prototypes.
17250 * server.h: Likewise.
17251
17252 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17253
17254 * mem-break.c: New file.
17255 * mem-break.h: New file.
17256 * Makefile.in: Add mem-break.o rule; update server.h
17257 dependencies.
17258 * inferiors.c (struct inferior_info): Add target_data
17259 member.
17260 (clear_inferiors): Free target_data member if set.
17261 (inferior_target_data, set_inferior_target_data): New functions.
17262 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17263 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17264 * linux-low.c (linux_bp_reinsert): New variable.
17265 (struct inferior_linux_data): New.
17266 (linux_create_inferior): Use set_inferior_target_data.
17267 (linux_attach): Likewise. Call add_inferior.
17268 (linux_wait_for_one_inferior): New function.
17269 (linux_wait): Call it.
17270 (linux_write_memory): Add const.
17271 (initialize_low): Call set_breakpoint_data.
17272 * linux-low.h (struct linux_target_ops): Add breakpoint
17273 handling members.
17274 * server.c (attach_inferior): Remove extra add_inferior
17275 call.
17276 * server.h: Include mem-break.h. Update inferior.c
17277 prototypes.
17278 * target.c (read_inferior_memory)
17279 (write_inferior_memory): New functions.
17280 * target.h (read_inferior_memory)
17281 (write_inferior_memory): Change macros to prototypes.
17282 (struct target_ops): Update comments. Add const to write_memory
17283 definition.
17284
17285 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17286
17287 * linux-low.c (usr_store_inferior_registers): Support
17288 registers which are allowed to fail to store.
17289 * linux-low.h (linux_target_ops): Likewise.
17290 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17291 (ppc_cannot_store_register): FPSCR may not be storable.
17292
17293 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17294
17295 * server.h: Include <string.h> if HAVE_STRING_H.
17296 * ChangeLog: Correct paths in last ChangeLog entry.
17297
17298 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17299
17300 * linux-low.h: Remove obsolete prototypes.
17301 (struct linux_target_ops): New.
17302 (extern the_low_target): New.
17303 * linux-low.c (num_regs, regmap): Remove declarations.
17304 (register_addr): Use the_low_target explicitly.
17305 (fetch_register): Likewise.
17306 (usr_fetch_inferior_registers): Likewise.
17307 (usr_store_inferior_registers): Likewise.
17308 * linux-arm-low.c (num_regs): Remove.
17309 (arm_num_regs): Define.
17310 (arm_regmap): Renamed from regmap, made static.
17311 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17312 made static.
17313 (arm_cannot_store_register): Renamed from cannot_store_register,
17314 made static.
17315 (the_low_target): New.
17316 * linux-i386-low.c (num_regs): Remove.
17317 (i386_num_regs): Define.
17318 (i386_regmap): Renamed from regmap, made static.
17319 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17320 made static.
17321 (i386_cannot_store_register): Renamed from cannot_store_register,
17322 made static.
17323 (the_low_target): New.
17324 * linux-ia64-low.c (num_regs): Remove.
17325 (ia64_num_regs): Define.
17326 (ia64_regmap): Renamed from regmap, made static.
17327 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17328 made static.
17329 (ia64_cannot_store_register): Renamed from cannot_store_register,
17330 made static.
17331 (the_low_target): New.
17332 * linux-m68k-low.c (num_regs): Remove.
17333 (m68k_num_regs): Define.
17334 (m68k_regmap): Renamed from regmap, made static.
17335 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17336 made static.
17337 (m68k_cannot_store_register): Renamed from cannot_store_register,
17338 made static.
17339 (the_low_target): New.
17340 * linux-mips-low.c (num_regs): Remove.
17341 (mips_num_regs): Define.
17342 (mips_regmap): Renamed from regmap, made static.
17343 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17344 made static.
17345 (mips_cannot_store_register): Renamed from cannot_store_register,
17346 made static.
17347 (the_low_target): New.
17348 * linux-ppc-low.c (num_regs): Remove.
17349 (ppc_num_regs): Define.
17350 (ppc_regmap): Renamed from regmap, made static.
17351 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17352 made static.
17353 (ppc_cannot_store_register): Renamed from cannot_store_register,
17354 made static.
17355 (the_low_target): New.
17356 * linux-s390-low.c (num_regs): Remove.
17357 (s390_num_regs): Define.
17358 (s390_regmap): Renamed from regmap, made static.
17359 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17360 made static.
17361 (s390_cannot_store_register): Renamed from cannot_store_register,
17362 made static.
17363 (the_low_target): New.
17364 * linux-sh-low.c (num_regs): Remove.
17365 (sh_num_regs): Define.
17366 (sh_regmap): Renamed from regmap, made static.
17367 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17368 made static.
17369 (sh_cannot_store_register): Renamed from cannot_store_register,
17370 made static.
17371 (the_low_target): New.
17372 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17373 (the_low_target): New.
17374
17375 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17376
17377 * Makefile.in: Add stamp-h target.
17378 * configure.in: Create stamp-h.
17379 * configure: Regenerated.
17380
17381 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17382
17383 * inferiors.c: New file.
17384 * target.c: New file.
17385 * target.h: New file.
17386 * Makefile.in: Add target.o and inferiors.o. Update
17387 dependencies.
17388 * linux-low.c (inferior_pid): New static variable,
17389 moved from server.c.
17390 (linux_create_inferior): Renamed from create_inferior.
17391 Call add_inferior. Return 0 on success instead of a PID.
17392 (linux_attach): Renamed from myattach.
17393 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17394 (linux_thread_alive): Renamed from mythread_alive.
17395 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17396 child dies.
17397 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17398 (regsets_store_inferior_registers): Correct error message.
17399 Add missing ``return 0''.
17400 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17401 (linux_store_registers): Renamed from store_inferior_registers.
17402 (linux_read_memory): Renamed from read_inferior_memory.
17403 (linux_write_memory): Renamed from write_inferior_memory.
17404 (linux_target_ops): New structure.
17405 (initialize_low): Call set_target_ops ().
17406 * remote-utils.c (unhexify): New function.
17407 (hexify): New function.
17408 (input_interrupt): Send signals to ``signal_pid''.
17409 * server.c (inferior_pid): Remove.
17410 (start_inferior): Update create_inferior call.
17411 (attach_inferior): Call add_inferior.
17412 (handle_query): New function.
17413 (main): Call handle_query for `q' packets.
17414 * server.h: Include "target.h". Remove obsolete prototypes.
17415 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17416
17417 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17418
17419 * Makefile.in: Add WARN_CFLAGS. Update configury
17420 dependencies.
17421 * configure.in: Check for <string.h>
17422 * configure: Regenerate.
17423 * config.in: Regenerate.
17424 * gdbreplay.c: Include needed system headers.
17425 (remote_open): Remove strchr prototype.
17426 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17427 * regcache.c (supply_register): Change buf argument to const void *.
17428 (supply_register_by_name): Likewise.
17429 (collect_register): Change buf argument to void *.
17430 (collect_register_by_name): Likewise.
17431 * regcache.h: Add missing prototypes.
17432 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17433 * server.c (handle_query): New function.
17434 (attached): New static variable, moved out of main.
17435 (main): Quiet longjmp clobber warnings.
17436 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17437 * utils.c (error): Remove NORETURN.
17438 (fatal): Likewise.
This page took 0.399561 seconds and 4 git commands to generate.