Arm: Use read_description funcs in gdbserver
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2
3 * configure.srv: Add new files. Remove xml generated files.
4 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
5 registers.
6 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
7 * linux-aarch32-tdesc.c: New file.
8 * linux-aarch32-tdesc.h: New file.
9 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
10 * linux-arm-low.c (init_registers_arm, tdesc_arm)
11 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
12 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
13 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
14 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
16 (arm_read_description): Call arm_linux_read_description.
17 (initialize_low_arch): Don't init registers.
18 * linux-arm-tdesc.c: New file.
19 * linux-arm-tdesc.h: New file.
20
21 2019-07-10 Alan Hayward <alan.hayward@arm.com>
22
23 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
24 Move counter inside for.
25 (arm_read_description): Check ptrace earlier.
26 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
27
28 2019-07-09 Tom Tromey <tom@tromey.com>
29
30 * configure: Rebuild.
31 * configure.ac: Change common to gdbsupport.
32 * acinclude.m4: Change common to gdbsupport.
33 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
34 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
35 common to gdbsupport.
36 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
37 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
38 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
39 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
40 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
41 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
42 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
43 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
44 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
45 common to gdbsupport.
46
47 2019-07-04 Alan Hayward <alan.hayward@arm.com>
48
49 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
50 defines.
51 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
52
53 2019-07-04 Alan Hayward <alan.hayward@arm.com>
54
55 * configure.srv: Remove legacy xml.
56 * linux-aarch64-low.c (initialize_low_arch): Remove
57 initialize_low_tdesc call.
58 * linux-aarch64-tdesc-selftest.c: Remove file.
59 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
60 * linux-x86-low.c (initialize_low_arch): Remove
61 initialize_low_tdesc call.
62 * linux-x86-tdesc-selftest.c: Remove file.
63 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
64
65 2019-06-20 Tom de Vries <tdevries@suse.de>
66
67 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
68 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
69
70 2019-06-19 Tom de Vries <tdevries@suse.de>
71
72 * debug.h (debug_write): Change return type to ssize_t.
73 * debug.c (debug_write): Same.
74
75 2019-06-14 Tom Tromey <tom@tromey.com>
76
77 * configure.ac: Use new path to gnulib.
78 * configure: Rebuild.
79 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
80 to gnulib.
81
82 2019-06-11 Tom Tromey <tom@tromey.com>
83
84 * Makefile.in (SFILES): Add alloc.c.
85 (OBS): Add alloc.o.
86 (IPA_OBJS): Add alloc-ipa.o.
87 (alloc-ipa.o): New target.
88 (%.o: ../%.c): New pattern rule.
89
90 2019-06-10 Tom Tromey <tromey@adacore.com>
91
92 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
93 end warning with a newline.
94 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
95 newline.
96 * thread-db.c (attach_thread): Don't end warning with a newline.
97 (thread_db_notice_clone): Likewise.
98 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
99 newline.
100 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
101 end warning with a newline.
102
103 2019-06-04 Pedro Alves <palves@redhat.com>
104
105 * server.c (captured_main): Use make_unique_xstrdup.
106
107 2019-06-02 Tom Tromey <tom@tromey.com>
108
109 * gdbreplay.c (fromhex): Remove.
110 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
111
112 2019-05-29 Tom Tromey <tromey@adacore.com>
113
114 * configure: Rebuild.
115
116 2019-05-06 Kevin Buettner <kevinb@redhat.com>
117
118 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
119 sign extension code on 32-bit builds.
120
121 2019-05-03 Eli Zaretskii <eliz@gnu.org>
122
123 * remote-utils.c:
124 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
125
126 2019-04-19 Tom Tromey <tom@tromey.com>
127
128 * server.c (struct vstop_notif): Derive from notif_event.
129 <base>: Remove.
130 (queue_stop_reply): Update.
131 (remove_all_on_match_ptid): Change type. Rewrite.
132 (discard_queued_stop_replies): Rewrite.
133 (in_queued_stop_replies_ptid): Change type.
134 (in_queued_stop_replies): Rewrite.
135 (notif_stop): Update.
136 (queue_stop_reply_callback): Update.
137 (captured_main): Don't call initialize_notif.
138 (push_stop_notification): Update.
139 * notif.c (notif_write_event, handle_notif_ack)
140 (notif_event_enque, notif_push): Update.
141 (notif_event_xfree, initialize_notif): Remove.
142 * notif.h (struct notif_event): Include <list>, not
143 "common/queue.h".
144 (struct notif_server) <queue>: Now a std::list.
145 (notif_event_p): Remove typedef.
146 (initialize_notif): Don't declare.
147 (struct notif_event): Add virtual destructor.
148
149 2019-04-17 Alan Hayward <alan.hayward@arm.com>
150
151 * ax.c (ax_vdebug): Call debug_printf.
152 * debug.c (debug_write): New function.
153 * debug.h (debug_write): New declaration.
154 * linux-low.c (sigchld_handler): Call debug_write.
155
156 2019-04-17 Alan Hayward <alan.hayward@arm.com>
157
158 * debug.c (debug_set_output): New function.
159 (debug_vprintf): Send output to debug_file.
160 (debug_flush): Likewise.
161 * debug.h (debug_set_output): New declaration.
162 * server.c (handle_monitor_command): Add debug-file option.
163 (captured_main): Likewise.
164
165 2019-04-17 Alan Hayward <alan.hayward@arm.com>
166
167 * debug.c (remote_debug): Add definition.
168 * debug.h (remote_debug): Add declaration.
169 * hostio.c (remote_debug): Remove declaration.
170 * remote-utils.c (struct ui_file): Likewise.
171 (remote_debug): Likewise.
172 * remote-utils.h (remote_debug): Likewise,
173 * server.c (remote_debug): Remove definition.
174
175 2019-04-10 Kevin Buettner <kevinb@redhat.com>
176
177 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
178 when using a 64-bit gdbserver.
179
180 2019-04-09 Tom Tromey <tromey@adacore.com>
181
182 * linux-low.c (select_event_lwp): Use find_thread_in_random.
183
184 2019-04-08 Tom Tromey <tom@tromey.com>
185
186 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
187 throw.
188 (linux_resume_one_lwp): Likewise.
189
190 2019-04-08 Tom Tromey <tom@tromey.com>
191
192 * gdbreplay.c: Update.
193 * linux-low.c: Update.
194 * server.c: Update.
195
196 2019-04-08 Tom Tromey <tom@tromey.com>
197
198 * server.c: Use C++ exception handling.
199 * linux-low.c: Use C++ exception handling.
200 * gdbreplay.c: Use C++ exception handling.
201
202 2019-04-08 Tom Tromey <tom@tromey.com>
203
204 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
205 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
206 (captured_main, main): Update.
207 * gdbreplay.c (main): Update.
208
209 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
210
211 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
212 value in argument pointer, return 1 if the entry is found and 0
213 otherwise. Move comment.
214 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
215 * linux-low.h (linux_get_auxv): Declare.
216 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
217
218 2019-04-05 Tom Tromey <tromey@adacore.com>
219
220 * server.c (gdbserver_usage): Use upper-case for metasyntactic
221 variables.
222
223 2019-03-28 Alan Hayward <alan.hayward@arm.com>
224
225 * linux-low.c (AT_HWCAP2): Add define if not already included.
226
227 2019-03-26 Alan Hayward <alan.hayward@arm.com>
228
229 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
230 (aarch64_arch_setup): Call linux_get_hwcap.
231 * linux-arm-low.c (arm_get_hwcap): Remove function.
232 (arm_read_description): Call linux_get_hwcap.
233 * linux-low.c (linux_get_auxv): New function.
234 (linux_get_hwcap): Likewise.
235 (linux_get_hwcap2): Likewise.
236 * linux-low.h (linux_get_hwcap): New declaration.
237 (linux_get_hwcap2): Likewise.
238 * linux-ppc-low.c (ppc_get_auxv): Remove function.
239 (ppc_arch_setup): Call linux_get_hwcap.
240 * linux-s390-low.c (s390_get_hwcap): Remove function.
241 (s390_arch_setup): Call linux_get_hwcap.
242
243 2019-03-22 Alan Hayward <alan.hayward@arm.com>
244 Jiong Wang <jiong.wang@arm.com>
245
246 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
247 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
248 to fail.
249 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
250
251 2019-03-22 Alan Hayward <alan.hayward@arm.com>
252 Jiong Wang <jiong.wang@arm.com>
253
254 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
255 (aarch64_get_hwcap): New function.
256 (aarch64_arch_setup): Read APIA hwcap.
257
258 2019-03-22 Alan Hayward <alan.hayward@arm.com>
259 Jiong Wang <jiong.wang@arm.com>
260
261 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
262 (initialize_low_tracepoint): Likewise.
263 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
264 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
265 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
266 (aarch64_linux_read_description): Likewise.
267 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
268
269 2019-03-12 John Baldwin <jhb@FreeBSD.org>
270
271 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
272 i386_create_target_description for 'segments' parameter.
273 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
274 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
275 * win32-i386-low.c (i386_arch_setup): Likewise.
276
277 2019-03-12 Tom Tromey <tromey@adacore.com>
278
279 * linux-low.c (iterate_over_lwps): Update.
280
281 2019-03-06 Tom Tromey <tom@tromey.com>
282
283 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
284 (captured_main): Use SCOPE_EXIT.
285
286 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
287
288 * configure.srv: Use '$enable_unittest' instead of '$development'
289 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
290 case.
291
292 2019-02-27 Tom Tromey <tromey@adacore.com>
293
294 * gdbreplay.c (logchar): Handle \r\n.
295
296 2019-02-07 Alan Hayward <alan.hayward@arm.com>
297
298 * linux-low.c (linux_attach): Add process before lwp.
299 * server.c (attach_inferior): Check if already attached.
300
301 2019-02-07 Tom Tromey <tom@tromey.com>
302
303 * x86-tdesc.h: Rename include guard.
304 * x86-low.h: Add include guard.
305 * wincecompat.h: Rename include guard.
306 * win32-low.h: Add include guard.
307 * utils.h: Rename include guard.
308 * tracepoint.h: Rename include guard.
309 * tdesc.h: Rename include guard.
310 * target.h: Rename include guard.
311 * server.h: Rename include guard.
312 * remote-utils.h: Rename include guard.
313 * regcache.h: Rename include guard.
314 * nto-low.h: Rename include guard.
315 * notif.h: Add include guard.
316 * mem-break.h: Rename include guard.
317 * lynx-low.h: Add include guard.
318 * linux-x86-tdesc.h: Add include guard.
319 * linux-s390-tdesc.h: Add include guard.
320 * linux-ppc-tdesc-init.h: Add include guard.
321 * linux-low.h: Add include guard.
322 * linux-aarch64-tdesc.h: Add include guard.
323 * linux-aarch32-low.h: Add include guard.
324 * inferiors.h: Rename include guard.
325 * i387-fp.h: Rename include guard.
326 * hostio.h: Rename include guard.
327 * gdbthread.h: Rename include guard.
328 * gdb_proc_service.h: Rename include guard.
329 * event-loop.h: Rename include guard.
330 * dll.h: Rename include guard.
331 * debug.h: Rename include guard.
332 * ax.h: Rename include guard.
333
334 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
335
336 PR gdb/23985
337 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
338 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
339
340 2019-01-25 Tom Tromey <tom@tromey.com>
341
342 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
343
344 2019-01-25 Tom Tromey <tom@tromey.com>
345
346 * win32-low.c: Fix common/ includes.
347 * win32-i386-low.c: Fix common/ includes.
348 * tracepoint.c: Fix common/ includes.
349 * thread-db.c: Fix common/ includes.
350 * target.h: Fix common/ includes.
351 * symbol.c: Fix common/ includes.
352 * spu-low.c: Fix common/ includes.
353 * server.h: Fix common/ includes.
354 * server.c: Fix common/ includes.
355 * remote-utils.c: Fix common/ includes.
356 * regcache.h: Fix common/ includes.
357 * regcache.c: Fix common/ includes.
358 * nto-x86-low.c: Fix common/ includes.
359 * notif.h: Fix common/ includes.
360 * mem-break.h: Fix common/ includes.
361 * lynx-low.c: Fix common/ includes.
362 * lynx-i386-low.c: Fix common/ includes.
363 * linux-x86-tdesc-selftest.c: Fix common/ includes.
364 * linux-x86-low.c: Fix common/ includes.
365 * linux-low.c: Fix common/ includes.
366 * inferiors.h: Fix common/ includes.
367 * i387-fp.c: Fix common/ includes.
368 * hostio.c: Fix common/ includes.
369 * hostio-errno.c: Fix common/ includes.
370 * gdbthread.h: Fix common/ includes.
371 * gdbreplay.c: Fix common/ includes.
372 * fork-child.c: Fix common/ includes.
373 * event-loop.c: Fix common/ includes.
374 * ax.c:
375 (enum gdb_agent_op): Fix common/ includes.
376
377 2019-01-21 Tom Tromey <tom@tromey.com>
378
379 * tracepoint.c: Fix includes.
380 * remote-utils.c: Fix includes.
381 * linux-x86-low.c: Fix includes.
382
383 2019-01-01 Joel Brobecker <brobecker@adacore.com>
384
385 * gdbreplay.c (gdbreplay_version): Update copyright year in
386 version message.
387 * server.c (gdbserver_version): Likewise.
388
389 2018-12-05 Alan Hayward <alan.hayward@arm.com>
390
391 * linux-low.c (add_lwp): Switch ordering.
392
393 2018-11-29 Tom Tromey <tom@tromey.com>
394
395 * win32-low.c (win32_join): Take pid, not process.
396 * target.h (struct target_ops) <join>: Change argument type.
397 (join_inferior): Change argument name.
398 * spu-low.c (spu_join): Take pid, not process.
399 * server.c (handle_detach): Preserve pid before destroying
400 process.
401 * lynx-low.c (lynx_join): Take pid, not process.
402 * linux-low.c (linux_join): Take pid, not process.
403
404 2018-11-23 Alan Hayward <alan.hayward@arm.com>
405
406 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
407 (aarch64_cannot_fetch_register): Likewise.
408 (struct linux_target_ops): Update references.
409
410 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
411
412 * linux-ppc-low.c: Include nat/linux-ptrace.h.
413
414 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
415
416 * configure.srv (ipa_ppc_linux_regobj): Add
417 powerpc-isa207-htm-vsx32l-ipa.o and
418 powerpc-isa207-htm-vsx64l-ipa.o.
419 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
420 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
421 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
422 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
423 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
424 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
425 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
426 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
427 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
428 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
429 (init_registers_powerpc_isa207_htm_vsx32l)
430 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
431 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
432 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
433 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
434 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
435 (ppc_store_tm_ctarregset): New functions.
436 (ppc_regsets): Add entries for HTM regsets.
437 (ppc_arch_setup): Set htm in features struct when needed. Set
438 sizes for the HTM regsets.
439 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
440 (initialize_low_arch): Call
441 init_registers_powerpc_isa207_htm_vsx32l and
442 init_registers_powerpc_isa207_htm_vsx64l.
443 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
444 PPC_TDESC_ISA207_HTM_VSX.
445 (initialize_low_tracepoint): Call
446 init_registers_powerpc_isa207_htm_vsx32l and
447 init_registers_powerpc_isa207_htm_vsx64l.
448
449 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
450
451 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
452 rs6000/power-linux-pmu.xml to srv_xmlfiles.
453 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
454 (ppc_store_pmuregset): New functions.
455 (ppc_regsets): Add entries for ebb and pmu regsets.
456 (ppc_arch_setup): Set isa207 in features struct if the ebb and
457 pmu regsets are available. Set sizes for these regsets.
458
459 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
460
461 * configure.srv (ipa_ppc_linux_regobj): Add
462 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
463 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
464 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
465 rs6000/powerpc-isa207-vsx32l.xml, and
466 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
467 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
468 <PPC_TDESC_ISA207_VSX>: New enum value.
469 (init_registers_powerpc_isa207_vsx32l): Declare.
470 (init_registers_powerpc_isa207_vsx64l): Declare.
471 * linux-ppc-low.c (ppc_fill_tarregset): New function.
472 (ppc_store_tarregset): New function.
473 (ppc_regsets): Add entry for the TAR regset.
474 (ppc_arch_setup): Set isa207 in features struct when needed. Set
475 size for the TAR regsets.
476 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
477 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
478 and init_registers_powerpc_isa207_vsx64l.
479 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
480 (initialize_low_tracepoint): Call
481 init_registers_powerpc_isa207_vsx32l and
482 init_registers_powerpc_isa207_vsx64l.
483
484 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
485 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
486
487 * configure.srv (ipa_ppc_linux_regobj): Add
488 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
489 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
490 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
491 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
492 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
493 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
494 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
495 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
496 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
497 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
498 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
499 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
500 (ppc_hwcap): Add comment.
501 (ppc_hwcap2): New global.
502 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
503 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
504 (ppc_regsets): Add entries for the DSCR and PPR regsets.
505 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
506 when needed. Set sizes for the the DSCR and PPR regsets.
507 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
508 (initialize_low_arch): Call
509 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
510 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
511 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
512 PPC_TDESC_ISA205_PPR_DSCR_VSX.
513 (initialize_low_tracepoint): Call
514 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
515 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
516
517 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
518
519 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
520
521 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
522 Simon Marchi <simark@simark.ca>
523
524 * acinclude.m4: Include "../selftest.m4".
525 * configure: Regenerate.
526 * configure.ac: Use "GDB_AC_SELFTEST".
527 * configure.srv: Use "$enable_unittests" instead of
528 "$development" when checking whether unit tests have been
529 enabled.
530 * server.c (captured_main): Update message informing that
531 selftests have been disabled.
532
533 2018-10-04 Tom Tromey <tom@tromey.com>
534
535 * configure: Rebuild.
536
537 2018-10-04 Tom Tromey <tom@tromey.com>
538
539 * server.c (handle_status): Rename inner "thread".
540 (process_serial_event): Declare "res" in 'm' case.
541 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
542 (iterate_over_lwps): Rename inner "thread".
543 (linux_qxfer_libraries_svr4): Rename inner "len".
544 * gdbthread.h (find_thread_in_random): Rename inner "thread".
545
546 2018-10-01 Gary Benson <gbenson@redhat.com>
547
548 * gdb_proc_service.h: Moved common code to
549 common/gdb_proc_service.h.
550
551 2018-10-01 Gary Benson <gbenson@redhat.com>
552
553 * gdb_proc_service.h: Synchronize comments and whitespace with
554 GDB's version of this file.
555
556 2018-09-25 Tom Tromey <tom@tromey.com>
557
558 * configure: Rebuild.
559 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
560
561 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
562
563 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
564 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
565 ($(IPA_LIB)): Sort IPA_OBJS.
566
567 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
568
569 * Makefile.in: Remove references to $(ADD_DEPS).
570
571 2018-09-16 Tom Tromey <tom@tromey.com>
572
573 * remote-utils.c (remote_open): Use GNU style for metasyntactic
574 variables.
575 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
576 variables.
577
578 2018-09-05 Tom Tromey <tom@tromey.com>
579
580 * configure: Rebuild.
581
582 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
583
584 PR build/23399
585 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
586
587 2018-08-27 Tom Tromey <tom@tromey.com>
588
589 PR build/23087:
590 * configure: Rebuild.
591
592 2018-08-27 Tom Tromey <tom@tromey.com>
593
594 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
595 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
596 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
597 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
598 (s390x_emit_stack_adjust): Add casts to unsigned char.
599
600 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
601
602 PR gdb/23374
603 PR gdb/23375
604 * server.h (struct client_state) <disable_randomization>:
605 Initialize to 1.
606
607 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
608
609 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
610 variable.
611 (mips_supply_ptrace_register): Likewise.
612
613 2018-07-22 Tom Tromey <tom@tromey.com>
614
615 * configure: Rebuild.
616
617 2018-07-22 Tom Tromey <tom@tromey.com>
618
619 * win32-low.c (win32_create_inferior): Remove unused variables.
620 * gdbreplay.c (remote_open): Remove unused variable.
621 * remote-utils.c (remote_prepare): Remove unused variable.
622 * x86-tdesc.h (X86_TDESC_H): Define.
623 (amd64_expedite_regs): Define conditionally.
624 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
625 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
626 * remote-utils.c (readchar): Remove unused variable.
627
628 2018-07-13 Pedro Alves <palves@redhat.com>
629
630 * linux-low.c (linux_kill): Change parameter to process_info
631 pointer instead of pid. Adjust.
632 * lynx-low.c (lynx_kill): Likewise.
633 * nto-low.c (nto_kill): Likewise.
634 * spu-low.c (spu_kill): Likewise.
635 * win32-low.c (win32_kill): Likewise.
636 * server.c (handle_v_kill, kill_inferior_callback)
637 (detach_or_kill_for_exit): Adjust.
638 * target.c (kill_inferior): Change parameter to process_info
639 pointer instead of pid. Adjust.
640 * target.h (struct target_ops) <kill>: Change parameter to
641 process_info pointer instead of pid. Adjust all implementations
642 and callers.
643 (kill_inferior): Likewise.
644
645 2018-07-13 Pedro Alves <palves@redhat.com>
646
647 * linux-low.c (linux_detach, linux_join): Change parameter to
648 process_info pointer instead of pid. Adjust.
649 * lynx-low.c (lynx_detach, lynx_join): Likewise.
650 * nto-low.c (nto_detach): Likewise.
651 * spu-low.c (spu_detach, spu_join): Likewise.
652 * win32-low.c (win32_detach, win32_join): Likewise.
653 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
654 * target.h (struct target_ops) <detach, join>: Change parameter to
655 process_info pointer instead of pid. Adjust all implementations
656 and callers.
657 (detach_inferior, join_inferior): Rename 'pid' parameter to
658 'proc'.
659
660 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
661 Jan Kratochvil <jan.kratochvil@redhat.com>
662 Paul Fertser <fercerpav@gmail.com>
663 Tsutomu Seki <sekiriki@gmail.com>
664
665 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
666 (OBS): Add 'common/netstuff.o'.
667 (GDBREPLAY_OBS): Likewise.
668 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
669 (remote_open): Implement support for IPv6
670 connections.
671 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
672 and 'wspiapi.h'.
673 (handle_accept_event): Accept connections from IPv6 sources.
674 (remote_prepare): Handle IPv6-style hostnames; implement
675 support for IPv6 connections.
676 (remote_open): Implement support for printing connections from
677 IPv6 sources.
678
679 2018-07-11 Pedro Alves <palves@redhat.com>
680
681 PR gdb/23377
682 * mem-break.c (any_persistent_commands): Add process_info
683 parameter and use it instead of relying on the current process.
684 Change return type to bool.
685 * mem-break.h (any_persistent_commands): Add process_info
686 parameter and change return type to bool.
687 * server.c (handle_detach): Remove require_running_or_return call.
688 Look up the process_info for the process we're about to detach.
689 If not found, return back error to GDB. Adjust
690 any_persistent_commands call to pass down a process pointer.
691
692 2018-07-11 Pedro Alves <palves@redhat.com>
693
694 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
695 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
696 instead of collect_register_by_name.
697 * regcache.c (regcache_raw_get_unsigned_by_name): New.
698 * regcache.h (regcache_raw_get_unsigned_by_name): New.
699
700 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
701 Pedro Alves <palves@redhat.com>
702
703 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
704
705 2018-07-03 Tom Tromey <tom@tromey.com>
706
707 * linux-low.c: Update.
708 * lynx-low.c: Update.
709 * mem-break.c: Update.
710 * nto-low.c: Update.
711 * remote-utils.c: Update.
712 * server.c: Update.
713 * spu-low.c: Update.
714 * target.c: Update.
715 * win32-low.c: Update.
716
717 2018-07-03 Tom Tromey <tom@tromey.com>
718
719 * server.c: Update.
720
721 2018-07-03 Tom Tromey <tom@tromey.com>
722
723 * linux-low.c: Update.
724
725 2018-07-03 Tom Tromey <tom@tromey.com>
726
727 * target.c: Update.
728
729 2018-07-03 Tom Tromey <tom@tromey.com>
730
731 * linux-low.c: Update.
732 * linux-mips-low.c: Update.
733 * lynx-low.c: Update.
734 * nto-low.c: Update.
735 * remote-utils.c: Update.
736 * server.c: Update.
737 * spu-low.c: Update.
738 * target.c: Update.
739 * thread-db.c: Update.
740
741 2018-07-03 Tom Tromey <tom@tromey.com>
742
743 * linux-low.c: Update.
744 * linux-mips-low.c: Update.
745 * lynx-low.c: Update.
746 * mem-break.c: Update.
747 * nto-low.c: Update.
748 * remote-utils.c: Update.
749 * server.c: Update.
750 * spu-low.c: Update.
751 * target.c: Update.
752 * tracepoint.c: Update.
753
754 2018-07-03 Tom Tromey <tom@tromey.com>
755
756 * linux-low.c: Update.
757 * linux-ppc-low.c: Update.
758 * linux-x86-low.c: Update.
759 * proc-service.c: Update.
760 * server.c: Update.
761 * spu-low.c: Update.
762 * thread-db.c: Update.
763 * win32-low.c: Update.
764
765 2018-07-03 Tom Tromey <tom@tromey.com>
766
767 * linux-low.c: Update.
768 * lynx-low.c: Update.
769 * nto-low.c: Update.
770 * remote-utils.c: Update.
771 * spu-low.c: Update.
772 * thread-db.c: Update.
773 * win32-low.c: Update.
774
775 2018-06-29 Joel Brobecker <brobecker@adacore.com>
776
777 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
778 parameter in call to 'amd64_create_target_description'.
779
780 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
781
782 * x86-tdesc.h: Remove executable permission flag.
783
784 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
785
786 * configure.ac: Remove AC_PREREQ, add missing quoting.
787 * configure: Re-generate.
788 * config.in: Re-generate.
789 * aclocal.m4: Re-generate.
790
791 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
792
793 * tracepoint.h (current_traceframe): Remove declaration.
794
795 2018-06-18 Alan Hayward <alan.hayward@arm.com>
796
797 * linux-aarch64-low.c (is_sve_tdesc): New function.
798 (aarch64_sve_regs_copy_to_regcache): Likewise.
799 (aarch64_sve_regs_copy_from_regcache): Likewise.
800 (aarch64_regs_info): Add SVE checks.
801 (initialize_low_arch): Initialize SVE.
802
803 2018-06-18 Alan Hayward <alan.hayward@arm.com>
804
805 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
806
807 2018-06-11 Alan Hayward <alan.hayward@arm.com>
808
809 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
810 (initialize_low_tracepoint): Likewise
811 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
812 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
813 param.
814 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
815 checks.
816 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
817
818 2018-06-11 Alan Hayward <alan.hayward@arm.com>
819
820 * server.h (PBUFSIZ): Increase size
821
822 2018-06-11 Alan Hayward <alan.hayward@arm.com>
823
824 * regcache.c (regcache::raw_compare): New function.
825 * regcache.h (regcache::raw_compare): New declaration.
826
827 2018-06-11 Alan Hayward <alan.hayward@arm.com>
828
829 * regcache.c (new_register_cache): Use new.
830 (free_register_cache): Use delete.
831 (register_data): Use const.
832 (supply_register): Move body inside regcache.
833 (regcache::raw_supply): New override function.
834 (collect_register): Move body inside regcache.
835 (regcache::raw_collect): New override function.
836 (regcache::get_register_status): New override function.
837 * regcache.h (struct regcache): Inherit from reg_buffer_common.
838
839 2018-06-09 Tom Tromey <tom@tromey.com>
840
841 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
842 declare queue.
843 (event_queue): Use std::queue.
844 (gdb_event_xfree): Remove.
845 (initialize_event_loop, process_event, wait_for_event): Update.
846
847 2018-06-08 Stan Cox <scox@redhat.com>
848
849 * win32-low.c (win32_create_inferior): last_ptid and last_status
850 moved to client_state.
851
852 2018-06-08 Pedro Alves <palves@redhat.com>
853
854 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
855 common/common-exceptions.o, common/common-utils.o,
856 common/errors.o, common/print-utils.o and utils.o.
857 * gdbreplay.c: Include "common-defs.h" instead of the two
858 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
859 string.h or alloca.h.
860 (perror_with_name): Delete.
861 (remote_open): Use xstrdup instead of strdup.
862 (main): Rename to ...
863 (captured_main): ... this.
864 (main): New.
865
866 2018-06-08 Tom Tromey <tom@tromey.com>
867
868 * linux-low.c (linux_low_read_btrace): Update.
869
870 2018-06-04 Stan Cox <scox@redhat.com>
871
872 * server.h (struct client_state): New.
873 * server.c (cont_thread, general_thread, multi_process)
874 (report_fork_events, report_vfork_events, report_exec_events)
875 (report_thread_events, swbreak_feature, hwbreak_feature)
876 (vCont_supported, disable_randomization, pass_signals)
877 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
878 Moved to client_state.
879 * remote-utils.c (remote_debug, noack_mode)
880 (transport_is_reliable): Moved to client_state.
881 * tracepoint.c (current_traceframe): Moved to client_state.
882
883 Update all callers.
884 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
885 linux-low.c, remote-utils.h, target.c: Use client_state.
886
887 2018-05-31 Alan Hayward <alan.hayward@arm.com>
888
889 * configure.srv: Add new c/h file.
890
891 2018-05-31 Alan Hayward <alan.hayward@arm.com>
892
893 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
894 null VQ.
895
896 2018-05-25 Maciej W. Rozycki <macro@mips.com>
897
898 * gdb.arch/mips-fpregset-core.exp: New test.
899 * gdb.arch/mips-fpregset-core.c: New test source.
900
901 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
902
903 PR server/23198
904 * hostio.c (require_int): Do not report overflow for integers
905 between 0xfffffff and 0x7fffffff.
906
907 2018-05-22 Maciej W. Rozycki <macro@mips.com>
908
909 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
910 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
911 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
912 functions.
913 (the_low_target): Wire them.
914
915 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
916
917 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
918 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
919 mode. Call collect_register_by_name with vscr using
920 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
921 (ppc_store_vrregset): Add and set vscr_offset variable as in
922 ppc_fill_vrregset. Call supply_register_by_name with vscr using
923 vscr_offset.
924
925 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
926
927 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
928 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
929 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
930
931 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
932
933 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
934 (ppc_store_vsxregset): Likewise.
935 (ppc_fill_vrregset): Likewise.
936 (ppc_store_vrregset): Likewise.
937 (ppc_fill_evrregset): Likewise.
938 (ppc_store_evrregset): Likewise.
939 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
940 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
941 needed.
942
943 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
944
945 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
946 wordsize of the inferior. Call ppc_linux_target_wordsize.
947
948 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
949
950 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
951 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
952 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
953 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
954 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
955 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
956 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
957 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
958 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
959 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
960 (tdesc_powerpc_e500l): Remove.
961 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
962 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
963 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
964 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
965 linux-ppc-tdesc.h.
966 (ppc_arch_setup): Remove target description matching code. Fill a
967 ppc_linux_features struct and call ppc_linux_match_description
968 with it.
969
970 2018-05-22 Maciej W. Rozycki <macro@mips.com>
971
972 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
973 width of the requested register exceeds the width of the
974 `ptrace' data type.
975 (mips_cannot_store_register): Likewise.
976
977 2018-05-21 Maciej W. Rozycki <macro@mips.com>
978
979 * linux-mips-low.c (mips_fetch_register): New function. Update
980 preceding comment.
981 (mips_store_gregset): Supply 0 rather than $restart for $zero.
982 (the_low_target): Wire `mips_fetch_register'.
983
984 2018-05-10 Joel Brobecker <brobecker@adacore.com>
985
986 * lynx-i386-low.c (LYNXOS_178): New macro.
987 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
988 the layout on LynxOS-178.
989 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
990 handle floating point registers that are not supported by
991 LynxOS-178.
992
993 2018-05-10 Tom Tromey <tom@tromey.com>
994
995 * configure: Rebuild.
996
997 2018-05-10 Joel Brobecker <brobecker@adacore.com>
998
999 PR server/23158:
1000 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1001 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1002 Use it to set the expedite_regs field in the given tdesc.
1003 * x86-tdesc.h: New file.
1004 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1005 Adjust following the addition of the new expedite_regs parameter
1006 to init_target_desc.
1007 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1008 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1009 (i386_linux_read_description, amd64_linux_read_description):
1010 Adjust following the addition of the new expedite_regs parameter
1011 to init_target_desc.
1012 * lynx-i386-low.c: #include "x86-tdesc.h".
1013 (lynx_i386_arch_setup): Adjust following the addition of the new
1014 expedite_regs parameter to init_target_desc.
1015 * nto-x86-low.c: #include "x86-tdesc.h".
1016 (nto_x86_arch_setup): Adjust following the addition of the new
1017 expedite_regs parameter to init_target_desc.
1018 * win32-i386-low.c: #include "x86-tdesc.h".
1019 (i386_arch_setup): Adjust following the addition of the new
1020 expedite_regs parameter to init_target_desc.
1021
1022 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1023
1024 PR server/23158:
1025 * win32-low.c (win32_create_inferior): Add call to my_wait
1026 setting last_status global.
1027
1028 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1029
1030 PR server/23158:
1031 * win32-low.c (create_process): Only call gdb_tilde_expand if
1032 inferior_cwd is not NULL.
1033
1034 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1035
1036 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1037 registers to the cache if their values have changed.
1038 (i387_xsave_to_cache): Provide default values for x87 control
1039 registers when these features are available, but disabled.
1040 * regcache.c (supply_register_by_name_zeroed): New function.
1041 * regcache.h (supply_register_by_name_zeroed): Declare new
1042 function.
1043
1044 2018-05-07 Tom Tromey <tom@tromey.com>
1045
1046 * configure: Rebuild.
1047
1048 2018-05-04 Tom Tromey <tom@tromey.com>
1049
1050 * configure: Rebuild.
1051
1052 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1053 Pedro Alves <palves@redhat.com>
1054
1055 * linux-aarch64-low.c (aarch64_stopped_data_address):
1056 Likewise.
1057
1058 2018-04-27 Tom Tromey <tom@tromey.com>
1059
1060 * configure: Rebuild.
1061
1062 2018-04-23 Tom Tromey <tom@tromey.com>
1063
1064 * configure: Rebuild.
1065
1066 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1067
1068 * Makefile.in (depcomp): Add "..".
1069 (all_deps_files): New and use it.
1070
1071 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1072
1073 * configure.srv (aarch64*-*-linux*): Don't include xml.
1074 (i[34567]86-*-cygwin*): Likewise.
1075 (i[34567]86-*-linux*): Likewise.
1076 (i[34567]86-*-lynxos*): Likewise.
1077 (i[34567]86-*-mingw32ce*): Likewise.
1078 (i[34567]86-*-mingw*): Likewise.
1079 (i[34567]86-*-nto*): Likewise.
1080 (tic6x-*-uclinux): Likewise.
1081 (x86_64-*-linux*): Likewise.
1082 (x86_64-*-mingw*): Likewise.
1083 (x86_64-*-cygwin*): Likewise.
1084
1085 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1086
1087 * tdesc.c: Remove xml parameter.
1088
1089 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1090
1091 * server.c (get_features_xml): Remove cast.
1092 * tdesc.c (void target_desc::accept): Fill in function.
1093 (tdesc_get_features_xml): Remove old xml creation.
1094 (print_xml_feature::visit_pre): Add xml vistor.
1095 * tdesc.h (struct target_desc): Make xmltarget mutable.
1096 (tdesc_get_features_xml): Remove declaration.
1097
1098 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1099
1100 * tdesc.c (tdesc_architecture_name): Add new function.
1101 (tdesc_osabi_name): Likewise.
1102 (tdesc_get_features_xml): Use new functions.
1103
1104 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1105
1106 * tdesc.c (tdesc_create_flags): Remove.
1107 (tdesc_add_flag): Likewise.
1108 (tdesc_named_type): Likewise.
1109 (tdesc_create_union): Likewise.
1110 (tdesc_create_struct): Likewise.
1111 (tdesc_create_vector): Likewise.
1112 (tdesc_add_bitfield): Likewise.
1113 (tdesc_add_field): Likewise.
1114 (tdesc_set_struct_size): Likewise.
1115
1116 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1117
1118 * tdesc.c (~target_desc): Remove implictly deleted items.
1119 (init_target_desc): Iterate all features.
1120 (tdesc_get_features_xml): Use vector.
1121 (tdesc_create_feature): Create feature.
1122 * tdesc.h (tdesc_feature) Remove
1123 (target_desc): Add features.
1124
1125 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1126
1127 * Makefile.in: Add common/tdesc.c
1128 * tdesc.c (init_target_desc): init all reg_defs from register
1129 vector.
1130 (tdesc_create_reg): Create tdesc_reg.
1131 * tdesc.h (tdesc_feature): Add register vector.
1132
1133 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1134
1135 * tdesc.h (struct target_desc) <features>: Change type to
1136 std::vector<std::string>.
1137 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1138 changes.
1139 (tdesc_get_features_xml): Likewise.
1140 (tdesc_create_feature): Likewise.
1141
1142 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1143
1144 * regcache.c (find_register_by_number): Return a ref.
1145 (find_regno): Use references.
1146 (register_size): Likewise.
1147 (register_data): Likewise.
1148 * tdesc.c (target_desc::~target_desc): Remove free calls.
1149 (target_desc::operator==): Use std::vector compare.
1150 (init_target_desc): Use reference.
1151 (tdesc_create_reg): Use reg constructors.
1152 * tdesc.h (struct target_desc): Replace pointer with object.
1153
1154 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1155
1156 * regcache.c (find_register_by_number): Make static.
1157 (find_regno): Use find_register_by_number
1158 * regcache.h (struct reg): Remove declaration.
1159
1160 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1161
1162 * tdesc.c (target_desc::~target_desc): Move to here.
1163 (target_desc::operator==): Likewise.
1164 * tdesc.h (target_desc::~target_desc): Move from here.
1165 (target_desc::operator==): Likewise.
1166
1167 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1168
1169 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1170
1171 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1172
1173 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1174 S390_TDESC_GS.
1175 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1176 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1177 and init_registers_s390_gs_linux64.
1178
1179 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1180
1181 * linux-s390-low.c (s390_fill_gs): Remove function.
1182 (s390_fill_gsbc): Remove function.
1183 (s390_regsets): Set fill functions for the guarded storage regsets
1184 to NULL.
1185
1186 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1187
1188 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1189 the word size. Add comment.
1190 (s390_get_wordsize): New function.
1191 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1192 pswm with it. Instead, use s390_get_wordsize to determine the
1193 word size first and derive the correct tdesc from that directly.
1194
1195 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1196
1197 * Makefile.in: Include silent-rules.mk.
1198 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1199 (COMPILE): Add ECHO_CXX.
1200 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1201 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1202 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1203 (version-generated.c): Add ECHO_GEN.
1204 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1205 (IPAGENT_COMPILE): Add ECHO_CXX.
1206 (%-generated.c): Add ECHO_REGDAT.
1207
1208 2018-03-14 Tom Tromey <tom@tromey.com>
1209
1210 PR cli/14977:
1211 * ax.c (ax_printf): Special case for NULL.
1212
1213 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1214
1215 * linux-low.c (linux_qxfer_libraries_svr4): Use
1216 xml_escape_text_append.
1217
1218 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1219
1220 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1221
1222 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1223
1224 * server.c (handle_general_set): Remove unnecessary xstrdup.
1225
1226 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1227
1228 * server.c (parse_debug_format_options): Adjust to
1229 delim_string_to_char_ptr_vec changes.
1230 * thread-db.c (thread_db_load_search): Adjust to
1231 dirnames_to_char_ptr_vec changes.
1232
1233 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1234
1235 * target.h (target_enable_btrace, target_disable_btrace)
1236 (target_read_btrace, target_read_btrace_conf): Turn macro into
1237 inline function. Throw error if target method is not defined.
1238 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1239 check for btrace target method. Be prepared to handle exceptions
1240 from btrace target methods.
1241
1242 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1243
1244 * server.c (captured_main): Change order of error message printed
1245 when the current working directory cannot be found.
1246
1247 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1248
1249 * server.c: Include "filenames.h" and "pathstuff.h".
1250 (program_name): Delete variable.
1251 (program_path): New anonymous class.
1252 (get_exec_wrapper): Use "program_path" instead of
1253 "program_name".
1254 (handle_v_run): Likewise.
1255 (captured_main): Likewise.
1256 (process_serial_event): Likewise.
1257
1258 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1259
1260 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1261 (OBJS): Add "pathstuff.o".
1262 * server.c (current_directory): New global variable.
1263 (captured_main): Initialize "current_directory".
1264
1265 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1266
1267 * tdesc.c: Use common/tdesc.h.
1268 * tdesc.h: Likewise.
1269
1270 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1271 Simon Marchi <simon.marchi@ericsson.com>
1272
1273 * Makefile.in: Switch order of make rules.
1274
1275 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1276
1277 * Makefile.in: Add common directory in build.
1278 * configure.ac: Add common reference.
1279 * configure: Regenerate.
1280
1281 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1282
1283 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1284 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1285 * spu-low.c (spu_target_ops): Likewise.
1286 * win32-low.c (win32_target_ops): Likewise.
1287 * server.c (supported_btrace_packets): Report packets unconditionally.
1288 * target.h (target_ops) <supports_btrace>: Remove.
1289 (target_supports_btrace): Remove.
1290
1291 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1292
1293 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1294 (handle_btrace_disable): Change return type to void. Use exceptions
1295 to report errors.
1296 (handle_btrace_general_set): Catch exception and copy message to
1297 return message.
1298
1299 2018-02-08 Tom Tromey <tom@tromey.com>
1300
1301 * linux-low.c (install_software_single_step_breakpoints): Use
1302 make_scoped_restore.
1303 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1304 (do_restore_current_thread_cleanup): Remove.
1305 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1306 declare.
1307
1308 2018-02-08 Tom Tromey <tom@tromey.com>
1309
1310 * mem-break.c (set_raw_breakpoint_at): Use
1311 gdb::unique_xmalloc_ptr.
1312
1313 2018-01-30 Pedro Alves <palves@redhat.com>
1314
1315 PR gdb/13211
1316 * target.c (target_terminal::terminal_state): Rename to ...
1317 (target_terminal::m_terminal_state): ... this.
1318
1319 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1320
1321 * linux-low.c (handle_extended_wait): Surround call to
1322 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1323
1324 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1325
1326 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1327 linux_ptrace_attach_fail_reason_string now returning an
1328 std::string.
1329 (linux_attach): Likewise.
1330 * thread-db.c (attach_thread): Likewise.
1331
1332 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1333
1334 PR gdb/21559
1335 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1336 checking for fs_base/gs_base fields in struct user_regs_struct.
1337 * configure: Regenerate.
1338
1339 2018-01-16 Yao Qi <yao.qi@linaro.org>
1340
1341 PR gdb/18749
1342 * linux-low.c (fetch_register): Call supply_register instead of
1343 error.
1344
1345 2018-01-08 Yao Qi <yao.qi@linaro.org>
1346 Simon Marchi <simon.marchi@ericsson.com>
1347
1348 * Makefile.in (OBS): Remove selftest.o.
1349 * configure.ac: Set srv_selftest_objs if $development is true.
1350 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1351 * configure: Re-generated.
1352 * server.c (captured_main): Wrap variable selftest_filter with
1353 GDB_SELF_TEST.
1354
1355 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1356
1357 * server.c (parse_debug_format_options): Return std::string.
1358 (handle_monitor_command, captured_main): Adjust.
1359
1360 2018-01-05 Pedro Alves <palves@redhat.com>
1361
1362 PR gdb/18653
1363 * server.c (captured_main): Pass quiet=false to
1364 save_original_signals_state.
1365
1366 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1367
1368 * gdbreplay.c (gdbreplay_version): Update copyright year in
1369 version message.
1370 * server.c (gdbserver_version): Likewise.
1371
1372 2017-12-08 Tom Tromey <tom@tromey.com>
1373
1374 * ax.c (ax_printf): Update.
1375
1376 2017-12-07 Yao Qi <yao.qi@linaro.org>
1377
1378 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1379 aarch64_linux_read_description.
1380 * linux-amd64-ipa.c (idx2mask): New array.
1381 (get_ipa_tdesc): Move idx2mask out.
1382 (initialize_low_tracepoint): Initialize target descriptions.
1383 * linux-i386-ipa.c (idx2mask): New array.
1384 (get_ipa_tdesc): Move idx2mask out.
1385 (initialize_low_tracepoint): Initialize target descriptions.
1386
1387 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1388
1389 * tdesc.c (struct tdesc_type): Change return type.
1390 (tdesc_add_flag): Change parameter type.
1391 (tdesc_add_bitfield): Likewise.
1392 (tdesc_add_field): Likewise.
1393 (tdesc_set_struct_size): Likewise.
1394
1395 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1396
1397 * regcache.c (registers_to_string): Remove unused variable.
1398
1399 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1400
1401 * inferiors.c (for_each_inferior_with_data): Remove.
1402 * inferiors.h (for_each_inferior_with_data): Remove.
1403 * server.c (handle_qxfer_threads_worker): Change parameter type.
1404 (handle_qxfer_threads_proper): Use for_each_thread.
1405
1406 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1407
1408 * inferiors.c (for_each_inferior): Remove.
1409 (clear_inferiors): Use for_each_thread.
1410 * inferiors.h (for_each_inferior): Remove.
1411 * linux-low.c (linux_wait_for_event_filtered): Use
1412 for_each_thread.
1413 (linux_stabilize_threads): Likewise.
1414 * regcache.c (regcache_release): Likewise.
1415 * server.c (gdb_wants_all_threads_stopped): Likewise.
1416 (clear_pending_status_callback): Remove.
1417 (handle_status): Use for_each_thread.
1418 (captured_main): Likewise.
1419 * win32-low.c (child_init_thread_list): Likewise.
1420 (win32_clear_inferiors): Likewise.
1421 (fake_breakpoint_event): Likewise.
1422
1423 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1424
1425 * inferiors.h (find_inferior): Remove.
1426 * inferiors.c (find_inferior): Remove.
1427
1428 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1429
1430 * linux-low.c (resume_status_pending_p): Update comment.
1431 (need_step_over_p): Update comment.
1432
1433 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1434
1435 * linux-low.c (proceed_one_lwp): Return void, change parameter
1436 type.
1437 (unsuspend_and_proceed_one_lwp): Likewise.
1438 (proceed_all_lwps): Use for_each_thread.
1439 (unstop_all_lwps): Likewise.
1440
1441 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1442
1443 * linux-low.c (linux_resume_one_thread): Return void, take
1444 parameter directly.
1445 (linux_resume): Use for_each_thread.
1446
1447 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1448
1449 * linux-low.c (send_sigstop_callback): Return void, change
1450 parameter type. Rename to...
1451 (send_sigstop): ... this.
1452 (suspend_and_send_sigstop_callback): Return void, change parameter
1453 type. Rename to...
1454 (suspend_and_send_sigstop): ... this.
1455 (stop_all_lwps): Use for_each_thread.
1456
1457 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1458
1459 * linux-low.c (lwp_running): Return bool, remove unused
1460 argument.
1461 (linux_stabilize_threads): Use find_thread.
1462
1463 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1464
1465 * linux-low.c (select_singlestep_lwp_callback): Remove.
1466 (count_events_callback): Remove.
1467 (select_event_lwp_callback): Remove.
1468 (select_event_lwp): Use find_thread/for_each_thread.
1469
1470 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1471
1472 * linux-low.c (not_stopped_callback): Return bool, take filter
1473 argument directly.
1474 (linux_wait_for_event_filtered): Use find_thread.
1475 (linux_wait_1): Likewise.
1476
1477 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1478
1479 * linux-low.c (same_lwp): Remove.
1480 (find_lwp_pid): Use find_thread.
1481
1482 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1483
1484 * linux-low.c (delete_lwp_callback): Remove.
1485 (linux_mourn): Use for_each_thread.
1486
1487 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1488
1489 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1490 args parameter, don't check for pid.
1491 (linux_detach): Use for_each_thread.
1492
1493 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1494
1495 * linux-low.c (struct counter): Remove.
1496 (second_thread_of_pid_p): Remove.
1497 (last_thread_of_process_p): Use find_thread.
1498
1499 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1500
1501 * inferiors.c (find_inferior_in_random): Remove.
1502 * inferiors.h (find_inferior_in_random): Remove.
1503 * linux-low.c (status_pending_p_callback): Return bool, accept
1504 parameter ptid directly.
1505 (linux_wait_for_event_filtered): Use find_thread_in_random.
1506 (linux_wait_1): Likewise.
1507
1508 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1509
1510 * inferiors.c (find_inferior_id): Remove.
1511 (find_thread_ptid): Move implemention from find_inferior_id to
1512 here.
1513 * inferiors.h (find_inferior_id): Remove.
1514 * server.c (handle_status): Use find_thread_ptid.
1515 (process_serial_event): Likewise.
1516 * thread-db.c (find_one_thread): Likewise.
1517 (thread_db_thread_handle): Likewise.
1518 * win32-low.c (thread_rec): Likewise.
1519 (child_delete_thread): Likewise.
1520 (win32_thread_alive): Likewise.
1521 (get_child_debug_event): Likewise.
1522
1523 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1524
1525 * linux-mips-low.c (update_watch_registers_callback): Return
1526 void, remove pid_p parameter, don't check for pid.
1527 (mips_insert_point, mips_remove_point): Use for_each_thread.
1528
1529 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1530
1531 * lynx.low (lynx_delete_thread_callback): Remove.
1532 (lynx_mourn): Use for_each_thread.
1533
1534 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1535
1536 * regcache.c (regcache_invalidate_one): Remove.
1537 (regcache_invalidate_pid): use for_each_thread.
1538
1539 2017-11-26 Tom Tromey <tom@tromey.com>
1540
1541 * linux-low.c (linux_create_inferior): Update.
1542
1543 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1544
1545 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1546
1547 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1548
1549 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1550 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1551 * linux-aarch64-tdesc-selftest.c: New file.
1552 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1553
1554 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1555
1556 * configure.srv: Add new file.
1557 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1558 * linux-aarch64-tdesc-selftest.c: New file.
1559 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1560
1561 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1562
1563 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1564 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1565 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1566
1567 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1568
1569 * configure.srv: Add new files.
1570 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1571 aarch64_linux_read_description.
1572 * linux-aarch64-low.c (aarch64_linux_read_description):
1573 Merge with aarch64_arch_setup.
1574 (aarch64_arch_setup): Call aarch64_linux_read_description.
1575 * linux-aarch64-tdesc.c: New file.
1576 * linux-aarch64-tdesc.h: New file.
1577
1578 2017-11-24 Yao Qi <yao.qi@linaro.org>
1579
1580 * configure.srv: Set $srv_regobj for tic6x-linux.
1581 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1582 (tic6x_read_description): Move some code to tic6x_arch_setup.
1583 (tic6x_tdesc_test): New function.
1584 (initialize_low_arch): Call selftests::register_test.
1585
1586 2017-11-22 Yao Qi <yao.qi@linaro.org>
1587
1588 * remote-utils.c (prepare_resume_reply): Use memcpy.
1589
1590 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1591
1592 * linux-low.c (kill_one_lwp_callback): Return void, take
1593 argument directly, don't filter on pid.
1594 (linux_kill): Use for_each_thread.
1595
1596 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1597
1598 * linux-low.c (need_step_over_p): Return bool, remove dummy
1599 argument.
1600 (linux_resume, proceed_all_lwps): Use find_thread.
1601
1602 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1603
1604 * linux-low.c (resume_status_pending_p): Return bool, remove
1605 flag_p argument.
1606 (linux_resume): Use find_thread.
1607
1608 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1609
1610 * linux-low.c (struct thread_resume_array): Remove.
1611 (linux_set_resume_request): Return void, take arguments
1612 directly.
1613 (linux_resume): Use for_each_thread.
1614
1615 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1616
1617 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1618 return bool, remove data argument.
1619 (linux_stabilize_threads): Use find_thread.
1620
1621 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1622
1623 * linux-low.c (unsuspend_one_lwp): Remove.
1624 (unsuspend_all_lwps): Use for_each_thread, inline code from
1625 unsuspend_one_lwp.
1626
1627 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1628
1629 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1630 * linux-low.c (struct iterate_over_lwps_args): Remove.
1631 (iterate_over_lwps_filter): Remove.
1632 (iterate_over_lwps): Use find_thread.
1633
1634 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1635
1636 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1637 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1638 code from reset_lwp_ptrace_options_callback.
1639
1640 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1641
1642 * linux-arm-low.c (struct update_registers_data): Remove.
1643 (update_registers_callback): Return void, take arguments
1644 directly, don't check thread's pid.
1645 (arm_insert_point, arm_remove_point): Use for_each_thread.
1646
1647 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1648
1649 * win32-low.c (continue_one_thread): Return void, take argument
1650 directly.
1651 (child_continue): Use for_each_thread.
1652
1653 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1654
1655 * win32-i386-low.c (update_debug_registers_callback): Rename
1656 to ...
1657 (update_debug_registers): ... this, return void, remove pid_p arg.
1658 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1659
1660 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1661
1662 * inferiors.h (struct process_info): Add constructor, initialize
1663 fields..
1664 <syscalls_to_catch>: Change type to std::vector<int>.
1665 * inferiors.c (add_process): Allocate process_info with new.
1666 (remove_process): Free process_info with delete.
1667 * linux-low.c (handle_extended_wait): Adjust.
1668 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1669 * server.c (handle_general_set): Adjust.
1670
1671 2017-11-16 Pedro Alves <palves@redhat.com>
1672
1673 * remote-utils.c (remote_close): Block SIGIO signals instead of
1674 uninstalling the SIGIO handler.
1675
1676 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1677
1678 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1679
1680 2017-11-16 Yao Qi <yao.qi@linaro.org>
1681
1682 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1683 (tic6x_store_gregset): Likewise.
1684 (tic6x_usrregs_info): Move it up.
1685
1686 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1687
1688 * Makefile.in: Update arch rules.
1689 * configure.srv: Explicitly mark arch/ files.
1690
1691 2017-11-13 Andreas Schwab <schwab@suse.de>
1692
1693 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1694 function.
1695 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1696
1697 2017-11-06 Pedro Alves <palves@redhat.com>
1698
1699 * config.in, configure: Regenerate.
1700
1701 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1702
1703 * target.c (struct thread_search): Remove.
1704 (thread_search_callback): Remove.
1705 (prepare_to_access_memory): Use for_each_thread instead of
1706 find_inferior. Inline code from thread_search_callback.
1707
1708 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1709
1710 * server.c (struct visit_actioned_threads_data): Remove.
1711 (visit_actioned_threads): Change prototype to take arguments
1712 directly.
1713 (resume): Use find_thread instead of find_inferior.
1714
1715 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1716
1717 * server.c (queue_stop_reply_callback): Change prototype, return
1718 void.
1719 (find_status_pending_thread_callback): Remove.
1720 (handle_status): Replace find_inferior with find_thread and
1721 for_each_thread.
1722
1723 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1724
1725 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1726 with REGNO.
1727 (aarch64_store_gregset): Likewise.
1728 (aarch64_fill_fpregset): Likewise.
1729 (aarch64_store_fpregset): Likewise.
1730
1731 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1732
1733 * gdbthread.h (find_thread, for_each_thread): New functions.
1734 * inferiors.c (thread_of_pid): Remove.
1735 (find_any_thread_of_pid): Use find_thread.
1736 * linux-low.c (num_lwps): Use for_each_thread.
1737
1738 2017-10-17 Yao Qi <yao.qi@linaro.org>
1739
1740 * Makefile.in: Remove one rule.
1741 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1742
1743 2017-10-17 Yao Qi <yao.qi@linaro.org>
1744
1745 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1746 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1747
1748 2017-10-17 Yao Qi <yao.qi@linaro.org>
1749
1750 * configure.srv: Rename arm.o with arch/arm.o.
1751
1752 2017-10-17 Yao Qi <yao.qi@linaro.org>
1753
1754 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1755 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1756 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1757 (arch-i386.o, arch-amd64.o): Remove rules.
1758 (arch/%.o): New rule.
1759 Update POSTCOMPILE and COMPILE.pre.
1760 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1761 * configure: Re-generated.
1762 * configure.srv: Replace arch-i386.o with arch/i386.o.
1763 Replace arch-amd64.o with arch/amd64.o.
1764
1765 2017-10-16 Yao Qi <yao.qi@linaro.org>
1766
1767 * configure: Regenerated.
1768
1769 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1770
1771 * inferiors.h: (struct inferior_list): Remove.
1772 (struct inferior_list_entry); Remove.
1773 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1774 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1775 get_first_inferior): Remove.
1776 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1777 find_inferior_id, find_inferior_in_random): Change signature.
1778 * inferiors.c (all_threads): Change type to
1779 std::list<thread_info *>.
1780 (get_thread): Remove macro.
1781 (find_inferior, find_inferior_id): Change signature, implement
1782 using find_thread.
1783 (find_inferior_in_random): Change signature, implement using
1784 find_thread_in_random.
1785 (for_each_inferior, for_each_inferior_with_data): Change
1786 signature, implement using for_each_thread.
1787 (add_inferior_to_list, remove_inferior): Remove.
1788 (add_thread, get_first_thread, thread_of_pid,
1789 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1790 (get_first_inferior, one_inferior_p, clear_inferior_list):
1791 Remove.
1792 (clear_inferiors, get_thread_process): Update.
1793 * gdbthread.h: Include <list>.
1794 (struct thread_info) <entry>: Remove field.
1795 <id>: New field.
1796 (all_threads): Change type to std::list<thread_info *>.
1797 (get_first_inferior): Add doc.
1798 (find_thread, for_each_thread, find_thread_in_random): New
1799 functions.
1800 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1801 * linux-arm-low.c (update_registers_callback): Update.
1802 * linux-low.c (second_thread_of_pid_p): Update.
1803 (kill_one_lwp_callback, linux_detach_lwp_callback,
1804 delete_lwp_callback, status_pending_p_callback, same_lwp,
1805 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1806 iterate_over_lwps, not_stopped_callback,
1807 resume_stopped_resumed_lwps, count_events_callback,
1808 select_singlestep_lwp_callback, select_event_lwp_callback,
1809 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1810 suspend_and_send_sigstop_callback, wait_for_sigstop,
1811 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1812 lwp_running, linux_set_resume_request, resume_status_pending_p,
1813 need_step_over_p, start_step_over, linux_resume_one_thread,
1814 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1815 reset_lwp_ptrace_options_callback): Update.
1816 * linux-mips-low.c (update_watch_registers_callback): Update.
1817 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1818 Update.
1819 (free_register_cache_thread_one): Remove.
1820 (regcache_release): Update.
1821 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1822 handle_qxfer_threads_worker): Update.
1823 (handle_query): Update, use list iterator.
1824 (visit_actioned_threads, handle_pending_status,
1825 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1826 clear_pending_status_callback, set_pending_status_callback,
1827 find_status_pending_thread_callback, handle_status,
1828 process_serial_event): Update.
1829 * target.c (thread_search_callback): Update.
1830 * thread-db.c (thread_db_get_tls_address): Update.
1831 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1832 Update.
1833 * win32-i386-low.c (update_debug_registers_callback): Update.
1834 * win32-low.c (delete_thread_info, child_delete_thread,
1835 continue_one_thread, suspend_one_thread,
1836 get_child_debug_event): Adjust.
1837
1838 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1839
1840 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1841 * inferiors.h: Include <list>.
1842 (struct process_info) <entry>: Remove field.
1843 <pid>: New field.
1844 (pid_of): Change macro to function.
1845 (ptid_of, lwpid_of): Remove macro.
1846 (all_processes): Change type to std::list<process_info *>.
1847 (ALL_PROCESSES): Remove macro.
1848 (for_each_process, find_process): New function.
1849 * inferiors.c (all_processes): Change type to
1850 std::list<process_info *>.
1851 (find_thread_process): Adjust.
1852 (add_process): Likewise.
1853 (remove_process): Likewise.
1854 (find_process_pid): Likewise.
1855 (get_first_process): Likewise.
1856 (started_inferior_callback): Remove.
1857 (have_started_inferiors_p): Adjust.
1858 (attached_inferior_callback): Remove.
1859 (have_attached_inferiors_p): Adjust.
1860 * linux-low.c (check_zombie_leaders): Likewise.
1861 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1862 (x86_linux_update_xmltarget): Adjust.
1863 * server.c (handle_query): Likewise.
1864 (gdb_reattached_process): Remove.
1865 (handle_status): Adjust.
1866 (kill_inferior_callback): Likewise.
1867 (detach_or_kill_inferior): Remove.
1868 (print_started_pid): Likewise.
1869 (print_attached_pid): Likewise.
1870 (detach_or_kill_for_exit): Update.
1871 (process_serial_event): Likewise.
1872 * linux-arm-low.c (arm_new_fork): Likewise.
1873
1874 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1875
1876 * dll.h: Include <list>.
1877 (struct dll_info): Add constructor.
1878 <entry>: Remove field.
1879 (all_dlls): Change type to std::list<dll_info>.
1880 * dll.c: Include <algorithm>.
1881 (get_dll): Remove macro.
1882 (all_dlls): Change type to std::list<dll_info *>.
1883 (free_one_dll): Remove.
1884 (match_dll): Likewise.
1885 (loaded_dll): Adjust.
1886 (unloaded_dll): Adjust to all_dlls type change, use
1887 std::find_if. Inline code from match_dll.
1888 (clear_dlls): Adjust to all_dlls type change.
1889 * server.c (emit_dll_description): Remove.
1890 (handle_qxfer_libraries): Adjust to all_dlls type change,
1891 integrate emit_dll_description's functionality.
1892
1893 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1894
1895 * linux-low.h (struct linux_target_ops) <delete_process>: New
1896 field.
1897 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1898 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1899 (struct linux_target_ops): Add delete_process callback.
1900 * linux-arm-low.c (arm_delete_process): New.
1901 (struct linux_target_ops): Add delete_process callback.
1902 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1903 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1904 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1905 * linux-mips-low.c (mips_linux_delete_process): New.
1906 (struct linux_target_ops): Add delete_process callback.
1907 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1908 * linux-s390-low.c (struct linux_target_ops): Likewise.
1909 * linux-sh-low.c (struct linux_target_ops): Likewise.
1910 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1911 * linux-tile-low.c (struct linux_target_ops): Likewise.
1912 * linux-x86-low.c (x86_linux_delete_process): New.
1913 (struct linux_target_ops): Add delete_process callback.
1914 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1915
1916 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1917
1918 * linux-aarch64-low.c (the_low_target): Add thread delete
1919 callback.
1920 * linux-arm-low.c (arm_delete_thread): New function.
1921 (the_low_target): Add thread delete callback.
1922 * linux-bfin-low.c (the_low_target): Likewise.
1923 * linux-crisv32-low.c (the_low_target): Likewise.
1924 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1925 set.
1926 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1927 field.
1928 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1929 * linux-mips-low.c (mips_linux_delete_thread): New function.
1930 (the_low_target): Add thread delete callback.
1931 * linux-ppc-low.c (the_low_target): Likewise.
1932 * linux-s390-low.c (the_low_target): Likewise.
1933 * linux-sh-low.c (the_low_target): Likewise.
1934 * linux-tic6x-low.c (the_low_target): Likewise.
1935 * linux-tile-low.c (the_low_target): Likewise.
1936 * linux-x86-low.c (the_low_target): Likewise.
1937 * linux-xtensa-low.c (the_low_target): Likewise.
1938
1939 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1940
1941 * win32-low.c: Include "common-inferior.h".
1942
1943 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1944
1945 * inferiors.c (set_inferior_cwd): New function.
1946 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1947 (handle_query): Inform that QSetWorkingDir is supported.
1948 * win32-low.c (create_process): Pass the inferior's cwd to
1949 CreateProcess.
1950
1951 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1952
1953 * inferiors.c (current_inferior_cwd): New global variable.
1954 (get_inferior_cwd): New function.
1955 * inferiors.h (struct process_info) <cwd>: New field.
1956
1957 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1958
1959 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1960 (OBS): Add gdb_tilde_expand.o.
1961
1962 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1963
1964 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1965 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1966
1967 2017-09-29 Pedro Alves <palves@redhat.com>
1968
1969 * ax.c (gdb_parse_agent_expr): Constify.
1970 * ax.h (gdb_parse_agent_expr): Constify.
1971 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1972 Constify.
1973 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1974 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1975 * remote-utils.h (read_ptid): Constify.
1976 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1977 (process_point_options, process_serial_event): Constify.
1978 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1979 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1980 (cmd_qtbuffer): Constify.
1981
1982 2017-09-29 Pedro Alves <palves@redhat.com>
1983
1984 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1985 fails.
1986
1987 2017-09-29 Pedro Alves <palves@redhat.com>
1988
1989 * linux-low.c (handle_extended_wait): Pass parent thread instead
1990 of process to thread_db_notice_clone.
1991 * linux-low.h (thread_db_notice_clone): Replace parent process
1992 parameter with parent thread parameter.
1993 * thread-db.c (find_one_thread): Add comment.
1994 (thread_db_notice_clone): Replace parent process parameter with
1995 parent thread parameter. Temporarily switch to the parent thread.
1996
1997 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1998
1999 * gdbthread.h: Include "common-gdbthread.h".
2000 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2001 "if" when validating the ptid.
2002 * remote-utils.c: Include "gdbthread.h".
2003 (prepare_resume_reply): Use "switch_to_thread".
2004 * target.c (done_accessing_memory): Likewise.
2005
2006 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2007
2008 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2009 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2010 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2011 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2012 s390x-gs-linux64-ipa.o to ipa_obj.
2013 * linux-s390-low.c (HWCAP_S390_GS): New define.
2014 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2015 New functions.
2016 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2017 (s390_arch_setup): Check for guarded-storage support and choose
2018 appropriate tdesc.
2019 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2020 init_registers_s390x_gs_linux64.
2021 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2022 enum value.
2023 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2024 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2025
2026 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2027
2028 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2029
2030 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2031
2032 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2033 (thread_db_thread_handle): Declare.
2034 * linux-low.c (linux_target_ops): Initialize thread_handle.
2035 * server.c (handle_qxfer_threads_worker): Add support for
2036 "handle" attribute.
2037 * target.h (struct target_ops): Add new function pointer,
2038 thread_handle.
2039 (target_thread_handle): Define.
2040 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2041 field in lwp.
2042 (thread_db_thread_handle): New function.
2043
2044 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2045
2046 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2047 * linux-low.h (thread_db_notice_clone): Declare.
2048 * thread-db.c (thread_db_notice_clone): New function.
2049
2050 2017-09-21 Pedro Alves <palves@redhat.com>
2051
2052 * server.c (gdb_read_memory, handle_status, process_serial_event)
2053 (handle_serial_event, handle_target_event): Adjust to
2054 set_desired_thread prototype change.
2055 * target.c (set_desired_thread): Remove 'use_general' parameter
2056 and adjust.
2057 * target.h (set_desired_thread): Remove 'use_general' parameter.
2058
2059 2017-09-20 Tom Tromey <tom@tromey.com>
2060
2061 * target.c (target_terminal::terminal_state): Define.
2062 (target_terminal::init): Rename from target_terminal_init.
2063 (target_terminal::inferior): Rename from
2064 target_terminal_inferior.
2065 (target_terminal::ours): Rename from target_terminal_ours.
2066 (target_terminal::ours_for_output, target_terminal::info): New.
2067
2068 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2069
2070 * server.c (accumulate_file_name_length): Remove.
2071 (emit_dll_description): Adjust to std::string change.
2072 (handle_qxfer_libraries): Use std::string to hold document.
2073
2074 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2075
2076 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2077 return type of xml_escape_text.
2078 * server.c (emit_dll_description): Likewise.
2079
2080 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2081
2082 * server.c (captured_main): Accept argument for --selftest.
2083 Update run_tests call.
2084 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2085 when registering selftests.
2086
2087 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2088
2089 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2090 instead of "VEC" for "target_desc.reg_defs".
2091 (regcache_cpy): Likewise.
2092 (registers_to_string): Likewise.
2093 (registers_from_string): Likewise.
2094 (find_regno): Likewise.
2095 (supply_regblock): Likewise.
2096 (regcache_raw_read_unsigned): Likewise.
2097 * tdesc.c (init_target_desc): Likewise.
2098 (tdesc_create_reg): Likewise.
2099 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2100 (struct target_desc) <reg_defs>: Convert to "std::vector".
2101 (target_desc): Do not initialize "reg_defs".
2102 (~target_desc): Update code to use "std::vector" instead of "VEC"
2103 for "target_desc.reg_defs".
2104 (operator==): Likewise.
2105
2106 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2107
2108 * inferiors.h (thread_to_gdb_id): Remove.
2109 * inferiors.c (thread_to_gdb_id): Remove.
2110 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2111 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2112 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2113 Likewise.
2114 * nto-low.c (nto_fetch_registers, nto_store_registers,
2115 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2116
2117 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2118
2119 * inferiors.h (gdb_id_to_thread_id): Remove.
2120 * inferiors.c (gdb_id_to_thread_id): Remove.
2121 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2122 removal. Move pid declaration closer to where it's used.
2123
2124 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2125
2126 * server.c (handle_detach): New function.
2127 (process_serial_event): Move code out, call handle_detach.
2128
2129 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2130
2131 * server.c (require_running): Rename to ...
2132 (require_running_or_return): ... this ...
2133 (require_running_or_break): ... and this.
2134 (handle_query, process_serial_event): Adjust.
2135
2136 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2137
2138 * linux-low.c (linux_set_resume_request): Remove unused
2139 variables.
2140
2141 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2142
2143 * server.c (first_thread_of): Remove.
2144 (process_serial_event): Replace usage of first_thread_of with
2145 find_any_thread_of_pid.
2146 * tracepoint.c (same_process_p): Remove.
2147 (gdb_agent_about_to_close): Replace usage of same_process_p with
2148 find_any_thread_of_pid.
2149 * linux-x86-low.c (same_process_callback): Remove.
2150 (x86_arch_setup_process_callback): Replace usage of
2151 same_process_callback with find_any_thread_of_pid.
2152 * thread-db.c (any_thread_of): Remove.
2153 (switch_to_process): Replace usage of any_thread_of with
2154 find_any_thread_of_pid.
2155 * inferiors.c (thread_pid_matches_callback): Remove.
2156 (find_thread_process): Adjust to use find_any_thread_of_pid.
2157
2158 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2159
2160 * regcache.c (get_thread_regcache): Guard calls to "memset"
2161 with "!VEC_empty".
2162
2163 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2164
2165 * linux-low.c (handle_extended_wait): Use
2166 "allocate_target_description" instead of "XNEW".
2167 * linux-x86-low.c (initialize_low_arch): Likewise.
2168
2169 2017-09-05 Yao Qi <yao.qi@linaro.org>
2170
2171 * configure.srv (srv_i386_regobj): Remove.
2172 (srv_amd64_regobj): Remove.
2173 (srv_regobj): Set it to "" for x86 non-linux targets.
2174 * linux-x86-tdesc.c (i386_linux_read_description):
2175 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2176 (init_registers_i386): Remove the declaration.
2177 (tdesc_i386): Remove the declaration.
2178 (lynx_i386_arch_setup): Call i386_create_target_description.
2179 * nto-x86-low.c: Likewise.
2180 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2181 [!__x86_64__]: include arch/i386.h.
2182 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2183
2184 2017-09-05 Yao Qi <yao.qi@linaro.org>
2185
2186 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2187 i386/amd64-XXX-linux from it.
2188
2189 2017-09-05 Yao Qi <yao.qi@linaro.org>
2190
2191 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2192 false.
2193 (ipa_amd64_linux_regobj): Remove.
2194 (ipa_x32_linux_regobj): Remove.
2195
2196 2017-09-05 Yao Qi <yao.qi@linaro.org>
2197
2198 * Makefile.in (arch-amd64.o): New rule.
2199 * configure.srv: Append arch-amd64.o.
2200 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2201 (get_ipa_tdesc): Call amd64_linux_read_description.
2202 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2203 and init_registers_amd64_XXX.
2204 * linux-x86-low.c (x86_linux_read_description): Call
2205 amd64_linux_read_description.
2206 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2207 (initialize_low_arch): Don't call init_registers_x32_XXX and
2208 init_registers_amd64_XXX.
2209 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2210 and tdesc_amd64_XXX.
2211 [__x86_64__] (amd64_tdesc_test): New function.
2212 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2213 and init_registers_amd64_XXX.
2214 * linux-x86-tdesc.c: Include arch/amd64.h.
2215 (xcr0_to_tdesc_idx): New function.
2216 (i386_linux_read_description): New function.
2217 (amd64_get_ipa_tdesc_idx): New function.
2218 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2219 (amd64_get_ipa_tdesc): Declare.
2220
2221 2017-09-05 Yao Qi <yao.qi@linaro.org>
2222
2223 * configure.srv (srv_i386_linux_xmlfiles): Remove
2224 i386/i386-XXX-linux.xml from it.
2225
2226 2017-09-05 Yao Qi <yao.qi@linaro.org>
2227
2228 * configure.srv: Set srv_i386_linux_regobj empty if $development
2229 is false.
2230 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2231 initialize_low_tdesc.
2232 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2233 with #if initialize_low_tdesc.
2234 * linux-x86-tdesc-selftest.c: New file.
2235 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2236
2237 2017-09-05 Yao Qi <yao.qi@linaro.org>
2238
2239 * Makefile.in (arch-i386.o): New rule.
2240 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2241 (x86_64-*-linux*): Likewise.
2242 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2243 include arch/i386.h.
2244 (i386_linux_read_description): Remove code and call
2245 i386_create_target_description.
2246 * tdesc.c (allocate_target_description): New function.
2247 * tdesc.h (set_tdesc_architecture): Remove declaration.
2248 (set_tdesc_osabi): Likewise.
2249
2250 2017-09-05 Yao Qi <yao.qi@linaro.org>
2251
2252 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2253 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2254 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2255 .xmltarget.
2256 * server.c (get_features_xml): Call tdesc_get_features_xml.
2257 * tdesc.c (set_tdesc_architecture): New function.
2258 (set_tdesc_osabi): New function.
2259 (tdesc_get_features_xml): New function.
2260 (tdesc_create_feature): Add an argument.
2261 * tdesc.h (struct target_desc) <features>: New field.
2262 <arch, osabi>: New field.
2263 (~target_desc): xfree features, arch, and osabi.
2264 (target_desc::oerator==): Don't compare .xmltarget.
2265 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2266 (set_tdesc_osabi): Likewise.
2267 (tdesc_get_features_xml): Likewise.
2268
2269 2017-09-05 Yao Qi <yao.qi@linaro.org>
2270
2271 * linux-x86-tdesc.c: Include selftest.h.
2272 (i386_tdesc_test): New function.
2273 (initialize_low_tdesc): Call selftests::register_test.
2274 * tdesc.h: Include regdef.h.
2275 (target_desc): Override operator == and !=.
2276
2277 2017-09-05 Yao Qi <yao.qi@linaro.org>
2278
2279 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2280 (ipa_obj): Likewise.
2281 * linux-i386-ipa.c: Include common/x86-xstate.h
2282 (get_ipa_tdesc): Call i386_linux_read_description.
2283 (initialize_low_tracepoint): Don't call init_registers_XXX
2284 functions, call initialize_low_tdesc instead.
2285 * linux-x86-low.c (x86_linux_read_description): Call
2286 i386_linux_read_description.
2287 (initialize_low_arch): Don't call init_registers_i386_XXX
2288 functions, call initialize_low_tdesc.
2289 * linux-x86-tdesc.c: New file.
2290 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2291 (i386_get_ipa_tdesc_idx): Declare.
2292 (i386_get_ipa_tdesc): Declare.
2293 (initialize_low_tdesc): Declare.
2294
2295 2017-09-05 Yao Qi <yao.qi@linaro.org>
2296
2297 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2298 instead of 0.
2299
2300 2017-09-05 Yao Qi <yao.qi@linaro.org>
2301
2302 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2303 * regcache.c (get_thread_regcache): Use VEC_length.
2304 (init_register_cache): Likewise.
2305 (regcache_cpy): Likewise.
2306 (registers_to_string): Iterate reg_defs via VEC_iterate.
2307 (find_regno): Likewise.
2308 (find_register_by_number): Use VEC_index.
2309 (register_size): Call find_register_by_number.
2310 (register_data): Call find_register_by_number.
2311 (supply_regblock): Use VEC_length.
2312 (regcache_raw_read_unsigned): Likewise.
2313 * tdesc.c (init_target_desc): Iterate reg_defs via
2314 VEC_iterate.
2315 (default_description): Update initializer.
2316 (copy_target_description): Don't update field num_registers.
2317 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2318 <num_registers>: Remove.
2319
2320 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2321
2322 * Makefile.in (.SECONDARY): Define target.
2323
2324 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2325
2326 * linux-low.c (linux_wait_1): Adjust.
2327 * server.c (queue_stop_reply_callback): Adjust.
2328
2329 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2330
2331 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2332 QEnvironmentUnset and QEnvironmentReset packets.
2333 (handle_query): Inform remote that QEnvironmentHexEncoded,
2334 QEnvironmentUnset and QEnvironmentReset are supported.
2335
2336 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2337
2338 * inferiors.h (inferior_target_data): Rename to ...
2339 (thread_target_data): ... this.
2340 (inferior_regcache_data): Rename to ...
2341 (thread_regcache_data): ... this.
2342 (set_inferior_regcache_data): Rename to ...
2343 (set_thread_regcache_data): ... this.
2344 * inferiors.c (inferior_target_data): Rename to ...
2345 (thread_target_data): ... this.
2346 (inferior_regcache_data): Rename to ...
2347 (thread_regcache_data): ... this.
2348 (set_inferior_regcache_data): Rename to ...
2349 (set_thread_regcache_data): ... this.
2350 (free_one_thread): Update.
2351 * linux-low.h (get_thread_lwp): Update.
2352 * regcache.c (get_thread_regcache): Update.
2353 (regcache_invalidate_thread): Update.
2354 (free_register_cache_thread): Update.
2355 * win32-i386-low.c (update_debug_registers_callback): Update.
2356 (win32_get_current_dr): Update.
2357 * win32-low.c (thread_rec): Update.
2358 (delete_thread_info): Update.
2359 (continue_one_thread): Update.
2360 (suspend_one_thread): Update.
2361
2362 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2363
2364 * inferiors.c (set_inferior_target_data): Remove.
2365 * inferiors.h (set_inferior_target_data): Remove.
2366
2367 2017-08-18 Yao Qi <yao.qi@linaro.org>
2368
2369 * Makefile.in (OBS): Add selftest.o.
2370 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2371 * configure, config.in: Re-generated.
2372 * server.c: Include common/sefltest.h.
2373 (captured_main): Handle option --selftest.
2374
2375 2017-08-09 Yao Qi <yao.qi@linaro.org>
2376
2377 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2378 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2379 i386-avx-mpx.o and i386-mmx.o.
2380 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2381 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2382 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2383 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2384 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2385 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2386 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2387 i386/amd64-avx-mpx.xml.
2388
2389 2017-08-09 Yao Qi <yao.qi@linaro.org>
2390
2391 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2392 and x32-avx-avx512.o.
2393 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2394 i386/x32-avx-avx512.xml.
2395
2396 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2397
2398 * tracepoint.h (enum class fast_tpoint_collect_result): New
2399 enumeration.
2400 (fast_tracepoint_collecting): Change return type to
2401 fast_tpoint_collect_result.
2402 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2403 * linux-low.h: Include tracepoint.h.
2404 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2405 fast_tpoint_collect_result.
2406 * linux-low.c (handle_tracepoints): Adjust.
2407 (linux_fast_tracepoint_collecting): Change return type to
2408 fast_tpoint_collect_result.
2409 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2410 linux_wait_1, stuck_in_jump_pad_callback,
2411 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2412 proceed_one_lwp): Adjust to type change.
2413
2414 2017-07-10 Yao Qi <yao.qi@linaro.org>
2415
2416 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2417
2418 2017-06-29 Yao Qi <yao.qi@linaro.org>
2419
2420 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2421 Remove.
2422 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2423
2424 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2425
2426 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2427
2428 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2429
2430 * linux-low.c (linux_create_inferior): Adjust code to access the
2431 environment information via 'gdb_environ' class.
2432 * lynx-low.c (lynx_create_inferior): Likewise.
2433 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2434 (get_environ): Return a pointer to 'our_environ'.
2435 (captured_main): Initialize 'our_environ'.
2436 * server.h (get_environ): Adjust prototype.
2437 * spu-low.c (spu_create_inferior): Adjust code to access the
2438 environment information via 'gdb_environ' class.
2439
2440 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2441
2442 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2443 usage of "register" keyword.
2444
2445 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2446
2447 * configure: Re-generate.
2448
2449 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2450
2451 * configure: Re-generate.
2452
2453 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2454
2455 * Makefile.in (COMPILE.pre): Add "-x c++".
2456
2457 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2458
2459 * fork-child.c: Conditionally include <signal.h>.
2460
2461 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2462
2463 * server.c (handle_general_set): Handle new packet
2464 "QStartupWithShell".
2465 (handle_query): Add "QStartupWithShell" to the list of supported
2466 packets.
2467 (gdbserver_usage): Add help text explaining the
2468 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2469 options.
2470 (captured_main): Recognize and act upon the presence of the new
2471 CLI options.
2472
2473 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2474 Pedro Alves <palves@redhat.com>
2475
2476 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2477 * configure: Regenerate.
2478 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2479 "fork-inferior.o".
2480 (i[34567]86-*-lynxos*): Likewise.
2481 (spu*-*-*): Likewise.
2482 * fork-child.c: New file.
2483 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2484 and "environ.h".
2485 (linux_ptrace_fun): New function.
2486 (linux_create_inferior): Adjust function prototype to reflect
2487 change on "target.h". Adjust function code to use
2488 "fork_inferior".
2489 (linux_request_interrupt): Delete "signal_pid".
2490 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2491 (lynx_ptrace_fun): New function.
2492 (lynx_create_inferior): Adjust function prototype to reflect
2493 change on "target.h". Adjust function code to use
2494 "fork_inferior".
2495 * nto-low.c (nto_create_inferior): Adjust function prototype and
2496 code to reflect change on "target.h". Update comments.
2497 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2498 "common-terminal.h" and "environ.h".
2499 (terminal_fd): Moved to fork-child.c.
2500 (old_foreground_pgrp): Likewise.
2501 (restore_old_foreground_pgrp): Likewise.
2502 (last_status): Make it global.
2503 (last_ptid): Likewise.
2504 (our_environ): New variable.
2505 (startup_with_shell): Likewise.
2506 (program_name): Likewise.
2507 (program_argv): Rename to...
2508 (program_args): ...this.
2509 (wrapper_argv): New variable.
2510 (start_inferior): Delete function.
2511 (get_exec_wrapper): New function.
2512 (get_exec_file): Likewise.
2513 (get_environ): Likewise.
2514 (prefork_hook): Likewise.
2515 (post_fork_inferior): Likewise.
2516 (postfork_hook): Likewise.
2517 (postfork_child_hook): Likewise.
2518 (handle_v_run): Update code to deal with arguments coming from the
2519 remote host. Update calls from "start_inferior" to
2520 "create_inferior".
2521 (captured_main): Likewise. Initialize environment variable. Call
2522 "have_job_control".
2523 * server.h (post_fork_inferior): New prototype.
2524 (get_environ): Likewise.
2525 (last_status): Declare.
2526 (last_ptid): Likewise.
2527 (signal_pid): Likewise.
2528 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2529 (spu_ptrace_fun): New function.
2530 (spu_create_inferior): Adjust function prototype to reflect change
2531 on "target.h". Adjust function code to use "fork_inferior".
2532 * target.c (target_terminal_init): New function.
2533 (target_terminal_inferior): Likewise.
2534 (target_terminal_ours): Likewise.
2535 * target.h: Include <vector>.
2536 (struct target_ops) <create_inferior>: Update prototype.
2537 (create_inferior): Update macro.
2538 * utils.c (gdb_flush_out_err): New function.
2539 * win32-low.c (win32_create_inferior): Adjust function prototype
2540 and code to reflect change on "target.h".
2541
2542 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2543
2544 * inferiors.c (switch_to_thread): New function.
2545
2546 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2547
2548 * Makefile.in (SFILE): Add "common/job-control.c".
2549 (OBS): Add "job-control.o".
2550
2551 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2552
2553 * Makefile: Remove "@host_makefile_frag@".
2554
2555 2017-05-05 Pedro Alves <palves@redhat.com>
2556
2557 * configure: Regenerate.
2558
2559 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2560
2561 * configure: Regenerate.
2562
2563 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2564
2565 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2566 software_single_step change of return type to
2567 std::vector<CORE_ADDR>.
2568 * linux-low.c (install_software_single_step_breakpoints):
2569 Likewise.
2570 * linux-low.h (install_software_single_step_breakpoints):
2571 Likewise.
2572
2573 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2574
2575 * remote-utils.c: Include "gdb_termios.h" instead of
2576 "terminal.h".
2577 * terminal.h: Delete file.
2578
2579 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2580
2581 * server.c: Include <vector>.
2582 <program_argv, wrapper_argv>: Convert to std::vector.
2583 (start_inferior): Rewrite function to use C++.
2584 (handle_v_run): Likewise. Update code that calculates the argv
2585 based on the vRun packet; use C++.
2586 (captured_main): Likewise.
2587
2588 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2589
2590 * server.c (handle_v_cont): Initialize thread_resume::thread
2591 with null_ptid.
2592
2593 2017-04-05 Pedro Alves <palves@redhat.com>
2594
2595 * configure: Regenerate.
2596
2597 2017-04-05 Pedro Alves <palves@redhat.com>
2598
2599 * gdbreplay.c (sync_error): Constify.
2600 * linux-x86-low.c (push_opcode): Constify.
2601
2602 2017-04-05 Pedro Alves <palves@redhat.com>
2603
2604 * win32-low.c (get_child_debug_event)
2605 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2606 Report TARGET_WAITKIND_SPURIOUS instead.
2607
2608 2017-04-05 Pedro Alves <palves@redhat.com>
2609
2610 * remote-utils.c (remote_prepare, remote_open): Constify.
2611 * remote-utils.h (remote_prepare, remote_open): Constify.
2612 * server.c (captured_main): Constify 'port' handling.
2613
2614 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2615
2616 * Makefile.in (clean): Clear .deps.
2617
2618 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2619
2620 * .gitignore: Remove generated files, replace with wildcard.
2621 * (clean): Replace removal of generated files with wildcard.
2622 (version.c): Replace with...
2623 (version-generated.c): ...this.
2624 (xml-builtin.c): Replace with...
2625 (xml-builtin-generated.c): ...this.
2626 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2627 (%.c: *regformats*): Replace with...
2628 (%-generated.c: *regformats*): ...this.
2629
2630 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2631
2632 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2633 (xtensa_fill_gregset): Call collect_register_by_name for
2634 threadptr register.
2635 (xtensa_store_gregset): Call supply_register_by_name for
2636 threadptr register.
2637
2638 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2639
2640 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2641 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2642 (xtensa_store_gregset): Call supply_register for all registers in
2643 a0_regnum..a0_regnum + C0_NREGS range.
2644
2645 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2646
2647 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2648 (ax-ipa.o: ax.c): Remove.
2649 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2650 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2651 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2652 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2653 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2654
2655 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2656
2657 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2658 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2659 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2660 (errors-ipa.o: ../common/errors.c): Remove.
2661 (format-ipa.o: ../common/format.c): Remove.
2662 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2663
2664 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2665
2666 * Makefile.in (%-ipa.o: %.c): New rule.
2667 (tracepoint-ipa.o: tracepoint.c): Remove.
2668 (utils-ipa.o: utils.c): Remove.
2669 (remote-utils-ipa.o: remote-utils.c): Remove.
2670 (regcache-ipa.o: regcache.c): Remove.
2671 (i386-linux-ipa.o: i386-linux.c): Remove.
2672 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2673 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2674 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2675 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2676 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2677 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2678 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2679 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2680 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2681 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2682 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2683 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2684 (aarch64-ipa.o: aarch64.c): Remove.
2685 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2686 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2687 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2688 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2689 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2690 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2691 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2692 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2693 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2694 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2695 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2696 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2697 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2698 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2699 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2700 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2701 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2702 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2703 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2704 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2705 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2706 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2707 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2708 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2709 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2710 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2711 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2712 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2713 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2714 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2715 (tdesc-ipa.o: tdesc.c): Remove.
2716 (x32-linux-ipa.o: x32-linux.c): Remove.
2717 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2718 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2719
2720 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2721
2722 * Makefile.in (%.o: ../arch/%.c): New rule.
2723 (arm.o: ../arch/arm.c): Remove.
2724 (arm-linux.o: ../arch/arm-linux.c): Remove.
2725 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2726 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2727
2728 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2729
2730 * Makefile.in (%.o: ../nat/%.c): New rule.
2731 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2732 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2733 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2734 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2735 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2736 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2737 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2738 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2739 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2740 (linux-personality.o: ../nat/linux-personality.c): Remove.
2741 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2742 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2743 (x86-linux.o: ../nat/x86-linux.c): Remove.
2744 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2745 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2746
2747 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2748
2749 * Makefile.in (%.o: ../common/%.c): New rule.
2750 (signals.o: ../common/signals.c): Remove.
2751 (print-utils.o: ../common/print-utils.c): Remove.
2752 (rsp-low.o: ../common/rsp-low.c): Remove.
2753 (common-utils.o: ../common/common-utils.c): Remove.
2754 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2755 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2756 (vec.o: ../common/vec.c): Remove.
2757 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2758 (xml-utils.o: ../common/xml-utils.c): Remove.
2759 (ptid.o: ../common/ptid.c): Remove.
2760 (buffer.o: ../common/buffer.c): Remove.
2761 (format.o: ../common/format.c): Remove.
2762 (filestuff.o: ../common/filestuff.c): Remove.
2763 (agent.o: ../common/agent.c): Remove.
2764 (errors.o: ../common/errors.c): Remove.
2765 (environ.o: ../common/environ.c): Remove.
2766 (common-debug.o: ../common/common-debug.c): Remove.
2767 (cleanups.o: ../common/cleanups.c): Remove.
2768 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2769 (fileio.o: ../common/fileio.c): Remove.
2770 (common-regcache.o: ../common/common-regcache.c): Remove.
2771 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2772 (new-op.o: ../common/new-op.c): Remove.
2773 (btrace-common.o: ../common/btrace-common.c): Remove.
2774
2775 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2776
2777 * Makefile.in (%.o: ../target/%.c): New rule.
2778 (waitstatus.o: ../target/waitstatus.c): Remove.
2779
2780 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2781
2782 * Makefile.in
2783 (%.c: ../regformats/%.dat,
2784 (%.c: ../regformats/arm/%.dat,
2785 (%.c: ../regformats/i386/%.dat,
2786 (%.c: ../regformats/rs6000/%.dat): New rules.
2787 (aarch64.c): Remove.
2788 (reg-arm.c): Remove.
2789 (arm-with-iwmmxt.c): Remove.
2790 (arm-with-vfpv2.c): Remove.
2791 (arm-with-vfpv3.c): Remove.
2792 (arm-with-neon.c): Remove.
2793 (reg-bfin.c): Remove.
2794 (reg-cris.c): Remove.
2795 (reg-crisv32.c): Remove.
2796 (i386.c): Remove.
2797 (i386-linux.c): Remove.
2798 (i386-avx.c): Remove.
2799 (i386-avx-linux.c): Remove.
2800 (i386-avx-avx512.c): Remove.
2801 (i386-avx-avx512-linux.c): Remove.
2802 (i386-mpx.c): Remove.
2803 (i386-mpx-linux.c): Remove.
2804 (i386-avx-mpx-avx512-pku.c): Remove.
2805 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2806 (i386-avx-mpx.c): Remove.
2807 (i386-avx-mpx-linux.c): Remove.
2808 (i386-mmx.c): Remove.
2809 (i386-mmx-linux.c): Remove.
2810 (reg-ia64.c): Remove.
2811 (reg-m32r.c): Remove.
2812 (reg-m68k.c): Remove.
2813 (reg-cf.c): Remove.
2814 (mips-linux.c): Remove.
2815 (mips-dsp-linux.c): Remove.
2816 (mips64-linux.c): Remove.
2817 (mips64-dsp-linux.c): Remove.
2818 (nios2-linux.c): Remove.
2819 (powerpc-32.c): Remove.
2820 (powerpc-32l.c): Remove.
2821 (powerpc-altivec32l.c): Remove.
2822 (powerpc-cell32l.c): Remove.
2823 (powerpc-vsx32l.c): Remove.
2824 (powerpc-isa205-32l.c): Remove.
2825 (powerpc-isa205-altivec32l.c): Remove.
2826 (powerpc-isa205-vsx32l.c): Remove.
2827 (powerpc-e500l.c): Remove.
2828 (powerpc-64l.c): Remove.
2829 (powerpc-altivec64l.c): Remove.
2830 (powerpc-cell64l.c): Remove.
2831 (powerpc-vsx64l.c): Remove.
2832 (powerpc-isa205-64l.c): Remove.
2833 (powerpc-isa205-altivec64l.c): Remove.
2834 (powerpc-isa205-vsx64l.c): Remove.
2835 (s390-linux32.c): Remove.
2836 (s390-linux32v1.c): Remove.
2837 (s390-linux32v2.c): Remove.
2838 (s390-linux64.c): Remove.
2839 (s390-linux64v1.c): Remove.
2840 (s390-linux64v2.c): Remove.
2841 (s390-te-linux64.c): Remove.
2842 (s390-vx-linux64.c): Remove.
2843 (s390-tevx-linux64.c): Remove.
2844 (s390x-linux64.c): Remove.
2845 (s390x-linux64v1.c): Remove.
2846 (s390x-linux64v2.c): Remove.
2847 (s390x-te-linux64.c): Remove.
2848 (s390x-vx-linux64.c): Remove.
2849 (s390x-tevx-linux64.c): Remove.
2850 (tic6x-c64xp-linux.c): Remove.
2851 (tic6x-c64x-linux.c): Remove.
2852 (tic6x-c62x-linux.c): Remove.
2853 (reg-sh.c): Remove.
2854 (reg-sparc64.c): Remove.
2855 (reg-spu.c): Remove.
2856 (amd64.c): Remove.
2857 (amd64-linux.c): Remove.
2858 (amd64-avx.c): Remove.
2859 (amd64-avx-linux.c): Remove.
2860 (amd64-avx-avx512.c): Remove.
2861 (amd64-avx-avx512-linux.c): Remove.
2862 (amd64-mpx.c): Remove.
2863 (amd64-mpx-linux.c): Remove.
2864 (amd64-avx-mpx-avx512-pku.c): Remove.
2865 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2866 (amd64-avx-mpx.c): Remove.
2867 (amd64-avx-mpx-linux.c): Remove.
2868 (x32.c): Remove.
2869 (x32-linux.c): Remove.
2870 (x32-avx.c): Remove.
2871 (x32-avx-linux.c): Remove.
2872 (x32-avx-avx512.c): Remove.
2873 (x32-avx-avx512-linux.c): Remove.
2874 (reg-xtensa.c): Remove.
2875 (reg-tilegx.c): Remove.
2876 (reg-tilegx32.c): Remove.
2877
2878 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2879
2880 * Makefile.in (SFILES): Add "common/environ.c".
2881 (OBJS): Add "common/environ.h".
2882
2883 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2884
2885 * configure.ac: Check if the fs_base and gs_base members of
2886 `struct user_regs_struct' exist.
2887 * config.in: Regenerated.
2888 * configure: Likewise.
2889
2890 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2891
2892 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2893 target_read_memory.
2894 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2895 (get_next_pcs_syscall_next_pc): Likewise.
2896
2897 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2898
2899 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2900 * nto-x86-low.c: Likewise.
2901
2902 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2903
2904 * Makefile.in: Include disable-implicit-rules.mk.
2905
2906 2016-11-23 Pedro Alves <palves@redhat.com>
2907
2908 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2909 (debug_vprintf): Use std::chrono::steady_clock instead of
2910 gettimeofday. Use '.' instead of ':'.
2911 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2912 (get_timestamp): Use std::chrono::steady_clock instead of
2913 gettimeofday.
2914
2915 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2916
2917 * Makefile.in: Fix whitespace formatting.
2918
2919 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2920
2921 * Makefile.in (SFILES, OBS): Flatten list and order
2922 alphabetically.
2923
2924 2016-11-23 Pedro Alves <palves@redhat.com>
2925
2926 * event-loop.c (handle_file_event): Use warning.
2927 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2928 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2929 Use warning.
2930
2931 2016-11-23 Pedro Alves <palves@redhat.com>
2932
2933 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2934 output.
2935 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2936 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2937 debug_printf and debug_flush for debug output.
2938 * server.c (handle_general_set): Likewise.
2939 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2940 output.
2941
2942 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2943
2944 * Makefile.in (.c.o): Replace rule with ...
2945 (%.o: %.c): ... this one.
2946
2947 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2948
2949 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2950 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2951 make.
2952 * configure.ac: Remove checks for the make program.
2953 * configure: Re-generate.
2954
2955 2016-10-28 Pedro Alves <palves@redhat.com>
2956
2957 * Makefile.in (CXX_DIALECT): Get from configure.
2958 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2959 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2960 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2961 * config.in: Regenerate.
2962 * configure: Regenerate.
2963
2964 2016-10-27 Yao Qi <yao.qi@linaro.org>
2965
2966 * linux-low.c (linux_supports_range_stepping): Return true if
2967 can_software_single_step return true.
2968
2969 2016-10-27 Yao Qi <yao.qi@linaro.org>
2970
2971 * inferiors.c (find_inferior_in_random): New function.
2972 * inferiors.h (find_inferior_in_random): Declare.
2973 * linux-low.c (linux_wait_for_event_filtered): Call
2974 find_inferior_in_random instead of find_inferior.
2975
2976 2016-10-27 Yao Qi <yao.qi@linaro.org>
2977
2978 * linux-low.c (linux_wait_1): If single-step breakpoints are
2979 inserted, remove them.
2980
2981 2016-10-26 Pedro Alves <palves@redhat.com>
2982
2983 * linux-low.c (handle_extended_wait): Link parent/child fork
2984 threads.
2985 (linux_wait_1): Unlink them.
2986 (linux_set_resume_request): Ignore resume requests for
2987 already-resumed and unhandled fork child threads.
2988 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2989 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2990 New functions.
2991 (handle_v_requests) <vCont>: Don't call require_running.
2992 * server.h (in_queued_stop_replies): New declaration.
2993
2994 2016-10-24 Yao Qi <yao.qi@linaro.org>
2995
2996 PR server/20733
2997 * linux-aarch64-low.c (append_insns): Cast the return value to
2998 'uint32_t *'.
2999
3000 2016-10-10 Yao Qi <yao.qi@linaro.org>
3001
3002 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3003
3004 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3005
3006 * target.c (target_supports_multi_process): New function, moved
3007 from...
3008 * target.h (target_supports_multi_process): ... here. Remove
3009 macro.
3010
3011 2016-10-05 Tom Tromey <tom@tromey.com>
3012
3013 PR remote/20655:
3014 * tracepoint.c (handle_tracepoint_bkpts): Check
3015 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3016
3017 2016-10-05 Yao Qi <yao.qi@linaro.org>
3018
3019 * configure.srv: Update the path of arm-*.xml files.
3020
3021 2016-10-05 Terry Guo <terry.guo@arm.com>
3022 Yao Qi <yao.qi@linaro.org>
3023
3024 * Makefile.in: Adjust the path of rules.
3025 * configure.srv: Update the path of xml files.
3026 * regformats/arm-with-iwmmxt.dat: Regenerated.
3027 * regformats/arm-with-neon.dat: Likewise.
3028 * regformats/arm-with-vfpv2.dat: Likewise.
3029 * regformats/arm-with-vfpv3.dat Likewise.
3030
3031 2016-09-30 Yao Qi <yao.qi@linaro.org>
3032
3033 PR gdbserver/20627
3034 * target.c (target_stop_and_wait): Don't call
3035 target_continue_no_signal, use resume_stop instead.
3036
3037 2016-09-26 Yao Qi <yao.qi@linaro.org>
3038
3039 * linux-low.c (linux_wait_1): Call debug_exit.
3040
3041 2016-09-23 Pedro Alves <palves@redhat.com>
3042
3043 * Makefile.in (SFILES): Add common/new-op.c.
3044 (OBS): Add common/new-op.o.
3045 (new-op.o): New rule.
3046
3047 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3048
3049 * .gitinore: Ignore more files.
3050
3051 2016-09-21 Yao Qi <yao.qi@linaro.org>
3052
3053 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3054 23.
3055
3056 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3057
3058 * server.c (start_inferior): Call target_mourn_inferior instead of
3059 mourn_inferior; pass ptid_t argument to it.
3060 (resume): Likewise.
3061 (handle_target_event): Likewise.
3062 * target.c (target_mourn_inferior): New function.
3063 * target.h (mourn_inferior): Delete macro.
3064
3065 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3066
3067 * linux-low.c (lwp_is_stepping): New function.
3068
3069 2016-09-06 Carl Love <cel@us.ibm.com>
3070
3071 * server.c (start_inferior): Fixed comment, requested comment change
3072 didn't get updated correctly. Removed reference to ptrace () call as
3073 it is only true on Linux systems.
3074
3075 2016-09-06 Carl Love <cel@us.ibm.com>
3076
3077 * server.c (start_inferior): Do not call
3078 function target_post_create_inferior () if the
3079 inferior process has already exited.
3080
3081 2016-09-05 Pedro Alves <palves@redhat.com>
3082
3083 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3084 (COMPILE.pre, CC_LD): Use CXX directly.
3085 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3086 * acinclude.m4: Don't include build-with-cxx.m4.
3087 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3088 * configure: Regenerate.
3089
3090 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3091
3092 PR gdb/19495
3093 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3094 call writing data to own_buf.
3095
3096 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3097
3098 * target.c (mywait): Call target_wait instead of
3099 the_target->wait.
3100 (target_wait): New function.
3101
3102 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3103
3104 * server.c (start_inferior): New variable 'ptid'. Replace calls
3105 to the_target->resume by target_continue{,_no_signal}, depending
3106 on the case.
3107 * target.c (target_stop_and_wait): Call target_continue_no_signal
3108 instead of the_target->resume.
3109 (target_continue): New function.
3110
3111 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3112
3113 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3114
3115 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3116
3117 PR server/20491
3118 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3119 ps_prochandle.
3120 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3121 * linux-arm-low.c (ps_get_thread_area): Likewise.
3122 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3123 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3124 * linux-mips-low.c (ps_get_thread_area): Likewise.
3125 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3126 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3127 * linux-x86-low.c (ps_get_thread_area): Likewise.
3128 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3129
3130 2016-08-19 Pedro Alves <palves@redhat.com>
3131
3132 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3133
3134 2016-08-19 Pedro Alves <palves@redhat.com>
3135
3136 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3137 comment. Use memcpy instead of casting through unsigned long.
3138
3139 2016-08-19 Pedro Alves <palves@redhat.com>
3140
3141 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3142 allocating around 0x80000000.
3143
3144 2016-08-19 Pedro Alves <palves@redhat.com>
3145
3146 PR gdb/20415
3147 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3148 (x32-avx512-linux-ipa.o): New rules.
3149 * configure.ac (x86_64-*-linux*): New x32 check.
3150 * configure.srv (ipa_x32_linux_regobj): New.
3151 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3152 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3153 descriptions.
3154 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3155 descriptions.
3156 * configure: Regenerate.
3157
3158 2016-08-09 Pedro Alves <palves@redhat.com>
3159
3160 PR gdb/18653
3161 * Makefile.in (OBS): Add signals-state-save-restore.o.
3162 (signals-state-save-restore.o): New rule.
3163 * config.in: Regenerate.
3164 * configure: Regenerate.
3165 * linux-low.c: Include "signals-state-save-restore.h".
3166 (linux_create_inferior): Call
3167 restore_original_signals_state.
3168 * server.c: Include "dispositions-save-restore.h".
3169 (captured_main): Call save_original_signals_state.
3170
3171 2016-08-05 Pedro Alves <palves@redhat.com>
3172
3173 * configure: Regenerate.
3174
3175 2016-08-04 Yao Qi <yao.qi@linaro.org>
3176
3177 * linux-low.c (regsets_fetch_inferior_registers): Check
3178 errno is ESRCH or not.
3179
3180 2016-08-02 Yao Qi <yao.qi@linaro.org>
3181
3182 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3183 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3184 (thread_db_load_search): Update.
3185 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3186 td_ta_set_event and td_ta_event_getmsg.
3187
3188 2016-07-26 Pedro Alves <palves@redhat.com>
3189
3190 PR server/20414
3191 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3192 of unsigned long for 64-bit registers and use uint32_t instead of
3193 unsigned int for 32-bit registers.
3194
3195 2016-07-26 Pedro Alves <palves@redhat.com>
3196
3197 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3198 to 'ptrace'.
3199
3200 2016-07-21 Tom Tromey <tom@tromey.com>
3201
3202 * configure: Rebuild.
3203
3204 2016-07-21 Yao Qi <yao.qi@linaro.org>
3205
3206 * mem-break.c (find_gdb_breakpoint): Cast bp to
3207 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3208
3209 2016-07-21 Yao Qi <yao.qi@linaro.org>
3210
3211 * server.c (handle_v_requests): Support s and S actions
3212 if target_supports_software_single_step return true.
3213
3214 2016-07-21 Yao Qi <yao.qi@linaro.org>
3215
3216 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3217 is resume_step, call maybe_hw_step.
3218 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3219 and unstop them.
3220 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3221 breakpoints or not.
3222 (proceed_one_lwp): If resume request is resume_step, install
3223 reinsert breakpoints and call maybe_hw_step.
3224
3225 2016-07-21 Yao Qi <yao.qi@linaro.org>
3226
3227 * linux-low.c (proceed_one_lwp): Declare.
3228 (linux_resume_one_thread): Remove local variable 'step'.
3229 Lift code enqueue signal. Call proceed_one_lwp instead of
3230 linux_resume_one_lwp.
3231
3232 2016-07-21 Yao Qi <yao.qi@linaro.org>
3233
3234 * linux-low.c (linux_resume_one_thread): Call
3235 enqueue_pending_signal.
3236
3237 2016-07-21 Yao Qi <yao.qi@linaro.org>
3238
3239 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3240 * inferiors.c (do_restore_current_thread_cleanup): New function.
3241 (make_cleanup_restore_current_thread): Likewise.
3242 * linux-low.c (install_software_single_step_breakpoints): Call
3243 make_cleanup_restore_current_thread. Switch current_thread to
3244 thread.
3245
3246 2016-07-21 Yao Qi <yao.qi@linaro.org>
3247
3248 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3249 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3250 (clone_one_breakpoint): Likewise.
3251 (delete_reinsert_breakpoints): Change parameter to thread.
3252 Callers updated.
3253 (has_reinsert_breakpoints): Likewise.
3254 (uninsert_reinsert_breakpoints): Likewise.
3255 (reinsert_reinsert_breakpoints): Likewise.
3256 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3257 (delete_reinsert_breakpoints): Likewise.
3258 (reinsert_reinsert_breakpoints): Likewise.
3259 (uninsert_reinsert_breakpoints): Likewise.
3260 (has_reinsert_breakpoints): Likewise.
3261
3262 2016-07-21 Yao Qi <yao.qi@linaro.org>
3263
3264 * inferiors.c (get_thread_process): Make parameter const.
3265 * inferiors.h (get_thread_process): Update declaration.
3266 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3267 Add new parameters child_thread and parent_thread. Callers
3268 updated.
3269 * mem-break.h (clone_all_breakpoints): Update declaration.
3270
3271 2016-07-21 Yao Qi <yao.qi@linaro.org>
3272
3273 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3274 <command_list, handler>: Remove.
3275 (struct gdb_breakpoint): New.
3276 (struct other_breakpoint): New.
3277 (struct reinsert_breakpoint): New.
3278 (is_gdb_breakpoint): New function.
3279 (any_persistent_commands): Update command_list if
3280 is_gdb_breakpoint returns true.
3281 (set_breakpoint): Create breakpoints according to their types.
3282 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3283 (set_gdb_breakpoint_1): Likewise.
3284 (set_gdb_breakpoint): Likewise.
3285 (clear_breakpoint_conditions): Change parameter type to
3286 'struct gdb_breakpoint *'.
3287 (clear_breakpoint_commands): Likewise.
3288 (clear_breakpoint_conditions_and_commands): Likewise.
3289 (add_condition_to_breakpoint): Likewise.
3290 (add_breakpoint_condition): Likewise.
3291 (add_commands_to_breakpoint): Likewise.
3292 (check_breakpoints): Check other_breakpoint.
3293 (clone_one_breakpoint): Clone breakpopint according to its type.
3294 * mem-break.h (struct gdb_breakpoint): Declare.
3295 (set_gdb_breakpoint): Update declaration.
3296 (clear_breakpoint_conditions_and_commands): Likewise.
3297 (add_breakpoint_condition): Likewise.
3298 (add_breakpoint_commands): Likewise.
3299 * server.c (process_point_options): Change parameter type to
3300 'struct gdb_breakpoint *'.
3301
3302 2016-07-21 Yao Qi <yao.qi@linaro.org>
3303
3304 * mem-break.c (set_breakpoint_at): Rename it to ...
3305 (set_breakpoint_type_at): ... it.
3306 (set_breakpoint_at): Call set_breakpoint_type_at.
3307 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3308 * mem-break.h (set_breakpoint_at): Update comments.
3309
3310 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3311
3312 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3313 to buf parameter.
3314 (nios2_store_gregset): Likewise.
3315
3316 2016-07-01 Pedro Alves <palves@redhat.com>
3317 Antoine Tremblay <antoine.tremblay@ericsson.com>
3318
3319 * linux-low.c: Change interface to take the target lwp_info
3320 pointer directly and return void. Handle detaching from a zombie
3321 thread.
3322 (linux_detach_lwp_callback): New function.
3323 (linux_detach): Detach from the leader thread after detaching from
3324 the clone threads.
3325
3326 2016-06-28 Yao Qi <yao.qi@linaro.org>
3327
3328 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3329 for variable new_offset.
3330 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3331 (aarch64_ftrace_insn_reloc_cb): Likewise.
3332 (aarch64_ftrace_insn_reloc_tb): Likewise.
3333 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3334 PRIx64 instead of PRIx32.
3335
3336 2016-06-28 Yao Qi <yao.qi@linaro.org>
3337
3338 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3339 (the_low_target): Install arm_get_syscall_trapinfo.
3340
3341 2016-06-28 Yao Qi <yao.qi@linaro.org>
3342
3343 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3344 function.
3345 (the_low_target): Install aarch64_get_syscall_trapinfo.
3346
3347 2016-06-28 Yao Qi <yao.qi@linaro.org>
3348
3349 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3350 Callers updated.
3351 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3352 Remove parameter sysno.
3353 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3354 sysret.
3355
3356 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3357
3358 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3359 (s390_emit_ne_goto): Likewise.
3360 (s390_emit_lt_goto): Likewise.
3361 (s390_emit_le_goto): Likewise.
3362 (s390_emit_gt_goto): Likewise.
3363 (s390_emit_ge_goto): Likewise.
3364 (s390x_emit_eq_goto): Likewise.
3365 (s390x_emit_ne_goto): Likewise.
3366 (s390x_emit_lt_goto): Likewise.
3367 (s390x_emit_le_goto): Likewise.
3368 (s390x_emit_gt_goto): Likewise.
3369 (s390x_emit_ge_goto): Likewise.
3370 (s390_emit_ops_impl): Mark variable static.
3371 (s390x_emit_ops): Likewise.
3372
3373 2016-06-17 Yao Qi <yao.qi@linaro.org>
3374
3375 * linux-low.c (handle_extended_wait): Call
3376 uninsert_reinsert_breakpoints for the parent process. Remove
3377 reinsert breakpoints from the child process. Reinsert them to
3378 the parent process when vfork is done.
3379 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3380 (reinsert_reinsert_breakpoints): New function.
3381 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3382 (reinsert_reinsert_breakpoints): Declare.
3383
3384 2016-06-17 Yao Qi <yao.qi@linaro.org>
3385
3386 * linux-low.c (handle_extended_wait): If the parent is doing
3387 step-over, remove the reinsert breakpoints from the forked child.
3388
3389 2016-06-17 Yao Qi <yao.qi@linaro.org>
3390
3391 * linux-low.c (unsuspend_all_lwps): Declare.
3392 (linux_low_filter_event): If thread exited, call finish_step_over.
3393 If step-over is finished, unsuspend other threads.
3394
3395 2016-06-17 Yao Qi <yao.qi@linaro.org>
3396
3397 * linux-low.c (linux_resume_one_lwp_throw): Assert
3398 has_reinsert_breakpoints returns false.
3399 * mem-break.c (delete_disabled_breakpoints): Assert
3400 bp type isn't reinsert_breakpoint.
3401
3402 2016-06-17 Yao Qi <yao.qi@linaro.org>
3403
3404 * linux-low.c (maybe_hw_step): New function.
3405 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3406 (finish_step_over): Switch current_thread to lwp temporarily,
3407 and assert has_reinsert_breakpoints returns true.
3408 (proceed_one_lwp): Call maybe_hw_step.
3409 * mem-break.c (has_reinsert_breakpoints): New function.
3410 * mem-break.h (has_reinsert_breakpoints): Declare.
3411
3412 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3413
3414 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3415
3416 2016-05-17 Yao Qi <yao.qi@linaro.org>
3417
3418 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3419 instead of find_inferior.
3420
3421 2016-05-05 Yao Qi <yao.qi@linaro.org>
3422
3423 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3424 Initialize res to zero.
3425
3426 2016-05-05 Yao Qi <yao.qi@linaro.org>
3427
3428 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3429 to uint32_t.
3430
3431 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3432
3433 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3434 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3435 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3436
3437 2016-04-28 Par Olsson <par.olsson@windriver.com>
3438 Simon Marchi <simon.marchi@ericsson.com>
3439
3440 * tracepoint.c (write_inferior_int8): New function.
3441 (cmd_qtenable_disable): Write enable flag using
3442 write_inferior_int8.
3443
3444 2016-04-25 Yao Qi <yao.qi@linaro.org>
3445
3446 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3447 (need_step_over_p): Return zero if the LWP has pending signals
3448 can be delivered on software single step target.
3449
3450 2016-04-25 Yao Qi <yao.qi@linaro.org>
3451
3452 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3453 return instead of error.
3454
3455 2016-04-22 Yao Qi <yao.qi@linaro.org>
3456
3457 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3458 to 23.
3459
3460 2016-04-22 Yao Qi <yao.qi@linaro.org>
3461
3462 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3463 signal when stepping over breakpoint with software single
3464 step.
3465
3466 2016-04-21 Pedro Alves <palves@redhat.com>
3467
3468 * linux-s390-low.c (s390_collect_ptrace_register)
3469 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3470 add casts.
3471 (s390_check_regset): Use void * instead of gdb_byte *.
3472
3473 2016-04-20 Pedro Alves <palves@redhat.com>
3474
3475 * configure: Renegerate.
3476
3477 2016-04-20 Yao Qi <yao.qi@linaro.org>
3478
3479 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3480 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3481 number 16.
3482 (arm_store_gregset): Likewise.
3483
3484 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3485
3486 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3487 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3488 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3489 (amd64-avx-mpx-linux.c): New rules.
3490 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3491 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3492 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3493 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3494 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3495 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3496 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3497 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3498 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3499 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3500 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3501 * linux-x86-low.c (x86_linux_read_description): Add case for
3502 X86_XSTATE_AVX_MPX_MASK.
3503 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3504 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3505 init_registers_i386_avx_mpx_linux.
3506 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3507 (initialize_low_tracepoint): Call
3508 init_registers_i386_avx_mpx_linux.
3509 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3510 (initialize_low_tracepoint): Call
3511 init_registers_amd64_avx_mpx_linux.
3512 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3513 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3514 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3515 declarations.
3516
3517 2016-04-18 Pedro Alves <palves@redhat.com>
3518
3519 * configure: Regenerate.
3520
3521 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3522
3523 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3524 (aarch64_emit_sub): Likewise.
3525
3526 2016-04-12 Pedro Alves <palves@redhat.com>
3527
3528 * utils.c (prepare_to_throw_exception): Delete.
3529
3530 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3531
3532 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3533
3534 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3535
3536 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3537
3538 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3539
3540 * linux-aarch64-ipa.c: Add <elf.h> include.
3541 * linux-ppc-ipa.c: Add <elf.h> include.
3542 * linux-s390-ipa.c: Add <elf.h> include.
3543
3544 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3545
3546 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3547 (get_raw_reg_ptr): Likewise.
3548 (get_trace_state_variable_value_ptr): Likewise.
3549 (set_trace_state_variable_value_ptr): Likewise.
3550 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3551 char *.
3552
3553 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3554 Marcin Kościelnicki <koriakin@0x04.net>
3555
3556 PR/17221
3557 * linux-ppc-low.c (emit_insns): New function.
3558 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3559 (ppc_emit_prologue): New function.
3560 (ppc_emit_epilogue): New function.
3561 (ppc_emit_add): New function.
3562 (ppc_emit_sub): New function.
3563 (ppc_emit_mul): New function.
3564 (ppc_emit_lsh): New function.
3565 (ppc_emit_rsh_signed): New function.
3566 (ppc_emit_rsh_unsigned): New function.
3567 (ppc_emit_ext): New function.
3568 (ppc_emit_zero_ext): New function.
3569 (ppc_emit_log_not): New function.
3570 (ppc_emit_bit_and): New function.
3571 (ppc_emit_bit_or): New function.
3572 (ppc_emit_bit_xor): New function.
3573 (ppc_emit_bit_not): New function.
3574 (ppc_emit_equal): New function.
3575 (ppc_emit_less_signed): New function.
3576 (ppc_emit_less_unsigned): New function.
3577 (ppc_emit_ref): New function.
3578 (ppc_emit_const): New function.
3579 (ppc_emit_reg): New function.
3580 (ppc_emit_pop): New function.
3581 (ppc_emit_stack_flush): New function.
3582 (ppc_emit_swap): New function.
3583 (ppc_emit_stack_adjust): New function.
3584 (ppc_emit_call): New function.
3585 (ppc_emit_int_call_1): New function.
3586 (ppc_emit_void_call_2): New function.
3587 (ppc_emit_if_goto): New function.
3588 (ppc_emit_goto): New function.
3589 (ppc_emit_eq_goto): New function.
3590 (ppc_emit_ne_goto): New function.
3591 (ppc_emit_lt_goto): New function.
3592 (ppc_emit_le_goto): New function.
3593 (ppc_emit_gt_goto): New function.
3594 (ppc_emit_ge_goto): New function.
3595 (ppc_write_goto_address): New function.
3596 (ppc_emit_ops_impl): New static variable.
3597 (ppc64v1_emit_prologue): New function.
3598 (ppc64v2_emit_prologue): New function.
3599 (ppc64_emit_epilogue): New function.
3600 (ppc64_emit_add): New function.
3601 (ppc64_emit_sub): New function.
3602 (ppc64_emit_mul): New function.
3603 (ppc64_emit_lsh): New function.
3604 (ppc64_emit_rsh_signed): New function.
3605 (ppc64_emit_rsh_unsigned): New function.
3606 (ppc64_emit_ext): New function.
3607 (ppc64_emit_zero_ext): New function.
3608 (ppc64_emit_log_not): New function.
3609 (ppc64_emit_bit_and): New function.
3610 (ppc64_emit_bit_or): New function.
3611 (ppc64_emit_bit_xor): New function.
3612 (ppc64_emit_bit_not): New function.
3613 (ppc64_emit_equal): New function.
3614 (ppc64_emit_less_signed): New function.
3615 (ppc64_emit_less_unsigned): New function.
3616 (ppc64_emit_ref): New function.
3617 (ppc64_emit_const): New function.
3618 (ppc64v1_emit_reg): New function.
3619 (ppc64v2_emit_reg): New function.
3620 (ppc64_emit_pop): New function.
3621 (ppc64_emit_stack_flush): New function.
3622 (ppc64_emit_swap): New function.
3623 (ppc64v1_emit_call): New function.
3624 (ppc64v2_emit_call): New function.
3625 (ppc64v1_emit_int_call_1): New function.
3626 (ppc64v2_emit_int_call_1): New function.
3627 (ppc64v1_emit_void_call_2): New function.
3628 (ppc64v2_emit_void_call_2): New function.
3629 (ppc64_emit_if_goto): New function.
3630 (ppc64_emit_eq_goto): New function.
3631 (ppc64_emit_ne_goto): New function.
3632 (ppc64_emit_lt_goto): New function.
3633 (ppc64_emit_le_goto): New function.
3634 (ppc64_emit_gt_goto): New function.
3635 (ppc64_emit_ge_goto): New function.
3636 (ppc64v1_emit_ops_impl): New static variable.
3637 (ppc64v2_emit_ops_impl): New static variable.
3638 (ppc_emit_ops): New function.
3639 (linux_low_target): Wire in ppc_emit_ops.
3640
3641 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3642 Marcin Kościelnicki <koriakin@0x04.net>
3643
3644 PR/17221
3645 * Makefile.in: Add powerpc-*-ipa.o
3646 * configure.srv: Add ipa_obj for powerpc*-linux.
3647 * linux-ppc-ipa.c: New file.
3648 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3649 includes.
3650 (PPC_FIELD): New macro.
3651 (PPC_SEXT): New macro.
3652 (PPC_OP6): New macro.
3653 (PPC_BO): New macro.
3654 (PPC_LI): New macro.
3655 (PPC_BD): New macro.
3656 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3657 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3658 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3659 (ppc_get_thread_area): New function.
3660 (is_elfv2_inferior): New function.
3661 (gen_ds_form): New function.
3662 (GEN_STD): New macro.
3663 (GEN_STDU): New macro.
3664 (GEN_LD): New macro.
3665 (GEN_LDU): New macro.
3666 (gen_d_form): New function.
3667 (GEN_ADDI): New macro.
3668 (GEN_ADDIS): New macro.
3669 (GEN_LI): New macro.
3670 (GEN_LIS): New macro.
3671 (GEN_ORI): New macro.
3672 (GEN_ORIS): New macro.
3673 (GEN_LWZ): New macro.
3674 (GEN_STW): New macro.
3675 (GEN_STWU): New macro.
3676 (gen_xfx_form): New function.
3677 (GEN_MFSPR): New macro.
3678 (GEN_MTSPR): New macro.
3679 (GEN_MFCR): New macro.
3680 (GEN_MTCR): New macro.
3681 (GEN_SYNC): New macro.
3682 (GEN_LWSYNC): New macro.
3683 (gen_x_form): New function.
3684 (GEN_OR): New macro.
3685 (GEN_MR): New macro.
3686 (GEN_LWARX): New macro.
3687 (GEN_STWCX): New macro.
3688 (GEN_CMPW): New macro.
3689 (gen_md_form): New function.
3690 (GEN_RLDICL): New macro.
3691 (GEN_RLDICR): New macro.
3692 (gen_i_form): New function.
3693 (GEN_B): New macro.
3694 (GEN_BL): New macro.
3695 (gen_b_form): New function.
3696 (GEN_BNE): New macro.
3697 (GEN_LOAD): New macro.
3698 (GEN_STORE): New macro.
3699 (gen_limm): New function.
3700 (gen_atomic_xchg): New function.
3701 (gen_call): New function.
3702 (ppc_relocate_instruction): New function.
3703 (ppc_install_fast_tracepoint_jump_pad): New function.
3704 (ppc_get_min_fast_tracepoint_insn_len): New function.
3705 (ppc_get_ipa_tdesc_idx): New function.
3706 (the_low_target): Wire in the new functions.
3707 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3708 tdescs.
3709 * linux-ppc-tdesc.h: New file.
3710
3711 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3712
3713 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3714 (alloc_jump_pad_buffer): New function.
3715 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3716 (alloc_jump_pad_buffer): New function.
3717 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3718 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3719 (alloc_jump_pad_buffer): New function.
3720 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3721 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3722 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3723 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3724
3725 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3726
3727 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3728 * linux-amd64-ipa.c: Likewise.
3729 * linux-i386-ipa.c: Likewise.
3730 * linux-s390-ipa.c: Likewise.
3731 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3732 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3733 set_trace_state_variable_value_ptr.
3734 (struct ipa_sym_addresses): Likewise.
3735 (symbol_list): Likewise.
3736 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3737 accessing gdb_collect directly.
3738 (gdb_collect_ptr_type): New typedef.
3739 (get_raw_reg_ptr_type): New typedef.
3740 (get_trace_state_variable_value_ptr_type): New typedef.
3741 (set_trace_state_variable_value_ptr_type): New typedef.
3742 (gdb_collect_ptr): New global.
3743 (get_raw_reg_ptr): New global.
3744 (get_trace_state_variable_value_ptr): New global.
3745 (set_trace_state_variable_value_ptr): New global.
3746 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3747 accessing get_raw_reg directly.
3748 (get_get_tsv_func_addr): Likewise for
3749 get_trace_state_variable_value_ptr.
3750 (get_set_tsv_func_addr): Likewise for
3751 set_trace_state_variable_value_ptr.
3752 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3753
3754 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3755
3756 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3757
3758 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3759
3760 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3761 packets.
3762 (relocate_instruction): Remove own_buf.
3763 * server.c (own_buf): Make global.
3764 (handle_v_requests): Make global.
3765 * server.h (own_buf): New declaration.
3766 (handle_v_requests): New prototype.
3767
3768 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3769
3770 PR 18377
3771 * linux-s390-low.c (add_insns): New function.
3772 (s390_emit_prologue): New function.
3773 (s390_emit_epilogue): New function.
3774 (s390_emit_add): New function.
3775 (s390_emit_sub): New function.
3776 (s390_emit_mul): New function.
3777 (s390_emit_lsh): New function.
3778 (s390_emit_rsh_signed): New function.
3779 (s390_emit_rsh_unsigned): New function.
3780 (s390_emit_ext): New function.
3781 (s390_emit_log_not): New function.
3782 (s390_emit_bit_and): New function.
3783 (s390_emit_bit_or): New function.
3784 (s390_emit_bit_xor): New function.
3785 (s390_emit_bit_not): New function.
3786 (s390_emit_equal): New function.
3787 (s390_emit_less_signed): New function.
3788 (s390_emit_less_unsigned): New function.
3789 (s390_emit_ref): New function.
3790 (s390_emit_if_goto): New function.
3791 (s390_emit_goto): New function.
3792 (s390_write_goto_address): New function.
3793 (s390_emit_litpool): New function.
3794 (s390_emit_const): New function.
3795 (s390_emit_call): New function.
3796 (s390_emit_reg): New function.
3797 (s390_emit_pop): New function.
3798 (s390_emit_stack_flush): New function.
3799 (s390_emit_zero_ext): New function.
3800 (s390_emit_swap): New function.
3801 (s390_emit_stack_adjust): New function.
3802 (s390_emit_set_r2): New function.
3803 (s390_emit_int_call_1): New function.
3804 (s390_emit_void_call_2): New function.
3805 (s390_emit_eq_goto): New function.
3806 (s390_emit_ne_goto): New function.
3807 (s390_emit_lt_goto): New function.
3808 (s390_emit_le_goto): New function.
3809 (s390_emit_gt_goto): New function.
3810 (s390_emit_ge_goto): New function.
3811 (s390x_emit_prologue): New function.
3812 (s390x_emit_epilogue): New function.
3813 (s390x_emit_add): New function.
3814 (s390x_emit_sub): New function.
3815 (s390x_emit_mul): New function.
3816 (s390x_emit_lsh): New function.
3817 (s390x_emit_rsh_signed): New function.
3818 (s390x_emit_rsh_unsigned): New function.
3819 (s390x_emit_ext): New function.
3820 (s390x_emit_log_not): New function.
3821 (s390x_emit_bit_and): New function.
3822 (s390x_emit_bit_or): New function.
3823 (s390x_emit_bit_xor): New function.
3824 (s390x_emit_bit_not): New function.
3825 (s390x_emit_equal): New function.
3826 (s390x_emit_less_signed): New function.
3827 (s390x_emit_less_unsigned): New function.
3828 (s390x_emit_ref): New function.
3829 (s390x_emit_if_goto): New function.
3830 (s390x_emit_const): New function.
3831 (s390x_emit_call): New function.
3832 (s390x_emit_reg): New function.
3833 (s390x_emit_pop): New function.
3834 (s390x_emit_stack_flush): New function.
3835 (s390x_emit_zero_ext): New function.
3836 (s390x_emit_swap): New function.
3837 (s390x_emit_stack_adjust): New function.
3838 (s390x_emit_int_call_1): New function.
3839 (s390x_emit_void_call_2): New function.
3840 (s390x_emit_eq_goto): New function.
3841 (s390x_emit_ne_goto): New function.
3842 (s390x_emit_lt_goto): New function.
3843 (s390x_emit_le_goto): New function.
3844 (s390x_emit_gt_goto): New function.
3845 (s390x_emit_ge_goto): New function.
3846 (s390_emit_ops): New function.
3847 (struct linux_target_ops): Fill in emit_ops hook.
3848
3849 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3850
3851 PR 18377
3852 * Makefile.in: Add s390 IPA files.
3853 * configure.srv: Build IPA for s390.
3854 * linux-s390-ipa.c: New file.
3855 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3856 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3857 (tdesc_s390_linux32): Likewise.
3858 (init_registers_s390_linux32v1): Likewise.
3859 (tdesc_s390_linux32v1): Likewise.
3860 (init_registers_s390_linux32v2): Likewise.
3861 (tdesc_s390_linux32v2): Likewise.
3862 (init_registers_s390_linux64): Likewise.
3863 (tdesc_s390_linux64): Likewise.
3864 (init_registers_s390_linux64v1): Likewise.
3865 (tdesc_s390_linux64v1): Likewise.
3866 (init_registers_s390_linux64v2): Likewise.
3867 (tdesc_s390_linux64v2): Likewise.
3868 (init_registers_s390_te_linux64): Likewise.
3869 (tdesc_s390_te_linux64): Likewise.
3870 (init_registers_s390_vx_linux64): Likewise.
3871 (tdesc_s390_vx_linux64): Likewise.
3872 (init_registers_s390_tevx_linux64): Likewise.
3873 (tdesc_s390_tevx_linux64): Likewise.
3874 (init_registers_s390x_linux64): Likewise.
3875 (tdesc_s390x_linux64): Likewise.
3876 (init_registers_s390x_linux64v1): Likewise.
3877 (tdesc_s390x_linux64v1): Likewise.
3878 (init_registers_s390x_linux64v2): Likewise.
3879 (tdesc_s390x_linux64v2): Likewise.
3880 (init_registers_s390x_te_linux64): Likewise.
3881 (tdesc_s390x_te_linux64): Likewise.
3882 (init_registers_s390x_vx_linux64): Likewise.
3883 (tdesc_s390x_vx_linux64): Likewise.
3884 (init_registers_s390x_tevx_linux64): Likewise.
3885 (tdesc_s390x_tevx_linux64): Likewise.
3886 (have_hwcap_s390_vx): New static variable.
3887 (s390_arch_setup): Fill have_hwcap_s390_vx.
3888 (s390_get_thread_area): New function.
3889 (s390_ft_entry_gpr_esa): New const.
3890 (s390_ft_entry_gpr_zarch): New const.
3891 (s390_ft_entry_misc): New const.
3892 (s390_ft_entry_fr): New const.
3893 (s390_ft_entry_vr): New const.
3894 (s390_ft_main_31): New const.
3895 (s390_ft_main_64): New const.
3896 (s390_ft_exit_fr): New const.
3897 (s390_ft_exit_vr): New const.
3898 (s390_ft_exit_misc): New const.
3899 (s390_ft_exit_gpr_esa): New const.
3900 (s390_ft_exit_gpr_zarch): New const.
3901 (append_insns): New function.
3902 (s390_relocate_instruction): New function.
3903 (s390_install_fast_tracepoint_jump_pad): New function.
3904 (s390_get_min_fast_tracepoint_insn_len): New function.
3905 (s390_get_ipa_tdesc_idx): New function.
3906 (struct linux_target_ops): Wire in the above functions.
3907 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3908 * linux-s390-tdesc.h: New file.
3909
3910 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3911
3912 * linux-s390-low.c (s390_supports_tracepoints): New function.
3913 (struct linux_target_ops): Fill supports_tracepoints hook.
3914
3915 2016-03-18 Yao Qi <yao.qi@linaro.org>
3916
3917 * linux-low.c (lwp_signal_can_be_delivered): New function.
3918 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3919
3920 2016-03-18 Yao Qi <yao.qi@linaro.org>
3921
3922 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3923 0 if signal is enqueued. Remove 'signal' from one debugging
3924 message. Move one debugging message to some lines below.
3925 Remove code setting 'signal' to 0.
3926
3927 2016-03-18 Yao Qi <yao.qi@linaro.org>
3928
3929 * linux-low.c (linux_low_filter_event): Remove redundant
3930 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3931
3932 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3933
3934 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3935 (struct linux_target_ops): Wire in the above.
3936
3937 2016-03-03 Yao Qi <yao.qi@linaro.org>
3938
3939 * linux-low.c: Update comments to start_step_over.
3940
3941 2016-03-03 Yao Qi <yao.qi@linaro.org>
3942
3943 PR server/19736
3944 * linux-low.c (handle_extended_wait): Set child suspended
3945 if event_lwp->bp_reinsert isn't zero.
3946
3947 2016-03-02 Yao Qi <yao.qi@linaro.org>
3948
3949 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3950 enqueue_pending_signal.
3951
3952 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3953
3954 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3955 is actually loaded.
3956
3957 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3958
3959 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3960 (s390_regmap_3264) [!__s390x__]: New global.
3961 (s390_collect_ptrace_register): Skip map entries containing -1.
3962 (s390_supply_ptrace_register): Ditto.
3963 (s390_fill_gprs_high): New function.
3964 (s390_store_gprs_high): New function.
3965 (s390_regsets): Add NT_S390_HIGH_GPRS.
3966 (s390_get_hwcap): Enable on 31-bit.
3967 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3968 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3969 Detect NT_S390_HIGH_GPRS.
3970 (s390_usrregs_info_3264): Enable on 31-bit.
3971 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3972 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3973
3974 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3975
3976 PR gdb/13808
3977 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3978 * configure.srv: Ditto.
3979 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3980 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3981 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3982 (init_registers_amd64_linux): Remove prototype.
3983 (tdesc_amd64_linux): Remove declaration.
3984 (get_ipa_tdesc): New function.
3985 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3986 initialize remaining tdescs.
3987 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3988 (init_registers_i386_linux): Remove prototype.
3989 (tdesc_i386_linux): Remove declaration.
3990 (get_ipa_tdesc): New function.
3991 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3992 initialize remaining tdescs.
3993 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3994 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3995 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3996 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3997 (x86_get_ipa_tdesc_idx): New function.
3998 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3999 * linux-x86-tdesc.h: New file.
4000 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4001 (target_get_ipa_tdesc_idx): New macro.
4002 * tracepoint.c (ipa_tdesc_idx): New macro.
4003 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4004 (symbol_list): Add ipa_tdesc_idx.
4005 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4006 (ipa_tdesc): Remove.
4007 (ipa_tdesc_idx): New variable.
4008 (get_context_regcache): Use get_ipa_tdesc.
4009 (gdb_collect): Ditto.
4010 (gdb_probe): Ditto.
4011 * tracepoint.h (get_ipa_tdesc): New prototype.
4012 (ipa_tdesc): Remove.
4013
4014 2016-02-24 Pedro Alves <palves@redhat.com>
4015
4016 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4017 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4018 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4019 Factor out common code between the USE_SIGTRAP_SIGINFO and
4020 !USE_SIGTRAP_SIGINFO blocks.
4021 (linux_low_filter_event): Call save_stop_reason instead of
4022 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4023 Update comments.
4024 (linux_wait_1): Update comments.
4025
4026 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4027
4028 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4029 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4030 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4031 ppc_insert_point, ppc_remove_point.
4032
4033 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4034
4035 * linux-s390-low.c (s390_supports_z_point_type): New function.
4036 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4037
4038 2016-02-16 Yao Qi <yao.qi@linaro.org>
4039
4040 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4041 PC. Get pc from regcache_read_pc.
4042
4043 2016-02-12 Yao Qi <yao.qi@linaro.org>
4044
4045 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4046 or linux_get_pc_32bit.
4047 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4048
4049 2016-02-12 Yao Qi <yao.qi@linaro.org>
4050
4051 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4052 arm_linux_get_next_pcs_fixup.
4053
4054 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4055
4056 * tracepoint.c (x_tracepoint_action_download): Change
4057 write_inferior_data_ptr to write_inferior_data_pointer.
4058 (cmd_qtstart): Likewise.
4059 (write_inferior_data_ptr): Remove.
4060 (download_agent_expr): Change write_inferior_data_ptr to
4061 write_inferior_data_pointer.
4062 (download_tracepoint_1): Likewise.
4063 (download_tracepoint): Likewise.
4064 (download_trace_state_variables): Likewise.
4065
4066 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4067 Marcin Kościelnicki <koriakin@0x04.net>
4068
4069 * tracepoint.c (struct tracepoint_action_ops): Remove.
4070 (struct tracepoint_action): Remove ops.
4071 (m_tracepoint_action_download, r_tracepoint_action_download)
4072 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4073 size and offset accordingly.
4074 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4075 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4076 (tracepoint_action_send, tracepoint_action_download): New functions.
4077 Helpers for trace action handlers.
4078 (add_tracepoint_action): Remove setup actions ops.
4079 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4080
4081 2016-02-10 Yao Qi <yao.qi@linaro.org>
4082
4083 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4084
4085 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4086
4087 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4088 to AC_OUTPUT.
4089 * configure: Regenerate.
4090
4091 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4092
4093 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4094 void * to gdb_byte *.
4095 * linux-low.c (siginfo_fixup): Likewise.
4096 (linux_xfer_siginfo): Likewise.
4097 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4098 Likewise.
4099 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4100
4101 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4102
4103 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4104 to srv_tgtobj.
4105 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4106 to srv_tgtobj.
4107 * linux-x86-low.c [__x86_64__]: Include
4108 "nat/amd64-linux-siginfo.h".
4109 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4110 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4111 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4112 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4113 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4114 (cpt_si_fd, si_timerid, si_overrun): Move from
4115 nat/amd64-linux-siginfo.c.
4116 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4117
4118 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4119
4120 * server.c (skip_to_semicolon): Remove.
4121 (process_point_options): Use strchrnul instead of
4122 skip_to_semicolon.
4123
4124 2016-01-26 Yao Qi <yao.qi@linaro.org>
4125
4126 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4127 * linux-low.c (install_software_single_step_breakpoints): Don't
4128 call regcache_read_pc.
4129 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4130 argument pc.
4131
4132 2016-01-26 Yao Qi <yao.qi@linaro.org>
4133
4134 * linux-low.c (install_software_single_step_breakpoints): Call
4135 regcache_read_pc instead of get_pc.
4136
4137 2016-01-26 Yao Qi <yao.qi@linaro.org>
4138
4139 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4140 (unblock_async_io): Rename to ...
4141 (block_unblock_async_io): ... it. New function.
4142 (enable_async_io): Don't install SIGIO handler. Unblock it
4143 instead.
4144 (disable_async_io): Don't ignore SIGIO. Block it instead.
4145 (initialize_async_io): Install SIGIO handler. Don't call
4146 unblock_async_io.
4147
4148 2016-01-26 Yao Qi <yao.qi@linaro.org>
4149
4150 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4151 first character is '\003', call *the_target->request_interrupt.
4152
4153 2016-01-25 Yao Qi <yao.qi@linaro.org>
4154
4155 * remote-utils.c (new_thread_notify): Remove.
4156 (dead_thread_notify): Likewise.
4157 * remote-utils.h (new_thread_notify): Remove declaration.
4158 (dead_thread_notify): Likewise.
4159
4160 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4161
4162 * gdb.trace/pending.exp: Fix expected message on continue.
4163
4164 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4165
4166 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4167 it works properly on big-endian machines where sizeof (CORE_ADDR)
4168 != sizeof (void *).
4169
4170 2016-01-21 Pedro Alves <palves@redhat.com>
4171
4172 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4173 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4174 * configure: Regenerate.
4175
4176 2016-01-21 Yao Qi <yao.qi@linaro.org>
4177
4178 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4179 is_thumb and set it according to CPSR saved on the stack.
4180 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4181 arm_sigreturn_next_pc.
4182
4183 2016-01-18 Yao Qi <yao.qi@linaro.org>
4184
4185 * linux-low.c (linux_set_pc_64bit): New function.
4186 (linux_get_pc_64bit): New function.
4187 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4188 Declare.
4189 * linux-sparc-low.c (debug_threads): Remove declaration.
4190 (sparc_get_pc): Remove.
4191 (the_low_target): Use linux_get_pc_64bit instead of
4192 sparc_get_pc.
4193 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4194 (the_low_target): Use linux_get_pc_64bit and
4195 linux_set_pc_64bit.
4196
4197 2016-01-18 Yao Qi <yao.qi@linaro.org>
4198
4199 * linux-arm-low.c (debug_threads): Remove declaration.
4200 (arm_get_pc, arm_set_pc): Remove.
4201 (the_low_target): Use linux_get_pc_32bit and
4202 linux_set_pc_32bit.
4203 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4204 (the_low_target): Use linux_get_pc_32bit and
4205 linux_set_pc_32bit.
4206 * linux-cris-low.c (debug_threads): Remove declaration.
4207 (cris_get_pc, cris_set_pc,): Remove.
4208 (the_low_target): Use linux_get_pc_32bit and
4209 linux_set_pc_32bit.
4210 * linux-crisv32-low.c (debug_threads): Remove declaration.
4211 (cris_get_pc, cris_set_pc): Remove.
4212 (the_low_target): Use linux_get_pc_32bit and
4213 linux_set_pc_32bit.
4214 * linux-low.c: Include inttypes.h.
4215 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4216 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4217 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4218 (the_low_target): Use linux_get_pc_32bit and
4219 linux_set_pc_32bit.
4220 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4221 (the_low_target): Use linux_get_pc_32bit and
4222 linux_set_pc_32bit.
4223 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4224 (the_low_target): Use linux_get_pc_32bit and
4225 linux_set_pc_32bit.
4226 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4227 (the_low_target): Use linux_get_pc_32bit and
4228 linux_set_pc_32bit.
4229 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4230 (the_low_target): Use linux_get_pc_32bit and
4231 linux_set_pc_32bit.
4232
4233 2016-01-18 Gary Benson <gbenson@redhat.com>
4234
4235 * configure.ac (AC_FUNC_FORK): New check.
4236 * config.in: Regenerate.
4237 * configure: Likewise.
4238
4239 2016-01-14 Yao Qi <yao.qi@linaro.org>
4240
4241 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4242 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4243 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4244 arm_get_next_pcs_ctor.
4245
4246 2016-01-12 Josh Stone <jistone@redhat.com>
4247 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4248
4249 * inferiors.h: Include "gdb_vecs.h".
4250 (struct process_info): Add syscalls_to_catch.
4251 * inferiors.c (remove_process): Free syscalls_to_catch.
4252 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4253 syscall_return stops.
4254 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4255 * server.c (handle_general_set): Handle QCatchSyscalls.
4256 (handle_query): Report support for QCatchSyscalls.
4257 * target.h (struct target_ops): Add supports_catch_syscall.
4258 (target_supports_catch_syscall): New macro.
4259 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4260 (struct lwp_info): Add syscall_state.
4261 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4262 Maintain syscall_state and syscalls_to_catch across exec.
4263 (get_syscall_trapinfo): New function, proxy to the_low_target.
4264 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4265 (linux_low_filter_event): Toggle syscall_state entry/return for
4266 syscall traps, and set it ignored for all others.
4267 (gdb_catching_syscalls_p): New function.
4268 (gdb_catch_this_syscall_p): New function.
4269 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4270 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4271 (linux_supports_catch_syscall): New function.
4272 (linux_target_ops): Install it.
4273 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4274 (the_low_target): Install it.
4275
4276 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4277
4278 * acinclude.m4: Include new ../warning.m4 file.
4279 * configure: Regenerated.
4280 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4281
4282 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4283
4284 * ax.c (is_goto_target): Mark static.
4285 * linux-low.c (register_addr): Likewise.
4286 (linux_fetch_registers, linux_store_registers): Likewise.
4287 * mem-break.c (any_persistent_commands): Fix old prototype.
4288 (add_commands_to_breakpoint): Mark static.
4289 * regcache.c (find_register_by_name): Delete unused func.
4290 * remote-utils.c (hex_or_minus_one): Mark static.
4291 * server.c (monitor_show_help): Mark static.
4292 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4293 handle_v_requests): Likewise.
4294
4295 2016-01-12 Pedro Alves <palves@redhat.com>
4296
4297 Remove use of the registered trademark symbol throughout.
4298
4299 2016-01-08 Yao Qi <yao.qi@linaro.org>
4300
4301 * remote-utils.c (getpkt): If c is '\003', call target hook
4302 request_interrupt.
4303
4304 2016-01-06 Yao Qi <yao.qi@linaro.org>
4305
4306 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4307 linux-aarch32-low.c.
4308 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4309 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4310 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4311 (thumb2_breakpoint): Declare.
4312 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4313 linux-aarch32-low.h.
4314 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4315 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4316 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4317
4318 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4319
4320 * gdbreplay.c (gdbreplay_version): Change copyright year in
4321 version message.
4322 * server.c (gdbserver_version): Likewise.
4323
4324 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4325
4326 * server.c (crc32_table): Delete.
4327 (crc32): Use libiberty's xcrc32 function.
4328
4329 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4330
4331 * lynx-low.c (lynx_delete_thread_callback): New function.
4332 (lynx_mourn): Properly delete our process and all of its
4333 threads. Remove call to clear_inferiors.
4334
4335 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4336
4337 * target.c (thread_search_callback): Add check that
4338 the thread_stopped target callback is not NULL before
4339 calling it.
4340
4341 2015-12-21 Yao Qi <yao.qi@linaro.org>
4342
4343 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4344 arm breakpoint.
4345
4346 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4347
4348 * server.c (handle_query): Call target_supports_software_single_step.
4349
4350 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4351
4352 * linux-low.c (single_step): New function.
4353 (linux_resume_one_lwp_throw): Call single_step.
4354 (start_step_over): Likewise.
4355
4356 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4357
4358 * Makefile.in (SFILES): Append arch/arm-linux.c,
4359 arch/arm-get-next-pcs.c.
4360 (arm-linux.o): New rule.
4361 (arm-get-next-pcs.o): New rule.
4362 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4363 arm-linux.o.
4364 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4365 to linux-aarch32-low.c.
4366 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4367 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4368 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4369 (thumb2_breakpoint_len): Likewise.
4370 (arm_is_thumb_mode): Make non-static.
4371 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4372 from linux-aarch32-low.c.
4373 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4374 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4375 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4376 (thumb2_breakpoint_len): Likewise.
4377 (arm_is_thumb_mode): New declaration.
4378 * linux-arm-low.c: Include arch/arm-linux.h
4379 aarch/arm-get-next-pcs.h, sys/syscall.h.
4380 (get_next_pcs_ops): New struct.
4381 (get_next_pcs_addr_bits_remove): New function.
4382 (get_next_pcs_is_thumb): New function.
4383 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4384 (arm_sigreturn_next_pc): Likewise.
4385 (get_next_pcs_syscall_next_pc): Likewise.
4386 (arm_gdbserver_get_next_pcs): Likewise.
4387 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4388 Initialize.
4389 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4390 * server.h: Include gdb_vecs.h.
4391
4392 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4393
4394 * Makefile.in (SFILES): Append common/common-regcache.c.
4395 (OBS): Append common-regcache.o.
4396 (common-regcache.o): New rule.
4397 * regcache.c (init_register_cache): Initialize cache to
4398 REG_UNAVAILABLE.
4399 (regcache_raw_read_unsigned): New function.
4400 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4401 register_status enum.
4402
4403 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4404
4405 * linux-aarch64-low.c (the_low_targets): Rename
4406 breakpoint_reinsert_addr to get_next_pcs.
4407 * linux-arm-low.c (the_low_targets): Likewise.
4408 * linux-bfin-low.c (the_low_targets): Likewise.
4409 * linux-cris-low.c (the_low_targets): Likewise.
4410 * linux-crisv32-low.c (the_low_targets): Likewise.
4411 * linux-low.c (can_software_single_step): Likewise.
4412 (install_software_single_step_breakpoints): New function.
4413 (start_step_over): Use install_software_single_step_breakpoints.
4414 * linux-low.h: New CORE_ADDR vector.
4415 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4416 get_next_pcs.
4417 * linux-mips-low.c (the_low_targets): Likewise.
4418 * linux-nios2-low.c (the_low_targets): Likewise.
4419 * linux-sparc-low.c (the_low_targets): Likewise.
4420
4421 2015-12-17 Pedro Alves <palves@redhat.com>
4422
4423 * linux-low.c (linux_kill_one_lwp): Remove references to
4424 LinuxThreads.
4425 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4426 to 'kill'.
4427 (linux_init_signals): Delete.
4428 (initialize_low): Adjust.
4429 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4430
4431 2015-12-16 Pedro Alves <palves@redhat.com>
4432
4433 * configure.ac (compiler warning flags): When testing a
4434 -Wno-foo option, check whether -Wfoo works instead.
4435 * configure: Regenerate.
4436
4437 2015-12-11 Don Breazeal <donb@codesourcery.com>
4438
4439 * server.c (process_serial_event): Don't exit from gdbserver
4440 in remote mode if there are still active inferiors.
4441
4442 2015-12-11 Yao Qi <yao.qi@linaro.org>
4443
4444 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4445 arm_breakpoint_at if the process is 32-bit.
4446
4447 2015-12-11 Yao Qi <yao.qi@linaro.org>
4448
4449 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4450 arm breakpoint.
4451
4452 2015-12-07 Yao Qi <yao.qi@linaro.org>
4453
4454 * configure.srv: Append arm.o to srv_tgtobj for
4455 aarch64*-*-linux* target.
4456 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4457 from linux-arm-low.c.
4458 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4459 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4460 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4461 (thumb2_breakpoint_len): Likewise.
4462 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4463 (arm_breakpoint_kinds): Likewise.
4464 (arm_breakpoint_kind_from_pc): Likewise.
4465 (arm_sw_breakpoint_from_kind): Likewise.
4466 (arm_breakpoint_kind_from_current_state): Likewise.
4467 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4468 (arm_sw_breakpoint_from_kind): Declare.
4469 (arm_breakpoint_kind_from_current_state): Declare.
4470 (arm_breakpoint_at): Declare.
4471 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4472 arm_sw_breakpoint_from_kind if process is 32-bit.
4473 (aarch64_breakpoint_kind_from_pc): New function.
4474 (aarch64_breakpoint_kind_from_current_state): New function.
4475 (the_low_target): Initialize fields breakpoint_kind_from_pc
4476 and breakpoint_kind_from_current_state.
4477 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4478 linux-aarch32-low.c.
4479 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4480 (arm_breakpoint, arm_breakpoint_len): Likewise.
4481 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4482 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4483 (arm_is_thumb_mode): Likewise.
4484 (arm_breakpoint_at): Likewise.
4485 (arm_breakpoint_kind_from_pc): Likewise.
4486 (arm_sw_breakpoint_from_kind): Likewise.
4487 (arm_breakpoint_kind_from_current_state): Likewise.
4488
4489 Revert:
4490 2015-08-04 Yao Qi <yao.qi@linaro.org>
4491
4492 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4493 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4494 * server.c (extended_protocol): Remove "static".
4495 * server.h (extended_protocol): Declare it.
4496
4497 2015-12-04 Josh Stone <jistone@redhat.com>
4498
4499 * target.h (struct target_ops) <arch_setup>: Rename to ...
4500 (struct target_ops) <post_create_inferior>: ... this.
4501 (target_arch_setup): Rename to ...
4502 (target_post_create_inferior): ... this, calling post_create_inferior.
4503 * server.c (start_inferior): Update target_arch_setup calls to
4504 target_post_create_inferior.
4505 * linux-low.c (linux_low_ptrace_options): Forward declare.
4506 (linux_arch_setup): Update its comment for general use.
4507 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4508 (struct linux_target_ops): Use linux_post_create_inferior.
4509 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4510 to post_create_inferior.
4511 * nto-low.c (struct nto_target_ops): Likewise.
4512 * spu-low.c (struct spu_target_ops): Likewise.
4513 * win32-low.c (struct win32_target_ops): Likewise.
4514
4515 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4516
4517 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4518
4519 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4520
4521 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4522 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4523 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4524 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4525 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4526 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4527 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4528 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4529 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4530 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4531 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4532 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4533
4534 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4535
4536 * linux-low.c (linux_look_up_symbols): Don't call
4537 linux_supports_traceclone.
4538 * linux-low.h (thread_db_init): Remove use_events argument.
4539 * thread-db.c (thread_db_use_event): Remove global variable.
4540 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4541 (struct thread_db) <td_create_bp>: Remove field.
4542 (thread_db_create_event): Remove function.
4543 (thread_db_enable_reporting): Likewise.
4544 (find_one_thread): Don't check for thread_db_use_events.
4545 (attach_thread): Likewise.
4546 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4547 (try_thread_db_load_1): Don't check for thread_db_use_events.
4548 (thread_db_init): Remove use_events argument and thread events
4549 handling.
4550 (remove_thread_event_breakpoints): Remove function.
4551 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4552
4553 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4554
4555 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4556 New function.
4557 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4558 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4559 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4560 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4561 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4562 Initialize.
4563 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4564 New function.
4565 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4566 * linux-low.c (can_hardware_single_step): Use
4567 supports_hardware_single_step.
4568 (can_software_single_step): New function.
4569 (start_step_over): Call can_software_single_step.
4570 (linux_supports_hardware_single_step): New function.
4571 (struct target_ops) <supports_software_single_step>: Initialize.
4572 * linux-low.h (struct linux_target_ops)
4573 <supports_hardware_single_step>: Initialize.
4574 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4575 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4576 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4577 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4578 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4579 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4580 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4581 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4582 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4583 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4584 Initialize.
4585 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4586 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4587 Initialize.
4588 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4589 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4590 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4591 New function.
4592 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4593 * target.h (struct target_ops): <supports_software_single_step>:
4594 New field.
4595 (target_supports_software_single_step): New macro.
4596
4597 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4598
4599 * linux-low.c (linux_wait_1): Fix pc advance condition.
4600 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4601 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4602
4603 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4604
4605 * linux-arm-low.c (arm_is_thumb_mode): New function.
4606 (arm_breakpoint_at): Use arm_is_thumb_mode.
4607 (arm_breakpoint_kind_from_current_state): New function.
4608 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4609 Initialize.
4610 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4611 (linux_breakpoint_kind_from_current_state): New function.
4612 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4613 * linux-low.h (struct linux_target_ops)
4614 <breakpoint_kind_from_current_state>: New field.
4615 * target.h (struct target_ops): Likewise.
4616 (target_breakpoint_kind_from_current_state): New macro.
4617
4618 2015-11-30 Pedro Alves <palves@redhat.com>
4619
4620 * linux-low.c (linux_resume): Wake up the event loop before
4621 returning.
4622
4623 2015-11-30 Pedro Alves <palves@redhat.com>
4624
4625 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4626 check.
4627 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4628 to -1.
4629 * target.c (struct thread_search): New structure.
4630 (thread_search_callback): New function.
4631 (prev_general_thread): New global.
4632 (prepare_to_access_memory, done_accessing_memory): New functions.
4633 * target.h (prepare_to_access_memory, done_accessing_memory):
4634 Replace macros with function declarations.
4635
4636 2015-11-30 Pedro Alves <palves@redhat.com>
4637
4638 PR 14618
4639 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4640 report TARGET_WAITKIND_NO_RESUMED.
4641 * remote-utils.c (prepare_resume_reply): Handle
4642 TARGET_WAITKIND_NO_RESUMED.
4643 * server.c (report_no_resumed): New global.
4644 (handle_query) <qSupported>: Handle "no-resumed+". Report
4645 "no-resumed+" support.
4646 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4647 return error if the client doesn't support no-resumed events.
4648 (push_stop_notification): New function.
4649 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4650 events if the client supports them.
4651
4652 2015-11-30 Pedro Alves <palves@redhat.com>
4653
4654 * linux-low.c (thread_still_has_status_pending_p): Don't check
4655 vCont;t here.
4656 (lwp_resumed): New function.
4657 (status_pending_p_callback): Return early if the LWP is not
4658 supposed to be resumed.
4659
4660 2015-11-30 Pedro Alves <palves@redhat.com>
4661
4662 * linux-low.c (handle_extended_wait): Assert that the LWP's
4663 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4664 thread create events, leave the new child's status pending.
4665 (linux_low_filter_event): If GDB wants to hear about thread exit
4666 events, leave the LWP marked dead and don't delete it.
4667 (linux_wait_for_event_filtered): Don't check for thread exit.
4668 (filter_exit_event): New function.
4669 (linux_wait_1): Use it, when returning an exit event.
4670 (linux_resume_one_lwp_throw): Assert that the LWP's
4671 waitstatus is TARGET_WAITKIND_IGNORE.
4672 * remote-utils.c (prepare_resume_reply): Handle
4673 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4674 * server.c (report_thread_events): New global.
4675 (handle_general_set): Handle QThreadEvents.
4676 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4677 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4678 TARGET_WAITKIND_THREAD_EXITED.
4679 * server.h (report_thread_events): Declare.
4680
4681 2015-11-30 Pedro Alves <palves@redhat.com>
4682
4683 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4684 the thread's last_resume_kind was resume_stop.
4685
4686 2015-11-30 Pedro Alves <palves@redhat.com>
4687
4688 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4689 before returning.
4690
4691 2015-11-30 Pedro Alves <palves@redhat.com>
4692
4693 * server.c (handle_v_requests): Handle vCtrlC.
4694
4695 2015-11-30 Pedro Alves <palves@redhat.com>
4696
4697 * gdbthread.h (find_any_thread_of_pid): Declare.
4698 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4699 functions.
4700 * server.c (handle_query): If current_thread is NULL, look for
4701 another thread of the selected process.
4702
4703 2015-11-26 Daniel Colascione <dancol@dancol.org>
4704 Simon Marchi <simon.marchi@ericsson.com>
4705
4706 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4707 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4708 name in reply.
4709 * target.h (struct target_ops) <thread_name>: New field.
4710 (target_thread_name): New macro.
4711
4712 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4713
4714 * regcache.h (regcache_invalidate_pid): Add declaration.
4715 * regcache.c (regcache_invalidate_pid): New function, extracted
4716 from regcache_invalidate.
4717 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4718 Add trivial documentation comment.
4719 * lynx-low.c: Use regcache_invalidate_pid instead of
4720 regcache_invalidate.
4721
4722 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4723
4724 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4725 and Elf64_auxv_t if the target is Android.
4726
4727 2015-11-22 Doug Evans <xdje42@gmail.com>
4728
4729 * target.h: #include <sys/types.h>.
4730
4731 2015-11-19 Pedro Alves <palves@redhat.com>
4732
4733 * linux-low.c (linux_process_qsupported): Change prototype.
4734 Adjust.
4735 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4736 Change prototype.
4737 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4738 and adjust to loop over all features.
4739 * server.c (handle_query) <qSupported>: Adjust to call
4740 target_process_qsupported once, passing it a vector of unprocessed
4741 features.
4742 * target.h (struct target_ops) <process_qsupported>: Change
4743 prototype.
4744 (target_process_qsupported): Adjust.
4745
4746 2015-11-19 Pedro Alves <palves@redhat.com>
4747
4748 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4749 mode.
4750 * configure: Regenerate.
4751
4752 2015-11-19 Pedro Alves <palves@redhat.com>
4753
4754 * configure: Regenerate.
4755
4756 2015-11-19 Yao Qi <yao.qi@linaro.org>
4757
4758 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4759 type to uint32_t.
4760
4761 2015-11-19 Yao Qi <yao.qi@linaro.org>
4762
4763 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4764 (struct aarch64_operand): Move enum out.
4765
4766 2015-11-19 Yao Qi <yao.qi@linaro.org>
4767
4768 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4769 struct user_fpsimd_state *.
4770 (aarch64_store_fpregset): Likewise.
4771
4772 2015-11-19 Yao Qi <yao.qi@linaro.org>
4773
4774 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4775 struct user_pt_regs *.
4776 (aarch64_store_gregset): Likewise.
4777
4778 2015-11-18 Pedro Alves <palves@redhat.com>
4779
4780 * Makefile.in (all_object_files): Add $IPA_OBJS.
4781
4782 2015-11-17 Pedro Alves <palves@redhat.com>
4783
4784 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4785 GDB_SIGNAL_0 and gdb_signal_to_string.
4786
4787 2015-11-17 Pedro Alves <palves@redhat.com>
4788
4789 * win32-low.c (handle_output_debug_string): Remove parameter.
4790 (win32_kill): Remove our_status local and adjust call to
4791 handle_output_debug_string.
4792 (get_child_debug_event): Adjust call to
4793 handle_output_debug_string.
4794
4795 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4796
4797 * linux-mips-low.c (mips_fill_gregset): Add cast.
4798 (mips_store_gregset): Likewise.
4799 (mips_fill_fpregset): Likewise.
4800 (mips_store_fpregset): Likewise.
4801
4802 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4803
4804 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4805 priv.
4806
4807 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4808
4809 * linux-mips-low.c (mips_linux_new_thread): Change type of
4810 watch_type to enum target_hw_bp_type.
4811
4812 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4813
4814 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4815 Change return type to arm_hwbp_type.
4816
4817 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4818
4819 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4820 (arm_store_gregset): Likewise.
4821 * linux-arm-low.c (arm_get_hwcap): Likewise.
4822 (arm_read_description): Likewise.
4823
4824 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4825
4826 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4827
4828 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4829
4830 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4831 (ppc_fill_vsxregset): Likewise.
4832 (ppc_store_vsxregset): Likewise.
4833 (ppc_fill_vrregset): Likewise.
4834 (ppc_store_vrregset): Likewise.
4835 (ppc_fill_evrregset): Likewise.
4836 (ppc_store_evrregset): Likewise.
4837
4838 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4839
4840 * linux-ppc-low.c (ppc_usrregs_info): Remove
4841 forward-declaration.
4842 (ppc_arch_setup): Move lower in file.
4843
4844 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4845
4846 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4847 (ps_pdwrite): Likewise.
4848
4849 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4850
4851 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4852 to after assert checks.
4853
4854 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4855
4856 * proc-service.c (ps_pdread): Add/adjust casts.
4857 (ps_pdwrite): Add/adjust casts.
4858
4859 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4860
4861 * server.c (handle_search_memory_1): Cast return value of
4862 memmem.
4863
4864 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4865
4866 * server.c (write_qxfer_response): Change type of data to
4867 gdb_byte *.
4868
4869 2015-10-29 Pedro Alves <palves@redhat.com>
4870
4871 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4872
4873 2015-10-29 Pedro Alves <palves@redhat.com>
4874
4875 * tracepoint.c (clear_installed_tracepoints): Add casts.
4876
4877 2015-10-29 Pedro Alves <palves@redhat.com>
4878
4879 * server.c (handle_v_cont, process_serial_event): Add enum
4880 gdb_signal casts to signal parsing code.
4881
4882 2015-10-29 Pedro Alves <palves@redhat.com>
4883
4884 * linux-low.h (NULL_REGSET): Define.
4885 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4886 * linux-arm-low.c (arm_regsets): Likewise.
4887 * linux-crisv32-low.c (cris_regsets): Likewise.
4888 * linux-m68k-low.c (m68k_regsets): Likewise.
4889 * linux-mips-low.c (mips_regsets): Likewise.
4890 * linux-nios2-low.c (nios2_regsets): Likewise.
4891 * linux-ppc-low.c (ppc_regsets): Likewise.
4892 * linux-s390-low.c (s390_regsets): Likewise.
4893 * linux-sh-low.c (sh_regsets): Likewise.
4894 * linux-sparc-low.c (sparc_regsets): Likewise.
4895 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4896 * linux-tile-low.c (tile_regsets): Likewise.
4897 * linux-x86-low.c (x86_regsets): Likewise.
4898 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4899
4900 2015-10-29 Pedro Alves <palves@redhat.com>
4901
4902 * linux-low.h (NULL_REGSET): Define.
4903 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4904 * linux-arm-low.c (arm_regsets): Likewise.
4905 * linux-crisv32-low.c (cris_regsets): Likewise.
4906 * linux-m68k-low.c (m68k_regsets): Likewise.
4907 * linux-mips-low.c (mips_regsets): Likewise.
4908 * linux-nios2-low.c (nios2_regsets): Likewise.
4909 * linux-ppc-low.c (ppc_regsets): Likewise.
4910 * linux-s390-low.c (s390_regsets): Likewise.
4911 * linux-sh-low.c (sh_regsets): Likewise.
4912 * linux-sparc-low.c (sparc_regsets): Likewise.
4913 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4914 * linux-tile-low.c (tile_regsets): Likewise.
4915 * linux-x86-low.c (x86_regsets): Likewise.
4916 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4917
4918 2015-10-26 Doug Evans <dje@google.com>
4919
4920 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4921
4922 2015-10-26 Doug Evans <dje@google.com>
4923
4924 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4925
4926 2015-10-26 Doug Evans <dje@google.com>
4927
4928 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4929 for debug_printf.
4930 (attach_thread, find_new_threads_callback): Ditto.
4931
4932 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4933
4934 * mem-break.h (set_breakpoint_data): Remove.
4935
4936 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4937
4938 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4939 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4940 (initialize_low): Remove set_breakpoint_data call.
4941 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4942 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4943 (initialize_low): Remove set_breakpoint_data call.
4944 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4945 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4946 (initialize_low): Remove set_breakpoint_data call.
4947
4948 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4949
4950 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4951 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4952 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4953 * target.h (target_breakpoint_kind_from_pc): New macro.
4954
4955 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4956
4957 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4958 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4959 the default breakpoint kind.
4960
4961 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4962
4963 * linux-arm-low.c (arm_supports_z_point_type): Add software
4964 breakpoint support.
4965
4966 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4967
4968 * linux-arm-low.c: Refactor breakpoint definitions.
4969 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4970 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4971
4972 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4973
4974 * Makefile.in: Add arm.c/o.
4975 * configure.srv: Likewise.
4976 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4977 (arm_breakpoint_kind_from_pc): New function.
4978 (arm_sw_breakpoint_from_kind): Return proper kind.
4979 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4980
4981 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4982
4983 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4984 removal.
4985 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4986 (struct raw_breakpoint) <size>: Remove.
4987 (struct raw_breakpoint) <kind>: Add.
4988 (bp_size): New function.
4989 (bp_opcode): Likewise.
4990 (find_raw_breakpoint_at): Adjust for kind.
4991 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4992 (remove_memory_breakpoint): Adjust for kind call bp_size.
4993 (set_raw_breakpoint_at): Adjust for kind.
4994 (set_breakpoint): Likewise.
4995 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4996 (delete_raw_breakpoint): Adjust for kind.
4997 (delete_breakpoint): Likewise.
4998 (find_gdb_breakpoint): Likewise.
4999 (set_gdb_breakpoint_1): Likewise.
5000 (set_gdb_breakpoint): Likewise.
5001 (delete_gdb_breakpoint_1): Likewise.
5002 (delete_gdb_breakpoint): Likewise.
5003 (uninsert_raw_breakpoint): Likewise.
5004 (reinsert_raw_breakpoint): Likewise.
5005 (set_breakpoint_data): Remove.
5006 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5007 (check_mem_read): Adjust for kind call bp_size.
5008 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5009 (clone_one_breakpoint): Adjust for kind.
5010 * mem-break.h (set_gdb_breakpoint): Likewise.
5011 (delete_gdb_breakpoint): Likewise.
5012 * server.c (process_serial_event): Likewise.
5013
5014 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5015
5016 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5017 (struct linux_target_ops) <breakpoint>: Remove.
5018 (struct linux_target_ops) <breakpoint_len>: Remove.
5019 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5020 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5021 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5022 (arm_sw_breakpoint_from_kind): New function.
5023 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5024 (struct linux_target_ops) <breakpoint>: Remove.
5025 (struct linux_target_ops) <breakpoint_len>: Remove.
5026 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5027 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5028 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5029 (struct linux_target_ops) <breakpoint>: Remove.
5030 (struct linux_target_ops) <breakpoint_len>: Remove.
5031 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5032 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5033 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5034 (struct linux_target_ops) <breakpoint>: Remove.
5035 (struct linux_target_ops) <breakpoint_len>: Remove.
5036 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5037 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5038 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5039 and sw_breakpoint_from_kind to increment the pc.
5040 (linux_breakpoint_kind_from_pc): New function.
5041 (linux_sw_breakpoint_from_kind): New function.
5042 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5043 (initialize_low): Call breakpoint_kind_from_pc and
5044 sw_breakpoint_from_kind to replace breakpoint_data/len.
5045 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5046 New field.
5047 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5048 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5049 (struct linux_target_ops) <breakpoint>: Remove.
5050 (struct linux_target_ops) <breakpoint_len>: Remove.
5051 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5052 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5053 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5054 (struct linux_target_ops) <breakpoint>: Remove.
5055 (struct linux_target_ops) <breakpoint_len>: Remove.
5056 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5057 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5058 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5059 (struct linux_target_ops) <breakpoint>: Remove.
5060 (struct linux_target_ops) <breakpoint_len>: Remove.
5061 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5062 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5063 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5064 (struct linux_target_ops) <breakpoint>: Remove.
5065 (struct linux_target_ops) <breakpoint_len>: Remove.
5066 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5067 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5068 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5069 (struct linux_target_ops) <breakpoint>: Remove.
5070 (struct linux_target_ops) <breakpoint_len>: Remove.
5071 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5072 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5073 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5074 (struct linux_target_ops) <breakpoint>: Remove.
5075 (struct linux_target_ops) <breakpoint_len>: Remove.
5076 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5077 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5078 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5079 (struct linux_target_ops) <breakpoint>: Remove.
5080 (struct linux_target_ops) <breakpoint_len>: Remove.
5081 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5082 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5083 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5084 (struct linux_target_ops) <breakpoint>: Remove.
5085 (struct linux_target_ops) <breakpoint_len>: Remove.
5086 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5087 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5088 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5089 (struct linux_target_ops) <breakpoint>: Remove.
5090 (struct linux_target_ops) <breakpoint_len>: Remove.
5091 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5092 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5093 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5094 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5095 (struct linux_target_ops) <breakpoint>: Remove.
5096 (struct linux_target_ops) <breakpoint_len>: Remove.
5097 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5098 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5099 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5100 (struct linux_target_ops) <breakpoint>: Remove.
5101 (struct linux_target_ops) <breakpoint_len>: Remove.
5102 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5103 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5104
5105 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5106
5107 * linux-cris-low.c (cris_get_pc): Remove void arg.
5108
5109 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5110
5111 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5112 variable name.
5113
5114 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5115
5116 * inferiors.c (thread_pid_matches_callback): New function.
5117 (find_thread_process): New function.
5118 (remove_thread): Reset current_thread.
5119 (remove_process): Assert threads have been removed first.
5120
5121 2015-10-15 Yao Qi <yao.qi@linaro.org>
5122
5123 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5124 if it is 3.
5125 (aarch64_remove_point): Likewise.
5126 * regcache.c (regcache_register_size): New function.
5127
5128 2015-10-12 Yao Qi <yao.qi@linaro.org>
5129
5130 * linux-aarch64-low.c: Update all callers as emit_load_store
5131 is renamed to aarch64_emit_load_store.
5132
5133 2015-10-12 Yao Qi <yao.qi@linaro.org>
5134
5135 * linux-aarch64-low.c: Update all callers of function renaming
5136 from emit_insn to aarch64_emit_insn.
5137
5138 2015-10-12 Yao Qi <yao.qi@linaro.org>
5139
5140 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5141 arch/aarch64-insn.h.
5142 (struct aarch64_memory_operand): Likewise.
5143 (ENCODE): Likewise.
5144 (emit_insn): Move to arch/aarch64-insn.c.
5145 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5146 (emit_load_store): Move to arch/aarch64-insn.c.
5147 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5148 (can_encode_int32): Remove.
5149
5150 2015-10-12 Yao Qi <yao.qi@linaro.org>
5151
5152 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5153 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5154 (aarch64_relocate_instruction): Likewise.
5155 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5156 (struct aarch64_insn_visitor): Likewise.
5157
5158 2015-10-12 Yao Qi <yao.qi@linaro.org>
5159
5160 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5161 (struct aarch64_insn_visitor): New.
5162 (struct aarch64_insn_relocation_data): New.
5163 (aarch64_ftrace_insn_reloc_b): New function.
5164 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5165 (aarch64_ftrace_insn_reloc_cb): Likewise.
5166 (aarch64_ftrace_insn_reloc_tb): Likewise.
5167 (aarch64_ftrace_insn_reloc_adr): Likewise.
5168 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5169 (aarch64_ftrace_insn_reloc_others): Likewise.
5170 (visitor): New.
5171 (aarch64_relocate_instruction): Use visitor.
5172
5173 2015-10-12 Yao Qi <yao.qi@linaro.org>
5174
5175 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5176 int. Add argument buf.
5177 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5178 aarch64_relocate_instruction.
5179
5180 2015-10-12 Yao Qi <yao.qi@linaro.org>
5181
5182 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5183 argument insn. Remove local variable insn. Don't call
5184 target_read_uint32.
5185 (aarch64_install_fast_tracepoint_jump_pad): Call
5186 target_read_uint32.
5187
5188 2015-09-30 Yao Qi <yao.qi@linaro.org>
5189
5190 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5191 (emit_load_store_pair): Likewise.
5192
5193 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5194
5195 * dll.c (match_dll): Add cast(s).
5196 (unloaded_dll): Likewise.
5197 * linux-low.c (second_thread_of_pid_p): Likewise.
5198 (delete_lwp_callback): Likewise.
5199 (count_events_callback): Likewise.
5200 (select_event_lwp_callback): Likewise.
5201 (linux_set_resume_request): Likewise.
5202 * server.c (accumulate_file_name_length): Likewise.
5203 (emit_dll_description): Likewise.
5204 (handle_qxfer_threads_worker): Likewise.
5205 (visit_actioned_threads): Likewise.
5206 * thread-db.c (any_thread_of): Likewise.
5207 * tracepoint.c (same_process_p): Likewise.
5208 (match_blocktype): Likewise.
5209 (build_traceframe_info_xml): Likewise.
5210
5211 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5212
5213 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5214 assignment.
5215 (gdb_unparse_agent_expr): Likewise.
5216 * hostio.c (require_data): Likewise.
5217 (handle_pread): Likewise.
5218 * linux-low.c (disable_regset): Likewise.
5219 (fetch_register): Likewise.
5220 (store_register): Likewise.
5221 (get_dynamic): Likewise.
5222 (linux_qxfer_libraries_svr4): Likewise.
5223 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5224 (set_fast_tracepoint_jump): Likewise.
5225 (uninsert_fast_tracepoint_jumps_at): Likewise.
5226 (reinsert_fast_tracepoint_jumps_at): Likewise.
5227 (validate_inserted_breakpoint): Likewise.
5228 (clone_agent_expr): Likewise.
5229 * regcache.c (init_register_cache): Likewise.
5230 * remote-utils.c (putpkt_binary_1): Likewise.
5231 (decode_M_packet): Likewise.
5232 (decode_X_packet): Likewise.
5233 (look_up_one_symbol): Likewise.
5234 (relocate_instruction): Likewise.
5235 (monitor_output): Likewise.
5236 * server.c (handle_search_memory): Likewise.
5237 (handle_qxfer_exec_file): Likewise.
5238 (handle_qxfer_libraries): Likewise.
5239 (handle_qxfer): Likewise.
5240 (handle_query): Likewise.
5241 (handle_v_cont): Likewise.
5242 (handle_v_run): Likewise.
5243 (captured_main): Likewise.
5244 * target.c (write_inferior_memory): Likewise.
5245 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5246 * tracepoint.c (init_trace_buffer): Likewise.
5247 (add_tracepoint_action): Likewise.
5248 (add_traceframe): Likewise.
5249 (add_traceframe_block): Likewise.
5250 (cmd_qtdpsrc): Likewise.
5251 (cmd_qtdv): Likewise.
5252 (cmd_qtstatus): Likewise.
5253 (response_source): Likewise.
5254 (response_tsv): Likewise.
5255 (cmd_qtnotes): Likewise.
5256 (gdb_collect): Likewise.
5257 (initialize_tracepoint): Likewise.
5258
5259 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5260
5261 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5262 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5263 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5264 <NOP>: New.
5265 (enum aarch64_condition_codes): New enum.
5266 (w0): New static global.
5267 (fp): Likewise.
5268 (lr): Likewise.
5269 (struct aarch64_memory_operand) <type>: New
5270 MEMORY_OPERAND_POSTINDEX type.
5271 (postindex_memory_operand): New helper function.
5272 (emit_ret): New function.
5273 (emit_load_store_pair): New function, factored out of emit_stp
5274 with support for MEMORY_OPERAND_POSTINDEX.
5275 (emit_stp): Rewrite using emit_load_store_pair.
5276 (emit_ldp): New function.
5277 (emit_load_store): Likewise.
5278 (emit_ldr): Mention post-index instruction in comment.
5279 (emit_ldrh): New function.
5280 (emit_ldrb): New function.
5281 (emit_ldrsw): Mention post-index instruction in comment.
5282 (emit_str): Likewise.
5283 (emit_subs): New function.
5284 (emit_cmp): Likewise.
5285 (emit_and): Likewise.
5286 (emit_orr): Likewise.
5287 (emit_orn): Likewise.
5288 (emit_eor): Likewise.
5289 (emit_mvn): Likewise.
5290 (emit_lslv): Likewise.
5291 (emit_lsrv): Likewise.
5292 (emit_asrv): Likewise.
5293 (emit_mul): Likewise.
5294 (emit_sbfm): Likewise.
5295 (emit_sbfx): Likewise.
5296 (emit_ubfm): Likewise.
5297 (emit_ubfx): Likewise.
5298 (emit_csinc): Likewise.
5299 (emit_cset): Likewise.
5300 (emit_nop): Likewise.
5301 (emit_ops_insns): New helper function.
5302 (emit_pop): Likewise.
5303 (emit_push): Likewise.
5304 (aarch64_emit_prologue): New function.
5305 (aarch64_emit_epilogue): Likewise.
5306 (aarch64_emit_add): Likewise.
5307 (aarch64_emit_sub): Likewise.
5308 (aarch64_emit_mul): Likewise.
5309 (aarch64_emit_lsh): Likewise.
5310 (aarch64_emit_rsh_signed): Likewise.
5311 (aarch64_emit_rsh_unsigned): Likewise.
5312 (aarch64_emit_ext): Likewise.
5313 (aarch64_emit_log_not): Likewise.
5314 (aarch64_emit_bit_and): Likewise.
5315 (aarch64_emit_bit_or): Likewise.
5316 (aarch64_emit_bit_xor): Likewise.
5317 (aarch64_emit_bit_not): Likewise.
5318 (aarch64_emit_equal): Likewise.
5319 (aarch64_emit_less_signed): Likewise.
5320 (aarch64_emit_less_unsigned): Likewise.
5321 (aarch64_emit_ref): Likewise.
5322 (aarch64_emit_if_goto): Likewise.
5323 (aarch64_emit_goto): Likewise.
5324 (aarch64_write_goto_address): Likewise.
5325 (aarch64_emit_const): Likewise.
5326 (aarch64_emit_call): Likewise.
5327 (aarch64_emit_reg): Likewise.
5328 (aarch64_emit_pop): Likewise.
5329 (aarch64_emit_stack_flush): Likewise.
5330 (aarch64_emit_zero_ext): Likewise.
5331 (aarch64_emit_swap): Likewise.
5332 (aarch64_emit_stack_adjust): Likewise.
5333 (aarch64_emit_int_call_1): Likewise.
5334 (aarch64_emit_void_call_2): Likewise.
5335 (aarch64_emit_eq_goto): Likewise.
5336 (aarch64_emit_ne_goto): Likewise.
5337 (aarch64_emit_lt_goto): Likewise.
5338 (aarch64_emit_le_goto): Likewise.
5339 (aarch64_emit_gt_goto): Likewise.
5340 (aarch64_emit_ge_got): Likewise.
5341 (aarch64_emit_ops_impl): New static global variable.
5342 (aarch64_emit_ops): New target function, return
5343 &aarch64_emit_ops_impl.
5344 (struct linux_target_ops): Install it.
5345
5346 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5347
5348 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5349 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5350 aarch64-ipa.o.
5351 * linux-aarch64-ipa.c: New file.
5352 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5353 and endian.h.
5354 (aarch64_get_thread_area): New target method.
5355 (extract_signed_bitfield): New helper function.
5356 (aarch64_decode_ldr_literal): New function.
5357 (enum aarch64_opcodes): New enum.
5358 (struct aarch64_register): New struct.
5359 (struct aarch64_operand): New struct.
5360 (x0): New static global.
5361 (x1): Likewise.
5362 (x2): Likewise.
5363 (x3): Likewise.
5364 (x4): Likewise.
5365 (w2): Likewise.
5366 (ip0): Likewise.
5367 (sp): Likewise.
5368 (xzr): Likewise.
5369 (aarch64_register): New helper function.
5370 (register_operand): Likewise.
5371 (immediate_operand): Likewise.
5372 (struct aarch64_memory_operand): New struct.
5373 (offset_memory_operand): New helper function.
5374 (preindex_memory_operand): Likewise.
5375 (enum aarch64_system_control_registers): New enum.
5376 (ENCODE): New macro.
5377 (emit_insn): New helper function.
5378 (emit_b): New function.
5379 (emit_bcond): Likewise.
5380 (emit_cb): Likewise.
5381 (emit_tb): Likewise.
5382 (emit_blr): Likewise.
5383 (emit_stp): Likewise.
5384 (emit_ldp_q_offset): Likewise.
5385 (emit_stp_q_offset): Likewise.
5386 (emit_load_store): Likewise.
5387 (emit_ldr): Likewise.
5388 (emit_ldrsw): Likewise.
5389 (emit_str): Likewise.
5390 (emit_ldaxr): Likewise.
5391 (emit_stxr): Likewise.
5392 (emit_stlr): Likewise.
5393 (emit_data_processing_reg): Likewise.
5394 (emit_data_processing): Likewise.
5395 (emit_add): Likewise.
5396 (emit_sub): Likewise.
5397 (emit_mov): Likewise.
5398 (emit_movk): Likewise.
5399 (emit_mov_addr): Likewise.
5400 (emit_mrs): Likewise.
5401 (emit_msr): Likewise.
5402 (emit_sevl): Likewise.
5403 (emit_wfe): Likewise.
5404 (append_insns): Likewise.
5405 (can_encode_int32_in): New helper function.
5406 (aarch64_relocate_instruction): New function.
5407 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5408 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5409 (struct linux_target_ops): Install aarch64_get_thread_area,
5410 aarch64_install_fast_tracepoint_jump_pad and
5411 aarch64_get_min_fast_tracepoint_insn_len.
5412
5413 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5414
5415 * Makefile.in (aarch64-insn.o): New rule.
5416 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5417
5418 2015-09-21 Yao Qi <yao.qi@linaro.org>
5419
5420 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5421
5422 2015-09-21 Yao Qi <yao.qi@linaro.org>
5423
5424 * tracepoint.c (max_jump_pad_size): Remove.
5425
5426 2015-09-18 Yao Qi <yao.qi@linaro.org>
5427
5428 * linux-aarch64-low.c: Don't include sys/uio.h.
5429 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5430
5431 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5432
5433 * tracepoint.c (eval_result_type): Change prototype.
5434 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5435
5436 2015-09-15 Pedro Alves <palves@redhat.com>
5437
5438 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5439 Check whether to report exec events instead of checking whether
5440 multiprocess is enabled.
5441
5442 2015-09-15 Pedro Alves <palves@redhat.com>
5443
5444 PR remote/18965
5445 * remote-utils.c (prepare_resume_reply): Merge
5446 TARGET_WAITKIND_VFORK_DONE switch case with the
5447 TARGET_WAITKIND_FORKED case.
5448
5449 2015-09-15 Yao Qi <yao.qi@linaro.org>
5450
5451 * server.c (handle_query): Check string comparison using
5452 "else if" instead of "if".
5453
5454 2015-09-15 Yao Qi <yao.qi@linaro.org>
5455
5456 * server.c (vCont_supported): New global variable.
5457 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5458 matches. Append ";vContSupported+" to own_buf.
5459 (handle_v_requests): Append ";s;S" to own_buf if target supports
5460 hardware single step or vCont_supported is false.
5461 (capture_main): Set vCont_supported to zero.
5462
5463 2015-09-15 Yao Qi <yao.qi@linaro.org>
5464
5465 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5466 it to ...
5467 (linux_supports_hardware_single_step): ... New function.
5468 (linux_target_ops): Update.
5469 * lynx-low.c (lynx_target_ops): Set field
5470 supports_hardware_single_step to target_can_do_hardware_single_step.
5471 * nto-low.c (nto_target_ops): Likewise.
5472 * spu-low.c (spu_target_ops): Likewise.
5473 * win32-low.c (win32_target_ops): Likewise.
5474 * target.c (target_can_do_hardware_single_step): New function.
5475 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5476 Remove. <supports_hardware_single_step>: New field.
5477 (target_supports_conditional_breakpoints): Remove.
5478 (target_supports_hardware_single_step): New macro.
5479 (target_can_do_hardware_single_step): Declare.
5480 * server.c (handle_query): Use target_supports_hardware_single_step
5481 instead of target_supports_conditional_breakpoints.
5482
5483 2015-09-15 Yao Qi <yao.qi@linaro.org>
5484
5485 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5486 function.
5487 (struct linux_target_ops the_low_target): Install
5488 aarch64_linux_siginfo_fixup.
5489
5490 2015-09-11 Don Breazeal <donb@codesourcery.com>
5491 Luis Machado <lgustavo@codesourcery.com>
5492
5493 * linux-low.c (linux_mourn): Static declaration.
5494 (linux_arch_setup): Move in front of
5495 handle_extended_wait.
5496 (linux_arch_setup_thread): New function.
5497 (handle_extended_wait): Handle exec events. Call
5498 linux_arch_setup_thread. Make event_lwp argument a
5499 pointer-to-a-pointer.
5500 (check_zombie_leaders): Do not check stopped threads.
5501 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5502 (linux_low_filter_event): Add lwp and thread for exec'ing
5503 non-leader thread if leader thread has been deleted.
5504 Refactor code into linux_arch_setup_thread and call it.
5505 Pass child lwp pointer by reference to handle_extended_wait.
5506 (linux_wait_for_event_filtered): Update comment.
5507 (linux_wait_1): Prevent clobbering exec event status.
5508 (linux_supports_exec_events): New function.
5509 (linux_target_ops) <supports_exec_events>: Initialize new member.
5510 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5511 new member.
5512 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5513 * server.c (report_exec_events): New global variable.
5514 (handle_query): Handle qSupported query for exec-events feature.
5515 (captured_main): Initialize report_exec_events.
5516 * server.h (report_exec_events): Declare new global variable.
5517 * target.h (struct target_ops) <supports_exec_events>: New
5518 member.
5519 (target_supports_exec_events): New macro.
5520 * win32-low.c (win32_target_ops) <supports_exec_events>:
5521 Initialize new member.
5522
5523 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5524
5525 * linux-low.c (linux_low_enable_btrace): Remove.
5526 (linux_target_ops): Replace linux_low_enable_btrace with
5527 linux_enable_btrace.
5528
5529 2015-09-03 Yao Qi <yao.qi@linaro.org>
5530
5531 * linux-aarch64-low.c (aarch64_insert_point): Call
5532 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5533 returns true.
5534
5535 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5536
5537 * linux-low.c (check_stopped_by_breakpoint): Use
5538 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5539
5540 2015-08-27 Pedro Alves <palves@redhat.com>
5541
5542 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5543
5544 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5545
5546 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5547 the XNEW-family equivalent.
5548 (compile_bytecodes): Likewise.
5549 * dll.c (loaded_dll): Likewise.
5550 * event-loop.c (append_callback_event): Likewise.
5551 (create_file_handler): Likewise.
5552 (create_file_event): Likewise.
5553 * hostio.c (handle_open): Likewise.
5554 * inferiors.c (add_thread): Likewise.
5555 (add_process): Likewise.
5556 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5557 * linux-arm-low.c (arm_new_process): Likewise.
5558 (arm_new_thread): Likewise.
5559 * linux-low.c (add_to_pid_list): Likewise.
5560 (linux_add_process): Likewise.
5561 (handle_extended_wait): Likewise.
5562 (add_lwp): Likewise.
5563 (enqueue_one_deferred_signal): Likewise.
5564 (enqueue_pending_signal): Likewise.
5565 (linux_resume_one_lwp_throw): Likewise.
5566 (linux_resume_one_thread): Likewise.
5567 (linux_read_memory): Likewise.
5568 (linux_write_memory): Likewise.
5569 * linux-mips-low.c (mips_linux_new_process): Likewise.
5570 (mips_linux_new_thread): Likewise.
5571 (mips_add_watchpoint): Likewise.
5572 * linux-x86-low.c (initialize_low_arch): Likewise.
5573 * lynx-low.c (lynx_add_process): Likewise.
5574 * mem-break.c (set_raw_breakpoint_at): Likewise.
5575 (set_breakpoint): Likewise.
5576 (add_condition_to_breakpoint): Likewise.
5577 (add_commands_to_breakpoint): Likewise.
5578 (clone_agent_expr): Likewise.
5579 (clone_one_breakpoint): Likewise.
5580 * regcache.c (new_register_cache): Likewise.
5581 * remote-utils.c (look_up_one_symbol): Likewise.
5582 * server.c (queue_stop_reply): Likewise.
5583 (start_inferior): Likewise.
5584 (queue_stop_reply_callback): Likewise.
5585 (handle_target_event): Likewise.
5586 * spu-low.c (fetch_ppc_memory): Likewise.
5587 (store_ppc_memory): Likewise.
5588 * target.c (set_target_ops): Likewise.
5589 * thread-db.c (thread_db_load_search): Likewise.
5590 (try_thread_db_load_1): Likewise.
5591 * tracepoint.c (add_tracepoint): Likewise.
5592 (add_tracepoint_action): Likewise.
5593 (create_trace_state_variable): Likewise.
5594 (cmd_qtdpsrc): Likewise.
5595 (cmd_qtro): Likewise.
5596 (add_while_stepping_state): Likewise.
5597 * win32-low.c (child_add_thread): Likewise.
5598 (get_image_name): Likewise.
5599
5600 2015-08-25 Yao Qi <yao.qi@linaro.org>
5601
5602 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5603
5604 2015-08-25 Yao Qi <yao.qi@linaro.org>
5605
5606 * Makefile.in (aarch64-linux.o): New rule.
5607 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5608 srv_tgtobj.
5609 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5610 (aarch64_init_debug_reg_state): Make it extern.
5611 (aarch64_linux_prepare_to_resume): Remove.
5612
5613 2015-08-25 Yao Qi <yao.qi@linaro.org>
5614
5615 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5616 lwp_arch_private_info and ptid_of_lwp.
5617
5618 2015-08-25 Yao Qi <yao.qi@linaro.org>
5619
5620 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5621 Find proc_info by find_process_pid. All callers updated.
5622
5623 2015-08-25 Yao Qi <yao.qi@linaro.org>
5624
5625 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5626 Remove.
5627 (debug_reg_change_callback): Remove.
5628 (aarch64_notify_debug_reg_change): Remove.
5629
5630 2015-08-25 Yao Qi <yao.qi@linaro.org>
5631
5632 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5633 Call current_lwp_ptid.
5634
5635 2015-08-25 Yao Qi <yao.qi@linaro.org>
5636
5637 * linux-aarch64-low.c (debug_reg_change_callback): Use
5638 debug_printf.
5639
5640 2015-08-25 Yao Qi <yao.qi@linaro.org>
5641
5642 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5643
5644 2015-08-25 Yao Qi <yao.qi@linaro.org>
5645
5646 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5647
5648 2015-08-25 Yao Qi <yao.qi@linaro.org>
5649
5650 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5651 the code.
5652
5653 2015-08-25 Yao Qi <yao.qi@linaro.org>
5654
5655 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5656 Remove.
5657 (debug_reg_change_callback): Remove argument entry and add argument
5658 lwp. Remove local variable thread. Don't print thread id in the
5659 debugging output. Don't check whether pid of thread equals to pid.
5660 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5661 iterate_over_lwps instead find_inferior.
5662
5663 2015-08-24 Pedro Alves <palves@redhat.com>
5664
5665 * inferiors.c (get_first_process): New function.
5666 * inferiors.h (get_first_process): New declaration.
5667 * remote-utils.c (read_ptid): Default to the first process in the
5668 list, instead of to the current thread's process.
5669
5670 2015-08-24 Pedro Alves <palves@redhat.com>
5671
5672 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5673 * event-loop.c: Likewise.
5674 * remote-utils.c: Likewise.
5675 * tracepoint.c: Likewise.
5676
5677 2015-08-24 Pedro Alves <palves@redhat.com>
5678
5679 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5680 ptid_get_lwp.
5681
5682 2015-08-21 Pedro Alves <palves@redhat.com>
5683
5684 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5685 instead of literal 1.
5686
5687 2015-08-21 Pedro Alves <palves@redhat.com>
5688
5689 * tdesc.c (default_description): Explicitly zero-initialize.
5690
5691 2015-08-21 Pedro Alves <palves@redhat.com>
5692
5693 PR gdb/18749
5694 * inferiors.c (remove_thread): Discard any pending stop reply for
5695 this thread.
5696 * server.c (remove_all_on_match_pid): Rename to ...
5697 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5698 instead of a pid.
5699 (discard_queued_stop_replies): Change parameter to a ptid. Now
5700 extern.
5701 (handle_v_kill, kill_inferior_callback, captured_main)
5702 (process_serial_event): Adjust.
5703 * server.h (discard_queued_stop_replies): Declare.
5704
5705 2015-08-21 Pedro Alves <palves@redhat.com>
5706
5707 * linux-low.c (wait_for_sigstop): Always switch to no thread
5708 selected if the previously current thread dies.
5709 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5710 process instead of the current thread's.
5711 * remote-utils.c (input_interrupt): Don't check if there's no
5712 current thread.
5713 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5714 current thread to the general thread fails, error out.
5715 (handle_qxfer_auxv, handle_qxfer_libraries)
5716 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5717 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5718 (handle_query): Check if there's a thread selected instead of
5719 checking whether there's any thread in the thread list.
5720 (handle_qxfer_threads, handle_qxfer_btrace)
5721 (handle_qxfer_btrace_conf): Don't error out early if there's no
5722 thread in the thread list.
5723 (handle_v_cont, myresume): Don't set the current thread to the
5724 continue thread.
5725 (process_serial_event) <Hg handling>: Also set thread_id if the
5726 previous general thread is still alive.
5727 (process_serial_event) <g/G handling>: If setting the current
5728 thread to the general thread fails, error out.
5729 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5730 thread's lwp instead of the current thread's.
5731 * target.c (set_desired_thread): If the desired thread was not
5732 found, leave the current thread pointing to NULL. Return an int
5733 (boolean) indicating success.
5734 * target.h (set_desired_thread): Change return type to int.
5735
5736 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5737
5738 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5739 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5740 #includes.
5741 (ps_get_thread_area): New function.
5742
5743 2015-08-19 Gary Benson <gbenson@redhat.com>
5744
5745 * hostio.c (handle_pread): Do not attempt to read more data
5746 than hostio_reply_with_data can fit in a packet.
5747
5748 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5749
5750 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5751
5752 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5753
5754 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5755
5756 2015-08-06 Pedro Alves <palves@redhat.com>
5757
5758 * tracepoint.c (expr_eval_result): Now an int.
5759
5760 2015-08-06 Pedro Alves <palves@redhat.com>
5761
5762 * gdbthread.h (struct regcache): Forward declare.
5763 (struct thread_info) <regcache_data>: Now a struct regcache
5764 pointer.
5765 * inferiors.c (inferior_regcache_data)
5766 (set_inferior_regcache_data): Now work with struct regcache
5767 pointers.
5768 * inferiors.h (struct regcache): Forward declare.
5769 (inferior_regcache_data, set_inferior_regcache_data): Now work
5770 with struct regcache pointers.
5771 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5772 (free_register_cache_thread): Remove struct regcache pointer
5773 casts.
5774
5775 2015-08-06 Pedro Alves <palves@redhat.com>
5776
5777 * server.c (captured_main): On error, print the exception message
5778 to stderr, and if run_once is set, throw a quit.
5779
5780 2015-08-06 Pedro Alves <palves@redhat.com>
5781
5782 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5783 the current thread.
5784
5785 2015-08-06 Pedro Alves <palves@redhat.com>
5786
5787 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5788 reading beyond the passed in buffer length.
5789
5790 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5791
5792 * tracepoint.c (symbol_list) <required>: Remove.
5793
5794 2015-08-06 Pedro Alves <palves@redhat.com>
5795
5796 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5797 count if stopping and suspending threads.
5798 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5799 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5800 (linux_detach): Complete an ongoing step-over.
5801 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5802 throughout.
5803 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5804 (linux_wait_1): If passing a signal to the inferior after
5805 finishing a step-over, unsuspend and re-resume all lwps. If we
5806 see a single-step event but the thread should be continuing, don't
5807 pass the trap to gdb.
5808 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5809 internal_error instead of gdb_assert.
5810 (enqueue_pending_signal): New function.
5811 (check_ptrace_stopped_lwp_gone): Add debug output.
5812 (start_step_over): Use internal_error instead of gdb_assert.
5813 (complete_ongoing_step_over): New function.
5814 (linux_resume_one_thread): Don't resume a suspended thread.
5815 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5816 it stepping.
5817
5818 2015-08-06 Pedro Alves <palves@redhat.com>
5819
5820 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5821 (linux_thread_alive): Use lwp_is_marked_dead.
5822 (extended_event_reported): Delete.
5823 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5824 instead of extended_event_reported.
5825 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5826 as well.
5827 (lwp_is_marked_dead): New function.
5828 (lwp_running): Use lwp_is_marked_dead.
5829 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5830 comment.
5831
5832 2015-08-06 Pedro Alves <palves@redhat.com>
5833
5834 * linux-low.c (linux_wait_1): Move fork event output out of the
5835 !report_to_gdb check. Pass event_child->waitstatus to
5836 target_waitstatus_to_string instead of ourstatus.
5837
5838 2015-08-04 Yao Qi <yao.qi@linaro.org>
5839
5840 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5841 if current_thread is 32 bit.
5842
5843 2015-08-04 Yao Qi <yao.qi@linaro.org>
5844
5845 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5846 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5847 * server.c (extended_protocol): Remove "static".
5848 * server.h (extended_protocol): Declare it.
5849
5850 2015-08-04 Yao Qi <yao.qi@linaro.org>
5851
5852 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5853 both aarch64 and aarch32.
5854 (aarch64_set_pc): Likewise.
5855
5856 2015-08-04 Yao Qi <yao.qi@linaro.org>
5857
5858 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5859 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5860 arm-with-neon.xml to srv_xmlfiles.
5861 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5862 (is_64bit_tdesc): New function.
5863 (aarch64_linux_read_description): New function.
5864 (aarch64_arch_setup): Call aarch64_linux_read_description.
5865 (regs_info): Rename to regs_info_aarch64.
5866 (aarch64_regs_info): Return right regs_info.
5867 (initialize_low_arch): Call initialize_low_arch_aarch32.
5868
5869 2015-08-04 Yao Qi <yao.qi@linaro.org>
5870
5871 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5872 * linux-aarch32-low.c: New file.
5873 * linux-aarch32-low.h: New file.
5874 * linux-arm-low.c (arm_fill_gregset): Move it to
5875 linux-aarch32-low.c.
5876 (arm_store_gregset): Likewise.
5877 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5878 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5879 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5880 (regs_info): Rename to regs_info_arm.
5881 (arm_regs_info): Return regs_info_aarch32 if
5882 have_ptrace_getregset is 1 and target description is
5883 arm_with_neon or arm_with_vfpv3.
5884 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5885 Call initialize_low_arch_aarch32 instead.
5886
5887 2015-08-04 Yao Qi <yao.qi@linaro.org>
5888
5889 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5890 * linux-low.c: ... here.
5891 * linux-low.h (have_ptrace_getregset): Declare it.
5892
5893 2015-08-04 Pedro Alves <palves@redhat.com>
5894
5895 * thread-db.c (struct thread_db): Use new typedefs.
5896 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5897 CHK calls.
5898 (disable_thread_event_reporting): Cast result of dlsym to
5899 destination function pointer type.
5900 (thread_db_mourn): Use td_ta_delete_ftype.
5901
5902 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5903
5904 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5905 arch variant.
5906 (CDX_BREAKPOINT): Define for R2.
5907 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5908 (the_low_target): Add comments.
5909
5910 2015-07-30 Yao Qi <yao.qi@linaro.org>
5911
5912 * linux-arm-low.c (arm_hwcap): Remove it.
5913 (arm_read_description): New local variable arm_hwcap. Don't
5914 set arm_hwcap to zero.
5915
5916 2015-07-30 Yao Qi <yao.qi@linaro.org>
5917
5918 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5919 Use regcache->tdesc instead.
5920 (arm_store_wmmxregset): Likewise.
5921 (arm_fill_vfpregset): Likewise.
5922 (arm_store_vfpregset): Likewise.
5923
5924 2015-07-30 Yao Qi <yao.qi@linaro.org>
5925
5926 * linux-arm-low.c: Include arch/arm.h.
5927 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5928 (arm_store_gregset): Likewise.
5929
5930 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5931
5932 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5933 ptrace's 4th parameter.
5934
5935 2015-07-27 Yao Qi <yao.qi@linaro.org>
5936
5937 * configure.srv (case aarch64*-*-linux*): Don't set
5938 srv_linux_usrregs.
5939
5940 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5941
5942 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5943 sys/ptrace.h.
5944 * linux-arm-low.c: Likewise.
5945 * linux-cris-low.c: Likewise.
5946 * linux-crisv32-low.c: Likewise.
5947 * linux-low.c: Likewise.
5948 * linux-m68k-low.c: Likewise.
5949 * linux-mips-low.c: Likewise.
5950 * linux-nios2-low.c: Likewise.
5951 * linux-s390-low.c: Likewise.
5952 * linux-sparc-low.c: Likewise.
5953 * linux-tic6x-low.c: Likewise.
5954 * linux-tile-low.c: Likewise.
5955 * linux-x86-low.c: Likewise.
5956
5957 2015-07-24 Pedro Alves <palves@redhat.com>
5958
5959 * config.in: Regenerate.
5960 * configure: Regenerate.
5961
5962 2015-07-24 Pedro Alves <palves@redhat.com>
5963
5964 * acinclude.m4: Include ../ptrace.m4.
5965 * configure.ac: Call GDB_AC_PTRACE.
5966 * config.in, configure: Regenerate.
5967
5968 2015-07-24 Yao Qi <yao.qi@linaro.org>
5969
5970 * linux-low.c (linux_create_inferior): Remove setting to
5971 proc->priv->new_inferior.
5972 (linux_attach): Likewise.
5973 (linux_low_filter_event): Likewise.
5974 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5975
5976 2015-07-24 Yao Qi <yao.qi@linaro.org>
5977
5978 * linux-low.c (linux_arch_setup): New function.
5979 (linux_low_filter_event): If proc->tdesc is NULL and
5980 proc->attached is true, call the_low_target.arch_setup.
5981 Otherwise, keep status pending, and return.
5982 (linux_resume_one_lwp_throw): Don't call get_pc if
5983 thread->while_stepping isn't NULL. Don't call
5984 get_thread_regcache if proc->tdesc is NULL.
5985 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5986 (linux_target_ops): Install arch_setup.
5987 * server.c (start_inferior): Call the_target->arch_setup.
5988 * target.h (struct target_ops) <arch_setup>: New field.
5989 (target_arch_setup): New marco.
5990 * lynx-low.c (lynx_target_ops): Update.
5991 * nto-low.c (nto_target_ops): Update.
5992 * spu-low.c (spu_target_ops): Update.
5993 * win32-low.c (win32_target_ops): Update.
5994
5995 2015-07-24 Yao Qi <yao.qi@linaro.org>
5996
5997 * linux-low.c (linux_add_process): Don't set
5998 proc->priv->new_inferior.
5999 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6000 (linux_attach): Likewise.
6001
6002 2015-07-24 Yao Qi <yao.qi@linaro.org>
6003
6004 * server.c (start_inferior): Code refactor.
6005
6006 2015-07-24 Yao Qi <yao.qi@linaro.org>
6007
6008 * server.c (process_serial_event): Set general_thread.
6009
6010 2015-07-21 Yao Qi <yao.qi@linaro.org>
6011
6012 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6013 aarch64_linux_get_debug_reg_capacity.
6014
6015 2015-07-17 Yao Qi <yao.qi@linaro.org>
6016
6017 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6018 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6019 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6020 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6021 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6022 (AARCH64_HWP_ALIGNMENT): Likewise.
6023 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6024 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6025 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6026 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6027 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6028 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6029 (struct aarch64_debug_reg_state): Likewise.
6030 (struct arch_lwp_info): Likewise.
6031 (aarch64_align_watchpoint): Likewise.
6032 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6033 (aarch64_watchpoint_length): Likewise.
6034 (aarch64_point_encode_ctrl_reg): Likewise
6035 (aarch64_point_is_aligned): Likewise.
6036 (aarch64_align_watchpoint): Likewise.
6037 (aarch64_linux_set_debug_regs):
6038 (aarch64_dr_state_insert_one_point): Likewise.
6039 (aarch64_dr_state_remove_one_point): Likewise.
6040 (aarch64_handle_breakpoint): Likewise.
6041 (aarch64_handle_aligned_watchpoint): Likewise.
6042 (aarch64_handle_unaligned_watchpoint): Likewise.
6043 (aarch64_handle_watchpoint): Likewise.
6044
6045 2015-07-17 Yao Qi <yao.qi@linaro.org>
6046
6047 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6048 and don't aarch64_get_debug_reg_state. All callers update.
6049 (aarch64_handle_aligned_watchpoint): Likewise.
6050 (aarch64_handle_unaligned_watchpoint): Likewise.
6051 (aarch64_handle_watchpoint): Likewise.
6052 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6053 (aarch64_remove_point): Likewise.
6054
6055 2015-07-17 Yao Qi <yao.qi@linaro.org>
6056
6057 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6058 debug_printf.
6059 (aarch64_handle_unaligned_watchpoint): Likewise.
6060
6061 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6062
6063 Revert the previous 3 commits:
6064 Move gdb_regex* to common/
6065 Move linux_find_memory_regions_full & co.
6066 gdbserver build-id attribute generator
6067
6068 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6069 Jan Kratochvil <jan.kratochvil@redhat.com>
6070
6071 gdbserver build-id attribute generator.
6072 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6073 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6074 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6075 (find_phdr): New.
6076 (get_dynamic): Use find_pdhr to traverse program headers.
6077 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6078 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6079 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6080 (get_hex_build_id): New.
6081 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6082 to reply XML document.
6083
6084 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6085 Jan Kratochvil <jan.kratochvil@redhat.com>
6086
6087 * target.c: Include target/target-utils.h and fcntl.h.
6088 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6089 (target_fileio_read_stralloc): New functions.
6090
6091 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6092
6093 * Makefile.in (OBS): Add gdb_regex.o.
6094 (gdb_regex.o): New.
6095 * config.in: Rebuilt.
6096 * configure: Rebuilt.
6097
6098 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6099 Jan Kratochvil <jan.kratochvil@redhat.com>
6100
6101 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6102 * Makefile.in (OBS): Add target-utils.o.
6103 (linux-maps.o, target-utils.o): New.
6104 * configure.srv (srv_linux_obj): Add linux-maps.o.
6105
6106 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6107
6108 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6109 function, return 1.
6110 (the_low_target): Install it.
6111
6112 2015-07-14 Pedro Alves <palves@redhat.com>
6113
6114 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6115 Instead, ignore ECHILD, and throw an error for other errnos.
6116
6117 2015-07-10 Pedro Alves <palves@redhat.com>
6118
6119 * event-loop.c (struct callback_event) <data>: Change type to
6120 gdb_client_data instance instead of gdb_client_data pointer.
6121 (append_callback_event): Adjust.
6122
6123 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6124
6125 * linux-aarch64-low.c: Add comments for each linux_target_ops
6126 method. Remove comments already covered in target_ops and
6127 linux_target_ops definitions.
6128 (the_low_target): Add comments for each unimplemented method.
6129
6130 2015-07-09 Yao Qi <yao.qi@linaro.org>
6131
6132 * linux-aarch64-low.c (aarch64_regmap): Remove.
6133 (aarch64_usrregs_info): Remove.
6134 (regs_info): Set field usrregs to NULL.
6135
6136 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6137
6138 * linux-low.c: Include "rsp-low.h"
6139 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6140 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6141 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6142 (handle_btrace_enable_pt): New.
6143 (handle_btrace_general_set): Support "pt".
6144 (handle_btrace_conf_general_set): Support "pt:size".
6145
6146 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6147
6148 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6149 Z_PACKET_SW_BP.
6150
6151 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6152
6153 * linux-aarch64-low.c: Remove comment about endianness.
6154 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6155 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6156 memcmp.
6157
6158 2015-06-24 Gary Benson <gbenson@redhat.com>
6159
6160 * linux-i386-ipa.c (stdint.h): Do not include.
6161 * lynx-i386-low.c (stdint.h): Likewise.
6162 * lynx-ppc-low.c (stdint.h): Likewise.
6163 * mem-break.c (stdint.h): Likewise.
6164 * thread-db.c (stdint.h): Likewise.
6165 * tracepoint.c (stdint.h): Likewise.
6166 * win32-low.c (stdint.h): Likewise.
6167
6168 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6169
6170 * server.c (write_qxfer_response): Update call to
6171 remote_escape_output.
6172
6173 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6174 Jan Kratochvil <jan.kratochvil@redhat.com>
6175
6176 Merge multiple hex conversions.
6177 * gdbreplay.c (tohex): Rename to 'fromhex'.
6178 (logchar): Use fromhex.
6179
6180 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6181
6182 * server.c (handle_qxfer_libraries): Set `version' attribute for
6183 <library-list>.
6184
6185 2015-06-10 Gary Benson <gbenson@redhat.com>
6186
6187 * target.h (struct target_ops) <multifs_open>: New field.
6188 <multifs_unlink>: Likewise.
6189 <multifs_readlink>: Likewise.
6190 * linux-low.c (nat/linux-namespaces.h): New include.
6191 (linux_target_ops): Initialize the_target->multifs_open,
6192 the_target->multifs_unlink and the_target->multifs_readlink.
6193 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6194 * hostio.c (hostio_fs_pid): New static variable.
6195 (hostio_handle_new_gdb_connection): New function.
6196 (handle_setfs): Likewise.
6197 (handle_open): Use the_target->multifs_open as appropriate.
6198 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6199 (handle_readlink): Use the_target->multifs_readlink as
6200 appropriate.
6201 (handle_vFile): Handle vFile:setfs packets.
6202 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6203 after target_handle_new_gdb_connection.
6204
6205 2015-06-10 Gary Benson <gbenson@redhat.com>
6206
6207 * configure.ac (AC_CHECK_FUNCS): Add setns.
6208 * config.in: Regenerate.
6209 * configure: Likewise.
6210 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6211 (linux-namespaces.o): New rule.
6212 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6213
6214 2015-06-09 Gary Benson <gbenson@redhat.com>
6215
6216 * hostio.c (handle_open): Process mode argument with
6217 fileio_to_host_mode.
6218
6219 2015-06-01 Yao Qi <yao.qi@linaro.org>
6220
6221 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6222 * linux-x86-low.c: Likewise.
6223
6224 2015-05-28 Don Breazeal <donb@codesourcery.com>
6225
6226 * linux-low.c (handle_extended_wait): Initialize
6227 thread_info.last_resume_kind for new fork children.
6228
6229 2015-05-15 Pedro Alves <palves@redhat.com>
6230
6231 * target.h (target_handle_new_gdb_connection): Rewrite using if
6232 wrapped in do/while.
6233
6234 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6235
6236 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6237 * configure, config.in: Regenerate.
6238 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6239 Declare typedef.
6240
6241 2015-05-12 Don Breazeal <donb@codesourcery.com>
6242
6243 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6244 PTRACE_EVENT_VFORK_DONE.
6245 (linux_low_ptrace_options, extended_event_reported): Add vfork
6246 events.
6247 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6248 and "vforkdone" for RSP 'T' Stop Reply Packet.
6249 * server.h (report_vfork_events): Declare
6250 global variable.
6251
6252 2015-05-12 Don Breazeal <donb@codesourcery.com>
6253
6254 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6255 (the_low_target) <new_fork>: Initialize new member.
6256 * linux-arm-low.c (arm_new_fork): New function.
6257 (the_low_target) <new_fork>: Initialize new member.
6258 * linux-low.c (handle_extended_wait): Call new target function
6259 new_fork.
6260 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6261 * linux-mips-low.c (mips_add_watchpoint): New function
6262 extracted from mips_insert_point.
6263 (the_low_target) <new_fork>: Initialize new member.
6264 (mips_linux_new_fork): New function.
6265 (mips_insert_point): Call mips_add_watchpoint.
6266 * linux-x86-low.c (x86_linux_new_fork): New function.
6267 (the_low_target) <new_fork>: Initialize new member.
6268
6269 2015-05-12 Don Breazeal <donb@codesourcery.com>
6270
6271 * linux-low.c (handle_extended_wait): Implement return value,
6272 rename argument 'event_child' to 'event_lwp', handle
6273 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6274 (linux_low_ptrace_options): New function.
6275 (linux_low_filter_event): Call linux_low_ptrace_options,
6276 use different argument fo linux_enable_event_reporting,
6277 use return value from handle_extended_wait.
6278 (extended_event_reported): New function.
6279 (linux_wait_1): Call extended_event_reported and set
6280 status to report fork events.
6281 (linux_write_memory): Add pid to debug message.
6282 (reset_lwp_ptrace_options_callback): New function.
6283 (linux_handle_new_gdb_connection): New function.
6284 (linux_target_ops): Initialize new structure member.
6285 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6286 * lynx-low.c: Initialize new structure member.
6287 * remote-utils.c (prepare_resume_reply): Implement stop reason
6288 "fork" for "T" stop message.
6289 * server.c (handle_query): Call handle_new_gdb_connection.
6290 * server.h (report_fork_events): Declare global flag.
6291 * target.h (struct target_ops) <handle_new_gdb_connection>:
6292 New member.
6293 (target_handle_new_gdb_connection): New macro.
6294 * win32-low.c: Initialize new structure member.
6295
6296 2015-05-12 Don Breazeal <donb@codesourcery.com>
6297
6298 * mem-break.c (APPEND_TO_LIST): Define macro.
6299 (clone_agent_expr): New function.
6300 (clone_one_breakpoint): New function.
6301 (clone_all_breakpoints): New function.
6302 * mem-break.h: Declare new functions.
6303
6304 2015-05-12 Don Breazeal <donb@codesourcery.com>
6305
6306 * linux-low.c (linux_supports_fork_events): New function.
6307 (linux_supports_vfork_events): New function.
6308 (linux_target_ops): Initialize new structure members.
6309 (initialize_low): Call linux_check_ptrace_features.
6310 * lynx-low.c (lynx_target_ops): Initialize new structure
6311 members.
6312 * server.c (report_fork_events, report_vfork_events):
6313 New global flags.
6314 (handle_query): Add new features to qSupported packet and
6315 response.
6316 (captured_main): Initialize new global variables.
6317 * target.h (struct target_ops) <supports_fork_events>:
6318 New member.
6319 <supports_vfork_events>: New member.
6320 (target_supports_fork_events): New macro.
6321 (target_supports_vfork_events): New macro.
6322 * win32-low.c (win32_target_ops): Initialize new structure
6323 members.
6324
6325 2015-05-12 Gary Benson <gbenson@redhat.com>
6326
6327 * server.c (handle_qxfer_exec_file): Use current process
6328 if annex is empty.
6329
6330 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6331
6332 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6333 Remove HAVE_PTRACE_GETREGS conditionals.
6334 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6335 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6336
6337 2015-05-08 Yao Qi <yao.qi@linaro.org>
6338
6339 * linux-low.c (linux_supports_conditional_breakpoints): New
6340 function.
6341 (linux_target_ops): Install new target method.
6342 * lynx-low.c (lynx_target_ops): Install NULL hook for
6343 supports_conditional_breakpoints.
6344 * nto-low.c (nto_target_ops): Likewise.
6345 * spu-low.c (spu_target_ops): Likewise.
6346 * win32-low.c (win32_target_ops): Likewise.
6347 * server.c (handle_query): Check
6348 target_supports_conditional_breakpoints.
6349 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6350 New field.
6351 (target_supports_conditional_breakpoints): New macro.
6352
6353 2015-05-06 Pedro Alves <palves@redhat.com>
6354
6355 PR server/18081
6356 * server.c (start_inferior): If the process exits, mourn it.
6357
6358 2015-04-21 Gary Benson <gbenson@redhat.com>
6359
6360 * hostio.c (fileio_open_flags_to_host): Factored out to
6361 fileio_to_host_openflags in common/fileio.c. Single use
6362 updated.
6363
6364 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6365
6366 * linux-xtensa-low.c (xtensa_fill_gregset)
6367 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6368 XCHAL_HAVE_LOOP.
6369
6370 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6371
6372 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6373 (regs_info): Replace usrregs pointer with NULL.
6374
6375 2015-04-17 Gary Benson <gbenson@redhat.com>
6376
6377 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6378 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6379 * server.c (handle_qxfer_exec_file): New function.
6380 (qxfer_packets): Add exec-file entry.
6381 (handle_query): Report qXfer:exec-file:read as supported packet.
6382
6383 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6384
6385 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6386
6387 2015-04-09 Gary Benson <gbenson@redhat.com>
6388
6389 * hostio-errno.c (errno_to_fileio_error): Remove function.
6390 Update caller to use remote_fileio_to_fio_error.
6391
6392 2015-04-09 Yao Qi <yao.qi@linaro.org>
6393
6394 * linux-low.c (linux_insert_point): Call
6395 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6396 (linux_remove_point): Call remove_memory_breakpoint if type is
6397 raw_bkpt_type_sw.
6398 * linux-x86-low.c (x86_insert_point): Don't call
6399 insert_memory_breakpoint.
6400 (x86_remove_point): Don't call remove_memory_breakpoint.
6401
6402 2015-04-01 Pedro Alves <palves@redhat.com>
6403 Cleber Rosa <crosa@redhat.com>
6404
6405 * server.c (gdbserver_usage): Reorganize and extend the usage
6406 message.
6407
6408 2015-03-24 Pedro Alves <palves@redhat.com>
6409
6410 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6411 output. Also dump TRAP_TRACE.
6412 (linux_low_filter_event): In debug output, distinguish a
6413 resume_stop SIGSTOP from a delayed SIGSTOP.
6414
6415 2015-03-24 Gary Benson <gbenson@redhat.com>
6416
6417 * linux-x86-low.c (x86_linux_new_thread): Moved to
6418 nat/x86-linux.c.
6419 (x86_linux_prepare_to_resume): Likewise.
6420
6421 2015-03-24 Gary Benson <gbenson@redhat.com>
6422
6423 * Makefile.in (x86-linux-dregs.o): New rule.
6424 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6425 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6426 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6427 (x86_linux_dr_get): Likewise.
6428 (x86_linux_dr_set): Likewise.
6429 (update_debug_registers_callback): Likewise.
6430 (x86_linux_dr_set_addr): Likewise.
6431 (x86_linux_dr_get_addr): Likewise.
6432 (x86_linux_dr_set_control): Likewise.
6433 (x86_linux_dr_get_control): Likewise.
6434 (x86_linux_dr_get_status): Likewise.
6435 (x86_linux_update_debug_registers): Likewise.
6436
6437 2015-03-24 Gary Benson <gbenson@redhat.com>
6438
6439 * linux-x86-low.c (x86_linux_update_debug_registers):
6440 New function, factored out from...
6441 (x86_linux_prepare_to_resume): ...this.
6442
6443 2015-03-24 Gary Benson <gbenson@redhat.com>
6444
6445 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6446 (x86_linux_dr_set): Likewise.
6447 (update_debug_registers_callback): Likewise.
6448 (x86_linux_dr_set_addr): Likewise.
6449 (x86_linux_dr_get_addr): Likewise.
6450 (x86_linux_dr_set_control): Likewise.
6451 (x86_linux_dr_get_control): Likewise.
6452 (x86_linux_dr_get_status): Likewise.
6453 (x86_linux_prepare_to_resume): Likewise.
6454
6455 2015-03-24 Gary Benson <gbenson@redhat.com>
6456
6457 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6458 Use perror_with_name. Pass string through gettext.
6459 (x86_linux_dr_set): Likewise.
6460
6461 2015-03-24 Gary Benson <gbenson@redhat.com>
6462
6463 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6464 (x86_linux_dr_set_addr): ...this.
6465 (x86_dr_low_get_addr): Rename to...
6466 (x86_linux_dr_get_addr): ...this.
6467 (x86_dr_low_set_control): Rename to...
6468 (x86_linux_dr_set_control): ...this.
6469 (x86_dr_low_get_control): Rename to...
6470 (x86_linux_dr_get_control): ...this.
6471 (x86_dr_low_get_status): Rename to...
6472 (x86_linux_dr_get_status): ...this.
6473 (x86_dr_low): Update with new function names.
6474
6475 2015-03-24 Gary Benson <gbenson@redhat.com>
6476
6477 * Makefile.in (x86-linux.o): New rule.
6478 * configure.srv: Add x86-linux.o to relevant targets.
6479 * linux-low.c (lwp_set_arch_private_info): New function.
6480 (lwp_arch_private_info): Likewise.
6481 * linux-x86-low.c: Include nat/x86-linux.h.
6482 (arch_lwp_info): Removed structure.
6483 (update_debug_registers_callback):
6484 Use lwp_set_debug_registers_changed.
6485 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6486 and lwp_set_debug_registers_changed.
6487 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6488
6489 2015-03-24 Gary Benson <gbenson@redhat.com>
6490
6491 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6492 * linux-arm-low.c (arm_new_thread): Likewise.
6493 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6494 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6495 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6496 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6497
6498 2015-03-24 Gary Benson <gbenson@redhat.com>
6499
6500 * linux-low.c (ptid_of_lwp): New function.
6501 (lwp_is_stopped): Likewise.
6502 (lwp_stop_reason): Likewise.
6503 * linux-x86-low.c (update_debug_registers_callback):
6504 Use lwp_is_stopped.
6505 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6506 lwp_stop_reason.
6507
6508 2015-03-24 Gary Benson <gbenson@redhat.com>
6509
6510 * linux-low.h (linux_stop_lwp): Remove declaration.
6511
6512 2015-03-24 Gary Benson <gbenson@redhat.com>
6513
6514 * linux-low.h: Include nat/linux-nat.h.
6515 * linux-low.c (iterate_over_lwps_args): New structure.
6516 (iterate_over_lwps_filter): New function.
6517 (iterate_over_lwps): Likewise.
6518 * linux-x86-low.c (update_debug_registers_callback):
6519 Update signature to what iterate_over_lwps expects.
6520 Remove PID check that iterate_over_lwps now performs.
6521 (x86_dr_low_set_addr): Use iterate_over_lwps.
6522 (x86_dr_low_set_control): Likewise.
6523
6524 2015-03-24 Gary Benson <gbenson@redhat.com>
6525
6526 * linux-x86-low.c (x86_debug_reg_state): New function.
6527 (x86_linux_prepare_to_resume): Use the above.
6528
6529 2015-03-24 Gary Benson <gbenson@redhat.com>
6530
6531 * linux-low.c (current_lwp_ptid): New function.
6532 * linux-x86-low.c: Include nat/linux-nat.h.
6533 (x86_dr_low_get_addr): Use current_lwp_ptid.
6534 (x86_dr_low_get_control): Likewise.
6535 (x86_dr_low_get_status): Likewise.
6536
6537 2015-03-20 Pedro Alves <palves@redhat.com>
6538
6539 * tracepoint.c (cmd_qtstatus): Make "str" const.
6540
6541 2015-03-20 Pedro Alves <palves@redhat.com>
6542
6543 * server.c (handle_general_set): Make "req_str" const.
6544
6545 2015-03-19 Pedro Alves <palves@redhat.com>
6546
6547 * linux-low.c (linux_resume_one_lwp): Rename to ...
6548 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6549 instead call perror_with_name.
6550 (check_ptrace_stopped_lwp_gone): New function.
6551 (linux_resume_one_lwp): Reimplement as wrapper around
6552 linux_resume_one_lwp_throw that swallows errors if the LWP is
6553 gone.
6554
6555 2015-03-19 Pedro Alves <palves@redhat.com>
6556
6557 * linux-low.c (count_events_callback, select_event_lwp_callback):
6558 No longer check whether the thread has resume_stop as last resume
6559 kind.
6560
6561 2015-03-19 Pedro Alves <palves@redhat.com>
6562
6563 * linux-low.c (count_events_callback, select_event_lwp_callback):
6564 Use the lwp's status_pending_p field, not the thread's.
6565
6566 2015-03-19 Pedro Alves <palves@redhat.com>
6567
6568 * linux-low.c (select_event_lwp_callback): Update comments to
6569 no longer mention SIGTRAP.
6570
6571 2015-03-18 Gary Benson <gbenson@redhat.com>
6572
6573 * server.c (handle_query): Do not report vFile:fstat as supported.
6574
6575 2015-03-11 Gary Benson <gbenson@redhat.com>
6576
6577 * hostio.c (sys/types.h): New include.
6578 (sys/stat.h): Likewise.
6579 (common-remote-fileio.h): Likewise.
6580 (handle_fstat): New function.
6581 (handle_vFile): Handle vFile:fstat packets.
6582
6583 2015-03-11 Gary Benson <gbenson@redhat.com>
6584
6585 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6586 struct stat.st_blocks and struct stat.st_blksize.
6587 * configure: Regenerate.
6588 * config.in: Likewise.
6589 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6590 (OBS): Add common-remote-fileio.o.
6591 (common-remote-fileio.o): New rule.
6592
6593 2015-03-09 Pedro Alves <palves@redhat.com>
6594
6595 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6596 'struct sockaddr' pointer in 'accept' call.
6597
6598 2015-03-09 Pedro Alves <palves@redhat.com>
6599
6600 Revert:
6601 2015-03-07 Pedro Alves <palves@redhat.com>
6602 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6603 or <winsock2.h> here. Instead include "gdb_socket.h".
6604 (remote_open): Use union gdb_sockaddr_u.
6605 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6606 or <winsock2.h> here. Instead include "gdb_socket.h".
6607 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6608 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6609 or <sys/un.h>.
6610 (init_named_socket, gdb_agent_helper_thread): Use union
6611 gdb_sockaddr_u.
6612
6613 2015-03-07 Pedro Alves <palves@redhat.com>
6614
6615 * configure.ac (build_warnings): Move
6616 -Wdeclaration-after-statement to the C-specific set.
6617 * configure: Regenerate.
6618
6619 2015-03-07 Pedro Alves <palves@redhat.com>
6620
6621 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6622 or <winsock2.h> here. Instead include "gdb_socket.h".
6623 (remote_open): Use union gdb_sockaddr_u.
6624 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6625 or <winsock2.h> here. Instead include "gdb_socket.h".
6626 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6627 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6628 or <sys/un.h>.
6629 (init_named_socket, gdb_agent_helper_thread): Use union
6630 gdb_sockaddr_u.
6631
6632 2015-03-07 Pedro Alves <palves@redhat.com>
6633
6634 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6635 instead.
6636
6637 2015-03-06 Yao Qi <yao.qi@linaro.org>
6638
6639 * linux-aarch64-low.c (aarch64_insert_point): Use
6640 show_debug_regs as a boolean.
6641 (aarch64_remove_point): Likewise.
6642
6643 2015-03-05 Pedro Alves <palves@redhat.com>
6644
6645 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6646 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6647 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6648 * nto-low.c (nto_target_ops): Likewise.
6649 * spu-low.c (spu_target_ops): Likewise.
6650 * win32-low.c (win32_target_ops): Likewise.
6651
6652 2015-03-04 Pedro Alves <palves@redhat.com>
6653
6654 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6655 Decide whether a breakpoint triggered based on the SIGTRAP's
6656 siginfo.si_code.
6657 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6658 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6659 (linux_low_filter_event): Check for breakpoints before checking
6660 watchpoints.
6661 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6662 siginfo.si_code.
6663 (linux_stopped_by_sw_breakpoint)
6664 (linux_supports_stopped_by_sw_breakpoint)
6665 (linux_stopped_by_hw_breakpoint)
6666 (linux_supports_stopped_by_hw_breakpoint): New functions.
6667 (linux_target_ops): Install new target methods.
6668
6669 2015-03-04 Pedro Alves <palves@redhat.com>
6670
6671 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6672 * server.c (swbreak_feature, hwbreak_feature): New globals.
6673 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6674 (captured_main): Clear swbreak_feature and hwbreak_feature.
6675 * server.h (swbreak_feature, hwbreak_feature): Declare.
6676 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6677 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6678 supports_stopped_by_hw_breakpoint>: New fields.
6679 (target_supports_stopped_by_sw_breakpoint)
6680 (target_stopped_by_sw_breakpoint)
6681 (target_supports_stopped_by_hw_breakpoint)
6682 (target_stopped_by_hw_breakpoint): Declare.
6683
6684 2015-03-04 Pedro Alves <palves@redhat.com>
6685
6686 enum lwp_stop_reason -> enum target_stop_reason
6687 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6688 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6689 (linux_wait_1, stuck_in_jump_pad_callback)
6690 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6691 (linux_stopped_by_watchpoint):
6692 * linux-low.h (enum lwp_stop_reason): Delete.
6693 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6694 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6695
6696 2015-03-04 Yao Qi <yao.qi@linaro.org>
6697
6698 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6699
6700 2015-03-03 Gary Benson <gbenson@redhat.com>
6701
6702 * hostio.c (handle_vFile): Fix prefix lengths.
6703
6704 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6705
6706 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6707 ptr_bits.
6708
6709 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6710
6711 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6712 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6713 (clean): Add "rm -f" for above C files.
6714 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6715 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6716 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6717 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6718 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6719 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6720 (init_registers_s390x_vx_linux64)
6721 (init_registers_s390x_tevx_linux64)
6722 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6723 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6724 declarations.
6725 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6726 (s390_store_vxrs_high): New functions.
6727 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6728 NT_S390_VXRS_HIGH.
6729 (s390_arch_setup): Add logic for selecting one of the new target
6730 descriptions. Activate the new vector regsets if applicable.
6731 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6732 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6733 and init_registers_s390x_tevx_linux64.
6734
6735 2015-03-01 Pedro Alves <palves@redhat.com>
6736
6737 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6738 parameter.
6739
6740 2015-02-27 Pedro Alves <palves@redhat.com>
6741
6742 * linux-x86-low.c (u_debugreg_offset): New function.
6743 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6744
6745 2015-02-27 Pedro Alves <palves@redhat.com>
6746
6747 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6748 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6749 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6750 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6751 (ps_lsetfpregs, ps_getpid)
6752 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6753 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6754 (ps_lsetxregs, ps_plog): Declare.
6755
6756 2015-02-27 Pedro Alves <palves@redhat.com>
6757
6758 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6759 IP_AGENT_EXPORT_FUNC.
6760 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6761 IP_AGENT_EXPORT_FUNC.
6762 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6763 (IP_AGENT_EXPORT): Delete.
6764 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6765 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6766 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6767 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6768 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6769 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6770 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6771 (traceframe_read_count, traceframe_write_count)
6772 (traceframes_created, trace_state_variables, get_raw_reg)
6773 (get_trace_state_variable_value, set_trace_state_variable_value)
6774 (ust_loaded, helper_thread_id, cmd_buf): Use
6775 IPA_SYM_EXPORTED_NAME.
6776 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6777 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6778 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6779 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6780 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6781 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6782 EXTERN_C_PUSH/EXTERN_C_POP.
6783 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6784 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6785 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6786 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6787 (traceframe_write_count, traceframe_read_count)
6788 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6789 (about_to_request_buffer_space, get_trace_state_variable_value)
6790 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6791 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6792 EXTERN_C_PUSH/EXTERN_C_POP.
6793 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6794 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6795 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6796 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6797 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6798 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6799 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6800 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6801 Define.
6802 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6803 (IP_AGENT_EXPORT_VAR_DECL): Define.
6804 (tracing): Declare.
6805 (gdb_agent_get_raw_reg): Declare.
6806
6807 2015-02-27 Tom Tromey <tromey@redhat.com>
6808 Pedro Alves <palves@redhat.com>
6809
6810 Rename symbols whose names are reserved C++ keywords throughout.
6811
6812 2015-02-27 Pedro Alves <palves@redhat.com>
6813
6814 * Makefile.in (COMPILER): New, get it from autoconf.
6815 (CXX): Get from autoconf instead.
6816 (COMPILE.pre): Use COMPILER.
6817 (CC-LD): Rename to ...
6818 (CC_LD): ... this. Use COMPILER.
6819 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6820 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6821 * acinclude.m4: Include build-with-cxx.m4.
6822 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6823 Disable -Werror by default if building in C++ mode.
6824 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6825 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6826 the C++ compiler. Save/restore CXXFLAGS too.
6827 * configure: Regenerate.
6828
6829 2015-02-27 Pedro Alves <palves@redhat.com>
6830
6831 * acinclude.m4: Include libiberty.m4.
6832 * configure.ac: Call libiberty_INIT.
6833 * config.in, configure: Regenerate.
6834
6835 2015-02-26 Pedro Alves <palves@redhat.com>
6836
6837 * linux-low.c (linux_wait_1): When incrementing the PC past a
6838 program breakpoint always use the_low_target.breakpoint_len as
6839 increment, rather than the maximum between that and
6840 the_low_target.decr_pc_after_break.
6841
6842 2015-02-23 Pedro Alves <palves@redhat.com>
6843
6844 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6845 thread was doing a step-over; always adjust the PC if
6846 we stepped over a permanent breakpoint.
6847 (linux_wait_1): If we stepped over breakpoint that was on top of a
6848 permanent breakpoint, manually advance the PC past it.
6849
6850 2015-02-23 Pedro Alves <palves@redhat.com>
6851
6852 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6853 modes.
6854 (x86_fill_gregset, x86_store_gregset): Use it when handling
6855 $orig_eax.
6856
6857 2015-02-20 Pedro Alves <palves@redhat.com>
6858
6859 * thread-db.c: Include "nat/linux-procfs.h".
6860 (thread_db_init): Skip listing new threads if the kernel supports
6861 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6862
6863 2015-02-20 Pedro Alves <palves@redhat.com>
6864
6865 * linux-low.c (status_pending_p_callback): Use ptid_match.
6866
6867 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6868
6869 PR breakpoints/16812
6870 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6871 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6872 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6873
6874 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6875
6876 PR breakpoints/15956
6877 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6878
6879 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6880
6881 * linux-low.c (linux_low_btrace_conf): Print size.
6882 * server.c (handle_btrace_conf_general_set): New.
6883 (hanle_general_set): Call handle_btrace_conf_general_set.
6884 (handle_query): Report Qbtrace-conf:bts:size as supported.
6885
6886 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6887
6888 * linux-low.c (linux_low_enable_btrace): Update parameters.
6889 (linux_low_btrace_conf): New.
6890 (linux_target_ops)<to_btrace_conf>: Initialize.
6891 * server.c (current_btrace_conf): New.
6892 (handle_btrace_enable): Rename to ...
6893 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6894 to target_enable_btrace. Update comment. Update users.
6895 (handle_qxfer_btrace_conf): New.
6896 (qxfer_packets): Add btrace-conf entry.
6897 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6898 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6899 (target_ops)<read_btrace_conf>: New.
6900 (target_enable_btrace): Update parameters.
6901 (target_read_btrace_conf): New.
6902
6903 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6904
6905 * server.c (handle_btrace_general_set): Remove call to
6906 target_supports_btrace.
6907 (supported_btrace_packets): New.
6908 (handle_query): Call supported_btrace_packets.
6909 * target.h: include btrace-common.h.
6910 (btrace_target_info): Removed.
6911 (supports_btrace, target_supports_btrace): Update parameters.
6912
6913 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6914
6915 * Makefile.in (SFILES): Add common/btrace-common.c.
6916 (OBS): Add common/btrace-common.o.
6917 (btrace-common.o): Add build rules.
6918 * linux-low: Include btrace-common.h.
6919 (linux_low_read_btrace): Use struct btrace_data. Call
6920 btrace_data_init and btrace_data_fini.
6921
6922 2015-02-06 Pedro Alves <palves@redhat.com>
6923
6924 * thread-db.c (find_new_threads_callback): Add debug output.
6925
6926 2015-02-04 Pedro Alves <palves@redhat.com>
6927
6928 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6929 (resume_stopped_resumed_lwps): New function.
6930 (linux_wait_for_event_filtered): Use it.
6931
6932 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6933
6934 * Makefile.in (SFILES): Add linux-personality.c.
6935 (linux-personality.o): New rule.
6936 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6937 list of objects to be built.
6938 * linux-low.c: Include nat/linux-personality.h.
6939 (linux_create_inferior): Remove code to disable address space
6940 randomization (moved to ../nat/linux-personality.c). Create
6941 cleanup to disable address space randomization.
6942
6943 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6944
6945 * Makefile.in (posix-strerror.o): New rule.
6946 (mingw-strerror.o): Likewise.
6947 * configure: Regenerated.
6948 * configure.ac: Source file ../common/common.host. Initialize new
6949 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6950
6951 2015-01-14 Yao Qi <yao@codesourcery.com>
6952
6953 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6954 (ppc-linux.o): New rule.
6955 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6956 * configure.ac: AC_CHECK_FUNCS(getauxval).
6957 * config.in: Re-generated.
6958 * configure: Re-generated.
6959 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6960 ppc64_64bit_inferior_p
6961
6962 2015-01-14 Yao Qi <yao@codesourcery.com>
6963
6964 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6965 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6966 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6967 (PT_ORIG_R3, PT_TRAP): Likewise.
6968 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6969 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6970 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6971
6972 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6973
6974 * i387-fp.c (i387_cache_to_xsave): In look over
6975 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6976 zmmh_low_space field by use of zmmh_high_space.
6977
6978 2015-01-09 Pedro Alves <palves@redhat.com>
6979
6980 * linux-low.c (step_over_bkpt): Move higher up in the file.
6981 (handle_extended_wait): Don't store the stop_pc here.
6982 (get_stop_pc): Adjust comments and rename to ...
6983 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6984 stopped for a software breakpoint or hardware breakpoint.
6985 (thread_still_has_status_pending_p): New function.
6986 (status_pending_p_callback): Use
6987 thread_still_has_status_pending_p. If the event is no longer
6988 interesting, resume the LWP.
6989 (handle_tracepoints): Add assert.
6990 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6991 (wstatus_maybe_breakpoint): New function.
6992 (cancel_breakpoint): Delete function.
6993 (check_stopped_by_watchpoint): New function, factored out from
6994 linux_low_filter_event.
6995 (lp_status_maybe_breakpoint): Delete function.
6996 (linux_low_filter_event): Remove filter_ptid argument.
6997 Leave thread group exits pending here. Store the LWP's stop PC.
6998 Always leave events pending.
6999 (linux_wait_for_event_filtered): Pull all events out of the
7000 kernel, and leave them all pending.
7001 (count_events_callback, select_event_lwp_callback): Consider all
7002 events.
7003 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7004 (select_event_lwp): Only give preference to the stepping LWP in
7005 all-stop mode. Adjust comments.
7006 (ignore_event): New function.
7007 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7008 references to cancel_breakpoints. Adjust to renames. Also give
7009 equal priority to all LWPs that have had events in non-stop mode.
7010 If reporting a software breakpoint event, unadjust the LWP's PC.
7011 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7012 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7013 Adjust.
7014 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7015 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7016 (linux_stopped_by_watchpoint): Adjust.
7017 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7018 * linux-low.h (enum lwp_stop_reason): New.
7019 (struct lwp_info) <stop_pc>: Adjust comment.
7020 <stopped_by_watchpoint>: Delete field.
7021 <stop_reason>: New field.
7022 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7023 * mem-break.c (software_breakpoint_inserted_here)
7024 (hardware_breakpoint_inserted_here): New function.
7025 * mem-break.h (software_breakpoint_inserted_here)
7026 (hardware_breakpoint_inserted_here): Declare.
7027 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7028 (cancel_breakpoints): Delete.
7029 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7030 (upload_fast_traceframes): Remove references to
7031 cancel_breakpoints.
7032
7033 2015-01-09 Pedro Alves <palves@redhat.com>
7034
7035 * thread-db.c (find_new_threads_callback): Ignore thread if the
7036 kernel thread ID is -1.
7037
7038 2015-01-09 Pedro Alves <palves@redhat.com>
7039
7040 * linux-low.c (linux_attach_fail_reason_string): Move to
7041 nat/linux-ptrace.c, and rename.
7042 (linux_attach_lwp): Update comment.
7043 (attach_proc_task_lwp_callback): New function.
7044 (linux_attach): Adjust to rename and use
7045 linux_proc_attach_tgid_threads.
7046 (linux_attach_fail_reason_string): Delete declaration.
7047
7048 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7049
7050 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7051 * server.c (gdbserver_version): Likewise.
7052
7053 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7054
7055 * remote-utils.c: Include ctype.h.
7056 (input_interrupt): Explicitly handle the case when the char
7057 received is the NUL byte. Improve the printing of non-ASCII
7058 characters.
7059
7060 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7061
7062 * linux-low.c (linux_low_filter_event): Update call to
7063 linux_enable_event_reporting following the addition of
7064 a new parameter to that function.
7065
7066 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7067
7068 PR server/17457
7069 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7070 (AARCH64_FPCR_REGNO): Likewise.
7071 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7072 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7073 (aarch64_store_fpregset): Likewise.
7074
7075 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7076
7077 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7078 Remove FIXME comment about assumption about N.
7079
7080 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7081
7082 * configure.ac: If large-file support is disabled in GDBserver,
7083 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7084 * configure: Regenerate.
7085
7086 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7087
7088 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7089 warning upon ENODATA from ptrace.
7090 * linux-s390-low.c (s390_store_tdb): New.
7091 (s390_regsets): Add regset for NT_S390_TDB.
7092
7093 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7094
7095 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7096 without a fill_function.
7097 * linux-s390-low.c (s390_fill_last_break): Remove.
7098 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7099 (s390_arch_setup): Use regset's size instead of fill_function for
7100 loop end condition.
7101
7102 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7103
7104 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7105 the regset's store function when ptrace returned an error.
7106 * regcache.c (get_thread_regcache): Invalidate register cache
7107 before fetching inferior's registers.
7108
7109 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7110
7111 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7112 while-loop as for-loop.
7113 (regsets_store_inferior_registers): Likewise.
7114
7115 2014-11-28 Yao Qi <yao@codesourcery.com>
7116
7117 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7118 * config.in, configure: Re-generate.
7119 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7120 is defined.
7121
7122 2014-11-21 Yao Qi <yao@codesourcery.com>
7123
7124 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7125 (AC_CHECK_HEADERS): Remove malloc.h.
7126 * configure: Re-generated.
7127 * config.in: Re-generated.
7128 * server.h: Don't include alloca.h and malloc.h.
7129 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7130 Don't include malloc.h.
7131
7132 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7133
7134 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7135 corresponding ERRNO check in same block.
7136
7137 2014-11-12 Pedro Alves <palves@redhat.com>
7138
7139 * server.c (cont_thread): Update comment.
7140 (start_inferior, attach_inferior): No longer clear cont_thread.
7141 (handle_v_cont): No longer set cont_thread.
7142 (captured_main): Clear cont_thread each time a GDB connects.
7143
7144 2014-11-12 Pedro Alves <palves@redhat.com>
7145
7146 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7147 thread, and don't resume all threads if the Hc thread has exited.
7148
7149 2014-11-12 Pedro Alves <palves@redhat.com>
7150
7151 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7152 the process group instead of to a specific LWP.
7153
7154 2014-10-15 Pedro Alves <palves@redhat.com>
7155
7156 PR server/17487
7157 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7158 parameter.
7159 (arm_set_thread_context): Delete.
7160 (the_low_target): Adjust.
7161 * win32-i386-low.c (debug_registers_changed)
7162 (debug_registers_used): Delete.
7163 (update_debug_registers_callback): New function.
7164 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7165 needing to update their debug registers.
7166 (win32_get_current_dr): New function.
7167 (x86_dr_low_get_addr, x86_dr_low_get_control)
7168 (x86_dr_low_get_status): Fetch the debug register from the thread
7169 record's context.
7170 (i386_initial_stuff): Adjust.
7171 (i386_get_thread_context): Remove current_event parameter. Don't
7172 clear debug_registers_changed nor copy DR values to
7173 debug_reg_state.
7174 (i386_set_thread_context): Delete.
7175 (i386_prepare_to_resume): New function.
7176 (i386_thread_added): Mark the thread as needing to update irs
7177 debug registers.
7178 (the_low_target): Remove i386_set_thread_context and install
7179 i386_prepare_to_resume.
7180 * win32-low.c (win32_get_thread_context): Adjust.
7181 (win32_set_thread_context): Use SetThreadContext
7182 directly.
7183 (win32_prepare_to_resume): New function.
7184 (win32_require_context): New function, factored out from ...
7185 (thread_rec): ... this.
7186 (continue_one_thread): Call win32_prepare_to_resume on each thread
7187 we're about to continue.
7188 (win32_resume): Call win32_prepare_to_resume on the event thread.
7189 * win32-low.h (struct win32_thread_info)
7190 <debug_registers_changed>: New field.
7191 (struct win32_target_ops): Change prototype of set_thread_context,
7192 delete set_thread_context and add prepare_to_resume.
7193 (win32_require_context): New declaration.
7194
7195 2014-10-08 Gary Benson <gbenson@redhat.com>
7196
7197 * server.h: Do not include common-exceptions.h.
7198
7199 2014-10-08 Gary Benson <gbenson@redhat.com>
7200
7201 * server.h: Do not include cleanups.h.
7202
7203 2014-09-30 James Hogan <james.hogan@imgtec.com>
7204
7205 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7206 mips64-dsp-linux.c.
7207
7208 2014-09-23 Yao Qi <yao@codesourcery.com>
7209
7210 * linux-low.c (lp_status_maybe_breakpoint): New function.
7211 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7212 (count_events_callback): Likewise.
7213 (select_event_lwp_callback): Likewise.
7214 (cancel_breakpoints_callback): Likewise.
7215
7216 2014-09-19 Don Breazeal <donb@codesourcery.com>
7217
7218 * linux-low.c (handle_extended_wait): Call
7219 linux_ptrace_get_extended_event.
7220 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7221 linux_is_extended_waitstatus.
7222
7223 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7224
7225 * Makefile.in (CPPFLAGS): Define.
7226 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7227 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7228
7229 2014-09-16 Gary Benson <gbenson@redhat.com>
7230
7231 * inferiors.h (current_inferior): Renamed as...
7232 (current_thread): New variable. All uses updated.
7233 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7234 (maybe_move_out_of_jump_pad): Likewise.
7235 (cancel_breakpoint): Likewise.
7236 (linux_low_filter_event): Likewise.
7237 (wait_for_sigstop): Likewise.
7238 (linux_resume_one_lwp): Likewise.
7239 (need_step_over_p): Likewise.
7240 (start_step_over): Likewise.
7241 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7242 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7243 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7244 and save_inferior as saved_thread.
7245 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7246 saved_thread.
7247 (regcache_invalidate_thread): Likewise.
7248 * remote-utils.c (prepare_resume_reply): Likewise.
7249 * thread-db.c (thread_db_get_tls_address): Likewise.
7250 (disable_thread_event_reporting): Likewise.
7251 (remove_thread_event_breakpoints): Likewise.
7252 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7253 as saved_thread.
7254 * target.h (set_desired_inferior): Renamed as...
7255 (set_desired_thread): New declaration. All uses updated.
7256 * server.c (myresume): Updated comment to reference thread instead
7257 of inferior.
7258 (handle_serial_event): Likewise.
7259 (handle_target_event): Likewise.
7260
7261 2014-09-12 Tom Tromey <tromey@redhat.com>
7262 Gary Benson <gbenson@redhat.com>
7263
7264 * regcache.h: Include common-regcache.h.
7265 (regcache_read_pc): Don't declare.
7266 * regcache.c (get_thread_regcache_for_ptid): New function.
7267
7268 2014-09-11 Tom Tromey <tromey@redhat.com>
7269 Gary Benson <gbenson@redhat.com>
7270
7271 * symbol.c: New file.
7272 * Makefile.in (SFILES): Add symbol.c.
7273 (OBS): Add symbol.o.
7274
7275 2014-09-11 Gary Benson <gbenson@redhat.com>
7276
7277 * target.c (target_stop_ptid, target_continue_ptid): New
7278 functions.
7279
7280 2014-09-11 Tom Tromey <tromey@redhat.com>
7281 Gary Benson <gbenson@redhat.com>
7282
7283 * target.h: Include target/target.h.
7284 * target.c (target_read_memory, target_read_uint32)
7285 (target_write_memory): New functions.
7286
7287 2014-09-11 Gary Benson <gbenson@redhat.com>
7288
7289 * server.h (debug_hw_points): Don't declare.
7290 * server.c (debug_hw_points): Don't define. Replace all uses
7291 with show_debug_regs.
7292 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7293 all uses with show_debug_regs.
7294
7295 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7296
7297 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7298 endianness into account.
7299 (ppc_supply_ptrace_register): Likewise.
7300
7301 2014-09-03 James Hogan <james.hogan@imgtec.com>
7302
7303 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7304 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7305
7306 2014-09-03 Gary Benson <gbenson@redhat.com>
7307
7308 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7309 ALL_DEBUG_ADDRESS_REGISTERS.
7310
7311 2014-09-02 Gary Benson <gbenson@redhat.com>
7312
7313 * i386-low.h: Renamed as...
7314 * x86-low.h: New file. All type, function and variable name
7315 prefixes changed from "i386_" to "x86_". All references updated.
7316 * i386-low.c: Renamed as...
7317 * x86-low.c: New file. All type, function and variable name
7318 prefixes changed from "i386_" to "x86_". All references updated.
7319
7320 2014-09-02 Gary Benson <gbenson@redhat.com>
7321
7322 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7323 (x86_linux_new_thread): Likewise.
7324
7325 2014-08-29 Gary Benson <gbenson@redhat.com>
7326
7327 * server.h (setjmp.h): Do not include.
7328 (toplevel): Do not declare.
7329 (common-exceptions.h): Include.
7330 (cleanups.h): Likewise.
7331 * server.c (toplevel): Do not define.
7332 (exit_code): New static global.
7333 (detach_or_kill_for_exit_cleanup): New function.
7334 (main): New function. Original main renamed to...
7335 (captured_main): New function.
7336 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7337
7338 2014-08-29 Gary Benson <gbenson@redhat.com>
7339
7340 * Makefile.in (SFILES): Add common/common-exceptions.c.
7341 (OBS): Add common-exceptions.o.
7342 (common-exceptions.o): New rule.
7343 * utils.c (prepare_to_throw_exception): New function.
7344
7345 2014-08-29 Gary Benson <gbenson@redhat.com>
7346
7347 * config.in: Regenerate.
7348 * configure: Likewise.
7349
7350 2014-08-29 Gary Benson <gbenson@redhat.com>
7351
7352 * Makefile.in (SFILES): Add common/cleanups.c.
7353 (OBS): cleanups.o.
7354 (cleanups.o): New rule.
7355
7356 2014-08-29 Gary Benson <gbenson@redhat.com>
7357
7358 * utils.c (internal_vwarning): New function.
7359
7360 2014-08-28 Gary Benson <gbenson@redhat.com>
7361
7362 * utils.h (fatal): Remove declaration.
7363 * utils.c (fatal): Remove function.
7364
7365 2014-08-28 Gary Benson <gbenson@redhat.com>
7366
7367 * tracepoint.c (gdb_agent_init): Replace fatal with
7368 perror_with_name.
7369 (initialize_tracepoint): Likewise.
7370
7371 2014-08-28 Gary Benson <gbenson@redhat.com>
7372
7373 * remote-utils.c (remote_prepare): Replace fatal with error.
7374
7375 2014-08-28 Gary Benson <gbenson@redhat.com>
7376
7377 * linux-low.c (linux_async): Replace fatal with warning.
7378 Tidy up and return.
7379 (linux_start_non_stop): Return -1 if linux_async failed.
7380
7381 2014-08-28 Gary Benson <gbenson@redhat.com>
7382
7383 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7384 gdb_assert.
7385 (i386_dr_low_get_addr): Remove vague comment.
7386 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7387 gdb_assert.
7388
7389 2014-08-28 Gary Benson <gbenson@redhat.com>
7390
7391 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7392 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7393 internal_error.
7394 (linux_resume_one_lwp): Likewise.
7395 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7396 gdb_assert.
7397 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7398 with internal_error.
7399 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7400 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7401 (find_register_by_name): Replace fatal with internal_error.
7402 (find_regno): Likewise.
7403 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7404 * thread-db.c (thread_db_create_event): Likewise.
7405 (thread_db_load_search): Likewise.
7406 (try_thread_db_load_1): Likewise.
7407 * tracepoint.c (get_jump_space_head): Replace fatal with
7408 internal_error.
7409 (claim_trampoline_space): Likewise.
7410 (have_fast_tracepoint_trampoline_buffer): Likewise.
7411 (cmd_qtstart): Likewise.
7412 (stop_tracing): Likewise.
7413 (fast_tracepoint_collecting): Likewise.
7414 (target_malloc): Likewise.
7415 (download_tracepoint): Likewise.
7416 (download_trace_state_variables): Replace check with gdb_assert.
7417 (upload_fast_traceframes): Replace fatal with internal_error.
7418
7419 2014-08-19 Tom Tromey <tromey@redhat.com>
7420 Gary Benson <gbenson@redhat.com>
7421
7422 * Makefile.in (SFILES): Add common/common-debug.c.
7423 (OBS): Add common-debug.o.
7424 (common-debug.o): New rule.
7425 * debug.h (debug_printf): Don't declare.
7426 * debug.c (debug_printf): Renamed and rewritten as...
7427 (debug_vprintf): New function.
7428
7429 2014-08-19 Gary Benson <gbenson@redhat.com>
7430
7431 * utils.h: Do not include print-utils.h.
7432
7433 2014-08-19 Tom Tromey <tromey@redhat.com>
7434 Gary Benson <gbenson@redhat.com>
7435
7436 * server.h: Add static assertion.
7437 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7438
7439 2014-08-19 Tom Tromey <tromey@redhat.com>
7440 Gary Benson <gbenson@redhat.com>
7441
7442 * Makefile.in (SFILES): Add common/errors.c.
7443 (OBS): Add errors.o.
7444 (IPA_OBS): Add errors-ipa.o.
7445 (errors.o): New rule.
7446 (errors-ipa.o): Likewise.
7447 * utils.h (perror_with_name, error, warning): Don't declare.
7448 * utils.c (warning): Renamed and rewritten as...
7449 (vwarning): New function.
7450 (error): Renamed and rewritten as...
7451 (verror): New function.
7452 (internal_error): Renamed and rewritten as...
7453 (internal_verror): New function.
7454
7455 2014-08-07 Gary Benson <gbenson@redhat.com>
7456
7457 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7458 * configure: Regenerate.
7459 * config.in: Likewise.
7460 * server.h: Do not include errno.h.
7461 * event-loop.c: Likewise.
7462 * hostio-errno.c: Likewise.
7463 * linux-low.c: Likewise.
7464 * remote-utils.c: Likewise.
7465 * spu-low.c: Likewise.
7466 * utils.c: Likewise.
7467 * gdbreplay.c: Unconditionally include errno.h.
7468
7469 2014-08-07 Gary Benson <gbenson@redhat.com>
7470
7471 * server.h: Do not include string.h.
7472 * event-loop.c: Likewise.
7473 * linux-low.c: Likewise.
7474 * regcache.c: Likewise.
7475 * remote-utils.c: Likewise.
7476 * spu-low.c: Likewise.
7477 * utils.c: Likewise.
7478
7479 2014-08-07 Gary Benson <gbenson@redhat.com>
7480
7481 * server.h: Do not include gdb_assert.h.
7482
7483 2014-08-07 Gary Benson <gbenson@redhat.com>
7484
7485 * server.h: Do not include common-utils.h.
7486
7487 2014-08-07 Gary Benson <gbenson@redhat.com>
7488
7489 * server.h: Do not include ptid.h.
7490 * notif.h: Likewise.
7491
7492 2014-08-07 Gary Benson <gbenson@redhat.com>
7493
7494 * server.h: Do not include gdb_locale.h.
7495
7496 2014-08-07 Gary Benson <gbenson@redhat.com>
7497
7498 * server.h: Do not include gdb/signals.h.
7499 * win32-low.c: Likewise.
7500
7501 2014-08-07 Gary Benson <gbenson@redhat.com>
7502
7503 * server.h: Do not include pathmax.h.
7504
7505 2014-08-07 Gary Benson <gbenson@redhat.com>
7506
7507 * server.h: Do not include libiberty.h.
7508 * linux-bfin-low.c: Likewise.
7509
7510 2014-08-07 Gary Benson <gbenson@redhat.com>
7511
7512 * server.h: Do not include ansidecl.h.
7513
7514 2014-08-07 Gary Benson <gbenson@redhat.com>
7515
7516 * linux-x86-low.c: Do not include stddef.h.
7517 * lynx-ppc-low.c: Likewise.
7518 * tracepoint.c: Likewise.
7519
7520 2014-08-07 Gary Benson <gbenson@redhat.com>
7521
7522 * server.h: Do not include stdarg.h.
7523 * nto-low.c: Likewise.
7524
7525 2014-08-07 Gary Benson <gbenson@redhat.com>
7526
7527 * server.h: Do not include stdlib.h.
7528 * inferiors.c: Likewise.
7529 * linux-low.c: Likewise.
7530 * regcache.c: Likewise.
7531 * spu-low.c: Likewise.
7532 * tracepoint.c: Likewise.
7533 * utils.c: Likewise.
7534
7535 2014-08-07 Gary Benson <gbenson@redhat.com>
7536
7537 * server.h: Do not include stdio.h.
7538 * linux-low.c: Likewise.
7539 * remote-utils.c: Likewise.
7540 * spu-low.c: Likewise.
7541 * utils.c: Likewise.
7542 * wincecompat.c: Likewise.
7543
7544 2014-08-06 Gary Benson <gbenson@redhat.com>
7545
7546 * regcache.c (init_register_cache): Move conditionals inside if.
7547
7548 2014-08-06 Gary Benson <gbenson@redhat.com>
7549
7550 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7551
7552 2014-07-31 Gary Benson <gbenson@redhat.com>
7553
7554 * ax.h: Do not include server.h.
7555 * gdbthread.h: Likewise.
7556 * lynx-low.h: Likewise.
7557 * notif.h: Likewise.
7558
7559 2014-07-30 Gary Benson <gbenson@redhat.com>
7560
7561 * server.h: Include common-defs.h.
7562 Do not include config.h or build-gnulib-gdbserver/config.h.
7563
7564 2014-07-30 Gary Benson <gbenson@redhat.com>
7565
7566 * hostio-errno.c: Move server.h to top of includes list.
7567 * inferiors.c: Likewise.
7568 * linux-x86-low.c: Likewise.
7569 * notif.c: Include server.h.
7570
7571 2014-07-24 Tom Tromey <tromey@redhat.com>
7572 Gary Benson <gbenson@redhat.com>
7573
7574 * server.h (CORE_ADDR): Now unsigned.
7575
7576 2014-07-16 Pedro Alves <palves@redhat.com>
7577
7578 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7579
7580 2014-07-15 Pedro Alves <palves@redhat.com>
7581
7582 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7583 copy.
7584
7585 2014-07-11 Pedro Alves <palves@redhat.com>
7586
7587 * linux-low.c (kill_wait_lwp): New function, based on
7588 kill_one_lwp_callback, but use my_waitpid directly.
7589 (kill_one_lwp_callback, linux_kill): Use it.
7590
7591 2014-06-23 Pedro Alves <palves@redhat.com>
7592
7593 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7594 before setting DR0..DR3.
7595
7596 2014-06-20 Gary Benson <gbenson@redhat.com>
7597
7598 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7599 * configure: Regenerated.
7600 * config.in: Likewise.
7601
7602 2014-06-20 Gary Benson <gbenson@redhat.com>
7603
7604 * Makefile.in (SFILES): Update locations for files moved
7605 from common to nat.
7606 (object file files): Reordered.
7607
7608 2014-06-20 Gary Benson <gbenson@redhat.com>
7609
7610 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7611 (i386_dr_low_set_addr): Likewise.
7612 (i386_dr_low_get_addr): Likewise.
7613 (i386_dr_low_can_set_control): Likewise.
7614 (i386_dr_low_set_control): Likewise.
7615 (i386_dr_low_get_control): Likewise.
7616 (i386_dr_low_get_status): Likewise.
7617 (i386_get_debug_register_length): Likewise.
7618 * linux-x86-low.c (i386_dr_low_set_addr):
7619 Changed signature. Made static.
7620 (i386_dr_low_get_addr): Likewise.
7621 (i386_dr_low_set_control): Likewise.
7622 (i386_dr_low_get_control): Likewise.
7623 (i386_dr_low_get_status): Likewise.
7624 (i386_dr_low): New global variable.
7625 * win32-i386-low.c (i386_dr_low_set_addr):
7626 Changed signature. Made static.
7627 (i386_dr_low_get_addr): Likewise.
7628 (i386_dr_low_set_control): Likewise.
7629 (i386_dr_low_get_control): Likewise.
7630 (i386_dr_low_get_status): Likewise.
7631 (i386_dr_low): New global variable.
7632
7633 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7634
7635 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7636 * Makefile.in (AR, AR_FLAGS): Define.
7637 * configure: Regenerate.
7638
7639 2014-06-19 Gary Benson <gbenson@redhat.com>
7640
7641 * Makefile.in (i386-dregs.o): New rule.
7642 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7643 * i386-low.c (target.h): Remove include.
7644 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7645 (DR_CONTROL_SHIFT): Likewise.
7646 (DR_CONTROL_SIZE): Likewise.
7647 (DR_RW_EXECUTE): Likewise.
7648 (DR_RW_WRITE): Likewise.
7649 (DR_RW_READ): Likewise.
7650 (DR_RW_IORW): Likewise.
7651 (DR_LEN_1): Likewise.
7652 (DR_LEN_2): Likewise.
7653 (DR_LEN_4): Likewise.
7654 (DR_LEN_8): Likewise.
7655 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7656 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7657 (DR_ENABLE_SIZE): Likewise.
7658 (DR_LOCAL_SLOWDOWN): Likewise.
7659 (DR_GLOBAL_SLOWDOWN): Likewise.
7660 (DR_CONTROL_RESERVED): Likewise.
7661 (I386_DR_CONTROL_MASK): Likewise.
7662 (I386_DR_VACANT): Likewise.
7663 (I386_DR_LOCAL_ENABLE): Likewise.
7664 (I386_DR_GLOBAL_ENABLE): Likewise.
7665 (I386_DR_DISABLE): Likewise.
7666 (I386_DR_SET_RW_LEN): Likewise.
7667 (I386_DR_GET_RW_LEN): Likewise.
7668 (I386_DR_WATCH_HIT): Likewise.
7669 (i386_wp_op_t): Likewise.
7670 (i386_show_dr): Likewise.
7671 (i386_length_and_rw_bits): Likewise.
7672 (i386_insert_aligned_watchpoint): Likewise.
7673 (i386_remove_aligned_watchpoint): Likewise.
7674 (i386_handle_nonaligned_watchpoint): Likewise.
7675 i386_update_inferior_debug_regs(): Likewise.
7676 (i386_dr_insert_watchpoint): Likewise.
7677 (i386_dr_remove_watchpoint): Likewise.
7678 (i386_dr_region_ok_for_watchpoint): Likewise.
7679 (i386_dr_stopped_data_address): Likewise.
7680 (i386_dr_stopped_by_watchpoint): Likewise.
7681
7682 2014-06-19 Gary Benson <gbenson@redhat.com>
7683
7684 * i386-low.c (i386_dr_show): Renamed to
7685 i386_show_dr and made static. All uses updated.
7686 (i386_dr_length_and_rw_bits): Renamed to
7687 i386_length_and_rw_bits and made static.
7688 All uses updated.
7689 (i386_dr_insert_aligned_watchpoint): Renamed to
7690 i386_insert_aligned_watchpoint and made static.
7691 All uses updated.
7692 (i386_dr_remove_aligned_watchpoint): Renamed to
7693 i386_remove_aligned_watchpoint and made static.
7694 All uses updated.
7695 (i386_dr_update_inferior_debug_regs): Renamed to
7696 i386_update_inferior_debug_regs and made static.
7697 All uses updated.
7698
7699 2014-06-18 Gary Benson <gbenson@redhat.com>
7700
7701 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7702 (i386_dr_low_can_set_control): Likewise.
7703 (i386_get_debug_register_length): Likewise.
7704 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7705 (i386_dr_low_can_set_control): Likewise.
7706 (i386_get_debug_register_length): Likewise.
7707
7708 2014-06-17 Gary Benson <gbenson@redhat.com>
7709
7710 * i386-low.h (i386-dregs.h): New include.
7711 (DR_FIRSTADDR): Now in i386-dregs.h.
7712 (DR_LASTADDR): Likewise.
7713 (DR_NADDR): Likewise.
7714 (DR_STATUS): Likewise.
7715 (DR_CONTROL): Likewise.
7716 (i386_debug_reg_state): Likewise.
7717 (i386_dr_insert_watchpoint): Likewise.
7718 (i386_dr_remove_watchpoint): Likewise.
7719 (i386_dr_region_ok_for_watchpoint): Likewise.
7720 (i386_dr_stopped_data_address): Likewise.
7721 (i386_dr_stopped_by_watchpoint): Likewise.
7722 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7723
7724 2014-06-18 Gary Benson <gbenson@redhat.com>
7725
7726 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7727 i386_dr_insert_watchpoint.
7728 (i386_low_remove_watchpoint): Renamed to
7729 i386_dr_remove_watchpoint.
7730 (i386_low_region_ok_for_watchpoint): Renamed to
7731 i386_dr_region_ok_for_watchpoint.
7732 (i386_low_stopped_data_address): Renamed to
7733 i386_dr_stopped_data_address.
7734 (i386_low_stopped_by_watchpoint): Renamed to
7735 i386_dr_stopped_by_watchpoint.
7736 * i386-low.c (i386_show_dr): Renamed to
7737 i386_dr_show and made nonstatic. All uses updated.
7738 (i386_length_and_rw_bits): Renamed to
7739 i386_dr_length_and_rw_bits and made nonstatic.
7740 All uses updated.
7741 (i386_insert_aligned_watchpoint): Renamed to
7742 i386_dr_insert_aligned_watchpoint and made nonstatic.
7743 All uses updated.
7744 (i386_remove_aligned_watchpoint): Renamed to
7745 i386_dr_remove_aligned_watchpoint and made nonstatic.
7746 All uses updated.
7747 (i386_update_inferior_debug_regs): Renamed to
7748 i386_dr_update_inferior_debug_regs and made nonstatic.
7749 All uses updated.
7750 (i386_low_insert_watchpoint): Renamed to
7751 i386_dr_insert_watchpoint. All uses updated.
7752 (i386_low_remove_watchpoint): Renamed to
7753 i386_dr_remove_watchpoint. All uses updated.
7754 (i386_low_region_ok_for_watchpoint): Renamed to
7755 i386_dr_region_ok_for_watchpoint. All uses updated.
7756 (i386_low_stopped_data_address): Renamed to
7757 i386_dr_stopped_data_address. All uses updated.
7758 (i386_low_stopped_by_watchpoint): Renamed to
7759 i386_dr_stopped_by_watchpoint. All uses updated.
7760
7761 2014-06-18 Gary Benson <gbenson@redhat.com>
7762
7763 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7764 (i386_dr_low_can_set_control): Likewise.
7765 (i386_insert_aligned_watchpoint): New check.
7766
7767 2014-06-18 Gary Benson <gbenson@redhat.com>
7768
7769 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7770 Renamed to state.
7771
7772 2014-06-18 Gary Benson <gbenson@redhat.com>
7773
7774 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7775 instead of fatal and error.
7776 (i386_handle_nonaligned_watchpoint): Likewise.
7777
7778 2014-06-18 Gary Benson <gbenson@redhat.com>
7779
7780 * i386-low.c (i386_get_debug_register_length): New macro.
7781 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7782 (i386_show_dr): Use debug_printf instead of fprintf. Use
7783 phex to format values.
7784
7785 2014-06-18 Gary Benson <gbenson@redhat.com>
7786
7787 * i386-low.h: Comment changes.
7788 * i386-low.c: Likewise.
7789
7790 2014-06-18 Gary Benson <gbenson@redhat.com>
7791
7792 * i386-low.c: Whitespace changes.
7793
7794 2014-06-12 Tom Tromey <tromey@redhat.com>
7795
7796 * utils.c (freeargv): Remove.
7797
7798 2014-06-12 Tom Tromey <tromey@redhat.com>
7799
7800 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7801 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7802 (parse_debug_format_options): Likewise.
7803 (gdbserver_usage): Likewise.
7804 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7805 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7806 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7807 against libiberty.
7808 ($(LIBGNU)): Depend on libiberty.
7809 (all-lib): Recurse into all subdirs.
7810 (install-only): Invoke "install" target in subdirs.
7811 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7812 targets.
7813 * configure: Rebuild.
7814 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7815 for vasprintf, vsnprintf, or gettimeofday.
7816 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7817 srv_tgtobj.
7818
7819 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7820
7821 * development.sh: Delete.
7822 * Makefile.in (config.status): Adjust dependency on development.sh.
7823 * configure.ac: Adjust development.sh source call.
7824 * configure: Regenerate.
7825
7826 2014-06-02 Pedro Alves <palves@redhat.com>
7827
7828 * ax.c (gdb_free_agent_expr): New function.
7829 * ax.h (gdb_free_agent_expr): New declaration.
7830 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7831 list.
7832 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7833 static.
7834 (clear_breakpoint_conditions_and_commands): New function.
7835 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7836 (clear_breakpoint_conditions_and_commands): New declaration.
7837
7838 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7839
7840 * linux-aarch64-low.c (asm/ptrace.h): Include.
7841
7842 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7843
7844 Fix TLS access for -static -pthread.
7845 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7846 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7847 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7848
7849 2014-05-20 Pedro Alves <palves@redhat.com>
7850
7851 * linux-aarch64-low.c (aarch64_insert_point)
7852 (aarch64_remove_point): No longer check whether the type is
7853 supported here. Adjust to new interface.
7854 (the_low_target): Install aarch64_supports_z_point_type as
7855 supports_z_point_type method.
7856 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7857 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7858 instead of a Z packet char. Adjust.
7859 (arm_supports_z_point_type): New function.
7860 (arm_insert_point, arm_remove_point): Adjust to new interface.
7861 (the_low_target): Install arm_supports_z_point_type.
7862 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7863 (cris_insert_point, cris_remove_point): Adjust to new interface.
7864 Don't check whether the type is supported here.
7865 (the_low_target): Install cris_supports_z_point_type.
7866 * linux-low.c (linux_supports_z_point_type): New function.
7867 (linux_insert_point, linux_remove_point): Adjust to new interface.
7868 * linux-low.h (struct linux_target_ops) <insert_point,
7869 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7870 raw_breakpoint pointer parameter.
7871 <supports_z_point_type>: New method.
7872 * linux-mips-low.c (mips_supports_z_point_type): New function.
7873 (mips_insert_point, mips_remove_point): Adjust to new interface.
7874 Use mips_supports_z_point_type.
7875 (the_low_target): Install mips_supports_z_point_type.
7876 * linux-ppc-low.c (the_low_target): Install NULL as
7877 supports_z_point_type method.
7878 * linux-s390-low.c (the_low_target): Install NULL as
7879 supports_z_point_type method.
7880 * linux-sparc-low.c (the_low_target): Install NULL as
7881 supports_z_point_type method.
7882 * linux-x86-low.c (x86_supports_z_point_type): New function.
7883 (x86_insert_point): Adjust to new insert_point interface. Use
7884 insert_memory_breakpoint. Adjust to new
7885 i386_low_insert_watchpoint interface.
7886 (x86_remove_point): Adjust to remove_point interface. Use
7887 remove_memory_breakpoint. Adjust to new
7888 i386_low_remove_watchpoint interface.
7889 (the_low_target): Install x86_supports_z_point_type.
7890 * lynx-low.c (lynx_target_ops): Install NULL as
7891 supports_z_point_type callback.
7892 * nto-low.c (nto_supports_z_point_type): New.
7893 (nto_insert_point, nto_remove_point): Adjust to new interface.
7894 (nto_target_ops): Install nto_supports_z_point_type.
7895 * mem-break.c: Adjust intro comment.
7896 (struct raw_breakpoint) <raw_type, size>: New fields.
7897 <inserted>: Update comment.
7898 <shlib_disabled>: Delete field.
7899 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7900 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7901 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7902 (raw_bkpt_type_to_target_hw_bp_type): New function.
7903 (find_enabled_raw_code_breakpoint_at): New function.
7904 (find_raw_breakpoint_at): New type and size parameters. Use them.
7905 (insert_memory_breakpoint): New function, based off
7906 set_raw_breakpoint_at.
7907 (remove_memory_breakpoint): New function.
7908 (set_raw_breakpoint_at): Reimplement.
7909 (set_breakpoint): New, based on set_breakpoint_at.
7910 (set_breakpoint_at): Reimplement.
7911 (delete_raw_breakpoint): Go through the_target->remove_point
7912 instead of assuming memory breakpoints.
7913 (find_gdb_breakpoint_at): Delete.
7914 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7915 (find_gdb_breakpoint): New function.
7916 (set_gdb_breakpoint_at): Delete.
7917 (z_type_supported): New function.
7918 (set_gdb_breakpoint_1): New function, loosely based off
7919 set_gdb_breakpoint_at.
7920 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7921 (delete_gdb_breakpoint_at): Delete.
7922 (delete_gdb_breakpoint_1): New function, loosely based off
7923 delete_gdb_breakpoint_at.
7924 (delete_gdb_breakpoint): New function.
7925 (clear_gdb_breakpoint_conditions): Rename to ...
7926 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7927 breakpoint.
7928 (add_condition_to_breakpoint): Make static.
7929 (add_breakpoint_condition): Take a struct breakpoint pointer
7930 instead of an address. Adjust.
7931 (gdb_condition_true_at_breakpoint): Rename to ...
7932 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7933 z_type parameter.
7934 (gdb_condition_true_at_breakpoint): Reimplement.
7935 (add_breakpoint_commands): Take a struct breakpoint pointer
7936 instead of an address. Adjust.
7937 (gdb_no_commands_at_breakpoint): Rename to ...
7938 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7939 parameter. Return true if no breakpoint was found. Change debug
7940 output.
7941 (gdb_no_commands_at_breakpoint): Reimplement.
7942 (run_breakpoint_commands): Rename to ...
7943 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7944 and change return type to boolean.
7945 (run_breakpoint_commands): New function.
7946 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7947 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7948 breakpoint. Go through the_target->remove_point instead of
7949 assuming memory breakpoint.
7950 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7951 software and hardware breakpoints.
7952 (reinsert_raw_breakpoint): Go through the_target->insert_point
7953 instead of assuming memory breakpoint.
7954 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7955 software and hardware breakpoints.
7956 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7957 Check both software and hardware breakpoints.
7958 (validate_inserted_breakpoint): Assert the breakpoint is a
7959 software breakpoint. Set the inserted flag to -1 instead of
7960 setting shlib_disabled.
7961 (delete_disabled_breakpoints): Adjust.
7962 (validate_breakpoints): Only validate software breakpoints.
7963 Adjust to inserted flag change.
7964 (check_mem_read, check_mem_write): Skip breakpoint types other
7965 than software breakpoints. Adjust to inserted flag change.
7966 * mem-break.h (enum raw_bkpt_type): New enum.
7967 (raw_breakpoint, struct process_info): Forward declare.
7968 (Z_packet_to_target_hw_bp_type): Delete declaration.
7969 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7970 (set_gdb_breakpoint, delete_gdb_breakpoint)
7971 (clear_breakpoint_conditions): New declarations.
7972 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7973 (breakpoint_inserted_here): Update comment.
7974 (add_breakpoint_condition, add_breakpoint_commands): Replace
7975 address parameter with a breakpoint pointer parameter.
7976 (gdb_breakpoint_here): Update comment.
7977 (delete_gdb_breakpoint_at): Delete.
7978 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7979 * server.c (process_point_options): Take a struct breakpoint
7980 pointer instead of an address. Adjust.
7981 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7982 delete_gdb_breakpoint.
7983 * spu-low.c (spu_target_ops): Install NULL as
7984 supports_z_point_type method.
7985 * target.h: Include mem-break.h.
7986 (struct target_ops) <prepare_to_access_memory>: Update comment.
7987 <supports_z_point_type>: New field.
7988 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7989 instead of a char. Also take a raw breakpoint pointer.
7990 * win32-arm-low.c (the_low_target): Install NULL as
7991 supports_z_point_type.
7992 * win32-i386-low.c (i386_supports_z_point_type): New function.
7993 (i386_insert_point, i386_remove_point): Adjust to new interface.
7994 (the_low_target): Install i386_supports_z_point_type.
7995 * win32-low.c (win32_supports_z_point_type): New function.
7996 (win32_insert_point, win32_remove_point): Adjust to new interface.
7997 (win32_target_ops): Install win32_supports_z_point_type.
7998 * win32-low.h (struct win32_target_ops):
7999 <supports_z_point_type>: New method.
8000 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8001 instead of a char. Also take a raw breakpoint pointer.
8002
8003 2014-05-20 Pedro Alves <palves@redhat.com>
8004
8005 * mem-break.h: Include break-common.h.
8006 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8007 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8008 (Z_packet_to_target_hw_bp_type): New declaration.
8009 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8010 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8011 (Z_PACKET_ACCESS_WP): Delete macros.
8012 (Z_packet_to_hw_type): Delete function.
8013 * i386-low.h: Don't include break-common.h here.
8014 (Z_packet_to_hw_type): Delete declaration.
8015 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8016 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8017 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8018 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8019 * linux-aarch64-low.c: Don't include break-common.h here.
8020 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8021 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8022 (Z_packet_to_target_hw_bp_type): Delete function.
8023 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8024 function.
8025 (mips_insert_point, mips_remove_point): Use
8026 Z_packet_to_target_hw_bp_type.
8027
8028 2014-05-20 Pedro Alves <palves@redhat.com>
8029
8030 * linux-aarch64-low.c: Include break-common.h.
8031 (enum target_point_type): Delete.
8032 (Z_packet_to_point_type): Rename to ...
8033 (Z_packet_to_target_hw_bp_type): ... this, and return a
8034 target_hw_bp_type instead.
8035 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8036 instead of an enum target_point_type.
8037 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8038 breakpoint type.
8039 (aarch64_dr_state_insert_one_point)
8040 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8041 (aarch64_handle_aligned_watchpoint)
8042 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8043 Take an enum target_hw_bp_type instead of an enum
8044 target_point_type.
8045 (aarch64_supports_z_point_type): New function.
8046 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8047 use Z_packet_to_target_hw_bp_type.
8048
8049 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8050
8051 * configure.ac: Only use -Werror by default when DEVELOPMENT
8052 is true.
8053 * configure: Regenerate.
8054
8055 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8056
8057 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8058 * linux-x86-low.c (X86_64_USER_REGS): New.
8059 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8060
8061 2014-04-28 Yao Qi <yao@codesourcery.com>
8062
8063 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8064 name.
8065
8066 2014-04-25 Pedro Alves <palves@redhat.com>
8067
8068 PR server/16255
8069 * linux-low.c (linux_attach_fail_reason_string): New function.
8070 (linux_attach_lwp): Delete.
8071 (linux_attach_lwp_1): Rename to ...
8072 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8073 argument. Remove "initial" parameter. Return int instead of
8074 void. Don't error or warn here.
8075 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8076 failure to attach to the tgid. Call warning when failing to
8077 attach to an lwp.
8078 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8079 argument. Remove "initial" parameter. Return int instead of
8080 void. Don't error or warn here.
8081 (linux_attach_fail_reason_string): New declaration.
8082 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8083 interface change. Use linux_attach_fail_reason_string.
8084
8085 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8086 Walfred Tedeschi <walfred.tedeschi@intel.com>
8087
8088 * Makefile.in: Added rules to handle new files
8089 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8090 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8091 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8092 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8093 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8094 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8095 x32-avx512-linux.o.
8096 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8097 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8098 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8099 i386/x32-avx512.xml.
8100 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8101 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8102 i386/x32-avx512-linux.xml.
8103 * i387-fp.c (num_avx512_k_registers): New constant for number
8104 of K registers.
8105 (num_avx512_zmmh_low_registers): New constant for number of
8106 lower ZMM registers (0-15).
8107 (num_avx512_zmmh_high_registers): New constant for number of
8108 higher ZMM registers (16-31).
8109 (num_avx512_ymmh_registers): New contant for number of higher
8110 YMM registers (ymm16-31 added by avx521 on x86_64).
8111 (num_avx512_xmm_registers): New constant for number of higher
8112 XMM registers (xmm16-31 added by AVX512 on x86_64).
8113 (struct i387_xsave): Add space for AVX512 registers.
8114 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8115 Add code to handle AVX512 registers.
8116 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8117 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8118 prototypei from generated file.
8119 (tdesc_amd64_avx512_linux): Likewise.
8120 (init_registers_x32_avx512_linux): Likewise.
8121 (tdesc_x32_avx512_linux): Likewise.
8122 (init_registers_i386_avx512_linux): Likewise.
8123 (tdesc_i386_avx512_linux): Likewise.
8124 (x86_64_regmap): Add AVX512 registers.
8125 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8126 mask.
8127 (initialize_low_arch): Add code to initialize AVX512 registers.
8128
8129 2014-04-23 Pedro Alves <palves@redhat.com>
8130
8131 * mem-break.c (find_gdb_breakpoint_at): Make static.
8132 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8133
8134 2014-04-23 Pedro Alves <palves@redhat.com>
8135
8136 * i386-low.c: Don't include break-common.h here.
8137 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8138 prototype to take target_hw_bp_type as argument instead of a Z
8139 packet char.
8140 * i386-low.h: Include break-common.h here.
8141 (Z_packet_to_hw_type): Declare.
8142 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8143 prototypes.
8144 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8145 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8146 (x86_remove_point): Convert the packet number to a
8147 target_hw_bp_type before calling i386_low_remove_watchpoint.
8148 * win32-i386-low.c (i386_insert_point): Convert the packet number
8149 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8150 (i386_remove_point): Convert the packet number to a
8151 target_hw_bp_type before calling i386_low_remove_watchpoint.
8152
8153 2014-04-23 Pedro Alves <palves@redhat.com>
8154
8155 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8156
8157 2014-04-10 Pedro Alves <palves@redhat.com>
8158
8159 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8160 Check if the condition or command is NULL before checking if the
8161 breakpoint is known. On success, return true.
8162 * mem-break.h (add_breakpoint_condition): Document return.
8163 (add_breakpoint_commands): Add describing comment.
8164 * server.c (skip_to_semicolon): New function.
8165 (process_point_options): Use it.
8166
8167 2014-04-09 Pedro Alves <palves@redhat.com>
8168
8169 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8170 to lwpid_of.
8171
8172 2014-02-27 Pedro Alves <palves@redhat.com>
8173
8174 PR 12702
8175 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8176 macros.
8177 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8178 output.
8179 (last_thread_of_process_p): Take a PID argument instead of a
8180 thread pointer.
8181 (linux_wait_for_lwp): Delete.
8182 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8183 functions.
8184 (linux_low_filter_event): New function, party factored out from
8185 linux_wait_for_event.
8186 (linux_wait_for_event): Rename to ...
8187 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8188 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8189 sigsuspend. Check for zombie leaders.
8190 (linux_wait_for_event): Reimplement as wrapper around
8191 linux_wait_for_event_filtered.
8192 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8193 a normal or signal exit is seen, it's the whole process exiting.
8194 (wait_for_sigstop): No longer a for_each_inferior callback.
8195 Rewrite on top of linux_wait_for_event_filtered.
8196 (stop_all_lwps): Call wait_for_sigstop directly.
8197 * server.c (resume, handle_target_event): Handle
8198 TARGET_WAITKIND_NO_RESUMED.
8199
8200 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8201
8202 * win32-low.c (psapi_get_dll_name,
8203 * win32_CreateToolhelp32Snapshot): Delete.
8204 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8205 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8206 Delete.
8207 (handle_load_dll): Add function description.
8208 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8209
8210 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8211
8212 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8213 Add comment.
8214 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8215 base address when calling win32_add_one_solib.
8216 (handle_load_dll): Delete local variable load_addr.
8217 Remove 0x1000 offset applied to DLL base address when calling
8218 win32_add_one_solib.
8219 (handle_unload_dll): Add comment.
8220
8221 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8222
8223 * win32-low.c (win32_add_all_dlls): Renames
8224 win32_ensure_ntdll_loaded. Rewrite function documentation.
8225 Adjust implementation to always load all DLLs.
8226 Add 0x1000 offset to DLL base address when calling
8227 win32_add_one_solib.
8228 (child_initialization_done): New static global.
8229 (do_initial_child_stuff): Set child_initialization_done to
8230 zero during child initialization, and 1 after. Replace call
8231 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8232 Add comment.
8233 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8234 (handle_unload_dll): Add function documentation.
8235 (get_child_debug_event): Ignore load and unload DLL events
8236 during child initialization.
8237
8238 2014-02-20 Doug Evans <dje@google.com>
8239
8240 Remove global all_lwps.
8241 * inferiors.h (ptid_of): Move here from linux-low.h.
8242 (pid_of, lwpid_of): Ditto.
8243 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8244 parameter is a struct thread_info * now.
8245 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8246 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8247 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8248 directly.
8249 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8250 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8251 * linux-arm-low.c (update_registers_callback): Update, "entry"
8252 parameter is a struct thread_info * now.
8253 Fetch lwpid from current_inferior directly.
8254 (arm_insert_point): Pass &all_threads to find_inferior instead of
8255 &all_lwps.
8256 (arm_remove_point): Ditto.
8257 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8258 (arm_prepare_to_resume): Fetch pid from thread.
8259 (arm_read_description): Fetch lwpid from current_inferior directly.
8260 * linux-low.c (all_lwps): Delete.
8261 (delete_lwp): Delete call to remove_inferior.
8262 (handle_extended_wait): Fetch lwpid from thread.
8263 (add_lwp): Don't set lwp->entry.id. Remove call to
8264 add_inferior_to_list.
8265 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8266 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8267 (kill_one_lwp_callback): Ditto.
8268 (linux_kill): Don't dereference NULL pointer.
8269 Fetch ptid,lwpid from thread.
8270 (get_detach_signal): Fetch ptid from thread.
8271 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8272 Simplify call to regcache_invalidate_thread.
8273 (delete_lwp_callback): Update, "entry" parameter is a
8274 struct thread_info * now. Fetch pid from thread.
8275 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8276 (status_pending_p_callback): Update, "entry" parameter is a
8277 struct thread_info * now. Fetch ptid from thread.
8278 (find_lwp_pid): Update, "entry" parameter is a
8279 struct thread_info * now.
8280 (linux_wait_for_lwp): Fetch pid from thread.
8281 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8282 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8283 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8284 (dequeue_one_deferred_signal): Ditto.
8285 (cancel_breakpoint): Fetch ptid from current_inferior.
8286 (linux_wait_for_event): Pass &all_threads to find_inferior,
8287 not &all_lwps. Fetch ptid, lwpid from thread.
8288 (count_events_callback): Update, "entry" parameter is a
8289 struct thread_info * now.
8290 (select_singlestep_lwp_callback): Ditto.
8291 (select_event_lwp_callback): Ditto.
8292 (cancel_breakpoints_callback): Ditto.
8293 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8294 not &all_lwps.
8295 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8296 (unsuspend_one_lwp): Update, "entry" parameter is a
8297 struct thread_info * now.
8298 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8299 not &all_lwps.
8300 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8301 Fetch lwpid from thread, not lwp.
8302 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8303 Pass &all_threads to find_inferior, not &all_lwps.
8304 (send_sigstop): Fetch lwpid from thread, not lwp.
8305 (send_sigstop_callback): Update, "entry" parameter is a
8306 struct thread_info * now.
8307 (suspend_and_send_sigstop_callback): Ditto.
8308 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8309 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8310 struct thread_info * now.
8311 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8312 from thread, lwp.
8313 (lwp_running): Update, "entry" parameter is a
8314 struct thread_info * now.
8315 (stop_all_lwps): Fetch ptid from thread.
8316 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8317 (linux_resume_one_lwp): Fetch lwpid from thread.
8318 (linux_set_resume_request): Update, "entry" parameter is a
8319 struct thread_info * now. Fetch pid, lwpid from thread.
8320 (resume_status_pending_p): Update, "entry" parameter is a
8321 struct thread_info * now.
8322 (need_step_over_p): Ditto. Fetch lwpid from thread.
8323 (start_step_over): Fetch lwpid from thread.
8324 (linux_resume_one_thread): Update, "entry" parameter is a
8325 struct thread_info * now. Fetch lwpid from thread.
8326 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8327 (proceed_one_lwp): Update, "entry" parameter is a
8328 struct thread_info * now. Fetch lwpid from thread.
8329 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8330 struct thread_info * now.
8331 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8332 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8333 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8334 directly.
8335 (regsets_store_inferior_registers): Ditto.
8336 (fetch_register, store_register): Ditto.
8337 (linux_read_memory, linux_write_memory): Ditto.
8338 (linux_request_interrupt): Ditto.
8339 (linux_read_auxv): Ditto.
8340 (linux_xfer_siginfo): Ditto.
8341 (linux_qxfer_spu): Ditto.
8342 (linux_qxfer_libraries_svr4): Ditto.
8343 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8344 moved to inferiors.h.
8345 (get_lwp): Delete.
8346 (get_thread_lwp): Update.
8347 (struct lwp_info): Delete member "entry". Simplify comment for
8348 member "thread".
8349 (all_lwps): Delete.
8350 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8351 current_inferior directly.
8352 (update_watch_registers_callback): Update, "entry" parameter is a
8353 struct thread_info * now. Fetch pid from thread.
8354 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8355 (mips_insert_point): Fetch lwpid from current_inferior.
8356 Pass &all_threads to find_inferior, not &all_lwps.
8357 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8358 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8359 directly.
8360 (mips_stopped_data_address): Ditto.
8361 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8362 directly.
8363 * linux-tile-low.c (tile_arch_setup): Ditto.
8364 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8365 (update_debug_registers_callback): Update, "entry" parameter is a
8366 struct thread_info * now. Fetch pid from thread.
8367 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8368 Pass &all_threads to find_inferior, not &all_lwps.
8369 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8370 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8371 Pass &all_threads to find_inferior, not &all_lwps.
8372 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8373 (i386_dr_low_get_status): Ditto.
8374 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8375 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8376 (x86_linux_read_description): Ditto.
8377 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8378
8379 2014-02-20 Doug Evans <dje@google.com>
8380
8381 * inferiors.c (get_first_inferior): Fix buglet.
8382
8383 2014-02-19 Doug Evans <dje@google.com>
8384
8385 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8386 * inferiors.c (add_thread): Change result type to struct thread_info *.
8387 All callers updated.
8388 (add_lwp): Call add_thread here instead of in callers.
8389 All callers updated.
8390 * linux-low.h (get_lwp_thread): Rewrite.
8391 (struct lwp_info): New member "thread".
8392
8393 2014-02-19 Doug Evans <dje@google.com>
8394
8395 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8396 All callers updated.
8397
8398 2014-02-19 Doug Evans <dje@google.com>
8399
8400 * inferiors.c (add_thread): Fix whitespace.
8401
8402 2014-02-19 Doug Evans <dje@google.com>
8403
8404 * dll.c (clear_dlls): Replace accessing list implemention details
8405 with API function.
8406 * gdbthread.h (get_first_thread): Declare.
8407 * inferiors.c (for_each_inferior_with_data): New function.
8408 (get_first_thread): New function.
8409 (find_thread_ptid): Simplify.
8410 (get_first_inferior): New function.
8411 (clear_list): Delete.
8412 (one_inferior_p): New function.
8413 (clear_inferior_list): New function.
8414 (clear_inferiors): Update.
8415 * inferiors.h (for_each_inferior_with_data): Declare.
8416 (clear_inferior_list): Declare.
8417 (one_inferior_p): Declare.
8418 (get_first_inferior): Declare.
8419 * linux-low.c (linux_wait_for_event): Replace accessing list
8420 implemention details with API function.
8421 * server.c (target_running): Ditto.
8422 (accumulate_file_name_length): New function.
8423 (emit_dll_description): New function.
8424 (handle_qxfer_libraries): Replace accessing list implemention
8425 details with API function.
8426 (handle_qxfer_threads_worker): New function.
8427 (handle_qxfer_threads_proper): Replace accessing list implemention
8428 details with API function.
8429 (handle_query): Ditto.
8430 (visit_actioned_threads_callback_ftype): New typedef.
8431 (visit_actioned_threads_data): New struct.
8432 (visit_actioned_threads): Rewrite to be find_inferior callback.
8433 (resume): Call find_inferior.
8434 (handle_status): Replace accessing list implemention
8435 details with API function.
8436 (process_serial_event): Replace accessing list implemention details
8437 with API function.
8438 * target.c (set_desired_inferior): Replace accessing list implemention
8439 details with API function.
8440 * tracepoint.c (same_process_p): New function.
8441 (gdb_agent_about_to_close): Replace accessing list implemention
8442 details with API function.
8443 * win32-low.c (child_delete_thread): Replace accessing list
8444 implemention details with API function.
8445 (match_dll_by_basename): New function.
8446 (dll_is_loaded_by_basename): New function.
8447 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8448 details call to dll_is_loaded_by_basename.
8449
8450 2014-02-19 Doug Evans <dje@google.com>
8451
8452 * dll.h (struct dll_info): Add comment.
8453 * gdbthread.h (struct thread_info): Add comment.
8454 (current_ptid): Simplify.
8455 * inferiors.c (add_process): Update.
8456 (remove_process): Update.
8457 * inferiors.h (struct process_info): Rename member "head" to "entry".
8458 * linux-low.c (delete_lwp): Update.
8459 (add_lwp): Update.
8460 (last_thread_of_process_p): Update.
8461 (kill_one_lwp_callback, linux_kill): Update.
8462 (status_pending_p_callback): Update.
8463 (wait_for_sigstop): Update. Simplify read of ptid.
8464 (start_step_over): Update.
8465 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8466 (get_lwp_thread): Update.
8467 (struct lwp_info): Rename member "head" to "entry".
8468 * regcache.h (inferior_list_entry): Delete.
8469 * server.c (kill_inferior_callback): Update.
8470 (detach_or_kill_inferior_callback): Update.
8471 (print_started_pid): Update.
8472 (print_attached_pid): Update.
8473 (process_serial_event): Simplify read of ptid.
8474 * thread-db.c (thread_db_create_event): Update.
8475 (thread_db_get_tls_address): Update.
8476 * win32-low.c (current_inferior_ptid): Simplify.
8477
8478 2014-02-19 Tom Tromey <tromey@redhat.com>
8479
8480 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8481 argument.
8482 (target_supports_btrace): Update.
8483
8484 2014-02-14 Yao Qi <yao@codesourcery.com>
8485
8486 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8487 (rsp-low-ipa.o): New target.
8488
8489 2014-02-12 Tom Tromey <tromey@redhat.com>
8490
8491 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8492 convert_ascii_to_int.
8493 * regcache.c (registers_to_string): Likewise.
8494 * remote-utils.c (decode_M_packet): Likewise.
8495 * server.c (process_serial_event): Likewise.
8496
8497 2014-02-12 Tom Tromey <tromey@redhat.com>
8498
8499 * server.c (handle_query, handle_v_run): Use hex2bin, not
8500 unhexify.
8501 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8502
8503 2014-02-12 Tom Tromey <tromey@redhat.com>
8504
8505 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8506 convert_int_to_ascii.
8507 * regcache.c (registers_to_string, collect_register_as_string):
8508 Likewise.
8509 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8510 Likewise.
8511 * server.c (process_serial_event): Likewise.
8512 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8513 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8514
8515 2014-02-12 Tom Tromey <tromey@redhat.com>
8516
8517 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8518 bin2hex, not hexify.
8519 * tracepoint.c (cmd_qtstatus): Likewise.
8520
8521 2014-02-12 Tom Tromey <tromey@redhat.com>
8522
8523 * remote-utils.c (monitor_output): Pass explicit length to
8524 hexify.
8525
8526 2014-02-12 Tom Tromey <tromey@redhat.com>
8527
8528 * tracepoint.c: Include rsp-low.h.
8529 * server.c: Include rsp-low.h.
8530 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8531 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8532 declare.
8533 * remote-utils.c: Include rsp-low.h.
8534 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8535 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8536 (convert_int_to_ascii, convert_ascii_to_int): Move to
8537 common/rsp-low.c.
8538 * regcache.c: Include rsp-low.h.
8539 * ax.c: Include rsp-low.h.
8540 * Makefile.in (SFILES): Add common/rsp-low.c.
8541 (OBS): Add rsp-low.o.
8542 (rsp-low.o): New target.
8543
8544 2014-02-12 Tom Tromey <tromey@redhat.com>
8545
8546 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8547 Include print-utils.h.
8548 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8549 (plongest, thirty_two, phex_nz): Remove.
8550 * Makefile.in (SFILES): Add common/print-utils.c.
8551 (OBS): Add print-utils.o.
8552 (print-utils-ipa.o): New target.
8553 (print-utils.o): New target.
8554 (IPA_OBJS): Add print-utils-ipa.o.
8555
8556 2014-02-06 Tom Tromey <tromey@redhat.com>
8557
8558 * Makefile.in (SFILES): Fix indentation.
8559
8560 2014-02-05 Doug Evans <dje@google.com>
8561
8562 * linux-low.c (linux_wait_for_event): Improve comment.
8563 (linux_wait_1): Keep current_inferior in sync with event_child.
8564
8565 2014-01-22 Doug Evans <dje@google.com>
8566
8567 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8568
8569 2014-01-22 Doug Evans <dje@google.com>
8570
8571 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8572 * configure: Regenerate.
8573 * config.in: Regenerate.
8574 * Makefile.in (SFILES): Add debug.c.
8575 (OBS): Add debug.o.
8576 * debug.c: New file.
8577 * debug.h: New file.
8578 * linux-aarch64-low.c (*): Update all debugging printfs to use
8579 debug_printf instead of fprintf.
8580 * linux-arm-low.c (*): Ditto.
8581 * linux-cris-low.c (*): Ditto.
8582 * linux-crisv32-low.c (*): Ditto.
8583 * linux-m32r-low.c (*): Ditto.
8584 * linux-sparc-low.c (*): Ditto.
8585 * linux-x86.c (*): Ditto.
8586 * linux-low.c (*): Ditto.
8587 (linux_wait_1): Add calls to debug_enter, debug_exit.
8588 (linux_wait): Remove redundant debugging printf.
8589 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8590 (linux_resume, unstop_all_lwps): Ditto.
8591 * mem-break.c (*): Update all debugging printfs to use
8592 debug_printf instead of fprintf.
8593 * remote-utils.c (*): Ditto.
8594 * thread-db.c (*): Ditto.
8595 * server.c #include <ctype.h>, "gdb_vecs.h".
8596 (debug_threads): Moved to debug.c.
8597 (*): Update all debugging printfs to use debug_printf instead of
8598 fprintf.
8599 (start_inferior): Replace call to fflush with call to debug_flush.
8600 (monitor_show_help): Mention set debug-format.
8601 (parse_debug_format_options): New function.
8602 (handle_monitor_command): Handle "monitor set debug-format".
8603 (gdbserver_usage): Mention --debug-format.
8604 (main): Parse --debug-format.
8605 * server.h (debug_threads): Declaration moved to debug.h.
8606 #include "debug.h".
8607 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8608 trace_debug_1 that uses debug_printf.
8609 (tracepoint_look_up_symbols): Update all debugging printfs to use
8610 debug_printf instead of fprintf.
8611
8612 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8613
8614 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8615 sys/ptrace.h.
8616
8617 2014-01-17 Pedro Alves <palves@redhat.com>
8618
8619 PR build/16445
8620 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8621 defined after including gdb_proc_service.h.
8622
8623 2014-01-16 Doug Evans <dje@google.com>
8624
8625 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8626 (match_dll): Use it.
8627
8628 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8629
8630 * target.h (target_ops) <read_btrace>: Change parameters and
8631 return type to allow error reporting.
8632 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8633 trace reading errors on.
8634 * linux-low.c (linux_low_read_btrace): Pass trace reading
8635 errors on.
8636 (linux_low_disable_btrace): New.
8637
8638 2014-01-15 Doug Evans <dje@google.com>
8639
8640 * inferiors.c (thread_id_to_gdb_id): Delete.
8641 * inferiors.h (thread_id_to_gdb_id): Delete.
8642
8643 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8644
8645 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8646 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8647 versions.
8648
8649 2014-01-08 Pedro Alves <palves@redhat.com>
8650
8651 * server.c (handle_status): Don't discard previous queued stop
8652 replies or thread's pending status here.
8653 (main) <disconnection>: Do it here instead.
8654
8655 2014-01-08 Pedro Alves <palves@redhat.com>
8656
8657 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8658 * server.c (visit_actioned_threads, handle_pending_status): New
8659 function.
8660 (handle_v_cont): Factor out parts to ...
8661 (resume): ... this new function. If in all-stop, and a thread
8662 being resumed has a pending status, report it without actually
8663 resuming.
8664 (myresume): Adjust to use the new 'resume' function.
8665 (clear_pending_status_callback, set_pending_status_callback)
8666 (find_status_pending_thread_callback): New functions.
8667 (handle_status): Handle the case of multiple threads having
8668 interesting statuses to report. Report threads' real last signal
8669 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8670 with an interesting thread to report the status for, instead of
8671 always reporting the status of the first thread.
8672
8673 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8674
8675 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8676 * gdbreplay.c (gdbreplay_version): Likewise.
8677
8678 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8679
8680 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8681 iov.iov_len with the real length in use.
8682
8683 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8684
8685 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8686 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8687 for all targets that use win32-low.c.
8688 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8689 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8690
8691 2013-12-13 Pedro Alves <palves@redhat.com>
8692
8693 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8694 if equal to TARGET_WAITKIND_LOADED.
8695 * win32-low.c (cached_status): New static global.
8696 (win32_wait): Add declaration.
8697 (do_initial_child_stuff): Flush all initial pending debug events
8698 up to the initial breakpoint.
8699 (win32_wait): If CACHED_STATUS was set, return that instead
8700 of doing a real wait. Remove the code resuming the execution
8701 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8702 during the initial phase. Also remove the code changing
8703 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8704 TARGET_WAITKIND_STOPPED.
8705
8706 2013-12-11 Yao Qi <yao@codesourcery.com>
8707
8708 * notif.c (handle_notif_ack): Return 0 if no notification
8709 matches.
8710
8711 2013-11-20 Doug Evans <dje@google.com>
8712
8713 * linux-low.c (linux_set_resume_request): Fix comment.
8714
8715 2013-11-20 Doug Evans <dje@google.com>
8716
8717 * linux-low.c (resume_status_pending_p): Tweak comment.
8718
8719 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8720
8721 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8722 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8723 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8724 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8725 (srv_amd64_regobj): Add amd64-mpx.o.
8726 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8727 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8728 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8729 * i387-fp.c (num_pl_bnd_register) Added constant.
8730 (num_pl_bnd_cfg_registers) Added constant.
8731 (struct i387_xsave) Added reserved area and MPX fields.
8732 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8733 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8734 function.
8735 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8736 (init_registers_amd64_mpx_linux): Declare new function.
8737 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8738 (x86_64_regmap): Add MPX registers.
8739 (x86_linux_read_description): Add MPX case.
8740 (initialize_low_arch): Initialize MPX targets.
8741
8742 2013-11-18 Tom Tromey <tromey@redhat.com>
8743
8744 * configure: Rebuild.
8745 * configure.ac: Don't check for stdlib.h.
8746 * gdbreplay.c: Unconditionally include stdlib.h.
8747
8748 2013-11-18 Tom Tromey <tromey@redhat.com>
8749
8750 * config.in: Rebuild.
8751 * configure: Rebuild.
8752 * configure.ac: Don't use AC_HEADER_DIRENT.
8753
8754 2013-11-18 Tom Tromey <tromey@redhat.com>
8755
8756 * server.h: Don't check HAVE_STRING_H.
8757 * gdbreplay.c: Don't check HAVE_STRING_H.
8758 * configure: Rebuild.
8759
8760 2013-11-18 Tom Tromey <tromey@redhat.com>
8761
8762 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8763 LIBGNU.
8764
8765 2013-11-08 Tom Tromey <tromey@redhat.com>
8766
8767 * configure, config.in: Rebuild.
8768 * configure.ac: Remove unused configury.
8769
8770 2013-11-08 Tom Tromey <tromey@redhat.com>
8771
8772 * acinclude.m4: Include common.m4, codeset.m4.
8773 * configure, config.in: Rebuild.
8774 * configure.ac: Use GDB_AC_COMMON.
8775
8776 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8777
8778 * linux-s390-low.c (HWCAP_S390_TE): New define.
8779 (s390_arch_setup): Consider the TE field in the HWCAP for
8780 determining 'have_regset_tdb'.
8781
8782 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8783
8784 PR gdb/16014
8785 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8786 call to sizeof.
8787
8788 2013-10-02 Pedro Alves <palves@redhat.com>
8789
8790 * server.c (process_serial_event): Don't output "GDBserver
8791 exiting" if GDB is connected through stdio.
8792 * target.c (mywait): Likewise, be silent if GDB is connected
8793 through stdio.
8794
8795 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8796
8797 * lynx-low.c (lynx_add_threads_after_attach): New function.
8798 (lynx_attach): Remove call to add_thread. Add call to
8799 lynx_add_threads_after_attach instead.
8800
8801 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8802
8803 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8804 * config.in, configure: Regenerated.
8805
8806 2013-09-18 Yao Qi <yao@codesourcery.com>
8807
8808 PR server/15959
8809 * server.c (start_inferior): Clear 'resume_info'.
8810
8811 2013-09-16 Jiong Wang <jiwang@tilera.com>
8812
8813 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8814 for each register.
8815
8816 2013-09-16 Jiong Wang <jiwang@tilera.com>
8817
8818 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8819 linux-tile-low.o to srv_tgtobj.
8820
8821 2013-09-16 Will Newton <will.newton@linaro.org>
8822
8823 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8824 out regs.
8825
8826 2013-09-06 Pedro Alves <palves@redhat.com>
8827
8828 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8829 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8830 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8831 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8832 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8833 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8834
8835 2013-09-06 Pedro Alves <palves@redhat.com>
8836
8837 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8838 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8839
8840 2013-09-06 Pedro Alves <palves@redhat.com>
8841
8842 * linux-amd64-ipa.c: Include tracepoint.h.
8843 * linux-i386-ipa.c: Include tracepoint.h.
8844
8845 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8846
8847 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8848 (ps_get_thread_area): New function.
8849
8850 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8851
8852 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8853 (initialize_low_arch): Call init_registers_crisv32 rather than
8854 init_register_crisv32.
8855
8856 2013-09-05 Pedro Alves <palves@redhat.com>
8857
8858 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8859 to ...
8860 * hostio.h: ... this new file.
8861 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8862 win32-low.c: Include hostio.h.
8863
8864 2013-09-05 Pedro Alves <palves@redhat.com>
8865
8866 * server.h (gdb_client_data, handler_func, callback_handler_func)
8867 (delete_file_handler, add_file_handler, append_callback_event)
8868 (delete_callback_event, start_event_loop, initialize_event_loop):
8869 Move to event-loop.h and include it.
8870 * event-loop.h: New file.
8871
8872 2013-09-05 Pedro Alves <palves@redhat.com>
8873
8874 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8875 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8876 (loaded_dll, unloaded_dll): Move to ...
8877 * dll.h: ... this new file.
8878 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8879
8880 2013-09-05 Pedro Alves <palves@redhat.com>
8881
8882 * server.h (current_process, get_thread_process, all_processes)
8883 (add_inferior_to_list, for_each_inferior, current_inferior)
8884 (remove_inferior, add_process, remove_process, find_process_pid)
8885 (have_started_inferiors_p, have_attached_inferiors_p)
8886 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8887 (clear_inferiors, find_inferior, find_inferior_id)
8888 (inferior_target_data, set_inferior_target_data)
8889 (inferior_regcache_data, set_inferior_regcache_data): Move to
8890 inferiors.h, and include it.
8891 * inferiors.h: New file.
8892
8893 2013-09-05 Pedro Alves <palves@redhat.com>
8894
8895 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8896 Move ...
8897 * ax.h: ... here.
8898
8899 2013-09-05 Pedro Alves <palves@redhat.com>
8900
8901 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8902 tracepoint.h.
8903 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8904 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8905 (handle_tracepoint_general_set, handle_tracepoint_query)
8906 (tracepoint_finished_step, tracepoint_was_hit)
8907 (release_while_stepping_state_list, current_traceframe)
8908 (in_readonly_region, traceframe_read_mem)
8909 (fetch_traceframe_registers, traceframe_read_sdata)
8910 (traceframe_read_info, struct fast_tpoint_collect_status)
8911 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8912 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8913 (supply_fast_tracepoint_registers)
8914 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8915 (ipa_tdesc, claim_trampoline_space)
8916 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8917 (agent_mem_read, agent_get_trace_state_variable_value)
8918 (agent_set_trace_state_variable_value, agent_tsv_read)
8919 (agent_mem_read_string, get_raw_reg_func_addr)
8920 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8921 * tracepoint.h: ... this new file.
8922
8923 2013-09-05 Pedro Alves <palves@redhat.com>
8924
8925 * server.h (perror_with_name, error, fatal, warning, paddress)
8926 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8927 include it.
8928 * utils.h: New file.
8929
8930 2013-09-05 Pedro Alves <palves@redhat.com>
8931
8932 * server.h (remote_debug, noack_mode, transport_is_reliable)
8933 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8934 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8935 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8936 (write_enn, initialize_async_io, enable_async_io)
8937 (disable_async_io, check_remote_input_interrupt_request)
8938 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8939 (dead_thread_notify, prepare_resume_reply)
8940 (decode_address_to_semicolon, decode_address, decode_m_packet)
8941 (decode_M_packet, decode_X_packet, decode_xfer_write)
8942 (decode_search_memory_packet, unhexify, hexify)
8943 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8944 (look_up_one_symbol, relocate_instruction)
8945 (monitor_output): Move to remote-utils.h, and include it.
8946 * remote-utils.h: New file.
8947
8948 2013-09-05 Pedro Alves <palves@redhat.com>
8949
8950 * server.h (_): Delete.
8951
8952 2013-09-02 Pedro Alves <palves@redhat.com>
8953
8954 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8955 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8956 allocated.
8957 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8958
8959 2013-09-02 Pierre Muller <muller@sourceware.org>
8960
8961 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8962 or WriteProcessMemory complete successfully and handle
8963 ERROR_PARTIAL_COPY error.
8964
8965 2013-09-02 Pedro Alves <palves@redhat.com>
8966
8967 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8968 error instead of EIO.
8969
8970 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8971
8972 PR server/15604
8973 * linux-low.c: Include filestuff.h.
8974 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8975 * lynx-low.c: Include filestuff.h.
8976 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8977 * server.c: Include filestuff.h.
8978 (main): Call notice_open_fds.
8979 * spu-low.c: Include filestuff.h.
8980 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8981
8982 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8983
8984 * Makefile.in: Explain why ../target and ../nat are not
8985 listed as include file search paths.
8986 (linux-waitpid.o): New object file rule.
8987 * configure.srv (srv_native_linux_obj): New variable.
8988 Replace all occurrences of linux native object files with
8989 $srv_native_linux_obj.
8990 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8991 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8992 (linux_enable_event_reporting): Remove declaration.
8993 (my_waitpid): Moved to common/linux-waitpid.c.
8994 (linux_wait_for_event): Pass ptid when calling
8995 linux_enable_event_reporting.
8996 (linux_supports_tracefork_flag): Remove.
8997 (linux_enable_event_reporting): Likewise.
8998 (linux_tracefork_grandchild): Remove.
8999 (STACK_SIZE): Moved to common/linux-ptrace.c.
9000 (linux_tracefork_child): Remove.
9001 (linux_test_for_tracefork): Remove.
9002 (linux_look_up_symbols): Call linux_supports_traceclone.
9003 (initialize_low): Remove call to linux_test_for_tracefork.
9004 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9005 common/linux-ptrace.h.
9006 (PTRACE_TYPE_ARG4): Likewise.
9007 Include linux-ptrace.h.
9008
9009 2013-08-21 Pedro Alves <palves@redhat.com>
9010
9011 * config.in: Renegerate.
9012
9013 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9014
9015 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9016 (SFILES): Remove $(srcdir)/common/target-common.c and
9017 add $(srcdir)/target/waitstatus.c.
9018 (OBS): Remove target-common.o and add waitstatus.o.
9019 (server_h): Remove $(srcdir)/../common/target-common.h and
9020 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9021 and $(srcdir)/../target/waitstatus.h.
9022 (target-common.o): Remove.
9023 (waitstatus.o): New target object file.
9024 * target.h: Do not include target-common.h and
9025 include target/resume.h, target/wait.h and
9026 target/waitstatus.h.
9027
9028 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9029
9030 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9031 to PTRACE_TYPE_ARG3.
9032 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9033 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9034 PTRACE_TYPE_ARG4.
9035 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9036 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9037
9038 2013-07-27 Jie Zhang <jie@codesourcery.com>
9039 Daniel Jacobowitz <dan@codesourcery.com>
9040 Yao Qi <yao@codesourcery.com>
9041
9042 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9043 (mips-linux-watch.o): New rule.
9044 (mips_linux_watch_h): New variable.
9045 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9046 srv_tgtobj.
9047 * linux-mips-low.c: Include mips-linux-watch.h.
9048 (struct arch_process_info, struct arch_lwp_info): New.
9049 (update_watch_registers_callback): New function.
9050 (mips_linux_new_process, mips_linux_new_thread) New functions.
9051 (mips_linux_prepare_to_resume, mips_insert_point): New
9052 functions.
9053 (mips_remove_point, mips_stopped_by_watchpoint): New
9054 functions.
9055 (rsp_bp_type_to_target_hw_bp_type): New function.
9056 (mips_stopped_data_address): New function.
9057 (the_low_target): Add watchpoint support functions.
9058
9059 2013-07-27 Yao Qi <yao@codesourcery.com>
9060
9061 * i386-low.c: Include break-common.h.
9062 (enum target_hw_bp_type): Remove.
9063
9064 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9065
9066 * Makefile.in (SFILES): /common/target-common.c.
9067 (OBS): Add target-common.o.
9068 (server_h): Add $(srcdir)/../common/target-common.h.
9069 (target-common.o): New target.
9070 * server.c (queue_stop_reply_callback): Free
9071 status string after use.
9072 * target.c (target_waitstatus_to_string): Remove.
9073 * target.h: Include target-common.h.
9074 (resume_kind): Likewise.
9075 (target_waitkind): Likewise.
9076 (target_waitstatus): Likewise.
9077 (TARGET_WNOHANG): Likewise.
9078
9079 2013-07-04 Yao Qi <yao@codesourcery.com>
9080
9081 * Makefile.in (host_alias): Use @host_noncanonical@.
9082 (target_alias): Use @target_noncanonical@.
9083 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9084 ACX_NONCANONICAL_HOST.
9085 * configure: Regenerated.
9086
9087 Revert:
9088 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9089
9090 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9091 * configure: Rebuild.
9092 * Makefile.in (version_host, version_target): Get from configure.
9093 (version.c): Use $(version_host) and $(version_target).
9094
9095 2013-07-03 Pedro Alves <palves@redhat.com>
9096
9097 * Makefile.in (config.status): Depend on development.sh.
9098 * acinclude.m4: Include libmcheck.m4.
9099 * configure: Regenerate.
9100
9101 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9102
9103 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9104 attribute inside the parentheses.
9105 (winapi_DebugSetProcessKillOnExit): Ditto.
9106 (winapi_DebugBreakProcess): Ditto.
9107 (winapi_GenerateConsoleCtrlEvent): Ditto.
9108
9109 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9110
9111 * notif.h (notif_event): Add a dummy member to avoid compiler
9112 errors.
9113
9114 2013-07-01 Pedro Alves <palves@redhat.com>
9115
9116 * hostio.c (HOSTIO_PATH_MAX): Define.
9117 (require_filename, handle_open, handle_unlink, handle_readlink):
9118 Use it.
9119
9120 2013-07-01 Pedro Alves <palves@redhat.com>
9121
9122 * server.h: Include "pathmax.h".
9123 * linux-low.c: Don't include sys/param.h.
9124 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9125 MAXPATHLEN.
9126 * win32-low.c: Don't include sys/param.h.
9127 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9128
9129 2013-07-01 Pedro Alves <palves@redhat.com>
9130
9131 * event-loop.c: Don't check HAVE_UNISTD_H before including
9132 <unistd.h>.
9133 * gdbreplay.c: Likewise.
9134 * remote-utils.c: Likewise.
9135 * server.c: Likewise.
9136 * configure.ac: Don't check for unistd.h.
9137 * configure: Regenerate.
9138
9139 2013-06-28 Tom Tromey <tromey@redhat.com>
9140
9141 * Makefile.in (version.c): Use version.in, not
9142 common/version.in.
9143
9144 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9145
9146 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9147 * configure: Rebuild.
9148 * Makefile.in (version_host, version_target): Get from configure.
9149 (version.c): Use $(version_host) and $(version_target).
9150
9151 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9152
9153 Fix trace-status to output user name without trailing colon.
9154 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9155
9156 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9157
9158 Fix trace-status to output proper start-time and stop-time.
9159 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9160 output start time and stop time in hex as gdb expects.
9161
9162 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9163
9164 * tracepoint.c (build_traceframe_info_xml): Output trace state
9165 variables present in the trace buffer.
9166
9167 2013-06-24 Tom Tromey <tromey@redhat.com>
9168
9169 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9170 create-version.sh.
9171 (version.o): Remove.
9172 * gdbreplay.c: Include version.h.
9173 (version, host_name): Don't declare.
9174 * server.h: Include version.h.
9175 (version, host_name): Don't declare.
9176
9177 2013-06-12 Pedro Alves <palves@redhat.com>
9178
9179 * linux-x86-low.c (linux_is_elf64): Delete global.
9180 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9181 with local linux_pid_exe_is_elf_64_file use.
9182
9183 2013-06-11 Pedro Alves <palves@redhat.com>
9184
9185 * linux-low.c (regset_disabled, disable_regset): New functions.
9186 (regsets_fetch_inferior_registers)
9187 (regsets_store_inferior_registers): Use them.
9188 (initialize_regsets_info); Don't allocate the disabled_regsets
9189 array here.
9190 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9191 comment.
9192
9193 2013-06-11 Pedro Alves <palves@redhat.com>
9194
9195 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9196 xmalloc.
9197
9198 2013-06-11 Pedro Alves <palves@redhat.com>
9199
9200 * linux-x86-low.c (initialize_low_arch): Call
9201 init_registers_x32_avx_linux.
9202
9203 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9204
9205 Fix compatibility with Android Bionic.
9206 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9207 it is not empty.
9208
9209 2013-06-07 Pedro Alves <palves@redhat.com>
9210
9211 PR server/14823
9212 * Makefile.in (OBS): Add tdesc.o.
9213 (IPA_OBJS): Add tdesc-ipa.o.
9214 (tdesc-ipa.o): New rule.
9215 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9216 interface.
9217 * linux-low.c (new_inferior): Delete.
9218 (disabled_regsets, num_regsets): Delete.
9219 (linux_add_process): Adjust to set the new per-process
9220 new_inferior flag.
9221 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9222 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9223 was a stop. When calling arch_setup, switch the current inferior
9224 to the thread that got an event.
9225 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9226 (regsets_fetch_inferior_registers)
9227 (regsets_store_inferior_registers): New regsets_info parameter.
9228 Adjust to use it.
9229 (linux_register_in_regsets): New regs_info parameter. Adjust to
9230 use it.
9231 (register_addr, fetch_register, store_register): New usrregs_info
9232 parameter. Adjust to use it.
9233 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9234 parameter regs_info. Adjust to use it.
9235 (linux_fetch_registers): Get the current inferior's regs_info, and
9236 adjust to use it.
9237 (linux_store_registers): Ditto.
9238 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9239 (initialize_low): Don't initialize the target_regsets here. Call
9240 initialize_low_arch.
9241 * linux-low.h (target_regsets): Delete declaration.
9242 (struct regsets_info): New.
9243 (struct usrregs_info): New.
9244 (struct regs_info): New.
9245 (struct process_info_private) <new_inferior>: New field.
9246 (struct linux_target_ops): Delete the num_regs, regmap, and
9247 regset_bitmap fields. New field regs_info.
9248 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9249 * i387-fp.c (num_xmm_registers): Delete.
9250 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9251 calls to new interface.
9252 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9253 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9254 Infer the number of xmm registers from the regcache's target
9255 description.
9256 * i387-fp.h (num_xmm_registers): Delete.
9257 * inferiors.c (add_thread): Don't install the thread's regcache
9258 here.
9259 * proc-service.c (gregset_info): Fetch the current inferior's
9260 regs_info. Adjust to use it.
9261 * regcache.c: Include tdesc.h.
9262 (register_bytes, reg_defs, num_registers)
9263 (gdbserver_expedite_regs): Delete.
9264 (get_thread_regcache): If the thread doesn't have a regcache yet,
9265 create one, instead of aborting gdbserver.
9266 (regcache_invalidate_one): Rename to ...
9267 (regcache_invalidate_thread): ... this.
9268 (regcache_invalidate_one): New.
9269 (regcache_invalidate): Only invalidate registers of the current
9270 process.
9271 (init_register_cache): Add target_desc parameter, and use it.
9272 (new_register_cache): Ditto. Assert the target description has a
9273 non zero registers_size.
9274 (regcache_cpy): Add assertions. Adjust.
9275 (realloc_register_cache, set_register_cache): Delete.
9276 (registers_to_string, registers_from_string): Adjust.
9277 (find_register_by_name, find_regno, find_register_by_number)
9278 (register_cache_size): Add target_desc parameter, and use it.
9279 (free_register_cache_thread, free_register_cache_thread_one)
9280 (regcache_release, register_cache_size): New.
9281 (register_size): Add target_desc parameter, and use it.
9282 (register_data, supply_register, supply_register_zeroed)
9283 (supply_regblock, supply_register_by_name, collect_register)
9284 (collect_register_as_string, collect_register_by_name): Adjust.
9285 * regcache.h (struct target_desc): Forward declare.
9286 (struct regcache) <tdesc>: New field.
9287 (init_register_cache, new_register_cache): Add target_desc
9288 parameter.
9289 (regcache_invalidate_thread): Declare.
9290 (regcache_invalidate_one): Delete declaration.
9291 (regcache_release): Declare.
9292 (find_register_by_number, register_cache_size, register_size)
9293 (find_regno): Add target_desc parameter.
9294 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9295 declarations.
9296 * remote-utils.c: Include tdesc.h.
9297 (outreg, prepare_resume_reply): Adjust.
9298 * server.c: Include tdesc.h.
9299 (gdbserver_xmltarget): Delete declaration.
9300 (get_features_xml, process_serial_event): Adjust.
9301 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9302 declare.
9303 (struct process_info) <tdesc>: New field.
9304 (ipa_tdesc): Declare.
9305 * tdesc.c: New file.
9306 * tdesc.h: New file.
9307 * tracepoint.c: Include tdesc.h.
9308 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9309 (get_context_regcache): Adjust to pass ipa_tdesc down.
9310 (do_action_at_tracepoint): Adjust to get the register cache size
9311 from the context regcache's description.
9312 (traceframe_walk_blocks): Adjust to get the register cache size
9313 from the current trace frame's description.
9314 (traceframe_get_pc): Adjust to get current trace frame's
9315 description and pass it down.
9316 (gdb_collect): Adjust to get the register cache size from the
9317 IPA's description.
9318 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9319 (gdbserver_xmltarget): Delete.
9320 (initialize_low_tracepoint): Set the ipa's target description.
9321 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9322 (initialize_low_tracepoint): Set the ipa's target description.
9323 * linux-x86-low.c: Include tdesc.h.
9324 [__x86_64__] (is_64bit_tdesc): New.
9325 (ps_get_thread_area, x86_get_thread_area): Use it.
9326 (i386_cannot_store_register): Rename to ...
9327 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9328 (i386_cannot_fetch_register): Rename to ...
9329 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9330 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9331 to new interface.
9332 (target_regsets): Rename to ...
9333 (x86_regsets): ... this.
9334 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9335 interface.
9336 (x86_siginfo_fixup): Use is_64bit_tdesc.
9337 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9338 (tdesc_x32_avx_linux, tdesc_x32_linux)
9339 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9340 Declare.
9341 (x86_linux_update_xmltarget): Delete.
9342 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9343 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9344 (AMD64_LINUX_USER64_CS): New.
9345 (x86_linux_read_description): New, based on
9346 x86_linux_update_xmltarget.
9347 (same_process_callback): New.
9348 (x86_arch_setup_process_callback): New.
9349 (x86_linux_update_xmltarget): New.
9350 (x86_regsets_info): New.
9351 (amd64_linux_regs_info): New.
9352 (i386_linux_usrregs_info): New.
9353 (i386_linux_regs_info): New.
9354 (x86_linux_regs_info): New.
9355 (x86_arch_setup): Reimplement.
9356 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9357 (x86_emit_ops): Ditto.
9358 (the_low_target): Adjust. Install x86_linux_regs_info,
9359 x86_cannot_fetch_register, and x86_cannot_store_register.
9360 (initialize_low_arch): New.
9361 * linux-ia64-low.c (tdesc_ia64): Declare.
9362 (ia64_fetch_register): Adjust.
9363 (ia64_usrregs_info, regs_info): New globals.
9364 (ia64_regs_info): New function.
9365 (the_low_target): Adjust.
9366 (initialize_low_arch): New function.
9367 * linux-sparc-low.c (tdesc_sparc64): Declare.
9368 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9369 Adjust.
9370 (sparc_arch_setup): New function.
9371 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9372 (the_low_target): Adjust.
9373 (initialize_low_arch): New function.
9374 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9375 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9376 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9377 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9378 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9379 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9380 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9381 (tdesc_powerpc_isa205_vsx64l): Declare.
9382 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9383 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9384 (ppc_set_pc, ppc_get_hwcap): Adjust.
9385 (ppc_usrregs_info): Forward declare.
9386 (!__powerpc64__) ppc_regmap_adjusted: New global.
9387 (ppc_arch_setup): Adjust to the current process'es target
9388 description.
9389 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9390 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9391 (ppc_store_evrregset): Adjust.
9392 (target_regsets): Rename to ...
9393 (ppc_regsets): ... this, and make static.
9394 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9395 (ppc_regs_info): New function.
9396 (the_low_target): Adjust.
9397 (initialize_low_arch): New function.
9398 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9399 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9400 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9401 (tdesc_s390x_linux64v2): Declare.
9402 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9403 (s390_fill_gregset, s390_store_last_break): Adjust.
9404 (target_regsets): Rename to ...
9405 (s390_regsets): ... this, and make static.
9406 (s390_get_pc, s390_set_pc): Adjust.
9407 (s390_get_hwcap): New target_desc parameter, and use it.
9408 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9409 (s390_arch_setup): Adjust to set the current process'es target
9410 description. Don't adjust the regmap.
9411 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9412 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9413 (regs_info_3264): New globals.
9414 (s390_regs_info): New function.
9415 (the_low_target): Adjust.
9416 (initialize_low_arch): New function.
9417 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9418 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9419 [__mips64] (init_registers_mips_linux)
9420 (init_registers_mips_dsp_linux): Delete defines.
9421 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9422 (have_dsp): New global.
9423 (mips_read_description): New, based on mips_arch_setup.
9424 (mips_arch_setup): Reimplement.
9425 (get_usrregs_info): New function.
9426 (mips_cannot_fetch_register, mips_cannot_store_register)
9427 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9428 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9429 (target_regsets): Rename to ...
9430 (mips_regsets): ... this, and make static.
9431 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9432 (dsp_regs_info, regs_info): New globals.
9433 (mips_regs_info): New function.
9434 (the_low_target): Adjust.
9435 (initialize_low_arch): New function.
9436 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9437 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9438 Declare.
9439 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9440 (arm_read_description): New, with bits factored from
9441 arm_arch_setup.
9442 (arm_arch_setup): Reimplement.
9443 (target_regsets): Rename to ...
9444 (arm_regsets): ... this, and make static.
9445 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9446 (arm_regs_info): New function.
9447 (the_low_target): Adjust.
9448 (initialize_low_arch): New function.
9449 * linux-m68k-low.c (tdesc_m68k): Declare.
9450 (target_regsets): Rename to ...
9451 (m68k_regsets): ... this, and make static.
9452 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9453 (m68k_regs_info): New function.
9454 (m68k_arch_setup): New function.
9455 (the_low_target): Adjust.
9456 (initialize_low_arch): New function.
9457 * linux-sh-low.c (tdesc_sharch): Declare.
9458 (target_regsets): Rename to ...
9459 (sh_regsets): ... this, and make static.
9460 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9461 (sh_regs_info, sh_arch_setup): New functions.
9462 (the_low_target): Adjust.
9463 (initialize_low_arch): New function.
9464 * linux-bfin-low.c (tdesc_bfin): Declare.
9465 (bfin_arch_setup): New function.
9466 (bfin_usrregs_info, regs_info): New globals.
9467 (bfin_regs_info): New function.
9468 (the_low_target): Adjust.
9469 (initialize_low_arch): New function.
9470 * linux-cris-low.c (tdesc_cris): Declare.
9471 (cris_arch_setup): New function.
9472 (cris_usrregs_info, regs_info): New globals.
9473 (cris_regs_info): New function.
9474 (the_low_target): Adjust.
9475 (initialize_low_arch): New function.
9476 * linux-cris-low.c (tdesc_crisv32): Declare.
9477 (cris_arch_setup): New function.
9478 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9479 (cris_regs_info): New function.
9480 (the_low_target): Adjust.
9481 (initialize_low_arch): New function.
9482 * linux-m32r-low.c (tdesc_m32r): Declare.
9483 (m32r_arch_setup): New function.
9484 (m32r_usrregs_info, regs_info): New globals.
9485 (m32r_regs_info): Adjust.
9486 (initialize_low_arch): New function.
9487 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9488 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9489 (tic6x_usrregs_info): Forward declare.
9490 (tic6x_read_description): New function, based on ...
9491 (tic6x_arch_setup): ... this. Reimplement.
9492 (target_regsets): Rename to ...
9493 (tic6x_regsets): ... this, and make static.
9494 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9495 (tic6x_regs_info): New function.
9496 (the_low_target): Adjust.
9497 (initialize_low_arch): New function.
9498 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9499 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9500 (target_regsets): Rename to ...
9501 (xtensa_regsets): ... this, and make static.
9502 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9503 globals.
9504 (xtensa_arch_setup, xtensa_regs_info): New functions.
9505 (the_low_target): Adjust.
9506 (initialize_low_arch): New function.
9507 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9508 (nios2_arch_setup): Set the current process'es tdesc.
9509 (target_regsets): Rename to ...
9510 (nios2_regsets): ... this.
9511 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9512 (nios2_regs_info): New function.
9513 (the_low_target): Adjust.
9514 (initialize_low_arch): New function.
9515 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9516 (aarch64_arch_setup): Set the current process'es tdesc.
9517 (target_regsets): Rename to ...
9518 (aarch64_regsets): ... this.
9519 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9520 (aarch64_regs_info): New function.
9521 (the_low_target): Adjust.
9522 (initialize_low_arch): New function.
9523 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9524 globals.
9525 (target_regsets): Rename to ...
9526 (tile_regsets): ... this.
9527 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9528 (tile_regs_info): New function.
9529 (tile_arch_setup): Set the current process'es tdesc.
9530 (the_low_target): Adjust.
9531 (initialize_low_arch): New function.
9532 * spu-low.c (tdesc_spu): Declare.
9533 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9534 * win32-arm-low.c (tdesc_arm): Declare.
9535 (arm_arch_setup): New function.
9536 (the_low_target): Install arm_arch_setup instead of
9537 init_registers_arm.
9538 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9539 (init_windows_x86): Rename to ...
9540 (i386_arch_setup): ... this. Set `win32_tdesc'.
9541 (the_low_target): Adjust.
9542 * win32-low.c (win32_tdesc): New global.
9543 (child_add_thread): Don't create the thread cache here.
9544 (do_initial_child_stuff): Set the new process'es tdesc.
9545 * win32-low.h (struct target_desc): Forward declare.
9546 (win32_tdesc): Declare.
9547 * lynx-i386-low.c (tdesc_i386): Declare global.
9548 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9549 * lynx-low.c (lynx_tdesc): New global.
9550 (lynx_add_process): Set the new process'es tdesc.
9551 * lynx-low.h (struct target_desc): Forward declare.
9552 (lynx_tdesc): Declare global.
9553 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9554 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9555 * nto-low.c (nto_tdesc): New global.
9556 (do_attach): Set the new process'es tdesc.
9557 * nto-low.h (struct target_desc): Forward declare.
9558 (nto_tdesc): Declare.
9559 * nto-x86-low.c (tdesc_i386): Declare.
9560 (nto_x86_arch_setup): Set `nto_tdesc'.
9561
9562 2013-06-04 Gary Benson <gbenson@redhat.com>
9563
9564 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9565 to qSupported response when appropriate.
9566 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9567 with nonzero-length annex.
9568 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9569 arguments supplied in annex.
9570
9571 2013-05-31 Doug Evans <dje@google.com>
9572
9573 PR server/15594
9574 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9575 64 bits in 64-cross-32 environment.
9576
9577 2013-05-28 Pedro Alves <palves@redhat.com>
9578
9579 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9580 (aarch64-without-fpu.c): Delete rule.
9581 * configure.srv (aarch64*-*-linux*): Remove references to
9582 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9583 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9584 declaration.
9585
9586 2013-05-24 Pedro Alves <palves@redhat.com>
9587
9588 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9589 instead of strchr/decode_address. Error if the range isn't split
9590 with a ','. Don't assume there's be a ':' in the action.
9591
9592 2013-05-23 Yao Qi <yao@codesourcery.com>
9593 Pedro Alves <palves@redhat.com>
9594
9595 * linux-low.c (lwp_in_step_range): New function.
9596 (linux_wait_1): If the thread was range stepping and stopped
9597 outside the stepping range, report the stop to GDB. Otherwise,
9598 continue stepping. Add range stepping debug output.
9599 (linux_set_resume_request): Copy the step range from the resume
9600 request to the lwp.
9601 (linux_supports_range_stepping): New.
9602 (linux_target_ops) <supports_range_stepping>: Set to
9603 linux_supports_range_stepping.
9604 * linux-low.h (struct linux_target_ops)
9605 <supports_range_stepping>: New field.
9606 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9607 * linux-x86-low.c (x86_supports_range_stepping): New.
9608 (the_low_target) <supports_range_stepping>: Set to
9609 x86_supports_range_stepping.
9610 * server.c (handle_v_cont): Handle 'r' action.
9611 (handle_v_requests): Append ";r" if the target supports range
9612 stepping.
9613 * target.h (struct thread_resume) <step_range_start,
9614 step_range_end>: New fields.
9615 (struct target_ops) <supports_range_stepping>:
9616 New field.
9617 (target_supports_range_stepping): New macro.
9618
9619 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9620
9621 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9622 confusion in comment.
9623
9624 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9625
9626 * lynx-low.c (struct process_info_private): New type.
9627 (lynx_add_process): New function.
9628 (lynx_create_inferior, lynx_attach): Replace calls to
9629 add_process by calls to lynx_add_process.
9630 (lynx_resume): If PTID is null, then try using
9631 current_process()->private->last_wait_event_ptid.
9632 Add comments.
9633 (lynx_clear_inferiors): Delete. The contents of that function
9634 has been inlined in lynx_mourn;
9635 (lynx_wait_1): Save the ptid in the process's private data.
9636 (lynx_mourn): Free the process' private data. Replace call
9637 to lynx_clear_inferiors by call to clear_inferiors.
9638
9639 2013-05-17 Yao Qi <yao@codesourcery.com>
9640
9641 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9642 the right place.
9643
9644 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9645
9646 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9647 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9648 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9649 PT_TEXT_END_ADDR guards. Update comments.
9650 (linux_target_op) <read_offsets>: Conditionally define to
9651 linux_read_offsets if the target is UCLIBC and if it defines
9652 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9653
9654 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9655 Andrew Jenner <andrew@codesourcery.com>
9656
9657 * Makefile.in (SFILES): Add linux-nios2-low.c.
9658 (clean): Add action to delete nios2-linux.c.
9659 (nios2-linux.c): New rule.
9660 * configure.srv: Add nios2*-*-linux*.
9661 * linux-nios2-low.c: New.
9662
9663 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9664
9665 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9666
9667 2013-04-25 Hui Zhu <hui@codesourcery.com>
9668
9669 PR gdb/15186
9670 * ax.c (ax_printf): Add fflush.
9671
9672 2013-04-22 Tom Tromey <tromey@redhat.com>
9673
9674 * Makefile.in (SFILES): Add filestuff.c.
9675 (OBS): Add filestuff.o.
9676 (filestuff.o): New target.
9677 * config.in, configure: Rebuild.
9678 * configure.ac: Check for fdwalk, pipe2.
9679
9680 2013-04-17 Pedro Alves <palves@redhat.com>
9681
9682 * configure.ac (USE_THREAD_DB): Delete variable.
9683 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9684 Don't AC_SUBST USE_THREAD_DB.
9685 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9686 * config.in, configure: Regenerate.
9687
9688 2013-04-16 Pedro Alves <palves@redhat.com>
9689
9690 * linux-low.h (struct lwp_info) <thread_known>: Move under
9691 the USE_THREAD_DB #ifdef.
9692
9693 2013-04-16 Pedro Alves <palves@redhat.com>
9694
9695 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9696 (linux-low.o): Delete rule.
9697 * linux-low.h: Always include "gdb_thread_db.h" instead of
9698 conditionally including thread_db.h.
9699 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9700 HAVE_THREAD_DB_H.
9701
9702 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9703
9704 * Makefile.in (install-only): Fix make install regression.
9705
9706 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9707
9708 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9709 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9710 installation.
9711 * gdbserver.1: Remove.
9712
9713 2013-03-22 Pedro Alves <palves@redhat.com>
9714
9715 * linux-low.c (handle_extended_wait): Don't call
9716 linux_enable_event_reporting.
9717
9718 2013-03-15 Tony Theodore <tonyt@logyst.com>
9719
9720 PR build/9098:
9721 * Makefile.in (SHELL): Use @SHELL@.
9722
9723 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9724
9725 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9726 compiler warning.
9727
9728 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9729
9730 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9731 Remove extraneous NULL element.
9732
9733 2013-03-13 Yao Qi <yao@codesourcery.com>
9734
9735 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9736 'V' block in trace frame.
9737
9738 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9739
9740 * target.h (struct target_ops): Add btrace ops.
9741 (target_supports_btrace): New macro.
9742 (target_enable_btrace): New macro.
9743 (target_disable_btrace): New macro.
9744 (target_read_btrace): New macro.
9745 * gdbthread.h (struct thread_info): Add btrace field.
9746 * server.c: Include btrace-common.h.
9747 (handle_btrace_general_set): New function.
9748 (handle_btrace_enable): New function.
9749 (handle_btrace_disable): New function.
9750 (handle_general_set): Call handle_btrace_general_set.
9751 (handle_qxfer_btrace): New function.
9752 (struct qxfer qxfer_packets[]): Add btrace entry.
9753 * inferiors.c (remove_thread): Disable btrace.
9754 * linux-low: Include linux-btrace.h.
9755 (linux_low_enable_btrace): New function.
9756 (linux_low_read_btrace): New function.
9757 (linux_target_ops): Add btrace ops.
9758 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9759 Add srv_linux_btrace=yes.
9760 (x86_64-*-linux*): Add linux-btrace.o.
9761 Add srv_linux_btrace=yes.
9762 * configure.ac: Define HAVE_LINUX_BTRACE.
9763 * config.in: Regenerated.
9764 * configure: Regenerated.
9765
9766 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9767
9768 * server.c (handle_qxfer): Preserve error message if -3 is
9769 returned.
9770 (qxfer): Document the -3 return value.
9771
9772 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9773
9774 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9775 (linux_btrace_h): New variable.
9776 (linux-btrace.o): New rule.
9777
9778 2013-03-08 Stan Shebs <stan@codesourcery.com>
9779 Hafiz Abid Qadeer <abidh@codesourcery.com>
9780
9781 * tracepoint.c (trace_buffer_size): New global.
9782 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9783 (init_trace_buffer): Change to one-argument function. Allocate
9784 trace buffer memory.
9785 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9786 handle QTBuffer:size packet.
9787 (cmd_bigqtbuffer_size): New function.
9788 (initialize_tracepoint): Call init_trace_buffer with
9789 DEFAULT_TRACE_BUFFER_SIZE.
9790 * server.c (handle_query): Add QTBuffer:size in the
9791 supported packets.
9792
9793 2013-03-07 Yao Qi <yao@codesourcery.com>
9794
9795 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9796 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9797 of -1.
9798 (cmd_qtsp): Adjust condition. Do post increment.
9799 Set cur_action and cur_step_action back to 0.
9800
9801 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9802
9803 PR server/15236
9804 * linux-low.c (linux_write_memory): Return early success if LEN is
9805 zero.
9806
9807 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9808
9809 * configure.srv: Add x86_64-*-cygwin* as target.
9810
9811 2013-02-28 Tom Tromey <tromey@redhat.com>
9812
9813 * configure.ac: Invoke AC_SYS_LARGEFILE.
9814 * configure, config.in: Rebuild.
9815
9816 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9817
9818 * win32-low.c: Throughout, fix format strings and casts of
9819 printf-like functions to avoid type related warnings on all
9820 platforms.
9821 (get_child_debug_event): Print dwDebugEventCode as hex since
9822 that's how it's usually documented.
9823
9824 2013-02-28 Yao Qi <yao@codesourcery.com>
9825
9826 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9827 pulongest.
9828
9829 2013-02-27 Jiong Wang <jiwang@tilera.com>
9830
9831 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9832 (reg-tilegx32.c): New rule.
9833 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9834 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9835 different register info initializer according to elf class.
9836 (init_registers_tilgx32): New function. The tilegx32 register info
9837 initializer.
9838 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9839 (tile_store_gregset): Likewise.
9840
9841 2013-02-27 Yao Qi <yao@codesourcery.com>
9842
9843 * server.c (process_point_options): Print debug message when
9844 debug_threads is true.
9845
9846 2013-02-26 Yao Qi <yao@codesourcery.com>
9847
9848 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9849
9850 2013-02-19 Pedro Alves <palves@redhat.com>
9851 Kai Tietz <ktietz@redhat.com>
9852
9853 PR gdb/15161
9854
9855 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9856 instead of strtoul to extract address from packet.
9857 (process_serial_event) <'z'>: Likewise.
9858
9859 2013-02-18 Yao Qi <yao@codesourcery.com>
9860
9861 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9862
9863 2013-02-14 Pedro Alves <palves@redhat.com>
9864
9865 Plug memory leak.
9866
9867 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9868 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9869
9870 2013-02-14 Pedro Alves <palves@redhat.com>
9871
9872 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9873
9874 2013-02-14 Pedro Alves <palves@redhat.com>
9875
9876 * tracepoint.c (save_string): Delete.
9877 (add_tracepoint_action): Use savestring instead of save_string.
9878
9879 2013-02-12 Pedro Alves <palves@redhat.com>
9880
9881 * linux-xtensa-low.c: Ditto.
9882 * xtensa-xtregs.c: Ditto.
9883
9884 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9885
9886 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9887 thread_db.
9888
9889 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9890
9891 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9892 aarch64_num_wp_regs and aarch64_num_bp_regs to
9893 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9894
9895 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9896
9897 * linux-aarch64-low.c (ps_get_thread_area): Replace
9898 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9899
9900 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9901 Marcus Shawcroft <marcus.shawcroft@arm.com>
9902 Nigel Stephens <nigel.stephens@arm.com>
9903 Yufeng Zhang <yufeng.zhang@arm.com>
9904
9905 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9906 (aarch64.c, aarch64-without-fpu.c): New targets.
9907 * configure.srv (aarch64*-*-linux*): New.
9908 * linux-aarch64-low.c: New file.
9909
9910 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9911
9912 * linux-low.c (handle_extended_wait, linux_create_inferior)
9913 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9914 (dequeue_one_deferred_signal, linux_resume_one_thread)
9915 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9916 (linux_tracefork_grandchild, linux_test_for_tracefork)
9917 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9918 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9919 where the argument is 0.
9920
9921 2013-01-25 Yao Qi <yao@codesourcery.com>
9922
9923 * event-loop.c: Include "queue.h".
9924 (gdb_event_p): New typedef.
9925 (struct gdb_event) <next_event>: Remove.
9926 (event_queue): Change to QUEUE(gdb_event_p).
9927 (async_queue_event): Remove.
9928 (gdb_event_xfree): New.
9929 (initialize_event_loop): New.
9930 (process_event): Use API from QUEUE.
9931 (wait_for_event): Likewise.
9932 * server.c (main): Call initialize_event_loop.
9933 * server.h (initialize_event_loop): Declare.
9934
9935 2013-01-18 Yao Qi <yao@codesourcery.com>
9936
9937 * ax.h (struct eval_agent_expr_context): New.
9938 (gdb_eval_agent_expr): Update declaration.
9939 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9940 TFRAME. Add new argument CTX.
9941 * server.h (struct eval_agent_expr_context): Declare.
9942 (agent_mem_read, agent_tsv_read): Update declaration.
9943 (agent_mem_read_string): Likewise.
9944 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9945 (add_traceframe_block): Add new argument TPOINT.
9946 Increase TPOINT->traceframe_usage.
9947 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9948 eval_tracepoint_agent_expr.
9949 (condition_true_at_tracepoint): Likewise.
9950 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9951 (agent_mem_read_string, agent_tsv_read): Likewise.
9952
9953 2013-01-16 Yao Qi <yao@codesourcery.com>
9954
9955 * linux-low.c (linux_resume_one_lwp): Don't check
9956 'lwp->bp_reinsert != 0'.
9957
9958 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9959 Pedro Alves <palves@redhat.com>
9960
9961 * lynx-low.c (ptrace_request_to_str): Define a temporary
9962 macro and use it to simplify this function's implementation.
9963
9964 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9965
9966 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9967 sets errno.
9968
9969 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9970
9971 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9972
9973 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9974
9975 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9976
9977 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9978
9979 * lynx-low.c (lynx_resume): Use the resume_info parameter
9980 to determine the ptid for the lynx_ptrace call, unless
9981 it is equal to minus_one_ptid, in which case we use the
9982 ptid of the current_inferior.
9983 (lynx_wait_1): After having received a thread create/exit
9984 event, resume the inferior's execution using the signaling
9985 thread's ptid, rather than the old ptid.
9986
9987 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9988
9989 * lynx-low.c (lynx_resume): Delete variable ret.
9990
9991 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9992
9993 * gdbreplay.c (gdbreplay_version): Update copyright year.
9994 * server.c (gdbserver_version): Likewise.
9995
9996 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9997
9998 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9999 new thread.
10000
10001 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10002
10003 * lynx-low.c (ptrace_request_to_str): Add handling for
10004 PTRACE_GETTRACESIG.
10005
10006 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10007
10008 * lynx-low.c (lynx_attach): Delete variable new_process.
10009
10010 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10011
10012 * lynx-low.c (lynx_create_inferior): Delete variable
10013 new_process.
10014
10015 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10016
10017 * lynx-low.c (ptrace_request_to_str): Do not handle
10018 PTRACE_GETTHREADLIST if this macro does not exist.
10019
10020 2012-12-15 Yao Qi <yao@codesourcery.com>
10021
10022 * Makefile.in (OBS): Add notif.o.
10023 * notif.c, notif.h: New.
10024 * server.c: Include "notif.h".
10025 (struct vstop_notif) <next>: Remove.
10026 <base>: New field.
10027 (queue_stop_reply): Update.
10028 (push_event, send_next_stop_reply): Remove.
10029 (discard_queued_stop_replies): Update.
10030 (notif_stop): New variable.
10031 (handle_v_stopped): Remove.
10032 (handle_v_requests): Don't call handle_v_stopped. Call
10033 handle_ack_notif instead.
10034 (queue_stop_reply_callback): Call notif_event_enque instead
10035 of queue_stop_reply.
10036 (handle_status): Don't call send_next_stop_reply, call
10037 notif_write_event instead.
10038 (kill_inferior_callback): Likewise.
10039 (detach_or_kill_inferior_callback): Likewise.
10040 (main): Call initialize_notif.
10041 (process_serial_event): Call QUEUE_is_empty.
10042 (handle_target_event): Call notif_push instead of push event.
10043 * server.h (push_event): Remove declaration.
10044
10045 2012-12-10 Tom Tromey <tromey@redhat.com>
10046
10047 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10048 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10049 macros.
10050 (.c.o): Rewrite.
10051 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10052 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10053 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10054 (amd64-linux-ipa.o, ax.o): Rewrite.
10055 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10056 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10057 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10058 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10059 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10060 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10061 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10062 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10063 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10064 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10065 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10066 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10067 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10068 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10069 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10070 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10071 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10072 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10073 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10074 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10075 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10076 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10077 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10078 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10079 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10080 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10081 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10082 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10083 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10084 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10085 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10086 (reg-tilegx.o): Remove.
10087 (all_object_files): New macro.
10088 Include .deps files.
10089 * aclocal.m4, configure: Rebuild.
10090 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10091 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10092 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10093
10094 2012-12-05 Tom Tromey <tromey@redhat.com>
10095
10096 PR gdb/14917:
10097 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10098
10099 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10100
10101 * configure.ac: Check for linux/perf_event.h.
10102 * config.in: Regenerated.
10103 * configure: Regenerated.
10104
10105 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10106
10107 * hostio.c (handle_readlink): Decrease buffer size
10108 parameter passed to readlink by one byte.
10109
10110 2012-11-26 Yao Qi <yao@codesourcery.com>
10111
10112 * configure.ac (build_warnings): Append '-Wempty-body'.
10113 * configure: Regenerated.
10114 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10115 body.
10116
10117 2012-11-15 Pierre Muller <muller@sourceware.org>
10118
10119 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10120 * config.in: Regenerate.
10121 * configure: Regenerate.
10122 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10123 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10124 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10125 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10126 header.
10127 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10128 instead of <sys/wait.h> header.
10129 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10130
10131 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10132
10133 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10134 (various make rules): Remove -DGDBSERVER
10135
10136 2012-11-09 Yao Qi <yao@codesourcery.com>
10137
10138 * spu-low.c (current_ptid): Move it to ..
10139 * gdbthread.h: ... here. New.
10140 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10141 * server.c (myresume, process_serial_event): Likewise.
10142 * thread-db.c (thread_db_find_new_threads): Likewise.
10143 * tracepoint.c (run_inferior_command): Likewise.
10144
10145 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10146
10147 * server.c (handle_search_memory_1): Include access length in
10148 warning message.
10149
10150 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10151
10152 * linux-crisv32-low.c: Fix compile errors.
10153
10154 2012-09-04 Yao Qi <yao@codesourcery.com>
10155
10156 * tracepoint.c (cmd_qtsv): Adjust debug message.
10157 Don't check CUR_TPOINT.
10158
10159 2012-08-28 Yao Qi <yao@codesourcery.com>
10160
10161 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10162 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10163 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10164 Remove declarations of xmalloc, xreallloc, xstrdup and
10165 freeargv.
10166 * Makefile.in (libiberty_h): New.
10167 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10168 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10169
10170 2012-08-23 Yao Qi <yao@codesourcery.com>
10171
10172 * server.h: Remove declaration of 'xsnprintf'.
10173
10174 2012-08-22 Keith Seitz <keiths@redhat.com>
10175
10176 * server.h: Include build-gnulib-gbserver/config.h.
10177 * gdbreplay.c: Likewise.
10178
10179 2012-08-08 Doug Evans <dje@google.com>
10180
10181 * Makefile.in (SFILES): Add gdb_vecs.c.
10182 (OBS): Add gdb_vecs.o.
10183 (gdb_vecs_h, host_defs_h): New variables.
10184 (thread-db.o): Add $(gdb_vecs_h) dependency.
10185 (gdb_vecs.o): New rule.
10186 * thread-db.c: #include "gdb_vecs.h".
10187 (thread_db_load_search): Use a vector to iterate over path elements.
10188 Handle text appearing after "$pdir".
10189
10190 * configure.ac: Add check for strstr.
10191 * config.in: Regenerate.
10192 * configure: Regenerate.
10193
10194 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10195
10196 * hostio.c (handle_pread): If pread fails, fall back to attempting
10197 lseek/read.
10198 (handle_pwrite): Likewise for pwrite.
10199
10200 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10201
10202 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10203 between unsupported TYPE and unimplementable ADDR/LEN combination.
10204 (arm_insert_point): Act on new return value.
10205
10206 2012-07-31 Pedro Alves <palves@redhat.com>
10207
10208 * server.c (process_point_options): Only skip tokens if we find
10209 one that is unrecognized. Don't treat 'X' specially while
10210 skipping unrecognized tokens.
10211
10212 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10213
10214 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10215 to 4-byte-align HW breakpoint addresses for Thumb.
10216
10217 2012-07-27 Yao Qi <yao@codesourcery.com>
10218
10219 PR remote/14161.
10220
10221 * server.h: Declare gdb_agent_about_to_close.
10222 * target.c (kill_inferior): Include "agent.h".
10223 New. Send command 'kill'.
10224 * target.h (kill_inferior): Removed macro.
10225 * tracepoint.c (gdb_agent_about_to_close): New.
10226 (gdb_agent_helper_thread): Handle command 'close'.
10227 Wait endlessly until the inferior stops.
10228 Install gdb_agent_remove_socket to atexit hook.
10229 (agent_socket_name): New static variable.
10230 (gdb_agent_socket_init): Replace local variable 'name' with
10231 'agent_socket_name'.
10232 (gdb_agent_remove_socket): New.
10233
10234 2012-07-27 Yao Qi <yao@codesourcery.com>
10235
10236 * server.c (process_point_options): Stop at 'X' when parsing.
10237
10238 2012-07-19 Michael Eager <eager@eagercon.com>
10239
10240 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10241 to hw_execute.
10242 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10243 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10244 hardware breakpoint.
10245
10246 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10247
10248 * gdbserver/linux-low.c (initialize_low): Call
10249 linux_ptrace_init_warnings.
10250
10251 2012-07-02 Doug Evans <dje@google.com>
10252
10253 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10254 pointer to int.
10255
10256 2012-07-02 Stan Shebs <stan@codesourcery.com>
10257
10258 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10259 (ax.o): Add it to build rule.
10260 (ax-ipa.o): Ditto.
10261 (OBS): Add format.o.
10262 (IPA_OBS): Add format.o.
10263 * server.c (handle_query): Claim support for breakpoint commands.
10264 (process_point_options): Add command case.
10265 (process_serial_event): Leave running if there are printfs in
10266 effect.
10267 * mem-break.h (any_persistent_commands): Declare.
10268 (add_breakpoint_commands): Declare.
10269 (gdb_no_commands_at_breakpoint): Declare.
10270 (run_breakpoint_commands): Declare.
10271 * mem-break.c (struct point_command_list): New struct.
10272 (struct breakpoint): New field command_list.
10273 (any_persistent_commands): New function.
10274 (add_commands_to_breakpoint): New function.
10275 (add_breakpoint_commands): New function.
10276 (gdb_no_commands_at_breakpoint): New function.
10277 (run_breakpoint_commands): New function.
10278 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10279 locally.
10280 * ax.c: Include format.h.
10281 (ax_printf): New function.
10282 (gdb_eval_agent_expr): Add printf opcode.
10283
10284 2012-06-13 Yao Qi <yao@codesourcery.com>
10285
10286 * server.c (start_inferior): Remove duplicated writes to fields
10287 'last_resume_kind' and 'last_status' of 'current_inferior'.
10288
10289 2012-06-12 Yao Qi <yao@codesourcery.com>
10290 Pedro Alves <palves@redhat.com>
10291
10292 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10293 comment.
10294 * server.c (handle_v_cont): Extend comment.
10295
10296 2012-06-11 Yao Qi <yao@codesourcery.com>
10297
10298 * linux-low.c (linux_attach): Add 'static'.
10299
10300 2012-06-06 Yao Qi <yao@codesourcery.com>
10301
10302 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10303
10304 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10305
10306 Fix gcc -flto compilation warning.
10307 * server.c (main): Make variable multi_mode and attach volatile.
10308
10309 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10310
10311 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10312 if the platform doesn't know about it.
10313
10314 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10315
10316 * Makefile.in (SFILES): Add linux-tile-low.c.
10317 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10318 * configure.srv: Handle tilegx-*-linux*.
10319 * linux-tile-low.c: New file.
10320
10321 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10322
10323 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10324
10325 2012-05-24 Pedro Alves <palves@redhat.com>
10326
10327 PR gdb/7205
10328
10329 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10330
10331 2012-05-24 Pedro Alves <palves@redhat.com>
10332
10333 PR gdb/7205
10334
10335 Replace target_signal with gdb_signal throughout.
10336
10337 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10338
10339 * linux-low.c (linux_store_registers): Avoid the copying sequence
10340 when no data has been retrieved by ptrace.
10341
10342 2012-05-22 Will Deacon <will.deacon@arm.com>
10343
10344 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10345 Include asm/ptrace.h.
10346 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10347 already defined.
10348
10349 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10350
10351 * linux-low.c (linux_store_registers): Don't re-retrieve data
10352 with ptrace that has already been obtained from /proc. Always
10353 copy any data retrieved with ptrace to the buffer supplied.
10354
10355 2012-05-11 Yao Qi <yao@codesourcery.com>
10356 Pedro Alves <palves@redhat.com>
10357
10358 * linux-low.c (enum stopping_threads_kind): New.
10359 (stopping_threads): Change type to `enum stopping_threads_kind'.
10360 (handle_extended_wait): If stopping and suspending threads, leave
10361 the new_lwp suspended too.
10362 (linux_wait_for_event): Adjust.
10363 (stop_all_lwps): Set `stopping_threads' to
10364 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10365 whether we're suspending threads or just stopping them. Assert no
10366 recursion happens.
10367
10368 2012-04-29 Yao Qi <yao@codesourcery.com>
10369
10370 * server.h: Move some code to ...
10371 * gdbthread.h: ... here. New.
10372 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10373 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10374 (nto-low.o, win32-low.o): Likewise.
10375 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10376 * regcache.c, remote-utils.c, server.c: Likewise.
10377 * target.c, tracepoint.c, win32-low.c: Likewise.
10378
10379 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10380
10381 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10382 (PTRACE_ARG4_TYPE): Likewise.
10383 (PTRACE_XFER_TYPE): Likewise.
10384 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10385 ptrace to PTRACE_ARG3_TYPE.
10386 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10387 (PTRACE_ARG4_TYPE): Likewise.
10388 (PTRACE_XFER_TYPE): Likewise.
10389 (linux_detach_one_lwp): Cast fourth argument of
10390 ptrace to long then PTRACE_ARG4_TYPE.
10391 (regsets_fetch_inferior_registers): Cast third argument of
10392 ptrace to long then PTRACE_ARG3_TYPE.
10393 (regsets_store_inferior_registers): Likewise.
10394
10395 2012-04-20 Pedro Alves <palves@redhat.com>
10396
10397 * configure: Regenerate.
10398
10399 2012-04-19 Pedro Alves <palves@redhat.com>
10400
10401 * Makefile.in (GNULIB_BUILDDIR): New.
10402 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10403 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10404 (all, install-only, uninstall, clean-info, all-lib, clean): No
10405 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10406 (maintainer-clean realclean distclean): Use subdir_do.
10407 (subdir_do): New.
10408 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10409 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10410 * acinclude.m4: Include acx_configure_dir.m4.
10411 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10412 calls. Call AC_PROG_RANLIB. Configure gnulib using
10413 ACX_CONFIGURE_DIR.
10414 (GNULIB): New.
10415 (GNULIB_STDINT_H): Adjust.
10416 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10417 * gdbreplay.c: Include build-gnulib/config.h.
10418 * server.h: Likewise.
10419 * aclocal.m4: Regenerate.
10420 * config.in: Regenerate.
10421 * configure: Regenerate.
10422
10423 2012-04-19 Pedro Alves <palves@redhat.com>
10424
10425 * Makefile.in (LIBGNU, INCGNU): Adjust.
10426 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10427 (all, install-only, uninstall, clean-info, all-lib, clean)
10428 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10429 * configure.ac: Adjust AC_OUTPUT output.
10430 * aclocal.m4: Regenerate.
10431 * configure: Regenerate.
10432
10433 2012-04-19 Pedro Alves <palves@redhat.com>
10434
10435 * Makefile.in (generated_files): New.
10436 (server_h): Remove the explicit dependency on config.h, and depend
10437 on $generated_files.
10438
10439 2012-04-19 Pedro Alves <palves@redhat.com>
10440
10441 * Makefile.in (INCGNU): Add -Ignulib.
10442
10443 2012-04-19 Pedro Alves <palves@redhat.com>
10444
10445 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10446 (INCGNU): ... this, and spell out -I here.
10447 (GNULIB_LIB): Rename to ...
10448 (LIBGNU): ... this.
10449 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10450
10451 2012-04-19 Pedro Alves <palves@redhat.com>
10452
10453 * config.in: Regenerate.
10454
10455 2012-04-19 Pedro Alves <palves@redhat.com>
10456
10457 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10458 * server.h (memmem): Remove declaration.
10459 * config.in: Regenerate.
10460 * configure: Regenerate.
10461
10462 2012-04-19 Yao Qi <yao@codesourcery.com>
10463
10464 * Makefile.in (SFILES): Add common/vec.c.
10465 (OBS): Add vec.o.
10466 (vec.o): New rule.
10467
10468 2012-04-19 Yao Qi <yao@codesourcery.com>
10469
10470 * remote-utils.c (prepare_resume_reply): Replace with macro
10471 target_core_of_thread.
10472 * server.c (handle_qxfer_threads_proper): Likewise.
10473 * target.h (traget_core_of_thread): New macro.
10474
10475 2012-04-18 Pedro Alves <palves@redhat.com>
10476
10477 * aclocal.m4: Regenerate.
10478 * configure: Regenerate.
10479
10480 2012-04-16 Yao Qi <yao@codesourcery.com>
10481
10482 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10483 duplicated on address.
10484
10485 2012-04-16 Yao Qi <yao@codesourcery.com>
10486
10487 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10488 (struct tracepoint_action_ops) <send>: New field.
10489 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10490 (agent_expr_send, x_tracepoint_action_send): New.
10491 (l_tracepoint_action_send): New.
10492 (cmd_qtdp): Download and install tracepoint
10493 according to `use_agent'.
10494 (run_inferior_command): Add one more parameter `len'.
10495 Update callers.
10496 (tracepoint_send_agent): New.
10497 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10498
10499 2012-04-16 Yao Qi <yao@codesourcery.com>
10500
10501 * tracepoint.c (download_tracepoints): Moved to ...
10502 (cmd_qtstart): ... here.
10503
10504 2012-04-14 Yao Qi <yao@codesourcery.com>
10505
10506 * tracepoint.c: Include inttypes.h.
10507 (struct collect_memory_action): Use sized types.
10508 (struct tracepoint): Likewise.
10509 (cmd_qtdp, stop_tracing): Update print specifiers.
10510 (cmd_qtp, response_tracepoint): Likewise.
10511 (collect_data_at_tracepoint): Likewise.
10512 (collect_data_at_step): Likewise.
10513
10514 2012-04-14 Yao Qi <yao@codesourcery.com>
10515
10516 Import gnulib module inttypes.
10517 * aclocal.m4, config.in, configure: Regenerated.
10518
10519 2012-04-14 Yao Qi <yao@codesourcery.com>
10520
10521 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10522 Makefile and config.status at last.
10523
10524 2012-04-13 Yao Qi <yao@codesourcery.com>
10525
10526 * tracepoint.c: Include stdint.h unconditionally.
10527
10528 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10529
10530 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10531 on BFD_HAVE_SYS_PROCFS_TYPE.
10532 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10533 * configure: Regenerate.
10534 * config.in: Likewise.
10535
10536 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10537
10538 * Makefile.in (clean): Also remove x32.c x32-linux.c
10539 x32-avx.c x32-avx-linux.c.
10540 (x32.o): New target.
10541 (x32.c): Likewise.
10542 (x32-linux.o): Likewise.
10543 (x32-linux.c): Likewise.
10544 (x32-avx.o): Likewise.
10545 (x32-avx.c): Likewise.
10546 (x32-avx-linux.o): Likewise.
10547 (x32-avx-linux.c): Likewise.
10548
10549 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10550 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10551 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10552 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10553 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10554 i386/x32-avx-linux.xml.
10555
10556 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10557 (init_registers_x32_avx_linux): Likwise.
10558 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10559 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10560
10561 2012-04-13 Pedro Alves <palves@redhat.com>
10562
10563 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10564 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10565 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10566 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10567 the sub-make.
10568
10569 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10570
10571 * linux-x86-low.c (compat_x32_clock_t): New.
10572 (compat_x32_siginfo_t): Likewise.
10573 (compat_x32_siginfo_from_siginfo): Likewise.
10574 (siginfo_from_compat_x32_siginfo): Likewise.
10575 (linux_is_elf64): Likewise.
10576 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10577 and siginfo_from_compat_x32_siginfo for x32.
10578 (x86_arch_setup): Set linux_is_elf64.
10579
10580 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10581
10582 PR gdb/13969
10583 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10584 e_machine field.
10585 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10586 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10587 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10588 compatible with process.
10589
10590 2012-04-12 Yao Qi <yao@codesourcery.com>
10591
10592 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10593 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10594 (install-only, install-info, clean): Handle sub dir gnulib.
10595 (all-lib, am--refresh): New targets.
10596 (memmem.o): Remove target.
10597 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10598 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10599 (AC_REPLACE_FUNCS): Remove memmem.
10600 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10601 (AC_OUTPUT): Generate Makefile in gnulib/.
10602 * aclocal.m4, config.in, configure: Regenerated.
10603
10604 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10605
10606 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10607
10608 2012-04-05 Pedro Alves <palves@redhat.com>
10609
10610 -Werror=strict-aliasing
10611
10612 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10613 pointer.
10614
10615 2012-04-04 Pedro Alves <palves@redhat.com>
10616
10617 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10618 (sparc_store_gregset_from_stack, sparc_store_gregset)
10619 (sparc_breakpoint_at): Fix formatting.
10620
10621 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10622
10623 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10624 are available.
10625 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10626 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10627 * config.in: Regenerate.
10628 * configure: Likewise.
10629
10630 2012-03-29 Pedro Alves <palves@redhat.com>
10631
10632 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10633 Correct ptrace arguments.
10634
10635 2012-03-28 Pedro Alves <palves@redhat.com>
10636
10637 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10638 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10639 (IA64_FR1_REGNUM): New defines.
10640 (ia64_fetch_register): New.
10641 (the_low_target): Install it.
10642 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10643 field.
10644 * linux-low.c (linux_fetch_registers): Try the
10645 the_low_target.fetch_register hook first.
10646
10647 * linux-arm-low.c (the_low_target): Adjust.
10648 * linux-bfin-low.c (the_low_target): Adjust.
10649 * linux-cris-low.c (the_low_target): Adjust.
10650 * linux-crisv32-low.c (the_low_target): Adjust.
10651 * linux-m32r-low.c (the_low_target): Adjust.
10652 * linux-m68k-low.c (the_low_target): Adjust.
10653 * linux-mips-low.c (the_low_target): Adjust.
10654 * linux-ppc-low.c (the_low_target): Adjust.
10655 * linux-s390-low.c (the_low_target): Adjust.
10656 * linux-sh-low.c (the_low_target): Adjust.
10657 * linux-sparc-low.c (the_low_target): Adjust.
10658 * linux-tic6x-low.c (the_low_target): Adjust.
10659 * linux-x86-low.c (the_low_target): Adjust.
10660 * linux-xtensa-low.c (the_low_target): Adjust.
10661
10662 2012-03-26 Pedro Alves <palves@redhat.com>
10663
10664 * server.c (handle_qxfer_libraries): Don't bail early if
10665 the_target->qxfer_libraries_svr4 is not NULL.
10666
10667 2012-03-26 Pedro Alves <palves@redhat.com>
10668
10669 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10670
10671 2012-03-23 Pedro Alves <palves@redhat.com>
10672
10673 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10674 "library-list-svr4" element's start tag when the the DSO list is
10675 empty.
10676
10677 2012-03-23 Pedro Alves <palves@redhat.com>
10678
10679 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10680 a variable whose type size is the same as the inferior's pointer
10681 size.
10682
10683 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10684
10685 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10686 struct siginfo.
10687 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10688 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10689 * linux-low.h: Include <signal.h>.
10690 (struct siginfo): Remove forward declaration.
10691 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10692 struct siginfo.
10693
10694 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10695
10696 * .gitignore: Ignore more files.
10697
10698 2012-03-19 Pedro Alves <palves@redhat.com>
10699 Jan Kratochvil <jan.kratochvil@redhat.com>
10700
10701 * server.c (cont_thread, general_thread): Add describing comments.
10702 (start_inferior): Clear `cont_thread'.
10703 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10704 of a process.
10705
10706 2012-03-15 Yao Qi <yao@codesourcery.com>
10707
10708 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10709 handling to ...
10710 (cmd_qtdp): ... here.
10711
10712 2012-03-15 Yao Qi <yao@codesourcery.com>
10713
10714 * tracepoint.c (struct tracepoint_action_ops): New.
10715 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10716 (m_tracepoint_action_download): New.
10717 (r_tracepoint_action_download): New.
10718 (x_tracepoint_action_download): New.
10719 (l_tracepoint_action_download): New.
10720 (add_tracepoint_action): Install `action->ops' according type.
10721 (download_tracepoint_1): Move code `download' function pointer
10722 of various tracepoint_action_ops.
10723
10724 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10725
10726 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10727 linux_ptrace_attach_warnings.
10728
10729 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10730
10731 * Makefile.in (linux-ptrace.o): New.
10732 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10733 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10734 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10735 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10736 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10737 of these targets.
10738 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10739
10740 2012-03-08 Yao Qi <yao@codesourcery.com>
10741 Pedro Alves <palves@redhat.com>
10742
10743 Fix PR server/13392.
10744 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10745 offset of JMP insn.
10746 * tracepoint.c (remove_tracepoint): New.
10747 (cmd_qtdp): Call remove_tracepoint when failed to install.
10748
10749 2012-03-07 Pedro Alves <palves@redhat.com>
10750
10751 * linux-low.c (get_detach_signal): New.
10752 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10753 Pass on pending signals to PTRACE_DETACH. Check the result of the
10754 ptrace call.
10755 * server.c (program_signals, program_signals_p): New.
10756 (handle_general_set): Handle QProgramSignals.
10757 * server.h (program_signals, program_signals_p): Declare.
10758
10759 2012-03-05 Pedro Alves <palves@redhat.com>
10760 Jan Kratochvil <jan.kratochvil@redhat.com>
10761
10762 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10763 New comment why.
10764
10765 2012-03-03 Yao Qi <yao@codesourcery.com>
10766
10767 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10768 agent_look_up_symbols.
10769
10770 2012-03-03 Yao Qi <yao@codesourcery.com>
10771
10772 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10773 (linux-x86-low.o): Likewise.
10774 * server.h: Remove in_process_agent_loaded.
10775 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10776 common/agent.c.
10777 Update callers.
10778
10779 2012-03-03 Yao Qi <yao@codesourcery.com>
10780
10781 * tracepoint.c (gdb_agent_capability): New global.
10782 (in_process_agent_loaded_ust): Renamed to
10783 `in_process_agent_supports_ust'.
10784 Update callers.
10785 (in_process_agent_supports_ust): Call agent_capability_check.
10786 (clear_installed_tracepoints): Assert that agent supports
10787 agent.
10788
10789 2012-03-03 Yao Qi <yao@codesourcery.com>
10790
10791 * linux-low.c (linux_supports_agent): New.
10792 (linux_target_ops): Initialize field `supports_agent' with
10793 linux_supports_agent.
10794 * target.h (struct target_ops) <supports_agent>: New.
10795 (target_supports_agent): New macro.
10796 * server.c (handle_general_set): Handle packet 'QAgent'.
10797 (handle_query): Send `QAgent+'.
10798 * Makefile.in (server.o): Depends on agent.h.
10799
10800 2012-03-03 Yao Qi <yao@codesourcery.com>
10801
10802 * Makefile.in (OBS): Add agent.o.
10803 Add new rule for agent.o.
10804 Track dependence of tracepoint.c on agent.h.
10805 * tracepoint.c (run_inferior_command_1):
10806 (run_inferior_command): Call agent_run_command.
10807 (gdb_ust_connect_sync_socket): Deleted. Move it to
10808 common/agent.c.
10809 (resume_thread, stop_thread): Likewise.
10810 (gdb_ust_socket_init): Renamed to ...
10811 (gdb_agent_socket_init): ... New.
10812 (gdb_ust_thread): Renamed to ...
10813 (gdb_agent_helper_thread): ... New.
10814 (gdb_ust_init): Move some code to ...
10815 (gdb_agent_init): ... here. New.
10816 [HAVE_UST]: Call gdb_ust_init.
10817 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10818 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10819 * config.in, configure: Regenerated.
10820
10821 2012-03-02 Pedro Alves <palves@redhat.com>
10822
10823 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10824 * linux-low.c (struct simple_pid_list): New.
10825 (stopped_pids): New a struct simple_pid_list pointer.
10826 (add_to_pid_list, pull_pid_from_list): New.
10827 (handle_extended_wait): Don't assume the first signal new children
10828 report is SIGSTOP. Adjust call to pull_pid_from_list.
10829 (linux_wait_for_lwp): Adjust.
10830
10831 2012-03-02 Yao Qi <yao@codesourcery.com>
10832
10833 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10834 debug log.
10835
10836 2012-03-02 Yao Qi <yao@codesourcery.com>
10837
10838 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10839 `stop_pc' and `tpoint'. Update caller.
10840
10841 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10842
10843 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10844 * linux-low.c (use_linux_regsets): New macro.
10845 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10846 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10847 (linux_register_in_regsets): New function.
10848 (usr_fetch_inferior_registers): Skip registers covered by
10849 regsets.
10850 (usr_store_inferior_registers): Likewise.
10851 (usr_fetch_inferior_registers): New macro.
10852 (usr_store_inferior_registers): Likewise.
10853 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10854 (linux_store_registers): Likewise.
10855 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10856 prototype.
10857 (init_registers_mips64_dsp_linux): Likewise.
10858 (init_registers_mips_linux): New macro.
10859 (init_registers_mips_dsp_linux): Likewise.
10860 (mips_dsp_num_regs): Likewise.
10861 (DSP_BASE, DSP_CONTROL): New fallback macros.
10862 (mips_base_regs): New macro.
10863 (mips_regmap): Use it. Fix the size.
10864 (mips_dsp_regmap): New variable.
10865 (mips_dsp_regset_bitmap): Likewise.
10866 (mips_arch_setup): New function.
10867 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10868 than mips_regmap.
10869 (mips_cannot_store_register): Likewise.
10870 (the_low_target): Update .arch_setup, .num_regs and .regmap
10871 initializers. Add .regset_bitmap initializer.
10872 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10873 initializer.
10874 * linux-bfin-low.c (the_low_target): Likewise.
10875 * linux-cris-low.c (the_low_target): Likewise.
10876 * linux-crisv32-low.c (the_low_target): Likewise.
10877 * linux-ia64-low.c (the_low_target): Likewise.
10878 * linux-m32r-low.c (the_low_target): Likewise.
10879 * linux-m68k-low.c (the_low_target): Likewise.
10880 * linux-ppc-low.c (the_low_target): Likewise.
10881 * linux-s390-low.c (the_low_target): Likewise.
10882 * linux-sh-low.c (the_low_target): Likewise.
10883 * linux-sparc-low.c (the_low_target): Likewise.
10884 * linux-tic6x-low.c (the_low_target): Likewise.
10885 * linux-x86-low.c (the_low_target): Likewise.
10886 * linux-xtensa-low.c (the_low_target): Likewise.
10887 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10888 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10889 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10890 srv_xmlfiles.
10891 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10892 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10893
10894 2012-02-29 Yao Qi <yao@codesourcery.com>
10895 Pedro Alves <palves@redhat.com>
10896
10897 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10898 `step_over_finished' is true.
10899
10900 2012-02-27 Pedro Alves <palves@redhat.com>
10901
10902 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10903 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10904
10905 2012-02-27 Pedro Alves <palves@redhat.com>
10906
10907 PR server/9684
10908 * linux-low.c (pid_is_stopped): New.
10909 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10910
10911 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10912
10913 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10914 of conditions.
10915
10916 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10917
10918 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10919
10920 2012-02-24 Luis Machado <lgustavo@codesourcery>
10921
10922 * server.c (handle_query): Advertise support for target-side
10923 breakpoint condition evaluation.
10924 (process_point_options): New function.
10925 (process_serial_event): When inserting a breakpoint, check for
10926 a target-side condition that should be evaluated.
10927
10928 * mem-break.c: Include regcache.h and ax.h.
10929 (point_cond_list_t): New data structure.
10930 (breakpoint) <cond_list>: New field.
10931 (find_gdb_breakpoint_at): Make non-static.
10932 (delete_gdb_breakpoint_at): Clear any target-side
10933 conditions.
10934 (clear_gdb_breakpoint_conditions): New function.
10935 (add_condition_to_breakpoint): Likewise.
10936 (add_breakpoint_condition): Likewise.
10937 (gdb_condition_true_at_breakpoint): Likewise.
10938 (gdb_breakpoint_here): Return result directly instead
10939 of going through a local variable.
10940
10941 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10942 (clear_gdb_breakpoint_conditions): Likewise.
10943 (add_breakpoint_condition): Likewise.
10944 (gdb_condition_true_at_breakpoint): Likewise.
10945
10946 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10947 (need_step_over_p): Take target-side breakpoint condition into
10948 consideration.
10949
10950 2012-02-24 Luis Machado <lgustavo@codesourcery>
10951
10952 * server.h: Include tracepoint.h.
10953 (agent_mem_read, agent_get_trace_state_variable_value,
10954 agent_set_trace_state_variable_value,
10955 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10956 get_set_tsv_func_addr): New prototypes.
10957
10958 * ax.h: New include file.
10959 * ax.c: New source file.
10960
10961 * tracepoint.c: Include ax.h.
10962 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10963 agent_expr, eval_result_type): Move to ax.h.
10964 (parse_agent_expr): Rename to ...
10965 (gdb_parse_agent_expr): ... this, make it non-static and move
10966 to ax.h.
10967 (unparse_agent_expr) Rename to ...
10968 (gdb_unparse_agent_expr): ... this, make it non-static and move
10969 to ax.h.
10970 (eval_agent_expr): Rename to ...
10971 (eval_tracepoint_agent_expr): ... this.
10972 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10973 forward declarations.
10974 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10975 (agent_get_trace_state_variable_value): New function.
10976 (agent_set_trace_state_variable_value): New function.
10977 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10978 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10979 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10980 (condition_true_at_tracepoint): Likewise.
10981 (parse_agent_expr): Rename to ...
10982 (gdb_parse_agent_expr): ... this and move to ax.c.
10983 (unparse_agent_expr): Rename to ...
10984 (gdb_unparse_agent_expr): ... this and move to ax.c.
10985 (gdb_agent_op_name): Move to ax.c.
10986 (eval_agent_expr): Rename to ...
10987 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10988 and move to ax.c.
10989 (eval_tracepoint_agent_expr): New function.
10990 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10991 non-static.
10992 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10993 ax.c.
10994 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10995 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10996 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10997 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10998 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10999 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11000 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11001 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11002 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11003 (compile_bytecodes): Remove forward declaration.
11004 (is_goto_target): Move to ax.c.
11005 (compile_bytecodes): Move to ax.c and call
11006 agent_get_trace_state_variable_value (...) and
11007 agent_set_trace_state_variable_value (...).
11008
11009 * Makefile.in: Update ax.c and IPA dependencies.
11010
11011 2012-02-24 Pedro Alves <palves@redhat.com>
11012
11013 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11014 (cmd_bigqtbuffer_circular): ... this. Only handle
11015 'QTBuffer:circular:'.
11016 (handle_tracepoint_general_set): Adjust.
11017
11018 2012-02-16 Yao Qi <yao@codesourcery.com>
11019
11020 * inferiors.c: Move code to ...
11021 * dll.c: .... here. New.
11022 * server.h: Declare clear_dlls.
11023 * Makefile.in (SFILES): Add dll.c.
11024 (OBS): Add dll.o
11025 (dll.o): New rule.
11026
11027 2012-02-11 Yao Qi <yao@codesourcery.com>
11028
11029 * server.c: (handle_monitor_command): Add a new parameter
11030 `own_buf'.
11031 (handle_query): Update caller.
11032
11033 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11034
11035 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11036 * configure, config.in: Regenerate.
11037 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11038 is not defined.
11039
11040 2012-02-02 Pedro Alves <palves@redhat.com>
11041
11042 Try SIGKILL first, then PTRACE_KILL.
11043 * linux-low.c (linux_kill_one_lwp): New.
11044 (linux_kill_one_lwp): Rename to ...
11045 (kill_one_lwp_callback): ... this. Use the new
11046 linux_kill_one_lwp.
11047
11048 2012-02-02 Pedro Alves <palves@redhat.com>
11049
11050 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11051 inferior.
11052
11053 2012-01-27 Pedro Alves <palves@redhat.com>
11054
11055 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11056 (elf_64_file_p): Make static.
11057 (linux_pid_exe_is_elf_64_file): New.
11058 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11059 Delete declarations.
11060 (linux_pid_exe_is_elf_64_file): Declare.
11061 * linux-x86-low.c (x86_arch_setup): Use
11062 linux_pid_exe_is_elf_64_file.
11063
11064 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11065
11066 * linux-low.c (linux_wait_for_event_1): Rename to ...
11067 (linux_wait_for_event): ... here and merge it with former
11068 linux_wait_for_event - new variable wait_ptid, use it.
11069 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11070
11071 2012-01-23 Pedro Alves <palves@redhat.com>
11072
11073 * server.c (main): Avoid yet another case of infinite loop while
11074 detaching/killing after a longjmp.
11075
11076 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11077
11078 Code cleanup.
11079 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11080
11081 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11082
11083 * hostio.c (handle_readlink): New function.
11084 (handle_vFile): Call it to handle "vFile:readlink" packets.
11085
11086 2012-01-20 Pedro Alves <palves@redhat.com>
11087 Ulrich Weigand <ulrich.weigand@linaro.org>
11088
11089 * server.c (handle_v_requests): Only support vAttach and vRun to
11090 start multiple processes when in extended protocol mode.
11091
11092 2012-01-17 Pedro Alves <palves@redhat.com>
11093
11094 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11095 memalign plus mprotect to allocate the scratch buffer.
11096
11097 2012-01-13 Pedro Alves <palves@redhat.com>
11098
11099 * server.c (attach_inferior): Clear `cont_thread'.
11100
11101 2012-01-13 Pedro Alves <palves@redhat.com>
11102
11103 * server.c (main): Avoid infinite loop while detaching/killing
11104 after a longjmp.
11105
11106 2012-01-09 Doug Evans <dje@google.com>
11107
11108 * server.c (start_inferior): Set last_ptid in --wrapper case.
11109
11110 2012-01-06 Yao Qi <yao@codesourcery.com>
11111
11112 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11113 defined.
11114 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11115
11116 2012-01-04 Yao Qi <yao@codesourcery.com>
11117
11118 * tracepoint.c (cmd_qtdp): Print debug message
11119 for static tracepoint.
11120
11121 2012-01-04 Yao Qi <yao@codesourcery.com>
11122
11123 * tracepoint.c (trace_vdebug): Differentiate debug message
11124 between gdbserver and IPA.
11125
11126 2012-01-03 Yao Qi <yao@codesourcery.com>
11127
11128 * tracepoint.c (tracepoint_was_hit): Don't collect for
11129 static tracepoint.
11130
11131 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11132
11133 * terminal.h: Reformat copyright header.
11134
11135 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11136
11137 * server.c (gdbserver_version): Update copyright year.
11138 * gdbreplay.c (gdbreplay_version): Likewise.
11139
11140 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11141
11142 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11143
11144 Revert:
11145 2011-12-18 Hui Zhu <teawater@gmail.com>
11146 * linux-low.c (linux_create_inferior): Save return value to ret.
11147
11148 2011-12-18 Hui Zhu <teawater@gmail.com>
11149
11150 * linux-low.c (linux_create_inferior): Save return value to ret.
11151
11152 2011-12-16 Doug Evans <dje@google.com>
11153
11154 * linux-low.c (linux_create_inferior): If stdio connection,
11155 redirect stdin from /dev/null, stdout to stderr.
11156 * remote-utils.c (remote_is_stdio): New static global.
11157 (remote_connection_is_stdio): New function.
11158 (remote_prepare): Handle stdio connection.
11159 (remote_open): Ditto.
11160 (remote_close): Don't close stdin for stdio connections.
11161 (read_prim,write_prim): New functions. Replace all calls to
11162 read/write to these.
11163 * server.c (main): Watch for "-" argument. Move call to
11164 remote_prepare before start_inferior.
11165 * server.h (STDIO_CONNECTION_NAME): New macro.
11166 (remote_connection_is_stdio): Declare.
11167
11168 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11169 in debugging output.
11170
11171 2011-12-15 Yao Qi <yao@codesourcery.com>
11172
11173 * tracepoint.c: Include sys/syscall.h.
11174 (gdb_ust_thread): Remove preprocessor conditional.
11175
11176 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11177
11178 * linux-low.c (linux_detach_one_lwp): Call
11179 the_low_target.prepare_to_resume before detaching.
11180
11181 2011-12-14 Yao Qi <yao@codesourcery.com>
11182
11183 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11184 of write.
11185
11186 2011-12-14 Yao Qi <yao@codesourcery.com>
11187
11188 * i386-low.c (i386_low_stopped_data_address): Initialize local
11189 variable `control'.
11190
11191 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11192
11193 PR remote/13492
11194
11195 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11196 DR_CONTROL unless necessary. Extend comments.
11197 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11198 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11199
11200 2011-12-13 Yao Qi <yao@codesourcery.com>
11201
11202 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11203 macros.
11204 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11205
11206 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11207
11208 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11209 Print new debug message for such case.
11210
11211 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11212
11213 Fix overlapping memcpy.
11214 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11215 the read_inferior_memory transfer.
11216 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11217 write_inferior_memory transfer.
11218 (set_fast_tracepoint_jump): New variable buf. Use it for the
11219 read_inferior_memory and write_inferior_memory transfers.
11220 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11221 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11222 Use it for the write_inferior_memory transfer.
11223 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11224 buffers.
11225
11226 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11227
11228 * linux-low.c (fetch_register, store_register): Make code
11229 consistent, fix formatting.
11230
11231 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11232
11233 * linux-low.c (usr_store_inferior_registers): Factor out code
11234 to handle individual registers into...
11235 (store_register): ... this new function.
11236
11237 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11238
11239 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11240 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11241 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11242 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11243 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11244 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11245 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11246 (srv_xmlfiles): Add new XML files.
11247
11248 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11249 and <sys/uio.h>.
11250 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11251 (init_registers_s390_linux32v1): Add prototype.
11252 (init_registers_s390_linux32v2): Likewise.
11253 (init_registers_s390_linux64v1): Likewise.
11254 (init_registers_s390_linux64v2): Likewise.
11255 (init_registers_s390x_linux64v1): Likewise.
11256 (init_registers_s390x_linux64v2): Likewise.
11257 (s390_num_regs): Increment to 52.
11258 (s390_regmap): Add orig_r2 register.
11259 (s390_num_regs_3264): Increment to 68.
11260 (s390_regmap_3264): Add orig_r2 register.
11261 (s390_collect_ptrace_register): Handle orig_r2 register.
11262 (s390_supply_ptrace_register): Likewise.
11263 (s390_fill_last_break): New function.
11264 (s390_store_last_break): Likewise.
11265 (s390_fill_system_call): New function.
11266 (s390_store_system_call): Likewise.
11267 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11268 register sets.
11269 (s390_check_regset): New function.
11270 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11271 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11272 Update target_regsets for available register sets.
11273
11274 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11275 Jan Kratochvil <jan.kratochvil@redhat.com>
11276
11277 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11278 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11279 New.
11280 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11281 * linux-low.h (struct process_info_private): New member r_debug.
11282 * server.c (handle_qxfer_libraries): Call
11283 the_target->qxfer_libraries_svr4.
11284 (handle_qxfer_libraries_svr4): New function.
11285 (qxfer_packets): New entry "libraries-svr4".
11286 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11287 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11288 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11289 PACKET_qXfer_libraries_svr4.
11290
11291 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11292
11293 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11294 PSW address/mask between 8-byte and 16-byte formats.
11295 (s390_supply_ptrace_register): Likewise.
11296 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11297 basic addressing mode bit.
11298
11299 2011-11-24 Stan Shebs <stan@codesourcery.com>
11300
11301 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11302
11303 2011-11-17 Stan Shebs <stan@codesourcery.com>
11304
11305 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11306 (tracing_start_time): New global.
11307 (tracing_stop_time): New global.
11308 (tracing_user_name): New global.
11309 (tracing_notes): New global.
11310 (tracing_stop_note): New global.
11311 (cmd_qtstart): Set traceframe_usage, start_time.
11312 (stop_tracing): Set stop_time.
11313 (cmd_qtstatus): Report additional status.
11314 (cmd_qtp): New function.
11315 (handle_tracepoint_query): Call it.
11316 (cmd_qtnotes): New function.
11317 (handle_tracepoint_general_set): Call it.
11318 (get_timestamp): Rename from tsv_get_timestamp.
11319
11320 2011-11-14 Stan Shebs <stan@codesourcery.com>
11321 Kwok Cheung Yeung <kcy@codesourcery.com>
11322
11323 * linux-x86-low.c (small_jump_insn): New.
11324 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11325 trampoline and error message, build a trampoline and issue a small
11326 jump instruction to it.
11327 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11328 trampoline and error message.
11329 (x86_get_min_fast_tracepoint_insn_len): New.
11330 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11331 * linux-low.h (struct linux_target_ops): Add arguments to
11332 install_fast_tracepoint_jump_pad operation, add new operation.
11333 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11334 arguments.
11335 (linux_get_min_fast_tracepoint_insn_len): New function.
11336 (linux_target_op): Add new operation.
11337 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11338 (gdb_trampoline_buffer_end): Ditto.
11339 (gdb_trampoline_buffer_error): Ditto.
11340 (struct ipa_sym_addresses): Add fields for new IPA variables.
11341 (symbol_list): Add entries for new IPA variables.
11342 (struct tracepoint): Add fields to hold the address range of the
11343 trampoline used by the tracepoint.
11344 (trampoline_buffer_head): New static variable.
11345 (trampoline_buffer_tail): Ditto.
11346 (claim_trampoline_space): New function.
11347 (have_fast_tracepoint_trampoline_buffer): New function.
11348 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11349 structure.
11350 (install_fast_tracepoint): Ditto, also add error buffer argument.
11351 (cmd_qtminftpilen): New function.
11352 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11353 (fast_tracepoint_from_trampoline_address): New function.
11354 (fast_tracepoint_collecting): Handle trampoline as part of jump
11355 pad space.
11356 (set_trampoline_buffer_space): New function.
11357 (initialize_tracepoint): Initialize new IPA variables.
11358 * target.h (struct target_ops): Add arguments to
11359 install_fast_tracepoint_jump_pad operation, add new
11360 get_min_fast_tracepoint_insn_len operation.
11361 (target_get_min_fast_tracepoint_insn_len): New.
11362 (install_fast_tracepoint_jump_pad): Add arguments.
11363 * server.h (IPA_BUFSIZ): Define.
11364 * linux-i386-ipa.c: Include extra header files.
11365 (initialize_fast_tracepoint_trampoline_buffer): New function.
11366 (initialize_low_tracepoint): Call it.
11367 * server.h (set_trampoline_buffer_space): Declare.
11368 (claim_trampoline_space): Ditto.
11369 (have_fast_tracepoint_trampoline_buffer): Ditto.
11370
11371 2011-11-14 Yao Qi <yao@codesourcery.com>
11372
11373 * server.c (handle_query): Handle InstallInTrace for qSupported.
11374 * tracepoint.c (add_tracepoint): Sort list.
11375 (install_tracepoint, download_tracepoint): New.
11376 (cmd_qtdp): Call them to install and download tracepoints.
11377 (sort_tracepoints): Removed.
11378 (cmd_qtstart): Update.
11379
11380 2011-11-14 Yao Qi <yao@codesourcery.com>
11381
11382 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11383 * mem-break.h: Declare.
11384 * tracepoint.c (cmd_qtstart): Move some code to ...
11385 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11386 New.
11387 (download_tracepoints): Move some code to ...
11388 (download_tracepoint_1): ... here. New.
11389
11390 2011-11-08 Yao Qi <yao@codesourcery.com>
11391
11392 * remote-utils.c (relocate_instruction): A comment fix.
11393
11394 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11395
11396 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11397 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11398 dr_status_mirror and dr_control_mirror from debug_reg_state.
11399 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11400 (i386_initial_stuff): Remove use of deleted globals.
11401 (i386_get_thread_context, i386_set_thread_context,
11402 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11403 from debug_reg_state.
11404
11405 2011-11-05 Yao Qi <yao@codesourcery.com>
11406
11407 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11408 address as TPOINT's.
11409
11410 2011-11-02 Stan Shebs <stan@codesourcery.com>
11411
11412 * tracepoint.c (agent_mem_read_string): New function.
11413 (eval_agent_expr): Call it for tracenz.
11414 * server.c (handle_query): Report support for tracenz.
11415
11416 2011-11-02 Yao Qi <yao@codesourcery.com>
11417
11418 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11419
11420 2011-11-02 Yao Qi <yao@codesourcery.com>
11421
11422 * target.h: Fix a typo in comment.
11423
11424 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11425
11426 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11427 clobber the breakpoints' shadows with fast tracepoint jumps.
11428 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11429 * target.c (write_inferior_memory): Also pass MYADDR down to
11430 check_mem_write.
11431
11432 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11433
11434 * configure.ac: Check support for personality routine.
11435 * configure: Regenerate.
11436 * config.in: Likewise.
11437 * linux-low.c: Include <sys/personality.h>.
11438 Define ADDR_NO_RANDOMIZE if necessary.
11439 (linux_create_inferior): Disable address space randomization when
11440 forking inferior, if requested.
11441 (linux_supports_disable_randomization): New function.
11442 (linux_target_ops): Install it.
11443 * server.h (disable_randomization): Declare.
11444 * server.c (disable_randomization): New global variable.
11445 (handle_general_set): Handle QDisableRandomization.
11446 (handle_query): Likewise for qSupported.
11447 (main): Support --disable-randomization and --no-disable-randomization
11448 command line arguments.
11449 * target.h (struct target_ops): Add supports_disable_randomization.
11450 (target_supports_disable_randomization): New macro.
11451
11452 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11453
11454 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11455 ifdef check.
11456 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11457 [!PT_GETDSBT] (target_loadmap): New definition.
11458 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11459 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11460 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11461 and PT_GETDSBT to LINUX_LOADMAP.
11462 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11463 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11464
11465 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11466
11467 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11468 (arm_linux_hwbp_cap): New static variable.
11469 (arm_linux_get_hwbp_cap): Replace by ...
11470 (arm_linux_init_hwbp_cap): ... this new function.
11471 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11472 (arm_linux_get_hw_watchpoint_count): Likewise.
11473 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11474 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11475 (arm_prepare_to_resume): Use perror_with_name instead of error.
11476
11477 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11478
11479 * linux-arm-low.c: Include <signal.h>.
11480 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11481 (struct arm_linux_hwbp_cap): New data type.
11482 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11483 (struct arm_linux_hw_breakpoint): New data type.
11484 (MAX_BPTS, MAX_WPTS): Define.
11485 (struct arch_process_info, struct arch_lwp_info): New data types.
11486 (arm_linux_get_hwbp_cap): New function.
11487 (arm_linux_get_hw_breakpoint_count): Likewise.
11488 (arm_linux_get_hw_watchpoint_count): Likewise.
11489 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11490 (arm_hwbp_control_initialize): Likewise.
11491 (arm_hwbp_control_is_enabled): Likewise.
11492 (arm_hwbp_control_is_initialized): Likewise.
11493 (arm_hwbp_control_disable): Likewise.
11494 (arm_linux_hw_breakpoint_equal): Likewise.
11495 (arm_linux_hw_point_initialize): Likewise.
11496 (struct update_registers_data): New data structure.
11497 (update_registers_callback: New function.
11498 (arm_insert_point): Likewise.
11499 (arm_remove_point): Likewise.
11500 (arm_stopped_by_watchpoint): Likewise.
11501 (arm_stopped_data_address): Likewise.
11502 (arm_new_process): Likewise.
11503 (arm_new_thread): Likewise.
11504 (arm_prepare_to_resume): Likewise.
11505 (the_low_target): Register arm_insert_point, arm_remove_point,
11506 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11507 arm_new_thread, and arm_prepare_to_resume.
11508
11509 2011-09-15 Stan Shebs <stan@codesourcery.com>
11510
11511 * server.h (struct emit_ops): Add compare-goto fields.
11512 * tracepoint.c (gdb_agent_op_sizes): New table.
11513 (emit_eq_goto): New function.
11514 (emit_ne_goto): New function.
11515 (emit_lt_goto): New function.
11516 (emit_le_goto): New function.
11517 (emit_gt_goto): New function.
11518 (emit_ge_goto): New function.
11519 (is_goto_target): New function.
11520 (compile_bytecodes): Recognize special cases of compare-goto
11521 combinations and call specialized emitters for them.
11522 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11523 (amd64_emit_ne_goto): New function.
11524 (amd64_emit_lt_goto): New function.
11525 (amd64_emit_le_goto): New function.
11526 (amd64_emit_gt_goto): New function.
11527 (amd64_emit_ge_goto): New function.
11528 (amd64_emit_ops): Add the new functions.
11529 (i386_emit_eq_goto): New function.
11530 (i386_emit_ne_goto): New function.
11531 (i386_emit_lt_goto): New function.
11532 (i386_emit_le_goto): New function.
11533 (i386_emit_gt_goto): New function.
11534 (i386_emit_ge_goto): New function.
11535 (i386_emit_ops): Add the new functions.
11536
11537 2011-09-08 Stan Shebs <stan@codesourcery.com>
11538
11539 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11540 (i386_emit_epilogue): Restore %ebx.
11541
11542 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11543
11544 * server.c (step_thread): Remove definition.
11545 (process_serial_event): Don't handle Hs.
11546 * server.h (step_thread): Remove declaration.
11547 * target.c (set_desired_inferior): Remove use of step_thread.
11548
11549 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11550
11551 * linux-low.c: Include linux-procfs.h.
11552 (linux_attach_lwp_1): Update comments.
11553 (linux_attach): Scan for existing threads when attaching to a
11554 process that is the tgid.
11555 * Makefile.in: Update dependencies.
11556
11557 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11558
11559 * configure.srv: Add linux-procfs.o dependencies.
11560
11561 2011-08-14 Yao Qi <yao@codesourcery.com>
11562
11563 * target.h (struct target_ops): Fix indent.
11564 * win32-low.c (win32_target_ops): Fix comment.
11565
11566 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11567 Yao Qi <yao@codesourcery.com>
11568
11569 * Makefile.in (clean): Remove tic6x-*.c files.
11570 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11571 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11572 (tic6x-c64xp-linux.c): Likewise.
11573 * configure.srv: Add support for tic6x-*-uclinux.
11574 * linux-tic6x-low.c: New.
11575 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11576
11577 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11578 Yao Qi <yao@codesourcery.com>
11579
11580 * target.h (struct target_ops): Add read_loadmap.
11581 * linux-low.c (struct target_loadseg): New type.
11582 (struct target_loadmap): New type.
11583 (linux_read_loadmap): New function.
11584 (linux_target_ops): Add linux_read_loadmap.
11585 * server.c (handle_query): Support qXfer:fdpic:read packet.
11586 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11587 to NULL.
11588
11589 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11590
11591 * win32-low.c: Include <stdint.h>.
11592
11593 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11594
11595 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11596 to the inferior here.
11597 (i386_remove_aligned_watchpoint): Ditto.
11598 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11599 fit part of the watchpoint in the debug registers.
11600 (i386_update_inferior_debug_regs): New.
11601 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11602 registers, and only update the inferior on success.
11603 (i386_low_remove_watchpoint): Ditto.
11604
11605 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11606
11607 * linux-low.c (compare_ints, unique, list_threads, show_process,
11608 linux_core_of_thread): Delete.
11609 (linux_target_ops): Change linux_core_of_thread to
11610 linux_common_core_of_thread.
11611 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11612 * utils.c (malloc_failure): Change type of argument.
11613 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11614 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11615 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11616 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11617 (IPA_OBJS): Add common-utils-ipa.o.
11618 (ptid_h, linux_osdata_h): New macros.
11619 (server_h): Add common/common-utils.h, common/xml-utils.h,
11620 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11621 common/ptid.h.
11622 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11623 ptid.o, buffer.o): New rules.
11624 (linux-low.o): Add common/linux-osdata.h as a dependency.
11625 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11626 * configure.ac: Add AC_HEADER_DIRENT check.
11627 * config.in: Regenerate.
11628 * configure: Regenerate.
11629 * remote-utils.c (xml_escape_text): Delete.
11630 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11631 buffer_xml_printf): Move to common/buffer.c.
11632 * server.c (main): Remove call to initialize_inferiors.
11633 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11634 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11635 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11636 internal_error, gdb_assert, gdb_assert_fail): Delete.
11637 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11638 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11639 common/buffer.h.
11640 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11641 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11642 initialize_inferiors): Delete.
11643
11644 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11645
11646 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11647 symbol error.
11648
11649 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11650
11651 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11652 assertion.
11653 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11654
11655 2011-05-26 Yao Qi <yao@codesourcery.com>
11656
11657 * Makefile.in (thread-db.o): Track dependence to
11658 common/gdb_thread_db.h.
11659 * thread-db.c: include gdb_thread_db.h from right place.
11660
11661 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11662
11663 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11664 __FILE__ and __LINE__ to internal_error.
11665
11666 2011-05-13 Doug Evans <dje@google.com>
11667
11668 * thread-db.c (try_thread_db_load_from_sdir): New function.
11669 (try_thread_db_load_from_dir): New function.
11670 (thread_db_load_search): Handle $sdir, ignore $pdir.
11671 Remove trying of system directories if search of
11672 libthread-db-search-path fails, that is now done via $sdir.
11673
11674 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11675
11676 * server.c (handle_query): Add EnableDisableTracepoints to the list
11677 of supported features.
11678 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11679 tracepoints.
11680 (cmd_qtenable_disable): New.
11681 (cmd_qtstart): Install tracepoints even if disabled.
11682 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11683 receiving a QTEnable or QTDisable packet.
11684 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11685 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11686 tracepoints.
11687 (gdb_probe): Skip data collection if static tracepoint is disabled.
11688
11689 2011-05-10 Doug Evans <dje@google.com>
11690
11691 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11692
11693 2011-05-04 Doug Evans <dje@google.com>
11694
11695 * linux-low.c (linux_join): Skip process lookup.
11696 * spu-low.c (spu_join): Ditto.
11697 * server.c (join_inferiors_callback): Delete.
11698 (process_serial_event): For 'D' packet (detach) call join_inferior
11699 directly.
11700
11701 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11702
11703 * README: Don't mention xscale*-*-linux*.
11704 * configure.srv (xscale*-*-linux*): Don't handle target.
11705
11706 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11707
11708 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11709 casting pointers.
11710 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11711 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11712 (i386_emit_void_call_2): Likewise.
11713
11714 2011-04-26 Yao Qi <yao@codesourcery.com>
11715
11716 * linux-low.c: Move common macros to linux-ptrace.h.
11717 Include linux-ptrace.h.
11718 * Makefile.in (linux_ptrace_h): New.
11719 (linux-low.o): Depends on linux-ptrace.h.
11720
11721 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11722
11723 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11724 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11725 (remote_prepare): New function with most of the TCP code from ...
11726 (remote_open): ... here. Detect PORT here unconditionally. Move also
11727 setting transport_is_reliable.
11728 * server.c (run_once): New variable.
11729 (gdbserver_usage): Document it.
11730 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11731 the first run if RUN_ONCE.
11732 * server.h (run_once, remote_prepare): New declarations.
11733
11734 2011-04-19 Tom Tromey <tromey@redhat.com>
11735
11736 * win32-low.c (handle_load_dll): Remove duplicate "the".
11737
11738 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11739
11740 Remove support for old Cygwin 1.5 versions.
11741 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11742 function to avoid warning.
11743 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11744 warning.
11745
11746 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11747
11748 * gdbserver/server.h (Macro _): Define it if not available.
11749
11750 2011-03-14 Michael Snyder <msnyder@vmware.com>
11751
11752 * hostio.c (handle_close): Remove unnecessary null test.
11753
11754 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11755
11756 * Makefile.in (maintainer-clean realclean distclean): Remove
11757 "make ... subdir_do" command.
11758
11759 2011-03-10 Michael Snyder <msnyder@vmware.com>
11760
11761 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11762
11763 * server.c (handle_v_run): Free alloced buffer on early return.
11764
11765 2011-03-09 Yao Qi <yao@codesourcery.com>
11766
11767 Revert:
11768 2011-03-04 Yao Qi <yao@codesourcery.com>
11769
11770 * Makefile.in: Remove GNU make feature --directory.
11771
11772 2011-03-05 Yao Qi <yao@codesourcery.com>
11773
11774 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11775 (subdir_do): New make target. Copied from gdb/Makefile.
11776 (maintainer-clean, realclean, distclean, clean): Call corresponding
11777 make targets in common/Makefile.
11778
11779 2011-02-11 Yao Qi <yao@codesourcery.com>
11780
11781 * configure.ac: Call AC_PROG_RANLIB.
11782 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11783 * configure: Regenerate.
11784
11785 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11786
11787 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11788
11789 2011-03-06 Yao Qi <yao@codesourcery.com>
11790
11791 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11792
11793 2011-03-05 Yao Qi <yao@codesourcery.com>
11794
11795 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11796 (subdir_do): New make target. Copied from gdb/Makefile.
11797 (maintainer-clean, realclean, distclean, clean): Call corresponding
11798 make targets in common/Makefile.
11799
11800 2011-03-04 Yao Qi <yao@codesourcery.com>
11801
11802 * Makefile.in: Remove GNU make feature --directory.
11803
11804 2011-03-04 Michael Snyder <msnyder@vmware.com>
11805
11806 * server.c (queue_stop_reply): Call xmalloc not malloc.
11807
11808 2011-03-02 Michael Snyder <msnyder@vmware.com>
11809
11810 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11811
11812 2011-02-28 Michael Snyder <msnyder@vmware.com>
11813
11814 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11815 (cmd_qtframe): Ditto.
11816 (cmd_qtbuffer): Ditto.
11817 (cmd_bigqtbuffer): Ditto.
11818
11819 * utils.c (decimal2str): Initialize 'width' to nine, then
11820 don't mess with it.
11821
11822 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11823
11824 * hostio.c (require_data): Free *data, not data.
11825
11826 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11827
11828 * hostio.c (require_data): Use free, not xfree.
11829
11830 2011-02-27 Michael Snyder <msnyder@vmware.com>
11831
11832 * server.c (handle_query): Discard unused value.
11833
11834 * hostio.c (require_data): Free malloc memory before returning
11835 error.
11836
11837 2011-02-26 Michael Snyder <msnyder@vmware.com>
11838
11839 * linux-low.c (list_threads): Call closedir for dirent.
11840
11841 2011-02-27 Michael Snyder <msnyder@vmware.com>
11842
11843 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11844 a case statement falls through.
11845
11846 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11847
11848 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11849 in comparison.
11850
11851 2011-02-26 Michael Snyder <msnyder@vmware.com>
11852
11853 * utils.c (decimal2str): Eliminate dead code and dead param.
11854 (pulongest): Drop dead param from call to decimal2str.
11855 (plongest): Ditto.
11856
11857 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11858
11859 Revert the following patch (not approved yet):
11860 2011-02-21 Hui Zhu <teawater@gmail.com>
11861 * tracepoint.c (tp_printf): New function.
11862 (eval_agent_expr): Handle gdb_agent_op_printf.
11863
11864 2011-02-21 Hui Zhu <teawater@gmail.com>
11865
11866 * tracepoint.c (tp_printf): New function.
11867 (eval_agent_expr): Handle gdb_agent_op_printf.
11868
11869 2011-02-18 Tom Tromey <tromey@redhat.com>
11870
11871 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11872 (tracepoint.o): Likewise.
11873 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11874 (gdb_agent_op_names): Likewise.
11875
11876 2011-02-18 Tom Tromey <tromey@redhat.com>
11877
11878 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11879 gdb_agent_op_rot>: New constants.
11880 (gdb_agent_op_names): Add pick and roll.
11881 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11882 cases.
11883
11884 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11885
11886 * aclocal.m4: Regenerated with aclocal-1.11.1.
11887
11888 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11889
11890 * server.c (handle_qxfer_traceframe_info): New.
11891 (qxfer_packets): Register "traceframe-info".
11892 (handle_query): Report support for qXfer:traceframe-info:read+.
11893 * tracepoint.c (match_blocktype): New.
11894 (traceframe_find_block_type): Rename to ...
11895 (traceframe_walk_blocks): ... this. Add callback filter argument,
11896 and use it.
11897 (traceframe_find_block_type): New, reimplemented on top of
11898 traceframe_walk_blocks.
11899 (build_traceframe_info_xml): New.
11900 (traceframe_read_info): New.
11901 * server.h (traceframe_read_info): Declare.
11902
11903 2011-02-11 Yao Qi <yao@codesourcery.com>
11904
11905 * configure.ac: Call AC_PROG_RANLIB.
11906 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11907 * configure: Regenerate.
11908
11909 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11910
11911 * server.c (gdb_read_memory): Change return semantics to allow
11912 partial transfers.
11913 (handle_search_memory_1): Adjust.
11914 (process_serial_event) <'m' packet>: Handle partial transfers.
11915 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11916
11917 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11918
11919 * regcache.c (init_register_cache): Initialize
11920 regcache->register_status.
11921 (free_register_cache): Release regcache->register_status.
11922 (regcache_cpy): Copy register_status.
11923 (registers_to_string): Print 'x's for unavailable registers.
11924 (supply_register): Mark the register's status valid or
11925 unavailable, depending on whether a buffer was passed in or not.
11926 (supply_register_zeroed): New.
11927 (supply_regblock): Mark the registers' status valid or
11928 unavailable, depending on whether a buffer was passed in or not.
11929 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11930 (struct regcache): New `register_status' field.
11931 (supply_register_zeroed): Declare.
11932 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11933 supply_register_zeroed, rather than passing a NULL buffer to
11934 supply_register.
11935 * tracepoint.c (fetch_traceframe_registers): Update comment.
11936
11937 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11938
11939 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11940 buffer explicit.
11941
11942 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11943
11944 * server.h (decode_xfer_write): Change prototype.
11945 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11946 and don't extract the annex here.
11947 * server.c (decode_xfer_read): Remove `annex' parameter,
11948 and don't extract the annex here.
11949 (decode_xfer): New.
11950 (struct qxfer): New.
11951 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11952 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11953 (handle_qxfer_statictrace): New functions, abstracted out from
11954 handle_query, and made to use the struct qxfer interface.
11955 (handle_threads_qxfer_proper): Rename to ...
11956 (handle_qxfer_threads_proper): ... this.
11957 (handle_threads_qxfer): Rename to ...
11958 (handle_qxfer_threads): ... this. Adjust.
11959 (qxfer_packets): New array.
11960 (handle_qxfer): New function.
11961 (handle_query): Use handle_qxfer.
11962
11963 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11964
11965 * gdbreplay.c: Shorten lines of >= 80 columns.
11966 * linux-low.c: Ditto.
11967 * linux-ppc-low.c: Ditto.
11968 * linux-s390-low.c: Ditto.
11969 * linux-sparc-low.c: Ditto.
11970 * linux-x86-low.c: Ditto.
11971 * linux-xtensa-low.c: Ditto.
11972 * mem-break.c: Ditto.
11973 * nto-low.c: Ditto.
11974 * regcache.h: Ditto.
11975 * remote-utils.c: Ditto.
11976 * server.c: Ditto.
11977 * server.h: Ditto.
11978 * thread-db.c: Ditto.
11979 * tracepoint.c: Ditto.
11980 * utils.c: Ditto.
11981 * win32-low.h: Ditto.
11982
11983 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11984
11985 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11986 update.
11987
11988 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11989
11990 * server.c (gdbserver_version): Update copyright year in version
11991 output.
11992 * gdbreplay.c (gdbreplay_version): Ditto.
11993
11994 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11995
11996 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11997 * linux-bfin-low.c: New file.
11998 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11999 PT_DATA_ADDR for BFIN targets.
12000 * Makefile.in (SFILES): Add linux-bfin-low.c.
12001 (clean): Remove reg-bfin.c.
12002 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12003 * README: Mention supported Blackfin targets.
12004
12005 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12006
12007 * .gitignore: New file.
12008
12009 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12010
12011 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12012
12013 2010-10-22 Jie Zhang <jie@codesourcery.com>
12014
12015 * Makefile.in: Add FLAGS_TO_PASS variable.
12016 (install): Remove dependency of install-only and recursively
12017 invoke make for install-only.
12018
12019 2010-10-04 Doug Evans <dje@google.com>
12020
12021 * Makefile.in (uninstall): Use $(DESTDIR).
12022
12023 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12024
12025 PR gdb/11842
12026
12027 * linux-x86-low.c (compat_siginfo_from_siginfo)
12028 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12029 si_code is < 0. Check for si_code == SI_TIMER before checking for
12030 si_code < 0.
12031
12032 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12033
12034 * lynx-i386-low.c: New file.
12035 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12036
12037 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12038
12039 * lynx-low.c (ptrace_request_to_str): Remove handling for
12040 request values that have been removed in LynxOS 5.x.
12041
12042 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12043
12044 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12045 <ptrace.h>
12046
12047 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12048
12049 * configure.ac: Add --enable-inprocess-agent option.
12050 * configure: Rebuilt.
12051
12052 2010-09-06 Yao Qi <yao@codesourcery.com>
12053
12054 * linux-low.c (linux_kill): Remove unused variable.
12055 (linux_stabilize_threads): Likewise.
12056 * server.c (start_inferior): Likewise.
12057 (queue_stop_reply_callback): Likewise.
12058 * tracepoint.c (do_action_at_tracepoint): Likewise.
12059
12060 2010-09-06 Yao Qi <yao@codesourcery.com>
12061
12062 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12063 on return.
12064
12065 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12066
12067 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12068
12069 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12070
12071 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12072 "$(IPA_DEPFILES)".
12073
12074 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12075
12076 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12077 gdbserver/lynx-ppc-low.c: New files.
12078 * Makefile.in (lynx_low_h): New variable.
12079 (lynx-low.o, lynx-ppc-low.o): New rules.
12080 * configure.ac: On LynxOS, link with -lnetinet.
12081 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12082 * configure: regenerate.
12083
12084 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12085
12086 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12087 * configure.ac: Add check for vasprintf and vsnprintf.
12088 * configure, config.in: Regenerate.
12089 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12090
12091 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12092
12093 * gdbreplay.c: Move include of alloca.h up, next to include of
12094 malloc.h.
12095 * server.h: Add include of malloc.h.
12096 * mem-break.c: Remove include of malloc.h.
12097 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12098
12099 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12100
12101 * Makefile.in (memmem.o): Build with -Wno-error.
12102
12103 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12104
12105 * utils.c (xsnprintf): Make non-static.
12106 * server.h: Add xsnprintf declaration.
12107 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12108 replace calls to snprintf by calls to xsnprintf throughout.
12109
12110 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12111
12112 * configure.ac: Add configure check for alloca.
12113 * configure, config.in: Regenerate.
12114 * server.h: Include alloca.h if it exists.
12115 * gdbreplay.c: Include alloca.h if it exists.
12116
12117 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12118
12119 * linux-low.c (__SIGRTMIN): Define if not already defined.
12120 (linux_create_inferior): Check for __ANDROID__ rather than
12121 __SIGRTMIN.
12122 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12123 are already deferred.
12124 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12125 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12126 stopped and already has a pending signal to report.
12127 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12128 a pending signal to report or is moving out of a jump pad.
12129 (linux_init_signals): Check for __ANDROID__ rather than
12130 __SIGRTMIN.
12131
12132 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12133
12134 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12135 debug_threads check. Avoid a linear search when not doing debug
12136 output.
12137
12138 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12139
12140 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12141 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12142 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12143 (process_event): Change local fd's type to gdb_fildes_t.
12144 (create_file_handler): Adjust prototype.
12145 (delete_file_handler): Adjust prototype.
12146 (handle_file_event): Adjust prototype. Use pfildes.
12147 (create_file_event): Adjsut prototype.
12148 * remote-utils.c (remote_desc, listen_desc): Change type to
12149 gdb_fildes_t.
12150 * server.h: New gdb_fildes_t typedef.
12151 [USE_WIN32API]: Include winsock2.h.
12152 (delete_file_handler, add_file_handler): Adjust prototypes.
12153 (pfildes): Declare.
12154 * utils.c (pfildes): New.
12155
12156 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12157
12158 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12159 * configure: Regenerate.
12160
12161 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12162
12163 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12164 (linux_done_accessing_memory): ... this.
12165 (linux_target_ops): Adjust.
12166 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12167 * nto-low.c (nto_target_ops): Adjust comment.
12168 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12169 * spu-low.c (spu_target_ops): Adjust comment.
12170 * target.h (target_ops): Rename unprepare_to_access_memory field
12171 to done_accessing_memory.
12172 (unprepare_to_access_memory): Rename to ...
12173 (done_accessing_memory): ... this.
12174
12175 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12176
12177 * linux-low.c (linux_prepare_to_access_memory): New.
12178 (linux_unprepare_to_access_memory): New.
12179 (linux_target_ops): Install them.
12180 * server.c (read_memory): Rename to ...
12181 (gdb_read_memory): ... this. Use
12182 prepare_to_access_memory/prepare_to_access_memory.
12183 (write_memory): Rename to ...
12184 (gdb_write_memory): ... this. Use
12185 prepare_to_access_memory/prepare_to_access_memory.
12186 (handle_search_memory_1): Adjust.
12187 (process_serial_event): Adjust.
12188 * target.h (struct target_ops): New fields
12189 prepare_to_access_memory and unprepare_to_access_memory.
12190 (prepare_to_access_memory, unprepare_to_access_memory): New.
12191 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12192 prepare_to_access_memory/prepare_to_access_memory.
12193 * nto-low.c (nto_target_ops): Adjust.
12194 * spu-low.c (spu_target_ops): Adjust.
12195 * win32-low.c (win32_target_ops): Adjust.
12196
12197 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12198
12199 * Makefile.in (WARN_CFLAGS): Get it from configure.
12200 (WERROR_CFLAGS): New.
12201 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12202 * configure.ac: Introduce --enable-werror, which adds -Werror to
12203 the compiler command line. Enabled by default. Disable with
12204 --disable-werror. Add -Wdeclaration-after-statement
12205 Wpointer-arith and -Wformat-nonliteral to warning flags.
12206 * configure: Regenerate.
12207
12208 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12209
12210 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12211
12212 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12213
12214 * gdbreplay.c (remote_error): New.
12215 (gdbchar): New.
12216 (expect): Use gdbchar. Check for error reading from GDB.
12217 Clarify sync error output.
12218 (play): Check for errors writing to GDB.
12219 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12220 * remote-utils.c (getpkt): Check for errors writing to the remote
12221 descriptor.
12222
12223 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12224
12225 * linux-low.c (linux_wait_1): Move non-debugging code out of
12226 `debug_threads' control.
12227
12228 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12229
12230 * linux-low.c (linux_wait_1): Don't set last_status here.
12231 * server.c (push_event, queue_stop_reply_callback): Assert we're
12232 not pushing a TARGET_WAITKIND_IGNORE event.
12233 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12234 (myresume, handle_target_event): Set the thread's last_resume_kind
12235 and last_status from the target returned status.
12236
12237 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12238
12239 PR threads/10729
12240
12241 * linux-x86-low.c (update_debug_registers_callback): New.
12242 (i386_dr_low_set_addr): Use it.
12243 (i386_dr_low_get_addr): New.
12244 (i386_dr_low_set_control): Use update_debug_registers_callback.
12245 (i386_dr_low_get_control): New.
12246 (i386_dr_low_get_status): Adjust.
12247 * linux-low.c (linux_stop_lwp): New.
12248 * linux-low.h (linux_stop_lwp): Declare.
12249
12250 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12251 argument instead of a i386_debug_reg_state.
12252 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12253 a i386_debug_reg_state.
12254 (i386_insert_aligned_watchpoint): Adjust.
12255 (i386_remove_aligned_watchpoint): Adjust.
12256 (i386_low_stopped_data_address): Read the debug registers from the
12257 inferior instead of from the mirrors.
12258 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12259 (i386_dr_low_get_addr): Declare.
12260 (i386_dr_low_get_control): Declare.
12261 (i386_dr_low_get_status): Change prototype.
12262
12263 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12264 (i386_dr_low_get_addr): New.
12265 (i386_dr_low_get_control): New.
12266 (i386_dr_low_get_status): Adjust prototype. Return
12267 dr_status_mirror.
12268 (i386_initial_stuff): Clear dr_status_mirror and
12269 dr_control_mirror.
12270 (i386_get_thread_context): Adjust.
12271 (i386_set_thread_context): Adjust.
12272 (i386_thread_added): Adjust.
12273
12274 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12275
12276 * linux-low.h (linux_thread_area): Delete declaration.
12277
12278 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12279
12280 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12281 after its termination.
12282
12283 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12284
12285 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12286 (gdb_wants_all_stopped): Delete.
12287 (linux_wait_1): Don't call them.
12288 * server.c (handle_v_cont): Tag all threads as want-stopped.
12289 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12290 stopped as "client-wants-stopped".
12291
12292 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12293
12294 * Makefile.in (signals_h): New.
12295 (server_h): Depend on it.
12296 (server.o): Don't depend on $(signals_def).
12297 (signals.o): Depend on $(signals_def).
12298
12299 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12300
12301 * Makefile.in (signals_def): New.
12302 (server_h): Append include/gdb/signals.h and signals_def.
12303 (server.o): Append signals_def.
12304
12305 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12306
12307 * server.c (handle_target_event): Use target_signal_to_host for
12308 resume_info.sig initialization.
12309 * target.h (struct thread_resume) <sig>: New comment.
12310
12311 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12312
12313 * server.c (handle_query): strcpy() the returned string from paddress()
12314 instead of sprintf().
12315 * utils.c (paddress): Return phex_nz().
12316
12317 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12318
12319 * server.c (handle_v_cont): Call mourn_inferior if process
12320 just exited.
12321 (myresume): Likewise.
12322
12323 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12324
12325 Static tracepoints, and integration with UST.
12326
12327 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12328 * mem-break.c (uninsert_all_breakpoints)
12329 (reinsert_all_breakpoints): New.
12330 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12331 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12332 (gdb_agent_ust_loaded, helper_thread_id)
12333 (gdb_agent_helper_thread_id): New macros.
12334 (struct ipa_sym_addresses): Add addr_ust_loaded,
12335 addr_helper_thread_id, addr_cmd_buf.
12336 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12337 (in_process_agent_loaded_ust): New.
12338 (write_e_ust_not_loaded): New.
12339 (maybe_write_ipa_ust_not_loaded): New.
12340 (struct collect_static_trace_data_action): New.
12341 (enum tracepoint_type) <static_tracepoint>: New.
12342 (struct tracepoint) <handle>: Mention static tracepoints.
12343 (struct static_tracepoint_ctx): New.
12344 (CMD_BUF_SIZE): New.
12345 (add_tracepoint_action): Handle static tracepoint actions.
12346 (unprobe_marker_at): New.
12347 (clear_installed_tracepoints): Handle static tracepoints.
12348 (cmd_qtdp): Handle static tracepoints.
12349 (probe_marker_at): New.
12350 (cmd_qtstart): Handle static tracepoints.
12351 (response_tracepoint): Handle static tracepoints.
12352 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12353 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12354 (get_context_regcache): Handle static tracepoints.
12355 (do_action_at_tracepoint): Handle static tracepoint actions.
12356 (traceframe_find_block_type): Handle static trace data blocks.
12357 (traceframe_read_sdata): New.
12358 (download_tracepoints): Download static tracepoint actions.
12359 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12360 (GDB_PROBE_NAME): New.
12361 (ust_ops): New.
12362 (GET_UST_SYM): New.
12363 (USTF): New.
12364 (dlsym_ust): New.
12365 (ust_marker_to_static_tracepoint): New.
12366 (gdb_probe): New.
12367 (collect_ust_data_at_tracepoint): New.
12368 (gdb_ust_probe): New.
12369 (UNIX_PATH_MAX, SOCK_DIR): New.
12370 (gdb_ust_connect_sync_socket): New.
12371 (resume_thread, stop_thread): New.
12372 (run_inferior_command): New.
12373 (init_named_socket): New.
12374 (gdb_ust_socket_init): New.
12375 (cstr_to_hexstr): New.
12376 (next_st): New.
12377 (first_marker, next_marker): New.
12378 (response_ust_marker): New.
12379 (cmd_qtfstm, cmd_qtsstm): New.
12380 (unprobe_marker_at, probe_marker_at): New.
12381 (cmd_qtstmat, gdb_ust_thread): New.
12382 (gdb_ust_init): New.
12383 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12384 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12385 (ST_REGENTRY): New.
12386 (x86_64_st_collect_regmap): New.
12387 (X86_64_NUM_ST_COLLECT_GREGS): New.
12388 (AMD64_RIP_REGNUM): New.
12389 (supply_static_tracepoint_registers): New.
12390 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12391 (ST_REGENTRY): New.
12392 (i386_st_collect_regmap): New.
12393 (i386_NUM_ST_COLLECT_GREGS): New.
12394 (supply_static_tracepoint_registers): New.
12395 * server.c (handle_query): Handle qXfer:statictrace:read.
12396 <qSupported>: Report support for StaticTracepoints, and
12397 qXfer:statictrace:read features.
12398 * server.h (traceframe_read_sdata)
12399 (supply_static_tracepoint_registers): Declare.
12400 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12401 (unpack_varlen_hex): Include in IPA build.
12402 * Makefile.in (ustlibs, ustinc): New.
12403 (IPA_OBJS): Add remote-utils-ipa.o.
12404 ($(IPA_LIB)): Link -ldl and -lpthread.
12405 (UST_CFLAGS): New.
12406 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12407 * config.in, configure: Regenerate.
12408
12409 2010-06-20 Ian Lance Taylor <iant@google.com>
12410 Pedro Alves <pedro@codesourcery.com>
12411
12412 * linux-x86-low.c (always_true): Delete.
12413 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12414 trying to fool the compiler with always_true.
12415
12416 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12417
12418 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12419 conditions in gdbserver.
12420
12421 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12422
12423 * spu-low.c (spu_read_memory): Wrap around local store limit.
12424 (spu_write_memory): Likewise.
12425
12426 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12427
12428 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12429 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12430 LONGEST uses.
12431 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12432 uses.
12433 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12434 uses with LONGEST uses.
12435
12436 2010-06-14 Stan Shebs <stan@codesourcery.com>
12437 Pedro Alves <pedro@codesourcery.com>
12438
12439 Bytecode compiler.
12440
12441 * linux-x86-low.c: Include limits.h.
12442 (add_insns): New.
12443 (always_true): New.
12444 (EMIT_ASM): New.
12445 (EMIT_ASM32): New.
12446 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12447 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12448 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12449 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12450 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12451 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12452 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12453 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12454 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12455 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12456 (amd64_emit_void_call_2): New.
12457 (amd64_emit_ops): New.
12458 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12459 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12460 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12461 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12462 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12463 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12464 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12465 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12466 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12467 (i386_emit_stack_adjust, i386_emit_int_call_1)
12468 (i386_emit_void_call_2): New.
12469 (i386_emit_ops): New.
12470 (x86_emit_ops): New.
12471 (the_low_target): Install x86_emit_ops.
12472 * server.h (struct emit_ops): New.
12473 (get_raw_reg_func_addr): Declare.
12474 (current_insn_ptr, emit_error): Declare.
12475 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12476 (set_trace_state_variable_value): New defines.
12477 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12478 addr_get_trace_state_variable_value and
12479 addr_set_trace_state_variable_value.
12480 (symbol_list): New fields for get_raw_reg,
12481 get_trace_state_variable_value and set_trace_state_variable_value.
12482 (condfn): New typedef.
12483 (struct tracepoint): New field `compiled_cond'.
12484 (do_action_at_tracepoint): Clear compiled_cond.
12485 (get_trace_state_variable_value, set_trace_state_variable_value):
12486 Export in the IPA.
12487 (condition_true_at_tracepoint): If there's a compiled condition,
12488 run that.
12489 (current_insn_ptr, emit_error): New globals.
12490 (struct bytecode_address): New.
12491 (get_raw_reg_func_addr): New.
12492 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12493 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12494 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12495 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12496 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12497 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12498 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12499 (compile_tracepoint_condition, compile_bytecodes): New.
12500 * target.h (emit_ops): Forward declare.
12501 (struct target_ops): New field emit_ops.
12502 (target_emit_ops): New.
12503 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12504 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12505 * linux-low.c (linux_emit_ops): New.
12506 (linux_target_ops): Install it.
12507 * linux-low.h (struct linux_target_ops): New field emit_ops.
12508
12509 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12510
12511 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12512 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12513
12514 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12515 Stan Shebs <stan@codesourcery.com>
12516
12517 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12518 (all): Depend on $(extra_libraries).
12519 (install-only): Install the IPA.
12520 (IPA_OBJS, IPA_LIB): New.
12521 (clean): Remove the IPA lib.
12522 (IPAGENT_CFLAGS): New.
12523 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12524 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12525 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12526 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12527 * configure.ac: Check for atomic builtins support in the compiler.
12528 (IPA_DEPFILES, extra_libraries): Define.
12529 * configure.srv (ipa_obj): Add description.
12530 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12531 (i[34567]86-*-linux*): Set ipa_obj.
12532 (x86_64-*-linux*): Set ipa_obj.
12533 * linux-low.c (stabilizing_threads): New.
12534 (supports_fast_tracepoints): New.
12535 (linux_detach): Stabilize threads before detaching.
12536 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12537 the lwp is either not stabilizing, or is moving out of a jump pad.
12538 (linux_fast_tracepoint_collecting): New.
12539 (maybe_move_out_of_jump_pad): New.
12540 (enqueue_one_deferred_signal): New.
12541 (dequeue_one_deferred_signal): New.
12542 (linux_wait_for_event_1): If moving out of a jump pad, defer
12543 pending signals to later.
12544 (linux_stabilize_threads): New.
12545 (linux_wait_1): Check if threads need moving out of jump pads, and
12546 do it if so.
12547 (stuck_in_jump_pad_callback): New.
12548 (move_out_of_jump_pad_callback): New.
12549 (lwp_running): New.
12550 (linux_resume_one_lwp): Handle moving out of jump pads.
12551 (linux_set_resume_request): Dequeue deferred signals.
12552 (need_step_over_p): Also step over fast tracepoint jumps.
12553 (start_step_over): Also uninsert fast tracepoint jumps.
12554 (finish_step_over): Also reinsert fast tracepoint jumps.
12555 (linux_install_fast_tracepoint_jump): New.
12556 (linux_target_ops): Install linux_stabilize_threads and
12557 linux_install_fast_tracepoint_jump_pad.
12558 * linux-low.h (linux_target_ops) <get_thread_area,
12559 install_fast_tracepoint_jump_pad>: New fields.
12560 (struct lwp_info) <collecting_fast_tracepoint,
12561 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12562 (linux_get_thread_area): Declare.
12563 * linux-x86-low.c (jump_insn): New.
12564 (x86_get_thread_area): New.
12565 (append_insns): New.
12566 (push_opcode): New.
12567 (amd64_install_fast_tracepoint_jump_pad): New.
12568 (i386_install_fast_tracepoint_jump_pad): New.
12569 (x86_install_fast_tracepoint_jump_pad): New.
12570 (the_low_target): Install x86_get_thread_area and
12571 x86_install_fast_tracepoint_jump_pad.
12572 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12573 (struct fast_tracepoint_jump): New.
12574 (fast_tracepoint_jump_insn): New.
12575 (fast_tracepoint_jump_shadow): New.
12576 (find_fast_tracepoint_jump_at): New.
12577 (fast_tracepoint_jump_here): New.
12578 (delete_fast_tracepoint_jump): New.
12579 (set_fast_tracepoint_jump): New.
12580 (uninsert_fast_tracepoint_jumps_at): New.
12581 (reinsert_fast_tracepoint_jumps_at): New.
12582 (set_breakpoint_at): Use write_inferior_memory.
12583 (uninsert_raw_breakpoint): Use write_inferior_memory.
12584 (check_mem_read): Mask out fast tracepoint jumps.
12585 (check_mem_write): Mask out fast tracepoint jumps.
12586 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12587 (set_fast_tracepoint_jump): Declare.
12588 (delete_fast_tracepoint_jump)
12589 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12590 (reinsert_fast_tracepoint_jumps_at): Declare.
12591 * regcache.c: Don't compile many functions when building the
12592 in-process agent library.
12593 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12594 the register buffer in the heap.
12595 (free_register_cache): If the register buffer isn't owned by the
12596 regcache, don't free it.
12597 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12598 pre-existing register caches.
12599 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12600 type.
12601 (convert_ascii_to_int): : Constify `from' parameter type.
12602 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12603 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12604 the needed buffer in-place.
12605 (relocate_instruction): New.
12606 * server.c (handle_query) <qSymbols>: If the target supports
12607 tracepoints, give it a chance of looking up symbols. Report
12608 support for fast tracepoints.
12609 (handle_status): Stabilize threads.
12610 (process_serial_event): Adjust.
12611 * server.h (struct fast_tracepoint_jump): Forward declare.
12612 (struct process_info) <fast_tracepoint_jumps>: New field.
12613 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12614 (decode_X_packet, decode_M_packet): Adjust.
12615 (relocate_instruction): Declare.
12616 (in_process_agent_loaded): Declare.
12617 (tracepoint_look_up_symbols): Declare.
12618 (struct fast_tpoint_collect_status): Declare.
12619 (fast_tracepoint_collecting): Declare.
12620 (force_unlock_trace_buffer): Declare.
12621 (handle_tracepoint_bkpts): Declare.
12622 (initialize_low_tracepoint)
12623 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12624 * target.h (struct target_ops) <stabilize_threads,
12625 install_fast_tracepoint_jump_pad>: New fields.
12626 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12627 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12628 [HAVE_STDINT_H]: Include stdint.h.
12629 (trace_debug_1): Rename to ...
12630 (trace_vdebug): ... this.
12631 (trace_debug): Rename to ...
12632 (trace_debug_1): ... this. Add `level' parameter.
12633 (trace_debug): New.
12634 (ATTR_USED, ATTR_NOINLINE): New.
12635 (IP_AGENT_EXPORT): New.
12636 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12637 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12638 (about_to_request_buffer_space, trace_buffer_is_full)
12639 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12640 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12641 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12642 (traceframe_write_count, traceframes_created)
12643 (trace_state_variables)
12644 New renaming defines.
12645 (struct ipa_sym_addresses): New.
12646 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12647 (symbol_list): New.
12648 (ipa_sym_addrs): New.
12649 (all_tracepoint_symbols_looked_up): New.
12650 (in_process_agent_loaded): New.
12651 (write_e_ipa_not_loaded): New.
12652 (maybe_write_ipa_not_loaded): New.
12653 (tracepoint_look_up_symbols): New.
12654 (debug_threads) [IN_PROCESS_AGENT]: New.
12655 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12656 (UNKNOWN_SIDE_EFFECTS): New.
12657 (stop_tracing): New.
12658 (flush_trace_buffer): New.
12659 (stop_tracing_bkpt): New.
12660 (flush_trace_buffer_bkpt): New.
12661 (read_inferior_integer): New.
12662 (read_inferior_uinteger): New.
12663 (read_inferior_data_pointer): New.
12664 (write_inferior_data_pointer): New.
12665 (write_inferior_integer): New.
12666 (write_inferior_uinteger): New.
12667 (struct collect_static_trace_data_action): Delete.
12668 (enum tracepoint_type): New.
12669 (struct tracepoint) <type>: New field `type'.
12670 <actions_str, step_actions, step_actions_str>: Only include in
12671 GDBserver.
12672 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12673 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12674 (tracepoints): Use IP_AGENT_EXPORT.
12675 (last_tracepoint): Don't include in the IPA.
12676 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12677 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12678 (alloced_trace_state_variables): New.
12679 (trace_state_variables): Use IP_AGENT_EXPORT.
12680 (traceframe_t): Delete unused variable.
12681 (circular_trace_buffer): Don't include in the IPA.
12682 (trace_buffer_start): Delete.
12683 (struct trace_buffer_control): New.
12684 (trace_buffer_free): Delete.
12685 (struct ipa_trace_buffer_control): New.
12686 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12687 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12688 New.
12689 (trace_buffer_ctrl): New.
12690 (TRACE_BUFFER_CTRL_CURR): New.
12691 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12692 Reimplement as macros.
12693 (trace_buffer_wrap): Delete.
12694 (traceframe_write_count, traceframe_read_count)
12695 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12696 (struct tracepoint_hit_ctx) <type>: New field.
12697 (struct fast_tracepoint_ctx): New.
12698 (memory_barrier): New.
12699 (cmpxchg): New.
12700 (record_tracepoint_error): Update atomically in the IPA.
12701 (clear_inferior_trace_buffer): New.
12702 (about_to_request_buffer_space): New.
12703 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12704 updating the same buffer.
12705 (add_tracepoint): Default the tracepoint's type to trap
12706 tracepoint, and orig_size to -1.
12707 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12708 internal variables.
12709 (create_trace_state_variable): New parameter `gdb'. Handle it.
12710 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12711 (cmd_qtdp): Handle fast tracepoints.
12712 (cmd_qtdv): Adjust.
12713 (max_jump_pad_size): New.
12714 (gdb_jump_pad_head): New.
12715 (get_jump_space_head): New.
12716 (claim_jump_space): New.
12717 (sort_tracepoints): New.
12718 (MAX_JUMP_SIZE): New.
12719 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12720 IPA.
12721 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12722 support. Upload fast traceframes, and delete internal IPA
12723 breakpoints.
12724 (stop_tracing_handler): New.
12725 (flush_trace_buffer_handler): New.
12726 (cmd_qtstop): Upload fast tracepoints.
12727 (response_tracepoint): Handle fast tracepoints.
12728 (tracepoint_finished_step): Upload fast traceframes. Set the
12729 tracepoint hit context's tracepoint type.
12730 (handle_tracepoint_bkpts): New.
12731 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12732 type. Add comment about fast tracepoints.
12733 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12734 non-existing action_str field.
12735 (get_context_regcache): Handle fast tracepoints.
12736 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12737 to the regcache.
12738 (fast_tracepoint_from_jump_pad_address): New.
12739 (fast_tracepoint_from_ipa_tpoint_address): New.
12740 (collecting_t): New.
12741 (force_unlock_trace_buffer): New.
12742 (fast_tracepoint_collecting): New.
12743 (collecting): New.
12744 (gdb_collect): New.
12745 (write_inferior_data_ptr): New.
12746 (target_tp_heap): New.
12747 (target_malloc): New.
12748 (download_agent_expr): New.
12749 (UALIGN): New.
12750 (download_tracepoints): New.
12751 (download_trace_state_variables): New.
12752 (upload_fast_traceframes): New.
12753 (IPA_FIRST_TRACEFRAME): New.
12754 (IPA_NEXT_TRACEFRAME_1): New.
12755 (IPA_NEXT_TRACEFRAME): New.
12756 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12757 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12758 (gdb_jump_pad_buffer_end): New.
12759 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12760 (initialize_tracepoint): Adjust.
12761 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12762 buffer. Initialize the low module.
12763 * utils.c (PREFIX, TOOLNAME): New.
12764 (malloc_failure): Use PREFIX.
12765 (error): In the IPA, an error causes an exit.
12766 (fatal, warning): Use PREFIX.
12767 (internal_error): Use TOOLNAME.
12768 (NUMCELLS): Increase to 10.
12769 * configure, config.in: Regenerate.
12770
12771 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12772
12773 * server.c (handle_query) <qSupported>: Do two passes over the
12774 qSupported string to avoid nesting strtok.
12775
12776 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12777
12778 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12779 (CDEPS): New.
12780 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12781 -Wl,--dynamic-list.
12782 * configure: Regenerate.
12783 * proc-service.list: New.
12784
12785 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12786
12787 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12788 New comment.
12789
12790 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12791
12792 * gdbreplay.c (remote_open): Check error return from socket() call by
12793 its equality to -1 not by it being negative.
12794 * remote-utils.c (remote_open): Likewise.
12795
12796 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12797
12798 * config.h: Regenerate.
12799
12800 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12801
12802 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12803 doesn't provide PTRACE_GET_THREAD_AREA.
12804
12805 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12806
12807 * linux-m68k-low.c: Include <asm/ptrace.h>
12808 (ps_get_thread_area): Implement.
12809
12810 2010-05-03 Doug Evans <dje@google.com>
12811
12812 * event-loop.c (struct callback_event): New struct.
12813 (callback_list): New global.
12814 (append_callback_event, delete_callback_event): New functions.
12815 (process_callback): New function.
12816 (start_event_loop): Call it.
12817 * remote-utils.c (NOT_SCHEDULED): Define.
12818 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12819 moved out of readchar.
12820 (readchar): Rewrite. Call reschedule before returning.
12821 (reset_readchar): New function.
12822 (remote_close): Call it.
12823 (process_remaining, reschedule): New functions.
12824 * server.h (callback_handler_func): New typedef.
12825 (append_callback_event, delete_callback_event): Declare.
12826
12827 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12828
12829 * proc-service.c (ps_pglobal_lookup): Use
12830 thread_db_look_up_one_symbol.
12831 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12832 parameter. Use it instead of all_symbols_looked_up.
12833 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12834 field.
12835 (all_symbols_looked_up): Don't declare.
12836 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12837 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12838 field.
12839 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12840 Set all_symbols_looked_up here.
12841 (thread_db_look_up_one_symbol): New.
12842 (thread_db_get_tls_address): Adjust.
12843 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12844 thread_db object on the heap, and tentatively set it in the
12845 process structure.
12846 (thread_db_init): Don't set all_symbols_looked_up here.
12847 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12848
12849 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12850
12851 * linux-low.c (linux_kill, linux_detach): Adjust.
12852 (status_pending_p_callback): Remove redundant statement. Check
12853 for !TARGET_WAITIKIND_IGNORE, instead of
12854 TARGET_WAITKIND_STOPPED.
12855 (handle_tracepoints): Make sure LWP is locked. Adjust.
12856 (linux_wait_for_event_1): Adjust.
12857 (linux_cancel_breakpoints): New.
12858 (unsuspend_one_lwp): New.
12859 (unsuspend_all_lwps): New.
12860 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12861 (send_sigstop_callback): Change return type to int, add new
12862 `except' parameter and handle it.
12863 (suspend_and_send_sigstop_callback): New.
12864 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12865 pass them down. If SUSPEND, also increment the lwp's suspend
12866 count.
12867 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12868 (need_step_over_p): Don't consider suspended LWPs.
12869 (start_step_over): Adjust.
12870 (proceed_one_lwp): Change return type to int, add new `except'
12871 parameter and handle it.
12872 (unsuspend_and_proceed_one_lwp): New.
12873 (proceed_all_lwps): Use find_inferior instead of
12874 for_each_inferior.
12875 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12876 also decrement the suspend count of LWPs. Pass `except' down,
12877 instead of hacking its suspend count.
12878 (linux_pause_all): Add `freeze' parameter. Adjust.
12879 (linux_unpause_all): New.
12880 (linux_target_ops): Install linux_unpause_all.
12881 * server.c (handle_status): Adjust.
12882 * target.h (struct target_ops): New fields `unpause_all' and
12883 `cancel_breakpoints'. Add new parameter to `pause_all'.
12884 (pause_all): Add new `freeze' parameter.
12885 (unpause_all): New.
12886 (cancel_breakpoints): New.
12887 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12888 cancel breakpoints.
12889 (cmd_qtstart): Pause threads.
12890 (stop_tracing): Pause threads, and cancel breakpoints.
12891 * win32-low.c (win32_target_ops): Adjust.
12892
12893 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12894
12895 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12896 the inferior right away from here...
12897 (linux_wait_1): ... to here, and adjust to check the thread's
12898 last_resume_kind instead of the lwp's step or stop_expected flags.
12899
12900 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12901
12902 * README: Use consistent `GDB' and `GDBserver' spellings.
12903
12904 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12905
12906 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12907 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12908 (linux_detach_one_lwp): Assume the lwp is stopped.
12909 (any_thread_of): Delete.
12910 (linux_detach): Stop all lwps here. Don't blindly delete all
12911 breakpoints.
12912 (delete_lwp_callback): New.
12913 (linux_mourn): Delete all lwps of the process that is gone.
12914 (linux_wait_1): Don't delete the last lwp of the process here.
12915 * mem-break.h (mark_breakpoints_out): Declare.
12916 * mem-break.c (mark_breakpoints_out): New.
12917 (free_all_breakpoints): Use it.
12918 * server.c (handle_target_event): If the process is gone, mark
12919 breakpoints out.
12920 * thread-db.c (struct thread_db) <create_bp>: New field.
12921 (thread_db_enable_reporting): Fix prototype. Store a thread event
12922 breakpoint reference in the thread_db struct.
12923 (thread_db_load_search): Clear the thread_db object.
12924 (try_thread_db_load_1): Ditto.
12925 (switch_to_process): New.
12926 (disable_thread_event_reporting): Use it.
12927 (remove_thread_event_breakpoints): New.
12928 (thread_db_detach, thread_db_mourn): Use it.
12929
12930 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12931
12932 * linux-low.c (linux_enable_event_reporting): New.
12933 (linux_wait_for_event_1, handle_extended_wait): Use it.
12934
12935 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12936
12937 * linux-low.c (linux_kill_one_lwp, linux_kill)
12938 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12939 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12940 SIGSTOP even if the LWP is stopped.
12941 (send_sigstop_callback): New.
12942 (stop_all_lwps): Use send_sigstop_callback instead.
12943 (linux_resume_one_thread): Adjust.
12944 (proceed_one_lwp): Still proceed an LWP that the client has
12945 requested to stop, if we haven't reported it as stopped yet. Make
12946 sure that LWPs the client want stopped, have a pending SIGSTOP.
12947
12948 2010-04-26 Doug Evans <dje@google.com>
12949
12950 * server.c (handle_general_set): Make static.
12951
12952 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12953 Print received char after testing for error/eof instead of before.
12954 (input_interrupt): Tweak comment.
12955
12956 2010-04-23 Doug Evans <dje@google.com>
12957
12958 * server.c (start_inferior): Print inferior argv if --debug.
12959
12960 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12961
12962 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12963 * nto-x86-low.c: Include server.h
12964
12965 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12966
12967 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12968 be consistent with other sources of this directory.
12969 (init_registers_amd64): Correct name of source file of this function
12970 in the comment.
12971
12972 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12973
12974 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12975 64-bit executables.
12976
12977 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12978
12979 * win32-i386-low.c: Add 64-bit support.
12980 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12981 (init_registers_amd64): Declare.
12982 (mappings): Add 64-bit version of array.
12983 (init_windows_x86): New function.
12984 (the_low_target): Change init_arch field to init_windows_x86.
12985
12986 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12987
12988 * win32-low.c: Adapt to support also 64-bit architecture.
12989 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12990 (get_image_name): Use SIZE_T type for local variable `done'.
12991 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12992 (toolhelp_get_dll_name): Idem.
12993 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12994 Use uintptr_t typecast to avoid warning.
12995 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12996 (handle_exception): Use phex_nz to avoid warning.
12997 (win32_wait): Remove unused local variable `process'.
12998
12999 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13000
13001 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13002 `amd64-avx.o'.
13003
13004 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13005
13006 * configure.ac: Use `ws2_32' library for srv_mingw.
13007 * configure: Regenerate.
13008 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13009 * remote-utils.c: Likewise.
13010
13011 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13012
13013 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13014 if __x86_64__ is defined.
13015
13016 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13017
13018 * configure: Regenerate.
13019
13020 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13021
13022 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13023 * target.h (target_ops): New get_tib_address field.
13024 * win32-low.h (win32_thread_info): Add thread_local_base field.
13025 * win32-low.c (child_add_thread): Add tlb argument.
13026 Set thread_local_base field to TLB.
13027 (get_child_debug_event): Adapt to child_add_thread change.
13028 (win32_get_tib_address): New function.
13029 (win32_target_ops): Set get_tib_address field to
13030 win32_get_tib_address.
13031 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13032
13033 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13034
13035 * linux-low.c (linux_mourn): Also remove the process.
13036 * server.c (handle_target_event): Don't remove the process here.
13037 * nto-low.c (nto_mourn): New.
13038 (nto_target_ops): Install it.
13039 * spu-low.c (spu_mourn): New.
13040 (spu_target_ops): Install it.
13041 * win32-low.c (win32_mourn): New.
13042 (win32_target_ops): Install it.
13043
13044 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13045
13046 * server.h (buffer_xml_printf): Remove redundant `;'.
13047
13048 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13049
13050 * regcache.c (set_register_cache): Invalidate regcaches before
13051 changing the register cache layout.
13052 (regcache_invalidate_one): Allow a NULL regcache.
13053 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13054 regcaches before changing the register cache layout or the target
13055 regsets.
13056
13057 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13058
13059 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13060 variable warning on Linux/x86-64.
13061
13062 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13063
13064 GDBserver disconnected tracing support.
13065
13066 * linux-low.c (linux_remove_process): Delete.
13067 (add_lwp): Don't set last_resume_kind here.
13068 (linux_kill): Use `mourn'.
13069 (linux_detach): Use `thread_db_detach', and `mourn'.
13070 (linux_mourn): New.
13071 (linux_attach_lwp_1): Adjust comment.
13072 (linux_attach): last_resume_kind moved the thread_info; adjust.
13073 (status_pending_p_callback): Adjust.
13074 (linux_wait_for_event_1): Adjust.
13075 (count_events_callback, select_singlestep_lwp_callback)
13076 (select_event_lwp_callback, cancel_breakpoints_callback)
13077 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13078 (proceed_one_lwp): Adjust.
13079 (linux_async): Add debug output.
13080 (linux_thread_stopped): New.
13081 (linux_pause_all): New.
13082 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13083 linux_pause_all.
13084 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13085 (thread_db_free): Delete declaration.
13086 (thread_db_detach, thread_db_mourn): Declare.
13087 * thread-db.c (thread_db_init): Use thread_db_mourn.
13088 (thread_db_free): Delete, split in two.
13089 (disable_thread_event_reporting): New.
13090 (thread_db_detach): New.
13091 (thread_db_mourn): New.
13092
13093 * server.h (struct thread_info) <last_resume_kind>: New field.
13094 <attached>: Add comment.
13095 <gdb_detached>: New field.
13096 (handler_func): Change return type to int.
13097 (handle_serial_event, handle_target_event): Ditto.
13098 (gdb_connected): Declare.
13099 (tracing): Delete.
13100 (disconnected_tracing): Declare.
13101 (stop_tracing): Declare.
13102
13103 * server.c (handle_query) <qSupported>: Report support for
13104 disconnected tracing.
13105 (queue_stop_reply_callback): Account for running threads.
13106 (gdb_wants_thread_stopped): New.
13107 (gdb_wants_all_threads_stopped): New.
13108 (gdb_reattached_process): New.
13109 (handle_status): Clear the `gdb_detached' flag of all processes.
13110 In all-stop, stop all threads.
13111 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13112 (process_serial_event): If the remote connection breaks, or if an
13113 exit was forced with "monitor exit", force an event loop exit.
13114 Handle disconnected tracing on detach.
13115 (handle_serial_event): Adjust.
13116 (handle_target_event): If GDB isn't connected, forward events back
13117 to the inferior, unless the last process exited, in which case,
13118 exit gdbserver. Adjust interface.
13119
13120 * remote-utils.c (remote_open): Don't block in accept. Instead
13121 register an event loop source on the listen socket file
13122 descriptor. Refactor bits into ...
13123 (listen_desc): ... this new global.
13124 (gdb_connected): ... this new function.
13125 (enable_async_notification): ... this new function.
13126 (handle_accept_event): ... this new function.
13127 (remote_close): Clear remote_desc.
13128
13129 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13130
13131 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13132 New fields.
13133 (mourn_inferior): Define.
13134 (target_process_qsupported): Avoid the dangling else problem.
13135 (thread_stopped): Define.
13136 (pause_all): Define.
13137 (target_waitstatus_to_string): Declare.
13138 * target.c (target_waitstatus_to_string): New.
13139
13140 * tracepoint.c (tracing): Make extern.
13141 (disconnected_tracing): New.
13142 (stop_tracing): Make extern. Handle tracing stops due to GDB
13143 disconnecting.
13144 (cmd_qtdisconnected): New.
13145 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13146 (handle_tracepoint_general_set): Handle QTDisconnected.
13147
13148 * event-loop.c (event_handler_func): Change return type to int.
13149 (process_event): Bail out if the event handler wants the event
13150 loop to stop.
13151 (handle_file_event): Ditto.
13152 (start_event_loop): Bail out if the event handler wants the event
13153 loop to stop.
13154
13155 * nto-low.c (nto_target_ops): Adjust.
13156 * spu-low.c (spu_wait): Don't remove the process here.
13157 (spu_target_ops): Adjust.
13158 * win32-low.c (win32_wait): Don't remove the process here.
13159 (win32_target_ops): Adjust.
13160
13161 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13162
13163 * regcache.c (realloc_register_cache): Invalidate inferior's
13164 regcache before recreating it.
13165
13166 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13167
13168 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13169
13170 2010-04-09 Stan Shebs <stan@codesourcery.com>
13171 Pedro Alves <pedro@codesourcery.com>
13172
13173 * server.h (LONGEST): New.
13174 (struct thread_info) <while_stepping>: New field.
13175 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13176 Declare.
13177 (initialize_tracepoint, handle_tracepoint_general_set)
13178 (handle_tracepoint_query, tracepoint_finished_step)
13179 (tracepoint_was_hit, release_while_stepping_state_list):
13180 (current_traceframe): Declare.
13181 * server.c (handle_general_set): Handle tracepoint packets.
13182 (read_memory): New.
13183 (write_memory): New.
13184 (handle_search_memory_1): Use read_memory.
13185 (handle_query): Report support for conditional tracepoints, trace
13186 state variables, and tracepoint sources. Handle tracepoint
13187 queries.
13188 (main): Initialize the tracepoints module.
13189 (process_serial_event): Handle traceframe reads/writes.
13190
13191 * linux-low.c (handle_tracepoints): New.
13192 (linux_wait_1): Call it.
13193 (linux_resume_one_lwp): Handle while-stepping.
13194 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13195 (linux_target_ops): Install them.
13196 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13197 New field.
13198 * linux-x86-low.c (x86_supports_tracepoints): New.
13199 (the_low_target). Install it.
13200
13201 * mem-break.h (delete_breakpoint): Declare.
13202 * mem-break.c (delete_breakpoint): Make external.
13203
13204 * target.h (struct target_ops): Add `supports_tracepoints',
13205 `read_pc', and `write_pc' fields.
13206 (target_supports_tracepoints): Define.
13207 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13208 (phex_nz): New.
13209
13210 * regcache.h (struct regcache) <registers_owned>: New field.
13211 (init_register_cache, regcache_cpy): Declare.
13212 (regcache_read_pc, regcache_write_pc): Declare.
13213 (register_cache_size): Declare.
13214 (supply_regblock): Declare.
13215 * regcache.c (init_register_cache): New.
13216 (new_register_cache): Use it.
13217 (regcache_cpy): New.
13218 (register_cache_size): New.
13219 (supply_regblock): New.
13220 (regcache_read_pc, regcache_write_pc): New.
13221
13222 * tracepoint.c: New.
13223
13224 * Makefile.in (OBS): Add tracepoint.o.
13225 (tracepoint.o): New rule.
13226
13227 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13228
13229 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13230 (i386-mmx.o): New.
13231 (i386-mmx.c): Likewise.
13232 (i386-mmx-linux.o): Likewise.
13233 (i386-mmx-linux.c): Likewise.
13234
13235 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13236 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13237 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13238 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13239
13240 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13241 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13242 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13243
13244 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13245
13246 * Makefile.in (clean): Updated.
13247 (i386-avx.o): New.
13248 (i386-avx.c): Likewise.
13249 (i386-avx-linux.o): Likewise.
13250 (i386-avx-linux.c): Likewise.
13251 (amd64-avx.o): Likewise.
13252 (amd64-avx.c): Likewise.
13253 (amd64-avx-linux.o): Likewise.
13254 (amd64-avx-linux.c): Likewise.
13255
13256 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13257 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13258 (srv_amd64_regobj): Add amd64-avx.o.
13259 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13260 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13261 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13262 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13263 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13264 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13265 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13266
13267 * i387-fp.c: Include "i386-xstate.h".
13268 (i387_xsave): New.
13269 (i387_cache_to_xsave): Likewise.
13270 (i387_xsave_to_cache): Likewise.
13271 (x86_xcr0): Likewise.
13272
13273 * i387-fp.h (i387_cache_to_xsave): Likewise.
13274 (i387_xsave_to_cache): Likewise.
13275 (x86_xcr0): Likewise.
13276
13277 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13278 * linux-crisv32-low.c (target_regsets): Likewise.
13279 * linux-m68k-low.c (target_regsets): Likewise.
13280 * linux-mips-low.c (target_regsets): Likewise.
13281 * linux-ppc-low.c (target_regsets): Likewise.
13282 * linux-s390-low.c (target_regsets): Likewise.
13283 * linux-sh-low.c (target_regsets): Likewise.
13284 * linux-sparc-low.c (target_regsets): Likewise.
13285 * linux-xtensa-low.c (target_regsets): Likewise.
13286
13287 * linux-low.c: Include <sys/uio.h>.
13288 (regsets_fetch_inferior_registers): Support nt_type.
13289 (regsets_store_inferior_registers): Likewise.
13290 (linux_process_qsupported): New.
13291 (linux_target_ops): Add linux_process_qsupported.
13292
13293 * linux-low.h (regset_info): Add nt_type.
13294 (linux_target_ops): Add process_qsupported.
13295
13296 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13297 and <sys/uio.h>.
13298 (init_registers_i386_avx_linux): New.
13299 (init_registers_amd64_avx_linux): Likewise.
13300 (xmltarget_i386_linux_no_xml): Likewise.
13301 (xmltarget_amd64_linux_no_xml): Likewise.
13302 (PTRACE_GETREGSET): Likewise.
13303 (PTRACE_SETREGSET): Likewise.
13304 (x86_fill_xstateregset): Likewise.
13305 (x86_store_xstateregset): Likewise.
13306 (use_xml): Likewise.
13307 (x86_linux_update_xmltarget): Likewise.
13308 (x86_linux_process_qsupported): Likewise.
13309 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13310 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13311 init_registers_i386_linux here. Call
13312 x86_linux_update_xmltarget.
13313 (the_low_target): Add x86_linux_process_qsupported.
13314
13315 * server.c (handle_query): Call target_process_qsupported.
13316
13317 * target.h (target_ops): Add process_qsupported.
13318 (target_process_qsupported): New.
13319
13320 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13321
13322 * inferiors.c (add_thread): Set last_status kind to
13323 TARGET_WAITKIND_IGNORE.
13324 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13325 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13326 (linux_wait_1): Move `thread' local definition to block that uses
13327 it. Don't NULL initialize `event_child'.
13328 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13329 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13330 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13331
13332 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13333
13334 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13335 an extended waitstatus, or by a watchpoint.
13336 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13337 thread was stepping or has been stopped by a watchpoint.
13338
13339 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13340
13341 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13342 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13343 of another, then delete the previous, and validate all
13344 breakpoints.
13345 (validate_inserted_breakpoint): New.
13346 (delete_disabled_breakpoints): New.
13347 (validate_breakpoints): New.
13348 (check_mem_read): Validate breakpoints before trusting their
13349 shadow. Delete disabled breakpoints.
13350 (check_mem_write): Validate breakpoints before trusting they
13351 should be inserted. Delete disabled breakpoints.
13352 * mem-break.h (validate_breakpoints):
13353 * server.c (handle_query): Validate breakpoints when we see a
13354 qSymbol query.
13355
13356 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13357
13358 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13359 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13360 if we could tell there's a GDB breakpoint at stop_pc.
13361 (need_step_over_p): Don't do a step over if we find a GDB
13362 breakpoint at the resume PC.
13363
13364 * mem-break.c (struct raw_breakpoint): New.
13365 (enum bkpt_type): New type `gdb_breakpoint'.
13366 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13367 fields. New field `raw'.
13368 (find_raw_breakpoint_at): New.
13369 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13370 breakpoint instead.
13371 (set_breakpoint_at): Adjust.
13372 (delete_raw_breakpoint): New.
13373 (release_breakpoint): New.
13374 (delete_breakpoint): Rename to...
13375 (delete_breakpoint_1): ... this. Add proc parameter. Use
13376 release_breakpoint. Return ENOENT.
13377 (delete_breakpoint): Reimplement.
13378 (find_breakpoint_at): Delete.
13379 (find_gdb_breakpoint_at): New.
13380 (delete_breakpoint_at): Delete.
13381 (set_gdb_breakpoint_at): New.
13382 (delete_gdb_breakpoint_at): New.
13383 (gdb_breakpoint_here): New.
13384 (set_reinsert_breakpoint): Use release_breakpoint.
13385 (uninsert_breakpoint): Rename to ...
13386 (uninsert_raw_breakpoint): ... this.
13387 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13388 (reinsert_raw_breakpoint): Change parameter type to
13389 raw_breakpoint.
13390 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13391 instead.
13392 (check_breakpoints): Adjust. Use release_breakpoint.
13393 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13394 (breakpoint_inserted_here): Ditto.
13395 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13396 Don't trust the breakpoint's shadow if it is not inserted.
13397 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13398 (delete_all_breakpoints): Adjust.
13399 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13400 use delete_breakpoint_1.
13401
13402 * mem-break.h (breakpoints_supported): Delete declaration.
13403 (set_gdb_breakpoint_at): Declare.
13404 (gdb_breakpoint_here): Declare.
13405 (delete_breakpoint_at): Delete.
13406 (delete_gdb_breakpoint_at): Declare.
13407
13408 * server.h (struct raw_breakpoint): Forward declare.
13409 (struct process_info): New field `raw_breakpoints'.
13410
13411 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13412 breakpoints.
13413
13414 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13415
13416 * linux-low.c (status_pending_p_callback): Fix comment.
13417 (linux_wait_for_event_1): Move most of the internal breakpoint
13418 handling from here...
13419 (linux_wait_1): ... to here.
13420 (count_events_callback): New.
13421 (select_singlestep_lwp_callback): New.
13422 (select_event_lwp_callback): New.
13423 (cancel_breakpoints_callback): New.
13424 (select_event_lwp): New.
13425 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13426 priority to all LWPs that have had events that should be reported
13427 to the client. Cancel breakpoints when about to reporting the
13428 event to the client, not while stopping lwps. No longer cancel
13429 finished single-steps here.
13430 (cancel_finished_single_step): Delete.
13431 (cancel_finished_single_steps): Delete.
13432
13433 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13434
13435 * mem-break.c (enum bkpt_type): New.
13436 (struct breakpoint): New field `type'.
13437 (set_breakpoint_at): Change return type to struct breakpoint
13438 pointer. Set type to `other_breakpoint' by default.
13439 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13440 in the breakpoint list.
13441 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13442 (reinsert_breakpoint): Rename to ...
13443 (reinsert_raw_breakpoint): ... this.
13444 (reinsert_breakpoints_at): Adjust.
13445 * mem-break.h (struct breakpoint): Declare.
13446 (set_breakpoint_at): Change return type to struct breakpoint
13447 pointer.
13448
13449 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13450
13451 * server.c (handle_query): Assign, not compare.
13452
13453 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13454
13455 Teach linux gdbserver to step-over-breakpoints.
13456
13457 * linux-low.c (can_hardware_single_step): New.
13458 (supports_breakpoints): New.
13459 (handle_extended_wait): If stopping threads, read the stop pc of
13460 the new cloned LWP.
13461 (get_pc): New.
13462 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13463 low target doesn't support retrieving the PC.
13464 (add_lwp): Set last_resume_kind to resume_continue.
13465 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13466 (linux_attach): Don't clear stop_expected. Set the lwp's
13467 last_resume_kind to resume_stop.
13468 (linux_detach_one_lwp): Don't check for removed breakpoints.
13469 (check_removed_breakpoint): Delete.
13470 (status_pending_p): Rename to ...
13471 (status_pending_p_callback): ... this. Don't check for removed
13472 breakpoints. Don't consider threads that are stopped from GDB's
13473 perspective.
13474 (linux_wait_for_lwp): Always read the stop_pc here.
13475 (cancel_breakpoint): New.
13476 (step_over_bkpt): New global.
13477 (linux_wait_for_event_1): Implement stepping over breakpoints.
13478 (gdb_wants_lwp_stopped): New.
13479 (gdb_wants_all_stopped): New.
13480 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13481 single-step traps here. Store the thread's last reported target
13482 wait status.
13483 (send_sigstop): Don't clear stop_expected. Always set it,
13484 instead.
13485 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13486 (cancel_finished_single_step): New.
13487 (cancel_finished_single_steps): New.
13488 (wait_for_sigstop): Don't cancel finished single-step traps here.
13489 (linux_resume_one_lwp): Don't check for removed breakpoints.
13490 Don't set `step' on non-hardware step archs.
13491 (linux_set_resume_request): Ignore resume_stop requests if already
13492 stopping or stopped. Set the lwp's last_resume_kind.
13493 (resume_status_pending_p): Don't check for removed breakpoints.
13494 (need_step_over_p): New.
13495 (start_step_over): New.
13496 (finish_step_over): New.
13497 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13498 requests. Clear the thread's last reported target waitstatus.
13499 Don't use the `suspended' flag. Don't consider pending breakpoints.
13500 (linux_resume): Start a step-over if necessary.
13501 (proceed_one_lwp): New.
13502 (proceed_all_lwps): New.
13503 (unstop_all_lwps): New.
13504 * linux-low.h (struct lwp_info): Rewrite comment for the
13505 `suspended' flag. Add the `stop_pc' field. Delete the
13506 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13507 Add `'last_resume_kind' and `need_step_over' fields.
13508 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13509 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13510 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13511 (set_raw_breakpoint_at): New.
13512 (set_breakpoint_at): Rewrite to use it.
13513 (reinsert_breakpoint_handler): Delete.
13514 (set_reinsert_breakpoint): New.
13515 (reinsert_breakpoint_by_bp): Delete.
13516 (delete_reinsert_breakpoints): New.
13517 (uninsert_breakpoint): Rewrite.
13518 (uninsert_breakpoints_at): New.
13519 (reinsert_breakpoint): Rewrite.
13520 (reinsert_breakpoints_at): New.
13521 (check_breakpoints): Rewrite.
13522 (breakpoint_here): New.
13523 (breakpoint_inserted_here): New.
13524 (check_mem_read): Adjust.
13525 * mem-break.h (breakpoints_supported, breakpoint_here)
13526 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13527 (reinsert_breakpoint_by_bp): Delete declaration.
13528 (delete_reinsert_breakpoints): Declare.
13529 (reinsert_breakpoint): Delete declaration.
13530 (reinsert_breakpoints_at): Declare.
13531 (uninsert_breakpoint): Delete declaration.
13532 (uninsert_breakpoints_at): Declare.
13533 (check_breakpoints): Adjust prototype.
13534 * server.h: Adjust include order.
13535 (struct thread_info): Declare here. Add a `last_status' field.
13536
13537 2010-03-23 Michael Snyder <msnyder@vmware.com>
13538
13539 * server.c (crc32): New function.
13540 (handle_query): Add handling for 'qCRC:' request.
13541
13542 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13543
13544 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13545 lwp had been stopped by a watchpoint.
13546
13547 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13548
13549 * server.h (internal_error): Declare.
13550 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13551 * utils.c (internal_error): New function.
13552
13553 2010-03-15 Andreas Schwab <schwab@redhat.com>
13554
13555 * configure.srv: Fix typo setting srv_regobj.
13556
13557 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13558
13559 * linux-low.c (fetch_register): Avoid passing a non string literal
13560 format to `error'.
13561 (usr_store_inferior_registers): Ditto.
13562
13563 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13564
13565 * linux-low.c (linux_write_memory): Bail out early if peeking
13566 memory failed.
13567
13568 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13569
13570 * linux-low.h (struct lwp_info): New fields
13571 `stopped_by_watchpoint' and `stopped_data_address'.
13572 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13573 here, and cache them in the lwp object.
13574 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13575 directly.
13576 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13577 field.
13578 (linux_stopped_by_watchpoint): Rewrite.
13579 (linux_stopped_data_address): Rewrite.
13580
13581 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13582
13583 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13584 switching the current inferior, not before.
13585
13586 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13587
13588 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13589 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13590 i386-linux.c and amd64-linux.c.
13591 (reg-i386.o): Removed.
13592 (reg-i386.c): Likewise.
13593 (reg-i386-linux.o): Likewise.
13594 (reg-i386-linux.c): Likewise.
13595 (reg-x86-64.o): Likewise.
13596 (reg-x86-64.c): Likewise.
13597 (reg-x86-64-linux.o): Likewise.
13598 (reg-x86-64-linux.c): Likewise.
13599 (i386.o): New.
13600 (i386.c): Likewise.
13601 (i386-linux.o): Likewise.
13602 (i386-linux.c): Likewise.
13603 (amd64.o): Likewise.
13604 (amd64.c): Likewise.
13605 (amd64-linux.o): Likewise.
13606 (amd64-linux.c): Likewise.
13607
13608 * configure.srv (srv_i386_regobj): New.
13609 (srv_i386_linux_regobj): Likewise.
13610 (srv_amd64_regobj): Likewise.
13611 (srv_amd64_linux_regobj): Likewise.
13612 (srv_i386_32bit_xmlfiles): Likewise.
13613 (srv_i386_64bit_xmlfiles): Likewise.
13614 (srv_i386_xmlfiles): Likewise.
13615 (srv_amd64_xmlfiles): Likewise.
13616 (srv_i386_linux_xmlfiles): Likewise.
13617 (srv_amd64_linux_xmlfiles): Likewise.
13618 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13619 srv_xmlfiles to $srv_i386_xmlfiles.
13620 (i[34567]86-*-mingw32ce*): Likewise.
13621 (i[34567]86-*-mingw*): Likewise.
13622 (i[34567]86-*-nto*): Likewise.
13623 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13624 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13625 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13626 (x86_64-*-linux*): Likewise.
13627
13628 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13629 (init_registers_amd64_linux): New.
13630 (x86_arch_setup): Replace init_registers_x86_64_linux with
13631 init_registers_amd64_linux.
13632
13633 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13634
13635 * configure.ac: Check for libdl. If it is not available link against
13636 static libthread_db.
13637 * configure: Regenerate.
13638
13639 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13640
13641 PR9605
13642
13643 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13644 handing a read watchpoint.
13645 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13646
13647 2010-02-12 Doug Evans <dje@google.com>
13648
13649 * linux-low.c (linux_supports_tracefork_flag): Document.
13650 (linux_look_up_symbols): Add comment.
13651
13652 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13653
13654 * regcache.c (supply_register): Clear regcache if buf is NULL.
13655
13656 2010-02-02 Nicolas Roche <roche@sourceware.org>
13657 Joel Brobecker <brobecker@adacore.com>
13658
13659 * inferiors.c (find_inferior): Add function documentation.
13660 (unloaded_dll): Handle the case where the unloaded dll has not
13661 been previously registered in the dll list.
13662
13663 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13664
13665 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13666 (thumb2_breakpoint): New.
13667 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13668
13669 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13670
13671 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13672 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13673 breakpoints.
13674
13675 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13676
13677 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13678
13679 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13680
13681 * linux-s390-low.c (s390_collect_ptrace_register)
13682 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13683
13684 2010-01-21 Doug Evans <dje@google.com>
13685
13686 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13687 (PTRACE_ARG4_TYPE): New macro.
13688 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13689 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13690 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13691 (usr_store_inferior_registers): Ditto.
13692 (linux_read_memory, linux_write_memory): Ditto.
13693 (linux_test_for_tracefork): Ditto.
13694
13695 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13696 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13697
13698 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13699
13700 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13701 target.
13702
13703 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13704
13705 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13706 prototype to take a regcache. Adjust.
13707
13708 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13709
13710 * regcache.h (struct thread_info): Forward declare.
13711 (struct regcache): New.
13712 (new_register_cache): Adjust prototype.
13713 (get_thread_regcache): Declare.
13714 (free_register_cache): Adjust prototype.
13715 (registers_to_string, registers_from_string): Ditto.
13716 (supply_register, supply_register_by_name, collect_register)
13717 (collect_register_as_string, collect_register_by_name): Ditto.
13718 * regcache.c (struct inferior_regcache_data): Delete.
13719 (get_regcache): Rename to ...
13720 (get_thread_regcache): ... this. Adjust. Switch inferior before
13721 fetching registers.
13722 (regcache_invalidate_one): Adjust.
13723 (regcache_invalidate): Fix prototype.
13724 (new_register_cache): Return the new register cache.
13725 (free_register_cache): Change prototype.
13726 (realloc_register_cache): Adjust.
13727 (registers_to_string): Change prototype to take a regcache. Adjust.
13728 (registers_from_string): Ditto.
13729 (register_data): Ditto.
13730 (supply_register): Ditto.
13731 (supply_register_by_name): Ditto.
13732 (collect_register): Ditto.
13733 (collect_register_as_string): Ditto.
13734 (collect_register_by_name): Ditto.
13735 * server.c (process_serial_event): Adjust.
13736 * linux-low.h (regset_fill_func, regset_store_func): Change
13737 prototype.
13738 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13739 Change prototype.
13740 * linux-low.c (get_stop_pc): Adjust.
13741 (check_removed_breakpoint): Adjust.
13742 (linux_wait_for_event): Adjust.
13743 (linux_resume_one_lwp): Adjust.
13744 (fetch_register): Add regcache parameter. Adjust.
13745 (usr_store_inferior_registers): Ditto.
13746 (regsets_fetch_inferior_registers): Ditto.
13747 (regsets_store_inferior_registers): Ditto.
13748 (linux_fetch_registers, linux_store_registers): Ditto.
13749 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13750 regcache. Adjust.
13751 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13752 Ditto.
13753 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13754 prototype to take a regcache.
13755 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13756 * remote-utils.c (convert_ascii_to_int, outreg)
13757 (prepare_resume_reply): Change prototype to take a regcache.
13758 Adjust.
13759 * target.h (struct target_ops) <fetch_registers, store_registers>:
13760 Change prototype to take a regcache.
13761 (fetch_inferior_registers, store_inferior_registers): Change
13762 prototype to take a regcache. Adjust.
13763 * proc-service.c (ps_lgetregs): Adjust.
13764 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13765 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13766 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13767 take a regcache. Adjust.
13768 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13769 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13770 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13771 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13772 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13773 (cris_cannot_fetch_register):
13774 (cris_breakpoint_at): Change prototype to take a regcache.
13775 Adjust.
13776 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13777 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13778 to take a regcache. Adjust.
13779 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13780 Adjust.
13781 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13782 take a regcache. Adjust.
13783 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13784 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13785 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13786 * linux-mips-low.c (mips_get_pc):
13787 (mips_set_pc): Change prototype to take a regcache. Adjust.
13788 (mips_reinsert_addr): Adjust.
13789 (mips_collect_register): Change prototype to take a regcache.
13790 Adjust.
13791 (mips_supply_register):
13792 (mips_collect_register_32bit, mips_supply_register_32bit)
13793 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13794 (mips_store_fpregset): Ditto.
13795 * linux-ppc-low.c (ppc_supply_ptrace_register)
13796 (ppc_supply_ptrace_register): Ditto.
13797 (parse_spufs_run): Adjust.
13798 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13799 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13800 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13801 take a regcache. Adjust.
13802 * linux-s390-low.c (s390_collect_ptrace_register)
13803 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13804 (s390_set_pc): Change prototype to take a regcache. Adjust.
13805 (s390_arch_setup): Adjust.
13806 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13807 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13808 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13809 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13810 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13811 regcache. Adjust.
13812 (sparc_breakpoint_at): Adjust.
13813 * linux-xtensa-low.c (xtensa_fill_gregset):
13814 (xtensa_store_gregset):
13815 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13816 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13817 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13818 prototype to take a regcache. Adjust.
13819 * win32-arm-low.c (arm_fetch_inferior_register)
13820 (arm_store_inferior_register): Change prototype to take a
13821 regcache. Adjust.
13822 * win32-i386-low.c (i386_fetch_inferior_register)
13823 (i386_store_inferior_register): Change prototype to take a
13824 regcache. Adjust.
13825 * win32-low.c (child_fetch_inferior_registers)
13826 (child_store_inferior_registers): Change prototype to take a
13827 regcache. Adjust.
13828 (win32_wait): Adjust.
13829 (win32_fetch_inferior_registers): Change prototype to take a
13830 regcache. Adjust.
13831 (win32_store_inferior_registers): Adjust.
13832 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13833 store_inferior_register>: Change prototype to take a regcache.
13834
13835 2010-01-20 Doug Evans <dje@google.com>
13836
13837 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13838 #ifdef.
13839 (linux_wait_for_event1, linux_init_signals): Ditto.
13840 (W_STOPCODE): Provide definition if missing.
13841
13842 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13843
13844 * linux-low.c (linux_core_of_thread): New.
13845 (compare_ints, show_process, list_threads): New.
13846 (linux_qxfer_osdata): Report threads and cores.
13847 (linux_target_op): Register linux_core_of_thread.
13848 * remote-utils.c (prepare_resume_reply): Report the core.
13849 (buffer_xml_printf): Support %d specifier.
13850 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13851 New.
13852 (handle_query): Handle qXfer:threads. Announce availability
13853 thereof.
13854 * target.h (struct target_ops): New field core_of_thread.
13855
13856 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13857
13858 * Makefile.in (clean): Remove new generated files.
13859 (reg-s390.o, reg-s390.c): Remove rules.
13860 (reg-s390x.o, reg-s390x.c): Likewise.
13861 (s390-linux32.o, s390-linux32.c): Add rules.
13862 (s390-linux64.o, s390-linux64.c): Likewise.
13863 (s390x-linux64.o, s390x-linux64.c): Likewise.
13864 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13865 * linux-s390-low.c: Include <elf.h>.
13866 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13867 (init_registers_s390): Remove prototype.
13868 (init_registers_s390x): Likewise.
13869 (init_registers_s390_linux32): Add prototype.
13870 (init_registers_s390_linux64): Likewise.
13871 (init_registers_s390x_linux64): Likewise.
13872 (s390_num_regs_3264): New define.
13873 (s390_regmap_3264): New global variable.
13874 (s390_cannot_fetch_register): Remove obsolete check.
13875 (s390_cannot_store_register): Likewise.
13876 (s390_collect_ptrace_register): Handle upper/lower register halves.
13877 (s390_supply_ptrace_register): Likewise.
13878 (s390_fill_gregset): Update to register number changes.
13879 (s390_get_hwcap): New routine.
13880 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13881 Install appropriate regmap and register set.
13882
13883 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13884
13885 * server.c (gdbserver_version): Update copyright year to 2010.
13886 * gdbreplay.c (gdbreplay_version): Likewise.
13887
13888 2009-12-28 Doug Evans <dje@google.com>
13889
13890 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13891 elf/external.h. Include <elf.h> instead but only if necessary.
13892
13893 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13894
13895 * linux-low.c (linux_remove_process): Remove `detaching'
13896 parameter. Don't release/detach from thread_db here.
13897 (linux_kill): Release/detach from thread_db here, ...
13898 (linux_detach): ... and here, before actually detaching.
13899 (linux_wait_1): ... and here, when a process exits.
13900 * thread-db.c (any_thread_of): New.
13901 (thread_db_free): Switch the current inferior to a thread of the
13902 passed in process.
13903
13904 2009-12-21 Doug Evans <dje@google.com>
13905
13906 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13907
13908 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13909 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13910 warning ifndef __NR_tkill. Move setting of errno there too.
13911 Delete unnecessary resetting of errno after syscall.
13912 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13913
13914 * configure.ac: Check for dladdr.
13915 * config.in: Regenerate.
13916 * configure: Regenerate.
13917 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13918 (try_thread_db_load): Update.
13919
13920 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13921
13922 2009-12-18 Doug Evans <dje@google.com>
13923
13924 * event-loop.c: Include unistd.h if it exists.
13925
13926 * linux-low.c (my_waitpid): Move definition away from being in
13927 between linux_tracefork_child/linux_test_for_tracefork.
13928
13929 * gdb_proc_service.h (psaddr_t): Fix type.
13930 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13931 signature to match glibc.
13932
13933 2009-12-16 Doug Evans <dje@google.com>
13934
13935 * linux-low.c (linux_read_memory): Fix argument to read.
13936
13937 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13938
13939 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13940 events, don't leave current_inferior pointing at null.
13941
13942 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13943
13944 * win32-low.c (LOG): Delete.
13945 (OUTMSG): Output to stderr.
13946 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13947 on compile time LOG macro.
13948 (win32_wait): Fix debug output.
13949
13950 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13951
13952 * win32-low.c (win32_add_one_solib): If the dll name is
13953 "ntdll.dll", prepend the system directory to the dll path.
13954
13955 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13956
13957 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13958
13959 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13960 Vladimir Prus <vladimir@codesourcery.com>
13961
13962 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13963 * configure.ac: Check for __mcoldfire__ and set
13964 gdb_cv_m68k_is_coldfire.
13965 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13966 reg-cf.o and reg-m68k.o.
13967 * configure: Regenerated.
13968
13969 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13970
13971 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13972 Pass it to thread_db_free.
13973 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13974 proper `detaching' argument to linux_remove_process.
13975 * linux-low.h (thread_db_free): Add `detaching' parameter.
13976 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13977 to thread_db_free.
13978 (thread_db_free): Add `detaching' parameter. Only
13979 call td_ta_clear_event if detaching from process.
13980
13981 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13982
13983 * thread-db.c (thread_db_free): Fix typo.
13984
13985 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13986
13987 PR gdb/10838
13988 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13989
13990 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13991
13992 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13993 with an i686 compiler.
13994 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13995 needed.
13996 * configure: Rebuilt.
13997
13998 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13999
14000 PR gdb/10783
14001
14002 * server.c (handle_search_memory_1): Correct read_addr initialization
14003 in loop for searching subsequent chunks.
14004
14005 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14006
14007 * configure.ac: New --with-libthread-db option.
14008 * thread-db.c: Allow direct dependence on libthread_db.
14009 (thread_db_free): Adjust.
14010 * config.in: Regenerate.
14011 * configure: Likewise.
14012
14013 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14014
14015 PR gdb/10757
14016 * thread-db.c (attach_thread): New function.
14017 (maybe_attach_thread): Return success/failure.
14018 (find_new_threads_callback): Adjust.
14019 (thread_db_find_new_threads): Loop until no new threads.
14020
14021 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14022
14023 * proc-service.c (ps_lgetregs): Formatting.
14024
14025 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14026
14027 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14028 * configure.ac: Adjust.
14029 * linux-low.h (struct process_info_private): Move members to struct
14030 thread_db.
14031 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14032 * linux-low.c (linux_remove_process): Adjust.
14033 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14034 * server.c (handle_query): Move code ...
14035 (handle_monitor_command): ... here. New function.
14036 * target.h (struct target_ops): New member.
14037 * thread-db.c (struct thread_db): New.
14038 (libthread_db_search_path): New variable.
14039 (thread_db_create_event, thread_db_enable_reporting)
14040 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14041 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14042 (try_thread_db_load_1, dladdr_to_soname): New functions.
14043 (try_thread_db_load, thread_db_load_search): New functions.
14044 (thread_db_init): Search for libthread_db.
14045 (thread_db_free): New function.
14046 (thread_db_handle_monitor_command): Likewise.
14047 * config.in: Regenerate.
14048 * configure: Regenerate.
14049
14050 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14051
14052 * spu-low.c (spu_kill): Wait for inferior to terminate.
14053 Call clear_inferiors.
14054 (spu_detach): Call clear_inferiors.
14055
14056 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14057
14058 * aclocal.m4: Regenerate.
14059 * config.in: Likewise.
14060 * configure: Likewise.
14061
14062 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14063
14064 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14065 (parse_spufs_run): New function.
14066 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14067 (ppc_breakpoint_at): Handle SPU breakpoints.
14068
14069 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14070
14071 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14072 (SPUFS_MAGIC): Define.
14073 (spu_enumerate_spu_ids): New function.
14074 (linux_qxfer_spu): New function.
14075 (linux_target_ops): Install linux_qxfer_spu.
14076
14077 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14078
14079 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14080 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14081 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14082 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14083 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14084 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14085 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14086 (init_registers_powerpc_cell32l): Add prototype.
14087 (init_registers_powerpc_cell64l): Likewise.
14088 (ppc_arch_setup): Detect Cell/B.E. architecture.
14089
14090 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14091
14092 * Makefile.in (datarootdir): New variable.
14093
14094 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14095
14096 * linux-low.c (linux_write_memory): Update debugging output.
14097 * Makefile.in (clean): Add new descriptions.
14098 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14099 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14100 * configure.srv: Add new files for arm*-*-linux*.
14101 * linux-arm-low.c: Add new declarations.
14102 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14103 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14104 (HWCAP_VFPv3D16): New.
14105 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14106 instead of __IWMMXT__.
14107 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14108 (arm_arch_setup): New.
14109 (target_regsets): Remove #ifdef. Add VFP regset.
14110 (the_low_target): Use arm_arch_setup.
14111
14112 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14113
14114 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14115 the main thread again.
14116
14117 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14118
14119 Adding Neutrino gdbserver.
14120 * configure: Regenerated.
14121 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14122 * configure.srv (i[34567]86-*-nto*): New target.
14123 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14124 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14125 (nto_comctrl) [__QNX__]: New function.
14126 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14127
14128 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14129
14130 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14131 srv_tgtobj.
14132
14133 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14134 Pedro Alves <pedro@codesourcery.com>
14135
14136 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14137 don't support CONTEXT_EXTENDED_REGISTERS.
14138 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14139 (the_low_target): Install them.
14140 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14141 failing with ERROR_PIPE_NOT_CONNECTED.
14142
14143 2009-06-30 Doug Evans <dje@google.com>
14144 Pierre Muller <muller@ics.u-strasbg.fr>
14145
14146 Add h/w watchpoint support to x86-linux, win32-i386.
14147 * Makefile.in (SFILES): Add i386-low.c
14148 (i386_low_h): Define.
14149 (i386-low.o): Add dependencies.
14150 (linux-x86-low.o): Add i386-low.h dependency.
14151 (win32-i386-low.o): Ditto.
14152 * i386-low.c: New file.
14153 * i386-low.h: New file.
14154 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14155 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14156 * linux-low.c (linux_add_process): Initialize arch_private.
14157 (linux_remove_process): Free arch_private.
14158 (add_lwp): Initialize arch_private.
14159 (delete_lwp): Free arch_private.
14160 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14161 provided.
14162 * linux-low.h (process_info_private): New member arch_private.
14163 (lwp_info): New member arch_private.
14164 (linux_target_ops): New members new_process, new_thread,
14165 prepare_to_resume.
14166 (ptid_of): New macro.
14167 * linux-x86-low.c: Include stddef.h, i386-low.h.
14168 (arch_process_info): New struct.
14169 (arch_lwp_info): New struct.
14170 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14171 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14172 (i386_dr_low_get_status): New function.
14173 (x86_insert_point, x86_remove_point): New functions.
14174 (x86_stopped_by_watchpoint): New function.
14175 (x86_stopped_data_address): New function.
14176 (x86_linux_new_process, x86_linux_new_thread): New functions.
14177 (x86_linux_prepare_to_resume): New function.
14178 (the_low_target): Add entries for insert_point, remove_point,
14179 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14180 prepare_to_resume.
14181 * server.c (debug_hw_points): New global.
14182 (monitor_show_help): Document set debug-hw-points.
14183 (handle_query): Process "set debug-hw-points".
14184 * server.h (debug_hw_points): Declare.
14185 (paddress): Declare.
14186 * utils.c (NUMCELLS, CELLSIZE): New macros.
14187 (get_sell, xsnprintf, paddress): New functions.
14188 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14189 remove_point, stopped_by_watchpoint, stopped_data_address.
14190 * win32-i386-low.c: Include i386-low.h.
14191 (debug_reg_state): Replaces dr.
14192 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14193 (i386_dr_low_get_status): New function.
14194 (i386_insert_point, i386_remove_point): New functions.
14195 (i386_stopped_by_watchpoint): New function.
14196 (i386_stopped_data_address): New function.
14197 (i386_initial_stuff): Update.
14198 (get_thread_context,set_thread_context,i386_thread_added): Update.
14199 (the_low_target): Add entries for insert_point,
14200 remove_point, stopped_by_watchpoint, stopped_data_address.
14201 * win32-low.c (win32_insert_watchpoint): New function.
14202 (win32_remove_watchpoint): New function.
14203 (win32_stopped_by_watchpoint): New function.
14204 (win32_stopped_data_address): New function.
14205 (win32_target_ops): Add entries for insert_watchpoint,
14206 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14207 * win32-low.h (win32_target_ops): New members insert_point,
14208 remove_point, stopped_by_watchpoint, stopped_data_address.
14209
14210 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14211
14212 * server.c (process_serial_event): Re-return unsupported, not
14213 error, if the type isn't recognized. Re-allow supporting only
14214 insert or remove packets. Also call require_running for
14215 breakpoints. Add missing break statement to default case. Tidy.
14216 * target.h (struct target_ops): Rename insert_watchpoint to
14217 insert_point, and remove_watchpoint to remove_point.
14218
14219 * linux-low.h (struct linux_target_ops): Likewise.
14220 * linux-low.c (linux_insert_watchpoint): Rename to ...
14221 (linux_insert_point): ... this. Adjust.
14222 (linux_remove_watchpoint): Rename to ...
14223 (linux_remove_point): ... this. Adjust.
14224 (linux_target_ops): Adjust.
14225 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14226 (cris_insert_point): ... this.
14227 (cris_remove_watchpoint): Rename to ...
14228 (cris_remove_point): ... this.
14229 (the_low_target): Adjust.
14230
14231 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14232
14233 * server.c (handle_v_kill): Pass signal_pid to
14234 kill_inferior if multi_process is zero.
14235
14236 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14237
14238 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14239 * target.h (target_ops): Comment for *_watchpoint to make it clear
14240 the functions can get types '0' and '1'.
14241
14242 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14243
14244 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14245 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14246 * regcache.c (get_regcache): Likewise.
14247 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14248 * win32-low.c (child_fetch_inferior_registers): Remove check for
14249 regno 0.
14250
14251 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14252 Pedro Alves <pedro@codesourcery.com>
14253
14254 * target.h (struct target_ops) <supports_multi_process>: New
14255 callback.
14256 (target_supports_multi_process): New.
14257 * server.c (handle_query): Even if GDB reports support, only
14258 enable multi-process if the target also supports it. Report
14259 multi-process support only if the target backend supports it.
14260 * linux-low.c (linux_supports_multi_process): New function.
14261 (linux_target_ops): Install it as target_supports_multi_process
14262 callback.
14263
14264 2009-05-24 Doug Evans <dje@google.com>
14265
14266 Global renaming of find_thread_pid to find_thread_ptid.
14267 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14268 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14269 All callers updated.
14270
14271 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14272 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14273 directly.
14274
14275 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14276 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14277 (linux_resume_one_lwp): Ditto.
14278
14279 2009-05-23 Doug Evans <dje@google.com>
14280
14281 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14282 from struct inferior_list_entry * to struct lwp_info *.
14283 All callers updated.
14284
14285 2009-05-13 Doug Evans <dje@google.com>
14286
14287 * linux-x86-low.c: Don't include assert.h.
14288 (x86_siginfo_fixup): Use fatal, not assert.
14289 (x86_arch_setup): Fix comment.
14290
14291 2009-05-12 Doug Evans <dje@google.com>
14292
14293 Biarch support for i386/amd64 gdbserver.
14294 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14295 Add linux-x86-low.c.
14296 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14297 (linux-x86-low.o): Add.
14298 * linux-x86-64-low.c: Delete.
14299 * linux-i386-low.c: Delete.
14300 * linux-x86-low.c: New file.
14301 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14302 linux-x86-low.o.
14303 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14304 linux-x86-low.o.
14305 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14306 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14307 (linux_child_pid_to_exec_file): New function.
14308 (elf_64_header_p, elf_64_file_p): New functions.
14309 (siginfo_fixup): New function.
14310 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14311 give target a chance to convert layout.
14312 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14313 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14314
14315 2009-05-07 Doug Evans <dje@google.com>
14316
14317 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14318 (regsets_store_inferior_registers): Ditto.
14319
14320 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14321
14322 PR server/10048
14323
14324 * linux-low.c (must_set_ptrace_flags): Delete.
14325 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14326 of the global.
14327 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14328 `lwp->must_set_ptrace_flags' instead.
14329 (linux_wait_for_event_1): Set ptrace options here.
14330 (linux_wait_1): ... not here.
14331
14332 2009-04-30 Doug Evans <dje@google.com>
14333
14334 * inferiors.c (started_inferior_callback): New function.
14335 (attached_inferior_callback): New function.
14336 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14337 * server.c (print_started_pid, print_attached_pid): New functions.
14338 (detach_or_kill_for_exit): New function.
14339 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14340 * server.h (have_started_inferiors_p): Declare.
14341 (have_attached_inferiors_p): Declare.
14342
14343 * inferiors.c (remove_process): Fix memory leak, free process.
14344 * linux-low.c (linux_remove_process): New function.
14345 (linux_kill): Call it instead of remove_process.
14346 (linux_detach, linux_wait_1): Ditto.
14347
14348 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14349
14350 * configure.srv: Add x86 Windows CE target.
14351
14352 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14353
14354 * inferiors.c (get_thread_process): Make global.
14355 * server.h (get_thread_process): Add prototype.
14356 * thread-db.c (find_one_thread): Use get_thread_process
14357 instead of current_process.
14358 (thread_db_get_tls_address): Do not crash if called when
14359 thread layer is not yet initialized.
14360
14361 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14362
14363 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14364 * spu-low.c (current_tid): Rename to ...
14365 (current_ptid): ... this.
14366 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14367 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14368 ptid_get_lwp (current_ptid) instead of current_tid.
14369 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14370 instead of current_tid. Use find_process_pid to verify pid
14371 argument is valid. Pass proper argument to remove_process.
14372 (spu_thread_alive): Compare current_ptid instead of current_tid.
14373 (spu_resume): Likewise.
14374
14375 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14376
14377 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14378 variable.
14379
14380 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14381
14382 Implement the multiprocess extensions, and add linux multiprocess
14383 support.
14384
14385 * server.h (ULONGEST): Declare.
14386 (struct ptid, ptid_t): New.
14387 (minus_one_ptid, null_ptid): Declare.
14388 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14389 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14390 (struct inferior_list_entry): Change `id' type from unsigned from
14391 to ptid_t.
14392 (struct sym_cache, struct breakpoint, struct
14393 process_info_private): Forward declare.
14394 (struct process_info): Declare.
14395 (current_process): Declare.
14396 (all_processes): Declare.
14397 (initialize_inferiors): Declare.
14398 (add_thread): Adjust to use ptid_t.
14399 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14400 (add_process, remove_process, find_thread_pid): Declare.
14401 (find_inferior_id): Adjust to use ptid_t.
14402 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14403 (multi_process): Declare.
14404 (push_event): Adjust to use ptid_t.
14405 (read_ptid, write_ptid): Declare.
14406 (prepare_resume_reply): Adjust to use ptid_t.
14407 (clear_symbol_cache): Declare.
14408 * inferiors.c (all_processes): New.
14409 (null_ptid, minus_one_ptid): New.
14410 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14411 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14412 (add_thread): Change unsigned long to ptid. Remove gdb_id
14413 parameter. Adjust.
14414 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14415 (gdb_id_to_thread): Rename to ...
14416 (find_thread_pid): ... this. Change unsigned long to ptid.
14417 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14418 (loaded_dll, pull_pid_from_list): Adjust.
14419 (add_process, remove_process, find_process_pid)
14420 (get_thread_process, current_process, initialize_inferiors): New.
14421 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14422 (struct target_waitstatus) <related_pid>: Ditto.
14423 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14424 return type to int.
14425 (struct target_ops) <join>: Add `pid' argument.
14426 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14427 (struct target_ops) <wait>: Add `ptid' field. Change return type
14428 to ptid.
14429 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14430 (mywait): Add `ptid' argument. Change return type to ptid_t.
14431 (target_pid_to_str): Declare.
14432 * target.c (set_desired_inferior): Adjust to use ptids.
14433 (mywait): Add new `ptid' argument. Adjust.
14434 (target_pid_to_str): New.
14435 * mem-break.h (free_all_breakpoints): Declare.
14436 * mem-break.c (breakpoints): Delelete.
14437 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14438 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14439 to use per-process breakpoint list.
14440 (free_all_breakpoints): New.
14441 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14442 (symbol_cache, all_symbols_looked_up): Delete.
14443 (hexchars): New.
14444 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14445 read_ptid): New.
14446 (prepare_resume_reply): Change ptid argument's type from unsigned
14447 long to ptid_t. Adjust. Implement W;process and X;process.
14448 (free_sym_cache, clear_symbol_cache): New.
14449 (look_up_one_symbol): Adjust to per-process symbol cache. *
14450 * server.c (cont_thread, general_thread, step_thread): Change type
14451 to ptid_t.
14452 (attached): Delete.
14453 (multi_process): New.
14454 (last_ptid): Change type to ptid_t.
14455 (struct vstop_notif) <ptid>: Change type to ptid_t.
14456 (queue_stop_reply, push_event): Change `ptid' argument's type to
14457 ptid_t.
14458 (discard_queued_stop_replies): Add `pid' argument.
14459 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14460 changes. Don't reference the `attached' global.
14461 (attach_inferior): Adjust to mywait interface changes.
14462 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14463 features. Handle and report "multiprocess+". Handle
14464 "qAttached:PID".
14465 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14466 changes.
14467 (handle_v_kill): New.
14468 (handle_v_stopped): Adjust to use target_pid_to_str.
14469 (handle_v_requests): Allow multiple attaches and runs when
14470 multiprocess extensions are in effect. Handle "vKill".
14471 (myresume): Adjust to use ptids.
14472 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14473 (handle_status): Adjust to discard_queued_stop_replies interface
14474 change.
14475 (first_thread_of, kill_inferior_callback)
14476 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14477 (main): Call initialize_inferiors. Adjust to use ptids, killing
14478 and detaching from all inferiors. Handle multiprocess packet
14479 variants.
14480 * linux-low.h: Include gdb_proc_service.h.
14481 (struct process_info_private): New.
14482 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14483 <lwpid_of>: Use ptid_get_lwp.
14484 (get_lwp_thread): Adjust.
14485 (struct lwp_info): Add `dead' member.
14486 (find_lwp_pid): Declare.
14487 * linux-low.c (thread_db_active): Delete.
14488 (new_inferior): Adjust comment.
14489 (inferior_pid): Delete.
14490 (linux_add_process): New.
14491 (handle_extended_wait): Adjust.
14492 (add_lwp): Change unsigned long to ptid.
14493 (linux_create_inferior): Add process to processes table. Adjust
14494 to use ptids. Don't set new_inferior here.
14495 (linux_attach_lwp): Rename to ...
14496 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14497 it. Adjust to use ptids.
14498 (linux_attach_lwp): New.
14499 (linux_attach): Add process to processes table. Don't set
14500 new_inferior here.
14501 (struct counter): New.
14502 (second_thread_of_pid_p, last_thread_of_process_p): New.
14503 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14504 multiple processes.
14505 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14506 processes. Remove process from process table.
14507 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14508 to multiple processes.
14509 (any_thread_of): New.
14510 (linux_detach): Add `pid' argument, and handle it. Remove process
14511 from processes table.
14512 (linux_join): Add `pid' argument. Handle it.
14513 (linux_thread_alive): Change unsighed long argument to ptid_t.
14514 Consider dead lwps as not being alive.
14515 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14516 threads we're not interested in.
14517 (same_lwp, find_lwp_pid): New.
14518 (linux_wait_for_lwp): Change `pid' argument's type from int to
14519 ptid_t. Adjust.
14520 (linux_wait_for_event): Rename to ...
14521 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14522 from int to ptid_t. Adjust.
14523 (linux_wait_for_event): New.
14524 (linux_wait_1): Add `ptid' argument. Change return type to
14525 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14526 that exit from the process table.
14527 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14528 Adjust.
14529 (mark_lwp_dead): New.
14530 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14531 stopping all threads, mark its main lwp as dead.
14532 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14533 ptids.
14534 (fetch_register, usr_store_inferior_registers)
14535 (regsets_fetch_inferior_registers)
14536 (regsets_store_inferior_registers, linux_read_memory)
14537 (linux_write_memory): Inline `inferior_pid'.
14538 (linux_look_up_symbols): Adjust to use per-process
14539 `thread_db_active'.
14540 (linux_request_interrupt): Adjust to use ptids.
14541 (linux_read_auxv): Inline `inferior_pid'.
14542 (initialize_low): Don't reference thread_db_active.
14543 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14544 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14545 (ps_getpid): Return the pid of the current inferior.
14546 * thread-db.c (proc_handle, thread_agent): Delete.
14547 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14548 per-process data.
14549 (find_one_thread): Change argument type to ptid_t. Adjust to
14550 per-process data.
14551 (maybe_attach_thread): Adjust to per-process data and ptids.
14552 (thread_db_find_new_threads): Ditto.
14553 (thread_db_init): Ditto.
14554 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14555 processes table. Adjust to use ptids.
14556 (spu_kill, spu_detach): Adjust interface. Remove process from
14557 processes table.
14558 (spu_join, spu_thread_alive): Adjust interface.
14559 (spu_wait): Adjust interface. Remove process from processes
14560 table. Adjust to use ptids.
14561 * win32-low.c (current_inferior_tid): Delete.
14562 (current_inferior_ptid): New.
14563 (debug_event_ptid): New.
14564 (thread_rec): Take a ptid. Adjust.
14565 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14566 (child_delete_thread): Ditto.
14567 (do_initial_child_stuff): Add `attached' argument. Add process to
14568 processes table.
14569 (child_fetch_inferior_registers, child_store_inferior_registers):
14570 Adjust.
14571 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14572 (win32_attach): Pass 1 to do_initial_child_stuff.
14573 (win32_kill): Adjust interface. Remove process from processes
14574 table.
14575 (win32_detach): Ditto.
14576 (win32_join): Adjust interface.
14577 (win32_thread_alive): Take a ptid.
14578 (win32_resume): Adjust to use ptids.
14579 (get_child_debug_event): Ditto.
14580 (win32_wait): Adjust interface. Remove exiting process from
14581 processes table.
14582
14583 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14584
14585 Non-stop mode support.
14586
14587 * server.h (non_stop): Declare.
14588 (gdb_client_data, handler_func): Declare.
14589 (delete_file_handler, add_file_handler, start_event_loop):
14590 Declare.
14591 (handle_serial_event, handle_target_event, push_event)
14592 (putpkt_notif): Declare.
14593 * target.h (enum resume_kind): New.
14594 (struct thread_resume): Replace `step' field by `kind' field.
14595 (TARGET_WNOHANG): Define.
14596 (struct target_ops) <wait>: Add `options' argument.
14597 <supports_non_stop, async, start_non_stop>: New fields.
14598 (target_supports_non_stop, target_async): New.
14599 (start_non_stop): Declare.
14600 (mywait): Add `options' argument.
14601 * target.c (mywait): Add `options' argument. Print child exit
14602 notifications here.
14603 (start_non_stop): New.
14604 * server.c (non_stop, own_buf, mem_buf): New globals.
14605 (struct vstop_notif): New.
14606 (notif_queue): New global.
14607 (queue_stop_reply, push_event, discard_queued_stop_replies)
14608 (send_next_stop_reply): New.
14609 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14610 interface changes.
14611 (attach_inferior): In non-stop mode, don't wait for the target
14612 here.
14613 (handle_general_set): Handle QNonStop.
14614 (handle_query): When handling qC, return the current general
14615 thread, instead of the first thread of the list.
14616 (handle_query): If the backend supports non-stop mode, include
14617 QNonStop+ in the qSupported query response.
14618 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14619 and non-stop mode.
14620 (handle_v_attach, handle_v_run): Handle non-stop mode.
14621 (handle_v_stopped): New.
14622 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14623 (myresume): Adjust to use resume_kind. Handle non-stop.
14624 (queue_stop_reply_callback): New.
14625 (handle_status): Handle non-stop mode.
14626 (main): Clear non_stop flag on reconnection. Use the event-loop.
14627 Refactor serial protocol handling from here ...
14628 (process_serial_event): ... to this new function. When GDB
14629 selects any thread, select one here. In non-stop mode, wait until
14630 GDB acks all pending events before exiting.
14631 (handle_serial_event, handle_target_event): New.
14632 * remote-utils.c (remote_open): Install remote_desc in the event
14633 loop.
14634 (remote_close): Remove remote_desc from the event loop.
14635 (putpkt_binary): Rename to...
14636 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14637 (putpkt_binary): New as wrapper around putpkt_binary_1.
14638 (putpkt_notif): New.
14639 (prepare_resume_reply): In non-stop mode, don't change the
14640 general_thread.
14641 * event-loop.c: New.
14642 * Makefile.in (OBJ): Add event-loop.o.
14643 (event-loop.o): New rule.
14644
14645 * linux-low.h (pid_of): Moved here.
14646 (lwpid_of): New.
14647 (get_lwp_thread): Use lwpid_of.
14648 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14649 * linux-low.c (pid_of): Delete.
14650 (inferior_pid): Use lwpid_of.
14651 (linux_event_pipe): New.
14652 (target_is_async_p): New.
14653 (delete_lwp): New.
14654 (handle_extended_wait): Use lwpid_of.
14655 (add_lwp): Don't set lwpid field.
14656 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14657 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14658 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14659 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14660 first. Adjust to linux_wait_for_event interface changes. Use
14661 lwpid_of.
14662 (linux_detach): Don't delete the main lwp here.
14663 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14664 (status_pending_p): Don't consider explicitly suspended lwps.
14665 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14666 pointer. Add OPTIONS argument. Change return type to int. Use
14667 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14668 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14669 pointer. Add status pointer argument. Return a pid instead of a
14670 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14671 changes. In non-stop mode, don't switch to a random thread.
14672 (linux_wait): Rename to...
14673 (linux_wait_1): ... this. Add target_options argument, and handle
14674 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14675 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14676 clean exit and signal exit code. Don't stop all threads in
14677 non-stop mode. In all-stop mode, only stop all threads when
14678 reporting a stop to GDB. Handle explicit thread stop requests.
14679 (async_file_flush, async_file_mark): New.
14680 (linux_wait): New.
14681 (send_sigstop): Use lwpid_of.
14682 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14683 interface changes. In non-stop mode, don't switch to a random
14684 thread.
14685 (linux_resume_one_lwp): Use lwpid_of.
14686 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14687 (linux_resume_one_thread): ... this. Handle resume_stop. In
14688 non-stop mode, don't look for pending flag in all threads.
14689 (resume_status_pending_p): Don't consider explicitly suspended
14690 threads.
14691 (my_waitpid): Reimplement. Emulate __WALL.
14692 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14693 Use lwpid_of.
14694 (sigchld_handler, linux_supports_non_stop, linux_async)
14695 (linux_start_non_stop): New.
14696 (linux_target_ops): Register linux_supports_non_stop, linux_async
14697 and linux_start_non_stop.
14698 (initialize_low): Install SIGCHLD handler.
14699 * thread-db.c (thread_db_create_event, find_one_thread)
14700 (thread_db_get_tls_address): Use lwpid_of.
14701 * win32-low.c (win32_detach): Adjust to use resume_kind.
14702 (win32_wait): Add `options' argument.
14703 * spu-low.c (spu_resume): Adjust to use resume_kind.
14704 (spu_wait): Add `options' argument.
14705
14706 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14707
14708 Decouple target code from remote protocol.
14709
14710 * target.h (enum target_waitkind): New.
14711 (struct target_waitstatus): New.
14712 (struct target_ops) <wait>: Return an unsigned long. Take a
14713 target_waitstatus pointer instead of a char pointer.
14714 (mywait): Likewise.
14715 * target.c (mywait): Change prototype to return an unsigned long.
14716 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14717 * server.h (thread_from_wait, old_thread_from_wait): Delete
14718 declarations.
14719 (prepare_resume_reply): Change prototype to take a
14720 target_waitstatus.
14721 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14722 (last_status, last_ptid): New.
14723 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14724 pid instead of a signal.
14725 (attach_inferior): Remove "status" and "signal" parameters.
14726 Adjust.
14727 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14728 not as an address.
14729 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14730 (handle_v_requests, myresume): Remove "status" and "signal"
14731 parameters. Adjust.
14732 (handle_status): New.
14733 (main): Delete local `status'. Adjust.
14734 * remote-utils.c: Include target.h.
14735 (prepare_resume_reply): Change prototype to take a
14736 target_waitstatus. Adjust.
14737
14738 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14739 interface.
14740 * spu-low.c (spu_wait): Adjust.
14741 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14742 Delete.
14743 (win32_wait): Adjust.
14744
14745 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14746
14747 * target.h (struct thread_resume): Delete leave_stopped member.
14748 (struct target_ops): Add a `n' argument to the `resume' callback.
14749 * server.c (start_inferior): Adjust.
14750 (handle_v_cont, myresume): Adjust.
14751 * linux-low.c (check_removed_breakpoint): Adjust to resume
14752 interface change, and to removed leave_stopped field.
14753 (resume_ptr): Delete.
14754 (struct thread_resume_array): New.
14755 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14756 resume interface change.
14757 (linux_continue_one_thread, linux_queue_one_thread)
14758 (resume_status_pending_p): Check if the resume field is NULL
14759 instead of checking the leave_stopped member.
14760 (linux_resume): Adjust to the target resume interface change.
14761 * spu-low.c (spu_resume): Adjust to the target resume interface
14762 change.
14763 * win32-low.c (win32_detach, win32_resume): Ditto.
14764
14765 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14766
14767 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14768 flag.
14769 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14770 pending.
14771 (linux_continue_one_thread): Only preserve the stepping flag if
14772 there's a pending breakpoint.
14773
14774 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14775
14776 * server.c (main): After the inferior having exited, call
14777 remote_close before exiting gdbserver.
14778
14779 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14780
14781 Fix size of FPSCR in Power 7 processors.
14782 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14783 (PPC_FEATURE_HAS_DFP): New #define.
14784 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14785 size of the FPSCR.
14786
14787 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14788
14789 * server.c (handle_query) Whitespace and formatting.
14790
14791 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14792
14793 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14794 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14795 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14796 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14797 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14798 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14799 Makefile.in, configure.ac: Fix whitespace throughout.
14800 * configure: Regenerate.
14801
14802 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14803
14804 * inferiors.c (find_inferior): Make it safe for the callback
14805 function to delete the currently iterated inferior.
14806
14807 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14808
14809 * Makefile.in (linuw_low_h): Move higher.
14810 (thread-db.o): Depend on $(linux_low_h).
14811
14812 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14813
14814 Rename "process" to "lwp" throughout.
14815
14816 * linux-low.c (all_processes): Rename to...
14817 (all_lwps): ... this.
14818 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14819 (add_process): Rename to ...
14820 (add_lwp): ... this. Adjust.
14821 (linux_create_inferior): Adjust.
14822 (linux_attach_lwp): Adjust.
14823 (linux_attach): Adjust.
14824 (linux_kill_one_process): Rename to ...
14825 (linux_kill_one_lwp): ... this. Adjust.
14826 (linux_kill): Adjust.
14827 (linux_detach_one_process): Rename to ...
14828 (linux_detach_one_lwp): ... this. Adjust.
14829 (linux_detach): Adjust.
14830 (check_removed_breakpoint): Adjust.
14831 (status_pending_p): Adjust.
14832 (linux_wait_for_process): Rename to ...
14833 (linux_wait_for_lwp): ... this. Adjust.
14834 (linux_wait_for_event): Adjust.
14835 (send_sigstop): Adjust.
14836 (wait_for_sigstop): Adjust.
14837 (stop_all_processes): Rename to ...
14838 (stop_all_lwps): ... this.
14839 (linux_resume_one_process): Rename to ...
14840 (linux_resume_one_lwp): ... this. Adjust.
14841 (linux_set_resume_request, linux_continue_one_thread)
14842 (linux_queue_one_thread, resume_status_pending_p)
14843 (usr_store_inferior_registers, regsets_store_inferior_registers)
14844 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14845 Adjust.
14846 * linux-low.h (get_process): Rename to ...
14847 (get_lwp): ... this. Adjust.
14848 (get_thread_process): Rename to ...
14849 (get_thread_lwp): ... this. Adjust.
14850 (get_process_thread): Rename to ...
14851 (get_lwp_thread): ... this. Adjust.
14852 (struct process_info): Rename to ...
14853 (struct lwp_info): ... this.
14854 (all_processes): Rename to ...
14855 (all_lwps): ... this.
14856 * proc-service.c (ps_lgetregs): Adjust.
14857 * thread-db.c (thread_db_create_event, find_one_thread)
14858 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14859
14860 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14861
14862 * server.c (handle_query): Handle "qAttached".
14863
14864 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14865
14866 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14867 GPLv3, update license URL.
14868
14869 2009-03-01 Doug Evans <dje@google.com>
14870
14871 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14872 (server_h): Add gdb_signals.h.
14873 (signals.o): Update.
14874 * server.h (target_signal_from_host,target_signal_to_host_p)
14875 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14876
14877 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14878
14879 * remote-utils.c (getpkt): Also generate remote-debug
14880 information if noack_mode is set.
14881
14882 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14883
14884 * server.c (handle_query): Report qXfer:siginfo:read and
14885 qXfer:siginfo:write as supported and handle them.
14886 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14887 * linux-low.c (linux_xfer_siginfo): New.
14888 (linux_target_ops): Set it.
14889
14890 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14891
14892 * server.c (gdbserver_usage): Mention --remote-debug.
14893 (main): Accept '--remote-debug' switch.
14894
14895 2009-01-18 Doug Evans <dje@google.com>
14896
14897 * regcache.c (new_register_cache): No need to check result of xcalloc.
14898 * server.c (handle_search_memory): Back out calls to xmalloc,
14899 result is checked and error is returned to user upon failure.
14900 (handle_query): Ditto. Add more checks for result of malloc.
14901 (handle_v_cont): Check result of malloc, report error back to
14902 user upon failure.
14903 (handle_v_run): Ditto. Call freeargv.
14904 * server.h (freeargv): Declare.
14905 * utils.c (freeargv): New fn.
14906
14907 2009-01-15 Doug Evans <dje@google.com>
14908
14909 * gdbreplay.c (perror_with_name): Make arg const char *.
14910 * server.h (target_signal_to_name): Make return type const char *.
14911 * thread-db.c (thread_db_err_str): Make return type const char *.
14912 * utils.c (perror_with_name): Make arg const char *.
14913
14914 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14915
14916 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14917 when handling a EXIT_PROCESS_DEBUG_EVENT.
14918
14919 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14920
14921 * gdbreplay.c (gdbreplay_version): Update copyright year.
14922 * server.c (gdbserver_version): Likewise.
14923
14924 2009-01-05 Doug Evans <dje@google.com>
14925
14926 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14927 (handle_extended_wait): Improve comment.
14928
14929 2008-12-13 Doug Evans <dje@google.com>
14930
14931 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14932 * server.h (ATTR_MALLOC): New macro.
14933 (xmalloc,xcalloc,xstrdup): Declare.
14934 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14935 * inferiors.c: Ditto.
14936 * linux-low.c: Ditto.
14937 * mem-break.c: Ditto.
14938 * regcache.c: Ditto.
14939 * remote-utils.c: Ditto.
14940 * server.c: Ditto.
14941 * target.c: Ditto.
14942 * win32-low.c: Ditto.
14943
14944 2008-12-12 Doug Evans <dje@google.com>
14945
14946 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14947 in debugging printf.
14948
14949 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14950
14951 2008-12-09 Doug Evans <dje@google.com>
14952
14953 * linux-low.h (struct process_info): Delete member tid, unused.
14954 * thread-db.c (find_one_thread): Update.
14955 (maybe_attach_thread): Update.
14956
14957 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14958
14959 * target.h (struct target_ops): Add qxfer_osdata member.
14960 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14961 and dirent.h.
14962 (linux_qxfer_osdata): New functions.
14963 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14964 callback.
14965 * server.c (handle_query): Handle "qXfer:osdata:read:".
14966 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14967 (buffer_xml_printf): New functions.
14968 * server.h (struct buffer): New.
14969 (buffer_grow_str, buffer_grow_str0): New macros.
14970 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14971 (buffer_xml_printf): Declare.
14972
14973 2008-11-24 Doug Evans <dje@google.com>
14974
14975 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14976
14977 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14978
14979 * server.c (handle_v_run): Always use the supplied argument list.
14980
14981 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14982
14983 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14984 (xtensa_regmap_table): Add entry for scompare1.
14985
14986 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14987
14988 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14989 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14990 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14991 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14992 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14993 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14994 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14995 XML target descriptions.
14996 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14997 when inferior is running on an ISA 2.05 or later processor. Add
14998 special case to return offset for full 64-bit slot of FPSCR when
14999 in 32-bits.
15000
15001 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15002
15003 * Makefile.in (SFILES, clean): Added sparc64 files.
15004 (reg-sparc64.o, reg-sparc64.c): New.
15005 * configure.srv (sparc*-*-linux*): New configuration.
15006 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15007 syscall arguments for SPARC.
15008 (regsets_store_inferior_registers): Likewise.
15009 * linux-sparc-low.c: New file.
15010
15011 2008-10-21 Doug Evans <dje@google.com>
15012
15013 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15014 (READLINE_DIR,READLINE_DEP): Delete.
15015 (INTERNAL_CFLAGS): Update.
15016 (LINTFLAGS): Update.
15017
15018 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15019
15020 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15021 whole argv from the last run, not just argv[0].
15022
15023 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15024
15025 * regcache.c (new_register_cache): Return NULL if the register
15026 cache size isn't known yet.
15027 (free_register_cache): Avoid dereferencing a NULL regcache.
15028
15029 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15030
15031 * configure.srv: Merge MIPS and MIPS64.
15032
15033 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15034
15035 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15036
15037 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15038
15039 * Makefile.in: Add required vsx dependencies.
15040
15041 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15042 Declare init_registers_powerpc_vsx32l.
15043 Declare init_registers_powerpc_vsx64l.
15044 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15045 (ppc_arch_setup): Check for VSX in hwcap.
15046 (ppc_fill_vsxregset): New function.
15047 (ppc_store_vsxregset): New function.
15048 Add new VSX entry in regset_info target_regsets.
15049
15050 * configure.srv: Add new VSX dependencies.
15051
15052 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15053
15054 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15055 (remote_open): Set or clear transport_is_reliable.
15056 (putpkt_binary): Don't expect acks in noack mode.
15057 (getpkt): Don't send ack/nac in noack mode.
15058 * server.c (handle_general_set): Handle QStartNoAckMode.
15059 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15060 qSupported.
15061 (main): Reset noack_mode on every connection.
15062 * server.h (noack_mode): Declare.
15063
15064 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15065
15066 * Makefile.in (GDBREPLAY_OBS): New variable.
15067 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15068
15069 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15070 Daniel Jacobowitz <dan@codesourcery.com>
15071
15072 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15073 (usr_store_inferior_registers): Likewise.
15074 (regsets_store_inferior_registers): Likewise.
15075
15076 2008-07-31 Rolf Jansen <rj@surtec.com>
15077 Pedro Alves <pedro@codesourcery.com>
15078
15079 * configure.ac: Check for memmem declaration.
15080 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15081 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15082 (disable_packet_qfThreadInfo): Unconditionally compile.
15083 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15084 * configure, config.in: Regenerate.
15085
15086 2008-07-28 Doug Kwan <dougkwan@google.com>
15087
15088 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15089 (linux_write_memory): Remove declaration of errno.
15090
15091 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15092
15093 * linux-low.c (handle_extended_wait): Do not use "status"
15094 variable uninitialized.
15095
15096 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15097
15098 * server.c (handle_v_attach): Inhibit reporting dll changes.
15099
15100 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15101
15102 * remote-utils.c (prepare_resume_reply): If requested, don't
15103 output "thread:TID" in the T stop reply.
15104
15105 * server.c (disable_packet_vCont, disable_packet_Tthread)
15106 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15107 (handle_query): If requested, disable support for qC, qfThreadInfo
15108 and qsThreadInfo.
15109 (handle_v_requests): If requested, disable support for vCont.
15110 (gdbserver_show_disableable): New.
15111 (main): Handle --disable-packet and --disable-packet=LIST.
15112
15113 * server.h (disable_packet_vCont, disable_packet_Tthread)
15114 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15115
15116 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15117
15118 * server.c (gdbserver_usage): Mention --version.
15119
15120 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15121
15122 * Makefile.in (gdbreplay.o): New rule.
15123
15124 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15125
15126 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15127 message, not gdbserver.
15128
15129 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15130 Nathan Sidwell <nathan@codesourcery.com>
15131 Joseph Myers <joseph@codesourcery.com>
15132
15133 * acinclude.m4: Include ../../config/acx.m4.
15134 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15135 * configure, config.in: Regenerate.
15136 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15137 * server.c (gdbserver_version): Print PKGVERSION.
15138 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15139 (main): Adjust gdbserver_usage calls.
15140 * gdbreplay.c (version, host_name): Add declarations.
15141 (gdbreplay_version, gdbreplay_usage): New.
15142 (main): Accept --version and --help options.
15143
15144 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15145
15146 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15147 (arm_breakpoint_at): Handle Thumb.
15148 (the_low_target): Add comment.
15149
15150 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15151
15152 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15153
15154 2008-05-09 Doug Evans <dje@google.com>
15155
15156 * server.h (decode_search_memory_packet): Declare.
15157 * remote-utils.c (decode_search_memory_packet): New fn.
15158 * server.c (handle_search_memory_1): New fn.
15159 (handle_search_memory): New fn.
15160 (handle_query): Process qSearch:memory packets.
15161
15162 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15163
15164 * regcache.c (registers_length): Remove.
15165 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15166 full register packet.
15167 * regcache.h (registers_length): Remove prototype.
15168 * server.h (PBUFSIZ): Define to 16384.
15169
15170 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15171
15172 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15173 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15174 powerpc-64l.o, and powerpc-altivec64l.o.
15175 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15176 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15177 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15178 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15179 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15180 to srv_xmlfiles.
15181
15182 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15183 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15184 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15185 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15186 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15187 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15188 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15189 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15190 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15191 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15192 (clean): Update.
15193
15194 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15195 (init_registers_powerpc_32l): ... this new prototype.
15196 (init_registers_powerpc_32): Remove, replace by ...
15197 (init_registers_powerpc_altivec32l): ... this new prototype.
15198 (init_registers_powerpc_e500): Remove, replace by ...
15199 (init_registers_powerpc_e500l): ... this new prototype.
15200 (init_registers_ppc64): Remove, replace by ...
15201 (init_registers_powerpc_64l): ... this new prototype.
15202 (init_registers_powerpc_64): Remove, replace by ...
15203 (init_registers_powerpc_altivec64l): ... this new prototype.
15204 (ppc_num_regs): Set to 73.
15205 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15206 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15207 (ppc_cannot_store_register): Handle orig_r3 and trap.
15208 (ppc_arch_setup): Update init_registers_... calls.
15209 (ppc_fill_gregset): Handle orig_r3 and trap.
15210
15211 * inferiors.c (clear_inferiors): Reset current_inferior.
15212
15213 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15214
15215 * acinclude.m4: Add override.m4.
15216 * configure: Regenerate.
15217
15218 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15219
15220 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15221 initial call to init_register_ppc64.
15222
15223 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15224
15225 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15226 single powerpc*-*-linux* case.
15227 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15228
15229 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15230
15231 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15232 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15233 from reg_xmlfiles.
15234 * linux-ppc-low.c: Include <elf.h>.
15235 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15236 (ppc_hwcap): New global variable.
15237 (ppc_regmap): Remove __SPE__ #ifdef sections.
15238 (ppc_regmap_e500): New global variable.
15239 (ppc_cannot_store_register): Update __SPE__ special case.
15240 (ppc_get_hwcap): New function.
15241 (ppc_arch_setup): Use it to determine whether inferior supports
15242 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15243 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15244 Do not access registers if target does not support AltiVec.
15245 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15246 Do not access registers if target does not support SPE.
15247 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15248
15249 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15250
15251 * linux-low.c (disabled_regsets, num_regsets): New.
15252 (use_regsets_p): Delete.
15253 (linux_wait_for_process): Clear disabled_regsets.
15254 (regsets_fetch_inferior_registers): Check and set it.
15255 (regsets_store_inferior_registers): Likewise.
15256 (linux_fetch_registers, linux_store_registers): Do not use
15257 use_regsets_p.
15258 (initialize_low): Allocate disabled_regsets.
15259
15260 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15261
15262 * Makefile.in (LIBOBJS): New.
15263 (OBS): Use LIBOBJS.
15264 (memmem.o): New rule.
15265 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15266 * configure: Regenerated.
15267
15268 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15269
15270 * server.c (handle_query): Never return "unsupported" for
15271 qXfer:features:read queries.
15272
15273 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15274
15275 * server.c (get_features_xml): Fix inverted condition.
15276 (handle_query): Always support qXfer:feature:read.
15277
15278 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15279
15280 * server.c (wrapper_argv): New.
15281 (start_inferior): Handle wrapper_argv. If set, expect an extra
15282 trap.
15283 (gdbserver_usage): Document --wrapper.
15284 (main): Parse --wrapper.
15285
15286 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15287
15288 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15289 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15290 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15291 (ppc_set_pc): Likewise.
15292 (ppc_arch_setup): New function.
15293 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15294 of collect_register.
15295 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15296
15297 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15298
15299 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15300 instead of linux-ppc64-low.o.
15301 * linux-ppc64-low.c: Remove file.
15302 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15303 (linux-ppc64-low.o): Remove rule.
15304
15305 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15306 (init_registers_powerpc_64): Likewise.
15307 (ppc_regmap): Conditionally define depending on __powerpc64__.
15308 (ppc_cannot_store_register): Do not special-case "fpscr" when
15309 compiled on __powerpc64__.
15310 (ppc_collect_ptrace_register): New function.
15311 (ppc_supply_ptrace_register): New function.
15312 (ppc_breakpoint): Change type to "unsigned int".
15313 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15314 (the_low_target): Conditionally provide initializers for the
15315 arch_setup member depending on __powerpc64__. Install
15316 collect_ptrace_register and supply_ptrace_register members.
15317
15318 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15319
15320 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15321 * server.c (gdbserver_xmltarget): Define.
15322 (get_features_xml): Use it to replace "target.xml" and arch_string.
15323
15324 * configure.srv: Remove srv_xmltarget. Add XML files that were
15325 mentioned there to srv_xmlfiles instead. Remove conditional tests
15326 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15327 srv_xmlfiles and srv_regobj to include all possible choices.
15328 * configure.ac (srv_xmltarget): Remove.
15329 (srv_xmlfiles): Do not add "target.xml".
15330 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15331 checks for supplementary target information.
15332 * configure: Regenerate.
15333 * Makefile.in (XML_TARGET): Remove.
15334 (target.xml): Remove rule.
15335 (clean): Do not clean up target.xml.
15336 (.PRECIOUS): Do not mention target.xml.
15337
15338 * target.h (struct target_ops): Remove arch_string member.
15339 * linux-low.c (linux_arch_string): Remove.
15340 (linux_target_ops): Remove arch_string initializer.
15341 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15342 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15343 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15344 * spu-low.c (spu_arch_string): Remove.
15345 (spu_target_ops): Remove arch_string initializer.
15346 * win32-low.c (win32_arch_string): Remove.
15347 (win32_target_ops): Remove arch_string initializer.
15348 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15349 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15350 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15351
15352 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15353
15354 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15355 by collect_ptrace_register and supply_ptrace_register hooks.
15356 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15357 instead of checking for the_low_target.left_pad_xfer.
15358 (usr_store_inferior_registers): Use collect_ptrace_register callback
15359 instead of checking for the_low_target.left_pad_xfer.
15360
15361 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15362 (s390_supply_ptrace_register): Likewise.
15363 (s390_fill_gregset): Call s390_collect_ptrace_register.
15364 (the_low_target): Update.
15365
15366 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15367 (ppc_supply_ptrace_register): Likewise.
15368 (the_low_target): Update.
15369
15370 * linux-i386-low.c (the_low_target): Update.
15371 * linux-x86-64-low.c (the_low_target): Update.
15372
15373 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15374
15375 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15376 reg-s390.o and reg-s390x.o.
15377
15378 * linux-low.c (new_inferior): New global variable.
15379 (linux_create_inferior, linux_attach): Set it.
15380 (linux_wait_for_process): Call the_low_target.arch_setup after the
15381 target has stopped for the first time.
15382 (initialize_low): Do not call the_low_target.arch_setup.
15383
15384 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15385 (s390_set_pc): Likewise.
15386 (s390_arch_setup): New function.
15387 (the_low_target): Use s390_arch_setup as arch_setup routine.
15388
15389 * regcache.c (realloc_register_cache): New function.
15390 (set_register_cache): Call it for each existing regcache.
15391
15392 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15393
15394 * server.h (init_registers): Remove prototype.
15395
15396 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15397 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15398 instead of init_registers ().
15399 * linux-arm-low.c (init_registers_arm): Add prototype.
15400 (init_registers_arm_with_iwmmxt): Likewise.
15401 (the_low_target): Add initializer for arch_setup field.
15402 * linux-cris-low.c (init_registers_cris): Add prototype.
15403 (the_low_target): Add initializer for arch_setup field.
15404 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15405 (the_low_target): Add initializer for arch_setup field.
15406 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15407 (the_low_target): Add initializer for arch_setup field.
15408 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15409 (the_low_target): Add initializer for arch_setup field.
15410 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15411 (the_low_target): Add initializer for arch_setup field.
15412 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15413 (the_low_target): Add initializer for arch_setup field.
15414 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15415 (init_registers_mips64_linux): Likewise.
15416 (the_low_target): Add initializer for arch_setup field.
15417 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15418 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15419 (the_low_target): Add initializer for arch_setup field.
15420 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15421 (init_registers_powerpc_64): Likewise.
15422 (the_low_target): Add initializer for arch_setup field.
15423 * linux-s390-low.c (init_registers_s390): Add prototype.
15424 (init_registers_s390x): Likewise.
15425 (the_low_target): Add initializer for arch_setup field.
15426 * linux-sh-low.c (init_registers_sh): Add prototype.
15427 (the_low_target): Add initializer for arch_setup field.
15428 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15429 (the_low_target): Add initializer for arch_setup field.
15430 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15431 (the_low_target): Add initializer for arch_setup field.
15432
15433 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15434 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15435 instead of init_registers ().
15436 * win32-arm-low.c (init_registers_arm): Add prototype.
15437 (the_low_target): Add initializer for arch_setup field.
15438 * win32-i386-low.c (init_registers_i386): Add prototype.
15439 (the_low_target): Add initializer for arch_setup field.
15440
15441 * spu-low.c (init_registers_spu): Add prototype.
15442 (initialize_low): Call initialie_registers_spu () instead of
15443 initialize_registers ().
15444
15445 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15446
15447 * server.c (handle_v_requests): When handling the vRun and vAttach
15448 packets, if already debugging a process, don't kill it. Return an
15449 error instead.
15450
15451 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15452
15453 * server.c (handle_query): Correct length check.
15454
15455 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15456
15457 * win32-low.c (do_initial_child_stuff): Add process handle
15458 parameter. Set current_process_handle and current_process_id from the
15459 parameters. Clear globals.
15460 (win32_create_inferior): Don't set current_process_handle and
15461 current_process_id here. Instead pass them on the call to
15462 do_initial_child_stuff.
15463 (win32_attach): Likewise.
15464 (win32_clear_inferiors): New.
15465 (win32_kill): Don't close the current process handle or the
15466 current thread handle here. Instead call win32_clear_inferiors.
15467 (win32_detach): Don't open a new handle to the process. Call
15468 win32_clear_inferiors.
15469 (win32_join): Don't rely on current_process_handle; open a new
15470 handle using the process id.
15471 (win32_wait): Call win32_clear_inferiors when the inferior process
15472 has exited.
15473
15474 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15475
15476 * server.c (monitor_show_help): Add "exit".
15477
15478 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15479
15480 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15481 (clean): Add reg-xtensa.c.
15482 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15483 * configure.srv (xtensa*-*-linux*) New target.
15484 * linux-xtensa-low.c: New.
15485 * xtensa-xtregs.c: New.
15486
15487 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15488
15489 * hostio.c: Don't include errno.h.
15490 (errno_to_fileio_errno): Move to hostio-errno.
15491 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15492 error number outputting to the target->hostio_last_error callback.
15493 (hostio_packet_error): Use FILEIO_EINVAL directly.
15494 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15495 calls to hostio_error.
15496 * hostio-errno.c: New.
15497 * server.h (hostio_last_error_from_errno): Declare.
15498 * target.h (target_ops): Add hostio_last_error member.
15499 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15500 as hostio_last_error handler.
15501 * spu-low.c (spu_target_ops): Likewise.
15502 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15503 (wince_hostio_last_error): New functions.
15504 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15505 as hostio_last_error handler.
15506 (win32_target_ops) [!_WIN32_WCE]: Register
15507 hostio_last_error_from_errno as hostio_last_error handler.
15508 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15509 (hostio-errno.o): New rule.
15510 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15511 * configure.srv (srv_hostio_err_objs): New variable. Default to
15512 hostio-errno.o.
15513 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15514 * configure: Regenerate.
15515
15516 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15517
15518 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15519 (linux_kill, linux_detach): Clean up the process list.
15520 * remote-utils.c (remote_open): Improve port number parsing.
15521 (putpkt_binary, input_interrupt): Only send interrupts if the target
15522 is running.
15523 * server.c (extended_protocol): Make static.
15524 (attached): Define earlier.
15525 (exit_requested, response_needed, program_argv): New variables.
15526 (target_running): New.
15527 (start_inferior): Clear attached here.
15528 (attach_inferior): Set attached here.
15529 (require_running): Define.
15530 (handle_query): Use require_running and target_running. Implement
15531 "monitor exit".
15532 (handle_v_attach, handle_v_run): New.
15533 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15534 (gdbserver_usage): Update.
15535 (main): Redo argument parsing. Handle --debug and --multi. Handle
15536 --attach along with other options or after the port. Save
15537 program_argv. Support no initial program. Resynchronize
15538 communication with GDB after an error. Handle "monitor exit".
15539 Use require_running and target_running. Always allow the extended
15540 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15541 restart in extended mode.
15542 * README: Refer to the GDB manual. Update --attach usage.
15543
15544 2007-12-20 Andreas Schwab <schwab@suse.de>
15545
15546 * linux-low.c (STACK_SIZE): Define.
15547 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15548 (linux_test_for_tracefork): Likewise.
15549
15550 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15551
15552 * linux-low.c (linux_wait_for_event): Update messages. Do not
15553 reinsert auto-delete breakpoints.
15554 * mem-break.c (struct breakpoint): Change return type of handler to
15555 int.
15556 (set_breakpoint_at): Update handler type.
15557 (reinsert_breakpoint_handler): Return 1 instead of calling
15558 delete_breakpoint.
15559 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15560 setting a new one.
15561 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15562 * mem-break.h (set_breakpoint_at): Update handler type.
15563 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15564 * win32-low.c (auto_delete_breakpoint): New.
15565 (get_child_debug_event): Use it.
15566
15567 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15568
15569 * configure.ac: Check for pread and pwrite.
15570 * hostio.c (handle_pread): Fall back to lseek and read.
15571 (handle_pwrite): Fall back to lseek and write.
15572 * config.in, configure: Regenerated.
15573
15574 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15575
15576 * server.c (myresume): Add own_buf argument.
15577 (main): Update calls.
15578
15579 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15580
15581 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15582 * remote-utils.c (remote_open): Do not call disable_async_io.
15583 (block_async_io): Delete.
15584 (unblock_async_io): Make static.
15585 (initialize_async_io): New.
15586 * server.c (handle_v_cont): Handle async I/O here.
15587 (myresume): Likewise. Move other common resume tasks here...
15588 (main): ... from here. Call initialize_async_io. Disable async
15589 I/O before the main loop.
15590 * server.h (initialize_async_io): Declare.
15591 (block_async_io, unblock_async_io): Delete prototypes.
15592 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15593
15594 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15595
15596 * remote-utils.c (readchar): Allow binary data in received messages.
15597
15598 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15599
15600 * win32-low.c (attaching): New global.
15601 (win32_create_inferior): Clear the `attaching' global.
15602 (win32_attach): Set the `attaching' global.
15603 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15604 attaching. Only set a breakpoint at the entry point if not
15605 attaching.
15606
15607 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15608
15609 * server.c (main): Don't report dll events on the initial
15610 connection on attaches.
15611
15612 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15613
15614 * server.c (main): Relax numerical bases supported for the pid of
15615 the --attach command line argument.
15616
15617 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15618
15619 * win32-low.c (win32_attach): Call OpenProcess before
15620 DebugActiveProcess, not after. Add last error output to error
15621 call.
15622
15623 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15624
15625 * win32-low.c (win32_get_thread_context)
15626 (win32_set_thread_context): New functions.
15627 (thread_rec): Use win32_get_thread_context.
15628 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15629 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15630 field.
15631
15632 2007-12-03 Leo Zayas
15633 Pedro Alves <pedro_alves@portugalmail.pt>
15634
15635 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15636 global variables.
15637 (child_add_thread): Minor cleanup.
15638 (child_continue): Resume artificially suspended threads before
15639 calling ContinueDebugEvent.
15640 (suspend_one_thread): New.
15641 (fake_breakpoint_event): New.
15642 (get_child_debug_event): Change return type to int. Check here if
15643 gdb sent an interrupt request. If a soft interrupt was requested,
15644 fake a breakpoint event. Return 0 if there is no event to handle,
15645 and 1 otherwise.
15646 (win32_wait): Don't check here if gdb sent an interrupt request.
15647 Ensure there is a valid event to handle.
15648 (win32_request_interrupt): Add soft interruption method as last
15649 resort.
15650
15651 2007-12-03 Leo Zayas
15652 Pedro Alves <pedro_alves@portugalmail.pt>
15653
15654 * win32-low.h (win32_thread_info): Add descriptions to the
15655 structure members. Replace `suspend_count' counter by a
15656 `suspended' flag.
15657 * win32-low.c (thread_rec): Update condition of when to get the
15658 context from the inferior. Rely on ContextFlags being set if it
15659 has already been retrieved. Only suspend the inferior thread if
15660 we haven't already. Warn if that fails.
15661 (continue_one_thread): s/suspend_count/suspended/. Only call
15662 ResumeThread once. Warn if that fails.
15663
15664 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15665
15666 * win32-low.c (win32_wait): Don't read from the inferior when it
15667 has already exited.
15668
15669 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15670
15671 * Makefile.in (win32_low_h): New variable.
15672 (win32-low.o): Add dependency on $(win32_low_h).
15673 (win32-arm-low.o, win32-i386-low.o): New rules.
15674
15675 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15676
15677 * hostio.c: Correct copyright year.
15678
15679 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15680
15681 * Makefile.in (OBS): Add hostio.o.
15682 (hostio.o): New rule.
15683 * server.h (handle_vFile): Declare.
15684 * hostio.c: New file.
15685 * server.c (handle_v_requests): Take packet_len and new_packet_len
15686 for binary packets. Call handle_vFile.
15687 (main): Update call to handle_v_requests.
15688
15689 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15690
15691 * linux-low.c: Include <sched.h>.
15692
15693 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15694
15695 * linux-low.c (linux_tracefork_grandchild): New.
15696 (linux_tracefork_child): Use clone.
15697 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15698
15699 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15700
15701 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15702
15703 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15704
15705 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15706
15707 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15708
15709 * inferiors.c (change_inferior_id): Delete.
15710 (add_pid_to_list, pull_pid_from_list): New.
15711 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15712 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15713 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15714 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15715 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15716 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15717 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15718 (using_threads): Always set to 1.
15719 (handle_extended_wait): New.
15720 (add_process): Do not set TID.
15721 (linux_create_inferior): Set must_set_ptrace_flags.
15722 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15723 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15724 (linux_thread_alive): Rename TID argument to LWPID.
15725 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15726 (linux_wait_for_event): Do not use TID or check using_threads. Update
15727 call to dead_thread_notify. Call handle_extended_wait.
15728 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15729 (send_sigstop): Delete sigstop_sent.
15730 (wait_for_sigstop): Avoid TID.
15731 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15732 (linux_test_for_tracefork): New.
15733 (linux_lookup_signals): Use thread_db_active and
15734 linux_supports_tracefork_flag.
15735 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15736 * linux-low.h (get_process_thread): Avoid TID.
15737 (struct process_ifo): Move thread_known and tid to the end. Remove
15738 sigstop_sent.
15739 (linux_attach_lwp, thread_db_init): Update prototypes.
15740 * server.h (change_inferior_id): Delete prototype.
15741 (add_pid_to_list, pull_pid_from_list): New prototypes.
15742 * thread-db.c (thread_db_use_events): New.
15743 (find_first_thread): Rename to...
15744 (find_one_thread): ...this. Update callers and messages. Do not
15745 call fatal. Check thread_db_use_events. Do not call
15746 change_inferior_id or new_thread_notify.
15747 (maybe_attach_thread): Update. Do not call new_thread_notify.
15748 (thread_db_init): Set thread_db_use_events. Check use_events.
15749 * utils.c (fatal, warning): Correct message prefix.
15750
15751 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15752
15753 * Makefile.in (clean): Remove new files.
15754 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15755 (powerpc-64.o, powerpc-64.c): New rules.
15756 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15757 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15758 with SPE.
15759 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15760 SPE targets.
15761 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15762 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15763 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15764 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15765 (target_regsets): Add AltiVec and SPE register sets.
15766 * configure.ac: Check for AltiVec and SPE.
15767 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15768 (ppc_fill_vrregset, ppc_store_vrregset): New.
15769 (target_regsets): Add AltiVec register set.
15770 * configure: Regenerated.
15771
15772 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15773
15774 * linux-low.c (O_LARGEFILE): Define.
15775 (linux_read_memory): Use /proc/PID/mem.
15776 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15777 * configure, config.in: Regenerated.
15778
15779 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15780
15781 * linux-low.c (linux_wait_for_event): Do not pass signals while
15782 single-stepping.
15783
15784 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15785
15786 * win32-low.c (create_process): New.
15787 (win32_create_inferior): Use create_process instead of
15788 CreateProcess. If create_process failed retry appending an ".exe"
15789 suffix. Store the GetLastError result immediatelly after
15790 create_process calls and use it on the call to error.
15791
15792 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15793
15794 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15795
15796 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15797
15798 * configure.ac: Switch license to GPLv3.
15799
15800 2007-08-01 Michael Snyder <msnyder@access-company.com>
15801
15802 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15803
15804 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15805
15806 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15807 typedef.
15808 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15809 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15810 CloseToolhelp32Snapshot.
15811 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15812 CloseToolhelp32Snapshot.
15813
15814 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15815
15816 * server.c (main): Check for inferior exit before main loop.
15817
15818 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15819
15820 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15821 instead of on tmp_desc.
15822
15823 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15824 Daniel Jacobowitz <dan@codesourcery.com>
15825
15826 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15827 (add_thread): Minor cleanups.
15828 (clear_inferiors): Move lower in the file. Clear the DLL
15829 list.
15830 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15831 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15832 (xml_escape_text): New.
15833 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15834 for qSupported.
15835 (handle_v_cont): Report errors.
15836 (gdbserver_version): Update.
15837 (main): Correct size of own_buf. Do not report initial DLL events.
15838 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15839 (unloaded_dll, xml_escape_text): New.
15840 * win32-low.c (enum target_waitkind): Update comments.
15841 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15842 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15843 (win32_EnumProcessModules, win32_GetModuleInformation)
15844 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15845 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15846 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15847 (win32_Module32First, win32_Module32Next, load_toolhelp)
15848 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15849 (get_child_debug_event): Handle DLL events.
15850 (win32_wait): Likewise.
15851
15852 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15853
15854 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15855 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15856
15857 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15858
15859 * win32-low.c (handle_output_debug_string): Ignore event if not
15860 waiting.
15861
15862 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15863
15864 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15865
15866 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15867
15868 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15869
15870 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15871
15872 * inferiors.c (change_inferior_id): Add comment.
15873 * linux-low.c (check_removed_breakpoint): Add an early
15874 prototype. Improve debug output.
15875 (linux_attach): Doc update.
15876 (linux_detach_one_process, linux_detach): Clean up before releasing
15877 each process.
15878 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15879 * linux-low.h (struct process_info): Doc improvement.
15880 * mem-break.c (delete_all_breakpoints): New.
15881 * mem-break.h (delete_all_breakpoints): New prototype.
15882 * thread-db.c (find_first_thread): New.
15883 (thread_db_create_event): Call it instead of
15884 thread_db_find_new_threads. Clean up unused variables.
15885 (maybe_attach_thread): Remove first thread handling.
15886 (thread_db_find_new_threads): Use find_first_thread.
15887 (thread_db_get_tls_address): Likewise.
15888
15889 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15890
15891 * thread-db.c (thread_db_find_new_threads): Add prototype.
15892 (thread_db_create_event): Check for the main thread before adding
15893 a new thread.
15894 (maybe_attach_thread): Only enable event reporting if TID == 0.
15895 (thread_db_get_tls_address): Check for new threads.
15896
15897 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15898
15899 * linux-low.c (linux_create_inferior): Try execv before execvp.
15900 * spu-low.c (spu_create_inferior): Likewise.
15901
15902 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15903
15904 * linux-low.c (linux_create_inferior): Change execv to execvp.
15905 * spu-low.c (spu_create_inferior): Likewies.
15906
15907 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15908
15909 * Makefile.in (clean): Clean new files instead of deleted ones.
15910 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15911 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15912 rules.
15913 * configure.srv: Specify XML files and new regformats for MIPS and
15914 MIPS64 GNU/Linux.
15915 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15916 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15917 an entry for the restart register.
15918 (mips_cannot_fetch_register, mips_cannot_store_register)
15919 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15920 register names to match the XML descriptions.
15921 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15922 restart register instead of $0.
15923
15924 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15925 Markus Deuling <deuling@de.ibm.com>
15926
15927 * remote-utils.c (decode_xfer_write): New function.
15928 * server.h (decode_xfer_write): Add prototype.
15929 * server.c (handle_query): Add PACKET_LEN argument. Support
15930 qXfer:spu:read and qXfer:spu:write packets.
15931 (main): Pass packet_len to handle_query.
15932 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15933 * target.h (target_ops): Add qxfer_spu.
15934
15935 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15936
15937 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15938 accessing non-seekable spufs files.
15939
15940 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15941
15942 * server.c (handle_query): Add reply for qC packet.
15943
15944 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15945 Leo Zayas <lerele@champenstudios@com>
15946
15947 * server.h (check_remote_input_interrupt_request): New function.
15948 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15949 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15950 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15951 (check_remote_input_interrupt_request): New function.
15952 * server.h (check_remote_input_interrupt_request): Declare.
15953 * win32-low.c (winapi_DebugBreakProcess,
15954 winapi_GenerateConsoleCtrlEvent): New typedefs.
15955 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15956 to 250 ms.
15957 (win32_wait): Check for remote interrupt request
15958 with check_remote_input_interrupt_request.
15959 (win32_request_interrupt): New function.
15960 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15961
15962 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15963
15964 * win32-low.c (debug_registers_changed,
15965 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15966 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15967 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15968 (thread_rec): Get context using the low target.
15969 (child_add_thread): Call thread_added on the low target,
15970 which does the same thing.
15971 (regptr): Delete.
15972 (do_initial_child_stuff): Remove debug registers references.
15973 Set context using the low target. Resume threads after
15974 setting the contexts.
15975 (child_continue): Remove dead variable. Remove debug
15976 registers references.
15977 (child_fetch_inferior_registers): Go through the low target.
15978 (do_child_store_inferior_registers): Remove.
15979 (child_store_inferior_registers): Go through the low target.
15980 (win32_resume): Remove debug registers references.
15981 Set context using the low target.
15982 (handle_exception): Change return type to void. Don't record
15983 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15984 first chance exception.
15985 (get_child_debug_event): Change return type to void. Remove
15986 goto loop. Always return after waiting for debug event.
15987 (win32_wait): Convert to switch statement. Handle spurious
15988 events.
15989
15990 * win32-i386-low.c (debug_registers_changed,
15991 debug_registers_used): New.
15992 (initial_stuff): Rename to ...
15993 (i386_initial_stuff): ... this. Clear debug registers
15994 state variables.
15995 (store_debug_registers): Delete.
15996 (i386_get_thread_context): New.
15997 (load_debug_registers): Delete.
15998 (i386_set_thread_context): New.
15999 (i386_thread_added): New.
16000 (single_step): Rename to ...
16001 (i386_single_step): ... this.
16002 (do_fetch_inferior_registers): Rename to ...
16003 (i386_fetch_inferior_register): ... this.
16004 (i386_store_inferior_register): New.
16005 (the_low_target): Adapt to new interface.
16006
16007 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16008 (arm_get_thread_context): New.
16009 (arm_set_thread_context): New.
16010 (regptr): New.
16011 (do_fetch_inferior_registers): Rename to ...
16012 (arm_fetch_inferior_register): ... this.
16013 (arm_store_inferior_register): New.
16014 (arm_wince_breakpoint): Reimplement as unsigned long.
16015 (arm_wince_breakpoint_len): Define.
16016 (the_low_target): Adapt to new interface.
16017
16018 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16019 load_debug_registers. Add get_thread_context, set_thread_context,
16020 thread_added and store_inferior_register. Rename
16021 fetch_inferior_registers to fetch_inferior_register.
16022 (regptr): Remove declaration.
16023
16024 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16025
16026 * linux-low.c (linux_detach): Change return type to int. Return 0.
16027 * spu-low.c (spu_detach): Likewise.
16028
16029 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16030
16031 * target.h (target_ops): Change return type of detach to int.
16032 Add join.
16033 (join_inferior): New.
16034 * server.c (main): Don't skip detach support on mingw32.
16035 If the inferior doesn't support detaching return error.
16036 Call join_inferior instead of using waitpid.
16037 * linux-low.c (linux_join): New.
16038 (linux_target_op): Add linux_join.
16039 * spu-low.c (spu_join): New.
16040 (spu_target_ops): Add spu_join.
16041 * win32-low.c (win32_detach): Adapt to new interface.
16042 Reopen current_process_handle before detaching. Issue a child
16043 resume before detaching.
16044 (win32_join): New.
16045 (win32_target_op): Add win32_join.
16046
16047 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16048
16049 * win32-low.c (win32-attach): Fix return value.
16050 * target.h (target_ops): Describe ATTACH return values.
16051
16052 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16053
16054 * win32-low.c (GETPROCADDRESS): Define.
16055 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16056 (winapi_DebugSetProcessKillOnExit): Likewise.
16057 (win32_create_inferior): Force usage of ansi CreateProcessA.
16058 (win32_attach): Use GETPROCADDRESS.
16059 (win32_detach): Likewise.
16060
16061 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16062
16063 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16064
16065 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16066
16067 * win32-low.c: Commit leftover changes from 2007-03-29.
16068
16069 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16070
16071 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16072 fields short instead of int. Add explicit padding.
16073 (i387_cache_to_fsave): Remove unnecessary casts.
16074 (i387_fsave_to_cache): Doc fix.
16075 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16076
16077 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16078
16079 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16080 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16081
16082 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16083
16084 * configure.srv (arm*-*-mingw32ce*): Move near the other
16085 arm targets.
16086
16087 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16088
16089 * configure.ac: Add errno checking.
16090 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16091 sys/file.h and malloc.h.
16092 (AC_CHECK_DECLS): Add perror.
16093 (srv_mingwce): Handle.
16094 * configure.srv (i[34567]86-*-cygwin*): Add
16095 win32-i386-low.o to srv_tgtobj.
16096 (i[34567]86-*-mingw*): Likewise.
16097 (arm*-*-mingw32ce*): Add case.
16098 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16099 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16100 [__MINGW32CE__] (strerror): New function.
16101 [__MINGW32CE__] (errno): Define to GetLastError.
16102 [__MINGW32CE__] (COUNTOF): New macro.
16103 (remote_open): Remove extra close call.
16104 * mem-break.c (delete_breakpoint_at): New function.
16105 * mem-break.h (delete_breakpoint_at): Declare.
16106 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16107 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16108 [USE_WIN32API] (read, write): Add char* casts.
16109 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16110 * server.h: Include wincecompat.h on Windows CE.
16111 [HAVE_ERRNO_H]: Check.
16112 (perror): Declare if not declared.
16113 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16114 (perror_with_name): Remove errno declaration.
16115 * wincecompat.h: New.
16116 * wincecompat.c: New.
16117 * win32-low.h: New.
16118 * win32-arm-low.c: New.
16119 * win32-i386-low.c: New.
16120 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16121 (OUTMSG2): Make it safe.
16122 (_T): New macro.
16123 (COUNTOF): New macro.
16124 (NUM_REGS): Get it from the low target.
16125 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16126 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16127 (thread_rec): Let low target handle debug registers.
16128 (child_add_thread): Likewise.
16129 (child_init_thread_list): Likewise.
16130 (continue_one_thread): Likewise.
16131 (regptr): New.
16132 (do_child_fetch_inferior_registers): Move to ...
16133 * win32-i386-low.c: ... here, and rename to ...
16134 (do_fetch_inferior_registers): ... this.
16135 * win32-low.c (child_fetch_inferior_registers):
16136 Go through the low target.
16137 (do_child_store_inferior_registers): Use regptr.
16138 (strwinerror): New function.
16139 (win32_create_inferior): Handle Windows CE.
16140 Use strwinerror instead of strerror on Windows error
16141 codes. Add program to the error output.
16142 Don't close the main thread handle on Windows CE.
16143 (win32_attach): Use coredll.dll on Windows CE.
16144 (win32_kill): Close current process and current
16145 thread handles.
16146 (win32_detach): Use coredll.dll on Windows CE.
16147 (win32_resume): Let low target handle debug registers, and
16148 step request.
16149 (handle_exception): Add/Remove initial breakpoint. Avoid
16150 non-existant WSTOPSIG on Windows CE.
16151 (win32_read_inferior_memory): Cast to remove warning.
16152 (win32_arch_string): Go through the low target.
16153 (initialize_low): Call set_breakpoint_data with the low
16154 target's breakpoint.
16155 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16156 FOP_REGNUM, mappings): Move to ...
16157 * win32-i386-low.c: ... here.
16158 * win32-low.c (win32_thread_info): Move to ...
16159 * win32-low.h: ... here.
16160 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16161 win32-arm-low.c and wincecompat.c.
16162 (all:): Add $EXEEXT.
16163 (install-only:): Likewise.
16164 (gdbserver:): Likewise.
16165 (gdbreplay:): Likewise.
16166 * config.in: Regenerate.
16167 * configure: Regenerate.
16168
16169 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16170
16171 * win32-low.c: Rename typedef thread_info to
16172 win32_thread_info throughout.
16173
16174 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16175
16176 * win32-i386-low.c: Rename to ...
16177 * win32-low.c: ... this.
16178 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16179 * Makefile.in: Likewise.
16180
16181 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16182
16183 * remote-utils.c (monitor_output): Constify msg parameter.
16184 * server.h (monitor_output): Likewise.
16185 * win32-i386-low.c (handle_output_debug_string): New.
16186 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16187 handle_output_debug_string.
16188 (get_child_debug_event): Likewise.
16189
16190 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16191
16192 * server.c (main): Correct strtoul check.
16193
16194 2007-03-27 Jon Ringle <jon@ringle.org>
16195
16196 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16197
16198 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16199
16200 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16201
16202 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16203
16204 * terminal.h: Check HAVE_SGTTY_H.
16205
16206 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16207
16208 * remote-utils.c (remote_open): Print out the assigned port number.
16209
16210 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16211
16212 * remote-utils.c (monitor_output): New function.
16213 * server.c (debug_threads): Define here.
16214 (monitor_show_help): New function.
16215 (handle_query): Handle qRcmd.
16216 (main): Do not handle 'd' packet.
16217 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16218 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16219 of debug_threads.
16220
16221 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16222
16223 * Makefile.in (EXEEXT): New.
16224 (clean): Use $(EXEEXT).
16225
16226 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16227
16228 * target.h (target_ops): Rename send_signal to request_interrupt,
16229 and remove enum target_signal parameter.
16230 * linux-low.c (linux_request_interrupt): Rename from
16231 linux_send_signal, and always send SIGINT.
16232 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16233 and always send SIGINT.
16234 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16235 of send_signal.
16236 (input_interrupt): Likewise.
16237
16238 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16239
16240 * server.c (get_features_xml): Check if target implemented
16241 arch_string.
16242 * win32-i386-low.c (win32_arch_string): New.
16243 (win32_target_ops): Add win32_arch_string as arch_string member.
16244
16245 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16246
16247 * spu-low.c (spu_arch_string): New.
16248 (spu_target_ops): Add spu_arch_string.
16249
16250 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16251
16252 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16253 * configure.ac: Do not check for terminal.h.
16254 * configure, config.in: Regenerated.
16255
16256 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16257
16258 * Makefile.in (OBS): Add $(XML_BUILTIN).
16259 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16260 (clean): Update.
16261 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16262 (arm-with-iwmmxt.c): New.
16263 * config.in, configure: Regenerate.
16264 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16265 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16266 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16267 (arm*-*-linux*): Add iWMMXt and regset support.
16268 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16269 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16270 (arm_store_wmmxregset, target_regsets): New.
16271 * server.c (get_features_xml): Take annex argument. Check builtin
16272 XML documents.
16273 (handle_query): Handle multiple annexes.
16274
16275 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16276
16277 * remote-utils.c [USE_WIN32API] (read, write): Define.
16278 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16279 write.
16280
16281 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16282
16283 * linux-i386-low.c (the_low_target): Set arch_string.
16284 * linux-x86-64-low.c (the_low_target): Likewise.
16285 * linux-low.c (linux_arch_string): New.
16286 (linux_target_ops): Add it.
16287 * linux-low.h (struct linux_target_ops): Add arch_string.
16288 * server.c (write_qxfer_response): Use const void * for DATA.
16289 (get_features_xml): New.
16290 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16291 * target.h (struct target_ops): Add arch_string method.
16292
16293 2007-01-03 Denis Pilat <denis.pilat@st.com>
16294 Daniel Jacobowitz <dan@codesourcery.com>
16295
16296 * linux-low.c (linux_kill): Handle being called with no threads.
16297 * win32-i386-low.c (win32_kill): Likewise.
16298 (get_child_debug_event): Clear current_process_handle.
16299
16300 2006-12-30 Denis PILAT <denis.pilat@st.com>
16301 Daniel Jacobowitz <dan@codesourcery.com>
16302
16303 * remote-utils.c (remote_open): Check the type of specified
16304 serial port devices before opening them.
16305 * server.c (main): Kill the inferior if an error occurs during
16306 the first remote_open.
16307
16308 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16309
16310 * README: Update supported targets.
16311
16312 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16313
16314 * Makefile.in (clean): Remove reg-mips64.c.
16315 (reg-mips64.c, reg-mips64.o): New rules.
16316 * configure.srv: Handle mips64. Include regset support for mips.
16317 * linux-mips-low.c (union mips_register): New.
16318 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16319 (mips_breakpoint, mips_breakpoint_at): Use int.
16320 (mips_collect_register, mips_supply_register)
16321 (mips_collect_register_32bit, mips_supply_register_32bit)
16322 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16323 (mips_store_fpregset, target_regsets): New.
16324 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16325
16326 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16327
16328 * configure.srv: Add target "spu*-*-*".
16329 * Makefile.in (clean): Remove reg-spu.c.
16330 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16331 * spu-low.c: New file.
16332
16333 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16334
16335 * configure.ac: Correct td_thr_tls_get_addr test.
16336 * configure: Regenerated.
16337
16338 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16339
16340 * linux-low.c (linux_wait_for_event): Reformat. Use the
16341 pass_signals array.
16342 * remote-utils.c (decode_address_to_semicolon): New.
16343 * server.c (pass_signals, handle_general_set): New.
16344 (handle_query): Mention QPassSignals for qSupported.
16345 (main): Call handle_general_set.
16346 * server.h (pass_signals, decode_address_to_semicolon): New.
16347
16348 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16349
16350 * server.c (handle_query): Correct error handling for read_auxv.
16351
16352 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16353
16354 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16355 and srv_linux_thread_db to yes.
16356 * linux-s390-low.c (s390_fill_gregset): New function.
16357 (target_regsets): Define data structure.
16358
16359 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16360
16361 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16362 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16363 * config.in, configure: Regenerated.
16364 * inferiors.c (gdb_id_to_thread): New function.
16365 (gdb_id_to_thread_id): Use it.
16366 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16367 * linux-low.h (struct process_info): Add th member.
16368 (thread_db_get_tls_address): New prototype.
16369 * remote-utils.c (decode_address): Make non-static.
16370 * server.c (handle_query): Handle qGetTLSAddr.
16371 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16372 * target.h (struct target_ops): Add get_tls_address.
16373 * thread-db.c (maybe_attach_thread): Save the thread handle.
16374 (thread_db_get_tls_address): New.
16375
16376 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16377
16378 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16379 (linux_resume_one_process): Take a siginfo_t *. Update all
16380 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16381 (struct pending_signals): Add a siginfo_t.
16382 (linux_wait_for_process): Always set last_status.
16383 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16384 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16385 * linux-low.h (struct process_info): Add last_status.
16386
16387 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16388
16389 * remote-utils.c (try_rle): New function.
16390 (putpkt_binary): Use it.
16391
16392 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16393
16394 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16395 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16396 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16397 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16398 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16399 point registers.
16400
16401 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16402
16403 * server.c (terminal_fd): New variable.
16404 (old_foreground_pgrp): Likewise.
16405 (restore_old_foreground_pgrp): New function.
16406 (start_inferior): Record the terminal file descriptor in terminal_fd
16407 and its original foreground group in old_foreground_pgrp. Register
16408 restore_old_foreground_pgrp with atexit().
16409
16410 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16411
16412 * server.c (handle_query): Correct qPart to qXfer.
16413
16414 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16415
16416 * configure.ac: Check for more headers which are missing on
16417 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16418 * configure.srv: Add Cygwin and mingw32.
16419 * remote-utils.c: Don't include headers unconditionally which
16420 are missing on mingw32. Include <winsock.h> for mingw32.
16421 (remote_open): Adjust for mingw32 support. Flush
16422 standard error after writing to it.
16423 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16424 (unblock_async_io, enable_async_io, disable_async_io)
16425 (readchar, getpkt): Update for Winsock support.
16426 (prepare_resume_reply): Expect a protocol signal number.
16427 * server.c: Disable <sys/wait.h> on mingw32.
16428 (start_inferior): Adjust for mingw32 support. Flush
16429 standard error after writing to it.
16430 (attach_inferior): Likewise. Use protocol signal
16431 numbers.
16432 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16433 and names.
16434 * win32-i386-low.c: New file.
16435 * Makefile.in (XM_CLIBS): Set.
16436 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16437 (win32-i386-low.o): New dependency rule.
16438 * linux-low.c (linux_wait): Use target signal numbers.
16439 * target.h (struct target_ops): Doc fix.
16440 * server.h (target_signal_to_name): New prototype.
16441 * gdbreplay.c: Don't include headers unconditionally which
16442 are missing on mingw32. Include <winsock.h> for mingw32.
16443 (remote_close, remote_open): Adjust for Winsock support.
16444 * configure, config.in: Regenerated.
16445
16446 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16447
16448 * server.c (decode_xfer_read, write_qxfer_response): New.
16449 (handle_query): Take a packet length argument. Handle
16450 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16451 the qSupported response.
16452 (main): Update call to handle_query.
16453
16454 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16455
16456 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16457 (putpkt_binary): Renamed from putpkt and adjusted for binary
16458 data.
16459 (putpkt): New wrapper for putpkt_binary.
16460 (readchar): Don't mask off the high bit.
16461 (decode_X_packet): New function.
16462 * server.c (main): Call putpkt_binary if a handler sets the packet
16463 length. Save the length of the incoming packet. Handle 'X'.
16464 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16465
16466 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16467
16468 * server.c (handle_query): Handle qSupported.
16469
16470 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16471
16472 * remote-utils.c (all_symbols_looked_up): New variable.
16473 (look_up_one_symbol): Check it.
16474 * server.h (look_up_one_symbol): New declaration.
16475 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16476
16477 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16478
16479 * Makefile.in (linux-arm-low.o): Update dependencies.
16480 * linux-arm-low.c: Include "gdb_proc_service.h".
16481 (PTRACE_GET_THREAD_AREA): Define.
16482 (ps_get_thread_area): New function.
16483
16484 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16485
16486 * configure.srv (m68k*-*-uclinux*): New target.
16487 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16488 (linux_resume_one_process): Remove extraneous cast.
16489 (linux_read_offsets): New.
16490 (linux_target_op): Add linux_read_offsets on mmuless systems.
16491 * server.c (handle_query): Add qOffsets logic.
16492 * target.h (struct target_ops): Add read_offsets.
16493
16494 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16495
16496 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16497 (PTRACE_GET_THREAD_AREA): Define.
16498 (ps_get_thread_area): New function.
16499 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16500 (linux-x86-64-low.o): Update.
16501
16502 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16503
16504 * configure.ac: Remove checks for prfpregset_t.
16505 * gdb_proc_service.h: New file.
16506 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16507 new "gdb_proc_service.h".
16508 * proc-service.c: Likewise.
16509 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16510 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16511 * Makefile.in (gdb_proc_service_h): Updated.
16512 * configure, config.in: Regenerated.
16513
16514 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16515
16516 * remote-utils.c (prepare_resume_reply): Move declaration
16517 of gdb_id_from_wait to the top of the block.
16518
16519 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16520
16521 * linux-low.c (regsets_store_inferior_registers): Read the regset
16522 from the target before filling it.
16523
16524 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16525
16526 * server.c (attach_inferior): Return SIGTRAP for a successful
16527 attach.
16528
16529 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16530
16531 * Makefile.in (OBS): Add version.o.
16532 (STAGESTUFF): Delete.
16533 (version.o): Add dependencies.
16534 (version.c): Replace rule.
16535 (clean): Remove version.c.
16536 * server.c (gdbserver_version): New.
16537 (gdbserver_usage): Use printf.
16538 (main): Handle --version and --help.
16539 * server.h (version, host_name): Add declarations.
16540
16541 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16542
16543 * linux-arm-low.c:
16544 * linux-arm-low.c:
16545 * inferiors.c:
16546 * i387-fp.h:
16547 * i387-fp.c:
16548 * gdbreplay.c:
16549 * regcache.c:
16550 * proc-service.c:
16551 * mem-break.h:
16552 * mem-break.c:
16553 * linux-x86-64-low.c:
16554 * linux-sh-low.c:
16555 * linux-s390-low.c:
16556 * linux-ppc64-low.c:
16557 * linux-ppc-low.c:
16558 * linux-mips-low.c:
16559 * linux-m68k-low.c:
16560 * linux-m32r-low.c:
16561 * linux-low.h:
16562 * linux-low.c:
16563 * linux-ia64-low.c:
16564 * linux-i386-low.c:
16565 * linux-crisv32-low.c:
16566 * thread-db.c:
16567 * terminal.h:
16568 * target.h:
16569 * target.c:
16570 * server.h:
16571 * server.c:
16572 * remote-utils.c:
16573 * regcache.h:
16574 * utils.c:
16575 * Makefile.in:
16576 * configure.ac:
16577 * gdbserver.1: Add (C) after Copyright. Update the FSF
16578 address.
16579
16580 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16581
16582 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16583 (arm_breakpoint_at): Recognize both breakpoints.
16584 (the_low_target): Use the correct breakpoint instruction.
16585
16586 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16587
16588 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16589 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16590 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16591 (the_low_target): Update.
16592
16593 2005-10-25 Andreas Schwab <schwab@suse.de>
16594
16595 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16596
16597 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16598 (ia64_num_regs): Reduce to 462.
16599
16600 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16601
16602 * acinclude.m4: Correct quoting.
16603 * aclocal.m4: Regenerated.
16604
16605 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16606 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16607 (thread_db_init): Call thread_db_err_str.
16608 * configure.ac: Check for TD_VERSION.
16609 * config.in, configure: Regenerated.
16610
16611 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16612
16613 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16614
16615 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16616
16617 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16618 is not available. Define HAVE_PTRACE_GETREGS if it is.
16619 * config.in, configure: Regenerated.
16620 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16621 * linux-i386-low.c, linux-m68k-low.c: Update to use
16622 HAVE_PTRACE_GETREGS.
16623 * linux-low.c (regsets_fetch_inferior_registers)
16624 (regsets_store_inferior_registers): Only return 0 if we processed
16625 GENERAL_REGS.
16626 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16627 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16628
16629 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16630
16631 * inferiors.c (struct thread_info): Add gdb_id.
16632 (add_thread): Add gdb_id argument.
16633 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16634 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16635 calls to add_thread.
16636 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16637 * server.c (handle_query): Use thread_to_gdb_id.
16638 (handle_v_cont, main): Use gdb_id_to_thread_id.
16639 * server.h (add_thread): Update prototype.
16640 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16641 prototypes.
16642
16643 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16644
16645 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16646 left-padded registers.
16647 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16648 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16649
16650 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16651
16652 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16653 * configure: Regenerate.
16654 * config.in: Regenerate.
16655 * server.h (NEED_DECLARATION_STRERROR):
16656 Replace with !HAVE_DECL_STRERROR.
16657
16658 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16659
16660 * linux-low.c (linux_wait, linux_send_signal): Don't test
16661 an unsigned long variable for > 0 if it could be MAX_ULONG.
16662 * server.c (myresume): Likewise.
16663 * target.c (set_desired_inferior): Likewise.
16664
16665 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16666
16667 * configure.ac: Simplify and improve check for socklen_t.
16668 * configure, config.in: Regenerate.
16669
16670 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16671
16672 * acconfig.h: Remove.
16673 * configure.ac: Add a test for socklen_t. Use three-argument
16674 AC_DEFINE throughout.
16675 * config.in: Regenerated using autoheader 2.59.
16676 * configure: Regenerated.
16677
16678 * gdbreplay.c (socklen_t): Provide a default.
16679 (remote_open): Use socklen_t.
16680 * remote-utils.c (socklen_t): Provide a default.
16681 (remote_open): Use socklen_t.
16682 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16683 unsigned char.
16684
16685 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16686 char for buffers.
16687 * linux-low.c (linux_read_memory, linux_write_memory)
16688 (linux_read_auxv): Likewise.
16689 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16690 (check_mem_write): Likewise.
16691 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16692 Likewise.
16693 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16694 (registers_from_string, register_data): Likewise.
16695 * server.c (handle_query, main): Likewise.
16696 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16697 (decode_M_packet): Likewise.
16698 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16699 * target.h (struct target_ops): Update read_memory, write_memory,
16700 and read_auxv.
16701 (read_inferior_memory, write_inferior_memory): Update.
16702 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16703 to unsigned char *.
16704 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16705 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16706 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16707 linux-s390-low.c, linux-sh-low.c: Update for changes in
16708 read_inferior_memory and the_low_target->breakpoint.
16709
16710 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16711
16712 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16713 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16714 * configure.srv: Add powerpc64-*-linux*.
16715 * linux-ppc64-low.c: New file.
16716
16717 2005-05-23 Orjan Friberg <orjanf@axis.com>
16718
16719 * linux-cris-low.c: New file with support for CRIS.
16720 * linux-crisv32-low.c: Ditto for CRISv32.
16721 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16722 (clean): Add reg-cris.c and reg-crisv32.c.
16723 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16724 reg-crisv32.o, and reg-crisv32.c to make rules.
16725 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16726 recognized targets.
16727
16728 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16729
16730 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16731 of sizeof (PTRACE_XFER_TYPE).
16732 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16733
16734 2005-05-12 Orjan Friberg <orjanf@axis.com>
16735
16736 * target.h (struct target_ops): Add insert_watchpoint,
16737 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16738 pointers for hardware watchpoint support.
16739 * linux-low.h (struct linux_target_ops): Ditto.
16740 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16741 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16742 to linux_target_ops.
16743 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16744 reply packet.
16745 * server.c (main): Recognize 'Z' and 'z' packets.
16746
16747 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16748
16749 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16750 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16751 (the_low_target): Add new members.
16752
16753 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16754
16755 * proc-service.c (ps_lgetregs): Search all_processes instead of
16756 all_threads.
16757
16758 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16759
16760 * server.c (start_inferior): Change return type to int.
16761 (attach_inferior): Change sigptr to int *.
16762 (handle_v_cont, handle_v_requests): Change signal to int *.
16763 (main): Change signal to int.
16764
16765 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16766
16767 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16768 * configure.srv: Add m32r*-*-linux*.
16769 * linux-m32r-low.c: New file.
16770
16771 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16772
16773 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16774
16775 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16776
16777 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16778 Take unsigned long arguments for PIDs.
16779 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16780 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16781 (wait_for_sigstop, linux_resume_one_process)
16782 (regsets_fetch_inferior_registers, linux_send_signal)
16783 (linux_read_auxv): Likewise. Update the types of variables holding
16784 PIDs. Update format string specifiers.
16785 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16786 * remote-utils.c (prepare_resume_reply): Likewise.
16787 * server.c (cont_thread, general_thread, step_thread)
16788 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16789 unsigned long.
16790 (handle_query): Update format specifiers.
16791 (handle_v_cont, main): Use strtoul for thread IDs.
16792 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16793 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16794 (general_thread, step_thread, thread_from_wait)
16795 (old_thread_from_wait): Update.
16796 * target.h (struct thread_resume): Use unsigned long for THREAD.
16797 (struct target_ops): Use unsigned long for arguments to attach and
16798 thread_alive.
16799
16800 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16801
16802 * acinclude.m4: Include bfd/bfd.m4 directly.
16803 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16804 <agriffis@toolchain.org>.
16805 * aclocal.m4, configure: Regenerated.
16806
16807 2005-01-07 Andrew Cagney <cagney@gnu.org>
16808
16809 * configure.ac: Rename configure.in, require autoconf 2.59.
16810 * configure: Re-generate.
16811
16812 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16813
16814 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16815 LIBS when finished.
16816 * aclocal.m4: Regenerated.
16817 * configure: Regenerated.
16818
16819 2004-11-21 Andreas Schwab <schwab@suse.de>
16820
16821 * linux-m68k-low.c (m68k_num_gregs): Define.
16822 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16823 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16824 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16825 (m68k_breakpoint_at): New. Add to the_low_target.
16826
16827 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16828 srv_linux_thread_db to yes.
16829
16830 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16831
16832 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16833 (ARCH_SET_FS): Likewise.
16834 (ARCH_GET_FS): Likewise.
16835 (ARCH_GET_GS): Likewise.
16836
16837 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16838
16839 * linux-i386-low.c (ps_get_thread_area): New.
16840 * linux-x86-64-low.c (ps_get_thread_area): New.
16841 * linux-low.c: Include <sys/syscall.h>.
16842 (linux_kill_one_process): Don't kill the first thread here.
16843 (linux_kill): Kill the first thread here.
16844 (kill_lwp): New function.
16845 (send_sigstop, linux_send_signal): Use it.
16846 * proc-service.c: Clean up #ifdefs.
16847 (fpregset_info): Delete.
16848 (ps_lgetregs): Update and enable implementation.
16849 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16850 implementations.
16851 * remote-utils.c (struct sym_cache, symbol_cache): New.
16852 (input_interrupt): Print a clearer message.
16853 (async_io_enabled): New variable.
16854 (enable_async_io, disable_async_io): Use it. Update comments.
16855 (look_up_one_symbol): Use the symbol cache.
16856 * thread-db.c (thread_db_look_up_symbols): New function.
16857 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16858
16859 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16860
16861 * configure.in: Test for -rdynamic.
16862 * configure: Regenerated.
16863 * Makefile (INTERNAL_LDFLAGS): New.
16864 (gdbserver, gdbreplay): Use it.
16865
16866 2004-09-02 Andrew Cagney <cagney@gnu.org>
16867
16868 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16869
16870 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16871
16872 * linux-low.c (linux_wait): Clear all_processes list also.
16873
16874 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16875
16876 * linux-low.c: Include <errno.h>. Remove extern declaration of
16877 errno.
16878
16879 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16880
16881 * gdbreplay.c, server.h, utils.c: Update copyright years.
16882
16883 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16884
16885 * server.c (main): Print child status or termination signal from
16886 variable 'signal', not 'sig'.
16887
16888 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16889
16890 * linux-low.c (linux_read_memory): Change return type to
16891 int. Check for and return error from ptrace().
16892 * target.c (read_inferior_memory): Change return type to int. Pass
16893 back return status from the_target->read_memory().
16894 * target.h (struct target_ops): Adapt *read_memory() prototype.
16895 Update comment.
16896 (read_inferior_memory): Adapt prototype.
16897 * server.c (main): Return an error packet if
16898 read_inferior_memory() returns an error.
16899
16900 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16901
16902 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16903 Unify with other clean targets.
16904
16905 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16906
16907 * server.c (handle_v_cont): Call set_desired_inferior.
16908
16909 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16910
16911 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16912
16913 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16914
16915 * linux-low.c (linux_wait): Unblock async I/O.
16916 (linux_resume): Block and enable async I/O.
16917 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16918 * server.h (block_async_io, unblock_async_io): Add prototypes.
16919
16920 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16921
16922 * remote-utils.c (remote_open): Print a status notice after
16923 opening a TCP port.
16924 * server.c (attach_inferior): Print a status notice after
16925 attaching.
16926
16927 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16928
16929 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16930
16931 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16932
16933 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16934 error packet.
16935 * server.c, target.h: Update copyright years.
16936
16937 2004-02-25 Roland McGrath <roland@redhat.com>
16938
16939 * target.h (struct target_ops): New member `read_auxv'.
16940 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16941 * linux-low.c (linux_read_auxv): New function.
16942 (linux_target_ops): Initialize `read_auxv' member to that.
16943
16944 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16945
16946 Committed by Jim Blandy <jimb@redhat.com>.
16947
16948 * linux-s390-low.c (s390_num_regs): Update.
16949 (s390_regmap): Remove control registers. Use __s390x__ predefine
16950 instead of GPR_SIZE to distiguish s390 and s390x targets.
16951
16952 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16953
16954 * linux-low.c: Update copyright year.
16955 (check_removed_breakpoint): Clear pending_is_breakpoint.
16956 (linux_set_resume_request, linux_queue_one_thread)
16957 (resume_status_pending_p): New functions.
16958 (linux_continue_one_thread): Use process->resume.
16959 (linux_resume): Only resume threads if there are no pending events.
16960 * linux-low.h (struct process_info): Add resume request
16961 pointer.
16962
16963 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16964
16965 * regcache.c (new_register_cache): Clear the allocated register
16966 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16967
16968 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16969
16970 * linux-low.c (linux_resume): Take a struct thread_resume *
16971 argument.
16972 (linux_wait): Update call.
16973 (resume_ptr): New static variable.
16974 (linux_continue_one_thread): Renamed from
16975 linux_continue_one_process. Use resume_ptr.
16976 (linux_resume): Use linux_continue_one_thread.
16977 * server.c (handle_v_cont, handle_v_requests): New functions.
16978 (myresume): New function.
16979 (main): Handle 'v' case.
16980 * target.h (struct thread_resume): New type.
16981 (struct target_ops): Change argument of "resume" to struct
16982 thread_resume *.
16983 (myresume): Delete macro.
16984
16985 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16986
16987 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16988 (uninstall): Support DESTDIR.
16989
16990 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16991
16992 * configure.srv: Add xscale*linux copy of arm*linux entry.
16993
16994 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16995
16996 * linux-arm-low.c (arm_reinsert_addr): New function.
16997 (the_low_target): Add arm_reinsert_addr.
16998
16999 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17000
17001 * mem-break.c: Remove whitespace at end of file.
17002
17003 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17004
17005 * configure.in: Check whether we need to prototype strerror.
17006 * server.h: Optionally prototype strerror.
17007 * gdbreplay.c (perror_with_name): Use strerror.
17008 * linux-low.c (linux_attach_lwp): Use strerror.
17009 * utils.c (perror_with_name): Use strerror.
17010 * config.in, configure: Regenerated.
17011
17012 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17013
17014 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17015 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17016
17017 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17018
17019 * Makefile.in (SFILES): Update.
17020 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17021 low-sun3.c: Remove files.
17022
17023 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17024
17025 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17026 (linux_detach_one_process, linux_detach): New functions.
17027 (linux_target_ops): Add linux_detach.
17028 * server.c (main): Handle 'D' packet.
17029 * target.h (struct target_ops): Add "detach" member.
17030 (detach_inferior): Define.
17031
17032 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17033
17034 From Kelley Cook <kelleycook@wideopenwest.com>:
17035 * configure.srv: Accept i[34567]86 variants.
17036
17037 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17038
17039 * linux-low.c (linux_wait_for_event): Correct comment typos.
17040 (linux_resume_one_process): Call check_removed_breakpoint.
17041 (linux_send_signal): New function.
17042 (linux_target_ops): Add linux_send_signal.
17043 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17044 of kill.
17045 * target.h (struct target_ops): Add send_signal.
17046
17047 2003-05-29 Jim Blandy <jimb@redhat.com>
17048
17049 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17050 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17051 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17052 away part of the register's value.
17053
17054 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17055
17056 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17057 (linux_wait_for_event, linux_init_signals): Likewise.
17058
17059 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17060
17061 * configure.in: Check for stdlib.h.
17062 * configure: Regenerated.
17063 * config.in: Regenerated.
17064
17065 2003-01-04 Andreas Schwab <schwab@suse.de>
17066
17067 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17068
17069 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17070
17071 * Makefile.in: Remove obsolete code.
17072
17073 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17074
17075 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17076 defined(PT_FPR0_HI).
17077
17078 2002-11-17 Stuart Hughes <seh@zee2.com>
17079
17080 * linux-arm-low.c (arm_num_regs): Increase.
17081 (arm_regmap): Include status register.
17082
17083 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17084
17085 * linux-low.c (register_addr): Remove incorrect -1 check.
17086
17087 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17088
17089 * linux-low.c (linux_create_inferior): Call setpgid. Return
17090 the new PID.
17091 (unstopped_p, linux_signal_pid): Remove.
17092 (linux_target_ops): Remove linux_signal_pid.
17093 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17094 global instead of target method.
17095 * target.h (struct target_ops): Remove signal_pid. Update comment
17096 for create_inferior.
17097 * server.c (signal_pid): New variable.
17098 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17099 gdbserver. Set the child to be the foreground process group.
17100 (attach_inferior): Set signal_pid.
17101
17102 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17103
17104 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17105
17106 2002-08-20 Jim Blandy <jimb@redhat.com>
17107
17108 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17109 default for this.
17110
17111 2002-08-01 Andrew Cagney <cagney@redhat.com>
17112
17113 * Makefile.in: Make chill references obsolete.
17114
17115 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17116
17117 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17118 * configure: Regenerate.
17119 * config.in: Regenerate.
17120
17121 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17122
17123 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17124 (perror_with_name, remote_close, remote_open, expect, play): Static.
17125
17126 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17127
17128 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17129 byte offsets instead of an array of indexes.
17130 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17131
17132 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17133
17134 * regcache.c: Add comment.
17135
17136 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17137
17138 * thread-db.c: New file.
17139 * proc-service.c: New file.
17140 * acinclude.m4: New file.
17141 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17142 proc-service.o, and thread-db.o.
17143 (linux-low.o): Add USE_THREAD_DB.
17144 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17145 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17146 * aclocal.m4: Regenerated.
17147 * config.in: Regenerated.
17148 * configure: Regenerated.
17149 * configure.in: Check for proc_service.h, sys/procfs.h,
17150 thread_db.h, and linux/elf.h headrs.
17151 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17152 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17153 Check for -lthread_db and thread support.
17154 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17155 PowerPC, and SuperH.
17156 * i387-fp.c: Constify arguments.
17157 * i387-fp.h: Likewise.
17158 * inferiors.c: (struct thread_info): Renamed from
17159 `struct inferior_info'. Remove PID member. Use generic inferior
17160 list header. All uses updated.
17161 (inferiors, signal_pid): Removed.
17162 (all_threads): New variable.
17163 (get_thread): Define.
17164 (add_inferior_to_list): New function.
17165 (for_each_inferior): New function.
17166 (change_inferior_id): New function.
17167 (add_inferior): Removed.
17168 (remove_inferior): New function.
17169 (add_thread): New function.
17170 (free_one_thread): New function.
17171 (remove_thread): New function.
17172 (clear_inferiors): Use for_each_inferior and free_one_thread.
17173 (find_inferior): New function.
17174 (find_inferior_id): New function.
17175 (inferior_target_data): Update argument type.
17176 (set_inferior_target_data): Likewise.
17177 (inferior_regcache_data): Likewise.
17178 (set_inferior_regcache_data): Likewise.
17179 * linux-low.c (linux_bp_reinsert): Remove.
17180 (all_processes, stopping_threads, using_thrads)
17181 (struct pending_signals, debug_threads, pid_of): New.
17182 (inferior_pid): Replace with macro.
17183 (struct inferior_linux_data): Remove.
17184 (get_stop_pc, add_process): New functions.
17185 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17186 Use add_process and add_thread.
17187 (linux_attach_lwp): New function, based on old linux_attach. Use
17188 add_process and add_thread. Set stop_expected for new threads.
17189 (linux_attach): New function.
17190 (linux_kill_one_process): New function.
17191 (linux_kill): Kill all LWPs.
17192 (linux_thread_alive): Use find_inferior_id.
17193 (check_removed_breakpoints, status_pending_p): New functions.
17194 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17195 Update. Use WNOHANG. Wait for cloned processes also. Update process
17196 struct for the found process.
17197 (linux_wait_for_event): New function.
17198 (linux_wait): Use it. Support LWPs.
17199 (send_sigstop, wait_for_sigstop, stop_all_processes)
17200 (linux_resume_one_process, linux_continue_one_process): New functions.
17201 (linux_resume): Support LWPs.
17202 (REGISTER_RAW_SIZE): Remove.
17203 (fetch_register): Use register_size instead. Call supply_register.
17204 (usr_store_inferior_registers): Likewise. Call collect_register.
17205 Fix recursive case.
17206 (regsets_fetch_inferior_registers): Improve error message.
17207 (regsets_store_inferior_registers): Add debugging.
17208 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17209 (unstopped_p, linux_signal_pid): New functions.
17210 (linux_target_ops): Add linux_signal_pid.
17211 (linux_init_signals): New function.
17212 (initialize_low): Call it. Initialize using_threads.
17213 * regcache.c (inferior_regcache_data): Add valid
17214 flag.
17215 (get_regcache): Fetch registers lazily. Add fetch argument
17216 and update all callers.
17217 (regcache_invalidate_one, regcache_invalidate): New
17218 functions.
17219 (new_register_cache): Renamed from create_register_cache.
17220 Return the new regcache.
17221 (free_register_cache): Change argument to a void *.
17222 (registers_to_string, registers_from_string): Call get_regcache
17223 with fetch flag set.
17224 (register_data): Make static. Pass fetch flag to get_regcache.
17225 (supply_register): Call get_regcache with fetch flag clear.
17226 (collect_register): Call get_regcache with fetch flag set.
17227 (collect_register_as_string): New function.
17228 * regcache.h: Update.
17229 * remote-utils.c (putpkt): Flush after debug output and use
17230 stderr.
17231 Handle input interrupts while waiting for an ACK.
17232 (input_interrupt): Use signal_pid method.
17233 (getpkt): Flush after debug output and use stderr.
17234 (outreg): Use collect_register_as_string.
17235 (new_thread_notify, dead_thread_notify): New functions.
17236 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17237 and general_thread.
17238 (look_up_one_symbol): Flush after debug output.
17239 * server.c (step_thread, server_waiting): New variables.
17240 (start_inferior): Don't use signal_pid. Update call to mywait.
17241 (attach_inferior): Update call to mywait.
17242 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17243 (main): Don't fetch/store registers explicitly. Use
17244 set_desired_inferior. Support proposed ``Hs'' packet. Update
17245 calls to mywait.
17246 * server.h: Update.
17247 (struct inferior_list, struct_inferior_list_entry): New.
17248 * target.c (set_desired_inferior): New.
17249 (write_inferior_memory): Constify.
17250 (mywait): New function.
17251 * target.h: Update.
17252 (struct target_ops): New signal_pid method.
17253 (mywait): Removed macro, added prototype.
17254
17255 * linux-low.h (regset_func): Removed.
17256 (regset_fill_func, regset_store_func): New.
17257 (enum regset_type): New.
17258 (struct regset_info): Add type field. Use new operation types.
17259 (struct linux_target_ops): stop_pc renamed to get_pc.
17260 Add decr_pc_after_break and breakpoint_at.
17261 (get_process, get_thread_proess, get_process_thread)
17262 (strut process_info, all_processes, linux_attach_lwp)
17263 (thread_db_init): New.
17264
17265 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17266 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17267 (the_low_target): Add new members.
17268 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17269 (i386_store_fpxregset): Constify.
17270 (target_regsets): Add new kind identifier.
17271 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17272 (i386_set_pc): Add debugging.
17273 (i386_breakpoint_at): New function.
17274 (the_low_target): Add new members.
17275 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17276 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17277 (mips_breakpoint_at): New.
17278 (the_low_target): Add new members.
17279 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17280 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17281 (the_low_target): Add new members.
17282 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17283 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17284 (the_low_target): Add new members.
17285 * linux-x86-64-low.c (target_regsets): Add new kind
17286 identifier.
17287
17288 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17289
17290 From Martin Pool <mbp@samba.org>:
17291 * server.c (gdbserver_usage): New function.
17292 (main): Call it.
17293
17294 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17295
17296 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17297 stop_at -> stop_pc.
17298
17299 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17300
17301 * Makefile.in: Remove obsolete code.
17302
17303 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17304
17305 * linux-low.c (regsets_fetch_inferior_registers),
17306 (regsets_store_inferior_registers): Removed cast to int from
17307 ptrace() calls.
17308 * regcache.h: Added declaration of struct inferior_info.
17309
17310 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17311
17312 * inferiors.c (struct inferior_info): Add regcache_data.
17313 (add_inferior): Call create_register_cache.
17314 (clear_inferiors): Call free_register_cache.
17315 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17316 * regcache.c (struct inferior_regcache_data): New.
17317 (registers): Remove.
17318 (get_regcache): New function.
17319 (create_register_cache, free_register_cache): New functions.
17320 (set_register_cache): Don't initialize the register cache here.
17321 (registers_to_string, registers_from_string, register_data): Call
17322 get_regcache.
17323 * regcache.h: Add prototypes.
17324 * server.h: Likewise.
17325
17326 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17327
17328 * mem-break.c: New file.
17329 * mem-break.h: New file.
17330 * Makefile.in: Add mem-break.o rule; update server.h
17331 dependencies.
17332 * inferiors.c (struct inferior_info): Add target_data
17333 member.
17334 (clear_inferiors): Free target_data member if set.
17335 (inferior_target_data, set_inferior_target_data): New functions.
17336 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17337 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17338 * linux-low.c (linux_bp_reinsert): New variable.
17339 (struct inferior_linux_data): New.
17340 (linux_create_inferior): Use set_inferior_target_data.
17341 (linux_attach): Likewise. Call add_inferior.
17342 (linux_wait_for_one_inferior): New function.
17343 (linux_wait): Call it.
17344 (linux_write_memory): Add const.
17345 (initialize_low): Call set_breakpoint_data.
17346 * linux-low.h (struct linux_target_ops): Add breakpoint
17347 handling members.
17348 * server.c (attach_inferior): Remove extra add_inferior
17349 call.
17350 * server.h: Include mem-break.h. Update inferior.c
17351 prototypes.
17352 * target.c (read_inferior_memory)
17353 (write_inferior_memory): New functions.
17354 * target.h (read_inferior_memory)
17355 (write_inferior_memory): Change macros to prototypes.
17356 (struct target_ops): Update comments. Add const to write_memory
17357 definition.
17358
17359 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17360
17361 * linux-low.c (usr_store_inferior_registers): Support
17362 registers which are allowed to fail to store.
17363 * linux-low.h (linux_target_ops): Likewise.
17364 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17365 (ppc_cannot_store_register): FPSCR may not be storable.
17366
17367 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17368
17369 * server.h: Include <string.h> if HAVE_STRING_H.
17370 * ChangeLog: Correct paths in last ChangeLog entry.
17371
17372 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17373
17374 * linux-low.h: Remove obsolete prototypes.
17375 (struct linux_target_ops): New.
17376 (extern the_low_target): New.
17377 * linux-low.c (num_regs, regmap): Remove declarations.
17378 (register_addr): Use the_low_target explicitly.
17379 (fetch_register): Likewise.
17380 (usr_fetch_inferior_registers): Likewise.
17381 (usr_store_inferior_registers): Likewise.
17382 * linux-arm-low.c (num_regs): Remove.
17383 (arm_num_regs): Define.
17384 (arm_regmap): Renamed from regmap, made static.
17385 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17386 made static.
17387 (arm_cannot_store_register): Renamed from cannot_store_register,
17388 made static.
17389 (the_low_target): New.
17390 * linux-i386-low.c (num_regs): Remove.
17391 (i386_num_regs): Define.
17392 (i386_regmap): Renamed from regmap, made static.
17393 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17394 made static.
17395 (i386_cannot_store_register): Renamed from cannot_store_register,
17396 made static.
17397 (the_low_target): New.
17398 * linux-ia64-low.c (num_regs): Remove.
17399 (ia64_num_regs): Define.
17400 (ia64_regmap): Renamed from regmap, made static.
17401 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17402 made static.
17403 (ia64_cannot_store_register): Renamed from cannot_store_register,
17404 made static.
17405 (the_low_target): New.
17406 * linux-m68k-low.c (num_regs): Remove.
17407 (m68k_num_regs): Define.
17408 (m68k_regmap): Renamed from regmap, made static.
17409 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17410 made static.
17411 (m68k_cannot_store_register): Renamed from cannot_store_register,
17412 made static.
17413 (the_low_target): New.
17414 * linux-mips-low.c (num_regs): Remove.
17415 (mips_num_regs): Define.
17416 (mips_regmap): Renamed from regmap, made static.
17417 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17418 made static.
17419 (mips_cannot_store_register): Renamed from cannot_store_register,
17420 made static.
17421 (the_low_target): New.
17422 * linux-ppc-low.c (num_regs): Remove.
17423 (ppc_num_regs): Define.
17424 (ppc_regmap): Renamed from regmap, made static.
17425 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17426 made static.
17427 (ppc_cannot_store_register): Renamed from cannot_store_register,
17428 made static.
17429 (the_low_target): New.
17430 * linux-s390-low.c (num_regs): Remove.
17431 (s390_num_regs): Define.
17432 (s390_regmap): Renamed from regmap, made static.
17433 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17434 made static.
17435 (s390_cannot_store_register): Renamed from cannot_store_register,
17436 made static.
17437 (the_low_target): New.
17438 * linux-sh-low.c (num_regs): Remove.
17439 (sh_num_regs): Define.
17440 (sh_regmap): Renamed from regmap, made static.
17441 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17442 made static.
17443 (sh_cannot_store_register): Renamed from cannot_store_register,
17444 made static.
17445 (the_low_target): New.
17446 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17447 (the_low_target): New.
17448
17449 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17450
17451 * Makefile.in: Add stamp-h target.
17452 * configure.in: Create stamp-h.
17453 * configure: Regenerated.
17454
17455 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17456
17457 * inferiors.c: New file.
17458 * target.c: New file.
17459 * target.h: New file.
17460 * Makefile.in: Add target.o and inferiors.o. Update
17461 dependencies.
17462 * linux-low.c (inferior_pid): New static variable,
17463 moved from server.c.
17464 (linux_create_inferior): Renamed from create_inferior.
17465 Call add_inferior. Return 0 on success instead of a PID.
17466 (linux_attach): Renamed from myattach.
17467 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17468 (linux_thread_alive): Renamed from mythread_alive.
17469 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17470 child dies.
17471 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17472 (regsets_store_inferior_registers): Correct error message.
17473 Add missing ``return 0''.
17474 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17475 (linux_store_registers): Renamed from store_inferior_registers.
17476 (linux_read_memory): Renamed from read_inferior_memory.
17477 (linux_write_memory): Renamed from write_inferior_memory.
17478 (linux_target_ops): New structure.
17479 (initialize_low): Call set_target_ops ().
17480 * remote-utils.c (unhexify): New function.
17481 (hexify): New function.
17482 (input_interrupt): Send signals to ``signal_pid''.
17483 * server.c (inferior_pid): Remove.
17484 (start_inferior): Update create_inferior call.
17485 (attach_inferior): Call add_inferior.
17486 (handle_query): New function.
17487 (main): Call handle_query for `q' packets.
17488 * server.h: Include "target.h". Remove obsolete prototypes.
17489 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17490
17491 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17492
17493 * Makefile.in: Add WARN_CFLAGS. Update configury
17494 dependencies.
17495 * configure.in: Check for <string.h>
17496 * configure: Regenerate.
17497 * config.in: Regenerate.
17498 * gdbreplay.c: Include needed system headers.
17499 (remote_open): Remove strchr prototype.
17500 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17501 * regcache.c (supply_register): Change buf argument to const void *.
17502 (supply_register_by_name): Likewise.
17503 (collect_register): Change buf argument to void *.
17504 (collect_register_by_name): Likewise.
17505 * regcache.h: Add missing prototypes.
17506 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17507 * server.c (handle_query): New function.
17508 (attached): New static variable, moved out of main.
17509 (main): Quiet longjmp clobber warnings.
17510 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17511 * utils.c (error): Remove NORETURN.
17512 (fatal): Likewise.
This page took 0.582655 seconds and 5 git commands to generate.