]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdb/testsuite: Prepare for DejaGnu 1.6.2
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d3a70e03
TT
12019-03-12 Tom Tromey <tromey@adacore.com>
2
3 * linux-low.c (iterate_over_lwps): Update.
4
37991b4f
TT
52019-03-06 Tom Tromey <tom@tromey.com>
6
7 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
8 (captured_main): Use SCOPE_EXIT.
9
45950eb6
SDJ
102019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
11
12 * configure.srv: Use '$enable_unittest' instead of '$development'
13 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
14 case.
15
43ac54fc
TT
162019-02-27 Tom Tromey <tromey@adacore.com>
17
18 * gdbreplay.c (logchar): Handle \r\n.
19
df0da8a2
AH
202019-02-07 Alan Hayward <alan.hayward@arm.com>
21
22 * linux-low.c (linux_attach): Add process before lwp.
23 * server.c (attach_inferior): Check if already attached.
24
1a5c2598
TT
252019-02-07 Tom Tromey <tom@tromey.com>
26
27 * x86-tdesc.h: Rename include guard.
28 * x86-low.h: Add include guard.
29 * wincecompat.h: Rename include guard.
30 * win32-low.h: Add include guard.
31 * utils.h: Rename include guard.
32 * tracepoint.h: Rename include guard.
33 * tdesc.h: Rename include guard.
34 * target.h: Rename include guard.
35 * server.h: Rename include guard.
36 * remote-utils.h: Rename include guard.
37 * regcache.h: Rename include guard.
38 * nto-low.h: Rename include guard.
39 * notif.h: Add include guard.
40 * mem-break.h: Rename include guard.
41 * lynx-low.h: Add include guard.
42 * linux-x86-tdesc.h: Add include guard.
43 * linux-s390-tdesc.h: Add include guard.
44 * linux-ppc-tdesc-init.h: Add include guard.
45 * linux-low.h: Add include guard.
46 * linux-aarch64-tdesc.h: Add include guard.
47 * linux-aarch32-low.h: Add include guard.
48 * inferiors.h: Rename include guard.
49 * i387-fp.h: Rename include guard.
50 * hostio.h: Rename include guard.
51 * gdbthread.h: Rename include guard.
52 * gdb_proc_service.h: Rename include guard.
53 * event-loop.h: Rename include guard.
54 * dll.h: Rename include guard.
55 * debug.h: Rename include guard.
56 * ax.h: Rename include guard.
57
956cc47c
SN
582018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
59
60 PR gdb/23985
61 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
62 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
63
a0707f3c
TT
642019-01-25 Tom Tromey <tom@tromey.com>
65
66 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
67
0747795c
TT
682019-01-25 Tom Tromey <tom@tromey.com>
69
70 * win32-low.c: Fix common/ includes.
71 * win32-i386-low.c: Fix common/ includes.
72 * tracepoint.c: Fix common/ includes.
73 * thread-db.c: Fix common/ includes.
74 * target.h: Fix common/ includes.
75 * symbol.c: Fix common/ includes.
76 * spu-low.c: Fix common/ includes.
77 * server.h: Fix common/ includes.
78 * server.c: Fix common/ includes.
79 * remote-utils.c: Fix common/ includes.
80 * regcache.h: Fix common/ includes.
81 * regcache.c: Fix common/ includes.
82 * nto-x86-low.c: Fix common/ includes.
83 * notif.h: Fix common/ includes.
84 * mem-break.h: Fix common/ includes.
85 * lynx-low.c: Fix common/ includes.
86 * lynx-i386-low.c: Fix common/ includes.
87 * linux-x86-tdesc-selftest.c: Fix common/ includes.
88 * linux-x86-low.c: Fix common/ includes.
89 * linux-low.c: Fix common/ includes.
90 * inferiors.h: Fix common/ includes.
91 * i387-fp.c: Fix common/ includes.
92 * hostio.c: Fix common/ includes.
93 * hostio-errno.c: Fix common/ includes.
94 * gdbthread.h: Fix common/ includes.
95 * gdbreplay.c: Fix common/ includes.
96 * fork-child.c: Fix common/ includes.
97 * event-loop.c: Fix common/ includes.
98 * ax.c:
99 (enum gdb_agent_op): Fix common/ includes.
100
be6d4f74
TT
1012019-01-21 Tom Tromey <tom@tromey.com>
102
103 * tracepoint.c: Fix includes.
104 * remote-utils.c: Fix includes.
105 * linux-x86-low.c: Fix includes.
106
66d91b39
JB
1072019-01-01 Joel Brobecker <brobecker@adacore.com>
108
109 * gdbreplay.c (gdbreplay_version): Update copyright year in
110 version message.
111 * server.c (gdbserver_version): Likewise.
112
754e3168
AH
1132018-12-05 Alan Hayward <alan.hayward@arm.com>
114
115 * linux-low.c (add_lwp): Switch ordering.
116
d105de22
TT
1172018-11-29 Tom Tromey <tom@tromey.com>
118
119 * win32-low.c (win32_join): Take pid, not process.
120 * target.h (struct target_ops) <join>: Change argument type.
121 (join_inferior): Change argument name.
122 * spu-low.c (spu_join): Take pid, not process.
123 * server.c (handle_detach): Preserve pid before destroying
124 process.
125 * lynx-low.c (lynx_join): Take pid, not process.
126 * linux-low.c (linux_join): Take pid, not process.
127
50138245
AH
1282018-11-23 Alan Hayward <alan.hayward@arm.com>
129
130 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
131 (aarch64_cannot_fetch_register): Likewise.
132 (struct linux_target_ops): Update references.
133
64f57f3d
PFC
1342018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
135
136 * linux-ppc-low.c: Include nat/linux-ptrace.h.
137
8d619c01
EBM
1382018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
139
140 * configure.srv (ipa_ppc_linux_regobj): Add
141 powerpc-isa207-htm-vsx32l-ipa.o and
142 powerpc-isa207-htm-vsx64l-ipa.o.
143 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
144 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
145 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
146 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
147 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
148 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
149 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
150 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
151 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
152 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
153 (init_registers_powerpc_isa207_htm_vsx32l)
154 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
155 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
156 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
157 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
158 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
159 (ppc_store_tm_ctarregset): New functions.
160 (ppc_regsets): Add entries for HTM regsets.
161 (ppc_arch_setup): Set htm in features struct when needed. Set
162 sizes for the HTM regsets.
163 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
164 (initialize_low_arch): Call
165 init_registers_powerpc_isa207_htm_vsx32l and
166 init_registers_powerpc_isa207_htm_vsx64l.
167 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
168 PPC_TDESC_ISA207_HTM_VSX.
169 (initialize_low_tracepoint): Call
170 init_registers_powerpc_isa207_htm_vsx32l and
171 init_registers_powerpc_isa207_htm_vsx64l.
172
232bfb86
EBM
1732018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
174
175 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
176 rs6000/power-linux-pmu.xml to srv_xmlfiles.
177 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
178 (ppc_store_pmuregset): New functions.
179 (ppc_regsets): Add entries for ebb and pmu regsets.
180 (ppc_arch_setup): Set isa207 in features struct if the ebb and
181 pmu regsets are available. Set sizes for these regsets.
182
f2cf6173
EBM
1832018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
184
185 * configure.srv (ipa_ppc_linux_regobj): Add
186 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
187 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
188 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
189 rs6000/powerpc-isa207-vsx32l.xml, and
190 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
191 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
192 <PPC_TDESC_ISA207_VSX>: New enum value.
193 (init_registers_powerpc_isa207_vsx32l): Declare.
194 (init_registers_powerpc_isa207_vsx64l): Declare.
195 * linux-ppc-low.c (ppc_fill_tarregset): New function.
196 (ppc_store_tarregset): New function.
197 (ppc_regsets): Add entry for the TAR regset.
198 (ppc_arch_setup): Set isa207 in features struct when needed. Set
199 size for the TAR regsets.
200 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
201 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
202 and init_registers_powerpc_isa207_vsx64l.
203 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
204 (initialize_low_tracepoint): Call
205 init_registers_powerpc_isa207_vsx32l and
206 init_registers_powerpc_isa207_vsx64l.
207
7ca18ed6
EBM
2082018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
209 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
210
211 * configure.srv (ipa_ppc_linux_regobj): Add
212 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
213 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
214 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
215 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
216 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
217 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
218 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
219 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
220 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
221 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
222 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
223 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
224 (ppc_hwcap): Add comment.
225 (ppc_hwcap2): New global.
226 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
227 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
228 (ppc_regsets): Add entries for the DSCR and PPR regsets.
229 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
230 when needed. Set sizes for the the DSCR and PPR regsets.
231 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
232 (initialize_low_arch): Call
233 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
234 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
235 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
236 PPC_TDESC_ISA205_PPR_DSCR_VSX.
237 (initialize_low_tracepoint): Call
238 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
239 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
240
5c849b22
PFC
2412018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
242
243 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
244
8ecfd7bd
SDJ
2452018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
246 Simon Marchi <simark@simark.ca>
247
248 * acinclude.m4: Include "../selftest.m4".
249 * configure: Regenerate.
250 * configure.ac: Use "GDB_AC_SELFTEST".
251 * configure.srv: Use "$enable_unittests" instead of
252 "$development" when checking whether unit tests have been
253 enabled.
254 * server.c (captured_main): Update message informing that
255 selftests have been disabled.
256
96643e35
TT
2572018-10-04 Tom Tromey <tom@tromey.com>
258
259 * configure: Rebuild.
260
da4ae14a
TT
2612018-10-04 Tom Tromey <tom@tromey.com>
262
263 * server.c (handle_status): Rename inner "thread".
264 (process_serial_event): Declare "res" in 'm' case.
265 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
266 (iterate_over_lwps): Rename inner "thread".
267 (linux_qxfer_libraries_svr4): Rename inner "len".
268 * gdbthread.h (find_thread_in_random): Rename inner "thread".
269
7c619dbd
GB
2702018-10-01 Gary Benson <gbenson@redhat.com>
271
272 * gdb_proc_service.h: Moved common code to
273 common/gdb_proc_service.h.
274
3795e814
GB
2752018-10-01 Gary Benson <gbenson@redhat.com>
276
277 * gdb_proc_service.h: Synchronize comments and whitespace with
278 GDB's version of this file.
279
49b036f1
TT
2802018-09-25 Tom Tromey <tom@tromey.com>
281
282 * configure: Rebuild.
283 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
284
8ff03f0b
SM
2852018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
286
287 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
288 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
289 ($(IPA_LIB)): Sort IPA_OBJS.
290
a1cd91dc
SM
2912018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
292
293 * Makefile.in: Remove references to $(ADD_DEPS).
294
752312ba
TT
2952018-09-16 Tom Tromey <tom@tromey.com>
296
297 * remote-utils.c (remote_open): Use GNU style for metasyntactic
298 variables.
299 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
300 variables.
301
f1628857
TT
3022018-09-05 Tom Tromey <tom@tromey.com>
303
304 * configure: Rebuild.
305
ad202fcc
SM
3062018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
307
308 PR build/23399
309 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
310
d3d8724a
TT
3112018-08-27 Tom Tromey <tom@tromey.com>
312
313 PR build/23087:
314 * configure: Rebuild.
315
b4f183d2
TT
3162018-08-27 Tom Tromey <tom@tromey.com>
317
318 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
319 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
320 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
321 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
322 (s390x_emit_stack_adjust): Add casts to unsigned char.
323
4e2aa472
SM
3242018-08-22 Simon Marchi <simon.marchi@ericsson.com>
325
326 PR gdb/23374
327 PR gdb/23375
328 * server.h (struct client_state) <disable_randomization>:
329 Initialize to 1.
330
cf4088a9
SM
3312018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
332
333 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
334 variable.
335 (mips_supply_ptrace_register): Likewise.
336
a0de763e
TT
3372018-07-22 Tom Tromey <tom@tromey.com>
338
339 * configure: Rebuild.
340
b0a7723d
TT
3412018-07-22 Tom Tromey <tom@tromey.com>
342
343 * win32-low.c (win32_create_inferior): Remove unused variables.
344 * gdbreplay.c (remote_open): Remove unused variable.
345 * remote-utils.c (remote_prepare): Remove unused variable.
346 * x86-tdesc.h (X86_TDESC_H): Define.
347 (amd64_expedite_regs): Define conditionally.
348 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
349 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
350 * remote-utils.c (readchar): Remove unused variable.
351
a780ef4f
PA
3522018-07-13 Pedro Alves <palves@redhat.com>
353
354 * linux-low.c (linux_kill): Change parameter to process_info
355 pointer instead of pid. Adjust.
356 * lynx-low.c (lynx_kill): Likewise.
357 * nto-low.c (nto_kill): Likewise.
358 * spu-low.c (spu_kill): Likewise.
359 * win32-low.c (win32_kill): Likewise.
360 * server.c (handle_v_kill, kill_inferior_callback)
361 (detach_or_kill_for_exit): Adjust.
362 * target.c (kill_inferior): Change parameter to process_info
363 pointer instead of pid. Adjust.
364 * target.h (struct target_ops) <kill>: Change parameter to
365 process_info pointer instead of pid. Adjust all implementations
366 and callers.
367 (kill_inferior): Likewise.
368
ef2ddb33
PA
3692018-07-13 Pedro Alves <palves@redhat.com>
370
371 * linux-low.c (linux_detach, linux_join): Change parameter to
372 process_info pointer instead of pid. Adjust.
373 * lynx-low.c (lynx_detach, lynx_join): Likewise.
374 * nto-low.c (nto_detach): Likewise.
375 * spu-low.c (spu_detach, spu_join): Likewise.
376 * win32-low.c (win32_detach, win32_join): Likewise.
377 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
378 * target.h (struct target_ops) <detach, join>: Change parameter to
379 process_info pointer instead of pid. Adjust all implementations
380 and callers.
381 (detach_inferior, join_inferior): Rename 'pid' parameter to
382 'proc'.
383
c7ab0aef
SDJ
3842018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
385 Jan Kratochvil <jan.kratochvil@redhat.com>
386 Paul Fertser <fercerpav@gmail.com>
387 Tsutomu Seki <sekiriki@gmail.com>
388
389 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
390 (OBS): Add 'common/netstuff.o'.
391 (GDBREPLAY_OBS): Likewise.
392 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
393 (remote_open): Implement support for IPv6
394 connections.
395 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
396 and 'wspiapi.h'.
397 (handle_accept_event): Accept connections from IPv6 sources.
398 (remote_prepare): Handle IPv6-style hostnames; implement
399 support for IPv6 connections.
400 (remote_open): Implement support for printing connections from
401 IPv6 sources.
402
31445d10
PA
4032018-07-11 Pedro Alves <palves@redhat.com>
404
405 PR gdb/23377
406 * mem-break.c (any_persistent_commands): Add process_info
407 parameter and use it instead of relying on the current process.
408 Change return type to bool.
409 * mem-break.h (any_persistent_commands): Add process_info
410 parameter and change return type to bool.
411 * server.c (handle_detach): Remove require_running_or_return call.
412 Look up the process_info for the process we're about to detach.
413 If not found, return back error to GDB. Adjust
414 any_persistent_commands call to pass down a process pointer.
415
cb197132
PA
4162018-07-11 Pedro Alves <palves@redhat.com>
417
418 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
419 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
420 instead of collect_register_by_name.
421 * regcache.c (regcache_raw_get_unsigned_by_name): New.
422 * regcache.h (regcache_raw_get_unsigned_by_name): New.
423
1b919490
VB
4242018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
425 Pedro Alves <palves@redhat.com>
426
427 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
428
d7e15655
TT
4292018-07-03 Tom Tromey <tom@tromey.com>
430
431 * linux-low.c: Update.
432 * lynx-low.c: Update.
433 * mem-break.c: Update.
434 * nto-low.c: Update.
435 * remote-utils.c: Update.
436 * server.c: Update.
437 * spu-low.c: Update.
438 * target.c: Update.
439 * win32-low.c: Update.
440
26a57c92
TT
4412018-07-03 Tom Tromey <tom@tromey.com>
442
443 * server.c: Update.
444
0e998d96
TT
4452018-07-03 Tom Tromey <tom@tromey.com>
446
447 * linux-low.c: Update.
448
cc6bcb54
TT
4492018-07-03 Tom Tromey <tom@tromey.com>
450
451 * target.c: Update.
452
e38504b3
TT
4532018-07-03 Tom Tromey <tom@tromey.com>
454
455 * linux-low.c: Update.
456 * linux-mips-low.c: Update.
457 * lynx-low.c: Update.
458 * nto-low.c: Update.
459 * remote-utils.c: Update.
460 * server.c: Update.
461 * spu-low.c: Update.
462 * target.c: Update.
463 * thread-db.c: Update.
464
e99b03dc
TT
4652018-07-03 Tom Tromey <tom@tromey.com>
466
467 * linux-low.c: Update.
468 * linux-mips-low.c: Update.
469 * lynx-low.c: Update.
470 * mem-break.c: Update.
471 * nto-low.c: Update.
472 * remote-utils.c: Update.
473 * server.c: Update.
474 * spu-low.c: Update.
475 * target.c: Update.
476 * tracepoint.c: Update.
477
f2907e49
TT
4782018-07-03 Tom Tromey <tom@tromey.com>
479
480 * linux-low.c: Update.
481 * linux-ppc-low.c: Update.
482 * linux-x86-low.c: Update.
483 * proc-service.c: Update.
484 * server.c: Update.
485 * spu-low.c: Update.
486 * thread-db.c: Update.
487 * win32-low.c: Update.
488
fd79271b
TT
4892018-07-03 Tom Tromey <tom@tromey.com>
490
491 * linux-low.c: Update.
492 * lynx-low.c: Update.
493 * nto-low.c: Update.
494 * remote-utils.c: Update.
495 * spu-low.c: Update.
496 * thread-db.c: Update.
497 * win32-low.c: Update.
498
c0867626
SDJ
4992018-06-29 Joel Brobecker <brobecker@adacore.com>
500
501 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
502 parameter in call to 'amd64_create_target_description'.
503
2512d7ef
JK
5042018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
505
506 * x86-tdesc.h: Remove executable permission flag.
507
d0ac1c44
SM
5082018-06-19 Simon Marchi <simon.marchi@ericsson.com>
509
510 * configure.ac: Remove AC_PREREQ, add missing quoting.
511 * configure: Re-generate.
512 * config.in: Re-generate.
513 * aclocal.m4: Re-generate.
514
c4eb05ff
SM
5152018-06-18 Simon Marchi <simon.marchi@ericsson.com>
516
517 * tracepoint.h (current_traceframe): Remove declaration.
518
02895270
AH
5192018-06-18 Alan Hayward <alan.hayward@arm.com>
520
521 * linux-aarch64-low.c (is_sve_tdesc): New function.
522 (aarch64_sve_regs_copy_to_regcache): Likewise.
523 (aarch64_sve_regs_copy_from_regcache): Likewise.
524 (aarch64_regs_info): Add SVE checks.
525 (initialize_low_arch): Initialize SVE.
526
e9902bfc
AH
5272018-06-18 Alan Hayward <alan.hayward@arm.com>
528
529 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
530
fefa175e
AH
5312018-06-11 Alan Hayward <alan.hayward@arm.com>
532
533 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
534 (initialize_low_tracepoint): Likewise
535 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
536 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
537 param.
538 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
539 checks.
540 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
541
b91ad3ff
AH
5422018-06-11 Alan Hayward <alan.hayward@arm.com>
543
544 * server.h (PBUFSIZ): Increase size
545
f868386e
AH
5462018-06-11 Alan Hayward <alan.hayward@arm.com>
547
548 * regcache.c (regcache::raw_compare): New function.
549 * regcache.h (regcache::raw_compare): New declaration.
550
9c861883
AH
5512018-06-11 Alan Hayward <alan.hayward@arm.com>
552
553 * regcache.c (new_register_cache): Use new.
554 (free_register_cache): Use delete.
555 (register_data): Use const.
556 (supply_register): Move body inside regcache.
557 (regcache::raw_supply): New override function.
558 (collect_register): Move body inside regcache.
559 (regcache::raw_collect): New override function.
560 (regcache::get_register_status): New override function.
561 * regcache.h (struct regcache): Inherit from reg_buffer_common.
562
40591844
TT
5632018-06-09 Tom Tromey <tom@tromey.com>
564
565 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
566 declare queue.
567 (event_queue): Use std::queue.
568 (gdb_event_xfree): Remove.
569 (initialize_event_loop, process_event, wait_for_event): Update.
570
6341380d
SC
5712018-06-08 Stan Cox <scox@redhat.com>
572
573 * win32-low.c (win32_create_inferior): last_ptid and last_status
574 moved to client_state.
575
03349c93
PA
5762018-06-08 Pedro Alves <palves@redhat.com>
577
578 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
579 common/common-exceptions.o, common/common-utils.o,
580 common/errors.o, common/print-utils.o and utils.o.
581 * gdbreplay.c: Include "common-defs.h" instead of the two
582 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
583 string.h or alloca.h.
584 (perror_with_name): Delete.
585 (remote_open): Use xstrdup instead of strdup.
586 (main): Rename to ...
587 (captured_main): ... this.
588 (main): New.
589
8dcc53b3
TT
5902018-06-08 Tom Tromey <tom@tromey.com>
591
592 * linux-low.c (linux_low_read_btrace): Update.
593
c12a5089
SC
5942018-06-04 Stan Cox <scox@redhat.com>
595
596 * server.h (struct client_state): New.
597 * server.c (cont_thread, general_thread, multi_process)
598 (report_fork_events, report_vfork_events, report_exec_events)
599 (report_thread_events, swbreak_feature, hwbreak_feature)
600 (vCont_supported, disable_randomization, pass_signals)
601 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
602 Moved to client_state.
603 * remote-utils.c (remote_debug, noack_mode)
604 (transport_is_reliable): Moved to client_state.
605 * tracepoint.c (current_traceframe): Moved to client_state.
606
607 Update all callers.
608 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
609 linux-low.c, remote-utils.h, target.c: Use client_state.
610
122394f1
AH
6112018-05-31 Alan Hayward <alan.hayward@arm.com>
612
613 * configure.srv: Add new c/h file.
614
95228a0d
AH
6152018-05-31 Alan Hayward <alan.hayward@arm.com>
616
617 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
618 null VQ.
619
d8dab6c3
MR
6202018-05-25 Maciej W. Rozycki <macro@mips.com>
621
622 * gdb.arch/mips-fpregset-core.exp: New test.
623 * gdb.arch/mips-fpregset-core.c: New test source.
624
81e25b7c
EK
6252018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
626
627 PR server/23198
628 * hostio.c (require_int): Do not report overflow for integers
629 between 0xfffffff and 0x7fffffff.
630
7e947ad3
MR
6312018-05-22 Maciej W. Rozycki <macro@mips.com>
632
633 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
634 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
635 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
636 functions.
637 (the_low_target): Wire them.
638
1d75a658
PFC
6392018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
640
641 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
642 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
643 mode. Call collect_register_by_name with vscr using
644 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
645 (ppc_store_vrregset): Add and set vscr_offset variable as in
646 ppc_fill_vrregset. Call supply_register_by_name with vscr using
647 vscr_offset.
648
d078308a
PFC
6492018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
650
651 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
652 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
653 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
654
7273b5fc
PFC
6552018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
656
657 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
658 (ppc_store_vsxregset): Likewise.
659 (ppc_fill_vrregset): Likewise.
660 (ppc_store_vrregset): Likewise.
661 (ppc_fill_evrregset): Likewise.
662 (ppc_store_evrregset): Likewise.
663 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
664 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
665 needed.
666
2e077f5e
PFC
6672018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
668
669 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
670 wordsize of the inferior. Call ppc_linux_target_wordsize.
671
bd64614e
PFC
6722018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
673
674 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
675 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
676 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
677 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
678 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
679 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
680 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
681 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
682 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
683 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
684 (tdesc_powerpc_e500l): Remove.
685 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
686 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
687 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
688 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
689 linux-ppc-tdesc.h.
690 (ppc_arch_setup): Remove target description matching code. Fill a
691 ppc_linux_features struct and call ppc_linux_match_description
692 with it.
693
75d74cca
MR
6942018-05-22 Maciej W. Rozycki <macro@mips.com>
695
696 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
697 width of the requested register exceeds the width of the
698 `ptrace' data type.
699 (mips_cannot_store_register): Likewise.
700
e4439e43
MR
7012018-05-21 Maciej W. Rozycki <macro@mips.com>
702
703 * linux-mips-low.c (mips_fetch_register): New function. Update
704 preceding comment.
705 (mips_store_gregset): Supply 0 rather than $restart for $zero.
706 (the_low_target): Wire `mips_fetch_register'.
707
55271bf9
JB
7082018-05-10 Joel Brobecker <brobecker@adacore.com>
709
710 * lynx-i386-low.c (LYNXOS_178): New macro.
711 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
712 the layout on LynxOS-178.
713 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
714 handle floating point registers that are not supported by
715 LynxOS-178.
716
1a34f210
TT
7172018-05-10 Tom Tromey <tom@tromey.com>
718
719 * configure: Rebuild.
720
190852c8
JB
7212018-05-10 Joel Brobecker <brobecker@adacore.com>
722
723 PR server/23158:
724 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
725 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
726 Use it to set the expedite_regs field in the given tdesc.
727 * x86-tdesc.h: New file.
728 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
729 Adjust following the addition of the new expedite_regs parameter
730 to init_target_desc.
731 * linux-tic6x-low.c (tic6x_read_description): Likewise.
732 * linux-x86-tdesc.c: #include "x86-tdesc.h".
733 (i386_linux_read_description, amd64_linux_read_description):
734 Adjust following the addition of the new expedite_regs parameter
735 to init_target_desc.
736 * lynx-i386-low.c: #include "x86-tdesc.h".
737 (lynx_i386_arch_setup): Adjust following the addition of the new
738 expedite_regs parameter to init_target_desc.
739 * nto-x86-low.c: #include "x86-tdesc.h".
740 (nto_x86_arch_setup): Adjust following the addition of the new
741 expedite_regs parameter to init_target_desc.
742 * win32-i386-low.c: #include "x86-tdesc.h".
743 (i386_arch_setup): Adjust following the addition of the new
744 expedite_regs parameter to init_target_desc.
745
7dbac825
JB
7462018-05-10 Joel Brobecker <brobecker@adacore.com>
747
748 PR server/23158:
749 * win32-low.c (win32_create_inferior): Add call to my_wait
750 setting last_status global.
751
906994d9
JB
7522018-05-10 Joel Brobecker <brobecker@adacore.com>
753
754 PR server/23158:
755 * win32-low.c (create_process): Only call gdb_tilde_expand if
756 inferior_cwd is not NULL.
757
8ee22052
AB
7582018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
759
760 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
761 registers to the cache if their values have changed.
762 (i387_xsave_to_cache): Provide default values for x87 control
763 registers when these features are available, but disabled.
764 * regcache.c (supply_register_by_name_zeroed): New function.
765 * regcache.h (supply_register_by_name_zeroed): Declare new
766 function.
767
aff689d3
TT
7682018-05-07 Tom Tromey <tom@tromey.com>
769
770 * configure: Rebuild.
771
85e26832
TT
7722018-05-04 Tom Tromey <tom@tromey.com>
773
774 * configure: Rebuild.
775
a3b60e45
JK
7762018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
777 Pedro Alves <palves@redhat.com>
778
779 * linux-aarch64-low.c (aarch64_stopped_data_address):
780 Likewise.
781
632e107b
TT
7822018-04-27 Tom Tromey <tom@tromey.com>
783
784 * configure: Rebuild.
785
458412c3
TT
7862018-04-23 Tom Tromey <tom@tromey.com>
787
788 * configure: Rebuild.
789
f31c089e
SM
7902018-04-19 Simon Marchi <simon.marchi@ericsson.com>
791
792 * Makefile.in (depcomp): Add "..".
793 (all_deps_files): New and use it.
794
b319b098
AH
7952018-04-18 Alan Hayward <alan.hayward@arm.com>
796
797 * configure.srv (aarch64*-*-linux*): Don't include xml.
798 (i[34567]86-*-cygwin*): Likewise.
799 (i[34567]86-*-linux*): Likewise.
800 (i[34567]86-*-lynxos*): Likewise.
801 (i[34567]86-*-mingw32ce*): Likewise.
802 (i[34567]86-*-mingw*): Likewise.
803 (i[34567]86-*-nto*): Likewise.
804 (tic6x-*-uclinux): Likewise.
805 (x86_64-*-linux*): Likewise.
806 (x86_64-*-mingw*): Likewise.
807 (x86_64-*-cygwin*): Likewise.
808
3b74854b
AH
8092018-04-18 Alan Hayward <alan.hayward@arm.com>
810
811 * tdesc.c: Remove xml parameter.
812
e98577a9
AH
8132018-04-18 Alan Hayward <alan.hayward@arm.com>
814
815 * server.c (get_features_xml): Remove cast.
816 * tdesc.c (void target_desc::accept): Fill in function.
817 (tdesc_get_features_xml): Remove old xml creation.
818 (print_xml_feature::visit_pre): Add xml vistor.
819 * tdesc.h (struct target_desc): Make xmltarget mutable.
820 (tdesc_get_features_xml): Remove declaration.
821
d278f585
AH
8222018-04-18 Alan Hayward <alan.hayward@arm.com>
823
824 * tdesc.c (tdesc_architecture_name): Add new function.
825 (tdesc_osabi_name): Likewise.
826 (tdesc_get_features_xml): Use new functions.
827
eee8a18d
AH
8282018-04-18 Alan Hayward <alan.hayward@arm.com>
829
830 * tdesc.c (tdesc_create_flags): Remove.
831 (tdesc_add_flag): Likewise.
832 (tdesc_named_type): Likewise.
833 (tdesc_create_union): Likewise.
834 (tdesc_create_struct): Likewise.
835 (tdesc_create_vector): Likewise.
836 (tdesc_add_bitfield): Likewise.
837 (tdesc_add_field): Likewise.
838 (tdesc_set_struct_size): Likewise.
839
82ec9bc7
AH
8402018-04-18 Alan Hayward <alan.hayward@arm.com>
841
842 * tdesc.c (~target_desc): Remove implictly deleted items.
843 (init_target_desc): Iterate all features.
844 (tdesc_get_features_xml): Use vector.
845 (tdesc_create_feature): Create feature.
846 * tdesc.h (tdesc_feature) Remove
847 (target_desc): Add features.
848
ea3e7d71
AH
8492018-04-18 Alan Hayward <alan.hayward@arm.com>
850
851 * Makefile.in: Add common/tdesc.c
852 * tdesc.c (init_target_desc): init all reg_defs from register
853 vector.
854 (tdesc_create_reg): Create tdesc_reg.
855 * tdesc.h (tdesc_feature): Add register vector.
856
17d08cd4
SM
8572018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
858
859 * tdesc.h (struct target_desc) <features>: Change type to
860 std::vector<std::string>.
861 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
862 changes.
863 (tdesc_get_features_xml): Likewise.
864 (tdesc_create_feature): Likewise.
865
5cd3e386
AH
8662018-03-26 Alan Hayward <alan.hayward@arm.com>
867
868 * regcache.c (find_register_by_number): Return a ref.
869 (find_regno): Use references.
870 (register_size): Likewise.
871 (register_data): Likewise.
872 * tdesc.c (target_desc::~target_desc): Remove free calls.
873 (target_desc::operator==): Use std::vector compare.
874 (init_target_desc): Use reference.
875 (tdesc_create_reg): Use reg constructors.
876 * tdesc.h (struct target_desc): Replace pointer with object.
877
dff7492c
AH
8782018-03-23 Alan Hayward <alan.hayward@arm.com>
879
880 * regcache.c (find_register_by_number): Make static.
881 (find_regno): Use find_register_by_number
882 * regcache.h (struct reg): Remove declaration.
883
d80e5242
AH
8842018-03-23 Alan Hayward <alan.hayward@arm.com>
885
886 * tdesc.c (target_desc::~target_desc): Move to here.
887 (target_desc::operator==): Likewise.
888 * tdesc.h (target_desc::~target_desc): Move from here.
889 (target_desc::operator==): Likewise.
890
f69c5afb
AA
8912018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
892
893 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
894
ce29f843
AA
8952018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
896
897 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
898 S390_TDESC_GS.
899 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
900 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
901 and init_registers_s390_gs_linux64.
902
c49bd90b
AA
9032018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
904
905 * linux-s390-low.c (s390_fill_gs): Remove function.
906 (s390_fill_gsbc): Remove function.
907 (s390_regsets): Set fill functions for the guarded storage regsets
908 to NULL.
909
7edb9bd3
AA
9102018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
911
912 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
913 the word size. Add comment.
914 (s390_get_wordsize): New function.
915 (s390_arch_setup): No longer select a temporary tdesc to fetch the
916 pswm with it. Instead, use s390_get_wordsize to determine the
917 word size first and derive the correct tdesc from that directly.
918
39be3c7e
SM
9192018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
920
921 * Makefile.in: Include silent-rules.mk.
922 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
923 (COMPILE): Add ECHO_CXX.
924 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
925 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
926 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
927 (version-generated.c): Add ECHO_GEN.
928 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
929 (IPAGENT_COMPILE): Add ECHO_CXX.
930 (%-generated.c): Add ECHO_REGDAT.
931
3ae9ce5d
TT
9322018-03-14 Tom Tromey <tom@tromey.com>
933
934 PR cli/14977:
935 * ax.c (ax_printf): Special case for NULL.
936
e6a58aa8
SM
9372018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
938
939 * linux-low.c (linux_qxfer_libraries_svr4): Use
940 xml_escape_text_append.
941
f6e8a41e
SM
9422018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
943
944 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
945
b9671caf
SM
9462018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
947
948 * server.c (handle_general_set): Remove unnecessary xstrdup.
949
e80aaf61
SM
9502018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
951
952 * server.c (parse_debug_format_options): Adjust to
953 delim_string_to_char_ptr_vec changes.
954 * thread-db.c (thread_db_load_search): Adjust to
955 dirnames_to_char_ptr_vec changes.
956
b1223e78
MM
9572018-03-01 Markus Metzger <markus.t.metzger@intel.com>
958
959 * target.h (target_enable_btrace, target_disable_btrace)
960 (target_read_btrace, target_read_btrace_conf): Turn macro into
961 inline function. Throw error if target method is not defined.
962 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
963 check for btrace target method. Be prepared to handle exceptions
964 from btrace target methods.
965
81561546
SDJ
9662018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
967
968 * server.c (captured_main): Change order of error message printed
969 when the current working directory cannot be found.
970
25e3c82c
SDJ
9712018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
972
973 * server.c: Include "filenames.h" and "pathstuff.h".
974 (program_name): Delete variable.
975 (program_path): New anonymous class.
976 (get_exec_wrapper): Use "program_path" instead of
977 "program_name".
978 (handle_v_run): Likewise.
979 (captured_main): Likewise.
980 (process_serial_event): Likewise.
981
b4987c95
SDJ
9822018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
983
984 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
985 (OBJS): Add "pathstuff.o".
986 * server.c (current_directory): New global variable.
987 (captured_main): Initialize "current_directory".
988
f46cd62a
AH
9892018-02-26 Alan Hayward <alan.hayward@arm.com>
990
991 * tdesc.c: Use common/tdesc.h.
992 * tdesc.h: Likewise.
993
a543c5ca
AH
9942018-02-20 Alan Hayward <alan.hayward@arm.com>
995 Simon Marchi <simon.marchi@ericsson.com>
996
997 * Makefile.in: Switch order of make rules.
998
b5884fa7
AH
9992018-02-19 Alan Hayward <alan.hayward@arm.com>
1000
1001 * Makefile.in: Add common directory in build.
1002 * configure.ac: Add common reference.
1003 * configure: Regenerate.
1004
de6242d3
MM
10052018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1006
1007 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1008 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1009 * spu-low.c (spu_target_ops): Likewise.
1010 * win32-low.c (win32_target_ops): Likewise.
1011 * server.c (supported_btrace_packets): Report packets unconditionally.
1012 * target.h (target_ops) <supports_btrace>: Remove.
1013 (target_supports_btrace): Remove.
1014
9ee23a85
MM
10152018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1016
1017 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1018 (handle_btrace_disable): Change return type to void. Use exceptions
1019 to report errors.
1020 (handle_btrace_general_set): Catch exception and copy message to
1021 return message.
1022
8ce47547
TT
10232018-02-08 Tom Tromey <tom@tromey.com>
1024
1025 * linux-low.c (install_software_single_step_breakpoints): Use
1026 make_scoped_restore.
1027 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1028 (do_restore_current_thread_cleanup): Remove.
1029 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1030 declare.
1031
45dd3607
TT
10322018-02-08 Tom Tromey <tom@tromey.com>
1033
1034 * mem-break.c (set_raw_breakpoint_at): Use
1035 gdb::unique_xmalloc_ptr.
1036
e671cd59
PA
10372018-01-30 Pedro Alves <palves@redhat.com>
1038
1039 PR gdb/13211
1040 * target.c (target_terminal::terminal_state): Rename to ...
1041 (target_terminal::m_terminal_state): ... this.
1042
a0aad537
JC
10432018-01-19 James Clarke <jrtc27@jrtc27.com>
1044
1045 * linux-low.c (handle_extended_wait): Surround call to
1046 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1047
4d9b86e1
SM
10482018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1049
1050 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1051 linux_ptrace_attach_fail_reason_string now returning an
1052 std::string.
1053 (linux_attach): Likewise.
1054 * thread-db.c (attach_thread): Likewise.
1055
f517c180
EA
10562018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1057
1058 PR gdb/21559
1059 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1060 checking for fs_base/gs_base fields in struct user_regs_struct.
1061 * configure: Regenerate.
1062
9a70f35c
YQ
10632018-01-16 Yao Qi <yao.qi@linaro.org>
1064
1065 PR gdb/18749
1066 * linux-low.c (fetch_register): Call supply_register instead of
1067 error.
1068
605fd3c6
YQ
10692018-01-08 Yao Qi <yao.qi@linaro.org>
1070 Simon Marchi <simon.marchi@ericsson.com>
1071
1072 * Makefile.in (OBS): Remove selftest.o.
1073 * configure.ac: Set srv_selftest_objs if $development is true.
1074 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1075 * configure: Re-generated.
1076 * server.c (captured_main): Wrap variable selftest_filter with
1077 GDB_SELF_TEST.
1078
2cc05030
SM
10792018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1080
1081 * server.c (parse_debug_format_options): Return std::string.
1082 (handle_monitor_command, captured_main): Adjust.
1083
e379cee6
PA
10842018-01-05 Pedro Alves <palves@redhat.com>
1085
1086 PR gdb/18653
1087 * server.c (captured_main): Pass quiet=false to
1088 save_original_signals_state.
1089
82e1e79a
JB
10902018-01-01 Joel Brobecker <brobecker@adacore.com>
1091
1092 * gdbreplay.c (gdbreplay_version): Update copyright year in
1093 version message.
1094 * server.c (gdbserver_version): Likewise.
1095
8e481c3b
TT
10962017-12-08 Tom Tromey <tom@tromey.com>
1097
1098 * ax.c (ax_printf): Update.
1099
a8806230
YQ
11002017-12-07 Yao Qi <yao.qi@linaro.org>
1101
1102 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1103 aarch64_linux_read_description.
1104 * linux-amd64-ipa.c (idx2mask): New array.
1105 (get_ipa_tdesc): Move idx2mask out.
1106 (initialize_low_tracepoint): Initialize target descriptions.
1107 * linux-i386-ipa.c (idx2mask): New array.
1108 (get_ipa_tdesc): Move idx2mask out.
1109 (initialize_low_tracepoint): Initialize target descriptions.
1110
d4a0e8b5
SM
11112017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1112
1113 * tdesc.c (struct tdesc_type): Change return type.
1114 (tdesc_add_flag): Change parameter type.
1115 (tdesc_add_bitfield): Likewise.
1116 (tdesc_add_field): Likewise.
1117 (tdesc_set_struct_size): Likewise.
1118
798a7429
SM
11192017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1120
1121 * regcache.c (registers_to_string): Remove unused variable.
1122
c0e15c9b
SM
11232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1124
1125 * inferiors.c (for_each_inferior_with_data): Remove.
1126 * inferiors.h (for_each_inferior_with_data): Remove.
1127 * server.c (handle_qxfer_threads_worker): Change parameter type.
1128 (handle_qxfer_threads_proper): Use for_each_thread.
1129
f0045347
SM
11302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1131
1132 * inferiors.c (for_each_inferior): Remove.
1133 (clear_inferiors): Use for_each_thread.
1134 * inferiors.h (for_each_inferior): Remove.
1135 * linux-low.c (linux_wait_for_event_filtered): Use
1136 for_each_thread.
1137 (linux_stabilize_threads): Likewise.
1138 * regcache.c (regcache_release): Likewise.
1139 * server.c (gdb_wants_all_threads_stopped): Likewise.
1140 (clear_pending_status_callback): Remove.
1141 (handle_status): Use for_each_thread.
1142 (captured_main): Likewise.
1143 * win32-low.c (child_init_thread_list): Likewise.
1144 (win32_clear_inferiors): Likewise.
1145 (fake_breakpoint_event): Likewise.
1146
9521758b
SM
11472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1148
1149 * inferiors.h (find_inferior): Remove.
1150 * inferiors.c (find_inferior): Remove.
1151
8f86d7aa
SM
11522017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1153
1154 * linux-low.c (resume_status_pending_p): Update comment.
1155 (need_step_over_p): Update comment.
1156
e2b44075
SM
11572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1158
1159 * linux-low.c (proceed_one_lwp): Return void, change parameter
1160 type.
1161 (unsuspend_and_proceed_one_lwp): Likewise.
1162 (proceed_all_lwps): Use for_each_thread.
1163 (unstop_all_lwps): Likewise.
1164
c80825ff
SM
11652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1166
1167 * linux-low.c (linux_resume_one_thread): Return void, take
1168 parameter directly.
1169 (linux_resume): Use for_each_thread.
1170
df3e4dbe
SM
11712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1172
1173 * linux-low.c (send_sigstop_callback): Return void, change
1174 parameter type. Rename to...
1175 (send_sigstop): ... this.
1176 (suspend_and_send_sigstop_callback): Return void, change parameter
1177 type. Rename to...
1178 (suspend_and_send_sigstop): ... this.
1179 (stop_all_lwps): Use for_each_thread.
1180
5a6b0a41
SM
11812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1182
1183 * linux-low.c (lwp_running): Return bool, remove unused
1184 argument.
1185 (linux_stabilize_threads): Use find_thread.
1186
39a64da5
SM
11872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1188
1189 * linux-low.c (select_singlestep_lwp_callback): Remove.
1190 (count_events_callback): Remove.
1191 (select_event_lwp_callback): Remove.
1192 (select_event_lwp): Use find_thread/for_each_thread.
1193
a1385b7b
SM
11942017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1195
1196 * linux-low.c (not_stopped_callback): Return bool, take filter
1197 argument directly.
1198 (linux_wait_for_event_filtered): Use find_thread.
1199 (linux_wait_1): Likewise.
1200
454296a2
SM
12012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1202
1203 * linux-low.c (same_lwp): Remove.
1204 (find_lwp_pid): Use find_thread.
1205
6b2a85da
SM
12062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1207
1208 * linux-low.c (delete_lwp_callback): Remove.
1209 (linux_mourn): Use for_each_thread.
1210
798a38e8
SM
12112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1212
1213 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1214 args parameter, don't check for pid.
1215 (linux_detach): Use for_each_thread.
1216
e4eb0dec
SM
12172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1218
1219 * linux-low.c (struct counter): Remove.
1220 (second_thread_of_pid_p): Remove.
1221 (last_thread_of_process_p): Use find_thread.
1222
83e1b6c1
SM
12232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1224
1225 * inferiors.c (find_inferior_in_random): Remove.
1226 * inferiors.h (find_inferior_in_random): Remove.
1227 * linux-low.c (status_pending_p_callback): Return bool, accept
1228 parameter ptid directly.
1229 (linux_wait_for_event_filtered): Use find_thread_in_random.
1230 (linux_wait_1): Likewise.
1231
8dc7b443
SM
12322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1233
1234 * inferiors.c (find_inferior_id): Remove.
1235 (find_thread_ptid): Move implemention from find_inferior_id to
1236 here.
1237 * inferiors.h (find_inferior_id): Remove.
1238 * server.c (handle_status): Use find_thread_ptid.
1239 (process_serial_event): Likewise.
1240 * thread-db.c (find_one_thread): Likewise.
1241 (thread_db_thread_handle): Likewise.
1242 * win32-low.c (thread_rec): Likewise.
1243 (child_delete_thread): Likewise.
1244 (win32_thread_alive): Likewise.
1245 (get_child_debug_event): Likewise.
1246
da25033c
SM
12472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1248
1249 * linux-mips-low.c (update_watch_registers_callback): Return
1250 void, remove pid_p parameter, don't check for pid.
1251 (mips_insert_point, mips_remove_point): Use for_each_thread.
1252
c91bb56b
SM
12532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1254
1255 * lynx.low (lynx_delete_thread_callback): Remove.
1256 (lynx_mourn): Use for_each_thread.
1257
634a3254
SM
12582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1259
1260 * regcache.c (regcache_invalidate_one): Remove.
1261 (regcache_invalidate_pid): use for_each_thread.
1262
41272101
TT
12632017-11-26 Tom Tromey <tom@tromey.com>
1264
1265 * linux-low.c (linux_create_inferior): Update.
1266
f5291a6f
UW
12672017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1268
1269 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1270
6654d750
AH
12712017-11-24 Alan Hayward <alan.hayward@arm.com>
1272
1273 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1274 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1275 * linux-aarch64-tdesc-selftest.c: New file.
1276 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1277
12782017-11-24 Alan Hayward <alan.hayward@arm.com>
1279
1280 * configure.srv: Add new file.
1281 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1282 * linux-aarch64-tdesc-selftest.c: New file.
1283 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1284
49bdb7ee
AH
12852017-11-24 Alan Hayward <alan.hayward@arm.com>
1286
1287 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1288 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1289 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1290
d6d7ce56
AH
12912017-11-24 Alan Hayward <alan.hayward@arm.com>
1292
1293 * configure.srv: Add new files.
1294 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1295 aarch64_linux_read_description.
1296 * linux-aarch64-low.c (aarch64_linux_read_description):
1297 Merge with aarch64_arch_setup.
1298 (aarch64_arch_setup): Call aarch64_linux_read_description.
1299 * linux-aarch64-tdesc.c: New file.
1300 * linux-aarch64-tdesc.h: New file.
1301
506fe5f4
YQ
13022017-11-24 Yao Qi <yao.qi@linaro.org>
1303
1304 * configure.srv: Set $srv_regobj for tic6x-linux.
1305 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1306 (tic6x_read_description): Move some code to tic6x_arch_setup.
1307 (tic6x_tdesc_test): New function.
1308 (initialize_low_arch): Call selftests::register_test.
1309
29f9a567
YQ
13102017-11-22 Yao Qi <yao.qi@linaro.org>
1311
1312 * remote-utils.c (prepare_resume_reply): Use memcpy.
1313
578290ec
SM
13142017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1315
1316 * linux-low.c (kill_one_lwp_callback): Return void, take
1317 argument directly, don't filter on pid.
1318 (linux_kill): Use for_each_thread.
1319
eca55aec
SM
13202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1321
1322 * linux-low.c (need_step_over_p): Return bool, remove dummy
1323 argument.
1324 (linux_resume, proceed_all_lwps): Use find_thread.
1325
25c28b4d
SM
13262017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1327
1328 * linux-low.c (resume_status_pending_p): Return bool, remove
1329 flag_p argument.
1330 (linux_resume): Use find_thread.
1331
5fdda392
SM
13322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1333
1334 * linux-low.c (struct thread_resume_array): Remove.
1335 (linux_set_resume_request): Return void, take arguments
1336 directly.
1337 (linux_resume): Use for_each_thread.
1338
fcb056a5
SM
13392017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1340
1341 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1342 return bool, remove data argument.
1343 (linux_stabilize_threads): Use find_thread.
1344
139720c5
SM
13452017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1346
1347 * linux-low.c (unsuspend_one_lwp): Remove.
1348 (unsuspend_all_lwps): Use for_each_thread, inline code from
1349 unsuspend_one_lwp.
1350
6d1e5673
SM
13512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1352
1353 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1354 * linux-low.c (struct iterate_over_lwps_args): Remove.
1355 (iterate_over_lwps_filter): Remove.
1356 (iterate_over_lwps): Use find_thread.
1357
bbf550d5
SM
13582017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1359
1360 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1361 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1362 code from reset_lwp_ptrace_options_callback.
1363
00192f77
SM
13642017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1365
1366 * linux-arm-low.c (struct update_registers_data): Remove.
1367 (update_registers_callback): Return void, take arguments
1368 directly, don't check thread's pid.
1369 (arm_insert_point, arm_remove_point): Use for_each_thread.
1370
2bee2b6c
SM
13712017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1372
1373 * win32-low.c (continue_one_thread): Return void, take argument
1374 directly.
1375 (child_continue): Use for_each_thread.
1376
0b360f19
SM
13772017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1378
1379 * win32-i386-low.c (update_debug_registers_callback): Rename
1380 to ...
1381 (update_debug_registers): ... this, return void, remove pid_p arg.
1382 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1383
f27866ba
SM
13842017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1385
1386 * inferiors.h (struct process_info): Add constructor, initialize
1387 fields..
1388 <syscalls_to_catch>: Change type to std::vector<int>.
1389 * inferiors.c (add_process): Allocate process_info with new.
1390 (remove_process): Free process_info with delete.
1391 * linux-low.c (handle_extended_wait): Adjust.
1392 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1393 * server.c (handle_general_set): Adjust.
1394
e849ea89
PA
13952017-11-16 Pedro Alves <palves@redhat.com>
1396
1397 * remote-utils.c (remote_close): Block SIGIO signals instead of
1398 uninstalling the SIGIO handler.
1399
1d0aa65c
AH
14002017-11-16 Alan Hayward <alan.hayward@arm.com>
1401
1402 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1403
3491a34c
YQ
14042017-11-16 Yao Qi <yao.qi@linaro.org>
1405
1406 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1407 (tic6x_store_gregset): Likewise.
1408 (tic6x_usrregs_info): Move it up.
1409
a602f924
AH
14102017-11-15 Alan Hayward <alan.hayward@arm.com>
1411
1412 * Makefile.in: Update arch rules.
1413 * configure.srv: Explicitly mark arch/ files.
1414
5616b6c3
AS
14152017-11-13 Andreas Schwab <schwab@suse.de>
1416
1417 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1418 function.
1419 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1420
d1928160
PA
14212017-11-06 Pedro Alves <palves@redhat.com>
1422
1423 * config.in, configure: Regenerate.
1424
bac608e7
SM
14252017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1426
1427 * target.c (struct thread_search): Remove.
1428 (thread_search_callback): Remove.
1429 (prepare_to_access_memory): Use for_each_thread instead of
1430 find_inferior. Inline code from thread_search_callback.
1431
eaddb425
SM
14322017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1433
1434 * server.c (struct visit_actioned_threads_data): Remove.
1435 (visit_actioned_threads): Change prototype to take arguments
1436 directly.
1437 (resume): Use find_thread instead of find_inferior.
1438
99078d34
SM
14392017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1440
1441 * server.c (queue_stop_reply_callback): Change prototype, return
1442 void.
1443 (find_status_pending_thread_callback): Remove.
1444 (handle_status): Replace find_inferior with find_thread and
1445 for_each_thread.
1446
cc628f3d
AH
14472017-10-25 Alan Hayward <alan.hayward@arm.com>
1448
1449 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1450 with REGNO.
1451 (aarch64_store_gregset): Likewise.
1452 (aarch64_fill_fpregset): Likewise.
1453 (aarch64_store_fpregset): Likewise.
1454
4d3bb80e
SM
14552017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1456
1457 * gdbthread.h (find_thread, for_each_thread): New functions.
1458 * inferiors.c (thread_of_pid): Remove.
1459 (find_any_thread_of_pid): Use find_thread.
1460 * linux-low.c (num_lwps): Use for_each_thread.
1461
7a7cdfa0
YQ
14622017-10-17 Yao Qi <yao.qi@linaro.org>
1463
1464 * Makefile.in: Remove one rule.
1465 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1466
e675d170
YQ
14672017-10-17 Yao Qi <yao.qi@linaro.org>
1468
1469 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1470 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1471
7eb4e0f9
YQ
14722017-10-17 Yao Qi <yao.qi@linaro.org>
1473
1474 * configure.srv: Rename arm.o with arch/arm.o.
1475
60d6cfc9
YQ
14762017-10-17 Yao Qi <yao.qi@linaro.org>
1477
1478 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1479 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1480 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1481 (arch-i386.o, arch-amd64.o): Remove rules.
1482 (arch/%.o): New rule.
1483 Update POSTCOMPILE and COMPILE.pre.
1484 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1485 * configure: Re-generated.
1486 * configure.srv: Replace arch-i386.o with arch/i386.o.
1487 Replace arch-amd64.o with arch/amd64.o.
1488
5bfda255
YQ
14892017-10-16 Yao Qi <yao.qi@linaro.org>
1490
1491 * configure: Regenerated.
1492
9c80ecd6
SM
14932017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1494
1495 * inferiors.h: (struct inferior_list): Remove.
1496 (struct inferior_list_entry); Remove.
1497 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1498 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1499 get_first_inferior): Remove.
1500 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1501 find_inferior_id, find_inferior_in_random): Change signature.
1502 * inferiors.c (all_threads): Change type to
1503 std::list<thread_info *>.
1504 (get_thread): Remove macro.
1505 (find_inferior, find_inferior_id): Change signature, implement
1506 using find_thread.
1507 (find_inferior_in_random): Change signature, implement using
1508 find_thread_in_random.
1509 (for_each_inferior, for_each_inferior_with_data): Change
1510 signature, implement using for_each_thread.
1511 (add_inferior_to_list, remove_inferior): Remove.
1512 (add_thread, get_first_thread, thread_of_pid,
1513 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1514 (get_first_inferior, one_inferior_p, clear_inferior_list):
1515 Remove.
1516 (clear_inferiors, get_thread_process): Update.
1517 * gdbthread.h: Include <list>.
1518 (struct thread_info) <entry>: Remove field.
1519 <id>: New field.
1520 (all_threads): Change type to std::list<thread_info *>.
1521 (get_first_inferior): Add doc.
1522 (find_thread, for_each_thread, find_thread_in_random): New
1523 functions.
1524 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1525 * linux-arm-low.c (update_registers_callback): Update.
1526 * linux-low.c (second_thread_of_pid_p): Update.
1527 (kill_one_lwp_callback, linux_detach_lwp_callback,
1528 delete_lwp_callback, status_pending_p_callback, same_lwp,
1529 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1530 iterate_over_lwps, not_stopped_callback,
1531 resume_stopped_resumed_lwps, count_events_callback,
1532 select_singlestep_lwp_callback, select_event_lwp_callback,
1533 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1534 suspend_and_send_sigstop_callback, wait_for_sigstop,
1535 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1536 lwp_running, linux_set_resume_request, resume_status_pending_p,
1537 need_step_over_p, start_step_over, linux_resume_one_thread,
1538 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1539 reset_lwp_ptrace_options_callback): Update.
1540 * linux-mips-low.c (update_watch_registers_callback): Update.
1541 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1542 Update.
1543 (free_register_cache_thread_one): Remove.
1544 (regcache_release): Update.
1545 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1546 handle_qxfer_threads_worker): Update.
1547 (handle_query): Update, use list iterator.
1548 (visit_actioned_threads, handle_pending_status,
1549 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1550 clear_pending_status_callback, set_pending_status_callback,
1551 find_status_pending_thread_callback, handle_status,
1552 process_serial_event): Update.
1553 * target.c (thread_search_callback): Update.
1554 * thread-db.c (thread_db_get_tls_address): Update.
1555 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1556 Update.
1557 * win32-i386-low.c (update_debug_registers_callback): Update.
1558 * win32-low.c (delete_thread_info, child_delete_thread,
1559 continue_one_thread, suspend_one_thread,
1560 get_child_debug_event): Adjust.
1561
9179355e
SM
15622017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1563
1564 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1565 * inferiors.h: Include <list>.
1566 (struct process_info) <entry>: Remove field.
1567 <pid>: New field.
1568 (pid_of): Change macro to function.
1569 (ptid_of, lwpid_of): Remove macro.
1570 (all_processes): Change type to std::list<process_info *>.
1571 (ALL_PROCESSES): Remove macro.
1572 (for_each_process, find_process): New function.
1573 * inferiors.c (all_processes): Change type to
1574 std::list<process_info *>.
1575 (find_thread_process): Adjust.
1576 (add_process): Likewise.
1577 (remove_process): Likewise.
1578 (find_process_pid): Likewise.
1579 (get_first_process): Likewise.
1580 (started_inferior_callback): Remove.
1581 (have_started_inferiors_p): Adjust.
1582 (attached_inferior_callback): Remove.
1583 (have_attached_inferiors_p): Adjust.
1584 * linux-low.c (check_zombie_leaders): Likewise.
1585 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1586 (x86_linux_update_xmltarget): Adjust.
1587 * server.c (handle_query): Likewise.
1588 (gdb_reattached_process): Remove.
1589 (handle_status): Adjust.
1590 (kill_inferior_callback): Likewise.
1591 (detach_or_kill_inferior): Remove.
1592 (print_started_pid): Likewise.
1593 (print_attached_pid): Likewise.
1594 (detach_or_kill_for_exit): Update.
1595 (process_serial_event): Likewise.
1596 * linux-arm-low.c (arm_new_fork): Likewise.
1597
c9cb8905
SM
15982017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1599
1600 * dll.h: Include <list>.
1601 (struct dll_info): Add constructor.
1602 <entry>: Remove field.
1603 (all_dlls): Change type to std::list<dll_info>.
1604 * dll.c: Include <algorithm>.
1605 (get_dll): Remove macro.
1606 (all_dlls): Change type to std::list<dll_info *>.
1607 (free_one_dll): Remove.
1608 (match_dll): Likewise.
1609 (loaded_dll): Adjust.
1610 (unloaded_dll): Adjust to all_dlls type change, use
1611 std::find_if. Inline code from match_dll.
1612 (clear_dlls): Adjust to all_dlls type change.
1613 * server.c (emit_dll_description): Remove.
1614 (handle_qxfer_libraries): Adjust to all_dlls type change,
1615 integrate emit_dll_description's functionality.
1616
04ec7890
SM
16172017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1618
1619 * linux-low.h (struct linux_target_ops) <delete_process>: New
1620 field.
1621 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1622 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1623 (struct linux_target_ops): Add delete_process callback.
1624 * linux-arm-low.c (arm_delete_process): New.
1625 (struct linux_target_ops): Add delete_process callback.
1626 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1627 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1628 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1629 * linux-mips-low.c (mips_linux_delete_process): New.
1630 (struct linux_target_ops): Add delete_process callback.
1631 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1632 * linux-s390-low.c (struct linux_target_ops): Likewise.
1633 * linux-sh-low.c (struct linux_target_ops): Likewise.
1634 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1635 * linux-tile-low.c (struct linux_target_ops): Likewise.
1636 * linux-x86-low.c (x86_linux_delete_process): New.
1637 (struct linux_target_ops): Add delete_process callback.
1638 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1639
466eecee
SM
16402017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1641
1642 * linux-aarch64-low.c (the_low_target): Add thread delete
1643 callback.
1644 * linux-arm-low.c (arm_delete_thread): New function.
1645 (the_low_target): Add thread delete callback.
1646 * linux-bfin-low.c (the_low_target): Likewise.
1647 * linux-crisv32-low.c (the_low_target): Likewise.
1648 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1649 set.
1650 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1651 field.
1652 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1653 * linux-mips-low.c (mips_linux_delete_thread): New function.
1654 (the_low_target): Add thread delete callback.
1655 * linux-ppc-low.c (the_low_target): Likewise.
1656 * linux-s390-low.c (the_low_target): Likewise.
1657 * linux-sh-low.c (the_low_target): Likewise.
1658 * linux-tic6x-low.c (the_low_target): Likewise.
1659 * linux-tile-low.c (the_low_target): Likewise.
1660 * linux-x86-low.c (the_low_target): Likewise.
1661 * linux-xtensa-low.c (the_low_target): Likewise.
1662
b79f7801
YZ
16632017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1664
1665 * win32-low.c: Include "common-inferior.h".
1666
bc3b087d
SDJ
16672017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1668
1669 * inferiors.c (set_inferior_cwd): New function.
1670 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1671 (handle_query): Inform that QSetWorkingDir is supported.
1672 * win32-low.c (create_process): Pass the inferior's cwd to
1673 CreateProcess.
1674
d092c5a2
SDJ
16752017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1676
1677 * inferiors.c (current_inferior_cwd): New global variable.
1678 (get_inferior_cwd): New function.
1679 * inferiors.h (struct process_info) <cwd>: New field.
1680
7da0a886
SDJ
16812017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1682
1683 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1684 (OBS): Add gdb_tilde_expand.o.
1685
289a6840
SM
16862017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1687
1688 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1689 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1690
256642e8
PA
16912017-09-29 Pedro Alves <palves@redhat.com>
1692
1693 * ax.c (gdb_parse_agent_expr): Constify.
1694 * ax.h (gdb_parse_agent_expr): Constify.
1695 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1696 Constify.
1697 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1698 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1699 * remote-utils.h (read_ptid): Constify.
1700 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1701 (process_point_options, process_serial_event): Constify.
1702 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1703 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1704 (cmd_qtbuffer): Constify.
1705
5b9ca4d4
PA
17062017-09-29 Pedro Alves <palves@redhat.com>
1707
1708 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1709 fails.
1710
94c207e0
PA
17112017-09-29 Pedro Alves <palves@redhat.com>
1712
1713 * linux-low.c (handle_extended_wait): Pass parent thread instead
1714 of process to thread_db_notice_clone.
1715 * linux-low.h (thread_db_notice_clone): Replace parent process
1716 parameter with parent thread parameter.
1717 * thread-db.c (find_one_thread): Add comment.
1718 (thread_db_notice_clone): Replace parent process parameter with
1719 parent thread parameter. Temporarily switch to the parent thread.
1720
75352e28
SDJ
17212017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1722
1723 * gdbthread.h: Include "common-gdbthread.h".
1724 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1725 "if" when validating the ptid.
1726 * remote-utils.c: Include "gdbthread.h".
1727 (prepare_resume_reply): Use "switch_to_thread".
1728 * target.c (done_accessing_memory): Likewise.
1729
ad339634
AA
17302017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1731
1732 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1733 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1734 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1735 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1736 s390x-gs-linux64-ipa.o to ipa_obj.
1737 * linux-s390-low.c (HWCAP_S390_GS): New define.
1738 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1739 New functions.
1740 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1741 (s390_arch_setup): Check for guarded-storage support and choose
1742 appropriate tdesc.
1743 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1744 init_registers_s390x_gs_linux64.
1745 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1746 enum value.
1747 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1748 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1749
cc4d742f
SM
17502017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1751
1752 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1753
f6327dcb
KB
17542017-09-21 Kevin Buettner <kevinb@redhat.com>
1755
1756 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1757 (thread_db_thread_handle): Declare.
1758 * linux-low.c (linux_target_ops): Initialize thread_handle.
1759 * server.c (handle_qxfer_threads_worker): Add support for
1760 "handle" attribute.
1761 * target.h (struct target_ops): Add new function pointer,
1762 thread_handle.
1763 (target_thread_handle): Define.
1764 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1765 field in lwp.
1766 (thread_db_thread_handle): New function.
1767
86299109
KB
17682017-09-21 Kevin Buettner <kevinb@redhat.com>
1769
1770 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1771 * linux-low.h (thread_db_notice_clone): Declare.
1772 * thread-db.c (thread_db_notice_clone): New function.
1773
f557a88a
PA
17742017-09-21 Pedro Alves <palves@redhat.com>
1775
1776 * server.c (gdb_read_memory, handle_status, process_serial_event)
1777 (handle_serial_event, handle_target_event): Adjust to
1778 set_desired_thread prototype change.
1779 * target.c (set_desired_thread): Remove 'use_general' parameter
1780 and adjust.
1781 * target.h (set_desired_thread): Remove 'use_general' parameter.
1782
223ffa71
TT
17832017-09-20 Tom Tromey <tom@tromey.com>
1784
1785 * target.c (target_terminal::terminal_state): Define.
1786 (target_terminal::init): Rename from target_terminal_init.
1787 (target_terminal::inferior): Rename from
1788 target_terminal_inferior.
1789 (target_terminal::ours): Rename from target_terminal_ours.
1790 (target_terminal::ours_for_output, target_terminal::info): New.
1791
04fd3ba9
SM
17922017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1793
1794 * server.c (accumulate_file_name_length): Remove.
1795 (emit_dll_description): Adjust to std::string change.
1796 (handle_qxfer_libraries): Use std::string to hold document.
1797
5e187554
SM
17982017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1799
1800 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1801 return type of xml_escape_text.
1802 * server.c (emit_dll_description): Likewise.
1803
1526853e
SM
18042017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1805
1806 * server.c (captured_main): Accept argument for --selftest.
1807 Update run_tests call.
1808 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1809 when registering selftests.
1810
c4dfafab
SDJ
18112017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1812
1813 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1814 instead of "VEC" for "target_desc.reg_defs".
1815 (regcache_cpy): Likewise.
1816 (registers_to_string): Likewise.
1817 (registers_from_string): Likewise.
1818 (find_regno): Likewise.
1819 (supply_regblock): Likewise.
1820 (regcache_raw_read_unsigned): Likewise.
1821 * tdesc.c (init_target_desc): Likewise.
1822 (tdesc_create_reg): Likewise.
1823 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1824 (struct target_desc) <reg_defs>: Convert to "std::vector".
1825 (target_desc): Do not initialize "reg_defs".
1826 (~target_desc): Update code to use "std::vector" instead of "VEC"
1827 for "target_desc.reg_defs".
1828 (operator==): Likewise.
1829
124aceb4
SM
18302017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1831
1832 * inferiors.h (thread_to_gdb_id): Remove.
1833 * inferiors.c (thread_to_gdb_id): Remove.
1834 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1835 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1836 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1837 Likewise.
1838 * nto-low.c (nto_fetch_registers, nto_store_registers,
1839 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1840
96cde54f
SM
18412017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1842
1843 * inferiors.h (gdb_id_to_thread_id): Remove.
1844 * inferiors.c (gdb_id_to_thread_id): Remove.
1845 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1846 removal. Move pid declaration closer to where it's used.
1847
e8ca139e
SM
18482017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1849
1850 * server.c (handle_detach): New function.
1851 (process_serial_event): Move code out, call handle_detach.
1852
f8a4e119
SM
18532017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1854
1855 * server.c (require_running): Rename to ...
1856 (require_running_or_return): ... this ...
1857 (require_running_or_break): ... and this.
1858 (handle_query, process_serial_event): Adjust.
1859
0eb0a407
SM
18602017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1861
1862 * linux-low.c (linux_set_resume_request): Remove unused
1863 variables.
1864
785922a5
SM
18652017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1866
1867 * server.c (first_thread_of): Remove.
1868 (process_serial_event): Replace usage of first_thread_of with
1869 find_any_thread_of_pid.
1870 * tracepoint.c (same_process_p): Remove.
1871 (gdb_agent_about_to_close): Replace usage of same_process_p with
1872 find_any_thread_of_pid.
1873 * linux-x86-low.c (same_process_callback): Remove.
1874 (x86_arch_setup_process_callback): Replace usage of
1875 same_process_callback with find_any_thread_of_pid.
1876 * thread-db.c (any_thread_of): Remove.
1877 (switch_to_process): Replace usage of any_thread_of with
1878 find_any_thread_of_pid.
1879 * inferiors.c (thread_pid_matches_callback): Remove.
1880 (find_thread_process): Adjust to use find_any_thread_of_pid.
1881
a059f00c
SDJ
18822017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1883
1884 * regcache.c (get_thread_regcache): Guard calls to "memset"
1885 with "!VEC_empty".
1886
cc397f3a
SDJ
18872017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1888
1889 * linux-low.c (handle_extended_wait): Use
1890 "allocate_target_description" instead of "XNEW".
1891 * linux-x86-low.c (initialize_low_arch): Likewise.
1892
22916b07
YQ
18932017-09-05 Yao Qi <yao.qi@linaro.org>
1894
1895 * configure.srv (srv_i386_regobj): Remove.
1896 (srv_amd64_regobj): Remove.
1897 (srv_regobj): Set it to "" for x86 non-linux targets.
1898 * linux-x86-tdesc.c (i386_linux_read_description):
1899 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1900 (init_registers_i386): Remove the declaration.
1901 (tdesc_i386): Remove the declaration.
1902 (lynx_i386_arch_setup): Call i386_create_target_description.
1903 * nto-x86-low.c: Likewise.
1904 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1905 [!__x86_64__]: include arch/i386.h.
1906 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1907
38602d55
YQ
19082017-09-05 Yao Qi <yao.qi@linaro.org>
1909
1910 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1911 i386/amd64-XXX-linux from it.
1912
44b886ff
YQ
19132017-09-05 Yao Qi <yao.qi@linaro.org>
1914
1915 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1916 false.
1917 (ipa_amd64_linux_regobj): Remove.
1918 (ipa_x32_linux_regobj): Remove.
1919
b4570e4b
YQ
19202017-09-05 Yao Qi <yao.qi@linaro.org>
1921
1922 * Makefile.in (arch-amd64.o): New rule.
1923 * configure.srv: Append arch-amd64.o.
1924 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1925 (get_ipa_tdesc): Call amd64_linux_read_description.
1926 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1927 and init_registers_amd64_XXX.
1928 * linux-x86-low.c (x86_linux_read_description): Call
1929 amd64_linux_read_description.
1930 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1931 (initialize_low_arch): Don't call init_registers_x32_XXX and
1932 init_registers_amd64_XXX.
1933 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1934 and tdesc_amd64_XXX.
1935 [__x86_64__] (amd64_tdesc_test): New function.
1936 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1937 and init_registers_amd64_XXX.
1938 * linux-x86-tdesc.c: Include arch/amd64.h.
1939 (xcr0_to_tdesc_idx): New function.
1940 (i386_linux_read_description): New function.
1941 (amd64_get_ipa_tdesc_idx): New function.
1942 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1943 (amd64_get_ipa_tdesc): Declare.
1944
d1f28ea2
YQ
19452017-09-05 Yao Qi <yao.qi@linaro.org>
1946
1947 * configure.srv (srv_i386_linux_xmlfiles): Remove
1948 i386/i386-XXX-linux.xml from it.
1949
25a93583
YQ
19502017-09-05 Yao Qi <yao.qi@linaro.org>
1951
1952 * configure.srv: Set srv_i386_linux_regobj empty if $development
1953 is false.
1954 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1955 initialize_low_tdesc.
1956 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1957 with #if initialize_low_tdesc.
1958 * linux-x86-tdesc-selftest.c: New file.
1959 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1960
5f035c07
YQ
19612017-09-05 Yao Qi <yao.qi@linaro.org>
1962
1963 * Makefile.in (arch-i386.o): New rule.
1964 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1965 (x86_64-*-linux*): Likewise.
1966 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1967 include arch/i386.h.
1968 (i386_linux_read_description): Remove code and call
1969 i386_create_target_description.
1970 * tdesc.c (allocate_target_description): New function.
1971 * tdesc.h (set_tdesc_architecture): Remove declaration.
1972 (set_tdesc_osabi): Likewise.
1973
0abe8a89
YQ
19742017-09-05 Yao Qi <yao.qi@linaro.org>
1975
1976 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1977 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1978 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1979 .xmltarget.
1980 * server.c (get_features_xml): Call tdesc_get_features_xml.
1981 * tdesc.c (set_tdesc_architecture): New function.
1982 (set_tdesc_osabi): New function.
1983 (tdesc_get_features_xml): New function.
1984 (tdesc_create_feature): Add an argument.
1985 * tdesc.h (struct target_desc) <features>: New field.
1986 <arch, osabi>: New field.
1987 (~target_desc): xfree features, arch, and osabi.
1988 (target_desc::oerator==): Don't compare .xmltarget.
1989 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1990 (set_tdesc_osabi): Likewise.
1991 (tdesc_get_features_xml): Likewise.
1992
0a188386
YQ
19932017-09-05 Yao Qi <yao.qi@linaro.org>
1994
1995 * linux-x86-tdesc.c: Include selftest.h.
1996 (i386_tdesc_test): New function.
1997 (initialize_low_tdesc): Call selftests::register_test.
1998 * tdesc.h: Include regdef.h.
1999 (target_desc): Override operator == and !=.
2000
f49ff000
YQ
20012017-09-05 Yao Qi <yao.qi@linaro.org>
2002
2003 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2004 (ipa_obj): Likewise.
2005 * linux-i386-ipa.c: Include common/x86-xstate.h
2006 (get_ipa_tdesc): Call i386_linux_read_description.
2007 (initialize_low_tracepoint): Don't call init_registers_XXX
2008 functions, call initialize_low_tdesc instead.
2009 * linux-x86-low.c (x86_linux_read_description): Call
2010 i386_linux_read_description.
2011 (initialize_low_arch): Don't call init_registers_i386_XXX
2012 functions, call initialize_low_tdesc.
2013 * linux-x86-tdesc.c: New file.
2014 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2015 (i386_get_ipa_tdesc_idx): Declare.
2016 (i386_get_ipa_tdesc): Declare.
2017 (initialize_low_tdesc): Declare.
2018
2b68ef2f
YQ
20192017-09-05 Yao Qi <yao.qi@linaro.org>
2020
2021 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2022 instead of 0.
2023
f7000548
YQ
20242017-09-05 Yao Qi <yao.qi@linaro.org>
2025
2026 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2027 * regcache.c (get_thread_regcache): Use VEC_length.
2028 (init_register_cache): Likewise.
2029 (regcache_cpy): Likewise.
2030 (registers_to_string): Iterate reg_defs via VEC_iterate.
2031 (find_regno): Likewise.
2032 (find_register_by_number): Use VEC_index.
2033 (register_size): Call find_register_by_number.
2034 (register_data): Call find_register_by_number.
2035 (supply_regblock): Use VEC_length.
2036 (regcache_raw_read_unsigned): Likewise.
2037 * tdesc.c (init_target_desc): Iterate reg_defs via
2038 VEC_iterate.
2039 (default_description): Update initializer.
2040 (copy_target_description): Don't update field num_registers.
2041 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2042 <num_registers>: Remove.
2043
50a421ac
SM
20442017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2045
2046 * Makefile.in (.SECONDARY): Define target.
2047
23fdd69e
SM
20482017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2049
2050 * linux-low.c (linux_wait_1): Adjust.
2051 * server.c (queue_stop_reply_callback): Adjust.
2052
0a2dde4a
SDJ
20532017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2054
2055 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2056 QEnvironmentUnset and QEnvironmentReset packets.
2057 (handle_query): Inform remote that QEnvironmentHexEncoded,
2058 QEnvironmentUnset and QEnvironmentReset are supported.
2059
6afd337d
SM
20602017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2061
2062 * inferiors.h (inferior_target_data): Rename to ...
2063 (thread_target_data): ... this.
2064 (inferior_regcache_data): Rename to ...
2065 (thread_regcache_data): ... this.
2066 (set_inferior_regcache_data): Rename to ...
2067 (set_thread_regcache_data): ... this.
2068 * inferiors.c (inferior_target_data): Rename to ...
2069 (thread_target_data): ... this.
2070 (inferior_regcache_data): Rename to ...
2071 (thread_regcache_data): ... this.
2072 (set_inferior_regcache_data): Rename to ...
2073 (set_thread_regcache_data): ... this.
2074 (free_one_thread): Update.
2075 * linux-low.h (get_thread_lwp): Update.
2076 * regcache.c (get_thread_regcache): Update.
2077 (regcache_invalidate_thread): Update.
2078 (free_register_cache_thread): Update.
2079 * win32-i386-low.c (update_debug_registers_callback): Update.
2080 (win32_get_current_dr): Update.
2081 * win32-low.c (thread_rec): Update.
2082 (delete_thread_info): Update.
2083 (continue_one_thread): Update.
2084 (suspend_one_thread): Update.
2085
a160cc46
SM
20862017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2087
2088 * inferiors.c (set_inferior_target_data): Remove.
2089 * inferiors.h (set_inferior_target_data): Remove.
2090
6d580b63
YQ
20912017-08-18 Yao Qi <yao.qi@linaro.org>
2092
2093 * Makefile.in (OBS): Add selftest.o.
2094 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2095 * configure, config.in: Re-generated.
2096 * server.c: Include common/sefltest.h.
2097 (captured_main): Handle option --selftest.
2098
f5a29eb0
YQ
20992017-08-09 Yao Qi <yao.qi@linaro.org>
2100
2101 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2102 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2103 i386-avx-mpx.o and i386-mmx.o.
2104 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2105 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2106 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2107 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2108 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2109 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2110 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2111 i386/amd64-avx-mpx.xml.
2112
57757c2f
YQ
21132017-08-09 Yao Qi <yao.qi@linaro.org>
2114
2115 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2116 and x32-avx-avx512.o.
2117 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2118 i386/x32-avx-avx512.xml.
2119
229d26fc
SM
21202017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2121
2122 * tracepoint.h (enum class fast_tpoint_collect_result): New
2123 enumeration.
2124 (fast_tracepoint_collecting): Change return type to
2125 fast_tpoint_collect_result.
2126 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2127 * linux-low.h: Include tracepoint.h.
2128 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2129 fast_tpoint_collect_result.
2130 * linux-low.c (handle_tracepoints): Adjust.
2131 (linux_fast_tracepoint_collecting): Change return type to
2132 fast_tpoint_collect_result.
2133 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2134 linux_wait_1, stuck_in_jump_pad_callback,
2135 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2136 proceed_one_lwp): Adjust to type change.
2137
2e1e43e1
YQ
21382017-07-10 Yao Qi <yao.qi@linaro.org>
2139
2140 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2141
adc764e7
YQ
21422017-06-29 Yao Qi <yao.qi@linaro.org>
2143
2144 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2145 Remove.
2146 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2147
a206891a
SM
21482017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2149
2150 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2151
9a6c7d9c
SDJ
21522017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2153
2154 * linux-low.c (linux_create_inferior): Adjust code to access the
2155 environment information via 'gdb_environ' class.
2156 * lynx-low.c (lynx_create_inferior): Likewise.
2157 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2158 (get_environ): Return a pointer to 'our_environ'.
2159 (captured_main): Initialize 'our_environ'.
2160 * server.h (get_environ): Adjust prototype.
2161 * spu-low.c (spu_create_inferior): Adjust code to access the
2162 environment information via 'gdb_environ' class.
2163
ae3e2ccf
SM
21642017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2165
2166 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2167 usage of "register" keyword.
2168
3e019bdc
SM
21692017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2170
2171 * configure: Re-generate.
2172
8465943a
SM
21732017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2174
2175 * configure: Re-generate.
2176
cf0dd6f0
SM
21772017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2178
2179 * Makefile.in (COMPILE.pre): Add "-x c++".
2180
9845682b
SDJ
21812017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2182
2183 * fork-child.c: Conditionally include <signal.h>.
2184
aefd8b33
SDJ
21852017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2186
2187 * server.c (handle_general_set): Handle new packet
2188 "QStartupWithShell".
2189 (handle_query): Add "QStartupWithShell" to the list of supported
2190 packets.
2191 (gdbserver_usage): Add help text explaining the
2192 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2193 options.
2194 (captured_main): Recognize and act upon the presence of the new
2195 CLI options.
2196
2090129c
SDJ
21972017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2198 Pedro Alves <palves@redhat.com>
2199
2200 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2201 * configure: Regenerate.
2202 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2203 "fork-inferior.o".
2204 (i[34567]86-*-lynxos*): Likewise.
2205 (spu*-*-*): Likewise.
2206 * fork-child.c: New file.
2207 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2208 and "environ.h".
2209 (linux_ptrace_fun): New function.
2210 (linux_create_inferior): Adjust function prototype to reflect
2211 change on "target.h". Adjust function code to use
2212 "fork_inferior".
2213 (linux_request_interrupt): Delete "signal_pid".
2214 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2215 (lynx_ptrace_fun): New function.
2216 (lynx_create_inferior): Adjust function prototype to reflect
2217 change on "target.h". Adjust function code to use
2218 "fork_inferior".
2219 * nto-low.c (nto_create_inferior): Adjust function prototype and
2220 code to reflect change on "target.h". Update comments.
2221 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2222 "common-terminal.h" and "environ.h".
2223 (terminal_fd): Moved to fork-child.c.
2224 (old_foreground_pgrp): Likewise.
2225 (restore_old_foreground_pgrp): Likewise.
2226 (last_status): Make it global.
2227 (last_ptid): Likewise.
2228 (our_environ): New variable.
2229 (startup_with_shell): Likewise.
2230 (program_name): Likewise.
2231 (program_argv): Rename to...
2232 (program_args): ...this.
2233 (wrapper_argv): New variable.
2234 (start_inferior): Delete function.
2235 (get_exec_wrapper): New function.
2236 (get_exec_file): Likewise.
2237 (get_environ): Likewise.
2238 (prefork_hook): Likewise.
2239 (post_fork_inferior): Likewise.
2240 (postfork_hook): Likewise.
2241 (postfork_child_hook): Likewise.
2242 (handle_v_run): Update code to deal with arguments coming from the
2243 remote host. Update calls from "start_inferior" to
2244 "create_inferior".
2245 (captured_main): Likewise. Initialize environment variable. Call
2246 "have_job_control".
2247 * server.h (post_fork_inferior): New prototype.
2248 (get_environ): Likewise.
2249 (last_status): Declare.
2250 (last_ptid): Likewise.
2251 (signal_pid): Likewise.
2252 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2253 (spu_ptrace_fun): New function.
2254 (spu_create_inferior): Adjust function prototype to reflect change
2255 on "target.h". Adjust function code to use "fork_inferior".
2256 * target.c (target_terminal_init): New function.
2257 (target_terminal_inferior): Likewise.
2258 (target_terminal_ours): Likewise.
2259 * target.h: Include <vector>.
2260 (struct target_ops) <create_inferior>: Update prototype.
2261 (create_inferior): Update macro.
2262 * utils.c (gdb_flush_out_err): New function.
2263 * win32-low.c (win32_create_inferior): Adjust function prototype
2264 and code to reflect change on "target.h".
2265
043a4934
SDJ
22662017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2267
2268 * inferiors.c (switch_to_thread): New function.
2269
15652511
SDJ
22702017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2271
2272 * Makefile.in (SFILE): Add "common/job-control.c".
2273 (OBS): Add "job-control.o".
2274
21ea5acd
SDJ
22752017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2276
2277 * Makefile: Remove "@host_makefile_frag@".
2278
e13cb306
PA
22792017-05-05 Pedro Alves <palves@redhat.com>
2280
2281 * configure: Regenerate.
2282
c94fee56
SDJ
22832017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2284
2285 * configure: Regenerate.
2286
a0ff9e1a
SM
22872017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2288
2289 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2290 software_single_step change of return type to
2291 std::vector<CORE_ADDR>.
2292 * linux-low.c (install_software_single_step_breakpoints):
2293 Likewise.
2294 * linux-low.h (install_software_single_step_breakpoints):
2295 Likewise.
2296
be628ab8
SDJ
22972017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2298
2299 * remote-utils.c: Include "gdb_termios.h" instead of
2300 "terminal.h".
2301 * terminal.h: Delete file.
2302
7c5ded6a
SDJ
23032017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2304
2305 * server.c: Include <vector>.
2306 <program_argv, wrapper_argv>: Convert to std::vector.
2307 (start_inferior): Rewrite function to use C++.
2308 (handle_v_run): Likewise. Update code that calculates the argv
2309 based on the vRun packet; use C++.
2310 (captured_main): Likewise.
2311
436252de
SM
23122017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2313
2314 * server.c (handle_v_cont): Initialize thread_resume::thread
2315 with null_ptid.
2316
9bf2a700
PA
23172017-04-05 Pedro Alves <palves@redhat.com>
2318
2319 * configure: Regenerate.
2320
a121b7c1
PA
23212017-04-05 Pedro Alves <palves@redhat.com>
2322
2323 * gdbreplay.c (sync_error): Constify.
2324 * linux-x86-low.c (push_opcode): Constify.
2325
21c8a587
PA
23262017-04-05 Pedro Alves <palves@redhat.com>
2327
2328 * win32-low.c (get_child_debug_event)
2329 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2330 Report TARGET_WAITKIND_SPURIOUS instead.
2331
fb32b4f7
PA
23322017-04-05 Pedro Alves <palves@redhat.com>
2333
2334 * remote-utils.c (remote_prepare, remote_open): Constify.
2335 * remote-utils.h (remote_prepare, remote_open): Constify.
2336 * server.c (captured_main): Constify 'port' handling.
2337
65dd1e59
SM
23382017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2339
2340 * Makefile.in (clean): Clear .deps.
2341
8fa5b777
SM
23422017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2343
2344 * .gitignore: Remove generated files, replace with wildcard.
2345 * (clean): Replace removal of generated files with wildcard.
2346 (version.c): Replace with...
2347 (version-generated.c): ...this.
2348 (xml-builtin.c): Replace with...
2349 (xml-builtin-generated.c): ...this.
2350 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2351 (%.c: *regformats*): Replace with...
2352 (%-generated.c: *regformats*): ...this.
2353
a12e714b
MF
23542017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2355
2356 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2357 (xtensa_fill_gregset): Call collect_register_by_name for
2358 threadptr register.
2359 (xtensa_store_gregset): Call supply_register_by_name for
2360 threadptr register.
2361
1a09b50a
MF
23622017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2363
2364 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2365 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2366 (xtensa_store_gregset): Call supply_register for all registers in
2367 a0_regnum..a0_regnum + C0_NREGS range.
2368
1a01e7c6
SM
23692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2370
2371 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2372 (ax-ipa.o: ax.c): Remove.
2373 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2374 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2375 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2376 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2377 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2378
36bc18a8
SM
23792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2380
2381 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2382 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2383 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2384 (errors-ipa.o: ../common/errors.c): Remove.
2385 (format-ipa.o: ../common/format.c): Remove.
2386 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2387
a8ebe3d5
SM
23882017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2389
2390 * Makefile.in (%-ipa.o: %.c): New rule.
2391 (tracepoint-ipa.o: tracepoint.c): Remove.
2392 (utils-ipa.o: utils.c): Remove.
2393 (remote-utils-ipa.o: remote-utils.c): Remove.
2394 (regcache-ipa.o: regcache.c): Remove.
2395 (i386-linux-ipa.o: i386-linux.c): Remove.
2396 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2397 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2398 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2399 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2400 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2401 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2402 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2403 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2404 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2405 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2406 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2407 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2408 (aarch64-ipa.o: aarch64.c): Remove.
2409 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2410 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2411 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2412 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2413 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2414 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2415 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2416 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2417 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2418 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2419 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2420 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2421 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2422 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2423 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2424 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2425 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2426 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2427 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2428 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2429 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2430 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2431 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2432 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2433 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2434 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2435 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2436 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2437 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2438 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2439 (tdesc-ipa.o: tdesc.c): Remove.
2440 (x32-linux-ipa.o: x32-linux.c): Remove.
2441 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2442 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2443
50cfacb7
SM
24442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2445
2446 * Makefile.in (%.o: ../arch/%.c): New rule.
2447 (arm.o: ../arch/arm.c): Remove.
2448 (arm-linux.o: ../arch/arm-linux.c): Remove.
2449 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2450 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2451
c5a22423
SM
24522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2453
2454 * Makefile.in (%.o: ../nat/%.c): New rule.
2455 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2456 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2457 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2458 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2459 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2460 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2461 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2462 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2463 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2464 (linux-personality.o: ../nat/linux-personality.c): Remove.
2465 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2466 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2467 (x86-linux.o: ../nat/x86-linux.c): Remove.
2468 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2469 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2470
6bda016b
SM
24712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2472
2473 * Makefile.in (%.o: ../common/%.c): New rule.
2474 (signals.o: ../common/signals.c): Remove.
2475 (print-utils.o: ../common/print-utils.c): Remove.
2476 (rsp-low.o: ../common/rsp-low.c): Remove.
2477 (common-utils.o: ../common/common-utils.c): Remove.
2478 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2479 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2480 (vec.o: ../common/vec.c): Remove.
2481 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2482 (xml-utils.o: ../common/xml-utils.c): Remove.
2483 (ptid.o: ../common/ptid.c): Remove.
2484 (buffer.o: ../common/buffer.c): Remove.
2485 (format.o: ../common/format.c): Remove.
2486 (filestuff.o: ../common/filestuff.c): Remove.
2487 (agent.o: ../common/agent.c): Remove.
2488 (errors.o: ../common/errors.c): Remove.
2489 (environ.o: ../common/environ.c): Remove.
2490 (common-debug.o: ../common/common-debug.c): Remove.
2491 (cleanups.o: ../common/cleanups.c): Remove.
2492 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2493 (fileio.o: ../common/fileio.c): Remove.
2494 (common-regcache.o: ../common/common-regcache.c): Remove.
2495 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2496 (new-op.o: ../common/new-op.c): Remove.
2497 (btrace-common.o: ../common/btrace-common.c): Remove.
2498
21122961
SM
24992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2500
2501 * Makefile.in (%.o: ../target/%.c): New rule.
2502 (waitstatus.o: ../target/waitstatus.c): Remove.
2503
c362e621
SM
25042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2505
2506 * Makefile.in
2507 (%.c: ../regformats/%.dat,
2508 (%.c: ../regformats/arm/%.dat,
2509 (%.c: ../regformats/i386/%.dat,
2510 (%.c: ../regformats/rs6000/%.dat): New rules.
2511 (aarch64.c): Remove.
2512 (reg-arm.c): Remove.
2513 (arm-with-iwmmxt.c): Remove.
2514 (arm-with-vfpv2.c): Remove.
2515 (arm-with-vfpv3.c): Remove.
2516 (arm-with-neon.c): Remove.
2517 (reg-bfin.c): Remove.
2518 (reg-cris.c): Remove.
2519 (reg-crisv32.c): Remove.
2520 (i386.c): Remove.
2521 (i386-linux.c): Remove.
2522 (i386-avx.c): Remove.
2523 (i386-avx-linux.c): Remove.
2524 (i386-avx-avx512.c): Remove.
2525 (i386-avx-avx512-linux.c): Remove.
2526 (i386-mpx.c): Remove.
2527 (i386-mpx-linux.c): Remove.
2528 (i386-avx-mpx-avx512-pku.c): Remove.
2529 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2530 (i386-avx-mpx.c): Remove.
2531 (i386-avx-mpx-linux.c): Remove.
2532 (i386-mmx.c): Remove.
2533 (i386-mmx-linux.c): Remove.
2534 (reg-ia64.c): Remove.
2535 (reg-m32r.c): Remove.
2536 (reg-m68k.c): Remove.
2537 (reg-cf.c): Remove.
2538 (mips-linux.c): Remove.
2539 (mips-dsp-linux.c): Remove.
2540 (mips64-linux.c): Remove.
2541 (mips64-dsp-linux.c): Remove.
2542 (nios2-linux.c): Remove.
2543 (powerpc-32.c): Remove.
2544 (powerpc-32l.c): Remove.
2545 (powerpc-altivec32l.c): Remove.
2546 (powerpc-cell32l.c): Remove.
2547 (powerpc-vsx32l.c): Remove.
2548 (powerpc-isa205-32l.c): Remove.
2549 (powerpc-isa205-altivec32l.c): Remove.
2550 (powerpc-isa205-vsx32l.c): Remove.
2551 (powerpc-e500l.c): Remove.
2552 (powerpc-64l.c): Remove.
2553 (powerpc-altivec64l.c): Remove.
2554 (powerpc-cell64l.c): Remove.
2555 (powerpc-vsx64l.c): Remove.
2556 (powerpc-isa205-64l.c): Remove.
2557 (powerpc-isa205-altivec64l.c): Remove.
2558 (powerpc-isa205-vsx64l.c): Remove.
2559 (s390-linux32.c): Remove.
2560 (s390-linux32v1.c): Remove.
2561 (s390-linux32v2.c): Remove.
2562 (s390-linux64.c): Remove.
2563 (s390-linux64v1.c): Remove.
2564 (s390-linux64v2.c): Remove.
2565 (s390-te-linux64.c): Remove.
2566 (s390-vx-linux64.c): Remove.
2567 (s390-tevx-linux64.c): Remove.
2568 (s390x-linux64.c): Remove.
2569 (s390x-linux64v1.c): Remove.
2570 (s390x-linux64v2.c): Remove.
2571 (s390x-te-linux64.c): Remove.
2572 (s390x-vx-linux64.c): Remove.
2573 (s390x-tevx-linux64.c): Remove.
2574 (tic6x-c64xp-linux.c): Remove.
2575 (tic6x-c64x-linux.c): Remove.
2576 (tic6x-c62x-linux.c): Remove.
2577 (reg-sh.c): Remove.
2578 (reg-sparc64.c): Remove.
2579 (reg-spu.c): Remove.
2580 (amd64.c): Remove.
2581 (amd64-linux.c): Remove.
2582 (amd64-avx.c): Remove.
2583 (amd64-avx-linux.c): Remove.
2584 (amd64-avx-avx512.c): Remove.
2585 (amd64-avx-avx512-linux.c): Remove.
2586 (amd64-mpx.c): Remove.
2587 (amd64-mpx-linux.c): Remove.
2588 (amd64-avx-mpx-avx512-pku.c): Remove.
2589 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2590 (amd64-avx-mpx.c): Remove.
2591 (amd64-avx-mpx-linux.c): Remove.
2592 (x32.c): Remove.
2593 (x32-linux.c): Remove.
2594 (x32-avx.c): Remove.
2595 (x32-avx-linux.c): Remove.
2596 (x32-avx-avx512.c): Remove.
2597 (x32-avx-avx512-linux.c): Remove.
2598 (reg-xtensa.c): Remove.
2599 (reg-tilegx.c): Remove.
2600 (reg-tilegx32.c): Remove.
2601
1672e0d9
SDJ
26022017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2603
2604 * Makefile.in (SFILES): Add "common/environ.c".
2605 (OBJS): Add "common/environ.h".
2606
239b6d10
WT
26072017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2608
2609 * configure.ac: Check if the fs_base and gs_base members of
2610 `struct user_regs_struct' exist.
2611 * config.in: Regenerated.
2612 * configure: Likewise.
2613
694b382c
AT
26142017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2615
2616 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2617 target_read_memory.
2618 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2619 (get_next_pcs_syscall_next_pc): Likewise.
2620
7dc53023
LM
26212016-12-23 Luis Machado <lgustavo@codesourcery.com>
2622
2623 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2624 * nto-x86-low.c: Likewise.
2625
ad02e4fe
SM
26262016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2627
2628 * Makefile.in: Include disable-implicit-rules.mk.
2629
dcb07cfa
PA
26302016-11-23 Pedro Alves <palves@redhat.com>
2631
2632 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2633 (debug_vprintf): Use std::chrono::steady_clock instead of
2634 gettimeofday. Use '.' instead of ':'.
2635 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2636 (get_timestamp): Use std::chrono::steady_clock instead of
2637 gettimeofday.
2638
8629c02c
SM
26392016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2640
2641 * Makefile.in: Fix whitespace formatting.
2642
b593ecca
SM
26432016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2644
2645 * Makefile.in (SFILES, OBS): Flatten list and order
2646 alphabetically.
2647
9986ba08
PA
26482016-11-23 Pedro Alves <palves@redhat.com>
2649
2650 * event-loop.c (handle_file_event): Use warning.
2651 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2652 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2653 Use warning.
2654
4eefa7bc
PA
26552016-11-23 Pedro Alves <palves@redhat.com>
2656
2657 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2658 output.
2659 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2660 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2661 debug_printf and debug_flush for debug output.
2662 * server.c (handle_general_set): Likewise.
2663 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2664 output.
2665
5443506e
SM
26662016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2667
2668 * Makefile.in (.c.o): Replace rule with ...
2669 (%.o: %.c): ... this one.
2670
3b165252
SM
26712016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2672
2673 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2674 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2675 make.
2676 * configure.ac: Remove checks for the make program.
2677 * configure: Re-generate.
2678
0bcda685
PA
26792016-10-28 Pedro Alves <palves@redhat.com>
2680
2681 * Makefile.in (CXX_DIALECT): Get from configure.
2682 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2683 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2684 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2685 * config.in: Regenerate.
2686 * configure: Regenerate.
2687
c3805894
YQ
26882016-10-27 Yao Qi <yao.qi@linaro.org>
2689
2690 * linux-low.c (linux_supports_range_stepping): Return true if
2691 can_software_single_step return true.
2692
89342618
YQ
26932016-10-27 Yao Qi <yao.qi@linaro.org>
2694
2695 * inferiors.c (find_inferior_in_random): New function.
2696 * inferiors.h (find_inferior_in_random): Declare.
2697 * linux-low.c (linux_wait_for_event_filtered): Call
2698 find_inferior_in_random instead of find_inferior.
2699
e3652c84
YQ
27002016-10-27 Yao Qi <yao.qi@linaro.org>
2701
2702 * linux-low.c (linux_wait_1): If single-step breakpoints are
2703 inserted, remove them.
2704
5a04c4cf
PA
27052016-10-26 Pedro Alves <palves@redhat.com>
2706
2707 * linux-low.c (handle_extended_wait): Link parent/child fork
2708 threads.
2709 (linux_wait_1): Unlink them.
2710 (linux_set_resume_request): Ignore resume requests for
2711 already-resumed and unhandled fork child threads.
2712 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2713 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2714 New functions.
2715 (handle_v_requests) <vCont>: Don't call require_running.
2716 * server.h (in_queued_stop_replies): New declaration.
2717
cb93dc7f
YQ
27182016-10-24 Yao Qi <yao.qi@linaro.org>
2719
2720 PR server/20733
2721 * linux-aarch64-low.c (append_insns): Cast the return value to
2722 'uint32_t *'.
2723
a1078bea
YQ
27242016-10-10 Yao Qi <yao.qi@linaro.org>
2725
2726 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2727
1fb77080
SDJ
27282016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2729
2730 * target.c (target_supports_multi_process): New function, moved
2731 from...
2732 * target.h (target_supports_multi_process): ... here. Remove
2733 macro.
2734
39b5a3b9
TT
27352016-10-05 Tom Tromey <tom@tromey.com>
2736
2737 PR remote/20655:
2738 * tracepoint.c (handle_tracepoint_bkpts): Check
2739 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2740
c1d0b70a
YQ
27412016-10-05 Yao Qi <yao.qi@linaro.org>
2742
2743 * configure.srv: Update the path of arm-*.xml files.
2744
0a69eedb
YQ
27452016-10-05 Terry Guo <terry.guo@arm.com>
2746 Yao Qi <yao.qi@linaro.org>
2747
2748 * Makefile.in: Adjust the path of rules.
2749 * configure.srv: Update the path of xml files.
2750 * regformats/arm-with-iwmmxt.dat: Regenerated.
2751 * regformats/arm-with-neon.dat: Likewise.
2752 * regformats/arm-with-vfpv2.dat: Likewise.
2753 * regformats/arm-with-vfpv3.dat Likewise.
2754
17e16485
YQ
27552016-09-30 Yao Qi <yao.qi@linaro.org>
2756
2757 PR gdbserver/20627
2758 * target.c (target_stop_and_wait): Don't call
2759 target_continue_no_signal, use resume_stop instead.
2760
edeeb602
YQ
27612016-09-26 Yao Qi <yao.qi@linaro.org>
2762
2763 * linux-low.c (linux_wait_1): Call debug_exit.
2764
503b1c39
PA
27652016-09-23 Pedro Alves <palves@redhat.com>
2766
2767 * Makefile.in (SFILES): Add common/new-op.c.
2768 (OBS): Add common/new-op.o.
2769 (new-op.o): New rule.
2770
74172ecf
SM
27712016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2772
2773 * .gitinore: Ignore more files.
2774
fc6cda2e
YQ
27752016-09-21 Yao Qi <yao.qi@linaro.org>
2776
2777 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2778 23.
2779
bc1e6c81
SDJ
27802016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2781
2782 * server.c (start_inferior): Call target_mourn_inferior instead of
2783 mourn_inferior; pass ptid_t argument to it.
2784 (resume): Likewise.
2785 (handle_target_event): Likewise.
2786 * target.c (target_mourn_inferior): New function.
2787 * target.h (mourn_inferior): Delete macro.
2788
0e00e962
AA
27892016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2790
2791 * linux-low.c (lwp_is_stepping): New function.
2792
1d8cb77d
CL
27932016-09-06 Carl Love <cel@us.ibm.com>
2794
2795 * server.c (start_inferior): Fixed comment, requested comment change
2796 didn't get updated correctly. Removed reference to ptrace () call as
2797 it is only true on Linux systems.
2798
7313bced
CL
27992016-09-06 Carl Love <cel@us.ibm.com>
2800
2801 * server.c (start_inferior): Do not call
2802 function target_post_create_inferior () if the
2803 inferior process has already exited.
2804
cf6de44d
PA
28052016-09-05 Pedro Alves <palves@redhat.com>
2806
2807 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2808 (COMPILE.pre, CC_LD): Use CXX directly.
2809 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2810 * acinclude.m4: Don't include build-with-cxx.m4.
2811 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2812 * configure: Regenerate.
2813
c1da6748
AT
28142016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2815
2816 PR gdb/19495
2817 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2818 call writing data to own_buf.
2819
f2b9e3df
SDJ
28202016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2821
2822 * target.c (mywait): Call target_wait instead of
2823 the_target->wait.
2824 (target_wait): New function.
2825
049a8570
SDJ
28262016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2827
2828 * server.c (start_inferior): New variable 'ptid'. Replace calls
2829 to the_target->resume by target_continue{,_no_signal}, depending
2830 on the case.
2831 * target.c (target_stop_and_wait): Call target_continue_no_signal
2832 instead of the_target->resume.
2833 (target_continue): New function.
2834
3aa5cfa0
AT
28352016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2836
2837 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2838
754653a7
AZ
28392016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2840
2841 PR server/20491
2842 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2843 ps_prochandle.
2844 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2845 * linux-arm-low.c (ps_get_thread_area): Likewise.
2846 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2847 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2848 * linux-mips-low.c (ps_get_thread_area): Likewise.
2849 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2850 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2851 * linux-x86-low.c (ps_get_thread_area): Likewise.
2852 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2853
ed036b40
PA
28542016-08-19 Pedro Alves <palves@redhat.com>
2855
2856 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2857
c8ef42ee
PA
28582016-08-19 Pedro Alves <palves@redhat.com>
2859
2860 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2861 comment. Use memcpy instead of casting through unsigned long.
2862
9c235a72
PA
28632016-08-19 Pedro Alves <palves@redhat.com>
2864
2865 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2866 allocating around 0x80000000.
2867
201506da
PA
28682016-08-19 Pedro Alves <palves@redhat.com>
2869
2870 PR gdb/20415
2871 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2872 (x32-avx512-linux-ipa.o): New rules.
2873 * configure.ac (x86_64-*-linux*): New x32 check.
2874 * configure.srv (ipa_x32_linux_regobj): New.
2875 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2876 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2877 descriptions.
2878 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2879 descriptions.
2880 * configure: Regenerate.
2881
f348d89a
PA
28822016-08-09 Pedro Alves <palves@redhat.com>
2883
2884 PR gdb/18653
2885 * Makefile.in (OBS): Add signals-state-save-restore.o.
2886 (signals-state-save-restore.o): New rule.
2887 * config.in: Regenerate.
2888 * configure: Regenerate.
2889 * linux-low.c: Include "signals-state-save-restore.h".
2890 (linux_create_inferior): Call
2891 restore_original_signals_state.
2892 * server.c: Include "dispositions-save-restore.h".
2893 (captured_main): Call save_original_signals_state.
2894
1baf5149
PA
28952016-08-05 Pedro Alves <palves@redhat.com>
2896
2897 * configure: Regenerate.
2898
fcd4a73d
YQ
28992016-08-04 Yao Qi <yao.qi@linaro.org>
2900
2901 * linux-low.c (regsets_fetch_inferior_registers): Check
2902 errno is ESRCH or not.
2903
979659d0
YQ
29042016-08-02 Yao Qi <yao.qi@linaro.org>
2905
2906 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2907 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2908 (thread_db_load_search): Update.
2909 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2910 td_ta_set_event and td_ta_event_getmsg.
2911
6598661d
PA
29122016-07-26 Pedro Alves <palves@redhat.com>
2913
2914 PR server/20414
2915 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2916 of unsigned long for 64-bit registers and use uint32_t instead of
2917 unsigned int for 32-bit registers.
2918
9cf12d57
PA
29192016-07-26 Pedro Alves <palves@redhat.com>
2920
2921 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2922 to 'ptrace'.
2923
305450ed
TT
29242016-07-21 Tom Tromey <tom@tromey.com>
2925
2926 * configure: Rebuild.
2927
2583da7c
YQ
29282016-07-21 Yao Qi <yao.qi@linaro.org>
2929
2930 * mem-break.c (find_gdb_breakpoint): Cast bp to
2931 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2932
21536b36
YQ
29332016-07-21 Yao Qi <yao.qi@linaro.org>
2934
2935 * server.c (handle_v_requests): Support s and S actions
2936 if target_supports_software_single_step return true.
2937
8901d193
YQ
29382016-07-21 Yao Qi <yao.qi@linaro.org>
2939
2940 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2941 is resume_step, call maybe_hw_step.
2942 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2943 and unstop them.
2944 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2945 breakpoints or not.
2946 (proceed_one_lwp): If resume request is resume_step, install
2947 reinsert breakpoints and call maybe_hw_step.
2948
0e9a339e
YQ
29492016-07-21 Yao Qi <yao.qi@linaro.org>
2950
2951 * linux-low.c (proceed_one_lwp): Declare.
2952 (linux_resume_one_thread): Remove local variable 'step'.
2953 Lift code enqueue signal. Call proceed_one_lwp instead of
2954 linux_resume_one_lwp.
2955
4281b351
YQ
29562016-07-21 Yao Qi <yao.qi@linaro.org>
2957
2958 * linux-low.c (linux_resume_one_thread): Call
2959 enqueue_pending_signal.
2960
984a2c04
YQ
29612016-07-21 Yao Qi <yao.qi@linaro.org>
2962
2963 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2964 * inferiors.c (do_restore_current_thread_cleanup): New function.
2965 (make_cleanup_restore_current_thread): Likewise.
2966 * linux-low.c (install_software_single_step_breakpoints): Call
2967 make_cleanup_restore_current_thread. Switch current_thread to
2968 thread.
2969
bec903c9
YQ
29702016-07-21 Yao Qi <yao.qi@linaro.org>
2971
2972 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2973 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2974 (clone_one_breakpoint): Likewise.
2975 (delete_reinsert_breakpoints): Change parameter to thread.
2976 Callers updated.
2977 (has_reinsert_breakpoints): Likewise.
2978 (uninsert_reinsert_breakpoints): Likewise.
2979 (reinsert_reinsert_breakpoints): Likewise.
2980 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2981 (delete_reinsert_breakpoints): Likewise.
2982 (reinsert_reinsert_breakpoints): Likewise.
2983 (uninsert_reinsert_breakpoints): Likewise.
2984 (has_reinsert_breakpoints): Likewise.
2985
63c40ec7
YQ
29862016-07-21 Yao Qi <yao.qi@linaro.org>
2987
2988 * inferiors.c (get_thread_process): Make parameter const.
2989 * inferiors.h (get_thread_process): Update declaration.
2990 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2991 Add new parameters child_thread and parent_thread. Callers
2992 updated.
2993 * mem-break.h (clone_all_breakpoints): Update declaration.
2994
9aa76cd0
YQ
29952016-07-21 Yao Qi <yao.qi@linaro.org>
2996
2997 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2998 <command_list, handler>: Remove.
2999 (struct gdb_breakpoint): New.
3000 (struct other_breakpoint): New.
3001 (struct reinsert_breakpoint): New.
3002 (is_gdb_breakpoint): New function.
3003 (any_persistent_commands): Update command_list if
3004 is_gdb_breakpoint returns true.
3005 (set_breakpoint): Create breakpoints according to their types.
3006 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3007 (set_gdb_breakpoint_1): Likewise.
3008 (set_gdb_breakpoint): Likewise.
3009 (clear_breakpoint_conditions): Change parameter type to
3010 'struct gdb_breakpoint *'.
3011 (clear_breakpoint_commands): Likewise.
3012 (clear_breakpoint_conditions_and_commands): Likewise.
3013 (add_condition_to_breakpoint): Likewise.
3014 (add_breakpoint_condition): Likewise.
3015 (add_commands_to_breakpoint): Likewise.
3016 (check_breakpoints): Check other_breakpoint.
3017 (clone_one_breakpoint): Clone breakpopint according to its type.
3018 * mem-break.h (struct gdb_breakpoint): Declare.
3019 (set_gdb_breakpoint): Update declaration.
3020 (clear_breakpoint_conditions_and_commands): Likewise.
3021 (add_breakpoint_condition): Likewise.
3022 (add_breakpoint_commands): Likewise.
3023 * server.c (process_point_options): Change parameter type to
3024 'struct gdb_breakpoint *'.
3025
811f8301
YQ
30262016-07-21 Yao Qi <yao.qi@linaro.org>
3027
3028 * mem-break.c (set_breakpoint_at): Rename it to ...
3029 (set_breakpoint_type_at): ... it.
3030 (set_breakpoint_at): Call set_breakpoint_type_at.
3031 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3032 * mem-break.h (set_breakpoint_at): Update comments.
3033
b1c51e36
CLT
30342016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3035
3036 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3037 to buf parameter.
3038 (nios2_store_gregset): Likewise.
3039
ced2dffb
PA
30402016-07-01 Pedro Alves <palves@redhat.com>
3041 Antoine Tremblay <antoine.tremblay@ericsson.com>
3042
3043 * linux-low.c: Change interface to take the target lwp_info
3044 pointer directly and return void. Handle detaching from a zombie
3045 thread.
3046 (linux_detach_lwp_callback): New function.
3047 (linux_detach): Detach from the leader thread after detaching from
3048 the clone threads.
3049
2ac09a5b
YQ
30502016-06-28 Yao Qi <yao.qi@linaro.org>
3051
3052 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3053 for variable new_offset.
3054 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3055 (aarch64_ftrace_insn_reloc_cb): Likewise.
3056 (aarch64_ftrace_insn_reloc_tb): Likewise.
3057 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3058 PRIx64 instead of PRIx32.
3059
79e7fd4f
YQ
30602016-06-28 Yao Qi <yao.qi@linaro.org>
3061
3062 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3063 (the_low_target): Install arm_get_syscall_trapinfo.
3064
061fc021
YQ
30652016-06-28 Yao Qi <yao.qi@linaro.org>
3066
3067 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3068 function.
3069 (the_low_target): Install aarch64_get_syscall_trapinfo.
3070
4cc32bec
YQ
30712016-06-28 Yao Qi <yao.qi@linaro.org>
3072
3073 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3074 Callers updated.
3075 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3076 Remove parameter sysno.
3077 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3078 sysret.
3079
782c1122
AA
30802016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3081
3082 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3083 (s390_emit_ne_goto): Likewise.
3084 (s390_emit_lt_goto): Likewise.
3085 (s390_emit_le_goto): Likewise.
3086 (s390_emit_gt_goto): Likewise.
3087 (s390_emit_ge_goto): Likewise.
3088 (s390x_emit_eq_goto): Likewise.
3089 (s390x_emit_ne_goto): Likewise.
3090 (s390x_emit_lt_goto): Likewise.
3091 (s390x_emit_le_goto): Likewise.
3092 (s390x_emit_gt_goto): Likewise.
3093 (s390x_emit_ge_goto): Likewise.
3094 (s390_emit_ops_impl): Mark variable static.
3095 (s390x_emit_ops): Likewise.
3096
2e7b624b
YQ
30972016-06-17 Yao Qi <yao.qi@linaro.org>
3098
3099 * linux-low.c (handle_extended_wait): Call
3100 uninsert_reinsert_breakpoints for the parent process. Remove
3101 reinsert breakpoints from the child process. Reinsert them to
3102 the parent process when vfork is done.
3103 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3104 (reinsert_reinsert_breakpoints): New function.
3105 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3106 (reinsert_reinsert_breakpoints): Declare.
3107
8a81c5d7
YQ
31082016-06-17 Yao Qi <yao.qi@linaro.org>
3109
3110 * linux-low.c (handle_extended_wait): If the parent is doing
3111 step-over, remove the reinsert breakpoints from the forked child.
3112
f50bf8e5
YQ
31132016-06-17 Yao Qi <yao.qi@linaro.org>
3114
3115 * linux-low.c (unsuspend_all_lwps): Declare.
3116 (linux_low_filter_event): If thread exited, call finish_step_over.
3117 If step-over is finished, unsuspend other threads.
3118
8376a3cb
YQ
31192016-06-17 Yao Qi <yao.qi@linaro.org>
3120
3121 * linux-low.c (linux_resume_one_lwp_throw): Assert
3122 has_reinsert_breakpoints returns false.
3123 * mem-break.c (delete_disabled_breakpoints): Assert
3124 bp type isn't reinsert_breakpoint.
3125
f79b145d
YQ
31262016-06-17 Yao Qi <yao.qi@linaro.org>
3127
3128 * linux-low.c (maybe_hw_step): New function.
3129 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3130 (finish_step_over): Switch current_thread to lwp temporarily,
3131 and assert has_reinsert_breakpoints returns true.
3132 (proceed_one_lwp): Call maybe_hw_step.
3133 * mem-break.c (has_reinsert_breakpoints): New function.
3134 * mem-break.h (has_reinsert_breakpoints): Declare.
3135
0ae534d2
JT
31362016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3137
3138 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3139
fcdad592
YQ
31402016-05-17 Yao Qi <yao.qi@linaro.org>
3141
3142 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3143 instead of find_inferior.
3144
9e784964
YQ
31452016-05-05 Yao Qi <yao.qi@linaro.org>
3146
3147 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3148 Initialize res to zero.
3149
cf2ebb6e
YQ
31502016-05-05 Yao Qi <yao.qi@linaro.org>
3151
3152 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3153 to uint32_t.
3154
c1aebf87
UW
31552016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3156
3157 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3158 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3159 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3160
35fd2deb 31612016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3162 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3163
3164 * tracepoint.c (write_inferior_int8): New function.
3165 (cmd_qtenable_disable): Write enable flag using
3166 write_inferior_int8.
3167
484b3c32
YQ
31682016-04-25 Yao Qi <yao.qi@linaro.org>
3169
3170 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3171 (need_step_over_p): Return zero if the LWP has pending signals
3172 can be delivered on software single step target.
3173
85ba7d86
YQ
31742016-04-25 Yao Qi <yao.qi@linaro.org>
3175
3176 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3177 return instead of error.
3178
3539aa13
YQ
31792016-04-22 Yao Qi <yao.qi@linaro.org>
3180
3181 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3182 to 23.
3183
5b061e98
YQ
31842016-04-22 Yao Qi <yao.qi@linaro.org>
3185
3186 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3187 signal when stepping over breakpoint with software single
3188 step.
3189
3451269c
PA
31902016-04-21 Pedro Alves <palves@redhat.com>
3191
3192 * linux-s390-low.c (s390_collect_ptrace_register)
3193 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3194 add casts.
3195 (s390_check_regset): Use void * instead of gdb_byte *.
3196
a2358508
PA
31972016-04-20 Pedro Alves <palves@redhat.com>
3198
3199 * configure: Renegerate.
3200
6885166d
YQ
32012016-04-20 Yao Qi <yao.qi@linaro.org>
3202
3203 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3204 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3205 number 16.
3206 (arm_store_gregset): Likewise.
3207
2b863f51
WT
32082016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3209
3210 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3211 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3212 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3213 (amd64-avx-mpx-linux.c): New rules.
3214 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3215 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3216 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3217 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3218 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3219 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3220 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3221 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3222 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3223 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3224 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3225 * linux-x86-low.c (x86_linux_read_description): Add case for
3226 X86_XSTATE_AVX_MPX_MASK.
3227 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3228 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3229 init_registers_i386_avx_mpx_linux.
3230 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3231 (initialize_low_tracepoint): Call
3232 init_registers_i386_avx_mpx_linux.
3233 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3234 (initialize_low_tracepoint): Call
3235 init_registers_amd64_avx_mpx_linux.
3236 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3237 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3238 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3239 declarations.
3240
9b30624b
PA
32412016-04-18 Pedro Alves <palves@redhat.com>
3242
3243 * configure: Regenerate.
3244
45e3745e
AT
32452016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3246
3247 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3248 (aarch64_emit_sub): Likewise.
3249
2afc13ff
PA
32502016-04-12 Pedro Alves <palves@redhat.com>
3251
3252 * utils.c (prepare_to_throw_exception): Delete.
3253
6e774b13
SM
32542016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3255
3256 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3257
4dca19f8
MK
32582016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3259
3260 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3261
d0a9981f
MK
32622016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3263
3264 * linux-aarch64-ipa.c: Add <elf.h> include.
3265 * linux-ppc-ipa.c: Add <elf.h> include.
3266 * linux-s390-ipa.c: Add <elf.h> include.
3267
252db07e
MK
32682016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3269
3270 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3271 (get_raw_reg_ptr): Likewise.
3272 (get_trace_state_variable_value_ptr): Likewise.
3273 (set_trace_state_variable_value_ptr): Likewise.
3274 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3275 char *.
3276
14e2b6d9
MK
32772016-03-31 Wei-cheng Wang <cole945@gmail.com>
3278 Marcin Kościelnicki <koriakin@0x04.net>
3279
3280 PR/17221
3281 * linux-ppc-low.c (emit_insns): New function.
3282 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3283 (ppc_emit_prologue): New function.
3284 (ppc_emit_epilogue): New function.
3285 (ppc_emit_add): New function.
3286 (ppc_emit_sub): New function.
3287 (ppc_emit_mul): New function.
3288 (ppc_emit_lsh): New function.
3289 (ppc_emit_rsh_signed): New function.
3290 (ppc_emit_rsh_unsigned): New function.
3291 (ppc_emit_ext): New function.
3292 (ppc_emit_zero_ext): New function.
3293 (ppc_emit_log_not): New function.
3294 (ppc_emit_bit_and): New function.
3295 (ppc_emit_bit_or): New function.
3296 (ppc_emit_bit_xor): New function.
3297 (ppc_emit_bit_not): New function.
3298 (ppc_emit_equal): New function.
3299 (ppc_emit_less_signed): New function.
3300 (ppc_emit_less_unsigned): New function.
3301 (ppc_emit_ref): New function.
3302 (ppc_emit_const): New function.
3303 (ppc_emit_reg): New function.
3304 (ppc_emit_pop): New function.
3305 (ppc_emit_stack_flush): New function.
3306 (ppc_emit_swap): New function.
3307 (ppc_emit_stack_adjust): New function.
3308 (ppc_emit_call): New function.
3309 (ppc_emit_int_call_1): New function.
3310 (ppc_emit_void_call_2): New function.
3311 (ppc_emit_if_goto): New function.
3312 (ppc_emit_goto): New function.
3313 (ppc_emit_eq_goto): New function.
3314 (ppc_emit_ne_goto): New function.
3315 (ppc_emit_lt_goto): New function.
3316 (ppc_emit_le_goto): New function.
3317 (ppc_emit_gt_goto): New function.
3318 (ppc_emit_ge_goto): New function.
3319 (ppc_write_goto_address): New function.
3320 (ppc_emit_ops_impl): New static variable.
3321 (ppc64v1_emit_prologue): New function.
3322 (ppc64v2_emit_prologue): New function.
3323 (ppc64_emit_epilogue): New function.
3324 (ppc64_emit_add): New function.
3325 (ppc64_emit_sub): New function.
3326 (ppc64_emit_mul): New function.
3327 (ppc64_emit_lsh): New function.
3328 (ppc64_emit_rsh_signed): New function.
3329 (ppc64_emit_rsh_unsigned): New function.
3330 (ppc64_emit_ext): New function.
3331 (ppc64_emit_zero_ext): New function.
3332 (ppc64_emit_log_not): New function.
3333 (ppc64_emit_bit_and): New function.
3334 (ppc64_emit_bit_or): New function.
3335 (ppc64_emit_bit_xor): New function.
3336 (ppc64_emit_bit_not): New function.
3337 (ppc64_emit_equal): New function.
3338 (ppc64_emit_less_signed): New function.
3339 (ppc64_emit_less_unsigned): New function.
3340 (ppc64_emit_ref): New function.
3341 (ppc64_emit_const): New function.
3342 (ppc64v1_emit_reg): New function.
3343 (ppc64v2_emit_reg): New function.
3344 (ppc64_emit_pop): New function.
3345 (ppc64_emit_stack_flush): New function.
3346 (ppc64_emit_swap): New function.
3347 (ppc64v1_emit_call): New function.
3348 (ppc64v2_emit_call): New function.
3349 (ppc64v1_emit_int_call_1): New function.
3350 (ppc64v2_emit_int_call_1): New function.
3351 (ppc64v1_emit_void_call_2): New function.
3352 (ppc64v2_emit_void_call_2): New function.
3353 (ppc64_emit_if_goto): New function.
3354 (ppc64_emit_eq_goto): New function.
3355 (ppc64_emit_ne_goto): New function.
3356 (ppc64_emit_lt_goto): New function.
3357 (ppc64_emit_le_goto): New function.
3358 (ppc64_emit_gt_goto): New function.
3359 (ppc64_emit_ge_goto): New function.
3360 (ppc64v1_emit_ops_impl): New static variable.
3361 (ppc64v2_emit_ops_impl): New static variable.
3362 (ppc_emit_ops): New function.
3363 (linux_low_target): Wire in ppc_emit_ops.
3364
a2174ba4
MK
33652016-03-31 Wei-cheng Wang <cole945@gmail.com>
3366 Marcin Kościelnicki <koriakin@0x04.net>
3367
3368 PR/17221
3369 * Makefile.in: Add powerpc-*-ipa.o
3370 * configure.srv: Add ipa_obj for powerpc*-linux.
3371 * linux-ppc-ipa.c: New file.
3372 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3373 includes.
3374 (PPC_FIELD): New macro.
3375 (PPC_SEXT): New macro.
3376 (PPC_OP6): New macro.
3377 (PPC_BO): New macro.
3378 (PPC_LI): New macro.
3379 (PPC_BD): New macro.
3380 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3381 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3382 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3383 (ppc_get_thread_area): New function.
3384 (is_elfv2_inferior): New function.
3385 (gen_ds_form): New function.
3386 (GEN_STD): New macro.
3387 (GEN_STDU): New macro.
3388 (GEN_LD): New macro.
3389 (GEN_LDU): New macro.
3390 (gen_d_form): New function.
3391 (GEN_ADDI): New macro.
3392 (GEN_ADDIS): New macro.
3393 (GEN_LI): New macro.
3394 (GEN_LIS): New macro.
3395 (GEN_ORI): New macro.
3396 (GEN_ORIS): New macro.
3397 (GEN_LWZ): New macro.
3398 (GEN_STW): New macro.
3399 (GEN_STWU): New macro.
3400 (gen_xfx_form): New function.
3401 (GEN_MFSPR): New macro.
3402 (GEN_MTSPR): New macro.
3403 (GEN_MFCR): New macro.
3404 (GEN_MTCR): New macro.
3405 (GEN_SYNC): New macro.
3406 (GEN_LWSYNC): New macro.
3407 (gen_x_form): New function.
3408 (GEN_OR): New macro.
3409 (GEN_MR): New macro.
3410 (GEN_LWARX): New macro.
3411 (GEN_STWCX): New macro.
3412 (GEN_CMPW): New macro.
3413 (gen_md_form): New function.
3414 (GEN_RLDICL): New macro.
3415 (GEN_RLDICR): New macro.
3416 (gen_i_form): New function.
3417 (GEN_B): New macro.
3418 (GEN_BL): New macro.
3419 (gen_b_form): New function.
3420 (GEN_BNE): New macro.
3421 (GEN_LOAD): New macro.
3422 (GEN_STORE): New macro.
3423 (gen_limm): New function.
3424 (gen_atomic_xchg): New function.
3425 (gen_call): New function.
3426 (ppc_relocate_instruction): New function.
3427 (ppc_install_fast_tracepoint_jump_pad): New function.
3428 (ppc_get_min_fast_tracepoint_insn_len): New function.
3429 (ppc_get_ipa_tdesc_idx): New function.
3430 (the_low_target): Wire in the new functions.
3431 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3432 tdescs.
3433 * linux-ppc-tdesc.h: New file.
3434
a13c4696
MK
34352016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3436
3437 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3438 (alloc_jump_pad_buffer): New function.
3439 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3440 (alloc_jump_pad_buffer): New function.
3441 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3442 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3443 (alloc_jump_pad_buffer): New function.
3444 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3445 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3446 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3447 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3448
1cda1512
MK
34492016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3450
3451 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3452 * linux-amd64-ipa.c: Likewise.
3453 * linux-i386-ipa.c: Likewise.
3454 * linux-s390-ipa.c: Likewise.
3455 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3456 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3457 set_trace_state_variable_value_ptr.
3458 (struct ipa_sym_addresses): Likewise.
3459 (symbol_list): Likewise.
3460 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3461 accessing gdb_collect directly.
3462 (gdb_collect_ptr_type): New typedef.
3463 (get_raw_reg_ptr_type): New typedef.
3464 (get_trace_state_variable_value_ptr_type): New typedef.
3465 (set_trace_state_variable_value_ptr_type): New typedef.
3466 (gdb_collect_ptr): New global.
3467 (get_raw_reg_ptr): New global.
3468 (get_trace_state_variable_value_ptr): New global.
3469 (set_trace_state_variable_value_ptr): New global.
3470 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3471 accessing get_raw_reg directly.
3472 (get_get_tsv_func_addr): Likewise for
3473 get_trace_state_variable_value_ptr.
3474 (get_set_tsv_func_addr): Likewise for
3475 set_trace_state_variable_value_ptr.
3476 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3477
72fb5488
SM
34782016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3479
3480 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3481
28170b88
MK
34822016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3483
3484 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3485 packets.
3486 (relocate_instruction): Remove own_buf.
3487 * server.c (own_buf): Make global.
3488 (handle_v_requests): Make global.
3489 * server.h (own_buf): New declaration.
3490 (handle_v_requests): New prototype.
3491
f39e8743
MK
34922016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3493
3494 PR 18377
3495 * linux-s390-low.c (add_insns): New function.
3496 (s390_emit_prologue): New function.
3497 (s390_emit_epilogue): New function.
3498 (s390_emit_add): New function.
3499 (s390_emit_sub): New function.
3500 (s390_emit_mul): New function.
3501 (s390_emit_lsh): New function.
3502 (s390_emit_rsh_signed): New function.
3503 (s390_emit_rsh_unsigned): New function.
3504 (s390_emit_ext): New function.
3505 (s390_emit_log_not): New function.
3506 (s390_emit_bit_and): New function.
3507 (s390_emit_bit_or): New function.
3508 (s390_emit_bit_xor): New function.
3509 (s390_emit_bit_not): New function.
3510 (s390_emit_equal): New function.
3511 (s390_emit_less_signed): New function.
3512 (s390_emit_less_unsigned): New function.
3513 (s390_emit_ref): New function.
3514 (s390_emit_if_goto): New function.
3515 (s390_emit_goto): New function.
3516 (s390_write_goto_address): New function.
3517 (s390_emit_litpool): New function.
3518 (s390_emit_const): New function.
3519 (s390_emit_call): New function.
3520 (s390_emit_reg): New function.
3521 (s390_emit_pop): New function.
3522 (s390_emit_stack_flush): New function.
3523 (s390_emit_zero_ext): New function.
3524 (s390_emit_swap): New function.
3525 (s390_emit_stack_adjust): New function.
3526 (s390_emit_set_r2): New function.
3527 (s390_emit_int_call_1): New function.
3528 (s390_emit_void_call_2): New function.
3529 (s390_emit_eq_goto): New function.
3530 (s390_emit_ne_goto): New function.
3531 (s390_emit_lt_goto): New function.
3532 (s390_emit_le_goto): New function.
3533 (s390_emit_gt_goto): New function.
3534 (s390_emit_ge_goto): New function.
3535 (s390x_emit_prologue): New function.
3536 (s390x_emit_epilogue): New function.
3537 (s390x_emit_add): New function.
3538 (s390x_emit_sub): New function.
3539 (s390x_emit_mul): New function.
3540 (s390x_emit_lsh): New function.
3541 (s390x_emit_rsh_signed): New function.
3542 (s390x_emit_rsh_unsigned): New function.
3543 (s390x_emit_ext): New function.
3544 (s390x_emit_log_not): New function.
3545 (s390x_emit_bit_and): New function.
3546 (s390x_emit_bit_or): New function.
3547 (s390x_emit_bit_xor): New function.
3548 (s390x_emit_bit_not): New function.
3549 (s390x_emit_equal): New function.
3550 (s390x_emit_less_signed): New function.
3551 (s390x_emit_less_unsigned): New function.
3552 (s390x_emit_ref): New function.
3553 (s390x_emit_if_goto): New function.
3554 (s390x_emit_const): New function.
3555 (s390x_emit_call): New function.
3556 (s390x_emit_reg): New function.
3557 (s390x_emit_pop): New function.
3558 (s390x_emit_stack_flush): New function.
3559 (s390x_emit_zero_ext): New function.
3560 (s390x_emit_swap): New function.
3561 (s390x_emit_stack_adjust): New function.
3562 (s390x_emit_int_call_1): New function.
3563 (s390x_emit_void_call_2): New function.
3564 (s390x_emit_eq_goto): New function.
3565 (s390x_emit_ne_goto): New function.
3566 (s390x_emit_lt_goto): New function.
3567 (s390x_emit_le_goto): New function.
3568 (s390x_emit_gt_goto): New function.
3569 (s390x_emit_ge_goto): New function.
3570 (s390_emit_ops): New function.
3571 (struct linux_target_ops): Fill in emit_ops hook.
3572
abd9baf9
MK
35732016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3574
3575 PR 18377
3576 * Makefile.in: Add s390 IPA files.
3577 * configure.srv: Build IPA for s390.
3578 * linux-s390-ipa.c: New file.
3579 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3580 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3581 (tdesc_s390_linux32): Likewise.
3582 (init_registers_s390_linux32v1): Likewise.
3583 (tdesc_s390_linux32v1): Likewise.
3584 (init_registers_s390_linux32v2): Likewise.
3585 (tdesc_s390_linux32v2): Likewise.
3586 (init_registers_s390_linux64): Likewise.
3587 (tdesc_s390_linux64): Likewise.
3588 (init_registers_s390_linux64v1): Likewise.
3589 (tdesc_s390_linux64v1): Likewise.
3590 (init_registers_s390_linux64v2): Likewise.
3591 (tdesc_s390_linux64v2): Likewise.
3592 (init_registers_s390_te_linux64): Likewise.
3593 (tdesc_s390_te_linux64): Likewise.
3594 (init_registers_s390_vx_linux64): Likewise.
3595 (tdesc_s390_vx_linux64): Likewise.
3596 (init_registers_s390_tevx_linux64): Likewise.
3597 (tdesc_s390_tevx_linux64): Likewise.
3598 (init_registers_s390x_linux64): Likewise.
3599 (tdesc_s390x_linux64): Likewise.
3600 (init_registers_s390x_linux64v1): Likewise.
3601 (tdesc_s390x_linux64v1): Likewise.
3602 (init_registers_s390x_linux64v2): Likewise.
3603 (tdesc_s390x_linux64v2): Likewise.
3604 (init_registers_s390x_te_linux64): Likewise.
3605 (tdesc_s390x_te_linux64): Likewise.
3606 (init_registers_s390x_vx_linux64): Likewise.
3607 (tdesc_s390x_vx_linux64): Likewise.
3608 (init_registers_s390x_tevx_linux64): Likewise.
3609 (tdesc_s390x_tevx_linux64): Likewise.
3610 (have_hwcap_s390_vx): New static variable.
3611 (s390_arch_setup): Fill have_hwcap_s390_vx.
3612 (s390_get_thread_area): New function.
3613 (s390_ft_entry_gpr_esa): New const.
3614 (s390_ft_entry_gpr_zarch): New const.
3615 (s390_ft_entry_misc): New const.
3616 (s390_ft_entry_fr): New const.
3617 (s390_ft_entry_vr): New const.
3618 (s390_ft_main_31): New const.
3619 (s390_ft_main_64): New const.
3620 (s390_ft_exit_fr): New const.
3621 (s390_ft_exit_vr): New const.
3622 (s390_ft_exit_misc): New const.
3623 (s390_ft_exit_gpr_esa): New const.
3624 (s390_ft_exit_gpr_zarch): New const.
3625 (append_insns): New function.
3626 (s390_relocate_instruction): New function.
3627 (s390_install_fast_tracepoint_jump_pad): New function.
3628 (s390_get_min_fast_tracepoint_insn_len): New function.
3629 (s390_get_ipa_tdesc_idx): New function.
3630 (struct linux_target_ops): Wire in the above functions.
3631 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3632 * linux-s390-tdesc.h: New file.
3633
a4105d04
MK
36342016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3635
3636 * linux-s390-low.c (s390_supports_tracepoints): New function.
3637 (struct linux_target_ops): Fill supports_tracepoints hook.
3638
35ac8b3e
YQ
36392016-03-18 Yao Qi <yao.qi@linaro.org>
3640
3641 * linux-low.c (lwp_signal_can_be_delivered): New function.
3642 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3643
94610ec4
YQ
36442016-03-18 Yao Qi <yao.qi@linaro.org>
3645
3646 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3647 0 if signal is enqueued. Remove 'signal' from one debugging
3648 message. Move one debugging message to some lines below.
3649 Remove code setting 'signal' to 0.
3650
80aea927
YQ
36512016-03-18 Yao Qi <yao.qi@linaro.org>
3652
3653 * linux-low.c (linux_low_filter_event): Remove redundant
3654 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3655
b04fd3be
MK
36562016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3657
3658 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3659 (struct linux_target_ops): Wire in the above.
3660
c40c8d4b
YQ
36612016-03-03 Yao Qi <yao.qi@linaro.org>
3662
3663 * linux-low.c: Update comments to start_step_over.
3664
0f8288ae
YQ
36652016-03-03 Yao Qi <yao.qi@linaro.org>
3666
3667 PR server/19736
3668 * linux-low.c (handle_extended_wait): Set child suspended
3669 if event_lwp->bp_reinsert isn't zero.
3670
fdbd04a8
YQ
36712016-03-02 Yao Qi <yao.qi@linaro.org>
3672
3673 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3674 enqueue_pending_signal.
3675
6896a8fa
MK
36762016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3677
3678 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3679 is actually loaded.
3680
ab503087
MK
36812016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3682
3683 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3684 (s390_regmap_3264) [!__s390x__]: New global.
3685 (s390_collect_ptrace_register): Skip map entries containing -1.
3686 (s390_supply_ptrace_register): Ditto.
3687 (s390_fill_gprs_high): New function.
3688 (s390_store_gprs_high): New function.
3689 (s390_regsets): Add NT_S390_HIGH_GPRS.
3690 (s390_get_hwcap): Enable on 31-bit.
3691 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3692 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3693 Detect NT_S390_HIGH_GPRS.
3694 (s390_usrregs_info_3264): Enable on 31-bit.
3695 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3696 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3697
ae91f625
MK
36982016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3699
3700 PR gdb/13808
3701 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3702 * configure.srv: Ditto.
3703 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3704 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3705 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3706 (init_registers_amd64_linux): Remove prototype.
3707 (tdesc_amd64_linux): Remove declaration.
3708 (get_ipa_tdesc): New function.
3709 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3710 initialize remaining tdescs.
3711 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3712 (init_registers_i386_linux): Remove prototype.
3713 (tdesc_i386_linux): Remove declaration.
3714 (get_ipa_tdesc): New function.
3715 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3716 initialize remaining tdescs.
3717 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3718 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3719 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3720 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3721 (x86_get_ipa_tdesc_idx): New function.
3722 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3723 * linux-x86-tdesc.h: New file.
3724 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3725 (target_get_ipa_tdesc_idx): New macro.
3726 * tracepoint.c (ipa_tdesc_idx): New macro.
3727 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3728 (symbol_list): Add ipa_tdesc_idx.
3729 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3730 (ipa_tdesc): Remove.
3731 (ipa_tdesc_idx): New variable.
3732 (get_context_regcache): Use get_ipa_tdesc.
3733 (gdb_collect): Ditto.
3734 (gdb_probe): Ditto.
3735 * tracepoint.h (get_ipa_tdesc): New prototype.
3736 (ipa_tdesc): Remove.
3737
e7ad2f14
PA
37382016-02-24 Pedro Alves <palves@redhat.com>
3739
3740 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3741 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3742 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3743 Factor out common code between the USE_SIGTRAP_SIGINFO and
3744 !USE_SIGTRAP_SIGINFO blocks.
3745 (linux_low_filter_event): Call save_stop_reason instead of
3746 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3747 Update comments.
3748 (linux_wait_1): Update comments.
3749
657f9cde
WW
37502016-02-24 Wei-cheng Wang <cole945@gmail.com>
3751
3752 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3753 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3754 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3755 ppc_insert_point, ppc_remove_point.
3756
b00b61e1
MK
37572016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3758
3759 * linux-s390-low.c (s390_supports_z_point_type): New function.
3760 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3761
553cb527
YQ
37622016-02-16 Yao Qi <yao.qi@linaro.org>
3763
3764 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3765 PC. Get pc from regcache_read_pc.
3766
a5652c21
YQ
37672016-02-12 Yao Qi <yao.qi@linaro.org>
3768
3769 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3770 or linux_get_pc_32bit.
3771 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3772
ed443b61
YQ
37732016-02-12 Yao Qi <yao.qi@linaro.org>
3774
3775 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3776 arm_linux_get_next_pcs_fixup.
3777
020ecd38
MK
37782016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3779
3780 * tracepoint.c (x_tracepoint_action_download): Change
3781 write_inferior_data_ptr to write_inferior_data_pointer.
3782 (cmd_qtstart): Likewise.
3783 (write_inferior_data_ptr): Remove.
3784 (download_agent_expr): Change write_inferior_data_ptr to
3785 write_inferior_data_pointer.
3786 (download_tracepoint_1): Likewise.
3787 (download_tracepoint): Likewise.
3788 (download_trace_state_variables): Likewise.
3789
7cae9051
WW
37902016-02-11 Wei-cheng Wang <cole945@gmail.com>
3791 Marcin Kościelnicki <koriakin@0x04.net>
3792
3793 * tracepoint.c (struct tracepoint_action_ops): Remove.
3794 (struct tracepoint_action): Remove ops.
3795 (m_tracepoint_action_download, r_tracepoint_action_download)
3796 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3797 size and offset accordingly.
3798 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3799 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3800 (tracepoint_action_send, tracepoint_action_download): New functions.
3801 Helpers for trace action handlers.
3802 (add_tracepoint_action): Remove setup actions ops.
3803 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3804
9f6a71b4
YQ
38052016-02-10 Yao Qi <yao.qi@linaro.org>
3806
3807 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3808
1e94266c
SM
38092016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3810
3811 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3812 to AC_OUTPUT.
3813 * configure: Regenerate.
3814
8adce034
SM
38152016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3816
3817 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3818 void * to gdb_byte *.
3819 * linux-low.c (siginfo_fixup): Likewise.
3820 (linux_xfer_siginfo): Likewise.
3821 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3822 Likewise.
3823 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3824
93813b37
WT
38252016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3826
3827 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3828 to srv_tgtobj.
3829 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3830 to srv_tgtobj.
3831 * linux-x86-low.c [__x86_64__]: Include
3832 "nat/amd64-linux-siginfo.h".
3833 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3834 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3835 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3836 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3837 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3838 (cpt_si_fd, si_timerid, si_overrun): Move from
3839 nat/amd64-linux-siginfo.c.
3840 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3841
8424cc97
SM
38422016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3843
3844 * server.c (skip_to_semicolon): Remove.
3845 (process_point_options): Use strchrnul instead of
3846 skip_to_semicolon.
3847
4d18591b
YQ
38482016-01-26 Yao Qi <yao.qi@linaro.org>
3849
3850 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3851 * linux-low.c (install_software_single_step_breakpoints): Don't
3852 call regcache_read_pc.
3853 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3854 argument pc.
3855
d8020970
YQ
38562016-01-26 Yao Qi <yao.qi@linaro.org>
3857
3858 * linux-low.c (install_software_single_step_breakpoints): Call
3859 regcache_read_pc instead of get_pc.
3860
8b207339
YQ
38612016-01-26 Yao Qi <yao.qi@linaro.org>
3862
3863 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3864 (unblock_async_io): Rename to ...
3865 (block_unblock_async_io): ... it. New function.
3866 (enable_async_io): Don't install SIGIO handler. Unblock it
3867 instead.
3868 (disable_async_io): Don't ignore SIGIO. Block it instead.
3869 (initialize_async_io): Install SIGIO handler. Don't call
3870 unblock_async_io.
3871
18879fef
YQ
38722016-01-26 Yao Qi <yao.qi@linaro.org>
3873
3874 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3875 first character is '\003', call *the_target->request_interrupt.
3876
a0f8e08a
YQ
38772016-01-25 Yao Qi <yao.qi@linaro.org>
3878
3879 * remote-utils.c (new_thread_notify): Remove.
3880 (dead_thread_notify): Likewise.
3881 * remote-utils.h (new_thread_notify): Remove declaration.
3882 (dead_thread_notify): Likewise.
3883
cc5fd9ab
MK
38842016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3885
3886 * gdb.trace/pending.exp: Fix expected message on continue.
3887
99e8eb11
MK
38882016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3889
3890 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3891 it works properly on big-endian machines where sizeof (CORE_ADDR)
3892 != sizeof (void *).
3893
a994041d
PA
38942016-01-21 Pedro Alves <palves@redhat.com>
3895
3896 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3897 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3898 * configure: Regenerate.
3899
f7a6a40d
YQ
39002016-01-21 Yao Qi <yao.qi@linaro.org>
3901
3902 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3903 is_thumb and set it according to CPSR saved on the stack.
3904 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3905 arm_sigreturn_next_pc.
3906
6f69e520
YQ
39072016-01-18 Yao Qi <yao.qi@linaro.org>
3908
3909 * linux-low.c (linux_set_pc_64bit): New function.
3910 (linux_get_pc_64bit): New function.
3911 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3912 Declare.
3913 * linux-sparc-low.c (debug_threads): Remove declaration.
3914 (sparc_get_pc): Remove.
3915 (the_low_target): Use linux_get_pc_64bit instead of
3916 sparc_get_pc.
3917 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3918 (the_low_target): Use linux_get_pc_64bit and
3919 linux_set_pc_64bit.
3920
276d4552
YQ
39212016-01-18 Yao Qi <yao.qi@linaro.org>
3922
3923 * linux-arm-low.c (debug_threads): Remove declaration.
3924 (arm_get_pc, arm_set_pc): Remove.
3925 (the_low_target): Use linux_get_pc_32bit and
3926 linux_set_pc_32bit.
3927 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3928 (the_low_target): Use linux_get_pc_32bit and
3929 linux_set_pc_32bit.
3930 * linux-cris-low.c (debug_threads): Remove declaration.
3931 (cris_get_pc, cris_set_pc,): Remove.
3932 (the_low_target): Use linux_get_pc_32bit and
3933 linux_set_pc_32bit.
3934 * linux-crisv32-low.c (debug_threads): Remove declaration.
3935 (cris_get_pc, cris_set_pc): Remove.
3936 (the_low_target): Use linux_get_pc_32bit and
3937 linux_set_pc_32bit.
3938 * linux-low.c: Include inttypes.h.
3939 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3940 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3941 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3942 (the_low_target): Use linux_get_pc_32bit and
3943 linux_set_pc_32bit.
3944 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3945 (the_low_target): Use linux_get_pc_32bit and
3946 linux_set_pc_32bit.
3947 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3948 (the_low_target): Use linux_get_pc_32bit and
3949 linux_set_pc_32bit.
3950 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3951 (the_low_target): Use linux_get_pc_32bit and
3952 linux_set_pc_32bit.
3953 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3954 (the_low_target): Use linux_get_pc_32bit and
3955 linux_set_pc_32bit.
3956
eb0edac8
GB
39572016-01-18 Gary Benson <gbenson@redhat.com>
3958
3959 * configure.ac (AC_FUNC_FORK): New check.
3960 * config.in: Regenerate.
3961 * configure: Likewise.
3962
1b451dda
YQ
39632016-01-14 Yao Qi <yao.qi@linaro.org>
3964
3965 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3966 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3967 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3968 arm_get_next_pcs_ctor.
3969
82075af2
JS
39702016-01-12 Josh Stone <jistone@redhat.com>
3971 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3972
3973 * inferiors.h: Include "gdb_vecs.h".
3974 (struct process_info): Add syscalls_to_catch.
3975 * inferiors.c (remove_process): Free syscalls_to_catch.
3976 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3977 syscall_return stops.
3978 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3979 * server.c (handle_general_set): Handle QCatchSyscalls.
3980 (handle_query): Report support for QCatchSyscalls.
3981 * target.h (struct target_ops): Add supports_catch_syscall.
3982 (target_supports_catch_syscall): New macro.
3983 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3984 (struct lwp_info): Add syscall_state.
3985 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3986 Maintain syscall_state and syscalls_to_catch across exec.
3987 (get_syscall_trapinfo): New function, proxy to the_low_target.
3988 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3989 (linux_low_filter_event): Toggle syscall_state entry/return for
3990 syscall traps, and set it ignored for all others.
3991 (gdb_catching_syscalls_p): New function.
3992 (gdb_catch_this_syscall_p): New function.
3993 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3994 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3995 (linux_supports_catch_syscall): New function.
3996 (linux_target_ops): Install it.
3997 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3998 (the_low_target): Install it.
3999
8f13a3ce
MF
40002016-01-12 Mike Frysinger <vapier@gentoo.org>
4001
4002 * acinclude.m4: Include new ../warning.m4 file.
4003 * configure: Regenerated.
4004 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4005
5b3da067
MF
40062016-01-12 Mike Frysinger <vapier@gentoo.org>
4007
4008 * ax.c (is_goto_target): Mark static.
4009 * linux-low.c (register_addr): Likewise.
4010 (linux_fetch_registers, linux_store_registers): Likewise.
4011 * mem-break.c (any_persistent_commands): Fix old prototype.
4012 (add_commands_to_breakpoint): Mark static.
4013 * regcache.c (find_register_by_name): Delete unused func.
4014 * remote-utils.c (hex_or_minus_one): Mark static.
4015 * server.c (monitor_show_help): Mark static.
4016 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4017 handle_v_requests): Likewise.
4018
bc504a31
PA
40192016-01-12 Pedro Alves <palves@redhat.com>
4020
4021 Remove use of the registered trademark symbol throughout.
4022
5a0dd67a
YQ
40232016-01-08 Yao Qi <yao.qi@linaro.org>
4024
4025 * remote-utils.c (getpkt): If c is '\003', call target hook
4026 request_interrupt.
4027
b2ca446f
YQ
40282016-01-06 Yao Qi <yao.qi@linaro.org>
4029
4030 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4031 linux-aarch32-low.c.
4032 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4033 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4034 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4035 (thumb2_breakpoint): Declare.
4036 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4037 linux-aarch32-low.h.
4038 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4039 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4040 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4041
edd88788
JB
40422016-01-01 Joel Brobecker <brobecker@adacore.com>
4043
4044 * gdbreplay.c (gdbreplay_version): Change copyright year in
4045 version message.
4046 * server.c (gdbserver_version): Likewise.
4047
65da7f14
PP
40482015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4049
4050 * server.c (crc32_table): Delete.
4051 (crc32): Use libiberty's xcrc32 function.
4052
4abd5ed2
JB
40532015-12-22 Joel Brobecker <brobecker@adacore.com>
4054
4055 * lynx-low.c (lynx_delete_thread_callback): New function.
4056 (lynx_mourn): Properly delete our process and all of its
4057 threads. Remove call to clear_inferiors.
4058
0e50fe5c
JB
40592015-12-22 Joel Brobecker <brobecker@adacore.com>
4060
4061 * target.c (thread_search_callback): Add check that
4062 the thread_stopped target callback is not NULL before
4063 calling it.
4064
35adc03f
YQ
40652015-12-21 Yao Qi <yao.qi@linaro.org>
4066
4067 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4068 arm breakpoint.
4069
bd2b2909
AT
40702015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4071
4072 * server.c (handle_query): Call target_supports_software_single_step.
4073
7fe5e27e
AT
40742015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4075
4076 * linux-low.c (single_step): New function.
4077 (linux_resume_one_lwp_throw): Call single_step.
4078 (start_step_over): Likewise.
4079
d9311bfa
AT
40802015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4081
4082 * Makefile.in (SFILES): Append arch/arm-linux.c,
4083 arch/arm-get-next-pcs.c.
4084 (arm-linux.o): New rule.
4085 (arm-get-next-pcs.o): New rule.
4086 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4087 arm-linux.o.
4088 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4089 to linux-aarch32-low.c.
4090 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4091 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4092 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4093 (thumb2_breakpoint_len): Likewise.
4094 (arm_is_thumb_mode): Make non-static.
4095 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4096 from linux-aarch32-low.c.
4097 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4098 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4099 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4100 (thumb2_breakpoint_len): Likewise.
4101 (arm_is_thumb_mode): New declaration.
4102 * linux-arm-low.c: Include arch/arm-linux.h
4103 aarch/arm-get-next-pcs.h, sys/syscall.h.
4104 (get_next_pcs_ops): New struct.
4105 (get_next_pcs_addr_bits_remove): New function.
4106 (get_next_pcs_is_thumb): New function.
4107 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4108 (arm_sigreturn_next_pc): Likewise.
4109 (get_next_pcs_syscall_next_pc): Likewise.
4110 (arm_gdbserver_get_next_pcs): Likewise.
4111 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4112 Initialize.
4113 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4114 * server.h: Include gdb_vecs.h.
4115
68ce2059
AT
41162015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4117
4118 * Makefile.in (SFILES): Append common/common-regcache.c.
4119 (OBS): Append common-regcache.o.
4120 (common-regcache.o): New rule.
4121 * regcache.c (init_register_cache): Initialize cache to
4122 REG_UNAVAILABLE.
4123 (regcache_raw_read_unsigned): New function.
4124 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4125 register_status enum.
4126
fa5308bd
AT
41272015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4128
4129 * linux-aarch64-low.c (the_low_targets): Rename
4130 breakpoint_reinsert_addr to get_next_pcs.
4131 * linux-arm-low.c (the_low_targets): Likewise.
4132 * linux-bfin-low.c (the_low_targets): Likewise.
4133 * linux-cris-low.c (the_low_targets): Likewise.
4134 * linux-crisv32-low.c (the_low_targets): Likewise.
4135 * linux-low.c (can_software_single_step): Likewise.
4136 (install_software_single_step_breakpoints): New function.
4137 (start_step_over): Use install_software_single_step_breakpoints.
4138 * linux-low.h: New CORE_ADDR vector.
4139 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4140 get_next_pcs.
4141 * linux-mips-low.c (the_low_targets): Likewise.
4142 * linux-nios2-low.c (the_low_targets): Likewise.
4143 * linux-sparc-low.c (the_low_targets): Likewise.
4144
4a6ed09b
PA
41452015-12-17 Pedro Alves <palves@redhat.com>
4146
4147 * linux-low.c (linux_kill_one_lwp): Remove references to
4148 LinuxThreads.
4149 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4150 to 'kill'.
4151 (linux_init_signals): Delete.
4152 (initialize_low): Adjust.
4153 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4154
7544db95
PA
41552015-12-16 Pedro Alves <palves@redhat.com>
4156
4157 * configure.ac (compiler warning flags): When testing a
4158 -Wno-foo option, check whether -Wfoo works instead.
4159 * configure: Regenerate.
4160
8020350c
DB
41612015-12-11 Don Breazeal <donb@codesourcery.com>
4162
4163 * server.c (process_serial_event): Don't exit from gdbserver
4164 in remote mode if there are still active inferiors.
4165
db91f502
YQ
41662015-12-11 Yao Qi <yao.qi@linaro.org>
4167
4168 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4169 arm_breakpoint_at if the process is 32-bit.
4170
b37a6290
YQ
41712015-12-11 Yao Qi <yao.qi@linaro.org>
4172
4173 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4174 arm breakpoint.
4175
17b1509a
YQ
41762015-12-07 Yao Qi <yao.qi@linaro.org>
4177
4178 * configure.srv: Append arm.o to srv_tgtobj for
4179 aarch64*-*-linux* target.
4180 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4181 from linux-arm-low.c.
4182 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4183 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4184 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4185 (thumb2_breakpoint_len): Likewise.
4186 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4187 (arm_breakpoint_kinds): Likewise.
4188 (arm_breakpoint_kind_from_pc): Likewise.
4189 (arm_sw_breakpoint_from_kind): Likewise.
4190 (arm_breakpoint_kind_from_current_state): Likewise.
4191 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4192 (arm_sw_breakpoint_from_kind): Declare.
4193 (arm_breakpoint_kind_from_current_state): Declare.
4194 (arm_breakpoint_at): Declare.
4195 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4196 arm_sw_breakpoint_from_kind if process is 32-bit.
4197 (aarch64_breakpoint_kind_from_pc): New function.
4198 (aarch64_breakpoint_kind_from_current_state): New function.
4199 (the_low_target): Initialize fields breakpoint_kind_from_pc
4200 and breakpoint_kind_from_current_state.
4201 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4202 linux-aarch32-low.c.
4203 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4204 (arm_breakpoint, arm_breakpoint_len): Likewise.
4205 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4206 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4207 (arm_is_thumb_mode): Likewise.
4208 (arm_breakpoint_at): Likewise.
4209 (arm_breakpoint_kind_from_pc): Likewise.
4210 (arm_sw_breakpoint_from_kind): Likewise.
4211 (arm_breakpoint_kind_from_current_state): Likewise.
4212
4213 Revert:
4214 2015-08-04 Yao Qi <yao.qi@linaro.org>
4215
4216 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4217 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4218 * server.c (extended_protocol): Remove "static".
4219 * server.h (extended_protocol): Declare it.
4220
ece66d65
JS
42212015-12-04 Josh Stone <jistone@redhat.com>
4222
4223 * target.h (struct target_ops) <arch_setup>: Rename to ...
4224 (struct target_ops) <post_create_inferior>: ... this.
4225 (target_arch_setup): Rename to ...
4226 (target_post_create_inferior): ... this, calling post_create_inferior.
4227 * server.c (start_inferior): Update target_arch_setup calls to
4228 target_post_create_inferior.
4229 * linux-low.c (linux_low_ptrace_options): Forward declare.
4230 (linux_arch_setup): Update its comment for general use.
4231 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4232 (struct linux_target_ops): Use linux_post_create_inferior.
4233 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4234 to post_create_inferior.
4235 * nto-low.c (struct nto_target_ops): Likewise.
4236 * spu-low.c (struct spu_target_ops): Likewise.
4237 * win32-low.c (struct win32_target_ops): Likewise.
4238
e58c48b4
AT
42392015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4240
4241 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4242
fbec8956
AT
42432015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4244
4245 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4246 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4247 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4248 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4249 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4250 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4251 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4252 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4253 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4254 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4255 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4256 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4257
9b4c5f87
AT
42582015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4259
4260 * linux-low.c (linux_look_up_symbols): Don't call
4261 linux_supports_traceclone.
4262 * linux-low.h (thread_db_init): Remove use_events argument.
4263 * thread-db.c (thread_db_use_event): Remove global variable.
4264 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4265 (struct thread_db) <td_create_bp>: Remove field.
4266 (thread_db_create_event): Remove function.
4267 (thread_db_enable_reporting): Likewise.
4268 (find_one_thread): Don't check for thread_db_use_events.
4269 (attach_thread): Likewise.
4270 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4271 (try_thread_db_load_1): Don't check for thread_db_use_events.
4272 (thread_db_init): Remove use_events argument and thread events
4273 handling.
4274 (remove_thread_event_breakpoints): Remove function.
4275 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4276
7d00775e
AT
42772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4278
4279 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4280 New function.
4281 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4282 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4283 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4284 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4285 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4286 Initialize.
4287 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4288 New function.
4289 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4290 * linux-low.c (can_hardware_single_step): Use
4291 supports_hardware_single_step.
4292 (can_software_single_step): New function.
4293 (start_step_over): Call can_software_single_step.
4294 (linux_supports_hardware_single_step): New function.
4295 (struct target_ops) <supports_software_single_step>: Initialize.
4296 * linux-low.h (struct linux_target_ops)
4297 <supports_hardware_single_step>: Initialize.
4298 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4299 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4300 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4301 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4302 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4303 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4304 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4305 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4306 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4307 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4308 Initialize.
4309 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4310 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4311 Initialize.
4312 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4313 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4314 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4315 New function.
4316 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4317 * target.h (struct target_ops): <supports_software_single_step>:
4318 New field.
4319 (target_supports_software_single_step): New macro.
4320
2d97cd35
AT
43212015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4322
4323 * linux-low.c (linux_wait_1): Fix pc advance condition.
4324 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4325 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4326
769ef81f
AT
43272015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4328
4329 * linux-arm-low.c (arm_is_thumb_mode): New function.
4330 (arm_breakpoint_at): Use arm_is_thumb_mode.
4331 (arm_breakpoint_kind_from_current_state): New function.
4332 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4333 Initialize.
4334 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4335 (linux_breakpoint_kind_from_current_state): New function.
4336 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4337 * linux-low.h (struct linux_target_ops)
4338 <breakpoint_kind_from_current_state>: New field.
4339 * target.h (struct target_ops): Likewise.
4340 (target_breakpoint_kind_from_current_state): New macro.
4341
1bebeeca
PA
43422015-11-30 Pedro Alves <palves@redhat.com>
4343
4344 * linux-low.c (linux_resume): Wake up the event loop before
4345 returning.
4346
a67a9fae
PA
43472015-11-30 Pedro Alves <palves@redhat.com>
4348
4349 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4350 check.
4351 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4352 to -1.
4353 * target.c (struct thread_search): New structure.
4354 (thread_search_callback): New function.
4355 (prev_general_thread): New global.
4356 (prepare_to_access_memory, done_accessing_memory): New functions.
4357 * target.h (prepare_to_access_memory, done_accessing_memory):
4358 Replace macros with function declarations.
4359
f2faf941
PA
43602015-11-30 Pedro Alves <palves@redhat.com>
4361
4362 PR 14618
4363 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4364 report TARGET_WAITKIND_NO_RESUMED.
4365 * remote-utils.c (prepare_resume_reply): Handle
4366 TARGET_WAITKIND_NO_RESUMED.
4367 * server.c (report_no_resumed): New global.
4368 (handle_query) <qSupported>: Handle "no-resumed+". Report
4369 "no-resumed+" support.
4370 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4371 return error if the client doesn't support no-resumed events.
4372 (push_stop_notification): New function.
4373 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4374 events if the client supports them.
4375
a681f9c9
PA
43762015-11-30 Pedro Alves <palves@redhat.com>
4377
4378 * linux-low.c (thread_still_has_status_pending_p): Don't check
4379 vCont;t here.
4380 (lwp_resumed): New function.
4381 (status_pending_p_callback): Return early if the LWP is not
4382 supposed to be resumed.
4383
65706a29
PA
43842015-11-30 Pedro Alves <palves@redhat.com>
4385
4386 * linux-low.c (handle_extended_wait): Assert that the LWP's
4387 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4388 thread create events, leave the new child's status pending.
4389 (linux_low_filter_event): If GDB wants to hear about thread exit
4390 events, leave the LWP marked dead and don't delete it.
4391 (linux_wait_for_event_filtered): Don't check for thread exit.
4392 (filter_exit_event): New function.
4393 (linux_wait_1): Use it, when returning an exit event.
4394 (linux_resume_one_lwp_throw): Assert that the LWP's
4395 waitstatus is TARGET_WAITKIND_IGNORE.
4396 * remote-utils.c (prepare_resume_reply): Handle
4397 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4398 * server.c (report_thread_events): New global.
4399 (handle_general_set): Handle QThreadEvents.
4400 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4401 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4402 TARGET_WAITKIND_THREAD_EXITED.
4403 * server.h (report_thread_events): Declare.
4404
56cf4bed
PA
44052015-11-30 Pedro Alves <palves@redhat.com>
4406
4407 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4408 the thread's last_resume_kind was resume_stop.
4409
500c1d85
PA
44102015-11-30 Pedro Alves <palves@redhat.com>
4411
4412 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4413 before returning.
4414
de979965
PA
44152015-11-30 Pedro Alves <palves@redhat.com>
4416
4417 * server.c (handle_v_requests): Handle vCtrlC.
4418
34c65914
PA
44192015-11-30 Pedro Alves <palves@redhat.com>
4420
4421 * gdbthread.h (find_any_thread_of_pid): Declare.
4422 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4423 functions.
4424 * server.c (handle_query): If current_thread is NULL, look for
4425 another thread of the selected process.
4426
79efa585 44272015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4428 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4429
4430 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4431 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4432 name in reply.
4433 * target.h (struct target_ops) <thread_name>: New field.
4434 (target_thread_name): New macro.
4435
80d82c19
JB
44362015-11-23 Joel Brobecker <brobecker@adacore.com>
4437
4438 * regcache.h (regcache_invalidate_pid): Add declaration.
4439 * regcache.c (regcache_invalidate_pid): New function, extracted
4440 from regcache_invalidate.
4441 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4442 Add trivial documentation comment.
4443 * lynx-low.c: Use regcache_invalidate_pid instead of
4444 regcache_invalidate.
4445
64da5dd5
JB
44462015-11-23 Joel Brobecker <brobecker@adacore.com>
4447
4448 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4449 and Elf64_auxv_t if the target is Android.
4450
37ce4055
DE
44512015-11-22 Doug Evans <xdje42@gmail.com>
4452
4453 * target.h: #include <sys/types.h>.
4454
06e03fff
PA
44552015-11-19 Pedro Alves <palves@redhat.com>
4456
4457 * linux-low.c (linux_process_qsupported): Change prototype.
4458 Adjust.
4459 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4460 Change prototype.
4461 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4462 and adjust to loop over all features.
4463 * server.c (handle_query) <qSupported>: Adjust to call
4464 target_process_qsupported once, passing it a vector of unprocessed
4465 features.
4466 * target.h (struct target_ops) <process_qsupported>: Change
4467 prototype.
4468 (target_process_qsupported): Adjust.
4469
9a084706
PA
44702015-11-19 Pedro Alves <palves@redhat.com>
4471
4472 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4473 mode.
4474 * configure: Regenerate.
4475
dad44a1f
PA
44762015-11-19 Pedro Alves <palves@redhat.com>
4477
4478 * configure: Regenerate.
4479
231c0592
YQ
44802015-11-19 Yao Qi <yao.qi@linaro.org>
4481
4482 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4483 type to uint32_t.
4484
6c1c9a8b
YQ
44852015-11-19 Yao Qi <yao.qi@linaro.org>
4486
4487 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4488 (struct aarch64_operand): Move enum out.
4489
9caa3311
YQ
44902015-11-19 Yao Qi <yao.qi@linaro.org>
4491
4492 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4493 struct user_fpsimd_state *.
4494 (aarch64_store_fpregset): Likewise.
4495
6a69a054
YQ
44962015-11-19 Yao Qi <yao.qi@linaro.org>
4497
4498 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4499 struct user_pt_regs *.
4500 (aarch64_store_gregset): Likewise.
4501
1798301e
PA
45022015-11-18 Pedro Alves <palves@redhat.com>
4503
4504 * Makefile.in (all_object_files): Add $IPA_OBJS.
4505
ce7715e2
PA
45062015-11-17 Pedro Alves <palves@redhat.com>
4507
4508 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4509 GDB_SIGNAL_0 and gdb_signal_to_string.
4510
c0879059
PA
45112015-11-17 Pedro Alves <palves@redhat.com>
4512
4513 * win32-low.c (handle_output_debug_string): Remove parameter.
4514 (win32_kill): Remove our_status local and adjust call to
4515 handle_output_debug_string.
4516 (get_child_debug_event): Adjust call to
4517 handle_output_debug_string.
4518
1996e237
SM
45192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4520
4521 * linux-mips-low.c (mips_fill_gregset): Add cast.
4522 (mips_store_gregset): Likewise.
4523 (mips_fill_fpregset): Likewise.
4524 (mips_store_fpregset): Likewise.
4525
cbec665b
SM
45262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4527
4528 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4529 priv.
4530
eb3e3c67
SM
45312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4532
4533 * linux-mips-low.c (mips_linux_new_thread): Change type of
4534 watch_type to enum target_hw_bp_type.
4535
171de4b8
SM
45362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4537
4538 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4539 Change return type to arm_hwbp_type.
4540
04248ead
SM
45412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4542
4543 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4544 (arm_store_gregset): Likewise.
4545 * linux-arm-low.c (arm_get_hwcap): Likewise.
4546 (arm_read_description): Likewise.
4547
04b3479c
SM
45482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4549
4550 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4551
2bc84e8a
SM
45522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4553
4554 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4555 (ppc_fill_vsxregset): Likewise.
4556 (ppc_store_vsxregset): Likewise.
4557 (ppc_fill_vrregset): Likewise.
4558 (ppc_store_vrregset): Likewise.
4559 (ppc_fill_evrregset): Likewise.
4560 (ppc_store_evrregset): Likewise.
4561
e6c5bb05
SM
45622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4563
4564 * linux-ppc-low.c (ppc_usrregs_info): Remove
4565 forward-declaration.
4566 (ppc_arch_setup): Move lower in file.
4567
7ea45d72
SM
45682015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4569
4570 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4571 (ps_pdwrite): Likewise.
4572
69291610
HW
45732015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4574
4575 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4576 to after assert checks.
4577
b42945fd
SM
45782015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4579
4580 * proc-service.c (ps_pdread): Add/adjust casts.
4581 (ps_pdwrite): Add/adjust casts.
4582
d6f85c84
SM
45832015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4584
4585 * server.c (handle_search_memory_1): Cast return value of
4586 memmem.
4587
f98cd059
SM
45882015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4589
4590 * server.c (write_qxfer_response): Change type of data to
4591 gdb_byte *.
4592
d2412fa5
PA
45932015-10-29 Pedro Alves <palves@redhat.com>
4594
4595 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4596
c17414a2
PA
45972015-10-29 Pedro Alves <palves@redhat.com>
4598
4599 * tracepoint.c (clear_installed_tracepoints): Add casts.
4600
e053fbc4
PA
46012015-10-29 Pedro Alves <palves@redhat.com>
4602
4603 * server.c (handle_v_cont, process_serial_event): Add enum
4604 gdb_signal casts to signal parsing code.
4605
add67df8
PA
46062015-10-29 Pedro Alves <palves@redhat.com>
4607
4608 * linux-low.h (NULL_REGSET): Define.
4609 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4610 * linux-arm-low.c (arm_regsets): Likewise.
4611 * linux-crisv32-low.c (cris_regsets): Likewise.
4612 * linux-m68k-low.c (m68k_regsets): Likewise.
4613 * linux-mips-low.c (mips_regsets): Likewise.
4614 * linux-nios2-low.c (nios2_regsets): Likewise.
4615 * linux-ppc-low.c (ppc_regsets): Likewise.
4616 * linux-s390-low.c (s390_regsets): Likewise.
4617 * linux-sh-low.c (sh_regsets): Likewise.
4618 * linux-sparc-low.c (sparc_regsets): Likewise.
4619 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4620 * linux-tile-low.c (tile_regsets): Likewise.
4621 * linux-x86-low.c (x86_regsets): Likewise.
4622 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4623
50bc912a
PA
46242015-10-29 Pedro Alves <palves@redhat.com>
4625
4626 * linux-low.h (NULL_REGSET): Define.
4627 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4628 * linux-arm-low.c (arm_regsets): Likewise.
4629 * linux-crisv32-low.c (cris_regsets): Likewise.
4630 * linux-m68k-low.c (m68k_regsets): Likewise.
4631 * linux-mips-low.c (mips_regsets): Likewise.
4632 * linux-nios2-low.c (nios2_regsets): Likewise.
4633 * linux-ppc-low.c (ppc_regsets): Likewise.
4634 * linux-s390-low.c (s390_regsets): Likewise.
4635 * linux-sh-low.c (sh_regsets): Likewise.
4636 * linux-sparc-low.c (sparc_regsets): Likewise.
4637 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4638 * linux-tile-low.c (tile_regsets): Likewise.
4639 * linux-x86-low.c (x86_regsets): Likewise.
4640 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4641
682b2546
DE
46422015-10-26 Doug Evans <dje@google.com>
4643
4644 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4645
963843d4
DE
46462015-10-26 Doug Evans <dje@google.com>
4647
4648 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4649
d41401ac
DE
46502015-10-26 Doug Evans <dje@google.com>
4651
4652 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4653 for debug_printf.
4654 (attach_thread, find_new_threads_callback): Ditto.
4655
3db28855
AT
46562015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4657
4658 * mem-break.h (set_breakpoint_data): Remove.
4659
fb78e89c
AT
46602015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4661
4662 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4663 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4664 (initialize_low): Remove set_breakpoint_data call.
4665 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4666 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4667 (initialize_low): Remove set_breakpoint_data call.
4668 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4669 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4670 (initialize_low): Remove set_breakpoint_data call.
4671
2e6ee069
AT
46722015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4673
4674 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4675 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4676 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4677 * target.h (target_breakpoint_kind_from_pc): New macro.
4678
1652a986
AT
46792015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4680
4681 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4682 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4683 the default breakpoint kind.
4684
abeead09
AT
46852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4686
4687 * linux-arm-low.c (arm_supports_z_point_type): Add software
4688 breakpoint support.
4689
b0b4b501
AT
46902015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4691
4692 * linux-arm-low.c: Refactor breakpoint definitions.
4693 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4694 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4695
8689682c
AT
46962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4697
4698 * Makefile.in: Add arm.c/o.
4699 * configure.srv: Likewise.
4700 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4701 (arm_breakpoint_kind_from_pc): New function.
4702 (arm_sw_breakpoint_from_kind): Return proper kind.
4703 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4704
27165294
AT
47052015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4706
4707 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4708 removal.
4709 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4710 (struct raw_breakpoint) <size>: Remove.
4711 (struct raw_breakpoint) <kind>: Add.
4712 (bp_size): New function.
4713 (bp_opcode): Likewise.
4714 (find_raw_breakpoint_at): Adjust for kind.
4715 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4716 (remove_memory_breakpoint): Adjust for kind call bp_size.
4717 (set_raw_breakpoint_at): Adjust for kind.
4718 (set_breakpoint): Likewise.
4719 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4720 (delete_raw_breakpoint): Adjust for kind.
4721 (delete_breakpoint): Likewise.
4722 (find_gdb_breakpoint): Likewise.
4723 (set_gdb_breakpoint_1): Likewise.
4724 (set_gdb_breakpoint): Likewise.
4725 (delete_gdb_breakpoint_1): Likewise.
4726 (delete_gdb_breakpoint): Likewise.
4727 (uninsert_raw_breakpoint): Likewise.
4728 (reinsert_raw_breakpoint): Likewise.
4729 (set_breakpoint_data): Remove.
4730 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4731 (check_mem_read): Adjust for kind call bp_size.
4732 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4733 (clone_one_breakpoint): Adjust for kind.
4734 * mem-break.h (set_gdb_breakpoint): Likewise.
4735 (delete_gdb_breakpoint): Likewise.
4736 * server.c (process_serial_event): Likewise.
4737
dd373349
AT
47382015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4739
4740 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4741 (struct linux_target_ops) <breakpoint>: Remove.
4742 (struct linux_target_ops) <breakpoint_len>: Remove.
4743 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4744 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4745 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4746 (arm_sw_breakpoint_from_kind): New function.
4747 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4748 (struct linux_target_ops) <breakpoint>: Remove.
4749 (struct linux_target_ops) <breakpoint_len>: Remove.
4750 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4751 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4752 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4753 (struct linux_target_ops) <breakpoint>: Remove.
4754 (struct linux_target_ops) <breakpoint_len>: Remove.
4755 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4756 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4757 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4758 (struct linux_target_ops) <breakpoint>: Remove.
4759 (struct linux_target_ops) <breakpoint_len>: Remove.
4760 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4761 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4762 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4763 and sw_breakpoint_from_kind to increment the pc.
4764 (linux_breakpoint_kind_from_pc): New function.
4765 (linux_sw_breakpoint_from_kind): New function.
4766 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4767 (initialize_low): Call breakpoint_kind_from_pc and
4768 sw_breakpoint_from_kind to replace breakpoint_data/len.
4769 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4770 New field.
4771 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4772 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4773 (struct linux_target_ops) <breakpoint>: Remove.
4774 (struct linux_target_ops) <breakpoint_len>: Remove.
4775 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4776 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4777 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4778 (struct linux_target_ops) <breakpoint>: Remove.
4779 (struct linux_target_ops) <breakpoint_len>: Remove.
4780 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4781 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4782 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4783 (struct linux_target_ops) <breakpoint>: Remove.
4784 (struct linux_target_ops) <breakpoint_len>: Remove.
4785 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4786 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4787 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4788 (struct linux_target_ops) <breakpoint>: Remove.
4789 (struct linux_target_ops) <breakpoint_len>: Remove.
4790 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4791 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4792 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4793 (struct linux_target_ops) <breakpoint>: Remove.
4794 (struct linux_target_ops) <breakpoint_len>: Remove.
4795 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4796 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4797 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4798 (struct linux_target_ops) <breakpoint>: Remove.
4799 (struct linux_target_ops) <breakpoint_len>: Remove.
4800 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4801 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4802 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4803 (struct linux_target_ops) <breakpoint>: Remove.
4804 (struct linux_target_ops) <breakpoint_len>: Remove.
4805 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4806 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4807 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4808 (struct linux_target_ops) <breakpoint>: Remove.
4809 (struct linux_target_ops) <breakpoint_len>: Remove.
4810 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4811 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4812 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4813 (struct linux_target_ops) <breakpoint>: Remove.
4814 (struct linux_target_ops) <breakpoint_len>: Remove.
4815 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4816 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4817 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4818 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4819 (struct linux_target_ops) <breakpoint>: Remove.
4820 (struct linux_target_ops) <breakpoint_len>: Remove.
4821 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4822 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4823 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4824 (struct linux_target_ops) <breakpoint>: Remove.
4825 (struct linux_target_ops) <breakpoint_len>: Remove.
4826 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4827 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4828
4cd98a19
AT
48292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4830
4831 * linux-cris-low.c (cris_get_pc): Remove void arg.
4832
774ee6d2
AR
48332015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4834
4835 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4836 variable name.
4837
833dcd29
AR
48382015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4839
4840 * inferiors.c (thread_pid_matches_callback): New function.
4841 (find_thread_process): New function.
4842 (remove_thread): Reset current_thread.
4843 (remove_process): Assert threads have been removed first.
4844
8d689ee5
YQ
48452015-10-15 Yao Qi <yao.qi@linaro.org>
4846
4847 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4848 if it is 3.
4849 (aarch64_remove_point): Likewise.
4850 * regcache.c (regcache_register_size): New function.
4851
1c2e1515
YQ
48522015-10-12 Yao Qi <yao.qi@linaro.org>
4853
4854 * linux-aarch64-low.c: Update all callers as emit_load_store
4855 is renamed to aarch64_emit_load_store.
4856
e1c587c3
YQ
48572015-10-12 Yao Qi <yao.qi@linaro.org>
4858
4859 * linux-aarch64-low.c: Update all callers of function renaming
4860 from emit_insn to aarch64_emit_insn.
4861
b6542f81
YQ
48622015-10-12 Yao Qi <yao.qi@linaro.org>
4863
4864 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4865 arch/aarch64-insn.h.
4866 (struct aarch64_memory_operand): Likewise.
4867 (ENCODE): Likewise.
4868 (emit_insn): Move to arch/aarch64-insn.c.
4869 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4870 (emit_load_store): Move to arch/aarch64-insn.c.
4871 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4872 (can_encode_int32): Remove.
4873
246994ce
YQ
48742015-10-12 Yao Qi <yao.qi@linaro.org>
4875
4876 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4877 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4878 (aarch64_relocate_instruction): Likewise.
4879 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4880 (struct aarch64_insn_visitor): Likewise.
4881
0badd99f
YQ
48822015-10-12 Yao Qi <yao.qi@linaro.org>
4883
4884 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4885 (struct aarch64_insn_visitor): New.
4886 (struct aarch64_insn_relocation_data): New.
4887 (aarch64_ftrace_insn_reloc_b): New function.
4888 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4889 (aarch64_ftrace_insn_reloc_cb): Likewise.
4890 (aarch64_ftrace_insn_reloc_tb): Likewise.
4891 (aarch64_ftrace_insn_reloc_adr): Likewise.
4892 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4893 (aarch64_ftrace_insn_reloc_others): Likewise.
4894 (visitor): New.
4895 (aarch64_relocate_instruction): Use visitor.
4896
dfaffe9d
YQ
48972015-10-12 Yao Qi <yao.qi@linaro.org>
4898
4899 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4900 int. Add argument buf.
4901 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4902 aarch64_relocate_instruction.
4903
70b439f0
YQ
49042015-10-12 Yao Qi <yao.qi@linaro.org>
4905
4906 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4907 argument insn. Remove local variable insn. Don't call
4908 target_read_uint32.
4909 (aarch64_install_fast_tracepoint_jump_pad): Call
4910 target_read_uint32.
4911
7781c06f
YQ
49122015-09-30 Yao Qi <yao.qi@linaro.org>
4913
4914 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4915 (emit_load_store_pair): Likewise.
4916
9a3c8263
SM
49172015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4918
4919 * dll.c (match_dll): Add cast(s).
4920 (unloaded_dll): Likewise.
4921 * linux-low.c (second_thread_of_pid_p): Likewise.
4922 (delete_lwp_callback): Likewise.
4923 (count_events_callback): Likewise.
4924 (select_event_lwp_callback): Likewise.
4925 (linux_set_resume_request): Likewise.
4926 * server.c (accumulate_file_name_length): Likewise.
4927 (emit_dll_description): Likewise.
4928 (handle_qxfer_threads_worker): Likewise.
4929 (visit_actioned_threads): Likewise.
4930 * thread-db.c (any_thread_of): Likewise.
4931 * tracepoint.c (same_process_p): Likewise.
4932 (match_blocktype): Likewise.
4933 (build_traceframe_info_xml): Likewise.
4934
224c3ddb
SM
49352015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4936
4937 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4938 assignment.
4939 (gdb_unparse_agent_expr): Likewise.
4940 * hostio.c (require_data): Likewise.
4941 (handle_pread): Likewise.
4942 * linux-low.c (disable_regset): Likewise.
4943 (fetch_register): Likewise.
4944 (store_register): Likewise.
4945 (get_dynamic): Likewise.
4946 (linux_qxfer_libraries_svr4): Likewise.
4947 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4948 (set_fast_tracepoint_jump): Likewise.
4949 (uninsert_fast_tracepoint_jumps_at): Likewise.
4950 (reinsert_fast_tracepoint_jumps_at): Likewise.
4951 (validate_inserted_breakpoint): Likewise.
4952 (clone_agent_expr): Likewise.
4953 * regcache.c (init_register_cache): Likewise.
4954 * remote-utils.c (putpkt_binary_1): Likewise.
4955 (decode_M_packet): Likewise.
4956 (decode_X_packet): Likewise.
4957 (look_up_one_symbol): Likewise.
4958 (relocate_instruction): Likewise.
4959 (monitor_output): Likewise.
4960 * server.c (handle_search_memory): Likewise.
4961 (handle_qxfer_exec_file): Likewise.
4962 (handle_qxfer_libraries): Likewise.
4963 (handle_qxfer): Likewise.
4964 (handle_query): Likewise.
4965 (handle_v_cont): Likewise.
4966 (handle_v_run): Likewise.
4967 (captured_main): Likewise.
4968 * target.c (write_inferior_memory): Likewise.
4969 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4970 * tracepoint.c (init_trace_buffer): Likewise.
4971 (add_tracepoint_action): Likewise.
4972 (add_traceframe): Likewise.
4973 (add_traceframe_block): Likewise.
4974 (cmd_qtdpsrc): Likewise.
4975 (cmd_qtdv): Likewise.
4976 (cmd_qtstatus): Likewise.
4977 (response_source): Likewise.
4978 (response_tsv): Likewise.
4979 (cmd_qtnotes): Likewise.
4980 (gdb_collect): Likewise.
4981 (initialize_tracepoint): Likewise.
4982
afbe19f8
PL
49832015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4984
4985 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4986 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4987 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4988 <NOP>: New.
4989 (enum aarch64_condition_codes): New enum.
4990 (w0): New static global.
4991 (fp): Likewise.
4992 (lr): Likewise.
4993 (struct aarch64_memory_operand) <type>: New
4994 MEMORY_OPERAND_POSTINDEX type.
4995 (postindex_memory_operand): New helper function.
4996 (emit_ret): New function.
4997 (emit_load_store_pair): New function, factored out of emit_stp
4998 with support for MEMORY_OPERAND_POSTINDEX.
4999 (emit_stp): Rewrite using emit_load_store_pair.
5000 (emit_ldp): New function.
5001 (emit_load_store): Likewise.
5002 (emit_ldr): Mention post-index instruction in comment.
5003 (emit_ldrh): New function.
5004 (emit_ldrb): New function.
5005 (emit_ldrsw): Mention post-index instruction in comment.
5006 (emit_str): Likewise.
5007 (emit_subs): New function.
5008 (emit_cmp): Likewise.
5009 (emit_and): Likewise.
5010 (emit_orr): Likewise.
5011 (emit_orn): Likewise.
5012 (emit_eor): Likewise.
5013 (emit_mvn): Likewise.
5014 (emit_lslv): Likewise.
5015 (emit_lsrv): Likewise.
5016 (emit_asrv): Likewise.
5017 (emit_mul): Likewise.
5018 (emit_sbfm): Likewise.
5019 (emit_sbfx): Likewise.
5020 (emit_ubfm): Likewise.
5021 (emit_ubfx): Likewise.
5022 (emit_csinc): Likewise.
5023 (emit_cset): Likewise.
5024 (emit_nop): Likewise.
5025 (emit_ops_insns): New helper function.
5026 (emit_pop): Likewise.
5027 (emit_push): Likewise.
5028 (aarch64_emit_prologue): New function.
5029 (aarch64_emit_epilogue): Likewise.
5030 (aarch64_emit_add): Likewise.
5031 (aarch64_emit_sub): Likewise.
5032 (aarch64_emit_mul): Likewise.
5033 (aarch64_emit_lsh): Likewise.
5034 (aarch64_emit_rsh_signed): Likewise.
5035 (aarch64_emit_rsh_unsigned): Likewise.
5036 (aarch64_emit_ext): Likewise.
5037 (aarch64_emit_log_not): Likewise.
5038 (aarch64_emit_bit_and): Likewise.
5039 (aarch64_emit_bit_or): Likewise.
5040 (aarch64_emit_bit_xor): Likewise.
5041 (aarch64_emit_bit_not): Likewise.
5042 (aarch64_emit_equal): Likewise.
5043 (aarch64_emit_less_signed): Likewise.
5044 (aarch64_emit_less_unsigned): Likewise.
5045 (aarch64_emit_ref): Likewise.
5046 (aarch64_emit_if_goto): Likewise.
5047 (aarch64_emit_goto): Likewise.
5048 (aarch64_write_goto_address): Likewise.
5049 (aarch64_emit_const): Likewise.
5050 (aarch64_emit_call): Likewise.
5051 (aarch64_emit_reg): Likewise.
5052 (aarch64_emit_pop): Likewise.
5053 (aarch64_emit_stack_flush): Likewise.
5054 (aarch64_emit_zero_ext): Likewise.
5055 (aarch64_emit_swap): Likewise.
5056 (aarch64_emit_stack_adjust): Likewise.
5057 (aarch64_emit_int_call_1): Likewise.
5058 (aarch64_emit_void_call_2): Likewise.
5059 (aarch64_emit_eq_goto): Likewise.
5060 (aarch64_emit_ne_goto): Likewise.
5061 (aarch64_emit_lt_goto): Likewise.
5062 (aarch64_emit_le_goto): Likewise.
5063 (aarch64_emit_gt_goto): Likewise.
5064 (aarch64_emit_ge_got): Likewise.
5065 (aarch64_emit_ops_impl): New static global variable.
5066 (aarch64_emit_ops): New target function, return
5067 &aarch64_emit_ops_impl.
5068 (struct linux_target_ops): Install it.
5069
bb903df0
PL
50702015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5071
5072 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5073 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5074 aarch64-ipa.o.
5075 * linux-aarch64-ipa.c: New file.
5076 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5077 and endian.h.
5078 (aarch64_get_thread_area): New target method.
5079 (extract_signed_bitfield): New helper function.
5080 (aarch64_decode_ldr_literal): New function.
5081 (enum aarch64_opcodes): New enum.
5082 (struct aarch64_register): New struct.
5083 (struct aarch64_operand): New struct.
5084 (x0): New static global.
5085 (x1): Likewise.
5086 (x2): Likewise.
5087 (x3): Likewise.
5088 (x4): Likewise.
5089 (w2): Likewise.
5090 (ip0): Likewise.
5091 (sp): Likewise.
5092 (xzr): Likewise.
5093 (aarch64_register): New helper function.
5094 (register_operand): Likewise.
5095 (immediate_operand): Likewise.
5096 (struct aarch64_memory_operand): New struct.
5097 (offset_memory_operand): New helper function.
5098 (preindex_memory_operand): Likewise.
5099 (enum aarch64_system_control_registers): New enum.
5100 (ENCODE): New macro.
5101 (emit_insn): New helper function.
5102 (emit_b): New function.
5103 (emit_bcond): Likewise.
5104 (emit_cb): Likewise.
5105 (emit_tb): Likewise.
5106 (emit_blr): Likewise.
5107 (emit_stp): Likewise.
5108 (emit_ldp_q_offset): Likewise.
5109 (emit_stp_q_offset): Likewise.
5110 (emit_load_store): Likewise.
5111 (emit_ldr): Likewise.
5112 (emit_ldrsw): Likewise.
5113 (emit_str): Likewise.
5114 (emit_ldaxr): Likewise.
5115 (emit_stxr): Likewise.
5116 (emit_stlr): Likewise.
5117 (emit_data_processing_reg): Likewise.
5118 (emit_data_processing): Likewise.
5119 (emit_add): Likewise.
5120 (emit_sub): Likewise.
5121 (emit_mov): Likewise.
5122 (emit_movk): Likewise.
5123 (emit_mov_addr): Likewise.
5124 (emit_mrs): Likewise.
5125 (emit_msr): Likewise.
5126 (emit_sevl): Likewise.
5127 (emit_wfe): Likewise.
5128 (append_insns): Likewise.
5129 (can_encode_int32_in): New helper function.
5130 (aarch64_relocate_instruction): New function.
5131 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5132 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5133 (struct linux_target_ops): Install aarch64_get_thread_area,
5134 aarch64_install_fast_tracepoint_jump_pad and
5135 aarch64_get_min_fast_tracepoint_insn_len.
5136
787749ea
PL
51372015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5138
5139 * Makefile.in (aarch64-insn.o): New rule.
5140 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5141
9812b2e6
YQ
51422015-09-21 Yao Qi <yao.qi@linaro.org>
5143
5144 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5145
18fe412b
YQ
51462015-09-21 Yao Qi <yao.qi@linaro.org>
5147
5148 * tracepoint.c (max_jump_pad_size): Remove.
5149
a0cc84cd
YQ
51502015-09-18 Yao Qi <yao.qi@linaro.org>
5151
5152 * linux-aarch64-low.c: Don't include sys/uio.h.
5153 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5154
d78908cf
WW
51552015-09-16 Wei-cheng Wang <cole945@gmail.com>
5156
5157 * tracepoint.c (eval_result_type): Change prototype.
5158 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5159
d57e0d50
PA
51602015-09-15 Pedro Alves <palves@redhat.com>
5161
5162 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5163 Check whether to report exec events instead of checking whether
5164 multiprocess is enabled.
5165
5a676acc
PA
51662015-09-15 Pedro Alves <palves@redhat.com>
5167
5168 PR remote/18965
5169 * remote-utils.c (prepare_resume_reply): Merge
5170 TARGET_WAITKIND_VFORK_DONE switch case with the
5171 TARGET_WAITKIND_FORKED case.
5172
7c5d0fad
YQ
51732015-09-15 Yao Qi <yao.qi@linaro.org>
5174
5175 * server.c (handle_query): Check string comparison using
5176 "else if" instead of "if".
5177
750ce8d1
YQ
51782015-09-15 Yao Qi <yao.qi@linaro.org>
5179
5180 * server.c (vCont_supported): New global variable.
5181 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5182 matches. Append ";vContSupported+" to own_buf.
5183 (handle_v_requests): Append ";s;S" to own_buf if target supports
5184 hardware single step or vCont_supported is false.
5185 (capture_main): Set vCont_supported to zero.
5186
70b90b91
YQ
51872015-09-15 Yao Qi <yao.qi@linaro.org>
5188
5189 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5190 it to ...
5191 (linux_supports_hardware_single_step): ... New function.
5192 (linux_target_ops): Update.
5193 * lynx-low.c (lynx_target_ops): Set field
5194 supports_hardware_single_step to target_can_do_hardware_single_step.
5195 * nto-low.c (nto_target_ops): Likewise.
5196 * spu-low.c (spu_target_ops): Likewise.
5197 * win32-low.c (win32_target_ops): Likewise.
5198 * target.c (target_can_do_hardware_single_step): New function.
5199 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5200 Remove. <supports_hardware_single_step>: New field.
5201 (target_supports_conditional_breakpoints): Remove.
5202 (target_supports_hardware_single_step): New macro.
5203 (target_can_do_hardware_single_step): Declare.
5204 * server.c (handle_query): Use target_supports_hardware_single_step
5205 instead of target_supports_conditional_breakpoints.
5206
ade90bde
YQ
52072015-09-15 Yao Qi <yao.qi@linaro.org>
5208
5209 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5210 function.
5211 (struct linux_target_ops the_low_target): Install
5212 aarch64_linux_siginfo_fixup.
5213
94585166
DB
52142015-09-11 Don Breazeal <donb@codesourcery.com>
5215 Luis Machado <lgustavo@codesourcery.com>
5216
5217 * linux-low.c (linux_mourn): Static declaration.
5218 (linux_arch_setup): Move in front of
5219 handle_extended_wait.
5220 (linux_arch_setup_thread): New function.
5221 (handle_extended_wait): Handle exec events. Call
5222 linux_arch_setup_thread. Make event_lwp argument a
5223 pointer-to-a-pointer.
5224 (check_zombie_leaders): Do not check stopped threads.
5225 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5226 (linux_low_filter_event): Add lwp and thread for exec'ing
5227 non-leader thread if leader thread has been deleted.
5228 Refactor code into linux_arch_setup_thread and call it.
5229 Pass child lwp pointer by reference to handle_extended_wait.
5230 (linux_wait_for_event_filtered): Update comment.
5231 (linux_wait_1): Prevent clobbering exec event status.
5232 (linux_supports_exec_events): New function.
5233 (linux_target_ops) <supports_exec_events>: Initialize new member.
5234 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5235 new member.
5236 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5237 * server.c (report_exec_events): New global variable.
5238 (handle_query): Handle qSupported query for exec-events feature.
5239 (captured_main): Initialize report_exec_events.
5240 * server.h (report_exec_events): Declare new global variable.
5241 * target.h (struct target_ops) <supports_exec_events>: New
5242 member.
5243 (target_supports_exec_events): New macro.
5244 * win32-low.c (win32_target_ops) <supports_exec_events>:
5245 Initialize new member.
5246
0568462b
MM
52472015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5248
5249 * linux-low.c (linux_low_enable_btrace): Remove.
5250 (linux_target_ops): Replace linux_low_enable_btrace with
5251 linux_enable_btrace.
5252
39edd165
YQ
52532015-09-03 Yao Qi <yao.qi@linaro.org>
5254
5255 * linux-aarch64-low.c (aarch64_insert_point): Call
5256 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5257 returns true.
5258
1db33b5a
UW
52592015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5260
5261 * linux-low.c (check_stopped_by_breakpoint): Use
5262 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5263
ab290430
PA
52642015-08-27 Pedro Alves <palves@redhat.com>
5265
5266 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5267
8d749320
SM
52682015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5269
6711b7f8
SM
5270 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5271 the XNEW-family equivalent.
8d749320
SM
5272 (compile_bytecodes): Likewise.
5273 * dll.c (loaded_dll): Likewise.
5274 * event-loop.c (append_callback_event): Likewise.
5275 (create_file_handler): Likewise.
5276 (create_file_event): Likewise.
5277 * hostio.c (handle_open): Likewise.
5278 * inferiors.c (add_thread): Likewise.
5279 (add_process): Likewise.
5280 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5281 * linux-arm-low.c (arm_new_process): Likewise.
5282 (arm_new_thread): Likewise.
5283 * linux-low.c (add_to_pid_list): Likewise.
5284 (linux_add_process): Likewise.
5285 (handle_extended_wait): Likewise.
5286 (add_lwp): Likewise.
5287 (enqueue_one_deferred_signal): Likewise.
5288 (enqueue_pending_signal): Likewise.
5289 (linux_resume_one_lwp_throw): Likewise.
5290 (linux_resume_one_thread): Likewise.
5291 (linux_read_memory): Likewise.
5292 (linux_write_memory): Likewise.
5293 * linux-mips-low.c (mips_linux_new_process): Likewise.
5294 (mips_linux_new_thread): Likewise.
5295 (mips_add_watchpoint): Likewise.
5296 * linux-x86-low.c (initialize_low_arch): Likewise.
5297 * lynx-low.c (lynx_add_process): Likewise.
5298 * mem-break.c (set_raw_breakpoint_at): Likewise.
5299 (set_breakpoint): Likewise.
5300 (add_condition_to_breakpoint): Likewise.
5301 (add_commands_to_breakpoint): Likewise.
5302 (clone_agent_expr): Likewise.
5303 (clone_one_breakpoint): Likewise.
5304 * regcache.c (new_register_cache): Likewise.
5305 * remote-utils.c (look_up_one_symbol): Likewise.
5306 * server.c (queue_stop_reply): Likewise.
5307 (start_inferior): Likewise.
5308 (queue_stop_reply_callback): Likewise.
5309 (handle_target_event): Likewise.
5310 * spu-low.c (fetch_ppc_memory): Likewise.
5311 (store_ppc_memory): Likewise.
5312 * target.c (set_target_ops): Likewise.
5313 * thread-db.c (thread_db_load_search): Likewise.
5314 (try_thread_db_load_1): Likewise.
5315 * tracepoint.c (add_tracepoint): Likewise.
5316 (add_tracepoint_action): Likewise.
5317 (create_trace_state_variable): Likewise.
5318 (cmd_qtdpsrc): Likewise.
5319 (cmd_qtro): Likewise.
5320 (add_while_stepping_state): Likewise.
5321 * win32-low.c (child_add_thread): Likewise.
5322 (get_image_name): Likewise.
5323
ed8b7b42
YQ
53242015-08-25 Yao Qi <yao.qi@linaro.org>
5325
5326 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5327
db3cb7cb
YQ
53282015-08-25 Yao Qi <yao.qi@linaro.org>
5329
5330 * Makefile.in (aarch64-linux.o): New rule.
5331 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5332 srv_tgtobj.
5333 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5334 (aarch64_init_debug_reg_state): Make it extern.
5335 (aarch64_linux_prepare_to_resume): Remove.
5336
f6011a1c
YQ
53372015-08-25 Yao Qi <yao.qi@linaro.org>
5338
5339 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5340 lwp_arch_private_info and ptid_of_lwp.
5341
88e2cf7e
YQ
53422015-08-25 Yao Qi <yao.qi@linaro.org>
5343
5344 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5345 Find proc_info by find_process_pid. All callers updated.
5346
5e35436e
YQ
53472015-08-25 Yao Qi <yao.qi@linaro.org>
5348
5349 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5350 Remove.
5351 (debug_reg_change_callback): Remove.
5352 (aarch64_notify_debug_reg_change): Remove.
5353
4a8a7965
YQ
53542015-08-25 Yao Qi <yao.qi@linaro.org>
5355
5356 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5357 Call current_lwp_ptid.
5358
32a271ee
YQ
53592015-08-25 Yao Qi <yao.qi@linaro.org>
5360
5361 * linux-aarch64-low.c (debug_reg_change_callback): Use
5362 debug_printf.
5363
0d51c8d7
YQ
53642015-08-25 Yao Qi <yao.qi@linaro.org>
5365
5366 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5367
31a43dd5
YQ
53682015-08-25 Yao Qi <yao.qi@linaro.org>
5369
5370 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5371
8ee52567
YQ
53722015-08-25 Yao Qi <yao.qi@linaro.org>
5373
5374 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5375 the code.
5376
ff3f0f45
YQ
53772015-08-25 Yao Qi <yao.qi@linaro.org>
5378
5379 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5380 Remove.
5381 (debug_reg_change_callback): Remove argument entry and add argument
5382 lwp. Remove local variable thread. Don't print thread id in the
5383 debugging output. Don't check whether pid of thread equals to pid.
5384 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5385 iterate_over_lwps instead find_inferior.
5386
3d40fbb5
PA
53872015-08-24 Pedro Alves <palves@redhat.com>
5388
5389 * inferiors.c (get_first_process): New function.
5390 * inferiors.h (get_first_process): New declaration.
5391 * remote-utils.c (read_ptid): Default to the first process in the
5392 list, instead of to the current thread's process.
5393
438e1e42
PA
53942015-08-24 Pedro Alves <palves@redhat.com>
5395
5396 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5397 * event-loop.c: Likewise.
5398 * remote-utils.c: Likewise.
5399 * tracepoint.c: Likewise.
5400
a8c6d4fc
PA
54012015-08-24 Pedro Alves <palves@redhat.com>
5402
5403 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5404 ptid_get_lwp.
5405
99b0bb12
PA
54062015-08-21 Pedro Alves <palves@redhat.com>
5407
5408 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5409 instead of literal 1.
5410
f8904751
PA
54112015-08-21 Pedro Alves <palves@redhat.com>
5412
5413 * tdesc.c (default_description): Explicitly zero-initialize.
5414
465a859e
PA
54152015-08-21 Pedro Alves <palves@redhat.com>
5416
5417 PR gdb/18749
5418 * inferiors.c (remove_thread): Discard any pending stop reply for
5419 this thread.
5420 * server.c (remove_all_on_match_pid): Rename to ...
5421 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5422 instead of a pid.
5423 (discard_queued_stop_replies): Change parameter to a ptid. Now
5424 extern.
5425 (handle_v_kill, kill_inferior_callback, captured_main)
5426 (process_serial_event): Adjust.
5427 * server.h (discard_queued_stop_replies): Declare.
5428
f0db101d
PA
54292015-08-21 Pedro Alves <palves@redhat.com>
5430
5431 * linux-low.c (wait_for_sigstop): Always switch to no thread
5432 selected if the previously current thread dies.
5433 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5434 process instead of the current thread's.
5435 * remote-utils.c (input_interrupt): Don't check if there's no
5436 current thread.
5437 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5438 current thread to the general thread fails, error out.
5439 (handle_qxfer_auxv, handle_qxfer_libraries)
5440 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5441 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5442 (handle_query): Check if there's a thread selected instead of
5443 checking whether there's any thread in the thread list.
5444 (handle_qxfer_threads, handle_qxfer_btrace)
5445 (handle_qxfer_btrace_conf): Don't error out early if there's no
5446 thread in the thread list.
5447 (handle_v_cont, myresume): Don't set the current thread to the
5448 continue thread.
5449 (process_serial_event) <Hg handling>: Also set thread_id if the
5450 previous general thread is still alive.
5451 (process_serial_event) <g/G handling>: If setting the current
5452 thread to the general thread fails, error out.
5453 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5454 thread's lwp instead of the current thread's.
5455 * target.c (set_desired_thread): If the desired thread was not
5456 found, leave the current thread pointing to NULL. Return an int
5457 (boolean) indicating success.
5458 * target.h (set_desired_thread): Change return type to int.
5459
40045d91
MF
54602015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5461
5462 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5463 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5464 #includes.
5465 (ps_get_thread_area): New function.
5466
45face3b
GB
54672015-08-19 Gary Benson <gbenson@redhat.com>
5468
5469 * hostio.c (handle_pread): Do not attempt to read more data
5470 than hostio_reply_with_data can fit in a packet.
5471
16d5f642
JB
54722015-08-18 Joel Brobecker <brobecker@adacore.com>
5473
5474 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5475
a738da3a
MF
54762015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5477
5478 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5479
33ebda9d
PA
54802015-08-06 Pedro Alves <palves@redhat.com>
5481
5482 * tracepoint.c (expr_eval_result): Now an int.
5483
a44892be
PA
54842015-08-06 Pedro Alves <palves@redhat.com>
5485
5486 * gdbthread.h (struct regcache): Forward declare.
5487 (struct thread_info) <regcache_data>: Now a struct regcache
5488 pointer.
5489 * inferiors.c (inferior_regcache_data)
5490 (set_inferior_regcache_data): Now work with struct regcache
5491 pointers.
5492 * inferiors.h (struct regcache): Forward declare.
5493 (inferior_regcache_data, set_inferior_regcache_data): Now work
5494 with struct regcache pointers.
5495 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5496 (free_register_cache_thread): Remove struct regcache pointer
5497 casts.
5498
608a1e46
PA
54992015-08-06 Pedro Alves <palves@redhat.com>
5500
5501 * server.c (captured_main): On error, print the exception message
5502 to stderr, and if run_once is set, throw a quit.
5503
f0ce0d3a
PA
55042015-08-06 Pedro Alves <palves@redhat.com>
5505
5506 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5507 the current thread.
5508
bf47e248
PA
55092015-08-06 Pedro Alves <palves@redhat.com>
5510
5511 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5512 reading beyond the passed in buffer length.
5513
b6b9ffcc
PL
55142015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5515
5516 * tracepoint.c (symbol_list) <required>: Remove.
5517
863d01bd
PA
55182015-08-06 Pedro Alves <palves@redhat.com>
5519
5520 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5521 count if stopping and suspending threads.
5522 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5523 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5524 (linux_detach): Complete an ongoing step-over.
5525 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5526 throughout.
5527 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5528 (linux_wait_1): If passing a signal to the inferior after
5529 finishing a step-over, unsuspend and re-resume all lwps. If we
5530 see a single-step event but the thread should be continuing, don't
5531 pass the trap to gdb.
5532 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5533 internal_error instead of gdb_assert.
5534 (enqueue_pending_signal): New function.
5535 (check_ptrace_stopped_lwp_gone): Add debug output.
5536 (start_step_over): Use internal_error instead of gdb_assert.
5537 (complete_ongoing_step_over): New function.
5538 (linux_resume_one_thread): Don't resume a suspended thread.
5539 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5540 it stepping.
5541
00db26fa
PA
55422015-08-06 Pedro Alves <palves@redhat.com>
5543
5544 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5545 (linux_thread_alive): Use lwp_is_marked_dead.
5546 (extended_event_reported): Delete.
5547 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5548 instead of extended_event_reported.
5549 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5550 as well.
5551 (lwp_is_marked_dead): New function.
5552 (lwp_running): Use lwp_is_marked_dead.
5553 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5554 comment.
5555
ad071a30
PA
55562015-08-06 Pedro Alves <palves@redhat.com>
5557
5558 * linux-low.c (linux_wait_1): Move fork event output out of the
5559 !report_to_gdb check. Pass event_child->waitstatus to
5560 target_waitstatus_to_string instead of ourstatus.
5561
524b57e6
YQ
55622015-08-04 Yao Qi <yao.qi@linaro.org>
5563
5564 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5565 if current_thread is 32 bit.
5566
6085d6f6
YQ
55672015-08-04 Yao Qi <yao.qi@linaro.org>
5568
5569 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5570 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5571 * server.c (extended_protocol): Remove "static".
5572 * server.h (extended_protocol): Declare it.
5573
8a7e4587
YQ
55742015-08-04 Yao Qi <yao.qi@linaro.org>
5575
5576 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5577 both aarch64 and aarch32.
5578 (aarch64_set_pc): Likewise.
5579
3b53ae99
YQ
55802015-08-04 Yao Qi <yao.qi@linaro.org>
5581
5582 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5583 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5584 arm-with-neon.xml to srv_xmlfiles.
5585 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5586 (is_64bit_tdesc): New function.
5587 (aarch64_linux_read_description): New function.
5588 (aarch64_arch_setup): Call aarch64_linux_read_description.
5589 (regs_info): Rename to regs_info_aarch64.
5590 (aarch64_regs_info): Return right regs_info.
5591 (initialize_low_arch): Call initialize_low_arch_aarch32.
5592
bd9e6534
YQ
55932015-08-04 Yao Qi <yao.qi@linaro.org>
5594
5595 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5596 * linux-aarch32-low.c: New file.
5597 * linux-aarch32-low.h: New file.
5598 * linux-arm-low.c (arm_fill_gregset): Move it to
5599 linux-aarch32-low.c.
5600 (arm_store_gregset): Likewise.
5601 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5602 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5603 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5604 (regs_info): Rename to regs_info_arm.
5605 (arm_regs_info): Return regs_info_aarch32 if
5606 have_ptrace_getregset is 1 and target description is
5607 arm_with_neon or arm_with_vfpv3.
5608 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5609 Call initialize_low_arch_aarch32 instead.
5610
ded48a5e
YQ
56112015-08-04 Yao Qi <yao.qi@linaro.org>
5612
5613 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5614 * linux-low.c: ... here.
5615 * linux-low.h (have_ptrace_getregset): Declare it.
5616
96e9210f
PA
56172015-08-04 Pedro Alves <palves@redhat.com>
5618
5619 * thread-db.c (struct thread_db): Use new typedefs.
5620 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5621 CHK calls.
5622 (disable_thread_event_reporting): Cast result of dlsym to
5623 destination function pointer type.
5624 (thread_db_mourn): Use td_ta_delete_ftype.
5625
af60a1ef
SL
56262015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5627
5628 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5629 arch variant.
5630 (CDX_BREAKPOINT): Define for R2.
5631 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5632 (the_low_target): Add comments.
5633
e8b41681
YQ
56342015-07-30 Yao Qi <yao.qi@linaro.org>
5635
5636 * linux-arm-low.c (arm_hwcap): Remove it.
5637 (arm_read_description): New local variable arm_hwcap. Don't
5638 set arm_hwcap to zero.
5639
89abb039
YQ
56402015-07-30 Yao Qi <yao.qi@linaro.org>
5641
5642 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5643 Use regcache->tdesc instead.
5644 (arm_store_wmmxregset): Likewise.
5645 (arm_fill_vfpregset): Likewise.
5646 (arm_store_vfpregset): Likewise.
5647
deca266c
YQ
56482015-07-30 Yao Qi <yao.qi@linaro.org>
5649
5650 * linux-arm-low.c: Include arch/arm.h.
5651 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5652 (arm_store_gregset): Likewise.
5653
aa58a496
SM
56542015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5655
5656 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5657 ptrace's 4th parameter.
5658
50904b25
YQ
56592015-07-27 Yao Qi <yao.qi@linaro.org>
5660
5661 * configure.srv (case aarch64*-*-linux*): Don't set
5662 srv_linux_usrregs.
5663
5826e159
PA
56642015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5665
5666 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5667 sys/ptrace.h.
5668 * linux-arm-low.c: Likewise.
5669 * linux-cris-low.c: Likewise.
5670 * linux-crisv32-low.c: Likewise.
5671 * linux-low.c: Likewise.
5672 * linux-m68k-low.c: Likewise.
5673 * linux-mips-low.c: Likewise.
5674 * linux-nios2-low.c: Likewise.
5675 * linux-s390-low.c: Likewise.
5676 * linux-sparc-low.c: Likewise.
5677 * linux-tic6x-low.c: Likewise.
5678 * linux-tile-low.c: Likewise.
5679 * linux-x86-low.c: Likewise.
5680
54019719
PA
56812015-07-24 Pedro Alves <palves@redhat.com>
5682
5683 * config.in: Regenerate.
5684 * configure: Regenerate.
5685
eb7aa561
PA
56862015-07-24 Pedro Alves <palves@redhat.com>
5687
5688 * acinclude.m4: Include ../ptrace.m4.
5689 * configure.ac: Call GDB_AC_PTRACE.
5690 * config.in, configure: Regenerate.
5691
55d7b841
YQ
56922015-07-24 Yao Qi <yao.qi@linaro.org>
5693
5694 * linux-low.c (linux_create_inferior): Remove setting to
5695 proc->priv->new_inferior.
5696 (linux_attach): Likewise.
5697 (linux_low_filter_event): Likewise.
5698 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5699
c06cbd92
YQ
57002015-07-24 Yao Qi <yao.qi@linaro.org>
5701
5702 * linux-low.c (linux_arch_setup): New function.
5703 (linux_low_filter_event): If proc->tdesc is NULL and
5704 proc->attached is true, call the_low_target.arch_setup.
5705 Otherwise, keep status pending, and return.
5706 (linux_resume_one_lwp_throw): Don't call get_pc if
5707 thread->while_stepping isn't NULL. Don't call
5708 get_thread_regcache if proc->tdesc is NULL.
5709 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5710 (linux_target_ops): Install arch_setup.
5711 * server.c (start_inferior): Call the_target->arch_setup.
5712 * target.h (struct target_ops) <arch_setup>: New field.
5713 (target_arch_setup): New marco.
5714 * lynx-low.c (lynx_target_ops): Update.
5715 * nto-low.c (nto_target_ops): Update.
5716 * spu-low.c (spu_target_ops): Update.
5717 * win32-low.c (win32_target_ops): Update.
5718
5ae3ebba
YQ
57192015-07-24 Yao Qi <yao.qi@linaro.org>
5720
5721 * linux-low.c (linux_add_process): Don't set
5722 proc->priv->new_inferior.
5723 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5724 (linux_attach): Likewise.
5725
eb97750b
YQ
57262015-07-24 Yao Qi <yao.qi@linaro.org>
5727
5728 * server.c (start_inferior): Code refactor.
5729
51aee833
YQ
57302015-07-24 Yao Qi <yao.qi@linaro.org>
5731
5732 * server.c (process_serial_event): Set general_thread.
5733
af1b22f3
YQ
57342015-07-21 Yao Qi <yao.qi@linaro.org>
5735
5736 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5737 aarch64_linux_get_debug_reg_capacity.
5738
554717a3
YQ
57392015-07-17 Yao Qi <yao.qi@linaro.org>
5740
5741 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5742 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5743 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5744 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5745 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5746 (AARCH64_HWP_ALIGNMENT): Likewise.
5747 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5748 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5749 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5750 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5751 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5752 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5753 (struct aarch64_debug_reg_state): Likewise.
5754 (struct arch_lwp_info): Likewise.
5755 (aarch64_align_watchpoint): Likewise.
5756 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5757 (aarch64_watchpoint_length): Likewise.
5758 (aarch64_point_encode_ctrl_reg): Likewise
5759 (aarch64_point_is_aligned): Likewise.
5760 (aarch64_align_watchpoint): Likewise.
5761 (aarch64_linux_set_debug_regs):
5762 (aarch64_dr_state_insert_one_point): Likewise.
5763 (aarch64_dr_state_remove_one_point): Likewise.
5764 (aarch64_handle_breakpoint): Likewise.
5765 (aarch64_handle_aligned_watchpoint): Likewise.
5766 (aarch64_handle_unaligned_watchpoint): Likewise.
5767 (aarch64_handle_watchpoint): Likewise.
5768
c67ca4de
YQ
57692015-07-17 Yao Qi <yao.qi@linaro.org>
5770
5771 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5772 and don't aarch64_get_debug_reg_state. All callers update.
5773 (aarch64_handle_aligned_watchpoint): Likewise.
5774 (aarch64_handle_unaligned_watchpoint): Likewise.
5775 (aarch64_handle_watchpoint): Likewise.
5776 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5777 (aarch64_remove_point): Likewise.
5778
25abf979
YQ
57792015-07-17 Yao Qi <yao.qi@linaro.org>
5780
5781 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5782 debug_printf.
5783 (aarch64_handle_unaligned_watchpoint): Likewise.
5784
db1ff28b
JK
57852015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5786
5787 Revert the previous 3 commits:
5788 Move gdb_regex* to common/
5789 Move linux_find_memory_regions_full & co.
5790 gdbserver build-id attribute generator
5791
700ca40f
JK
57922015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5793 Jan Kratochvil <jan.kratochvil@redhat.com>
5794
5795 gdbserver build-id attribute generator.
5796 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5797 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5798 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5799 (find_phdr): New.
5800 (get_dynamic): Use find_pdhr to traverse program headers.
5801 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5802 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5803 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5804 (get_hex_build_id): New.
5805 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5806 to reply XML document.
5807
9904185c
JK
58082015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5809 Jan Kratochvil <jan.kratochvil@redhat.com>
5810
5811 * target.c: Include target/target-utils.h and fcntl.h.
5812 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5813 (target_fileio_read_stralloc): New functions.
5814
6e5b4429
JK
58152015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5816
5817 * Makefile.in (OBS): Add gdb_regex.o.
5818 (gdb_regex.o): New.
5819 * config.in: Rebuilt.
5820 * configure: Rebuilt.
5821
ddc98fbf
JK
58222015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5823 Jan Kratochvil <jan.kratochvil@redhat.com>
5824
5825 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5826 * Makefile.in (OBS): Add target-utils.o.
5827 (linux-maps.o, target-utils.o): New.
5828 * configure.srv (srv_linux_obj): Add linux-maps.o.
5829
e57bb7a0
PL
58302015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5831
5832 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5833 function, return 1.
5834 (the_low_target): Install it.
5835
586b02a9
PA
58362015-07-14 Pedro Alves <palves@redhat.com>
5837
5838 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5839 Instead, ignore ECHILD, and throw an error for other errnos.
5840
58c1b36c
PA
58412015-07-10 Pedro Alves <palves@redhat.com>
5842
5843 * event-loop.c (struct callback_event) <data>: Change type to
5844 gdb_client_data instance instead of gdb_client_data pointer.
5845 (append_callback_event): Adjust.
5846
421530db
PL
58472015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5848
5849 * linux-aarch64-low.c: Add comments for each linux_target_ops
5850 method. Remove comments already covered in target_ops and
5851 linux_target_ops definitions.
5852 (the_low_target): Add comments for each unimplemented method.
5853
c2d65f38
YQ
58542015-07-09 Yao Qi <yao.qi@linaro.org>
5855
5856 * linux-aarch64-low.c (aarch64_regmap): Remove.
5857 (aarch64_usrregs_info): Remove.
5858 (regs_info): Set field usrregs to NULL.
5859
b20a6524
MM
58602015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5861
5862 * linux-low.c: Include "rsp-low.h"
5863 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5864 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5865 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5866 (handle_btrace_enable_pt): New.
5867 (handle_btrace_general_set): Support "pt".
5868 (handle_btrace_conf_general_set): Support "pt:size".
5869
96c97461
PL
58702015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5871
5872 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5873 Z_PACKET_SW_BP.
5874
37d66942
PL
58752015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5876
5877 * linux-aarch64-low.c: Remove comment about endianness.
5878 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5879 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5880 memcmp.
5881
dc06243f
GB
58822015-06-24 Gary Benson <gbenson@redhat.com>
5883
5884 * linux-i386-ipa.c (stdint.h): Do not include.
5885 * lynx-i386-low.c (stdint.h): Likewise.
5886 * lynx-ppc-low.c (stdint.h): Likewise.
5887 * mem-break.c (stdint.h): Likewise.
5888 * thread-db.c (stdint.h): Likewise.
5889 * tracepoint.c (stdint.h): Likewise.
5890 * win32-low.c (stdint.h): Likewise.
5891
124e13d9
SM
58922015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5893
5894 * server.c (write_qxfer_response): Update call to
5895 remote_escape_output.
5896
909c2cda
JK
58972015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5898 Jan Kratochvil <jan.kratochvil@redhat.com>
5899
5900 Merge multiple hex conversions.
5901 * gdbreplay.c (tohex): Rename to 'fromhex'.
5902 (logchar): Use fromhex.
5903
24c05f46
JK
59042015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5905
5906 * server.c (handle_qxfer_libraries): Set `version' attribute for
5907 <library-list>.
5908
14d2069a
GB
59092015-06-10 Gary Benson <gbenson@redhat.com>
5910
5911 * target.h (struct target_ops) <multifs_open>: New field.
5912 <multifs_unlink>: Likewise.
5913 <multifs_readlink>: Likewise.
5914 * linux-low.c (nat/linux-namespaces.h): New include.
5915 (linux_target_ops): Initialize the_target->multifs_open,
5916 the_target->multifs_unlink and the_target->multifs_readlink.
5917 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5918 * hostio.c (hostio_fs_pid): New static variable.
5919 (hostio_handle_new_gdb_connection): New function.
5920 (handle_setfs): Likewise.
5921 (handle_open): Use the_target->multifs_open as appropriate.
5922 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5923 (handle_readlink): Use the_target->multifs_readlink as
5924 appropriate.
5925 (handle_vFile): Handle vFile:setfs packets.
5926 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5927 after target_handle_new_gdb_connection.
5928
4b8b5e72
GB
59292015-06-10 Gary Benson <gbenson@redhat.com>
5930
5931 * configure.ac (AC_CHECK_FUNCS): Add setns.
5932 * config.in: Regenerate.
5933 * configure: Likewise.
5934 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5935 (linux-namespaces.o): New rule.
5936 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5937
3ac2e371
GB
59382015-06-09 Gary Benson <gbenson@redhat.com>
5939
5940 * hostio.c (handle_open): Process mode argument with
5941 fileio_to_host_mode.
5942
ca9b78ce
YQ
59432015-06-01 Yao Qi <yao.qi@linaro.org>
5944
5945 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5946 * linux-x86-low.c: Likewise.
5947
bfacd19d
DB
59482015-05-28 Don Breazeal <donb@codesourcery.com>
5949
5950 * linux-low.c (handle_extended_wait): Initialize
5951 thread_info.last_resume_kind for new fork children.
5952
452003ef
PA
59532015-05-15 Pedro Alves <palves@redhat.com>
5954
5955 * target.h (target_handle_new_gdb_connection): Rewrite using if
5956 wrapped in do/while.
5957
1041a03c
JB
59582015-05-14 Joel Brobecker <brobecker@adacore.com>
5959
5960 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5961 * configure, config.in: Regenerate.
5962 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5963 Declare typedef.
5964
c269dbdb
DB
59652015-05-12 Don Breazeal <donb@codesourcery.com>
5966
5967 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5968 PTRACE_EVENT_VFORK_DONE.
5969 (linux_low_ptrace_options, extended_event_reported): Add vfork
5970 events.
5971 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5972 and "vforkdone" for RSP 'T' Stop Reply Packet.
5973 * server.h (report_vfork_events): Declare
5974 global variable.
5975
3a8a0396
DB
59762015-05-12 Don Breazeal <donb@codesourcery.com>
5977
5978 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5979 (the_low_target) <new_fork>: Initialize new member.
5980 * linux-arm-low.c (arm_new_fork): New function.
5981 (the_low_target) <new_fork>: Initialize new member.
5982 * linux-low.c (handle_extended_wait): Call new target function
5983 new_fork.
5984 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5985 * linux-mips-low.c (mips_add_watchpoint): New function
5986 extracted from mips_insert_point.
5987 (the_low_target) <new_fork>: Initialize new member.
5988 (mips_linux_new_fork): New function.
5989 (mips_insert_point): Call mips_add_watchpoint.
5990 * linux-x86-low.c (x86_linux_new_fork): New function.
5991 (the_low_target) <new_fork>: Initialize new member.
5992
de0d863e
DB
59932015-05-12 Don Breazeal <donb@codesourcery.com>
5994
5995 * linux-low.c (handle_extended_wait): Implement return value,
5996 rename argument 'event_child' to 'event_lwp', handle
5997 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5998 (linux_low_ptrace_options): New function.
5999 (linux_low_filter_event): Call linux_low_ptrace_options,
6000 use different argument fo linux_enable_event_reporting,
6001 use return value from handle_extended_wait.
6002 (extended_event_reported): New function.
6003 (linux_wait_1): Call extended_event_reported and set
6004 status to report fork events.
6005 (linux_write_memory): Add pid to debug message.
6006 (reset_lwp_ptrace_options_callback): New function.
6007 (linux_handle_new_gdb_connection): New function.
6008 (linux_target_ops): Initialize new structure member.
6009 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6010 * lynx-low.c: Initialize new structure member.
6011 * remote-utils.c (prepare_resume_reply): Implement stop reason
6012 "fork" for "T" stop message.
6013 * server.c (handle_query): Call handle_new_gdb_connection.
6014 * server.h (report_fork_events): Declare global flag.
6015 * target.h (struct target_ops) <handle_new_gdb_connection>:
6016 New member.
6017 (target_handle_new_gdb_connection): New macro.
6018 * win32-low.c: Initialize new structure member.
6019
ddcbc397
DB
60202015-05-12 Don Breazeal <donb@codesourcery.com>
6021
6022 * mem-break.c (APPEND_TO_LIST): Define macro.
6023 (clone_agent_expr): New function.
6024 (clone_one_breakpoint): New function.
6025 (clone_all_breakpoints): New function.
6026 * mem-break.h: Declare new functions.
6027
89245bc0
DB
60282015-05-12 Don Breazeal <donb@codesourcery.com>
6029
6030 * linux-low.c (linux_supports_fork_events): New function.
6031 (linux_supports_vfork_events): New function.
6032 (linux_target_ops): Initialize new structure members.
6033 (initialize_low): Call linux_check_ptrace_features.
6034 * lynx-low.c (lynx_target_ops): Initialize new structure
6035 members.
6036 * server.c (report_fork_events, report_vfork_events):
6037 New global flags.
6038 (handle_query): Add new features to qSupported packet and
6039 response.
6040 (captured_main): Initialize new global variables.
6041 * target.h (struct target_ops) <supports_fork_events>:
6042 New member.
6043 <supports_vfork_events>: New member.
6044 (target_supports_fork_events): New macro.
6045 (target_supports_vfork_events): New macro.
6046 * win32-low.c (win32_target_ops): Initialize new structure
6047 members.
6048
835205d0
GB
60492015-05-12 Gary Benson <gbenson@redhat.com>
6050
6051 * server.c (handle_qxfer_exec_file): Use current process
6052 if annex is empty.
6053
21e94bd9
SL
60542015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6055
6056 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6057 Remove HAVE_PTRACE_GETREGS conditionals.
6058 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6059 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6060
45614f15
YQ
60612015-05-08 Yao Qi <yao.qi@linaro.org>
6062
6063 * linux-low.c (linux_supports_conditional_breakpoints): New
6064 function.
6065 (linux_target_ops): Install new target method.
6066 * lynx-low.c (lynx_target_ops): Install NULL hook for
6067 supports_conditional_breakpoints.
6068 * nto-low.c (nto_target_ops): Likewise.
6069 * spu-low.c (spu_target_ops): Likewise.
6070 * win32-low.c (win32_target_ops): Likewise.
6071 * server.c (handle_query): Check
6072 target_supports_conditional_breakpoints.
6073 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6074 New field.
6075 (target_supports_conditional_breakpoints): New macro.
6076
80ad801e
PA
60772015-05-06 Pedro Alves <palves@redhat.com>
6078
6079 PR server/18081
6080 * server.c (start_inferior): If the process exits, mourn it.
6081
819843c7
GB
60822015-04-21 Gary Benson <gbenson@redhat.com>
6083
6084 * hostio.c (fileio_open_flags_to_host): Factored out to
6085 fileio_to_host_openflags in common/fileio.c. Single use
6086 updated.
6087
a2d5a9d7
MF
60882015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6089
6090 * linux-xtensa-low.c (xtensa_fill_gregset)
6091 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6092 XCHAL_HAVE_LOOP.
6093
deb44829
MF
60942015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6095
6096 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6097 (regs_info): Replace usrregs pointer with NULL.
6098
e57f1de3
GB
60992015-04-17 Gary Benson <gbenson@redhat.com>
6100
6101 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6102 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6103 * server.c (handle_qxfer_exec_file): New function.
6104 (qxfer_packets): Add exec-file entry.
6105 (handle_query): Report qXfer:exec-file:read as supported packet.
6106
62828379
RN
61072015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6108
6109 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6110
b88bb450
GB
61112015-04-09 Gary Benson <gbenson@redhat.com>
6112
6113 * hostio-errno.c (errno_to_fileio_error): Remove function.
6114 Update caller to use remote_fileio_to_fio_error.
6115
c8f4bfdd
YQ
61162015-04-09 Yao Qi <yao.qi@linaro.org>
6117
6118 * linux-low.c (linux_insert_point): Call
6119 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6120 (linux_remove_point): Call remove_memory_breakpoint if type is
6121 raw_bkpt_type_sw.
6122 * linux-x86-low.c (x86_insert_point): Don't call
6123 insert_memory_breakpoint.
6124 (x86_remove_point): Don't call remove_memory_breakpoint.
6125
41f98f02
PA
61262015-04-01 Pedro Alves <palves@redhat.com>
6127 Cleber Rosa <crosa@redhat.com>
6128
6129 * server.c (gdbserver_usage): Reorganize and extend the usage
6130 message.
6131
2bf6fb9d
PA
61322015-03-24 Pedro Alves <palves@redhat.com>
6133
6134 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6135 output. Also dump TRAP_TRACE.
6136 (linux_low_filter_event): In debug output, distinguish a
6137 resume_stop SIGSTOP from a delayed SIGSTOP.
6138
369f6daa
GB
61392015-03-24 Gary Benson <gbenson@redhat.com>
6140
6141 * linux-x86-low.c (x86_linux_new_thread): Moved to
6142 nat/x86-linux.c.
6143 (x86_linux_prepare_to_resume): Likewise.
6144
8e5d4070
GB
61452015-03-24 Gary Benson <gbenson@redhat.com>
6146
6147 * Makefile.in (x86-linux-dregs.o): New rule.
6148 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6149 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6150 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6151 (x86_linux_dr_get): Likewise.
6152 (x86_linux_dr_set): Likewise.
6153 (update_debug_registers_callback): Likewise.
6154 (x86_linux_dr_set_addr): Likewise.
6155 (x86_linux_dr_get_addr): Likewise.
6156 (x86_linux_dr_set_control): Likewise.
6157 (x86_linux_dr_get_control): Likewise.
6158 (x86_linux_dr_get_status): Likewise.
6159 (x86_linux_update_debug_registers): Likewise.
6160
2b95d440
GB
61612015-03-24 Gary Benson <gbenson@redhat.com>
6162
6163 * linux-x86-low.c (x86_linux_update_debug_registers):
6164 New function, factored out from...
6165 (x86_linux_prepare_to_resume): ...this.
6166
14b0bc68
GB
61672015-03-24 Gary Benson <gbenson@redhat.com>
6168
6169 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6170 (x86_linux_dr_set): Likewise.
6171 (update_debug_registers_callback): Likewise.
6172 (x86_linux_dr_set_addr): Likewise.
6173 (x86_linux_dr_get_addr): Likewise.
6174 (x86_linux_dr_set_control): Likewise.
6175 (x86_linux_dr_get_control): Likewise.
6176 (x86_linux_dr_get_status): Likewise.
6177 (x86_linux_prepare_to_resume): Likewise.
6178
5dfe6ca8
GB
61792015-03-24 Gary Benson <gbenson@redhat.com>
6180
6181 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6182 Use perror_with_name. Pass string through gettext.
6183 (x86_linux_dr_set): Likewise.
6184
d33472ad
GB
61852015-03-24 Gary Benson <gbenson@redhat.com>
6186
6187 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6188 (x86_linux_dr_set_addr): ...this.
6189 (x86_dr_low_get_addr): Rename to...
6190 (x86_linux_dr_get_addr): ...this.
6191 (x86_dr_low_set_control): Rename to...
6192 (x86_linux_dr_set_control): ...this.
6193 (x86_dr_low_get_control): Rename to...
6194 (x86_linux_dr_get_control): ...this.
6195 (x86_dr_low_get_status): Rename to...
6196 (x86_linux_dr_get_status): ...this.
6197 (x86_dr_low): Update with new function names.
6198
4b134ca1
GB
61992015-03-24 Gary Benson <gbenson@redhat.com>
6200
6201 * Makefile.in (x86-linux.o): New rule.
6202 * configure.srv: Add x86-linux.o to relevant targets.
6203 * linux-low.c (lwp_set_arch_private_info): New function.
6204 (lwp_arch_private_info): Likewise.
6205 * linux-x86-low.c: Include nat/x86-linux.h.
6206 (arch_lwp_info): Removed structure.
6207 (update_debug_registers_callback):
6208 Use lwp_set_debug_registers_changed.
6209 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6210 and lwp_set_debug_registers_changed.
6211 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6212
34c703da
GB
62132015-03-24 Gary Benson <gbenson@redhat.com>
6214
6215 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6216 * linux-arm-low.c (arm_new_thread): Likewise.
6217 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6218 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6219 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6220 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6221
cff068da
GB
62222015-03-24 Gary Benson <gbenson@redhat.com>
6223
6224 * linux-low.c (ptid_of_lwp): New function.
6225 (lwp_is_stopped): Likewise.
6226 (lwp_stop_reason): Likewise.
6227 * linux-x86-low.c (update_debug_registers_callback):
6228 Use lwp_is_stopped.
6229 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6230 lwp_stop_reason.
6231
b2f7c7e8
GB
62322015-03-24 Gary Benson <gbenson@redhat.com>
6233
6234 * linux-low.h (linux_stop_lwp): Remove declaration.
6235
6d4ee8c6
GB
62362015-03-24 Gary Benson <gbenson@redhat.com>
6237
6238 * linux-low.h: Include nat/linux-nat.h.
6239 * linux-low.c (iterate_over_lwps_args): New structure.
6240 (iterate_over_lwps_filter): New function.
6241 (iterate_over_lwps): Likewise.
6242 * linux-x86-low.c (update_debug_registers_callback):
6243 Update signature to what iterate_over_lwps expects.
6244 Remove PID check that iterate_over_lwps now performs.
6245 (x86_dr_low_set_addr): Use iterate_over_lwps.
6246 (x86_dr_low_set_control): Likewise.
6247
70a0bb6b
GB
62482015-03-24 Gary Benson <gbenson@redhat.com>
6249
6250 * linux-x86-low.c (x86_debug_reg_state): New function.
6251 (x86_linux_prepare_to_resume): Use the above.
6252
7b669087
GB
62532015-03-24 Gary Benson <gbenson@redhat.com>
6254
6255 * linux-low.c (current_lwp_ptid): New function.
6256 * linux-x86-low.c: Include nat/linux-nat.h.
6257 (x86_dr_low_get_addr): Use current_lwp_ptid.
6258 (x86_dr_low_get_control): Likewise.
6259 (x86_dr_low_get_status): Likewise.
6260
eef49a3d
PA
62612015-03-20 Pedro Alves <palves@redhat.com>
6262
6263 * tracepoint.c (cmd_qtstatus): Make "str" const.
6264
b2333d22
PA
62652015-03-20 Pedro Alves <palves@redhat.com>
6266
6267 * server.c (handle_general_set): Make "req_str" const.
6268
23f238d3
PA
62692015-03-19 Pedro Alves <palves@redhat.com>
6270
6271 * linux-low.c (linux_resume_one_lwp): Rename to ...
6272 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6273 instead call perror_with_name.
6274 (check_ptrace_stopped_lwp_gone): New function.
6275 (linux_resume_one_lwp): Reimplement as wrapper around
6276 linux_resume_one_lwp_throw that swallows errors if the LWP is
6277 gone.
6278
91baf43f
PA
62792015-03-19 Pedro Alves <palves@redhat.com>
6280
6281 * linux-low.c (count_events_callback, select_event_lwp_callback):
6282 No longer check whether the thread has resume_stop as last resume
6283 kind.
6284
8bf3b159
PA
62852015-03-19 Pedro Alves <palves@redhat.com>
6286
6287 * linux-low.c (count_events_callback, select_event_lwp_callback):
6288 Use the lwp's status_pending_p field, not the thread's.
6289
b90fc188
PA
62902015-03-19 Pedro Alves <palves@redhat.com>
6291
6292 * linux-low.c (select_event_lwp_callback): Update comments to
6293 no longer mention SIGTRAP.
6294
464b0089
GB
62952015-03-18 Gary Benson <gbenson@redhat.com>
6296
6297 * server.c (handle_query): Do not report vFile:fstat as supported.
6298
aa9e327f
GB
62992015-03-11 Gary Benson <gbenson@redhat.com>
6300
6301 * hostio.c (sys/types.h): New include.
6302 (sys/stat.h): Likewise.
6303 (common-remote-fileio.h): Likewise.
6304 (handle_fstat): New function.
6305 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6306
791c0056
GB
63072015-03-11 Gary Benson <gbenson@redhat.com>
6308
6309 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6310 struct stat.st_blocks and struct stat.st_blksize.
6311 * configure: Regenerate.
6312 * config.in: Likewise.
6313 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6314 (OBS): Add common-remote-fileio.o.
6315 (common-remote-fileio.o): New rule.
6316
9a9df970
PA
63172015-03-09 Pedro Alves <palves@redhat.com>
6318
6319 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6320 'struct sockaddr' pointer in 'accept' call.
6321
9eb1356e
PA
63222015-03-09 Pedro Alves <palves@redhat.com>
6323
6324 Revert:
6325 2015-03-07 Pedro Alves <palves@redhat.com>
6326 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6327 or <winsock2.h> here. Instead include "gdb_socket.h".
6328 (remote_open): Use union gdb_sockaddr_u.
6329 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6330 or <winsock2.h> here. Instead include "gdb_socket.h".
6331 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6332 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6333 or <sys/un.h>.
6334 (init_named_socket, gdb_agent_helper_thread): Use union
6335 gdb_sockaddr_u.
6336
aac331e4
PA
63372015-03-07 Pedro Alves <palves@redhat.com>
6338
6339 * configure.ac (build_warnings): Move
6340 -Wdeclaration-after-statement to the C-specific set.
6341 * configure: Regenerate.
6342
366c75fc
PA
63432015-03-07 Pedro Alves <palves@redhat.com>
6344
6345 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6346 or <winsock2.h> here. Instead include "gdb_socket.h".
6347 (remote_open): Use union gdb_sockaddr_u.
6348 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6349 or <winsock2.h> here. Instead include "gdb_socket.h".
6350 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6351 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6352 or <sys/un.h>.
6353 (init_named_socket, gdb_agent_helper_thread): Use union
6354 gdb_sockaddr_u.
6355
492d29ea
PA
63562015-03-07 Pedro Alves <palves@redhat.com>
6357
6358 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6359 instead.
6360
60a191ed
YQ
63612015-03-06 Yao Qi <yao.qi@linaro.org>
6362
6363 * linux-aarch64-low.c (aarch64_insert_point): Use
6364 show_debug_regs as a boolean.
6365 (aarch64_remove_point): Likewise.
6366
f5771b1d
PA
63672015-03-05 Pedro Alves <palves@redhat.com>
6368
6369 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6370 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6371 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6372 * nto-low.c (nto_target_ops): Likewise.
6373 * spu-low.c (spu_target_ops): Likewise.
6374 * win32-low.c (win32_target_ops): Likewise.
6375
3e572f71
PA
63762015-03-04 Pedro Alves <palves@redhat.com>
6377
72f4393d 6378 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6379 Decide whether a breakpoint triggered based on the SIGTRAP's
6380 siginfo.si_code.
72f4393d
L
6381 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6382 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6383 (linux_low_filter_event): Check for breakpoints before checking
6384 watchpoints.
6385 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6386 siginfo.si_code.
72f4393d
L
6387 (linux_stopped_by_sw_breakpoint)
6388 (linux_supports_stopped_by_sw_breakpoint)
6389 (linux_stopped_by_hw_breakpoint)
6390 (linux_supports_stopped_by_hw_breakpoint): New functions.
6391 (linux_target_ops): Install new target methods.
3e572f71 6392
1ec68e26
PA
63932015-03-04 Pedro Alves <palves@redhat.com>
6394
6395 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6396 * server.c (swbreak_feature, hwbreak_feature): New globals.
6397 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6398 (captured_main): Clear swbreak_feature and hwbreak_feature.
6399 * server.h (swbreak_feature, hwbreak_feature): Declare.
6400 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6401 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6402 supports_stopped_by_hw_breakpoint>: New fields.
6403 (target_supports_stopped_by_sw_breakpoint)
6404 (target_stopped_by_sw_breakpoint)
6405 (target_supports_stopped_by_hw_breakpoint)
6406 (target_stopped_by_hw_breakpoint): Declare.
6407
15c66dd6
PA
64082015-03-04 Pedro Alves <palves@redhat.com>
6409
6410 enum lwp_stop_reason -> enum target_stop_reason
6411 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6412 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6413 (linux_wait_1, stuck_in_jump_pad_callback)
6414 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6415 (linux_stopped_by_watchpoint):
6416 * linux-low.h (enum lwp_stop_reason): Delete.
6417 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6418 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6419
98fc70d6
YQ
64202015-03-04 Yao Qi <yao.qi@linaro.org>
6421
6422 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6423
dd2ac174
GB
64242015-03-03 Gary Benson <gbenson@redhat.com>
6425
6426 * hostio.c (handle_vFile): Fix prefix lengths.
6427
d68e53f4
MM
64282015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6429
6430 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6431 ptr_bits.
6432
bf2d68ab
AA
64332015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6434
6435 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6436 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6437 (clean): Add "rm -f" for above C files.
6438 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6439 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6440 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6441 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6442 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6443 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6444 (init_registers_s390x_vx_linux64)
6445 (init_registers_s390x_tevx_linux64)
6446 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6447 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6448 declarations.
6449 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6450 (s390_store_vxrs_high): New functions.
6451 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6452 NT_S390_VXRS_HIGH.
6453 (s390_arch_setup): Add logic for selecting one of the new target
6454 descriptions. Activate the new vector regsets if applicable.
6455 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6456 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6457 and init_registers_s390x_tevx_linux64.
6458
c966a859
PA
64592015-03-01 Pedro Alves <palves@redhat.com>
6460
6461 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6462 parameter.
6463
4180215b
PA
64642015-02-27 Pedro Alves <palves@redhat.com>
6465
6466 * linux-x86-low.c (u_debugreg_offset): New function.
6467 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6468
749bab01
PA
64692015-02-27 Pedro Alves <palves@redhat.com>
6470
6471 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6472 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6473 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6474 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6475 (ps_lsetfpregs, ps_getpid)
6476 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6477 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6478 (ps_lsetxregs, ps_plog): Declare.
6479
3c14e5a3
PA
64802015-02-27 Pedro Alves <palves@redhat.com>
6481
6482 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6483 IP_AGENT_EXPORT_FUNC.
6484 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6485 IP_AGENT_EXPORT_FUNC.
6486 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6487 (IP_AGENT_EXPORT): Delete.
6488 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6489 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6490 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6491 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6492 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6493 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6494 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6495 (traceframe_read_count, traceframe_write_count)
6496 (traceframes_created, trace_state_variables, get_raw_reg)
6497 (get_trace_state_variable_value, set_trace_state_variable_value)
6498 (ust_loaded, helper_thread_id, cmd_buf): Use
6499 IPA_SYM_EXPORTED_NAME.
6500 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6501 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6502 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6503 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6504 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6505 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6506 EXTERN_C_PUSH/EXTERN_C_POP.
6507 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6508 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6509 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6510 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6511 (traceframe_write_count, traceframe_read_count)
6512 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6513 (about_to_request_buffer_space, get_trace_state_variable_value)
6514 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6515 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6516 EXTERN_C_PUSH/EXTERN_C_POP.
6517 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6518 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6519 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6520 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6521 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6522 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6523 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6524 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6525 Define.
6526 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6527 (IP_AGENT_EXPORT_VAR_DECL): Define.
6528 (tracing): Declare.
6529 (gdb_agent_get_raw_reg): Declare.
6530
fe978cb0
PA
65312015-02-27 Tom Tromey <tromey@redhat.com>
6532 Pedro Alves <palves@redhat.com>
6533
6534 Rename symbols whose names are reserved C++ keywords throughout.
6535
3bc3d82a
PA
65362015-02-27 Pedro Alves <palves@redhat.com>
6537
6538 * Makefile.in (COMPILER): New, get it from autoconf.
6539 (CXX): Get from autoconf instead.
6540 (COMPILE.pre): Use COMPILER.
6541 (CC-LD): Rename to ...
6542 (CC_LD): ... this. Use COMPILER.
6543 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6544 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6545 * acinclude.m4: Include build-with-cxx.m4.
6546 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6547 Disable -Werror by default if building in C++ mode.
6548 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6549 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6550 the C++ compiler. Save/restore CXXFLAGS too.
6551 * configure: Regenerate.
6552
07697489
PA
65532015-02-27 Pedro Alves <palves@redhat.com>
6554
6555 * acinclude.m4: Include libiberty.m4.
6556 * configure.ac: Call libiberty_INIT.
6557 * config.in, configure: Regenerate.
6558
9beb7c4e
PA
65592015-02-26 Pedro Alves <palves@redhat.com>
6560
6561 * linux-low.c (linux_wait_1): When incrementing the PC past a
6562 program breakpoint always use the_low_target.breakpoint_len as
6563 increment, rather than the maximum between that and
6564 the_low_target.decr_pc_after_break.
6565
8090aef2
PA
65662015-02-23 Pedro Alves <palves@redhat.com>
6567
6568 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6569 thread was doing a step-over; always adjust the PC if
6570 we stepped over a permanent breakpoint.
6571 (linux_wait_1): If we stepped over breakpoint that was on top of a
6572 permanent breakpoint, manually advance the PC past it.
6573
bc9540e8
PA
65742015-02-23 Pedro Alves <palves@redhat.com>
6575
6576 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6577 modes.
6578 (x86_fill_gregset, x86_store_gregset): Use it when handling
6579 $orig_eax.
6580
2db9a427
PA
65812015-02-20 Pedro Alves <palves@redhat.com>
6582
6583 * thread-db.c: Include "nat/linux-procfs.h".
6584 (thread_db_init): Skip listing new threads if the kernel supports
6585 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6586
afa8d396
PA
65872015-02-20 Pedro Alves <palves@redhat.com>
6588
6589 * linux-low.c (status_pending_p_callback): Use ptid_match.
6590
c9587f88
AT
65912015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6592
6593 PR breakpoints/16812
6594 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6595 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6596 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6597
b05ec7a5
AT
65982015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6599
6600 PR breakpoints/15956
6601 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6602
d33501a5
MM
66032015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6604
6605 * linux-low.c (linux_low_btrace_conf): Print size.
6606 * server.c (handle_btrace_conf_general_set): New.
6607 (hanle_general_set): Call handle_btrace_conf_general_set.
6608 (handle_query): Report Qbtrace-conf:bts:size as supported.
6609
f4abbc16
MM
66102015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6611
6612 * linux-low.c (linux_low_enable_btrace): Update parameters.
6613 (linux_low_btrace_conf): New.
6614 (linux_target_ops)<to_btrace_conf>: Initialize.
6615 * server.c (current_btrace_conf): New.
6616 (handle_btrace_enable): Rename to ...
6617 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6618 to target_enable_btrace. Update comment. Update users.
6619 (handle_qxfer_btrace_conf): New.
6620 (qxfer_packets): Add btrace-conf entry.
6621 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6622 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6623 (target_ops)<read_btrace_conf>: New.
6624 (target_enable_btrace): Update parameters.
6625 (target_read_btrace_conf): New.
6626
043c3577
MM
66272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6628
6629 * server.c (handle_btrace_general_set): Remove call to
6630 target_supports_btrace.
6631 (supported_btrace_packets): New.
6632 (handle_query): Call supported_btrace_packets.
6633 * target.h: include btrace-common.h.
6634 (btrace_target_info): Removed.
6635 (supports_btrace, target_supports_btrace): Update parameters.
6636
734b0e4b
MM
66372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6638
6639 * Makefile.in (SFILES): Add common/btrace-common.c.
6640 (OBS): Add common/btrace-common.o.
6641 (btrace-common.o): Add build rules.
6642 * linux-low: Include btrace-common.h.
6643 (linux_low_read_btrace): Use struct btrace_data. Call
6644 btrace_data_init and btrace_data_fini.
6645
d6c146e9
PA
66462015-02-06 Pedro Alves <palves@redhat.com>
6647
6648 * thread-db.c (find_new_threads_callback): Add debug output.
6649
20ba1ce6
PA
66502015-02-04 Pedro Alves <palves@redhat.com>
6651
6652 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6653 (resume_stopped_resumed_lwps): New function.
6654 (linux_wait_for_event_filtered): Use it.
6655
8cc73a39
SDJ
66562015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6657
6658 * Makefile.in (SFILES): Add linux-personality.c.
6659 (linux-personality.o): New rule.
6660 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6661 list of objects to be built.
6662 * linux-low.c: Include nat/linux-personality.h.
6663 (linux_create_inferior): Remove code to disable address space
6664 randomization (moved to ../nat/linux-personality.c). Create
6665 cleanup to disable address space randomization.
6666
fb23d554
SDJ
66672015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6668
6669 * Makefile.in (posix-strerror.o): New rule.
6670 (mingw-strerror.o): Likewise.
6671 * configure: Regenerated.
6672 * configure.ac: Source file ../common/common.host. Initialize new
6673 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6674
cdf43629
YQ
66752015-01-14 Yao Qi <yao@codesourcery.com>
6676
6677 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6678 (ppc-linux.o): New rule.
6679 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6680 * configure.ac: AC_CHECK_FUNCS(getauxval).
6681 * config.in: Re-generated.
6682 * configure: Re-generated.
6683 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6684 ppc64_64bit_inferior_p
6685
514c5338
YQ
66862015-01-14 Yao Qi <yao@codesourcery.com>
6687
6688 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6689 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6690 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6691 (PT_ORIG_R3, PT_TRAP): Likewise.
6692 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6693 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6694 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6695
3368c1e5
JB
66962015-01-10 Joel Brobecker <brobecker@adacore.com>
6697
6698 * i387-fp.c (i387_cache_to_xsave): In look over
6699 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6700 zmmh_low_space field by use of zmmh_high_space.
6701
582511be
PA
67022015-01-09 Pedro Alves <palves@redhat.com>
6703
6704 * linux-low.c (step_over_bkpt): Move higher up in the file.
6705 (handle_extended_wait): Don't store the stop_pc here.
6706 (get_stop_pc): Adjust comments and rename to ...
6707 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6708 stopped for a software breakpoint or hardware breakpoint.
6709 (thread_still_has_status_pending_p): New function.
6710 (status_pending_p_callback): Use
6711 thread_still_has_status_pending_p. If the event is no longer
6712 interesting, resume the LWP.
6713 (handle_tracepoints): Add assert.
6714 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6715 (wstatus_maybe_breakpoint): New function.
6716 (cancel_breakpoint): Delete function.
6717 (check_stopped_by_watchpoint): New function, factored out from
6718 linux_low_filter_event.
6719 (lp_status_maybe_breakpoint): Delete function.
6720 (linux_low_filter_event): Remove filter_ptid argument.
6721 Leave thread group exits pending here. Store the LWP's stop PC.
6722 Always leave events pending.
6723 (linux_wait_for_event_filtered): Pull all events out of the
6724 kernel, and leave them all pending.
6725 (count_events_callback, select_event_lwp_callback): Consider all
6726 events.
6727 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6728 (select_event_lwp): Only give preference to the stepping LWP in
6729 all-stop mode. Adjust comments.
6730 (ignore_event): New function.
6731 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6732 references to cancel_breakpoints. Adjust to renames. Also give
6733 equal priority to all LWPs that have had events in non-stop mode.
6734 If reporting a software breakpoint event, unadjust the LWP's PC.
6735 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6736 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6737 Adjust.
6738 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6739 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6740 (linux_stopped_by_watchpoint): Adjust.
6741 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6742 * linux-low.h (enum lwp_stop_reason): New.
6743 (struct lwp_info) <stop_pc>: Adjust comment.
6744 <stopped_by_watchpoint>: Delete field.
6745 <stop_reason>: New field.
6746 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6747 * mem-break.c (software_breakpoint_inserted_here)
6748 (hardware_breakpoint_inserted_here): New function.
6749 * mem-break.h (software_breakpoint_inserted_here)
6750 (hardware_breakpoint_inserted_here): Declare.
6751 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6752 (cancel_breakpoints): Delete.
6753 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6754 (upload_fast_traceframes): Remove references to
6755 cancel_breakpoints.
6756
a33e3959
PA
67572015-01-09 Pedro Alves <palves@redhat.com>
6758
6759 * thread-db.c (find_new_threads_callback): Ignore thread if the
6760 kernel thread ID is -1.
6761
8784d563
PA
67622015-01-09 Pedro Alves <palves@redhat.com>
6763
6764 * linux-low.c (linux_attach_fail_reason_string): Move to
6765 nat/linux-ptrace.c, and rename.
6766 (linux_attach_lwp): Update comment.
6767 (attach_proc_task_lwp_callback): New function.
6768 (linux_attach): Adjust to rename and use
6769 linux_proc_attach_tgid_threads.
6770 (linux_attach_fail_reason_string): Delete declaration.
6771
76f2b779
JB
67722015-01-01 Joel Brobecker <brobecker@adacore.com>
6773
6774 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6775 * server.c (gdbserver_version): Likewise.
6776
fafcc06a
SDJ
67772014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6778
6779 * remote-utils.c: Include ctype.h.
6780 (input_interrupt): Explicitly handle the case when the char
6781 received is the NUL byte. Improve the printing of non-ASCII
6782 characters.
6783
beed38b8
JB
67842014-12-16 Joel Brobecker <brobecker@adacore.com>
6785
6786 * linux-low.c (linux_low_filter_event): Update call to
6787 linux_enable_event_reporting following the addition of
6788 a new parameter to that function.
6789
bf330350
CU
67902014-12-16 Catalin Udma <catalin.udma@freescale.com>
6791
6792 PR server/17457
6793 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6794 (AARCH64_FPCR_REGNO): Likewise.
6795 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6796 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6797 (aarch64_store_fpregset): Likewise.
6798
5227d625
JB
67992014-12-15 Joel Brobecker <brobecker@adacore.com>
6800
6801 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6802 Remove FIXME comment about assumption about N.
6803
f93b65a0
JB
68042014-12-13 Joel Brobecker <brobecker@adacore.com>
6805
6806 * configure.ac: If large-file support is disabled in GDBserver,
6807 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6808 * configure: Regenerate.
6809
e5a9158d
AA
68102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6811
6812 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6813 warning upon ENODATA from ptrace.
6814 * linux-s390-low.c (s390_store_tdb): New.
6815 (s390_regsets): Add regset for NT_S390_TDB.
6816
feea5f36
AA
68172014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6818
6819 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6820 without a fill_function.
6821 * linux-s390-low.c (s390_fill_last_break): Remove.
6822 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6823 (s390_arch_setup): Use regset's size instead of fill_function for
6824 loop end condition.
6825
098dbe61
AA
68262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6827
6828 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6829 the regset's store function when ptrace returned an error.
6830 * regcache.c (get_thread_regcache): Invalidate register cache
6831 before fetching inferior's registers.
6832
28eef672
AA
68332014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6834
6835 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6836 while-loop as for-loop.
6837 (regsets_store_inferior_registers): Likewise.
6838
bdca27a2
YQ
68392014-11-28 Yao Qi <yao@codesourcery.com>
6840
6841 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6842 * config.in, configure: Re-generate.
6843 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6844 is defined.
6845
9c232dda
YQ
68462014-11-21 Yao Qi <yao@codesourcery.com>
6847
6848 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6849 (AC_CHECK_HEADERS): Remove malloc.h.
6850 * configure: Re-generated.
6851 * config.in: Re-generated.
6852 * server.h: Don't include alloca.h and malloc.h.
6853 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6854 Don't include malloc.h.
6855
43968415
JB
68562014-11-17 Joel Brobecker <brobecker@adacore.com>
6857
6858 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6859 corresponding ERRNO check in same block.
6860
40e91bc7
PA
68612014-11-12 Pedro Alves <palves@redhat.com>
6862
6863 * server.c (cont_thread): Update comment.
6864 (start_inferior, attach_inferior): No longer clear cont_thread.
6865 (handle_v_cont): No longer set cont_thread.
6866 (captured_main): Clear cont_thread each time a GDB connects.
6867
c2c118cf
PA
68682014-11-12 Pedro Alves <palves@redhat.com>
6869
6870 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6871 thread, and don't resume all threads if the Hc thread has exited.
6872
78708b7c
PA
68732014-11-12 Pedro Alves <palves@redhat.com>
6874
6875 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6876 the process group instead of to a specific LWP.
6877
a2abc7de
PA
68782014-10-15 Pedro Alves <palves@redhat.com>
6879
6880 PR server/17487
6881 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6882 parameter.
6883 (arm_set_thread_context): Delete.
6884 (the_low_target): Adjust.
6885 * win32-i386-low.c (debug_registers_changed)
6886 (debug_registers_used): Delete.
6887 (update_debug_registers_callback): New function.
6888 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6889 needing to update their debug registers.
6890 (win32_get_current_dr): New function.
6891 (x86_dr_low_get_addr, x86_dr_low_get_control)
6892 (x86_dr_low_get_status): Fetch the debug register from the thread
6893 record's context.
6894 (i386_initial_stuff): Adjust.
6895 (i386_get_thread_context): Remove current_event parameter. Don't
6896 clear debug_registers_changed nor copy DR values to
6897 debug_reg_state.
6898 (i386_set_thread_context): Delete.
6899 (i386_prepare_to_resume): New function.
6900 (i386_thread_added): Mark the thread as needing to update irs
6901 debug registers.
6902 (the_low_target): Remove i386_set_thread_context and install
6903 i386_prepare_to_resume.
6904 * win32-low.c (win32_get_thread_context): Adjust.
6905 (win32_set_thread_context): Use SetThreadContext
6906 directly.
6907 (win32_prepare_to_resume): New function.
6908 (win32_require_context): New function, factored out from ...
6909 (thread_rec): ... this.
6910 (continue_one_thread): Call win32_prepare_to_resume on each thread
6911 we're about to continue.
6912 (win32_resume): Call win32_prepare_to_resume on the event thread.
6913 * win32-low.h (struct win32_thread_info)
6914 <debug_registers_changed>: New field.
6915 (struct win32_target_ops): Change prototype of set_thread_context,
6916 delete set_thread_context and add prepare_to_resume.
6917 (win32_require_context): New declaration.
6918
a442d071
GB
69192014-10-08 Gary Benson <gbenson@redhat.com>
6920
6921 * server.h: Do not include common-exceptions.h.
6922
6f1947e8
GB
69232014-10-08 Gary Benson <gbenson@redhat.com>
6924
6925 * server.h: Do not include cleanups.h.
6926
63b434a4
JH
69272014-09-30 James Hogan <james.hogan@imgtec.com>
6928
6929 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6930 mips64-dsp-linux.c.
6931
c4d9ceb6
YQ
69322014-09-23 Yao Qi <yao@codesourcery.com>
6933
6934 * linux-low.c (lp_status_maybe_breakpoint): New function.
6935 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6936 (count_events_callback): Likewise.
6937 (select_event_lwp_callback): Likewise.
6938 (cancel_breakpoints_callback): Likewise.
6939
89a5711c
DB
69402014-09-19 Don Breazeal <donb@codesourcery.com>
6941
6942 * linux-low.c (handle_extended_wait): Call
6943 linux_ptrace_get_extended_event.
6944 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6945 linux_is_extended_waitstatus.
6946
bffc0964
JB
69472014-09-16 Joel Brobecker <brobecker@adacore.com>
6948
6949 * Makefile.in (CPPFLAGS): Define.
6950 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6951 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6952
0bfdf32f
GB
69532014-09-16 Gary Benson <gbenson@redhat.com>
6954
6955 * inferiors.h (current_inferior): Renamed as...
6956 (current_thread): New variable. All uses updated.
6957 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6958 (maybe_move_out_of_jump_pad): Likewise.
6959 (cancel_breakpoint): Likewise.
6960 (linux_low_filter_event): Likewise.
6961 (wait_for_sigstop): Likewise.
6962 (linux_resume_one_lwp): Likewise.
6963 (need_step_over_p): Likewise.
6964 (start_step_over): Likewise.
6965 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6966 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6967 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6968 and save_inferior as saved_thread.
6969 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6970 saved_thread.
6971 (regcache_invalidate_thread): Likewise.
6972 * remote-utils.c (prepare_resume_reply): Likewise.
6973 * thread-db.c (thread_db_get_tls_address): Likewise.
6974 (disable_thread_event_reporting): Likewise.
6975 (remove_thread_event_breakpoints): Likewise.
6976 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6977 as saved_thread.
6978 * target.h (set_desired_inferior): Renamed as...
6979 (set_desired_thread): New declaration. All uses updated.
6980 * server.c (myresume): Updated comment to reference thread instead
6981 of inferior.
6982 (handle_serial_event): Likewise.
6983 (handle_target_event): Likewise.
6984
361c8ade
GB
69852014-09-12 Tom Tromey <tromey@redhat.com>
6986 Gary Benson <gbenson@redhat.com>
6987
6988 * regcache.h: Include common-regcache.h.
6989 (regcache_read_pc): Don't declare.
6990 * regcache.c (get_thread_regcache_for_ptid): New function.
6991
bd9269f7
GB
69922014-09-11 Tom Tromey <tromey@redhat.com>
6993 Gary Benson <gbenson@redhat.com>
6994
6995 * symbol.c: New file.
6996 * Makefile.in (SFILES): Add symbol.c.
6997 (OBS): Add symbol.o.
6998
f8c1d06b
GB
69992014-09-11 Gary Benson <gbenson@redhat.com>
7000
7001 * target.c (target_stop_ptid, target_continue_ptid): New
7002 functions.
7003
721ec300
GB
70042014-09-11 Tom Tromey <tromey@redhat.com>
7005 Gary Benson <gbenson@redhat.com>
7006
7007 * target.h: Include target/target.h.
7008 * target.c (target_read_memory, target_read_uint32)
7009 (target_write_memory): New functions.
7010
c5e92cca
GB
70112014-09-11 Gary Benson <gbenson@redhat.com>
7012
7013 * server.h (debug_hw_points): Don't declare.
7014 * server.c (debug_hw_points): Don't define. Replace all uses
7015 with show_debug_regs.
7016 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7017 all uses with show_debug_regs.
7018
2e4bb98a
EBM
70192014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7020
7021 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7022 endianness into account.
7023 (ppc_supply_ptrace_register): Likewise.
7024
ac740bc7
JH
70252014-09-03 James Hogan <james.hogan@imgtec.com>
7026
7027 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7028 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7029
97ea6506
GB
70302014-09-03 Gary Benson <gbenson@redhat.com>
7031
7032 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7033 ALL_DEBUG_ADDRESS_REGISTERS.
7034
df7e5265
GB
70352014-09-02 Gary Benson <gbenson@redhat.com>
7036
7037 * i386-low.h: Renamed as...
7038 * x86-low.h: New file. All type, function and variable name
7039 prefixes changed from "i386_" to "x86_". All references updated.
7040 * i386-low.c: Renamed as...
7041 * x86-low.c: New file. All type, function and variable name
7042 prefixes changed from "i386_" to "x86_". All references updated.
7043
ed859da7
GB
70442014-09-02 Gary Benson <gbenson@redhat.com>
7045
7046 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7047 (x86_linux_new_thread): Likewise.
7048
860789c7
GB
70492014-08-29 Gary Benson <gbenson@redhat.com>
7050
7051 * server.h (setjmp.h): Do not include.
7052 (toplevel): Do not declare.
7053 (common-exceptions.h): Include.
7054 (cleanups.h): Likewise.
7055 * server.c (toplevel): Do not define.
7056 (exit_code): New static global.
7057 (detach_or_kill_for_exit_cleanup): New function.
7058 (main): New function. Original main renamed to...
7059 (captured_main): New function.
7060 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7061
ff55e1b5
GB
70622014-08-29 Gary Benson <gbenson@redhat.com>
7063
7064 * Makefile.in (SFILES): Add common/common-exceptions.c.
7065 (OBS): Add common-exceptions.o.
7066 (common-exceptions.o): New rule.
7067 * utils.c (prepare_to_throw_exception): New function.
7068
e9bcb658
GB
70692014-08-29 Gary Benson <gbenson@redhat.com>
7070
7071 * config.in: Regenerate.
7072 * configure: Likewise.
7073
e3180625
GB
70742014-08-29 Gary Benson <gbenson@redhat.com>
7075
7076 * Makefile.in (SFILES): Add common/cleanups.c.
7077 (OBS): cleanups.o.
7078 (cleanups.o): New rule.
7079
e3d6ba5d
GB
70802014-08-29 Gary Benson <gbenson@redhat.com>
7081
7082 * utils.c (internal_vwarning): New function.
7083
7096e886
GB
70842014-08-28 Gary Benson <gbenson@redhat.com>
7085
7086 * utils.h (fatal): Remove declaration.
7087 * utils.c (fatal): Remove function.
7088
14ce3192
GB
70892014-08-28 Gary Benson <gbenson@redhat.com>
7090
7091 * tracepoint.c (gdb_agent_init): Replace fatal with
7092 perror_with_name.
7093 (initialize_tracepoint): Likewise.
7094
50278d59
GB
70952014-08-28 Gary Benson <gbenson@redhat.com>
7096
7097 * remote-utils.c (remote_prepare): Replace fatal with error.
7098
aa96c426
GB
70992014-08-28 Gary Benson <gbenson@redhat.com>
7100
7101 * linux-low.c (linux_async): Replace fatal with warning.
7102 Tidy up and return.
7103 (linux_start_non_stop): Return -1 if linux_async failed.
7104
f7160e97
GB
71052014-08-28 Gary Benson <gbenson@redhat.com>
7106
7107 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7108 gdb_assert.
7109 (i386_dr_low_get_addr): Remove vague comment.
7110 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7111 gdb_assert.
7112
38e08fca
GB
71132014-08-28 Gary Benson <gbenson@redhat.com>
7114
7115 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7116 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7117 internal_error.
7118 (linux_resume_one_lwp): Likewise.
7119 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7120 gdb_assert.
7121 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7122 with internal_error.
7123 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7124 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7125 (find_register_by_name): Replace fatal with internal_error.
7126 (find_regno): Likewise.
7127 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7128 * thread-db.c (thread_db_create_event): Likewise.
7129 (thread_db_load_search): Likewise.
7130 (try_thread_db_load_1): Likewise.
7131 * tracepoint.c (get_jump_space_head): Replace fatal with
7132 internal_error.
7133 (claim_trampoline_space): Likewise.
7134 (have_fast_tracepoint_trampoline_buffer): Likewise.
7135 (cmd_qtstart): Likewise.
7136 (stop_tracing): Likewise.
7137 (fast_tracepoint_collecting): Likewise.
7138 (target_malloc): Likewise.
7139 (download_tracepoint): Likewise.
7140 (download_trace_state_variables): Replace check with gdb_assert.
7141 (upload_fast_traceframes): Replace fatal with internal_error.
7142
34abf635
GB
71432014-08-19 Tom Tromey <tromey@redhat.com>
7144 Gary Benson <gbenson@redhat.com>
7145
7146 * Makefile.in (SFILES): Add common/common-debug.c.
7147 (OBS): Add common-debug.o.
7148 (common-debug.o): New rule.
7149 * debug.h (debug_printf): Don't declare.
7150 * debug.c (debug_printf): Renamed and rewritten as...
7151 (debug_vprintf): New function.
7152
f6e94d78
GB
71532014-08-19 Gary Benson <gbenson@redhat.com>
7154
7155 * utils.h: Do not include print-utils.h.
7156
9239eeab
GB
71572014-08-19 Tom Tromey <tromey@redhat.com>
7158 Gary Benson <gbenson@redhat.com>
7159
7160 * server.h: Add static assertion.
7161 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7162
ef87c8bb
GB
71632014-08-19 Tom Tromey <tromey@redhat.com>
7164 Gary Benson <gbenson@redhat.com>
7165
7166 * Makefile.in (SFILES): Add common/errors.c.
7167 (OBS): Add errors.o.
7168 (IPA_OBS): Add errors-ipa.o.
7169 (errors.o): New rule.
7170 (errors-ipa.o): Likewise.
7171 * utils.h (perror_with_name, error, warning): Don't declare.
7172 * utils.c (warning): Renamed and rewritten as...
7173 (vwarning): New function.
7174 (error): Renamed and rewritten as...
7175 (verror): New function.
7176 (internal_error): Renamed and rewritten as...
7177 (internal_verror): New function.
7178
bb974a24
GB
71792014-08-07 Gary Benson <gbenson@redhat.com>
7180
7181 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7182 * configure: Regenerate.
7183 * config.in: Likewise.
7184 * server.h: Do not include errno.h.
7185 * event-loop.c: Likewise.
7186 * hostio-errno.c: Likewise.
7187 * linux-low.c: Likewise.
7188 * remote-utils.c: Likewise.
7189 * spu-low.c: Likewise.
7190 * utils.c: Likewise.
7191 * gdbreplay.c: Unconditionally include errno.h.
7192
6d3d12eb
GB
71932014-08-07 Gary Benson <gbenson@redhat.com>
7194
7195 * server.h: Do not include string.h.
7196 * event-loop.c: Likewise.
7197 * linux-low.c: Likewise.
7198 * regcache.c: Likewise.
7199 * remote-utils.c: Likewise.
7200 * spu-low.c: Likewise.
7201 * utils.c: Likewise.
7202
dccbb609
GB
72032014-08-07 Gary Benson <gbenson@redhat.com>
7204
7205 * server.h: Do not include gdb_assert.h.
7206
e76df0d0
GB
72072014-08-07 Gary Benson <gbenson@redhat.com>
7208
7209 * server.h: Do not include common-utils.h.
7210
4cb9c816
GB
72112014-08-07 Gary Benson <gbenson@redhat.com>
7212
7213 * server.h: Do not include ptid.h.
7214 * notif.h: Likewise.
7215
3995eeee
GB
72162014-08-07 Gary Benson <gbenson@redhat.com>
7217
7218 * server.h: Do not include gdb_locale.h.
7219
cb9f1a9b
GB
72202014-08-07 Gary Benson <gbenson@redhat.com>
7221
7222 * server.h: Do not include gdb/signals.h.
7223 * win32-low.c: Likewise.
7224
a5fceff8
GB
72252014-08-07 Gary Benson <gbenson@redhat.com>
7226
7227 * server.h: Do not include pathmax.h.
7228
b9391142
GB
72292014-08-07 Gary Benson <gbenson@redhat.com>
7230
7231 * server.h: Do not include libiberty.h.
7232 * linux-bfin-low.c: Likewise.
7233
0e443c87
GB
72342014-08-07 Gary Benson <gbenson@redhat.com>
7235
7236 * server.h: Do not include ansidecl.h.
7237
8ebb3f56
GB
72382014-08-07 Gary Benson <gbenson@redhat.com>
7239
7240 * linux-x86-low.c: Do not include stddef.h.
7241 * lynx-ppc-low.c: Likewise.
7242 * tracepoint.c: Likewise.
7243
8980bdf6
GB
72442014-08-07 Gary Benson <gbenson@redhat.com>
7245
7246 * server.h: Do not include stdarg.h.
7247 * nto-low.c: Likewise.
7248
d7096f71
GB
72492014-08-07 Gary Benson <gbenson@redhat.com>
7250
7251 * server.h: Do not include stdlib.h.
7252 * inferiors.c: Likewise.
7253 * linux-low.c: Likewise.
7254 * regcache.c: Likewise.
7255 * spu-low.c: Likewise.
7256 * tracepoint.c: Likewise.
7257 * utils.c: Likewise.
7258
d02f550d
GB
72592014-08-07 Gary Benson <gbenson@redhat.com>
7260
7261 * server.h: Do not include stdio.h.
7262 * linux-low.c: Likewise.
7263 * remote-utils.c: Likewise.
7264 * spu-low.c: Likewise.
7265 * utils.c: Likewise.
7266 * wincecompat.c: Likewise.
7267
87f6c4e3
GB
72682014-08-06 Gary Benson <gbenson@redhat.com>
7269
7270 * regcache.c (init_register_cache): Move conditionals inside if.
7271
7089dca4
GB
72722014-08-06 Gary Benson <gbenson@redhat.com>
7273
7274 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7275
462f517e
GB
72762014-07-31 Gary Benson <gbenson@redhat.com>
7277
7278 * ax.h: Do not include server.h.
7279 * gdbthread.h: Likewise.
7280 * lynx-low.h: Likewise.
7281 * notif.h: Likewise.
7282
976411d6
GB
72832014-07-30 Gary Benson <gbenson@redhat.com>
7284
7285 * server.h: Include common-defs.h.
7286 Do not include config.h or build-gnulib-gdbserver/config.h.
7287
d41f6d8e
GB
72882014-07-30 Gary Benson <gbenson@redhat.com>
7289
7290 * hostio-errno.c: Move server.h to top of includes list.
7291 * inferiors.c: Likewise.
7292 * linux-x86-low.c: Likewise.
7293 * notif.c: Include server.h.
7294
314c6a35
TT
72952014-07-24 Tom Tromey <tromey@redhat.com>
7296 Gary Benson <gbenson@redhat.com>
7297
7298 * server.h (CORE_ADDR): Now unsigned.
7299
69ff6be5
PA
73002014-07-16 Pedro Alves <palves@redhat.com>
7301
7302 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7303
ce9e3fe7
PA
73042014-07-15 Pedro Alves <palves@redhat.com>
7305
7306 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7307 copy.
7308
e76126e8
PA
73092014-07-11 Pedro Alves <palves@redhat.com>
7310
7311 * linux-low.c (kill_wait_lwp): New function, based on
7312 kill_one_lwp_callback, but use my_waitpid directly.
7313 (kill_one_lwp_callback, linux_kill): Use it.
7314
8e9db26e
PA
73152014-06-23 Pedro Alves <palves@redhat.com>
7316
7317 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7318 before setting DR0..DR3.
7319
698b3e08
GB
73202014-06-20 Gary Benson <gbenson@redhat.com>
7321
7322 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7323 * configure: Regenerated.
7324 * config.in: Likewise.
7325
125f8a3d
GB
73262014-06-20 Gary Benson <gbenson@redhat.com>
7327
7328 * Makefile.in (SFILES): Update locations for files moved
7329 from common to nat.
7330 (object file files): Reordered.
7331
42995dbd
GB
73322014-06-20 Gary Benson <gbenson@redhat.com>
7333
7334 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7335 (i386_dr_low_set_addr): Likewise.
7336 (i386_dr_low_get_addr): Likewise.
7337 (i386_dr_low_can_set_control): Likewise.
7338 (i386_dr_low_set_control): Likewise.
7339 (i386_dr_low_get_control): Likewise.
7340 (i386_dr_low_get_status): Likewise.
7341 (i386_get_debug_register_length): Likewise.
7342 * linux-x86-low.c (i386_dr_low_set_addr):
7343 Changed signature. Made static.
7344 (i386_dr_low_get_addr): Likewise.
7345 (i386_dr_low_set_control): Likewise.
7346 (i386_dr_low_get_control): Likewise.
7347 (i386_dr_low_get_status): Likewise.
7348 (i386_dr_low): New global variable.
7349 * win32-i386-low.c (i386_dr_low_set_addr):
7350 Changed signature. Made static.
7351 (i386_dr_low_get_addr): Likewise.
7352 (i386_dr_low_set_control): Likewise.
7353 (i386_dr_low_get_control): Likewise.
7354 (i386_dr_low_get_status): Likewise.
7355 (i386_dr_low): New global variable.
7356
e1d2394b
MS
73572014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7358
7359 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7360 * Makefile.in (AR, AR_FLAGS): Define.
7361 * configure: Regenerate.
7362
3a8ee006
GB
73632014-06-19 Gary Benson <gbenson@redhat.com>
7364
7365 * Makefile.in (i386-dregs.o): New rule.
7366 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7367 * i386-low.c (target.h): Remove include.
7368 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7369 (DR_CONTROL_SHIFT): Likewise.
7370 (DR_CONTROL_SIZE): Likewise.
7371 (DR_RW_EXECUTE): Likewise.
7372 (DR_RW_WRITE): Likewise.
7373 (DR_RW_READ): Likewise.
7374 (DR_RW_IORW): Likewise.
7375 (DR_LEN_1): Likewise.
7376 (DR_LEN_2): Likewise.
7377 (DR_LEN_4): Likewise.
7378 (DR_LEN_8): Likewise.
7379 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7380 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7381 (DR_ENABLE_SIZE): Likewise.
7382 (DR_LOCAL_SLOWDOWN): Likewise.
7383 (DR_GLOBAL_SLOWDOWN): Likewise.
7384 (DR_CONTROL_RESERVED): Likewise.
7385 (I386_DR_CONTROL_MASK): Likewise.
7386 (I386_DR_VACANT): Likewise.
7387 (I386_DR_LOCAL_ENABLE): Likewise.
7388 (I386_DR_GLOBAL_ENABLE): Likewise.
7389 (I386_DR_DISABLE): Likewise.
7390 (I386_DR_SET_RW_LEN): Likewise.
7391 (I386_DR_GET_RW_LEN): Likewise.
7392 (I386_DR_WATCH_HIT): Likewise.
7393 (i386_wp_op_t): Likewise.
7394 (i386_show_dr): Likewise.
7395 (i386_length_and_rw_bits): Likewise.
7396 (i386_insert_aligned_watchpoint): Likewise.
7397 (i386_remove_aligned_watchpoint): Likewise.
7398 (i386_handle_nonaligned_watchpoint): Likewise.
7399 i386_update_inferior_debug_regs(): Likewise.
7400 (i386_dr_insert_watchpoint): Likewise.
7401 (i386_dr_remove_watchpoint): Likewise.
7402 (i386_dr_region_ok_for_watchpoint): Likewise.
7403 (i386_dr_stopped_data_address): Likewise.
7404 (i386_dr_stopped_by_watchpoint): Likewise.
7405
8f26655c
GB
74062014-06-19 Gary Benson <gbenson@redhat.com>
7407
7408 * i386-low.c (i386_dr_show): Renamed to
7409 i386_show_dr and made static. All uses updated.
7410 (i386_dr_length_and_rw_bits): Renamed to
7411 i386_length_and_rw_bits and made static.
7412 All uses updated.
7413 (i386_dr_insert_aligned_watchpoint): Renamed to
7414 i386_insert_aligned_watchpoint and made static.
7415 All uses updated.
7416 (i386_dr_remove_aligned_watchpoint): Renamed to
7417 i386_remove_aligned_watchpoint and made static.
7418 All uses updated.
7419 (i386_dr_update_inferior_debug_regs): Renamed to
7420 i386_update_inferior_debug_regs and made static.
7421 All uses updated.
7422
b9228891
GB
74232014-06-18 Gary Benson <gbenson@redhat.com>
7424
5171def3
GB
7425 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7426 (i386_dr_low_can_set_control): Likewise.
7427 (i386_get_debug_register_length): Likewise.
7428 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7429 (i386_dr_low_can_set_control): Likewise.
7430 (i386_get_debug_register_length): Likewise.
7431
74322014-06-17 Gary Benson <gbenson@redhat.com>
7433
b9228891
GB
7434 * i386-low.h (i386-dregs.h): New include.
7435 (DR_FIRSTADDR): Now in i386-dregs.h.
7436 (DR_LASTADDR): Likewise.
7437 (DR_NADDR): Likewise.
7438 (DR_STATUS): Likewise.
7439 (DR_CONTROL): Likewise.
7440 (i386_debug_reg_state): Likewise.
7441 (i386_dr_insert_watchpoint): Likewise.
7442 (i386_dr_remove_watchpoint): Likewise.
7443 (i386_dr_region_ok_for_watchpoint): Likewise.
7444 (i386_dr_stopped_data_address): Likewise.
7445 (i386_dr_stopped_by_watchpoint): Likewise.
7446 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7447
4be83cc2
GB
74482014-06-18 Gary Benson <gbenson@redhat.com>
7449
7450 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7451 i386_dr_insert_watchpoint.
7452 (i386_low_remove_watchpoint): Renamed to
7453 i386_dr_remove_watchpoint.
7454 (i386_low_region_ok_for_watchpoint): Renamed to
7455 i386_dr_region_ok_for_watchpoint.
7456 (i386_low_stopped_data_address): Renamed to
7457 i386_dr_stopped_data_address.
7458 (i386_low_stopped_by_watchpoint): Renamed to
7459 i386_dr_stopped_by_watchpoint.
7460 * i386-low.c (i386_show_dr): Renamed to
7461 i386_dr_show and made nonstatic. All uses updated.
7462 (i386_length_and_rw_bits): Renamed to
7463 i386_dr_length_and_rw_bits and made nonstatic.
7464 All uses updated.
7465 (i386_insert_aligned_watchpoint): Renamed to
7466 i386_dr_insert_aligned_watchpoint and made nonstatic.
7467 All uses updated.
7468 (i386_remove_aligned_watchpoint): Renamed to
7469 i386_dr_remove_aligned_watchpoint and made nonstatic.
7470 All uses updated.
7471 (i386_update_inferior_debug_regs): Renamed to
7472 i386_dr_update_inferior_debug_regs and made nonstatic.
7473 All uses updated.
7474 (i386_low_insert_watchpoint): Renamed to
7475 i386_dr_insert_watchpoint. All uses updated.
7476 (i386_low_remove_watchpoint): Renamed to
7477 i386_dr_remove_watchpoint. All uses updated.
7478 (i386_low_region_ok_for_watchpoint): Renamed to
7479 i386_dr_region_ok_for_watchpoint. All uses updated.
7480 (i386_low_stopped_data_address): Renamed to
7481 i386_dr_stopped_data_address. All uses updated.
7482 (i386_low_stopped_by_watchpoint): Renamed to
7483 i386_dr_stopped_by_watchpoint. All uses updated.
7484
131aa0d4
GB
74852014-06-18 Gary Benson <gbenson@redhat.com>
7486
7487 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7488 (i386_dr_low_can_set_control): Likewise.
7489 (i386_insert_aligned_watchpoint): New check.
7490
d9305f7f
GB
74912014-06-18 Gary Benson <gbenson@redhat.com>
7492
7493 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7494 Renamed to state.
7495
e927c9fc
GB
74962014-06-18 Gary Benson <gbenson@redhat.com>
7497
7498 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7499 instead of fatal and error.
7500 (i386_handle_nonaligned_watchpoint): Likewise.
7501
1b6d4134
GB
75022014-06-18 Gary Benson <gbenson@redhat.com>
7503
7504 * i386-low.c (i386_get_debug_register_length): New macro.
7505 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7506 (i386_show_dr): Use debug_printf instead of fprintf. Use
7507 phex to format values.
7508
6e62758f
GB
75092014-06-18 Gary Benson <gbenson@redhat.com>
7510
7511 * i386-low.h: Comment changes.
7512 * i386-low.c: Likewise.
7513
fc6e2f03
GB
75142014-06-18 Gary Benson <gbenson@redhat.com>
7515
7516 * i386-low.c: Whitespace changes.
7517
f9d1eeed
TT
75182014-06-12 Tom Tromey <tromey@redhat.com>
7519
7520 * utils.c (freeargv): Remove.
7521
0b04e523
TT
75222014-06-12 Tom Tromey <tromey@redhat.com>
7523
7524 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7525 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7526 (parse_debug_format_options): Likewise.
7527 (gdbserver_usage): Likewise.
7528 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7529 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7530 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7531 against libiberty.
7532 ($(LIBGNU)): Depend on libiberty.
7533 (all-lib): Recurse into all subdirs.
7534 (install-only): Invoke "install" target in subdirs.
7535 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7536 targets.
7537 * configure: Rebuild.
7538 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7539 for vasprintf, vsnprintf, or gettimeofday.
7540 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7541 srv_tgtobj.
7542
270c9937
JB
75432014-06-05 Joel Brobecker <brobecker@adacore.com>
7544
7545 * development.sh: Delete.
7546 * Makefile.in (config.status): Adjust dependency on development.sh.
7547 * configure.ac: Adjust development.sh source call.
7548 * configure: Regenerate.
7549
0a261ed8
PA
75502014-06-02 Pedro Alves <palves@redhat.com>
7551
7552 * ax.c (gdb_free_agent_expr): New function.
7553 * ax.h (gdb_free_agent_expr): New declaration.
7554 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7555 list.
7556 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7557 static.
7558 (clear_breakpoint_conditions_and_commands): New function.
7559 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7560 (clear_breakpoint_conditions_and_commands): New declaration.
7561
e9dae05e
RR
75622014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7563
7564 * linux-aarch64-low.c (asm/ptrace.h): Include.
7565
5876f503
JK
75662014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7567
7568 Fix TLS access for -static -pthread.
7569 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7570 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7571 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7572
802e8e6d
PA
75732014-05-20 Pedro Alves <palves@redhat.com>
7574
7575 * linux-aarch64-low.c (aarch64_insert_point)
7576 (aarch64_remove_point): No longer check whether the type is
7577 supported here. Adjust to new interface.
7578 (the_low_target): Install aarch64_supports_z_point_type as
7579 supports_z_point_type method.
7580 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7581 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7582 instead of a Z packet char. Adjust.
7583 (arm_supports_z_point_type): New function.
7584 (arm_insert_point, arm_remove_point): Adjust to new interface.
7585 (the_low_target): Install arm_supports_z_point_type.
7586 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7587 (cris_insert_point, cris_remove_point): Adjust to new interface.
7588 Don't check whether the type is supported here.
7589 (the_low_target): Install cris_supports_z_point_type.
7590 * linux-low.c (linux_supports_z_point_type): New function.
7591 (linux_insert_point, linux_remove_point): Adjust to new interface.
7592 * linux-low.h (struct linux_target_ops) <insert_point,
7593 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7594 raw_breakpoint pointer parameter.
7595 <supports_z_point_type>: New method.
7596 * linux-mips-low.c (mips_supports_z_point_type): New function.
7597 (mips_insert_point, mips_remove_point): Adjust to new interface.
7598 Use mips_supports_z_point_type.
7599 (the_low_target): Install mips_supports_z_point_type.
7600 * linux-ppc-low.c (the_low_target): Install NULL as
7601 supports_z_point_type method.
7602 * linux-s390-low.c (the_low_target): Install NULL as
7603 supports_z_point_type method.
7604 * linux-sparc-low.c (the_low_target): Install NULL as
7605 supports_z_point_type method.
7606 * linux-x86-low.c (x86_supports_z_point_type): New function.
7607 (x86_insert_point): Adjust to new insert_point interface. Use
7608 insert_memory_breakpoint. Adjust to new
7609 i386_low_insert_watchpoint interface.
7610 (x86_remove_point): Adjust to remove_point interface. Use
7611 remove_memory_breakpoint. Adjust to new
7612 i386_low_remove_watchpoint interface.
7613 (the_low_target): Install x86_supports_z_point_type.
7614 * lynx-low.c (lynx_target_ops): Install NULL as
7615 supports_z_point_type callback.
7616 * nto-low.c (nto_supports_z_point_type): New.
7617 (nto_insert_point, nto_remove_point): Adjust to new interface.
7618 (nto_target_ops): Install nto_supports_z_point_type.
7619 * mem-break.c: Adjust intro comment.
7620 (struct raw_breakpoint) <raw_type, size>: New fields.
7621 <inserted>: Update comment.
7622 <shlib_disabled>: Delete field.
7623 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7624 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7625 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7626 (raw_bkpt_type_to_target_hw_bp_type): New function.
7627 (find_enabled_raw_code_breakpoint_at): New function.
7628 (find_raw_breakpoint_at): New type and size parameters. Use them.
7629 (insert_memory_breakpoint): New function, based off
7630 set_raw_breakpoint_at.
7631 (remove_memory_breakpoint): New function.
7632 (set_raw_breakpoint_at): Reimplement.
7633 (set_breakpoint): New, based on set_breakpoint_at.
7634 (set_breakpoint_at): Reimplement.
7635 (delete_raw_breakpoint): Go through the_target->remove_point
7636 instead of assuming memory breakpoints.
7637 (find_gdb_breakpoint_at): Delete.
7638 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7639 (find_gdb_breakpoint): New function.
7640 (set_gdb_breakpoint_at): Delete.
7641 (z_type_supported): New function.
7642 (set_gdb_breakpoint_1): New function, loosely based off
7643 set_gdb_breakpoint_at.
7644 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7645 (delete_gdb_breakpoint_at): Delete.
7646 (delete_gdb_breakpoint_1): New function, loosely based off
7647 delete_gdb_breakpoint_at.
7648 (delete_gdb_breakpoint): New function.
7649 (clear_gdb_breakpoint_conditions): Rename to ...
7650 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7651 breakpoint.
7652 (add_condition_to_breakpoint): Make static.
7653 (add_breakpoint_condition): Take a struct breakpoint pointer
7654 instead of an address. Adjust.
7655 (gdb_condition_true_at_breakpoint): Rename to ...
7656 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7657 z_type parameter.
7658 (gdb_condition_true_at_breakpoint): Reimplement.
7659 (add_breakpoint_commands): Take a struct breakpoint pointer
7660 instead of an address. Adjust.
7661 (gdb_no_commands_at_breakpoint): Rename to ...
7662 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7663 parameter. Return true if no breakpoint was found. Change debug
7664 output.
7665 (gdb_no_commands_at_breakpoint): Reimplement.
7666 (run_breakpoint_commands): Rename to ...
7667 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7668 and change return type to boolean.
7669 (run_breakpoint_commands): New function.
7670 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7671 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7672 breakpoint. Go through the_target->remove_point instead of
7673 assuming memory breakpoint.
7674 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7675 software and hardware breakpoints.
7676 (reinsert_raw_breakpoint): Go through the_target->insert_point
7677 instead of assuming memory breakpoint.
7678 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7679 software and hardware breakpoints.
7680 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7681 Check both software and hardware breakpoints.
7682 (validate_inserted_breakpoint): Assert the breakpoint is a
7683 software breakpoint. Set the inserted flag to -1 instead of
7684 setting shlib_disabled.
7685 (delete_disabled_breakpoints): Adjust.
7686 (validate_breakpoints): Only validate software breakpoints.
7687 Adjust to inserted flag change.
7688 (check_mem_read, check_mem_write): Skip breakpoint types other
7689 than software breakpoints. Adjust to inserted flag change.
7690 * mem-break.h (enum raw_bkpt_type): New enum.
7691 (raw_breakpoint, struct process_info): Forward declare.
7692 (Z_packet_to_target_hw_bp_type): Delete declaration.
7693 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7694 (set_gdb_breakpoint, delete_gdb_breakpoint)
7695 (clear_breakpoint_conditions): New declarations.
7696 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7697 (breakpoint_inserted_here): Update comment.
7698 (add_breakpoint_condition, add_breakpoint_commands): Replace
7699 address parameter with a breakpoint pointer parameter.
7700 (gdb_breakpoint_here): Update comment.
7701 (delete_gdb_breakpoint_at): Delete.
7702 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7703 * server.c (process_point_options): Take a struct breakpoint
7704 pointer instead of an address. Adjust.
7705 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7706 delete_gdb_breakpoint.
7707 * spu-low.c (spu_target_ops): Install NULL as
7708 supports_z_point_type method.
7709 * target.h: Include mem-break.h.
7710 (struct target_ops) <prepare_to_access_memory>: Update comment.
7711 <supports_z_point_type>: New field.
7712 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7713 instead of a char. Also take a raw breakpoint pointer.
7714 * win32-arm-low.c (the_low_target): Install NULL as
7715 supports_z_point_type.
7716 * win32-i386-low.c (i386_supports_z_point_type): New function.
7717 (i386_insert_point, i386_remove_point): Adjust to new interface.
7718 (the_low_target): Install i386_supports_z_point_type.
7719 * win32-low.c (win32_supports_z_point_type): New function.
7720 (win32_insert_point, win32_remove_point): Adjust to new interface.
7721 (win32_target_ops): Install win32_supports_z_point_type.
7722 * win32-low.h (struct win32_target_ops):
7723 <supports_z_point_type>: New method.
7724 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7725 instead of a char. Also take a raw breakpoint pointer.
7726
932539e3
PA
77272014-05-20 Pedro Alves <palves@redhat.com>
7728
7729 * mem-break.h: Include break-common.h.
7730 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7731 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7732 (Z_packet_to_target_hw_bp_type): New declaration.
7733 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7734 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7735 (Z_PACKET_ACCESS_WP): Delete macros.
7736 (Z_packet_to_hw_type): Delete function.
7737 * i386-low.h: Don't include break-common.h here.
7738 (Z_packet_to_hw_type): Delete declaration.
7739 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7740 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7741 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7742 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7743 * linux-aarch64-low.c: Don't include break-common.h here.
7744 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7745 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7746 (Z_packet_to_target_hw_bp_type): Delete function.
7747 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7748 function.
7749 (mips_insert_point, mips_remove_point): Use
7750 Z_packet_to_target_hw_bp_type.
7751
4ff0d3d8
PA
77522014-05-20 Pedro Alves <palves@redhat.com>
7753
7754 * linux-aarch64-low.c: Include break-common.h.
7755 (enum target_point_type): Delete.
7756 (Z_packet_to_point_type): Rename to ...
7757 (Z_packet_to_target_hw_bp_type): ... this, and return a
7758 target_hw_bp_type instead.
7759 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7760 instead of an enum target_point_type.
7761 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7762 breakpoint type.
7763 (aarch64_dr_state_insert_one_point)
7764 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7765 (aarch64_handle_aligned_watchpoint)
7766 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7767 Take an enum target_hw_bp_type instead of an enum
7768 target_point_type.
7769 (aarch64_supports_z_point_type): New function.
7770 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7771 use Z_packet_to_target_hw_bp_type.
7772
786dc519
JB
77732014-05-20 Joel Brobecker <brobecker@adacore.com>
7774
7775 * configure.ac: Only use -Werror by default when DEVELOPMENT
7776 is true.
7777 * configure: Regenerate.
7778
9e0aa64f
JK
77792014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7780
7781 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7782 * linux-x86-low.c (X86_64_USER_REGS): New.
7783 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7784
2b577b92
YQ
77852014-04-28 Yao Qi <yao@codesourcery.com>
7786
7787 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7788 name.
7789
94611da2
PA
77902014-04-25 Pedro Alves <palves@redhat.com>
7791
7792 PR server/16255
7793 * linux-low.c (linux_attach_fail_reason_string): New function.
7794 (linux_attach_lwp): Delete.
7795 (linux_attach_lwp_1): Rename to ...
7796 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7797 argument. Remove "initial" parameter. Return int instead of
7798 void. Don't error or warn here.
7799 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7800 failure to attach to the tgid. Call warning when failing to
7801 attach to an lwp.
7802 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7803 argument. Remove "initial" parameter. Return int instead of
7804 void. Don't error or warn here.
7805 (linux_attach_fail_reason_string): New declaration.
7806 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7807 interface change. Use linux_attach_fail_reason_string.
7808
01f9f808
MS
78092014-04-24 Michael Sturm <michael.sturm@mintel.com>
7810 Walfred Tedeschi <walfred.tedeschi@intel.com>
7811
7812 * Makefile.in: Added rules to handle new files
7813 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7814 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7815 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7816 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7817 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7818 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7819 x32-avx512-linux.o.
7820 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7821 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7822 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7823 i386/x32-avx512.xml.
7824 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7825 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7826 i386/x32-avx512-linux.xml.
7827 * i387-fp.c (num_avx512_k_registers): New constant for number
7828 of K registers.
7829 (num_avx512_zmmh_low_registers): New constant for number of
7830 lower ZMM registers (0-15).
7831 (num_avx512_zmmh_high_registers): New constant for number of
7832 higher ZMM registers (16-31).
7833 (num_avx512_ymmh_registers): New contant for number of higher
7834 YMM registers (ymm16-31 added by avx521 on x86_64).
7835 (num_avx512_xmm_registers): New constant for number of higher
7836 XMM registers (xmm16-31 added by AVX512 on x86_64).
7837 (struct i387_xsave): Add space for AVX512 registers.
7838 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7839 Add code to handle AVX512 registers.
7840 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7841 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7842 prototypei from generated file.
7843 (tdesc_amd64_avx512_linux): Likewise.
7844 (init_registers_x32_avx512_linux): Likewise.
7845 (tdesc_x32_avx512_linux): Likewise.
7846 (init_registers_i386_avx512_linux): Likewise.
7847 (tdesc_i386_avx512_linux): Likewise.
7848 (x86_64_regmap): Add AVX512 registers.
7849 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7850 mask.
7851 (initialize_low_arch): Add code to initialize AVX512 registers.
7852
51aa91f9
PA
78532014-04-23 Pedro Alves <palves@redhat.com>
7854
7855 * mem-break.c (find_gdb_breakpoint_at): Make static.
7856 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7857
a4165e94
PA
78582014-04-23 Pedro Alves <palves@redhat.com>
7859
7860 * i386-low.c: Don't include break-common.h here.
7861 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7862 prototype to take target_hw_bp_type as argument instead of a Z
7863 packet char.
7864 * i386-low.h: Include break-common.h here.
7865 (Z_packet_to_hw_type): Declare.
7866 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7867 prototypes.
7868 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7869 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7870 (x86_remove_point): Convert the packet number to a
7871 target_hw_bp_type before calling i386_low_remove_watchpoint.
7872 * win32-i386-low.c (i386_insert_point): Convert the packet number
7873 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7874 (i386_remove_point): Convert the packet number to a
7875 target_hw_bp_type before calling i386_low_remove_watchpoint.
7876
b8acf843
PA
78772014-04-23 Pedro Alves <palves@redhat.com>
7878
7879 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7880
d708bcd1
PA
78812014-04-10 Pedro Alves <palves@redhat.com>
7882
7883 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7884 Check if the condition or command is NULL before checking if the
7885 breakpoint is known. On success, return true.
7886 * mem-break.h (add_breakpoint_condition): Document return.
7887 (add_breakpoint_commands): Add describing comment.
7888 * server.c (skip_to_semicolon): New function.
7889 (process_point_options): Use it.
7890
2eec7d5b
PA
78912014-04-09 Pedro Alves <palves@redhat.com>
7892
7893 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7894 to lwpid_of.
7895
fa96cb38
PA
78962014-02-27 Pedro Alves <palves@redhat.com>
7897
7898 PR 12702
7899 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7900 macros.
7901 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7902 output.
7903 (last_thread_of_process_p): Take a PID argument instead of a
7904 thread pointer.
7905 (linux_wait_for_lwp): Delete.
7906 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7907 functions.
7908 (linux_low_filter_event): New function, party factored out from
7909 linux_wait_for_event.
7910 (linux_wait_for_event): Rename to ...
7911 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7912 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7913 sigsuspend. Check for zombie leaders.
7914 (linux_wait_for_event): Reimplement as wrapper around
7915 linux_wait_for_event_filtered.
7916 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7917 a normal or signal exit is seen, it's the whole process exiting.
7918 (wait_for_sigstop): No longer a for_each_inferior callback.
7919 Rewrite on top of linux_wait_for_event_filtered.
7920 (stop_all_lwps): Call wait_for_sigstop directly.
7921 * server.c (resume, handle_target_event): Handle
7922 TARGET_WAITKIND_NO_RESUMED.
7923
d763de10
JB
79242014-02-26 Joel Brobecker <brobecker@adacore.com>
7925
7926 * win32-low.c (psapi_get_dll_name,
7927 * win32_CreateToolhelp32Snapshot): Delete.
7928 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7929 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7930 Delete.
7931 (handle_load_dll): Add function description.
7932 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7933
850a0f76
JB
79342014-02-26 Joel Brobecker <brobecker@adacore.com>
7935
7936 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7937 Add comment.
7938 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7939 base address when calling win32_add_one_solib.
7940 (handle_load_dll): Delete local variable load_addr.
7941 Remove 0x1000 offset applied to DLL base address when calling
7942 win32_add_one_solib.
7943 (handle_unload_dll): Add comment.
7944
f25b3fc3
JB
79452014-02-26 Joel Brobecker <brobecker@adacore.com>
7946
7947 * win32-low.c (win32_add_all_dlls): Renames
7948 win32_ensure_ntdll_loaded. Rewrite function documentation.
7949 Adjust implementation to always load all DLLs.
7950 Add 0x1000 offset to DLL base address when calling
7951 win32_add_one_solib.
7952 (child_initialization_done): New static global.
7953 (do_initial_child_stuff): Set child_initialization_done to
7954 zero during child initialization, and 1 after. Replace call
7955 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7956 Add comment.
7957 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7958 (handle_unload_dll): Add function documentation.
7959 (get_child_debug_event): Ignore load and unload DLL events
7960 during child initialization.
7961
d86d4aaf
DE
79622014-02-20 Doug Evans <dje@google.com>
7963
3bc32da3 7964 Remove global all_lwps.
d86d4aaf
DE
7965 * inferiors.h (ptid_of): Move here from linux-low.h.
7966 (pid_of, lwpid_of): Ditto.
7967 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7968 parameter is a struct thread_info * now.
7969 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7970 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7971 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7972 directly.
7973 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7974 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7975 * linux-arm-low.c (update_registers_callback): Update, "entry"
7976 parameter is a struct thread_info * now.
7977 Fetch lwpid from current_inferior directly.
7978 (arm_insert_point): Pass &all_threads to find_inferior instead of
7979 &all_lwps.
7980 (arm_remove_point): Ditto.
7981 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7982 (arm_prepare_to_resume): Fetch pid from thread.
7983 (arm_read_description): Fetch lwpid from current_inferior directly.
7984 * linux-low.c (all_lwps): Delete.
7985 (delete_lwp): Delete call to remove_inferior.
7986 (handle_extended_wait): Fetch lwpid from thread.
7987 (add_lwp): Don't set lwp->entry.id. Remove call to
7988 add_inferior_to_list.
7989 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7990 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7991 (kill_one_lwp_callback): Ditto.
7992 (linux_kill): Don't dereference NULL pointer.
7993 Fetch ptid,lwpid from thread.
7994 (get_detach_signal): Fetch ptid from thread.
7995 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7996 Simplify call to regcache_invalidate_thread.
7997 (delete_lwp_callback): Update, "entry" parameter is a
7998 struct thread_info * now. Fetch pid from thread.
7999 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8000 (status_pending_p_callback): Update, "entry" parameter is a
8001 struct thread_info * now. Fetch ptid from thread.
8002 (find_lwp_pid): Update, "entry" parameter is a
8003 struct thread_info * now.
8004 (linux_wait_for_lwp): Fetch pid from thread.
8005 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8006 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8007 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8008 (dequeue_one_deferred_signal): Ditto.
8009 (cancel_breakpoint): Fetch ptid from current_inferior.
8010 (linux_wait_for_event): Pass &all_threads to find_inferior,
8011 not &all_lwps. Fetch ptid, lwpid from thread.
8012 (count_events_callback): Update, "entry" parameter is a
8013 struct thread_info * now.
8014 (select_singlestep_lwp_callback): Ditto.
8015 (select_event_lwp_callback): Ditto.
8016 (cancel_breakpoints_callback): Ditto.
8017 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8018 not &all_lwps.
8019 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8020 (unsuspend_one_lwp): Update, "entry" parameter is a
8021 struct thread_info * now.
8022 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8023 not &all_lwps.
8024 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8025 Fetch lwpid from thread, not lwp.
8026 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8027 Pass &all_threads to find_inferior, not &all_lwps.
8028 (send_sigstop): Fetch lwpid from thread, not lwp.
8029 (send_sigstop_callback): Update, "entry" parameter is a
8030 struct thread_info * now.
8031 (suspend_and_send_sigstop_callback): Ditto.
8032 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8033 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8034 struct thread_info * now.
8035 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8036 from thread, lwp.
8037 (lwp_running): Update, "entry" parameter is a
8038 struct thread_info * now.
8039 (stop_all_lwps): Fetch ptid from thread.
8040 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8041 (linux_resume_one_lwp): Fetch lwpid from thread.
8042 (linux_set_resume_request): Update, "entry" parameter is a
8043 struct thread_info * now. Fetch pid, lwpid from thread.
8044 (resume_status_pending_p): Update, "entry" parameter is a
8045 struct thread_info * now.
8046 (need_step_over_p): Ditto. Fetch lwpid from thread.
8047 (start_step_over): Fetch lwpid from thread.
8048 (linux_resume_one_thread): Update, "entry" parameter is a
8049 struct thread_info * now. Fetch lwpid from thread.
8050 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8051 (proceed_one_lwp): Update, "entry" parameter is a
8052 struct thread_info * now. Fetch lwpid from thread.
8053 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8054 struct thread_info * now.
8055 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8056 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8057 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8058 directly.
8059 (regsets_store_inferior_registers): Ditto.
8060 (fetch_register, store_register): Ditto.
8061 (linux_read_memory, linux_write_memory): Ditto.
8062 (linux_request_interrupt): Ditto.
8063 (linux_read_auxv): Ditto.
8064 (linux_xfer_siginfo): Ditto.
8065 (linux_qxfer_spu): Ditto.
8066 (linux_qxfer_libraries_svr4): Ditto.
8067 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8068 moved to inferiors.h.
8069 (get_lwp): Delete.
8070 (get_thread_lwp): Update.
8071 (struct lwp_info): Delete member "entry". Simplify comment for
8072 member "thread".
8073 (all_lwps): Delete.
8074 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8075 current_inferior directly.
8076 (update_watch_registers_callback): Update, "entry" parameter is a
8077 struct thread_info * now. Fetch pid from thread.
8078 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8079 (mips_insert_point): Fetch lwpid from current_inferior.
8080 Pass &all_threads to find_inferior, not &all_lwps.
8081 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8082 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8083 directly.
8084 (mips_stopped_data_address): Ditto.
8085 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8086 directly.
8087 * linux-tile-low.c (tile_arch_setup): Ditto.
8088 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8089 (update_debug_registers_callback): Update, "entry" parameter is a
8090 struct thread_info * now. Fetch pid from thread.
8091 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8092 Pass &all_threads to find_inferior, not &all_lwps.
8093 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8094 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8095 Pass &all_threads to find_inferior, not &all_lwps.
8096 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8097 (i386_dr_low_get_status): Ditto.
8098 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8099 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8100 (x86_linux_read_description): Ditto.
8101 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8102
3b8361aa
DE
81032014-02-20 Doug Evans <dje@google.com>
8104
8105 * inferiors.c (get_first_inferior): Fix buglet.
8106
f7667f0d
DE
81072014-02-19 Doug Evans <dje@google.com>
8108
8109 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8110 * inferiors.c (add_thread): Change result type to struct thread_info *.
8111 All callers updated.
8112 (add_lwp): Call add_thread here instead of in callers.
8113 All callers updated.
8114 * linux-low.h (get_lwp_thread): Rewrite.
8115 (struct lwp_info): New member "thread".
8116
b3312d80
DE
81172014-02-19 Doug Evans <dje@google.com>
8118
8119 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8120 All callers updated.
8121
ecc6f45c
DE
81222014-02-19 Doug Evans <dje@google.com>
8123
8124 * inferiors.c (add_thread): Fix whitespace.
8125
649ebbca
DE
81262014-02-19 Doug Evans <dje@google.com>
8127
8128 * dll.c (clear_dlls): Replace accessing list implemention details
8129 with API function.
8130 * gdbthread.h (get_first_thread): Declare.
8131 * inferiors.c (for_each_inferior_with_data): New function.
8132 (get_first_thread): New function.
8133 (find_thread_ptid): Simplify.
8134 (get_first_inferior): New function.
8135 (clear_list): Delete.
8136 (one_inferior_p): New function.
8137 (clear_inferior_list): New function.
8138 (clear_inferiors): Update.
8139 * inferiors.h (for_each_inferior_with_data): Declare.
8140 (clear_inferior_list): Declare.
8141 (one_inferior_p): Declare.
8142 (get_first_inferior): Declare.
8143 * linux-low.c (linux_wait_for_event): Replace accessing list
8144 implemention details with API function.
8145 * server.c (target_running): Ditto.
8146 (accumulate_file_name_length): New function.
8147 (emit_dll_description): New function.
8148 (handle_qxfer_libraries): Replace accessing list implemention
8149 details with API function.
8150 (handle_qxfer_threads_worker): New function.
8151 (handle_qxfer_threads_proper): Replace accessing list implemention
8152 details with API function.
8153 (handle_query): Ditto.
8154 (visit_actioned_threads_callback_ftype): New typedef.
8155 (visit_actioned_threads_data): New struct.
8156 (visit_actioned_threads): Rewrite to be find_inferior callback.
8157 (resume): Call find_inferior.
8158 (handle_status): Replace accessing list implemention
8159 details with API function.
8160 (process_serial_event): Replace accessing list implemention details
8161 with API function.
8162 * target.c (set_desired_inferior): Replace accessing list implemention
8163 details with API function.
8164 * tracepoint.c (same_process_p): New function.
8165 (gdb_agent_about_to_close): Replace accessing list implemention
8166 details with API function.
8167 * win32-low.c (child_delete_thread): Replace accessing list
8168 implemention details with API function.
8169 (match_dll_by_basename): New function.
8170 (dll_is_loaded_by_basename): New function.
8171 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8172 details call to dll_is_loaded_by_basename.
8173
80894984
DE
81742014-02-19 Doug Evans <dje@google.com>
8175
8176 * dll.h (struct dll_info): Add comment.
8177 * gdbthread.h (struct thread_info): Add comment.
8178 (current_ptid): Simplify.
8179 * inferiors.c (add_process): Update.
8180 (remove_process): Update.
8181 * inferiors.h (struct process_info): Rename member "head" to "entry".
8182 * linux-low.c (delete_lwp): Update.
8183 (add_lwp): Update.
8184 (last_thread_of_process_p): Update.
8185 (kill_one_lwp_callback, linux_kill): Update.
8186 (status_pending_p_callback): Update.
8187 (wait_for_sigstop): Update. Simplify read of ptid.
8188 (start_step_over): Update.
8189 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8190 (get_lwp_thread): Update.
8191 (struct lwp_info): Rename member "head" to "entry".
8192 * regcache.h (inferior_list_entry): Delete.
8193 * server.c (kill_inferior_callback): Update.
8194 (detach_or_kill_inferior_callback): Update.
8195 (print_started_pid): Update.
8196 (print_attached_pid): Update.
8197 (process_serial_event): Simplify read of ptid.
8198 * thread-db.c (thread_db_create_event): Update.
8199 (thread_db_get_tls_address): Update.
8200 * win32-low.c (current_inferior_ptid): Simplify.
8201
46917d26
TT
82022014-02-19 Tom Tromey <tromey@redhat.com>
8203
8204 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8205 argument.
8206 (target_supports_btrace): Update.
8207
0759a81e
YQ
82082014-02-14 Yao Qi <yao@codesourcery.com>
8209
8210 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8211 (rsp-low-ipa.o): New target.
8212
a7191e8b
TT
82132014-02-12 Tom Tromey <tromey@redhat.com>
8214
8215 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8216 convert_ascii_to_int.
8217 * regcache.c (registers_to_string): Likewise.
8218 * remote-utils.c (decode_M_packet): Likewise.
8219 * server.c (process_serial_event): Likewise.
8220
ff0e980e
TT
82212014-02-12 Tom Tromey <tromey@redhat.com>
8222
8223 * server.c (handle_query, handle_v_run): Use hex2bin, not
8224 unhexify.
8225 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8226
e9371aff
TT
82272014-02-12 Tom Tromey <tromey@redhat.com>
8228
8229 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8230 convert_int_to_ascii.
8231 * regcache.c (registers_to_string, collect_register_as_string):
8232 Likewise.
8233 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8234 Likewise.
8235 * server.c (process_serial_event): Likewise.
8236 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8237 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8238
971dc0b8
TT
82392014-02-12 Tom Tromey <tromey@redhat.com>
8240
8241 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8242 bin2hex, not hexify.
8243 * tracepoint.c (cmd_qtstatus): Likewise.
8244
0a822afb
TT
82452014-02-12 Tom Tromey <tromey@redhat.com>
8246
8247 * remote-utils.c (monitor_output): Pass explicit length to
8248 hexify.
8249
9c3d6531
TT
82502014-02-12 Tom Tromey <tromey@redhat.com>
8251
8252 * tracepoint.c: Include rsp-low.h.
8253 * server.c: Include rsp-low.h.
8254 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8255 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8256 declare.
8257 * remote-utils.c: Include rsp-low.h.
8258 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8259 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8260 (convert_int_to_ascii, convert_ascii_to_int): Move to
8261 common/rsp-low.c.
8262 * regcache.c: Include rsp-low.h.
8263 * ax.c: Include rsp-low.h.
8264 * Makefile.in (SFILES): Add common/rsp-low.c.
8265 (OBS): Add rsp-low.o.
8266 (rsp-low.o): New target.
8267
01fd3ea5
TT
82682014-02-12 Tom Tromey <tromey@redhat.com>
8269
8270 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8271 Include print-utils.h.
8272 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8273 (plongest, thirty_two, phex_nz): Remove.
8274 * Makefile.in (SFILES): Add common/print-utils.c.
8275 (OBS): Add print-utils.o.
8276 (print-utils-ipa.o): New target.
8277 (print-utils.o): New target.
8278 (IPA_OBJS): Add print-utils-ipa.o.
8279
e99dc820
TT
82802014-02-06 Tom Tromey <tromey@redhat.com>
8281
8282 * Makefile.in (SFILES): Fix indentation.
8283
ee1e2d4f
DE
82842014-02-05 Doug Evans <dje@google.com>
8285
8286 * linux-low.c (linux_wait_for_event): Improve comment.
8287 (linux_wait_1): Keep current_inferior in sync with event_child.
8288
f5a02773
DE
82892014-01-22 Doug Evans <dje@google.com>
8290
8291 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8292
87ce2a04
DE
82932014-01-22 Doug Evans <dje@google.com>
8294
8295 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8296 * configure: Regenerate.
8297 * config.in: Regenerate.
8298 * Makefile.in (SFILES): Add debug.c.
8299 (OBS): Add debug.o.
8300 * debug.c: New file.
8301 * debug.h: New file.
8302 * linux-aarch64-low.c (*): Update all debugging printfs to use
8303 debug_printf instead of fprintf.
8304 * linux-arm-low.c (*): Ditto.
8305 * linux-cris-low.c (*): Ditto.
8306 * linux-crisv32-low.c (*): Ditto.
8307 * linux-m32r-low.c (*): Ditto.
8308 * linux-sparc-low.c (*): Ditto.
8309 * linux-x86.c (*): Ditto.
8310 * linux-low.c (*): Ditto.
8311 (linux_wait_1): Add calls to debug_enter, debug_exit.
8312 (linux_wait): Remove redundant debugging printf.
8313 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8314 (linux_resume, unstop_all_lwps): Ditto.
8315 * mem-break.c (*): Update all debugging printfs to use
8316 debug_printf instead of fprintf.
8317 * remote-utils.c (*): Ditto.
8318 * thread-db.c (*): Ditto.
8319 * server.c #include <ctype.h>, "gdb_vecs.h".
8320 (debug_threads): Moved to debug.c.
8321 (*): Update all debugging printfs to use debug_printf instead of
8322 fprintf.
8323 (start_inferior): Replace call to fflush with call to debug_flush.
8324 (monitor_show_help): Mention set debug-format.
8325 (parse_debug_format_options): New function.
8326 (handle_monitor_command): Handle "monitor set debug-format".
8327 (gdbserver_usage): Mention --debug-format.
8328 (main): Parse --debug-format.
8329 * server.h (debug_threads): Declaration moved to debug.h.
8330 #include "debug.h".
8331 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8332 trace_debug_1 that uses debug_printf.
8333 (tracepoint_look_up_symbols): Update all debugging printfs to use
8334 debug_printf instead of fprintf.
8335
e671835b
BS
83362014-01-20 Baruch Siach <baruch@tkos.co.il>
8337
8338 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8339 sys/ptrace.h.
8340
b5737fa9
PA
83412014-01-17 Pedro Alves <palves@redhat.com>
8342
ea38d2a9 8343 PR build/16445
c7faa97a
PA
8344 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8345 defined after including gdb_proc_service.h.
b5737fa9 8346
40ed484e
DE
83472014-01-16 Doug Evans <dje@google.com>
8348
8349 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8350 (match_dll): Use it.
8351
969c39fb
MM
83522014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8353
8354 * target.h (target_ops) <read_btrace>: Change parameters and
8355 return type to allow error reporting.
8356 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8357 trace reading errors on.
8358 * linux-low.c (linux_low_read_btrace): Pass trace reading
8359 errors on.
8360 (linux_low_disable_btrace): New.
8361
ab7f45ba
DE
83622014-01-15 Doug Evans <dje@google.com>
8363
8364 * inferiors.c (thread_id_to_gdb_id): Delete.
8365 * inferiors.h (thread_id_to_gdb_id): Delete.
8366
66af0f44
EZ
83672014-01-13 Eli Zaretskii <eliz@gnu.org>
8368
8369 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8370 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8371 versions.
8372
9939e131
PA
83732014-01-08 Pedro Alves <palves@redhat.com>
8374
8375 * server.c (handle_status): Don't discard previous queued stop
8376 replies or thread's pending status here.
8377 (main) <disconnection>: Do it here instead.
8378
b7ea362b
PA
83792014-01-08 Pedro Alves <palves@redhat.com>
8380
8381 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8382 * server.c (visit_actioned_threads, handle_pending_status): New
8383 function.
8384 (handle_v_cont): Factor out parts to ...
8385 (resume): ... this new function. If in all-stop, and a thread
8386 being resumed has a pending status, report it without actually
8387 resuming.
8388 (myresume): Adjust to use the new 'resume' function.
8389 (clear_pending_status_callback, set_pending_status_callback)
8390 (find_status_pending_thread_callback): New functions.
8391 (handle_status): Handle the case of multiple threads having
8392 interesting statuses to report. Report threads' real last signal
8393 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8394 with an interesting thread to report the status for, instead of
8395 always reporting the status of the first thread.
8396
28498c42
JB
83972014-01-01 Joel Brobecker <brobecker@adacore.com>
8398
8399 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8400 * gdbreplay.c (gdbreplay_version): Likewise.
8401
f45c82da
YZ
84022013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8403
8404 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8405 iov.iov_len with the real length in use.
8406
379a5e2d
JB
84072013-12-13 Joel Brobecker <brobecker@adacore.com>
8408
8409 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8410 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8411 for all targets that use win32-low.c.
8412 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8413 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8414
4210d83e
PA
84152013-12-13 Pedro Alves <palves@redhat.com>
8416
8417 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8418 if equal to TARGET_WAITKIND_LOADED.
8419 * win32-low.c (cached_status): New static global.
8420 (win32_wait): Add declaration.
8421 (do_initial_child_stuff): Flush all initial pending debug events
8422 up to the initial breakpoint.
8423 (win32_wait): If CACHED_STATUS was set, return that instead
8424 of doing a real wait. Remove the code resuming the execution
8425 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8426 during the initial phase. Also remove the code changing
8427 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8428 TARGET_WAITKIND_STOPPED.
8429
e7f0d979
YQ
84302013-12-11 Yao Qi <yao@codesourcery.com>
8431
8432 * notif.c (handle_notif_ack): Return 0 if no notification
8433 matches.
8434
ebcf782c
DE
84352013-11-20 Doug Evans <dje@google.com>
8436
8437 * linux-low.c (linux_set_resume_request): Fix comment.
8438
20ad9378
DE
84392013-11-20 Doug Evans <dje@google.com>
8440
8441 * linux-low.c (resume_status_pending_p): Tweak comment.
8442
a196ebeb
WT
84432013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8444
8445 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8446 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8447 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8448 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8449 (srv_amd64_regobj): Add amd64-mpx.o.
8450 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8451 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8452 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8453 * i387-fp.c (num_pl_bnd_register) Added constant.
8454 (num_pl_bnd_cfg_registers) Added constant.
8455 (struct i387_xsave) Added reserved area and MPX fields.
8456 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8457 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8458 function.
8459 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8460 (init_registers_amd64_mpx_linux): Declare new function.
8461 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8462 (x86_64_regmap): Add MPX registers.
8463 (x86_linux_read_description): Add MPX case.
8464 (initialize_low_arch): Initialize MPX targets.
8465
0080a2f6
TT
84662013-11-18 Tom Tromey <tromey@redhat.com>
8467
8468 * configure: Rebuild.
8469 * configure.ac: Don't check for stdlib.h.
8470 * gdbreplay.c: Unconditionally include stdlib.h.
8471
2978b111
TT
84722013-11-18 Tom Tromey <tromey@redhat.com>
8473
8474 * config.in: Rebuild.
8475 * configure: Rebuild.
8476 * configure.ac: Don't use AC_HEADER_DIRENT.
8477
a3d08894
TT
84782013-11-18 Tom Tromey <tromey@redhat.com>
8479
8480 * server.h: Don't check HAVE_STRING_H.
8481 * gdbreplay.c: Don't check HAVE_STRING_H.
8482 * configure: Rebuild.
8483
0a5dd17d
TT
84842013-11-18 Tom Tromey <tromey@redhat.com>
8485
8486 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8487 LIBGNU.
8488
1bd2f0ba
TT
84892013-11-08 Tom Tromey <tromey@redhat.com>
8490
8491 * configure, config.in: Rebuild.
8492 * configure.ac: Remove unused configury.
8493
3266f10b
TT
84942013-11-08 Tom Tromey <tromey@redhat.com>
8495
8496 * acinclude.m4: Include common.m4, codeset.m4.
8497 * configure, config.in: Rebuild.
8498 * configure.ac: Use GDB_AC_COMMON.
8499
6682d959
AA
85002013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8501
8502 * linux-s390-low.c (HWCAP_S390_TE): New define.
8503 (s390_arch_setup): Consider the TE field in the HWCAP for
8504 determining 'have_regset_tdb'.
8505
fd0a4d76
SDJ
85062013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8507
8508 PR gdb/16014
8509 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8510 call to sizeof.
8511
1a3d890b
PA
85122013-10-02 Pedro Alves <palves@redhat.com>
8513
8514 * server.c (process_serial_event): Don't output "GDBserver
8515 exiting" if GDB is connected through stdio.
8516 * target.c (mywait): Likewise, be silent if GDB is connected
8517 through stdio.
8518
97ad4581
JB
85192013-10-01 Joel Brobecker <brobecker@adacore.com>
8520
8521 * lynx-low.c (lynx_add_threads_after_attach): New function.
8522 (lynx_attach): Remove call to add_thread. Add call to
8523 lynx_add_threads_after_attach instead.
8524
5b4e221c
MF
85252013-09-28 Mike Frysinger <vapier@gentoo.org>
8526
8527 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8528 * config.in, configure: Regenerated.
8529
ee47b2f8
YQ
85302013-09-18 Yao Qi <yao@codesourcery.com>
8531
8532 PR server/15959
8533 * server.c (start_inferior): Clear 'resume_info'.
8534
d6707650 85352013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8536
d6707650
JW
8537 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8538 for each register.
8539
9243dd0e 85402013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8541
9243dd0e
JW
8542 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8543 linux-tile-low.o to srv_tgtobj.
8544
c623a6ef
WN
85452013-09-16 Will Newton <will.newton@linaro.org>
8546
8547 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8548 out regs.
8549
fb71d39e
PA
85502013-09-06 Pedro Alves <palves@redhat.com>
8551
8552 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8553 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8554 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8555 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8556 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8557 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8558
8e7e9910
PA
85592013-09-06 Pedro Alves <palves@redhat.com>
8560
8561 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8562 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8563
7c3a12ca
PA
85642013-09-06 Pedro Alves <palves@redhat.com>
8565
8566 * linux-amd64-ipa.c: Include tracepoint.h.
8567 * linux-i386-ipa.c: Include tracepoint.h.
8568
8eb3d7b6
RW
85692013-09-06 Ricard Wanderlof <ricardw@axis.com>
8570
8571 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8572 (ps_get_thread_area): New function.
8573
eddddb9d
RW
85742013-09-06 Ricard Wanderlof <ricardw@axis.com>
8575
8576 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8577 (initialize_low_arch): Call init_registers_crisv32 rather than
8578 init_register_crisv32.
8579
533b0600
PA
85802013-09-05 Pedro Alves <palves@redhat.com>
8581
8582 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8583 to ...
8584 * hostio.h: ... this new file.
8585 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8586 win32-low.c: Include hostio.h.
8587
0ce3d3b5
PA
85882013-09-05 Pedro Alves <palves@redhat.com>
8589
8590 * server.h (gdb_client_data, handler_func, callback_handler_func)
8591 (delete_file_handler, add_file_handler, append_callback_event)
8592 (delete_callback_event, start_event_loop, initialize_event_loop):
8593 Move to event-loop.h and include it.
8594 * event-loop.h: New file.
8595
799cdc37
PA
85962013-09-05 Pedro Alves <palves@redhat.com>
8597
8598 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8599 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8600 (loaded_dll, unloaded_dll): Move to ...
8601 * dll.h: ... this new file.
8602 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8603
6a6bbd9d
PA
86042013-09-05 Pedro Alves <palves@redhat.com>
8605
8606 * server.h (current_process, get_thread_process, all_processes)
8607 (add_inferior_to_list, for_each_inferior, current_inferior)
8608 (remove_inferior, add_process, remove_process, find_process_pid)
8609 (have_started_inferiors_p, have_attached_inferiors_p)
8610 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8611 (clear_inferiors, find_inferior, find_inferior_id)
8612 (inferior_target_data, set_inferior_target_data)
8613 (inferior_regcache_data, set_inferior_regcache_data): Move to
8614 inferiors.h, and include it.
8615 * inferiors.h: New file.
8616
f699aaba
PA
86172013-09-05 Pedro Alves <palves@redhat.com>
8618
8619 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8620 Move ...
72f4393d 8621 * ax.h: ... here.
f699aaba 8622
c144c7a0
PA
86232013-09-05 Pedro Alves <palves@redhat.com>
8624
8625 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8626 tracepoint.h.
8627 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8628 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8629 (handle_tracepoint_general_set, handle_tracepoint_query)
8630 (tracepoint_finished_step, tracepoint_was_hit)
8631 (release_while_stepping_state_list, current_traceframe)
8632 (in_readonly_region, traceframe_read_mem)
8633 (fetch_traceframe_registers, traceframe_read_sdata)
8634 (traceframe_read_info, struct fast_tpoint_collect_status)
8635 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8636 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8637 (supply_fast_tracepoint_registers)
8638 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8639 (ipa_tdesc, claim_trampoline_space)
8640 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8641 (agent_mem_read, agent_get_trace_state_variable_value)
8642 (agent_set_trace_state_variable_value, agent_tsv_read)
8643 (agent_mem_read_string, get_raw_reg_func_addr)
8644 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8645 * tracepoint.h: ... this new file.
8646
ff42e6ab
PA
86472013-09-05 Pedro Alves <palves@redhat.com>
8648
8649 * server.h (perror_with_name, error, fatal, warning, paddress)
8650 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8651 include it.
8652 * utils.h: New file.
8653
541af0f4
PA
86542013-09-05 Pedro Alves <palves@redhat.com>
8655
8656 * server.h (remote_debug, noack_mode, transport_is_reliable)
8657 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8658 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8659 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8660 (write_enn, initialize_async_io, enable_async_io)
8661 (disable_async_io, check_remote_input_interrupt_request)
8662 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8663 (dead_thread_notify, prepare_resume_reply)
8664 (decode_address_to_semicolon, decode_address, decode_m_packet)
8665 (decode_M_packet, decode_X_packet, decode_xfer_write)
8666 (decode_search_memory_packet, unhexify, hexify)
8667 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8668 (look_up_one_symbol, relocate_instruction)
8669 (monitor_output): Move to remote-utils.h, and include it.
8670 * remote-utils.h: New file.
8671
eebdf26b
PA
86722013-09-05 Pedro Alves <palves@redhat.com>
8673
8674 * server.h (_): Delete.
8675
3aafd2ff
PA
86762013-09-02 Pedro Alves <palves@redhat.com>
8677
8678 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8679 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8680 allocated.
8681 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8682
cee83bcb
PM
86832013-09-02 Pierre Muller <muller@sourceware.org>
8684
8685 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8686 or WriteProcessMemory complete successfully and handle
8687 ERROR_PARTIAL_COPY error.
8688
9a13b2fa
PA
86892013-09-02 Pedro Alves <palves@redhat.com>
8690
8691 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8692 error instead of EIO.
8693
602e3198
JK
86942013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8695
8696 PR server/15604
8697 * linux-low.c: Include filestuff.h.
8698 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8699 * lynx-low.c: Include filestuff.h.
8700 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8701 * server.c: Include filestuff.h.
8702 (main): Call notice_open_fds.
8703 * spu-low.c: Include filestuff.h.
8704 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8705
96d7229d
LM
87062013-08-22 Luis Machado <lgustavo@codesourcery.com>
8707
8708 * Makefile.in: Explain why ../target and ../nat are not
8709 listed as include file search paths.
8710 (linux-waitpid.o): New object file rule.
8711 * configure.srv (srv_native_linux_obj): New variable.
8712 Replace all occurrences of linux native object files with
8713 $srv_native_linux_obj.
8714 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8715 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8716 (linux_enable_event_reporting): Remove declaration.
8717 (my_waitpid): Moved to common/linux-waitpid.c.
8718 (linux_wait_for_event): Pass ptid when calling
8719 linux_enable_event_reporting.
8720 (linux_supports_tracefork_flag): Remove.
8721 (linux_enable_event_reporting): Likewise.
8722 (linux_tracefork_grandchild): Remove.
8723 (STACK_SIZE): Moved to common/linux-ptrace.c.
8724 (linux_tracefork_child): Remove.
8725 (linux_test_for_tracefork): Remove.
8726 (linux_look_up_symbols): Call linux_supports_traceclone.
8727 (initialize_low): Remove call to linux_test_for_tracefork.
8728 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8729 common/linux-ptrace.h.
8730 (PTRACE_TYPE_ARG4): Likewise.
8731 Include linux-ptrace.h.
8732
32940073
PA
87332013-08-21 Pedro Alves <palves@redhat.com>
8734
8735 * config.in: Renegerate.
8736
33b60d58 87372013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8738
33b60d58
LM
8739 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8740 (SFILES): Remove $(srcdir)/common/target-common.c and
8741 add $(srcdir)/target/waitstatus.c.
8742 (OBS): Remove target-common.o and add waitstatus.o.
8743 (server_h): Remove $(srcdir)/../common/target-common.h and
8744 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8745 and $(srcdir)/../target/waitstatus.h.
8746 (target-common.o): Remove.
8747 (waitstatus.o): New target object file.
8748 * target.h: Do not include target-common.h and
8749 include target/resume.h, target/wait.h and
8750 target/waitstatus.h.
8751
b8e1b30e
LM
87522013-08-13 Luis Machado <lgustavo@codesourcery.com>
8753
8754 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8755 to PTRACE_TYPE_ARG3.
8756 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8757 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8758 PTRACE_TYPE_ARG4.
8759 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8760 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8761
7a60ad40
YQ
87622013-07-27 Jie Zhang <jie@codesourcery.com>
8763 Daniel Jacobowitz <dan@codesourcery.com>
8764 Yao Qi <yao@codesourcery.com>
8765
8766 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8767 (mips-linux-watch.o): New rule.
8768 (mips_linux_watch_h): New variable.
8769 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8770 srv_tgtobj.
8771 * linux-mips-low.c: Include mips-linux-watch.h.
8772 (struct arch_process_info, struct arch_lwp_info): New.
8773 (update_watch_registers_callback): New function.
8774 (mips_linux_new_process, mips_linux_new_thread) New functions.
8775 (mips_linux_prepare_to_resume, mips_insert_point): New
8776 functions.
8777 (mips_remove_point, mips_stopped_by_watchpoint): New
8778 functions.
8779 (rsp_bp_type_to_target_hw_bp_type): New function.
8780 (mips_stopped_data_address): New function.
8781 (the_low_target): Add watchpoint support functions.
8782
de6f69ad
YQ
87832013-07-27 Yao Qi <yao@codesourcery.com>
8784
8785 * i386-low.c: Include break-common.h.
8786 (enum target_hw_bp_type): Remove.
8787
3360c0bf
LM
87882013-07-24 Luis Machado <lgustavo@codesourcery.com>
8789
8790 * Makefile.in (SFILES): /common/target-common.c.
8791 (OBS): Add target-common.o.
8792 (server_h): Add $(srcdir)/../common/target-common.h.
8793 (target-common.o): New target.
8794 * server.c (queue_stop_reply_callback): Free
8795 status string after use.
8796 * target.c (target_waitstatus_to_string): Remove.
8797 * target.h: Include target-common.h.
8798 (resume_kind): Likewise.
8799 (target_waitkind): Likewise.
8800 (target_waitstatus): Likewise.
8801 (TARGET_WNOHANG): Likewise.
8802
bd885420
YQ
88032013-07-04 Yao Qi <yao@codesourcery.com>
8804
8805 * Makefile.in (host_alias): Use @host_noncanonical@.
8806 (target_alias): Use @target_noncanonical@.
8807 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8808 ACX_NONCANONICAL_HOST.
8809 * configure: Regenerated.
8810
8811 Revert:
8812 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8813
8814 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8815 * configure: Rebuild.
8816 * Makefile.in (version_host, version_target): Get from configure.
8817 (version.c): Use $(version_host) and $(version_target).
8818
17ef446e
PA
88192013-07-03 Pedro Alves <palves@redhat.com>
8820
8821 * Makefile.in (config.status): Depend on development.sh.
8822 * acinclude.m4: Include libmcheck.m4.
8823 * configure: Regenerate.
8824
7a9a7487
MG
88252013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8826
8827 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8828 attribute inside the parentheses.
8829 (winapi_DebugSetProcessKillOnExit): Ditto.
8830 (winapi_DebugBreakProcess): Ditto.
8831 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8832
49b64de6
MG
88332013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8834
8835 * notif.h (notif_event): Add a dummy member to avoid compiler
8836 errors.
8837
d5749ee7
PA
88382013-07-01 Pedro Alves <palves@redhat.com>
8839
8840 * hostio.c (HOSTIO_PATH_MAX): Define.
8841 (require_filename, handle_open, handle_unlink, handle_readlink):
8842 Use it.
8843
d8d2a3ee
PA
88442013-07-01 Pedro Alves <palves@redhat.com>
8845
8846 * server.h: Include "pathmax.h".
8847 * linux-low.c: Don't include sys/param.h.
8848 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8849 MAXPATHLEN.
8850 * win32-low.c: Don't include sys/param.h.
8851 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8852
bc7dea8d
PA
88532013-07-01 Pedro Alves <palves@redhat.com>
8854
8855 * event-loop.c: Don't check HAVE_UNISTD_H before including
8856 <unistd.h>.
8857 * gdbreplay.c: Likewise.
8858 * remote-utils.c: Likewise.
8859 * server.c: Likewise.
8860 * configure.ac: Don't check for unistd.h.
8861 * configure: Regenerate.
8862
d6c2da54
TT
88632013-06-28 Tom Tromey <tromey@redhat.com>
8864
8865 * Makefile.in (version.c): Use version.in, not
8866 common/version.in.
8867
257b6bec
MG
88682013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8869
8870 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8871 * configure: Rebuild.
8872 * Makefile.in (version_host, version_target): Get from configure.
8873 (version.c): Use $(version_host) and $(version_target).
8874
86ebe149
DK
88752013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8876
8877 Fix trace-status to output user name without trailing colon.
8878 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8879
f30aa5af
DK
88802013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8881
8882 Fix trace-status to output proper start-time and stop-time.
8883 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8884 output start time and stop time in hex as gdb expects.
8885
28a93511
YQ
88862013-06-26 Pedro Alves <pedro@codesourcery.com>
8887
8888 * tracepoint.c (build_traceframe_info_xml): Output trace state
8889 variables present in the trace buffer.
8890
01208463
TT
88912013-06-24 Tom Tromey <tromey@redhat.com>
8892
8893 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8894 create-version.sh.
8895 (version.o): Remove.
8896 * gdbreplay.c: Include version.h.
8897 (version, host_name): Don't declare.
8898 * server.h: Include version.h.
8899 (version, host_name): Don't declare.
8900
760256f9
PA
89012013-06-12 Pedro Alves <palves@redhat.com>
8902
8903 * linux-x86-low.c (linux_is_elf64): Delete global.
8904 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8905 with local linux_pid_exe_is_elf_64_file use.
8906
030031ee
PA
89072013-06-11 Pedro Alves <palves@redhat.com>
8908
8909 * linux-low.c (regset_disabled, disable_regset): New functions.
8910 (regsets_fetch_inferior_registers)
8911 (regsets_store_inferior_registers): Use them.
8912 (initialize_regsets_info); Don't allocate the disabled_regsets
8913 array here.
8914 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8915 comment.
8916
5da6eb0a
PA
89172013-06-11 Pedro Alves <palves@redhat.com>
8918
8919 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8920 xmalloc.
8921
7e5aaa09
PA
89222013-06-11 Pedro Alves <palves@redhat.com>
8923
8924 * linux-x86-low.c (initialize_low_arch): Call
8925 init_registers_x32_avx_linux.
8926
d878444c
JK
89272013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8928
8929 Fix compatibility with Android Bionic.
8930 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8931 it is not empty.
8932
3aee8918
PA
89332013-06-07 Pedro Alves <palves@redhat.com>
8934
5f2b57b5 8935 PR server/14823
3aee8918
PA
8936 * Makefile.in (OBS): Add tdesc.o.
8937 (IPA_OBJS): Add tdesc-ipa.o.
8938 (tdesc-ipa.o): New rule.
8939 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8940 interface.
8941 * linux-low.c (new_inferior): Delete.
8942 (disabled_regsets, num_regsets): Delete.
8943 (linux_add_process): Adjust to set the new per-process
8944 new_inferior flag.
8945 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8946 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8947 was a stop. When calling arch_setup, switch the current inferior
8948 to the thread that got an event.
8949 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8950 (regsets_fetch_inferior_registers)
8951 (regsets_store_inferior_registers): New regsets_info parameter.
8952 Adjust to use it.
8953 (linux_register_in_regsets): New regs_info parameter. Adjust to
8954 use it.
8955 (register_addr, fetch_register, store_register): New usrregs_info
8956 parameter. Adjust to use it.
8957 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8958 parameter regs_info. Adjust to use it.
8959 (linux_fetch_registers): Get the current inferior's regs_info, and
8960 adjust to use it.
8961 (linux_store_registers): Ditto.
8962 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8963 (initialize_low): Don't initialize the target_regsets here. Call
8964 initialize_low_arch.
8965 * linux-low.h (target_regsets): Delete declaration.
8966 (struct regsets_info): New.
8967 (struct usrregs_info): New.
8968 (struct regs_info): New.
8969 (struct process_info_private) <new_inferior>: New field.
8970 (struct linux_target_ops): Delete the num_regs, regmap, and
8971 regset_bitmap fields. New field regs_info.
8972 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8973 * i387-fp.c (num_xmm_registers): Delete.
8974 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8975 calls to new interface.
8976 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8977 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8978 Infer the number of xmm registers from the regcache's target
8979 description.
8980 * i387-fp.h (num_xmm_registers): Delete.
8981 * inferiors.c (add_thread): Don't install the thread's regcache
8982 here.
8983 * proc-service.c (gregset_info): Fetch the current inferior's
8984 regs_info. Adjust to use it.
8985 * regcache.c: Include tdesc.h.
8986 (register_bytes, reg_defs, num_registers)
8987 (gdbserver_expedite_regs): Delete.
8988 (get_thread_regcache): If the thread doesn't have a regcache yet,
8989 create one, instead of aborting gdbserver.
8990 (regcache_invalidate_one): Rename to ...
8991 (regcache_invalidate_thread): ... this.
8992 (regcache_invalidate_one): New.
8993 (regcache_invalidate): Only invalidate registers of the current
8994 process.
8995 (init_register_cache): Add target_desc parameter, and use it.
8996 (new_register_cache): Ditto. Assert the target description has a
8997 non zero registers_size.
8998 (regcache_cpy): Add assertions. Adjust.
8999 (realloc_register_cache, set_register_cache): Delete.
9000 (registers_to_string, registers_from_string): Adjust.
9001 (find_register_by_name, find_regno, find_register_by_number)
9002 (register_cache_size): Add target_desc parameter, and use it.
9003 (free_register_cache_thread, free_register_cache_thread_one)
9004 (regcache_release, register_cache_size): New.
9005 (register_size): Add target_desc parameter, and use it.
9006 (register_data, supply_register, supply_register_zeroed)
9007 (supply_regblock, supply_register_by_name, collect_register)
9008 (collect_register_as_string, collect_register_by_name): Adjust.
9009 * regcache.h (struct target_desc): Forward declare.
9010 (struct regcache) <tdesc>: New field.
9011 (init_register_cache, new_register_cache): Add target_desc
9012 parameter.
9013 (regcache_invalidate_thread): Declare.
9014 (regcache_invalidate_one): Delete declaration.
9015 (regcache_release): Declare.
9016 (find_register_by_number, register_cache_size, register_size)
9017 (find_regno): Add target_desc parameter.
9018 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9019 declarations.
9020 * remote-utils.c: Include tdesc.h.
9021 (outreg, prepare_resume_reply): Adjust.
9022 * server.c: Include tdesc.h.
9023 (gdbserver_xmltarget): Delete declaration.
9024 (get_features_xml, process_serial_event): Adjust.
9025 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9026 declare.
9027 (struct process_info) <tdesc>: New field.
9028 (ipa_tdesc): Declare.
9029 * tdesc.c: New file.
9030 * tdesc.h: New file.
9031 * tracepoint.c: Include tdesc.h.
9032 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9033 (get_context_regcache): Adjust to pass ipa_tdesc down.
9034 (do_action_at_tracepoint): Adjust to get the register cache size
9035 from the context regcache's description.
9036 (traceframe_walk_blocks): Adjust to get the register cache size
9037 from the current trace frame's description.
9038 (traceframe_get_pc): Adjust to get current trace frame's
9039 description and pass it down.
9040 (gdb_collect): Adjust to get the register cache size from the
9041 IPA's description.
9042 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9043 (gdbserver_xmltarget): Delete.
9044 (initialize_low_tracepoint): Set the ipa's target description.
9045 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9046 (initialize_low_tracepoint): Set the ipa's target description.
9047 * linux-x86-low.c: Include tdesc.h.
9048 [__x86_64__] (is_64bit_tdesc): New.
9049 (ps_get_thread_area, x86_get_thread_area): Use it.
9050 (i386_cannot_store_register): Rename to ...
9051 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9052 (i386_cannot_fetch_register): Rename to ...
9053 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9054 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9055 to new interface.
9056 (target_regsets): Rename to ...
9057 (x86_regsets): ... this.
9058 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9059 interface.
9060 (x86_siginfo_fixup): Use is_64bit_tdesc.
9061 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9062 (tdesc_x32_avx_linux, tdesc_x32_linux)
9063 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9064 Declare.
9065 (x86_linux_update_xmltarget): Delete.
9066 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9067 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9068 (AMD64_LINUX_USER64_CS): New.
9069 (x86_linux_read_description): New, based on
9070 x86_linux_update_xmltarget.
9071 (same_process_callback): New.
9072 (x86_arch_setup_process_callback): New.
9073 (x86_linux_update_xmltarget): New.
9074 (x86_regsets_info): New.
9075 (amd64_linux_regs_info): New.
9076 (i386_linux_usrregs_info): New.
9077 (i386_linux_regs_info): New.
9078 (x86_linux_regs_info): New.
9079 (x86_arch_setup): Reimplement.
9080 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9081 (x86_emit_ops): Ditto.
9082 (the_low_target): Adjust. Install x86_linux_regs_info,
9083 x86_cannot_fetch_register, and x86_cannot_store_register.
9084 (initialize_low_arch): New.
9085 * linux-ia64-low.c (tdesc_ia64): Declare.
9086 (ia64_fetch_register): Adjust.
9087 (ia64_usrregs_info, regs_info): New globals.
9088 (ia64_regs_info): New function.
9089 (the_low_target): Adjust.
9090 (initialize_low_arch): New function.
9091 * linux-sparc-low.c (tdesc_sparc64): Declare.
9092 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9093 Adjust.
9094 (sparc_arch_setup): New function.
9095 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9096 (the_low_target): Adjust.
9097 (initialize_low_arch): New function.
9098 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9099 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9100 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9101 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9102 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9103 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9104 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9105 (tdesc_powerpc_isa205_vsx64l): Declare.
9106 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9107 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9108 (ppc_set_pc, ppc_get_hwcap): Adjust.
9109 (ppc_usrregs_info): Forward declare.
9110 (!__powerpc64__) ppc_regmap_adjusted: New global.
9111 (ppc_arch_setup): Adjust to the current process'es target
9112 description.
9113 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9114 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9115 (ppc_store_evrregset): Adjust.
9116 (target_regsets): Rename to ...
9117 (ppc_regsets): ... this, and make static.
9118 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9119 (ppc_regs_info): New function.
9120 (the_low_target): Adjust.
9121 (initialize_low_arch): New function.
9122 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9123 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9124 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9125 (tdesc_s390x_linux64v2): Declare.
9126 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9127 (s390_fill_gregset, s390_store_last_break): Adjust.
9128 (target_regsets): Rename to ...
9129 (s390_regsets): ... this, and make static.
9130 (s390_get_pc, s390_set_pc): Adjust.
9131 (s390_get_hwcap): New target_desc parameter, and use it.
9132 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9133 (s390_arch_setup): Adjust to set the current process'es target
9134 description. Don't adjust the regmap.
9135 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9136 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9137 (regs_info_3264): New globals.
9138 (s390_regs_info): New function.
9139 (the_low_target): Adjust.
9140 (initialize_low_arch): New function.
9141 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9142 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9143 [__mips64] (init_registers_mips_linux)
9144 (init_registers_mips_dsp_linux): Delete defines.
9145 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9146 (have_dsp): New global.
9147 (mips_read_description): New, based on mips_arch_setup.
9148 (mips_arch_setup): Reimplement.
9149 (get_usrregs_info): New function.
9150 (mips_cannot_fetch_register, mips_cannot_store_register)
9151 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9152 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9153 (target_regsets): Rename to ...
9154 (mips_regsets): ... this, and make static.
9155 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9156 (dsp_regs_info, regs_info): New globals.
9157 (mips_regs_info): New function.
9158 (the_low_target): Adjust.
9159 (initialize_low_arch): New function.
9160 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9161 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9162 Declare.
9163 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9164 (arm_read_description): New, with bits factored from
9165 arm_arch_setup.
9166 (arm_arch_setup): Reimplement.
9167 (target_regsets): Rename to ...
9168 (arm_regsets): ... this, and make static.
9169 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9170 (arm_regs_info): New function.
9171 (the_low_target): Adjust.
9172 (initialize_low_arch): New function.
9173 * linux-m68k-low.c (tdesc_m68k): Declare.
9174 (target_regsets): Rename to ...
9175 (m68k_regsets): ... this, and make static.
9176 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9177 (m68k_regs_info): New function.
9178 (m68k_arch_setup): New function.
9179 (the_low_target): Adjust.
9180 (initialize_low_arch): New function.
9181 * linux-sh-low.c (tdesc_sharch): Declare.
9182 (target_regsets): Rename to ...
9183 (sh_regsets): ... this, and make static.
9184 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9185 (sh_regs_info, sh_arch_setup): New functions.
9186 (the_low_target): Adjust.
9187 (initialize_low_arch): New function.
9188 * linux-bfin-low.c (tdesc_bfin): Declare.
9189 (bfin_arch_setup): New function.
9190 (bfin_usrregs_info, regs_info): New globals.
9191 (bfin_regs_info): New function.
9192 (the_low_target): Adjust.
9193 (initialize_low_arch): New function.
9194 * linux-cris-low.c (tdesc_cris): Declare.
9195 (cris_arch_setup): New function.
9196 (cris_usrregs_info, regs_info): New globals.
9197 (cris_regs_info): New function.
9198 (the_low_target): Adjust.
9199 (initialize_low_arch): New function.
9200 * linux-cris-low.c (tdesc_crisv32): Declare.
9201 (cris_arch_setup): New function.
9202 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9203 (cris_regs_info): New function.
9204 (the_low_target): Adjust.
9205 (initialize_low_arch): New function.
9206 * linux-m32r-low.c (tdesc_m32r): Declare.
9207 (m32r_arch_setup): New function.
9208 (m32r_usrregs_info, regs_info): New globals.
9209 (m32r_regs_info): Adjust.
9210 (initialize_low_arch): New function.
9211 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9212 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9213 (tic6x_usrregs_info): Forward declare.
9214 (tic6x_read_description): New function, based on ...
9215 (tic6x_arch_setup): ... this. Reimplement.
9216 (target_regsets): Rename to ...
9217 (tic6x_regsets): ... this, and make static.
9218 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9219 (tic6x_regs_info): New function.
9220 (the_low_target): Adjust.
9221 (initialize_low_arch): New function.
9222 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9223 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9224 (target_regsets): Rename to ...
9225 (xtensa_regsets): ... this, and make static.
9226 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9227 globals.
9228 (xtensa_arch_setup, xtensa_regs_info): New functions.
9229 (the_low_target): Adjust.
9230 (initialize_low_arch): New function.
9231 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9232 (nios2_arch_setup): Set the current process'es tdesc.
9233 (target_regsets): Rename to ...
9234 (nios2_regsets): ... this.
9235 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9236 (nios2_regs_info): New function.
9237 (the_low_target): Adjust.
9238 (initialize_low_arch): New function.
a261b8f5
PA
9239 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9240 (aarch64_arch_setup): Set the current process'es tdesc.
9241 (target_regsets): Rename to ...
9242 (aarch64_regsets): ... this.
9243 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9244 (aarch64_regs_info): New function.
9245 (the_low_target): Adjust.
9246 (initialize_low_arch): New function.
3aee8918
PA
9247 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9248 globals.
9249 (target_regsets): Rename to ...
9250 (tile_regsets): ... this.
9251 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9252 (tile_regs_info): New function.
9253 (tile_arch_setup): Set the current process'es tdesc.
9254 (the_low_target): Adjust.
9255 (initialize_low_arch): New function.
9256 * spu-low.c (tdesc_spu): Declare.
9257 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9258 * win32-arm-low.c (tdesc_arm): Declare.
9259 (arm_arch_setup): New function.
9260 (the_low_target): Install arm_arch_setup instead of
9261 init_registers_arm.
9262 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9263 (init_windows_x86): Rename to ...
9264 (i386_arch_setup): ... this. Set `win32_tdesc'.
9265 (the_low_target): Adjust.
9266 * win32-low.c (win32_tdesc): New global.
9267 (child_add_thread): Don't create the thread cache here.
9268 (do_initial_child_stuff): Set the new process'es tdesc.
9269 * win32-low.h (struct target_desc): Forward declare.
9270 (win32_tdesc): Declare.
9271 * lynx-i386-low.c (tdesc_i386): Declare global.
9272 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9273 * lynx-low.c (lynx_tdesc): New global.
9274 (lynx_add_process): Set the new process'es tdesc.
9275 * lynx-low.h (struct target_desc): Forward declare.
9276 (lynx_tdesc): Declare global.
9277 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9278 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9279 * nto-low.c (nto_tdesc): New global.
9280 (do_attach): Set the new process'es tdesc.
9281 * nto-low.h (struct target_desc): Forward declare.
9282 (nto_tdesc): Declare.
9283 * nto-x86-low.c (tdesc_i386): Declare.
9284 (nto_x86_arch_setup): Set `nto_tdesc'.
9285
b1fbec62
GB
92862013-06-04 Gary Benson <gbenson@redhat.com>
9287
9288 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9289 to qSupported response when appropriate.
9290 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9291 with nonzero-length annex.
9292 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9293 arguments supplied in annex.
9294
d1ec4ce7
DE
92952013-05-31 Doug Evans <dje@google.com>
9296
ac44adcb 9297 PR server/15594
d1ec4ce7
DE
9298 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9299 64 bits in 64-cross-32 environment.
9300
9b25f2d3
PA
93012013-05-28 Pedro Alves <palves@redhat.com>
9302
9303 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9304 (aarch64-without-fpu.c): Delete rule.
9305 * configure.srv (aarch64*-*-linux*): Remove references to
9306 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9307 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9308 declaration.
9309
6740dc9c
PA
93102013-05-24 Pedro Alves <palves@redhat.com>
9311
9312 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9313 instead of strchr/decode_address. Error if the range isn't split
9314 with a ','. Don't assume there's be a ':' in the action.
9315
c2d6af84
PA
93162013-05-23 Yao Qi <yao@codesourcery.com>
9317 Pedro Alves <palves@redhat.com>
9318
9319 * linux-low.c (lwp_in_step_range): New function.
9320 (linux_wait_1): If the thread was range stepping and stopped
9321 outside the stepping range, report the stop to GDB. Otherwise,
9322 continue stepping. Add range stepping debug output.
9323 (linux_set_resume_request): Copy the step range from the resume
9324 request to the lwp.
9325 (linux_supports_range_stepping): New.
9326 (linux_target_ops) <supports_range_stepping>: Set to
9327 linux_supports_range_stepping.
9328 * linux-low.h (struct linux_target_ops)
9329 <supports_range_stepping>: New field.
9330 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9331 * linux-x86-low.c (x86_supports_range_stepping): New.
9332 (the_low_target) <supports_range_stepping>: Set to
9333 x86_supports_range_stepping.
9334 * server.c (handle_v_cont): Handle 'r' action.
9335 (handle_v_requests): Append ";r" if the target supports range
9336 stepping.
9337 * target.h (struct thread_resume) <step_range_start,
9338 step_range_end>: New fields.
9339 (struct target_ops) <supports_range_stepping>:
9340 New field.
9341 (target_supports_range_stepping): New macro.
9342
58794e1a
JB
93432013-05-17 Joel Brobecker <brobecker@adacore.com>
9344
9345 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9346 confusion in comment.
9347
d631c5a7
JB
93482013-05-17 Joel Brobecker <brobecker@adacore.com>
9349
9350 * lynx-low.c (struct process_info_private): New type.
9351 (lynx_add_process): New function.
9352 (lynx_create_inferior, lynx_attach): Replace calls to
9353 add_process by calls to lynx_add_process.
9354 (lynx_resume): If PTID is null, then try using
9355 current_process()->private->last_wait_event_ptid.
9356 Add comments.
9357 (lynx_clear_inferiors): Delete. The contents of that function
9358 has been inlined in lynx_mourn;
9359 (lynx_wait_1): Save the ptid in the process's private data.
9360 (lynx_mourn): Free the process' private data. Replace call
9361 to lynx_clear_inferiors by call to clear_inferiors.
9362
96f7a20f
YQ
93632013-05-17 Yao Qi <yao@codesourcery.com>
9364
9365 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9366 the right place.
9367
db0dfaa0
LM
93682013-05-16 Luis Machado <lgustavo@codesourcery.com>
9369
9370 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9371 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9372 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9373 PT_TEXT_END_ADDR guards. Update comments.
9374 (linux_target_op) <read_offsets>: Conditionally define to
9375 linux_read_offsets if the target is UCLIBC and if it defines
9376 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9377
68f5f838
SL
93782013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9379 Andrew Jenner <andrew@codesourcery.com>
9380
9381 * Makefile.in (SFILES): Add linux-nios2-low.c.
9382 (clean): Add action to delete nios2-linux.c.
9383 (nios2-linux.c): New rule.
9384 * configure.srv: Add nios2*-*-linux*.
9385 * linux-nios2-low.c: New.
9386
1ebff1fd
HAQ
93872013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9388
9389 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9390
f6150862
HZ
93912013-04-25 Hui Zhu <hui@codesourcery.com>
9392
9393 PR gdb/15186
f6150862
HZ
9394 * ax.c (ax_printf): Add fflush.
9395
614c279d
TT
93962013-04-22 Tom Tromey <tromey@redhat.com>
9397
9398 * Makefile.in (SFILES): Add filestuff.c.
9399 (OBS): Add filestuff.o.
9400 (filestuff.o): New target.
9401 * config.in, configure: Rebuild.
9402 * configure.ac: Check for fdwalk, pipe2.
9403
7d4e5717
PA
94042013-04-17 Pedro Alves <palves@redhat.com>
9405
9406 * configure.ac (USE_THREAD_DB): Delete variable.
9407 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9408 Don't AC_SUBST USE_THREAD_DB.
9409 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9410 * config.in, configure: Regenerate.
9411
d5c93e41
PA
94122013-04-16 Pedro Alves <palves@redhat.com>
9413
9414 * linux-low.h (struct lwp_info) <thread_known>: Move under
9415 the USE_THREAD_DB #ifdef.
9416
04f5fe89
PA
94172013-04-16 Pedro Alves <palves@redhat.com>
9418
9419 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9420 (linux-low.o): Delete rule.
9421 * linux-low.h: Always include "gdb_thread_db.h" instead of
9422 conditionally including thread_db.h.
9423 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9424 HAVE_THREAD_DB_H.
9425
480b27bf
JK
94262013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9427
9428 * Makefile.in (install-only): Fix make install regression.
9429
43662968
JK
94302013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9431
9432 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9433 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9434 installation.
9435 * gdbserver.1: Remove.
9436
3e74e146
PA
94372013-03-22 Pedro Alves <palves@redhat.com>
9438
9439 * linux-low.c (handle_extended_wait): Don't call
9440 linux_enable_event_reporting.
9441
a8347a2a
TT
94422013-03-15 Tony Theodore <tonyt@logyst.com>
9443
9444 PR build/9098:
9445 * Makefile.in (SHELL): Use @SHELL@.
9446
eeb56fa7
SDJ
94472013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9448
9449 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9450 compiler warning.
9451
4fa7e2ff
JB
94522013-03-13 Joel Brobecker <brobecker@adacore.com>
9453
9454 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9455 Remove extraneous NULL element.
9456
8ddb1965
YQ
94572013-03-13 Yao Qi <yao@codesourcery.com>
9458
9459 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9460 'V' block in trace frame.
9461
9accd112
MM
94622013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9463
9464 * target.h (struct target_ops): Add btrace ops.
9465 (target_supports_btrace): New macro.
9466 (target_enable_btrace): New macro.
9467 (target_disable_btrace): New macro.
9468 (target_read_btrace): New macro.
9469 * gdbthread.h (struct thread_info): Add btrace field.
9470 * server.c: Include btrace-common.h.
9471 (handle_btrace_general_set): New function.
9472 (handle_btrace_enable): New function.
9473 (handle_btrace_disable): New function.
9474 (handle_general_set): Call handle_btrace_general_set.
9475 (handle_qxfer_btrace): New function.
9476 (struct qxfer qxfer_packets[]): Add btrace entry.
9477 * inferiors.c (remove_thread): Disable btrace.
9478 * linux-low: Include linux-btrace.h.
9479 (linux_low_enable_btrace): New function.
9480 (linux_low_read_btrace): New function.
9481 (linux_target_ops): Add btrace ops.
9482 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9483 Add srv_linux_btrace=yes.
9484 (x86_64-*-linux*): Add linux-btrace.o.
9485 Add srv_linux_btrace=yes.
9486 * configure.ac: Define HAVE_LINUX_BTRACE.
9487 * config.in: Regenerated.
9488 * configure: Regenerated.
9489
5cc22e4c
MM
94902013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9491
9492 * server.c (handle_qxfer): Preserve error message if -3 is
9493 returned.
9494 (qxfer): Document the -3 return value.
9495
7c97f91e
MM
94962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9497
9498 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9499 (linux_btrace_h): New variable.
9500 (linux-btrace.o): New rule.
9501
be9a119c 95022013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9503 Hafiz Abid Qadeer <abidh@codesourcery.com>
9504
9505 * tracepoint.c (trace_buffer_size): New global.
9506 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9507 (init_trace_buffer): Change to one-argument function. Allocate
9508 trace buffer memory.
9509 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9510 handle QTBuffer:size packet.
9511 (cmd_bigqtbuffer_size): New function.
9512 (initialize_tracepoint): Call init_trace_buffer with
9513 DEFAULT_TRACE_BUFFER_SIZE.
9514 * server.c (handle_query): Add QTBuffer:size in the
9515 supported packets.
9516
e64f7499
YQ
95172013-03-07 Yao Qi <yao@codesourcery.com>
9518
9519 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9520 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9521 of -1.
9522 (cmd_qtsp): Adjust condition. Do post increment.
9523 Set cur_action and cur_step_action back to 0.
9524
f0ae6fc3
PA
95252013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9526
9527 PR server/15236
9528 * linux-low.c (linux_write_memory): Return early success if LEN is
9529 zero.
9530
b5b0b0af
CV
95312013-03-05 Corinna Vinschen <vinschen@redhat.de>
9532
334ad4a8 9533 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9534
589bc927
TT
95352013-02-28 Tom Tromey <tromey@redhat.com>
9536
9537 * configure.ac: Invoke AC_SYS_LARGEFILE.
9538 * configure, config.in: Rebuild.
9539
dfe07582
CV
95402013-02-28 Corinna Vinschen <vinschen@redhat.com>
9541
9542 * win32-low.c: Throughout, fix format strings and casts of
9543 printf-like functions to avoid type related warnings on all
9544 platforms.
9545 (get_child_debug_event): Print dwDebugEventCode as hex since
9546 that's how it's usually documented.
9547
736cd585
YQ
95482013-02-28 Yao Qi <yao@codesourcery.com>
9549
9550 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9551 pulongest.
9552
e1f58301
JW
95532013-02-27 Jiong Wang <jiwang@tilera.com>
9554
9555 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9556 (reg-tilegx32.c): New rule.
9557 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9558 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9559 different register info initializer according to elf class.
9560 (init_registers_tilgx32): New function. The tilegx32 register info
9561 initializer.
9562 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9563 (tile_store_gregset): Likewise.
9564
d171ca78
YQ
95652013-02-27 Yao Qi <yao@codesourcery.com>
9566
9567 * server.c (process_point_options): Print debug message when
9568 debug_threads is true.
9569
282bbdf3
YQ
95702013-02-26 Yao Qi <yao@codesourcery.com>
9571
9572 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9573
aca22551
PA
95742013-02-19 Pedro Alves <palves@redhat.com>
9575 Kai Tietz <ktietz@redhat.com>
9576
9577 PR gdb/15161
9578
9579 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9580 instead of strtoul to extract address from packet.
9581 (process_serial_event) <'z'>: Likewise.
9582
4f3cee1c
YQ
95832013-02-18 Yao Qi <yao@codesourcery.com>
9584
9585 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9586
8e1d55a3
PA
95872013-02-14 Pedro Alves <palves@redhat.com>
9588
9589 Plug memory leak.
9590
9591 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9592 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9593
458820da
PA
95942013-02-14 Pedro Alves <palves@redhat.com>
9595
9596 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9597
baea0dae
PA
95982013-02-14 Pedro Alves <palves@redhat.com>
9599
9600 * tracepoint.c (save_string): Delete.
9601 (add_tracepoint_action): Use savestring instead of save_string.
9602
0b1afbb3
PA
96032013-02-12 Pedro Alves <palves@redhat.com>
9604
9605 * linux-xtensa-low.c: Ditto.
9606 * xtensa-xtregs.c: Ditto.
9607
8a4ac37e
PA
96082013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9609
9610 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9611 thread_db.
9612
148de6bb
MS
96132013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9614
9615 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9616 aarch64_num_wp_regs and aarch64_num_bp_regs to
9617 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9618
55fac6e0
MS
96192013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9620
9621 * linux-aarch64-low.c (ps_get_thread_area): Replace
9622 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9623
176eb98c
MS
96242013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9625 Marcus Shawcroft <marcus.shawcroft@arm.com>
9626 Nigel Stephens <nigel.stephens@arm.com>
9627 Yufeng Zhang <yufeng.zhang@arm.com>
9628
9629 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9630 (aarch64.c, aarch64-without-fpu.c): New targets.
9631 * configure.srv (aarch64*-*-linux*): New.
9632 * linux-aarch64-low.c: New file.
9633
56f7af9c
MS
96342013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9635
43aaf8b6 9636 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9637 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9638 (dequeue_one_deferred_signal, linux_resume_one_thread)
9639 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9640 (linux_tracefork_grandchild, linux_test_for_tracefork)
9641 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9642 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9643 where the argument is 0.
9644
60f662b0
YQ
96452013-01-25 Yao Qi <yao@codesourcery.com>
9646
9647 * event-loop.c: Include "queue.h".
9648 (gdb_event_p): New typedef.
9649 (struct gdb_event) <next_event>: Remove.
9650 (event_queue): Change to QUEUE(gdb_event_p).
9651 (async_queue_event): Remove.
9652 (gdb_event_xfree): New.
9653 (initialize_event_loop): New.
9654 (process_event): Use API from QUEUE.
9655 (wait_for_event): Likewise.
9656 * server.c (main): Call initialize_event_loop.
9657 * server.h (initialize_event_loop): Declare.
9658
5ae4861a
YQ
96592013-01-18 Yao Qi <yao@codesourcery.com>
9660
9661 * ax.h (struct eval_agent_expr_context): New.
9662 (gdb_eval_agent_expr): Update declaration.
9663 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9664 TFRAME. Add new argument CTX.
9665 * server.h (struct eval_agent_expr_context): Declare.
9666 (agent_mem_read, agent_tsv_read): Update declaration.
9667 (agent_mem_read_string): Likewise.
9668 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9669 (add_traceframe_block): Add new argument TPOINT.
9670 Increase TPOINT->traceframe_usage.
9671 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9672 eval_tracepoint_agent_expr.
9673 (condition_true_at_tracepoint): Likewise.
9674 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9675 (agent_mem_read_string, agent_tsv_read): Likewise.
9676
85e00e85
YQ
96772013-01-16 Yao Qi <yao@codesourcery.com>
9678
9679 * linux-low.c (linux_resume_one_lwp): Don't check
9680 'lwp->bp_reinsert != 0'.
9681
4039cf45
JB
96822013-01-07 Joel Brobecker <brobecker@adacore.com>
9683 Pedro Alves <palves@redhat.com>
9684
9685 * lynx-low.c (ptrace_request_to_str): Define a temporary
9686 macro and use it to simplify this function's implementation.
9687
9044dee2
JB
96882013-01-07 Joel Brobecker <brobecker@adacore.com>
9689
9690 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9691 sets errno.
9692
e6352c8f
JB
96932013-01-07 Joel Brobecker <brobecker@adacore.com>
9694
9695 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9696
50681a27
JB
96972013-01-07 Joel Brobecker <brobecker@adacore.com>
9698
9699 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9700
3f6e77ef
JB
97012013-01-07 Joel Brobecker <brobecker@adacore.com>
9702
9703 * lynx-low.c (lynx_resume): Use the resume_info parameter
9704 to determine the ptid for the lynx_ptrace call, unless
9705 it is equal to minus_one_ptid, in which case we use the
9706 ptid of the current_inferior.
9707 (lynx_wait_1): After having received a thread create/exit
9708 event, resume the inferior's execution using the signaling
9709 thread's ptid, rather than the old ptid.
9710
7fda33ae
JB
97112013-01-07 Joel Brobecker <brobecker@adacore.com>
9712
9713 * lynx-low.c (lynx_resume): Delete variable ret.
9714
b9786c74
JB
97152013-01-01 Joel Brobecker <brobecker@adacore.com>
9716
9717 * gdbreplay.c (gdbreplay_version): Update copyright year.
9718 * server.c (gdbserver_version): Likewise.
9719
8b93d60f
JB
97202012-12-17 Joel Brobecker <brobecker@adacore.com>
9721
9722 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9723 new thread.
9724
037335a7
JB
97252012-12-17 Joel Brobecker <brobecker@adacore.com>
9726
9727 * lynx-low.c (ptrace_request_to_str): Add handling for
9728 PTRACE_GETTRACESIG.
9729
52d4cbd8
JB
97302012-12-17 Joel Brobecker <brobecker@adacore.com>
9731
9732 * lynx-low.c (lynx_attach): Delete variable new_process.
9733
ab8f6ca9
JB
97342012-12-17 Joel Brobecker <brobecker@adacore.com>
9735
9736 * lynx-low.c (lynx_create_inferior): Delete variable
9737 new_process.
9738
78cbc024
JB
97392012-12-17 Joel Brobecker <brobecker@adacore.com>
9740
9741 * lynx-low.c (ptrace_request_to_str): Do not handle
9742 PTRACE_GETTHREADLIST if this macro does not exist.
9743
14a00470
YQ
97442012-12-15 Yao Qi <yao@codesourcery.com>
9745
9746 * Makefile.in (OBS): Add notif.o.
9747 * notif.c, notif.h: New.
9748 * server.c: Include "notif.h".
9749 (struct vstop_notif) <next>: Remove.
9750 <base>: New field.
9751 (queue_stop_reply): Update.
9752 (push_event, send_next_stop_reply): Remove.
9753 (discard_queued_stop_replies): Update.
9754 (notif_stop): New variable.
9755 (handle_v_stopped): Remove.
9756 (handle_v_requests): Don't call handle_v_stopped. Call
9757 handle_ack_notif instead.
9758 (queue_stop_reply_callback): Call notif_event_enque instead
9759 of queue_stop_reply.
9760 (handle_status): Don't call send_next_stop_reply, call
9761 notif_write_event instead.
9762 (kill_inferior_callback): Likewise.
9763 (detach_or_kill_inferior_callback): Likewise.
9764 (main): Call initialize_notif.
9765 (process_serial_event): Call QUEUE_is_empty.
9766 (handle_target_event): Call notif_push instead of push event.
9767 * server.h (push_event): Remove declaration.
9768
61c125b9
TT
97692012-12-10 Tom Tromey <tromey@redhat.com>
9770
9771 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9772 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9773 macros.
9774 (.c.o): Rewrite.
9775 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9776 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9777 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9778 (amd64-linux-ipa.o, ax.o): Rewrite.
9779 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9780 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9781 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9782 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9783 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9784 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9785 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9786 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9787 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9788 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9789 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9790 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9791 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9792 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9793 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9794 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9795 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9796 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9797 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9798 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9799 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9800 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9801 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9802 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9803 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9804 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9805 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9806 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9807 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9808 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9809 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9810 (reg-tilegx.o): Remove.
9811 (all_object_files): New macro.
9812 Include .deps files.
9813 * aclocal.m4, configure: Rebuild.
9814 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9815 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9816 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9817
e90e9ad9
TT
98182012-12-05 Tom Tromey <tromey@redhat.com>
9819
9820 PR gdb/14917:
9821 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9822
02d403bf 98232012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9824
9825 * configure.ac: Check for linux/perf_event.h.
9826 * config.in: Regenerated.
9827 * configure: Regenerated.
9828
0270a750
PA
98292012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9830
9831 * hostio.c (handle_readlink): Decrease buffer size
9832 parameter passed to readlink by one byte.
9833
8c29b58e
YQ
98342012-11-26 Yao Qi <yao@codesourcery.com>
9835
9836 * configure.ac (build_warnings): Append '-Wempty-body'.
9837 * configure: Regenerated.
9838 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9839 body.
9840
8bdce1ff
PM
98412012-11-15 Pierre Muller <muller@sourceware.org>
9842
9843 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9844 * config.in: Regenerate.
9845 * configure: Regenerate.
9846 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9847 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9848 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9849 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9850 header.
9851 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9852 instead of <sys/wait.h> header.
9853 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9854
02d403bf 98552012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9856
9857 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9858 (various make rules): Remove -DGDBSERVER
9859
fbd5db48
YQ
98602012-11-09 Yao Qi <yao@codesourcery.com>
9861
9862 * spu-low.c (current_ptid): Move it to ..
9863 * gdbthread.h: ... here. New.
9864 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9865 * server.c (myresume, process_serial_event): Likewise.
9866 * thread-db.c (thread_db_find_new_threads): Likewise.
9867 * tracepoint.c (run_inferior_command): Likewise.
9868
b3dc46ff
AB
98692012-10-01 Andrew Burgess <aburgess@broadcom.com>
9870
9871 * server.c (handle_search_memory_1): Include access length in
9872 warning message.
9873
07c04788
HPN
98742012-09-05 Michael Brandt <michael.brandt@axis.com>
9875
9876 * linux-crisv32-low.c: Fix compile errors.
9877
918d227b
YQ
98782012-09-04 Yao Qi <yao@codesourcery.com>
9879
9880 * tracepoint.c (cmd_qtsv): Adjust debug message.
9881 Don't check CUR_TPOINT.
9882
18c1b81a
YQ
98832012-08-28 Yao Qi <yao@codesourcery.com>
9884
9885 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9886 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9887 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9888 Remove declarations of xmalloc, xreallloc, xstrdup and
9889 freeargv.
9890 * Makefile.in (libiberty_h): New.
9891 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9892 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9893
dc82f37b
YQ
98942012-08-23 Yao Qi <yao@codesourcery.com>
9895
9896 * server.h: Remove declaration of 'xsnprintf'.
9897
406b1477
KS
98982012-08-22 Keith Seitz <keiths@redhat.com>
9899
9900 * server.h: Include build-gnulib-gbserver/config.h.
9901 * gdbreplay.c: Likewise.
9902
e6712ff1
DE
99032012-08-08 Doug Evans <dje@google.com>
9904
9905 * Makefile.in (SFILES): Add gdb_vecs.c.
9906 (OBS): Add gdb_vecs.o.
9907 (gdb_vecs_h, host_defs_h): New variables.
9908 (thread-db.o): Add $(gdb_vecs_h) dependency.
9909 (gdb_vecs.o): New rule.
9910 * thread-db.c: #include "gdb_vecs.h".
9911 (thread_db_load_search): Use a vector to iterate over path elements.
9912 Handle text appearing after "$pdir".
9913
9914 * configure.ac: Add check for strstr.
9915 * config.in: Regenerate.
9916 * configure: Regenerate.
9917
7c3270ae
UW
99182012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9919
9920 * hostio.c (handle_pread): If pread fails, fall back to attempting
9921 lseek/read.
9922 (handle_pwrite): Likewise for pwrite.
9923
b62e2b27
UW
99242012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9925
9926 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9927 between unsupported TYPE and unimplementable ADDR/LEN combination.
9928 (arm_insert_point): Act on new return value.
9929
78a99e91
PA
99302012-07-31 Pedro Alves <palves@redhat.com>
9931
9932 * server.c (process_point_options): Only skip tokens if we find
9933 one that is unrecognized. Don't treat 'X' specially while
9934 skipping unrecognized tokens.
9935
fcf303ab
UW
99362012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9937
9938 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9939 to 4-byte-align HW breakpoint addresses for Thumb.
9940
7255706c
YQ
99412012-07-27 Yao Qi <yao@codesourcery.com>
9942
9943 PR remote/14161.
9944
9945 * server.h: Declare gdb_agent_about_to_close.
9946 * target.c (kill_inferior): Include "agent.h".
9947 New. Send command 'kill'.
9948 * target.h (kill_inferior): Removed macro.
9949 * tracepoint.c (gdb_agent_about_to_close): New.
9950 (gdb_agent_helper_thread): Handle command 'close'.
9951 Wait endlessly until the inferior stops.
9952 Install gdb_agent_remove_socket to atexit hook.
9953 (agent_socket_name): New static variable.
9954 (gdb_agent_socket_init): Replace local variable 'name' with
9955 'agent_socket_name'.
9956 (gdb_agent_remove_socket): New.
9957
5a3f286f
YQ
99582012-07-27 Yao Qi <yao@codesourcery.com>
9959
9960 * server.c (process_point_options): Stop at 'X' when parsing.
9961
961bd387
ME
99622012-07-19 Michael Eager <eager@eagercon.com>
9963
a261b8f5 9964 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9965 to hw_execute.
9966 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9967 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9968 hardware breakpoint.
9969
aa7c7447
JK
99702012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9971
9972 * gdbserver/linux-low.c (initialize_low): Call
9973 linux_ptrace_init_warnings.
9974
7f216e7c
DE
99752012-07-02 Doug Evans <dje@google.com>
9976
9977 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9978 pointer to int.
9979
d3ce09f5
SS
99802012-07-02 Stan Shebs <stan@codesourcery.com>
9981
9982 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9983 (ax.o): Add it to build rule.
9984 (ax-ipa.o): Ditto.
9985 (OBS): Add format.o.
9986 (IPA_OBS): Add format.o.
9987 * server.c (handle_query): Claim support for breakpoint commands.
9988 (process_point_options): Add command case.
9989 (process_serial_event): Leave running if there are printfs in
9990 effect.
9991 * mem-break.h (any_persistent_commands): Declare.
9992 (add_breakpoint_commands): Declare.
9993 (gdb_no_commands_at_breakpoint): Declare.
9994 (run_breakpoint_commands): Declare.
9995 * mem-break.c (struct point_command_list): New struct.
9996 (struct breakpoint): New field command_list.
9997 (any_persistent_commands): New function.
9998 (add_commands_to_breakpoint): New function.
9999 (add_breakpoint_commands): New function.
10000 (gdb_no_commands_at_breakpoint): New function.
10001 (run_breakpoint_commands): New function.
10002 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10003 locally.
10004 * ax.c: Include format.h.
10005 (ax_printf): New function.
10006 (gdb_eval_agent_expr): Add printf opcode.
10007
2f8f6aed
YQ
100082012-06-13 Yao Qi <yao@codesourcery.com>
10009
10010 * server.c (start_inferior): Remove duplicated writes to fields
10011 'last_resume_kind' and 'last_status' of 'current_inferior'.
10012
0c9070b3
YQ
100132012-06-12 Yao Qi <yao@codesourcery.com>
10014 Pedro Alves <palves@redhat.com>
10015
10016 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10017 comment.
10018 * server.c (handle_v_cont): Extend comment.
10019
c52daf70
YQ
100202012-06-11 Yao Qi <yao@codesourcery.com>
10021
10022 * linux-low.c (linux_attach): Add 'static'.
10023
d38bbb0a
YQ
100242012-06-06 Yao Qi <yao@codesourcery.com>
10025
10026 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10027
89dc0afd
JK
100282012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10029
10030 Fix gcc -flto compilation warning.
10031 * server.c (main): Make variable multi_mode and attach volatile.
10032
75f62ce7
TJB
100332012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10034
10035 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10036 if the platform doesn't know about it.
10037
65f479b6
PA
100382012-05-30 Jeff Kenton <jkenton@tilera.com>
10039
10040 * Makefile.in (SFILES): Add linux-tile-low.c.
10041 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10042 * configure.srv: Handle tilegx-*-linux*.
10043 * linux-tile-low.c: New file.
10044
0c5bf5a9
JK
100452012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10046
10047 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10048
a493e3e2
PA
100492012-05-24 Pedro Alves <palves@redhat.com>
10050
10051 PR gdb/7205
10052
43aaf8b6 10053 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10054
2ea28649
PA
100552012-05-24 Pedro Alves <palves@redhat.com>
10056
10057 PR gdb/7205
10058
10059 Replace target_signal with gdb_signal throughout.
10060
8d409d16
MR
100612012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10062
10063 * linux-low.c (linux_store_registers): Avoid the copying sequence
10064 when no data has been retrieved by ptrace.
10065
23512c01
MGD
100662012-05-22 Will Deacon <will.deacon@arm.com>
10067
10068 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10069 Include asm/ptrace.h.
10070 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10071 already defined.
10072
4934b29e
MR
100732012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10074
10075 * linux-low.c (linux_store_registers): Don't re-retrieve data
10076 with ptrace that has already been obtained from /proc. Always
10077 copy any data retrieved with ptrace to the buffer supplied.
10078
bde24c0a
PA
100792012-05-11 Yao Qi <yao@codesourcery.com>
10080 Pedro Alves <palves@redhat.com>
10081
10082 * linux-low.c (enum stopping_threads_kind): New.
10083 (stopping_threads): Change type to `enum stopping_threads_kind'.
10084 (handle_extended_wait): If stopping and suspending threads, leave
10085 the new_lwp suspended too.
10086 (linux_wait_for_event): Adjust.
10087 (stop_all_lwps): Set `stopping_threads' to
10088 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10089 whether we're suspending threads or just stopping them. Assert no
10090 recursion happens.
10091
623b6bdf
YQ
100922012-04-29 Yao Qi <yao@codesourcery.com>
10093
10094 * server.h: Move some code to ...
10095 * gdbthread.h: ... here. New.
10096 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10097 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10098 (nto-low.o, win32-low.o): Likewise.
10099 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10100 * regcache.c, remote-utils.c, server.c: Likewise.
10101 * target.c, tracepoint.c, win32-low.c: Likewise.
10102
f15f9948
TJB
101032012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10104
10105 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10106 (PTRACE_ARG4_TYPE): Likewise.
10107 (PTRACE_XFER_TYPE): Likewise.
10108 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10109 ptrace to PTRACE_ARG3_TYPE.
10110 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10111 (PTRACE_ARG4_TYPE): Likewise.
10112 (PTRACE_XFER_TYPE): Likewise.
10113 (linux_detach_one_lwp): Cast fourth argument of
10114 ptrace to long then PTRACE_ARG4_TYPE.
10115 (regsets_fetch_inferior_registers): Cast third argument of
10116 ptrace to long then PTRACE_ARG3_TYPE.
10117 (regsets_store_inferior_registers): Likewise.
10118
38ea300a
PA
101192012-04-20 Pedro Alves <palves@redhat.com>
10120
10121 * configure: Regenerate.
10122
c971b7fa
PA
101232012-04-19 Pedro Alves <palves@redhat.com>
10124
43aaf8b6 10125 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10126 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10127 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10128 (all, install-only, uninstall, clean-info, all-lib, clean): No
10129 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10130 (maintainer-clean realclean distclean): Use subdir_do.
10131 (subdir_do): New.
10132 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10133 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10134 * acinclude.m4: Include acx_configure_dir.m4.
10135 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10136 calls. Call AC_PROG_RANLIB. Configure gnulib using
10137 ACX_CONFIGURE_DIR.
10138 (GNULIB): New.
10139 (GNULIB_STDINT_H): Adjust.
10140 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10141 * gdbreplay.c: Include build-gnulib/config.h.
10142 * server.h: Likewise.
10143 * aclocal.m4: Regenerate.
10144 * config.in: Regenerate.
10145 * configure: Regenerate.
c971b7fa 10146
809277f8
PA
101472012-04-19 Pedro Alves <palves@redhat.com>
10148
10149 * Makefile.in (LIBGNU, INCGNU): Adjust.
10150 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10151 (all, install-only, uninstall, clean-info, all-lib, clean)
10152 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10153 * configure.ac: Adjust AC_OUTPUT output.
10154 * aclocal.m4: Regenerate.
10155 * configure: Regenerate.
10156
fd9bb8b8
PA
101572012-04-19 Pedro Alves <palves@redhat.com>
10158
10159 * Makefile.in (generated_files): New.
10160 (server_h): Remove the explicit dependency on config.h, and depend
10161 on $generated_files.
10162
1c298c66
PA
101632012-04-19 Pedro Alves <palves@redhat.com>
10164
10165 * Makefile.in (INCGNU): Add -Ignulib.
10166
57c4b50b
PA
101672012-04-19 Pedro Alves <palves@redhat.com>
10168
10169 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10170 (INCGNU): ... this, and spell out -I here.
10171 (GNULIB_LIB): Rename to ...
10172 (LIBGNU): ... this.
10173 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10174
1030e047
PA
101752012-04-19 Pedro Alves <palves@redhat.com>
10176
10177 * config.in: Regenerate.
10178
447d4319
PA
101792012-04-19 Pedro Alves <palves@redhat.com>
10180
10181 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10182 * server.h (memmem): Remove declaration.
10183 * config.in: Regenerate.
10184 * configure: Regenerate.
10185
aad9eab9
YQ
101862012-04-19 Yao Qi <yao@codesourcery.com>
10187
10188 * Makefile.in (SFILES): Add common/vec.c.
10189 (OBS): Add vec.o.
10190 (vec.o): New rule.
10191
3e10640f
YQ
101922012-04-19 Yao Qi <yao@codesourcery.com>
10193
10194 * remote-utils.c (prepare_resume_reply): Replace with macro
10195 target_core_of_thread.
10196 * server.c (handle_qxfer_threads_proper): Likewise.
10197 * target.h (traget_core_of_thread): New macro.
10198
71622373
PA
101992012-04-18 Pedro Alves <palves@redhat.com>
10200
10201 * aclocal.m4: Regenerate.
10202 * configure: Regenerate.
10203
80d26939
YQ
102042012-04-16 Yao Qi <yao@codesourcery.com>
10205
10206 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10207 duplicated on address.
10208
42476b70
YQ
102092012-04-16 Yao Qi <yao@codesourcery.com>
10210
10211 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10212 (struct tracepoint_action_ops) <send>: New field.
10213 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10214 (agent_expr_send, x_tracepoint_action_send): New.
10215 (l_tracepoint_action_send): New.
10216 (cmd_qtdp): Download and install tracepoint
10217 according to `use_agent'.
10218 (run_inferior_command): Add one more parameter `len'.
10219 Update callers.
10220 (tracepoint_send_agent): New.
10221 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10222
7bc83639
YQ
102232012-04-16 Yao Qi <yao@codesourcery.com>
10224
10225 * tracepoint.c (download_tracepoints): Moved to ...
10226 (cmd_qtstart): ... here.
10227
5f18041e
YQ
102282012-04-14 Yao Qi <yao@codesourcery.com>
10229
10230 * tracepoint.c: Include inttypes.h.
10231 (struct collect_memory_action): Use sized types.
10232 (struct tracepoint): Likewise.
10233 (cmd_qtdp, stop_tracing): Update print specifiers.
10234 (cmd_qtp, response_tracepoint): Likewise.
10235 (collect_data_at_tracepoint): Likewise.
10236 (collect_data_at_step): Likewise.
10237
55a8c076
YQ
102382012-04-14 Yao Qi <yao@codesourcery.com>
10239
10240 Import gnulib module inttypes.
10241 * aclocal.m4, config.in, configure: Regenerated.
10242
dc750257
YQ
102432012-04-14 Yao Qi <yao@codesourcery.com>
10244
10245 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10246 Makefile and config.status at last.
10247
0ab5faf9
YQ
102482012-04-13 Yao Qi <yao@codesourcery.com>
10249
10250 * tracepoint.c: Include stdint.h unconditionally.
10251
18f5fd81
TJB
102522012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10253
10254 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10255 on BFD_HAVE_SYS_PROCFS_TYPE.
10256 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10257 * configure: Regenerate.
10258 * config.in: Likewise.
10259
4d47af5c
L
102602012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10261
10262 * Makefile.in (clean): Also remove x32.c x32-linux.c
10263 x32-avx.c x32-avx-linux.c.
10264 (x32.o): New target.
10265 (x32.c): Likewise.
10266 (x32-linux.o): Likewise.
10267 (x32-linux.c): Likewise.
10268 (x32-avx.o): Likewise.
10269 (x32-avx.c): Likewise.
10270 (x32-avx-linux.o): Likewise.
10271 (x32-avx-linux.c): Likewise.
10272
10273 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10274 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10275 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10276 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10277 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10278 i386/x32-avx-linux.xml.
10279
10280 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10281 (init_registers_x32_avx_linux): Likwise.
10282 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10283 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10284
ecedbe58
PA
102852012-04-13 Pedro Alves <palves@redhat.com>
10286
10287 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10288 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10289 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10290 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10291 the sub-make.
10292
c92b5177
L
102932012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10294
10295 * linux-x86-low.c (compat_x32_clock_t): New.
10296 (compat_x32_siginfo_t): Likewise.
10297 (compat_x32_siginfo_from_siginfo): Likewise.
10298 (siginfo_from_compat_x32_siginfo): Likewise.
10299 (linux_is_elf64): Likewise.
10300 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10301 and siginfo_from_compat_x32_siginfo for x32.
10302 (x86_arch_setup): Set linux_is_elf64.
10303
214d508e
L
103042012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10305
10306 PR gdb/13969
10307 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10308 e_machine field.
10309 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10310 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10311 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10312 compatible with process.
10313
c9a1864a
YQ
103142012-04-12 Yao Qi <yao@codesourcery.com>
10315
10316 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10317 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10318 (install-only, install-info, clean): Handle sub dir gnulib.
10319 (all-lib, am--refresh): New targets.
10320 (memmem.o): Remove target.
10321 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10322 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10323 (AC_REPLACE_FUNCS): Remove memmem.
10324 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10325 (AC_OUTPUT): Generate Makefile in gnulib/.
10326 * aclocal.m4, config.in, configure: Regenerated.
10327
367ba2c2
MR
103282012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10329
10330 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10331
9d236627
PA
103322012-04-05 Pedro Alves <palves@redhat.com>
10333
10334 -Werror=strict-aliasing
10335
10336 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10337 pointer.
10338
111217b3
PA
103392012-04-04 Pedro Alves <palves@redhat.com>
10340
10341 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10342 (sparc_store_gregset_from_stack, sparc_store_gregset)
10343 (sparc_breakpoint_at): Fix formatting.
10344
8365dcf5
TJB
103452012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10346
10347 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10348 are available.
10349 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10350 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10351 * config.in: Regenerate.
10352 * configure: Likewise.
10353
689cc2ae
PA
103542012-03-29 Pedro Alves <palves@redhat.com>
10355
10356 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10357 Correct ptrace arguments.
10358
c14dfd32
PA
103592012-03-28 Pedro Alves <palves@redhat.com>
10360
10361 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10362 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10363 (IA64_FR1_REGNUM): New defines.
10364 (ia64_fetch_register): New.
10365 (the_low_target): Install it.
10366 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10367 field.
10368 * linux-low.c (linux_fetch_registers): Try the
10369 the_low_target.fetch_register hook first.
10370
10371 * linux-arm-low.c (the_low_target): Adjust.
10372 * linux-bfin-low.c (the_low_target): Adjust.
10373 * linux-cris-low.c (the_low_target): Adjust.
10374 * linux-crisv32-low.c (the_low_target): Adjust.
10375 * linux-m32r-low.c (the_low_target): Adjust.
10376 * linux-m68k-low.c (the_low_target): Adjust.
10377 * linux-mips-low.c (the_low_target): Adjust.
10378 * linux-ppc-low.c (the_low_target): Adjust.
10379 * linux-s390-low.c (the_low_target): Adjust.
10380 * linux-sh-low.c (the_low_target): Adjust.
10381 * linux-sparc-low.c (the_low_target): Adjust.
10382 * linux-tic6x-low.c (the_low_target): Adjust.
10383 * linux-x86-low.c (the_low_target): Adjust.
10384 * linux-xtensa-low.c (the_low_target): Adjust.
10385
63c88e13
PA
103862012-03-26 Pedro Alves <palves@redhat.com>
10387
10388 * server.c (handle_qxfer_libraries): Don't bail early if
10389 the_target->qxfer_libraries_svr4 is not NULL.
10390
fb723180
PA
103912012-03-26 Pedro Alves <palves@redhat.com>
10392
10393 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10394
0afae3cf
PA
103952012-03-23 Pedro Alves <palves@redhat.com>
10396
10397 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10398 "library-list-svr4" element's start tag when the the DSO list is
10399 empty.
10400
485f1ee4
PA
104012012-03-23 Pedro Alves <palves@redhat.com>
10402
10403 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10404 a variable whose type size is the same as the inferior's pointer
10405 size.
10406
a5362b9a
TS
104072012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10408
10409 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10410 struct siginfo.
10411 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10412 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10413 * linux-low.h: Include <signal.h>.
10414 (struct siginfo): Remove forward declaration.
10415 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10416 struct siginfo.
10417
d226c142
MF
104182012-03-21 Mike Frysinger <vapier@gentoo.org>
10419
10420 * .gitignore: Ignore more files.
10421
122f36ef
PA
104222012-03-19 Pedro Alves <palves@redhat.com>
10423 Jan Kratochvil <jan.kratochvil@redhat.com>
10424
10425 * server.c (cont_thread, general_thread): Add describing comments.
10426 (start_inferior): Clear `cont_thread'.
10427 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10428 of a process.
10429
fc3e5175
YQ
104302012-03-15 Yao Qi <yao@codesourcery.com>
10431
10432 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10433 handling to ...
10434 (cmd_qtdp): ... here.
10435
8d0d92cd
YQ
104362012-03-15 Yao Qi <yao@codesourcery.com>
10437
10438 * tracepoint.c (struct tracepoint_action_ops): New.
10439 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10440 (m_tracepoint_action_download): New.
10441 (r_tracepoint_action_download): New.
10442 (x_tracepoint_action_download): New.
10443 (l_tracepoint_action_download): New.
10444 (add_tracepoint_action): Install `action->ops' according type.
10445 (download_tracepoint_1): Move code `download' function pointer
10446 of various tracepoint_action_ops.
10447
87b0bb13
JK
104482012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10449
10450 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10451 linux_ptrace_attach_warnings.
10452
5f572dec
JK
104532012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10454
10455 * Makefile.in (linux-ptrace.o): New.
10456 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10457 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10458 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10459 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10460 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10461 of these targets.
10462 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10463
f4647387
YQ
104642012-03-08 Yao Qi <yao@codesourcery.com>
10465 Pedro Alves <palves@redhat.com>
10466
10467 Fix PR server/13392.
10468 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10469 offset of JMP insn.
10470 * tracepoint.c (remove_tracepoint): New.
10471 (cmd_qtdp): Call remove_tracepoint when failed to install.
10472
9b224c5e
PA
104732012-03-07 Pedro Alves <palves@redhat.com>
10474
10475 * linux-low.c (get_detach_signal): New.
10476 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10477 Pass on pending signals to PTRACE_DETACH. Check the result of the
10478 ptrace call.
10479 * server.c (program_signals, program_signals_p): New.
10480 (handle_general_set): Handle QProgramSignals.
10481 * server.h (program_signals, program_signals_p): Declare.
10482
e237a7e2
JK
104832012-03-05 Pedro Alves <palves@redhat.com>
10484 Jan Kratochvil <jan.kratochvil@redhat.com>
10485
10486 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10487 New comment why.
10488
5808517f
YQ
104892012-03-03 Yao Qi <yao@codesourcery.com>
10490
10491 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10492 agent_look_up_symbols.
10493
58b4daa5
YQ
104942012-03-03 Yao Qi <yao@codesourcery.com>
10495
10496 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10497 (linux-x86-low.o): Likewise.
10498 * server.h: Remove in_process_agent_loaded.
10499 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10500 common/agent.c.
10501 Update callers.
10502
8ffcbaaf
YQ
105032012-03-03 Yao Qi <yao@codesourcery.com>
10504
10505 * tracepoint.c (gdb_agent_capability): New global.
10506 (in_process_agent_loaded_ust): Renamed to
10507 `in_process_agent_supports_ust'.
10508 Update callers.
10509 (in_process_agent_supports_ust): Call agent_capability_check.
10510 (clear_installed_tracepoints): Assert that agent supports
10511 agent.
10512
d1feda86
YQ
105132012-03-03 Yao Qi <yao@codesourcery.com>
10514
10515 * linux-low.c (linux_supports_agent): New.
10516 (linux_target_ops): Initialize field `supports_agent' with
10517 linux_supports_agent.
10518 * target.h (struct target_ops) <supports_agent>: New.
10519 (target_supports_agent): New macro.
10520 * server.c (handle_general_set): Handle packet 'QAgent'.
10521 (handle_query): Send `QAgent+'.
10522 * Makefile.in (server.o): Depends on agent.h.
10523
2fa291ac
YQ
105242012-03-03 Yao Qi <yao@codesourcery.com>
10525
10526 * Makefile.in (OBS): Add agent.o.
10527 Add new rule for agent.o.
10528 Track dependence of tracepoint.c on agent.h.
10529 * tracepoint.c (run_inferior_command_1):
10530 (run_inferior_command): Call agent_run_command.
10531 (gdb_ust_connect_sync_socket): Deleted. Move it to
10532 common/agent.c.
10533 (resume_thread, stop_thread): Likewise.
10534 (gdb_ust_socket_init): Renamed to ...
10535 (gdb_agent_socket_init): ... New.
10536 (gdb_ust_thread): Renamed to ...
10537 (gdb_agent_helper_thread): ... New.
10538 (gdb_ust_init): Move some code to ...
10539 (gdb_agent_init): ... here. New.
10540 [HAVE_UST]: Call gdb_ust_init.
10541 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10542 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10543 * config.in, configure: Regenerated.
10544
05044653
PA
105452012-03-02 Pedro Alves <palves@redhat.com>
10546
10547 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10548 * linux-low.c (struct simple_pid_list): New.
10549 (stopped_pids): New a struct simple_pid_list pointer.
10550 (add_to_pid_list, pull_pid_from_list): New.
10551 (handle_extended_wait): Don't assume the first signal new children
10552 report is SIGSTOP. Adjust call to pull_pid_from_list.
10553 (linux_wait_for_lwp): Adjust.
10554
8d00225b
YQ
105552012-03-02 Yao Qi <yao@codesourcery.com>
10556
10557 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10558 debug log.
10559
19560ba5
YQ
105602012-03-02 Yao Qi <yao@codesourcery.com>
10561
10562 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10563 `stop_pc' and `tpoint'. Update caller.
10564
1faeff08
MR
105652012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10566
10567 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10568 * linux-low.c (use_linux_regsets): New macro.
10569 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10570 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10571 (linux_register_in_regsets): New function.
10572 (usr_fetch_inferior_registers): Skip registers covered by
10573 regsets.
10574 (usr_store_inferior_registers): Likewise.
10575 (usr_fetch_inferior_registers): New macro.
10576 (usr_store_inferior_registers): Likewise.
10577 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10578 (linux_store_registers): Likewise.
10579 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10580 prototype.
10581 (init_registers_mips64_dsp_linux): Likewise.
10582 (init_registers_mips_linux): New macro.
10583 (init_registers_mips_dsp_linux): Likewise.
10584 (mips_dsp_num_regs): Likewise.
10585 (DSP_BASE, DSP_CONTROL): New fallback macros.
10586 (mips_base_regs): New macro.
10587 (mips_regmap): Use it. Fix the size.
10588 (mips_dsp_regmap): New variable.
10589 (mips_dsp_regset_bitmap): Likewise.
10590 (mips_arch_setup): New function.
10591 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10592 than mips_regmap.
10593 (mips_cannot_store_register): Likewise.
10594 (the_low_target): Update .arch_setup, .num_regs and .regmap
10595 initializers. Add .regset_bitmap initializer.
10596 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10597 initializer.
10598 * linux-bfin-low.c (the_low_target): Likewise.
10599 * linux-cris-low.c (the_low_target): Likewise.
10600 * linux-crisv32-low.c (the_low_target): Likewise.
10601 * linux-ia64-low.c (the_low_target): Likewise.
10602 * linux-m32r-low.c (the_low_target): Likewise.
10603 * linux-m68k-low.c (the_low_target): Likewise.
10604 * linux-ppc-low.c (the_low_target): Likewise.
10605 * linux-s390-low.c (the_low_target): Likewise.
10606 * linux-sh-low.c (the_low_target): Likewise.
10607 * linux-sparc-low.c (the_low_target): Likewise.
10608 * linux-tic6x-low.c (the_low_target): Likewise.
10609 * linux-x86-low.c (the_low_target): Likewise.
10610 * linux-xtensa-low.c (the_low_target): Likewise.
10611 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10612 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10613 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10614 srv_xmlfiles.
10615 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10616 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10617
c03e6ccc
YQ
106182012-02-29 Yao Qi <yao@codesourcery.com>
10619 Pedro Alves <palves@redhat.com>
10620
10621 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10622 `step_over_finished' is true.
10623
644cebc9
PA
106242012-02-27 Pedro Alves <palves@redhat.com>
10625
10626 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10627 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10628
c14d7ab2
PA
106292012-02-27 Pedro Alves <palves@redhat.com>
10630
10631 PR server/9684
10632 * linux-low.c (pid_is_stopped): New.
10633 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10634
412c89dd
LM
106352012-02-25 Luis Machado <lgustavo@codesourcery.com>
10636
10637 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10638 of conditions.
10639
b745defe
MR
106402012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10641
10642 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10643
9f3a5c85
LM
106442012-02-24 Luis Machado <lgustavo@codesourcery>
10645
10646 * server.c (handle_query): Advertise support for target-side
10647 breakpoint condition evaluation.
10648 (process_point_options): New function.
10649 (process_serial_event): When inserting a breakpoint, check for
10650 a target-side condition that should be evaluated.
10651
10652 * mem-break.c: Include regcache.h and ax.h.
10653 (point_cond_list_t): New data structure.
10654 (breakpoint) <cond_list>: New field.
10655 (find_gdb_breakpoint_at): Make non-static.
10656 (delete_gdb_breakpoint_at): Clear any target-side
10657 conditions.
10658 (clear_gdb_breakpoint_conditions): New function.
10659 (add_condition_to_breakpoint): Likewise.
10660 (add_breakpoint_condition): Likewise.
10661 (gdb_condition_true_at_breakpoint): Likewise.
10662 (gdb_breakpoint_here): Return result directly instead
10663 of going through a local variable.
10664
10665 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10666 (clear_gdb_breakpoint_conditions): Likewise.
10667 (add_breakpoint_condition): Likewise.
10668 (gdb_condition_true_at_breakpoint): Likewise.
10669
10670 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10671 (need_step_over_p): Take target-side breakpoint condition into
10672 consideration.
10673
5e1dc496
LM
106742012-02-24 Luis Machado <lgustavo@codesourcery>
10675
10676 * server.h: Include tracepoint.h.
10677 (agent_mem_read, agent_get_trace_state_variable_value,
10678 agent_set_trace_state_variable_value,
10679 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10680 get_set_tsv_func_addr): New prototypes.
10681
10682 * ax.h: New include file.
10683 * ax.c: New source file.
10684
10685 * tracepoint.c: Include ax.h.
10686 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10687 agent_expr, eval_result_type): Move to ax.h.
10688 (parse_agent_expr): Rename to ...
10689 (gdb_parse_agent_expr): ... this, make it non-static and move
10690 to ax.h.
10691 (unparse_agent_expr) Rename to ...
10692 (gdb_unparse_agent_expr): ... this, make it non-static and move
10693 to ax.h.
10694 (eval_agent_expr): Rename to ...
10695 (eval_tracepoint_agent_expr): ... this.
10696 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10697 forward declarations.
10698 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10699 (agent_get_trace_state_variable_value): New function.
10700 (agent_set_trace_state_variable_value): New function.
10701 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10702 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10703 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10704 (condition_true_at_tracepoint): Likewise.
10705 (parse_agent_expr): Rename to ...
10706 (gdb_parse_agent_expr): ... this and move to ax.c.
10707 (unparse_agent_expr): Rename to ...
10708 (gdb_unparse_agent_expr): ... this and move to ax.c.
10709 (gdb_agent_op_name): Move to ax.c.
10710 (eval_agent_expr): Rename to ...
10711 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10712 and move to ax.c.
10713 (eval_tracepoint_agent_expr): New function.
10714 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10715 non-static.
5e1dc496
LM
10716 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10717 ax.c.
10718 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10719 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10720 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10721 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10722 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10723 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10724 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10725 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10726 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10727 (compile_bytecodes): Remove forward declaration.
10728 (is_goto_target): Move to ax.c.
10729 (compile_bytecodes): Move to ax.c and call
10730 agent_get_trace_state_variable_value (...) and
10731 agent_set_trace_state_variable_value (...).
10732
10733 * Makefile.in: Update ax.c and IPA dependencies.
10734
277e4e52
PA
107352012-02-24 Pedro Alves <palves@redhat.com>
10736
10737 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10738 (cmd_bigqtbuffer_circular): ... this. Only handle
10739 'QTBuffer:circular:'.
10740 (handle_tracepoint_general_set): Adjust.
10741
bf4c19f7
YQ
107422012-02-16 Yao Qi <yao@codesourcery.com>
10743
10744 * inferiors.c: Move code to ...
10745 * dll.c: .... here. New.
10746 * server.h: Declare clear_dlls.
10747 * Makefile.in (SFILES): Add dll.c.
10748 (OBS): Add dll.o
10749 (dll.o): New rule.
10750
d73f2619
YQ
107512012-02-11 Yao Qi <yao@codesourcery.com>
10752
10753 * server.c: (handle_monitor_command): Add a new parameter
10754 `own_buf'.
10755 (handle_query): Update caller.
10756
f8255c2a
JB
107572012-02-09 Joel Brobecker <brobecker@adacore.com>
10758
10759 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10760 * configure, config.in: Regenerate.
10761 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10762 is not defined.
10763
da84f473
PA
107642012-02-02 Pedro Alves <palves@redhat.com>
10765
10766 Try SIGKILL first, then PTRACE_KILL.
10767 * linux-low.c (linux_kill_one_lwp): New.
10768 (linux_kill_one_lwp): Rename to ...
10769 (kill_one_lwp_callback): ... this. Use the new
10770 linux_kill_one_lwp.
10771
e886a173
PA
107722012-02-02 Pedro Alves <palves@redhat.com>
10773
10774 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10775 inferior.
10776
be07f1a2
PA
107772012-01-27 Pedro Alves <palves@redhat.com>
10778
10779 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10780 (elf_64_file_p): Make static.
10781 (linux_pid_exe_is_elf_64_file): New.
10782 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10783 Delete declarations.
10784 (linux_pid_exe_is_elf_64_file): Declare.
10785 * linux-x86-low.c (x86_arch_setup): Use
10786 linux_pid_exe_is_elf_64_file.
10787
d8301ad1
JK
107882012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10789
10790 * linux-low.c (linux_wait_for_event_1): Rename to ...
10791 (linux_wait_for_event): ... here and merge it with former
10792 linux_wait_for_event - new variable wait_ptid, use it.
10793 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10794
01b17894
PA
107952012-01-23 Pedro Alves <palves@redhat.com>
10796
10797 * server.c (main): Avoid yet another case of infinite loop while
10798 detaching/killing after a longjmp.
10799
e825046f
JK
108002012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10801
10802 Code cleanup.
10803 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10804
b9e7b9c3
UW
108052012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10806
10807 * hostio.c (handle_readlink): New function.
10808 (handle_vFile): Call it to handle "vFile:readlink" packets.
10809
901f9912
UW
108102012-01-20 Pedro Alves <palves@redhat.com>
10811 Ulrich Weigand <ulrich.weigand@linaro.org>
10812
10813 * server.c (handle_v_requests): Only support vAttach and vRun to
10814 start multiple processes when in extended protocol mode.
10815
fc1ab1a0
PA
108162012-01-17 Pedro Alves <palves@redhat.com>
10817
10818 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10819 memalign plus mprotect to allocate the scratch buffer.
10820
7d5d4e98
PA
108212012-01-13 Pedro Alves <palves@redhat.com>
10822
10823 * server.c (attach_inferior): Clear `cont_thread'.
10824
f128d5e9
PA
108252012-01-13 Pedro Alves <palves@redhat.com>
10826
10827 * server.c (main): Avoid infinite loop while detaching/killing
10828 after a longjmp.
10829
06db92f0
DE
108302012-01-09 Doug Evans <dje@google.com>
10831
10832 * server.c (start_inferior): Set last_ptid in --wrapper case.
10833
32d92999
YQ
108342012-01-06 Yao Qi <yao@codesourcery.com>
10835
10836 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10837 defined.
10838 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10839
5e0a92a9
YQ
108402012-01-04 Yao Qi <yao@codesourcery.com>
10841
10842 * tracepoint.c (cmd_qtdp): Print debug message
10843 for static tracepoint.
10844
ae639e8c
YQ
108452012-01-04 Yao Qi <yao@codesourcery.com>
10846
10847 * tracepoint.c (trace_vdebug): Differentiate debug message
10848 between gdbserver and IPA.
10849
f72429c5
YQ
108502012-01-03 Yao Qi <yao@codesourcery.com>
10851
10852 * tracepoint.c (tracepoint_was_hit): Don't collect for
10853 static tracepoint.
10854
12c3e59c
JB
108552012-01-02 Joel Brobecker <brobecker@adacore.com>
10856
10857 * terminal.h: Reformat copyright header.
10858
67827812
JB
108592012-01-02 Joel Brobecker <brobecker@adacore.com>
10860
10861 * server.c (gdbserver_version): Update copyright year.
10862 * gdbreplay.c (gdbreplay_version): Likewise.
10863
3e52c33d
JK
108642011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10865
10866 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10867
10868 Revert:
10869 2011-12-18 Hui Zhu <teawater@gmail.com>
10870 * linux-low.c (linux_create_inferior): Save return value to ret.
10871
66f1260e
HZ
108722011-12-18 Hui Zhu <teawater@gmail.com>
10873
10874 * linux-low.c (linux_create_inferior): Save return value to ret.
10875
e77616d7
DE
108762011-12-16 Doug Evans <dje@google.com>
10877
e7b06c57
DE
10878 * linux-low.c (linux_create_inferior): If stdio connection,
10879 redirect stdin from /dev/null, stdout to stderr.
10880 * remote-utils.c (remote_is_stdio): New static global.
10881 (remote_connection_is_stdio): New function.
10882 (remote_prepare): Handle stdio connection.
10883 (remote_open): Ditto.
10884 (remote_close): Don't close stdin for stdio connections.
10885 (read_prim,write_prim): New functions. Replace all calls to
10886 read/write to these.
10887 * server.c (main): Watch for "-" argument. Move call to
10888 remote_prepare before start_inferior.
10889 * server.h (STDIO_CONNECTION_NAME): New macro.
10890 (remote_connection_is_stdio): Declare.
10891
e77616d7
DE
10892 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10893 in debugging output.
10894
82067193
YQ
108952011-12-15 Yao Qi <yao@codesourcery.com>
10896
10897 * tracepoint.c: Include sys/syscall.h.
10898 (gdb_ust_thread): Remove preprocessor conditional.
10899
82bfbe7e
PA
109002011-12-14 Pedro Alves <pedro@codesourcery.com>
10901
10902 * linux-low.c (linux_detach_one_lwp): Call
10903 the_low_target.prepare_to_resume before detaching.
10904
712c6575
YQ
109052011-12-14 Yao Qi <yao@codesourcery.com>
10906
10907 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10908 of write.
10909
d54d1edf
YQ
109102011-12-14 Yao Qi <yao@codesourcery.com>
10911
10912 * i386-low.c (i386_low_stopped_data_address): Initialize local
10913 variable `control'.
10914
6210a125
PA
109152011-12-13 Pedro Alves <pedro@codesourcery.com>
10916
10917 PR remote/13492
10918
10919 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10920 DR_CONTROL unless necessary. Extend comments.
10921 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10922 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10923
2ece8244
YQ
109242011-12-13 Yao Qi <yao@codesourcery.com>
10925
10926 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10927 macros.
10928 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10929
784867a5
JK
109302011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10931
10932 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10933 Print new debug message for such case.
10934
6bf36717
JK
109352011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10936
10937 Fix overlapping memcpy.
10938 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10939 the read_inferior_memory transfer.
10940 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10941 write_inferior_memory transfer.
10942 (set_fast_tracepoint_jump): New variable buf. Use it for the
10943 read_inferior_memory and write_inferior_memory transfers.
10944 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10945 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10946 Use it for the write_inferior_memory transfer.
10947 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10948 buffers.
10949
50275556
MR
109502011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10951
10952 * linux-low.c (fetch_register, store_register): Make code
10953 consistent, fix formatting.
10954
7325beb4
MR
109552011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10956
10957 * linux-low.c (usr_store_inferior_registers): Factor out code
10958 to handle individual registers into...
10959 (store_register): ... this new function.
10960
c642a434
UW
109612011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10962
10963 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10964 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10965 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10966 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10967 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10968 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10969 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10970 (srv_xmlfiles): Add new XML files.
10971
10972 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10973 and <sys/uio.h>.
10974 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10975 (init_registers_s390_linux32v1): Add prototype.
10976 (init_registers_s390_linux32v2): Likewise.
10977 (init_registers_s390_linux64v1): Likewise.
10978 (init_registers_s390_linux64v2): Likewise.
10979 (init_registers_s390x_linux64v1): Likewise.
10980 (init_registers_s390x_linux64v2): Likewise.
10981 (s390_num_regs): Increment to 52.
10982 (s390_regmap): Add orig_r2 register.
10983 (s390_num_regs_3264): Increment to 68.
10984 (s390_regmap_3264): Add orig_r2 register.
10985 (s390_collect_ptrace_register): Handle orig_r2 register.
10986 (s390_supply_ptrace_register): Likewise.
10987 (s390_fill_last_break): New function.
10988 (s390_store_last_break): Likewise.
10989 (s390_fill_system_call): New function.
10990 (s390_store_system_call): Likewise.
10991 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10992 register sets.
10993 (s390_check_regset): New function.
10994 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10995 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10996 Update target_regsets for available register sets.
10997
2268b414
JK
109982011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10999 Jan Kratochvil <jan.kratochvil@redhat.com>
11000
11001 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11002 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11003 New.
11004 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11005 * linux-low.h (struct process_info_private): New member r_debug.
11006 * server.c (handle_qxfer_libraries): Call
11007 the_target->qxfer_libraries_svr4.
11008 (handle_qxfer_libraries_svr4): New function.
11009 (qxfer_packets): New entry "libraries-svr4".
11010 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11011 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11012 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11013 PACKET_qXfer_libraries_svr4.
11014
d6db1fab
UW
110152011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11016
11017 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11018 PSW address/mask between 8-byte and 16-byte formats.
11019 (s390_supply_ptrace_register): Likewise.
11020 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11021 basic addressing mode bit.
11022
242f5f1c
SS
110232011-11-24 Stan Shebs <stan@codesourcery.com>
11024
11025 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11026
f196051f
SS
110272011-11-17 Stan Shebs <stan@codesourcery.com>
11028
11029 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11030 (tracing_start_time): New global.
11031 (tracing_stop_time): New global.
11032 (tracing_user_name): New global.
11033 (tracing_notes): New global.
11034 (tracing_stop_note): New global.
11035 (cmd_qtstart): Set traceframe_usage, start_time.
11036 (stop_tracing): Set stop_time.
11037 (cmd_qtstatus): Report additional status.
11038 (cmd_qtp): New function.
11039 (handle_tracepoint_query): Call it.
11040 (cmd_qtnotes): New function.
11041 (handle_tracepoint_general_set): Call it.
11042 (get_timestamp): Rename from tsv_get_timestamp.
11043
405f8e94
SS
110442011-11-14 Stan Shebs <stan@codesourcery.com>
11045 Kwok Cheung Yeung <kcy@codesourcery.com>
11046
11047 * linux-x86-low.c (small_jump_insn): New.
11048 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11049 trampoline and error message, build a trampoline and issue a small
11050 jump instruction to it.
11051 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11052 trampoline and error message.
11053 (x86_get_min_fast_tracepoint_insn_len): New.
11054 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11055 * linux-low.h (struct linux_target_ops): Add arguments to
11056 install_fast_tracepoint_jump_pad operation, add new operation.
11057 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11058 arguments.
11059 (linux_get_min_fast_tracepoint_insn_len): New function.
11060 (linux_target_op): Add new operation.
11061 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11062 (gdb_trampoline_buffer_end): Ditto.
11063 (gdb_trampoline_buffer_error): Ditto.
11064 (struct ipa_sym_addresses): Add fields for new IPA variables.
11065 (symbol_list): Add entries for new IPA variables.
11066 (struct tracepoint): Add fields to hold the address range of the
11067 trampoline used by the tracepoint.
11068 (trampoline_buffer_head): New static variable.
11069 (trampoline_buffer_tail): Ditto.
11070 (claim_trampoline_space): New function.
11071 (have_fast_tracepoint_trampoline_buffer): New function.
11072 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11073 structure.
11074 (install_fast_tracepoint): Ditto, also add error buffer argument.
11075 (cmd_qtminftpilen): New function.
11076 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11077 (fast_tracepoint_from_trampoline_address): New function.
11078 (fast_tracepoint_collecting): Handle trampoline as part of jump
11079 pad space.
11080 (set_trampoline_buffer_space): New function.
11081 (initialize_tracepoint): Initialize new IPA variables.
11082 * target.h (struct target_ops): Add arguments to
11083 install_fast_tracepoint_jump_pad operation, add new
11084 get_min_fast_tracepoint_insn_len operation.
11085 (target_get_min_fast_tracepoint_insn_len): New.
11086 (install_fast_tracepoint_jump_pad): Add arguments.
11087 * server.h (IPA_BUFSIZ): Define.
11088 * linux-i386-ipa.c: Include extra header files.
11089 (initialize_fast_tracepoint_trampoline_buffer): New function.
11090 (initialize_low_tracepoint): Call it.
11091 * server.h (set_trampoline_buffer_space): Declare.
11092 (claim_trampoline_space): Ditto.
11093 (have_fast_tracepoint_trampoline_buffer): Ditto.
11094
1e4d1764
YQ
110952011-11-14 Yao Qi <yao@codesourcery.com>
11096
11097 * server.c (handle_query): Handle InstallInTrace for qSupported.
11098 * tracepoint.c (add_tracepoint): Sort list.
11099 (install_tracepoint, download_tracepoint): New.
11100 (cmd_qtdp): Call them to install and download tracepoints.
11101 (sort_tracepoints): Removed.
11102 (cmd_qtstart): Update.
11103
5c73ff4e
YQ
111042011-11-14 Yao Qi <yao@codesourcery.com>
11105
11106 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11107 * mem-break.h: Declare.
11108 * tracepoint.c (cmd_qtstart): Move some code to ...
11109 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11110 New.
11111 (download_tracepoints): Move some code to ...
11112 (download_tracepoint_1): ... here. New.
11113
86a30030
YQ
111142011-11-08 Yao Qi <yao@codesourcery.com>
11115
11116 * remote-utils.c (relocate_instruction): A comment fix.
11117
8d26e50c
JB
111182011-11-07 Joel Brobecker <brobecker@adacore.com>
11119
11120 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11121 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11122 dr_status_mirror and dr_control_mirror from debug_reg_state.
11123 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11124 (i386_initial_stuff): Remove use of deleted globals.
11125 (i386_get_thread_context, i386_set_thread_context,
11126 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11127 from debug_reg_state.
11128
a59306a3
YQ
111292011-11-05 Yao Qi <yao@codesourcery.com>
11130
11131 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11132 address as TPOINT's.
11133
3065dfb6
SS
111342011-11-02 Stan Shebs <stan@codesourcery.com>
11135
11136 * tracepoint.c (agent_mem_read_string): New function.
11137 (eval_agent_expr): Call it for tracenz.
11138 * server.c (handle_query): Report support for tracenz.
11139
fd0d8c7c
YQ
111402011-11-02 Yao Qi <yao@codesourcery.com>
11141
11142 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11143
609086b1
YQ
111442011-11-02 Yao Qi <yao@codesourcery.com>
11145
11146 * target.h: Fix a typo in comment.
11147
b9fd1791
PA
111482011-10-31 Pedro Alves <pedro@codesourcery.com>
11149
11150 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11151 clobber the breakpoints' shadows with fast tracepoint jumps.
11152 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11153 * target.c (write_inferior_memory): Also pass MYADDR down to
11154 check_mem_write.
11155
03583c20
UW
111562011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11157
11158 * configure.ac: Check support for personality routine.
11159 * configure: Regenerate.
11160 * config.in: Likewise.
11161 * linux-low.c: Include <sys/personality.h>.
11162 Define ADDR_NO_RANDOMIZE if necessary.
11163 (linux_create_inferior): Disable address space randomization when
11164 forking inferior, if requested.
11165 (linux_supports_disable_randomization): New function.
11166 (linux_target_ops): Install it.
11167 * server.h (disable_randomization): Declare.
11168 * server.c (disable_randomization): New global variable.
11169 (handle_general_set): Handle QDisableRandomization.
11170 (handle_query): Likewise for qSupported.
11171 (main): Support --disable-randomization and --no-disable-randomization
11172 command line arguments.
11173 * target.h (struct target_ops): Add supports_disable_randomization.
11174 (target_supports_disable_randomization): New macro.
11175
723b724b
MF
111762011-09-29 Mike Frysinger <vapier@gentoo.org>
11177
11178 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11179 ifdef check.
11180 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11181 [!PT_GETDSBT] (target_loadmap): New definition.
11182 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11183 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11184 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11185 and PT_GETDSBT to LINUX_LOADMAP.
11186 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11187 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11188
55329a5c 111892011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11190
11191 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11192 (arm_linux_hwbp_cap): New static variable.
11193 (arm_linux_get_hwbp_cap): Replace by ...
11194 (arm_linux_init_hwbp_cap): ... this new function.
11195 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11196 (arm_linux_get_hw_watchpoint_count): Likewise.
11197 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11198 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11199 (arm_prepare_to_resume): Use perror_with_name instead of error.
11200
55329a5c 112012011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11202
11203 * linux-arm-low.c: Include <signal.h>.
11204 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11205 (struct arm_linux_hwbp_cap): New data type.
11206 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11207 (struct arm_linux_hw_breakpoint): New data type.
11208 (MAX_BPTS, MAX_WPTS): Define.
11209 (struct arch_process_info, struct arch_lwp_info): New data types.
11210 (arm_linux_get_hwbp_cap): New function.
11211 (arm_linux_get_hw_breakpoint_count): Likewise.
11212 (arm_linux_get_hw_watchpoint_count): Likewise.
11213 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11214 (arm_hwbp_control_initialize): Likewise.
11215 (arm_hwbp_control_is_enabled): Likewise.
11216 (arm_hwbp_control_is_initialized): Likewise.
11217 (arm_hwbp_control_disable): Likewise.
11218 (arm_linux_hw_breakpoint_equal): Likewise.
11219 (arm_linux_hw_point_initialize): Likewise.
11220 (struct update_registers_data): New data structure.
11221 (update_registers_callback: New function.
11222 (arm_insert_point): Likewise.
11223 (arm_remove_point): Likewise.
11224 (arm_stopped_by_watchpoint): Likewise.
11225 (arm_stopped_data_address): Likewise.
11226 (arm_new_process): Likewise.
11227 (arm_new_thread): Likewise.
11228 (arm_prepare_to_resume): Likewise.
11229 (the_low_target): Register arm_insert_point, arm_remove_point,
11230 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11231 arm_new_thread, and arm_prepare_to_resume.
11232
6b9801d4
SS
112332011-09-15 Stan Shebs <stan@codesourcery.com>
11234
11235 * server.h (struct emit_ops): Add compare-goto fields.
11236 * tracepoint.c (gdb_agent_op_sizes): New table.
11237 (emit_eq_goto): New function.
11238 (emit_ne_goto): New function.
11239 (emit_lt_goto): New function.
11240 (emit_le_goto): New function.
11241 (emit_gt_goto): New function.
11242 (emit_ge_goto): New function.
11243 (is_goto_target): New function.
11244 (compile_bytecodes): Recognize special cases of compare-goto
11245 combinations and call specialized emitters for them.
11246 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11247 (amd64_emit_ne_goto): New function.
11248 (amd64_emit_lt_goto): New function.
11249 (amd64_emit_le_goto): New function.
11250 (amd64_emit_gt_goto): New function.
11251 (amd64_emit_ge_goto): New function.
11252 (amd64_emit_ops): Add the new functions.
11253 (i386_emit_eq_goto): New function.
11254 (i386_emit_ne_goto): New function.
11255 (i386_emit_lt_goto): New function.
11256 (i386_emit_le_goto): New function.
11257 (i386_emit_gt_goto): New function.
11258 (i386_emit_ge_goto): New function.
11259 (i386_emit_ops): Add the new functions.
11260
bf15cbda
SS
112612011-09-08 Stan Shebs <stan@codesourcery.com>
11262
11263 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11264 (i386_emit_epilogue): Restore %ebx.
11265
943ca1dd
JZ
112662011-08-31 Jie Zhang <jzhang918@gmail.com>
11267
11268 * server.c (step_thread): Remove definition.
11269 (process_serial_event): Don't handle Hs.
11270 * server.h (step_thread): Remove declaration.
11271 * target.c (set_desired_inferior): Remove use of step_thread.
11272
e3deef73
LM
112732011-08-24 Luis Machado <lgustavo@codesourcery.com>
11274
11275 * linux-low.c: Include linux-procfs.h.
11276 (linux_attach_lwp_1): Update comments.
11277 (linux_attach): Scan for existing threads when attaching to a
11278 process that is the tgid.
11279 * Makefile.in: Update dependencies.
11280
13da1c97
LM
112812011-08-24 Luis Machado <lgustavo@codesourcery.com>
11282
11283 * configure.srv: Add linux-procfs.o dependencies.
11284
881127c9
YQ
112852011-08-14 Yao Qi <yao@codesourcery.com>
11286
11287 * target.h (struct target_ops): Fix indent.
11288 * win32-low.c (win32_target_ops): Fix comment.
11289
58dbd541
YQ
112902011-08-14 Andrew Jenner <andrew@codesourcery.com>
11291 Yao Qi <yao@codesourcery.com>
11292
11293 * Makefile.in (clean): Remove tic6x-*.c files.
11294 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11295 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11296 (tic6x-c64xp-linux.c): Likewise.
11297 * configure.srv: Add support for tic6x-*-uclinux.
11298 * linux-tic6x-low.c: New.
11299 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11300
78d85199
YQ
113012011-08-14 Andrew Stubbs <ams@codesourcery.com>
11302 Yao Qi <yao@codesourcery.com>
11303
11304 * target.h (struct target_ops): Add read_loadmap.
11305 * linux-low.c (struct target_loadseg): New type.
11306 (struct target_loadmap): New type.
11307 (linux_read_loadmap): New function.
11308 (linux_target_ops): Add linux_read_loadmap.
11309 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11310 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11311 to NULL.
78d85199 11312
a959a88d
EZ
113132011-08-05 Eli Zaretskii <eliz@gnu.org>
11314
11315 * win32-low.c: Include <stdint.h>.
11316
1ced966e
PA
113172011-07-22 Pedro Alves <pedro@codesourcery.com>
11318
11319 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11320 to the inferior here.
11321 (i386_remove_aligned_watchpoint): Ditto.
11322 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11323 fit part of the watchpoint in the debug registers.
11324 (i386_update_inferior_debug_regs): New.
11325 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11326 registers, and only update the inferior on success.
11327 (i386_low_remove_watchpoint): Ditto.
11328
d26e3629
KY
113292011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11330
11331 * linux-low.c (compare_ints, unique, list_threads, show_process,
11332 linux_core_of_thread): Delete.
11333 (linux_target_ops): Change linux_core_of_thread to
11334 linux_common_core_of_thread.
11335 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11336 * utils.c (malloc_failure): Change type of argument.
11337 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11338 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11339 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11340 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11341 (IPA_OBJS): Add common-utils-ipa.o.
11342 (ptid_h, linux_osdata_h): New macros.
11343 (server_h): Add common/common-utils.h, common/xml-utils.h,
11344 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11345 common/ptid.h.
11346 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11347 ptid.o, buffer.o): New rules.
11348 (linux-low.o): Add common/linux-osdata.h as a dependency.
11349 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11350 * configure.ac: Add AC_HEADER_DIRENT check.
11351 * config.in: Regenerate.
11352 * configure: Regenerate.
11353 * remote-utils.c (xml_escape_text): Delete.
11354 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11355 buffer_xml_printf): Move to common/buffer.c.
11356 * server.c (main): Remove call to initialize_inferiors.
11357 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11358 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11359 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11360 internal_error, gdb_assert, gdb_assert_fail): Delete.
11361 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11362 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11363 common/buffer.h.
11364 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11365 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11366 initialize_inferiors): Delete.
11367
2275a1a7
PA
113682011-07-20 Pedro Alves <pedro@codesourcery.com>
11369
11370 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11371 symbol error.
11372
0a5b1e09
PA
113732011-05-31 Pedro Alves <pedro@codesourcery.com>
11374
11375 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11376 assertion.
11377 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11378
6938fd34
YQ
113792011-05-26 Yao Qi <yao@codesourcery.com>
11380
11381 * Makefile.in (thread-db.o): Track dependence to
11382 common/gdb_thread_db.h.
11383 * thread-db.c: include gdb_thread_db.h from right place.
11384
b481f9e0
TT
113852011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11386
11387 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11388 __FILE__ and __LINE__ to internal_error.
11389
98a5dd13
DE
113902011-05-13 Doug Evans <dje@google.com>
11391
11392 * thread-db.c (try_thread_db_load_from_sdir): New function.
11393 (try_thread_db_load_from_dir): New function.
11394 (thread_db_load_search): Handle $sdir, ignore $pdir.
11395 Remove trying of system directories if search of
11396 libthread-db-search-path fails, that is now done via $sdir.
11397
d248b706
KY
113982011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11399
11400 * server.c (handle_query): Add EnableDisableTracepoints to the list
11401 of supported features.
43aaf8b6 11402 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11403 tracepoints.
43aaf8b6
PA
11404 (cmd_qtenable_disable): New.
11405 (cmd_qtstart): Install tracepoints even if disabled.
11406 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11407 receiving a QTEnable or QTDisable packet.
11408 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11409 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11410 tracepoints.
11411 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11412
84e578fb
DE
114132011-05-10 Doug Evans <dje@google.com>
11414
11415 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11416
71f55dd8
DE
114172011-05-04 Doug Evans <dje@google.com>
11418
11419 * linux-low.c (linux_join): Skip process lookup.
11420 * spu-low.c (spu_join): Ditto.
11421 * server.c (join_inferiors_callback): Delete.
11422 (process_serial_event): For 'D' packet (detach) call join_inferior
11423 directly.
11424
4d393d60
JM
114252011-05-04 Joseph Myers <joseph@codesourcery.com>
11426
11427 * README: Don't mention xscale*-*-linux*.
11428 * configure.srv (xscale*-*-linux*): Don't handle target.
11429
b00ad6ff
NF
114302011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11431
11432 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11433 casting pointers.
11434 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11435 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11436 (i386_emit_void_call_2): Likewise.
11437
af96c192
YQ
114382011-04-26 Yao Qi <yao@codesourcery.com>
11439
43aaf8b6
PA
11440 * linux-low.c: Move common macros to linux-ptrace.h.
11441 Include linux-ptrace.h.
af96c192
YQ
11442 * Makefile.in (linux_ptrace_h): New.
11443 (linux-low.o): Depends on linux-ptrace.h.
11444
03f2bd59
JK
114452011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11446
11447 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11448 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11449 (remote_prepare): New function with most of the TCP code from ...
11450 (remote_open): ... here. Detect PORT here unconditionally. Move also
11451 setting transport_is_reliable.
11452 * server.c (run_once): New variable.
11453 (gdbserver_usage): Document it.
11454 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11455 the first run if RUN_ONCE.
11456 * server.h (run_once, remote_prepare): New declarations.
11457
7a9dd1b2
TT
114582011-04-19 Tom Tromey <tromey@redhat.com>
11459
11460 * win32-low.c (handle_load_dll): Remove duplicate "the".
11461
81239425
PM
114622011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11463
11464 Remove support for old Cygwin 1.5 versions.
11465 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11466 function to avoid warning.
11467 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11468 warning.
11469
9e0627f1
PM
114702011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11471
11472 * gdbserver/server.h (Macro _): Define it if not available.
11473
588eebee
MS
114742011-03-14 Michael Snyder <msnyder@vmware.com>
11475
348af9f7 11476 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11477
43f70d4c
JB
114782011-03-10 Joel Brobecker <brobecker@adacore.com>
11479
11480 * Makefile.in (maintainer-clean realclean distclean): Remove
11481 "make ... subdir_do" command.
11482
348af9f7
MS
114832011-03-10 Michael Snyder <msnyder@vmware.com>
11484
11485 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11486
11487 * server.c (handle_v_run): Free alloced buffer on early return.
11488
e637a4f5
YQ
114892011-03-09 Yao Qi <yao@codesourcery.com>
11490
11491 Revert:
11492 2011-03-04 Yao Qi <yao@codesourcery.com>
11493
11494 * Makefile.in: Remove GNU make feature --directory.
11495
11496 2011-03-05 Yao Qi <yao@codesourcery.com>
11497
11498 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11499 (subdir_do): New make target. Copied from gdb/Makefile.
11500 (maintainer-clean, realclean, distclean, clean): Call corresponding
11501 make targets in common/Makefile.
11502
11503 2011-02-11 Yao Qi <yao@codesourcery.com>
11504
11505 * configure.ac: Call AC_PROG_RANLIB.
11506 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11507 * configure: Regenerate.
11508
e6edda56
JK
115092011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11510
11511 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11512
e5141119
JB
115132011-03-06 Yao Qi <yao@codesourcery.com>
11514
11515 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11516
64794aa4
JB
115172011-03-05 Yao Qi <yao@codesourcery.com>
11518
11519 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11520 (subdir_do): New make target. Copied from gdb/Makefile.
11521 (maintainer-clean, realclean, distclean, clean): Call corresponding
11522 make targets in common/Makefile.
11523
7a762829
YQ
115242011-03-04 Yao Qi <yao@codesourcery.com>
11525
11526 * Makefile.in: Remove GNU make feature --directory.
11527
348af9f7
MS
115282011-03-04 Michael Snyder <msnyder@vmware.com>
11529
11530 * server.c (queue_stop_reply): Call xmalloc not malloc.
11531
115322011-03-02 Michael Snyder <msnyder@vmware.com>
11533
11534 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11535
9f72fee2
MS
115362011-02-28 Michael Snyder <msnyder@vmware.com>
11537
588eebee
MS
11538 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11539 (cmd_qtframe): Ditto.
11540 (cmd_qtbuffer): Ditto.
11541 (cmd_bigqtbuffer): Ditto.
11542
9f72fee2
MS
11543 * utils.c (decimal2str): Initialize 'width' to nine, then
11544 don't mess with it.
11545
8040bd49
UW
115462011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11547
11548 * hostio.c (require_data): Free *data, not data.
11549
7e52cbd0
JK
115502011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11551
11552 * hostio.c (require_data): Use free, not xfree.
11553
9130f83e
MS
115542011-02-27 Michael Snyder <msnyder@vmware.com>
11555
4b812f4e
MS
11556 * server.c (handle_query): Discard unused value.
11557
9130f83e
MS
11558 * hostio.c (require_data): Free malloc memory before returning
11559 error.
11560
69d37113
MS
115612011-02-26 Michael Snyder <msnyder@vmware.com>
11562
11563 * linux-low.c (list_threads): Call closedir for dirent.
11564
35f5825a
MS
115652011-02-27 Michael Snyder <msnyder@vmware.com>
11566
2a589cef
MS
11567 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11568 a case statement falls through.
11569
0adea5f7
MS
11570 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11571
35f5825a
MS
11572 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11573 in comparison.
11574
238f1c74
MS
115752011-02-26 Michael Snyder <msnyder@vmware.com>
11576
11577 * utils.c (decimal2str): Eliminate dead code and dead param.
11578 (pulongest): Drop dead param from call to decimal2str.
11579 (plongest): Ditto.
11580
633ff500
JB
115812011-02-24 Joel Brobecker <brobecker@adacore.com>
11582
11583 Revert the following patch (not approved yet):
11584 2011-02-21 Hui Zhu <teawater@gmail.com>
11585 * tracepoint.c (tp_printf): New function.
11586 (eval_agent_expr): Handle gdb_agent_op_printf.
11587
f9c6ff72
HZ
115882011-02-21 Hui Zhu <teawater@gmail.com>
11589
11590 * tracepoint.c (tp_printf): New function.
11591 (eval_agent_expr): Handle gdb_agent_op_printf.
11592
94d5e490
TT
115932011-02-18 Tom Tromey <tromey@redhat.com>
11594
11595 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11596 (tracepoint.o): Likewise.
11597 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11598 (gdb_agent_op_names): Likewise.
11599
c7f96d2b
TT
116002011-02-18 Tom Tromey <tromey@redhat.com>
11601
11602 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11603 gdb_agent_op_rot>: New constants.
11604 (gdb_agent_op_names): Add pick and roll.
11605 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11606 cases.
11607
0feedb2c
JK
116082011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11609
11610 * aclocal.m4: Regenerated with aclocal-1.11.1.
11611
b3b9301e
PA
116122011-02-14 Pedro Alves <pedro@codesourcery.com>
11613
11614 * server.c (handle_qxfer_traceframe_info): New.
11615 (qxfer_packets): Register "traceframe-info".
11616 (handle_query): Report support for qXfer:traceframe-info:read+.
11617 * tracepoint.c (match_blocktype): New.
11618 (traceframe_find_block_type): Rename to ...
11619 (traceframe_walk_blocks): ... this. Add callback filter argument,
11620 and use it.
11621 (traceframe_find_block_type): New, reimplemented on top of
11622 traceframe_walk_blocks.
11623 (build_traceframe_info_xml): New.
11624 (traceframe_read_info): New.
11625 * server.h (traceframe_read_info): Declare.
11626
4f3e6fb7
YQ
116272011-02-11 Yao Qi <yao@codesourcery.com>
11628
11629 * configure.ac: Call AC_PROG_RANLIB.
11630 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11631 * configure: Regenerate.
11632
764880b7
PA
116332011-02-07 Pedro Alves <pedro@codesourcery.com>
11634
11635 * server.c (gdb_read_memory): Change return semantics to allow
11636 partial transfers.
11637 (handle_search_memory_1): Adjust.
11638 (process_serial_event) <'m' packet>: Handle partial transfers.
11639 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11640
1c79eb8a
PA
116412011-01-28 Pedro Alves <pedro@codesourcery.com>
11642
11643 * regcache.c (init_register_cache): Initialize
11644 regcache->register_status.
11645 (free_register_cache): Release regcache->register_status.
11646 (regcache_cpy): Copy register_status.
11647 (registers_to_string): Print 'x's for unavailable registers.
11648 (supply_register): Mark the register's status valid or
11649 unavailable, depending on whether a buffer was passed in or not.
11650 (supply_register_zeroed): New.
11651 (supply_regblock): Mark the registers' status valid or
11652 unavailable, depending on whether a buffer was passed in or not.
11653 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11654 (struct regcache): New `register_status' field.
11655 (supply_register_zeroed): Declare.
11656 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11657 supply_register_zeroed, rather than passing a NULL buffer to
11658 supply_register.
11659 * tracepoint.c (fetch_traceframe_registers): Update comment.
11660
85724a0e
PA
116612011-01-28 Pedro Alves <pedro@codesourcery.com>
11662
11663 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11664 buffer explicit.
11665
d08aafef
PA
116662011-01-25 Pedro Alves <pedro@codesourcery.com>
11667
11668 * server.h (decode_xfer_write): Change prototype.
11669 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11670 and don't extract the annex here.
11671 * server.c (decode_xfer_read): Remove `annex' parameter,
11672 and don't extract the annex here.
11673 (decode_xfer): New.
11674 (struct qxfer): New.
11675 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11676 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11677 (handle_qxfer_statictrace): New functions, abstracted out from
11678 handle_query, and made to use the struct qxfer interface.
11679 (handle_threads_qxfer_proper): Rename to ...
11680 (handle_qxfer_threads_proper): ... this.
11681 (handle_threads_qxfer): Rename to ...
11682 (handle_qxfer_threads): ... this. Adjust.
11683 (qxfer_packets): New array.
11684 (handle_qxfer): New function.
11685 (handle_query): Use handle_qxfer.
11686
493e2a69
MS
116872011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11688
11689 * gdbreplay.c: Shorten lines of >= 80 columns.
11690 * linux-low.c: Ditto.
11691 * linux-ppc-low.c: Ditto.
11692 * linux-s390-low.c: Ditto.
11693 * linux-sparc-low.c: Ditto.
11694 * linux-x86-low.c: Ditto.
11695 * linux-xtensa-low.c: Ditto.
11696 * mem-break.c: Ditto.
11697 * nto-low.c: Ditto.
11698 * regcache.h: Ditto.
11699 * remote-utils.c: Ditto.
11700 * server.c: Ditto.
11701 * server.h: Ditto.
11702 * thread-db.c: Ditto.
11703 * tracepoint.c: Ditto.
11704 * utils.c: Ditto.
11705 * win32-low.h: Ditto.
11706
44944448
JB
117072011-01-05 Joel Brobecker <brobecker@adacore.com>
11708
11709 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11710 update.
11711
71ce852c
JB
117122011-01-01 Joel Brobecker <brobecker@adacore.com>
11713
11714 * server.c (gdbserver_version): Update copyright year in version
11715 output.
11716 * gdbreplay.c (gdbreplay_version): Ditto.
11717
eb826dc6
MF
117182010-12-29 Jie Zhang <jie.zhang@analog.com>
11719
11720 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11721 * linux-bfin-low.c: New file.
11722 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11723 PT_DATA_ADDR for BFIN targets.
11724 * Makefile.in (SFILES): Add linux-bfin-low.c.
11725 (clean): Remove reg-bfin.c.
11726 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11727 * README: Mention supported Blackfin targets.
11728
39ab222a
MF
117292010-12-23 Mike Frysinger <vapier@gentoo.org>
11730
11731 * .gitignore: New file.
11732
a1f2ce7d
MF
117332010-11-16 Mike Frysinger <vapier@gentoo.org>
11734
11735 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11736
f474844c
JZ
117372010-10-22 Jie Zhang <jie@codesourcery.com>
11738
11739 * Makefile.in: Add FLAGS_TO_PASS variable.
11740 (install): Remove dependency of install-only and recursively
11741 invoke make for install-only.
11742
f1048712
DE
117432010-10-04 Doug Evans <dje@google.com>
11744
11745 * Makefile.in (uninstall): Use $(DESTDIR).
11746
b53a1623
PA
117472010-09-24 Pedro Alves <pedro@codesourcery.com>
11748
e6ee044d
PA
11749 PR gdb/11842
11750
b53a1623
PA
11751 * linux-x86-low.c (compat_siginfo_from_siginfo)
11752 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11753 si_code is < 0. Check for si_code == SI_TIMER before checking for
11754 si_code < 0.
11755
fa1bd1e4
JB
117562010-09-13 Joel Brobecker <brobecker@adacore.com>
11757
11758 * lynx-i386-low.c: New file.
11759 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11760
47fac8f8
JB
117612010-09-13 Joel Brobecker <brobecker@adacore.com>
11762
11763 * lynx-low.c (ptrace_request_to_str): Remove handling for
11764 request values that have been removed in LynxOS 5.x.
11765
1adfc54d
JB
117662010-09-13 Joel Brobecker <brobecker@adacore.com>
11767
11768 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11769 <ptrace.h>
11770
c2a66c29
NS
117712010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11772
11773 * configure.ac: Add --enable-inprocess-agent option.
11774 * configure: Rebuilt.
11775
32fcada3
YQ
117762010-09-06 Yao Qi <yao@codesourcery.com>
11777
11778 * linux-low.c (linux_kill): Remove unused variable.
11779 (linux_stabilize_threads): Likewise.
11780 * server.c (start_inferior): Likewise.
11781 (queue_stop_reply_callback): Likewise.
11782 * tracepoint.c (do_action_at_tracepoint): Likewise.
11783
0cccb683
YQ
117842010-09-06 Yao Qi <yao@codesourcery.com>
11785
11786 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11787 on return.
11788
423ec54c
JK
117892010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11790
11791 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11792
12ac6819
PA
117932010-09-06 Pedro Alves <pedro@codesourcery.com>
11794
11795 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11796 "$(IPA_DEPFILES)".
11797
8ed54b31
JB
117982010-09-01 Joel Brobecker <brobecker@adacore.com>
11799
11800 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11801 gdbserver/lynx-ppc-low.c: New files.
11802 * Makefile.in (lynx_low_h): New variable.
11803 (lynx-low.o, lynx-ppc-low.o): New rules.
11804 * configure.ac: On LynxOS, link with -lnetinet.
11805 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11806 * configure: regenerate.
11807
bb0116a4
JB
118082010-09-01 Joel Brobecker <brobecker@adacore.com>
11809
11810 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11811 * configure.ac: Add check for vasprintf and vsnprintf.
11812 * configure, config.in: Regenerate.
11813 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11814
a778ab81 118152010-09-01 Joel Brobecker <brobecker@adacore.com>
11816
11817 * gdbreplay.c: Move include of alloca.h up, next to include of
11818 malloc.h.
11819 * server.h: Add include of malloc.h.
11820 * mem-break.c: Remove include of malloc.h.
11821 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11822
8b034a19 118232010-09-01 Joel Brobecker <brobecker@adacore.com>
11824
11825 * Makefile.in (memmem.o): Build with -Wno-error.
11826
118272010-09-01 Joel Brobecker <brobecker@adacore.com>
11828
11829 * utils.c (xsnprintf): Make non-static.
11830 * server.h: Add xsnprintf declaration.
11831 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11832 replace calls to snprintf by calls to xsnprintf throughout.
11833
118342010-09-01 Joel Brobecker <brobecker@adacore.com>
11835
11836 * configure.ac: Add configure check for alloca.
11837 * configure, config.in: Regenerate.
11838 * server.h: Include alloca.h if it exists.
11839 * gdbreplay.c: Include alloca.h if it exists.
11840
1a981360
PA
118412010-08-28 Pedro Alves <pedro@codesourcery.com>
11842
11843 * linux-low.c (__SIGRTMIN): Define if not already defined.
11844 (linux_create_inferior): Check for __ANDROID__ rather than
11845 __SIGRTMIN.
11846 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11847 are already deferred.
11848 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11849 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11850 stopped and already has a pending signal to report.
11851 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11852 a pending signal to report or is moving out of a jump pad.
11853 (linux_init_signals): Check for __ANDROID__ rather than
11854 __SIGRTMIN.
11855
b4d51a55
PA
118562010-08-28 Pedro Alves <pedro@codesourcery.com>
11857
11858 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11859 debug_threads check. Avoid a linear search when not doing debug
11860 output.
11861
ec48365d
PA
118622010-08-27 Pedro Alves <pedro@codesourcery.com>
11863
11864 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11865 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11866 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11867 (process_event): Change local fd's type to gdb_fildes_t.
11868 (create_file_handler): Adjust prototype.
11869 (delete_file_handler): Adjust prototype.
11870 (handle_file_event): Adjust prototype. Use pfildes.
11871 (create_file_event): Adjsut prototype.
11872 * remote-utils.c (remote_desc, listen_desc): Change type to
11873 gdb_fildes_t.
11874 * server.h: New gdb_fildes_t typedef.
11875 [USE_WIN32API]: Include winsock2.h.
11876 (delete_file_handler, add_file_handler): Adjust prototypes.
11877 (pfildes): Declare.
11878 * utils.c (pfildes): New.
11879
854d88f0
PA
118802010-08-27 Pedro Alves <pedro@codesourcery.com>
11881
11882 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11883 * configure: Regenerate.
11884
0146f85b
PA
118852010-08-27 Pedro Alves <pedro@codesourcery.com>
11886
11887 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11888 (linux_done_accessing_memory): ... this.
11889 (linux_target_ops): Adjust.
11890 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11891 * nto-low.c (nto_target_ops): Adjust comment.
11892 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11893 * spu-low.c (spu_target_ops): Adjust comment.
11894 * target.h (target_ops): Rename unprepare_to_access_memory field
11895 to done_accessing_memory.
11896 (unprepare_to_access_memory): Rename to ...
11897 (done_accessing_memory): ... this.
11898
90d74c30
PA
118992010-08-26 Pedro Alves <pedro@codesourcery.com>
11900
11901 * linux-low.c (linux_prepare_to_access_memory): New.
11902 (linux_unprepare_to_access_memory): New.
11903 (linux_target_ops): Install them.
11904 * server.c (read_memory): Rename to ...
11905 (gdb_read_memory): ... this. Use
11906 prepare_to_access_memory/prepare_to_access_memory.
11907 (write_memory): Rename to ...
11908 (gdb_write_memory): ... this. Use
11909 prepare_to_access_memory/prepare_to_access_memory.
11910 (handle_search_memory_1): Adjust.
11911 (process_serial_event): Adjust.
11912 * target.h (struct target_ops): New fields
11913 prepare_to_access_memory and unprepare_to_access_memory.
11914 (prepare_to_access_memory, unprepare_to_access_memory): New.
11915 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11916 prepare_to_access_memory/prepare_to_access_memory.
11917 * nto-low.c (nto_target_ops): Adjust.
11918 * spu-low.c (spu_target_ops): Adjust.
11919 * win32-low.c (win32_target_ops): Adjust.
11920
fd467969
PA
119212010-08-26 Pedro Alves <pedro@codesourcery.com>
11922
11923 * Makefile.in (WARN_CFLAGS): Get it from configure.
11924 (WERROR_CFLAGS): New.
11925 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11926 * configure.ac: Introduce --enable-werror, which adds -Werror to
11927 the compiler command line. Enabled by default. Disable with
11928 --disable-werror. Add -Wdeclaration-after-statement
11929 Wpointer-arith and -Wformat-nonliteral to warning flags.
11930 * configure: Regenerate.
11931
331e2f5f
PA
119322010-08-26 Pedro Alves <pedro@codesourcery.com>
11933
11934 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11935
e581f2b4
PA
119362010-08-26 Pedro Alves <pedro@codesourcery.com>
11937
11938 * gdbreplay.c (remote_error): New.
11939 (gdbchar): New.
11940 (expect): Use gdbchar. Check for error reading from GDB.
11941 Clarify sync error output.
11942 (play): Check for errors writing to GDB.
11943 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11944 * remote-utils.c (getpkt): Check for errors writing to the remote
11945 descriptor.
11946
3c11dd79
PA
119472010-08-25 Pedro Alves <pedro@codesourcery.com>
11948
11949 * linux-low.c (linux_wait_1): Move non-debugging code out of
11950 `debug_threads' control.
11951
d20a8ad9
PA
119522010-08-25 Pedro Alves <pedro@codesourcery.com>
11953
11954 * linux-low.c (linux_wait_1): Don't set last_status here.
11955 * server.c (push_event, queue_stop_reply_callback): Assert we're
11956 not pushing a TARGET_WAITKIND_IGNORE event.
11957 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11958 (myresume, handle_target_event): Set the thread's last_resume_kind
11959 and last_status from the target returned status.
11960
964e4306
PA
119612010-08-25 Pedro Alves <pedro@codesourcery.com>
11962
11963 PR threads/10729
11964
11965 * linux-x86-low.c (update_debug_registers_callback): New.
11966 (i386_dr_low_set_addr): Use it.
11967 (i386_dr_low_get_addr): New.
11968 (i386_dr_low_set_control): Use update_debug_registers_callback.
11969 (i386_dr_low_get_control): New.
11970 (i386_dr_low_get_status): Adjust.
11971 * linux-low.c (linux_stop_lwp): New.
11972 * linux-low.h (linux_stop_lwp): Declare.
11973
11974 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11975 argument instead of a i386_debug_reg_state.
11976 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11977 a i386_debug_reg_state.
11978 (i386_insert_aligned_watchpoint): Adjust.
11979 (i386_remove_aligned_watchpoint): Adjust.
11980 (i386_low_stopped_data_address): Read the debug registers from the
11981 inferior instead of from the mirrors.
11982 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11983 (i386_dr_low_get_addr): Declare.
11984 (i386_dr_low_get_control): Declare.
11985 (i386_dr_low_get_status): Change prototype.
11986
11987 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11988 (i386_dr_low_get_addr): New.
11989 (i386_dr_low_get_control): New.
11990 (i386_dr_low_get_status): Adjust prototype. Return
11991 dr_status_mirror.
11992 (i386_initial_stuff): Clear dr_status_mirror and
11993 dr_control_mirror.
11994 (i386_get_thread_context): Adjust.
11995 (i386_set_thread_context): Adjust.
11996 (i386_thread_added): Adjust.
11997
5f21a75b
PA
119982010-08-24 Pedro Alves <pedro@codesourcery.com>
11999
12000 * linux-low.h (linux_thread_area): Delete declaration.
12001
3e4c1235
TS
120022010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12003
12004 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12005 after its termination.
12006
1971b033
PA
120072010-08-09 Pedro Alves <pedro@codesourcery.com>
12008
12009 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12010 (gdb_wants_all_stopped): Delete.
12011 (linux_wait_1): Don't call them.
12012 * server.c (handle_v_cont): Tag all threads as want-stopped.
12013 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12014 stopped as "client-wants-stopped".
12015
310444ac
PA
120162010-07-31 Pedro Alves <pedro@codesourcery.com>
12017
12018 * Makefile.in (signals_h): New.
12019 (server_h): Depend on it.
12020 (server.o): Don't depend on $(signals_def).
12021 (signals.o): Depend on $(signals_def).
12022
a19cae16
JK
120232010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12024
12025 * Makefile.in (signals_def): New.
12026 (server_h): Append include/gdb/signals.h and signals_def.
12027 (server.o): Append signals_def.
12028
30d50328
JK
120292010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12030
12031 * server.c (handle_target_event): Use target_signal_to_host for
12032 resume_info.sig initialization.
12033 * target.h (struct thread_resume) <sig>: New comment.
12034
5c3216e2
OS
120352010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12036
c6f46ca0
OS
12037 * server.c (handle_query): strcpy() the returned string from paddress()
12038 instead of sprintf().
5c3216e2
OS
12039 * utils.c (paddress): Return phex_nz().
12040
6bd31874
JB
120412010-07-07 Joel Brobecker <brobecker@adacore.com>
12042
12043 * server.c (handle_v_cont): Call mourn_inferior if process
12044 just exited.
12045 (myresume): Likewise.
12046
0fb4aa4b
PA
120472010-07-01 Pedro Alves <pedro@codesourcery.com>
12048
12049 Static tracepoints, and integration with UST.
12050
12051 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12052 * mem-break.c (uninsert_all_breakpoints)
12053 (reinsert_all_breakpoints): New.
12054 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12055 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12056 (gdb_agent_ust_loaded, helper_thread_id)
12057 (gdb_agent_helper_thread_id): New macros.
12058 (struct ipa_sym_addresses): Add addr_ust_loaded,
12059 addr_helper_thread_id, addr_cmd_buf.
12060 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12061 (in_process_agent_loaded_ust): New.
12062 (write_e_ust_not_loaded): New.
12063 (maybe_write_ipa_ust_not_loaded): New.
12064 (struct collect_static_trace_data_action): New.
12065 (enum tracepoint_type) <static_tracepoint>: New.
12066 (struct tracepoint) <handle>: Mention static tracepoints.
12067 (struct static_tracepoint_ctx): New.
12068 (CMD_BUF_SIZE): New.
12069 (add_tracepoint_action): Handle static tracepoint actions.
12070 (unprobe_marker_at): New.
12071 (clear_installed_tracepoints): Handle static tracepoints.
12072 (cmd_qtdp): Handle static tracepoints.
12073 (probe_marker_at): New.
12074 (cmd_qtstart): Handle static tracepoints.
12075 (response_tracepoint): Handle static tracepoints.
12076 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12077 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12078 (get_context_regcache): Handle static tracepoints.
12079 (do_action_at_tracepoint): Handle static tracepoint actions.
12080 (traceframe_find_block_type): Handle static trace data blocks.
12081 (traceframe_read_sdata): New.
12082 (download_tracepoints): Download static tracepoint actions.
12083 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12084 (GDB_PROBE_NAME): New.
12085 (ust_ops): New.
12086 (GET_UST_SYM): New.
12087 (USTF): New.
12088 (dlsym_ust): New.
12089 (ust_marker_to_static_tracepoint): New.
12090 (gdb_probe): New.
12091 (collect_ust_data_at_tracepoint): New.
12092 (gdb_ust_probe): New.
12093 (UNIX_PATH_MAX, SOCK_DIR): New.
12094 (gdb_ust_connect_sync_socket): New.
12095 (resume_thread, stop_thread): New.
12096 (run_inferior_command): New.
12097 (init_named_socket): New.
12098 (gdb_ust_socket_init): New.
12099 (cstr_to_hexstr): New.
12100 (next_st): New.
12101 (first_marker, next_marker): New.
12102 (response_ust_marker): New.
12103 (cmd_qtfstm, cmd_qtsstm): New.
12104 (unprobe_marker_at, probe_marker_at): New.
12105 (cmd_qtstmat, gdb_ust_thread): New.
12106 (gdb_ust_init): New.
12107 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12108 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12109 (ST_REGENTRY): New.
12110 (x86_64_st_collect_regmap): New.
12111 (X86_64_NUM_ST_COLLECT_GREGS): New.
12112 (AMD64_RIP_REGNUM): New.
12113 (supply_static_tracepoint_registers): New.
12114 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12115 (ST_REGENTRY): New.
12116 (i386_st_collect_regmap): New.
12117 (i386_NUM_ST_COLLECT_GREGS): New.
12118 (supply_static_tracepoint_registers): New.
12119 * server.c (handle_query): Handle qXfer:statictrace:read.
12120 <qSupported>: Report support for StaticTracepoints, and
12121 qXfer:statictrace:read features.
12122 * server.h (traceframe_read_sdata)
12123 (supply_static_tracepoint_registers): Declare.
12124 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12125 (unpack_varlen_hex): Include in IPA build.
12126 * Makefile.in (ustlibs, ustinc): New.
12127 (IPA_OBJS): Add remote-utils-ipa.o.
12128 ($(IPA_LIB)): Link -ldl and -lpthread.
12129 (UST_CFLAGS): New.
12130 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12131 * config.in, configure: Regenerate.
12132
9e4344e5
PA
121332010-06-20 Ian Lance Taylor <iant@google.com>
12134 Pedro Alves <pedro@codesourcery.com>
12135
12136 * linux-x86-low.c (always_true): Delete.
12137 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12138 trying to fool the compiler with always_true.
12139
c6beb2cb
PA
121402010-06-20 Pedro Alves <pedro@codesourcery.com>
12141
12142 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12143 conditions in gdbserver.
12144
d2ed6730
UW
121452010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12146
12147 * spu-low.c (spu_read_memory): Wrap around local store limit.
12148 (spu_write_memory): Likewise.
12149
4e29fb54
PA
121502010-06-15 Pedro Alves <pedro@codesourcery.com>
12151
12152 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12153 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12154 LONGEST uses.
12155 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12156 uses.
12157 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12158 uses with LONGEST uses.
12159
6a271cae
PA
121602010-06-14 Stan Shebs <stan@codesourcery.com>
12161 Pedro Alves <pedro@codesourcery.com>
12162
12163 Bytecode compiler.
12164
12165 * linux-x86-low.c: Include limits.h.
12166 (add_insns): New.
12167 (always_true): New.
12168 (EMIT_ASM): New.
12169 (EMIT_ASM32): New.
12170 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12171 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12172 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12173 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12174 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12175 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12176 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12177 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12178 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12179 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12180 (amd64_emit_void_call_2): New.
12181 (amd64_emit_ops): New.
12182 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12183 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12184 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12185 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12186 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12187 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12188 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12189 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12190 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12191 (i386_emit_stack_adjust, i386_emit_int_call_1)
12192 (i386_emit_void_call_2): New.
12193 (i386_emit_ops): New.
12194 (x86_emit_ops): New.
12195 (the_low_target): Install x86_emit_ops.
12196 * server.h (struct emit_ops): New.
12197 (get_raw_reg_func_addr): Declare.
12198 (current_insn_ptr, emit_error): Declare.
12199 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12200 (set_trace_state_variable_value): New defines.
12201 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12202 addr_get_trace_state_variable_value and
12203 addr_set_trace_state_variable_value.
12204 (symbol_list): New fields for get_raw_reg,
12205 get_trace_state_variable_value and set_trace_state_variable_value.
12206 (condfn): New typedef.
12207 (struct tracepoint): New field `compiled_cond'.
12208 (do_action_at_tracepoint): Clear compiled_cond.
12209 (get_trace_state_variable_value, set_trace_state_variable_value):
12210 Export in the IPA.
12211 (condition_true_at_tracepoint): If there's a compiled condition,
12212 run that.
12213 (current_insn_ptr, emit_error): New globals.
12214 (struct bytecode_address): New.
12215 (get_raw_reg_func_addr): New.
12216 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12217 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12218 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12219 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12220 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12221 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12222 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12223 (compile_tracepoint_condition, compile_bytecodes): New.
12224 * target.h (emit_ops): Forward declare.
12225 (struct target_ops): New field emit_ops.
12226 (target_emit_ops): New.
12227 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12228 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12229 * linux-low.c (linux_emit_ops): New.
12230 (linux_target_ops): Install it.
12231 * linux-low.h (struct linux_target_ops): New field emit_ops.
12232
92b72907
UW
122332010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12234
12235 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12236 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12237
fa593d66
PA
122382010-06-01 Pedro Alves <pedro@codesourcery.com>
12239 Stan Shebs <stan@codesourcery.com>
12240
12241 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12242 (all): Depend on $(extra_libraries).
12243 (install-only): Install the IPA.
12244 (IPA_OBJS, IPA_LIB): New.
12245 (clean): Remove the IPA lib.
12246 (IPAGENT_CFLAGS): New.
12247 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12248 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12249 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12250 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12251 * configure.ac: Check for atomic builtins support in the compiler.
12252 (IPA_DEPFILES, extra_libraries): Define.
12253 * configure.srv (ipa_obj): Add description.
12254 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12255 (i[34567]86-*-linux*): Set ipa_obj.
12256 (x86_64-*-linux*): Set ipa_obj.
12257 * linux-low.c (stabilizing_threads): New.
12258 (supports_fast_tracepoints): New.
12259 (linux_detach): Stabilize threads before detaching.
12260 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12261 the lwp is either not stabilizing, or is moving out of a jump pad.
12262 (linux_fast_tracepoint_collecting): New.
12263 (maybe_move_out_of_jump_pad): New.
12264 (enqueue_one_deferred_signal): New.
12265 (dequeue_one_deferred_signal): New.
12266 (linux_wait_for_event_1): If moving out of a jump pad, defer
12267 pending signals to later.
12268 (linux_stabilize_threads): New.
12269 (linux_wait_1): Check if threads need moving out of jump pads, and
12270 do it if so.
12271 (stuck_in_jump_pad_callback): New.
12272 (move_out_of_jump_pad_callback): New.
12273 (lwp_running): New.
12274 (linux_resume_one_lwp): Handle moving out of jump pads.
12275 (linux_set_resume_request): Dequeue deferred signals.
12276 (need_step_over_p): Also step over fast tracepoint jumps.
12277 (start_step_over): Also uninsert fast tracepoint jumps.
12278 (finish_step_over): Also reinsert fast tracepoint jumps.
12279 (linux_install_fast_tracepoint_jump): New.
12280 (linux_target_ops): Install linux_stabilize_threads and
12281 linux_install_fast_tracepoint_jump_pad.
12282 * linux-low.h (linux_target_ops) <get_thread_area,
12283 install_fast_tracepoint_jump_pad>: New fields.
12284 (struct lwp_info) <collecting_fast_tracepoint,
12285 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12286 (linux_get_thread_area): Declare.
12287 * linux-x86-low.c (jump_insn): New.
12288 (x86_get_thread_area): New.
12289 (append_insns): New.
12290 (push_opcode): New.
12291 (amd64_install_fast_tracepoint_jump_pad): New.
12292 (i386_install_fast_tracepoint_jump_pad): New.
12293 (x86_install_fast_tracepoint_jump_pad): New.
12294 (the_low_target): Install x86_get_thread_area and
12295 x86_install_fast_tracepoint_jump_pad.
12296 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12297 (struct fast_tracepoint_jump): New.
12298 (fast_tracepoint_jump_insn): New.
12299 (fast_tracepoint_jump_shadow): New.
12300 (find_fast_tracepoint_jump_at): New.
12301 (fast_tracepoint_jump_here): New.
12302 (delete_fast_tracepoint_jump): New.
12303 (set_fast_tracepoint_jump): New.
12304 (uninsert_fast_tracepoint_jumps_at): New.
12305 (reinsert_fast_tracepoint_jumps_at): New.
12306 (set_breakpoint_at): Use write_inferior_memory.
12307 (uninsert_raw_breakpoint): Use write_inferior_memory.
12308 (check_mem_read): Mask out fast tracepoint jumps.
12309 (check_mem_write): Mask out fast tracepoint jumps.
12310 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12311 (set_fast_tracepoint_jump): Declare.
12312 (delete_fast_tracepoint_jump)
12313 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12314 (reinsert_fast_tracepoint_jumps_at): Declare.
12315 * regcache.c: Don't compile many functions when building the
12316 in-process agent library.
12317 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12318 the register buffer in the heap.
12319 (free_register_cache): If the register buffer isn't owned by the
12320 regcache, don't free it.
12321 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12322 pre-existing register caches.
12323 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12324 type.
12325 (convert_ascii_to_int): : Constify `from' parameter type.
12326 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12327 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12328 the needed buffer in-place.
12329 (relocate_instruction): New.
12330 * server.c (handle_query) <qSymbols>: If the target supports
12331 tracepoints, give it a chance of looking up symbols. Report
12332 support for fast tracepoints.
12333 (handle_status): Stabilize threads.
12334 (process_serial_event): Adjust.
12335 * server.h (struct fast_tracepoint_jump): Forward declare.
12336 (struct process_info) <fast_tracepoint_jumps>: New field.
12337 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12338 (decode_X_packet, decode_M_packet): Adjust.
12339 (relocate_instruction): Declare.
12340 (in_process_agent_loaded): Declare.
12341 (tracepoint_look_up_symbols): Declare.
12342 (struct fast_tpoint_collect_status): Declare.
12343 (fast_tracepoint_collecting): Declare.
12344 (force_unlock_trace_buffer): Declare.
12345 (handle_tracepoint_bkpts): Declare.
12346 (initialize_low_tracepoint)
12347 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12348 * target.h (struct target_ops) <stabilize_threads,
12349 install_fast_tracepoint_jump_pad>: New fields.
12350 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12351 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12352 [HAVE_STDINT_H]: Include stdint.h.
12353 (trace_debug_1): Rename to ...
12354 (trace_vdebug): ... this.
12355 (trace_debug): Rename to ...
12356 (trace_debug_1): ... this. Add `level' parameter.
12357 (trace_debug): New.
12358 (ATTR_USED, ATTR_NOINLINE): New.
12359 (IP_AGENT_EXPORT): New.
12360 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12361 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12362 (about_to_request_buffer_space, trace_buffer_is_full)
12363 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12364 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12365 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12366 (traceframe_write_count, traceframes_created)
12367 (trace_state_variables)
12368 New renaming defines.
12369 (struct ipa_sym_addresses): New.
12370 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12371 (symbol_list): New.
12372 (ipa_sym_addrs): New.
12373 (all_tracepoint_symbols_looked_up): New.
12374 (in_process_agent_loaded): New.
12375 (write_e_ipa_not_loaded): New.
12376 (maybe_write_ipa_not_loaded): New.
12377 (tracepoint_look_up_symbols): New.
12378 (debug_threads) [IN_PROCESS_AGENT]: New.
12379 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12380 (UNKNOWN_SIDE_EFFECTS): New.
12381 (stop_tracing): New.
12382 (flush_trace_buffer): New.
12383 (stop_tracing_bkpt): New.
12384 (flush_trace_buffer_bkpt): New.
12385 (read_inferior_integer): New.
12386 (read_inferior_uinteger): New.
12387 (read_inferior_data_pointer): New.
12388 (write_inferior_data_pointer): New.
12389 (write_inferior_integer): New.
12390 (write_inferior_uinteger): New.
12391 (struct collect_static_trace_data_action): Delete.
12392 (enum tracepoint_type): New.
12393 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12394 <actions_str, step_actions, step_actions_str>: Only include in
12395 GDBserver.
fa593d66
PA
12396 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12397 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12398 (tracepoints): Use IP_AGENT_EXPORT.
12399 (last_tracepoint): Don't include in the IPA.
12400 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12401 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12402 (alloced_trace_state_variables): New.
12403 (trace_state_variables): Use IP_AGENT_EXPORT.
12404 (traceframe_t): Delete unused variable.
12405 (circular_trace_buffer): Don't include in the IPA.
12406 (trace_buffer_start): Delete.
12407 (struct trace_buffer_control): New.
12408 (trace_buffer_free): Delete.
12409 (struct ipa_trace_buffer_control): New.
12410 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12411 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12412 New.
12413 (trace_buffer_ctrl): New.
12414 (TRACE_BUFFER_CTRL_CURR): New.
12415 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12416 Reimplement as macros.
12417 (trace_buffer_wrap): Delete.
12418 (traceframe_write_count, traceframe_read_count)
12419 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12420 (struct tracepoint_hit_ctx) <type>: New field.
12421 (struct fast_tracepoint_ctx): New.
12422 (memory_barrier): New.
12423 (cmpxchg): New.
12424 (record_tracepoint_error): Update atomically in the IPA.
12425 (clear_inferior_trace_buffer): New.
12426 (about_to_request_buffer_space): New.
12427 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12428 updating the same buffer.
12429 (add_tracepoint): Default the tracepoint's type to trap
12430 tracepoint, and orig_size to -1.
12431 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12432 internal variables.
12433 (create_trace_state_variable): New parameter `gdb'. Handle it.
12434 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12435 (cmd_qtdp): Handle fast tracepoints.
12436 (cmd_qtdv): Adjust.
12437 (max_jump_pad_size): New.
12438 (gdb_jump_pad_head): New.
12439 (get_jump_space_head): New.
12440 (claim_jump_space): New.
12441 (sort_tracepoints): New.
12442 (MAX_JUMP_SIZE): New.
12443 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12444 IPA.
12445 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12446 support. Upload fast traceframes, and delete internal IPA
12447 breakpoints.
12448 (stop_tracing_handler): New.
12449 (flush_trace_buffer_handler): New.
12450 (cmd_qtstop): Upload fast tracepoints.
12451 (response_tracepoint): Handle fast tracepoints.
12452 (tracepoint_finished_step): Upload fast traceframes. Set the
12453 tracepoint hit context's tracepoint type.
12454 (handle_tracepoint_bkpts): New.
12455 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12456 type. Add comment about fast tracepoints.
12457 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12458 non-existing action_str field.
12459 (get_context_regcache): Handle fast tracepoints.
12460 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12461 to the regcache.
12462 (fast_tracepoint_from_jump_pad_address): New.
12463 (fast_tracepoint_from_ipa_tpoint_address): New.
12464 (collecting_t): New.
12465 (force_unlock_trace_buffer): New.
12466 (fast_tracepoint_collecting): New.
12467 (collecting): New.
12468 (gdb_collect): New.
12469 (write_inferior_data_ptr): New.
12470 (target_tp_heap): New.
12471 (target_malloc): New.
12472 (download_agent_expr): New.
12473 (UALIGN): New.
12474 (download_tracepoints): New.
12475 (download_trace_state_variables): New.
12476 (upload_fast_traceframes): New.
12477 (IPA_FIRST_TRACEFRAME): New.
12478 (IPA_NEXT_TRACEFRAME_1): New.
12479 (IPA_NEXT_TRACEFRAME): New.
12480 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12481 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12482 (gdb_jump_pad_buffer_end): New.
12483 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12484 (initialize_tracepoint): Adjust.
12485 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12486 buffer. Initialize the low module.
12487 * utils.c (PREFIX, TOOLNAME): New.
12488 (malloc_failure): Use PREFIX.
12489 (error): In the IPA, an error causes an exit.
12490 (fatal, warning): Use PREFIX.
12491 (internal_error): Use TOOLNAME.
12492 (NUMCELLS): Increase to 10.
12493 * configure, config.in: Regenerate.
12494
d149dd1d
PA
124952010-06-01 Pedro Alves <pedro@codesourcery.com>
12496
12497 * server.c (handle_query) <qSupported>: Do two passes over the
12498 qSupported string to avoid nesting strtok.
12499
f6528abd
JK
125002010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12501
12502 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12503 (CDEPS): New.
12504 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12505 -Wl,--dynamic-list.
12506 * configure: Regenerate.
12507 * proc-service.list: New.
12508
ca2a87a0
JK
125092010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12510
12511 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12512 New comment.
12513
363a6e9f
OS
125142010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12515
12516 * gdbreplay.c (remote_open): Check error return from socket() call by
12517 its equality to -1 not by it being negative.
12518 * remote-utils.c (remote_open): Likewise.
12519
d23b6cb1
PA
125202010-05-23 Pedro Alves <pedro@codesourcery.com>
12521
12522 * config.h: Regenerate.
12523
28d3cf85
MK
125242010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12525
12526 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12527 doesn't provide PTRACE_GET_THREAD_AREA.
12528
fea36a59
MK
125292010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12530
12531 * linux-m68k-low.c: Include <asm/ptrace.h>
12532 (ps_get_thread_area): Implement.
12533
24b066ba
DE
125342010-05-03 Doug Evans <dje@google.com>
12535
12536 * event-loop.c (struct callback_event): New struct.
12537 (callback_list): New global.
12538 (append_callback_event, delete_callback_event): New functions.
12539 (process_callback): New function.
12540 (start_event_loop): Call it.
12541 * remote-utils.c (NOT_SCHEDULED): Define.
12542 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12543 moved out of readchar.
12544 (readchar): Rewrite. Call reschedule before returning.
12545 (reset_readchar): New function.
12546 (remote_close): Call it.
12547 (process_remaining, reschedule): New functions.
12548 * server.h (callback_handler_func): New typedef.
12549 (append_callback_event, delete_callback_event): Declare.
12550
9836d6ea
PA
125512010-05-03 Pedro Alves <pedro@codesourcery.com>
12552
12553 * proc-service.c (ps_pglobal_lookup): Use
12554 thread_db_look_up_one_symbol.
12555 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12556 parameter. Use it instead of all_symbols_looked_up.
12557 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12558 field.
12559 (all_symbols_looked_up): Don't declare.
12560 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12561 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12562 field.
12563 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12564 Set all_symbols_looked_up here.
12565 (thread_db_look_up_one_symbol): New.
12566 (thread_db_get_tls_address): Adjust.
12567 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12568 thread_db object on the heap, and tentatively set it in the
12569 process structure.
12570 (thread_db_init): Don't set all_symbols_looked_up here.
12571 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12572
7984d532
PA
125732010-05-03 Pedro Alves <pedro@codesourcery.com>
12574
12575 * linux-low.c (linux_kill, linux_detach): Adjust.
12576 (status_pending_p_callback): Remove redundant statement. Check
12577 for !TARGET_WAITIKIND_IGNORE, instead of
12578 TARGET_WAITKIND_STOPPED.
12579 (handle_tracepoints): Make sure LWP is locked. Adjust.
12580 (linux_wait_for_event_1): Adjust.
12581 (linux_cancel_breakpoints): New.
12582 (unsuspend_one_lwp): New.
12583 (unsuspend_all_lwps): New.
12584 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12585 (send_sigstop_callback): Change return type to int, add new
12586 `except' parameter and handle it.
12587 (suspend_and_send_sigstop_callback): New.
12588 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12589 pass them down. If SUSPEND, also increment the lwp's suspend
12590 count.
12591 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12592 (need_step_over_p): Don't consider suspended LWPs.
12593 (start_step_over): Adjust.
12594 (proceed_one_lwp): Change return type to int, add new `except'
12595 parameter and handle it.
12596 (unsuspend_and_proceed_one_lwp): New.
12597 (proceed_all_lwps): Use find_inferior instead of
12598 for_each_inferior.
12599 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12600 also decrement the suspend count of LWPs. Pass `except' down,
12601 instead of hacking its suspend count.
12602 (linux_pause_all): Add `freeze' parameter. Adjust.
12603 (linux_unpause_all): New.
12604 (linux_target_ops): Install linux_unpause_all.
12605 * server.c (handle_status): Adjust.
12606 * target.h (struct target_ops): New fields `unpause_all' and
12607 `cancel_breakpoints'. Add new parameter to `pause_all'.
12608 (pause_all): Add new `freeze' parameter.
12609 (unpause_all): New.
12610 (cancel_breakpoints): New.
12611 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12612 cancel breakpoints.
12613 (cmd_qtstart): Pause threads.
12614 (stop_tracing): Pause threads, and cancel breakpoints.
12615 * win32-low.c (win32_target_ops): Adjust.
12616
e471f25b
PA
126172010-05-03 Pedro Alves <pedro@codesourcery.com>
12618
12619 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12620 the inferior right away from here...
12621 (linux_wait_1): ... to here, and adjust to check the thread's
12622 last_resume_kind instead of the lwp's step or stop_expected flags.
12623
1915ef4f
PA
126242010-05-02 Pedro Alves <pedro@codesourcery.com>
12625
12626 * README: Use consistent `GDB' and `GDBserver' spellings.
12627
f9e39928
PA
126282010-05-02 Pedro Alves <pedro@codesourcery.com>
12629
12630 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12631 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12632 (linux_detach_one_lwp): Assume the lwp is stopped.
12633 (any_thread_of): Delete.
12634 (linux_detach): Stop all lwps here. Don't blindly delete all
12635 breakpoints.
12636 (delete_lwp_callback): New.
12637 (linux_mourn): Delete all lwps of the process that is gone.
12638 (linux_wait_1): Don't delete the last lwp of the process here.
12639 * mem-break.h (mark_breakpoints_out): Declare.
12640 * mem-break.c (mark_breakpoints_out): New.
12641 (free_all_breakpoints): Use it.
12642 * server.c (handle_target_event): If the process is gone, mark
12643 breakpoints out.
12644 * thread-db.c (struct thread_db) <create_bp>: New field.
12645 (thread_db_enable_reporting): Fix prototype. Store a thread event
12646 breakpoint reference in the thread_db struct.
12647 (thread_db_load_search): Clear the thread_db object.
12648 (try_thread_db_load_1): Ditto.
12649 (switch_to_process): New.
12650 (disable_thread_event_reporting): Use it.
12651 (remove_thread_event_breakpoints): New.
12652 (thread_db_detach, thread_db_mourn): Use it.
12653
1e7fc18c
PA
126542010-05-01 Pedro Alves <pedro@codesourcery.com>
12655
12656 * linux-low.c (linux_enable_event_reporting): New.
12657 (linux_wait_for_event_1, handle_extended_wait): Use it.
12658
02fc4de7
PA
126592010-04-30 Pedro Alves <pedro@codesourcery.com>
12660
12661 * linux-low.c (linux_kill_one_lwp, linux_kill)
12662 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12663 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12664 SIGSTOP even if the LWP is stopped.
12665 (send_sigstop_callback): New.
12666 (stop_all_lwps): Use send_sigstop_callback instead.
12667 (linux_resume_one_thread): Adjust.
12668 (proceed_one_lwp): Still proceed an LWP that the client has
12669 requested to stop, if we haven't reported it as stopped yet. Make
12670 sure that LWPs the client want stopped, have a pending SIGSTOP.
12671
bc3b5632
DE
126722010-04-26 Doug Evans <dje@google.com>
12673
ae1ada35
DE
12674 * server.c (handle_general_set): Make static.
12675
bc3b5632
DE
12676 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12677 Print received char after testing for error/eof instead of before.
12678 (input_interrupt): Tweak comment.
12679
65730243
DE
126802010-04-23 Doug Evans <dje@google.com>
12681
12682 * server.c (start_inferior): Print inferior argv if --debug.
12683
a8ae7dc0
AR
126842010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12685
12686 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12687 * nto-x86-low.c: Include server.h
12688
1c07cc19
PM
126892010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12690
12691 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12692 be consistent with other sources of this directory.
12693 (init_registers_amd64): Correct name of source file of this function
12694 in the comment.
12695
e0a61e09
PM
126962010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12697
12698 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12699 64-bit executables.
12700
54709339
PM
127012010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12702
12703 * win32-i386-low.c: Add 64-bit support.
12704 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12705 (init_registers_amd64): Declare.
12706 (mappings): Add 64-bit version of array.
12707 (init_windows_x86): New function.
12708 (the_low_target): Change init_arch field to init_windows_x86.
12709
e8f0053d
PM
127102010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12711
12712 * win32-low.c: Adapt to support also 64-bit architecture.
12713 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12714 (get_image_name): Use SIZE_T type for local variable `done'.
12715 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12716 (toolhelp_get_dll_name): Idem.
12717 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12718 Use uintptr_t typecast to avoid warning.
12719 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12720 (handle_exception): Use phex_nz to avoid warning.
12721 (win32_wait): Remove unused local variable `process'.
12722
c481e77e
PM
127232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12724
12725 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12726 `amd64-avx.o'.
12727
12ea4b69
PM
127282010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12729
12730 * configure.ac: Use `ws2_32' library for srv_mingw.
12731 * configure: Regenerate.
12732 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12733 * remote-utils.c: Likewise.
12734
f6d1620c
L
127352010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12736
12737 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12738 if __x86_64__ is defined.
12739
8e642873
PM
127402010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12741
12742 * configure: Regenerate.
12743
711e434b
PM
127442010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12745
12746 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12747 * target.h (target_ops): New get_tib_address field.
12748 * win32-low.h (win32_thread_info): Add thread_local_base field.
12749 * win32-low.c (child_add_thread): Add tlb argument.
12750 Set thread_local_base field to TLB.
12751 (get_child_debug_event): Adapt to child_add_thread change.
12752 (win32_get_tib_address): New function.
12753 (win32_target_ops): Set get_tib_address field to
12754 win32_get_tib_address.
12755 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12756
505106cd
PA
127572010-04-12 Pedro Alves <pedro@codesourcery.com>
12758
505106cd
PA
12759 * linux-low.c (linux_mourn): Also remove the process.
12760 * server.c (handle_target_event): Don't remove the process here.
12761 * nto-low.c (nto_mourn): New.
12762 (nto_target_ops): Install it.
12763 * spu-low.c (spu_mourn): New.
12764 (spu_target_ops): Install it.
12765 * win32-low.c (win32_mourn): New.
12766 (win32_target_ops): Install it.
12767
e8470a06
PA
127682010-04-12 Pedro Alves <pedro@codesourcery.com>
12769
12770 * server.h (buffer_xml_printf): Remove redundant `;'.
12771
45ba0d02
PA
127722010-04-12 Pedro Alves <pedro@codesourcery.com>
12773
12774 * regcache.c (set_register_cache): Invalidate regcaches before
12775 changing the register cache layout.
12776 (regcache_invalidate_one): Allow a NULL regcache.
12777 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12778 regcaches before changing the register cache layout or the target
12779 regsets.
12780
59e04013
L
127812010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12782
12783 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12784 variable warning on Linux/x86-64.
12785
8336d594
PA
127862010-04-11 Pedro Alves <pedro@codesourcery.com>
12787
12788 GDBserver disconnected tracing support.
12789
12790 * linux-low.c (linux_remove_process): Delete.
12791 (add_lwp): Don't set last_resume_kind here.
12792 (linux_kill): Use `mourn'.
12793 (linux_detach): Use `thread_db_detach', and `mourn'.
12794 (linux_mourn): New.
12795 (linux_attach_lwp_1): Adjust comment.
12796 (linux_attach): last_resume_kind moved the thread_info; adjust.
12797 (status_pending_p_callback): Adjust.
12798 (linux_wait_for_event_1): Adjust.
12799 (count_events_callback, select_singlestep_lwp_callback)
12800 (select_event_lwp_callback, cancel_breakpoints_callback)
12801 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12802 (proceed_one_lwp): Adjust.
12803 (linux_async): Add debug output.
12804 (linux_thread_stopped): New.
12805 (linux_pause_all): New.
12806 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12807 linux_pause_all.
12808 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12809 (thread_db_free): Delete declaration.
12810 (thread_db_detach, thread_db_mourn): Declare.
12811 * thread-db.c (thread_db_init): Use thread_db_mourn.
12812 (thread_db_free): Delete, split in two.
12813 (disable_thread_event_reporting): New.
12814 (thread_db_detach): New.
12815 (thread_db_mourn): New.
12816
12817 * server.h (struct thread_info) <last_resume_kind>: New field.
12818 <attached>: Add comment.
12819 <gdb_detached>: New field.
12820 (handler_func): Change return type to int.
12821 (handle_serial_event, handle_target_event): Ditto.
12822 (gdb_connected): Declare.
12823 (tracing): Delete.
12824 (disconnected_tracing): Declare.
12825 (stop_tracing): Declare.
12826
12827 * server.c (handle_query) <qSupported>: Report support for
12828 disconnected tracing.
12829 (queue_stop_reply_callback): Account for running threads.
12830 (gdb_wants_thread_stopped): New.
12831 (gdb_wants_all_threads_stopped): New.
12832 (gdb_reattached_process): New.
12833 (handle_status): Clear the `gdb_detached' flag of all processes.
12834 In all-stop, stop all threads.
12835 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12836 (process_serial_event): If the remote connection breaks, or if an
12837 exit was forced with "monitor exit", force an event loop exit.
12838 Handle disconnected tracing on detach.
12839 (handle_serial_event): Adjust.
12840 (handle_target_event): If GDB isn't connected, forward events back
12841 to the inferior, unless the last process exited, in which case,
12842 exit gdbserver. Adjust interface.
12843
12844 * remote-utils.c (remote_open): Don't block in accept. Instead
12845 register an event loop source on the listen socket file
12846 descriptor. Refactor bits into ...
12847 (listen_desc): ... this new global.
12848 (gdb_connected): ... this new function.
12849 (enable_async_notification): ... this new function.
12850 (handle_accept_event): ... this new function.
12851 (remote_close): Clear remote_desc.
12852
12853 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12854
12855 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12856 New fields.
12857 (mourn_inferior): Define.
12858 (target_process_qsupported): Avoid the dangling else problem.
12859 (thread_stopped): Define.
12860 (pause_all): Define.
12861 (target_waitstatus_to_string): Declare.
12862 * target.c (target_waitstatus_to_string): New.
12863
12864 * tracepoint.c (tracing): Make extern.
12865 (disconnected_tracing): New.
12866 (stop_tracing): Make extern. Handle tracing stops due to GDB
12867 disconnecting.
12868 (cmd_qtdisconnected): New.
12869 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12870 (handle_tracepoint_general_set): Handle QTDisconnected.
12871
12872 * event-loop.c (event_handler_func): Change return type to int.
12873 (process_event): Bail out if the event handler wants the event
12874 loop to stop.
12875 (handle_file_event): Ditto.
12876 (start_event_loop): Bail out if the event handler wants the event
12877 loop to stop.
12878
12879 * nto-low.c (nto_target_ops): Adjust.
12880 * spu-low.c (spu_wait): Don't remove the process here.
12881 (spu_target_ops): Adjust.
12882 * win32-low.c (win32_wait): Don't remove the process here.
12883 (win32_target_ops): Adjust.
12884
5d267c4c
PA
128852010-04-11 Pedro Alves <pedro@codesourcery.com>
12886
12887 * regcache.c (realloc_register_cache): Invalidate inferior's
12888 regcache before recreating it.
12889
623ccd72
PA
128902010-04-09 Pedro Alves <pedro@codesourcery.com>
12891
12892 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12893
219f2f23
PA
128942010-04-09 Stan Shebs <stan@codesourcery.com>
12895 Pedro Alves <pedro@codesourcery.com>
12896
12897 * server.h (LONGEST): New.
12898 (struct thread_info) <while_stepping>: New field.
12899 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12900 Declare.
12901 (initialize_tracepoint, handle_tracepoint_general_set)
12902 (handle_tracepoint_query, tracepoint_finished_step)
12903 (tracepoint_was_hit, release_while_stepping_state_list):
12904 (current_traceframe): Declare.
12905 * server.c (handle_general_set): Handle tracepoint packets.
12906 (read_memory): New.
12907 (write_memory): New.
12908 (handle_search_memory_1): Use read_memory.
12909 (handle_query): Report support for conditional tracepoints, trace
12910 state variables, and tracepoint sources. Handle tracepoint
12911 queries.
12912 (main): Initialize the tracepoints module.
12913 (process_serial_event): Handle traceframe reads/writes.
12914
12915 * linux-low.c (handle_tracepoints): New.
12916 (linux_wait_1): Call it.
12917 (linux_resume_one_lwp): Handle while-stepping.
12918 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12919 (linux_target_ops): Install them.
12920 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12921 New field.
12922 * linux-x86-low.c (x86_supports_tracepoints): New.
12923 (the_low_target). Install it.
12924
12925 * mem-break.h (delete_breakpoint): Declare.
12926 * mem-break.c (delete_breakpoint): Make external.
12927
12928 * target.h (struct target_ops): Add `supports_tracepoints',
12929 `read_pc', and `write_pc' fields.
12930 (target_supports_tracepoints): Define.
12931 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12932 (phex_nz): New.
12933
12934 * regcache.h (struct regcache) <registers_owned>: New field.
12935 (init_register_cache, regcache_cpy): Declare.
12936 (regcache_read_pc, regcache_write_pc): Declare.
12937 (register_cache_size): Declare.
12938 (supply_regblock): Declare.
12939 * regcache.c (init_register_cache): New.
12940 (new_register_cache): Use it.
12941 (regcache_cpy): New.
12942 (register_cache_size): New.
12943 (supply_regblock): New.
12944 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12945
219f2f23
PA
12946 * tracepoint.c: New.
12947
12948 * Makefile.in (OBS): Add tracepoint.o.
12949 (tracepoint.o): New rule.
12950
3a13a53b
L
129512010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12952
12953 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12954 (i386-mmx.o): New.
12955 (i386-mmx.c): Likewise.
12956 (i386-mmx-linux.o): Likewise.
12957 (i386-mmx-linux.c): Likewise.
12958
12959 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12960 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12961 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12962 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12963
12964 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12965 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12966 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12967
1570b33e
L
129682010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12969
12970 * Makefile.in (clean): Updated.
12971 (i386-avx.o): New.
12972 (i386-avx.c): Likewise.
12973 (i386-avx-linux.o): Likewise.
12974 (i386-avx-linux.c): Likewise.
12975 (amd64-avx.o): Likewise.
12976 (amd64-avx.c): Likewise.
12977 (amd64-avx-linux.o): Likewise.
12978 (amd64-avx-linux.c): Likewise.
12979
12980 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12981 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12982 (srv_amd64_regobj): Add amd64-avx.o.
12983 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12984 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12985 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12986 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12987 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12988 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12989 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12990
12991 * i387-fp.c: Include "i386-xstate.h".
12992 (i387_xsave): New.
12993 (i387_cache_to_xsave): Likewise.
12994 (i387_xsave_to_cache): Likewise.
12995 (x86_xcr0): Likewise.
12996
12997 * i387-fp.h (i387_cache_to_xsave): Likewise.
12998 (i387_xsave_to_cache): Likewise.
12999 (x86_xcr0): Likewise.
13000
13001 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13002 * linux-crisv32-low.c (target_regsets): Likewise.
13003 * linux-m68k-low.c (target_regsets): Likewise.
13004 * linux-mips-low.c (target_regsets): Likewise.
13005 * linux-ppc-low.c (target_regsets): Likewise.
13006 * linux-s390-low.c (target_regsets): Likewise.
13007 * linux-sh-low.c (target_regsets): Likewise.
13008 * linux-sparc-low.c (target_regsets): Likewise.
13009 * linux-xtensa-low.c (target_regsets): Likewise.
13010
13011 * linux-low.c: Include <sys/uio.h>.
13012 (regsets_fetch_inferior_registers): Support nt_type.
13013 (regsets_store_inferior_registers): Likewise.
13014 (linux_process_qsupported): New.
13015 (linux_target_ops): Add linux_process_qsupported.
13016
13017 * linux-low.h (regset_info): Add nt_type.
13018 (linux_target_ops): Add process_qsupported.
13019
13020 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13021 and <sys/uio.h>.
13022 (init_registers_i386_avx_linux): New.
13023 (init_registers_amd64_avx_linux): Likewise.
13024 (xmltarget_i386_linux_no_xml): Likewise.
13025 (xmltarget_amd64_linux_no_xml): Likewise.
13026 (PTRACE_GETREGSET): Likewise.
13027 (PTRACE_SETREGSET): Likewise.
13028 (x86_fill_xstateregset): Likewise.
13029 (x86_store_xstateregset): Likewise.
13030 (use_xml): Likewise.
13031 (x86_linux_update_xmltarget): Likewise.
13032 (x86_linux_process_qsupported): Likewise.
13033 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13034 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13035 init_registers_i386_linux here. Call
13036 x86_linux_update_xmltarget.
13037 (the_low_target): Add x86_linux_process_qsupported.
13038
13039 * server.c (handle_query): Call target_process_qsupported.
13040
13041 * target.h (target_ops): Add process_qsupported.
13042 (target_process_qsupported): New.
13043
fc7238bb
PA
130442010-04-03 Pedro Alves <pedro@codesourcery.com>
13045
13046 * inferiors.c (add_thread): Set last_status kind to
13047 TARGET_WAITKIND_IGNORE.
13048 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13049 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13050 (linux_wait_1): Move `thread' local definition to block that uses
13051 it. Don't NULL initialize `event_child'.
13052 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13053 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13054 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13055
bdabb078
PA
130562010-04-01 Pedro Alves <pedro@codesourcery.com>
13057
13058 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13059 an extended waitstatus, or by a watchpoint.
13060 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13061 thread was stepping or has been stopped by a watchpoint.
13062
d3bbe7a0
PA
130632010-04-01 Pedro Alves <pedro@codesourcery.com>
13064
13065 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13066 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13067 of another, then delete the previous, and validate all
13068 breakpoints.
13069 (validate_inserted_breakpoint): New.
13070 (delete_disabled_breakpoints): New.
13071 (validate_breakpoints): New.
13072 (check_mem_read): Validate breakpoints before trusting their
13073 shadow. Delete disabled breakpoints.
13074 (check_mem_write): Validate breakpoints before trusting they
13075 should be inserted. Delete disabled breakpoints.
13076 * mem-break.h (validate_breakpoints):
13077 * server.c (handle_query): Validate breakpoints when we see a
13078 qSymbol query.
13079
8b07ae33
PA
130802010-04-01 Pedro Alves <pedro@codesourcery.com>
13081
13082 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13083 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13084 if we could tell there's a GDB breakpoint at stop_pc.
13085 (need_step_over_p): Don't do a step over if we find a GDB
13086 breakpoint at the resume PC.
13087
13088 * mem-break.c (struct raw_breakpoint): New.
13089 (enum bkpt_type): New type `gdb_breakpoint'.
13090 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13091 fields. New field `raw'.
13092 (find_raw_breakpoint_at): New.
13093 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13094 breakpoint instead.
13095 (set_breakpoint_at): Adjust.
13096 (delete_raw_breakpoint): New.
13097 (release_breakpoint): New.
13098 (delete_breakpoint): Rename to...
13099 (delete_breakpoint_1): ... this. Add proc parameter. Use
13100 release_breakpoint. Return ENOENT.
13101 (delete_breakpoint): Reimplement.
13102 (find_breakpoint_at): Delete.
13103 (find_gdb_breakpoint_at): New.
13104 (delete_breakpoint_at): Delete.
13105 (set_gdb_breakpoint_at): New.
13106 (delete_gdb_breakpoint_at): New.
13107 (gdb_breakpoint_here): New.
13108 (set_reinsert_breakpoint): Use release_breakpoint.
13109 (uninsert_breakpoint): Rename to ...
13110 (uninsert_raw_breakpoint): ... this.
13111 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13112 (reinsert_raw_breakpoint): Change parameter type to
13113 raw_breakpoint.
13114 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13115 instead.
13116 (check_breakpoints): Adjust. Use release_breakpoint.
13117 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13118 (breakpoint_inserted_here): Ditto.
13119 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13120 Don't trust the breakpoint's shadow if it is not inserted.
13121 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13122 (delete_all_breakpoints): Adjust.
13123 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13124 use delete_breakpoint_1.
13125
13126 * mem-break.h (breakpoints_supported): Delete declaration.
13127 (set_gdb_breakpoint_at): Declare.
13128 (gdb_breakpoint_here): Declare.
13129 (delete_breakpoint_at): Delete.
13130 (delete_gdb_breakpoint_at): Declare.
13131
13132 * server.h (struct raw_breakpoint): Forward declare.
13133 (struct process_info): New field `raw_breakpoints'.
13134
13135 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13136 breakpoints.
13137
6bf5e0ba
PA
131382010-03-24 Pedro Alves <pedro@codesourcery.com>
13139
13140 * linux-low.c (status_pending_p_callback): Fix comment.
13141 (linux_wait_for_event_1): Move most of the internal breakpoint
13142 handling from here...
13143 (linux_wait_1): ... to here.
13144 (count_events_callback): New.
13145 (select_singlestep_lwp_callback): New.
13146 (select_event_lwp_callback): New.
13147 (cancel_breakpoints_callback): New.
13148 (select_event_lwp): New.
13149 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13150 priority to all LWPs that have had events that should be reported
13151 to the client. Cancel breakpoints when about to reporting the
13152 event to the client, not while stopping lwps. No longer cancel
13153 finished single-steps here.
13154 (cancel_finished_single_step): Delete.
13155 (cancel_finished_single_steps): Delete.
13156
414a389f
PA
131572010-03-24 Pedro Alves <pedro@codesourcery.com>
13158
13159 * mem-break.c (enum bkpt_type): New.
13160 (struct breakpoint): New field `type'.
13161 (set_breakpoint_at): Change return type to struct breakpoint
13162 pointer. Set type to `other_breakpoint' by default.
13163 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13164 in the breakpoint list.
13165 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13166 (reinsert_breakpoint): Rename to ...
13167 (reinsert_raw_breakpoint): ... this.
13168 (reinsert_breakpoints_at): Adjust.
13169 * mem-break.h (struct breakpoint): Declare.
13170 (set_breakpoint_at): Change return type to struct breakpoint
13171 pointer.
13172
2280c721
PA
131732010-03-24 Pedro Alves <pedro@codesourcery.com>
13174
13175 * server.c (handle_query): Assign, not compare.
13176
d50171e4
PA
131772010-03-24 Pedro Alves <pedro@codesourcery.com>
13178
13179 Teach linux gdbserver to step-over-breakpoints.
13180
13181 * linux-low.c (can_hardware_single_step): New.
13182 (supports_breakpoints): New.
13183 (handle_extended_wait): If stopping threads, read the stop pc of
13184 the new cloned LWP.
13185 (get_pc): New.
13186 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13187 low target doesn't support retrieving the PC.
13188 (add_lwp): Set last_resume_kind to resume_continue.
13189 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13190 (linux_attach): Don't clear stop_expected. Set the lwp's
13191 last_resume_kind to resume_stop.
13192 (linux_detach_one_lwp): Don't check for removed breakpoints.
13193 (check_removed_breakpoint): Delete.
13194 (status_pending_p): Rename to ...
13195 (status_pending_p_callback): ... this. Don't check for removed
13196 breakpoints. Don't consider threads that are stopped from GDB's
13197 perspective.
13198 (linux_wait_for_lwp): Always read the stop_pc here.
13199 (cancel_breakpoint): New.
13200 (step_over_bkpt): New global.
13201 (linux_wait_for_event_1): Implement stepping over breakpoints.
13202 (gdb_wants_lwp_stopped): New.
13203 (gdb_wants_all_stopped): New.
13204 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13205 single-step traps here. Store the thread's last reported target
13206 wait status.
13207 (send_sigstop): Don't clear stop_expected. Always set it,
13208 instead.
13209 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13210 (cancel_finished_single_step): New.
13211 (cancel_finished_single_steps): New.
13212 (wait_for_sigstop): Don't cancel finished single-step traps here.
13213 (linux_resume_one_lwp): Don't check for removed breakpoints.
13214 Don't set `step' on non-hardware step archs.
13215 (linux_set_resume_request): Ignore resume_stop requests if already
13216 stopping or stopped. Set the lwp's last_resume_kind.
13217 (resume_status_pending_p): Don't check for removed breakpoints.
13218 (need_step_over_p): New.
13219 (start_step_over): New.
13220 (finish_step_over): New.
13221 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13222 requests. Clear the thread's last reported target waitstatus.
13223 Don't use the `suspended' flag. Don't consider pending breakpoints.
13224 (linux_resume): Start a step-over if necessary.
13225 (proceed_one_lwp): New.
13226 (proceed_all_lwps): New.
13227 (unstop_all_lwps): New.
13228 * linux-low.h (struct lwp_info): Rewrite comment for the
13229 `suspended' flag. Add the `stop_pc' field. Delete the
13230 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13231 Add `'last_resume_kind' and `need_step_over' fields.
13232 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13233 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13234 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13235 (set_raw_breakpoint_at): New.
13236 (set_breakpoint_at): Rewrite to use it.
13237 (reinsert_breakpoint_handler): Delete.
13238 (set_reinsert_breakpoint): New.
13239 (reinsert_breakpoint_by_bp): Delete.
13240 (delete_reinsert_breakpoints): New.
13241 (uninsert_breakpoint): Rewrite.
13242 (uninsert_breakpoints_at): New.
13243 (reinsert_breakpoint): Rewrite.
13244 (reinsert_breakpoints_at): New.
13245 (check_breakpoints): Rewrite.
13246 (breakpoint_here): New.
13247 (breakpoint_inserted_here): New.
13248 (check_mem_read): Adjust.
13249 * mem-break.h (breakpoints_supported, breakpoint_here)
13250 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13251 (reinsert_breakpoint_by_bp): Delete declaration.
13252 (delete_reinsert_breakpoints): Declare.
13253 (reinsert_breakpoint): Delete declaration.
13254 (reinsert_breakpoints_at): Declare.
13255 (uninsert_breakpoint): Delete declaration.
13256 (uninsert_breakpoints_at): Declare.
13257 (check_breakpoints): Adjust prototype.
13258 * server.h: Adjust include order.
13259 (struct thread_info): Declare here. Add a `last_status' field.
13260
30ba68cb
MS
132612010-03-23 Michael Snyder <msnyder@vmware.com>
13262
13263 * server.c (crc32): New function.
13264 (handle_query): Add handling for 'qCRC:' request.
13265
b9a881c2
PA
132662010-03-23 Pedro Alves <pedro@codesourcery.com>
13267
13268 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13269 lwp had been stopped by a watchpoint.
13270
e92d13d5
PA
132712010-03-16 Pedro Alves <pedro@codesourcery.com>
13272
13273 * server.h (internal_error): Declare.
13274 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13275 * utils.c (internal_error): New function.
13276
64daa791
AS
132772010-03-15 Andreas Schwab <schwab@redhat.com>
13278
13279 * configure.srv: Fix typo setting srv_regobj.
13280
f52cd8cd
PA
132812010-03-15 Pedro Alves <pedro@codesourcery.com>
13282
13283 * linux-low.c (fetch_register): Avoid passing a non string literal
13284 format to `error'.
13285 (usr_store_inferior_registers): Ditto.
13286
93ae6fdc
PA
132872010-03-14 Pedro Alves <pedro@codesourcery.com>
13288
13289 * linux-low.c (linux_write_memory): Bail out early if peeking
13290 memory failed.
13291
c3adc08c
PA
132922010-03-14 Pedro Alves <pedro@codesourcery.com>
13293
13294 * linux-low.h (struct lwp_info): New fields
13295 `stopped_by_watchpoint' and `stopped_data_address'.
13296 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13297 here, and cache them in the lwp object.
13298 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13299 directly.
13300 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13301 field.
13302 (linux_stopped_by_watchpoint): Rewrite.
13303 (linux_stopped_data_address): Rewrite.
13304
bce522a2
PA
133052010-03-06 Simo Melenius <simo.melenius@iki.fi>
13306
13307 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13308 switching the current inferior, not before.
13309
90884b2b
L
133102010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13311
13312 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13313 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13314 i386-linux.c and amd64-linux.c.
13315 (reg-i386.o): Removed.
13316 (reg-i386.c): Likewise.
13317 (reg-i386-linux.o): Likewise.
13318 (reg-i386-linux.c): Likewise.
13319 (reg-x86-64.o): Likewise.
13320 (reg-x86-64.c): Likewise.
13321 (reg-x86-64-linux.o): Likewise.
13322 (reg-x86-64-linux.c): Likewise.
13323 (i386.o): New.
13324 (i386.c): Likewise.
13325 (i386-linux.o): Likewise.
13326 (i386-linux.c): Likewise.
13327 (amd64.o): Likewise.
13328 (amd64.c): Likewise.
13329 (amd64-linux.o): Likewise.
13330 (amd64-linux.c): Likewise.
13331
13332 * configure.srv (srv_i386_regobj): New.
13333 (srv_i386_linux_regobj): Likewise.
13334 (srv_amd64_regobj): Likewise.
13335 (srv_amd64_linux_regobj): Likewise.
13336 (srv_i386_32bit_xmlfiles): Likewise.
13337 (srv_i386_64bit_xmlfiles): Likewise.
13338 (srv_i386_xmlfiles): Likewise.
13339 (srv_amd64_xmlfiles): Likewise.
13340 (srv_i386_linux_xmlfiles): Likewise.
13341 (srv_amd64_linux_xmlfiles): Likewise.
13342 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13343 srv_xmlfiles to $srv_i386_xmlfiles.
13344 (i[34567]86-*-mingw32ce*): Likewise.
13345 (i[34567]86-*-mingw*): Likewise.
13346 (i[34567]86-*-nto*): Likewise.
13347 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13348 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13349 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13350 (x86_64-*-linux*): Likewise.
13351
13352 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13353 (init_registers_amd64_linux): New.
13354 (x86_arch_setup): Replace init_registers_x86_64_linux with
13355 init_registers_amd64_linux.
13356
193f13e6
MK
133572010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13358
13359 * configure.ac: Check for libdl. If it is not available link against
13360 static libthread_db.
13361 * configure: Regenerate.
13362
85d721b8
PA
133632010-02-22 Pedro Alves <pedro@codesourcery.com>
13364
13365 PR9605
13366
13367 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13368 handing a read watchpoint.
13369 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13370
6076632b
DE
133712010-02-12 Doug Evans <dje@google.com>
13372
13373 * linux-low.c (linux_supports_tracefork_flag): Document.
13374 (linux_look_up_symbols): Add comment.
13375
3327ccf7
L
133762010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13377
13378 * regcache.c (supply_register): Clear regcache if buf is NULL.
13379
0718675c 133802010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13381 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13382
13383 * inferiors.c (find_inferior): Add function documentation.
13384 (unloaded_dll): Handle the case where the unloaded dll has not
13385 been previously registered in the dll list.
13386
177321bd
DJ
133872010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13388
13389 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13390 (thumb2_breakpoint): New.
13391 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13392
2b009048
DJ
133932010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13394
13395 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13396 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13397 breakpoints.
13398
3be029c7
PA
133992010-01-21 Pedro Alves <pedro@codesourcery.com>
13400
13401 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13402
18f5de3b
JK
134032010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13404
13405 * linux-s390-low.c (s390_collect_ptrace_register)
13406 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13407
3743bb4f
DE
134082010-01-21 Doug Evans <dje@google.com>
13409
14ce3065
DE
13410 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13411 (PTRACE_ARG4_TYPE): New macro.
13412 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13413 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13414 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13415 (usr_store_inferior_registers): Ditto.
13416 (linux_read_memory, linux_write_memory): Ditto.
13417 (linux_test_for_tracefork): Ditto.
13418
3743bb4f
DE
13419 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13420 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13421
8b315be5
PA
134222010-01-21 Pedro Alves <pedro@codesourcery.com>
13423
13424 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13425 target.
13426
85492558
PA
134272010-01-21 Pedro Alves <pedro@codesourcery.com>
13428
13429 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13430 prototype to take a regcache. Adjust.
13431
442ea881
PA
134322010-01-20 Pedro Alves <pedro@codesourcery.com>
13433
13434 * regcache.h (struct thread_info): Forward declare.
13435 (struct regcache): New.
13436 (new_register_cache): Adjust prototype.
13437 (get_thread_regcache): Declare.
13438 (free_register_cache): Adjust prototype.
13439 (registers_to_string, registers_from_string): Ditto.
13440 (supply_register, supply_register_by_name, collect_register)
13441 (collect_register_as_string, collect_register_by_name): Ditto.
13442 * regcache.c (struct inferior_regcache_data): Delete.
13443 (get_regcache): Rename to ...
13444 (get_thread_regcache): ... this. Adjust. Switch inferior before
13445 fetching registers.
13446 (regcache_invalidate_one): Adjust.
13447 (regcache_invalidate): Fix prototype.
13448 (new_register_cache): Return the new register cache.
13449 (free_register_cache): Change prototype.
13450 (realloc_register_cache): Adjust.
13451 (registers_to_string): Change prototype to take a regcache. Adjust.
13452 (registers_from_string): Ditto.
13453 (register_data): Ditto.
13454 (supply_register): Ditto.
13455 (supply_register_by_name): Ditto.
13456 (collect_register): Ditto.
13457 (collect_register_as_string): Ditto.
13458 (collect_register_by_name): Ditto.
13459 * server.c (process_serial_event): Adjust.
13460 * linux-low.h (regset_fill_func, regset_store_func): Change
13461 prototype.
13462 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13463 Change prototype.
13464 * linux-low.c (get_stop_pc): Adjust.
13465 (check_removed_breakpoint): Adjust.
13466 (linux_wait_for_event): Adjust.
13467 (linux_resume_one_lwp): Adjust.
13468 (fetch_register): Add regcache parameter. Adjust.
13469 (usr_store_inferior_registers): Ditto.
13470 (regsets_fetch_inferior_registers): Ditto.
13471 (regsets_store_inferior_registers): Ditto.
13472 (linux_fetch_registers, linux_store_registers): Ditto.
13473 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13474 regcache. Adjust.
43aaf8b6
PA
13475 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13476 Ditto.
442ea881
PA
13477 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13478 prototype to take a regcache.
13479 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13480 * remote-utils.c (convert_ascii_to_int, outreg)
13481 (prepare_resume_reply): Change prototype to take a regcache.
13482 Adjust.
13483 * target.h (struct target_ops) <fetch_registers, store_registers>:
13484 Change prototype to take a regcache.
13485 (fetch_inferior_registers, store_inferior_registers): Change
13486 prototype to take a regcache. Adjust.
13487 * proc-service.c (ps_lgetregs): Adjust.
13488 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13489 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13490 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13491 take a regcache. Adjust.
13492 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13493 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13494 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13495 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13496 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13497 (cris_cannot_fetch_register):
13498 (cris_breakpoint_at): Change prototype to take a regcache.
13499 Adjust.
13500 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13501 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13502 to take a regcache. Adjust.
13503 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13504 Adjust.
13505 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13506 take a regcache. Adjust.
13507 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13508 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13509 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13510 * linux-mips-low.c (mips_get_pc):
13511 (mips_set_pc): Change prototype to take a regcache. Adjust.
13512 (mips_reinsert_addr): Adjust.
13513 (mips_collect_register): Change prototype to take a regcache.
13514 Adjust.
13515 (mips_supply_register):
13516 (mips_collect_register_32bit, mips_supply_register_32bit)
13517 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13518 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13519 * linux-ppc-low.c (ppc_supply_ptrace_register)
13520 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13521 (parse_spufs_run): Adjust.
13522 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13523 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13524 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13525 take a regcache. Adjust.
13526 * linux-s390-low.c (s390_collect_ptrace_register)
13527 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13528 (s390_set_pc): Change prototype to take a regcache. Adjust.
13529 (s390_arch_setup): Adjust.
13530 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13531 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13532 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13533 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13534 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13535 regcache. Adjust.
13536 (sparc_breakpoint_at): Adjust.
13537 * linux-xtensa-low.c (xtensa_fill_gregset):
13538 (xtensa_store_gregset):
13539 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13540 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13541 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13542 prototype to take a regcache. Adjust.
13543 * win32-arm-low.c (arm_fetch_inferior_register)
13544 (arm_store_inferior_register): Change prototype to take a
13545 regcache. Adjust.
13546 * win32-i386-low.c (i386_fetch_inferior_register)
13547 (i386_store_inferior_register): Change prototype to take a
13548 regcache. Adjust.
13549 * win32-low.c (child_fetch_inferior_registers)
13550 (child_store_inferior_registers): Change prototype to take a
13551 regcache. Adjust.
13552 (win32_wait): Adjust.
13553 (win32_fetch_inferior_registers): Change prototype to take a
13554 regcache. Adjust.
13555 (win32_store_inferior_registers): Adjust.
13556 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13557 store_inferior_register>: Change prototype to take a regcache.
13558
60c3d7b0
DE
135592010-01-20 Doug Evans <dje@google.com>
13560
13561 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13562 #ifdef.
13563 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13564 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13565
dc146f7c
VP
135662010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13567
13568 * linux-low.c (linux_core_of_thread): New.
13569 (compare_ints, show_process, list_threads): New.
13570 (linux_qxfer_osdata): Report threads and cores.
13571 (linux_target_op): Register linux_core_of_thread.
13572 * remote-utils.c (prepare_resume_reply): Report the core.
13573 (buffer_xml_printf): Support %d specifier.
13574 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13575 New.
13576 (handle_query): Handle qXfer:threads. Announce availability
13577 thereof.
13578 * target.h (struct target_ops): New field core_of_thread.
13579
7803799a
UW
135802010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13581
13582 * Makefile.in (clean): Remove new generated files.
13583 (reg-s390.o, reg-s390.c): Remove rules.
13584 (reg-s390x.o, reg-s390x.c): Likewise.
13585 (s390-linux32.o, s390-linux32.c): Add rules.
13586 (s390-linux64.o, s390-linux64.c): Likewise.
13587 (s390x-linux64.o, s390x-linux64.c): Likewise.
13588 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13589 * linux-s390-low.c: Include <elf.h>.
13590 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13591 (init_registers_s390): Remove prototype.
13592 (init_registers_s390x): Likewise.
13593 (init_registers_s390_linux32): Add prototype.
13594 (init_registers_s390_linux64): Likewise.
13595 (init_registers_s390x_linux64): Likewise.
13596 (s390_num_regs_3264): New define.
13597 (s390_regmap_3264): New global variable.
13598 (s390_cannot_fetch_register): Remove obsolete check.
13599 (s390_cannot_store_register): Likewise.
13600 (s390_collect_ptrace_register): Handle upper/lower register halves.
13601 (s390_supply_ptrace_register): Likewise.
13602 (s390_fill_gregset): Update to register number changes.
13603 (s390_get_hwcap): New routine.
13604 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13605 Install appropriate regmap and register set.
13606
6e7ffa39
JB
136072010-01-01 Joel Brobecker <brobecker@adacore.com>
13608
13609 * server.c (gdbserver_version): Update copyright year to 2010.
13610 * gdbreplay.c (gdbreplay_version): Likewise.
13611
957f3f49
DE
136122009-12-28 Doug Evans <dje@google.com>
13613
13614 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13615 elf/external.h. Include <elf.h> instead but only if necessary.
13616
ca5c370d
PA
136172009-12-28 Pedro Alves <pedro@codesourcery.com>
13618
13619 * linux-low.c (linux_remove_process): Remove `detaching'
13620 parameter. Don't release/detach from thread_db here.
13621 (linux_kill): Release/detach from thread_db here, ...
13622 (linux_detach): ... and here, before actually detaching.
13623 (linux_wait_1): ... and here, when a process exits.
13624 * thread-db.c (any_thread_of): New.
13625 (thread_db_free): Switch the current inferior to a thread of the
13626 passed in process.
13627
4ee62156
DE
136282009-12-21 Doug Evans <dje@google.com>
13629
d90e6a88
DE
13630 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13631
c5f62d5f
DE
13632 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13633 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13634 warning ifndef __NR_tkill. Move setting of errno there too.
13635 Delete unnecessary resetting of errno after syscall.
13636 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13637
10e86dd7
DE
13638 * configure.ac: Check for dladdr.
13639 * config.in: Regenerate.
13640 * configure: Regenerate.
13641 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13642 (try_thread_db_load): Update.
13643
4ee62156
DE
13644 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13645
00f515da
DE
136462009-12-18 Doug Evans <dje@google.com>
13647
e9464885
DE
13648 * event-loop.c: Include unistd.h if it exists.
13649
07d4f67e
DE
13650 * linux-low.c (my_waitpid): Move definition away from being in
13651 between linux_tracefork_child/linux_test_for_tracefork.
13652
00f515da
DE
13653 * gdb_proc_service.h (psaddr_t): Fix type.
13654 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13655 signature to match glibc.
13656
1de1badb
DE
136572009-12-16 Doug Evans <dje@google.com>
13658
13659 * linux-low.c (linux_read_memory): Fix argument to read.
13660
aeeb81d1
PA
136612009-11-26 Pedro Alves <pedro@codesourcery.com>
13662
13663 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13664 events, don't leave current_inferior pointing at null.
13665
10357975
PA
136662009-11-26 Pedro Alves <pedro@codesourcery.com>
13667
13668 * win32-low.c (LOG): Delete.
13669 (OUTMSG): Output to stderr.
13670 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13671 on compile time LOG macro.
13672 (win32_wait): Fix debug output.
13673
cf6e3471
PA
136742009-11-26 Pedro Alves <pedro@codesourcery.com>
13675
13676 * win32-low.c (win32_add_one_solib): If the dll name is
13677 "ntdll.dll", prepend the system directory to the dll path.
13678
0c85e18e
MK
136792009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13680
13681 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13682
9ac544ce 136832009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13684 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13685
13686 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13687 * configure.ac: Check for __mcoldfire__ and set
13688 gdb_cv_m68k_is_coldfire.
13689 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13690 reg-cf.o and reg-m68k.o.
13691 * configure: Regenerated.
13692
fd7dd3e6
PA
136932009-11-16 Pedro Alves <pedro@codesourcery.com>
13694
13695 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13696 Pass it to thread_db_free.
13697 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13698 proper `detaching' argument to linux_remove_process.
13699 * linux-low.h (thread_db_free): Add `detaching' parameter.
13700 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13701 to thread_db_free.
13702 (thread_db_free): Add `detaching' parameter. Only
13703 call td_ta_clear_event if detaching from process.
13704
75aa492e
MK
137052009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13706
13707 * thread-db.c (thread_db_free): Fix typo.
13708
21e1bee4
PP
137092009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13710
13711 PR gdb/10838
13712 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13713
8838b45e
NS
137142009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13715
13716 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13717 with an i686 compiler.
13718 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13719 needed.
13720 * configure: Rebuilt.
13721
8a35fb51
SL
137222009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13723
13724 PR gdb/10783
13725
13726 * server.c (handle_search_memory_1): Correct read_addr initialization
13727 in loop for searching subsequent chunks.
13728
96f15937
PP
137292009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13730
13731 * configure.ac: New --with-libthread-db option.
13732 * thread-db.c: Allow direct dependence on libthread_db.
13733 (thread_db_free): Adjust.
13734 * config.in: Regenerate.
13735 * configure: Likewise.
889bf7c5 13736
5f7d1694
PP
137372009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13738
13739 PR gdb/10757
13740 * thread-db.c (attach_thread): New function.
13741 (maybe_attach_thread): Return success/failure.
13742 (find_new_threads_callback): Adjust.
889bf7c5
PA
13743 (thread_db_find_new_threads): Loop until no new threads.
13744
88e3b899
PA
137452009-10-13 Pedro Alves <pedro@codesourcery.com>
13746
13747 * proc-service.c (ps_lgetregs): Formatting.
13748
cdbfd419
PP
137492009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13750
13751 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13752 * configure.ac: Adjust.
13753 * linux-low.h (struct process_info_private): Move members to struct
13754 thread_db.
13755 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13756 * linux-low.c (linux_remove_process): Adjust.
13757 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13758 * server.c (handle_query): Move code ...
13759 (handle_monitor_command): ... here. New function.
13760 * target.h (struct target_ops): New member.
13761 * thread-db.c (struct thread_db): New.
13762 (libthread_db_search_path): New variable.
13763 (thread_db_create_event, thread_db_enable_reporting)
13764 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13765 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13766 (try_thread_db_load_1, dladdr_to_soname): New functions.
13767 (try_thread_db_load, thread_db_load_search): New functions.
13768 (thread_db_init): Search for libthread_db.
13769 (thread_db_free): New function.
13770 (thread_db_handle_monitor_command): Likewise.
13771 * config.in: Regenerate.
13772 * configure: Regenerate.
889bf7c5 13773
4168d2d6
UW
137742009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13775
13776 * spu-low.c (spu_kill): Wait for inferior to terminate.
13777 Call clear_inferiors.
13778 (spu_detach): Call clear_inferiors.
13779
81ecdfbb
RW
137802009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13781
13782 * aclocal.m4: Regenerate.
13783 * config.in: Likewise.
13784 * configure: Likewise.
13785
0b9ff2c0
UW
137862009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13787
13788 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13789 (parse_spufs_run): New function.
13790 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13791 (ppc_breakpoint_at): Handle SPU breakpoints.
13792
efcbbd14
UW
137932009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13794
13795 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13796 (SPUFS_MAGIC): Define.
13797 (spu_enumerate_spu_ids): New function.
13798 (linux_qxfer_spu): New function.
13799 (linux_target_ops): Install linux_qxfer_spu.
13800
f4d9bade
UW
138012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13802
13803 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13804 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13805 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13806 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13807 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13808 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13809 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13810 (init_registers_powerpc_cell32l): Add prototype.
13811 (init_registers_powerpc_cell64l): Likewise.
13812 (ppc_arch_setup): Detect Cell/B.E. architecture.
13813
96e946ca
RW
138142009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13815
13816 * Makefile.in (datarootdir): New variable.
13817
58d6951d
DJ
138182009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13819
13820 * linux-low.c (linux_write_memory): Update debugging output.
13821 * Makefile.in (clean): Add new descriptions.
13822 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13823 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13824 * configure.srv: Add new files for arm*-*-linux*.
13825 * linux-arm-low.c: Add new declarations.
13826 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13827 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13828 (HWCAP_VFPv3D16): New.
13829 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13830 instead of __IWMMXT__.
13831 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13832 (arm_arch_setup): New.
13833 (target_regsets): Remove #ifdef. Add VFP regset.
13834 (the_low_target): Use arm_arch_setup.
13835
12b42a12
DJ
138362009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13837
13838 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13839 the main thread again.
13840
ac8c974e
AR
138412009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13842
13843 Adding Neutrino gdbserver.
13844 * configure: Regenerated.
13845 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13846 * configure.srv (i[34567]86-*-nto*): New target.
13847 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13848 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13849 (nto_comctrl) [__QNX__]: New function.
13850 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13851
4424e0c3 138522009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13853
13854 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13855 srv_tgtobj.
13856
912cf4ba
PA
138572009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13858 Pedro Alves <pedro@codesourcery.com>
13859
13860 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13861 don't support CONTEXT_EXTENDED_REGISTERS.
13862 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13863 (the_low_target): Install them.
13864 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13865 failing with ERROR_PIPE_NOT_CONNECTED.
13866
aa5ca48f
DE
138672009-06-30 Doug Evans <dje@google.com>
13868 Pierre Muller <muller@ics.u-strasbg.fr>
13869
13870 Add h/w watchpoint support to x86-linux, win32-i386.
13871 * Makefile.in (SFILES): Add i386-low.c
13872 (i386_low_h): Define.
13873 (i386-low.o): Add dependencies.
13874 (linux-x86-low.o): Add i386-low.h dependency.
13875 (win32-i386-low.o): Ditto.
13876 * i386-low.c: New file.
13877 * i386-low.h: New file.
13878 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13879 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13880 * linux-low.c (linux_add_process): Initialize arch_private.
13881 (linux_remove_process): Free arch_private.
13882 (add_lwp): Initialize arch_private.
13883 (delete_lwp): Free arch_private.
13884 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13885 provided.
13886 * linux-low.h (process_info_private): New member arch_private.
13887 (lwp_info): New member arch_private.
13888 (linux_target_ops): New members new_process, new_thread,
13889 prepare_to_resume.
13890 (ptid_of): New macro.
13891 * linux-x86-low.c: Include stddef.h, i386-low.h.
13892 (arch_process_info): New struct.
13893 (arch_lwp_info): New struct.
13894 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13895 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13896 (i386_dr_low_get_status): New function.
13897 (x86_insert_point, x86_remove_point): New functions.
13898 (x86_stopped_by_watchpoint): New function.
13899 (x86_stopped_data_address): New function.
13900 (x86_linux_new_process, x86_linux_new_thread): New functions.
13901 (x86_linux_prepare_to_resume): New function.
13902 (the_low_target): Add entries for insert_point, remove_point,
13903 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13904 prepare_to_resume.
13905 * server.c (debug_hw_points): New global.
13906 (monitor_show_help): Document set debug-hw-points.
13907 (handle_query): Process "set debug-hw-points".
13908 * server.h (debug_hw_points): Declare.
13909 (paddress): Declare.
13910 * utils.c (NUMCELLS, CELLSIZE): New macros.
13911 (get_sell, xsnprintf, paddress): New functions.
13912 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13913 remove_point, stopped_by_watchpoint, stopped_data_address.
13914 * win32-i386-low.c: Include i386-low.h.
13915 (debug_reg_state): Replaces dr.
13916 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13917 (i386_dr_low_get_status): New function.
13918 (i386_insert_point, i386_remove_point): New functions.
13919 (i386_stopped_by_watchpoint): New function.
13920 (i386_stopped_data_address): New function.
13921 (i386_initial_stuff): Update.
13922 (get_thread_context,set_thread_context,i386_thread_added): Update.
13923 (the_low_target): Add entries for insert_point,
13924 remove_point, stopped_by_watchpoint, stopped_data_address.
13925 * win32-low.c (win32_insert_watchpoint): New function.
13926 (win32_remove_watchpoint): New function.
13927 (win32_stopped_by_watchpoint): New function.
13928 (win32_stopped_data_address): New function.
13929 (win32_target_ops): Add entries for insert_watchpoint,
13930 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13931 * win32-low.h (win32_target_ops): New members insert_point,
13932 remove_point, stopped_by_watchpoint, stopped_data_address.
13933
d993e290
PA
139342009-06-25 Pedro Alves <pedro@codesourcery.com>
13935
13936 * server.c (process_serial_event): Re-return unsupported, not
13937 error, if the type isn't recognized. Re-allow supporting only
13938 insert or remove packets. Also call require_running for
13939 breakpoints. Add missing break statement to default case. Tidy.
13940 * target.h (struct target_ops): Rename insert_watchpoint to
13941 insert_point, and remove_watchpoint to remove_point.
13942
13943 * linux-low.h (struct linux_target_ops): Likewise.
13944 * linux-low.c (linux_insert_watchpoint): Rename to ...
13945 (linux_insert_point): ... this. Adjust.
13946 (linux_remove_watchpoint): Rename to ...
13947 (linux_remove_point): ... this. Adjust.
13948 (linux_target_ops): Adjust.
13949 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13950 (cris_insert_point): ... this.
13951 (cris_remove_watchpoint): Rename to ...
13952 (cris_remove_point): ... this.
13953 (the_low_target): Adjust.
13954
0f54c268
PM
139552009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13956
13957 * server.c (handle_v_kill): Pass signal_pid to
13958 kill_inferior if multi_process is zero.
13959
c6314022
AR
139602009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13961
13962 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13963 * target.h (target_ops): Comment for *_watchpoint to make it clear
13964 the functions can get types '0' and '1'.
13965
4463ce24
AR
139662009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13967
13968 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13969 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13970 * regcache.c (get_regcache): Likewise.
13971 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13972 * win32-low.c (child_fetch_inferior_registers): Remove check for
13973 regno 0.
13974
cf8fd78b
PA
139752009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13976 Pedro Alves <pedro@codesourcery.com>
13977
13978 * target.h (struct target_ops) <supports_multi_process>: New
13979 callback.
13980 (target_supports_multi_process): New.
13981 * server.c (handle_query): Even if GDB reports support, only
13982 enable multi-process if the target also supports it. Report
13983 multi-process support only if the target backend supports it.
13984 * linux-low.c (linux_supports_multi_process): New function.
13985 (linux_target_ops): Install it as target_supports_multi_process
13986 callback.
13987
47c0c975
DE
139882009-05-24 Doug Evans <dje@google.com>
13989
e09875d4
DE
13990 Global renaming of find_thread_pid to find_thread_ptid.
13991 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13992 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13993 All callers updated.
13994
e27d73f6
DE
13995 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13996 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13997 directly.
13998
47c0c975
DE
13999 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14000 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14001 (linux_resume_one_lwp): Ditto.
14002
2acc282a
DE
140032009-05-23 Doug Evans <dje@google.com>
14004
14005 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14006 from struct inferior_list_entry * to struct lwp_info *.
14007 All callers updated.
14008
9f1036c1
DE
140092009-05-13 Doug Evans <dje@google.com>
14010
14011 * linux-x86-low.c: Don't include assert.h.
14012 (x86_siginfo_fixup): Use fatal, not assert.
14013 (x86_arch_setup): Fix comment.
14014
d0722149
DE
140152009-05-12 Doug Evans <dje@google.com>
14016
14017 Biarch support for i386/amd64 gdbserver.
14018 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14019 Add linux-x86-low.c.
14020 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14021 (linux-x86-low.o): Add.
14022 * linux-x86-64-low.c: Delete.
14023 * linux-i386-low.c: Delete.
14024 * linux-x86-low.c: New file.
14025 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14026 linux-x86-low.o.
14027 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14028 linux-x86-low.o.
14029 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14030 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14031 (linux_child_pid_to_exec_file): New function.
14032 (elf_64_header_p, elf_64_file_p): New functions.
14033 (siginfo_fixup): New function.
14034 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14035 give target a chance to convert layout.
14036 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14037 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14038
fdeb2a12
DE
140392009-05-07 Doug Evans <dje@google.com>
14040
14041 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14042 (regsets_store_inferior_registers): Ditto.
14043
a6dbe5df
PA
140442009-05-06 Pedro Alves <pedro@codesourcery.com>
14045
14046 PR server/10048
14047
14048 * linux-low.c (must_set_ptrace_flags): Delete.
14049 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14050 of the global.
14051 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14052 `lwp->must_set_ptrace_flags' instead.
ba42693b 14053 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14054 (linux_wait_1): ... not here.
14055
5091eb23
DE
140562009-04-30 Doug Evans <dje@google.com>
14057
9f767825
DE
14058 * inferiors.c (started_inferior_callback): New function.
14059 (attached_inferior_callback): New function.
14060 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14061 * server.c (print_started_pid, print_attached_pid): New functions.
14062 (detach_or_kill_for_exit): New function.
14063 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14064 * server.h (have_started_inferiors_p): Declare.
14065 (have_attached_inferiors_p): Declare.
14066
5091eb23
DE
14067 * inferiors.c (remove_process): Fix memory leak, free process.
14068 * linux-low.c (linux_remove_process): New function.
14069 (linux_kill): Call it instead of remove_process.
14070 (linux_detach, linux_wait_1): Ditto.
14071
155c8968
PA
140722009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14073
14074 * configure.srv: Add x86 Windows CE target.
14075
7fe519cb
UW
140762009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14077
14078 * inferiors.c (get_thread_process): Make global.
14079 * server.h (get_thread_process): Add prototype.
14080 * thread-db.c (find_one_thread): Use get_thread_process
14081 instead of current_process.
14082 (thread_db_get_tls_address): Do not crash if called when
14083 thread layer is not yet initialized.
14084
5472f405
UW
140852009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14086
14087 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14088 * spu-low.c (current_tid): Rename to ...
14089 (current_ptid): ... this.
14090 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14091 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14092 ptid_get_lwp (current_ptid) instead of current_tid.
14093 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14094 instead of current_tid. Use find_process_pid to verify pid
14095 argument is valid. Pass proper argument to remove_process.
14096 (spu_thread_alive): Compare current_ptid instead of current_tid.
14097 (spu_resume): Likewise.
14098
55ac2b99
PA
140992009-04-02 Pedro Alves <pedro@codesourcery.com>
14100
14101 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14102 variable.
14103
95954743
PA
141042009-04-01 Pedro Alves <pedro@codesourcery.com>
14105
14106 Implement the multiprocess extensions, and add linux multiprocess
14107 support.
14108
14109 * server.h (ULONGEST): Declare.
14110 (struct ptid, ptid_t): New.
14111 (minus_one_ptid, null_ptid): Declare.
14112 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14113 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14114 (struct inferior_list_entry): Change `id' type from unsigned from
14115 to ptid_t.
14116 (struct sym_cache, struct breakpoint, struct
14117 process_info_private): Forward declare.
14118 (struct process_info): Declare.
14119 (current_process): Declare.
14120 (all_processes): Declare.
14121 (initialize_inferiors): Declare.
14122 (add_thread): Adjust to use ptid_t.
14123 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14124 (add_process, remove_process, find_thread_pid): Declare.
14125 (find_inferior_id): Adjust to use ptid_t.
14126 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14127 (multi_process): Declare.
14128 (push_event): Adjust to use ptid_t.
14129 (read_ptid, write_ptid): Declare.
14130 (prepare_resume_reply): Adjust to use ptid_t.
14131 (clear_symbol_cache): Declare.
14132 * inferiors.c (all_processes): New.
14133 (null_ptid, minus_one_ptid): New.
14134 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14135 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14136 (add_thread): Change unsigned long to ptid. Remove gdb_id
14137 parameter. Adjust.
14138 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14139 (gdb_id_to_thread): Rename to ...
14140 (find_thread_pid): ... this. Change unsigned long to ptid.
14141 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14142 (loaded_dll, pull_pid_from_list): Adjust.
14143 (add_process, remove_process, find_process_pid)
14144 (get_thread_process, current_process, initialize_inferiors): New.
14145 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14146 (struct target_waitstatus) <related_pid>: Ditto.
14147 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14148 return type to int.
14149 (struct target_ops) <join>: Add `pid' argument.
14150 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14151 (struct target_ops) <wait>: Add `ptid' field. Change return type
14152 to ptid.
14153 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14154 (mywait): Add `ptid' argument. Change return type to ptid_t.
14155 (target_pid_to_str): Declare.
14156 * target.c (set_desired_inferior): Adjust to use ptids.
14157 (mywait): Add new `ptid' argument. Adjust.
14158 (target_pid_to_str): New.
14159 * mem-break.h (free_all_breakpoints): Declare.
14160 * mem-break.c (breakpoints): Delelete.
14161 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14162 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14163 to use per-process breakpoint list.
14164 (free_all_breakpoints): New.
14165 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14166 (symbol_cache, all_symbols_looked_up): Delete.
14167 (hexchars): New.
14168 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14169 read_ptid): New.
14170 (prepare_resume_reply): Change ptid argument's type from unsigned
14171 long to ptid_t. Adjust. Implement W;process and X;process.
14172 (free_sym_cache, clear_symbol_cache): New.
14173 (look_up_one_symbol): Adjust to per-process symbol cache. *
14174 * server.c (cont_thread, general_thread, step_thread): Change type
14175 to ptid_t.
14176 (attached): Delete.
14177 (multi_process): New.
14178 (last_ptid): Change type to ptid_t.
14179 (struct vstop_notif) <ptid>: Change type to ptid_t.
14180 (queue_stop_reply, push_event): Change `ptid' argument's type to
14181 ptid_t.
14182 (discard_queued_stop_replies): Add `pid' argument.
14183 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14184 changes. Don't reference the `attached' global.
14185 (attach_inferior): Adjust to mywait interface changes.
14186 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14187 features. Handle and report "multiprocess+". Handle
14188 "qAttached:PID".
14189 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14190 changes.
14191 (handle_v_kill): New.
14192 (handle_v_stopped): Adjust to use target_pid_to_str.
14193 (handle_v_requests): Allow multiple attaches and runs when
14194 multiprocess extensions are in effect. Handle "vKill".
14195 (myresume): Adjust to use ptids.
14196 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14197 (handle_status): Adjust to discard_queued_stop_replies interface
14198 change.
14199 (first_thread_of, kill_inferior_callback)
14200 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14201 (main): Call initialize_inferiors. Adjust to use ptids, killing
14202 and detaching from all inferiors. Handle multiprocess packet
14203 variants.
14204 * linux-low.h: Include gdb_proc_service.h.
14205 (struct process_info_private): New.
14206 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14207 <lwpid_of>: Use ptid_get_lwp.
14208 (get_lwp_thread): Adjust.
14209 (struct lwp_info): Add `dead' member.
14210 (find_lwp_pid): Declare.
14211 * linux-low.c (thread_db_active): Delete.
14212 (new_inferior): Adjust comment.
14213 (inferior_pid): Delete.
14214 (linux_add_process): New.
14215 (handle_extended_wait): Adjust.
14216 (add_lwp): Change unsigned long to ptid.
14217 (linux_create_inferior): Add process to processes table. Adjust
14218 to use ptids. Don't set new_inferior here.
14219 (linux_attach_lwp): Rename to ...
14220 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14221 it. Adjust to use ptids.
14222 (linux_attach_lwp): New.
14223 (linux_attach): Add process to processes table. Don't set
14224 new_inferior here.
14225 (struct counter): New.
14226 (second_thread_of_pid_p, last_thread_of_process_p): New.
14227 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14228 multiple processes.
14229 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14230 processes. Remove process from process table.
14231 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14232 to multiple processes.
14233 (any_thread_of): New.
14234 (linux_detach): Add `pid' argument, and handle it. Remove process
14235 from processes table.
14236 (linux_join): Add `pid' argument. Handle it.
14237 (linux_thread_alive): Change unsighed long argument to ptid_t.
14238 Consider dead lwps as not being alive.
14239 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14240 threads we're not interested in.
14241 (same_lwp, find_lwp_pid): New.
14242 (linux_wait_for_lwp): Change `pid' argument's type from int to
14243 ptid_t. Adjust.
14244 (linux_wait_for_event): Rename to ...
14245 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14246 from int to ptid_t. Adjust.
14247 (linux_wait_for_event): New.
14248 (linux_wait_1): Add `ptid' argument. Change return type to
14249 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14250 that exit from the process table.
14251 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14252 Adjust.
14253 (mark_lwp_dead): New.
14254 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14255 stopping all threads, mark its main lwp as dead.
14256 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14257 ptids.
14258 (fetch_register, usr_store_inferior_registers)
14259 (regsets_fetch_inferior_registers)
14260 (regsets_store_inferior_registers, linux_read_memory)
14261 (linux_write_memory): Inline `inferior_pid'.
14262 (linux_look_up_symbols): Adjust to use per-process
14263 `thread_db_active'.
14264 (linux_request_interrupt): Adjust to use ptids.
14265 (linux_read_auxv): Inline `inferior_pid'.
14266 (initialize_low): Don't reference thread_db_active.
14267 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14268 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14269 (ps_getpid): Return the pid of the current inferior.
14270 * thread-db.c (proc_handle, thread_agent): Delete.
14271 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14272 per-process data.
14273 (find_one_thread): Change argument type to ptid_t. Adjust to
14274 per-process data.
14275 (maybe_attach_thread): Adjust to per-process data and ptids.
14276 (thread_db_find_new_threads): Ditto.
14277 (thread_db_init): Ditto.
14278 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14279 processes table. Adjust to use ptids.
14280 (spu_kill, spu_detach): Adjust interface. Remove process from
14281 processes table.
14282 (spu_join, spu_thread_alive): Adjust interface.
14283 (spu_wait): Adjust interface. Remove process from processes
14284 table. Adjust to use ptids.
14285 * win32-low.c (current_inferior_tid): Delete.
14286 (current_inferior_ptid): New.
14287 (debug_event_ptid): New.
14288 (thread_rec): Take a ptid. Adjust.
14289 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14290 (child_delete_thread): Ditto.
14291 (do_initial_child_stuff): Add `attached' argument. Add process to
14292 processes table.
14293 (child_fetch_inferior_registers, child_store_inferior_registers):
14294 Adjust.
14295 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14296 (win32_attach): Pass 1 to do_initial_child_stuff.
14297 (win32_kill): Adjust interface. Remove process from processes
14298 table.
14299 (win32_detach): Ditto.
14300 (win32_join): Adjust interface.
14301 (win32_thread_alive): Take a ptid.
14302 (win32_resume): Adjust to use ptids.
14303 (get_child_debug_event): Ditto.
14304 (win32_wait): Adjust interface. Remove exiting process from
14305 processes table.
14306
bd99dc85
PA
143072009-04-01 Pedro Alves <pedro@codesourcery.com>
14308
14309 Non-stop mode support.
14310
14311 * server.h (non_stop): Declare.
14312 (gdb_client_data, handler_func): Declare.
14313 (delete_file_handler, add_file_handler, start_event_loop):
14314 Declare.
14315 (handle_serial_event, handle_target_event, push_event)
14316 (putpkt_notif): Declare.
14317 * target.h (enum resume_kind): New.
14318 (struct thread_resume): Replace `step' field by `kind' field.
14319 (TARGET_WNOHANG): Define.
14320 (struct target_ops) <wait>: Add `options' argument.
14321 <supports_non_stop, async, start_non_stop>: New fields.
14322 (target_supports_non_stop, target_async): New.
14323 (start_non_stop): Declare.
14324 (mywait): Add `options' argument.
14325 * target.c (mywait): Add `options' argument. Print child exit
14326 notifications here.
14327 (start_non_stop): New.
14328 * server.c (non_stop, own_buf, mem_buf): New globals.
14329 (struct vstop_notif): New.
14330 (notif_queue): New global.
14331 (queue_stop_reply, push_event, discard_queued_stop_replies)
14332 (send_next_stop_reply): New.
14333 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14334 interface changes.
14335 (attach_inferior): In non-stop mode, don't wait for the target
14336 here.
14337 (handle_general_set): Handle QNonStop.
14338 (handle_query): When handling qC, return the current general
14339 thread, instead of the first thread of the list.
14340 (handle_query): If the backend supports non-stop mode, include
14341 QNonStop+ in the qSupported query response.
14342 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14343 and non-stop mode.
14344 (handle_v_attach, handle_v_run): Handle non-stop mode.
14345 (handle_v_stopped): New.
14346 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14347 (myresume): Adjust to use resume_kind. Handle non-stop.
14348 (queue_stop_reply_callback): New.
14349 (handle_status): Handle non-stop mode.
14350 (main): Clear non_stop flag on reconnection. Use the event-loop.
14351 Refactor serial protocol handling from here ...
14352 (process_serial_event): ... to this new function. When GDB
14353 selects any thread, select one here. In non-stop mode, wait until
14354 GDB acks all pending events before exiting.
14355 (handle_serial_event, handle_target_event): New.
14356 * remote-utils.c (remote_open): Install remote_desc in the event
14357 loop.
14358 (remote_close): Remove remote_desc from the event loop.
14359 (putpkt_binary): Rename to...
14360 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14361 (putpkt_binary): New as wrapper around putpkt_binary_1.
14362 (putpkt_notif): New.
14363 (prepare_resume_reply): In non-stop mode, don't change the
14364 general_thread.
14365 * event-loop.c: New.
14366 * Makefile.in (OBJ): Add event-loop.o.
14367 (event-loop.o): New rule.
14368
14369 * linux-low.h (pid_of): Moved here.
14370 (lwpid_of): New.
14371 (get_lwp_thread): Use lwpid_of.
14372 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14373 * linux-low.c (pid_of): Delete.
14374 (inferior_pid): Use lwpid_of.
14375 (linux_event_pipe): New.
14376 (target_is_async_p): New.
14377 (delete_lwp): New.
14378 (handle_extended_wait): Use lwpid_of.
14379 (add_lwp): Don't set lwpid field.
14380 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14381 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14382 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14383 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14384 first. Adjust to linux_wait_for_event interface changes. Use
14385 lwpid_of.
14386 (linux_detach): Don't delete the main lwp here.
14387 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14388 (status_pending_p): Don't consider explicitly suspended lwps.
14389 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14390 pointer. Add OPTIONS argument. Change return type to int. Use
14391 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14392 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14393 pointer. Add status pointer argument. Return a pid instead of a
14394 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14395 changes. In non-stop mode, don't switch to a random thread.
14396 (linux_wait): Rename to...
14397 (linux_wait_1): ... this. Add target_options argument, and handle
14398 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14399 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14400 clean exit and signal exit code. Don't stop all threads in
14401 non-stop mode. In all-stop mode, only stop all threads when
14402 reporting a stop to GDB. Handle explicit thread stop requests.
14403 (async_file_flush, async_file_mark): New.
14404 (linux_wait): New.
14405 (send_sigstop): Use lwpid_of.
14406 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14407 interface changes. In non-stop mode, don't switch to a random
14408 thread.
14409 (linux_resume_one_lwp): Use lwpid_of.
14410 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14411 (linux_resume_one_thread): ... this. Handle resume_stop. In
14412 non-stop mode, don't look for pending flag in all threads.
14413 (resume_status_pending_p): Don't consider explicitly suspended
14414 threads.
14415 (my_waitpid): Reimplement. Emulate __WALL.
14416 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14417 Use lwpid_of.
14418 (sigchld_handler, linux_supports_non_stop, linux_async)
14419 (linux_start_non_stop): New.
14420 (linux_target_ops): Register linux_supports_non_stop, linux_async
14421 and linux_start_non_stop.
14422 (initialize_low): Install SIGCHLD handler.
14423 * thread-db.c (thread_db_create_event, find_one_thread)
14424 (thread_db_get_tls_address): Use lwpid_of.
14425 * win32-low.c (win32_detach): Adjust to use resume_kind.
14426 (win32_wait): Add `options' argument.
14427 * spu-low.c (spu_resume): Adjust to use resume_kind.
14428 (spu_wait): Add `options' argument.
14429
5b1c542e
PA
144302009-04-01 Pedro Alves <pedro@codesourcery.com>
14431
14432 Decouple target code from remote protocol.
14433
14434 * target.h (enum target_waitkind): New.
14435 (struct target_waitstatus): New.
14436 (struct target_ops) <wait>: Return an unsigned long. Take a
14437 target_waitstatus pointer instead of a char pointer.
14438 (mywait): Likewise.
14439 * target.c (mywait): Change prototype to return an unsigned long.
14440 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14441 * server.h (thread_from_wait, old_thread_from_wait): Delete
14442 declarations.
14443 (prepare_resume_reply): Change prototype to take a
14444 target_waitstatus.
14445 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14446 (last_status, last_ptid): New.
14447 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14448 pid instead of a signal.
14449 (attach_inferior): Remove "status" and "signal" parameters.
14450 Adjust.
14451 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14452 not as an address.
14453 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14454 (handle_v_requests, myresume): Remove "status" and "signal"
14455 parameters. Adjust.
14456 (handle_status): New.
14457 (main): Delete local `status'. Adjust.
14458 * remote-utils.c: Include target.h.
14459 (prepare_resume_reply): Change prototype to take a
14460 target_waitstatus. Adjust.
14461
14462 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14463 interface.
14464 * spu-low.c (spu_wait): Adjust.
14465 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14466 Delete.
14467 (win32_wait): Adjust.
14468
2bd7c093
PA
144692009-04-01 Pedro Alves <pedro@codesourcery.com>
14470
14471 * target.h (struct thread_resume): Delete leave_stopped member.
14472 (struct target_ops): Add a `n' argument to the `resume' callback.
14473 * server.c (start_inferior): Adjust.
14474 (handle_v_cont, myresume): Adjust.
14475 * linux-low.c (check_removed_breakpoint): Adjust to resume
14476 interface change, and to removed leave_stopped field.
14477 (resume_ptr): Delete.
14478 (struct thread_resume_array): New.
14479 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14480 resume interface change.
14481 (linux_continue_one_thread, linux_queue_one_thread)
14482 (resume_status_pending_p): Check if the resume field is NULL
14483 instead of checking the leave_stopped member.
14484 (linux_resume): Adjust to the target resume interface change.
14485 * spu-low.c (spu_resume): Adjust to the target resume interface
14486 change.
14487 * win32-low.c (win32_detach, win32_resume): Ditto.
14488
c35fafde
PA
144892009-04-01 Pedro Alves <pedro@codesourcery.com>
14490
14491 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14492 flag.
14493 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14494 pending.
14495 (linux_continue_one_thread): Only preserve the stepping flag if
14496 there's a pending breakpoint.
14497
0a59d50b
PA
144982009-03-31 Pedro Alves <pedro@codesourcery.com>
14499
14500 * server.c (main): After the inferior having exited, call
14501 remote_close before exiting gdbserver.
14502
f04c6d38
TJB
145032009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14504
14505 Fix size of FPSCR in Power 7 processors.
14506 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14507 (PPC_FEATURE_HAS_DFP): New #define.
14508 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14509 size of the FPSCR.
14510
78e5cee6
PA
145112009-03-23 Pedro Alves <pedro@codesourcery.com>
14512
14513 * server.c (handle_query) Whitespace and formatting.
14514
1b3f6016
PA
145152009-03-22 Pedro Alves <pedro@codesourcery.com>
14516
14517 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14518 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14519 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14520 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14521 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14522 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14523 Makefile.in, configure.ac: Fix whitespace throughout.
14524 * configure: Regenerate.
14525
a07b2135
PA
145262009-03-22 Pedro Alves <pedro@codesourcery.com>
14527
14528 * inferiors.c (find_inferior): Make it safe for the callback
14529 function to delete the currently iterated inferior.
14530
67cc2626
PA
145312009-03-22 Pedro Alves <pedro@codesourcery.com>
14532
14533 * Makefile.in (linuw_low_h): Move higher.
14534 (thread-db.o): Depend on $(linux_low_h).
14535
54a0b537
PA
145362009-03-17 Pedro Alves <pedro@codesourcery.com>
14537
14538 Rename "process" to "lwp" throughout.
14539
14540 * linux-low.c (all_processes): Rename to...
14541 (all_lwps): ... this.
14542 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14543 (add_process): Rename to ...
14544 (add_lwp): ... this. Adjust.
14545 (linux_create_inferior): Adjust.
14546 (linux_attach_lwp): Adjust.
14547 (linux_attach): Adjust.
14548 (linux_kill_one_process): Rename to ...
14549 (linux_kill_one_lwp): ... this. Adjust.
14550 (linux_kill): Adjust.
14551 (linux_detach_one_process): Rename to ...
14552 (linux_detach_one_lwp): ... this. Adjust.
14553 (linux_detach): Adjust.
14554 (check_removed_breakpoint): Adjust.
14555 (status_pending_p): Adjust.
14556 (linux_wait_for_process): Rename to ...
14557 (linux_wait_for_lwp): ... this. Adjust.
14558 (linux_wait_for_event): Adjust.
14559 (send_sigstop): Adjust.
14560 (wait_for_sigstop): Adjust.
14561 (stop_all_processes): Rename to ...
14562 (stop_all_lwps): ... this.
14563 (linux_resume_one_process): Rename to ...
14564 (linux_resume_one_lwp): ... this. Adjust.
14565 (linux_set_resume_request, linux_continue_one_thread)
14566 (linux_queue_one_thread, resume_status_pending_p)
14567 (usr_store_inferior_registers, regsets_store_inferior_registers)
14568 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14569 Adjust.
14570 * linux-low.h (get_process): Rename to ...
14571 (get_lwp): ... this. Adjust.
14572 (get_thread_process): Rename to ...
14573 (get_thread_lwp): ... this. Adjust.
14574 (get_process_thread): Rename to ...
14575 (get_lwp_thread): ... this. Adjust.
14576 (struct process_info): Rename to ...
14577 (struct lwp_info): ... this.
14578 (all_processes): Rename to ...
14579 (all_lwps): ... this.
14580 * proc-service.c (ps_lgetregs): Adjust.
14581 * thread-db.c (thread_db_create_event, find_one_thread)
14582 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14583
0b16c5cf
PA
145842009-03-14 Pedro Alves <pedro@codesourcery.com>
14585
14586 * server.c (handle_query): Handle "qAttached".
14587
32de4b9d
NS
145882009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14589
14590 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14591 GPLv3, update license URL.
14592
2aecd87f
DE
145932009-03-01 Doug Evans <dje@google.com>
14594
93efd302 14595 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14596 (server_h): Add gdb_signals.h.
14597 (signals.o): Update.
14598 * server.h (target_signal_from_host,target_signal_to_host_p)
14599 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14600
86b1f9c5
PM
146012009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14602
14603 * remote-utils.c (getpkt): Also generate remote-debug
14604 information if noack_mode is set.
14605
4aa995e1
PA
146062009-02-06 Pedro Alves <pedro@codesourcery.com>
14607
14608 * server.c (handle_query): Report qXfer:siginfo:read and
14609 qXfer:siginfo:write as supported and handle them.
14610 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14611 * linux-low.c (linux_xfer_siginfo): New.
14612 (linux_target_ops): Set it.
14613
62709adf
PA
146142009-01-26 Pedro Alves <pedro@codesourcery.com>
14615
14616 * server.c (gdbserver_usage): Mention --remote-debug.
14617 (main): Accept '--remote-debug' switch.
14618
aef93bd7
DE
146192009-01-18 Doug Evans <dje@google.com>
14620
14621 * regcache.c (new_register_cache): No need to check result of xcalloc.
14622 * server.c (handle_search_memory): Back out calls to xmalloc,
14623 result is checked and error is returned to user upon failure.
14624 (handle_query): Ditto. Add more checks for result of malloc.
14625 (handle_v_cont): Check result of malloc, report error back to
14626 user upon failure.
14627 (handle_v_run): Ditto. Call freeargv.
14628 * server.h (freeargv): Declare.
14629 * utils.c (freeargv): New fn.
14630
54363045
DE
146312009-01-15 Doug Evans <dje@google.com>
14632
f626972c
DE
14633 * gdbreplay.c (perror_with_name): Make arg const char *.
14634 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14635 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14636 * utils.c (perror_with_name): Make arg const char *.
54363045 14637
18aae699
PA
146382009-01-14 Pedro Alves <pedro@codesourcery.com>
14639
14640 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14641 when handling a EXIT_PROCESS_DEBUG_EVENT.
14642
ff703abe
JB
146432009-01-06 Joel Brobecker <brobecker@adacore.com>
14644
14645 * gdbreplay.c (gdbreplay_version): Update copyright year.
14646 * server.c (gdbserver_version): Likewise.
14647
f21cc1a2 146482009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14649
14650 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14651 (handle_extended_wait): Improve comment.
0e21c1ec 14652
bca929d3
DE
146532008-12-13 Doug Evans <dje@google.com>
14654
14655 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14656 * server.h (ATTR_MALLOC): New macro.
14657 (xmalloc,xcalloc,xstrdup): Declare.
14658 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14659 * inferiors.c: Ditto.
14660 * linux-low.c: Ditto.
14661 * mem-break.c: Ditto.
14662 * regcache.c: Ditto.
14663 * remote-utils.c: Ditto.
14664 * server.c: Ditto.
14665 * target.c: Ditto.
14666 * win32-low.c: Ditto.
14667
97438e3f
DE
146682008-12-12 Doug Evans <dje@google.com>
14669
896c7fbb
DE
14670 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14671 in debugging printf.
14672
97438e3f
DE
14673 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14674
e3b886f8
DE
146752008-12-09 Doug Evans <dje@google.com>
14676
14677 * linux-low.h (struct process_info): Delete member tid, unused.
14678 * thread-db.c (find_one_thread): Update.
14679 (maybe_attach_thread): Update.
14680
07e059b5
VP
146812008-12-02 Pedro Alves <pedro@codesourcery.com>
14682
889bf7c5
PA
14683 * target.h (struct target_ops): Add qxfer_osdata member.
14684 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14685 and dirent.h.
14686 (linux_qxfer_osdata): New functions.
14687 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14688 callback.
14689 * server.c (handle_query): Handle "qXfer:osdata:read:".
14690 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14691 (buffer_xml_printf): New functions.
14692 * server.h (struct buffer): New.
14693 (buffer_grow_str, buffer_grow_str0): New macros.
14694 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14695 (buffer_xml_printf): Declare.
07e059b5 14696
4cab47ab
DE
146972008-11-24 Doug Evans <dje@google.com>
14698
14699 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14700
f142445f
DJ
147012008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14702
14703 * server.c (handle_v_run): Always use the supplied argument list.
14704
d0107bb6 147052008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14706
d0107bb6
BW
14707 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14708 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14709
2c4ad781
TJB
147102008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14711
14712 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14713 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14714 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14715 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14716 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14717 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14718 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14719 XML target descriptions.
14720 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14721 when inferior is running on an ISA 2.05 or later processor. Add
14722 special case to return offset for full 64-bit slot of FPSCR when
14723 in 32-bits.
14724
dfb64f85
DJ
147252008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14726
14727 * Makefile.in (SFILES, clean): Added sparc64 files.
14728 (reg-sparc64.o, reg-sparc64.c): New.
14729 * configure.srv (sparc*-*-linux*): New configuration.
14730 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14731 syscall arguments for SPARC.
14732 (regsets_store_inferior_registers): Likewise.
14733 * linux-sparc-low.c: New file.
14734
66b6e1dd
DE
147352008-10-21 Doug Evans <dje@google.com>
14736
14737 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14738 (READLINE_DIR,READLINE_DEP): Delete.
14739 (INTERNAL_CFLAGS): Update.
14740 (LINTFLAGS): Update.
14741
9b710a42
PA
147422008-10-10 Pedro Alves <pedro@codesourcery.com>
14743
14744 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14745 whole argv from the last run, not just argv[0].
14746
5822d809
PA
147472008-09-08 Pedro Alves <pedro@codesourcery.com>
14748
14749 * regcache.c (new_register_cache): Return NULL if the register
14750 cache size isn't known yet.
14751 (free_register_cache): Avoid dereferencing a NULL regcache.
14752
74aac56f
DJ
147532008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14754
14755 * configure.srv: Merge MIPS and MIPS64.
14756
400b20f5
MR
147572008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14758
14759 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14760
677c5bb1
LM
147612008-08-18 Luis Machado <luisgpm@br.ibm.com>
14762
14763 * Makefile.in: Add required vsx dependencies.
14764
14765 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14766 Declare init_registers_powerpc_vsx32l.
14767 Declare init_registers_powerpc_vsx64l.
14768 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14769 (ppc_arch_setup): Check for VSX in hwcap.
14770 (ppc_fill_vsxregset): New function.
14771 (ppc_store_vsxregset): New function.
14772 Add new VSX entry in regset_info target_regsets.
14773
14774 * configure.srv: Add new VSX dependencies.
14775
a6f3e723
SL
147762008-08-12 Pedro Alves <pedro@codesourcery.com>
14777
14778 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14779 (remote_open): Set or clear transport_is_reliable.
14780 (putpkt_binary): Don't expect acks in noack mode.
14781 (getpkt): Don't send ack/nac in noack mode.
14782 * server.c (handle_general_set): Handle QStartNoAckMode.
14783 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14784 qSupported.
14785 (main): Reset noack_mode on every connection.
14786 * server.h (noack_mode): Declare.
14787
a417dc56
RW
147882008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14789
14790 * Makefile.in (GDBREPLAY_OBS): New variable.
14791 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14792
3221518c
UW
147932008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14794 Daniel Jacobowitz <dan@codesourcery.com>
14795
14796 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14797 (usr_store_inferior_registers): Likewise.
14798 (regsets_store_inferior_registers): Likewise.
14799
ec56be1b
PA
148002008-07-31 Rolf Jansen <rj@surtec.com>
14801 Pedro Alves <pedro@codesourcery.com>
14802
14803 * configure.ac: Check for memmem declaration.
14804 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14805 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14806 (disable_packet_qfThreadInfo): Unconditionally compile.
14807 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14808 * configure, config.in: Regenerate.
14809
2fe5e3ff
DE
148102008-07-28 Doug Kwan <dougkwan@google.com>
14811
14812 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14813 (linux_write_memory): Remove declaration of errno.
14814
836acd6d
UW
148152008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14816
14817 * linux-low.c (handle_extended_wait): Do not use "status"
14818 variable uninitialized.
14819
aeba519e
PA
148202008-07-07 Pedro Alves <pedro@codesourcery.com>
14821
14822 * server.c (handle_v_attach): Inhibit reporting dll changes.
14823
db42f210
PA
148242008-06-27 Pedro Alves <pedro@codesourcery.com>
14825
14826 * remote-utils.c (prepare_resume_reply): If requested, don't
14827 output "thread:TID" in the T stop reply.
14828
14829 * server.c (disable_packet_vCont, disable_packet_Tthread)
14830 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14831 (handle_query): If requested, disable support for qC, qfThreadInfo
14832 and qsThreadInfo.
14833 (handle_v_requests): If requested, disable support for vCont.
14834 (gdbserver_show_disableable): New.
14835 (main): Handle --disable-packet and --disable-packet=LIST.
14836
14837 * server.h (disable_packet_vCont, disable_packet_Tthread)
14838 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14839
8e4c5421
CD
148402008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14841
14842 * server.c (gdbserver_usage): Mention --version.
14843
6e23a804
DJ
148442008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14845
14846 * Makefile.in (gdbreplay.o): New rule.
14847
90aa6a40
JM
148482008-06-06 Joseph Myers <joseph@codesourcery.com>
14849
14850 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14851 message, not gdbserver.
14852
c16158bc 148532008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14854 Nathan Sidwell <nathan@codesourcery.com>
14855 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14856
14857 * acinclude.m4: Include ../../config/acx.m4.
14858 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14859 * configure, config.in: Regenerate.
14860 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14861 * server.c (gdbserver_version): Print PKGVERSION.
14862 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14863 (main): Adjust gdbserver_usage calls.
14864 * gdbreplay.c (version, host_name): Add declarations.
14865 (gdbreplay_version, gdbreplay_usage): New.
14866 (main): Accept --version and --help options.
14867
aeb75bf5
DJ
148682008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14869
14870 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14871 (arm_breakpoint_at): Handle Thumb.
14872 (the_low_target): Add comment.
14873
76b233dd
UW
148742008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14875
14876 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14877
08388c79
DE
148782008-05-09 Doug Evans <dje@google.com>
14879
a3c83fae
DE
14880 * server.h (decode_search_memory_packet): Declare.
14881 * remote-utils.c (decode_search_memory_packet): New fn.
14882 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14883 (handle_search_memory): New fn.
14884 (handle_query): Process qSearch:memory packets.
14885
bb9c3d36
UW
148862008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14887
14888 * regcache.c (registers_length): Remove.
14889 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14890 full register packet.
14891 * regcache.h (registers_length): Remove prototype.
14892 * server.h (PBUFSIZ): Define to 16384.
14893
7284e1be
UW
148942008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14895
14896 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14897 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14898 powerpc-64l.o, and powerpc-altivec64l.o.
14899 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14900 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14901 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14902 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14903 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14904 to srv_xmlfiles.
14905
14906 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14907 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14908 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14909 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14910 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14911 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14912 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14913 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14914 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14915 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14916 (clean): Update.
14917
14918 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14919 (init_registers_powerpc_32l): ... this new prototype.
14920 (init_registers_powerpc_32): Remove, replace by ...
14921 (init_registers_powerpc_altivec32l): ... this new prototype.
14922 (init_registers_powerpc_e500): Remove, replace by ...
14923 (init_registers_powerpc_e500l): ... this new prototype.
14924 (init_registers_ppc64): Remove, replace by ...
14925 (init_registers_powerpc_64l): ... this new prototype.
14926 (init_registers_powerpc_64): Remove, replace by ...
14927 (init_registers_powerpc_altivec64l): ... this new prototype.
14928 (ppc_num_regs): Set to 73.
14929 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14930 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14931 (ppc_cannot_store_register): Handle orig_r3 and trap.
14932 (ppc_arch_setup): Update init_registers_... calls.
14933 (ppc_fill_gregset): Handle orig_r3 and trap.
14934
14935 * inferiors.c (clear_inferiors): Reset current_inferior.
14936
fdc59709
PB
149372008-04-23 Paolo Bonzini <bonzini@gnu.org>
14938
889bf7c5
PA
14939 * acinclude.m4: Add override.m4.
14940 * configure: Regenerate.
fdc59709 14941
c9b2f845
UW
149422008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14943
14944 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14945 initial call to init_register_ppc64.
14946
550512b8
UW
149472008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14948
43aaf8b6
PA
14949 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14950 single powerpc*-*-linux* case.
550512b8
UW
14951 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14952
b6430ec3
UW
149532008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14954
14955 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14956 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14957 from reg_xmlfiles.
14958 * linux-ppc-low.c: Include <elf.h>.
14959 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14960 (ppc_hwcap): New global variable.
14961 (ppc_regmap): Remove __SPE__ #ifdef sections.
14962 (ppc_regmap_e500): New global variable.
14963 (ppc_cannot_store_register): Update __SPE__ special case.
14964 (ppc_get_hwcap): New function.
14965 (ppc_arch_setup): Use it to determine whether inferior supports
14966 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14967 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14968 Do not access registers if target does not support AltiVec.
14969 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14970 Do not access registers if target does not support SPE.
14971 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14972
52fa2412
UW
149732008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14974
14975 * linux-low.c (disabled_regsets, num_regsets): New.
14976 (use_regsets_p): Delete.
14977 (linux_wait_for_process): Clear disabled_regsets.
14978 (regsets_fetch_inferior_registers): Check and set it.
14979 (regsets_store_inferior_registers): Likewise.
14980 (linux_fetch_registers, linux_store_registers): Do not use
14981 use_regsets_p.
14982 (initialize_low): Allocate disabled_regsets.
14983
e28b3332
DJ
149842008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14985
14986 * Makefile.in (LIBOBJS): New.
14987 (OBS): Use LIBOBJS.
14988 (memmem.o): New rule.
14989 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14990 * configure: Regenerated.
14991
4536995d
UW
149922008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14993
14994 * server.c (handle_query): Never return "unsupported" for
14995 qXfer:features:read queries.
14996
221c031f
UW
149972008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14998
14999 * server.c (get_features_xml): Fix inverted condition.
15000 (handle_query): Always support qXfer:feature:read.
15001
ccd213ac
DJ
150022008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15003
15004 * server.c (wrapper_argv): New.
15005 (start_inferior): Handle wrapper_argv. If set, expect an extra
15006 trap.
15007 (gdbserver_usage): Document --wrapper.
15008 (main): Parse --wrapper.
15009
6fe305f7
UW
150102008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15011
15012 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15013 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15014 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15015 (ppc_set_pc): Likewise.
15016 (ppc_arch_setup): New function.
15017 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15018 of collect_register.
889bf7c5 15019 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15020
5b0a002e
UW
150212008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15022
15023 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15024 instead of linux-ppc64-low.o.
15025 * linux-ppc64-low.c: Remove file.
15026 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15027 (linux-ppc64-low.o): Remove rule.
15028
15029 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15030 (init_registers_powerpc_64): Likewise.
15031 (ppc_regmap): Conditionally define depending on __powerpc64__.
15032 (ppc_cannot_store_register): Do not special-case "fpscr" when
15033 compiled on __powerpc64__.
15034 (ppc_collect_ptrace_register): New function.
15035 (ppc_supply_ptrace_register): New function.
15036 (ppc_breakpoint): Change type to "unsigned int".
15037 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15038 (the_low_target): Conditionally provide initializers for the
889bf7c5 15039 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15040 collect_ptrace_register and supply_ptrace_register members.
15041
9b4b61c8
UW
150422008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15043
15044 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15045 * server.c (gdbserver_xmltarget): Define.
15046 (get_features_xml): Use it to replace "target.xml" and arch_string.
15047
15048 * configure.srv: Remove srv_xmltarget. Add XML files that were
15049 mentioned there to srv_xmlfiles instead. Remove conditional tests
15050 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15051 srv_xmlfiles and srv_regobj to include all possible choices.
15052 * configure.ac (srv_xmltarget): Remove.
15053 (srv_xmlfiles): Do not add "target.xml".
15054 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15055 checks for supplementary target information.
15056 * configure: Regenerate.
15057 * Makefile.in (XML_TARGET): Remove.
15058 (target.xml): Remove rule.
15059 (clean): Do not clean up target.xml.
15060 (.PRECIOUS): Do not mention target.xml.
15061
15062 * target.h (struct target_ops): Remove arch_string member.
15063 * linux-low.c (linux_arch_string): Remove.
15064 (linux_target_ops): Remove arch_string initializer.
15065 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15066 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15067 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15068 * spu-low.c (spu_arch_string): Remove.
15069 (spu_target_ops): Remove arch_string initializer.
15070 * win32-low.c (win32_arch_string): Remove.
15071 (win32_target_ops): Remove arch_string initializer.
15072 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15073 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15074 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15075
ee1a7ae4
UW
150762008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15077
15078 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15079 by collect_ptrace_register and supply_ptrace_register hooks.
15080 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15081 instead of checking for the_low_target.left_pad_xfer.
15082 (usr_store_inferior_registers): Use collect_ptrace_register callback
15083 instead of checking for the_low_target.left_pad_xfer.
15084
15085 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15086 (s390_supply_ptrace_register): Likewise.
15087 (s390_fill_gregset): Call s390_collect_ptrace_register.
15088 (the_low_target): Update.
15089
15090 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15091 (ppc_supply_ptrace_register): Likewise.
15092 (the_low_target): Update.
15093
15094 * linux-i386-low.c (the_low_target): Update.
15095 * linux-x86-64-low.c (the_low_target): Update.
15096
d61ddec4
UW
150972008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15098
15099 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15100 reg-s390.o and reg-s390x.o.
15101
15102 * linux-low.c (new_inferior): New global variable.
15103 (linux_create_inferior, linux_attach): Set it.
15104 (linux_wait_for_process): Call the_low_target.arch_setup after the
15105 target has stopped for the first time.
15106 (initialize_low): Do not call the_low_target.arch_setup.
15107
15108 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15109 (s390_set_pc): Likewise.
15110 (s390_arch_setup): New function.
15111 (the_low_target): Use s390_arch_setup as arch_setup routine.
15112
15113 * regcache.c (realloc_register_cache): New function.
15114 (set_register_cache): Call it for each existing regcache.
15115
d05b4ac3
UW
151162008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15117
15118 * server.h (init_registers): Remove prototype.
15119
15120 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15121 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15122 instead of init_registers ().
15123 * linux-arm-low.c (init_registers_arm): Add prototype.
15124 (init_registers_arm_with_iwmmxt): Likewise.
15125 (the_low_target): Add initializer for arch_setup field.
15126 * linux-cris-low.c (init_registers_cris): Add prototype.
15127 (the_low_target): Add initializer for arch_setup field.
15128 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15129 (the_low_target): Add initializer for arch_setup field.
15130 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15131 (the_low_target): Add initializer for arch_setup field.
15132 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15133 (the_low_target): Add initializer for arch_setup field.
15134 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15135 (the_low_target): Add initializer for arch_setup field.
15136 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15137 (the_low_target): Add initializer for arch_setup field.
15138 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15139 (init_registers_mips64_linux): Likewise.
15140 (the_low_target): Add initializer for arch_setup field.
15141 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15142 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15143 (the_low_target): Add initializer for arch_setup field.
15144 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15145 (init_registers_powerpc_64): Likewise.
15146 (the_low_target): Add initializer for arch_setup field.
15147 * linux-s390-low.c (init_registers_s390): Add prototype.
15148 (init_registers_s390x): Likewise.
15149 (the_low_target): Add initializer for arch_setup field.
15150 * linux-sh-low.c (init_registers_sh): Add prototype.
15151 (the_low_target): Add initializer for arch_setup field.
15152 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15153 (the_low_target): Add initializer for arch_setup field.
15154 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15155 (the_low_target): Add initializer for arch_setup field.
15156
15157 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15158 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15159 instead of init_registers ().
15160 * win32-arm-low.c (init_registers_arm): Add prototype.
15161 (the_low_target): Add initializer for arch_setup field.
15162 * win32-i386-low.c (init_registers_i386): Add prototype.
15163 (the_low_target): Add initializer for arch_setup field.
15164
15165 * spu-low.c (init_registers_spu): Add prototype.
15166 (initialize_low): Call initialie_registers_spu () instead of
15167 initialize_registers ().
15168
fd96d250
PA
151692008-02-19 Pedro Alves <pedro@codesourcery.com>
15170
15171 * server.c (handle_v_requests): When handling the vRun and vAttach
15172 packets, if already debugging a process, don't kill it. Return an
15173 error instead.
15174
d41b6bb4
DJ
151752008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15176
15177 * server.c (handle_query): Correct length check.
15178
5ac588cf
PA
151792008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15180
15181 * win32-low.c (do_initial_child_stuff): Add process handle
15182 parameter. Set current_process_handle and current_process_id from the
15183 parameters. Clear globals.
15184 (win32_create_inferior): Don't set current_process_handle and
15185 current_process_id here. Instead pass them on the call to
15186 do_initial_child_stuff.
15187 (win32_attach): Likewise.
15188 (win32_clear_inferiors): New.
15189 (win32_kill): Don't close the current process handle or the
15190 current thread handle here. Instead call win32_clear_inferiors.
15191 (win32_detach): Don't open a new handle to the process. Call
15192 win32_clear_inferiors.
15193 (win32_join): Don't rely on current_process_handle; open a new
15194 handle using the process id.
15195 (win32_wait): Call win32_clear_inferiors when the inferior process
15196 has exited.
15197
ecd7ecbc
DJ
151982008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15199
15200 * server.c (monitor_show_help): Add "exit".
15201
1525d545
MG
152022008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15203
ecd7ecbc 15204 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15205 (clean): Add reg-xtensa.c.
15206 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15207 * configure.srv (xtensa*-*-linux*) New target.
15208 * linux-xtensa-low.c: New.
15209 * xtensa-xtregs.c: New.
1525d545 15210
59a016f0
PA
152112008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15212
15213 * hostio.c: Don't include errno.h.
15214 (errno_to_fileio_errno): Move to hostio-errno.
15215 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15216 error number outputting to the target->hostio_last_error callback.
15217 (hostio_packet_error): Use FILEIO_EINVAL directly.
15218 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15219 calls to hostio_error.
15220 * hostio-errno.c: New.
15221 * server.h (hostio_last_error_from_errno): Declare.
15222 * target.h (target_ops): Add hostio_last_error member.
15223 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15224 as hostio_last_error handler.
889bf7c5 15225 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15226 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15227 (wince_hostio_last_error): New functions.
15228 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15229 as hostio_last_error handler.
15230 (win32_target_ops) [!_WIN32_WCE]: Register
15231 hostio_last_error_from_errno as hostio_last_error handler.
15232 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15233 (hostio-errno.o): New rule.
15234 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15235 * configure.srv (srv_hostio_err_objs): New variable. Default to
15236 hostio-errno.o.
15237 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15238 * configure: Regenerate.
15239
2d717e4f
DJ
152402008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15241
15242 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15243 (linux_kill, linux_detach): Clean up the process list.
15244 * remote-utils.c (remote_open): Improve port number parsing.
15245 (putpkt_binary, input_interrupt): Only send interrupts if the target
15246 is running.
15247 * server.c (extended_protocol): Make static.
15248 (attached): Define earlier.
15249 (exit_requested, response_needed, program_argv): New variables.
15250 (target_running): New.
15251 (start_inferior): Clear attached here.
15252 (attach_inferior): Set attached here.
15253 (require_running): Define.
15254 (handle_query): Use require_running and target_running. Implement
15255 "monitor exit".
15256 (handle_v_attach, handle_v_run): New.
15257 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15258 (gdbserver_usage): Update.
15259 (main): Redo argument parsing. Handle --debug and --multi. Handle
15260 --attach along with other options or after the port. Save
15261 program_argv. Support no initial program. Resynchronize
15262 communication with GDB after an error. Handle "monitor exit".
15263 Use require_running and target_running. Always allow the extended
15264 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15265 restart in extended mode.
15266 * README: Refer to the GDB manual. Update --attach usage.
15267
7407e2de
AS
152682007-12-20 Andreas Schwab <schwab@suse.de>
15269
15270 * linux-low.c (STACK_SIZE): Define.
15271 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15272 (linux_test_for_tracefork): Likewise.
15273
b65d95c5
DJ
152742007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15275
15276 * linux-low.c (linux_wait_for_event): Update messages. Do not
15277 reinsert auto-delete breakpoints.
15278 * mem-break.c (struct breakpoint): Change return type of handler to
15279 int.
15280 (set_breakpoint_at): Update handler type.
15281 (reinsert_breakpoint_handler): Return 1 instead of calling
15282 delete_breakpoint.
15283 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15284 setting a new one.
15285 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15286 * mem-break.h (set_breakpoint_at): Update handler type.
15287 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15288 * win32-low.c (auto_delete_breakpoint): New.
15289 (get_child_debug_event): Use it.
15290
4e799345
DJ
152912007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15292
15293 * configure.ac: Check for pread and pwrite.
15294 * hostio.c (handle_pread): Fall back to lseek and read.
15295 (handle_pwrite): Fall back to lseek and write.
15296 * config.in, configure: Regenerated.
15297
27524b67
DJ
152982007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15299
15300 * server.c (myresume): Add own_buf argument.
15301 (main): Update calls.
15302
a20d5e98
DJ
153032007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15304
15305 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15306 * remote-utils.c (remote_open): Do not call disable_async_io.
15307 (block_async_io): Delete.
15308 (unblock_async_io): Make static.
15309 (initialize_async_io): New.
15310 * server.c (handle_v_cont): Handle async I/O here.
15311 (myresume): Likewise. Move other common resume tasks here...
15312 (main): ... from here. Call initialize_async_io. Disable async
15313 I/O before the main loop.
15314 * server.h (initialize_async_io): Declare.
15315 (block_async_io, unblock_async_io): Delete prototypes.
15316 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15317
b79d787e
DJ
153182007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15319
15320 * remote-utils.c (readchar): Allow binary data in received messages.
15321
d97903b2
PA
153222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15323
15324 * win32-low.c (attaching): New global.
15325 (win32_create_inferior): Clear the `attaching' global.
15326 (win32_attach): Set the `attaching' global.
15327 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15328 attaching. Only set a breakpoint at the entry point if not
15329 attaching.
15330
311de423
PA
153312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15332
15333 * server.c (main): Don't report dll events on the initial
15334 connection on attaches.
15335
6c2d16d2
PA
153362007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15337
15338 * server.c (main): Relax numerical bases supported for the pid of
15339 the --attach command line argument.
15340
5ca906e6
PA
153412007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15342
15343 * win32-low.c (win32_attach): Call OpenProcess before
15344 DebugActiveProcess, not after. Add last error output to error
15345 call.
15346
9c6c8194
PA
153472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15348
15349 * win32-low.c (win32_get_thread_context)
15350 (win32_set_thread_context): New functions.
15351 (thread_rec): Use win32_get_thread_context.
15352 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15353 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15354 field.
15355
4d5d1aaa
PA
153562007-12-03 Leo Zayas
15357 Pedro Alves <pedro_alves@portugalmail.pt>
15358
15359 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15360 global variables.
15361 (child_add_thread): Minor cleanup.
15362 (child_continue): Resume artificially suspended threads before
15363 calling ContinueDebugEvent.
15364 (suspend_one_thread): New.
15365 (fake_breakpoint_event): New.
15366 (get_child_debug_event): Change return type to int. Check here if
15367 gdb sent an interrupt request. If a soft interrupt was requested,
15368 fake a breakpoint event. Return 0 if there is no event to handle,
15369 and 1 otherwise.
15370 (win32_wait): Don't check here if gdb sent an interrupt request.
15371 Ensure there is a valid event to handle.
15372 (win32_request_interrupt): Add soft interruption method as last
15373 resort.
15374
c436e841
PA
153752007-12-03 Leo Zayas
15376 Pedro Alves <pedro_alves@portugalmail.pt>
15377
15378 * win32-low.h (win32_thread_info): Add descriptions to the
15379 structure members. Replace `suspend_count' counter by a
15380 `suspended' flag.
15381 * win32-low.c (thread_rec): Update condition of when to get the
15382 context from the inferior. Rely on ContextFlags being set if it
15383 has already been retrieved. Only suspend the inferior thread if
15384 we haven't already. Warn if that fails.
15385 (continue_one_thread): s/suspend_count/suspended/. Only call
15386 ResumeThread once. Warn if that fails.
15387
e7b5fa67
PA
153882007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15389
15390 * win32-low.c (win32_wait): Don't read from the inferior when it
15391 has already exited.
15392
a385171d
PA
153932007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15394
15395 * Makefile.in (win32_low_h): New variable.
15396 (win32-low.o): Add dependency on $(win32_low_h).
15397 (win32-arm-low.o, win32-i386-low.o): New rules.
15398
f80c84b3
DJ
153992007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15400
15401 * hostio.c: Correct copyright year.
15402
a6b151f1
DJ
154032007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15404
15405 * Makefile.in (OBS): Add hostio.o.
15406 (hostio.o): New rule.
15407 * server.h (handle_vFile): Declare.
15408 * hostio.c: New file.
15409 * server.c (handle_v_requests): Take packet_len and new_packet_len
15410 for binary packets. Call handle_vFile.
15411 (main): Update call to handle_v_requests.
15412
f9387fc3
DJ
154132007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15414
15415 * linux-low.c: Include <sched.h>.
15416
51c2684e
DJ
154172007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15418
15419 * linux-low.c (linux_tracefork_grandchild): New.
15420 (linux_tracefork_child): Use clone.
15421 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15422
75f83163
JB
154232007-10-31 Joel Brobecker <brobecker@adacore.com>
15424
15425 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15426
da5898ce
DJ
154272007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15428
15429 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15430
24a09b5f
DJ
154312007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15432
15433 * inferiors.c (change_inferior_id): Delete.
15434 (add_pid_to_list, pull_pid_from_list): New.
15435 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15436 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15437 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15438 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15439 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15440 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15441 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15442 (using_threads): Always set to 1.
15443 (handle_extended_wait): New.
15444 (add_process): Do not set TID.
15445 (linux_create_inferior): Set must_set_ptrace_flags.
15446 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15447 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15448 (linux_thread_alive): Rename TID argument to LWPID.
15449 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15450 (linux_wait_for_event): Do not use TID or check using_threads. Update
15451 call to dead_thread_notify. Call handle_extended_wait.
15452 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15453 (send_sigstop): Delete sigstop_sent.
15454 (wait_for_sigstop): Avoid TID.
15455 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15456 (linux_test_for_tracefork): New.
15457 (linux_lookup_signals): Use thread_db_active and
15458 linux_supports_tracefork_flag.
15459 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15460 * linux-low.h (get_process_thread): Avoid TID.
15461 (struct process_ifo): Move thread_known and tid to the end. Remove
15462 sigstop_sent.
15463 (linux_attach_lwp, thread_db_init): Update prototypes.
15464 * server.h (change_inferior_id): Delete prototype.
15465 (add_pid_to_list, pull_pid_from_list): New prototypes.
15466 * thread-db.c (thread_db_use_events): New.
15467 (find_first_thread): Rename to...
15468 (find_one_thread): ...this. Update callers and messages. Do not
15469 call fatal. Check thread_db_use_events. Do not call
15470 change_inferior_id or new_thread_notify.
15471 (maybe_attach_thread): Update. Do not call new_thread_notify.
15472 (thread_db_init): Set thread_db_use_events. Check use_events.
15473 * utils.c (fatal, warning): Correct message prefix.
15474
30ed0a8f
DJ
154752007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15476
15477 * Makefile.in (clean): Remove new files.
15478 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15479 (powerpc-64.o, powerpc-64.c): New rules.
15480 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15481 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15482 with SPE.
15483 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15484 SPE targets.
15485 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15486 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15487 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15488 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15489 (target_regsets): Add AltiVec and SPE register sets.
15490 * configure.ac: Check for AltiVec and SPE.
15491 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15492 (ppc_fill_vrregset, ppc_store_vrregset): New.
15493 (target_regsets): Add AltiVec register set.
15494 * configure: Regenerated.
15495
fd462a61
DJ
154962007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15497
15498 * linux-low.c (O_LARGEFILE): Define.
15499 (linux_read_memory): Use /proc/PID/mem.
15500 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15501 * configure, config.in: Regenerated.
15502
69f223ed
DJ
155032007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15504
15505 * linux-low.c (linux_wait_for_event): Do not pass signals while
15506 single-stepping.
15507
aec18585
PA
155082007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15509
15510 * win32-low.c (create_process): New.
15511 (win32_create_inferior): Use create_process instead of
15512 CreateProcess. If create_process failed retry appending an ".exe"
15513 suffix. Store the GetLastError result immediatelly after
15514 create_process calls and use it on the call to error.
15515
34d86ddd
PA
155162007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15517
15518 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15519
5a0e3bd0
JB
155202007-08-23 Joel Brobecker <brobecker@adacore.com>
15521
15522 * configure.ac: Switch license to GPLv3.
15523
f88c79e6
MS
155242007-08-01 Michael Snyder <msnyder@access-company.com>
15525
15526 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15527
6b3d9b83
PA
155282007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15529
15530 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15531 typedef.
15532 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15533 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15534 CloseToolhelp32Snapshot.
15535 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15536 CloseToolhelp32Snapshot.
15537
c588c53c
MS
155382007-07-27 Michael Snyder <michael.snyder@access-company.com>
15539
15540 * server.c (main): Check for inferior exit before main loop.
15541
aa0403d9
PA
155422007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15543
15544 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15545 instead of on tmp_desc.
15546
255e7678
DJ
155472007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15548 Daniel Jacobowitz <dan@codesourcery.com>
15549
15550 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15551 (add_thread): Minor cleanups.
15552 (clear_inferiors): Move lower in the file. Clear the DLL
15553 list.
15554 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15555 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15556 (xml_escape_text): New.
15557 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15558 for qSupported.
15559 (handle_v_cont): Report errors.
15560 (gdbserver_version): Update.
15561 (main): Correct size of own_buf. Do not report initial DLL events.
15562 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15563 (unloaded_dll, xml_escape_text): New.
15564 * win32-low.c (enum target_waitkind): Update comments.
15565 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15566 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15567 (win32_EnumProcessModules, win32_GetModuleInformation)
15568 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15569 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15570 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15571 (win32_Module32First, win32_Module32Next, load_toolhelp)
15572 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15573 (get_child_debug_event): Handle DLL events.
15574 (win32_wait): Likewise.
15575
0d37add9
DJ
155762007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15577
15578 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15579 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15580
45e2715e
PA
155812007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15582
15583 * win32-low.c (handle_output_debug_string): Ignore event if not
15584 waiting.
15585
c5674cf1
PA
155862007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15587
15588 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15589
2bbe3cc1
DJ
155902007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15591
15592 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15593
ae13219e
DJ
155942007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15595
15596 * inferiors.c (change_inferior_id): Add comment.
15597 * linux-low.c (check_removed_breakpoint): Add an early
15598 prototype. Improve debug output.
15599 (linux_attach): Doc update.
15600 (linux_detach_one_process, linux_detach): Clean up before releasing
15601 each process.
15602 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15603 * linux-low.h (struct process_info): Doc improvement.
15604 * mem-break.c (delete_all_breakpoints): New.
15605 * mem-break.h (delete_all_breakpoints): New prototype.
15606 * thread-db.c (find_first_thread): New.
15607 (thread_db_create_event): Call it instead of
15608 thread_db_find_new_threads. Clean up unused variables.
15609 (maybe_attach_thread): Remove first thread handling.
15610 (thread_db_find_new_threads): Use find_first_thread.
15611 (thread_db_get_tls_address): Likewise.
15612
4105de34
DJ
156132007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15614
15615 * thread-db.c (thread_db_find_new_threads): Add prototype.
15616 (thread_db_create_event): Check for the main thread before adding
15617 a new thread.
15618 (maybe_attach_thread): Only enable event reporting if TID == 0.
15619 (thread_db_get_tls_address): Check for new threads.
15620
2b876972
DJ
156212007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15622
15623 * linux-low.c (linux_create_inferior): Try execv before execvp.
15624 * spu-low.c (spu_create_inferior): Likewise.
15625
7a245884
DJ
156262007-06-13 Mike Frysinger <vapier@gentoo.org>
15627
15628 * linux-low.c (linux_create_inferior): Change execv to execvp.
15629 * spu-low.c (spu_create_inferior): Likewies.
15630
117ce543
DJ
156312007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15632
15633 * Makefile.in (clean): Clean new files instead of deleted ones.
15634 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15635 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15636 rules.
15637 * configure.srv: Specify XML files and new regformats for MIPS and
15638 MIPS64 GNU/Linux.
15639 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15640 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15641 an entry for the restart register.
15642 (mips_cannot_fetch_register, mips_cannot_store_register)
15643 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15644 register names to match the XML descriptions.
15645 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15646 restart register instead of $0.
15647
0e7f50da
UW
156482007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15649 Markus Deuling <deuling@de.ibm.com>
15650
15651 * remote-utils.c (decode_xfer_write): New function.
15652 * server.h (decode_xfer_write): Add prototype.
15653 * server.c (handle_query): Add PACKET_LEN argument. Support
15654 qXfer:spu:read and qXfer:spu:write packets.
15655 (main): Pass packet_len to handle_query.
15656 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15657 * target.h (target_ops): Add qxfer_spu.
15658
374c1d38
UW
156592007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15660
15661 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15662 accessing non-seekable spufs files.
15663
bb63802a
UW
156642007-05-16 Markus Deuling <deuling@de.ibm.com>
15665
889bf7c5 15666 * server.c (handle_query): Add reply for qC packet.
bb63802a 15667
7390519e
PA
156682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15669 Leo Zayas <lerele@champenstudios@com>
15670
15671 * server.h (check_remote_input_interrupt_request): New function.
15672 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15673 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15674 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15675 (check_remote_input_interrupt_request): New function.
15676 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15677 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15678 winapi_GenerateConsoleCtrlEvent): New typedefs.
15679 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15680 to 250 ms.
15681 (win32_wait): Check for remote interrupt request
15682 with check_remote_input_interrupt_request.
15683 (win32_request_interrupt): New function.
15684 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15685
34b34921
PA
156862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15687
15688 * win32-low.c (debug_registers_changed,
15689 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15690 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15691 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15692 (thread_rec): Get context using the low target.
15693 (child_add_thread): Call thread_added on the low target,
15694 which does the same thing.
15695 (regptr): Delete.
15696 (do_initial_child_stuff): Remove debug registers references.
15697 Set context using the low target. Resume threads after
15698 setting the contexts.
15699 (child_continue): Remove dead variable. Remove debug
15700 registers references.
15701 (child_fetch_inferior_registers): Go through the low target.
15702 (do_child_store_inferior_registers): Remove.
15703 (child_store_inferior_registers): Go through the low target.
15704 (win32_resume): Remove debug registers references.
15705 Set context using the low target.
15706 (handle_exception): Change return type to void. Don't record
15707 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15708 first chance exception.
889bf7c5 15709 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15710 goto loop. Always return after waiting for debug event.
15711 (win32_wait): Convert to switch statement. Handle spurious
15712 events.
15713
15714 * win32-i386-low.c (debug_registers_changed,
15715 debug_registers_used): New.
15716 (initial_stuff): Rename to ...
15717 (i386_initial_stuff): ... this. Clear debug registers
15718 state variables.
15719 (store_debug_registers): Delete.
15720 (i386_get_thread_context): New.
15721 (load_debug_registers): Delete.
15722 (i386_set_thread_context): New.
15723 (i386_thread_added): New.
15724 (single_step): Rename to ...
15725 (i386_single_step): ... this.
15726 (do_fetch_inferior_registers): Rename to ...
15727 (i386_fetch_inferior_register): ... this.
15728 (i386_store_inferior_register): New.
15729 (the_low_target): Adapt to new interface.
15730
15731 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15732 (arm_get_thread_context): New.
15733 (arm_set_thread_context): New.
15734 (regptr): New.
15735 (do_fetch_inferior_registers): Rename to ...
15736 (arm_fetch_inferior_register): ... this.
15737 (arm_store_inferior_register): New.
15738 (arm_wince_breakpoint): Reimplement as unsigned long.
15739 (arm_wince_breakpoint_len): Define.
15740 (the_low_target): Adapt to new interface.
15741
15742 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15743 load_debug_registers. Add get_thread_context, set_thread_context,
15744 thread_added and store_inferior_register. Rename
15745 fetch_inferior_registers to fetch_inferior_register.
15746 (regptr): Remove declaration.
15747
dd6953e1
PA
157482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15749
15750 * linux-low.c (linux_detach): Change return type to int. Return 0.
15751 * spu-low.c (spu_detach): Likewise.
15752
444d6139
PA
157532007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15754
15755 * target.h (target_ops): Change return type of detach to int.
15756 Add join.
15757 (join_inferior): New.
15758 * server.c (main): Don't skip detach support on mingw32.
15759 If the inferior doesn't support detaching return error.
15760 Call join_inferior instead of using waitpid.
15761 * linux-low.c (linux_join): New.
15762 (linux_target_op): Add linux_join.
15763 * spu-low.c (spu_join): New.
15764 (spu_target_ops): Add spu_join.
15765 * win32-low.c (win32_detach): Adapt to new interface.
15766 Reopen current_process_handle before detaching. Issue a child
15767 resume before detaching.
15768 (win32_join): New.
15769 (win32_target_op): Add win32_join.
15770
1d5315fe
PA
157712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15772
15773 * win32-low.c (win32-attach): Fix return value.
15774 * target.h (target_ops): Describe ATTACH return values.
15775
bf914831
PA
157762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15777
15778 * win32-low.c (GETPROCADDRESS): Define.
15779 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15780 (winapi_DebugSetProcessKillOnExit): Likewise.
15781 (win32_create_inferior): Force usage of ansi CreateProcessA.
15782 (win32_attach): Use GETPROCADDRESS.
15783 (win32_detach): Likewise.
15784
f72f3e60
PA
157852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15786
15787 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15788
ed50f18f
PA
157892007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15790
15791 * win32-low.c: Commit leftover changes from 2007-03-29.
15792
0c2ead7e
DJ
157932007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15794
15795 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15796 fields short instead of int. Add explicit padding.
15797 (i387_cache_to_fsave): Remove unnecessary casts.
15798 (i387_fsave_to_cache): Doc fix.
15799 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15800
73725ff3
DJ
158012007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15802
15803 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15804 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15805
d99f33d8
PA
158062007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15807
15808 * configure.srv (arm*-*-mingw32ce*): Move near the other
15809 arm targets.
15810
68070c10
PA
158112007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15812
2482afc6 15813 * configure.ac: Add errno checking.
68070c10
PA
15814 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15815 sys/file.h and malloc.h.
15816 (AC_CHECK_DECLS): Add perror.
15817 (srv_mingwce): Handle.
2482afc6 15818 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15819 win32-i386-low.o to srv_tgtobj.
15820 (i[34567]86-*-mingw*): Likewise.
15821 (arm*-*-mingw32ce*): Add case.
15822 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15823 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15824 [__MINGW32CE__] (strerror): New function.
15825 [__MINGW32CE__] (errno): Define to GetLastError.
15826 [__MINGW32CE__] (COUNTOF): New macro.
15827 (remote_open): Remove extra close call.
15828 * mem-break.c (delete_breakpoint_at): New function.
15829 * mem-break.h (delete_breakpoint_at): Declare.
15830 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15831 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15832 [USE_WIN32API] (read, write): Add char* casts.
15833 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15834 * server.h: Include wincecompat.h on Windows CE.
15835 [HAVE_ERRNO_H]: Check.
15836 (perror): Declare if not declared.
15837 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15838 (perror_with_name): Remove errno declaration.
15839 * wincecompat.h: New.
15840 * wincecompat.c: New.
15841 * win32-low.h: New.
15842 * win32-arm-low.c: New.
15843 * win32-i386-low.c: New.
15844 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15845 (OUTMSG2): Make it safe.
15846 (_T): New macro.
15847 (COUNTOF): New macro.
15848 (NUM_REGS): Get it from the low target.
15849 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15850 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15851 (thread_rec): Let low target handle debug registers.
15852 (child_add_thread): Likewise.
15853 (child_init_thread_list): Likewise.
15854 (continue_one_thread): Likewise.
15855 (regptr): New.
15856 (do_child_fetch_inferior_registers): Move to ...
15857 * win32-i386-low.c: ... here, and rename to ...
15858 (do_fetch_inferior_registers): ... this.
889bf7c5 15859 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15860 Go through the low target.
15861 (do_child_store_inferior_registers): Use regptr.
15862 (strwinerror): New function.
15863 (win32_create_inferior): Handle Windows CE.
15864 Use strwinerror instead of strerror on Windows error
15865 codes. Add program to the error output.
15866 Don't close the main thread handle on Windows CE.
15867 (win32_attach): Use coredll.dll on Windows CE.
15868 (win32_kill): Close current process and current
15869 thread handles.
15870 (win32_detach): Use coredll.dll on Windows CE.
15871 (win32_resume): Let low target handle debug registers, and
15872 step request.
15873 (handle_exception): Add/Remove initial breakpoint. Avoid
15874 non-existant WSTOPSIG on Windows CE.
15875 (win32_read_inferior_memory): Cast to remove warning.
15876 (win32_arch_string): Go through the low target.
15877 (initialize_low): Call set_breakpoint_data with the low
15878 target's breakpoint.
15879 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15880 FOP_REGNUM, mappings): Move to ...
15881 * win32-i386-low.c: ... here.
15882 * win32-low.c (win32_thread_info): Move to ...
15883 * win32-low.h: ... here.
15884 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15885 win32-arm-low.c and wincecompat.c.
15886 (all:): Add $EXEEXT.
15887 (install-only:): Likewise.
15888 (gdbserver:): Likewise.
15889 (gdbreplay:): Likewise.
15890 * config.in: Regenerate.
15891 * configure: Regenerate.
15892
41093d81
PA
158932007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15894
15895 * win32-low.c: Rename typedef thread_info to
15896 win32_thread_info throughout.
15897
544afa54
PA
158982007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15899
15900 * win32-i386-low.c: Rename to ...
15901 * win32-low.c: ... this.
15902 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15903 * Makefile.in: Likewise.
15904
bce7165d
PA
159052007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15906
15907 * remote-utils.c (monitor_output): Constify msg parameter.
15908 * server.h (monitor_output): Likewise.
15909 * win32-i386-low.c (handle_output_debug_string): New.
15910 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15911 handle_output_debug_string.
15912 (get_child_debug_event): Likewise.
15913
506c7aa0
DJ
159142007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15915
15916 * server.c (main): Correct strtoul check.
15917
42c81e2a
DJ
159182007-03-27 Jon Ringle <jon@ringle.org>
15919
15920 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15921
9453113a
DJ
159222007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15923
15924 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15925
64a69107
DJ
159262007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15927
15928 * terminal.h: Check HAVE_SGTTY_H.
15929
159302007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15931
15932 * remote-utils.c (remote_open): Print out the assigned port number.
15933
c74d0ad8
DJ
159342007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15935
15936 * remote-utils.c (monitor_output): New function.
15937 * server.c (debug_threads): Define here.
15938 (monitor_show_help): New function.
15939 (handle_query): Handle qRcmd.
15940 (main): Do not handle 'd' packet.
15941 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15942 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15943 of debug_threads.
15944
de7c3b4a
PA
159452007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15946
15947 * Makefile.in (EXEEXT): New.
15948 (clean): Use $(EXEEXT).
15949
ef57601b
PA
159502007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15951
15952 * target.h (target_ops): Rename send_signal to request_interrupt,
15953 and remove enum target_signal parameter.
15954 * linux-low.c (linux_request_interrupt): Rename from
15955 linux_send_signal, and always send SIGINT.
15956 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15957 and always send SIGINT.
15958 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15959 of send_signal.
15960 (input_interrupt): Likewise.
15961
820f2bda
PA
159622007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15963
15964 * server.c (get_features_xml): Check if target implemented
15965 arch_string.
15966 * win32-i386-low.c (win32_arch_string): New.
15967 (win32_target_ops): Add win32_arch_string as arch_string member.
15968
ab39bf24
UW
159692007-02-22 Markus Deuling <deuling@de.ibm.com>
15970
15971 * spu-low.c (spu_arch_string): New.
15972 (spu_target_ops): Add spu_arch_string.
15973
61ff6e04
DJ
159742007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15975
15976 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15977 * configure.ac: Do not check for terminal.h.
15978 * configure, config.in: Regenerated.
15979
fb1e4ffc
DJ
159802007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15981
15982 * Makefile.in (OBS): Add $(XML_BUILTIN).
15983 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15984 (clean): Update.
15985 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15986 (arm-with-iwmmxt.c): New.
15987 * config.in, configure: Regenerate.
15988 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15989 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15990 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15991 (arm*-*-linux*): Add iWMMXt and regset support.
15992 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15993 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15994 (arm_store_wmmxregset, target_regsets): New.
15995 * server.c (get_features_xml): Take annex argument. Check builtin
15996 XML documents.
15997 (handle_query): Handle multiple annexes.
15998
0f48aa01
DJ
159992007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16000
16001 * remote-utils.c [USE_WIN32API] (read, write): Define.
16002 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16003 write.
16004
23181151
DJ
160052007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16006
16007 * linux-i386-low.c (the_low_target): Set arch_string.
16008 * linux-x86-64-low.c (the_low_target): Likewise.
16009 * linux-low.c (linux_arch_string): New.
16010 (linux_target_ops): Add it.
16011 * linux-low.h (struct linux_target_ops): Add arch_string.
16012 * server.c (write_qxfer_response): Use const void * for DATA.
16013 (get_features_xml): New.
16014 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16015 * target.h (struct target_ops): Add arch_string method.
16016
9d606399
DJ
160172007-01-03 Denis Pilat <denis.pilat@st.com>
16018 Daniel Jacobowitz <dan@codesourcery.com>
16019
16020 * linux-low.c (linux_kill): Handle being called with no threads.
16021 * win32-i386-low.c (win32_kill): Likewise.
16022 (get_child_debug_event): Clear current_process_handle.
16023
160242006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16025 Daniel Jacobowitz <dan@codesourcery.com>
16026
16027 * remote-utils.c (remote_open): Check the type of specified
16028 serial port devices before opening them.
16029 * server.c (main): Kill the inferior if an error occurs during
16030 the first remote_open.
16031
a5e13d24
DJ
160322006-12-05 Markus Deuling <deuling@de.ibm.com>
16033
16034 * README: Update supported targets.
16035
186947f7
DJ
160362006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16037
16038 * Makefile.in (clean): Remove reg-mips64.c.
16039 (reg-mips64.c, reg-mips64.o): New rules.
16040 * configure.srv: Handle mips64. Include regset support for mips.
16041 * linux-mips-low.c (union mips_register): New.
16042 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16043 (mips_breakpoint, mips_breakpoint_at): Use int.
16044 (mips_collect_register, mips_supply_register)
16045 (mips_collect_register_32bit, mips_supply_register_32bit)
16046 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16047 (mips_store_fpregset, target_regsets): New.
16048 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16049
a13e2c95
UW
160502006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16051
16052 * configure.srv: Add target "spu*-*-*".
16053 * Makefile.in (clean): Remove reg-spu.c.
16054 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16055 * spu-low.c: New file.
16056
cb7283db
DJ
160572006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16058
16059 * configure.ac: Correct td_thr_tls_get_addr test.
16060 * configure: Regenerated.
16061
89be2091
DJ
160622006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16063
16064 * linux-low.c (linux_wait_for_event): Reformat. Use the
16065 pass_signals array.
16066 * remote-utils.c (decode_address_to_semicolon): New.
16067 * server.c (pass_signals, handle_general_set): New.
16068 (handle_query): Mention QPassSignals for qSupported.
16069 (main): Call handle_general_set.
16070 * server.h (pass_signals, decode_address_to_semicolon): New.
16071
000ef4f0
DJ
160722006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16073
16074 * server.c (handle_query): Correct error handling for read_auxv.
16075
b7149293
UW
160762005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16077
16078 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16079 and srv_linux_thread_db to yes.
16080 * linux-s390-low.c (s390_fill_gregset): New function.
16081 (target_regsets): Define data structure.
16082
dae5f5cf
DJ
160832006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16084
16085 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16086 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16087 * config.in, configure: Regenerated.
16088 * inferiors.c (gdb_id_to_thread): New function.
16089 (gdb_id_to_thread_id): Use it.
16090 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16091 * linux-low.h (struct process_info): Add th member.
16092 (thread_db_get_tls_address): New prototype.
16093 * remote-utils.c (decode_address): Make non-static.
16094 * server.c (handle_query): Handle qGetTLSAddr.
16095 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16096 * target.h (struct target_ops): Add get_tls_address.
16097 * thread-db.c (maybe_attach_thread): Save the thread handle.
16098 (thread_db_get_tls_address): New.
16099
32ca6d61
DJ
161002006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16101
16102 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16103 (linux_resume_one_process): Take a siginfo_t *. Update all
16104 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16105 (struct pending_signals): Add a siginfo_t.
16106 (linux_wait_for_process): Always set last_status.
16107 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16108 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16109 * linux-low.h (struct process_info): Add last_status.
16110
5ffff7c1
DJ
161112006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16112
16113 * remote-utils.c (try_rle): New function.
16114 (putpkt_binary): Use it.
16115
8695c747
DJ
161162006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16117
16118 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16119 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16120 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16121 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16122 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16123 point registers.
16124
290fadea
RS
161252006-08-08 Richard Sandiford <richard@codesourcery.com>
16126
16127 * server.c (terminal_fd): New variable.
16128 (old_foreground_pgrp): Likewise.
16129 (restore_old_foreground_pgrp): New function.
16130 (start_inferior): Record the terminal file descriptor in terminal_fd
16131 and its original foreground group in old_foreground_pgrp. Register
16132 restore_old_foreground_pgrp with atexit().
16133
9f2e1e63
DJ
161342006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16135
16136 * server.c (handle_query): Correct qPart to qXfer.
16137
b80864fb
DJ
161382006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16139
16140 * configure.ac: Check for more headers which are missing on
16141 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16142 * configure.srv: Add Cygwin and mingw32.
16143 * remote-utils.c: Don't include headers unconditionally which
16144 are missing on mingw32. Include <winsock.h> for mingw32.
16145 (remote_open): Adjust for mingw32 support. Flush
16146 standard error after writing to it.
16147 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16148 (unblock_async_io, enable_async_io, disable_async_io)
16149 (readchar, getpkt): Update for Winsock support.
16150 (prepare_resume_reply): Expect a protocol signal number.
16151 * server.c: Disable <sys/wait.h> on mingw32.
16152 (start_inferior): Adjust for mingw32 support. Flush
16153 standard error after writing to it.
16154 (attach_inferior): Likewise. Use protocol signal
16155 numbers.
16156 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16157 and names.
16158 * win32-i386-low.c: New file.
16159 * Makefile.in (XM_CLIBS): Set.
16160 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16161 (win32-i386-low.o): New dependency rule.
16162 * linux-low.c (linux_wait): Use target signal numbers.
16163 * target.h (struct target_ops): Doc fix.
16164 * server.h (target_signal_to_name): New prototype.
16165 * gdbreplay.c: Don't include headers unconditionally which
16166 are missing on mingw32. Include <winsock.h> for mingw32.
16167 (remote_close, remote_open): Adjust for Winsock support.
16168 * configure, config.in: Regenerated.
16169
0876f84a
DJ
161702006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16171
16172 * server.c (decode_xfer_read, write_qxfer_response): New.
16173 (handle_query): Take a packet length argument. Handle
16174 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16175 the qSupported response.
16176 (main): Update call to handle_query.
16177
01f9e8fa
DJ
161782006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16179
16180 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16181 (putpkt_binary): Renamed from putpkt and adjusted for binary
16182 data.
16183 (putpkt): New wrapper for putpkt_binary.
16184 (readchar): Don't mask off the high bit.
16185 (decode_X_packet): New function.
16186 * server.c (main): Call putpkt_binary if a handler sets the packet
16187 length. Save the length of the incoming packet. Handle 'X'.
16188 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16189
be2a5f71
DJ
161902006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16191
16192 * server.c (handle_query): Handle qSupported.
16193
ea025f5f
DJ
161942006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16195
16196 * remote-utils.c (all_symbols_looked_up): New variable.
16197 (look_up_one_symbol): Check it.
16198 * server.h (look_up_one_symbol): New declaration.
16199 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16200
9308fc88
DJ
162012006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16202
16203 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16204 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16205 (PTRACE_GET_THREAD_AREA): Define.
16206 (ps_get_thread_area): New function.
16207
52fb6437
NS
162082006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16209
16210 * configure.srv (m68k*-*-uclinux*): New target.
16211 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16212 (linux_resume_one_process): Remove extraneous cast.
16213 (linux_read_offsets): New.
16214 (linux_target_op): Add linux_read_offsets on mmuless systems.
16215 * server.c (handle_query): Add qOffsets logic.
16216 * target.h (struct target_ops): Add read_offsets.
16217
21b0f40c
DJ
162182006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16219
16220 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16221 (PTRACE_GET_THREAD_AREA): Define.
16222 (ps_get_thread_area): New function.
16223 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16224 (linux-x86-64-low.o): Update.
16225
0050a760
DJ
162262006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16227
16228 * configure.ac: Remove checks for prfpregset_t.
16229 * gdb_proc_service.h: New file.
16230 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16231 new "gdb_proc_service.h".
16232 * proc-service.c: Likewise.
16233 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16234 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16235 * Makefile.in (gdb_proc_service_h): Updated.
16236 * configure, config.in: Regenerated.
16237
b92a518e
DJ
162382006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16239
16240 * remote-utils.c (prepare_resume_reply): Move declaration
16241 of gdb_id_from_wait to the top of the block.
16242
545587ee
DJ
162432006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16244
16245 * linux-low.c (regsets_store_inferior_registers): Read the regset
16246 from the target before filling it.
16247
9db87ebd
DJ
162482006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16249
16250 * server.c (attach_inferior): Return SIGTRAP for a successful
16251 attach.
16252
dd24457d
DJ
162532006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16254
16255 * Makefile.in (OBS): Add version.o.
16256 (STAGESTUFF): Delete.
16257 (version.o): Add dependencies.
16258 (version.c): Replace rule.
16259 (clean): Remove version.c.
16260 * server.c (gdbserver_version): New.
16261 (gdbserver_usage): Use printf.
16262 (main): Handle --version and --help.
16263 * server.h (version, host_name): Add declarations.
16264
6f0f660e
EZ
162652005-12-23 Eli Zaretskii <eliz@gnu.org>
16266
889bf7c5
PA
16267 * linux-arm-low.c:
16268 * linux-arm-low.c:
16269 * inferiors.c:
16270 * i387-fp.h:
16271 * i387-fp.c:
16272 * gdbreplay.c:
16273 * regcache.c:
16274 * proc-service.c:
16275 * mem-break.h:
16276 * mem-break.c:
16277 * linux-x86-64-low.c:
16278 * linux-sh-low.c:
16279 * linux-s390-low.c:
16280 * linux-ppc64-low.c:
16281 * linux-ppc-low.c:
16282 * linux-mips-low.c:
16283 * linux-m68k-low.c:
16284 * linux-m32r-low.c:
16285 * linux-low.h:
16286 * linux-low.c:
16287 * linux-ia64-low.c:
16288 * linux-i386-low.c:
16289 * linux-crisv32-low.c:
16290 * thread-db.c:
16291 * terminal.h:
16292 * target.h:
16293 * target.c:
16294 * server.h:
16295 * server.c:
16296 * remote-utils.c:
16297 * regcache.h:
16298 * utils.c:
16299 * Makefile.in:
16300 * configure.ac:
6f0f660e
EZ
16301 * gdbserver.1: Add (C) after Copyright. Update the FSF
16302 address.
16303
9d1fb177
DJ
163042005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16305
16306 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16307 (arm_breakpoint_at): Recognize both breakpoints.
16308 (the_low_target): Use the correct breakpoint instruction.
16309
011a70c2
DJ
163102005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16311
16312 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16313 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16314 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16315 (the_low_target): Update.
16316
7fb85e41
AS
163172005-10-25 Andreas Schwab <schwab@suse.de>
16318
16319 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16320
16321 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16322 (ia64_num_regs): Reduce to 462.
16323
3db0444b
DJ
163242005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16325
16326 * acinclude.m4: Correct quoting.
16327 * aclocal.m4: Regenerated.
16328
16329 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16330 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16331 (thread_db_init): Call thread_db_err_str.
16332 * configure.ac: Check for TD_VERSION.
16333 * config.in, configure: Regenerated.
16334
bee0189a
DJ
163352005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16336
16337 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16338
e9d25b98
DJ
163392005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16340
16341 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16342 is not available. Define HAVE_PTRACE_GETREGS if it is.
16343 * config.in, configure: Regenerated.
16344 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16345 * linux-i386-low.c, linux-m68k-low.c: Update to use
16346 HAVE_PTRACE_GETREGS.
16347 * linux-low.c (regsets_fetch_inferior_registers)
16348 (regsets_store_inferior_registers): Only return 0 if we processed
16349 GENERAL_REGS.
16350 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16351 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16352
a06660f7
DJ
163532005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16354
16355 * inferiors.c (struct thread_info): Add gdb_id.
16356 (add_thread): Add gdb_id argument.
16357 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16358 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16359 calls to add_thread.
16360 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16361 * server.c (handle_query): Use thread_to_gdb_id.
16362 (handle_v_cont, main): Use gdb_id_to_thread_id.
16363 * server.h (add_thread): Update prototype.
16364 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16365 prototypes.
16366
5a1f5858
DJ
163672005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16368
16369 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16370 left-padded registers.
16371 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16372 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16373
e122f1f5
SE
163742005-07-01 Steve Ellcey <sje@cup.hp.com>
16375
16376 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16377 * configure: Regenerate.
16378 * config.in: Regenerate.
16379 * server.h (NEED_DECLARATION_STRERROR):
16380 Replace with !HAVE_DECL_STRERROR.
16381
d592fa2f
DJ
163822005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16383
16384 * linux-low.c (linux_wait, linux_send_signal): Don't test
16385 an unsigned long variable for > 0 if it could be MAX_ULONG.
16386 * server.c (myresume): Likewise.
16387 * target.c (set_desired_inferior): Likewise.
16388
ccbd4912
MK
163892005-06-13 Mark Kettenis <kettenis@gnu.org>
16390
16391 * configure.ac: Simplify and improve check for socklen_t.
16392 * configure, config.in: Regenerate.
16393
f450004a
DJ
163942005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16395
16396 * acconfig.h: Remove.
16397 * configure.ac: Add a test for socklen_t. Use three-argument
16398 AC_DEFINE throughout.
16399 * config.in: Regenerated using autoheader 2.59.
16400 * configure: Regenerated.
16401
16402 * gdbreplay.c (socklen_t): Provide a default.
16403 (remote_open): Use socklen_t.
16404 * remote-utils.c (socklen_t): Provide a default.
16405 (remote_open): Use socklen_t.
16406 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16407 unsigned char.
16408
16409 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16410 char for buffers.
16411 * linux-low.c (linux_read_memory, linux_write_memory)
16412 (linux_read_auxv): Likewise.
16413 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16414 (check_mem_write): Likewise.
16415 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16416 Likewise.
16417 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16418 (registers_from_string, register_data): Likewise.
16419 * server.c (handle_query, main): Likewise.
16420 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16421 (decode_M_packet): Likewise.
16422 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16423 * target.h (struct target_ops): Update read_memory, write_memory,
16424 and read_auxv.
16425 (read_inferior_memory, write_inferior_memory): Update.
16426 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16427 to unsigned char *.
16428 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16429 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16430 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16431 linux-s390-low.c, linux-sh-low.c: Update for changes in
16432 read_inferior_memory and the_low_target->breakpoint.
16433
eee84df1
DJ
164342005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16435
16436 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16437 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16438 * configure.srv: Add powerpc64-*-linux*.
16439 * linux-ppc64-low.c: New file.
16440
45b134e5
OF
164412005-05-23 Orjan Friberg <orjanf@axis.com>
16442
16443 * linux-cris-low.c: New file with support for CRIS.
16444 * linux-crisv32-low.c: Ditto for CRISv32.
16445 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16446 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16447 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16448 reg-crisv32.o, and reg-crisv32.c to make rules.
16449 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16450 recognized targets.
16451
48d93c75
UW
164522005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16453
16454 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16455 of sizeof (PTRACE_XFER_TYPE).
16456 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16457
e013ee27
OF
164582005-05-12 Orjan Friberg <orjanf@axis.com>
16459
889bf7c5 16460 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16461 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16462 pointers for hardware watchpoint support.
16463 * linux-low.h (struct linux_target_ops): Ditto.
16464 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16465 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16466 to linux_target_ops.
16467 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16468 reply packet.
16469 * server.c (main): Recognize 'Z' and 'z' packets.
16470
b0ded00b
UW
164712005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16472
16473 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16474 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16475 (the_low_target): Add new members.
16476
8643e2ad
DJ
164772005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16478
16479 * proc-service.c (ps_lgetregs): Search all_processes instead of
16480 all_threads.
16481
fc620387
DJ
164822005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16483
16484 * server.c (start_inferior): Change return type to int.
16485 (attach_inferior): Change sigptr to int *.
16486 (handle_v_cont, handle_v_requests): Change signal to int *.
16487 (main): Change signal to int.
16488
164892005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16490
16491 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16492 * configure.srv: Add m32r*-*-linux*.
16493 * linux-m32r-low.c: New file.
16494
e0e76420
DJ
164952005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16496
16497 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16498
a1928bad
DJ
164992005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16500
16501 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16502 Take unsigned long arguments for PIDs.
16503 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16504 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16505 (wait_for_sigstop, linux_resume_one_process)
16506 (regsets_fetch_inferior_registers, linux_send_signal)
16507 (linux_read_auxv): Likewise. Update the types of variables holding
16508 PIDs. Update format string specifiers.
16509 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16510 * remote-utils.c (prepare_resume_reply): Likewise.
16511 * server.c (cont_thread, general_thread, step_thread)
16512 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16513 unsigned long.
16514 (handle_query): Update format specifiers.
16515 (handle_v_cont, main): Use strtoul for thread IDs.
16516 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16517 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16518 (general_thread, step_thread, thread_from_wait)
16519 (old_thread_from_wait): Update.
16520 * target.h (struct thread_resume): Use unsigned long for THREAD.
16521 (struct target_ops): Use unsigned long for arguments to attach and
16522 thread_alive.
16523
dcdb98d2
DJ
165242005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16525
16526 * acinclude.m4: Include bfd/bfd.m4 directly.
16527 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16528 <agriffis@toolchain.org>.
16529 * aclocal.m4, configure: Regenerated.
16530
bec39cab
AC
165312005-01-07 Andrew Cagney <cagney@gnu.org>
16532
16533 * configure.ac: Rename configure.in, require autoconf 2.59.
16534 * configure: Re-generate.
16535
434c4c77
DJ
165362004-12-08 Daniel Jacobowitz <dan@debian.org>
16537
16538 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16539 LIBS when finished.
16540 * aclocal.m4: Regenerated.
16541 * configure: Regenerated.
16542
db1d3e1b
AS
165432004-11-21 Andreas Schwab <schwab@suse.de>
16544
16545 * linux-m68k-low.c (m68k_num_gregs): Define.
16546 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16547 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16548 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16549 (m68k_breakpoint_at): New. Add to the_low_target.
16550
16551 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16552 srv_linux_thread_db to yes.
16553
43360365
JB
165542004-10-20 Joel Brobecker <brobecker@gnat.com>
16555
16556 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16557 (ARCH_SET_FS): Likewise.
16558 (ARCH_GET_FS): Likewise.
16559 (ARCH_GET_GS): Likewise.
16560
fd500816
DJ
165612004-10-16 Daniel Jacobowitz <dan@debian.org>
16562
16563 * linux-i386-low.c (ps_get_thread_area): New.
16564 * linux-x86-64-low.c (ps_get_thread_area): New.
16565 * linux-low.c: Include <sys/syscall.h>.
16566 (linux_kill_one_process): Don't kill the first thread here.
16567 (linux_kill): Kill the first thread here.
16568 (kill_lwp): New function.
16569 (send_sigstop, linux_send_signal): Use it.
16570 * proc-service.c: Clean up #ifdefs.
16571 (fpregset_info): Delete.
16572 (ps_lgetregs): Update and enable implementation.
16573 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16574 implementations.
16575 * remote-utils.c (struct sym_cache, symbol_cache): New.
16576 (input_interrupt): Print a clearer message.
16577 (async_io_enabled): New variable.
16578 (enable_async_io, disable_async_io): Use it. Update comments.
16579 (look_up_one_symbol): Use the symbol cache.
16580 * thread-db.c (thread_db_look_up_symbols): New function.
16581 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16582
f6de3c42
DJ
165832004-10-16 Daniel Jacobowitz <dan@debian.org>
16584
16585 * configure.in: Test for -rdynamic.
16586 * configure: Regenerated.
16587 * Makefile (INTERNAL_LDFLAGS): New.
16588 (gdbserver, gdbreplay): Use it.
16589
2c0fc042
AC
165902004-09-02 Andrew Cagney <cagney@gnu.org>
16591
16592 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16593
075b3282
DJ
165942004-03-23 Daniel Jacobowitz <drow@mvista.com>
16595
16596 * linux-low.c (linux_wait): Clear all_processes list also.
16597
fa6a77dc
DJ
165982004-03-12 Daniel Jacobowitz <drow@mvista.com>
16599
16600 * linux-low.c: Include <errno.h>. Remove extern declaration of
16601 errno.
16602
6d782a97
DJ
166032004-03-12 Daniel Jacobowitz <drow@mvista.com>
16604
16605 * gdbreplay.c, server.h, utils.c: Update copyright years.
16606
3a7fb99b
DJ
166072004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16608
16609 * server.c (main): Print child status or termination signal from
16610 variable 'signal', not 'sig'.
16611
c3e735a6
DJ
166122004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16613
16614 * linux-low.c (linux_read_memory): Change return type to
16615 int. Check for and return error from ptrace().
16616 * target.c (read_inferior_memory): Change return type to int. Pass
16617 back return status from the_target->read_memory().
16618 * target.h (struct target_ops): Adapt *read_memory() prototype.
16619 Update comment.
16620 (read_inferior_memory): Adapt prototype.
16621 * server.c (main): Return an error packet if
16622 read_inferior_memory() returns an error.
16623
a59d1c82
DJ
166242004-03-04 Daniel Jacobowitz <drow@mvista.com>
16625
16626 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16627 Unify with other clean targets.
16628
dc3f8883
DJ
166292004-02-29 Daniel Jacobowitz <drow@mvista.com>
16630
16631 * server.c (handle_v_cont): Call set_desired_inferior.
16632
89a208da
DJ
166332004-02-29 Daniel Jacobowitz <drow@mvista.com>
16634
16635 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16636
62ea82f5
DJ
166372004-02-29 Daniel Jacobowitz <drow@mvista.com>
16638
16639 * linux-low.c (linux_wait): Unblock async I/O.
16640 (linux_resume): Block and enable async I/O.
16641 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16642 * server.h (block_async_io, unblock_async_io): Add prototypes.
16643
6910d122
DJ
166442004-02-29 Daniel Jacobowitz <drow@mvista.com>
16645
16646 * remote-utils.c (remote_open): Print a status notice after
16647 opening a TCP port.
16648 * server.c (attach_inferior): Print a status notice after
16649 attaching.
16650
166512004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16652
16653 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16654
c89dc5d4
DJ
166552004-02-26 Daniel Jacobowitz <drow@mvista.com>
16656
16657 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16658 error packet.
16659 * server.c, target.h: Update copyright years.
16660
4b8dad4a
RM
166612004-02-25 Roland McGrath <roland@redhat.com>
16662
16663 * target.h (struct target_ops): New member `read_auxv'.
16664 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16665 * linux-low.c (linux_read_auxv): New function.
16666 (linux_target_ops): Initialize `read_auxv' member to that.
16667
d7446758
JB
166682004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16669
16670 Committed by Jim Blandy <jimb@redhat.com>.
16671
16672 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16673 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16674 instead of GPR_SIZE to distiguish s390 and s390x targets.
16675
5544ad89
DJ
166762004-01-31 Daniel Jacobowitz <drow@mvista.com>
16677
16678 * linux-low.c: Update copyright year.
16679 (check_removed_breakpoint): Clear pending_is_breakpoint.
16680 (linux_set_resume_request, linux_queue_one_thread)
16681 (resume_status_pending_p): New functions.
16682 (linux_continue_one_thread): Use process->resume.
16683 (linux_resume): Only resume threads if there are no pending events.
16684 * linux-low.h (struct process_info): Add resume request
16685 pointer.
16686
2a68b70e
DJ
166872004-01-30 Daniel Jacobowitz <drow@mvista.com>
16688
16689 * regcache.c (new_register_cache): Clear the allocated register
16690 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16691
64386c31
DJ
166922003-10-13 Daniel Jacobowitz <drow@mvista.com>
16693
16694 * linux-low.c (linux_resume): Take a struct thread_resume *
16695 argument.
16696 (linux_wait): Update call.
16697 (resume_ptr): New static variable.
16698 (linux_continue_one_thread): Renamed from
16699 linux_continue_one_process. Use resume_ptr.
16700 (linux_resume): Use linux_continue_one_thread.
16701 * server.c (handle_v_cont, handle_v_requests): New functions.
16702 (myresume): New function.
16703 (main): Handle 'v' case.
16704 * target.h (struct thread_resume): New type.
16705 (struct target_ops): Change argument of "resume" to struct
16706 thread_resume *.
16707 (myresume): Delete macro.
16708
c938e9b0
L
167092003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16710
16711 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16712 (uninstall): Support DESTDIR.
16713
7f313d07
BC
16714Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16715
16716 * configure.srv: Add xscale*linux copy of arm*linux entry.
16717
3b2fc2ea
DJ
167182003-07-24 Daniel Jacobowitz <drow@mvista.com>
16719
16720 * linux-arm-low.c (arm_reinsert_addr): New function.
16721 (the_low_target): Add arm_reinsert_addr.
16722
1c0a559e
MK
167232003-07-08 Mark Kettenis <kettenis@gnu.org>
16724
16725 * mem-break.c: Remove whitespace at end of file.
16726
43d5792c
DJ
167272003-06-28 Daniel Jacobowitz <drow@mvista.com>
16728
16729 * configure.in: Check whether we need to prototype strerror.
16730 * server.h: Optionally prototype strerror.
16731 * gdbreplay.c (perror_with_name): Use strerror.
16732 * linux-low.c (linux_attach_lwp): Use strerror.
16733 * utils.c (perror_with_name): Use strerror.
16734 * config.in, configure: Regenerated.
16735
c8a86edf
DJ
167362003-06-28 Daniel Jacobowitz <drow@mvista.com>
16737
16738 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16739 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16740
73d37363
DJ
167412003-06-20 Daniel Jacobowitz <drow@mvista.com>
16742
16743 * Makefile.in (SFILES): Update.
16744 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16745 low-sun3.c: Remove files.
16746
6ad8ae5c
DJ
167472003-06-17 Daniel Jacobowitz <drow@mvista.com>
16748
16749 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16750 (linux_detach_one_process, linux_detach): New functions.
16751 (linux_target_ops): Add linux_detach.
16752 * server.c (main): Handle 'D' packet.
16753 * target.h (struct target_ops): Add "detach" member.
16754 (detach_inferior): Define.
16755
1581182a
MK
167562003-06-13 Mark Kettenis <kettenis@gnu.org>
16757
16758 From Kelley Cook <kelleycook@wideopenwest.com>:
16759 * configure.srv: Accept i[34567]86 variants.
16760
e5379b03
DJ
167612003-06-05 Daniel Jacobowitz <drow@mvista.com>
16762
16763 * linux-low.c (linux_wait_for_event): Correct comment typos.
16764 (linux_resume_one_process): Call check_removed_breakpoint.
16765 (linux_send_signal): New function.
16766 (linux_target_ops): Add linux_send_signal.
16767 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16768 of kill.
16769 * target.h (struct target_ops): Add send_signal.
16770
2ff29de4
JB
167712003-05-29 Jim Blandy <jimb@redhat.com>
16772
16773 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16774 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16775 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16776 away part of the register's value.
16777
254787d4
DJ
167782003-03-26 Daniel Jacobowitz <drow@mvista.com>
16779
16780 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16781 (linux_wait_for_event, linux_init_signals): Likewise.
16782
94e10508
DJ
167832003-03-17 Daniel Jacobowitz <drow@mvista.com>
16784
16785 * configure.in: Check for stdlib.h.
16786 * configure: Regenerated.
16787 * config.in: Regenerated.
16788
4c0711e0
DJ
167892003-01-04 Andreas Schwab <schwab@suse.de>
16790
16791 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16792
ef66e766
AC
167932003-01-02 Andrew Cagney <ac131313@redhat.com>
16794
16795 * Makefile.in: Remove obsolete code.
16796
a1358604
DJ
167972002-11-20 Daniel Jacobowitz <drow@mvista.com>
16798
16799 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16800 defined(PT_FPR0_HI).
16801
23ce3b1c
DJ
168022002-11-17 Stuart Hughes <seh@zee2.com>
16803
16804 * linux-arm-low.c (arm_num_regs): Increase.
16805 (arm_regmap): Include status register.
16806
168072002-11-17 Daniel Jacobowitz <drow@mvista.com>
16808
16809 * linux-low.c (register_addr): Remove incorrect -1 check.
16810
a9fa9f7d
DJ
168112002-08-29 Daniel Jacobowitz <drow@mvista.com>
16812
16813 * linux-low.c (linux_create_inferior): Call setpgid. Return
16814 the new PID.
16815 (unstopped_p, linux_signal_pid): Remove.
16816 (linux_target_ops): Remove linux_signal_pid.
16817 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16818 global instead of target method.
16819 * target.h (struct target_ops): Remove signal_pid. Update comment
16820 for create_inferior.
16821 * server.c (signal_pid): New variable.
16822 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16823 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16824 (attach_inferior): Set signal_pid.
16825
17574093
DJ
168262002-08-23 Daniel Jacobowitz <drow@mvista.com>
16827
16828 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16829
168302002-08-20 Jim Blandy <jimb@redhat.com>
16831
16832 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16833 default for this.
16834
168352002-08-01 Andrew Cagney <cagney@redhat.com>
16836
16837 * Makefile.in: Make chill references obsolete.
16838
168392002-07-24 Kevin Buettner <kevinb@redhat.com>
16840
16841 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16842 * configure: Regenerate.
16843 * config.in: Regenerate.
16844
168452002-07-09 David O'Brien <obrien@FreeBSD.org>
16846
16847 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16848 (perror_with_name, remote_close, remote_open, expect, play): Static.
16849
168502002-07-04 Michal Ludvig <mludvig@suse.cz>
16851
4b8dad4a 16852 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16853 byte offsets instead of an array of indexes.
16854 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16855
168562002-06-13 Daniel Jacobowitz <drow@mvista.com>
16857
16858 * regcache.c: Add comment.
16859
168602002-06-11 Daniel Jacobowitz <drow@mvista.com>
16861
16862 * thread-db.c: New file.
16863 * proc-service.c: New file.
16864 * acinclude.m4: New file.
16865 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16866 proc-service.o, and thread-db.o.
16867 (linux-low.o): Add USE_THREAD_DB.
16868 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16869 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16870 * aclocal.m4: Regenerated.
16871 * config.in: Regenerated.
16872 * configure: Regenerated.
16873 * configure.in: Check for proc_service.h, sys/procfs.h,
16874 thread_db.h, and linux/elf.h headrs.
16875 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16876 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16877 Check for -lthread_db and thread support.
16878 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16879 PowerPC, and SuperH.
16880 * i387-fp.c: Constify arguments.
16881 * i387-fp.h: Likewise.
16882 * inferiors.c: (struct thread_info): Renamed from
16883 `struct inferior_info'. Remove PID member. Use generic inferior
16884 list header. All uses updated.
16885 (inferiors, signal_pid): Removed.
16886 (all_threads): New variable.
16887 (get_thread): Define.
16888 (add_inferior_to_list): New function.
16889 (for_each_inferior): New function.
16890 (change_inferior_id): New function.
16891 (add_inferior): Removed.
16892 (remove_inferior): New function.
16893 (add_thread): New function.
16894 (free_one_thread): New function.
16895 (remove_thread): New function.
16896 (clear_inferiors): Use for_each_inferior and free_one_thread.
16897 (find_inferior): New function.
16898 (find_inferior_id): New function.
16899 (inferior_target_data): Update argument type.
16900 (set_inferior_target_data): Likewise.
16901 (inferior_regcache_data): Likewise.
16902 (set_inferior_regcache_data): Likewise.
16903 * linux-low.c (linux_bp_reinsert): Remove.
16904 (all_processes, stopping_threads, using_thrads)
16905 (struct pending_signals, debug_threads, pid_of): New.
16906 (inferior_pid): Replace with macro.
16907 (struct inferior_linux_data): Remove.
16908 (get_stop_pc, add_process): New functions.
16909 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16910 Use add_process and add_thread.
16911 (linux_attach_lwp): New function, based on old linux_attach. Use
16912 add_process and add_thread. Set stop_expected for new threads.
16913 (linux_attach): New function.
16914 (linux_kill_one_process): New function.
16915 (linux_kill): Kill all LWPs.
16916 (linux_thread_alive): Use find_inferior_id.
16917 (check_removed_breakpoints, status_pending_p): New functions.
16918 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16919 Update. Use WNOHANG. Wait for cloned processes also. Update process
16920 struct for the found process.
16921 (linux_wait_for_event): New function.
16922 (linux_wait): Use it. Support LWPs.
16923 (send_sigstop, wait_for_sigstop, stop_all_processes)
16924 (linux_resume_one_process, linux_continue_one_process): New functions.
16925 (linux_resume): Support LWPs.
16926 (REGISTER_RAW_SIZE): Remove.
16927 (fetch_register): Use register_size instead. Call supply_register.
16928 (usr_store_inferior_registers): Likewise. Call collect_register.
16929 Fix recursive case.
16930 (regsets_fetch_inferior_registers): Improve error message.
16931 (regsets_store_inferior_registers): Add debugging.
16932 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16933 (unstopped_p, linux_signal_pid): New functions.
16934 (linux_target_ops): Add linux_signal_pid.
16935 (linux_init_signals): New function.
16936 (initialize_low): Call it. Initialize using_threads.
16937 * regcache.c (inferior_regcache_data): Add valid
16938 flag.
16939 (get_regcache): Fetch registers lazily. Add fetch argument
16940 and update all callers.
16941 (regcache_invalidate_one, regcache_invalidate): New
16942 functions.
16943 (new_register_cache): Renamed from create_register_cache.
16944 Return the new regcache.
16945 (free_register_cache): Change argument to a void *.
16946 (registers_to_string, registers_from_string): Call get_regcache
16947 with fetch flag set.
16948 (register_data): Make static. Pass fetch flag to get_regcache.
16949 (supply_register): Call get_regcache with fetch flag clear.
16950 (collect_register): Call get_regcache with fetch flag set.
16951 (collect_register_as_string): New function.
16952 * regcache.h: Update.
16953 * remote-utils.c (putpkt): Flush after debug output and use
16954 stderr.
16955 Handle input interrupts while waiting for an ACK.
16956 (input_interrupt): Use signal_pid method.
16957 (getpkt): Flush after debug output and use stderr.
16958 (outreg): Use collect_register_as_string.
16959 (new_thread_notify, dead_thread_notify): New functions.
16960 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16961 and general_thread.
16962 (look_up_one_symbol): Flush after debug output.
16963 * server.c (step_thread, server_waiting): New variables.
16964 (start_inferior): Don't use signal_pid. Update call to mywait.
16965 (attach_inferior): Update call to mywait.
16966 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16967 (main): Don't fetch/store registers explicitly. Use
16968 set_desired_inferior. Support proposed ``Hs'' packet. Update
16969 calls to mywait.
16970 * server.h: Update.
16971 (struct inferior_list, struct_inferior_list_entry): New.
16972 * target.c (set_desired_inferior): New.
16973 (write_inferior_memory): Constify.
16974 (mywait): New function.
16975 * target.h: Update.
16976 (struct target_ops): New signal_pid method.
16977 (mywait): Removed macro, added prototype.
16978
16979 * linux-low.h (regset_func): Removed.
16980 (regset_fill_func, regset_store_func): New.
16981 (enum regset_type): New.
16982 (struct regset_info): Add type field. Use new operation types.
16983 (struct linux_target_ops): stop_pc renamed to get_pc.
16984 Add decr_pc_after_break and breakpoint_at.
16985 (get_process, get_thread_proess, get_process_thread)
16986 (strut process_info, all_processes, linux_attach_lwp)
16987 (thread_db_init): New.
16988
16989 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16990 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16991 (the_low_target): Add new members.
16992 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16993 (i386_store_fpxregset): Constify.
16994 (target_regsets): Add new kind identifier.
16995 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16996 (i386_set_pc): Add debugging.
16997 (i386_breakpoint_at): New function.
16998 (the_low_target): Add new members.
16999 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17000 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17001 (mips_breakpoint_at): New.
17002 (the_low_target): Add new members.
17003 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17004 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17005 (the_low_target): Add new members.
17006 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17007 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17008 (the_low_target): Add new members.
17009 * linux-x86-64-low.c (target_regsets): Add new kind
17010 identifier.
17011
170122002-05-15 Daniel Jacobowitz <drow@mvista.com>
17013
17014 From Martin Pool <mbp@samba.org>:
17015 * server.c (gdbserver_usage): New function.
17016 (main): Call it.
17017
170182002-05-14 Daniel Jacobowitz <drow@mvista.com>
17019
17020 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17021 stop_at -> stop_pc.
17022
170232002-05-04 Andrew Cagney <ac131313@redhat.com>
17024
17025 * Makefile.in: Remove obsolete code.
17026
170272002-04-24 Michal Ludvig <mludvig@suse.cz>
17028
17029 * linux-low.c (regsets_fetch_inferior_registers),
17030 (regsets_store_inferior_registers): Removed cast to int from
17031 ptrace() calls.
17032 * regcache.h: Added declaration of struct inferior_info.
17033
170342002-04-20 Daniel Jacobowitz <drow@mvista.com>
17035
17036 * inferiors.c (struct inferior_info): Add regcache_data.
17037 (add_inferior): Call create_register_cache.
17038 (clear_inferiors): Call free_register_cache.
17039 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17040 * regcache.c (struct inferior_regcache_data): New.
17041 (registers): Remove.
17042 (get_regcache): New function.
17043 (create_register_cache, free_register_cache): New functions.
17044 (set_register_cache): Don't initialize the register cache here.
17045 (registers_to_string, registers_from_string, register_data): Call
17046 get_regcache.
17047 * regcache.h: Add prototypes.
17048 * server.h: Likewise.
17049
170502002-04-20 Daniel Jacobowitz <drow@mvista.com>
17051
17052 * mem-break.c: New file.
17053 * mem-break.h: New file.
17054 * Makefile.in: Add mem-break.o rule; update server.h
17055 dependencies.
17056 * inferiors.c (struct inferior_info): Add target_data
17057 member.
17058 (clear_inferiors): Free target_data member if set.
17059 (inferior_target_data, set_inferior_target_data): New functions.
17060 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17061 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17062 * linux-low.c (linux_bp_reinsert): New variable.
17063 (struct inferior_linux_data): New.
17064 (linux_create_inferior): Use set_inferior_target_data.
17065 (linux_attach): Likewise. Call add_inferior.
17066 (linux_wait_for_one_inferior): New function.
17067 (linux_wait): Call it.
17068 (linux_write_memory): Add const.
17069 (initialize_low): Call set_breakpoint_data.
17070 * linux-low.h (struct linux_target_ops): Add breakpoint
17071 handling members.
17072 * server.c (attach_inferior): Remove extra add_inferior
17073 call.
17074 * server.h: Include mem-break.h. Update inferior.c
17075 prototypes.
17076 * target.c (read_inferior_memory)
17077 (write_inferior_memory): New functions.
17078 * target.h (read_inferior_memory)
17079 (write_inferior_memory): Change macros to prototypes.
17080 (struct target_ops): Update comments. Add const to write_memory
17081 definition.
17082
170832002-04-11 Daniel Jacobowitz <drow@mvista.com>
17084
17085 * linux-low.c (usr_store_inferior_registers): Support
17086 registers which are allowed to fail to store.
17087 * linux-low.h (linux_target_ops): Likewise.
17088 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17089 (ppc_cannot_store_register): FPSCR may not be storable.
17090
170912002-04-09 Daniel Jacobowitz <drow@mvista.com>
17092
17093 * server.h: Include <string.h> if HAVE_STRING_H.
17094 * ChangeLog: Correct paths in last ChangeLog entry.
17095
170962002-04-09 Daniel Jacobowitz <drow@mvista.com>
17097
17098 * linux-low.h: Remove obsolete prototypes.
17099 (struct linux_target_ops): New.
17100 (extern the_low_target): New.
17101 * linux-low.c (num_regs, regmap): Remove declarations.
17102 (register_addr): Use the_low_target explicitly.
17103 (fetch_register): Likewise.
17104 (usr_fetch_inferior_registers): Likewise.
17105 (usr_store_inferior_registers): Likewise.
17106 * linux-arm-low.c (num_regs): Remove.
17107 (arm_num_regs): Define.
17108 (arm_regmap): Renamed from regmap, made static.
17109 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17110 made static.
17111 (arm_cannot_store_register): Renamed from cannot_store_register,
17112 made static.
17113 (the_low_target): New.
17114 * linux-i386-low.c (num_regs): Remove.
17115 (i386_num_regs): Define.
17116 (i386_regmap): Renamed from regmap, made static.
17117 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17118 made static.
17119 (i386_cannot_store_register): Renamed from cannot_store_register,
17120 made static.
17121 (the_low_target): New.
17122 * linux-ia64-low.c (num_regs): Remove.
17123 (ia64_num_regs): Define.
17124 (ia64_regmap): Renamed from regmap, made static.
17125 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17126 made static.
17127 (ia64_cannot_store_register): Renamed from cannot_store_register,
17128 made static.
17129 (the_low_target): New.
17130 * linux-m68k-low.c (num_regs): Remove.
17131 (m68k_num_regs): Define.
17132 (m68k_regmap): Renamed from regmap, made static.
17133 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17134 made static.
17135 (m68k_cannot_store_register): Renamed from cannot_store_register,
17136 made static.
17137 (the_low_target): New.
17138 * linux-mips-low.c (num_regs): Remove.
17139 (mips_num_regs): Define.
17140 (mips_regmap): Renamed from regmap, made static.
17141 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17142 made static.
17143 (mips_cannot_store_register): Renamed from cannot_store_register,
17144 made static.
17145 (the_low_target): New.
17146 * linux-ppc-low.c (num_regs): Remove.
17147 (ppc_num_regs): Define.
17148 (ppc_regmap): Renamed from regmap, made static.
17149 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17150 made static.
17151 (ppc_cannot_store_register): Renamed from cannot_store_register,
17152 made static.
17153 (the_low_target): New.
17154 * linux-s390-low.c (num_regs): Remove.
17155 (s390_num_regs): Define.
17156 (s390_regmap): Renamed from regmap, made static.
17157 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17158 made static.
17159 (s390_cannot_store_register): Renamed from cannot_store_register,
17160 made static.
17161 (the_low_target): New.
17162 * linux-sh-low.c (num_regs): Remove.
17163 (sh_num_regs): Define.
17164 (sh_regmap): Renamed from regmap, made static.
17165 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17166 made static.
17167 (sh_cannot_store_register): Renamed from cannot_store_register,
17168 made static.
17169 (the_low_target): New.
17170 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17171 (the_low_target): New.
17172
171732002-04-09 Daniel Jacobowitz <drow@mvista.com>
17174
17175 * Makefile.in: Add stamp-h target.
17176 * configure.in: Create stamp-h.
17177 * configure: Regenerated.
17178
171792002-04-09 Daniel Jacobowitz <drow@mvista.com>
17180
17181 * inferiors.c: New file.
17182 * target.c: New file.
17183 * target.h: New file.
17184 * Makefile.in: Add target.o and inferiors.o. Update
17185 dependencies.
17186 * linux-low.c (inferior_pid): New static variable,
17187 moved from server.c.
17188 (linux_create_inferior): Renamed from create_inferior.
17189 Call add_inferior. Return 0 on success instead of a PID.
17190 (linux_attach): Renamed from myattach.
17191 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17192 (linux_thread_alive): Renamed from mythread_alive.
17193 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17194 child dies.
17195 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17196 (regsets_store_inferior_registers): Correct error message.
17197 Add missing ``return 0''.
17198 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17199 (linux_store_registers): Renamed from store_inferior_registers.
17200 (linux_read_memory): Renamed from read_inferior_memory.
17201 (linux_write_memory): Renamed from write_inferior_memory.
17202 (linux_target_ops): New structure.
17203 (initialize_low): Call set_target_ops ().
17204 * remote-utils.c (unhexify): New function.
17205 (hexify): New function.
17206 (input_interrupt): Send signals to ``signal_pid''.
17207 * server.c (inferior_pid): Remove.
17208 (start_inferior): Update create_inferior call.
17209 (attach_inferior): Call add_inferior.
17210 (handle_query): New function.
17211 (main): Call handle_query for `q' packets.
17212 * server.h: Include "target.h". Remove obsolete prototypes.
17213 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17214
172152002-04-09 Daniel Jacobowitz <drow@mvista.com>
17216
17217 * Makefile.in: Add WARN_CFLAGS. Update configury
17218 dependencies.
17219 * configure.in: Check for <string.h>
17220 * configure: Regenerate.
17221 * config.in: Regenerate.
17222 * gdbreplay.c: Include needed system headers.
17223 (remote_open): Remove strchr prototype.
17224 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17225 * regcache.c (supply_register): Change buf argument to const void *.
17226 (supply_register_by_name): Likewise.
17227 (collect_register): Change buf argument to void *.
17228 (collect_register_by_name): Likewise.
17229 * regcache.h: Add missing prototypes.
17230 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17231 * server.c (handle_query): New function.
17232 (attached): New static variable, moved out of main.
17233 (main): Quiet longjmp clobber warnings.
17234 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17235 * utils.c (error): Remove NORETURN.
17236 (fatal): Likewise.