Provide string description of definition, visibility and resolution in LTO plug-in.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
1ef53e6b
AH
12019-03-22 Alan Hayward <alan.hayward@arm.com>
2 Jiong Wang <jiong.wang@arm.com>
3
4 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
6 to fail.
7 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
8
ee4fbcfa
AH
92019-03-22 Alan Hayward <alan.hayward@arm.com>
10 Jiong Wang <jiong.wang@arm.com>
11
12 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
13 (aarch64_get_hwcap): New function.
14 (aarch64_arch_setup): Read APIA hwcap.
15
6dc0ebde
AH
162019-03-22 Alan Hayward <alan.hayward@arm.com>
17 Jiong Wang <jiong.wang@arm.com>
18
19 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
20 (initialize_low_tracepoint): Likewise.
21 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
22 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
23 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
24 (aarch64_linux_read_description): Likewise.
25 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
26
1163a4b7
JB
272019-03-12 John Baldwin <jhb@FreeBSD.org>
28
29 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
30 i386_create_target_description for 'segments' parameter.
31 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
32 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
33 * win32-i386-low.c (i386_arch_setup): Likewise.
34
d3a70e03
TT
352019-03-12 Tom Tromey <tromey@adacore.com>
36
37 * linux-low.c (iterate_over_lwps): Update.
38
37991b4f
TT
392019-03-06 Tom Tromey <tom@tromey.com>
40
41 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
42 (captured_main): Use SCOPE_EXIT.
43
45950eb6
SDJ
442019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
45
46 * configure.srv: Use '$enable_unittest' instead of '$development'
47 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
48 case.
49
43ac54fc
TT
502019-02-27 Tom Tromey <tromey@adacore.com>
51
52 * gdbreplay.c (logchar): Handle \r\n.
53
df0da8a2
AH
542019-02-07 Alan Hayward <alan.hayward@arm.com>
55
56 * linux-low.c (linux_attach): Add process before lwp.
57 * server.c (attach_inferior): Check if already attached.
58
1a5c2598
TT
592019-02-07 Tom Tromey <tom@tromey.com>
60
61 * x86-tdesc.h: Rename include guard.
62 * x86-low.h: Add include guard.
63 * wincecompat.h: Rename include guard.
64 * win32-low.h: Add include guard.
65 * utils.h: Rename include guard.
66 * tracepoint.h: Rename include guard.
67 * tdesc.h: Rename include guard.
68 * target.h: Rename include guard.
69 * server.h: Rename include guard.
70 * remote-utils.h: Rename include guard.
71 * regcache.h: Rename include guard.
72 * nto-low.h: Rename include guard.
73 * notif.h: Add include guard.
74 * mem-break.h: Rename include guard.
75 * lynx-low.h: Add include guard.
76 * linux-x86-tdesc.h: Add include guard.
77 * linux-s390-tdesc.h: Add include guard.
78 * linux-ppc-tdesc-init.h: Add include guard.
79 * linux-low.h: Add include guard.
80 * linux-aarch64-tdesc.h: Add include guard.
81 * linux-aarch32-low.h: Add include guard.
82 * inferiors.h: Rename include guard.
83 * i387-fp.h: Rename include guard.
84 * hostio.h: Rename include guard.
85 * gdbthread.h: Rename include guard.
86 * gdb_proc_service.h: Rename include guard.
87 * event-loop.h: Rename include guard.
88 * dll.h: Rename include guard.
89 * debug.h: Rename include guard.
90 * ax.h: Rename include guard.
91
956cc47c
SN
922018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
93
94 PR gdb/23985
95 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
96 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
97
a0707f3c
TT
982019-01-25 Tom Tromey <tom@tromey.com>
99
100 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
101
0747795c
TT
1022019-01-25 Tom Tromey <tom@tromey.com>
103
104 * win32-low.c: Fix common/ includes.
105 * win32-i386-low.c: Fix common/ includes.
106 * tracepoint.c: Fix common/ includes.
107 * thread-db.c: Fix common/ includes.
108 * target.h: Fix common/ includes.
109 * symbol.c: Fix common/ includes.
110 * spu-low.c: Fix common/ includes.
111 * server.h: Fix common/ includes.
112 * server.c: Fix common/ includes.
113 * remote-utils.c: Fix common/ includes.
114 * regcache.h: Fix common/ includes.
115 * regcache.c: Fix common/ includes.
116 * nto-x86-low.c: Fix common/ includes.
117 * notif.h: Fix common/ includes.
118 * mem-break.h: Fix common/ includes.
119 * lynx-low.c: Fix common/ includes.
120 * lynx-i386-low.c: Fix common/ includes.
121 * linux-x86-tdesc-selftest.c: Fix common/ includes.
122 * linux-x86-low.c: Fix common/ includes.
123 * linux-low.c: Fix common/ includes.
124 * inferiors.h: Fix common/ includes.
125 * i387-fp.c: Fix common/ includes.
126 * hostio.c: Fix common/ includes.
127 * hostio-errno.c: Fix common/ includes.
128 * gdbthread.h: Fix common/ includes.
129 * gdbreplay.c: Fix common/ includes.
130 * fork-child.c: Fix common/ includes.
131 * event-loop.c: Fix common/ includes.
132 * ax.c:
133 (enum gdb_agent_op): Fix common/ includes.
134
be6d4f74
TT
1352019-01-21 Tom Tromey <tom@tromey.com>
136
137 * tracepoint.c: Fix includes.
138 * remote-utils.c: Fix includes.
139 * linux-x86-low.c: Fix includes.
140
66d91b39
JB
1412019-01-01 Joel Brobecker <brobecker@adacore.com>
142
143 * gdbreplay.c (gdbreplay_version): Update copyright year in
144 version message.
145 * server.c (gdbserver_version): Likewise.
146
754e3168
AH
1472018-12-05 Alan Hayward <alan.hayward@arm.com>
148
149 * linux-low.c (add_lwp): Switch ordering.
150
d105de22
TT
1512018-11-29 Tom Tromey <tom@tromey.com>
152
153 * win32-low.c (win32_join): Take pid, not process.
154 * target.h (struct target_ops) <join>: Change argument type.
155 (join_inferior): Change argument name.
156 * spu-low.c (spu_join): Take pid, not process.
157 * server.c (handle_detach): Preserve pid before destroying
158 process.
159 * lynx-low.c (lynx_join): Take pid, not process.
160 * linux-low.c (linux_join): Take pid, not process.
161
50138245
AH
1622018-11-23 Alan Hayward <alan.hayward@arm.com>
163
164 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
165 (aarch64_cannot_fetch_register): Likewise.
166 (struct linux_target_ops): Update references.
167
64f57f3d
PFC
1682018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
169
170 * linux-ppc-low.c: Include nat/linux-ptrace.h.
171
8d619c01
EBM
1722018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
173
174 * configure.srv (ipa_ppc_linux_regobj): Add
175 powerpc-isa207-htm-vsx32l-ipa.o and
176 powerpc-isa207-htm-vsx64l-ipa.o.
177 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
178 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
179 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
180 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
181 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
182 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
183 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
184 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
185 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
186 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
187 (init_registers_powerpc_isa207_htm_vsx32l)
188 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
189 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
190 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
191 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
192 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
193 (ppc_store_tm_ctarregset): New functions.
194 (ppc_regsets): Add entries for HTM regsets.
195 (ppc_arch_setup): Set htm in features struct when needed. Set
196 sizes for the HTM regsets.
197 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
198 (initialize_low_arch): Call
199 init_registers_powerpc_isa207_htm_vsx32l and
200 init_registers_powerpc_isa207_htm_vsx64l.
201 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
202 PPC_TDESC_ISA207_HTM_VSX.
203 (initialize_low_tracepoint): Call
204 init_registers_powerpc_isa207_htm_vsx32l and
205 init_registers_powerpc_isa207_htm_vsx64l.
206
232bfb86
EBM
2072018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
208
209 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
210 rs6000/power-linux-pmu.xml to srv_xmlfiles.
211 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
212 (ppc_store_pmuregset): New functions.
213 (ppc_regsets): Add entries for ebb and pmu regsets.
214 (ppc_arch_setup): Set isa207 in features struct if the ebb and
215 pmu regsets are available. Set sizes for these regsets.
216
f2cf6173
EBM
2172018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
218
219 * configure.srv (ipa_ppc_linux_regobj): Add
220 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
221 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
222 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
223 rs6000/powerpc-isa207-vsx32l.xml, and
224 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
225 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
226 <PPC_TDESC_ISA207_VSX>: New enum value.
227 (init_registers_powerpc_isa207_vsx32l): Declare.
228 (init_registers_powerpc_isa207_vsx64l): Declare.
229 * linux-ppc-low.c (ppc_fill_tarregset): New function.
230 (ppc_store_tarregset): New function.
231 (ppc_regsets): Add entry for the TAR regset.
232 (ppc_arch_setup): Set isa207 in features struct when needed. Set
233 size for the TAR regsets.
234 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
235 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
236 and init_registers_powerpc_isa207_vsx64l.
237 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
238 (initialize_low_tracepoint): Call
239 init_registers_powerpc_isa207_vsx32l and
240 init_registers_powerpc_isa207_vsx64l.
241
7ca18ed6
EBM
2422018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
243 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
244
245 * configure.srv (ipa_ppc_linux_regobj): Add
246 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
247 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
248 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
249 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
250 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
251 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
252 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
253 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
254 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
255 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
256 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
257 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
258 (ppc_hwcap): Add comment.
259 (ppc_hwcap2): New global.
260 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
261 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
262 (ppc_regsets): Add entries for the DSCR and PPR regsets.
263 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
264 when needed. Set sizes for the the DSCR and PPR regsets.
265 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
266 (initialize_low_arch): Call
267 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
268 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
269 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
270 PPC_TDESC_ISA205_PPR_DSCR_VSX.
271 (initialize_low_tracepoint): Call
272 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
273 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
274
5c849b22
PFC
2752018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
276
277 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
278
8ecfd7bd
SDJ
2792018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
280 Simon Marchi <simark@simark.ca>
281
282 * acinclude.m4: Include "../selftest.m4".
283 * configure: Regenerate.
284 * configure.ac: Use "GDB_AC_SELFTEST".
285 * configure.srv: Use "$enable_unittests" instead of
286 "$development" when checking whether unit tests have been
287 enabled.
288 * server.c (captured_main): Update message informing that
289 selftests have been disabled.
290
96643e35
TT
2912018-10-04 Tom Tromey <tom@tromey.com>
292
293 * configure: Rebuild.
294
da4ae14a
TT
2952018-10-04 Tom Tromey <tom@tromey.com>
296
297 * server.c (handle_status): Rename inner "thread".
298 (process_serial_event): Declare "res" in 'm' case.
299 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
300 (iterate_over_lwps): Rename inner "thread".
301 (linux_qxfer_libraries_svr4): Rename inner "len".
302 * gdbthread.h (find_thread_in_random): Rename inner "thread".
303
7c619dbd
GB
3042018-10-01 Gary Benson <gbenson@redhat.com>
305
306 * gdb_proc_service.h: Moved common code to
307 common/gdb_proc_service.h.
308
3795e814
GB
3092018-10-01 Gary Benson <gbenson@redhat.com>
310
311 * gdb_proc_service.h: Synchronize comments and whitespace with
312 GDB's version of this file.
313
49b036f1
TT
3142018-09-25 Tom Tromey <tom@tromey.com>
315
316 * configure: Rebuild.
317 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
318
8ff03f0b
SM
3192018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
320
321 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
322 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
323 ($(IPA_LIB)): Sort IPA_OBJS.
324
a1cd91dc
SM
3252018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
326
327 * Makefile.in: Remove references to $(ADD_DEPS).
328
752312ba
TT
3292018-09-16 Tom Tromey <tom@tromey.com>
330
331 * remote-utils.c (remote_open): Use GNU style for metasyntactic
332 variables.
333 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
334 variables.
335
f1628857
TT
3362018-09-05 Tom Tromey <tom@tromey.com>
337
338 * configure: Rebuild.
339
ad202fcc
SM
3402018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
341
342 PR build/23399
343 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
344
d3d8724a
TT
3452018-08-27 Tom Tromey <tom@tromey.com>
346
347 PR build/23087:
348 * configure: Rebuild.
349
b4f183d2
TT
3502018-08-27 Tom Tromey <tom@tromey.com>
351
352 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
353 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
354 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
355 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
356 (s390x_emit_stack_adjust): Add casts to unsigned char.
357
4e2aa472
SM
3582018-08-22 Simon Marchi <simon.marchi@ericsson.com>
359
360 PR gdb/23374
361 PR gdb/23375
362 * server.h (struct client_state) <disable_randomization>:
363 Initialize to 1.
364
cf4088a9
SM
3652018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
366
367 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
368 variable.
369 (mips_supply_ptrace_register): Likewise.
370
a0de763e
TT
3712018-07-22 Tom Tromey <tom@tromey.com>
372
373 * configure: Rebuild.
374
b0a7723d
TT
3752018-07-22 Tom Tromey <tom@tromey.com>
376
377 * win32-low.c (win32_create_inferior): Remove unused variables.
378 * gdbreplay.c (remote_open): Remove unused variable.
379 * remote-utils.c (remote_prepare): Remove unused variable.
380 * x86-tdesc.h (X86_TDESC_H): Define.
381 (amd64_expedite_regs): Define conditionally.
382 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
383 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
384 * remote-utils.c (readchar): Remove unused variable.
385
a780ef4f
PA
3862018-07-13 Pedro Alves <palves@redhat.com>
387
388 * linux-low.c (linux_kill): Change parameter to process_info
389 pointer instead of pid. Adjust.
390 * lynx-low.c (lynx_kill): Likewise.
391 * nto-low.c (nto_kill): Likewise.
392 * spu-low.c (spu_kill): Likewise.
393 * win32-low.c (win32_kill): Likewise.
394 * server.c (handle_v_kill, kill_inferior_callback)
395 (detach_or_kill_for_exit): Adjust.
396 * target.c (kill_inferior): Change parameter to process_info
397 pointer instead of pid. Adjust.
398 * target.h (struct target_ops) <kill>: Change parameter to
399 process_info pointer instead of pid. Adjust all implementations
400 and callers.
401 (kill_inferior): Likewise.
402
ef2ddb33
PA
4032018-07-13 Pedro Alves <palves@redhat.com>
404
405 * linux-low.c (linux_detach, linux_join): Change parameter to
406 process_info pointer instead of pid. Adjust.
407 * lynx-low.c (lynx_detach, lynx_join): Likewise.
408 * nto-low.c (nto_detach): Likewise.
409 * spu-low.c (spu_detach, spu_join): Likewise.
410 * win32-low.c (win32_detach, win32_join): Likewise.
411 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
412 * target.h (struct target_ops) <detach, join>: Change parameter to
413 process_info pointer instead of pid. Adjust all implementations
414 and callers.
415 (detach_inferior, join_inferior): Rename 'pid' parameter to
416 'proc'.
417
c7ab0aef
SDJ
4182018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
419 Jan Kratochvil <jan.kratochvil@redhat.com>
420 Paul Fertser <fercerpav@gmail.com>
421 Tsutomu Seki <sekiriki@gmail.com>
422
423 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
424 (OBS): Add 'common/netstuff.o'.
425 (GDBREPLAY_OBS): Likewise.
426 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
427 (remote_open): Implement support for IPv6
428 connections.
429 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
430 and 'wspiapi.h'.
431 (handle_accept_event): Accept connections from IPv6 sources.
432 (remote_prepare): Handle IPv6-style hostnames; implement
433 support for IPv6 connections.
434 (remote_open): Implement support for printing connections from
435 IPv6 sources.
436
31445d10
PA
4372018-07-11 Pedro Alves <palves@redhat.com>
438
439 PR gdb/23377
440 * mem-break.c (any_persistent_commands): Add process_info
441 parameter and use it instead of relying on the current process.
442 Change return type to bool.
443 * mem-break.h (any_persistent_commands): Add process_info
444 parameter and change return type to bool.
445 * server.c (handle_detach): Remove require_running_or_return call.
446 Look up the process_info for the process we're about to detach.
447 If not found, return back error to GDB. Adjust
448 any_persistent_commands call to pass down a process pointer.
449
cb197132
PA
4502018-07-11 Pedro Alves <palves@redhat.com>
451
452 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
453 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
454 instead of collect_register_by_name.
455 * regcache.c (regcache_raw_get_unsigned_by_name): New.
456 * regcache.h (regcache_raw_get_unsigned_by_name): New.
457
1b919490
VB
4582018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
459 Pedro Alves <palves@redhat.com>
460
461 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
462
d7e15655
TT
4632018-07-03 Tom Tromey <tom@tromey.com>
464
465 * linux-low.c: Update.
466 * lynx-low.c: Update.
467 * mem-break.c: Update.
468 * nto-low.c: Update.
469 * remote-utils.c: Update.
470 * server.c: Update.
471 * spu-low.c: Update.
472 * target.c: Update.
473 * win32-low.c: Update.
474
26a57c92
TT
4752018-07-03 Tom Tromey <tom@tromey.com>
476
477 * server.c: Update.
478
0e998d96
TT
4792018-07-03 Tom Tromey <tom@tromey.com>
480
481 * linux-low.c: Update.
482
cc6bcb54
TT
4832018-07-03 Tom Tromey <tom@tromey.com>
484
485 * target.c: Update.
486
e38504b3
TT
4872018-07-03 Tom Tromey <tom@tromey.com>
488
489 * linux-low.c: Update.
490 * linux-mips-low.c: Update.
491 * lynx-low.c: Update.
492 * nto-low.c: Update.
493 * remote-utils.c: Update.
494 * server.c: Update.
495 * spu-low.c: Update.
496 * target.c: Update.
497 * thread-db.c: Update.
498
e99b03dc
TT
4992018-07-03 Tom Tromey <tom@tromey.com>
500
501 * linux-low.c: Update.
502 * linux-mips-low.c: Update.
503 * lynx-low.c: Update.
504 * mem-break.c: Update.
505 * nto-low.c: Update.
506 * remote-utils.c: Update.
507 * server.c: Update.
508 * spu-low.c: Update.
509 * target.c: Update.
510 * tracepoint.c: Update.
511
f2907e49
TT
5122018-07-03 Tom Tromey <tom@tromey.com>
513
514 * linux-low.c: Update.
515 * linux-ppc-low.c: Update.
516 * linux-x86-low.c: Update.
517 * proc-service.c: Update.
518 * server.c: Update.
519 * spu-low.c: Update.
520 * thread-db.c: Update.
521 * win32-low.c: Update.
522
fd79271b
TT
5232018-07-03 Tom Tromey <tom@tromey.com>
524
525 * linux-low.c: Update.
526 * lynx-low.c: Update.
527 * nto-low.c: Update.
528 * remote-utils.c: Update.
529 * spu-low.c: Update.
530 * thread-db.c: Update.
531 * win32-low.c: Update.
532
c0867626
SDJ
5332018-06-29 Joel Brobecker <brobecker@adacore.com>
534
535 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
536 parameter in call to 'amd64_create_target_description'.
537
2512d7ef
JK
5382018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
539
540 * x86-tdesc.h: Remove executable permission flag.
541
d0ac1c44
SM
5422018-06-19 Simon Marchi <simon.marchi@ericsson.com>
543
544 * configure.ac: Remove AC_PREREQ, add missing quoting.
545 * configure: Re-generate.
546 * config.in: Re-generate.
547 * aclocal.m4: Re-generate.
548
c4eb05ff
SM
5492018-06-18 Simon Marchi <simon.marchi@ericsson.com>
550
551 * tracepoint.h (current_traceframe): Remove declaration.
552
02895270
AH
5532018-06-18 Alan Hayward <alan.hayward@arm.com>
554
555 * linux-aarch64-low.c (is_sve_tdesc): New function.
556 (aarch64_sve_regs_copy_to_regcache): Likewise.
557 (aarch64_sve_regs_copy_from_regcache): Likewise.
558 (aarch64_regs_info): Add SVE checks.
559 (initialize_low_arch): Initialize SVE.
560
e9902bfc
AH
5612018-06-18 Alan Hayward <alan.hayward@arm.com>
562
563 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
564
fefa175e
AH
5652018-06-11 Alan Hayward <alan.hayward@arm.com>
566
567 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
568 (initialize_low_tracepoint): Likewise
569 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
570 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
571 param.
572 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
573 checks.
574 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
575
b91ad3ff
AH
5762018-06-11 Alan Hayward <alan.hayward@arm.com>
577
578 * server.h (PBUFSIZ): Increase size
579
f868386e
AH
5802018-06-11 Alan Hayward <alan.hayward@arm.com>
581
582 * regcache.c (regcache::raw_compare): New function.
583 * regcache.h (regcache::raw_compare): New declaration.
584
9c861883
AH
5852018-06-11 Alan Hayward <alan.hayward@arm.com>
586
587 * regcache.c (new_register_cache): Use new.
588 (free_register_cache): Use delete.
589 (register_data): Use const.
590 (supply_register): Move body inside regcache.
591 (regcache::raw_supply): New override function.
592 (collect_register): Move body inside regcache.
593 (regcache::raw_collect): New override function.
594 (regcache::get_register_status): New override function.
595 * regcache.h (struct regcache): Inherit from reg_buffer_common.
596
40591844
TT
5972018-06-09 Tom Tromey <tom@tromey.com>
598
599 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
600 declare queue.
601 (event_queue): Use std::queue.
602 (gdb_event_xfree): Remove.
603 (initialize_event_loop, process_event, wait_for_event): Update.
604
6341380d
SC
6052018-06-08 Stan Cox <scox@redhat.com>
606
607 * win32-low.c (win32_create_inferior): last_ptid and last_status
608 moved to client_state.
609
03349c93
PA
6102018-06-08 Pedro Alves <palves@redhat.com>
611
612 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
613 common/common-exceptions.o, common/common-utils.o,
614 common/errors.o, common/print-utils.o and utils.o.
615 * gdbreplay.c: Include "common-defs.h" instead of the two
616 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
617 string.h or alloca.h.
618 (perror_with_name): Delete.
619 (remote_open): Use xstrdup instead of strdup.
620 (main): Rename to ...
621 (captured_main): ... this.
622 (main): New.
623
8dcc53b3
TT
6242018-06-08 Tom Tromey <tom@tromey.com>
625
626 * linux-low.c (linux_low_read_btrace): Update.
627
c12a5089
SC
6282018-06-04 Stan Cox <scox@redhat.com>
629
630 * server.h (struct client_state): New.
631 * server.c (cont_thread, general_thread, multi_process)
632 (report_fork_events, report_vfork_events, report_exec_events)
633 (report_thread_events, swbreak_feature, hwbreak_feature)
634 (vCont_supported, disable_randomization, pass_signals)
635 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
636 Moved to client_state.
637 * remote-utils.c (remote_debug, noack_mode)
638 (transport_is_reliable): Moved to client_state.
639 * tracepoint.c (current_traceframe): Moved to client_state.
640
641 Update all callers.
642 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
643 linux-low.c, remote-utils.h, target.c: Use client_state.
644
122394f1
AH
6452018-05-31 Alan Hayward <alan.hayward@arm.com>
646
647 * configure.srv: Add new c/h file.
648
95228a0d
AH
6492018-05-31 Alan Hayward <alan.hayward@arm.com>
650
651 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
652 null VQ.
653
d8dab6c3
MR
6542018-05-25 Maciej W. Rozycki <macro@mips.com>
655
656 * gdb.arch/mips-fpregset-core.exp: New test.
657 * gdb.arch/mips-fpregset-core.c: New test source.
658
81e25b7c
EK
6592018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
660
661 PR server/23198
662 * hostio.c (require_int): Do not report overflow for integers
663 between 0xfffffff and 0x7fffffff.
664
7e947ad3
MR
6652018-05-22 Maciej W. Rozycki <macro@mips.com>
666
667 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
668 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
669 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
670 functions.
671 (the_low_target): Wire them.
672
1d75a658
PFC
6732018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
674
675 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
676 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
677 mode. Call collect_register_by_name with vscr using
678 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
679 (ppc_store_vrregset): Add and set vscr_offset variable as in
680 ppc_fill_vrregset. Call supply_register_by_name with vscr using
681 vscr_offset.
682
d078308a
PFC
6832018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
684
685 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
686 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
687 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
688
7273b5fc
PFC
6892018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
690
691 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
692 (ppc_store_vsxregset): Likewise.
693 (ppc_fill_vrregset): Likewise.
694 (ppc_store_vrregset): Likewise.
695 (ppc_fill_evrregset): Likewise.
696 (ppc_store_evrregset): Likewise.
697 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
698 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
699 needed.
700
2e077f5e
PFC
7012018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
702
703 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
704 wordsize of the inferior. Call ppc_linux_target_wordsize.
705
bd64614e
PFC
7062018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
707
708 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
709 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
710 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
711 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
712 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
713 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
714 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
715 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
716 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
717 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
718 (tdesc_powerpc_e500l): Remove.
719 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
720 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
721 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
722 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
723 linux-ppc-tdesc.h.
724 (ppc_arch_setup): Remove target description matching code. Fill a
725 ppc_linux_features struct and call ppc_linux_match_description
726 with it.
727
75d74cca
MR
7282018-05-22 Maciej W. Rozycki <macro@mips.com>
729
730 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
731 width of the requested register exceeds the width of the
732 `ptrace' data type.
733 (mips_cannot_store_register): Likewise.
734
e4439e43
MR
7352018-05-21 Maciej W. Rozycki <macro@mips.com>
736
737 * linux-mips-low.c (mips_fetch_register): New function. Update
738 preceding comment.
739 (mips_store_gregset): Supply 0 rather than $restart for $zero.
740 (the_low_target): Wire `mips_fetch_register'.
741
55271bf9
JB
7422018-05-10 Joel Brobecker <brobecker@adacore.com>
743
744 * lynx-i386-low.c (LYNXOS_178): New macro.
745 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
746 the layout on LynxOS-178.
747 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
748 handle floating point registers that are not supported by
749 LynxOS-178.
750
1a34f210
TT
7512018-05-10 Tom Tromey <tom@tromey.com>
752
753 * configure: Rebuild.
754
190852c8
JB
7552018-05-10 Joel Brobecker <brobecker@adacore.com>
756
757 PR server/23158:
758 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
759 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
760 Use it to set the expedite_regs field in the given tdesc.
761 * x86-tdesc.h: New file.
762 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
763 Adjust following the addition of the new expedite_regs parameter
764 to init_target_desc.
765 * linux-tic6x-low.c (tic6x_read_description): Likewise.
766 * linux-x86-tdesc.c: #include "x86-tdesc.h".
767 (i386_linux_read_description, amd64_linux_read_description):
768 Adjust following the addition of the new expedite_regs parameter
769 to init_target_desc.
770 * lynx-i386-low.c: #include "x86-tdesc.h".
771 (lynx_i386_arch_setup): Adjust following the addition of the new
772 expedite_regs parameter to init_target_desc.
773 * nto-x86-low.c: #include "x86-tdesc.h".
774 (nto_x86_arch_setup): Adjust following the addition of the new
775 expedite_regs parameter to init_target_desc.
776 * win32-i386-low.c: #include "x86-tdesc.h".
777 (i386_arch_setup): Adjust following the addition of the new
778 expedite_regs parameter to init_target_desc.
779
7dbac825
JB
7802018-05-10 Joel Brobecker <brobecker@adacore.com>
781
782 PR server/23158:
783 * win32-low.c (win32_create_inferior): Add call to my_wait
784 setting last_status global.
785
906994d9
JB
7862018-05-10 Joel Brobecker <brobecker@adacore.com>
787
788 PR server/23158:
789 * win32-low.c (create_process): Only call gdb_tilde_expand if
790 inferior_cwd is not NULL.
791
8ee22052
AB
7922018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
793
794 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
795 registers to the cache if their values have changed.
796 (i387_xsave_to_cache): Provide default values for x87 control
797 registers when these features are available, but disabled.
798 * regcache.c (supply_register_by_name_zeroed): New function.
799 * regcache.h (supply_register_by_name_zeroed): Declare new
800 function.
801
aff689d3
TT
8022018-05-07 Tom Tromey <tom@tromey.com>
803
804 * configure: Rebuild.
805
85e26832
TT
8062018-05-04 Tom Tromey <tom@tromey.com>
807
808 * configure: Rebuild.
809
a3b60e45
JK
8102018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
811 Pedro Alves <palves@redhat.com>
812
813 * linux-aarch64-low.c (aarch64_stopped_data_address):
814 Likewise.
815
632e107b
TT
8162018-04-27 Tom Tromey <tom@tromey.com>
817
818 * configure: Rebuild.
819
458412c3
TT
8202018-04-23 Tom Tromey <tom@tromey.com>
821
822 * configure: Rebuild.
823
f31c089e
SM
8242018-04-19 Simon Marchi <simon.marchi@ericsson.com>
825
826 * Makefile.in (depcomp): Add "..".
827 (all_deps_files): New and use it.
828
b319b098
AH
8292018-04-18 Alan Hayward <alan.hayward@arm.com>
830
831 * configure.srv (aarch64*-*-linux*): Don't include xml.
832 (i[34567]86-*-cygwin*): Likewise.
833 (i[34567]86-*-linux*): Likewise.
834 (i[34567]86-*-lynxos*): Likewise.
835 (i[34567]86-*-mingw32ce*): Likewise.
836 (i[34567]86-*-mingw*): Likewise.
837 (i[34567]86-*-nto*): Likewise.
838 (tic6x-*-uclinux): Likewise.
839 (x86_64-*-linux*): Likewise.
840 (x86_64-*-mingw*): Likewise.
841 (x86_64-*-cygwin*): Likewise.
842
3b74854b
AH
8432018-04-18 Alan Hayward <alan.hayward@arm.com>
844
845 * tdesc.c: Remove xml parameter.
846
e98577a9
AH
8472018-04-18 Alan Hayward <alan.hayward@arm.com>
848
849 * server.c (get_features_xml): Remove cast.
850 * tdesc.c (void target_desc::accept): Fill in function.
851 (tdesc_get_features_xml): Remove old xml creation.
852 (print_xml_feature::visit_pre): Add xml vistor.
853 * tdesc.h (struct target_desc): Make xmltarget mutable.
854 (tdesc_get_features_xml): Remove declaration.
855
d278f585
AH
8562018-04-18 Alan Hayward <alan.hayward@arm.com>
857
858 * tdesc.c (tdesc_architecture_name): Add new function.
859 (tdesc_osabi_name): Likewise.
860 (tdesc_get_features_xml): Use new functions.
861
eee8a18d
AH
8622018-04-18 Alan Hayward <alan.hayward@arm.com>
863
864 * tdesc.c (tdesc_create_flags): Remove.
865 (tdesc_add_flag): Likewise.
866 (tdesc_named_type): Likewise.
867 (tdesc_create_union): Likewise.
868 (tdesc_create_struct): Likewise.
869 (tdesc_create_vector): Likewise.
870 (tdesc_add_bitfield): Likewise.
871 (tdesc_add_field): Likewise.
872 (tdesc_set_struct_size): Likewise.
873
82ec9bc7
AH
8742018-04-18 Alan Hayward <alan.hayward@arm.com>
875
876 * tdesc.c (~target_desc): Remove implictly deleted items.
877 (init_target_desc): Iterate all features.
878 (tdesc_get_features_xml): Use vector.
879 (tdesc_create_feature): Create feature.
880 * tdesc.h (tdesc_feature) Remove
881 (target_desc): Add features.
882
ea3e7d71
AH
8832018-04-18 Alan Hayward <alan.hayward@arm.com>
884
885 * Makefile.in: Add common/tdesc.c
886 * tdesc.c (init_target_desc): init all reg_defs from register
887 vector.
888 (tdesc_create_reg): Create tdesc_reg.
889 * tdesc.h (tdesc_feature): Add register vector.
890
17d08cd4
SM
8912018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
892
893 * tdesc.h (struct target_desc) <features>: Change type to
894 std::vector<std::string>.
895 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
896 changes.
897 (tdesc_get_features_xml): Likewise.
898 (tdesc_create_feature): Likewise.
899
5cd3e386
AH
9002018-03-26 Alan Hayward <alan.hayward@arm.com>
901
902 * regcache.c (find_register_by_number): Return a ref.
903 (find_regno): Use references.
904 (register_size): Likewise.
905 (register_data): Likewise.
906 * tdesc.c (target_desc::~target_desc): Remove free calls.
907 (target_desc::operator==): Use std::vector compare.
908 (init_target_desc): Use reference.
909 (tdesc_create_reg): Use reg constructors.
910 * tdesc.h (struct target_desc): Replace pointer with object.
911
dff7492c
AH
9122018-03-23 Alan Hayward <alan.hayward@arm.com>
913
914 * regcache.c (find_register_by_number): Make static.
915 (find_regno): Use find_register_by_number
916 * regcache.h (struct reg): Remove declaration.
917
d80e5242
AH
9182018-03-23 Alan Hayward <alan.hayward@arm.com>
919
920 * tdesc.c (target_desc::~target_desc): Move to here.
921 (target_desc::operator==): Likewise.
922 * tdesc.h (target_desc::~target_desc): Move from here.
923 (target_desc::operator==): Likewise.
924
f69c5afb
AA
9252018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
926
927 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
928
ce29f843
AA
9292018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
930
931 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
932 S390_TDESC_GS.
933 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
934 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
935 and init_registers_s390_gs_linux64.
936
c49bd90b
AA
9372018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
938
939 * linux-s390-low.c (s390_fill_gs): Remove function.
940 (s390_fill_gsbc): Remove function.
941 (s390_regsets): Set fill functions for the guarded storage regsets
942 to NULL.
943
7edb9bd3
AA
9442018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
945
946 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
947 the word size. Add comment.
948 (s390_get_wordsize): New function.
949 (s390_arch_setup): No longer select a temporary tdesc to fetch the
950 pswm with it. Instead, use s390_get_wordsize to determine the
951 word size first and derive the correct tdesc from that directly.
952
39be3c7e
SM
9532018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
954
955 * Makefile.in: Include silent-rules.mk.
956 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
957 (COMPILE): Add ECHO_CXX.
958 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
959 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
960 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
961 (version-generated.c): Add ECHO_GEN.
962 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
963 (IPAGENT_COMPILE): Add ECHO_CXX.
964 (%-generated.c): Add ECHO_REGDAT.
965
3ae9ce5d
TT
9662018-03-14 Tom Tromey <tom@tromey.com>
967
968 PR cli/14977:
969 * ax.c (ax_printf): Special case for NULL.
970
e6a58aa8
SM
9712018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
972
973 * linux-low.c (linux_qxfer_libraries_svr4): Use
974 xml_escape_text_append.
975
f6e8a41e
SM
9762018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
977
978 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
979
b9671caf
SM
9802018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
981
982 * server.c (handle_general_set): Remove unnecessary xstrdup.
983
e80aaf61
SM
9842018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
985
986 * server.c (parse_debug_format_options): Adjust to
987 delim_string_to_char_ptr_vec changes.
988 * thread-db.c (thread_db_load_search): Adjust to
989 dirnames_to_char_ptr_vec changes.
990
b1223e78
MM
9912018-03-01 Markus Metzger <markus.t.metzger@intel.com>
992
993 * target.h (target_enable_btrace, target_disable_btrace)
994 (target_read_btrace, target_read_btrace_conf): Turn macro into
995 inline function. Throw error if target method is not defined.
996 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
997 check for btrace target method. Be prepared to handle exceptions
998 from btrace target methods.
999
81561546
SDJ
10002018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1001
1002 * server.c (captured_main): Change order of error message printed
1003 when the current working directory cannot be found.
1004
25e3c82c
SDJ
10052018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1006
1007 * server.c: Include "filenames.h" and "pathstuff.h".
1008 (program_name): Delete variable.
1009 (program_path): New anonymous class.
1010 (get_exec_wrapper): Use "program_path" instead of
1011 "program_name".
1012 (handle_v_run): Likewise.
1013 (captured_main): Likewise.
1014 (process_serial_event): Likewise.
1015
b4987c95
SDJ
10162018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1017
1018 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1019 (OBJS): Add "pathstuff.o".
1020 * server.c (current_directory): New global variable.
1021 (captured_main): Initialize "current_directory".
1022
f46cd62a
AH
10232018-02-26 Alan Hayward <alan.hayward@arm.com>
1024
1025 * tdesc.c: Use common/tdesc.h.
1026 * tdesc.h: Likewise.
1027
a543c5ca
AH
10282018-02-20 Alan Hayward <alan.hayward@arm.com>
1029 Simon Marchi <simon.marchi@ericsson.com>
1030
1031 * Makefile.in: Switch order of make rules.
1032
b5884fa7
AH
10332018-02-19 Alan Hayward <alan.hayward@arm.com>
1034
1035 * Makefile.in: Add common directory in build.
1036 * configure.ac: Add common reference.
1037 * configure: Regenerate.
1038
de6242d3
MM
10392018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1040
1041 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1042 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1043 * spu-low.c (spu_target_ops): Likewise.
1044 * win32-low.c (win32_target_ops): Likewise.
1045 * server.c (supported_btrace_packets): Report packets unconditionally.
1046 * target.h (target_ops) <supports_btrace>: Remove.
1047 (target_supports_btrace): Remove.
1048
9ee23a85
MM
10492018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1050
1051 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1052 (handle_btrace_disable): Change return type to void. Use exceptions
1053 to report errors.
1054 (handle_btrace_general_set): Catch exception and copy message to
1055 return message.
1056
8ce47547
TT
10572018-02-08 Tom Tromey <tom@tromey.com>
1058
1059 * linux-low.c (install_software_single_step_breakpoints): Use
1060 make_scoped_restore.
1061 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1062 (do_restore_current_thread_cleanup): Remove.
1063 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1064 declare.
1065
45dd3607
TT
10662018-02-08 Tom Tromey <tom@tromey.com>
1067
1068 * mem-break.c (set_raw_breakpoint_at): Use
1069 gdb::unique_xmalloc_ptr.
1070
e671cd59
PA
10712018-01-30 Pedro Alves <palves@redhat.com>
1072
1073 PR gdb/13211
1074 * target.c (target_terminal::terminal_state): Rename to ...
1075 (target_terminal::m_terminal_state): ... this.
1076
a0aad537
JC
10772018-01-19 James Clarke <jrtc27@jrtc27.com>
1078
1079 * linux-low.c (handle_extended_wait): Surround call to
1080 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1081
4d9b86e1
SM
10822018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1083
1084 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1085 linux_ptrace_attach_fail_reason_string now returning an
1086 std::string.
1087 (linux_attach): Likewise.
1088 * thread-db.c (attach_thread): Likewise.
1089
f517c180
EA
10902018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1091
1092 PR gdb/21559
1093 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1094 checking for fs_base/gs_base fields in struct user_regs_struct.
1095 * configure: Regenerate.
1096
9a70f35c
YQ
10972018-01-16 Yao Qi <yao.qi@linaro.org>
1098
1099 PR gdb/18749
1100 * linux-low.c (fetch_register): Call supply_register instead of
1101 error.
1102
605fd3c6
YQ
11032018-01-08 Yao Qi <yao.qi@linaro.org>
1104 Simon Marchi <simon.marchi@ericsson.com>
1105
1106 * Makefile.in (OBS): Remove selftest.o.
1107 * configure.ac: Set srv_selftest_objs if $development is true.
1108 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1109 * configure: Re-generated.
1110 * server.c (captured_main): Wrap variable selftest_filter with
1111 GDB_SELF_TEST.
1112
2cc05030
SM
11132018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1114
1115 * server.c (parse_debug_format_options): Return std::string.
1116 (handle_monitor_command, captured_main): Adjust.
1117
e379cee6
PA
11182018-01-05 Pedro Alves <palves@redhat.com>
1119
1120 PR gdb/18653
1121 * server.c (captured_main): Pass quiet=false to
1122 save_original_signals_state.
1123
82e1e79a
JB
11242018-01-01 Joel Brobecker <brobecker@adacore.com>
1125
1126 * gdbreplay.c (gdbreplay_version): Update copyright year in
1127 version message.
1128 * server.c (gdbserver_version): Likewise.
1129
8e481c3b
TT
11302017-12-08 Tom Tromey <tom@tromey.com>
1131
1132 * ax.c (ax_printf): Update.
1133
a8806230
YQ
11342017-12-07 Yao Qi <yao.qi@linaro.org>
1135
1136 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1137 aarch64_linux_read_description.
1138 * linux-amd64-ipa.c (idx2mask): New array.
1139 (get_ipa_tdesc): Move idx2mask out.
1140 (initialize_low_tracepoint): Initialize target descriptions.
1141 * linux-i386-ipa.c (idx2mask): New array.
1142 (get_ipa_tdesc): Move idx2mask out.
1143 (initialize_low_tracepoint): Initialize target descriptions.
1144
d4a0e8b5
SM
11452017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1146
1147 * tdesc.c (struct tdesc_type): Change return type.
1148 (tdesc_add_flag): Change parameter type.
1149 (tdesc_add_bitfield): Likewise.
1150 (tdesc_add_field): Likewise.
1151 (tdesc_set_struct_size): Likewise.
1152
798a7429
SM
11532017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1154
1155 * regcache.c (registers_to_string): Remove unused variable.
1156
c0e15c9b
SM
11572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1158
1159 * inferiors.c (for_each_inferior_with_data): Remove.
1160 * inferiors.h (for_each_inferior_with_data): Remove.
1161 * server.c (handle_qxfer_threads_worker): Change parameter type.
1162 (handle_qxfer_threads_proper): Use for_each_thread.
1163
f0045347
SM
11642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1165
1166 * inferiors.c (for_each_inferior): Remove.
1167 (clear_inferiors): Use for_each_thread.
1168 * inferiors.h (for_each_inferior): Remove.
1169 * linux-low.c (linux_wait_for_event_filtered): Use
1170 for_each_thread.
1171 (linux_stabilize_threads): Likewise.
1172 * regcache.c (regcache_release): Likewise.
1173 * server.c (gdb_wants_all_threads_stopped): Likewise.
1174 (clear_pending_status_callback): Remove.
1175 (handle_status): Use for_each_thread.
1176 (captured_main): Likewise.
1177 * win32-low.c (child_init_thread_list): Likewise.
1178 (win32_clear_inferiors): Likewise.
1179 (fake_breakpoint_event): Likewise.
1180
9521758b
SM
11812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1182
1183 * inferiors.h (find_inferior): Remove.
1184 * inferiors.c (find_inferior): Remove.
1185
8f86d7aa
SM
11862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1187
1188 * linux-low.c (resume_status_pending_p): Update comment.
1189 (need_step_over_p): Update comment.
1190
e2b44075
SM
11912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1192
1193 * linux-low.c (proceed_one_lwp): Return void, change parameter
1194 type.
1195 (unsuspend_and_proceed_one_lwp): Likewise.
1196 (proceed_all_lwps): Use for_each_thread.
1197 (unstop_all_lwps): Likewise.
1198
c80825ff
SM
11992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1200
1201 * linux-low.c (linux_resume_one_thread): Return void, take
1202 parameter directly.
1203 (linux_resume): Use for_each_thread.
1204
df3e4dbe
SM
12052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1206
1207 * linux-low.c (send_sigstop_callback): Return void, change
1208 parameter type. Rename to...
1209 (send_sigstop): ... this.
1210 (suspend_and_send_sigstop_callback): Return void, change parameter
1211 type. Rename to...
1212 (suspend_and_send_sigstop): ... this.
1213 (stop_all_lwps): Use for_each_thread.
1214
5a6b0a41
SM
12152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1216
1217 * linux-low.c (lwp_running): Return bool, remove unused
1218 argument.
1219 (linux_stabilize_threads): Use find_thread.
1220
39a64da5
SM
12212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1222
1223 * linux-low.c (select_singlestep_lwp_callback): Remove.
1224 (count_events_callback): Remove.
1225 (select_event_lwp_callback): Remove.
1226 (select_event_lwp): Use find_thread/for_each_thread.
1227
a1385b7b
SM
12282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1229
1230 * linux-low.c (not_stopped_callback): Return bool, take filter
1231 argument directly.
1232 (linux_wait_for_event_filtered): Use find_thread.
1233 (linux_wait_1): Likewise.
1234
454296a2
SM
12352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1236
1237 * linux-low.c (same_lwp): Remove.
1238 (find_lwp_pid): Use find_thread.
1239
6b2a85da
SM
12402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1241
1242 * linux-low.c (delete_lwp_callback): Remove.
1243 (linux_mourn): Use for_each_thread.
1244
798a38e8
SM
12452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1246
1247 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1248 args parameter, don't check for pid.
1249 (linux_detach): Use for_each_thread.
1250
e4eb0dec
SM
12512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1252
1253 * linux-low.c (struct counter): Remove.
1254 (second_thread_of_pid_p): Remove.
1255 (last_thread_of_process_p): Use find_thread.
1256
83e1b6c1
SM
12572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1258
1259 * inferiors.c (find_inferior_in_random): Remove.
1260 * inferiors.h (find_inferior_in_random): Remove.
1261 * linux-low.c (status_pending_p_callback): Return bool, accept
1262 parameter ptid directly.
1263 (linux_wait_for_event_filtered): Use find_thread_in_random.
1264 (linux_wait_1): Likewise.
1265
8dc7b443
SM
12662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1267
1268 * inferiors.c (find_inferior_id): Remove.
1269 (find_thread_ptid): Move implemention from find_inferior_id to
1270 here.
1271 * inferiors.h (find_inferior_id): Remove.
1272 * server.c (handle_status): Use find_thread_ptid.
1273 (process_serial_event): Likewise.
1274 * thread-db.c (find_one_thread): Likewise.
1275 (thread_db_thread_handle): Likewise.
1276 * win32-low.c (thread_rec): Likewise.
1277 (child_delete_thread): Likewise.
1278 (win32_thread_alive): Likewise.
1279 (get_child_debug_event): Likewise.
1280
da25033c
SM
12812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1282
1283 * linux-mips-low.c (update_watch_registers_callback): Return
1284 void, remove pid_p parameter, don't check for pid.
1285 (mips_insert_point, mips_remove_point): Use for_each_thread.
1286
c91bb56b
SM
12872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1288
1289 * lynx.low (lynx_delete_thread_callback): Remove.
1290 (lynx_mourn): Use for_each_thread.
1291
634a3254
SM
12922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1293
1294 * regcache.c (regcache_invalidate_one): Remove.
1295 (regcache_invalidate_pid): use for_each_thread.
1296
41272101
TT
12972017-11-26 Tom Tromey <tom@tromey.com>
1298
1299 * linux-low.c (linux_create_inferior): Update.
1300
f5291a6f
UW
13012017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1302
1303 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1304
6654d750
AH
13052017-11-24 Alan Hayward <alan.hayward@arm.com>
1306
1307 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1308 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1309 * linux-aarch64-tdesc-selftest.c: New file.
1310 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1311
13122017-11-24 Alan Hayward <alan.hayward@arm.com>
1313
1314 * configure.srv: Add new file.
1315 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1316 * linux-aarch64-tdesc-selftest.c: New file.
1317 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1318
49bdb7ee
AH
13192017-11-24 Alan Hayward <alan.hayward@arm.com>
1320
1321 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1322 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1323 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1324
d6d7ce56
AH
13252017-11-24 Alan Hayward <alan.hayward@arm.com>
1326
1327 * configure.srv: Add new files.
1328 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1329 aarch64_linux_read_description.
1330 * linux-aarch64-low.c (aarch64_linux_read_description):
1331 Merge with aarch64_arch_setup.
1332 (aarch64_arch_setup): Call aarch64_linux_read_description.
1333 * linux-aarch64-tdesc.c: New file.
1334 * linux-aarch64-tdesc.h: New file.
1335
506fe5f4
YQ
13362017-11-24 Yao Qi <yao.qi@linaro.org>
1337
1338 * configure.srv: Set $srv_regobj for tic6x-linux.
1339 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1340 (tic6x_read_description): Move some code to tic6x_arch_setup.
1341 (tic6x_tdesc_test): New function.
1342 (initialize_low_arch): Call selftests::register_test.
1343
29f9a567
YQ
13442017-11-22 Yao Qi <yao.qi@linaro.org>
1345
1346 * remote-utils.c (prepare_resume_reply): Use memcpy.
1347
578290ec
SM
13482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1349
1350 * linux-low.c (kill_one_lwp_callback): Return void, take
1351 argument directly, don't filter on pid.
1352 (linux_kill): Use for_each_thread.
1353
eca55aec
SM
13542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1355
1356 * linux-low.c (need_step_over_p): Return bool, remove dummy
1357 argument.
1358 (linux_resume, proceed_all_lwps): Use find_thread.
1359
25c28b4d
SM
13602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1361
1362 * linux-low.c (resume_status_pending_p): Return bool, remove
1363 flag_p argument.
1364 (linux_resume): Use find_thread.
1365
5fdda392
SM
13662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1367
1368 * linux-low.c (struct thread_resume_array): Remove.
1369 (linux_set_resume_request): Return void, take arguments
1370 directly.
1371 (linux_resume): Use for_each_thread.
1372
fcb056a5
SM
13732017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1374
1375 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1376 return bool, remove data argument.
1377 (linux_stabilize_threads): Use find_thread.
1378
139720c5
SM
13792017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1380
1381 * linux-low.c (unsuspend_one_lwp): Remove.
1382 (unsuspend_all_lwps): Use for_each_thread, inline code from
1383 unsuspend_one_lwp.
1384
6d1e5673
SM
13852017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1386
1387 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1388 * linux-low.c (struct iterate_over_lwps_args): Remove.
1389 (iterate_over_lwps_filter): Remove.
1390 (iterate_over_lwps): Use find_thread.
1391
bbf550d5
SM
13922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1393
1394 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1395 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1396 code from reset_lwp_ptrace_options_callback.
1397
00192f77
SM
13982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1399
1400 * linux-arm-low.c (struct update_registers_data): Remove.
1401 (update_registers_callback): Return void, take arguments
1402 directly, don't check thread's pid.
1403 (arm_insert_point, arm_remove_point): Use for_each_thread.
1404
2bee2b6c
SM
14052017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1406
1407 * win32-low.c (continue_one_thread): Return void, take argument
1408 directly.
1409 (child_continue): Use for_each_thread.
1410
0b360f19
SM
14112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1412
1413 * win32-i386-low.c (update_debug_registers_callback): Rename
1414 to ...
1415 (update_debug_registers): ... this, return void, remove pid_p arg.
1416 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1417
f27866ba
SM
14182017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1419
1420 * inferiors.h (struct process_info): Add constructor, initialize
1421 fields..
1422 <syscalls_to_catch>: Change type to std::vector<int>.
1423 * inferiors.c (add_process): Allocate process_info with new.
1424 (remove_process): Free process_info with delete.
1425 * linux-low.c (handle_extended_wait): Adjust.
1426 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1427 * server.c (handle_general_set): Adjust.
1428
e849ea89
PA
14292017-11-16 Pedro Alves <palves@redhat.com>
1430
1431 * remote-utils.c (remote_close): Block SIGIO signals instead of
1432 uninstalling the SIGIO handler.
1433
1d0aa65c
AH
14342017-11-16 Alan Hayward <alan.hayward@arm.com>
1435
1436 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1437
3491a34c
YQ
14382017-11-16 Yao Qi <yao.qi@linaro.org>
1439
1440 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1441 (tic6x_store_gregset): Likewise.
1442 (tic6x_usrregs_info): Move it up.
1443
a602f924
AH
14442017-11-15 Alan Hayward <alan.hayward@arm.com>
1445
1446 * Makefile.in: Update arch rules.
1447 * configure.srv: Explicitly mark arch/ files.
1448
5616b6c3
AS
14492017-11-13 Andreas Schwab <schwab@suse.de>
1450
1451 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1452 function.
1453 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1454
d1928160
PA
14552017-11-06 Pedro Alves <palves@redhat.com>
1456
1457 * config.in, configure: Regenerate.
1458
bac608e7
SM
14592017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1460
1461 * target.c (struct thread_search): Remove.
1462 (thread_search_callback): Remove.
1463 (prepare_to_access_memory): Use for_each_thread instead of
1464 find_inferior. Inline code from thread_search_callback.
1465
eaddb425
SM
14662017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1467
1468 * server.c (struct visit_actioned_threads_data): Remove.
1469 (visit_actioned_threads): Change prototype to take arguments
1470 directly.
1471 (resume): Use find_thread instead of find_inferior.
1472
99078d34
SM
14732017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1474
1475 * server.c (queue_stop_reply_callback): Change prototype, return
1476 void.
1477 (find_status_pending_thread_callback): Remove.
1478 (handle_status): Replace find_inferior with find_thread and
1479 for_each_thread.
1480
cc628f3d
AH
14812017-10-25 Alan Hayward <alan.hayward@arm.com>
1482
1483 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1484 with REGNO.
1485 (aarch64_store_gregset): Likewise.
1486 (aarch64_fill_fpregset): Likewise.
1487 (aarch64_store_fpregset): Likewise.
1488
4d3bb80e
SM
14892017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1490
1491 * gdbthread.h (find_thread, for_each_thread): New functions.
1492 * inferiors.c (thread_of_pid): Remove.
1493 (find_any_thread_of_pid): Use find_thread.
1494 * linux-low.c (num_lwps): Use for_each_thread.
1495
7a7cdfa0
YQ
14962017-10-17 Yao Qi <yao.qi@linaro.org>
1497
1498 * Makefile.in: Remove one rule.
1499 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1500
e675d170
YQ
15012017-10-17 Yao Qi <yao.qi@linaro.org>
1502
1503 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1504 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1505
7eb4e0f9
YQ
15062017-10-17 Yao Qi <yao.qi@linaro.org>
1507
1508 * configure.srv: Rename arm.o with arch/arm.o.
1509
60d6cfc9
YQ
15102017-10-17 Yao Qi <yao.qi@linaro.org>
1511
1512 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1513 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1514 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1515 (arch-i386.o, arch-amd64.o): Remove rules.
1516 (arch/%.o): New rule.
1517 Update POSTCOMPILE and COMPILE.pre.
1518 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1519 * configure: Re-generated.
1520 * configure.srv: Replace arch-i386.o with arch/i386.o.
1521 Replace arch-amd64.o with arch/amd64.o.
1522
5bfda255
YQ
15232017-10-16 Yao Qi <yao.qi@linaro.org>
1524
1525 * configure: Regenerated.
1526
9c80ecd6
SM
15272017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1528
1529 * inferiors.h: (struct inferior_list): Remove.
1530 (struct inferior_list_entry); Remove.
1531 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1532 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1533 get_first_inferior): Remove.
1534 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1535 find_inferior_id, find_inferior_in_random): Change signature.
1536 * inferiors.c (all_threads): Change type to
1537 std::list<thread_info *>.
1538 (get_thread): Remove macro.
1539 (find_inferior, find_inferior_id): Change signature, implement
1540 using find_thread.
1541 (find_inferior_in_random): Change signature, implement using
1542 find_thread_in_random.
1543 (for_each_inferior, for_each_inferior_with_data): Change
1544 signature, implement using for_each_thread.
1545 (add_inferior_to_list, remove_inferior): Remove.
1546 (add_thread, get_first_thread, thread_of_pid,
1547 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1548 (get_first_inferior, one_inferior_p, clear_inferior_list):
1549 Remove.
1550 (clear_inferiors, get_thread_process): Update.
1551 * gdbthread.h: Include <list>.
1552 (struct thread_info) <entry>: Remove field.
1553 <id>: New field.
1554 (all_threads): Change type to std::list<thread_info *>.
1555 (get_first_inferior): Add doc.
1556 (find_thread, for_each_thread, find_thread_in_random): New
1557 functions.
1558 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1559 * linux-arm-low.c (update_registers_callback): Update.
1560 * linux-low.c (second_thread_of_pid_p): Update.
1561 (kill_one_lwp_callback, linux_detach_lwp_callback,
1562 delete_lwp_callback, status_pending_p_callback, same_lwp,
1563 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1564 iterate_over_lwps, not_stopped_callback,
1565 resume_stopped_resumed_lwps, count_events_callback,
1566 select_singlestep_lwp_callback, select_event_lwp_callback,
1567 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1568 suspend_and_send_sigstop_callback, wait_for_sigstop,
1569 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1570 lwp_running, linux_set_resume_request, resume_status_pending_p,
1571 need_step_over_p, start_step_over, linux_resume_one_thread,
1572 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1573 reset_lwp_ptrace_options_callback): Update.
1574 * linux-mips-low.c (update_watch_registers_callback): Update.
1575 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1576 Update.
1577 (free_register_cache_thread_one): Remove.
1578 (regcache_release): Update.
1579 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1580 handle_qxfer_threads_worker): Update.
1581 (handle_query): Update, use list iterator.
1582 (visit_actioned_threads, handle_pending_status,
1583 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1584 clear_pending_status_callback, set_pending_status_callback,
1585 find_status_pending_thread_callback, handle_status,
1586 process_serial_event): Update.
1587 * target.c (thread_search_callback): Update.
1588 * thread-db.c (thread_db_get_tls_address): Update.
1589 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1590 Update.
1591 * win32-i386-low.c (update_debug_registers_callback): Update.
1592 * win32-low.c (delete_thread_info, child_delete_thread,
1593 continue_one_thread, suspend_one_thread,
1594 get_child_debug_event): Adjust.
1595
9179355e
SM
15962017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1597
1598 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1599 * inferiors.h: Include <list>.
1600 (struct process_info) <entry>: Remove field.
1601 <pid>: New field.
1602 (pid_of): Change macro to function.
1603 (ptid_of, lwpid_of): Remove macro.
1604 (all_processes): Change type to std::list<process_info *>.
1605 (ALL_PROCESSES): Remove macro.
1606 (for_each_process, find_process): New function.
1607 * inferiors.c (all_processes): Change type to
1608 std::list<process_info *>.
1609 (find_thread_process): Adjust.
1610 (add_process): Likewise.
1611 (remove_process): Likewise.
1612 (find_process_pid): Likewise.
1613 (get_first_process): Likewise.
1614 (started_inferior_callback): Remove.
1615 (have_started_inferiors_p): Adjust.
1616 (attached_inferior_callback): Remove.
1617 (have_attached_inferiors_p): Adjust.
1618 * linux-low.c (check_zombie_leaders): Likewise.
1619 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1620 (x86_linux_update_xmltarget): Adjust.
1621 * server.c (handle_query): Likewise.
1622 (gdb_reattached_process): Remove.
1623 (handle_status): Adjust.
1624 (kill_inferior_callback): Likewise.
1625 (detach_or_kill_inferior): Remove.
1626 (print_started_pid): Likewise.
1627 (print_attached_pid): Likewise.
1628 (detach_or_kill_for_exit): Update.
1629 (process_serial_event): Likewise.
1630 * linux-arm-low.c (arm_new_fork): Likewise.
1631
c9cb8905
SM
16322017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1633
1634 * dll.h: Include <list>.
1635 (struct dll_info): Add constructor.
1636 <entry>: Remove field.
1637 (all_dlls): Change type to std::list<dll_info>.
1638 * dll.c: Include <algorithm>.
1639 (get_dll): Remove macro.
1640 (all_dlls): Change type to std::list<dll_info *>.
1641 (free_one_dll): Remove.
1642 (match_dll): Likewise.
1643 (loaded_dll): Adjust.
1644 (unloaded_dll): Adjust to all_dlls type change, use
1645 std::find_if. Inline code from match_dll.
1646 (clear_dlls): Adjust to all_dlls type change.
1647 * server.c (emit_dll_description): Remove.
1648 (handle_qxfer_libraries): Adjust to all_dlls type change,
1649 integrate emit_dll_description's functionality.
1650
04ec7890
SM
16512017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1652
1653 * linux-low.h (struct linux_target_ops) <delete_process>: New
1654 field.
1655 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1656 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1657 (struct linux_target_ops): Add delete_process callback.
1658 * linux-arm-low.c (arm_delete_process): New.
1659 (struct linux_target_ops): Add delete_process callback.
1660 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1661 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1662 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1663 * linux-mips-low.c (mips_linux_delete_process): New.
1664 (struct linux_target_ops): Add delete_process callback.
1665 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1666 * linux-s390-low.c (struct linux_target_ops): Likewise.
1667 * linux-sh-low.c (struct linux_target_ops): Likewise.
1668 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1669 * linux-tile-low.c (struct linux_target_ops): Likewise.
1670 * linux-x86-low.c (x86_linux_delete_process): New.
1671 (struct linux_target_ops): Add delete_process callback.
1672 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1673
466eecee
SM
16742017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1675
1676 * linux-aarch64-low.c (the_low_target): Add thread delete
1677 callback.
1678 * linux-arm-low.c (arm_delete_thread): New function.
1679 (the_low_target): Add thread delete callback.
1680 * linux-bfin-low.c (the_low_target): Likewise.
1681 * linux-crisv32-low.c (the_low_target): Likewise.
1682 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1683 set.
1684 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1685 field.
1686 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1687 * linux-mips-low.c (mips_linux_delete_thread): New function.
1688 (the_low_target): Add thread delete callback.
1689 * linux-ppc-low.c (the_low_target): Likewise.
1690 * linux-s390-low.c (the_low_target): Likewise.
1691 * linux-sh-low.c (the_low_target): Likewise.
1692 * linux-tic6x-low.c (the_low_target): Likewise.
1693 * linux-tile-low.c (the_low_target): Likewise.
1694 * linux-x86-low.c (the_low_target): Likewise.
1695 * linux-xtensa-low.c (the_low_target): Likewise.
1696
b79f7801
YZ
16972017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1698
1699 * win32-low.c: Include "common-inferior.h".
1700
bc3b087d
SDJ
17012017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1702
1703 * inferiors.c (set_inferior_cwd): New function.
1704 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1705 (handle_query): Inform that QSetWorkingDir is supported.
1706 * win32-low.c (create_process): Pass the inferior's cwd to
1707 CreateProcess.
1708
d092c5a2
SDJ
17092017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1710
1711 * inferiors.c (current_inferior_cwd): New global variable.
1712 (get_inferior_cwd): New function.
1713 * inferiors.h (struct process_info) <cwd>: New field.
1714
7da0a886
SDJ
17152017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1716
1717 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1718 (OBS): Add gdb_tilde_expand.o.
1719
289a6840
SM
17202017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1721
1722 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1723 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1724
256642e8
PA
17252017-09-29 Pedro Alves <palves@redhat.com>
1726
1727 * ax.c (gdb_parse_agent_expr): Constify.
1728 * ax.h (gdb_parse_agent_expr): Constify.
1729 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1730 Constify.
1731 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1732 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1733 * remote-utils.h (read_ptid): Constify.
1734 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1735 (process_point_options, process_serial_event): Constify.
1736 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1737 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1738 (cmd_qtbuffer): Constify.
1739
5b9ca4d4
PA
17402017-09-29 Pedro Alves <palves@redhat.com>
1741
1742 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1743 fails.
1744
94c207e0
PA
17452017-09-29 Pedro Alves <palves@redhat.com>
1746
1747 * linux-low.c (handle_extended_wait): Pass parent thread instead
1748 of process to thread_db_notice_clone.
1749 * linux-low.h (thread_db_notice_clone): Replace parent process
1750 parameter with parent thread parameter.
1751 * thread-db.c (find_one_thread): Add comment.
1752 (thread_db_notice_clone): Replace parent process parameter with
1753 parent thread parameter. Temporarily switch to the parent thread.
1754
75352e28
SDJ
17552017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1756
1757 * gdbthread.h: Include "common-gdbthread.h".
1758 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1759 "if" when validating the ptid.
1760 * remote-utils.c: Include "gdbthread.h".
1761 (prepare_resume_reply): Use "switch_to_thread".
1762 * target.c (done_accessing_memory): Likewise.
1763
ad339634
AA
17642017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1765
1766 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1767 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1768 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1769 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1770 s390x-gs-linux64-ipa.o to ipa_obj.
1771 * linux-s390-low.c (HWCAP_S390_GS): New define.
1772 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1773 New functions.
1774 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1775 (s390_arch_setup): Check for guarded-storage support and choose
1776 appropriate tdesc.
1777 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1778 init_registers_s390x_gs_linux64.
1779 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1780 enum value.
1781 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1782 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1783
cc4d742f
SM
17842017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1785
1786 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1787
f6327dcb
KB
17882017-09-21 Kevin Buettner <kevinb@redhat.com>
1789
1790 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1791 (thread_db_thread_handle): Declare.
1792 * linux-low.c (linux_target_ops): Initialize thread_handle.
1793 * server.c (handle_qxfer_threads_worker): Add support for
1794 "handle" attribute.
1795 * target.h (struct target_ops): Add new function pointer,
1796 thread_handle.
1797 (target_thread_handle): Define.
1798 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1799 field in lwp.
1800 (thread_db_thread_handle): New function.
1801
86299109
KB
18022017-09-21 Kevin Buettner <kevinb@redhat.com>
1803
1804 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1805 * linux-low.h (thread_db_notice_clone): Declare.
1806 * thread-db.c (thread_db_notice_clone): New function.
1807
f557a88a
PA
18082017-09-21 Pedro Alves <palves@redhat.com>
1809
1810 * server.c (gdb_read_memory, handle_status, process_serial_event)
1811 (handle_serial_event, handle_target_event): Adjust to
1812 set_desired_thread prototype change.
1813 * target.c (set_desired_thread): Remove 'use_general' parameter
1814 and adjust.
1815 * target.h (set_desired_thread): Remove 'use_general' parameter.
1816
223ffa71
TT
18172017-09-20 Tom Tromey <tom@tromey.com>
1818
1819 * target.c (target_terminal::terminal_state): Define.
1820 (target_terminal::init): Rename from target_terminal_init.
1821 (target_terminal::inferior): Rename from
1822 target_terminal_inferior.
1823 (target_terminal::ours): Rename from target_terminal_ours.
1824 (target_terminal::ours_for_output, target_terminal::info): New.
1825
04fd3ba9
SM
18262017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1827
1828 * server.c (accumulate_file_name_length): Remove.
1829 (emit_dll_description): Adjust to std::string change.
1830 (handle_qxfer_libraries): Use std::string to hold document.
1831
5e187554
SM
18322017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1833
1834 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1835 return type of xml_escape_text.
1836 * server.c (emit_dll_description): Likewise.
1837
1526853e
SM
18382017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1839
1840 * server.c (captured_main): Accept argument for --selftest.
1841 Update run_tests call.
1842 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1843 when registering selftests.
1844
c4dfafab
SDJ
18452017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1846
1847 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1848 instead of "VEC" for "target_desc.reg_defs".
1849 (regcache_cpy): Likewise.
1850 (registers_to_string): Likewise.
1851 (registers_from_string): Likewise.
1852 (find_regno): Likewise.
1853 (supply_regblock): Likewise.
1854 (regcache_raw_read_unsigned): Likewise.
1855 * tdesc.c (init_target_desc): Likewise.
1856 (tdesc_create_reg): Likewise.
1857 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1858 (struct target_desc) <reg_defs>: Convert to "std::vector".
1859 (target_desc): Do not initialize "reg_defs".
1860 (~target_desc): Update code to use "std::vector" instead of "VEC"
1861 for "target_desc.reg_defs".
1862 (operator==): Likewise.
1863
124aceb4
SM
18642017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1865
1866 * inferiors.h (thread_to_gdb_id): Remove.
1867 * inferiors.c (thread_to_gdb_id): Remove.
1868 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1869 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1870 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1871 Likewise.
1872 * nto-low.c (nto_fetch_registers, nto_store_registers,
1873 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1874
96cde54f
SM
18752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1876
1877 * inferiors.h (gdb_id_to_thread_id): Remove.
1878 * inferiors.c (gdb_id_to_thread_id): Remove.
1879 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1880 removal. Move pid declaration closer to where it's used.
1881
e8ca139e
SM
18822017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1883
1884 * server.c (handle_detach): New function.
1885 (process_serial_event): Move code out, call handle_detach.
1886
f8a4e119
SM
18872017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1888
1889 * server.c (require_running): Rename to ...
1890 (require_running_or_return): ... this ...
1891 (require_running_or_break): ... and this.
1892 (handle_query, process_serial_event): Adjust.
1893
0eb0a407
SM
18942017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1895
1896 * linux-low.c (linux_set_resume_request): Remove unused
1897 variables.
1898
785922a5
SM
18992017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1900
1901 * server.c (first_thread_of): Remove.
1902 (process_serial_event): Replace usage of first_thread_of with
1903 find_any_thread_of_pid.
1904 * tracepoint.c (same_process_p): Remove.
1905 (gdb_agent_about_to_close): Replace usage of same_process_p with
1906 find_any_thread_of_pid.
1907 * linux-x86-low.c (same_process_callback): Remove.
1908 (x86_arch_setup_process_callback): Replace usage of
1909 same_process_callback with find_any_thread_of_pid.
1910 * thread-db.c (any_thread_of): Remove.
1911 (switch_to_process): Replace usage of any_thread_of with
1912 find_any_thread_of_pid.
1913 * inferiors.c (thread_pid_matches_callback): Remove.
1914 (find_thread_process): Adjust to use find_any_thread_of_pid.
1915
a059f00c
SDJ
19162017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1917
1918 * regcache.c (get_thread_regcache): Guard calls to "memset"
1919 with "!VEC_empty".
1920
cc397f3a
SDJ
19212017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1922
1923 * linux-low.c (handle_extended_wait): Use
1924 "allocate_target_description" instead of "XNEW".
1925 * linux-x86-low.c (initialize_low_arch): Likewise.
1926
22916b07
YQ
19272017-09-05 Yao Qi <yao.qi@linaro.org>
1928
1929 * configure.srv (srv_i386_regobj): Remove.
1930 (srv_amd64_regobj): Remove.
1931 (srv_regobj): Set it to "" for x86 non-linux targets.
1932 * linux-x86-tdesc.c (i386_linux_read_description):
1933 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1934 (init_registers_i386): Remove the declaration.
1935 (tdesc_i386): Remove the declaration.
1936 (lynx_i386_arch_setup): Call i386_create_target_description.
1937 * nto-x86-low.c: Likewise.
1938 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1939 [!__x86_64__]: include arch/i386.h.
1940 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1941
38602d55
YQ
19422017-09-05 Yao Qi <yao.qi@linaro.org>
1943
1944 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1945 i386/amd64-XXX-linux from it.
1946
44b886ff
YQ
19472017-09-05 Yao Qi <yao.qi@linaro.org>
1948
1949 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1950 false.
1951 (ipa_amd64_linux_regobj): Remove.
1952 (ipa_x32_linux_regobj): Remove.
1953
b4570e4b
YQ
19542017-09-05 Yao Qi <yao.qi@linaro.org>
1955
1956 * Makefile.in (arch-amd64.o): New rule.
1957 * configure.srv: Append arch-amd64.o.
1958 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1959 (get_ipa_tdesc): Call amd64_linux_read_description.
1960 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1961 and init_registers_amd64_XXX.
1962 * linux-x86-low.c (x86_linux_read_description): Call
1963 amd64_linux_read_description.
1964 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1965 (initialize_low_arch): Don't call init_registers_x32_XXX and
1966 init_registers_amd64_XXX.
1967 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1968 and tdesc_amd64_XXX.
1969 [__x86_64__] (amd64_tdesc_test): New function.
1970 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1971 and init_registers_amd64_XXX.
1972 * linux-x86-tdesc.c: Include arch/amd64.h.
1973 (xcr0_to_tdesc_idx): New function.
1974 (i386_linux_read_description): New function.
1975 (amd64_get_ipa_tdesc_idx): New function.
1976 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1977 (amd64_get_ipa_tdesc): Declare.
1978
d1f28ea2
YQ
19792017-09-05 Yao Qi <yao.qi@linaro.org>
1980
1981 * configure.srv (srv_i386_linux_xmlfiles): Remove
1982 i386/i386-XXX-linux.xml from it.
1983
25a93583
YQ
19842017-09-05 Yao Qi <yao.qi@linaro.org>
1985
1986 * configure.srv: Set srv_i386_linux_regobj empty if $development
1987 is false.
1988 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1989 initialize_low_tdesc.
1990 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1991 with #if initialize_low_tdesc.
1992 * linux-x86-tdesc-selftest.c: New file.
1993 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1994
5f035c07
YQ
19952017-09-05 Yao Qi <yao.qi@linaro.org>
1996
1997 * Makefile.in (arch-i386.o): New rule.
1998 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1999 (x86_64-*-linux*): Likewise.
2000 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2001 include arch/i386.h.
2002 (i386_linux_read_description): Remove code and call
2003 i386_create_target_description.
2004 * tdesc.c (allocate_target_description): New function.
2005 * tdesc.h (set_tdesc_architecture): Remove declaration.
2006 (set_tdesc_osabi): Likewise.
2007
0abe8a89
YQ
20082017-09-05 Yao Qi <yao.qi@linaro.org>
2009
2010 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2011 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2012 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2013 .xmltarget.
2014 * server.c (get_features_xml): Call tdesc_get_features_xml.
2015 * tdesc.c (set_tdesc_architecture): New function.
2016 (set_tdesc_osabi): New function.
2017 (tdesc_get_features_xml): New function.
2018 (tdesc_create_feature): Add an argument.
2019 * tdesc.h (struct target_desc) <features>: New field.
2020 <arch, osabi>: New field.
2021 (~target_desc): xfree features, arch, and osabi.
2022 (target_desc::oerator==): Don't compare .xmltarget.
2023 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2024 (set_tdesc_osabi): Likewise.
2025 (tdesc_get_features_xml): Likewise.
2026
0a188386
YQ
20272017-09-05 Yao Qi <yao.qi@linaro.org>
2028
2029 * linux-x86-tdesc.c: Include selftest.h.
2030 (i386_tdesc_test): New function.
2031 (initialize_low_tdesc): Call selftests::register_test.
2032 * tdesc.h: Include regdef.h.
2033 (target_desc): Override operator == and !=.
2034
f49ff000
YQ
20352017-09-05 Yao Qi <yao.qi@linaro.org>
2036
2037 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2038 (ipa_obj): Likewise.
2039 * linux-i386-ipa.c: Include common/x86-xstate.h
2040 (get_ipa_tdesc): Call i386_linux_read_description.
2041 (initialize_low_tracepoint): Don't call init_registers_XXX
2042 functions, call initialize_low_tdesc instead.
2043 * linux-x86-low.c (x86_linux_read_description): Call
2044 i386_linux_read_description.
2045 (initialize_low_arch): Don't call init_registers_i386_XXX
2046 functions, call initialize_low_tdesc.
2047 * linux-x86-tdesc.c: New file.
2048 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2049 (i386_get_ipa_tdesc_idx): Declare.
2050 (i386_get_ipa_tdesc): Declare.
2051 (initialize_low_tdesc): Declare.
2052
2b68ef2f
YQ
20532017-09-05 Yao Qi <yao.qi@linaro.org>
2054
2055 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2056 instead of 0.
2057
f7000548
YQ
20582017-09-05 Yao Qi <yao.qi@linaro.org>
2059
2060 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2061 * regcache.c (get_thread_regcache): Use VEC_length.
2062 (init_register_cache): Likewise.
2063 (regcache_cpy): Likewise.
2064 (registers_to_string): Iterate reg_defs via VEC_iterate.
2065 (find_regno): Likewise.
2066 (find_register_by_number): Use VEC_index.
2067 (register_size): Call find_register_by_number.
2068 (register_data): Call find_register_by_number.
2069 (supply_regblock): Use VEC_length.
2070 (regcache_raw_read_unsigned): Likewise.
2071 * tdesc.c (init_target_desc): Iterate reg_defs via
2072 VEC_iterate.
2073 (default_description): Update initializer.
2074 (copy_target_description): Don't update field num_registers.
2075 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2076 <num_registers>: Remove.
2077
50a421ac
SM
20782017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2079
2080 * Makefile.in (.SECONDARY): Define target.
2081
23fdd69e
SM
20822017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2083
2084 * linux-low.c (linux_wait_1): Adjust.
2085 * server.c (queue_stop_reply_callback): Adjust.
2086
0a2dde4a
SDJ
20872017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2088
2089 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2090 QEnvironmentUnset and QEnvironmentReset packets.
2091 (handle_query): Inform remote that QEnvironmentHexEncoded,
2092 QEnvironmentUnset and QEnvironmentReset are supported.
2093
6afd337d
SM
20942017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2095
2096 * inferiors.h (inferior_target_data): Rename to ...
2097 (thread_target_data): ... this.
2098 (inferior_regcache_data): Rename to ...
2099 (thread_regcache_data): ... this.
2100 (set_inferior_regcache_data): Rename to ...
2101 (set_thread_regcache_data): ... this.
2102 * inferiors.c (inferior_target_data): Rename to ...
2103 (thread_target_data): ... this.
2104 (inferior_regcache_data): Rename to ...
2105 (thread_regcache_data): ... this.
2106 (set_inferior_regcache_data): Rename to ...
2107 (set_thread_regcache_data): ... this.
2108 (free_one_thread): Update.
2109 * linux-low.h (get_thread_lwp): Update.
2110 * regcache.c (get_thread_regcache): Update.
2111 (regcache_invalidate_thread): Update.
2112 (free_register_cache_thread): Update.
2113 * win32-i386-low.c (update_debug_registers_callback): Update.
2114 (win32_get_current_dr): Update.
2115 * win32-low.c (thread_rec): Update.
2116 (delete_thread_info): Update.
2117 (continue_one_thread): Update.
2118 (suspend_one_thread): Update.
2119
a160cc46
SM
21202017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2121
2122 * inferiors.c (set_inferior_target_data): Remove.
2123 * inferiors.h (set_inferior_target_data): Remove.
2124
6d580b63
YQ
21252017-08-18 Yao Qi <yao.qi@linaro.org>
2126
2127 * Makefile.in (OBS): Add selftest.o.
2128 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2129 * configure, config.in: Re-generated.
2130 * server.c: Include common/sefltest.h.
2131 (captured_main): Handle option --selftest.
2132
f5a29eb0
YQ
21332017-08-09 Yao Qi <yao.qi@linaro.org>
2134
2135 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2136 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2137 i386-avx-mpx.o and i386-mmx.o.
2138 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2139 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2140 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2141 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2142 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2143 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2144 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2145 i386/amd64-avx-mpx.xml.
2146
57757c2f
YQ
21472017-08-09 Yao Qi <yao.qi@linaro.org>
2148
2149 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2150 and x32-avx-avx512.o.
2151 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2152 i386/x32-avx-avx512.xml.
2153
229d26fc
SM
21542017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2155
2156 * tracepoint.h (enum class fast_tpoint_collect_result): New
2157 enumeration.
2158 (fast_tracepoint_collecting): Change return type to
2159 fast_tpoint_collect_result.
2160 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2161 * linux-low.h: Include tracepoint.h.
2162 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2163 fast_tpoint_collect_result.
2164 * linux-low.c (handle_tracepoints): Adjust.
2165 (linux_fast_tracepoint_collecting): Change return type to
2166 fast_tpoint_collect_result.
2167 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2168 linux_wait_1, stuck_in_jump_pad_callback,
2169 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2170 proceed_one_lwp): Adjust to type change.
2171
2e1e43e1
YQ
21722017-07-10 Yao Qi <yao.qi@linaro.org>
2173
2174 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2175
adc764e7
YQ
21762017-06-29 Yao Qi <yao.qi@linaro.org>
2177
2178 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2179 Remove.
2180 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2181
a206891a
SM
21822017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2183
2184 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2185
9a6c7d9c
SDJ
21862017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2187
2188 * linux-low.c (linux_create_inferior): Adjust code to access the
2189 environment information via 'gdb_environ' class.
2190 * lynx-low.c (lynx_create_inferior): Likewise.
2191 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2192 (get_environ): Return a pointer to 'our_environ'.
2193 (captured_main): Initialize 'our_environ'.
2194 * server.h (get_environ): Adjust prototype.
2195 * spu-low.c (spu_create_inferior): Adjust code to access the
2196 environment information via 'gdb_environ' class.
2197
ae3e2ccf
SM
21982017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2199
2200 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2201 usage of "register" keyword.
2202
3e019bdc
SM
22032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2204
2205 * configure: Re-generate.
2206
8465943a
SM
22072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2208
2209 * configure: Re-generate.
2210
cf0dd6f0
SM
22112017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2212
2213 * Makefile.in (COMPILE.pre): Add "-x c++".
2214
9845682b
SDJ
22152017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2216
2217 * fork-child.c: Conditionally include <signal.h>.
2218
aefd8b33
SDJ
22192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2220
2221 * server.c (handle_general_set): Handle new packet
2222 "QStartupWithShell".
2223 (handle_query): Add "QStartupWithShell" to the list of supported
2224 packets.
2225 (gdbserver_usage): Add help text explaining the
2226 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2227 options.
2228 (captured_main): Recognize and act upon the presence of the new
2229 CLI options.
2230
2090129c
SDJ
22312017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2232 Pedro Alves <palves@redhat.com>
2233
2234 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2235 * configure: Regenerate.
2236 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2237 "fork-inferior.o".
2238 (i[34567]86-*-lynxos*): Likewise.
2239 (spu*-*-*): Likewise.
2240 * fork-child.c: New file.
2241 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2242 and "environ.h".
2243 (linux_ptrace_fun): New function.
2244 (linux_create_inferior): Adjust function prototype to reflect
2245 change on "target.h". Adjust function code to use
2246 "fork_inferior".
2247 (linux_request_interrupt): Delete "signal_pid".
2248 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2249 (lynx_ptrace_fun): New function.
2250 (lynx_create_inferior): Adjust function prototype to reflect
2251 change on "target.h". Adjust function code to use
2252 "fork_inferior".
2253 * nto-low.c (nto_create_inferior): Adjust function prototype and
2254 code to reflect change on "target.h". Update comments.
2255 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2256 "common-terminal.h" and "environ.h".
2257 (terminal_fd): Moved to fork-child.c.
2258 (old_foreground_pgrp): Likewise.
2259 (restore_old_foreground_pgrp): Likewise.
2260 (last_status): Make it global.
2261 (last_ptid): Likewise.
2262 (our_environ): New variable.
2263 (startup_with_shell): Likewise.
2264 (program_name): Likewise.
2265 (program_argv): Rename to...
2266 (program_args): ...this.
2267 (wrapper_argv): New variable.
2268 (start_inferior): Delete function.
2269 (get_exec_wrapper): New function.
2270 (get_exec_file): Likewise.
2271 (get_environ): Likewise.
2272 (prefork_hook): Likewise.
2273 (post_fork_inferior): Likewise.
2274 (postfork_hook): Likewise.
2275 (postfork_child_hook): Likewise.
2276 (handle_v_run): Update code to deal with arguments coming from the
2277 remote host. Update calls from "start_inferior" to
2278 "create_inferior".
2279 (captured_main): Likewise. Initialize environment variable. Call
2280 "have_job_control".
2281 * server.h (post_fork_inferior): New prototype.
2282 (get_environ): Likewise.
2283 (last_status): Declare.
2284 (last_ptid): Likewise.
2285 (signal_pid): Likewise.
2286 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2287 (spu_ptrace_fun): New function.
2288 (spu_create_inferior): Adjust function prototype to reflect change
2289 on "target.h". Adjust function code to use "fork_inferior".
2290 * target.c (target_terminal_init): New function.
2291 (target_terminal_inferior): Likewise.
2292 (target_terminal_ours): Likewise.
2293 * target.h: Include <vector>.
2294 (struct target_ops) <create_inferior>: Update prototype.
2295 (create_inferior): Update macro.
2296 * utils.c (gdb_flush_out_err): New function.
2297 * win32-low.c (win32_create_inferior): Adjust function prototype
2298 and code to reflect change on "target.h".
2299
043a4934
SDJ
23002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2301
2302 * inferiors.c (switch_to_thread): New function.
2303
15652511
SDJ
23042017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2305
2306 * Makefile.in (SFILE): Add "common/job-control.c".
2307 (OBS): Add "job-control.o".
2308
21ea5acd
SDJ
23092017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2310
2311 * Makefile: Remove "@host_makefile_frag@".
2312
e13cb306
PA
23132017-05-05 Pedro Alves <palves@redhat.com>
2314
2315 * configure: Regenerate.
2316
c94fee56
SDJ
23172017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2318
2319 * configure: Regenerate.
2320
a0ff9e1a
SM
23212017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2322
2323 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2324 software_single_step change of return type to
2325 std::vector<CORE_ADDR>.
2326 * linux-low.c (install_software_single_step_breakpoints):
2327 Likewise.
2328 * linux-low.h (install_software_single_step_breakpoints):
2329 Likewise.
2330
be628ab8
SDJ
23312017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2332
2333 * remote-utils.c: Include "gdb_termios.h" instead of
2334 "terminal.h".
2335 * terminal.h: Delete file.
2336
7c5ded6a
SDJ
23372017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2338
2339 * server.c: Include <vector>.
2340 <program_argv, wrapper_argv>: Convert to std::vector.
2341 (start_inferior): Rewrite function to use C++.
2342 (handle_v_run): Likewise. Update code that calculates the argv
2343 based on the vRun packet; use C++.
2344 (captured_main): Likewise.
2345
436252de
SM
23462017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2347
2348 * server.c (handle_v_cont): Initialize thread_resume::thread
2349 with null_ptid.
2350
9bf2a700
PA
23512017-04-05 Pedro Alves <palves@redhat.com>
2352
2353 * configure: Regenerate.
2354
a121b7c1
PA
23552017-04-05 Pedro Alves <palves@redhat.com>
2356
2357 * gdbreplay.c (sync_error): Constify.
2358 * linux-x86-low.c (push_opcode): Constify.
2359
21c8a587
PA
23602017-04-05 Pedro Alves <palves@redhat.com>
2361
2362 * win32-low.c (get_child_debug_event)
2363 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2364 Report TARGET_WAITKIND_SPURIOUS instead.
2365
fb32b4f7
PA
23662017-04-05 Pedro Alves <palves@redhat.com>
2367
2368 * remote-utils.c (remote_prepare, remote_open): Constify.
2369 * remote-utils.h (remote_prepare, remote_open): Constify.
2370 * server.c (captured_main): Constify 'port' handling.
2371
65dd1e59
SM
23722017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2373
2374 * Makefile.in (clean): Clear .deps.
2375
8fa5b777
SM
23762017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2377
2378 * .gitignore: Remove generated files, replace with wildcard.
2379 * (clean): Replace removal of generated files with wildcard.
2380 (version.c): Replace with...
2381 (version-generated.c): ...this.
2382 (xml-builtin.c): Replace with...
2383 (xml-builtin-generated.c): ...this.
2384 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2385 (%.c: *regformats*): Replace with...
2386 (%-generated.c: *regformats*): ...this.
2387
a12e714b
MF
23882017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2389
2390 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2391 (xtensa_fill_gregset): Call collect_register_by_name for
2392 threadptr register.
2393 (xtensa_store_gregset): Call supply_register_by_name for
2394 threadptr register.
2395
1a09b50a
MF
23962017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2397
2398 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2399 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2400 (xtensa_store_gregset): Call supply_register for all registers in
2401 a0_regnum..a0_regnum + C0_NREGS range.
2402
1a01e7c6
SM
24032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2404
2405 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2406 (ax-ipa.o: ax.c): Remove.
2407 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2408 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2409 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2410 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2411 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2412
36bc18a8
SM
24132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2414
2415 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2416 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2417 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2418 (errors-ipa.o: ../common/errors.c): Remove.
2419 (format-ipa.o: ../common/format.c): Remove.
2420 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2421
a8ebe3d5
SM
24222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2423
2424 * Makefile.in (%-ipa.o: %.c): New rule.
2425 (tracepoint-ipa.o: tracepoint.c): Remove.
2426 (utils-ipa.o: utils.c): Remove.
2427 (remote-utils-ipa.o: remote-utils.c): Remove.
2428 (regcache-ipa.o: regcache.c): Remove.
2429 (i386-linux-ipa.o: i386-linux.c): Remove.
2430 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2431 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2432 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2433 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2434 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2435 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2436 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2437 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2438 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2439 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2440 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2441 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2442 (aarch64-ipa.o: aarch64.c): Remove.
2443 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2444 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2445 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2446 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2447 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2448 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2449 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2450 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2451 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2452 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2453 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2454 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2455 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2456 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2457 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2458 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2459 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2460 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2461 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2462 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2463 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2464 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2465 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2466 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2467 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2468 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2469 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2470 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2471 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2472 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2473 (tdesc-ipa.o: tdesc.c): Remove.
2474 (x32-linux-ipa.o: x32-linux.c): Remove.
2475 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2476 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2477
50cfacb7
SM
24782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2479
2480 * Makefile.in (%.o: ../arch/%.c): New rule.
2481 (arm.o: ../arch/arm.c): Remove.
2482 (arm-linux.o: ../arch/arm-linux.c): Remove.
2483 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2484 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2485
c5a22423
SM
24862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2487
2488 * Makefile.in (%.o: ../nat/%.c): New rule.
2489 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2490 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2491 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2492 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2493 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2494 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2495 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2496 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2497 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2498 (linux-personality.o: ../nat/linux-personality.c): Remove.
2499 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2500 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2501 (x86-linux.o: ../nat/x86-linux.c): Remove.
2502 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2503 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2504
6bda016b
SM
25052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2506
2507 * Makefile.in (%.o: ../common/%.c): New rule.
2508 (signals.o: ../common/signals.c): Remove.
2509 (print-utils.o: ../common/print-utils.c): Remove.
2510 (rsp-low.o: ../common/rsp-low.c): Remove.
2511 (common-utils.o: ../common/common-utils.c): Remove.
2512 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2513 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2514 (vec.o: ../common/vec.c): Remove.
2515 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2516 (xml-utils.o: ../common/xml-utils.c): Remove.
2517 (ptid.o: ../common/ptid.c): Remove.
2518 (buffer.o: ../common/buffer.c): Remove.
2519 (format.o: ../common/format.c): Remove.
2520 (filestuff.o: ../common/filestuff.c): Remove.
2521 (agent.o: ../common/agent.c): Remove.
2522 (errors.o: ../common/errors.c): Remove.
2523 (environ.o: ../common/environ.c): Remove.
2524 (common-debug.o: ../common/common-debug.c): Remove.
2525 (cleanups.o: ../common/cleanups.c): Remove.
2526 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2527 (fileio.o: ../common/fileio.c): Remove.
2528 (common-regcache.o: ../common/common-regcache.c): Remove.
2529 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2530 (new-op.o: ../common/new-op.c): Remove.
2531 (btrace-common.o: ../common/btrace-common.c): Remove.
2532
21122961
SM
25332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2534
2535 * Makefile.in (%.o: ../target/%.c): New rule.
2536 (waitstatus.o: ../target/waitstatus.c): Remove.
2537
c362e621
SM
25382017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2539
2540 * Makefile.in
2541 (%.c: ../regformats/%.dat,
2542 (%.c: ../regformats/arm/%.dat,
2543 (%.c: ../regformats/i386/%.dat,
2544 (%.c: ../regformats/rs6000/%.dat): New rules.
2545 (aarch64.c): Remove.
2546 (reg-arm.c): Remove.
2547 (arm-with-iwmmxt.c): Remove.
2548 (arm-with-vfpv2.c): Remove.
2549 (arm-with-vfpv3.c): Remove.
2550 (arm-with-neon.c): Remove.
2551 (reg-bfin.c): Remove.
2552 (reg-cris.c): Remove.
2553 (reg-crisv32.c): Remove.
2554 (i386.c): Remove.
2555 (i386-linux.c): Remove.
2556 (i386-avx.c): Remove.
2557 (i386-avx-linux.c): Remove.
2558 (i386-avx-avx512.c): Remove.
2559 (i386-avx-avx512-linux.c): Remove.
2560 (i386-mpx.c): Remove.
2561 (i386-mpx-linux.c): Remove.
2562 (i386-avx-mpx-avx512-pku.c): Remove.
2563 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2564 (i386-avx-mpx.c): Remove.
2565 (i386-avx-mpx-linux.c): Remove.
2566 (i386-mmx.c): Remove.
2567 (i386-mmx-linux.c): Remove.
2568 (reg-ia64.c): Remove.
2569 (reg-m32r.c): Remove.
2570 (reg-m68k.c): Remove.
2571 (reg-cf.c): Remove.
2572 (mips-linux.c): Remove.
2573 (mips-dsp-linux.c): Remove.
2574 (mips64-linux.c): Remove.
2575 (mips64-dsp-linux.c): Remove.
2576 (nios2-linux.c): Remove.
2577 (powerpc-32.c): Remove.
2578 (powerpc-32l.c): Remove.
2579 (powerpc-altivec32l.c): Remove.
2580 (powerpc-cell32l.c): Remove.
2581 (powerpc-vsx32l.c): Remove.
2582 (powerpc-isa205-32l.c): Remove.
2583 (powerpc-isa205-altivec32l.c): Remove.
2584 (powerpc-isa205-vsx32l.c): Remove.
2585 (powerpc-e500l.c): Remove.
2586 (powerpc-64l.c): Remove.
2587 (powerpc-altivec64l.c): Remove.
2588 (powerpc-cell64l.c): Remove.
2589 (powerpc-vsx64l.c): Remove.
2590 (powerpc-isa205-64l.c): Remove.
2591 (powerpc-isa205-altivec64l.c): Remove.
2592 (powerpc-isa205-vsx64l.c): Remove.
2593 (s390-linux32.c): Remove.
2594 (s390-linux32v1.c): Remove.
2595 (s390-linux32v2.c): Remove.
2596 (s390-linux64.c): Remove.
2597 (s390-linux64v1.c): Remove.
2598 (s390-linux64v2.c): Remove.
2599 (s390-te-linux64.c): Remove.
2600 (s390-vx-linux64.c): Remove.
2601 (s390-tevx-linux64.c): Remove.
2602 (s390x-linux64.c): Remove.
2603 (s390x-linux64v1.c): Remove.
2604 (s390x-linux64v2.c): Remove.
2605 (s390x-te-linux64.c): Remove.
2606 (s390x-vx-linux64.c): Remove.
2607 (s390x-tevx-linux64.c): Remove.
2608 (tic6x-c64xp-linux.c): Remove.
2609 (tic6x-c64x-linux.c): Remove.
2610 (tic6x-c62x-linux.c): Remove.
2611 (reg-sh.c): Remove.
2612 (reg-sparc64.c): Remove.
2613 (reg-spu.c): Remove.
2614 (amd64.c): Remove.
2615 (amd64-linux.c): Remove.
2616 (amd64-avx.c): Remove.
2617 (amd64-avx-linux.c): Remove.
2618 (amd64-avx-avx512.c): Remove.
2619 (amd64-avx-avx512-linux.c): Remove.
2620 (amd64-mpx.c): Remove.
2621 (amd64-mpx-linux.c): Remove.
2622 (amd64-avx-mpx-avx512-pku.c): Remove.
2623 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2624 (amd64-avx-mpx.c): Remove.
2625 (amd64-avx-mpx-linux.c): Remove.
2626 (x32.c): Remove.
2627 (x32-linux.c): Remove.
2628 (x32-avx.c): Remove.
2629 (x32-avx-linux.c): Remove.
2630 (x32-avx-avx512.c): Remove.
2631 (x32-avx-avx512-linux.c): Remove.
2632 (reg-xtensa.c): Remove.
2633 (reg-tilegx.c): Remove.
2634 (reg-tilegx32.c): Remove.
2635
1672e0d9
SDJ
26362017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2637
2638 * Makefile.in (SFILES): Add "common/environ.c".
2639 (OBJS): Add "common/environ.h".
2640
239b6d10
WT
26412017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2642
2643 * configure.ac: Check if the fs_base and gs_base members of
2644 `struct user_regs_struct' exist.
2645 * config.in: Regenerated.
2646 * configure: Likewise.
2647
694b382c
AT
26482017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2649
2650 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2651 target_read_memory.
2652 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2653 (get_next_pcs_syscall_next_pc): Likewise.
2654
7dc53023
LM
26552016-12-23 Luis Machado <lgustavo@codesourcery.com>
2656
2657 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2658 * nto-x86-low.c: Likewise.
2659
ad02e4fe
SM
26602016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2661
2662 * Makefile.in: Include disable-implicit-rules.mk.
2663
dcb07cfa
PA
26642016-11-23 Pedro Alves <palves@redhat.com>
2665
2666 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2667 (debug_vprintf): Use std::chrono::steady_clock instead of
2668 gettimeofday. Use '.' instead of ':'.
2669 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2670 (get_timestamp): Use std::chrono::steady_clock instead of
2671 gettimeofday.
2672
8629c02c
SM
26732016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2674
2675 * Makefile.in: Fix whitespace formatting.
2676
b593ecca
SM
26772016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2678
2679 * Makefile.in (SFILES, OBS): Flatten list and order
2680 alphabetically.
2681
9986ba08
PA
26822016-11-23 Pedro Alves <palves@redhat.com>
2683
2684 * event-loop.c (handle_file_event): Use warning.
2685 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2686 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2687 Use warning.
2688
4eefa7bc
PA
26892016-11-23 Pedro Alves <palves@redhat.com>
2690
2691 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2692 output.
2693 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2694 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2695 debug_printf and debug_flush for debug output.
2696 * server.c (handle_general_set): Likewise.
2697 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2698 output.
2699
5443506e
SM
27002016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2701
2702 * Makefile.in (.c.o): Replace rule with ...
2703 (%.o: %.c): ... this one.
2704
3b165252
SM
27052016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2706
2707 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2708 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2709 make.
2710 * configure.ac: Remove checks for the make program.
2711 * configure: Re-generate.
2712
0bcda685
PA
27132016-10-28 Pedro Alves <palves@redhat.com>
2714
2715 * Makefile.in (CXX_DIALECT): Get from configure.
2716 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2717 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2718 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2719 * config.in: Regenerate.
2720 * configure: Regenerate.
2721
c3805894
YQ
27222016-10-27 Yao Qi <yao.qi@linaro.org>
2723
2724 * linux-low.c (linux_supports_range_stepping): Return true if
2725 can_software_single_step return true.
2726
89342618
YQ
27272016-10-27 Yao Qi <yao.qi@linaro.org>
2728
2729 * inferiors.c (find_inferior_in_random): New function.
2730 * inferiors.h (find_inferior_in_random): Declare.
2731 * linux-low.c (linux_wait_for_event_filtered): Call
2732 find_inferior_in_random instead of find_inferior.
2733
e3652c84
YQ
27342016-10-27 Yao Qi <yao.qi@linaro.org>
2735
2736 * linux-low.c (linux_wait_1): If single-step breakpoints are
2737 inserted, remove them.
2738
5a04c4cf
PA
27392016-10-26 Pedro Alves <palves@redhat.com>
2740
2741 * linux-low.c (handle_extended_wait): Link parent/child fork
2742 threads.
2743 (linux_wait_1): Unlink them.
2744 (linux_set_resume_request): Ignore resume requests for
2745 already-resumed and unhandled fork child threads.
2746 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2747 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2748 New functions.
2749 (handle_v_requests) <vCont>: Don't call require_running.
2750 * server.h (in_queued_stop_replies): New declaration.
2751
cb93dc7f
YQ
27522016-10-24 Yao Qi <yao.qi@linaro.org>
2753
2754 PR server/20733
2755 * linux-aarch64-low.c (append_insns): Cast the return value to
2756 'uint32_t *'.
2757
a1078bea
YQ
27582016-10-10 Yao Qi <yao.qi@linaro.org>
2759
2760 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2761
1fb77080
SDJ
27622016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2763
2764 * target.c (target_supports_multi_process): New function, moved
2765 from...
2766 * target.h (target_supports_multi_process): ... here. Remove
2767 macro.
2768
39b5a3b9
TT
27692016-10-05 Tom Tromey <tom@tromey.com>
2770
2771 PR remote/20655:
2772 * tracepoint.c (handle_tracepoint_bkpts): Check
2773 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2774
c1d0b70a
YQ
27752016-10-05 Yao Qi <yao.qi@linaro.org>
2776
2777 * configure.srv: Update the path of arm-*.xml files.
2778
0a69eedb
YQ
27792016-10-05 Terry Guo <terry.guo@arm.com>
2780 Yao Qi <yao.qi@linaro.org>
2781
2782 * Makefile.in: Adjust the path of rules.
2783 * configure.srv: Update the path of xml files.
2784 * regformats/arm-with-iwmmxt.dat: Regenerated.
2785 * regformats/arm-with-neon.dat: Likewise.
2786 * regformats/arm-with-vfpv2.dat: Likewise.
2787 * regformats/arm-with-vfpv3.dat Likewise.
2788
17e16485
YQ
27892016-09-30 Yao Qi <yao.qi@linaro.org>
2790
2791 PR gdbserver/20627
2792 * target.c (target_stop_and_wait): Don't call
2793 target_continue_no_signal, use resume_stop instead.
2794
edeeb602
YQ
27952016-09-26 Yao Qi <yao.qi@linaro.org>
2796
2797 * linux-low.c (linux_wait_1): Call debug_exit.
2798
503b1c39
PA
27992016-09-23 Pedro Alves <palves@redhat.com>
2800
2801 * Makefile.in (SFILES): Add common/new-op.c.
2802 (OBS): Add common/new-op.o.
2803 (new-op.o): New rule.
2804
74172ecf
SM
28052016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2806
2807 * .gitinore: Ignore more files.
2808
fc6cda2e
YQ
28092016-09-21 Yao Qi <yao.qi@linaro.org>
2810
2811 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2812 23.
2813
bc1e6c81
SDJ
28142016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2815
2816 * server.c (start_inferior): Call target_mourn_inferior instead of
2817 mourn_inferior; pass ptid_t argument to it.
2818 (resume): Likewise.
2819 (handle_target_event): Likewise.
2820 * target.c (target_mourn_inferior): New function.
2821 * target.h (mourn_inferior): Delete macro.
2822
0e00e962
AA
28232016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2824
2825 * linux-low.c (lwp_is_stepping): New function.
2826
1d8cb77d
CL
28272016-09-06 Carl Love <cel@us.ibm.com>
2828
2829 * server.c (start_inferior): Fixed comment, requested comment change
2830 didn't get updated correctly. Removed reference to ptrace () call as
2831 it is only true on Linux systems.
2832
7313bced
CL
28332016-09-06 Carl Love <cel@us.ibm.com>
2834
2835 * server.c (start_inferior): Do not call
2836 function target_post_create_inferior () if the
2837 inferior process has already exited.
2838
cf6de44d
PA
28392016-09-05 Pedro Alves <palves@redhat.com>
2840
2841 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2842 (COMPILE.pre, CC_LD): Use CXX directly.
2843 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2844 * acinclude.m4: Don't include build-with-cxx.m4.
2845 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2846 * configure: Regenerate.
2847
c1da6748
AT
28482016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2849
2850 PR gdb/19495
2851 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2852 call writing data to own_buf.
2853
f2b9e3df
SDJ
28542016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2855
2856 * target.c (mywait): Call target_wait instead of
2857 the_target->wait.
2858 (target_wait): New function.
2859
049a8570
SDJ
28602016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2861
2862 * server.c (start_inferior): New variable 'ptid'. Replace calls
2863 to the_target->resume by target_continue{,_no_signal}, depending
2864 on the case.
2865 * target.c (target_stop_and_wait): Call target_continue_no_signal
2866 instead of the_target->resume.
2867 (target_continue): New function.
2868
3aa5cfa0
AT
28692016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2870
2871 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2872
754653a7
AZ
28732016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2874
2875 PR server/20491
2876 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2877 ps_prochandle.
2878 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2879 * linux-arm-low.c (ps_get_thread_area): Likewise.
2880 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2881 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2882 * linux-mips-low.c (ps_get_thread_area): Likewise.
2883 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2884 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2885 * linux-x86-low.c (ps_get_thread_area): Likewise.
2886 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2887
ed036b40
PA
28882016-08-19 Pedro Alves <palves@redhat.com>
2889
2890 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2891
c8ef42ee
PA
28922016-08-19 Pedro Alves <palves@redhat.com>
2893
2894 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2895 comment. Use memcpy instead of casting through unsigned long.
2896
9c235a72
PA
28972016-08-19 Pedro Alves <palves@redhat.com>
2898
2899 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2900 allocating around 0x80000000.
2901
201506da
PA
29022016-08-19 Pedro Alves <palves@redhat.com>
2903
2904 PR gdb/20415
2905 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2906 (x32-avx512-linux-ipa.o): New rules.
2907 * configure.ac (x86_64-*-linux*): New x32 check.
2908 * configure.srv (ipa_x32_linux_regobj): New.
2909 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2910 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2911 descriptions.
2912 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2913 descriptions.
2914 * configure: Regenerate.
2915
f348d89a
PA
29162016-08-09 Pedro Alves <palves@redhat.com>
2917
2918 PR gdb/18653
2919 * Makefile.in (OBS): Add signals-state-save-restore.o.
2920 (signals-state-save-restore.o): New rule.
2921 * config.in: Regenerate.
2922 * configure: Regenerate.
2923 * linux-low.c: Include "signals-state-save-restore.h".
2924 (linux_create_inferior): Call
2925 restore_original_signals_state.
2926 * server.c: Include "dispositions-save-restore.h".
2927 (captured_main): Call save_original_signals_state.
2928
1baf5149
PA
29292016-08-05 Pedro Alves <palves@redhat.com>
2930
2931 * configure: Regenerate.
2932
fcd4a73d
YQ
29332016-08-04 Yao Qi <yao.qi@linaro.org>
2934
2935 * linux-low.c (regsets_fetch_inferior_registers): Check
2936 errno is ESRCH or not.
2937
979659d0
YQ
29382016-08-02 Yao Qi <yao.qi@linaro.org>
2939
2940 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2941 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2942 (thread_db_load_search): Update.
2943 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2944 td_ta_set_event and td_ta_event_getmsg.
2945
6598661d
PA
29462016-07-26 Pedro Alves <palves@redhat.com>
2947
2948 PR server/20414
2949 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2950 of unsigned long for 64-bit registers and use uint32_t instead of
2951 unsigned int for 32-bit registers.
2952
9cf12d57
PA
29532016-07-26 Pedro Alves <palves@redhat.com>
2954
2955 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2956 to 'ptrace'.
2957
305450ed
TT
29582016-07-21 Tom Tromey <tom@tromey.com>
2959
2960 * configure: Rebuild.
2961
2583da7c
YQ
29622016-07-21 Yao Qi <yao.qi@linaro.org>
2963
2964 * mem-break.c (find_gdb_breakpoint): Cast bp to
2965 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2966
21536b36
YQ
29672016-07-21 Yao Qi <yao.qi@linaro.org>
2968
2969 * server.c (handle_v_requests): Support s and S actions
2970 if target_supports_software_single_step return true.
2971
8901d193
YQ
29722016-07-21 Yao Qi <yao.qi@linaro.org>
2973
2974 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2975 is resume_step, call maybe_hw_step.
2976 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2977 and unstop them.
2978 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2979 breakpoints or not.
2980 (proceed_one_lwp): If resume request is resume_step, install
2981 reinsert breakpoints and call maybe_hw_step.
2982
0e9a339e
YQ
29832016-07-21 Yao Qi <yao.qi@linaro.org>
2984
2985 * linux-low.c (proceed_one_lwp): Declare.
2986 (linux_resume_one_thread): Remove local variable 'step'.
2987 Lift code enqueue signal. Call proceed_one_lwp instead of
2988 linux_resume_one_lwp.
2989
4281b351
YQ
29902016-07-21 Yao Qi <yao.qi@linaro.org>
2991
2992 * linux-low.c (linux_resume_one_thread): Call
2993 enqueue_pending_signal.
2994
984a2c04
YQ
29952016-07-21 Yao Qi <yao.qi@linaro.org>
2996
2997 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2998 * inferiors.c (do_restore_current_thread_cleanup): New function.
2999 (make_cleanup_restore_current_thread): Likewise.
3000 * linux-low.c (install_software_single_step_breakpoints): Call
3001 make_cleanup_restore_current_thread. Switch current_thread to
3002 thread.
3003
bec903c9
YQ
30042016-07-21 Yao Qi <yao.qi@linaro.org>
3005
3006 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3007 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3008 (clone_one_breakpoint): Likewise.
3009 (delete_reinsert_breakpoints): Change parameter to thread.
3010 Callers updated.
3011 (has_reinsert_breakpoints): Likewise.
3012 (uninsert_reinsert_breakpoints): Likewise.
3013 (reinsert_reinsert_breakpoints): Likewise.
3014 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3015 (delete_reinsert_breakpoints): Likewise.
3016 (reinsert_reinsert_breakpoints): Likewise.
3017 (uninsert_reinsert_breakpoints): Likewise.
3018 (has_reinsert_breakpoints): Likewise.
3019
63c40ec7
YQ
30202016-07-21 Yao Qi <yao.qi@linaro.org>
3021
3022 * inferiors.c (get_thread_process): Make parameter const.
3023 * inferiors.h (get_thread_process): Update declaration.
3024 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3025 Add new parameters child_thread and parent_thread. Callers
3026 updated.
3027 * mem-break.h (clone_all_breakpoints): Update declaration.
3028
9aa76cd0
YQ
30292016-07-21 Yao Qi <yao.qi@linaro.org>
3030
3031 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3032 <command_list, handler>: Remove.
3033 (struct gdb_breakpoint): New.
3034 (struct other_breakpoint): New.
3035 (struct reinsert_breakpoint): New.
3036 (is_gdb_breakpoint): New function.
3037 (any_persistent_commands): Update command_list if
3038 is_gdb_breakpoint returns true.
3039 (set_breakpoint): Create breakpoints according to their types.
3040 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3041 (set_gdb_breakpoint_1): Likewise.
3042 (set_gdb_breakpoint): Likewise.
3043 (clear_breakpoint_conditions): Change parameter type to
3044 'struct gdb_breakpoint *'.
3045 (clear_breakpoint_commands): Likewise.
3046 (clear_breakpoint_conditions_and_commands): Likewise.
3047 (add_condition_to_breakpoint): Likewise.
3048 (add_breakpoint_condition): Likewise.
3049 (add_commands_to_breakpoint): Likewise.
3050 (check_breakpoints): Check other_breakpoint.
3051 (clone_one_breakpoint): Clone breakpopint according to its type.
3052 * mem-break.h (struct gdb_breakpoint): Declare.
3053 (set_gdb_breakpoint): Update declaration.
3054 (clear_breakpoint_conditions_and_commands): Likewise.
3055 (add_breakpoint_condition): Likewise.
3056 (add_breakpoint_commands): Likewise.
3057 * server.c (process_point_options): Change parameter type to
3058 'struct gdb_breakpoint *'.
3059
811f8301
YQ
30602016-07-21 Yao Qi <yao.qi@linaro.org>
3061
3062 * mem-break.c (set_breakpoint_at): Rename it to ...
3063 (set_breakpoint_type_at): ... it.
3064 (set_breakpoint_at): Call set_breakpoint_type_at.
3065 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3066 * mem-break.h (set_breakpoint_at): Update comments.
3067
b1c51e36
CLT
30682016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3069
3070 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3071 to buf parameter.
3072 (nios2_store_gregset): Likewise.
3073
ced2dffb
PA
30742016-07-01 Pedro Alves <palves@redhat.com>
3075 Antoine Tremblay <antoine.tremblay@ericsson.com>
3076
3077 * linux-low.c: Change interface to take the target lwp_info
3078 pointer directly and return void. Handle detaching from a zombie
3079 thread.
3080 (linux_detach_lwp_callback): New function.
3081 (linux_detach): Detach from the leader thread after detaching from
3082 the clone threads.
3083
2ac09a5b
YQ
30842016-06-28 Yao Qi <yao.qi@linaro.org>
3085
3086 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3087 for variable new_offset.
3088 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3089 (aarch64_ftrace_insn_reloc_cb): Likewise.
3090 (aarch64_ftrace_insn_reloc_tb): Likewise.
3091 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3092 PRIx64 instead of PRIx32.
3093
79e7fd4f
YQ
30942016-06-28 Yao Qi <yao.qi@linaro.org>
3095
3096 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3097 (the_low_target): Install arm_get_syscall_trapinfo.
3098
061fc021
YQ
30992016-06-28 Yao Qi <yao.qi@linaro.org>
3100
3101 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3102 function.
3103 (the_low_target): Install aarch64_get_syscall_trapinfo.
3104
4cc32bec
YQ
31052016-06-28 Yao Qi <yao.qi@linaro.org>
3106
3107 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3108 Callers updated.
3109 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3110 Remove parameter sysno.
3111 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3112 sysret.
3113
782c1122
AA
31142016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3115
3116 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3117 (s390_emit_ne_goto): Likewise.
3118 (s390_emit_lt_goto): Likewise.
3119 (s390_emit_le_goto): Likewise.
3120 (s390_emit_gt_goto): Likewise.
3121 (s390_emit_ge_goto): Likewise.
3122 (s390x_emit_eq_goto): Likewise.
3123 (s390x_emit_ne_goto): Likewise.
3124 (s390x_emit_lt_goto): Likewise.
3125 (s390x_emit_le_goto): Likewise.
3126 (s390x_emit_gt_goto): Likewise.
3127 (s390x_emit_ge_goto): Likewise.
3128 (s390_emit_ops_impl): Mark variable static.
3129 (s390x_emit_ops): Likewise.
3130
2e7b624b
YQ
31312016-06-17 Yao Qi <yao.qi@linaro.org>
3132
3133 * linux-low.c (handle_extended_wait): Call
3134 uninsert_reinsert_breakpoints for the parent process. Remove
3135 reinsert breakpoints from the child process. Reinsert them to
3136 the parent process when vfork is done.
3137 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3138 (reinsert_reinsert_breakpoints): New function.
3139 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3140 (reinsert_reinsert_breakpoints): Declare.
3141
8a81c5d7
YQ
31422016-06-17 Yao Qi <yao.qi@linaro.org>
3143
3144 * linux-low.c (handle_extended_wait): If the parent is doing
3145 step-over, remove the reinsert breakpoints from the forked child.
3146
f50bf8e5
YQ
31472016-06-17 Yao Qi <yao.qi@linaro.org>
3148
3149 * linux-low.c (unsuspend_all_lwps): Declare.
3150 (linux_low_filter_event): If thread exited, call finish_step_over.
3151 If step-over is finished, unsuspend other threads.
3152
8376a3cb
YQ
31532016-06-17 Yao Qi <yao.qi@linaro.org>
3154
3155 * linux-low.c (linux_resume_one_lwp_throw): Assert
3156 has_reinsert_breakpoints returns false.
3157 * mem-break.c (delete_disabled_breakpoints): Assert
3158 bp type isn't reinsert_breakpoint.
3159
f79b145d
YQ
31602016-06-17 Yao Qi <yao.qi@linaro.org>
3161
3162 * linux-low.c (maybe_hw_step): New function.
3163 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3164 (finish_step_over): Switch current_thread to lwp temporarily,
3165 and assert has_reinsert_breakpoints returns true.
3166 (proceed_one_lwp): Call maybe_hw_step.
3167 * mem-break.c (has_reinsert_breakpoints): New function.
3168 * mem-break.h (has_reinsert_breakpoints): Declare.
3169
0ae534d2
JT
31702016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3171
3172 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3173
fcdad592
YQ
31742016-05-17 Yao Qi <yao.qi@linaro.org>
3175
3176 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3177 instead of find_inferior.
3178
9e784964
YQ
31792016-05-05 Yao Qi <yao.qi@linaro.org>
3180
3181 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3182 Initialize res to zero.
3183
cf2ebb6e
YQ
31842016-05-05 Yao Qi <yao.qi@linaro.org>
3185
3186 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3187 to uint32_t.
3188
c1aebf87
UW
31892016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3190
3191 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3192 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3193 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3194
35fd2deb 31952016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3196 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3197
3198 * tracepoint.c (write_inferior_int8): New function.
3199 (cmd_qtenable_disable): Write enable flag using
3200 write_inferior_int8.
3201
484b3c32
YQ
32022016-04-25 Yao Qi <yao.qi@linaro.org>
3203
3204 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3205 (need_step_over_p): Return zero if the LWP has pending signals
3206 can be delivered on software single step target.
3207
85ba7d86
YQ
32082016-04-25 Yao Qi <yao.qi@linaro.org>
3209
3210 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3211 return instead of error.
3212
3539aa13
YQ
32132016-04-22 Yao Qi <yao.qi@linaro.org>
3214
3215 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3216 to 23.
3217
5b061e98
YQ
32182016-04-22 Yao Qi <yao.qi@linaro.org>
3219
3220 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3221 signal when stepping over breakpoint with software single
3222 step.
3223
3451269c
PA
32242016-04-21 Pedro Alves <palves@redhat.com>
3225
3226 * linux-s390-low.c (s390_collect_ptrace_register)
3227 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3228 add casts.
3229 (s390_check_regset): Use void * instead of gdb_byte *.
3230
a2358508
PA
32312016-04-20 Pedro Alves <palves@redhat.com>
3232
3233 * configure: Renegerate.
3234
6885166d
YQ
32352016-04-20 Yao Qi <yao.qi@linaro.org>
3236
3237 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3238 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3239 number 16.
3240 (arm_store_gregset): Likewise.
3241
2b863f51
WT
32422016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3243
3244 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3245 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3246 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3247 (amd64-avx-mpx-linux.c): New rules.
3248 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3249 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3250 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3251 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3252 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3253 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3254 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3255 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3256 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3257 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3258 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3259 * linux-x86-low.c (x86_linux_read_description): Add case for
3260 X86_XSTATE_AVX_MPX_MASK.
3261 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3262 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3263 init_registers_i386_avx_mpx_linux.
3264 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3265 (initialize_low_tracepoint): Call
3266 init_registers_i386_avx_mpx_linux.
3267 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3268 (initialize_low_tracepoint): Call
3269 init_registers_amd64_avx_mpx_linux.
3270 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3271 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3272 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3273 declarations.
3274
9b30624b
PA
32752016-04-18 Pedro Alves <palves@redhat.com>
3276
3277 * configure: Regenerate.
3278
45e3745e
AT
32792016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3280
3281 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3282 (aarch64_emit_sub): Likewise.
3283
2afc13ff
PA
32842016-04-12 Pedro Alves <palves@redhat.com>
3285
3286 * utils.c (prepare_to_throw_exception): Delete.
3287
6e774b13
SM
32882016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3289
3290 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3291
4dca19f8
MK
32922016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3293
3294 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3295
d0a9981f
MK
32962016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3297
3298 * linux-aarch64-ipa.c: Add <elf.h> include.
3299 * linux-ppc-ipa.c: Add <elf.h> include.
3300 * linux-s390-ipa.c: Add <elf.h> include.
3301
252db07e
MK
33022016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3303
3304 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3305 (get_raw_reg_ptr): Likewise.
3306 (get_trace_state_variable_value_ptr): Likewise.
3307 (set_trace_state_variable_value_ptr): Likewise.
3308 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3309 char *.
3310
14e2b6d9
MK
33112016-03-31 Wei-cheng Wang <cole945@gmail.com>
3312 Marcin Kościelnicki <koriakin@0x04.net>
3313
3314 PR/17221
3315 * linux-ppc-low.c (emit_insns): New function.
3316 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3317 (ppc_emit_prologue): New function.
3318 (ppc_emit_epilogue): New function.
3319 (ppc_emit_add): New function.
3320 (ppc_emit_sub): New function.
3321 (ppc_emit_mul): New function.
3322 (ppc_emit_lsh): New function.
3323 (ppc_emit_rsh_signed): New function.
3324 (ppc_emit_rsh_unsigned): New function.
3325 (ppc_emit_ext): New function.
3326 (ppc_emit_zero_ext): New function.
3327 (ppc_emit_log_not): New function.
3328 (ppc_emit_bit_and): New function.
3329 (ppc_emit_bit_or): New function.
3330 (ppc_emit_bit_xor): New function.
3331 (ppc_emit_bit_not): New function.
3332 (ppc_emit_equal): New function.
3333 (ppc_emit_less_signed): New function.
3334 (ppc_emit_less_unsigned): New function.
3335 (ppc_emit_ref): New function.
3336 (ppc_emit_const): New function.
3337 (ppc_emit_reg): New function.
3338 (ppc_emit_pop): New function.
3339 (ppc_emit_stack_flush): New function.
3340 (ppc_emit_swap): New function.
3341 (ppc_emit_stack_adjust): New function.
3342 (ppc_emit_call): New function.
3343 (ppc_emit_int_call_1): New function.
3344 (ppc_emit_void_call_2): New function.
3345 (ppc_emit_if_goto): New function.
3346 (ppc_emit_goto): New function.
3347 (ppc_emit_eq_goto): New function.
3348 (ppc_emit_ne_goto): New function.
3349 (ppc_emit_lt_goto): New function.
3350 (ppc_emit_le_goto): New function.
3351 (ppc_emit_gt_goto): New function.
3352 (ppc_emit_ge_goto): New function.
3353 (ppc_write_goto_address): New function.
3354 (ppc_emit_ops_impl): New static variable.
3355 (ppc64v1_emit_prologue): New function.
3356 (ppc64v2_emit_prologue): New function.
3357 (ppc64_emit_epilogue): New function.
3358 (ppc64_emit_add): New function.
3359 (ppc64_emit_sub): New function.
3360 (ppc64_emit_mul): New function.
3361 (ppc64_emit_lsh): New function.
3362 (ppc64_emit_rsh_signed): New function.
3363 (ppc64_emit_rsh_unsigned): New function.
3364 (ppc64_emit_ext): New function.
3365 (ppc64_emit_zero_ext): New function.
3366 (ppc64_emit_log_not): New function.
3367 (ppc64_emit_bit_and): New function.
3368 (ppc64_emit_bit_or): New function.
3369 (ppc64_emit_bit_xor): New function.
3370 (ppc64_emit_bit_not): New function.
3371 (ppc64_emit_equal): New function.
3372 (ppc64_emit_less_signed): New function.
3373 (ppc64_emit_less_unsigned): New function.
3374 (ppc64_emit_ref): New function.
3375 (ppc64_emit_const): New function.
3376 (ppc64v1_emit_reg): New function.
3377 (ppc64v2_emit_reg): New function.
3378 (ppc64_emit_pop): New function.
3379 (ppc64_emit_stack_flush): New function.
3380 (ppc64_emit_swap): New function.
3381 (ppc64v1_emit_call): New function.
3382 (ppc64v2_emit_call): New function.
3383 (ppc64v1_emit_int_call_1): New function.
3384 (ppc64v2_emit_int_call_1): New function.
3385 (ppc64v1_emit_void_call_2): New function.
3386 (ppc64v2_emit_void_call_2): New function.
3387 (ppc64_emit_if_goto): New function.
3388 (ppc64_emit_eq_goto): New function.
3389 (ppc64_emit_ne_goto): New function.
3390 (ppc64_emit_lt_goto): New function.
3391 (ppc64_emit_le_goto): New function.
3392 (ppc64_emit_gt_goto): New function.
3393 (ppc64_emit_ge_goto): New function.
3394 (ppc64v1_emit_ops_impl): New static variable.
3395 (ppc64v2_emit_ops_impl): New static variable.
3396 (ppc_emit_ops): New function.
3397 (linux_low_target): Wire in ppc_emit_ops.
3398
a2174ba4
MK
33992016-03-31 Wei-cheng Wang <cole945@gmail.com>
3400 Marcin Kościelnicki <koriakin@0x04.net>
3401
3402 PR/17221
3403 * Makefile.in: Add powerpc-*-ipa.o
3404 * configure.srv: Add ipa_obj for powerpc*-linux.
3405 * linux-ppc-ipa.c: New file.
3406 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3407 includes.
3408 (PPC_FIELD): New macro.
3409 (PPC_SEXT): New macro.
3410 (PPC_OP6): New macro.
3411 (PPC_BO): New macro.
3412 (PPC_LI): New macro.
3413 (PPC_BD): New macro.
3414 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3415 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3416 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3417 (ppc_get_thread_area): New function.
3418 (is_elfv2_inferior): New function.
3419 (gen_ds_form): New function.
3420 (GEN_STD): New macro.
3421 (GEN_STDU): New macro.
3422 (GEN_LD): New macro.
3423 (GEN_LDU): New macro.
3424 (gen_d_form): New function.
3425 (GEN_ADDI): New macro.
3426 (GEN_ADDIS): New macro.
3427 (GEN_LI): New macro.
3428 (GEN_LIS): New macro.
3429 (GEN_ORI): New macro.
3430 (GEN_ORIS): New macro.
3431 (GEN_LWZ): New macro.
3432 (GEN_STW): New macro.
3433 (GEN_STWU): New macro.
3434 (gen_xfx_form): New function.
3435 (GEN_MFSPR): New macro.
3436 (GEN_MTSPR): New macro.
3437 (GEN_MFCR): New macro.
3438 (GEN_MTCR): New macro.
3439 (GEN_SYNC): New macro.
3440 (GEN_LWSYNC): New macro.
3441 (gen_x_form): New function.
3442 (GEN_OR): New macro.
3443 (GEN_MR): New macro.
3444 (GEN_LWARX): New macro.
3445 (GEN_STWCX): New macro.
3446 (GEN_CMPW): New macro.
3447 (gen_md_form): New function.
3448 (GEN_RLDICL): New macro.
3449 (GEN_RLDICR): New macro.
3450 (gen_i_form): New function.
3451 (GEN_B): New macro.
3452 (GEN_BL): New macro.
3453 (gen_b_form): New function.
3454 (GEN_BNE): New macro.
3455 (GEN_LOAD): New macro.
3456 (GEN_STORE): New macro.
3457 (gen_limm): New function.
3458 (gen_atomic_xchg): New function.
3459 (gen_call): New function.
3460 (ppc_relocate_instruction): New function.
3461 (ppc_install_fast_tracepoint_jump_pad): New function.
3462 (ppc_get_min_fast_tracepoint_insn_len): New function.
3463 (ppc_get_ipa_tdesc_idx): New function.
3464 (the_low_target): Wire in the new functions.
3465 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3466 tdescs.
3467 * linux-ppc-tdesc.h: New file.
3468
a13c4696
MK
34692016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3470
3471 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3472 (alloc_jump_pad_buffer): New function.
3473 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3474 (alloc_jump_pad_buffer): New function.
3475 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3476 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3477 (alloc_jump_pad_buffer): New function.
3478 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3479 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3480 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3481 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3482
1cda1512
MK
34832016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3484
3485 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3486 * linux-amd64-ipa.c: Likewise.
3487 * linux-i386-ipa.c: Likewise.
3488 * linux-s390-ipa.c: Likewise.
3489 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3490 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3491 set_trace_state_variable_value_ptr.
3492 (struct ipa_sym_addresses): Likewise.
3493 (symbol_list): Likewise.
3494 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3495 accessing gdb_collect directly.
3496 (gdb_collect_ptr_type): New typedef.
3497 (get_raw_reg_ptr_type): New typedef.
3498 (get_trace_state_variable_value_ptr_type): New typedef.
3499 (set_trace_state_variable_value_ptr_type): New typedef.
3500 (gdb_collect_ptr): New global.
3501 (get_raw_reg_ptr): New global.
3502 (get_trace_state_variable_value_ptr): New global.
3503 (set_trace_state_variable_value_ptr): New global.
3504 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3505 accessing get_raw_reg directly.
3506 (get_get_tsv_func_addr): Likewise for
3507 get_trace_state_variable_value_ptr.
3508 (get_set_tsv_func_addr): Likewise for
3509 set_trace_state_variable_value_ptr.
3510 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3511
72fb5488
SM
35122016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3513
3514 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3515
28170b88
MK
35162016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3517
3518 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3519 packets.
3520 (relocate_instruction): Remove own_buf.
3521 * server.c (own_buf): Make global.
3522 (handle_v_requests): Make global.
3523 * server.h (own_buf): New declaration.
3524 (handle_v_requests): New prototype.
3525
f39e8743
MK
35262016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3527
3528 PR 18377
3529 * linux-s390-low.c (add_insns): New function.
3530 (s390_emit_prologue): New function.
3531 (s390_emit_epilogue): New function.
3532 (s390_emit_add): New function.
3533 (s390_emit_sub): New function.
3534 (s390_emit_mul): New function.
3535 (s390_emit_lsh): New function.
3536 (s390_emit_rsh_signed): New function.
3537 (s390_emit_rsh_unsigned): New function.
3538 (s390_emit_ext): New function.
3539 (s390_emit_log_not): New function.
3540 (s390_emit_bit_and): New function.
3541 (s390_emit_bit_or): New function.
3542 (s390_emit_bit_xor): New function.
3543 (s390_emit_bit_not): New function.
3544 (s390_emit_equal): New function.
3545 (s390_emit_less_signed): New function.
3546 (s390_emit_less_unsigned): New function.
3547 (s390_emit_ref): New function.
3548 (s390_emit_if_goto): New function.
3549 (s390_emit_goto): New function.
3550 (s390_write_goto_address): New function.
3551 (s390_emit_litpool): New function.
3552 (s390_emit_const): New function.
3553 (s390_emit_call): New function.
3554 (s390_emit_reg): New function.
3555 (s390_emit_pop): New function.
3556 (s390_emit_stack_flush): New function.
3557 (s390_emit_zero_ext): New function.
3558 (s390_emit_swap): New function.
3559 (s390_emit_stack_adjust): New function.
3560 (s390_emit_set_r2): New function.
3561 (s390_emit_int_call_1): New function.
3562 (s390_emit_void_call_2): New function.
3563 (s390_emit_eq_goto): New function.
3564 (s390_emit_ne_goto): New function.
3565 (s390_emit_lt_goto): New function.
3566 (s390_emit_le_goto): New function.
3567 (s390_emit_gt_goto): New function.
3568 (s390_emit_ge_goto): New function.
3569 (s390x_emit_prologue): New function.
3570 (s390x_emit_epilogue): New function.
3571 (s390x_emit_add): New function.
3572 (s390x_emit_sub): New function.
3573 (s390x_emit_mul): New function.
3574 (s390x_emit_lsh): New function.
3575 (s390x_emit_rsh_signed): New function.
3576 (s390x_emit_rsh_unsigned): New function.
3577 (s390x_emit_ext): New function.
3578 (s390x_emit_log_not): New function.
3579 (s390x_emit_bit_and): New function.
3580 (s390x_emit_bit_or): New function.
3581 (s390x_emit_bit_xor): New function.
3582 (s390x_emit_bit_not): New function.
3583 (s390x_emit_equal): New function.
3584 (s390x_emit_less_signed): New function.
3585 (s390x_emit_less_unsigned): New function.
3586 (s390x_emit_ref): New function.
3587 (s390x_emit_if_goto): New function.
3588 (s390x_emit_const): New function.
3589 (s390x_emit_call): New function.
3590 (s390x_emit_reg): New function.
3591 (s390x_emit_pop): New function.
3592 (s390x_emit_stack_flush): New function.
3593 (s390x_emit_zero_ext): New function.
3594 (s390x_emit_swap): New function.
3595 (s390x_emit_stack_adjust): New function.
3596 (s390x_emit_int_call_1): New function.
3597 (s390x_emit_void_call_2): New function.
3598 (s390x_emit_eq_goto): New function.
3599 (s390x_emit_ne_goto): New function.
3600 (s390x_emit_lt_goto): New function.
3601 (s390x_emit_le_goto): New function.
3602 (s390x_emit_gt_goto): New function.
3603 (s390x_emit_ge_goto): New function.
3604 (s390_emit_ops): New function.
3605 (struct linux_target_ops): Fill in emit_ops hook.
3606
abd9baf9
MK
36072016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3608
3609 PR 18377
3610 * Makefile.in: Add s390 IPA files.
3611 * configure.srv: Build IPA for s390.
3612 * linux-s390-ipa.c: New file.
3613 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3614 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3615 (tdesc_s390_linux32): Likewise.
3616 (init_registers_s390_linux32v1): Likewise.
3617 (tdesc_s390_linux32v1): Likewise.
3618 (init_registers_s390_linux32v2): Likewise.
3619 (tdesc_s390_linux32v2): Likewise.
3620 (init_registers_s390_linux64): Likewise.
3621 (tdesc_s390_linux64): Likewise.
3622 (init_registers_s390_linux64v1): Likewise.
3623 (tdesc_s390_linux64v1): Likewise.
3624 (init_registers_s390_linux64v2): Likewise.
3625 (tdesc_s390_linux64v2): Likewise.
3626 (init_registers_s390_te_linux64): Likewise.
3627 (tdesc_s390_te_linux64): Likewise.
3628 (init_registers_s390_vx_linux64): Likewise.
3629 (tdesc_s390_vx_linux64): Likewise.
3630 (init_registers_s390_tevx_linux64): Likewise.
3631 (tdesc_s390_tevx_linux64): Likewise.
3632 (init_registers_s390x_linux64): Likewise.
3633 (tdesc_s390x_linux64): Likewise.
3634 (init_registers_s390x_linux64v1): Likewise.
3635 (tdesc_s390x_linux64v1): Likewise.
3636 (init_registers_s390x_linux64v2): Likewise.
3637 (tdesc_s390x_linux64v2): Likewise.
3638 (init_registers_s390x_te_linux64): Likewise.
3639 (tdesc_s390x_te_linux64): Likewise.
3640 (init_registers_s390x_vx_linux64): Likewise.
3641 (tdesc_s390x_vx_linux64): Likewise.
3642 (init_registers_s390x_tevx_linux64): Likewise.
3643 (tdesc_s390x_tevx_linux64): Likewise.
3644 (have_hwcap_s390_vx): New static variable.
3645 (s390_arch_setup): Fill have_hwcap_s390_vx.
3646 (s390_get_thread_area): New function.
3647 (s390_ft_entry_gpr_esa): New const.
3648 (s390_ft_entry_gpr_zarch): New const.
3649 (s390_ft_entry_misc): New const.
3650 (s390_ft_entry_fr): New const.
3651 (s390_ft_entry_vr): New const.
3652 (s390_ft_main_31): New const.
3653 (s390_ft_main_64): New const.
3654 (s390_ft_exit_fr): New const.
3655 (s390_ft_exit_vr): New const.
3656 (s390_ft_exit_misc): New const.
3657 (s390_ft_exit_gpr_esa): New const.
3658 (s390_ft_exit_gpr_zarch): New const.
3659 (append_insns): New function.
3660 (s390_relocate_instruction): New function.
3661 (s390_install_fast_tracepoint_jump_pad): New function.
3662 (s390_get_min_fast_tracepoint_insn_len): New function.
3663 (s390_get_ipa_tdesc_idx): New function.
3664 (struct linux_target_ops): Wire in the above functions.
3665 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3666 * linux-s390-tdesc.h: New file.
3667
a4105d04
MK
36682016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3669
3670 * linux-s390-low.c (s390_supports_tracepoints): New function.
3671 (struct linux_target_ops): Fill supports_tracepoints hook.
3672
35ac8b3e
YQ
36732016-03-18 Yao Qi <yao.qi@linaro.org>
3674
3675 * linux-low.c (lwp_signal_can_be_delivered): New function.
3676 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3677
94610ec4
YQ
36782016-03-18 Yao Qi <yao.qi@linaro.org>
3679
3680 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3681 0 if signal is enqueued. Remove 'signal' from one debugging
3682 message. Move one debugging message to some lines below.
3683 Remove code setting 'signal' to 0.
3684
80aea927
YQ
36852016-03-18 Yao Qi <yao.qi@linaro.org>
3686
3687 * linux-low.c (linux_low_filter_event): Remove redundant
3688 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3689
b04fd3be
MK
36902016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3691
3692 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3693 (struct linux_target_ops): Wire in the above.
3694
c40c8d4b
YQ
36952016-03-03 Yao Qi <yao.qi@linaro.org>
3696
3697 * linux-low.c: Update comments to start_step_over.
3698
0f8288ae
YQ
36992016-03-03 Yao Qi <yao.qi@linaro.org>
3700
3701 PR server/19736
3702 * linux-low.c (handle_extended_wait): Set child suspended
3703 if event_lwp->bp_reinsert isn't zero.
3704
fdbd04a8
YQ
37052016-03-02 Yao Qi <yao.qi@linaro.org>
3706
3707 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3708 enqueue_pending_signal.
3709
6896a8fa
MK
37102016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3711
3712 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3713 is actually loaded.
3714
ab503087
MK
37152016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3716
3717 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3718 (s390_regmap_3264) [!__s390x__]: New global.
3719 (s390_collect_ptrace_register): Skip map entries containing -1.
3720 (s390_supply_ptrace_register): Ditto.
3721 (s390_fill_gprs_high): New function.
3722 (s390_store_gprs_high): New function.
3723 (s390_regsets): Add NT_S390_HIGH_GPRS.
3724 (s390_get_hwcap): Enable on 31-bit.
3725 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3726 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3727 Detect NT_S390_HIGH_GPRS.
3728 (s390_usrregs_info_3264): Enable on 31-bit.
3729 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3730 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3731
ae91f625
MK
37322016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3733
3734 PR gdb/13808
3735 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3736 * configure.srv: Ditto.
3737 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3738 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3739 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3740 (init_registers_amd64_linux): Remove prototype.
3741 (tdesc_amd64_linux): Remove declaration.
3742 (get_ipa_tdesc): New function.
3743 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3744 initialize remaining tdescs.
3745 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3746 (init_registers_i386_linux): Remove prototype.
3747 (tdesc_i386_linux): Remove declaration.
3748 (get_ipa_tdesc): New function.
3749 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3750 initialize remaining tdescs.
3751 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3752 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3753 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3754 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3755 (x86_get_ipa_tdesc_idx): New function.
3756 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3757 * linux-x86-tdesc.h: New file.
3758 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3759 (target_get_ipa_tdesc_idx): New macro.
3760 * tracepoint.c (ipa_tdesc_idx): New macro.
3761 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3762 (symbol_list): Add ipa_tdesc_idx.
3763 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3764 (ipa_tdesc): Remove.
3765 (ipa_tdesc_idx): New variable.
3766 (get_context_regcache): Use get_ipa_tdesc.
3767 (gdb_collect): Ditto.
3768 (gdb_probe): Ditto.
3769 * tracepoint.h (get_ipa_tdesc): New prototype.
3770 (ipa_tdesc): Remove.
3771
e7ad2f14
PA
37722016-02-24 Pedro Alves <palves@redhat.com>
3773
3774 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3775 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3776 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3777 Factor out common code between the USE_SIGTRAP_SIGINFO and
3778 !USE_SIGTRAP_SIGINFO blocks.
3779 (linux_low_filter_event): Call save_stop_reason instead of
3780 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3781 Update comments.
3782 (linux_wait_1): Update comments.
3783
657f9cde
WW
37842016-02-24 Wei-cheng Wang <cole945@gmail.com>
3785
3786 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3787 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3788 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3789 ppc_insert_point, ppc_remove_point.
3790
b00b61e1
MK
37912016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3792
3793 * linux-s390-low.c (s390_supports_z_point_type): New function.
3794 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3795
553cb527
YQ
37962016-02-16 Yao Qi <yao.qi@linaro.org>
3797
3798 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3799 PC. Get pc from regcache_read_pc.
3800
a5652c21
YQ
38012016-02-12 Yao Qi <yao.qi@linaro.org>
3802
3803 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3804 or linux_get_pc_32bit.
3805 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3806
ed443b61
YQ
38072016-02-12 Yao Qi <yao.qi@linaro.org>
3808
3809 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3810 arm_linux_get_next_pcs_fixup.
3811
020ecd38
MK
38122016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3813
3814 * tracepoint.c (x_tracepoint_action_download): Change
3815 write_inferior_data_ptr to write_inferior_data_pointer.
3816 (cmd_qtstart): Likewise.
3817 (write_inferior_data_ptr): Remove.
3818 (download_agent_expr): Change write_inferior_data_ptr to
3819 write_inferior_data_pointer.
3820 (download_tracepoint_1): Likewise.
3821 (download_tracepoint): Likewise.
3822 (download_trace_state_variables): Likewise.
3823
7cae9051
WW
38242016-02-11 Wei-cheng Wang <cole945@gmail.com>
3825 Marcin Kościelnicki <koriakin@0x04.net>
3826
3827 * tracepoint.c (struct tracepoint_action_ops): Remove.
3828 (struct tracepoint_action): Remove ops.
3829 (m_tracepoint_action_download, r_tracepoint_action_download)
3830 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3831 size and offset accordingly.
3832 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3833 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3834 (tracepoint_action_send, tracepoint_action_download): New functions.
3835 Helpers for trace action handlers.
3836 (add_tracepoint_action): Remove setup actions ops.
3837 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3838
9f6a71b4
YQ
38392016-02-10 Yao Qi <yao.qi@linaro.org>
3840
3841 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3842
1e94266c
SM
38432016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3844
3845 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3846 to AC_OUTPUT.
3847 * configure: Regenerate.
3848
8adce034
SM
38492016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3850
3851 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3852 void * to gdb_byte *.
3853 * linux-low.c (siginfo_fixup): Likewise.
3854 (linux_xfer_siginfo): Likewise.
3855 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3856 Likewise.
3857 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3858
93813b37
WT
38592016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3860
3861 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3862 to srv_tgtobj.
3863 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3864 to srv_tgtobj.
3865 * linux-x86-low.c [__x86_64__]: Include
3866 "nat/amd64-linux-siginfo.h".
3867 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3868 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3869 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3870 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3871 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3872 (cpt_si_fd, si_timerid, si_overrun): Move from
3873 nat/amd64-linux-siginfo.c.
3874 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3875
8424cc97
SM
38762016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3877
3878 * server.c (skip_to_semicolon): Remove.
3879 (process_point_options): Use strchrnul instead of
3880 skip_to_semicolon.
3881
4d18591b
YQ
38822016-01-26 Yao Qi <yao.qi@linaro.org>
3883
3884 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3885 * linux-low.c (install_software_single_step_breakpoints): Don't
3886 call regcache_read_pc.
3887 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3888 argument pc.
3889
d8020970
YQ
38902016-01-26 Yao Qi <yao.qi@linaro.org>
3891
3892 * linux-low.c (install_software_single_step_breakpoints): Call
3893 regcache_read_pc instead of get_pc.
3894
8b207339
YQ
38952016-01-26 Yao Qi <yao.qi@linaro.org>
3896
3897 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3898 (unblock_async_io): Rename to ...
3899 (block_unblock_async_io): ... it. New function.
3900 (enable_async_io): Don't install SIGIO handler. Unblock it
3901 instead.
3902 (disable_async_io): Don't ignore SIGIO. Block it instead.
3903 (initialize_async_io): Install SIGIO handler. Don't call
3904 unblock_async_io.
3905
18879fef
YQ
39062016-01-26 Yao Qi <yao.qi@linaro.org>
3907
3908 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3909 first character is '\003', call *the_target->request_interrupt.
3910
a0f8e08a
YQ
39112016-01-25 Yao Qi <yao.qi@linaro.org>
3912
3913 * remote-utils.c (new_thread_notify): Remove.
3914 (dead_thread_notify): Likewise.
3915 * remote-utils.h (new_thread_notify): Remove declaration.
3916 (dead_thread_notify): Likewise.
3917
cc5fd9ab
MK
39182016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3919
3920 * gdb.trace/pending.exp: Fix expected message on continue.
3921
99e8eb11
MK
39222016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3923
3924 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3925 it works properly on big-endian machines where sizeof (CORE_ADDR)
3926 != sizeof (void *).
3927
a994041d
PA
39282016-01-21 Pedro Alves <palves@redhat.com>
3929
3930 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3931 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3932 * configure: Regenerate.
3933
f7a6a40d
YQ
39342016-01-21 Yao Qi <yao.qi@linaro.org>
3935
3936 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3937 is_thumb and set it according to CPSR saved on the stack.
3938 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3939 arm_sigreturn_next_pc.
3940
6f69e520
YQ
39412016-01-18 Yao Qi <yao.qi@linaro.org>
3942
3943 * linux-low.c (linux_set_pc_64bit): New function.
3944 (linux_get_pc_64bit): New function.
3945 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3946 Declare.
3947 * linux-sparc-low.c (debug_threads): Remove declaration.
3948 (sparc_get_pc): Remove.
3949 (the_low_target): Use linux_get_pc_64bit instead of
3950 sparc_get_pc.
3951 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3952 (the_low_target): Use linux_get_pc_64bit and
3953 linux_set_pc_64bit.
3954
276d4552
YQ
39552016-01-18 Yao Qi <yao.qi@linaro.org>
3956
3957 * linux-arm-low.c (debug_threads): Remove declaration.
3958 (arm_get_pc, arm_set_pc): Remove.
3959 (the_low_target): Use linux_get_pc_32bit and
3960 linux_set_pc_32bit.
3961 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3962 (the_low_target): Use linux_get_pc_32bit and
3963 linux_set_pc_32bit.
3964 * linux-cris-low.c (debug_threads): Remove declaration.
3965 (cris_get_pc, cris_set_pc,): Remove.
3966 (the_low_target): Use linux_get_pc_32bit and
3967 linux_set_pc_32bit.
3968 * linux-crisv32-low.c (debug_threads): Remove declaration.
3969 (cris_get_pc, cris_set_pc): Remove.
3970 (the_low_target): Use linux_get_pc_32bit and
3971 linux_set_pc_32bit.
3972 * linux-low.c: Include inttypes.h.
3973 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3974 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3975 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3976 (the_low_target): Use linux_get_pc_32bit and
3977 linux_set_pc_32bit.
3978 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3979 (the_low_target): Use linux_get_pc_32bit and
3980 linux_set_pc_32bit.
3981 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3982 (the_low_target): Use linux_get_pc_32bit and
3983 linux_set_pc_32bit.
3984 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3985 (the_low_target): Use linux_get_pc_32bit and
3986 linux_set_pc_32bit.
3987 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3988 (the_low_target): Use linux_get_pc_32bit and
3989 linux_set_pc_32bit.
3990
eb0edac8
GB
39912016-01-18 Gary Benson <gbenson@redhat.com>
3992
3993 * configure.ac (AC_FUNC_FORK): New check.
3994 * config.in: Regenerate.
3995 * configure: Likewise.
3996
1b451dda
YQ
39972016-01-14 Yao Qi <yao.qi@linaro.org>
3998
3999 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4000 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4001 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4002 arm_get_next_pcs_ctor.
4003
82075af2
JS
40042016-01-12 Josh Stone <jistone@redhat.com>
4005 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4006
4007 * inferiors.h: Include "gdb_vecs.h".
4008 (struct process_info): Add syscalls_to_catch.
4009 * inferiors.c (remove_process): Free syscalls_to_catch.
4010 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4011 syscall_return stops.
4012 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4013 * server.c (handle_general_set): Handle QCatchSyscalls.
4014 (handle_query): Report support for QCatchSyscalls.
4015 * target.h (struct target_ops): Add supports_catch_syscall.
4016 (target_supports_catch_syscall): New macro.
4017 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4018 (struct lwp_info): Add syscall_state.
4019 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4020 Maintain syscall_state and syscalls_to_catch across exec.
4021 (get_syscall_trapinfo): New function, proxy to the_low_target.
4022 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4023 (linux_low_filter_event): Toggle syscall_state entry/return for
4024 syscall traps, and set it ignored for all others.
4025 (gdb_catching_syscalls_p): New function.
4026 (gdb_catch_this_syscall_p): New function.
4027 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4028 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4029 (linux_supports_catch_syscall): New function.
4030 (linux_target_ops): Install it.
4031 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4032 (the_low_target): Install it.
4033
8f13a3ce
MF
40342016-01-12 Mike Frysinger <vapier@gentoo.org>
4035
4036 * acinclude.m4: Include new ../warning.m4 file.
4037 * configure: Regenerated.
4038 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4039
5b3da067
MF
40402016-01-12 Mike Frysinger <vapier@gentoo.org>
4041
4042 * ax.c (is_goto_target): Mark static.
4043 * linux-low.c (register_addr): Likewise.
4044 (linux_fetch_registers, linux_store_registers): Likewise.
4045 * mem-break.c (any_persistent_commands): Fix old prototype.
4046 (add_commands_to_breakpoint): Mark static.
4047 * regcache.c (find_register_by_name): Delete unused func.
4048 * remote-utils.c (hex_or_minus_one): Mark static.
4049 * server.c (monitor_show_help): Mark static.
4050 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4051 handle_v_requests): Likewise.
4052
bc504a31
PA
40532016-01-12 Pedro Alves <palves@redhat.com>
4054
4055 Remove use of the registered trademark symbol throughout.
4056
5a0dd67a
YQ
40572016-01-08 Yao Qi <yao.qi@linaro.org>
4058
4059 * remote-utils.c (getpkt): If c is '\003', call target hook
4060 request_interrupt.
4061
b2ca446f
YQ
40622016-01-06 Yao Qi <yao.qi@linaro.org>
4063
4064 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4065 linux-aarch32-low.c.
4066 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4067 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4068 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4069 (thumb2_breakpoint): Declare.
4070 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4071 linux-aarch32-low.h.
4072 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4073 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4074 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4075
edd88788
JB
40762016-01-01 Joel Brobecker <brobecker@adacore.com>
4077
4078 * gdbreplay.c (gdbreplay_version): Change copyright year in
4079 version message.
4080 * server.c (gdbserver_version): Likewise.
4081
65da7f14
PP
40822015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4083
4084 * server.c (crc32_table): Delete.
4085 (crc32): Use libiberty's xcrc32 function.
4086
4abd5ed2
JB
40872015-12-22 Joel Brobecker <brobecker@adacore.com>
4088
4089 * lynx-low.c (lynx_delete_thread_callback): New function.
4090 (lynx_mourn): Properly delete our process and all of its
4091 threads. Remove call to clear_inferiors.
4092
0e50fe5c
JB
40932015-12-22 Joel Brobecker <brobecker@adacore.com>
4094
4095 * target.c (thread_search_callback): Add check that
4096 the thread_stopped target callback is not NULL before
4097 calling it.
4098
35adc03f
YQ
40992015-12-21 Yao Qi <yao.qi@linaro.org>
4100
4101 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4102 arm breakpoint.
4103
bd2b2909
AT
41042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4105
4106 * server.c (handle_query): Call target_supports_software_single_step.
4107
7fe5e27e
AT
41082015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4109
4110 * linux-low.c (single_step): New function.
4111 (linux_resume_one_lwp_throw): Call single_step.
4112 (start_step_over): Likewise.
4113
d9311bfa
AT
41142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4115
4116 * Makefile.in (SFILES): Append arch/arm-linux.c,
4117 arch/arm-get-next-pcs.c.
4118 (arm-linux.o): New rule.
4119 (arm-get-next-pcs.o): New rule.
4120 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4121 arm-linux.o.
4122 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4123 to linux-aarch32-low.c.
4124 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4125 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4126 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4127 (thumb2_breakpoint_len): Likewise.
4128 (arm_is_thumb_mode): Make non-static.
4129 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4130 from linux-aarch32-low.c.
4131 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4132 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4133 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4134 (thumb2_breakpoint_len): Likewise.
4135 (arm_is_thumb_mode): New declaration.
4136 * linux-arm-low.c: Include arch/arm-linux.h
4137 aarch/arm-get-next-pcs.h, sys/syscall.h.
4138 (get_next_pcs_ops): New struct.
4139 (get_next_pcs_addr_bits_remove): New function.
4140 (get_next_pcs_is_thumb): New function.
4141 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4142 (arm_sigreturn_next_pc): Likewise.
4143 (get_next_pcs_syscall_next_pc): Likewise.
4144 (arm_gdbserver_get_next_pcs): Likewise.
4145 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4146 Initialize.
4147 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4148 * server.h: Include gdb_vecs.h.
4149
68ce2059
AT
41502015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4151
4152 * Makefile.in (SFILES): Append common/common-regcache.c.
4153 (OBS): Append common-regcache.o.
4154 (common-regcache.o): New rule.
4155 * regcache.c (init_register_cache): Initialize cache to
4156 REG_UNAVAILABLE.
4157 (regcache_raw_read_unsigned): New function.
4158 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4159 register_status enum.
4160
fa5308bd
AT
41612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4162
4163 * linux-aarch64-low.c (the_low_targets): Rename
4164 breakpoint_reinsert_addr to get_next_pcs.
4165 * linux-arm-low.c (the_low_targets): Likewise.
4166 * linux-bfin-low.c (the_low_targets): Likewise.
4167 * linux-cris-low.c (the_low_targets): Likewise.
4168 * linux-crisv32-low.c (the_low_targets): Likewise.
4169 * linux-low.c (can_software_single_step): Likewise.
4170 (install_software_single_step_breakpoints): New function.
4171 (start_step_over): Use install_software_single_step_breakpoints.
4172 * linux-low.h: New CORE_ADDR vector.
4173 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4174 get_next_pcs.
4175 * linux-mips-low.c (the_low_targets): Likewise.
4176 * linux-nios2-low.c (the_low_targets): Likewise.
4177 * linux-sparc-low.c (the_low_targets): Likewise.
4178
4a6ed09b
PA
41792015-12-17 Pedro Alves <palves@redhat.com>
4180
4181 * linux-low.c (linux_kill_one_lwp): Remove references to
4182 LinuxThreads.
4183 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4184 to 'kill'.
4185 (linux_init_signals): Delete.
4186 (initialize_low): Adjust.
4187 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4188
7544db95
PA
41892015-12-16 Pedro Alves <palves@redhat.com>
4190
4191 * configure.ac (compiler warning flags): When testing a
4192 -Wno-foo option, check whether -Wfoo works instead.
4193 * configure: Regenerate.
4194
8020350c
DB
41952015-12-11 Don Breazeal <donb@codesourcery.com>
4196
4197 * server.c (process_serial_event): Don't exit from gdbserver
4198 in remote mode if there are still active inferiors.
4199
db91f502
YQ
42002015-12-11 Yao Qi <yao.qi@linaro.org>
4201
4202 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4203 arm_breakpoint_at if the process is 32-bit.
4204
b37a6290
YQ
42052015-12-11 Yao Qi <yao.qi@linaro.org>
4206
4207 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4208 arm breakpoint.
4209
17b1509a
YQ
42102015-12-07 Yao Qi <yao.qi@linaro.org>
4211
4212 * configure.srv: Append arm.o to srv_tgtobj for
4213 aarch64*-*-linux* target.
4214 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4215 from linux-arm-low.c.
4216 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4217 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4218 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4219 (thumb2_breakpoint_len): Likewise.
4220 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4221 (arm_breakpoint_kinds): Likewise.
4222 (arm_breakpoint_kind_from_pc): Likewise.
4223 (arm_sw_breakpoint_from_kind): Likewise.
4224 (arm_breakpoint_kind_from_current_state): Likewise.
4225 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4226 (arm_sw_breakpoint_from_kind): Declare.
4227 (arm_breakpoint_kind_from_current_state): Declare.
4228 (arm_breakpoint_at): Declare.
4229 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4230 arm_sw_breakpoint_from_kind if process is 32-bit.
4231 (aarch64_breakpoint_kind_from_pc): New function.
4232 (aarch64_breakpoint_kind_from_current_state): New function.
4233 (the_low_target): Initialize fields breakpoint_kind_from_pc
4234 and breakpoint_kind_from_current_state.
4235 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4236 linux-aarch32-low.c.
4237 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4238 (arm_breakpoint, arm_breakpoint_len): Likewise.
4239 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4240 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4241 (arm_is_thumb_mode): Likewise.
4242 (arm_breakpoint_at): Likewise.
4243 (arm_breakpoint_kind_from_pc): Likewise.
4244 (arm_sw_breakpoint_from_kind): Likewise.
4245 (arm_breakpoint_kind_from_current_state): Likewise.
4246
4247 Revert:
4248 2015-08-04 Yao Qi <yao.qi@linaro.org>
4249
4250 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4251 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4252 * server.c (extended_protocol): Remove "static".
4253 * server.h (extended_protocol): Declare it.
4254
ece66d65
JS
42552015-12-04 Josh Stone <jistone@redhat.com>
4256
4257 * target.h (struct target_ops) <arch_setup>: Rename to ...
4258 (struct target_ops) <post_create_inferior>: ... this.
4259 (target_arch_setup): Rename to ...
4260 (target_post_create_inferior): ... this, calling post_create_inferior.
4261 * server.c (start_inferior): Update target_arch_setup calls to
4262 target_post_create_inferior.
4263 * linux-low.c (linux_low_ptrace_options): Forward declare.
4264 (linux_arch_setup): Update its comment for general use.
4265 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4266 (struct linux_target_ops): Use linux_post_create_inferior.
4267 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4268 to post_create_inferior.
4269 * nto-low.c (struct nto_target_ops): Likewise.
4270 * spu-low.c (struct spu_target_ops): Likewise.
4271 * win32-low.c (struct win32_target_ops): Likewise.
4272
e58c48b4
AT
42732015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4274
4275 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4276
fbec8956
AT
42772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4278
4279 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4280 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4281 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4282 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4283 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4284 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4285 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4286 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4287 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4288 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4289 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4290 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4291
9b4c5f87
AT
42922015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4293
4294 * linux-low.c (linux_look_up_symbols): Don't call
4295 linux_supports_traceclone.
4296 * linux-low.h (thread_db_init): Remove use_events argument.
4297 * thread-db.c (thread_db_use_event): Remove global variable.
4298 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4299 (struct thread_db) <td_create_bp>: Remove field.
4300 (thread_db_create_event): Remove function.
4301 (thread_db_enable_reporting): Likewise.
4302 (find_one_thread): Don't check for thread_db_use_events.
4303 (attach_thread): Likewise.
4304 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4305 (try_thread_db_load_1): Don't check for thread_db_use_events.
4306 (thread_db_init): Remove use_events argument and thread events
4307 handling.
4308 (remove_thread_event_breakpoints): Remove function.
4309 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4310
7d00775e
AT
43112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4312
4313 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4314 New function.
4315 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4316 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4317 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4318 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4319 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4320 Initialize.
4321 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4322 New function.
4323 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4324 * linux-low.c (can_hardware_single_step): Use
4325 supports_hardware_single_step.
4326 (can_software_single_step): New function.
4327 (start_step_over): Call can_software_single_step.
4328 (linux_supports_hardware_single_step): New function.
4329 (struct target_ops) <supports_software_single_step>: Initialize.
4330 * linux-low.h (struct linux_target_ops)
4331 <supports_hardware_single_step>: Initialize.
4332 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4333 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4334 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4335 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4336 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4337 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4338 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4339 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4340 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4341 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4342 Initialize.
4343 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4344 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4345 Initialize.
4346 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4347 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4348 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4349 New function.
4350 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4351 * target.h (struct target_ops): <supports_software_single_step>:
4352 New field.
4353 (target_supports_software_single_step): New macro.
4354
2d97cd35
AT
43552015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4356
4357 * linux-low.c (linux_wait_1): Fix pc advance condition.
4358 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4359 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4360
769ef81f
AT
43612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4362
4363 * linux-arm-low.c (arm_is_thumb_mode): New function.
4364 (arm_breakpoint_at): Use arm_is_thumb_mode.
4365 (arm_breakpoint_kind_from_current_state): New function.
4366 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4367 Initialize.
4368 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4369 (linux_breakpoint_kind_from_current_state): New function.
4370 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4371 * linux-low.h (struct linux_target_ops)
4372 <breakpoint_kind_from_current_state>: New field.
4373 * target.h (struct target_ops): Likewise.
4374 (target_breakpoint_kind_from_current_state): New macro.
4375
1bebeeca
PA
43762015-11-30 Pedro Alves <palves@redhat.com>
4377
4378 * linux-low.c (linux_resume): Wake up the event loop before
4379 returning.
4380
a67a9fae
PA
43812015-11-30 Pedro Alves <palves@redhat.com>
4382
4383 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4384 check.
4385 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4386 to -1.
4387 * target.c (struct thread_search): New structure.
4388 (thread_search_callback): New function.
4389 (prev_general_thread): New global.
4390 (prepare_to_access_memory, done_accessing_memory): New functions.
4391 * target.h (prepare_to_access_memory, done_accessing_memory):
4392 Replace macros with function declarations.
4393
f2faf941
PA
43942015-11-30 Pedro Alves <palves@redhat.com>
4395
4396 PR 14618
4397 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4398 report TARGET_WAITKIND_NO_RESUMED.
4399 * remote-utils.c (prepare_resume_reply): Handle
4400 TARGET_WAITKIND_NO_RESUMED.
4401 * server.c (report_no_resumed): New global.
4402 (handle_query) <qSupported>: Handle "no-resumed+". Report
4403 "no-resumed+" support.
4404 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4405 return error if the client doesn't support no-resumed events.
4406 (push_stop_notification): New function.
4407 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4408 events if the client supports them.
4409
a681f9c9
PA
44102015-11-30 Pedro Alves <palves@redhat.com>
4411
4412 * linux-low.c (thread_still_has_status_pending_p): Don't check
4413 vCont;t here.
4414 (lwp_resumed): New function.
4415 (status_pending_p_callback): Return early if the LWP is not
4416 supposed to be resumed.
4417
65706a29
PA
44182015-11-30 Pedro Alves <palves@redhat.com>
4419
4420 * linux-low.c (handle_extended_wait): Assert that the LWP's
4421 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4422 thread create events, leave the new child's status pending.
4423 (linux_low_filter_event): If GDB wants to hear about thread exit
4424 events, leave the LWP marked dead and don't delete it.
4425 (linux_wait_for_event_filtered): Don't check for thread exit.
4426 (filter_exit_event): New function.
4427 (linux_wait_1): Use it, when returning an exit event.
4428 (linux_resume_one_lwp_throw): Assert that the LWP's
4429 waitstatus is TARGET_WAITKIND_IGNORE.
4430 * remote-utils.c (prepare_resume_reply): Handle
4431 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4432 * server.c (report_thread_events): New global.
4433 (handle_general_set): Handle QThreadEvents.
4434 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4435 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4436 TARGET_WAITKIND_THREAD_EXITED.
4437 * server.h (report_thread_events): Declare.
4438
56cf4bed
PA
44392015-11-30 Pedro Alves <palves@redhat.com>
4440
4441 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4442 the thread's last_resume_kind was resume_stop.
4443
500c1d85
PA
44442015-11-30 Pedro Alves <palves@redhat.com>
4445
4446 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4447 before returning.
4448
de979965
PA
44492015-11-30 Pedro Alves <palves@redhat.com>
4450
4451 * server.c (handle_v_requests): Handle vCtrlC.
4452
34c65914
PA
44532015-11-30 Pedro Alves <palves@redhat.com>
4454
4455 * gdbthread.h (find_any_thread_of_pid): Declare.
4456 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4457 functions.
4458 * server.c (handle_query): If current_thread is NULL, look for
4459 another thread of the selected process.
4460
79efa585 44612015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4462 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4463
4464 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4465 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4466 name in reply.
4467 * target.h (struct target_ops) <thread_name>: New field.
4468 (target_thread_name): New macro.
4469
80d82c19
JB
44702015-11-23 Joel Brobecker <brobecker@adacore.com>
4471
4472 * regcache.h (regcache_invalidate_pid): Add declaration.
4473 * regcache.c (regcache_invalidate_pid): New function, extracted
4474 from regcache_invalidate.
4475 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4476 Add trivial documentation comment.
4477 * lynx-low.c: Use regcache_invalidate_pid instead of
4478 regcache_invalidate.
4479
64da5dd5
JB
44802015-11-23 Joel Brobecker <brobecker@adacore.com>
4481
4482 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4483 and Elf64_auxv_t if the target is Android.
4484
37ce4055
DE
44852015-11-22 Doug Evans <xdje42@gmail.com>
4486
4487 * target.h: #include <sys/types.h>.
4488
06e03fff
PA
44892015-11-19 Pedro Alves <palves@redhat.com>
4490
4491 * linux-low.c (linux_process_qsupported): Change prototype.
4492 Adjust.
4493 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4494 Change prototype.
4495 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4496 and adjust to loop over all features.
4497 * server.c (handle_query) <qSupported>: Adjust to call
4498 target_process_qsupported once, passing it a vector of unprocessed
4499 features.
4500 * target.h (struct target_ops) <process_qsupported>: Change
4501 prototype.
4502 (target_process_qsupported): Adjust.
4503
9a084706
PA
45042015-11-19 Pedro Alves <palves@redhat.com>
4505
4506 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4507 mode.
4508 * configure: Regenerate.
4509
dad44a1f
PA
45102015-11-19 Pedro Alves <palves@redhat.com>
4511
4512 * configure: Regenerate.
4513
231c0592
YQ
45142015-11-19 Yao Qi <yao.qi@linaro.org>
4515
4516 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4517 type to uint32_t.
4518
6c1c9a8b
YQ
45192015-11-19 Yao Qi <yao.qi@linaro.org>
4520
4521 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4522 (struct aarch64_operand): Move enum out.
4523
9caa3311
YQ
45242015-11-19 Yao Qi <yao.qi@linaro.org>
4525
4526 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4527 struct user_fpsimd_state *.
4528 (aarch64_store_fpregset): Likewise.
4529
6a69a054
YQ
45302015-11-19 Yao Qi <yao.qi@linaro.org>
4531
4532 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4533 struct user_pt_regs *.
4534 (aarch64_store_gregset): Likewise.
4535
1798301e
PA
45362015-11-18 Pedro Alves <palves@redhat.com>
4537
4538 * Makefile.in (all_object_files): Add $IPA_OBJS.
4539
ce7715e2
PA
45402015-11-17 Pedro Alves <palves@redhat.com>
4541
4542 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4543 GDB_SIGNAL_0 and gdb_signal_to_string.
4544
c0879059
PA
45452015-11-17 Pedro Alves <palves@redhat.com>
4546
4547 * win32-low.c (handle_output_debug_string): Remove parameter.
4548 (win32_kill): Remove our_status local and adjust call to
4549 handle_output_debug_string.
4550 (get_child_debug_event): Adjust call to
4551 handle_output_debug_string.
4552
1996e237
SM
45532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4554
4555 * linux-mips-low.c (mips_fill_gregset): Add cast.
4556 (mips_store_gregset): Likewise.
4557 (mips_fill_fpregset): Likewise.
4558 (mips_store_fpregset): Likewise.
4559
cbec665b
SM
45602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4561
4562 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4563 priv.
4564
eb3e3c67
SM
45652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4566
4567 * linux-mips-low.c (mips_linux_new_thread): Change type of
4568 watch_type to enum target_hw_bp_type.
4569
171de4b8
SM
45702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4571
4572 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4573 Change return type to arm_hwbp_type.
4574
04248ead
SM
45752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4576
4577 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4578 (arm_store_gregset): Likewise.
4579 * linux-arm-low.c (arm_get_hwcap): Likewise.
4580 (arm_read_description): Likewise.
4581
04b3479c
SM
45822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4583
4584 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4585
2bc84e8a
SM
45862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4587
4588 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4589 (ppc_fill_vsxregset): Likewise.
4590 (ppc_store_vsxregset): Likewise.
4591 (ppc_fill_vrregset): Likewise.
4592 (ppc_store_vrregset): Likewise.
4593 (ppc_fill_evrregset): Likewise.
4594 (ppc_store_evrregset): Likewise.
4595
e6c5bb05
SM
45962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4597
4598 * linux-ppc-low.c (ppc_usrregs_info): Remove
4599 forward-declaration.
4600 (ppc_arch_setup): Move lower in file.
4601
7ea45d72
SM
46022015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4603
4604 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4605 (ps_pdwrite): Likewise.
4606
69291610
HW
46072015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4608
4609 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4610 to after assert checks.
4611
b42945fd
SM
46122015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4613
4614 * proc-service.c (ps_pdread): Add/adjust casts.
4615 (ps_pdwrite): Add/adjust casts.
4616
d6f85c84
SM
46172015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4618
4619 * server.c (handle_search_memory_1): Cast return value of
4620 memmem.
4621
f98cd059
SM
46222015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4623
4624 * server.c (write_qxfer_response): Change type of data to
4625 gdb_byte *.
4626
d2412fa5
PA
46272015-10-29 Pedro Alves <palves@redhat.com>
4628
4629 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4630
c17414a2
PA
46312015-10-29 Pedro Alves <palves@redhat.com>
4632
4633 * tracepoint.c (clear_installed_tracepoints): Add casts.
4634
e053fbc4
PA
46352015-10-29 Pedro Alves <palves@redhat.com>
4636
4637 * server.c (handle_v_cont, process_serial_event): Add enum
4638 gdb_signal casts to signal parsing code.
4639
add67df8
PA
46402015-10-29 Pedro Alves <palves@redhat.com>
4641
4642 * linux-low.h (NULL_REGSET): Define.
4643 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4644 * linux-arm-low.c (arm_regsets): Likewise.
4645 * linux-crisv32-low.c (cris_regsets): Likewise.
4646 * linux-m68k-low.c (m68k_regsets): Likewise.
4647 * linux-mips-low.c (mips_regsets): Likewise.
4648 * linux-nios2-low.c (nios2_regsets): Likewise.
4649 * linux-ppc-low.c (ppc_regsets): Likewise.
4650 * linux-s390-low.c (s390_regsets): Likewise.
4651 * linux-sh-low.c (sh_regsets): Likewise.
4652 * linux-sparc-low.c (sparc_regsets): Likewise.
4653 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4654 * linux-tile-low.c (tile_regsets): Likewise.
4655 * linux-x86-low.c (x86_regsets): Likewise.
4656 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4657
50bc912a
PA
46582015-10-29 Pedro Alves <palves@redhat.com>
4659
4660 * linux-low.h (NULL_REGSET): Define.
4661 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4662 * linux-arm-low.c (arm_regsets): Likewise.
4663 * linux-crisv32-low.c (cris_regsets): Likewise.
4664 * linux-m68k-low.c (m68k_regsets): Likewise.
4665 * linux-mips-low.c (mips_regsets): Likewise.
4666 * linux-nios2-low.c (nios2_regsets): Likewise.
4667 * linux-ppc-low.c (ppc_regsets): Likewise.
4668 * linux-s390-low.c (s390_regsets): Likewise.
4669 * linux-sh-low.c (sh_regsets): Likewise.
4670 * linux-sparc-low.c (sparc_regsets): Likewise.
4671 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4672 * linux-tile-low.c (tile_regsets): Likewise.
4673 * linux-x86-low.c (x86_regsets): Likewise.
4674 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4675
682b2546
DE
46762015-10-26 Doug Evans <dje@google.com>
4677
4678 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4679
963843d4
DE
46802015-10-26 Doug Evans <dje@google.com>
4681
4682 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4683
d41401ac
DE
46842015-10-26 Doug Evans <dje@google.com>
4685
4686 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4687 for debug_printf.
4688 (attach_thread, find_new_threads_callback): Ditto.
4689
3db28855
AT
46902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4691
4692 * mem-break.h (set_breakpoint_data): Remove.
4693
fb78e89c
AT
46942015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4695
4696 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4697 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4698 (initialize_low): Remove set_breakpoint_data call.
4699 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4700 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4701 (initialize_low): Remove set_breakpoint_data call.
4702 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4703 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4704 (initialize_low): Remove set_breakpoint_data call.
4705
2e6ee069
AT
47062015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4707
4708 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4709 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4710 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4711 * target.h (target_breakpoint_kind_from_pc): New macro.
4712
1652a986
AT
47132015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4714
4715 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4716 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4717 the default breakpoint kind.
4718
abeead09
AT
47192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4720
4721 * linux-arm-low.c (arm_supports_z_point_type): Add software
4722 breakpoint support.
4723
b0b4b501
AT
47242015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4725
4726 * linux-arm-low.c: Refactor breakpoint definitions.
4727 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4728 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4729
8689682c
AT
47302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4731
4732 * Makefile.in: Add arm.c/o.
4733 * configure.srv: Likewise.
4734 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4735 (arm_breakpoint_kind_from_pc): New function.
4736 (arm_sw_breakpoint_from_kind): Return proper kind.
4737 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4738
27165294
AT
47392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4740
4741 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4742 removal.
4743 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4744 (struct raw_breakpoint) <size>: Remove.
4745 (struct raw_breakpoint) <kind>: Add.
4746 (bp_size): New function.
4747 (bp_opcode): Likewise.
4748 (find_raw_breakpoint_at): Adjust for kind.
4749 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4750 (remove_memory_breakpoint): Adjust for kind call bp_size.
4751 (set_raw_breakpoint_at): Adjust for kind.
4752 (set_breakpoint): Likewise.
4753 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4754 (delete_raw_breakpoint): Adjust for kind.
4755 (delete_breakpoint): Likewise.
4756 (find_gdb_breakpoint): Likewise.
4757 (set_gdb_breakpoint_1): Likewise.
4758 (set_gdb_breakpoint): Likewise.
4759 (delete_gdb_breakpoint_1): Likewise.
4760 (delete_gdb_breakpoint): Likewise.
4761 (uninsert_raw_breakpoint): Likewise.
4762 (reinsert_raw_breakpoint): Likewise.
4763 (set_breakpoint_data): Remove.
4764 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4765 (check_mem_read): Adjust for kind call bp_size.
4766 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4767 (clone_one_breakpoint): Adjust for kind.
4768 * mem-break.h (set_gdb_breakpoint): Likewise.
4769 (delete_gdb_breakpoint): Likewise.
4770 * server.c (process_serial_event): Likewise.
4771
dd373349
AT
47722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4773
4774 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4775 (struct linux_target_ops) <breakpoint>: Remove.
4776 (struct linux_target_ops) <breakpoint_len>: Remove.
4777 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4778 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4779 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4780 (arm_sw_breakpoint_from_kind): New function.
4781 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4782 (struct linux_target_ops) <breakpoint>: Remove.
4783 (struct linux_target_ops) <breakpoint_len>: Remove.
4784 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4785 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4786 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4787 (struct linux_target_ops) <breakpoint>: Remove.
4788 (struct linux_target_ops) <breakpoint_len>: Remove.
4789 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4790 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4791 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4792 (struct linux_target_ops) <breakpoint>: Remove.
4793 (struct linux_target_ops) <breakpoint_len>: Remove.
4794 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4795 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4796 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4797 and sw_breakpoint_from_kind to increment the pc.
4798 (linux_breakpoint_kind_from_pc): New function.
4799 (linux_sw_breakpoint_from_kind): New function.
4800 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4801 (initialize_low): Call breakpoint_kind_from_pc and
4802 sw_breakpoint_from_kind to replace breakpoint_data/len.
4803 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4804 New field.
4805 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4806 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4807 (struct linux_target_ops) <breakpoint>: Remove.
4808 (struct linux_target_ops) <breakpoint_len>: Remove.
4809 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4810 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4811 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4812 (struct linux_target_ops) <breakpoint>: Remove.
4813 (struct linux_target_ops) <breakpoint_len>: Remove.
4814 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4815 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4816 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4817 (struct linux_target_ops) <breakpoint>: Remove.
4818 (struct linux_target_ops) <breakpoint_len>: Remove.
4819 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4820 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4821 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4822 (struct linux_target_ops) <breakpoint>: Remove.
4823 (struct linux_target_ops) <breakpoint_len>: Remove.
4824 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4825 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4826 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4827 (struct linux_target_ops) <breakpoint>: Remove.
4828 (struct linux_target_ops) <breakpoint_len>: Remove.
4829 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4830 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4831 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4832 (struct linux_target_ops) <breakpoint>: Remove.
4833 (struct linux_target_ops) <breakpoint_len>: Remove.
4834 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4835 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4836 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4837 (struct linux_target_ops) <breakpoint>: Remove.
4838 (struct linux_target_ops) <breakpoint_len>: Remove.
4839 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4840 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4841 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4842 (struct linux_target_ops) <breakpoint>: Remove.
4843 (struct linux_target_ops) <breakpoint_len>: Remove.
4844 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4845 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4846 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4847 (struct linux_target_ops) <breakpoint>: Remove.
4848 (struct linux_target_ops) <breakpoint_len>: Remove.
4849 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4850 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4851 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4852 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4853 (struct linux_target_ops) <breakpoint>: Remove.
4854 (struct linux_target_ops) <breakpoint_len>: Remove.
4855 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4856 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4857 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4858 (struct linux_target_ops) <breakpoint>: Remove.
4859 (struct linux_target_ops) <breakpoint_len>: Remove.
4860 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4861 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4862
4cd98a19
AT
48632015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4864
4865 * linux-cris-low.c (cris_get_pc): Remove void arg.
4866
774ee6d2
AR
48672015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4868
4869 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4870 variable name.
4871
833dcd29
AR
48722015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4873
4874 * inferiors.c (thread_pid_matches_callback): New function.
4875 (find_thread_process): New function.
4876 (remove_thread): Reset current_thread.
4877 (remove_process): Assert threads have been removed first.
4878
8d689ee5
YQ
48792015-10-15 Yao Qi <yao.qi@linaro.org>
4880
4881 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4882 if it is 3.
4883 (aarch64_remove_point): Likewise.
4884 * regcache.c (regcache_register_size): New function.
4885
1c2e1515
YQ
48862015-10-12 Yao Qi <yao.qi@linaro.org>
4887
4888 * linux-aarch64-low.c: Update all callers as emit_load_store
4889 is renamed to aarch64_emit_load_store.
4890
e1c587c3
YQ
48912015-10-12 Yao Qi <yao.qi@linaro.org>
4892
4893 * linux-aarch64-low.c: Update all callers of function renaming
4894 from emit_insn to aarch64_emit_insn.
4895
b6542f81
YQ
48962015-10-12 Yao Qi <yao.qi@linaro.org>
4897
4898 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4899 arch/aarch64-insn.h.
4900 (struct aarch64_memory_operand): Likewise.
4901 (ENCODE): Likewise.
4902 (emit_insn): Move to arch/aarch64-insn.c.
4903 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4904 (emit_load_store): Move to arch/aarch64-insn.c.
4905 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4906 (can_encode_int32): Remove.
4907
246994ce
YQ
49082015-10-12 Yao Qi <yao.qi@linaro.org>
4909
4910 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4911 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4912 (aarch64_relocate_instruction): Likewise.
4913 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4914 (struct aarch64_insn_visitor): Likewise.
4915
0badd99f
YQ
49162015-10-12 Yao Qi <yao.qi@linaro.org>
4917
4918 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4919 (struct aarch64_insn_visitor): New.
4920 (struct aarch64_insn_relocation_data): New.
4921 (aarch64_ftrace_insn_reloc_b): New function.
4922 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4923 (aarch64_ftrace_insn_reloc_cb): Likewise.
4924 (aarch64_ftrace_insn_reloc_tb): Likewise.
4925 (aarch64_ftrace_insn_reloc_adr): Likewise.
4926 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4927 (aarch64_ftrace_insn_reloc_others): Likewise.
4928 (visitor): New.
4929 (aarch64_relocate_instruction): Use visitor.
4930
dfaffe9d
YQ
49312015-10-12 Yao Qi <yao.qi@linaro.org>
4932
4933 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4934 int. Add argument buf.
4935 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4936 aarch64_relocate_instruction.
4937
70b439f0
YQ
49382015-10-12 Yao Qi <yao.qi@linaro.org>
4939
4940 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4941 argument insn. Remove local variable insn. Don't call
4942 target_read_uint32.
4943 (aarch64_install_fast_tracepoint_jump_pad): Call
4944 target_read_uint32.
4945
7781c06f
YQ
49462015-09-30 Yao Qi <yao.qi@linaro.org>
4947
4948 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4949 (emit_load_store_pair): Likewise.
4950
9a3c8263
SM
49512015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4952
4953 * dll.c (match_dll): Add cast(s).
4954 (unloaded_dll): Likewise.
4955 * linux-low.c (second_thread_of_pid_p): Likewise.
4956 (delete_lwp_callback): Likewise.
4957 (count_events_callback): Likewise.
4958 (select_event_lwp_callback): Likewise.
4959 (linux_set_resume_request): Likewise.
4960 * server.c (accumulate_file_name_length): Likewise.
4961 (emit_dll_description): Likewise.
4962 (handle_qxfer_threads_worker): Likewise.
4963 (visit_actioned_threads): Likewise.
4964 * thread-db.c (any_thread_of): Likewise.
4965 * tracepoint.c (same_process_p): Likewise.
4966 (match_blocktype): Likewise.
4967 (build_traceframe_info_xml): Likewise.
4968
224c3ddb
SM
49692015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4970
4971 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4972 assignment.
4973 (gdb_unparse_agent_expr): Likewise.
4974 * hostio.c (require_data): Likewise.
4975 (handle_pread): Likewise.
4976 * linux-low.c (disable_regset): Likewise.
4977 (fetch_register): Likewise.
4978 (store_register): Likewise.
4979 (get_dynamic): Likewise.
4980 (linux_qxfer_libraries_svr4): Likewise.
4981 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4982 (set_fast_tracepoint_jump): Likewise.
4983 (uninsert_fast_tracepoint_jumps_at): Likewise.
4984 (reinsert_fast_tracepoint_jumps_at): Likewise.
4985 (validate_inserted_breakpoint): Likewise.
4986 (clone_agent_expr): Likewise.
4987 * regcache.c (init_register_cache): Likewise.
4988 * remote-utils.c (putpkt_binary_1): Likewise.
4989 (decode_M_packet): Likewise.
4990 (decode_X_packet): Likewise.
4991 (look_up_one_symbol): Likewise.
4992 (relocate_instruction): Likewise.
4993 (monitor_output): Likewise.
4994 * server.c (handle_search_memory): Likewise.
4995 (handle_qxfer_exec_file): Likewise.
4996 (handle_qxfer_libraries): Likewise.
4997 (handle_qxfer): Likewise.
4998 (handle_query): Likewise.
4999 (handle_v_cont): Likewise.
5000 (handle_v_run): Likewise.
5001 (captured_main): Likewise.
5002 * target.c (write_inferior_memory): Likewise.
5003 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5004 * tracepoint.c (init_trace_buffer): Likewise.
5005 (add_tracepoint_action): Likewise.
5006 (add_traceframe): Likewise.
5007 (add_traceframe_block): Likewise.
5008 (cmd_qtdpsrc): Likewise.
5009 (cmd_qtdv): Likewise.
5010 (cmd_qtstatus): Likewise.
5011 (response_source): Likewise.
5012 (response_tsv): Likewise.
5013 (cmd_qtnotes): Likewise.
5014 (gdb_collect): Likewise.
5015 (initialize_tracepoint): Likewise.
5016
afbe19f8
PL
50172015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5018
5019 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5020 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5021 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5022 <NOP>: New.
5023 (enum aarch64_condition_codes): New enum.
5024 (w0): New static global.
5025 (fp): Likewise.
5026 (lr): Likewise.
5027 (struct aarch64_memory_operand) <type>: New
5028 MEMORY_OPERAND_POSTINDEX type.
5029 (postindex_memory_operand): New helper function.
5030 (emit_ret): New function.
5031 (emit_load_store_pair): New function, factored out of emit_stp
5032 with support for MEMORY_OPERAND_POSTINDEX.
5033 (emit_stp): Rewrite using emit_load_store_pair.
5034 (emit_ldp): New function.
5035 (emit_load_store): Likewise.
5036 (emit_ldr): Mention post-index instruction in comment.
5037 (emit_ldrh): New function.
5038 (emit_ldrb): New function.
5039 (emit_ldrsw): Mention post-index instruction in comment.
5040 (emit_str): Likewise.
5041 (emit_subs): New function.
5042 (emit_cmp): Likewise.
5043 (emit_and): Likewise.
5044 (emit_orr): Likewise.
5045 (emit_orn): Likewise.
5046 (emit_eor): Likewise.
5047 (emit_mvn): Likewise.
5048 (emit_lslv): Likewise.
5049 (emit_lsrv): Likewise.
5050 (emit_asrv): Likewise.
5051 (emit_mul): Likewise.
5052 (emit_sbfm): Likewise.
5053 (emit_sbfx): Likewise.
5054 (emit_ubfm): Likewise.
5055 (emit_ubfx): Likewise.
5056 (emit_csinc): Likewise.
5057 (emit_cset): Likewise.
5058 (emit_nop): Likewise.
5059 (emit_ops_insns): New helper function.
5060 (emit_pop): Likewise.
5061 (emit_push): Likewise.
5062 (aarch64_emit_prologue): New function.
5063 (aarch64_emit_epilogue): Likewise.
5064 (aarch64_emit_add): Likewise.
5065 (aarch64_emit_sub): Likewise.
5066 (aarch64_emit_mul): Likewise.
5067 (aarch64_emit_lsh): Likewise.
5068 (aarch64_emit_rsh_signed): Likewise.
5069 (aarch64_emit_rsh_unsigned): Likewise.
5070 (aarch64_emit_ext): Likewise.
5071 (aarch64_emit_log_not): Likewise.
5072 (aarch64_emit_bit_and): Likewise.
5073 (aarch64_emit_bit_or): Likewise.
5074 (aarch64_emit_bit_xor): Likewise.
5075 (aarch64_emit_bit_not): Likewise.
5076 (aarch64_emit_equal): Likewise.
5077 (aarch64_emit_less_signed): Likewise.
5078 (aarch64_emit_less_unsigned): Likewise.
5079 (aarch64_emit_ref): Likewise.
5080 (aarch64_emit_if_goto): Likewise.
5081 (aarch64_emit_goto): Likewise.
5082 (aarch64_write_goto_address): Likewise.
5083 (aarch64_emit_const): Likewise.
5084 (aarch64_emit_call): Likewise.
5085 (aarch64_emit_reg): Likewise.
5086 (aarch64_emit_pop): Likewise.
5087 (aarch64_emit_stack_flush): Likewise.
5088 (aarch64_emit_zero_ext): Likewise.
5089 (aarch64_emit_swap): Likewise.
5090 (aarch64_emit_stack_adjust): Likewise.
5091 (aarch64_emit_int_call_1): Likewise.
5092 (aarch64_emit_void_call_2): Likewise.
5093 (aarch64_emit_eq_goto): Likewise.
5094 (aarch64_emit_ne_goto): Likewise.
5095 (aarch64_emit_lt_goto): Likewise.
5096 (aarch64_emit_le_goto): Likewise.
5097 (aarch64_emit_gt_goto): Likewise.
5098 (aarch64_emit_ge_got): Likewise.
5099 (aarch64_emit_ops_impl): New static global variable.
5100 (aarch64_emit_ops): New target function, return
5101 &aarch64_emit_ops_impl.
5102 (struct linux_target_ops): Install it.
5103
bb903df0
PL
51042015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5105
5106 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5107 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5108 aarch64-ipa.o.
5109 * linux-aarch64-ipa.c: New file.
5110 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5111 and endian.h.
5112 (aarch64_get_thread_area): New target method.
5113 (extract_signed_bitfield): New helper function.
5114 (aarch64_decode_ldr_literal): New function.
5115 (enum aarch64_opcodes): New enum.
5116 (struct aarch64_register): New struct.
5117 (struct aarch64_operand): New struct.
5118 (x0): New static global.
5119 (x1): Likewise.
5120 (x2): Likewise.
5121 (x3): Likewise.
5122 (x4): Likewise.
5123 (w2): Likewise.
5124 (ip0): Likewise.
5125 (sp): Likewise.
5126 (xzr): Likewise.
5127 (aarch64_register): New helper function.
5128 (register_operand): Likewise.
5129 (immediate_operand): Likewise.
5130 (struct aarch64_memory_operand): New struct.
5131 (offset_memory_operand): New helper function.
5132 (preindex_memory_operand): Likewise.
5133 (enum aarch64_system_control_registers): New enum.
5134 (ENCODE): New macro.
5135 (emit_insn): New helper function.
5136 (emit_b): New function.
5137 (emit_bcond): Likewise.
5138 (emit_cb): Likewise.
5139 (emit_tb): Likewise.
5140 (emit_blr): Likewise.
5141 (emit_stp): Likewise.
5142 (emit_ldp_q_offset): Likewise.
5143 (emit_stp_q_offset): Likewise.
5144 (emit_load_store): Likewise.
5145 (emit_ldr): Likewise.
5146 (emit_ldrsw): Likewise.
5147 (emit_str): Likewise.
5148 (emit_ldaxr): Likewise.
5149 (emit_stxr): Likewise.
5150 (emit_stlr): Likewise.
5151 (emit_data_processing_reg): Likewise.
5152 (emit_data_processing): Likewise.
5153 (emit_add): Likewise.
5154 (emit_sub): Likewise.
5155 (emit_mov): Likewise.
5156 (emit_movk): Likewise.
5157 (emit_mov_addr): Likewise.
5158 (emit_mrs): Likewise.
5159 (emit_msr): Likewise.
5160 (emit_sevl): Likewise.
5161 (emit_wfe): Likewise.
5162 (append_insns): Likewise.
5163 (can_encode_int32_in): New helper function.
5164 (aarch64_relocate_instruction): New function.
5165 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5166 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5167 (struct linux_target_ops): Install aarch64_get_thread_area,
5168 aarch64_install_fast_tracepoint_jump_pad and
5169 aarch64_get_min_fast_tracepoint_insn_len.
5170
787749ea
PL
51712015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5172
5173 * Makefile.in (aarch64-insn.o): New rule.
5174 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5175
9812b2e6
YQ
51762015-09-21 Yao Qi <yao.qi@linaro.org>
5177
5178 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5179
18fe412b
YQ
51802015-09-21 Yao Qi <yao.qi@linaro.org>
5181
5182 * tracepoint.c (max_jump_pad_size): Remove.
5183
a0cc84cd
YQ
51842015-09-18 Yao Qi <yao.qi@linaro.org>
5185
5186 * linux-aarch64-low.c: Don't include sys/uio.h.
5187 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5188
d78908cf
WW
51892015-09-16 Wei-cheng Wang <cole945@gmail.com>
5190
5191 * tracepoint.c (eval_result_type): Change prototype.
5192 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5193
d57e0d50
PA
51942015-09-15 Pedro Alves <palves@redhat.com>
5195
5196 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5197 Check whether to report exec events instead of checking whether
5198 multiprocess is enabled.
5199
5a676acc
PA
52002015-09-15 Pedro Alves <palves@redhat.com>
5201
5202 PR remote/18965
5203 * remote-utils.c (prepare_resume_reply): Merge
5204 TARGET_WAITKIND_VFORK_DONE switch case with the
5205 TARGET_WAITKIND_FORKED case.
5206
7c5d0fad
YQ
52072015-09-15 Yao Qi <yao.qi@linaro.org>
5208
5209 * server.c (handle_query): Check string comparison using
5210 "else if" instead of "if".
5211
750ce8d1
YQ
52122015-09-15 Yao Qi <yao.qi@linaro.org>
5213
5214 * server.c (vCont_supported): New global variable.
5215 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5216 matches. Append ";vContSupported+" to own_buf.
5217 (handle_v_requests): Append ";s;S" to own_buf if target supports
5218 hardware single step or vCont_supported is false.
5219 (capture_main): Set vCont_supported to zero.
5220
70b90b91
YQ
52212015-09-15 Yao Qi <yao.qi@linaro.org>
5222
5223 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5224 it to ...
5225 (linux_supports_hardware_single_step): ... New function.
5226 (linux_target_ops): Update.
5227 * lynx-low.c (lynx_target_ops): Set field
5228 supports_hardware_single_step to target_can_do_hardware_single_step.
5229 * nto-low.c (nto_target_ops): Likewise.
5230 * spu-low.c (spu_target_ops): Likewise.
5231 * win32-low.c (win32_target_ops): Likewise.
5232 * target.c (target_can_do_hardware_single_step): New function.
5233 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5234 Remove. <supports_hardware_single_step>: New field.
5235 (target_supports_conditional_breakpoints): Remove.
5236 (target_supports_hardware_single_step): New macro.
5237 (target_can_do_hardware_single_step): Declare.
5238 * server.c (handle_query): Use target_supports_hardware_single_step
5239 instead of target_supports_conditional_breakpoints.
5240
ade90bde
YQ
52412015-09-15 Yao Qi <yao.qi@linaro.org>
5242
5243 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5244 function.
5245 (struct linux_target_ops the_low_target): Install
5246 aarch64_linux_siginfo_fixup.
5247
94585166
DB
52482015-09-11 Don Breazeal <donb@codesourcery.com>
5249 Luis Machado <lgustavo@codesourcery.com>
5250
5251 * linux-low.c (linux_mourn): Static declaration.
5252 (linux_arch_setup): Move in front of
5253 handle_extended_wait.
5254 (linux_arch_setup_thread): New function.
5255 (handle_extended_wait): Handle exec events. Call
5256 linux_arch_setup_thread. Make event_lwp argument a
5257 pointer-to-a-pointer.
5258 (check_zombie_leaders): Do not check stopped threads.
5259 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5260 (linux_low_filter_event): Add lwp and thread for exec'ing
5261 non-leader thread if leader thread has been deleted.
5262 Refactor code into linux_arch_setup_thread and call it.
5263 Pass child lwp pointer by reference to handle_extended_wait.
5264 (linux_wait_for_event_filtered): Update comment.
5265 (linux_wait_1): Prevent clobbering exec event status.
5266 (linux_supports_exec_events): New function.
5267 (linux_target_ops) <supports_exec_events>: Initialize new member.
5268 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5269 new member.
5270 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5271 * server.c (report_exec_events): New global variable.
5272 (handle_query): Handle qSupported query for exec-events feature.
5273 (captured_main): Initialize report_exec_events.
5274 * server.h (report_exec_events): Declare new global variable.
5275 * target.h (struct target_ops) <supports_exec_events>: New
5276 member.
5277 (target_supports_exec_events): New macro.
5278 * win32-low.c (win32_target_ops) <supports_exec_events>:
5279 Initialize new member.
5280
0568462b
MM
52812015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5282
5283 * linux-low.c (linux_low_enable_btrace): Remove.
5284 (linux_target_ops): Replace linux_low_enable_btrace with
5285 linux_enable_btrace.
5286
39edd165
YQ
52872015-09-03 Yao Qi <yao.qi@linaro.org>
5288
5289 * linux-aarch64-low.c (aarch64_insert_point): Call
5290 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5291 returns true.
5292
1db33b5a
UW
52932015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5294
5295 * linux-low.c (check_stopped_by_breakpoint): Use
5296 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5297
ab290430
PA
52982015-08-27 Pedro Alves <palves@redhat.com>
5299
5300 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5301
8d749320
SM
53022015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5303
6711b7f8
SM
5304 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5305 the XNEW-family equivalent.
8d749320
SM
5306 (compile_bytecodes): Likewise.
5307 * dll.c (loaded_dll): Likewise.
5308 * event-loop.c (append_callback_event): Likewise.
5309 (create_file_handler): Likewise.
5310 (create_file_event): Likewise.
5311 * hostio.c (handle_open): Likewise.
5312 * inferiors.c (add_thread): Likewise.
5313 (add_process): Likewise.
5314 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5315 * linux-arm-low.c (arm_new_process): Likewise.
5316 (arm_new_thread): Likewise.
5317 * linux-low.c (add_to_pid_list): Likewise.
5318 (linux_add_process): Likewise.
5319 (handle_extended_wait): Likewise.
5320 (add_lwp): Likewise.
5321 (enqueue_one_deferred_signal): Likewise.
5322 (enqueue_pending_signal): Likewise.
5323 (linux_resume_one_lwp_throw): Likewise.
5324 (linux_resume_one_thread): Likewise.
5325 (linux_read_memory): Likewise.
5326 (linux_write_memory): Likewise.
5327 * linux-mips-low.c (mips_linux_new_process): Likewise.
5328 (mips_linux_new_thread): Likewise.
5329 (mips_add_watchpoint): Likewise.
5330 * linux-x86-low.c (initialize_low_arch): Likewise.
5331 * lynx-low.c (lynx_add_process): Likewise.
5332 * mem-break.c (set_raw_breakpoint_at): Likewise.
5333 (set_breakpoint): Likewise.
5334 (add_condition_to_breakpoint): Likewise.
5335 (add_commands_to_breakpoint): Likewise.
5336 (clone_agent_expr): Likewise.
5337 (clone_one_breakpoint): Likewise.
5338 * regcache.c (new_register_cache): Likewise.
5339 * remote-utils.c (look_up_one_symbol): Likewise.
5340 * server.c (queue_stop_reply): Likewise.
5341 (start_inferior): Likewise.
5342 (queue_stop_reply_callback): Likewise.
5343 (handle_target_event): Likewise.
5344 * spu-low.c (fetch_ppc_memory): Likewise.
5345 (store_ppc_memory): Likewise.
5346 * target.c (set_target_ops): Likewise.
5347 * thread-db.c (thread_db_load_search): Likewise.
5348 (try_thread_db_load_1): Likewise.
5349 * tracepoint.c (add_tracepoint): Likewise.
5350 (add_tracepoint_action): Likewise.
5351 (create_trace_state_variable): Likewise.
5352 (cmd_qtdpsrc): Likewise.
5353 (cmd_qtro): Likewise.
5354 (add_while_stepping_state): Likewise.
5355 * win32-low.c (child_add_thread): Likewise.
5356 (get_image_name): Likewise.
5357
ed8b7b42
YQ
53582015-08-25 Yao Qi <yao.qi@linaro.org>
5359
5360 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5361
db3cb7cb
YQ
53622015-08-25 Yao Qi <yao.qi@linaro.org>
5363
5364 * Makefile.in (aarch64-linux.o): New rule.
5365 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5366 srv_tgtobj.
5367 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5368 (aarch64_init_debug_reg_state): Make it extern.
5369 (aarch64_linux_prepare_to_resume): Remove.
5370
f6011a1c
YQ
53712015-08-25 Yao Qi <yao.qi@linaro.org>
5372
5373 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5374 lwp_arch_private_info and ptid_of_lwp.
5375
88e2cf7e
YQ
53762015-08-25 Yao Qi <yao.qi@linaro.org>
5377
5378 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5379 Find proc_info by find_process_pid. All callers updated.
5380
5e35436e
YQ
53812015-08-25 Yao Qi <yao.qi@linaro.org>
5382
5383 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5384 Remove.
5385 (debug_reg_change_callback): Remove.
5386 (aarch64_notify_debug_reg_change): Remove.
5387
4a8a7965
YQ
53882015-08-25 Yao Qi <yao.qi@linaro.org>
5389
5390 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5391 Call current_lwp_ptid.
5392
32a271ee
YQ
53932015-08-25 Yao Qi <yao.qi@linaro.org>
5394
5395 * linux-aarch64-low.c (debug_reg_change_callback): Use
5396 debug_printf.
5397
0d51c8d7
YQ
53982015-08-25 Yao Qi <yao.qi@linaro.org>
5399
5400 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5401
31a43dd5
YQ
54022015-08-25 Yao Qi <yao.qi@linaro.org>
5403
5404 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5405
8ee52567
YQ
54062015-08-25 Yao Qi <yao.qi@linaro.org>
5407
5408 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5409 the code.
5410
ff3f0f45
YQ
54112015-08-25 Yao Qi <yao.qi@linaro.org>
5412
5413 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5414 Remove.
5415 (debug_reg_change_callback): Remove argument entry and add argument
5416 lwp. Remove local variable thread. Don't print thread id in the
5417 debugging output. Don't check whether pid of thread equals to pid.
5418 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5419 iterate_over_lwps instead find_inferior.
5420
3d40fbb5
PA
54212015-08-24 Pedro Alves <palves@redhat.com>
5422
5423 * inferiors.c (get_first_process): New function.
5424 * inferiors.h (get_first_process): New declaration.
5425 * remote-utils.c (read_ptid): Default to the first process in the
5426 list, instead of to the current thread's process.
5427
438e1e42
PA
54282015-08-24 Pedro Alves <palves@redhat.com>
5429
5430 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5431 * event-loop.c: Likewise.
5432 * remote-utils.c: Likewise.
5433 * tracepoint.c: Likewise.
5434
a8c6d4fc
PA
54352015-08-24 Pedro Alves <palves@redhat.com>
5436
5437 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5438 ptid_get_lwp.
5439
99b0bb12
PA
54402015-08-21 Pedro Alves <palves@redhat.com>
5441
5442 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5443 instead of literal 1.
5444
f8904751
PA
54452015-08-21 Pedro Alves <palves@redhat.com>
5446
5447 * tdesc.c (default_description): Explicitly zero-initialize.
5448
465a859e
PA
54492015-08-21 Pedro Alves <palves@redhat.com>
5450
5451 PR gdb/18749
5452 * inferiors.c (remove_thread): Discard any pending stop reply for
5453 this thread.
5454 * server.c (remove_all_on_match_pid): Rename to ...
5455 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5456 instead of a pid.
5457 (discard_queued_stop_replies): Change parameter to a ptid. Now
5458 extern.
5459 (handle_v_kill, kill_inferior_callback, captured_main)
5460 (process_serial_event): Adjust.
5461 * server.h (discard_queued_stop_replies): Declare.
5462
f0db101d
PA
54632015-08-21 Pedro Alves <palves@redhat.com>
5464
5465 * linux-low.c (wait_for_sigstop): Always switch to no thread
5466 selected if the previously current thread dies.
5467 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5468 process instead of the current thread's.
5469 * remote-utils.c (input_interrupt): Don't check if there's no
5470 current thread.
5471 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5472 current thread to the general thread fails, error out.
5473 (handle_qxfer_auxv, handle_qxfer_libraries)
5474 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5475 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5476 (handle_query): Check if there's a thread selected instead of
5477 checking whether there's any thread in the thread list.
5478 (handle_qxfer_threads, handle_qxfer_btrace)
5479 (handle_qxfer_btrace_conf): Don't error out early if there's no
5480 thread in the thread list.
5481 (handle_v_cont, myresume): Don't set the current thread to the
5482 continue thread.
5483 (process_serial_event) <Hg handling>: Also set thread_id if the
5484 previous general thread is still alive.
5485 (process_serial_event) <g/G handling>: If setting the current
5486 thread to the general thread fails, error out.
5487 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5488 thread's lwp instead of the current thread's.
5489 * target.c (set_desired_thread): If the desired thread was not
5490 found, leave the current thread pointing to NULL. Return an int
5491 (boolean) indicating success.
5492 * target.h (set_desired_thread): Change return type to int.
5493
40045d91
MF
54942015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5495
5496 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5497 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5498 #includes.
5499 (ps_get_thread_area): New function.
5500
45face3b
GB
55012015-08-19 Gary Benson <gbenson@redhat.com>
5502
5503 * hostio.c (handle_pread): Do not attempt to read more data
5504 than hostio_reply_with_data can fit in a packet.
5505
16d5f642
JB
55062015-08-18 Joel Brobecker <brobecker@adacore.com>
5507
5508 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5509
a738da3a
MF
55102015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5511
5512 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5513
33ebda9d
PA
55142015-08-06 Pedro Alves <palves@redhat.com>
5515
5516 * tracepoint.c (expr_eval_result): Now an int.
5517
a44892be
PA
55182015-08-06 Pedro Alves <palves@redhat.com>
5519
5520 * gdbthread.h (struct regcache): Forward declare.
5521 (struct thread_info) <regcache_data>: Now a struct regcache
5522 pointer.
5523 * inferiors.c (inferior_regcache_data)
5524 (set_inferior_regcache_data): Now work with struct regcache
5525 pointers.
5526 * inferiors.h (struct regcache): Forward declare.
5527 (inferior_regcache_data, set_inferior_regcache_data): Now work
5528 with struct regcache pointers.
5529 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5530 (free_register_cache_thread): Remove struct regcache pointer
5531 casts.
5532
608a1e46
PA
55332015-08-06 Pedro Alves <palves@redhat.com>
5534
5535 * server.c (captured_main): On error, print the exception message
5536 to stderr, and if run_once is set, throw a quit.
5537
f0ce0d3a
PA
55382015-08-06 Pedro Alves <palves@redhat.com>
5539
5540 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5541 the current thread.
5542
bf47e248
PA
55432015-08-06 Pedro Alves <palves@redhat.com>
5544
5545 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5546 reading beyond the passed in buffer length.
5547
b6b9ffcc
PL
55482015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5549
5550 * tracepoint.c (symbol_list) <required>: Remove.
5551
863d01bd
PA
55522015-08-06 Pedro Alves <palves@redhat.com>
5553
5554 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5555 count if stopping and suspending threads.
5556 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5557 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5558 (linux_detach): Complete an ongoing step-over.
5559 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5560 throughout.
5561 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5562 (linux_wait_1): If passing a signal to the inferior after
5563 finishing a step-over, unsuspend and re-resume all lwps. If we
5564 see a single-step event but the thread should be continuing, don't
5565 pass the trap to gdb.
5566 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5567 internal_error instead of gdb_assert.
5568 (enqueue_pending_signal): New function.
5569 (check_ptrace_stopped_lwp_gone): Add debug output.
5570 (start_step_over): Use internal_error instead of gdb_assert.
5571 (complete_ongoing_step_over): New function.
5572 (linux_resume_one_thread): Don't resume a suspended thread.
5573 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5574 it stepping.
5575
00db26fa
PA
55762015-08-06 Pedro Alves <palves@redhat.com>
5577
5578 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5579 (linux_thread_alive): Use lwp_is_marked_dead.
5580 (extended_event_reported): Delete.
5581 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5582 instead of extended_event_reported.
5583 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5584 as well.
5585 (lwp_is_marked_dead): New function.
5586 (lwp_running): Use lwp_is_marked_dead.
5587 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5588 comment.
5589
ad071a30
PA
55902015-08-06 Pedro Alves <palves@redhat.com>
5591
5592 * linux-low.c (linux_wait_1): Move fork event output out of the
5593 !report_to_gdb check. Pass event_child->waitstatus to
5594 target_waitstatus_to_string instead of ourstatus.
5595
524b57e6
YQ
55962015-08-04 Yao Qi <yao.qi@linaro.org>
5597
5598 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5599 if current_thread is 32 bit.
5600
6085d6f6
YQ
56012015-08-04 Yao Qi <yao.qi@linaro.org>
5602
5603 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5604 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5605 * server.c (extended_protocol): Remove "static".
5606 * server.h (extended_protocol): Declare it.
5607
8a7e4587
YQ
56082015-08-04 Yao Qi <yao.qi@linaro.org>
5609
5610 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5611 both aarch64 and aarch32.
5612 (aarch64_set_pc): Likewise.
5613
3b53ae99
YQ
56142015-08-04 Yao Qi <yao.qi@linaro.org>
5615
5616 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5617 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5618 arm-with-neon.xml to srv_xmlfiles.
5619 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5620 (is_64bit_tdesc): New function.
5621 (aarch64_linux_read_description): New function.
5622 (aarch64_arch_setup): Call aarch64_linux_read_description.
5623 (regs_info): Rename to regs_info_aarch64.
5624 (aarch64_regs_info): Return right regs_info.
5625 (initialize_low_arch): Call initialize_low_arch_aarch32.
5626
bd9e6534
YQ
56272015-08-04 Yao Qi <yao.qi@linaro.org>
5628
5629 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5630 * linux-aarch32-low.c: New file.
5631 * linux-aarch32-low.h: New file.
5632 * linux-arm-low.c (arm_fill_gregset): Move it to
5633 linux-aarch32-low.c.
5634 (arm_store_gregset): Likewise.
5635 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5636 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5637 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5638 (regs_info): Rename to regs_info_arm.
5639 (arm_regs_info): Return regs_info_aarch32 if
5640 have_ptrace_getregset is 1 and target description is
5641 arm_with_neon or arm_with_vfpv3.
5642 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5643 Call initialize_low_arch_aarch32 instead.
5644
ded48a5e
YQ
56452015-08-04 Yao Qi <yao.qi@linaro.org>
5646
5647 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5648 * linux-low.c: ... here.
5649 * linux-low.h (have_ptrace_getregset): Declare it.
5650
96e9210f
PA
56512015-08-04 Pedro Alves <palves@redhat.com>
5652
5653 * thread-db.c (struct thread_db): Use new typedefs.
5654 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5655 CHK calls.
5656 (disable_thread_event_reporting): Cast result of dlsym to
5657 destination function pointer type.
5658 (thread_db_mourn): Use td_ta_delete_ftype.
5659
af60a1ef
SL
56602015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5661
5662 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5663 arch variant.
5664 (CDX_BREAKPOINT): Define for R2.
5665 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5666 (the_low_target): Add comments.
5667
e8b41681
YQ
56682015-07-30 Yao Qi <yao.qi@linaro.org>
5669
5670 * linux-arm-low.c (arm_hwcap): Remove it.
5671 (arm_read_description): New local variable arm_hwcap. Don't
5672 set arm_hwcap to zero.
5673
89abb039
YQ
56742015-07-30 Yao Qi <yao.qi@linaro.org>
5675
5676 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5677 Use regcache->tdesc instead.
5678 (arm_store_wmmxregset): Likewise.
5679 (arm_fill_vfpregset): Likewise.
5680 (arm_store_vfpregset): Likewise.
5681
deca266c
YQ
56822015-07-30 Yao Qi <yao.qi@linaro.org>
5683
5684 * linux-arm-low.c: Include arch/arm.h.
5685 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5686 (arm_store_gregset): Likewise.
5687
aa58a496
SM
56882015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5689
5690 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5691 ptrace's 4th parameter.
5692
50904b25
YQ
56932015-07-27 Yao Qi <yao.qi@linaro.org>
5694
5695 * configure.srv (case aarch64*-*-linux*): Don't set
5696 srv_linux_usrregs.
5697
5826e159
PA
56982015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5699
5700 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5701 sys/ptrace.h.
5702 * linux-arm-low.c: Likewise.
5703 * linux-cris-low.c: Likewise.
5704 * linux-crisv32-low.c: Likewise.
5705 * linux-low.c: Likewise.
5706 * linux-m68k-low.c: Likewise.
5707 * linux-mips-low.c: Likewise.
5708 * linux-nios2-low.c: Likewise.
5709 * linux-s390-low.c: Likewise.
5710 * linux-sparc-low.c: Likewise.
5711 * linux-tic6x-low.c: Likewise.
5712 * linux-tile-low.c: Likewise.
5713 * linux-x86-low.c: Likewise.
5714
54019719
PA
57152015-07-24 Pedro Alves <palves@redhat.com>
5716
5717 * config.in: Regenerate.
5718 * configure: Regenerate.
5719
eb7aa561
PA
57202015-07-24 Pedro Alves <palves@redhat.com>
5721
5722 * acinclude.m4: Include ../ptrace.m4.
5723 * configure.ac: Call GDB_AC_PTRACE.
5724 * config.in, configure: Regenerate.
5725
55d7b841
YQ
57262015-07-24 Yao Qi <yao.qi@linaro.org>
5727
5728 * linux-low.c (linux_create_inferior): Remove setting to
5729 proc->priv->new_inferior.
5730 (linux_attach): Likewise.
5731 (linux_low_filter_event): Likewise.
5732 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5733
c06cbd92
YQ
57342015-07-24 Yao Qi <yao.qi@linaro.org>
5735
5736 * linux-low.c (linux_arch_setup): New function.
5737 (linux_low_filter_event): If proc->tdesc is NULL and
5738 proc->attached is true, call the_low_target.arch_setup.
5739 Otherwise, keep status pending, and return.
5740 (linux_resume_one_lwp_throw): Don't call get_pc if
5741 thread->while_stepping isn't NULL. Don't call
5742 get_thread_regcache if proc->tdesc is NULL.
5743 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5744 (linux_target_ops): Install arch_setup.
5745 * server.c (start_inferior): Call the_target->arch_setup.
5746 * target.h (struct target_ops) <arch_setup>: New field.
5747 (target_arch_setup): New marco.
5748 * lynx-low.c (lynx_target_ops): Update.
5749 * nto-low.c (nto_target_ops): Update.
5750 * spu-low.c (spu_target_ops): Update.
5751 * win32-low.c (win32_target_ops): Update.
5752
5ae3ebba
YQ
57532015-07-24 Yao Qi <yao.qi@linaro.org>
5754
5755 * linux-low.c (linux_add_process): Don't set
5756 proc->priv->new_inferior.
5757 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5758 (linux_attach): Likewise.
5759
eb97750b
YQ
57602015-07-24 Yao Qi <yao.qi@linaro.org>
5761
5762 * server.c (start_inferior): Code refactor.
5763
51aee833
YQ
57642015-07-24 Yao Qi <yao.qi@linaro.org>
5765
5766 * server.c (process_serial_event): Set general_thread.
5767
af1b22f3
YQ
57682015-07-21 Yao Qi <yao.qi@linaro.org>
5769
5770 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5771 aarch64_linux_get_debug_reg_capacity.
5772
554717a3
YQ
57732015-07-17 Yao Qi <yao.qi@linaro.org>
5774
5775 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5776 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5777 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5778 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5779 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5780 (AARCH64_HWP_ALIGNMENT): Likewise.
5781 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5782 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5783 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5784 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5785 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5786 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5787 (struct aarch64_debug_reg_state): Likewise.
5788 (struct arch_lwp_info): Likewise.
5789 (aarch64_align_watchpoint): Likewise.
5790 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5791 (aarch64_watchpoint_length): Likewise.
5792 (aarch64_point_encode_ctrl_reg): Likewise
5793 (aarch64_point_is_aligned): Likewise.
5794 (aarch64_align_watchpoint): Likewise.
5795 (aarch64_linux_set_debug_regs):
5796 (aarch64_dr_state_insert_one_point): Likewise.
5797 (aarch64_dr_state_remove_one_point): Likewise.
5798 (aarch64_handle_breakpoint): Likewise.
5799 (aarch64_handle_aligned_watchpoint): Likewise.
5800 (aarch64_handle_unaligned_watchpoint): Likewise.
5801 (aarch64_handle_watchpoint): Likewise.
5802
c67ca4de
YQ
58032015-07-17 Yao Qi <yao.qi@linaro.org>
5804
5805 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5806 and don't aarch64_get_debug_reg_state. All callers update.
5807 (aarch64_handle_aligned_watchpoint): Likewise.
5808 (aarch64_handle_unaligned_watchpoint): Likewise.
5809 (aarch64_handle_watchpoint): Likewise.
5810 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5811 (aarch64_remove_point): Likewise.
5812
25abf979
YQ
58132015-07-17 Yao Qi <yao.qi@linaro.org>
5814
5815 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5816 debug_printf.
5817 (aarch64_handle_unaligned_watchpoint): Likewise.
5818
db1ff28b
JK
58192015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5820
5821 Revert the previous 3 commits:
5822 Move gdb_regex* to common/
5823 Move linux_find_memory_regions_full & co.
5824 gdbserver build-id attribute generator
5825
700ca40f
JK
58262015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5827 Jan Kratochvil <jan.kratochvil@redhat.com>
5828
5829 gdbserver build-id attribute generator.
5830 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5831 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5832 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5833 (find_phdr): New.
5834 (get_dynamic): Use find_pdhr to traverse program headers.
5835 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5836 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5837 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5838 (get_hex_build_id): New.
5839 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5840 to reply XML document.
5841
9904185c
JK
58422015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5843 Jan Kratochvil <jan.kratochvil@redhat.com>
5844
5845 * target.c: Include target/target-utils.h and fcntl.h.
5846 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5847 (target_fileio_read_stralloc): New functions.
5848
6e5b4429
JK
58492015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5850
5851 * Makefile.in (OBS): Add gdb_regex.o.
5852 (gdb_regex.o): New.
5853 * config.in: Rebuilt.
5854 * configure: Rebuilt.
5855
ddc98fbf
JK
58562015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5857 Jan Kratochvil <jan.kratochvil@redhat.com>
5858
5859 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5860 * Makefile.in (OBS): Add target-utils.o.
5861 (linux-maps.o, target-utils.o): New.
5862 * configure.srv (srv_linux_obj): Add linux-maps.o.
5863
e57bb7a0
PL
58642015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5865
5866 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5867 function, return 1.
5868 (the_low_target): Install it.
5869
586b02a9
PA
58702015-07-14 Pedro Alves <palves@redhat.com>
5871
5872 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5873 Instead, ignore ECHILD, and throw an error for other errnos.
5874
58c1b36c
PA
58752015-07-10 Pedro Alves <palves@redhat.com>
5876
5877 * event-loop.c (struct callback_event) <data>: Change type to
5878 gdb_client_data instance instead of gdb_client_data pointer.
5879 (append_callback_event): Adjust.
5880
421530db
PL
58812015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5882
5883 * linux-aarch64-low.c: Add comments for each linux_target_ops
5884 method. Remove comments already covered in target_ops and
5885 linux_target_ops definitions.
5886 (the_low_target): Add comments for each unimplemented method.
5887
c2d65f38
YQ
58882015-07-09 Yao Qi <yao.qi@linaro.org>
5889
5890 * linux-aarch64-low.c (aarch64_regmap): Remove.
5891 (aarch64_usrregs_info): Remove.
5892 (regs_info): Set field usrregs to NULL.
5893
b20a6524
MM
58942015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5895
5896 * linux-low.c: Include "rsp-low.h"
5897 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5898 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5899 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5900 (handle_btrace_enable_pt): New.
5901 (handle_btrace_general_set): Support "pt".
5902 (handle_btrace_conf_general_set): Support "pt:size".
5903
96c97461
PL
59042015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5905
5906 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5907 Z_PACKET_SW_BP.
5908
37d66942
PL
59092015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5910
5911 * linux-aarch64-low.c: Remove comment about endianness.
5912 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5913 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5914 memcmp.
5915
dc06243f
GB
59162015-06-24 Gary Benson <gbenson@redhat.com>
5917
5918 * linux-i386-ipa.c (stdint.h): Do not include.
5919 * lynx-i386-low.c (stdint.h): Likewise.
5920 * lynx-ppc-low.c (stdint.h): Likewise.
5921 * mem-break.c (stdint.h): Likewise.
5922 * thread-db.c (stdint.h): Likewise.
5923 * tracepoint.c (stdint.h): Likewise.
5924 * win32-low.c (stdint.h): Likewise.
5925
124e13d9
SM
59262015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5927
5928 * server.c (write_qxfer_response): Update call to
5929 remote_escape_output.
5930
909c2cda
JK
59312015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5932 Jan Kratochvil <jan.kratochvil@redhat.com>
5933
5934 Merge multiple hex conversions.
5935 * gdbreplay.c (tohex): Rename to 'fromhex'.
5936 (logchar): Use fromhex.
5937
24c05f46
JK
59382015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5939
5940 * server.c (handle_qxfer_libraries): Set `version' attribute for
5941 <library-list>.
5942
14d2069a
GB
59432015-06-10 Gary Benson <gbenson@redhat.com>
5944
5945 * target.h (struct target_ops) <multifs_open>: New field.
5946 <multifs_unlink>: Likewise.
5947 <multifs_readlink>: Likewise.
5948 * linux-low.c (nat/linux-namespaces.h): New include.
5949 (linux_target_ops): Initialize the_target->multifs_open,
5950 the_target->multifs_unlink and the_target->multifs_readlink.
5951 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5952 * hostio.c (hostio_fs_pid): New static variable.
5953 (hostio_handle_new_gdb_connection): New function.
5954 (handle_setfs): Likewise.
5955 (handle_open): Use the_target->multifs_open as appropriate.
5956 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5957 (handle_readlink): Use the_target->multifs_readlink as
5958 appropriate.
5959 (handle_vFile): Handle vFile:setfs packets.
5960 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5961 after target_handle_new_gdb_connection.
5962
4b8b5e72
GB
59632015-06-10 Gary Benson <gbenson@redhat.com>
5964
5965 * configure.ac (AC_CHECK_FUNCS): Add setns.
5966 * config.in: Regenerate.
5967 * configure: Likewise.
5968 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5969 (linux-namespaces.o): New rule.
5970 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5971
3ac2e371
GB
59722015-06-09 Gary Benson <gbenson@redhat.com>
5973
5974 * hostio.c (handle_open): Process mode argument with
5975 fileio_to_host_mode.
5976
ca9b78ce
YQ
59772015-06-01 Yao Qi <yao.qi@linaro.org>
5978
5979 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5980 * linux-x86-low.c: Likewise.
5981
bfacd19d
DB
59822015-05-28 Don Breazeal <donb@codesourcery.com>
5983
5984 * linux-low.c (handle_extended_wait): Initialize
5985 thread_info.last_resume_kind for new fork children.
5986
452003ef
PA
59872015-05-15 Pedro Alves <palves@redhat.com>
5988
5989 * target.h (target_handle_new_gdb_connection): Rewrite using if
5990 wrapped in do/while.
5991
1041a03c
JB
59922015-05-14 Joel Brobecker <brobecker@adacore.com>
5993
5994 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5995 * configure, config.in: Regenerate.
5996 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5997 Declare typedef.
5998
c269dbdb
DB
59992015-05-12 Don Breazeal <donb@codesourcery.com>
6000
6001 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6002 PTRACE_EVENT_VFORK_DONE.
6003 (linux_low_ptrace_options, extended_event_reported): Add vfork
6004 events.
6005 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6006 and "vforkdone" for RSP 'T' Stop Reply Packet.
6007 * server.h (report_vfork_events): Declare
6008 global variable.
6009
3a8a0396
DB
60102015-05-12 Don Breazeal <donb@codesourcery.com>
6011
6012 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6013 (the_low_target) <new_fork>: Initialize new member.
6014 * linux-arm-low.c (arm_new_fork): New function.
6015 (the_low_target) <new_fork>: Initialize new member.
6016 * linux-low.c (handle_extended_wait): Call new target function
6017 new_fork.
6018 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6019 * linux-mips-low.c (mips_add_watchpoint): New function
6020 extracted from mips_insert_point.
6021 (the_low_target) <new_fork>: Initialize new member.
6022 (mips_linux_new_fork): New function.
6023 (mips_insert_point): Call mips_add_watchpoint.
6024 * linux-x86-low.c (x86_linux_new_fork): New function.
6025 (the_low_target) <new_fork>: Initialize new member.
6026
de0d863e
DB
60272015-05-12 Don Breazeal <donb@codesourcery.com>
6028
6029 * linux-low.c (handle_extended_wait): Implement return value,
6030 rename argument 'event_child' to 'event_lwp', handle
6031 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6032 (linux_low_ptrace_options): New function.
6033 (linux_low_filter_event): Call linux_low_ptrace_options,
6034 use different argument fo linux_enable_event_reporting,
6035 use return value from handle_extended_wait.
6036 (extended_event_reported): New function.
6037 (linux_wait_1): Call extended_event_reported and set
6038 status to report fork events.
6039 (linux_write_memory): Add pid to debug message.
6040 (reset_lwp_ptrace_options_callback): New function.
6041 (linux_handle_new_gdb_connection): New function.
6042 (linux_target_ops): Initialize new structure member.
6043 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6044 * lynx-low.c: Initialize new structure member.
6045 * remote-utils.c (prepare_resume_reply): Implement stop reason
6046 "fork" for "T" stop message.
6047 * server.c (handle_query): Call handle_new_gdb_connection.
6048 * server.h (report_fork_events): Declare global flag.
6049 * target.h (struct target_ops) <handle_new_gdb_connection>:
6050 New member.
6051 (target_handle_new_gdb_connection): New macro.
6052 * win32-low.c: Initialize new structure member.
6053
ddcbc397
DB
60542015-05-12 Don Breazeal <donb@codesourcery.com>
6055
6056 * mem-break.c (APPEND_TO_LIST): Define macro.
6057 (clone_agent_expr): New function.
6058 (clone_one_breakpoint): New function.
6059 (clone_all_breakpoints): New function.
6060 * mem-break.h: Declare new functions.
6061
89245bc0
DB
60622015-05-12 Don Breazeal <donb@codesourcery.com>
6063
6064 * linux-low.c (linux_supports_fork_events): New function.
6065 (linux_supports_vfork_events): New function.
6066 (linux_target_ops): Initialize new structure members.
6067 (initialize_low): Call linux_check_ptrace_features.
6068 * lynx-low.c (lynx_target_ops): Initialize new structure
6069 members.
6070 * server.c (report_fork_events, report_vfork_events):
6071 New global flags.
6072 (handle_query): Add new features to qSupported packet and
6073 response.
6074 (captured_main): Initialize new global variables.
6075 * target.h (struct target_ops) <supports_fork_events>:
6076 New member.
6077 <supports_vfork_events>: New member.
6078 (target_supports_fork_events): New macro.
6079 (target_supports_vfork_events): New macro.
6080 * win32-low.c (win32_target_ops): Initialize new structure
6081 members.
6082
835205d0
GB
60832015-05-12 Gary Benson <gbenson@redhat.com>
6084
6085 * server.c (handle_qxfer_exec_file): Use current process
6086 if annex is empty.
6087
21e94bd9
SL
60882015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6089
6090 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6091 Remove HAVE_PTRACE_GETREGS conditionals.
6092 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6093 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6094
45614f15
YQ
60952015-05-08 Yao Qi <yao.qi@linaro.org>
6096
6097 * linux-low.c (linux_supports_conditional_breakpoints): New
6098 function.
6099 (linux_target_ops): Install new target method.
6100 * lynx-low.c (lynx_target_ops): Install NULL hook for
6101 supports_conditional_breakpoints.
6102 * nto-low.c (nto_target_ops): Likewise.
6103 * spu-low.c (spu_target_ops): Likewise.
6104 * win32-low.c (win32_target_ops): Likewise.
6105 * server.c (handle_query): Check
6106 target_supports_conditional_breakpoints.
6107 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6108 New field.
6109 (target_supports_conditional_breakpoints): New macro.
6110
80ad801e
PA
61112015-05-06 Pedro Alves <palves@redhat.com>
6112
6113 PR server/18081
6114 * server.c (start_inferior): If the process exits, mourn it.
6115
819843c7
GB
61162015-04-21 Gary Benson <gbenson@redhat.com>
6117
6118 * hostio.c (fileio_open_flags_to_host): Factored out to
6119 fileio_to_host_openflags in common/fileio.c. Single use
6120 updated.
6121
a2d5a9d7
MF
61222015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6123
6124 * linux-xtensa-low.c (xtensa_fill_gregset)
6125 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6126 XCHAL_HAVE_LOOP.
6127
deb44829
MF
61282015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6129
6130 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6131 (regs_info): Replace usrregs pointer with NULL.
6132
e57f1de3
GB
61332015-04-17 Gary Benson <gbenson@redhat.com>
6134
6135 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6136 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6137 * server.c (handle_qxfer_exec_file): New function.
6138 (qxfer_packets): Add exec-file entry.
6139 (handle_query): Report qXfer:exec-file:read as supported packet.
6140
62828379
RN
61412015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6142
6143 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6144
b88bb450
GB
61452015-04-09 Gary Benson <gbenson@redhat.com>
6146
6147 * hostio-errno.c (errno_to_fileio_error): Remove function.
6148 Update caller to use remote_fileio_to_fio_error.
6149
c8f4bfdd
YQ
61502015-04-09 Yao Qi <yao.qi@linaro.org>
6151
6152 * linux-low.c (linux_insert_point): Call
6153 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6154 (linux_remove_point): Call remove_memory_breakpoint if type is
6155 raw_bkpt_type_sw.
6156 * linux-x86-low.c (x86_insert_point): Don't call
6157 insert_memory_breakpoint.
6158 (x86_remove_point): Don't call remove_memory_breakpoint.
6159
41f98f02
PA
61602015-04-01 Pedro Alves <palves@redhat.com>
6161 Cleber Rosa <crosa@redhat.com>
6162
6163 * server.c (gdbserver_usage): Reorganize and extend the usage
6164 message.
6165
2bf6fb9d
PA
61662015-03-24 Pedro Alves <palves@redhat.com>
6167
6168 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6169 output. Also dump TRAP_TRACE.
6170 (linux_low_filter_event): In debug output, distinguish a
6171 resume_stop SIGSTOP from a delayed SIGSTOP.
6172
369f6daa
GB
61732015-03-24 Gary Benson <gbenson@redhat.com>
6174
6175 * linux-x86-low.c (x86_linux_new_thread): Moved to
6176 nat/x86-linux.c.
6177 (x86_linux_prepare_to_resume): Likewise.
6178
8e5d4070
GB
61792015-03-24 Gary Benson <gbenson@redhat.com>
6180
6181 * Makefile.in (x86-linux-dregs.o): New rule.
6182 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6183 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6184 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6185 (x86_linux_dr_get): Likewise.
6186 (x86_linux_dr_set): Likewise.
6187 (update_debug_registers_callback): Likewise.
6188 (x86_linux_dr_set_addr): Likewise.
6189 (x86_linux_dr_get_addr): Likewise.
6190 (x86_linux_dr_set_control): Likewise.
6191 (x86_linux_dr_get_control): Likewise.
6192 (x86_linux_dr_get_status): Likewise.
6193 (x86_linux_update_debug_registers): Likewise.
6194
2b95d440
GB
61952015-03-24 Gary Benson <gbenson@redhat.com>
6196
6197 * linux-x86-low.c (x86_linux_update_debug_registers):
6198 New function, factored out from...
6199 (x86_linux_prepare_to_resume): ...this.
6200
14b0bc68
GB
62012015-03-24 Gary Benson <gbenson@redhat.com>
6202
6203 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6204 (x86_linux_dr_set): Likewise.
6205 (update_debug_registers_callback): Likewise.
6206 (x86_linux_dr_set_addr): Likewise.
6207 (x86_linux_dr_get_addr): Likewise.
6208 (x86_linux_dr_set_control): Likewise.
6209 (x86_linux_dr_get_control): Likewise.
6210 (x86_linux_dr_get_status): Likewise.
6211 (x86_linux_prepare_to_resume): Likewise.
6212
5dfe6ca8
GB
62132015-03-24 Gary Benson <gbenson@redhat.com>
6214
6215 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6216 Use perror_with_name. Pass string through gettext.
6217 (x86_linux_dr_set): Likewise.
6218
d33472ad
GB
62192015-03-24 Gary Benson <gbenson@redhat.com>
6220
6221 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6222 (x86_linux_dr_set_addr): ...this.
6223 (x86_dr_low_get_addr): Rename to...
6224 (x86_linux_dr_get_addr): ...this.
6225 (x86_dr_low_set_control): Rename to...
6226 (x86_linux_dr_set_control): ...this.
6227 (x86_dr_low_get_control): Rename to...
6228 (x86_linux_dr_get_control): ...this.
6229 (x86_dr_low_get_status): Rename to...
6230 (x86_linux_dr_get_status): ...this.
6231 (x86_dr_low): Update with new function names.
6232
4b134ca1
GB
62332015-03-24 Gary Benson <gbenson@redhat.com>
6234
6235 * Makefile.in (x86-linux.o): New rule.
6236 * configure.srv: Add x86-linux.o to relevant targets.
6237 * linux-low.c (lwp_set_arch_private_info): New function.
6238 (lwp_arch_private_info): Likewise.
6239 * linux-x86-low.c: Include nat/x86-linux.h.
6240 (arch_lwp_info): Removed structure.
6241 (update_debug_registers_callback):
6242 Use lwp_set_debug_registers_changed.
6243 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6244 and lwp_set_debug_registers_changed.
6245 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6246
34c703da
GB
62472015-03-24 Gary Benson <gbenson@redhat.com>
6248
6249 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6250 * linux-arm-low.c (arm_new_thread): Likewise.
6251 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6252 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6253 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6254 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6255
cff068da
GB
62562015-03-24 Gary Benson <gbenson@redhat.com>
6257
6258 * linux-low.c (ptid_of_lwp): New function.
6259 (lwp_is_stopped): Likewise.
6260 (lwp_stop_reason): Likewise.
6261 * linux-x86-low.c (update_debug_registers_callback):
6262 Use lwp_is_stopped.
6263 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6264 lwp_stop_reason.
6265
b2f7c7e8
GB
62662015-03-24 Gary Benson <gbenson@redhat.com>
6267
6268 * linux-low.h (linux_stop_lwp): Remove declaration.
6269
6d4ee8c6
GB
62702015-03-24 Gary Benson <gbenson@redhat.com>
6271
6272 * linux-low.h: Include nat/linux-nat.h.
6273 * linux-low.c (iterate_over_lwps_args): New structure.
6274 (iterate_over_lwps_filter): New function.
6275 (iterate_over_lwps): Likewise.
6276 * linux-x86-low.c (update_debug_registers_callback):
6277 Update signature to what iterate_over_lwps expects.
6278 Remove PID check that iterate_over_lwps now performs.
6279 (x86_dr_low_set_addr): Use iterate_over_lwps.
6280 (x86_dr_low_set_control): Likewise.
6281
70a0bb6b
GB
62822015-03-24 Gary Benson <gbenson@redhat.com>
6283
6284 * linux-x86-low.c (x86_debug_reg_state): New function.
6285 (x86_linux_prepare_to_resume): Use the above.
6286
7b669087
GB
62872015-03-24 Gary Benson <gbenson@redhat.com>
6288
6289 * linux-low.c (current_lwp_ptid): New function.
6290 * linux-x86-low.c: Include nat/linux-nat.h.
6291 (x86_dr_low_get_addr): Use current_lwp_ptid.
6292 (x86_dr_low_get_control): Likewise.
6293 (x86_dr_low_get_status): Likewise.
6294
eef49a3d
PA
62952015-03-20 Pedro Alves <palves@redhat.com>
6296
6297 * tracepoint.c (cmd_qtstatus): Make "str" const.
6298
b2333d22
PA
62992015-03-20 Pedro Alves <palves@redhat.com>
6300
6301 * server.c (handle_general_set): Make "req_str" const.
6302
23f238d3
PA
63032015-03-19 Pedro Alves <palves@redhat.com>
6304
6305 * linux-low.c (linux_resume_one_lwp): Rename to ...
6306 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6307 instead call perror_with_name.
6308 (check_ptrace_stopped_lwp_gone): New function.
6309 (linux_resume_one_lwp): Reimplement as wrapper around
6310 linux_resume_one_lwp_throw that swallows errors if the LWP is
6311 gone.
6312
91baf43f
PA
63132015-03-19 Pedro Alves <palves@redhat.com>
6314
6315 * linux-low.c (count_events_callback, select_event_lwp_callback):
6316 No longer check whether the thread has resume_stop as last resume
6317 kind.
6318
8bf3b159
PA
63192015-03-19 Pedro Alves <palves@redhat.com>
6320
6321 * linux-low.c (count_events_callback, select_event_lwp_callback):
6322 Use the lwp's status_pending_p field, not the thread's.
6323
b90fc188
PA
63242015-03-19 Pedro Alves <palves@redhat.com>
6325
6326 * linux-low.c (select_event_lwp_callback): Update comments to
6327 no longer mention SIGTRAP.
6328
464b0089
GB
63292015-03-18 Gary Benson <gbenson@redhat.com>
6330
6331 * server.c (handle_query): Do not report vFile:fstat as supported.
6332
aa9e327f
GB
63332015-03-11 Gary Benson <gbenson@redhat.com>
6334
6335 * hostio.c (sys/types.h): New include.
6336 (sys/stat.h): Likewise.
6337 (common-remote-fileio.h): Likewise.
6338 (handle_fstat): New function.
6339 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6340
791c0056
GB
63412015-03-11 Gary Benson <gbenson@redhat.com>
6342
6343 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6344 struct stat.st_blocks and struct stat.st_blksize.
6345 * configure: Regenerate.
6346 * config.in: Likewise.
6347 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6348 (OBS): Add common-remote-fileio.o.
6349 (common-remote-fileio.o): New rule.
6350
9a9df970
PA
63512015-03-09 Pedro Alves <palves@redhat.com>
6352
6353 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6354 'struct sockaddr' pointer in 'accept' call.
6355
9eb1356e
PA
63562015-03-09 Pedro Alves <palves@redhat.com>
6357
6358 Revert:
6359 2015-03-07 Pedro Alves <palves@redhat.com>
6360 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6361 or <winsock2.h> here. Instead include "gdb_socket.h".
6362 (remote_open): Use union gdb_sockaddr_u.
6363 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6364 or <winsock2.h> here. Instead include "gdb_socket.h".
6365 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6366 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6367 or <sys/un.h>.
6368 (init_named_socket, gdb_agent_helper_thread): Use union
6369 gdb_sockaddr_u.
6370
aac331e4
PA
63712015-03-07 Pedro Alves <palves@redhat.com>
6372
6373 * configure.ac (build_warnings): Move
6374 -Wdeclaration-after-statement to the C-specific set.
6375 * configure: Regenerate.
6376
366c75fc
PA
63772015-03-07 Pedro Alves <palves@redhat.com>
6378
6379 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6380 or <winsock2.h> here. Instead include "gdb_socket.h".
6381 (remote_open): Use union gdb_sockaddr_u.
6382 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6383 or <winsock2.h> here. Instead include "gdb_socket.h".
6384 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6385 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6386 or <sys/un.h>.
6387 (init_named_socket, gdb_agent_helper_thread): Use union
6388 gdb_sockaddr_u.
6389
492d29ea
PA
63902015-03-07 Pedro Alves <palves@redhat.com>
6391
6392 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6393 instead.
6394
60a191ed
YQ
63952015-03-06 Yao Qi <yao.qi@linaro.org>
6396
6397 * linux-aarch64-low.c (aarch64_insert_point): Use
6398 show_debug_regs as a boolean.
6399 (aarch64_remove_point): Likewise.
6400
f5771b1d
PA
64012015-03-05 Pedro Alves <palves@redhat.com>
6402
6403 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6404 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6405 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6406 * nto-low.c (nto_target_ops): Likewise.
6407 * spu-low.c (spu_target_ops): Likewise.
6408 * win32-low.c (win32_target_ops): Likewise.
6409
3e572f71
PA
64102015-03-04 Pedro Alves <palves@redhat.com>
6411
72f4393d 6412 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6413 Decide whether a breakpoint triggered based on the SIGTRAP's
6414 siginfo.si_code.
72f4393d
L
6415 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6416 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6417 (linux_low_filter_event): Check for breakpoints before checking
6418 watchpoints.
6419 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6420 siginfo.si_code.
72f4393d
L
6421 (linux_stopped_by_sw_breakpoint)
6422 (linux_supports_stopped_by_sw_breakpoint)
6423 (linux_stopped_by_hw_breakpoint)
6424 (linux_supports_stopped_by_hw_breakpoint): New functions.
6425 (linux_target_ops): Install new target methods.
3e572f71 6426
1ec68e26
PA
64272015-03-04 Pedro Alves <palves@redhat.com>
6428
6429 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6430 * server.c (swbreak_feature, hwbreak_feature): New globals.
6431 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6432 (captured_main): Clear swbreak_feature and hwbreak_feature.
6433 * server.h (swbreak_feature, hwbreak_feature): Declare.
6434 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6435 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6436 supports_stopped_by_hw_breakpoint>: New fields.
6437 (target_supports_stopped_by_sw_breakpoint)
6438 (target_stopped_by_sw_breakpoint)
6439 (target_supports_stopped_by_hw_breakpoint)
6440 (target_stopped_by_hw_breakpoint): Declare.
6441
15c66dd6
PA
64422015-03-04 Pedro Alves <palves@redhat.com>
6443
6444 enum lwp_stop_reason -> enum target_stop_reason
6445 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6446 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6447 (linux_wait_1, stuck_in_jump_pad_callback)
6448 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6449 (linux_stopped_by_watchpoint):
6450 * linux-low.h (enum lwp_stop_reason): Delete.
6451 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6452 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6453
98fc70d6
YQ
64542015-03-04 Yao Qi <yao.qi@linaro.org>
6455
6456 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6457
dd2ac174
GB
64582015-03-03 Gary Benson <gbenson@redhat.com>
6459
6460 * hostio.c (handle_vFile): Fix prefix lengths.
6461
d68e53f4
MM
64622015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6463
6464 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6465 ptr_bits.
6466
bf2d68ab
AA
64672015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6468
6469 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6470 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6471 (clean): Add "rm -f" for above C files.
6472 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6473 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6474 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6475 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6476 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6477 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6478 (init_registers_s390x_vx_linux64)
6479 (init_registers_s390x_tevx_linux64)
6480 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6481 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6482 declarations.
6483 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6484 (s390_store_vxrs_high): New functions.
6485 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6486 NT_S390_VXRS_HIGH.
6487 (s390_arch_setup): Add logic for selecting one of the new target
6488 descriptions. Activate the new vector regsets if applicable.
6489 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6490 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6491 and init_registers_s390x_tevx_linux64.
6492
c966a859
PA
64932015-03-01 Pedro Alves <palves@redhat.com>
6494
6495 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6496 parameter.
6497
4180215b
PA
64982015-02-27 Pedro Alves <palves@redhat.com>
6499
6500 * linux-x86-low.c (u_debugreg_offset): New function.
6501 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6502
749bab01
PA
65032015-02-27 Pedro Alves <palves@redhat.com>
6504
6505 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6506 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6507 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6508 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6509 (ps_lsetfpregs, ps_getpid)
6510 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6511 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6512 (ps_lsetxregs, ps_plog): Declare.
6513
3c14e5a3
PA
65142015-02-27 Pedro Alves <palves@redhat.com>
6515
6516 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6517 IP_AGENT_EXPORT_FUNC.
6518 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6519 IP_AGENT_EXPORT_FUNC.
6520 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6521 (IP_AGENT_EXPORT): Delete.
6522 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6523 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6524 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6525 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6526 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6527 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6528 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6529 (traceframe_read_count, traceframe_write_count)
6530 (traceframes_created, trace_state_variables, get_raw_reg)
6531 (get_trace_state_variable_value, set_trace_state_variable_value)
6532 (ust_loaded, helper_thread_id, cmd_buf): Use
6533 IPA_SYM_EXPORTED_NAME.
6534 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6535 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6536 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6537 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6538 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6539 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6540 EXTERN_C_PUSH/EXTERN_C_POP.
6541 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6542 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6543 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6544 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6545 (traceframe_write_count, traceframe_read_count)
6546 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6547 (about_to_request_buffer_space, get_trace_state_variable_value)
6548 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6549 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6550 EXTERN_C_PUSH/EXTERN_C_POP.
6551 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6552 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6553 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6554 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6555 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6556 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6557 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6558 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6559 Define.
6560 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6561 (IP_AGENT_EXPORT_VAR_DECL): Define.
6562 (tracing): Declare.
6563 (gdb_agent_get_raw_reg): Declare.
6564
fe978cb0
PA
65652015-02-27 Tom Tromey <tromey@redhat.com>
6566 Pedro Alves <palves@redhat.com>
6567
6568 Rename symbols whose names are reserved C++ keywords throughout.
6569
3bc3d82a
PA
65702015-02-27 Pedro Alves <palves@redhat.com>
6571
6572 * Makefile.in (COMPILER): New, get it from autoconf.
6573 (CXX): Get from autoconf instead.
6574 (COMPILE.pre): Use COMPILER.
6575 (CC-LD): Rename to ...
6576 (CC_LD): ... this. Use COMPILER.
6577 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6578 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6579 * acinclude.m4: Include build-with-cxx.m4.
6580 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6581 Disable -Werror by default if building in C++ mode.
6582 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6583 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6584 the C++ compiler. Save/restore CXXFLAGS too.
6585 * configure: Regenerate.
6586
07697489
PA
65872015-02-27 Pedro Alves <palves@redhat.com>
6588
6589 * acinclude.m4: Include libiberty.m4.
6590 * configure.ac: Call libiberty_INIT.
6591 * config.in, configure: Regenerate.
6592
9beb7c4e
PA
65932015-02-26 Pedro Alves <palves@redhat.com>
6594
6595 * linux-low.c (linux_wait_1): When incrementing the PC past a
6596 program breakpoint always use the_low_target.breakpoint_len as
6597 increment, rather than the maximum between that and
6598 the_low_target.decr_pc_after_break.
6599
8090aef2
PA
66002015-02-23 Pedro Alves <palves@redhat.com>
6601
6602 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6603 thread was doing a step-over; always adjust the PC if
6604 we stepped over a permanent breakpoint.
6605 (linux_wait_1): If we stepped over breakpoint that was on top of a
6606 permanent breakpoint, manually advance the PC past it.
6607
bc9540e8
PA
66082015-02-23 Pedro Alves <palves@redhat.com>
6609
6610 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6611 modes.
6612 (x86_fill_gregset, x86_store_gregset): Use it when handling
6613 $orig_eax.
6614
2db9a427
PA
66152015-02-20 Pedro Alves <palves@redhat.com>
6616
6617 * thread-db.c: Include "nat/linux-procfs.h".
6618 (thread_db_init): Skip listing new threads if the kernel supports
6619 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6620
afa8d396
PA
66212015-02-20 Pedro Alves <palves@redhat.com>
6622
6623 * linux-low.c (status_pending_p_callback): Use ptid_match.
6624
c9587f88
AT
66252015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6626
6627 PR breakpoints/16812
6628 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6629 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6630 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6631
b05ec7a5
AT
66322015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6633
6634 PR breakpoints/15956
6635 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6636
d33501a5
MM
66372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6638
6639 * linux-low.c (linux_low_btrace_conf): Print size.
6640 * server.c (handle_btrace_conf_general_set): New.
6641 (hanle_general_set): Call handle_btrace_conf_general_set.
6642 (handle_query): Report Qbtrace-conf:bts:size as supported.
6643
f4abbc16
MM
66442015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6645
6646 * linux-low.c (linux_low_enable_btrace): Update parameters.
6647 (linux_low_btrace_conf): New.
6648 (linux_target_ops)<to_btrace_conf>: Initialize.
6649 * server.c (current_btrace_conf): New.
6650 (handle_btrace_enable): Rename to ...
6651 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6652 to target_enable_btrace. Update comment. Update users.
6653 (handle_qxfer_btrace_conf): New.
6654 (qxfer_packets): Add btrace-conf entry.
6655 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6656 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6657 (target_ops)<read_btrace_conf>: New.
6658 (target_enable_btrace): Update parameters.
6659 (target_read_btrace_conf): New.
6660
043c3577
MM
66612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6662
6663 * server.c (handle_btrace_general_set): Remove call to
6664 target_supports_btrace.
6665 (supported_btrace_packets): New.
6666 (handle_query): Call supported_btrace_packets.
6667 * target.h: include btrace-common.h.
6668 (btrace_target_info): Removed.
6669 (supports_btrace, target_supports_btrace): Update parameters.
6670
734b0e4b
MM
66712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6672
6673 * Makefile.in (SFILES): Add common/btrace-common.c.
6674 (OBS): Add common/btrace-common.o.
6675 (btrace-common.o): Add build rules.
6676 * linux-low: Include btrace-common.h.
6677 (linux_low_read_btrace): Use struct btrace_data. Call
6678 btrace_data_init and btrace_data_fini.
6679
d6c146e9
PA
66802015-02-06 Pedro Alves <palves@redhat.com>
6681
6682 * thread-db.c (find_new_threads_callback): Add debug output.
6683
20ba1ce6
PA
66842015-02-04 Pedro Alves <palves@redhat.com>
6685
6686 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6687 (resume_stopped_resumed_lwps): New function.
6688 (linux_wait_for_event_filtered): Use it.
6689
8cc73a39
SDJ
66902015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6691
6692 * Makefile.in (SFILES): Add linux-personality.c.
6693 (linux-personality.o): New rule.
6694 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6695 list of objects to be built.
6696 * linux-low.c: Include nat/linux-personality.h.
6697 (linux_create_inferior): Remove code to disable address space
6698 randomization (moved to ../nat/linux-personality.c). Create
6699 cleanup to disable address space randomization.
6700
fb23d554
SDJ
67012015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6702
6703 * Makefile.in (posix-strerror.o): New rule.
6704 (mingw-strerror.o): Likewise.
6705 * configure: Regenerated.
6706 * configure.ac: Source file ../common/common.host. Initialize new
6707 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6708
cdf43629
YQ
67092015-01-14 Yao Qi <yao@codesourcery.com>
6710
6711 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6712 (ppc-linux.o): New rule.
6713 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6714 * configure.ac: AC_CHECK_FUNCS(getauxval).
6715 * config.in: Re-generated.
6716 * configure: Re-generated.
6717 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6718 ppc64_64bit_inferior_p
6719
514c5338
YQ
67202015-01-14 Yao Qi <yao@codesourcery.com>
6721
6722 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6723 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6724 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6725 (PT_ORIG_R3, PT_TRAP): Likewise.
6726 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6727 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6728 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6729
3368c1e5
JB
67302015-01-10 Joel Brobecker <brobecker@adacore.com>
6731
6732 * i387-fp.c (i387_cache_to_xsave): In look over
6733 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6734 zmmh_low_space field by use of zmmh_high_space.
6735
582511be
PA
67362015-01-09 Pedro Alves <palves@redhat.com>
6737
6738 * linux-low.c (step_over_bkpt): Move higher up in the file.
6739 (handle_extended_wait): Don't store the stop_pc here.
6740 (get_stop_pc): Adjust comments and rename to ...
6741 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6742 stopped for a software breakpoint or hardware breakpoint.
6743 (thread_still_has_status_pending_p): New function.
6744 (status_pending_p_callback): Use
6745 thread_still_has_status_pending_p. If the event is no longer
6746 interesting, resume the LWP.
6747 (handle_tracepoints): Add assert.
6748 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6749 (wstatus_maybe_breakpoint): New function.
6750 (cancel_breakpoint): Delete function.
6751 (check_stopped_by_watchpoint): New function, factored out from
6752 linux_low_filter_event.
6753 (lp_status_maybe_breakpoint): Delete function.
6754 (linux_low_filter_event): Remove filter_ptid argument.
6755 Leave thread group exits pending here. Store the LWP's stop PC.
6756 Always leave events pending.
6757 (linux_wait_for_event_filtered): Pull all events out of the
6758 kernel, and leave them all pending.
6759 (count_events_callback, select_event_lwp_callback): Consider all
6760 events.
6761 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6762 (select_event_lwp): Only give preference to the stepping LWP in
6763 all-stop mode. Adjust comments.
6764 (ignore_event): New function.
6765 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6766 references to cancel_breakpoints. Adjust to renames. Also give
6767 equal priority to all LWPs that have had events in non-stop mode.
6768 If reporting a software breakpoint event, unadjust the LWP's PC.
6769 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6770 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6771 Adjust.
6772 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6773 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6774 (linux_stopped_by_watchpoint): Adjust.
6775 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6776 * linux-low.h (enum lwp_stop_reason): New.
6777 (struct lwp_info) <stop_pc>: Adjust comment.
6778 <stopped_by_watchpoint>: Delete field.
6779 <stop_reason>: New field.
6780 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6781 * mem-break.c (software_breakpoint_inserted_here)
6782 (hardware_breakpoint_inserted_here): New function.
6783 * mem-break.h (software_breakpoint_inserted_here)
6784 (hardware_breakpoint_inserted_here): Declare.
6785 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6786 (cancel_breakpoints): Delete.
6787 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6788 (upload_fast_traceframes): Remove references to
6789 cancel_breakpoints.
6790
a33e3959
PA
67912015-01-09 Pedro Alves <palves@redhat.com>
6792
6793 * thread-db.c (find_new_threads_callback): Ignore thread if the
6794 kernel thread ID is -1.
6795
8784d563
PA
67962015-01-09 Pedro Alves <palves@redhat.com>
6797
6798 * linux-low.c (linux_attach_fail_reason_string): Move to
6799 nat/linux-ptrace.c, and rename.
6800 (linux_attach_lwp): Update comment.
6801 (attach_proc_task_lwp_callback): New function.
6802 (linux_attach): Adjust to rename and use
6803 linux_proc_attach_tgid_threads.
6804 (linux_attach_fail_reason_string): Delete declaration.
6805
76f2b779
JB
68062015-01-01 Joel Brobecker <brobecker@adacore.com>
6807
6808 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6809 * server.c (gdbserver_version): Likewise.
6810
fafcc06a
SDJ
68112014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6812
6813 * remote-utils.c: Include ctype.h.
6814 (input_interrupt): Explicitly handle the case when the char
6815 received is the NUL byte. Improve the printing of non-ASCII
6816 characters.
6817
beed38b8
JB
68182014-12-16 Joel Brobecker <brobecker@adacore.com>
6819
6820 * linux-low.c (linux_low_filter_event): Update call to
6821 linux_enable_event_reporting following the addition of
6822 a new parameter to that function.
6823
bf330350
CU
68242014-12-16 Catalin Udma <catalin.udma@freescale.com>
6825
6826 PR server/17457
6827 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6828 (AARCH64_FPCR_REGNO): Likewise.
6829 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6830 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6831 (aarch64_store_fpregset): Likewise.
6832
5227d625
JB
68332014-12-15 Joel Brobecker <brobecker@adacore.com>
6834
6835 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6836 Remove FIXME comment about assumption about N.
6837
f93b65a0
JB
68382014-12-13 Joel Brobecker <brobecker@adacore.com>
6839
6840 * configure.ac: If large-file support is disabled in GDBserver,
6841 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6842 * configure: Regenerate.
6843
e5a9158d
AA
68442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6845
6846 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6847 warning upon ENODATA from ptrace.
6848 * linux-s390-low.c (s390_store_tdb): New.
6849 (s390_regsets): Add regset for NT_S390_TDB.
6850
feea5f36
AA
68512014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6852
6853 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6854 without a fill_function.
6855 * linux-s390-low.c (s390_fill_last_break): Remove.
6856 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6857 (s390_arch_setup): Use regset's size instead of fill_function for
6858 loop end condition.
6859
098dbe61
AA
68602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6861
6862 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6863 the regset's store function when ptrace returned an error.
6864 * regcache.c (get_thread_regcache): Invalidate register cache
6865 before fetching inferior's registers.
6866
28eef672
AA
68672014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6868
6869 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6870 while-loop as for-loop.
6871 (regsets_store_inferior_registers): Likewise.
6872
bdca27a2
YQ
68732014-11-28 Yao Qi <yao@codesourcery.com>
6874
6875 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6876 * config.in, configure: Re-generate.
6877 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6878 is defined.
6879
9c232dda
YQ
68802014-11-21 Yao Qi <yao@codesourcery.com>
6881
6882 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6883 (AC_CHECK_HEADERS): Remove malloc.h.
6884 * configure: Re-generated.
6885 * config.in: Re-generated.
6886 * server.h: Don't include alloca.h and malloc.h.
6887 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6888 Don't include malloc.h.
6889
43968415
JB
68902014-11-17 Joel Brobecker <brobecker@adacore.com>
6891
6892 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6893 corresponding ERRNO check in same block.
6894
40e91bc7
PA
68952014-11-12 Pedro Alves <palves@redhat.com>
6896
6897 * server.c (cont_thread): Update comment.
6898 (start_inferior, attach_inferior): No longer clear cont_thread.
6899 (handle_v_cont): No longer set cont_thread.
6900 (captured_main): Clear cont_thread each time a GDB connects.
6901
c2c118cf
PA
69022014-11-12 Pedro Alves <palves@redhat.com>
6903
6904 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6905 thread, and don't resume all threads if the Hc thread has exited.
6906
78708b7c
PA
69072014-11-12 Pedro Alves <palves@redhat.com>
6908
6909 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6910 the process group instead of to a specific LWP.
6911
a2abc7de
PA
69122014-10-15 Pedro Alves <palves@redhat.com>
6913
6914 PR server/17487
6915 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6916 parameter.
6917 (arm_set_thread_context): Delete.
6918 (the_low_target): Adjust.
6919 * win32-i386-low.c (debug_registers_changed)
6920 (debug_registers_used): Delete.
6921 (update_debug_registers_callback): New function.
6922 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6923 needing to update their debug registers.
6924 (win32_get_current_dr): New function.
6925 (x86_dr_low_get_addr, x86_dr_low_get_control)
6926 (x86_dr_low_get_status): Fetch the debug register from the thread
6927 record's context.
6928 (i386_initial_stuff): Adjust.
6929 (i386_get_thread_context): Remove current_event parameter. Don't
6930 clear debug_registers_changed nor copy DR values to
6931 debug_reg_state.
6932 (i386_set_thread_context): Delete.
6933 (i386_prepare_to_resume): New function.
6934 (i386_thread_added): Mark the thread as needing to update irs
6935 debug registers.
6936 (the_low_target): Remove i386_set_thread_context and install
6937 i386_prepare_to_resume.
6938 * win32-low.c (win32_get_thread_context): Adjust.
6939 (win32_set_thread_context): Use SetThreadContext
6940 directly.
6941 (win32_prepare_to_resume): New function.
6942 (win32_require_context): New function, factored out from ...
6943 (thread_rec): ... this.
6944 (continue_one_thread): Call win32_prepare_to_resume on each thread
6945 we're about to continue.
6946 (win32_resume): Call win32_prepare_to_resume on the event thread.
6947 * win32-low.h (struct win32_thread_info)
6948 <debug_registers_changed>: New field.
6949 (struct win32_target_ops): Change prototype of set_thread_context,
6950 delete set_thread_context and add prepare_to_resume.
6951 (win32_require_context): New declaration.
6952
a442d071
GB
69532014-10-08 Gary Benson <gbenson@redhat.com>
6954
6955 * server.h: Do not include common-exceptions.h.
6956
6f1947e8
GB
69572014-10-08 Gary Benson <gbenson@redhat.com>
6958
6959 * server.h: Do not include cleanups.h.
6960
63b434a4
JH
69612014-09-30 James Hogan <james.hogan@imgtec.com>
6962
6963 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6964 mips64-dsp-linux.c.
6965
c4d9ceb6
YQ
69662014-09-23 Yao Qi <yao@codesourcery.com>
6967
6968 * linux-low.c (lp_status_maybe_breakpoint): New function.
6969 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6970 (count_events_callback): Likewise.
6971 (select_event_lwp_callback): Likewise.
6972 (cancel_breakpoints_callback): Likewise.
6973
89a5711c
DB
69742014-09-19 Don Breazeal <donb@codesourcery.com>
6975
6976 * linux-low.c (handle_extended_wait): Call
6977 linux_ptrace_get_extended_event.
6978 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6979 linux_is_extended_waitstatus.
6980
bffc0964
JB
69812014-09-16 Joel Brobecker <brobecker@adacore.com>
6982
6983 * Makefile.in (CPPFLAGS): Define.
6984 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6985 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6986
0bfdf32f
GB
69872014-09-16 Gary Benson <gbenson@redhat.com>
6988
6989 * inferiors.h (current_inferior): Renamed as...
6990 (current_thread): New variable. All uses updated.
6991 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6992 (maybe_move_out_of_jump_pad): Likewise.
6993 (cancel_breakpoint): Likewise.
6994 (linux_low_filter_event): Likewise.
6995 (wait_for_sigstop): Likewise.
6996 (linux_resume_one_lwp): Likewise.
6997 (need_step_over_p): Likewise.
6998 (start_step_over): Likewise.
6999 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7000 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7001 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7002 and save_inferior as saved_thread.
7003 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7004 saved_thread.
7005 (regcache_invalidate_thread): Likewise.
7006 * remote-utils.c (prepare_resume_reply): Likewise.
7007 * thread-db.c (thread_db_get_tls_address): Likewise.
7008 (disable_thread_event_reporting): Likewise.
7009 (remove_thread_event_breakpoints): Likewise.
7010 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7011 as saved_thread.
7012 * target.h (set_desired_inferior): Renamed as...
7013 (set_desired_thread): New declaration. All uses updated.
7014 * server.c (myresume): Updated comment to reference thread instead
7015 of inferior.
7016 (handle_serial_event): Likewise.
7017 (handle_target_event): Likewise.
7018
361c8ade
GB
70192014-09-12 Tom Tromey <tromey@redhat.com>
7020 Gary Benson <gbenson@redhat.com>
7021
7022 * regcache.h: Include common-regcache.h.
7023 (regcache_read_pc): Don't declare.
7024 * regcache.c (get_thread_regcache_for_ptid): New function.
7025
bd9269f7
GB
70262014-09-11 Tom Tromey <tromey@redhat.com>
7027 Gary Benson <gbenson@redhat.com>
7028
7029 * symbol.c: New file.
7030 * Makefile.in (SFILES): Add symbol.c.
7031 (OBS): Add symbol.o.
7032
f8c1d06b
GB
70332014-09-11 Gary Benson <gbenson@redhat.com>
7034
7035 * target.c (target_stop_ptid, target_continue_ptid): New
7036 functions.
7037
721ec300
GB
70382014-09-11 Tom Tromey <tromey@redhat.com>
7039 Gary Benson <gbenson@redhat.com>
7040
7041 * target.h: Include target/target.h.
7042 * target.c (target_read_memory, target_read_uint32)
7043 (target_write_memory): New functions.
7044
c5e92cca
GB
70452014-09-11 Gary Benson <gbenson@redhat.com>
7046
7047 * server.h (debug_hw_points): Don't declare.
7048 * server.c (debug_hw_points): Don't define. Replace all uses
7049 with show_debug_regs.
7050 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7051 all uses with show_debug_regs.
7052
2e4bb98a
EBM
70532014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7054
7055 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7056 endianness into account.
7057 (ppc_supply_ptrace_register): Likewise.
7058
ac740bc7
JH
70592014-09-03 James Hogan <james.hogan@imgtec.com>
7060
7061 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7062 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7063
97ea6506
GB
70642014-09-03 Gary Benson <gbenson@redhat.com>
7065
7066 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7067 ALL_DEBUG_ADDRESS_REGISTERS.
7068
df7e5265
GB
70692014-09-02 Gary Benson <gbenson@redhat.com>
7070
7071 * i386-low.h: Renamed as...
7072 * x86-low.h: New file. All type, function and variable name
7073 prefixes changed from "i386_" to "x86_". All references updated.
7074 * i386-low.c: Renamed as...
7075 * x86-low.c: New file. All type, function and variable name
7076 prefixes changed from "i386_" to "x86_". All references updated.
7077
ed859da7
GB
70782014-09-02 Gary Benson <gbenson@redhat.com>
7079
7080 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7081 (x86_linux_new_thread): Likewise.
7082
860789c7
GB
70832014-08-29 Gary Benson <gbenson@redhat.com>
7084
7085 * server.h (setjmp.h): Do not include.
7086 (toplevel): Do not declare.
7087 (common-exceptions.h): Include.
7088 (cleanups.h): Likewise.
7089 * server.c (toplevel): Do not define.
7090 (exit_code): New static global.
7091 (detach_or_kill_for_exit_cleanup): New function.
7092 (main): New function. Original main renamed to...
7093 (captured_main): New function.
7094 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7095
ff55e1b5
GB
70962014-08-29 Gary Benson <gbenson@redhat.com>
7097
7098 * Makefile.in (SFILES): Add common/common-exceptions.c.
7099 (OBS): Add common-exceptions.o.
7100 (common-exceptions.o): New rule.
7101 * utils.c (prepare_to_throw_exception): New function.
7102
e9bcb658
GB
71032014-08-29 Gary Benson <gbenson@redhat.com>
7104
7105 * config.in: Regenerate.
7106 * configure: Likewise.
7107
e3180625
GB
71082014-08-29 Gary Benson <gbenson@redhat.com>
7109
7110 * Makefile.in (SFILES): Add common/cleanups.c.
7111 (OBS): cleanups.o.
7112 (cleanups.o): New rule.
7113
e3d6ba5d
GB
71142014-08-29 Gary Benson <gbenson@redhat.com>
7115
7116 * utils.c (internal_vwarning): New function.
7117
7096e886
GB
71182014-08-28 Gary Benson <gbenson@redhat.com>
7119
7120 * utils.h (fatal): Remove declaration.
7121 * utils.c (fatal): Remove function.
7122
14ce3192
GB
71232014-08-28 Gary Benson <gbenson@redhat.com>
7124
7125 * tracepoint.c (gdb_agent_init): Replace fatal with
7126 perror_with_name.
7127 (initialize_tracepoint): Likewise.
7128
50278d59
GB
71292014-08-28 Gary Benson <gbenson@redhat.com>
7130
7131 * remote-utils.c (remote_prepare): Replace fatal with error.
7132
aa96c426
GB
71332014-08-28 Gary Benson <gbenson@redhat.com>
7134
7135 * linux-low.c (linux_async): Replace fatal with warning.
7136 Tidy up and return.
7137 (linux_start_non_stop): Return -1 if linux_async failed.
7138
f7160e97
GB
71392014-08-28 Gary Benson <gbenson@redhat.com>
7140
7141 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7142 gdb_assert.
7143 (i386_dr_low_get_addr): Remove vague comment.
7144 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7145 gdb_assert.
7146
38e08fca
GB
71472014-08-28 Gary Benson <gbenson@redhat.com>
7148
7149 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7150 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7151 internal_error.
7152 (linux_resume_one_lwp): Likewise.
7153 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7154 gdb_assert.
7155 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7156 with internal_error.
7157 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7158 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7159 (find_register_by_name): Replace fatal with internal_error.
7160 (find_regno): Likewise.
7161 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7162 * thread-db.c (thread_db_create_event): Likewise.
7163 (thread_db_load_search): Likewise.
7164 (try_thread_db_load_1): Likewise.
7165 * tracepoint.c (get_jump_space_head): Replace fatal with
7166 internal_error.
7167 (claim_trampoline_space): Likewise.
7168 (have_fast_tracepoint_trampoline_buffer): Likewise.
7169 (cmd_qtstart): Likewise.
7170 (stop_tracing): Likewise.
7171 (fast_tracepoint_collecting): Likewise.
7172 (target_malloc): Likewise.
7173 (download_tracepoint): Likewise.
7174 (download_trace_state_variables): Replace check with gdb_assert.
7175 (upload_fast_traceframes): Replace fatal with internal_error.
7176
34abf635
GB
71772014-08-19 Tom Tromey <tromey@redhat.com>
7178 Gary Benson <gbenson@redhat.com>
7179
7180 * Makefile.in (SFILES): Add common/common-debug.c.
7181 (OBS): Add common-debug.o.
7182 (common-debug.o): New rule.
7183 * debug.h (debug_printf): Don't declare.
7184 * debug.c (debug_printf): Renamed and rewritten as...
7185 (debug_vprintf): New function.
7186
f6e94d78
GB
71872014-08-19 Gary Benson <gbenson@redhat.com>
7188
7189 * utils.h: Do not include print-utils.h.
7190
9239eeab
GB
71912014-08-19 Tom Tromey <tromey@redhat.com>
7192 Gary Benson <gbenson@redhat.com>
7193
7194 * server.h: Add static assertion.
7195 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7196
ef87c8bb
GB
71972014-08-19 Tom Tromey <tromey@redhat.com>
7198 Gary Benson <gbenson@redhat.com>
7199
7200 * Makefile.in (SFILES): Add common/errors.c.
7201 (OBS): Add errors.o.
7202 (IPA_OBS): Add errors-ipa.o.
7203 (errors.o): New rule.
7204 (errors-ipa.o): Likewise.
7205 * utils.h (perror_with_name, error, warning): Don't declare.
7206 * utils.c (warning): Renamed and rewritten as...
7207 (vwarning): New function.
7208 (error): Renamed and rewritten as...
7209 (verror): New function.
7210 (internal_error): Renamed and rewritten as...
7211 (internal_verror): New function.
7212
bb974a24
GB
72132014-08-07 Gary Benson <gbenson@redhat.com>
7214
7215 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7216 * configure: Regenerate.
7217 * config.in: Likewise.
7218 * server.h: Do not include errno.h.
7219 * event-loop.c: Likewise.
7220 * hostio-errno.c: Likewise.
7221 * linux-low.c: Likewise.
7222 * remote-utils.c: Likewise.
7223 * spu-low.c: Likewise.
7224 * utils.c: Likewise.
7225 * gdbreplay.c: Unconditionally include errno.h.
7226
6d3d12eb
GB
72272014-08-07 Gary Benson <gbenson@redhat.com>
7228
7229 * server.h: Do not include string.h.
7230 * event-loop.c: Likewise.
7231 * linux-low.c: Likewise.
7232 * regcache.c: Likewise.
7233 * remote-utils.c: Likewise.
7234 * spu-low.c: Likewise.
7235 * utils.c: Likewise.
7236
dccbb609
GB
72372014-08-07 Gary Benson <gbenson@redhat.com>
7238
7239 * server.h: Do not include gdb_assert.h.
7240
e76df0d0
GB
72412014-08-07 Gary Benson <gbenson@redhat.com>
7242
7243 * server.h: Do not include common-utils.h.
7244
4cb9c816
GB
72452014-08-07 Gary Benson <gbenson@redhat.com>
7246
7247 * server.h: Do not include ptid.h.
7248 * notif.h: Likewise.
7249
3995eeee
GB
72502014-08-07 Gary Benson <gbenson@redhat.com>
7251
7252 * server.h: Do not include gdb_locale.h.
7253
cb9f1a9b
GB
72542014-08-07 Gary Benson <gbenson@redhat.com>
7255
7256 * server.h: Do not include gdb/signals.h.
7257 * win32-low.c: Likewise.
7258
a5fceff8
GB
72592014-08-07 Gary Benson <gbenson@redhat.com>
7260
7261 * server.h: Do not include pathmax.h.
7262
b9391142
GB
72632014-08-07 Gary Benson <gbenson@redhat.com>
7264
7265 * server.h: Do not include libiberty.h.
7266 * linux-bfin-low.c: Likewise.
7267
0e443c87
GB
72682014-08-07 Gary Benson <gbenson@redhat.com>
7269
7270 * server.h: Do not include ansidecl.h.
7271
8ebb3f56
GB
72722014-08-07 Gary Benson <gbenson@redhat.com>
7273
7274 * linux-x86-low.c: Do not include stddef.h.
7275 * lynx-ppc-low.c: Likewise.
7276 * tracepoint.c: Likewise.
7277
8980bdf6
GB
72782014-08-07 Gary Benson <gbenson@redhat.com>
7279
7280 * server.h: Do not include stdarg.h.
7281 * nto-low.c: Likewise.
7282
d7096f71
GB
72832014-08-07 Gary Benson <gbenson@redhat.com>
7284
7285 * server.h: Do not include stdlib.h.
7286 * inferiors.c: Likewise.
7287 * linux-low.c: Likewise.
7288 * regcache.c: Likewise.
7289 * spu-low.c: Likewise.
7290 * tracepoint.c: Likewise.
7291 * utils.c: Likewise.
7292
d02f550d
GB
72932014-08-07 Gary Benson <gbenson@redhat.com>
7294
7295 * server.h: Do not include stdio.h.
7296 * linux-low.c: Likewise.
7297 * remote-utils.c: Likewise.
7298 * spu-low.c: Likewise.
7299 * utils.c: Likewise.
7300 * wincecompat.c: Likewise.
7301
87f6c4e3
GB
73022014-08-06 Gary Benson <gbenson@redhat.com>
7303
7304 * regcache.c (init_register_cache): Move conditionals inside if.
7305
7089dca4
GB
73062014-08-06 Gary Benson <gbenson@redhat.com>
7307
7308 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7309
462f517e
GB
73102014-07-31 Gary Benson <gbenson@redhat.com>
7311
7312 * ax.h: Do not include server.h.
7313 * gdbthread.h: Likewise.
7314 * lynx-low.h: Likewise.
7315 * notif.h: Likewise.
7316
976411d6
GB
73172014-07-30 Gary Benson <gbenson@redhat.com>
7318
7319 * server.h: Include common-defs.h.
7320 Do not include config.h or build-gnulib-gdbserver/config.h.
7321
d41f6d8e
GB
73222014-07-30 Gary Benson <gbenson@redhat.com>
7323
7324 * hostio-errno.c: Move server.h to top of includes list.
7325 * inferiors.c: Likewise.
7326 * linux-x86-low.c: Likewise.
7327 * notif.c: Include server.h.
7328
314c6a35
TT
73292014-07-24 Tom Tromey <tromey@redhat.com>
7330 Gary Benson <gbenson@redhat.com>
7331
7332 * server.h (CORE_ADDR): Now unsigned.
7333
69ff6be5
PA
73342014-07-16 Pedro Alves <palves@redhat.com>
7335
7336 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7337
ce9e3fe7
PA
73382014-07-15 Pedro Alves <palves@redhat.com>
7339
7340 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7341 copy.
7342
e76126e8
PA
73432014-07-11 Pedro Alves <palves@redhat.com>
7344
7345 * linux-low.c (kill_wait_lwp): New function, based on
7346 kill_one_lwp_callback, but use my_waitpid directly.
7347 (kill_one_lwp_callback, linux_kill): Use it.
7348
8e9db26e
PA
73492014-06-23 Pedro Alves <palves@redhat.com>
7350
7351 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7352 before setting DR0..DR3.
7353
698b3e08
GB
73542014-06-20 Gary Benson <gbenson@redhat.com>
7355
7356 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7357 * configure: Regenerated.
7358 * config.in: Likewise.
7359
125f8a3d
GB
73602014-06-20 Gary Benson <gbenson@redhat.com>
7361
7362 * Makefile.in (SFILES): Update locations for files moved
7363 from common to nat.
7364 (object file files): Reordered.
7365
42995dbd
GB
73662014-06-20 Gary Benson <gbenson@redhat.com>
7367
7368 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7369 (i386_dr_low_set_addr): Likewise.
7370 (i386_dr_low_get_addr): Likewise.
7371 (i386_dr_low_can_set_control): Likewise.
7372 (i386_dr_low_set_control): Likewise.
7373 (i386_dr_low_get_control): Likewise.
7374 (i386_dr_low_get_status): Likewise.
7375 (i386_get_debug_register_length): Likewise.
7376 * linux-x86-low.c (i386_dr_low_set_addr):
7377 Changed signature. Made static.
7378 (i386_dr_low_get_addr): Likewise.
7379 (i386_dr_low_set_control): Likewise.
7380 (i386_dr_low_get_control): Likewise.
7381 (i386_dr_low_get_status): Likewise.
7382 (i386_dr_low): New global variable.
7383 * win32-i386-low.c (i386_dr_low_set_addr):
7384 Changed signature. Made static.
7385 (i386_dr_low_get_addr): Likewise.
7386 (i386_dr_low_set_control): Likewise.
7387 (i386_dr_low_get_control): Likewise.
7388 (i386_dr_low_get_status): Likewise.
7389 (i386_dr_low): New global variable.
7390
e1d2394b
MS
73912014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7392
7393 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7394 * Makefile.in (AR, AR_FLAGS): Define.
7395 * configure: Regenerate.
7396
3a8ee006
GB
73972014-06-19 Gary Benson <gbenson@redhat.com>
7398
7399 * Makefile.in (i386-dregs.o): New rule.
7400 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7401 * i386-low.c (target.h): Remove include.
7402 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7403 (DR_CONTROL_SHIFT): Likewise.
7404 (DR_CONTROL_SIZE): Likewise.
7405 (DR_RW_EXECUTE): Likewise.
7406 (DR_RW_WRITE): Likewise.
7407 (DR_RW_READ): Likewise.
7408 (DR_RW_IORW): Likewise.
7409 (DR_LEN_1): Likewise.
7410 (DR_LEN_2): Likewise.
7411 (DR_LEN_4): Likewise.
7412 (DR_LEN_8): Likewise.
7413 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7414 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7415 (DR_ENABLE_SIZE): Likewise.
7416 (DR_LOCAL_SLOWDOWN): Likewise.
7417 (DR_GLOBAL_SLOWDOWN): Likewise.
7418 (DR_CONTROL_RESERVED): Likewise.
7419 (I386_DR_CONTROL_MASK): Likewise.
7420 (I386_DR_VACANT): Likewise.
7421 (I386_DR_LOCAL_ENABLE): Likewise.
7422 (I386_DR_GLOBAL_ENABLE): Likewise.
7423 (I386_DR_DISABLE): Likewise.
7424 (I386_DR_SET_RW_LEN): Likewise.
7425 (I386_DR_GET_RW_LEN): Likewise.
7426 (I386_DR_WATCH_HIT): Likewise.
7427 (i386_wp_op_t): Likewise.
7428 (i386_show_dr): Likewise.
7429 (i386_length_and_rw_bits): Likewise.
7430 (i386_insert_aligned_watchpoint): Likewise.
7431 (i386_remove_aligned_watchpoint): Likewise.
7432 (i386_handle_nonaligned_watchpoint): Likewise.
7433 i386_update_inferior_debug_regs(): Likewise.
7434 (i386_dr_insert_watchpoint): Likewise.
7435 (i386_dr_remove_watchpoint): Likewise.
7436 (i386_dr_region_ok_for_watchpoint): Likewise.
7437 (i386_dr_stopped_data_address): Likewise.
7438 (i386_dr_stopped_by_watchpoint): Likewise.
7439
8f26655c
GB
74402014-06-19 Gary Benson <gbenson@redhat.com>
7441
7442 * i386-low.c (i386_dr_show): Renamed to
7443 i386_show_dr and made static. All uses updated.
7444 (i386_dr_length_and_rw_bits): Renamed to
7445 i386_length_and_rw_bits and made static.
7446 All uses updated.
7447 (i386_dr_insert_aligned_watchpoint): Renamed to
7448 i386_insert_aligned_watchpoint and made static.
7449 All uses updated.
7450 (i386_dr_remove_aligned_watchpoint): Renamed to
7451 i386_remove_aligned_watchpoint and made static.
7452 All uses updated.
7453 (i386_dr_update_inferior_debug_regs): Renamed to
7454 i386_update_inferior_debug_regs and made static.
7455 All uses updated.
7456
b9228891
GB
74572014-06-18 Gary Benson <gbenson@redhat.com>
7458
5171def3
GB
7459 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7460 (i386_dr_low_can_set_control): Likewise.
7461 (i386_get_debug_register_length): Likewise.
7462 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7463 (i386_dr_low_can_set_control): Likewise.
7464 (i386_get_debug_register_length): Likewise.
7465
74662014-06-17 Gary Benson <gbenson@redhat.com>
7467
b9228891
GB
7468 * i386-low.h (i386-dregs.h): New include.
7469 (DR_FIRSTADDR): Now in i386-dregs.h.
7470 (DR_LASTADDR): Likewise.
7471 (DR_NADDR): Likewise.
7472 (DR_STATUS): Likewise.
7473 (DR_CONTROL): Likewise.
7474 (i386_debug_reg_state): Likewise.
7475 (i386_dr_insert_watchpoint): Likewise.
7476 (i386_dr_remove_watchpoint): Likewise.
7477 (i386_dr_region_ok_for_watchpoint): Likewise.
7478 (i386_dr_stopped_data_address): Likewise.
7479 (i386_dr_stopped_by_watchpoint): Likewise.
7480 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7481
4be83cc2
GB
74822014-06-18 Gary Benson <gbenson@redhat.com>
7483
7484 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7485 i386_dr_insert_watchpoint.
7486 (i386_low_remove_watchpoint): Renamed to
7487 i386_dr_remove_watchpoint.
7488 (i386_low_region_ok_for_watchpoint): Renamed to
7489 i386_dr_region_ok_for_watchpoint.
7490 (i386_low_stopped_data_address): Renamed to
7491 i386_dr_stopped_data_address.
7492 (i386_low_stopped_by_watchpoint): Renamed to
7493 i386_dr_stopped_by_watchpoint.
7494 * i386-low.c (i386_show_dr): Renamed to
7495 i386_dr_show and made nonstatic. All uses updated.
7496 (i386_length_and_rw_bits): Renamed to
7497 i386_dr_length_and_rw_bits and made nonstatic.
7498 All uses updated.
7499 (i386_insert_aligned_watchpoint): Renamed to
7500 i386_dr_insert_aligned_watchpoint and made nonstatic.
7501 All uses updated.
7502 (i386_remove_aligned_watchpoint): Renamed to
7503 i386_dr_remove_aligned_watchpoint and made nonstatic.
7504 All uses updated.
7505 (i386_update_inferior_debug_regs): Renamed to
7506 i386_dr_update_inferior_debug_regs and made nonstatic.
7507 All uses updated.
7508 (i386_low_insert_watchpoint): Renamed to
7509 i386_dr_insert_watchpoint. All uses updated.
7510 (i386_low_remove_watchpoint): Renamed to
7511 i386_dr_remove_watchpoint. All uses updated.
7512 (i386_low_region_ok_for_watchpoint): Renamed to
7513 i386_dr_region_ok_for_watchpoint. All uses updated.
7514 (i386_low_stopped_data_address): Renamed to
7515 i386_dr_stopped_data_address. All uses updated.
7516 (i386_low_stopped_by_watchpoint): Renamed to
7517 i386_dr_stopped_by_watchpoint. All uses updated.
7518
131aa0d4
GB
75192014-06-18 Gary Benson <gbenson@redhat.com>
7520
7521 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7522 (i386_dr_low_can_set_control): Likewise.
7523 (i386_insert_aligned_watchpoint): New check.
7524
d9305f7f
GB
75252014-06-18 Gary Benson <gbenson@redhat.com>
7526
7527 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7528 Renamed to state.
7529
e927c9fc
GB
75302014-06-18 Gary Benson <gbenson@redhat.com>
7531
7532 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7533 instead of fatal and error.
7534 (i386_handle_nonaligned_watchpoint): Likewise.
7535
1b6d4134
GB
75362014-06-18 Gary Benson <gbenson@redhat.com>
7537
7538 * i386-low.c (i386_get_debug_register_length): New macro.
7539 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7540 (i386_show_dr): Use debug_printf instead of fprintf. Use
7541 phex to format values.
7542
6e62758f
GB
75432014-06-18 Gary Benson <gbenson@redhat.com>
7544
7545 * i386-low.h: Comment changes.
7546 * i386-low.c: Likewise.
7547
fc6e2f03
GB
75482014-06-18 Gary Benson <gbenson@redhat.com>
7549
7550 * i386-low.c: Whitespace changes.
7551
f9d1eeed
TT
75522014-06-12 Tom Tromey <tromey@redhat.com>
7553
7554 * utils.c (freeargv): Remove.
7555
0b04e523
TT
75562014-06-12 Tom Tromey <tromey@redhat.com>
7557
7558 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7559 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7560 (parse_debug_format_options): Likewise.
7561 (gdbserver_usage): Likewise.
7562 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7563 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7564 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7565 against libiberty.
7566 ($(LIBGNU)): Depend on libiberty.
7567 (all-lib): Recurse into all subdirs.
7568 (install-only): Invoke "install" target in subdirs.
7569 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7570 targets.
7571 * configure: Rebuild.
7572 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7573 for vasprintf, vsnprintf, or gettimeofday.
7574 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7575 srv_tgtobj.
7576
270c9937
JB
75772014-06-05 Joel Brobecker <brobecker@adacore.com>
7578
7579 * development.sh: Delete.
7580 * Makefile.in (config.status): Adjust dependency on development.sh.
7581 * configure.ac: Adjust development.sh source call.
7582 * configure: Regenerate.
7583
0a261ed8
PA
75842014-06-02 Pedro Alves <palves@redhat.com>
7585
7586 * ax.c (gdb_free_agent_expr): New function.
7587 * ax.h (gdb_free_agent_expr): New declaration.
7588 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7589 list.
7590 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7591 static.
7592 (clear_breakpoint_conditions_and_commands): New function.
7593 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7594 (clear_breakpoint_conditions_and_commands): New declaration.
7595
e9dae05e
RR
75962014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7597
7598 * linux-aarch64-low.c (asm/ptrace.h): Include.
7599
5876f503
JK
76002014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7601
7602 Fix TLS access for -static -pthread.
7603 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7604 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7605 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7606
802e8e6d
PA
76072014-05-20 Pedro Alves <palves@redhat.com>
7608
7609 * linux-aarch64-low.c (aarch64_insert_point)
7610 (aarch64_remove_point): No longer check whether the type is
7611 supported here. Adjust to new interface.
7612 (the_low_target): Install aarch64_supports_z_point_type as
7613 supports_z_point_type method.
7614 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7615 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7616 instead of a Z packet char. Adjust.
7617 (arm_supports_z_point_type): New function.
7618 (arm_insert_point, arm_remove_point): Adjust to new interface.
7619 (the_low_target): Install arm_supports_z_point_type.
7620 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7621 (cris_insert_point, cris_remove_point): Adjust to new interface.
7622 Don't check whether the type is supported here.
7623 (the_low_target): Install cris_supports_z_point_type.
7624 * linux-low.c (linux_supports_z_point_type): New function.
7625 (linux_insert_point, linux_remove_point): Adjust to new interface.
7626 * linux-low.h (struct linux_target_ops) <insert_point,
7627 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7628 raw_breakpoint pointer parameter.
7629 <supports_z_point_type>: New method.
7630 * linux-mips-low.c (mips_supports_z_point_type): New function.
7631 (mips_insert_point, mips_remove_point): Adjust to new interface.
7632 Use mips_supports_z_point_type.
7633 (the_low_target): Install mips_supports_z_point_type.
7634 * linux-ppc-low.c (the_low_target): Install NULL as
7635 supports_z_point_type method.
7636 * linux-s390-low.c (the_low_target): Install NULL as
7637 supports_z_point_type method.
7638 * linux-sparc-low.c (the_low_target): Install NULL as
7639 supports_z_point_type method.
7640 * linux-x86-low.c (x86_supports_z_point_type): New function.
7641 (x86_insert_point): Adjust to new insert_point interface. Use
7642 insert_memory_breakpoint. Adjust to new
7643 i386_low_insert_watchpoint interface.
7644 (x86_remove_point): Adjust to remove_point interface. Use
7645 remove_memory_breakpoint. Adjust to new
7646 i386_low_remove_watchpoint interface.
7647 (the_low_target): Install x86_supports_z_point_type.
7648 * lynx-low.c (lynx_target_ops): Install NULL as
7649 supports_z_point_type callback.
7650 * nto-low.c (nto_supports_z_point_type): New.
7651 (nto_insert_point, nto_remove_point): Adjust to new interface.
7652 (nto_target_ops): Install nto_supports_z_point_type.
7653 * mem-break.c: Adjust intro comment.
7654 (struct raw_breakpoint) <raw_type, size>: New fields.
7655 <inserted>: Update comment.
7656 <shlib_disabled>: Delete field.
7657 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7658 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7659 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7660 (raw_bkpt_type_to_target_hw_bp_type): New function.
7661 (find_enabled_raw_code_breakpoint_at): New function.
7662 (find_raw_breakpoint_at): New type and size parameters. Use them.
7663 (insert_memory_breakpoint): New function, based off
7664 set_raw_breakpoint_at.
7665 (remove_memory_breakpoint): New function.
7666 (set_raw_breakpoint_at): Reimplement.
7667 (set_breakpoint): New, based on set_breakpoint_at.
7668 (set_breakpoint_at): Reimplement.
7669 (delete_raw_breakpoint): Go through the_target->remove_point
7670 instead of assuming memory breakpoints.
7671 (find_gdb_breakpoint_at): Delete.
7672 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7673 (find_gdb_breakpoint): New function.
7674 (set_gdb_breakpoint_at): Delete.
7675 (z_type_supported): New function.
7676 (set_gdb_breakpoint_1): New function, loosely based off
7677 set_gdb_breakpoint_at.
7678 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7679 (delete_gdb_breakpoint_at): Delete.
7680 (delete_gdb_breakpoint_1): New function, loosely based off
7681 delete_gdb_breakpoint_at.
7682 (delete_gdb_breakpoint): New function.
7683 (clear_gdb_breakpoint_conditions): Rename to ...
7684 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7685 breakpoint.
7686 (add_condition_to_breakpoint): Make static.
7687 (add_breakpoint_condition): Take a struct breakpoint pointer
7688 instead of an address. Adjust.
7689 (gdb_condition_true_at_breakpoint): Rename to ...
7690 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7691 z_type parameter.
7692 (gdb_condition_true_at_breakpoint): Reimplement.
7693 (add_breakpoint_commands): Take a struct breakpoint pointer
7694 instead of an address. Adjust.
7695 (gdb_no_commands_at_breakpoint): Rename to ...
7696 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7697 parameter. Return true if no breakpoint was found. Change debug
7698 output.
7699 (gdb_no_commands_at_breakpoint): Reimplement.
7700 (run_breakpoint_commands): Rename to ...
7701 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7702 and change return type to boolean.
7703 (run_breakpoint_commands): New function.
7704 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7705 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7706 breakpoint. Go through the_target->remove_point instead of
7707 assuming memory breakpoint.
7708 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7709 software and hardware breakpoints.
7710 (reinsert_raw_breakpoint): Go through the_target->insert_point
7711 instead of assuming memory breakpoint.
7712 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7713 software and hardware breakpoints.
7714 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7715 Check both software and hardware breakpoints.
7716 (validate_inserted_breakpoint): Assert the breakpoint is a
7717 software breakpoint. Set the inserted flag to -1 instead of
7718 setting shlib_disabled.
7719 (delete_disabled_breakpoints): Adjust.
7720 (validate_breakpoints): Only validate software breakpoints.
7721 Adjust to inserted flag change.
7722 (check_mem_read, check_mem_write): Skip breakpoint types other
7723 than software breakpoints. Adjust to inserted flag change.
7724 * mem-break.h (enum raw_bkpt_type): New enum.
7725 (raw_breakpoint, struct process_info): Forward declare.
7726 (Z_packet_to_target_hw_bp_type): Delete declaration.
7727 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7728 (set_gdb_breakpoint, delete_gdb_breakpoint)
7729 (clear_breakpoint_conditions): New declarations.
7730 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7731 (breakpoint_inserted_here): Update comment.
7732 (add_breakpoint_condition, add_breakpoint_commands): Replace
7733 address parameter with a breakpoint pointer parameter.
7734 (gdb_breakpoint_here): Update comment.
7735 (delete_gdb_breakpoint_at): Delete.
7736 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7737 * server.c (process_point_options): Take a struct breakpoint
7738 pointer instead of an address. Adjust.
7739 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7740 delete_gdb_breakpoint.
7741 * spu-low.c (spu_target_ops): Install NULL as
7742 supports_z_point_type method.
7743 * target.h: Include mem-break.h.
7744 (struct target_ops) <prepare_to_access_memory>: Update comment.
7745 <supports_z_point_type>: New field.
7746 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7747 instead of a char. Also take a raw breakpoint pointer.
7748 * win32-arm-low.c (the_low_target): Install NULL as
7749 supports_z_point_type.
7750 * win32-i386-low.c (i386_supports_z_point_type): New function.
7751 (i386_insert_point, i386_remove_point): Adjust to new interface.
7752 (the_low_target): Install i386_supports_z_point_type.
7753 * win32-low.c (win32_supports_z_point_type): New function.
7754 (win32_insert_point, win32_remove_point): Adjust to new interface.
7755 (win32_target_ops): Install win32_supports_z_point_type.
7756 * win32-low.h (struct win32_target_ops):
7757 <supports_z_point_type>: New method.
7758 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7759 instead of a char. Also take a raw breakpoint pointer.
7760
932539e3
PA
77612014-05-20 Pedro Alves <palves@redhat.com>
7762
7763 * mem-break.h: Include break-common.h.
7764 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7765 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7766 (Z_packet_to_target_hw_bp_type): New declaration.
7767 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7768 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7769 (Z_PACKET_ACCESS_WP): Delete macros.
7770 (Z_packet_to_hw_type): Delete function.
7771 * i386-low.h: Don't include break-common.h here.
7772 (Z_packet_to_hw_type): Delete declaration.
7773 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7774 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7775 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7776 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7777 * linux-aarch64-low.c: Don't include break-common.h here.
7778 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7779 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7780 (Z_packet_to_target_hw_bp_type): Delete function.
7781 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7782 function.
7783 (mips_insert_point, mips_remove_point): Use
7784 Z_packet_to_target_hw_bp_type.
7785
4ff0d3d8
PA
77862014-05-20 Pedro Alves <palves@redhat.com>
7787
7788 * linux-aarch64-low.c: Include break-common.h.
7789 (enum target_point_type): Delete.
7790 (Z_packet_to_point_type): Rename to ...
7791 (Z_packet_to_target_hw_bp_type): ... this, and return a
7792 target_hw_bp_type instead.
7793 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7794 instead of an enum target_point_type.
7795 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7796 breakpoint type.
7797 (aarch64_dr_state_insert_one_point)
7798 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7799 (aarch64_handle_aligned_watchpoint)
7800 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7801 Take an enum target_hw_bp_type instead of an enum
7802 target_point_type.
7803 (aarch64_supports_z_point_type): New function.
7804 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7805 use Z_packet_to_target_hw_bp_type.
7806
786dc519
JB
78072014-05-20 Joel Brobecker <brobecker@adacore.com>
7808
7809 * configure.ac: Only use -Werror by default when DEVELOPMENT
7810 is true.
7811 * configure: Regenerate.
7812
9e0aa64f
JK
78132014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7814
7815 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7816 * linux-x86-low.c (X86_64_USER_REGS): New.
7817 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7818
2b577b92
YQ
78192014-04-28 Yao Qi <yao@codesourcery.com>
7820
7821 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7822 name.
7823
94611da2
PA
78242014-04-25 Pedro Alves <palves@redhat.com>
7825
7826 PR server/16255
7827 * linux-low.c (linux_attach_fail_reason_string): New function.
7828 (linux_attach_lwp): Delete.
7829 (linux_attach_lwp_1): Rename to ...
7830 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7831 argument. Remove "initial" parameter. Return int instead of
7832 void. Don't error or warn here.
7833 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7834 failure to attach to the tgid. Call warning when failing to
7835 attach to an lwp.
7836 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7837 argument. Remove "initial" parameter. Return int instead of
7838 void. Don't error or warn here.
7839 (linux_attach_fail_reason_string): New declaration.
7840 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7841 interface change. Use linux_attach_fail_reason_string.
7842
01f9f808
MS
78432014-04-24 Michael Sturm <michael.sturm@mintel.com>
7844 Walfred Tedeschi <walfred.tedeschi@intel.com>
7845
7846 * Makefile.in: Added rules to handle new files
7847 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7848 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7849 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7850 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7851 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7852 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7853 x32-avx512-linux.o.
7854 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7855 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7856 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7857 i386/x32-avx512.xml.
7858 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7859 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7860 i386/x32-avx512-linux.xml.
7861 * i387-fp.c (num_avx512_k_registers): New constant for number
7862 of K registers.
7863 (num_avx512_zmmh_low_registers): New constant for number of
7864 lower ZMM registers (0-15).
7865 (num_avx512_zmmh_high_registers): New constant for number of
7866 higher ZMM registers (16-31).
7867 (num_avx512_ymmh_registers): New contant for number of higher
7868 YMM registers (ymm16-31 added by avx521 on x86_64).
7869 (num_avx512_xmm_registers): New constant for number of higher
7870 XMM registers (xmm16-31 added by AVX512 on x86_64).
7871 (struct i387_xsave): Add space for AVX512 registers.
7872 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7873 Add code to handle AVX512 registers.
7874 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7875 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7876 prototypei from generated file.
7877 (tdesc_amd64_avx512_linux): Likewise.
7878 (init_registers_x32_avx512_linux): Likewise.
7879 (tdesc_x32_avx512_linux): Likewise.
7880 (init_registers_i386_avx512_linux): Likewise.
7881 (tdesc_i386_avx512_linux): Likewise.
7882 (x86_64_regmap): Add AVX512 registers.
7883 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7884 mask.
7885 (initialize_low_arch): Add code to initialize AVX512 registers.
7886
51aa91f9
PA
78872014-04-23 Pedro Alves <palves@redhat.com>
7888
7889 * mem-break.c (find_gdb_breakpoint_at): Make static.
7890 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7891
a4165e94
PA
78922014-04-23 Pedro Alves <palves@redhat.com>
7893
7894 * i386-low.c: Don't include break-common.h here.
7895 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7896 prototype to take target_hw_bp_type as argument instead of a Z
7897 packet char.
7898 * i386-low.h: Include break-common.h here.
7899 (Z_packet_to_hw_type): Declare.
7900 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7901 prototypes.
7902 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7903 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7904 (x86_remove_point): Convert the packet number to a
7905 target_hw_bp_type before calling i386_low_remove_watchpoint.
7906 * win32-i386-low.c (i386_insert_point): Convert the packet number
7907 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7908 (i386_remove_point): Convert the packet number to a
7909 target_hw_bp_type before calling i386_low_remove_watchpoint.
7910
b8acf843
PA
79112014-04-23 Pedro Alves <palves@redhat.com>
7912
7913 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7914
d708bcd1
PA
79152014-04-10 Pedro Alves <palves@redhat.com>
7916
7917 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7918 Check if the condition or command is NULL before checking if the
7919 breakpoint is known. On success, return true.
7920 * mem-break.h (add_breakpoint_condition): Document return.
7921 (add_breakpoint_commands): Add describing comment.
7922 * server.c (skip_to_semicolon): New function.
7923 (process_point_options): Use it.
7924
2eec7d5b
PA
79252014-04-09 Pedro Alves <palves@redhat.com>
7926
7927 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7928 to lwpid_of.
7929
fa96cb38
PA
79302014-02-27 Pedro Alves <palves@redhat.com>
7931
7932 PR 12702
7933 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7934 macros.
7935 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7936 output.
7937 (last_thread_of_process_p): Take a PID argument instead of a
7938 thread pointer.
7939 (linux_wait_for_lwp): Delete.
7940 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7941 functions.
7942 (linux_low_filter_event): New function, party factored out from
7943 linux_wait_for_event.
7944 (linux_wait_for_event): Rename to ...
7945 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7946 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7947 sigsuspend. Check for zombie leaders.
7948 (linux_wait_for_event): Reimplement as wrapper around
7949 linux_wait_for_event_filtered.
7950 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7951 a normal or signal exit is seen, it's the whole process exiting.
7952 (wait_for_sigstop): No longer a for_each_inferior callback.
7953 Rewrite on top of linux_wait_for_event_filtered.
7954 (stop_all_lwps): Call wait_for_sigstop directly.
7955 * server.c (resume, handle_target_event): Handle
7956 TARGET_WAITKIND_NO_RESUMED.
7957
d763de10
JB
79582014-02-26 Joel Brobecker <brobecker@adacore.com>
7959
7960 * win32-low.c (psapi_get_dll_name,
7961 * win32_CreateToolhelp32Snapshot): Delete.
7962 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7963 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7964 Delete.
7965 (handle_load_dll): Add function description.
7966 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7967
850a0f76
JB
79682014-02-26 Joel Brobecker <brobecker@adacore.com>
7969
7970 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7971 Add comment.
7972 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7973 base address when calling win32_add_one_solib.
7974 (handle_load_dll): Delete local variable load_addr.
7975 Remove 0x1000 offset applied to DLL base address when calling
7976 win32_add_one_solib.
7977 (handle_unload_dll): Add comment.
7978
f25b3fc3
JB
79792014-02-26 Joel Brobecker <brobecker@adacore.com>
7980
7981 * win32-low.c (win32_add_all_dlls): Renames
7982 win32_ensure_ntdll_loaded. Rewrite function documentation.
7983 Adjust implementation to always load all DLLs.
7984 Add 0x1000 offset to DLL base address when calling
7985 win32_add_one_solib.
7986 (child_initialization_done): New static global.
7987 (do_initial_child_stuff): Set child_initialization_done to
7988 zero during child initialization, and 1 after. Replace call
7989 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7990 Add comment.
7991 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7992 (handle_unload_dll): Add function documentation.
7993 (get_child_debug_event): Ignore load and unload DLL events
7994 during child initialization.
7995
d86d4aaf
DE
79962014-02-20 Doug Evans <dje@google.com>
7997
3bc32da3 7998 Remove global all_lwps.
d86d4aaf
DE
7999 * inferiors.h (ptid_of): Move here from linux-low.h.
8000 (pid_of, lwpid_of): Ditto.
8001 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8002 parameter is a struct thread_info * now.
8003 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8004 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8005 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8006 directly.
8007 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8008 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8009 * linux-arm-low.c (update_registers_callback): Update, "entry"
8010 parameter is a struct thread_info * now.
8011 Fetch lwpid from current_inferior directly.
8012 (arm_insert_point): Pass &all_threads to find_inferior instead of
8013 &all_lwps.
8014 (arm_remove_point): Ditto.
8015 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8016 (arm_prepare_to_resume): Fetch pid from thread.
8017 (arm_read_description): Fetch lwpid from current_inferior directly.
8018 * linux-low.c (all_lwps): Delete.
8019 (delete_lwp): Delete call to remove_inferior.
8020 (handle_extended_wait): Fetch lwpid from thread.
8021 (add_lwp): Don't set lwp->entry.id. Remove call to
8022 add_inferior_to_list.
8023 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8024 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8025 (kill_one_lwp_callback): Ditto.
8026 (linux_kill): Don't dereference NULL pointer.
8027 Fetch ptid,lwpid from thread.
8028 (get_detach_signal): Fetch ptid from thread.
8029 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8030 Simplify call to regcache_invalidate_thread.
8031 (delete_lwp_callback): Update, "entry" parameter is a
8032 struct thread_info * now. Fetch pid from thread.
8033 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8034 (status_pending_p_callback): Update, "entry" parameter is a
8035 struct thread_info * now. Fetch ptid from thread.
8036 (find_lwp_pid): Update, "entry" parameter is a
8037 struct thread_info * now.
8038 (linux_wait_for_lwp): Fetch pid from thread.
8039 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8040 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8041 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8042 (dequeue_one_deferred_signal): Ditto.
8043 (cancel_breakpoint): Fetch ptid from current_inferior.
8044 (linux_wait_for_event): Pass &all_threads to find_inferior,
8045 not &all_lwps. Fetch ptid, lwpid from thread.
8046 (count_events_callback): Update, "entry" parameter is a
8047 struct thread_info * now.
8048 (select_singlestep_lwp_callback): Ditto.
8049 (select_event_lwp_callback): Ditto.
8050 (cancel_breakpoints_callback): Ditto.
8051 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8052 not &all_lwps.
8053 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8054 (unsuspend_one_lwp): Update, "entry" parameter is a
8055 struct thread_info * now.
8056 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8057 not &all_lwps.
8058 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8059 Fetch lwpid from thread, not lwp.
8060 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8061 Pass &all_threads to find_inferior, not &all_lwps.
8062 (send_sigstop): Fetch lwpid from thread, not lwp.
8063 (send_sigstop_callback): Update, "entry" parameter is a
8064 struct thread_info * now.
8065 (suspend_and_send_sigstop_callback): Ditto.
8066 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8067 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8068 struct thread_info * now.
8069 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8070 from thread, lwp.
8071 (lwp_running): Update, "entry" parameter is a
8072 struct thread_info * now.
8073 (stop_all_lwps): Fetch ptid from thread.
8074 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8075 (linux_resume_one_lwp): Fetch lwpid from thread.
8076 (linux_set_resume_request): Update, "entry" parameter is a
8077 struct thread_info * now. Fetch pid, lwpid from thread.
8078 (resume_status_pending_p): Update, "entry" parameter is a
8079 struct thread_info * now.
8080 (need_step_over_p): Ditto. Fetch lwpid from thread.
8081 (start_step_over): Fetch lwpid from thread.
8082 (linux_resume_one_thread): Update, "entry" parameter is a
8083 struct thread_info * now. Fetch lwpid from thread.
8084 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8085 (proceed_one_lwp): Update, "entry" parameter is a
8086 struct thread_info * now. Fetch lwpid from thread.
8087 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8088 struct thread_info * now.
8089 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8090 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8091 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8092 directly.
8093 (regsets_store_inferior_registers): Ditto.
8094 (fetch_register, store_register): Ditto.
8095 (linux_read_memory, linux_write_memory): Ditto.
8096 (linux_request_interrupt): Ditto.
8097 (linux_read_auxv): Ditto.
8098 (linux_xfer_siginfo): Ditto.
8099 (linux_qxfer_spu): Ditto.
8100 (linux_qxfer_libraries_svr4): Ditto.
8101 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8102 moved to inferiors.h.
8103 (get_lwp): Delete.
8104 (get_thread_lwp): Update.
8105 (struct lwp_info): Delete member "entry". Simplify comment for
8106 member "thread".
8107 (all_lwps): Delete.
8108 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8109 current_inferior directly.
8110 (update_watch_registers_callback): Update, "entry" parameter is a
8111 struct thread_info * now. Fetch pid from thread.
8112 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8113 (mips_insert_point): Fetch lwpid from current_inferior.
8114 Pass &all_threads to find_inferior, not &all_lwps.
8115 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8116 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8117 directly.
8118 (mips_stopped_data_address): Ditto.
8119 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8120 directly.
8121 * linux-tile-low.c (tile_arch_setup): Ditto.
8122 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8123 (update_debug_registers_callback): Update, "entry" parameter is a
8124 struct thread_info * now. Fetch pid from thread.
8125 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8126 Pass &all_threads to find_inferior, not &all_lwps.
8127 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8128 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8129 Pass &all_threads to find_inferior, not &all_lwps.
8130 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8131 (i386_dr_low_get_status): Ditto.
8132 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8133 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8134 (x86_linux_read_description): Ditto.
8135 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8136
3b8361aa
DE
81372014-02-20 Doug Evans <dje@google.com>
8138
8139 * inferiors.c (get_first_inferior): Fix buglet.
8140
f7667f0d
DE
81412014-02-19 Doug Evans <dje@google.com>
8142
8143 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8144 * inferiors.c (add_thread): Change result type to struct thread_info *.
8145 All callers updated.
8146 (add_lwp): Call add_thread here instead of in callers.
8147 All callers updated.
8148 * linux-low.h (get_lwp_thread): Rewrite.
8149 (struct lwp_info): New member "thread".
8150
b3312d80
DE
81512014-02-19 Doug Evans <dje@google.com>
8152
8153 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8154 All callers updated.
8155
ecc6f45c
DE
81562014-02-19 Doug Evans <dje@google.com>
8157
8158 * inferiors.c (add_thread): Fix whitespace.
8159
649ebbca
DE
81602014-02-19 Doug Evans <dje@google.com>
8161
8162 * dll.c (clear_dlls): Replace accessing list implemention details
8163 with API function.
8164 * gdbthread.h (get_first_thread): Declare.
8165 * inferiors.c (for_each_inferior_with_data): New function.
8166 (get_first_thread): New function.
8167 (find_thread_ptid): Simplify.
8168 (get_first_inferior): New function.
8169 (clear_list): Delete.
8170 (one_inferior_p): New function.
8171 (clear_inferior_list): New function.
8172 (clear_inferiors): Update.
8173 * inferiors.h (for_each_inferior_with_data): Declare.
8174 (clear_inferior_list): Declare.
8175 (one_inferior_p): Declare.
8176 (get_first_inferior): Declare.
8177 * linux-low.c (linux_wait_for_event): Replace accessing list
8178 implemention details with API function.
8179 * server.c (target_running): Ditto.
8180 (accumulate_file_name_length): New function.
8181 (emit_dll_description): New function.
8182 (handle_qxfer_libraries): Replace accessing list implemention
8183 details with API function.
8184 (handle_qxfer_threads_worker): New function.
8185 (handle_qxfer_threads_proper): Replace accessing list implemention
8186 details with API function.
8187 (handle_query): Ditto.
8188 (visit_actioned_threads_callback_ftype): New typedef.
8189 (visit_actioned_threads_data): New struct.
8190 (visit_actioned_threads): Rewrite to be find_inferior callback.
8191 (resume): Call find_inferior.
8192 (handle_status): Replace accessing list implemention
8193 details with API function.
8194 (process_serial_event): Replace accessing list implemention details
8195 with API function.
8196 * target.c (set_desired_inferior): Replace accessing list implemention
8197 details with API function.
8198 * tracepoint.c (same_process_p): New function.
8199 (gdb_agent_about_to_close): Replace accessing list implemention
8200 details with API function.
8201 * win32-low.c (child_delete_thread): Replace accessing list
8202 implemention details with API function.
8203 (match_dll_by_basename): New function.
8204 (dll_is_loaded_by_basename): New function.
8205 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8206 details call to dll_is_loaded_by_basename.
8207
80894984
DE
82082014-02-19 Doug Evans <dje@google.com>
8209
8210 * dll.h (struct dll_info): Add comment.
8211 * gdbthread.h (struct thread_info): Add comment.
8212 (current_ptid): Simplify.
8213 * inferiors.c (add_process): Update.
8214 (remove_process): Update.
8215 * inferiors.h (struct process_info): Rename member "head" to "entry".
8216 * linux-low.c (delete_lwp): Update.
8217 (add_lwp): Update.
8218 (last_thread_of_process_p): Update.
8219 (kill_one_lwp_callback, linux_kill): Update.
8220 (status_pending_p_callback): Update.
8221 (wait_for_sigstop): Update. Simplify read of ptid.
8222 (start_step_over): Update.
8223 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8224 (get_lwp_thread): Update.
8225 (struct lwp_info): Rename member "head" to "entry".
8226 * regcache.h (inferior_list_entry): Delete.
8227 * server.c (kill_inferior_callback): Update.
8228 (detach_or_kill_inferior_callback): Update.
8229 (print_started_pid): Update.
8230 (print_attached_pid): Update.
8231 (process_serial_event): Simplify read of ptid.
8232 * thread-db.c (thread_db_create_event): Update.
8233 (thread_db_get_tls_address): Update.
8234 * win32-low.c (current_inferior_ptid): Simplify.
8235
46917d26
TT
82362014-02-19 Tom Tromey <tromey@redhat.com>
8237
8238 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8239 argument.
8240 (target_supports_btrace): Update.
8241
0759a81e
YQ
82422014-02-14 Yao Qi <yao@codesourcery.com>
8243
8244 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8245 (rsp-low-ipa.o): New target.
8246
a7191e8b
TT
82472014-02-12 Tom Tromey <tromey@redhat.com>
8248
8249 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8250 convert_ascii_to_int.
8251 * regcache.c (registers_to_string): Likewise.
8252 * remote-utils.c (decode_M_packet): Likewise.
8253 * server.c (process_serial_event): Likewise.
8254
ff0e980e
TT
82552014-02-12 Tom Tromey <tromey@redhat.com>
8256
8257 * server.c (handle_query, handle_v_run): Use hex2bin, not
8258 unhexify.
8259 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8260
e9371aff
TT
82612014-02-12 Tom Tromey <tromey@redhat.com>
8262
8263 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8264 convert_int_to_ascii.
8265 * regcache.c (registers_to_string, collect_register_as_string):
8266 Likewise.
8267 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8268 Likewise.
8269 * server.c (process_serial_event): Likewise.
8270 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8271 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8272
971dc0b8
TT
82732014-02-12 Tom Tromey <tromey@redhat.com>
8274
8275 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8276 bin2hex, not hexify.
8277 * tracepoint.c (cmd_qtstatus): Likewise.
8278
0a822afb
TT
82792014-02-12 Tom Tromey <tromey@redhat.com>
8280
8281 * remote-utils.c (monitor_output): Pass explicit length to
8282 hexify.
8283
9c3d6531
TT
82842014-02-12 Tom Tromey <tromey@redhat.com>
8285
8286 * tracepoint.c: Include rsp-low.h.
8287 * server.c: Include rsp-low.h.
8288 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8289 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8290 declare.
8291 * remote-utils.c: Include rsp-low.h.
8292 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8293 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8294 (convert_int_to_ascii, convert_ascii_to_int): Move to
8295 common/rsp-low.c.
8296 * regcache.c: Include rsp-low.h.
8297 * ax.c: Include rsp-low.h.
8298 * Makefile.in (SFILES): Add common/rsp-low.c.
8299 (OBS): Add rsp-low.o.
8300 (rsp-low.o): New target.
8301
01fd3ea5
TT
83022014-02-12 Tom Tromey <tromey@redhat.com>
8303
8304 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8305 Include print-utils.h.
8306 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8307 (plongest, thirty_two, phex_nz): Remove.
8308 * Makefile.in (SFILES): Add common/print-utils.c.
8309 (OBS): Add print-utils.o.
8310 (print-utils-ipa.o): New target.
8311 (print-utils.o): New target.
8312 (IPA_OBJS): Add print-utils-ipa.o.
8313
e99dc820
TT
83142014-02-06 Tom Tromey <tromey@redhat.com>
8315
8316 * Makefile.in (SFILES): Fix indentation.
8317
ee1e2d4f
DE
83182014-02-05 Doug Evans <dje@google.com>
8319
8320 * linux-low.c (linux_wait_for_event): Improve comment.
8321 (linux_wait_1): Keep current_inferior in sync with event_child.
8322
f5a02773
DE
83232014-01-22 Doug Evans <dje@google.com>
8324
8325 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8326
87ce2a04
DE
83272014-01-22 Doug Evans <dje@google.com>
8328
8329 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8330 * configure: Regenerate.
8331 * config.in: Regenerate.
8332 * Makefile.in (SFILES): Add debug.c.
8333 (OBS): Add debug.o.
8334 * debug.c: New file.
8335 * debug.h: New file.
8336 * linux-aarch64-low.c (*): Update all debugging printfs to use
8337 debug_printf instead of fprintf.
8338 * linux-arm-low.c (*): Ditto.
8339 * linux-cris-low.c (*): Ditto.
8340 * linux-crisv32-low.c (*): Ditto.
8341 * linux-m32r-low.c (*): Ditto.
8342 * linux-sparc-low.c (*): Ditto.
8343 * linux-x86.c (*): Ditto.
8344 * linux-low.c (*): Ditto.
8345 (linux_wait_1): Add calls to debug_enter, debug_exit.
8346 (linux_wait): Remove redundant debugging printf.
8347 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8348 (linux_resume, unstop_all_lwps): Ditto.
8349 * mem-break.c (*): Update all debugging printfs to use
8350 debug_printf instead of fprintf.
8351 * remote-utils.c (*): Ditto.
8352 * thread-db.c (*): Ditto.
8353 * server.c #include <ctype.h>, "gdb_vecs.h".
8354 (debug_threads): Moved to debug.c.
8355 (*): Update all debugging printfs to use debug_printf instead of
8356 fprintf.
8357 (start_inferior): Replace call to fflush with call to debug_flush.
8358 (monitor_show_help): Mention set debug-format.
8359 (parse_debug_format_options): New function.
8360 (handle_monitor_command): Handle "monitor set debug-format".
8361 (gdbserver_usage): Mention --debug-format.
8362 (main): Parse --debug-format.
8363 * server.h (debug_threads): Declaration moved to debug.h.
8364 #include "debug.h".
8365 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8366 trace_debug_1 that uses debug_printf.
8367 (tracepoint_look_up_symbols): Update all debugging printfs to use
8368 debug_printf instead of fprintf.
8369
e671835b
BS
83702014-01-20 Baruch Siach <baruch@tkos.co.il>
8371
8372 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8373 sys/ptrace.h.
8374
b5737fa9
PA
83752014-01-17 Pedro Alves <palves@redhat.com>
8376
ea38d2a9 8377 PR build/16445
c7faa97a
PA
8378 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8379 defined after including gdb_proc_service.h.
b5737fa9 8380
40ed484e
DE
83812014-01-16 Doug Evans <dje@google.com>
8382
8383 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8384 (match_dll): Use it.
8385
969c39fb
MM
83862014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8387
8388 * target.h (target_ops) <read_btrace>: Change parameters and
8389 return type to allow error reporting.
8390 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8391 trace reading errors on.
8392 * linux-low.c (linux_low_read_btrace): Pass trace reading
8393 errors on.
8394 (linux_low_disable_btrace): New.
8395
ab7f45ba
DE
83962014-01-15 Doug Evans <dje@google.com>
8397
8398 * inferiors.c (thread_id_to_gdb_id): Delete.
8399 * inferiors.h (thread_id_to_gdb_id): Delete.
8400
66af0f44
EZ
84012014-01-13 Eli Zaretskii <eliz@gnu.org>
8402
8403 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8404 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8405 versions.
8406
9939e131
PA
84072014-01-08 Pedro Alves <palves@redhat.com>
8408
8409 * server.c (handle_status): Don't discard previous queued stop
8410 replies or thread's pending status here.
8411 (main) <disconnection>: Do it here instead.
8412
b7ea362b
PA
84132014-01-08 Pedro Alves <palves@redhat.com>
8414
8415 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8416 * server.c (visit_actioned_threads, handle_pending_status): New
8417 function.
8418 (handle_v_cont): Factor out parts to ...
8419 (resume): ... this new function. If in all-stop, and a thread
8420 being resumed has a pending status, report it without actually
8421 resuming.
8422 (myresume): Adjust to use the new 'resume' function.
8423 (clear_pending_status_callback, set_pending_status_callback)
8424 (find_status_pending_thread_callback): New functions.
8425 (handle_status): Handle the case of multiple threads having
8426 interesting statuses to report. Report threads' real last signal
8427 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8428 with an interesting thread to report the status for, instead of
8429 always reporting the status of the first thread.
8430
28498c42
JB
84312014-01-01 Joel Brobecker <brobecker@adacore.com>
8432
8433 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8434 * gdbreplay.c (gdbreplay_version): Likewise.
8435
f45c82da
YZ
84362013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8437
8438 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8439 iov.iov_len with the real length in use.
8440
379a5e2d
JB
84412013-12-13 Joel Brobecker <brobecker@adacore.com>
8442
8443 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8444 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8445 for all targets that use win32-low.c.
8446 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8447 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8448
4210d83e
PA
84492013-12-13 Pedro Alves <palves@redhat.com>
8450
8451 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8452 if equal to TARGET_WAITKIND_LOADED.
8453 * win32-low.c (cached_status): New static global.
8454 (win32_wait): Add declaration.
8455 (do_initial_child_stuff): Flush all initial pending debug events
8456 up to the initial breakpoint.
8457 (win32_wait): If CACHED_STATUS was set, return that instead
8458 of doing a real wait. Remove the code resuming the execution
8459 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8460 during the initial phase. Also remove the code changing
8461 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8462 TARGET_WAITKIND_STOPPED.
8463
e7f0d979
YQ
84642013-12-11 Yao Qi <yao@codesourcery.com>
8465
8466 * notif.c (handle_notif_ack): Return 0 if no notification
8467 matches.
8468
ebcf782c
DE
84692013-11-20 Doug Evans <dje@google.com>
8470
8471 * linux-low.c (linux_set_resume_request): Fix comment.
8472
20ad9378
DE
84732013-11-20 Doug Evans <dje@google.com>
8474
8475 * linux-low.c (resume_status_pending_p): Tweak comment.
8476
a196ebeb
WT
84772013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8478
8479 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8480 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8481 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8482 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8483 (srv_amd64_regobj): Add amd64-mpx.o.
8484 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8485 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8486 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8487 * i387-fp.c (num_pl_bnd_register) Added constant.
8488 (num_pl_bnd_cfg_registers) Added constant.
8489 (struct i387_xsave) Added reserved area and MPX fields.
8490 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8491 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8492 function.
8493 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8494 (init_registers_amd64_mpx_linux): Declare new function.
8495 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8496 (x86_64_regmap): Add MPX registers.
8497 (x86_linux_read_description): Add MPX case.
8498 (initialize_low_arch): Initialize MPX targets.
8499
0080a2f6
TT
85002013-11-18 Tom Tromey <tromey@redhat.com>
8501
8502 * configure: Rebuild.
8503 * configure.ac: Don't check for stdlib.h.
8504 * gdbreplay.c: Unconditionally include stdlib.h.
8505
2978b111
TT
85062013-11-18 Tom Tromey <tromey@redhat.com>
8507
8508 * config.in: Rebuild.
8509 * configure: Rebuild.
8510 * configure.ac: Don't use AC_HEADER_DIRENT.
8511
a3d08894
TT
85122013-11-18 Tom Tromey <tromey@redhat.com>
8513
8514 * server.h: Don't check HAVE_STRING_H.
8515 * gdbreplay.c: Don't check HAVE_STRING_H.
8516 * configure: Rebuild.
8517
0a5dd17d
TT
85182013-11-18 Tom Tromey <tromey@redhat.com>
8519
8520 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8521 LIBGNU.
8522
1bd2f0ba
TT
85232013-11-08 Tom Tromey <tromey@redhat.com>
8524
8525 * configure, config.in: Rebuild.
8526 * configure.ac: Remove unused configury.
8527
3266f10b
TT
85282013-11-08 Tom Tromey <tromey@redhat.com>
8529
8530 * acinclude.m4: Include common.m4, codeset.m4.
8531 * configure, config.in: Rebuild.
8532 * configure.ac: Use GDB_AC_COMMON.
8533
6682d959
AA
85342013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8535
8536 * linux-s390-low.c (HWCAP_S390_TE): New define.
8537 (s390_arch_setup): Consider the TE field in the HWCAP for
8538 determining 'have_regset_tdb'.
8539
fd0a4d76
SDJ
85402013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8541
8542 PR gdb/16014
8543 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8544 call to sizeof.
8545
1a3d890b
PA
85462013-10-02 Pedro Alves <palves@redhat.com>
8547
8548 * server.c (process_serial_event): Don't output "GDBserver
8549 exiting" if GDB is connected through stdio.
8550 * target.c (mywait): Likewise, be silent if GDB is connected
8551 through stdio.
8552
97ad4581
JB
85532013-10-01 Joel Brobecker <brobecker@adacore.com>
8554
8555 * lynx-low.c (lynx_add_threads_after_attach): New function.
8556 (lynx_attach): Remove call to add_thread. Add call to
8557 lynx_add_threads_after_attach instead.
8558
5b4e221c
MF
85592013-09-28 Mike Frysinger <vapier@gentoo.org>
8560
8561 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8562 * config.in, configure: Regenerated.
8563
ee47b2f8
YQ
85642013-09-18 Yao Qi <yao@codesourcery.com>
8565
8566 PR server/15959
8567 * server.c (start_inferior): Clear 'resume_info'.
8568
d6707650 85692013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8570
d6707650
JW
8571 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8572 for each register.
8573
9243dd0e 85742013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8575
9243dd0e
JW
8576 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8577 linux-tile-low.o to srv_tgtobj.
8578
c623a6ef
WN
85792013-09-16 Will Newton <will.newton@linaro.org>
8580
8581 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8582 out regs.
8583
fb71d39e
PA
85842013-09-06 Pedro Alves <palves@redhat.com>
8585
8586 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8587 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8588 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8589 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8590 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8591 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8592
8e7e9910
PA
85932013-09-06 Pedro Alves <palves@redhat.com>
8594
8595 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8596 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8597
7c3a12ca
PA
85982013-09-06 Pedro Alves <palves@redhat.com>
8599
8600 * linux-amd64-ipa.c: Include tracepoint.h.
8601 * linux-i386-ipa.c: Include tracepoint.h.
8602
8eb3d7b6
RW
86032013-09-06 Ricard Wanderlof <ricardw@axis.com>
8604
8605 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8606 (ps_get_thread_area): New function.
8607
eddddb9d
RW
86082013-09-06 Ricard Wanderlof <ricardw@axis.com>
8609
8610 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8611 (initialize_low_arch): Call init_registers_crisv32 rather than
8612 init_register_crisv32.
8613
533b0600
PA
86142013-09-05 Pedro Alves <palves@redhat.com>
8615
8616 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8617 to ...
8618 * hostio.h: ... this new file.
8619 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8620 win32-low.c: Include hostio.h.
8621
0ce3d3b5
PA
86222013-09-05 Pedro Alves <palves@redhat.com>
8623
8624 * server.h (gdb_client_data, handler_func, callback_handler_func)
8625 (delete_file_handler, add_file_handler, append_callback_event)
8626 (delete_callback_event, start_event_loop, initialize_event_loop):
8627 Move to event-loop.h and include it.
8628 * event-loop.h: New file.
8629
799cdc37
PA
86302013-09-05 Pedro Alves <palves@redhat.com>
8631
8632 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8633 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8634 (loaded_dll, unloaded_dll): Move to ...
8635 * dll.h: ... this new file.
8636 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8637
6a6bbd9d
PA
86382013-09-05 Pedro Alves <palves@redhat.com>
8639
8640 * server.h (current_process, get_thread_process, all_processes)
8641 (add_inferior_to_list, for_each_inferior, current_inferior)
8642 (remove_inferior, add_process, remove_process, find_process_pid)
8643 (have_started_inferiors_p, have_attached_inferiors_p)
8644 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8645 (clear_inferiors, find_inferior, find_inferior_id)
8646 (inferior_target_data, set_inferior_target_data)
8647 (inferior_regcache_data, set_inferior_regcache_data): Move to
8648 inferiors.h, and include it.
8649 * inferiors.h: New file.
8650
f699aaba
PA
86512013-09-05 Pedro Alves <palves@redhat.com>
8652
8653 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8654 Move ...
72f4393d 8655 * ax.h: ... here.
f699aaba 8656
c144c7a0
PA
86572013-09-05 Pedro Alves <palves@redhat.com>
8658
8659 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8660 tracepoint.h.
8661 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8662 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8663 (handle_tracepoint_general_set, handle_tracepoint_query)
8664 (tracepoint_finished_step, tracepoint_was_hit)
8665 (release_while_stepping_state_list, current_traceframe)
8666 (in_readonly_region, traceframe_read_mem)
8667 (fetch_traceframe_registers, traceframe_read_sdata)
8668 (traceframe_read_info, struct fast_tpoint_collect_status)
8669 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8670 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8671 (supply_fast_tracepoint_registers)
8672 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8673 (ipa_tdesc, claim_trampoline_space)
8674 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8675 (agent_mem_read, agent_get_trace_state_variable_value)
8676 (agent_set_trace_state_variable_value, agent_tsv_read)
8677 (agent_mem_read_string, get_raw_reg_func_addr)
8678 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8679 * tracepoint.h: ... this new file.
8680
ff42e6ab
PA
86812013-09-05 Pedro Alves <palves@redhat.com>
8682
8683 * server.h (perror_with_name, error, fatal, warning, paddress)
8684 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8685 include it.
8686 * utils.h: New file.
8687
541af0f4
PA
86882013-09-05 Pedro Alves <palves@redhat.com>
8689
8690 * server.h (remote_debug, noack_mode, transport_is_reliable)
8691 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8692 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8693 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8694 (write_enn, initialize_async_io, enable_async_io)
8695 (disable_async_io, check_remote_input_interrupt_request)
8696 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8697 (dead_thread_notify, prepare_resume_reply)
8698 (decode_address_to_semicolon, decode_address, decode_m_packet)
8699 (decode_M_packet, decode_X_packet, decode_xfer_write)
8700 (decode_search_memory_packet, unhexify, hexify)
8701 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8702 (look_up_one_symbol, relocate_instruction)
8703 (monitor_output): Move to remote-utils.h, and include it.
8704 * remote-utils.h: New file.
8705
eebdf26b
PA
87062013-09-05 Pedro Alves <palves@redhat.com>
8707
8708 * server.h (_): Delete.
8709
3aafd2ff
PA
87102013-09-02 Pedro Alves <palves@redhat.com>
8711
8712 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8713 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8714 allocated.
8715 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8716
cee83bcb
PM
87172013-09-02 Pierre Muller <muller@sourceware.org>
8718
8719 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8720 or WriteProcessMemory complete successfully and handle
8721 ERROR_PARTIAL_COPY error.
8722
9a13b2fa
PA
87232013-09-02 Pedro Alves <palves@redhat.com>
8724
8725 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8726 error instead of EIO.
8727
602e3198
JK
87282013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8729
8730 PR server/15604
8731 * linux-low.c: Include filestuff.h.
8732 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8733 * lynx-low.c: Include filestuff.h.
8734 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8735 * server.c: Include filestuff.h.
8736 (main): Call notice_open_fds.
8737 * spu-low.c: Include filestuff.h.
8738 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8739
96d7229d
LM
87402013-08-22 Luis Machado <lgustavo@codesourcery.com>
8741
8742 * Makefile.in: Explain why ../target and ../nat are not
8743 listed as include file search paths.
8744 (linux-waitpid.o): New object file rule.
8745 * configure.srv (srv_native_linux_obj): New variable.
8746 Replace all occurrences of linux native object files with
8747 $srv_native_linux_obj.
8748 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8749 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8750 (linux_enable_event_reporting): Remove declaration.
8751 (my_waitpid): Moved to common/linux-waitpid.c.
8752 (linux_wait_for_event): Pass ptid when calling
8753 linux_enable_event_reporting.
8754 (linux_supports_tracefork_flag): Remove.
8755 (linux_enable_event_reporting): Likewise.
8756 (linux_tracefork_grandchild): Remove.
8757 (STACK_SIZE): Moved to common/linux-ptrace.c.
8758 (linux_tracefork_child): Remove.
8759 (linux_test_for_tracefork): Remove.
8760 (linux_look_up_symbols): Call linux_supports_traceclone.
8761 (initialize_low): Remove call to linux_test_for_tracefork.
8762 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8763 common/linux-ptrace.h.
8764 (PTRACE_TYPE_ARG4): Likewise.
8765 Include linux-ptrace.h.
8766
32940073
PA
87672013-08-21 Pedro Alves <palves@redhat.com>
8768
8769 * config.in: Renegerate.
8770
33b60d58 87712013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8772
33b60d58
LM
8773 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8774 (SFILES): Remove $(srcdir)/common/target-common.c and
8775 add $(srcdir)/target/waitstatus.c.
8776 (OBS): Remove target-common.o and add waitstatus.o.
8777 (server_h): Remove $(srcdir)/../common/target-common.h and
8778 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8779 and $(srcdir)/../target/waitstatus.h.
8780 (target-common.o): Remove.
8781 (waitstatus.o): New target object file.
8782 * target.h: Do not include target-common.h and
8783 include target/resume.h, target/wait.h and
8784 target/waitstatus.h.
8785
b8e1b30e
LM
87862013-08-13 Luis Machado <lgustavo@codesourcery.com>
8787
8788 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8789 to PTRACE_TYPE_ARG3.
8790 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8791 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8792 PTRACE_TYPE_ARG4.
8793 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8794 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8795
7a60ad40
YQ
87962013-07-27 Jie Zhang <jie@codesourcery.com>
8797 Daniel Jacobowitz <dan@codesourcery.com>
8798 Yao Qi <yao@codesourcery.com>
8799
8800 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8801 (mips-linux-watch.o): New rule.
8802 (mips_linux_watch_h): New variable.
8803 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8804 srv_tgtobj.
8805 * linux-mips-low.c: Include mips-linux-watch.h.
8806 (struct arch_process_info, struct arch_lwp_info): New.
8807 (update_watch_registers_callback): New function.
8808 (mips_linux_new_process, mips_linux_new_thread) New functions.
8809 (mips_linux_prepare_to_resume, mips_insert_point): New
8810 functions.
8811 (mips_remove_point, mips_stopped_by_watchpoint): New
8812 functions.
8813 (rsp_bp_type_to_target_hw_bp_type): New function.
8814 (mips_stopped_data_address): New function.
8815 (the_low_target): Add watchpoint support functions.
8816
de6f69ad
YQ
88172013-07-27 Yao Qi <yao@codesourcery.com>
8818
8819 * i386-low.c: Include break-common.h.
8820 (enum target_hw_bp_type): Remove.
8821
3360c0bf
LM
88222013-07-24 Luis Machado <lgustavo@codesourcery.com>
8823
8824 * Makefile.in (SFILES): /common/target-common.c.
8825 (OBS): Add target-common.o.
8826 (server_h): Add $(srcdir)/../common/target-common.h.
8827 (target-common.o): New target.
8828 * server.c (queue_stop_reply_callback): Free
8829 status string after use.
8830 * target.c (target_waitstatus_to_string): Remove.
8831 * target.h: Include target-common.h.
8832 (resume_kind): Likewise.
8833 (target_waitkind): Likewise.
8834 (target_waitstatus): Likewise.
8835 (TARGET_WNOHANG): Likewise.
8836
bd885420
YQ
88372013-07-04 Yao Qi <yao@codesourcery.com>
8838
8839 * Makefile.in (host_alias): Use @host_noncanonical@.
8840 (target_alias): Use @target_noncanonical@.
8841 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8842 ACX_NONCANONICAL_HOST.
8843 * configure: Regenerated.
8844
8845 Revert:
8846 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8847
8848 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8849 * configure: Rebuild.
8850 * Makefile.in (version_host, version_target): Get from configure.
8851 (version.c): Use $(version_host) and $(version_target).
8852
17ef446e
PA
88532013-07-03 Pedro Alves <palves@redhat.com>
8854
8855 * Makefile.in (config.status): Depend on development.sh.
8856 * acinclude.m4: Include libmcheck.m4.
8857 * configure: Regenerate.
8858
7a9a7487
MG
88592013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8860
8861 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8862 attribute inside the parentheses.
8863 (winapi_DebugSetProcessKillOnExit): Ditto.
8864 (winapi_DebugBreakProcess): Ditto.
8865 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8866
49b64de6
MG
88672013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8868
8869 * notif.h (notif_event): Add a dummy member to avoid compiler
8870 errors.
8871
d5749ee7
PA
88722013-07-01 Pedro Alves <palves@redhat.com>
8873
8874 * hostio.c (HOSTIO_PATH_MAX): Define.
8875 (require_filename, handle_open, handle_unlink, handle_readlink):
8876 Use it.
8877
d8d2a3ee
PA
88782013-07-01 Pedro Alves <palves@redhat.com>
8879
8880 * server.h: Include "pathmax.h".
8881 * linux-low.c: Don't include sys/param.h.
8882 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8883 MAXPATHLEN.
8884 * win32-low.c: Don't include sys/param.h.
8885 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8886
bc7dea8d
PA
88872013-07-01 Pedro Alves <palves@redhat.com>
8888
8889 * event-loop.c: Don't check HAVE_UNISTD_H before including
8890 <unistd.h>.
8891 * gdbreplay.c: Likewise.
8892 * remote-utils.c: Likewise.
8893 * server.c: Likewise.
8894 * configure.ac: Don't check for unistd.h.
8895 * configure: Regenerate.
8896
d6c2da54
TT
88972013-06-28 Tom Tromey <tromey@redhat.com>
8898
8899 * Makefile.in (version.c): Use version.in, not
8900 common/version.in.
8901
257b6bec
MG
89022013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8903
8904 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8905 * configure: Rebuild.
8906 * Makefile.in (version_host, version_target): Get from configure.
8907 (version.c): Use $(version_host) and $(version_target).
8908
86ebe149
DK
89092013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8910
8911 Fix trace-status to output user name without trailing colon.
8912 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8913
f30aa5af
DK
89142013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8915
8916 Fix trace-status to output proper start-time and stop-time.
8917 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8918 output start time and stop time in hex as gdb expects.
8919
28a93511
YQ
89202013-06-26 Pedro Alves <pedro@codesourcery.com>
8921
8922 * tracepoint.c (build_traceframe_info_xml): Output trace state
8923 variables present in the trace buffer.
8924
01208463
TT
89252013-06-24 Tom Tromey <tromey@redhat.com>
8926
8927 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8928 create-version.sh.
8929 (version.o): Remove.
8930 * gdbreplay.c: Include version.h.
8931 (version, host_name): Don't declare.
8932 * server.h: Include version.h.
8933 (version, host_name): Don't declare.
8934
760256f9
PA
89352013-06-12 Pedro Alves <palves@redhat.com>
8936
8937 * linux-x86-low.c (linux_is_elf64): Delete global.
8938 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8939 with local linux_pid_exe_is_elf_64_file use.
8940
030031ee
PA
89412013-06-11 Pedro Alves <palves@redhat.com>
8942
8943 * linux-low.c (regset_disabled, disable_regset): New functions.
8944 (regsets_fetch_inferior_registers)
8945 (regsets_store_inferior_registers): Use them.
8946 (initialize_regsets_info); Don't allocate the disabled_regsets
8947 array here.
8948 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8949 comment.
8950
5da6eb0a
PA
89512013-06-11 Pedro Alves <palves@redhat.com>
8952
8953 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8954 xmalloc.
8955
7e5aaa09
PA
89562013-06-11 Pedro Alves <palves@redhat.com>
8957
8958 * linux-x86-low.c (initialize_low_arch): Call
8959 init_registers_x32_avx_linux.
8960
d878444c
JK
89612013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8962
8963 Fix compatibility with Android Bionic.
8964 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8965 it is not empty.
8966
3aee8918
PA
89672013-06-07 Pedro Alves <palves@redhat.com>
8968
5f2b57b5 8969 PR server/14823
3aee8918
PA
8970 * Makefile.in (OBS): Add tdesc.o.
8971 (IPA_OBJS): Add tdesc-ipa.o.
8972 (tdesc-ipa.o): New rule.
8973 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8974 interface.
8975 * linux-low.c (new_inferior): Delete.
8976 (disabled_regsets, num_regsets): Delete.
8977 (linux_add_process): Adjust to set the new per-process
8978 new_inferior flag.
8979 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8980 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8981 was a stop. When calling arch_setup, switch the current inferior
8982 to the thread that got an event.
8983 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8984 (regsets_fetch_inferior_registers)
8985 (regsets_store_inferior_registers): New regsets_info parameter.
8986 Adjust to use it.
8987 (linux_register_in_regsets): New regs_info parameter. Adjust to
8988 use it.
8989 (register_addr, fetch_register, store_register): New usrregs_info
8990 parameter. Adjust to use it.
8991 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8992 parameter regs_info. Adjust to use it.
8993 (linux_fetch_registers): Get the current inferior's regs_info, and
8994 adjust to use it.
8995 (linux_store_registers): Ditto.
8996 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8997 (initialize_low): Don't initialize the target_regsets here. Call
8998 initialize_low_arch.
8999 * linux-low.h (target_regsets): Delete declaration.
9000 (struct regsets_info): New.
9001 (struct usrregs_info): New.
9002 (struct regs_info): New.
9003 (struct process_info_private) <new_inferior>: New field.
9004 (struct linux_target_ops): Delete the num_regs, regmap, and
9005 regset_bitmap fields. New field regs_info.
9006 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9007 * i387-fp.c (num_xmm_registers): Delete.
9008 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9009 calls to new interface.
9010 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9011 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9012 Infer the number of xmm registers from the regcache's target
9013 description.
9014 * i387-fp.h (num_xmm_registers): Delete.
9015 * inferiors.c (add_thread): Don't install the thread's regcache
9016 here.
9017 * proc-service.c (gregset_info): Fetch the current inferior's
9018 regs_info. Adjust to use it.
9019 * regcache.c: Include tdesc.h.
9020 (register_bytes, reg_defs, num_registers)
9021 (gdbserver_expedite_regs): Delete.
9022 (get_thread_regcache): If the thread doesn't have a regcache yet,
9023 create one, instead of aborting gdbserver.
9024 (regcache_invalidate_one): Rename to ...
9025 (regcache_invalidate_thread): ... this.
9026 (regcache_invalidate_one): New.
9027 (regcache_invalidate): Only invalidate registers of the current
9028 process.
9029 (init_register_cache): Add target_desc parameter, and use it.
9030 (new_register_cache): Ditto. Assert the target description has a
9031 non zero registers_size.
9032 (regcache_cpy): Add assertions. Adjust.
9033 (realloc_register_cache, set_register_cache): Delete.
9034 (registers_to_string, registers_from_string): Adjust.
9035 (find_register_by_name, find_regno, find_register_by_number)
9036 (register_cache_size): Add target_desc parameter, and use it.
9037 (free_register_cache_thread, free_register_cache_thread_one)
9038 (regcache_release, register_cache_size): New.
9039 (register_size): Add target_desc parameter, and use it.
9040 (register_data, supply_register, supply_register_zeroed)
9041 (supply_regblock, supply_register_by_name, collect_register)
9042 (collect_register_as_string, collect_register_by_name): Adjust.
9043 * regcache.h (struct target_desc): Forward declare.
9044 (struct regcache) <tdesc>: New field.
9045 (init_register_cache, new_register_cache): Add target_desc
9046 parameter.
9047 (regcache_invalidate_thread): Declare.
9048 (regcache_invalidate_one): Delete declaration.
9049 (regcache_release): Declare.
9050 (find_register_by_number, register_cache_size, register_size)
9051 (find_regno): Add target_desc parameter.
9052 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9053 declarations.
9054 * remote-utils.c: Include tdesc.h.
9055 (outreg, prepare_resume_reply): Adjust.
9056 * server.c: Include tdesc.h.
9057 (gdbserver_xmltarget): Delete declaration.
9058 (get_features_xml, process_serial_event): Adjust.
9059 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9060 declare.
9061 (struct process_info) <tdesc>: New field.
9062 (ipa_tdesc): Declare.
9063 * tdesc.c: New file.
9064 * tdesc.h: New file.
9065 * tracepoint.c: Include tdesc.h.
9066 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9067 (get_context_regcache): Adjust to pass ipa_tdesc down.
9068 (do_action_at_tracepoint): Adjust to get the register cache size
9069 from the context regcache's description.
9070 (traceframe_walk_blocks): Adjust to get the register cache size
9071 from the current trace frame's description.
9072 (traceframe_get_pc): Adjust to get current trace frame's
9073 description and pass it down.
9074 (gdb_collect): Adjust to get the register cache size from the
9075 IPA's description.
9076 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9077 (gdbserver_xmltarget): Delete.
9078 (initialize_low_tracepoint): Set the ipa's target description.
9079 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9080 (initialize_low_tracepoint): Set the ipa's target description.
9081 * linux-x86-low.c: Include tdesc.h.
9082 [__x86_64__] (is_64bit_tdesc): New.
9083 (ps_get_thread_area, x86_get_thread_area): Use it.
9084 (i386_cannot_store_register): Rename to ...
9085 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9086 (i386_cannot_fetch_register): Rename to ...
9087 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9088 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9089 to new interface.
9090 (target_regsets): Rename to ...
9091 (x86_regsets): ... this.
9092 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9093 interface.
9094 (x86_siginfo_fixup): Use is_64bit_tdesc.
9095 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9096 (tdesc_x32_avx_linux, tdesc_x32_linux)
9097 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9098 Declare.
9099 (x86_linux_update_xmltarget): Delete.
9100 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9101 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9102 (AMD64_LINUX_USER64_CS): New.
9103 (x86_linux_read_description): New, based on
9104 x86_linux_update_xmltarget.
9105 (same_process_callback): New.
9106 (x86_arch_setup_process_callback): New.
9107 (x86_linux_update_xmltarget): New.
9108 (x86_regsets_info): New.
9109 (amd64_linux_regs_info): New.
9110 (i386_linux_usrregs_info): New.
9111 (i386_linux_regs_info): New.
9112 (x86_linux_regs_info): New.
9113 (x86_arch_setup): Reimplement.
9114 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9115 (x86_emit_ops): Ditto.
9116 (the_low_target): Adjust. Install x86_linux_regs_info,
9117 x86_cannot_fetch_register, and x86_cannot_store_register.
9118 (initialize_low_arch): New.
9119 * linux-ia64-low.c (tdesc_ia64): Declare.
9120 (ia64_fetch_register): Adjust.
9121 (ia64_usrregs_info, regs_info): New globals.
9122 (ia64_regs_info): New function.
9123 (the_low_target): Adjust.
9124 (initialize_low_arch): New function.
9125 * linux-sparc-low.c (tdesc_sparc64): Declare.
9126 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9127 Adjust.
9128 (sparc_arch_setup): New function.
9129 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9130 (the_low_target): Adjust.
9131 (initialize_low_arch): New function.
9132 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9133 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9134 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9135 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9136 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9137 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9138 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9139 (tdesc_powerpc_isa205_vsx64l): Declare.
9140 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9141 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9142 (ppc_set_pc, ppc_get_hwcap): Adjust.
9143 (ppc_usrregs_info): Forward declare.
9144 (!__powerpc64__) ppc_regmap_adjusted: New global.
9145 (ppc_arch_setup): Adjust to the current process'es target
9146 description.
9147 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9148 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9149 (ppc_store_evrregset): Adjust.
9150 (target_regsets): Rename to ...
9151 (ppc_regsets): ... this, and make static.
9152 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9153 (ppc_regs_info): New function.
9154 (the_low_target): Adjust.
9155 (initialize_low_arch): New function.
9156 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9157 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9158 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9159 (tdesc_s390x_linux64v2): Declare.
9160 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9161 (s390_fill_gregset, s390_store_last_break): Adjust.
9162 (target_regsets): Rename to ...
9163 (s390_regsets): ... this, and make static.
9164 (s390_get_pc, s390_set_pc): Adjust.
9165 (s390_get_hwcap): New target_desc parameter, and use it.
9166 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9167 (s390_arch_setup): Adjust to set the current process'es target
9168 description. Don't adjust the regmap.
9169 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9170 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9171 (regs_info_3264): New globals.
9172 (s390_regs_info): New function.
9173 (the_low_target): Adjust.
9174 (initialize_low_arch): New function.
9175 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9176 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9177 [__mips64] (init_registers_mips_linux)
9178 (init_registers_mips_dsp_linux): Delete defines.
9179 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9180 (have_dsp): New global.
9181 (mips_read_description): New, based on mips_arch_setup.
9182 (mips_arch_setup): Reimplement.
9183 (get_usrregs_info): New function.
9184 (mips_cannot_fetch_register, mips_cannot_store_register)
9185 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9186 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9187 (target_regsets): Rename to ...
9188 (mips_regsets): ... this, and make static.
9189 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9190 (dsp_regs_info, regs_info): New globals.
9191 (mips_regs_info): New function.
9192 (the_low_target): Adjust.
9193 (initialize_low_arch): New function.
9194 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9195 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9196 Declare.
9197 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9198 (arm_read_description): New, with bits factored from
9199 arm_arch_setup.
9200 (arm_arch_setup): Reimplement.
9201 (target_regsets): Rename to ...
9202 (arm_regsets): ... this, and make static.
9203 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9204 (arm_regs_info): New function.
9205 (the_low_target): Adjust.
9206 (initialize_low_arch): New function.
9207 * linux-m68k-low.c (tdesc_m68k): Declare.
9208 (target_regsets): Rename to ...
9209 (m68k_regsets): ... this, and make static.
9210 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9211 (m68k_regs_info): New function.
9212 (m68k_arch_setup): New function.
9213 (the_low_target): Adjust.
9214 (initialize_low_arch): New function.
9215 * linux-sh-low.c (tdesc_sharch): Declare.
9216 (target_regsets): Rename to ...
9217 (sh_regsets): ... this, and make static.
9218 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9219 (sh_regs_info, sh_arch_setup): New functions.
9220 (the_low_target): Adjust.
9221 (initialize_low_arch): New function.
9222 * linux-bfin-low.c (tdesc_bfin): Declare.
9223 (bfin_arch_setup): New function.
9224 (bfin_usrregs_info, regs_info): New globals.
9225 (bfin_regs_info): New function.
9226 (the_low_target): Adjust.
9227 (initialize_low_arch): New function.
9228 * linux-cris-low.c (tdesc_cris): Declare.
9229 (cris_arch_setup): New function.
9230 (cris_usrregs_info, regs_info): New globals.
9231 (cris_regs_info): New function.
9232 (the_low_target): Adjust.
9233 (initialize_low_arch): New function.
9234 * linux-cris-low.c (tdesc_crisv32): Declare.
9235 (cris_arch_setup): New function.
9236 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9237 (cris_regs_info): New function.
9238 (the_low_target): Adjust.
9239 (initialize_low_arch): New function.
9240 * linux-m32r-low.c (tdesc_m32r): Declare.
9241 (m32r_arch_setup): New function.
9242 (m32r_usrregs_info, regs_info): New globals.
9243 (m32r_regs_info): Adjust.
9244 (initialize_low_arch): New function.
9245 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9246 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9247 (tic6x_usrregs_info): Forward declare.
9248 (tic6x_read_description): New function, based on ...
9249 (tic6x_arch_setup): ... this. Reimplement.
9250 (target_regsets): Rename to ...
9251 (tic6x_regsets): ... this, and make static.
9252 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9253 (tic6x_regs_info): New function.
9254 (the_low_target): Adjust.
9255 (initialize_low_arch): New function.
9256 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9257 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9258 (target_regsets): Rename to ...
9259 (xtensa_regsets): ... this, and make static.
9260 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9261 globals.
9262 (xtensa_arch_setup, xtensa_regs_info): New functions.
9263 (the_low_target): Adjust.
9264 (initialize_low_arch): New function.
9265 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9266 (nios2_arch_setup): Set the current process'es tdesc.
9267 (target_regsets): Rename to ...
9268 (nios2_regsets): ... this.
9269 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9270 (nios2_regs_info): New function.
9271 (the_low_target): Adjust.
9272 (initialize_low_arch): New function.
a261b8f5
PA
9273 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9274 (aarch64_arch_setup): Set the current process'es tdesc.
9275 (target_regsets): Rename to ...
9276 (aarch64_regsets): ... this.
9277 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9278 (aarch64_regs_info): New function.
9279 (the_low_target): Adjust.
9280 (initialize_low_arch): New function.
3aee8918
PA
9281 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9282 globals.
9283 (target_regsets): Rename to ...
9284 (tile_regsets): ... this.
9285 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9286 (tile_regs_info): New function.
9287 (tile_arch_setup): Set the current process'es tdesc.
9288 (the_low_target): Adjust.
9289 (initialize_low_arch): New function.
9290 * spu-low.c (tdesc_spu): Declare.
9291 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9292 * win32-arm-low.c (tdesc_arm): Declare.
9293 (arm_arch_setup): New function.
9294 (the_low_target): Install arm_arch_setup instead of
9295 init_registers_arm.
9296 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9297 (init_windows_x86): Rename to ...
9298 (i386_arch_setup): ... this. Set `win32_tdesc'.
9299 (the_low_target): Adjust.
9300 * win32-low.c (win32_tdesc): New global.
9301 (child_add_thread): Don't create the thread cache here.
9302 (do_initial_child_stuff): Set the new process'es tdesc.
9303 * win32-low.h (struct target_desc): Forward declare.
9304 (win32_tdesc): Declare.
9305 * lynx-i386-low.c (tdesc_i386): Declare global.
9306 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9307 * lynx-low.c (lynx_tdesc): New global.
9308 (lynx_add_process): Set the new process'es tdesc.
9309 * lynx-low.h (struct target_desc): Forward declare.
9310 (lynx_tdesc): Declare global.
9311 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9312 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9313 * nto-low.c (nto_tdesc): New global.
9314 (do_attach): Set the new process'es tdesc.
9315 * nto-low.h (struct target_desc): Forward declare.
9316 (nto_tdesc): Declare.
9317 * nto-x86-low.c (tdesc_i386): Declare.
9318 (nto_x86_arch_setup): Set `nto_tdesc'.
9319
b1fbec62
GB
93202013-06-04 Gary Benson <gbenson@redhat.com>
9321
9322 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9323 to qSupported response when appropriate.
9324 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9325 with nonzero-length annex.
9326 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9327 arguments supplied in annex.
9328
d1ec4ce7
DE
93292013-05-31 Doug Evans <dje@google.com>
9330
ac44adcb 9331 PR server/15594
d1ec4ce7
DE
9332 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9333 64 bits in 64-cross-32 environment.
9334
9b25f2d3
PA
93352013-05-28 Pedro Alves <palves@redhat.com>
9336
9337 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9338 (aarch64-without-fpu.c): Delete rule.
9339 * configure.srv (aarch64*-*-linux*): Remove references to
9340 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9341 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9342 declaration.
9343
6740dc9c
PA
93442013-05-24 Pedro Alves <palves@redhat.com>
9345
9346 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9347 instead of strchr/decode_address. Error if the range isn't split
9348 with a ','. Don't assume there's be a ':' in the action.
9349
c2d6af84
PA
93502013-05-23 Yao Qi <yao@codesourcery.com>
9351 Pedro Alves <palves@redhat.com>
9352
9353 * linux-low.c (lwp_in_step_range): New function.
9354 (linux_wait_1): If the thread was range stepping and stopped
9355 outside the stepping range, report the stop to GDB. Otherwise,
9356 continue stepping. Add range stepping debug output.
9357 (linux_set_resume_request): Copy the step range from the resume
9358 request to the lwp.
9359 (linux_supports_range_stepping): New.
9360 (linux_target_ops) <supports_range_stepping>: Set to
9361 linux_supports_range_stepping.
9362 * linux-low.h (struct linux_target_ops)
9363 <supports_range_stepping>: New field.
9364 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9365 * linux-x86-low.c (x86_supports_range_stepping): New.
9366 (the_low_target) <supports_range_stepping>: Set to
9367 x86_supports_range_stepping.
9368 * server.c (handle_v_cont): Handle 'r' action.
9369 (handle_v_requests): Append ";r" if the target supports range
9370 stepping.
9371 * target.h (struct thread_resume) <step_range_start,
9372 step_range_end>: New fields.
9373 (struct target_ops) <supports_range_stepping>:
9374 New field.
9375 (target_supports_range_stepping): New macro.
9376
58794e1a
JB
93772013-05-17 Joel Brobecker <brobecker@adacore.com>
9378
9379 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9380 confusion in comment.
9381
d631c5a7
JB
93822013-05-17 Joel Brobecker <brobecker@adacore.com>
9383
9384 * lynx-low.c (struct process_info_private): New type.
9385 (lynx_add_process): New function.
9386 (lynx_create_inferior, lynx_attach): Replace calls to
9387 add_process by calls to lynx_add_process.
9388 (lynx_resume): If PTID is null, then try using
9389 current_process()->private->last_wait_event_ptid.
9390 Add comments.
9391 (lynx_clear_inferiors): Delete. The contents of that function
9392 has been inlined in lynx_mourn;
9393 (lynx_wait_1): Save the ptid in the process's private data.
9394 (lynx_mourn): Free the process' private data. Replace call
9395 to lynx_clear_inferiors by call to clear_inferiors.
9396
96f7a20f
YQ
93972013-05-17 Yao Qi <yao@codesourcery.com>
9398
9399 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9400 the right place.
9401
db0dfaa0
LM
94022013-05-16 Luis Machado <lgustavo@codesourcery.com>
9403
9404 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9405 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9406 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9407 PT_TEXT_END_ADDR guards. Update comments.
9408 (linux_target_op) <read_offsets>: Conditionally define to
9409 linux_read_offsets if the target is UCLIBC and if it defines
9410 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9411
68f5f838
SL
94122013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9413 Andrew Jenner <andrew@codesourcery.com>
9414
9415 * Makefile.in (SFILES): Add linux-nios2-low.c.
9416 (clean): Add action to delete nios2-linux.c.
9417 (nios2-linux.c): New rule.
9418 * configure.srv: Add nios2*-*-linux*.
9419 * linux-nios2-low.c: New.
9420
1ebff1fd
HAQ
94212013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9422
9423 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9424
f6150862
HZ
94252013-04-25 Hui Zhu <hui@codesourcery.com>
9426
9427 PR gdb/15186
f6150862
HZ
9428 * ax.c (ax_printf): Add fflush.
9429
614c279d
TT
94302013-04-22 Tom Tromey <tromey@redhat.com>
9431
9432 * Makefile.in (SFILES): Add filestuff.c.
9433 (OBS): Add filestuff.o.
9434 (filestuff.o): New target.
9435 * config.in, configure: Rebuild.
9436 * configure.ac: Check for fdwalk, pipe2.
9437
7d4e5717
PA
94382013-04-17 Pedro Alves <palves@redhat.com>
9439
9440 * configure.ac (USE_THREAD_DB): Delete variable.
9441 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9442 Don't AC_SUBST USE_THREAD_DB.
9443 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9444 * config.in, configure: Regenerate.
9445
d5c93e41
PA
94462013-04-16 Pedro Alves <palves@redhat.com>
9447
9448 * linux-low.h (struct lwp_info) <thread_known>: Move under
9449 the USE_THREAD_DB #ifdef.
9450
04f5fe89
PA
94512013-04-16 Pedro Alves <palves@redhat.com>
9452
9453 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9454 (linux-low.o): Delete rule.
9455 * linux-low.h: Always include "gdb_thread_db.h" instead of
9456 conditionally including thread_db.h.
9457 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9458 HAVE_THREAD_DB_H.
9459
480b27bf
JK
94602013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9461
9462 * Makefile.in (install-only): Fix make install regression.
9463
43662968
JK
94642013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9465
9466 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9467 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9468 installation.
9469 * gdbserver.1: Remove.
9470
3e74e146
PA
94712013-03-22 Pedro Alves <palves@redhat.com>
9472
9473 * linux-low.c (handle_extended_wait): Don't call
9474 linux_enable_event_reporting.
9475
a8347a2a
TT
94762013-03-15 Tony Theodore <tonyt@logyst.com>
9477
9478 PR build/9098:
9479 * Makefile.in (SHELL): Use @SHELL@.
9480
eeb56fa7
SDJ
94812013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9482
9483 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9484 compiler warning.
9485
4fa7e2ff
JB
94862013-03-13 Joel Brobecker <brobecker@adacore.com>
9487
9488 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9489 Remove extraneous NULL element.
9490
8ddb1965
YQ
94912013-03-13 Yao Qi <yao@codesourcery.com>
9492
9493 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9494 'V' block in trace frame.
9495
9accd112
MM
94962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9497
9498 * target.h (struct target_ops): Add btrace ops.
9499 (target_supports_btrace): New macro.
9500 (target_enable_btrace): New macro.
9501 (target_disable_btrace): New macro.
9502 (target_read_btrace): New macro.
9503 * gdbthread.h (struct thread_info): Add btrace field.
9504 * server.c: Include btrace-common.h.
9505 (handle_btrace_general_set): New function.
9506 (handle_btrace_enable): New function.
9507 (handle_btrace_disable): New function.
9508 (handle_general_set): Call handle_btrace_general_set.
9509 (handle_qxfer_btrace): New function.
9510 (struct qxfer qxfer_packets[]): Add btrace entry.
9511 * inferiors.c (remove_thread): Disable btrace.
9512 * linux-low: Include linux-btrace.h.
9513 (linux_low_enable_btrace): New function.
9514 (linux_low_read_btrace): New function.
9515 (linux_target_ops): Add btrace ops.
9516 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9517 Add srv_linux_btrace=yes.
9518 (x86_64-*-linux*): Add linux-btrace.o.
9519 Add srv_linux_btrace=yes.
9520 * configure.ac: Define HAVE_LINUX_BTRACE.
9521 * config.in: Regenerated.
9522 * configure: Regenerated.
9523
5cc22e4c
MM
95242013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9525
9526 * server.c (handle_qxfer): Preserve error message if -3 is
9527 returned.
9528 (qxfer): Document the -3 return value.
9529
7c97f91e
MM
95302013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9531
9532 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9533 (linux_btrace_h): New variable.
9534 (linux-btrace.o): New rule.
9535
be9a119c 95362013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9537 Hafiz Abid Qadeer <abidh@codesourcery.com>
9538
9539 * tracepoint.c (trace_buffer_size): New global.
9540 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9541 (init_trace_buffer): Change to one-argument function. Allocate
9542 trace buffer memory.
9543 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9544 handle QTBuffer:size packet.
9545 (cmd_bigqtbuffer_size): New function.
9546 (initialize_tracepoint): Call init_trace_buffer with
9547 DEFAULT_TRACE_BUFFER_SIZE.
9548 * server.c (handle_query): Add QTBuffer:size in the
9549 supported packets.
9550
e64f7499
YQ
95512013-03-07 Yao Qi <yao@codesourcery.com>
9552
9553 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9554 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9555 of -1.
9556 (cmd_qtsp): Adjust condition. Do post increment.
9557 Set cur_action and cur_step_action back to 0.
9558
f0ae6fc3
PA
95592013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9560
9561 PR server/15236
9562 * linux-low.c (linux_write_memory): Return early success if LEN is
9563 zero.
9564
b5b0b0af
CV
95652013-03-05 Corinna Vinschen <vinschen@redhat.de>
9566
334ad4a8 9567 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9568
589bc927
TT
95692013-02-28 Tom Tromey <tromey@redhat.com>
9570
9571 * configure.ac: Invoke AC_SYS_LARGEFILE.
9572 * configure, config.in: Rebuild.
9573
dfe07582
CV
95742013-02-28 Corinna Vinschen <vinschen@redhat.com>
9575
9576 * win32-low.c: Throughout, fix format strings and casts of
9577 printf-like functions to avoid type related warnings on all
9578 platforms.
9579 (get_child_debug_event): Print dwDebugEventCode as hex since
9580 that's how it's usually documented.
9581
736cd585
YQ
95822013-02-28 Yao Qi <yao@codesourcery.com>
9583
9584 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9585 pulongest.
9586
e1f58301
JW
95872013-02-27 Jiong Wang <jiwang@tilera.com>
9588
9589 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9590 (reg-tilegx32.c): New rule.
9591 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9592 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9593 different register info initializer according to elf class.
9594 (init_registers_tilgx32): New function. The tilegx32 register info
9595 initializer.
9596 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9597 (tile_store_gregset): Likewise.
9598
d171ca78
YQ
95992013-02-27 Yao Qi <yao@codesourcery.com>
9600
9601 * server.c (process_point_options): Print debug message when
9602 debug_threads is true.
9603
282bbdf3
YQ
96042013-02-26 Yao Qi <yao@codesourcery.com>
9605
9606 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9607
aca22551
PA
96082013-02-19 Pedro Alves <palves@redhat.com>
9609 Kai Tietz <ktietz@redhat.com>
9610
9611 PR gdb/15161
9612
9613 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9614 instead of strtoul to extract address from packet.
9615 (process_serial_event) <'z'>: Likewise.
9616
4f3cee1c
YQ
96172013-02-18 Yao Qi <yao@codesourcery.com>
9618
9619 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9620
8e1d55a3
PA
96212013-02-14 Pedro Alves <palves@redhat.com>
9622
9623 Plug memory leak.
9624
9625 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9626 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9627
458820da
PA
96282013-02-14 Pedro Alves <palves@redhat.com>
9629
9630 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9631
baea0dae
PA
96322013-02-14 Pedro Alves <palves@redhat.com>
9633
9634 * tracepoint.c (save_string): Delete.
9635 (add_tracepoint_action): Use savestring instead of save_string.
9636
0b1afbb3
PA
96372013-02-12 Pedro Alves <palves@redhat.com>
9638
9639 * linux-xtensa-low.c: Ditto.
9640 * xtensa-xtregs.c: Ditto.
9641
8a4ac37e
PA
96422013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9643
9644 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9645 thread_db.
9646
148de6bb
MS
96472013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9648
9649 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9650 aarch64_num_wp_regs and aarch64_num_bp_regs to
9651 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9652
55fac6e0
MS
96532013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9654
9655 * linux-aarch64-low.c (ps_get_thread_area): Replace
9656 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9657
176eb98c
MS
96582013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9659 Marcus Shawcroft <marcus.shawcroft@arm.com>
9660 Nigel Stephens <nigel.stephens@arm.com>
9661 Yufeng Zhang <yufeng.zhang@arm.com>
9662
9663 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9664 (aarch64.c, aarch64-without-fpu.c): New targets.
9665 * configure.srv (aarch64*-*-linux*): New.
9666 * linux-aarch64-low.c: New file.
9667
56f7af9c
MS
96682013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9669
43aaf8b6 9670 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9671 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9672 (dequeue_one_deferred_signal, linux_resume_one_thread)
9673 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9674 (linux_tracefork_grandchild, linux_test_for_tracefork)
9675 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9676 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9677 where the argument is 0.
9678
60f662b0
YQ
96792013-01-25 Yao Qi <yao@codesourcery.com>
9680
9681 * event-loop.c: Include "queue.h".
9682 (gdb_event_p): New typedef.
9683 (struct gdb_event) <next_event>: Remove.
9684 (event_queue): Change to QUEUE(gdb_event_p).
9685 (async_queue_event): Remove.
9686 (gdb_event_xfree): New.
9687 (initialize_event_loop): New.
9688 (process_event): Use API from QUEUE.
9689 (wait_for_event): Likewise.
9690 * server.c (main): Call initialize_event_loop.
9691 * server.h (initialize_event_loop): Declare.
9692
5ae4861a
YQ
96932013-01-18 Yao Qi <yao@codesourcery.com>
9694
9695 * ax.h (struct eval_agent_expr_context): New.
9696 (gdb_eval_agent_expr): Update declaration.
9697 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9698 TFRAME. Add new argument CTX.
9699 * server.h (struct eval_agent_expr_context): Declare.
9700 (agent_mem_read, agent_tsv_read): Update declaration.
9701 (agent_mem_read_string): Likewise.
9702 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9703 (add_traceframe_block): Add new argument TPOINT.
9704 Increase TPOINT->traceframe_usage.
9705 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9706 eval_tracepoint_agent_expr.
9707 (condition_true_at_tracepoint): Likewise.
9708 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9709 (agent_mem_read_string, agent_tsv_read): Likewise.
9710
85e00e85
YQ
97112013-01-16 Yao Qi <yao@codesourcery.com>
9712
9713 * linux-low.c (linux_resume_one_lwp): Don't check
9714 'lwp->bp_reinsert != 0'.
9715
4039cf45
JB
97162013-01-07 Joel Brobecker <brobecker@adacore.com>
9717 Pedro Alves <palves@redhat.com>
9718
9719 * lynx-low.c (ptrace_request_to_str): Define a temporary
9720 macro and use it to simplify this function's implementation.
9721
9044dee2
JB
97222013-01-07 Joel Brobecker <brobecker@adacore.com>
9723
9724 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9725 sets errno.
9726
e6352c8f
JB
97272013-01-07 Joel Brobecker <brobecker@adacore.com>
9728
9729 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9730
50681a27
JB
97312013-01-07 Joel Brobecker <brobecker@adacore.com>
9732
9733 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9734
3f6e77ef
JB
97352013-01-07 Joel Brobecker <brobecker@adacore.com>
9736
9737 * lynx-low.c (lynx_resume): Use the resume_info parameter
9738 to determine the ptid for the lynx_ptrace call, unless
9739 it is equal to minus_one_ptid, in which case we use the
9740 ptid of the current_inferior.
9741 (lynx_wait_1): After having received a thread create/exit
9742 event, resume the inferior's execution using the signaling
9743 thread's ptid, rather than the old ptid.
9744
7fda33ae
JB
97452013-01-07 Joel Brobecker <brobecker@adacore.com>
9746
9747 * lynx-low.c (lynx_resume): Delete variable ret.
9748
b9786c74
JB
97492013-01-01 Joel Brobecker <brobecker@adacore.com>
9750
9751 * gdbreplay.c (gdbreplay_version): Update copyright year.
9752 * server.c (gdbserver_version): Likewise.
9753
8b93d60f
JB
97542012-12-17 Joel Brobecker <brobecker@adacore.com>
9755
9756 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9757 new thread.
9758
037335a7
JB
97592012-12-17 Joel Brobecker <brobecker@adacore.com>
9760
9761 * lynx-low.c (ptrace_request_to_str): Add handling for
9762 PTRACE_GETTRACESIG.
9763
52d4cbd8
JB
97642012-12-17 Joel Brobecker <brobecker@adacore.com>
9765
9766 * lynx-low.c (lynx_attach): Delete variable new_process.
9767
ab8f6ca9
JB
97682012-12-17 Joel Brobecker <brobecker@adacore.com>
9769
9770 * lynx-low.c (lynx_create_inferior): Delete variable
9771 new_process.
9772
78cbc024
JB
97732012-12-17 Joel Brobecker <brobecker@adacore.com>
9774
9775 * lynx-low.c (ptrace_request_to_str): Do not handle
9776 PTRACE_GETTHREADLIST if this macro does not exist.
9777
14a00470
YQ
97782012-12-15 Yao Qi <yao@codesourcery.com>
9779
9780 * Makefile.in (OBS): Add notif.o.
9781 * notif.c, notif.h: New.
9782 * server.c: Include "notif.h".
9783 (struct vstop_notif) <next>: Remove.
9784 <base>: New field.
9785 (queue_stop_reply): Update.
9786 (push_event, send_next_stop_reply): Remove.
9787 (discard_queued_stop_replies): Update.
9788 (notif_stop): New variable.
9789 (handle_v_stopped): Remove.
9790 (handle_v_requests): Don't call handle_v_stopped. Call
9791 handle_ack_notif instead.
9792 (queue_stop_reply_callback): Call notif_event_enque instead
9793 of queue_stop_reply.
9794 (handle_status): Don't call send_next_stop_reply, call
9795 notif_write_event instead.
9796 (kill_inferior_callback): Likewise.
9797 (detach_or_kill_inferior_callback): Likewise.
9798 (main): Call initialize_notif.
9799 (process_serial_event): Call QUEUE_is_empty.
9800 (handle_target_event): Call notif_push instead of push event.
9801 * server.h (push_event): Remove declaration.
9802
61c125b9
TT
98032012-12-10 Tom Tromey <tromey@redhat.com>
9804
9805 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9806 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9807 macros.
9808 (.c.o): Rewrite.
9809 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9810 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9811 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9812 (amd64-linux-ipa.o, ax.o): Rewrite.
9813 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9814 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9815 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9816 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9817 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9818 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9819 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9820 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9821 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9822 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9823 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9824 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9825 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9826 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9827 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9828 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9829 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9830 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9831 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9832 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9833 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9834 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9835 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9836 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9837 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9838 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9839 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9840 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9841 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9842 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9843 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9844 (reg-tilegx.o): Remove.
9845 (all_object_files): New macro.
9846 Include .deps files.
9847 * aclocal.m4, configure: Rebuild.
9848 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9849 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9850 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9851
e90e9ad9
TT
98522012-12-05 Tom Tromey <tromey@redhat.com>
9853
9854 PR gdb/14917:
9855 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9856
02d403bf 98572012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9858
9859 * configure.ac: Check for linux/perf_event.h.
9860 * config.in: Regenerated.
9861 * configure: Regenerated.
9862
0270a750
PA
98632012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9864
9865 * hostio.c (handle_readlink): Decrease buffer size
9866 parameter passed to readlink by one byte.
9867
8c29b58e
YQ
98682012-11-26 Yao Qi <yao@codesourcery.com>
9869
9870 * configure.ac (build_warnings): Append '-Wempty-body'.
9871 * configure: Regenerated.
9872 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9873 body.
9874
8bdce1ff
PM
98752012-11-15 Pierre Muller <muller@sourceware.org>
9876
9877 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9878 * config.in: Regenerate.
9879 * configure: Regenerate.
9880 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9881 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9882 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9883 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9884 header.
9885 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9886 instead of <sys/wait.h> header.
9887 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9888
02d403bf 98892012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9890
9891 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9892 (various make rules): Remove -DGDBSERVER
9893
fbd5db48
YQ
98942012-11-09 Yao Qi <yao@codesourcery.com>
9895
9896 * spu-low.c (current_ptid): Move it to ..
9897 * gdbthread.h: ... here. New.
9898 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9899 * server.c (myresume, process_serial_event): Likewise.
9900 * thread-db.c (thread_db_find_new_threads): Likewise.
9901 * tracepoint.c (run_inferior_command): Likewise.
9902
b3dc46ff
AB
99032012-10-01 Andrew Burgess <aburgess@broadcom.com>
9904
9905 * server.c (handle_search_memory_1): Include access length in
9906 warning message.
9907
07c04788
HPN
99082012-09-05 Michael Brandt <michael.brandt@axis.com>
9909
9910 * linux-crisv32-low.c: Fix compile errors.
9911
918d227b
YQ
99122012-09-04 Yao Qi <yao@codesourcery.com>
9913
9914 * tracepoint.c (cmd_qtsv): Adjust debug message.
9915 Don't check CUR_TPOINT.
9916
18c1b81a
YQ
99172012-08-28 Yao Qi <yao@codesourcery.com>
9918
9919 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9920 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9921 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9922 Remove declarations of xmalloc, xreallloc, xstrdup and
9923 freeargv.
9924 * Makefile.in (libiberty_h): New.
9925 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9926 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9927
dc82f37b
YQ
99282012-08-23 Yao Qi <yao@codesourcery.com>
9929
9930 * server.h: Remove declaration of 'xsnprintf'.
9931
406b1477
KS
99322012-08-22 Keith Seitz <keiths@redhat.com>
9933
9934 * server.h: Include build-gnulib-gbserver/config.h.
9935 * gdbreplay.c: Likewise.
9936
e6712ff1
DE
99372012-08-08 Doug Evans <dje@google.com>
9938
9939 * Makefile.in (SFILES): Add gdb_vecs.c.
9940 (OBS): Add gdb_vecs.o.
9941 (gdb_vecs_h, host_defs_h): New variables.
9942 (thread-db.o): Add $(gdb_vecs_h) dependency.
9943 (gdb_vecs.o): New rule.
9944 * thread-db.c: #include "gdb_vecs.h".
9945 (thread_db_load_search): Use a vector to iterate over path elements.
9946 Handle text appearing after "$pdir".
9947
9948 * configure.ac: Add check for strstr.
9949 * config.in: Regenerate.
9950 * configure: Regenerate.
9951
7c3270ae
UW
99522012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9953
9954 * hostio.c (handle_pread): If pread fails, fall back to attempting
9955 lseek/read.
9956 (handle_pwrite): Likewise for pwrite.
9957
b62e2b27
UW
99582012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9959
9960 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9961 between unsupported TYPE and unimplementable ADDR/LEN combination.
9962 (arm_insert_point): Act on new return value.
9963
78a99e91
PA
99642012-07-31 Pedro Alves <palves@redhat.com>
9965
9966 * server.c (process_point_options): Only skip tokens if we find
9967 one that is unrecognized. Don't treat 'X' specially while
9968 skipping unrecognized tokens.
9969
fcf303ab
UW
99702012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9971
9972 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9973 to 4-byte-align HW breakpoint addresses for Thumb.
9974
7255706c
YQ
99752012-07-27 Yao Qi <yao@codesourcery.com>
9976
9977 PR remote/14161.
9978
9979 * server.h: Declare gdb_agent_about_to_close.
9980 * target.c (kill_inferior): Include "agent.h".
9981 New. Send command 'kill'.
9982 * target.h (kill_inferior): Removed macro.
9983 * tracepoint.c (gdb_agent_about_to_close): New.
9984 (gdb_agent_helper_thread): Handle command 'close'.
9985 Wait endlessly until the inferior stops.
9986 Install gdb_agent_remove_socket to atexit hook.
9987 (agent_socket_name): New static variable.
9988 (gdb_agent_socket_init): Replace local variable 'name' with
9989 'agent_socket_name'.
9990 (gdb_agent_remove_socket): New.
9991
5a3f286f
YQ
99922012-07-27 Yao Qi <yao@codesourcery.com>
9993
9994 * server.c (process_point_options): Stop at 'X' when parsing.
9995
961bd387
ME
99962012-07-19 Michael Eager <eager@eagercon.com>
9997
a261b8f5 9998 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9999 to hw_execute.
10000 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10001 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10002 hardware breakpoint.
10003
aa7c7447
JK
100042012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10005
10006 * gdbserver/linux-low.c (initialize_low): Call
10007 linux_ptrace_init_warnings.
10008
7f216e7c
DE
100092012-07-02 Doug Evans <dje@google.com>
10010
10011 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10012 pointer to int.
10013
d3ce09f5
SS
100142012-07-02 Stan Shebs <stan@codesourcery.com>
10015
10016 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10017 (ax.o): Add it to build rule.
10018 (ax-ipa.o): Ditto.
10019 (OBS): Add format.o.
10020 (IPA_OBS): Add format.o.
10021 * server.c (handle_query): Claim support for breakpoint commands.
10022 (process_point_options): Add command case.
10023 (process_serial_event): Leave running if there are printfs in
10024 effect.
10025 * mem-break.h (any_persistent_commands): Declare.
10026 (add_breakpoint_commands): Declare.
10027 (gdb_no_commands_at_breakpoint): Declare.
10028 (run_breakpoint_commands): Declare.
10029 * mem-break.c (struct point_command_list): New struct.
10030 (struct breakpoint): New field command_list.
10031 (any_persistent_commands): New function.
10032 (add_commands_to_breakpoint): New function.
10033 (add_breakpoint_commands): New function.
10034 (gdb_no_commands_at_breakpoint): New function.
10035 (run_breakpoint_commands): New function.
10036 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10037 locally.
10038 * ax.c: Include format.h.
10039 (ax_printf): New function.
10040 (gdb_eval_agent_expr): Add printf opcode.
10041
2f8f6aed
YQ
100422012-06-13 Yao Qi <yao@codesourcery.com>
10043
10044 * server.c (start_inferior): Remove duplicated writes to fields
10045 'last_resume_kind' and 'last_status' of 'current_inferior'.
10046
0c9070b3
YQ
100472012-06-12 Yao Qi <yao@codesourcery.com>
10048 Pedro Alves <palves@redhat.com>
10049
10050 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10051 comment.
10052 * server.c (handle_v_cont): Extend comment.
10053
c52daf70
YQ
100542012-06-11 Yao Qi <yao@codesourcery.com>
10055
10056 * linux-low.c (linux_attach): Add 'static'.
10057
d38bbb0a
YQ
100582012-06-06 Yao Qi <yao@codesourcery.com>
10059
10060 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10061
89dc0afd
JK
100622012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10063
10064 Fix gcc -flto compilation warning.
10065 * server.c (main): Make variable multi_mode and attach volatile.
10066
75f62ce7
TJB
100672012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10068
10069 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10070 if the platform doesn't know about it.
10071
65f479b6
PA
100722012-05-30 Jeff Kenton <jkenton@tilera.com>
10073
10074 * Makefile.in (SFILES): Add linux-tile-low.c.
10075 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10076 * configure.srv: Handle tilegx-*-linux*.
10077 * linux-tile-low.c: New file.
10078
0c5bf5a9
JK
100792012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10080
10081 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10082
a493e3e2
PA
100832012-05-24 Pedro Alves <palves@redhat.com>
10084
10085 PR gdb/7205
10086
43aaf8b6 10087 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10088
2ea28649
PA
100892012-05-24 Pedro Alves <palves@redhat.com>
10090
10091 PR gdb/7205
10092
10093 Replace target_signal with gdb_signal throughout.
10094
8d409d16
MR
100952012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10096
10097 * linux-low.c (linux_store_registers): Avoid the copying sequence
10098 when no data has been retrieved by ptrace.
10099
23512c01
MGD
101002012-05-22 Will Deacon <will.deacon@arm.com>
10101
10102 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10103 Include asm/ptrace.h.
10104 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10105 already defined.
10106
4934b29e
MR
101072012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10108
10109 * linux-low.c (linux_store_registers): Don't re-retrieve data
10110 with ptrace that has already been obtained from /proc. Always
10111 copy any data retrieved with ptrace to the buffer supplied.
10112
bde24c0a
PA
101132012-05-11 Yao Qi <yao@codesourcery.com>
10114 Pedro Alves <palves@redhat.com>
10115
10116 * linux-low.c (enum stopping_threads_kind): New.
10117 (stopping_threads): Change type to `enum stopping_threads_kind'.
10118 (handle_extended_wait): If stopping and suspending threads, leave
10119 the new_lwp suspended too.
10120 (linux_wait_for_event): Adjust.
10121 (stop_all_lwps): Set `stopping_threads' to
10122 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10123 whether we're suspending threads or just stopping them. Assert no
10124 recursion happens.
10125
623b6bdf
YQ
101262012-04-29 Yao Qi <yao@codesourcery.com>
10127
10128 * server.h: Move some code to ...
10129 * gdbthread.h: ... here. New.
10130 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10131 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10132 (nto-low.o, win32-low.o): Likewise.
10133 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10134 * regcache.c, remote-utils.c, server.c: Likewise.
10135 * target.c, tracepoint.c, win32-low.c: Likewise.
10136
f15f9948
TJB
101372012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10138
10139 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10140 (PTRACE_ARG4_TYPE): Likewise.
10141 (PTRACE_XFER_TYPE): Likewise.
10142 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10143 ptrace to PTRACE_ARG3_TYPE.
10144 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10145 (PTRACE_ARG4_TYPE): Likewise.
10146 (PTRACE_XFER_TYPE): Likewise.
10147 (linux_detach_one_lwp): Cast fourth argument of
10148 ptrace to long then PTRACE_ARG4_TYPE.
10149 (regsets_fetch_inferior_registers): Cast third argument of
10150 ptrace to long then PTRACE_ARG3_TYPE.
10151 (regsets_store_inferior_registers): Likewise.
10152
38ea300a
PA
101532012-04-20 Pedro Alves <palves@redhat.com>
10154
10155 * configure: Regenerate.
10156
c971b7fa
PA
101572012-04-19 Pedro Alves <palves@redhat.com>
10158
43aaf8b6 10159 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10160 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10161 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10162 (all, install-only, uninstall, clean-info, all-lib, clean): No
10163 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10164 (maintainer-clean realclean distclean): Use subdir_do.
10165 (subdir_do): New.
10166 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10167 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10168 * acinclude.m4: Include acx_configure_dir.m4.
10169 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10170 calls. Call AC_PROG_RANLIB. Configure gnulib using
10171 ACX_CONFIGURE_DIR.
10172 (GNULIB): New.
10173 (GNULIB_STDINT_H): Adjust.
10174 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10175 * gdbreplay.c: Include build-gnulib/config.h.
10176 * server.h: Likewise.
10177 * aclocal.m4: Regenerate.
10178 * config.in: Regenerate.
10179 * configure: Regenerate.
c971b7fa 10180
809277f8
PA
101812012-04-19 Pedro Alves <palves@redhat.com>
10182
10183 * Makefile.in (LIBGNU, INCGNU): Adjust.
10184 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10185 (all, install-only, uninstall, clean-info, all-lib, clean)
10186 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10187 * configure.ac: Adjust AC_OUTPUT output.
10188 * aclocal.m4: Regenerate.
10189 * configure: Regenerate.
10190
fd9bb8b8
PA
101912012-04-19 Pedro Alves <palves@redhat.com>
10192
10193 * Makefile.in (generated_files): New.
10194 (server_h): Remove the explicit dependency on config.h, and depend
10195 on $generated_files.
10196
1c298c66
PA
101972012-04-19 Pedro Alves <palves@redhat.com>
10198
10199 * Makefile.in (INCGNU): Add -Ignulib.
10200
57c4b50b
PA
102012012-04-19 Pedro Alves <palves@redhat.com>
10202
10203 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10204 (INCGNU): ... this, and spell out -I here.
10205 (GNULIB_LIB): Rename to ...
10206 (LIBGNU): ... this.
10207 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10208
1030e047
PA
102092012-04-19 Pedro Alves <palves@redhat.com>
10210
10211 * config.in: Regenerate.
10212
447d4319
PA
102132012-04-19 Pedro Alves <palves@redhat.com>
10214
10215 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10216 * server.h (memmem): Remove declaration.
10217 * config.in: Regenerate.
10218 * configure: Regenerate.
10219
aad9eab9
YQ
102202012-04-19 Yao Qi <yao@codesourcery.com>
10221
10222 * Makefile.in (SFILES): Add common/vec.c.
10223 (OBS): Add vec.o.
10224 (vec.o): New rule.
10225
3e10640f
YQ
102262012-04-19 Yao Qi <yao@codesourcery.com>
10227
10228 * remote-utils.c (prepare_resume_reply): Replace with macro
10229 target_core_of_thread.
10230 * server.c (handle_qxfer_threads_proper): Likewise.
10231 * target.h (traget_core_of_thread): New macro.
10232
71622373
PA
102332012-04-18 Pedro Alves <palves@redhat.com>
10234
10235 * aclocal.m4: Regenerate.
10236 * configure: Regenerate.
10237
80d26939
YQ
102382012-04-16 Yao Qi <yao@codesourcery.com>
10239
10240 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10241 duplicated on address.
10242
42476b70
YQ
102432012-04-16 Yao Qi <yao@codesourcery.com>
10244
10245 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10246 (struct tracepoint_action_ops) <send>: New field.
10247 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10248 (agent_expr_send, x_tracepoint_action_send): New.
10249 (l_tracepoint_action_send): New.
10250 (cmd_qtdp): Download and install tracepoint
10251 according to `use_agent'.
10252 (run_inferior_command): Add one more parameter `len'.
10253 Update callers.
10254 (tracepoint_send_agent): New.
10255 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10256
7bc83639
YQ
102572012-04-16 Yao Qi <yao@codesourcery.com>
10258
10259 * tracepoint.c (download_tracepoints): Moved to ...
10260 (cmd_qtstart): ... here.
10261
5f18041e
YQ
102622012-04-14 Yao Qi <yao@codesourcery.com>
10263
10264 * tracepoint.c: Include inttypes.h.
10265 (struct collect_memory_action): Use sized types.
10266 (struct tracepoint): Likewise.
10267 (cmd_qtdp, stop_tracing): Update print specifiers.
10268 (cmd_qtp, response_tracepoint): Likewise.
10269 (collect_data_at_tracepoint): Likewise.
10270 (collect_data_at_step): Likewise.
10271
55a8c076
YQ
102722012-04-14 Yao Qi <yao@codesourcery.com>
10273
10274 Import gnulib module inttypes.
10275 * aclocal.m4, config.in, configure: Regenerated.
10276
dc750257
YQ
102772012-04-14 Yao Qi <yao@codesourcery.com>
10278
10279 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10280 Makefile and config.status at last.
10281
0ab5faf9
YQ
102822012-04-13 Yao Qi <yao@codesourcery.com>
10283
10284 * tracepoint.c: Include stdint.h unconditionally.
10285
18f5fd81
TJB
102862012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10287
10288 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10289 on BFD_HAVE_SYS_PROCFS_TYPE.
10290 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10291 * configure: Regenerate.
10292 * config.in: Likewise.
10293
4d47af5c
L
102942012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10295
10296 * Makefile.in (clean): Also remove x32.c x32-linux.c
10297 x32-avx.c x32-avx-linux.c.
10298 (x32.o): New target.
10299 (x32.c): Likewise.
10300 (x32-linux.o): Likewise.
10301 (x32-linux.c): Likewise.
10302 (x32-avx.o): Likewise.
10303 (x32-avx.c): Likewise.
10304 (x32-avx-linux.o): Likewise.
10305 (x32-avx-linux.c): Likewise.
10306
10307 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10308 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10309 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10310 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10311 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10312 i386/x32-avx-linux.xml.
10313
10314 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10315 (init_registers_x32_avx_linux): Likwise.
10316 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10317 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10318
ecedbe58
PA
103192012-04-13 Pedro Alves <palves@redhat.com>
10320
10321 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10322 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10323 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10324 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10325 the sub-make.
10326
c92b5177
L
103272012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10328
10329 * linux-x86-low.c (compat_x32_clock_t): New.
10330 (compat_x32_siginfo_t): Likewise.
10331 (compat_x32_siginfo_from_siginfo): Likewise.
10332 (siginfo_from_compat_x32_siginfo): Likewise.
10333 (linux_is_elf64): Likewise.
10334 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10335 and siginfo_from_compat_x32_siginfo for x32.
10336 (x86_arch_setup): Set linux_is_elf64.
10337
214d508e
L
103382012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10339
10340 PR gdb/13969
10341 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10342 e_machine field.
10343 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10344 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10345 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10346 compatible with process.
10347
c9a1864a
YQ
103482012-04-12 Yao Qi <yao@codesourcery.com>
10349
10350 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10351 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10352 (install-only, install-info, clean): Handle sub dir gnulib.
10353 (all-lib, am--refresh): New targets.
10354 (memmem.o): Remove target.
10355 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10356 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10357 (AC_REPLACE_FUNCS): Remove memmem.
10358 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10359 (AC_OUTPUT): Generate Makefile in gnulib/.
10360 * aclocal.m4, config.in, configure: Regenerated.
10361
367ba2c2
MR
103622012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10363
10364 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10365
9d236627
PA
103662012-04-05 Pedro Alves <palves@redhat.com>
10367
10368 -Werror=strict-aliasing
10369
10370 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10371 pointer.
10372
111217b3
PA
103732012-04-04 Pedro Alves <palves@redhat.com>
10374
10375 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10376 (sparc_store_gregset_from_stack, sparc_store_gregset)
10377 (sparc_breakpoint_at): Fix formatting.
10378
8365dcf5
TJB
103792012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10380
10381 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10382 are available.
10383 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10384 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10385 * config.in: Regenerate.
10386 * configure: Likewise.
10387
689cc2ae
PA
103882012-03-29 Pedro Alves <palves@redhat.com>
10389
10390 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10391 Correct ptrace arguments.
10392
c14dfd32
PA
103932012-03-28 Pedro Alves <palves@redhat.com>
10394
10395 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10396 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10397 (IA64_FR1_REGNUM): New defines.
10398 (ia64_fetch_register): New.
10399 (the_low_target): Install it.
10400 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10401 field.
10402 * linux-low.c (linux_fetch_registers): Try the
10403 the_low_target.fetch_register hook first.
10404
10405 * linux-arm-low.c (the_low_target): Adjust.
10406 * linux-bfin-low.c (the_low_target): Adjust.
10407 * linux-cris-low.c (the_low_target): Adjust.
10408 * linux-crisv32-low.c (the_low_target): Adjust.
10409 * linux-m32r-low.c (the_low_target): Adjust.
10410 * linux-m68k-low.c (the_low_target): Adjust.
10411 * linux-mips-low.c (the_low_target): Adjust.
10412 * linux-ppc-low.c (the_low_target): Adjust.
10413 * linux-s390-low.c (the_low_target): Adjust.
10414 * linux-sh-low.c (the_low_target): Adjust.
10415 * linux-sparc-low.c (the_low_target): Adjust.
10416 * linux-tic6x-low.c (the_low_target): Adjust.
10417 * linux-x86-low.c (the_low_target): Adjust.
10418 * linux-xtensa-low.c (the_low_target): Adjust.
10419
63c88e13
PA
104202012-03-26 Pedro Alves <palves@redhat.com>
10421
10422 * server.c (handle_qxfer_libraries): Don't bail early if
10423 the_target->qxfer_libraries_svr4 is not NULL.
10424
fb723180
PA
104252012-03-26 Pedro Alves <palves@redhat.com>
10426
10427 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10428
0afae3cf
PA
104292012-03-23 Pedro Alves <palves@redhat.com>
10430
10431 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10432 "library-list-svr4" element's start tag when the the DSO list is
10433 empty.
10434
485f1ee4
PA
104352012-03-23 Pedro Alves <palves@redhat.com>
10436
10437 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10438 a variable whose type size is the same as the inferior's pointer
10439 size.
10440
a5362b9a
TS
104412012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10442
10443 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10444 struct siginfo.
10445 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10446 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10447 * linux-low.h: Include <signal.h>.
10448 (struct siginfo): Remove forward declaration.
10449 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10450 struct siginfo.
10451
d226c142
MF
104522012-03-21 Mike Frysinger <vapier@gentoo.org>
10453
10454 * .gitignore: Ignore more files.
10455
122f36ef
PA
104562012-03-19 Pedro Alves <palves@redhat.com>
10457 Jan Kratochvil <jan.kratochvil@redhat.com>
10458
10459 * server.c (cont_thread, general_thread): Add describing comments.
10460 (start_inferior): Clear `cont_thread'.
10461 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10462 of a process.
10463
fc3e5175
YQ
104642012-03-15 Yao Qi <yao@codesourcery.com>
10465
10466 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10467 handling to ...
10468 (cmd_qtdp): ... here.
10469
8d0d92cd
YQ
104702012-03-15 Yao Qi <yao@codesourcery.com>
10471
10472 * tracepoint.c (struct tracepoint_action_ops): New.
10473 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10474 (m_tracepoint_action_download): New.
10475 (r_tracepoint_action_download): New.
10476 (x_tracepoint_action_download): New.
10477 (l_tracepoint_action_download): New.
10478 (add_tracepoint_action): Install `action->ops' according type.
10479 (download_tracepoint_1): Move code `download' function pointer
10480 of various tracepoint_action_ops.
10481
87b0bb13
JK
104822012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10483
10484 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10485 linux_ptrace_attach_warnings.
10486
5f572dec
JK
104872012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10488
10489 * Makefile.in (linux-ptrace.o): New.
10490 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10491 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10492 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10493 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10494 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10495 of these targets.
10496 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10497
f4647387
YQ
104982012-03-08 Yao Qi <yao@codesourcery.com>
10499 Pedro Alves <palves@redhat.com>
10500
10501 Fix PR server/13392.
10502 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10503 offset of JMP insn.
10504 * tracepoint.c (remove_tracepoint): New.
10505 (cmd_qtdp): Call remove_tracepoint when failed to install.
10506
9b224c5e
PA
105072012-03-07 Pedro Alves <palves@redhat.com>
10508
10509 * linux-low.c (get_detach_signal): New.
10510 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10511 Pass on pending signals to PTRACE_DETACH. Check the result of the
10512 ptrace call.
10513 * server.c (program_signals, program_signals_p): New.
10514 (handle_general_set): Handle QProgramSignals.
10515 * server.h (program_signals, program_signals_p): Declare.
10516
e237a7e2
JK
105172012-03-05 Pedro Alves <palves@redhat.com>
10518 Jan Kratochvil <jan.kratochvil@redhat.com>
10519
10520 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10521 New comment why.
10522
5808517f
YQ
105232012-03-03 Yao Qi <yao@codesourcery.com>
10524
10525 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10526 agent_look_up_symbols.
10527
58b4daa5
YQ
105282012-03-03 Yao Qi <yao@codesourcery.com>
10529
10530 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10531 (linux-x86-low.o): Likewise.
10532 * server.h: Remove in_process_agent_loaded.
10533 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10534 common/agent.c.
10535 Update callers.
10536
8ffcbaaf
YQ
105372012-03-03 Yao Qi <yao@codesourcery.com>
10538
10539 * tracepoint.c (gdb_agent_capability): New global.
10540 (in_process_agent_loaded_ust): Renamed to
10541 `in_process_agent_supports_ust'.
10542 Update callers.
10543 (in_process_agent_supports_ust): Call agent_capability_check.
10544 (clear_installed_tracepoints): Assert that agent supports
10545 agent.
10546
d1feda86
YQ
105472012-03-03 Yao Qi <yao@codesourcery.com>
10548
10549 * linux-low.c (linux_supports_agent): New.
10550 (linux_target_ops): Initialize field `supports_agent' with
10551 linux_supports_agent.
10552 * target.h (struct target_ops) <supports_agent>: New.
10553 (target_supports_agent): New macro.
10554 * server.c (handle_general_set): Handle packet 'QAgent'.
10555 (handle_query): Send `QAgent+'.
10556 * Makefile.in (server.o): Depends on agent.h.
10557
2fa291ac
YQ
105582012-03-03 Yao Qi <yao@codesourcery.com>
10559
10560 * Makefile.in (OBS): Add agent.o.
10561 Add new rule for agent.o.
10562 Track dependence of tracepoint.c on agent.h.
10563 * tracepoint.c (run_inferior_command_1):
10564 (run_inferior_command): Call agent_run_command.
10565 (gdb_ust_connect_sync_socket): Deleted. Move it to
10566 common/agent.c.
10567 (resume_thread, stop_thread): Likewise.
10568 (gdb_ust_socket_init): Renamed to ...
10569 (gdb_agent_socket_init): ... New.
10570 (gdb_ust_thread): Renamed to ...
10571 (gdb_agent_helper_thread): ... New.
10572 (gdb_ust_init): Move some code to ...
10573 (gdb_agent_init): ... here. New.
10574 [HAVE_UST]: Call gdb_ust_init.
10575 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10576 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10577 * config.in, configure: Regenerated.
10578
05044653
PA
105792012-03-02 Pedro Alves <palves@redhat.com>
10580
10581 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10582 * linux-low.c (struct simple_pid_list): New.
10583 (stopped_pids): New a struct simple_pid_list pointer.
10584 (add_to_pid_list, pull_pid_from_list): New.
10585 (handle_extended_wait): Don't assume the first signal new children
10586 report is SIGSTOP. Adjust call to pull_pid_from_list.
10587 (linux_wait_for_lwp): Adjust.
10588
8d00225b
YQ
105892012-03-02 Yao Qi <yao@codesourcery.com>
10590
10591 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10592 debug log.
10593
19560ba5
YQ
105942012-03-02 Yao Qi <yao@codesourcery.com>
10595
10596 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10597 `stop_pc' and `tpoint'. Update caller.
10598
1faeff08
MR
105992012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10600
10601 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10602 * linux-low.c (use_linux_regsets): New macro.
10603 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10604 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10605 (linux_register_in_regsets): New function.
10606 (usr_fetch_inferior_registers): Skip registers covered by
10607 regsets.
10608 (usr_store_inferior_registers): Likewise.
10609 (usr_fetch_inferior_registers): New macro.
10610 (usr_store_inferior_registers): Likewise.
10611 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10612 (linux_store_registers): Likewise.
10613 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10614 prototype.
10615 (init_registers_mips64_dsp_linux): Likewise.
10616 (init_registers_mips_linux): New macro.
10617 (init_registers_mips_dsp_linux): Likewise.
10618 (mips_dsp_num_regs): Likewise.
10619 (DSP_BASE, DSP_CONTROL): New fallback macros.
10620 (mips_base_regs): New macro.
10621 (mips_regmap): Use it. Fix the size.
10622 (mips_dsp_regmap): New variable.
10623 (mips_dsp_regset_bitmap): Likewise.
10624 (mips_arch_setup): New function.
10625 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10626 than mips_regmap.
10627 (mips_cannot_store_register): Likewise.
10628 (the_low_target): Update .arch_setup, .num_regs and .regmap
10629 initializers. Add .regset_bitmap initializer.
10630 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10631 initializer.
10632 * linux-bfin-low.c (the_low_target): Likewise.
10633 * linux-cris-low.c (the_low_target): Likewise.
10634 * linux-crisv32-low.c (the_low_target): Likewise.
10635 * linux-ia64-low.c (the_low_target): Likewise.
10636 * linux-m32r-low.c (the_low_target): Likewise.
10637 * linux-m68k-low.c (the_low_target): Likewise.
10638 * linux-ppc-low.c (the_low_target): Likewise.
10639 * linux-s390-low.c (the_low_target): Likewise.
10640 * linux-sh-low.c (the_low_target): Likewise.
10641 * linux-sparc-low.c (the_low_target): Likewise.
10642 * linux-tic6x-low.c (the_low_target): Likewise.
10643 * linux-x86-low.c (the_low_target): Likewise.
10644 * linux-xtensa-low.c (the_low_target): Likewise.
10645 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10646 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10647 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10648 srv_xmlfiles.
10649 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10650 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10651
c03e6ccc
YQ
106522012-02-29 Yao Qi <yao@codesourcery.com>
10653 Pedro Alves <palves@redhat.com>
10654
10655 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10656 `step_over_finished' is true.
10657
644cebc9
PA
106582012-02-27 Pedro Alves <palves@redhat.com>
10659
10660 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10661 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10662
c14d7ab2
PA
106632012-02-27 Pedro Alves <palves@redhat.com>
10664
10665 PR server/9684
10666 * linux-low.c (pid_is_stopped): New.
10667 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10668
412c89dd
LM
106692012-02-25 Luis Machado <lgustavo@codesourcery.com>
10670
10671 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10672 of conditions.
10673
b745defe
MR
106742012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10675
10676 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10677
9f3a5c85
LM
106782012-02-24 Luis Machado <lgustavo@codesourcery>
10679
10680 * server.c (handle_query): Advertise support for target-side
10681 breakpoint condition evaluation.
10682 (process_point_options): New function.
10683 (process_serial_event): When inserting a breakpoint, check for
10684 a target-side condition that should be evaluated.
10685
10686 * mem-break.c: Include regcache.h and ax.h.
10687 (point_cond_list_t): New data structure.
10688 (breakpoint) <cond_list>: New field.
10689 (find_gdb_breakpoint_at): Make non-static.
10690 (delete_gdb_breakpoint_at): Clear any target-side
10691 conditions.
10692 (clear_gdb_breakpoint_conditions): New function.
10693 (add_condition_to_breakpoint): Likewise.
10694 (add_breakpoint_condition): Likewise.
10695 (gdb_condition_true_at_breakpoint): Likewise.
10696 (gdb_breakpoint_here): Return result directly instead
10697 of going through a local variable.
10698
10699 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10700 (clear_gdb_breakpoint_conditions): Likewise.
10701 (add_breakpoint_condition): Likewise.
10702 (gdb_condition_true_at_breakpoint): Likewise.
10703
10704 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10705 (need_step_over_p): Take target-side breakpoint condition into
10706 consideration.
10707
5e1dc496
LM
107082012-02-24 Luis Machado <lgustavo@codesourcery>
10709
10710 * server.h: Include tracepoint.h.
10711 (agent_mem_read, agent_get_trace_state_variable_value,
10712 agent_set_trace_state_variable_value,
10713 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10714 get_set_tsv_func_addr): New prototypes.
10715
10716 * ax.h: New include file.
10717 * ax.c: New source file.
10718
10719 * tracepoint.c: Include ax.h.
10720 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10721 agent_expr, eval_result_type): Move to ax.h.
10722 (parse_agent_expr): Rename to ...
10723 (gdb_parse_agent_expr): ... this, make it non-static and move
10724 to ax.h.
10725 (unparse_agent_expr) Rename to ...
10726 (gdb_unparse_agent_expr): ... this, make it non-static and move
10727 to ax.h.
10728 (eval_agent_expr): Rename to ...
10729 (eval_tracepoint_agent_expr): ... this.
10730 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10731 forward declarations.
10732 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10733 (agent_get_trace_state_variable_value): New function.
10734 (agent_set_trace_state_variable_value): New function.
10735 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10736 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10737 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10738 (condition_true_at_tracepoint): Likewise.
10739 (parse_agent_expr): Rename to ...
10740 (gdb_parse_agent_expr): ... this and move to ax.c.
10741 (unparse_agent_expr): Rename to ...
10742 (gdb_unparse_agent_expr): ... this and move to ax.c.
10743 (gdb_agent_op_name): Move to ax.c.
10744 (eval_agent_expr): Rename to ...
10745 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10746 and move to ax.c.
10747 (eval_tracepoint_agent_expr): New function.
10748 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10749 non-static.
5e1dc496
LM
10750 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10751 ax.c.
10752 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10753 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10754 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10755 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10756 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10757 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10758 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10759 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10760 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10761 (compile_bytecodes): Remove forward declaration.
10762 (is_goto_target): Move to ax.c.
10763 (compile_bytecodes): Move to ax.c and call
10764 agent_get_trace_state_variable_value (...) and
10765 agent_set_trace_state_variable_value (...).
10766
10767 * Makefile.in: Update ax.c and IPA dependencies.
10768
277e4e52
PA
107692012-02-24 Pedro Alves <palves@redhat.com>
10770
10771 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10772 (cmd_bigqtbuffer_circular): ... this. Only handle
10773 'QTBuffer:circular:'.
10774 (handle_tracepoint_general_set): Adjust.
10775
bf4c19f7
YQ
107762012-02-16 Yao Qi <yao@codesourcery.com>
10777
10778 * inferiors.c: Move code to ...
10779 * dll.c: .... here. New.
10780 * server.h: Declare clear_dlls.
10781 * Makefile.in (SFILES): Add dll.c.
10782 (OBS): Add dll.o
10783 (dll.o): New rule.
10784
d73f2619
YQ
107852012-02-11 Yao Qi <yao@codesourcery.com>
10786
10787 * server.c: (handle_monitor_command): Add a new parameter
10788 `own_buf'.
10789 (handle_query): Update caller.
10790
f8255c2a
JB
107912012-02-09 Joel Brobecker <brobecker@adacore.com>
10792
10793 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10794 * configure, config.in: Regenerate.
10795 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10796 is not defined.
10797
da84f473
PA
107982012-02-02 Pedro Alves <palves@redhat.com>
10799
10800 Try SIGKILL first, then PTRACE_KILL.
10801 * linux-low.c (linux_kill_one_lwp): New.
10802 (linux_kill_one_lwp): Rename to ...
10803 (kill_one_lwp_callback): ... this. Use the new
10804 linux_kill_one_lwp.
10805
e886a173
PA
108062012-02-02 Pedro Alves <palves@redhat.com>
10807
10808 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10809 inferior.
10810
be07f1a2
PA
108112012-01-27 Pedro Alves <palves@redhat.com>
10812
10813 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10814 (elf_64_file_p): Make static.
10815 (linux_pid_exe_is_elf_64_file): New.
10816 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10817 Delete declarations.
10818 (linux_pid_exe_is_elf_64_file): Declare.
10819 * linux-x86-low.c (x86_arch_setup): Use
10820 linux_pid_exe_is_elf_64_file.
10821
d8301ad1
JK
108222012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10823
10824 * linux-low.c (linux_wait_for_event_1): Rename to ...
10825 (linux_wait_for_event): ... here and merge it with former
10826 linux_wait_for_event - new variable wait_ptid, use it.
10827 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10828
01b17894
PA
108292012-01-23 Pedro Alves <palves@redhat.com>
10830
10831 * server.c (main): Avoid yet another case of infinite loop while
10832 detaching/killing after a longjmp.
10833
e825046f
JK
108342012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10835
10836 Code cleanup.
10837 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10838
b9e7b9c3
UW
108392012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10840
10841 * hostio.c (handle_readlink): New function.
10842 (handle_vFile): Call it to handle "vFile:readlink" packets.
10843
901f9912
UW
108442012-01-20 Pedro Alves <palves@redhat.com>
10845 Ulrich Weigand <ulrich.weigand@linaro.org>
10846
10847 * server.c (handle_v_requests): Only support vAttach and vRun to
10848 start multiple processes when in extended protocol mode.
10849
fc1ab1a0
PA
108502012-01-17 Pedro Alves <palves@redhat.com>
10851
10852 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10853 memalign plus mprotect to allocate the scratch buffer.
10854
7d5d4e98
PA
108552012-01-13 Pedro Alves <palves@redhat.com>
10856
10857 * server.c (attach_inferior): Clear `cont_thread'.
10858
f128d5e9
PA
108592012-01-13 Pedro Alves <palves@redhat.com>
10860
10861 * server.c (main): Avoid infinite loop while detaching/killing
10862 after a longjmp.
10863
06db92f0
DE
108642012-01-09 Doug Evans <dje@google.com>
10865
10866 * server.c (start_inferior): Set last_ptid in --wrapper case.
10867
32d92999
YQ
108682012-01-06 Yao Qi <yao@codesourcery.com>
10869
10870 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10871 defined.
10872 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10873
5e0a92a9
YQ
108742012-01-04 Yao Qi <yao@codesourcery.com>
10875
10876 * tracepoint.c (cmd_qtdp): Print debug message
10877 for static tracepoint.
10878
ae639e8c
YQ
108792012-01-04 Yao Qi <yao@codesourcery.com>
10880
10881 * tracepoint.c (trace_vdebug): Differentiate debug message
10882 between gdbserver and IPA.
10883
f72429c5
YQ
108842012-01-03 Yao Qi <yao@codesourcery.com>
10885
10886 * tracepoint.c (tracepoint_was_hit): Don't collect for
10887 static tracepoint.
10888
12c3e59c
JB
108892012-01-02 Joel Brobecker <brobecker@adacore.com>
10890
10891 * terminal.h: Reformat copyright header.
10892
67827812
JB
108932012-01-02 Joel Brobecker <brobecker@adacore.com>
10894
10895 * server.c (gdbserver_version): Update copyright year.
10896 * gdbreplay.c (gdbreplay_version): Likewise.
10897
3e52c33d
JK
108982011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10899
10900 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10901
10902 Revert:
10903 2011-12-18 Hui Zhu <teawater@gmail.com>
10904 * linux-low.c (linux_create_inferior): Save return value to ret.
10905
66f1260e
HZ
109062011-12-18 Hui Zhu <teawater@gmail.com>
10907
10908 * linux-low.c (linux_create_inferior): Save return value to ret.
10909
e77616d7
DE
109102011-12-16 Doug Evans <dje@google.com>
10911
e7b06c57
DE
10912 * linux-low.c (linux_create_inferior): If stdio connection,
10913 redirect stdin from /dev/null, stdout to stderr.
10914 * remote-utils.c (remote_is_stdio): New static global.
10915 (remote_connection_is_stdio): New function.
10916 (remote_prepare): Handle stdio connection.
10917 (remote_open): Ditto.
10918 (remote_close): Don't close stdin for stdio connections.
10919 (read_prim,write_prim): New functions. Replace all calls to
10920 read/write to these.
10921 * server.c (main): Watch for "-" argument. Move call to
10922 remote_prepare before start_inferior.
10923 * server.h (STDIO_CONNECTION_NAME): New macro.
10924 (remote_connection_is_stdio): Declare.
10925
e77616d7
DE
10926 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10927 in debugging output.
10928
82067193
YQ
109292011-12-15 Yao Qi <yao@codesourcery.com>
10930
10931 * tracepoint.c: Include sys/syscall.h.
10932 (gdb_ust_thread): Remove preprocessor conditional.
10933
82bfbe7e
PA
109342011-12-14 Pedro Alves <pedro@codesourcery.com>
10935
10936 * linux-low.c (linux_detach_one_lwp): Call
10937 the_low_target.prepare_to_resume before detaching.
10938
712c6575
YQ
109392011-12-14 Yao Qi <yao@codesourcery.com>
10940
10941 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10942 of write.
10943
d54d1edf
YQ
109442011-12-14 Yao Qi <yao@codesourcery.com>
10945
10946 * i386-low.c (i386_low_stopped_data_address): Initialize local
10947 variable `control'.
10948
6210a125
PA
109492011-12-13 Pedro Alves <pedro@codesourcery.com>
10950
10951 PR remote/13492
10952
10953 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10954 DR_CONTROL unless necessary. Extend comments.
10955 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10956 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10957
2ece8244
YQ
109582011-12-13 Yao Qi <yao@codesourcery.com>
10959
10960 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10961 macros.
10962 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10963
784867a5
JK
109642011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10965
10966 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10967 Print new debug message for such case.
10968
6bf36717
JK
109692011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10970
10971 Fix overlapping memcpy.
10972 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10973 the read_inferior_memory transfer.
10974 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10975 write_inferior_memory transfer.
10976 (set_fast_tracepoint_jump): New variable buf. Use it for the
10977 read_inferior_memory and write_inferior_memory transfers.
10978 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10979 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10980 Use it for the write_inferior_memory transfer.
10981 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10982 buffers.
10983
50275556
MR
109842011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10985
10986 * linux-low.c (fetch_register, store_register): Make code
10987 consistent, fix formatting.
10988
7325beb4
MR
109892011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10990
10991 * linux-low.c (usr_store_inferior_registers): Factor out code
10992 to handle individual registers into...
10993 (store_register): ... this new function.
10994
c642a434
UW
109952011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10996
10997 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10998 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10999 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11000 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11001 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11002 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11003 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11004 (srv_xmlfiles): Add new XML files.
11005
11006 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11007 and <sys/uio.h>.
11008 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11009 (init_registers_s390_linux32v1): Add prototype.
11010 (init_registers_s390_linux32v2): Likewise.
11011 (init_registers_s390_linux64v1): Likewise.
11012 (init_registers_s390_linux64v2): Likewise.
11013 (init_registers_s390x_linux64v1): Likewise.
11014 (init_registers_s390x_linux64v2): Likewise.
11015 (s390_num_regs): Increment to 52.
11016 (s390_regmap): Add orig_r2 register.
11017 (s390_num_regs_3264): Increment to 68.
11018 (s390_regmap_3264): Add orig_r2 register.
11019 (s390_collect_ptrace_register): Handle orig_r2 register.
11020 (s390_supply_ptrace_register): Likewise.
11021 (s390_fill_last_break): New function.
11022 (s390_store_last_break): Likewise.
11023 (s390_fill_system_call): New function.
11024 (s390_store_system_call): Likewise.
11025 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11026 register sets.
11027 (s390_check_regset): New function.
11028 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11029 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11030 Update target_regsets for available register sets.
11031
2268b414
JK
110322011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11033 Jan Kratochvil <jan.kratochvil@redhat.com>
11034
11035 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11036 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11037 New.
11038 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11039 * linux-low.h (struct process_info_private): New member r_debug.
11040 * server.c (handle_qxfer_libraries): Call
11041 the_target->qxfer_libraries_svr4.
11042 (handle_qxfer_libraries_svr4): New function.
11043 (qxfer_packets): New entry "libraries-svr4".
11044 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11045 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11046 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11047 PACKET_qXfer_libraries_svr4.
11048
d6db1fab
UW
110492011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11050
11051 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11052 PSW address/mask between 8-byte and 16-byte formats.
11053 (s390_supply_ptrace_register): Likewise.
11054 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11055 basic addressing mode bit.
11056
242f5f1c
SS
110572011-11-24 Stan Shebs <stan@codesourcery.com>
11058
11059 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11060
f196051f
SS
110612011-11-17 Stan Shebs <stan@codesourcery.com>
11062
11063 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11064 (tracing_start_time): New global.
11065 (tracing_stop_time): New global.
11066 (tracing_user_name): New global.
11067 (tracing_notes): New global.
11068 (tracing_stop_note): New global.
11069 (cmd_qtstart): Set traceframe_usage, start_time.
11070 (stop_tracing): Set stop_time.
11071 (cmd_qtstatus): Report additional status.
11072 (cmd_qtp): New function.
11073 (handle_tracepoint_query): Call it.
11074 (cmd_qtnotes): New function.
11075 (handle_tracepoint_general_set): Call it.
11076 (get_timestamp): Rename from tsv_get_timestamp.
11077
405f8e94
SS
110782011-11-14 Stan Shebs <stan@codesourcery.com>
11079 Kwok Cheung Yeung <kcy@codesourcery.com>
11080
11081 * linux-x86-low.c (small_jump_insn): New.
11082 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11083 trampoline and error message, build a trampoline and issue a small
11084 jump instruction to it.
11085 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11086 trampoline and error message.
11087 (x86_get_min_fast_tracepoint_insn_len): New.
11088 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11089 * linux-low.h (struct linux_target_ops): Add arguments to
11090 install_fast_tracepoint_jump_pad operation, add new operation.
11091 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11092 arguments.
11093 (linux_get_min_fast_tracepoint_insn_len): New function.
11094 (linux_target_op): Add new operation.
11095 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11096 (gdb_trampoline_buffer_end): Ditto.
11097 (gdb_trampoline_buffer_error): Ditto.
11098 (struct ipa_sym_addresses): Add fields for new IPA variables.
11099 (symbol_list): Add entries for new IPA variables.
11100 (struct tracepoint): Add fields to hold the address range of the
11101 trampoline used by the tracepoint.
11102 (trampoline_buffer_head): New static variable.
11103 (trampoline_buffer_tail): Ditto.
11104 (claim_trampoline_space): New function.
11105 (have_fast_tracepoint_trampoline_buffer): New function.
11106 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11107 structure.
11108 (install_fast_tracepoint): Ditto, also add error buffer argument.
11109 (cmd_qtminftpilen): New function.
11110 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11111 (fast_tracepoint_from_trampoline_address): New function.
11112 (fast_tracepoint_collecting): Handle trampoline as part of jump
11113 pad space.
11114 (set_trampoline_buffer_space): New function.
11115 (initialize_tracepoint): Initialize new IPA variables.
11116 * target.h (struct target_ops): Add arguments to
11117 install_fast_tracepoint_jump_pad operation, add new
11118 get_min_fast_tracepoint_insn_len operation.
11119 (target_get_min_fast_tracepoint_insn_len): New.
11120 (install_fast_tracepoint_jump_pad): Add arguments.
11121 * server.h (IPA_BUFSIZ): Define.
11122 * linux-i386-ipa.c: Include extra header files.
11123 (initialize_fast_tracepoint_trampoline_buffer): New function.
11124 (initialize_low_tracepoint): Call it.
11125 * server.h (set_trampoline_buffer_space): Declare.
11126 (claim_trampoline_space): Ditto.
11127 (have_fast_tracepoint_trampoline_buffer): Ditto.
11128
1e4d1764
YQ
111292011-11-14 Yao Qi <yao@codesourcery.com>
11130
11131 * server.c (handle_query): Handle InstallInTrace for qSupported.
11132 * tracepoint.c (add_tracepoint): Sort list.
11133 (install_tracepoint, download_tracepoint): New.
11134 (cmd_qtdp): Call them to install and download tracepoints.
11135 (sort_tracepoints): Removed.
11136 (cmd_qtstart): Update.
11137
5c73ff4e
YQ
111382011-11-14 Yao Qi <yao@codesourcery.com>
11139
11140 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11141 * mem-break.h: Declare.
11142 * tracepoint.c (cmd_qtstart): Move some code to ...
11143 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11144 New.
11145 (download_tracepoints): Move some code to ...
11146 (download_tracepoint_1): ... here. New.
11147
86a30030
YQ
111482011-11-08 Yao Qi <yao@codesourcery.com>
11149
11150 * remote-utils.c (relocate_instruction): A comment fix.
11151
8d26e50c
JB
111522011-11-07 Joel Brobecker <brobecker@adacore.com>
11153
11154 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11155 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11156 dr_status_mirror and dr_control_mirror from debug_reg_state.
11157 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11158 (i386_initial_stuff): Remove use of deleted globals.
11159 (i386_get_thread_context, i386_set_thread_context,
11160 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11161 from debug_reg_state.
11162
a59306a3
YQ
111632011-11-05 Yao Qi <yao@codesourcery.com>
11164
11165 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11166 address as TPOINT's.
11167
3065dfb6
SS
111682011-11-02 Stan Shebs <stan@codesourcery.com>
11169
11170 * tracepoint.c (agent_mem_read_string): New function.
11171 (eval_agent_expr): Call it for tracenz.
11172 * server.c (handle_query): Report support for tracenz.
11173
fd0d8c7c
YQ
111742011-11-02 Yao Qi <yao@codesourcery.com>
11175
11176 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11177
609086b1
YQ
111782011-11-02 Yao Qi <yao@codesourcery.com>
11179
11180 * target.h: Fix a typo in comment.
11181
b9fd1791
PA
111822011-10-31 Pedro Alves <pedro@codesourcery.com>
11183
11184 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11185 clobber the breakpoints' shadows with fast tracepoint jumps.
11186 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11187 * target.c (write_inferior_memory): Also pass MYADDR down to
11188 check_mem_write.
11189
03583c20
UW
111902011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11191
11192 * configure.ac: Check support for personality routine.
11193 * configure: Regenerate.
11194 * config.in: Likewise.
11195 * linux-low.c: Include <sys/personality.h>.
11196 Define ADDR_NO_RANDOMIZE if necessary.
11197 (linux_create_inferior): Disable address space randomization when
11198 forking inferior, if requested.
11199 (linux_supports_disable_randomization): New function.
11200 (linux_target_ops): Install it.
11201 * server.h (disable_randomization): Declare.
11202 * server.c (disable_randomization): New global variable.
11203 (handle_general_set): Handle QDisableRandomization.
11204 (handle_query): Likewise for qSupported.
11205 (main): Support --disable-randomization and --no-disable-randomization
11206 command line arguments.
11207 * target.h (struct target_ops): Add supports_disable_randomization.
11208 (target_supports_disable_randomization): New macro.
11209
723b724b
MF
112102011-09-29 Mike Frysinger <vapier@gentoo.org>
11211
11212 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11213 ifdef check.
11214 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11215 [!PT_GETDSBT] (target_loadmap): New definition.
11216 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11217 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11218 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11219 and PT_GETDSBT to LINUX_LOADMAP.
11220 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11221 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11222
55329a5c 112232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11224
11225 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11226 (arm_linux_hwbp_cap): New static variable.
11227 (arm_linux_get_hwbp_cap): Replace by ...
11228 (arm_linux_init_hwbp_cap): ... this new function.
11229 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11230 (arm_linux_get_hw_watchpoint_count): Likewise.
11231 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11232 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11233 (arm_prepare_to_resume): Use perror_with_name instead of error.
11234
55329a5c 112352011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11236
11237 * linux-arm-low.c: Include <signal.h>.
11238 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11239 (struct arm_linux_hwbp_cap): New data type.
11240 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11241 (struct arm_linux_hw_breakpoint): New data type.
11242 (MAX_BPTS, MAX_WPTS): Define.
11243 (struct arch_process_info, struct arch_lwp_info): New data types.
11244 (arm_linux_get_hwbp_cap): New function.
11245 (arm_linux_get_hw_breakpoint_count): Likewise.
11246 (arm_linux_get_hw_watchpoint_count): Likewise.
11247 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11248 (arm_hwbp_control_initialize): Likewise.
11249 (arm_hwbp_control_is_enabled): Likewise.
11250 (arm_hwbp_control_is_initialized): Likewise.
11251 (arm_hwbp_control_disable): Likewise.
11252 (arm_linux_hw_breakpoint_equal): Likewise.
11253 (arm_linux_hw_point_initialize): Likewise.
11254 (struct update_registers_data): New data structure.
11255 (update_registers_callback: New function.
11256 (arm_insert_point): Likewise.
11257 (arm_remove_point): Likewise.
11258 (arm_stopped_by_watchpoint): Likewise.
11259 (arm_stopped_data_address): Likewise.
11260 (arm_new_process): Likewise.
11261 (arm_new_thread): Likewise.
11262 (arm_prepare_to_resume): Likewise.
11263 (the_low_target): Register arm_insert_point, arm_remove_point,
11264 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11265 arm_new_thread, and arm_prepare_to_resume.
11266
6b9801d4
SS
112672011-09-15 Stan Shebs <stan@codesourcery.com>
11268
11269 * server.h (struct emit_ops): Add compare-goto fields.
11270 * tracepoint.c (gdb_agent_op_sizes): New table.
11271 (emit_eq_goto): New function.
11272 (emit_ne_goto): New function.
11273 (emit_lt_goto): New function.
11274 (emit_le_goto): New function.
11275 (emit_gt_goto): New function.
11276 (emit_ge_goto): New function.
11277 (is_goto_target): New function.
11278 (compile_bytecodes): Recognize special cases of compare-goto
11279 combinations and call specialized emitters for them.
11280 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11281 (amd64_emit_ne_goto): New function.
11282 (amd64_emit_lt_goto): New function.
11283 (amd64_emit_le_goto): New function.
11284 (amd64_emit_gt_goto): New function.
11285 (amd64_emit_ge_goto): New function.
11286 (amd64_emit_ops): Add the new functions.
11287 (i386_emit_eq_goto): New function.
11288 (i386_emit_ne_goto): New function.
11289 (i386_emit_lt_goto): New function.
11290 (i386_emit_le_goto): New function.
11291 (i386_emit_gt_goto): New function.
11292 (i386_emit_ge_goto): New function.
11293 (i386_emit_ops): Add the new functions.
11294
bf15cbda
SS
112952011-09-08 Stan Shebs <stan@codesourcery.com>
11296
11297 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11298 (i386_emit_epilogue): Restore %ebx.
11299
943ca1dd
JZ
113002011-08-31 Jie Zhang <jzhang918@gmail.com>
11301
11302 * server.c (step_thread): Remove definition.
11303 (process_serial_event): Don't handle Hs.
11304 * server.h (step_thread): Remove declaration.
11305 * target.c (set_desired_inferior): Remove use of step_thread.
11306
e3deef73
LM
113072011-08-24 Luis Machado <lgustavo@codesourcery.com>
11308
11309 * linux-low.c: Include linux-procfs.h.
11310 (linux_attach_lwp_1): Update comments.
11311 (linux_attach): Scan for existing threads when attaching to a
11312 process that is the tgid.
11313 * Makefile.in: Update dependencies.
11314
13da1c97
LM
113152011-08-24 Luis Machado <lgustavo@codesourcery.com>
11316
11317 * configure.srv: Add linux-procfs.o dependencies.
11318
881127c9
YQ
113192011-08-14 Yao Qi <yao@codesourcery.com>
11320
11321 * target.h (struct target_ops): Fix indent.
11322 * win32-low.c (win32_target_ops): Fix comment.
11323
58dbd541
YQ
113242011-08-14 Andrew Jenner <andrew@codesourcery.com>
11325 Yao Qi <yao@codesourcery.com>
11326
11327 * Makefile.in (clean): Remove tic6x-*.c files.
11328 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11329 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11330 (tic6x-c64xp-linux.c): Likewise.
11331 * configure.srv: Add support for tic6x-*-uclinux.
11332 * linux-tic6x-low.c: New.
11333 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11334
78d85199
YQ
113352011-08-14 Andrew Stubbs <ams@codesourcery.com>
11336 Yao Qi <yao@codesourcery.com>
11337
11338 * target.h (struct target_ops): Add read_loadmap.
11339 * linux-low.c (struct target_loadseg): New type.
11340 (struct target_loadmap): New type.
11341 (linux_read_loadmap): New function.
11342 (linux_target_ops): Add linux_read_loadmap.
11343 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11344 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11345 to NULL.
78d85199 11346
a959a88d
EZ
113472011-08-05 Eli Zaretskii <eliz@gnu.org>
11348
11349 * win32-low.c: Include <stdint.h>.
11350
1ced966e
PA
113512011-07-22 Pedro Alves <pedro@codesourcery.com>
11352
11353 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11354 to the inferior here.
11355 (i386_remove_aligned_watchpoint): Ditto.
11356 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11357 fit part of the watchpoint in the debug registers.
11358 (i386_update_inferior_debug_regs): New.
11359 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11360 registers, and only update the inferior on success.
11361 (i386_low_remove_watchpoint): Ditto.
11362
d26e3629
KY
113632011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11364
11365 * linux-low.c (compare_ints, unique, list_threads, show_process,
11366 linux_core_of_thread): Delete.
11367 (linux_target_ops): Change linux_core_of_thread to
11368 linux_common_core_of_thread.
11369 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11370 * utils.c (malloc_failure): Change type of argument.
11371 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11372 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11373 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11374 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11375 (IPA_OBJS): Add common-utils-ipa.o.
11376 (ptid_h, linux_osdata_h): New macros.
11377 (server_h): Add common/common-utils.h, common/xml-utils.h,
11378 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11379 common/ptid.h.
11380 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11381 ptid.o, buffer.o): New rules.
11382 (linux-low.o): Add common/linux-osdata.h as a dependency.
11383 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11384 * configure.ac: Add AC_HEADER_DIRENT check.
11385 * config.in: Regenerate.
11386 * configure: Regenerate.
11387 * remote-utils.c (xml_escape_text): Delete.
11388 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11389 buffer_xml_printf): Move to common/buffer.c.
11390 * server.c (main): Remove call to initialize_inferiors.
11391 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11392 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11393 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11394 internal_error, gdb_assert, gdb_assert_fail): Delete.
11395 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11396 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11397 common/buffer.h.
11398 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11399 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11400 initialize_inferiors): Delete.
11401
2275a1a7
PA
114022011-07-20 Pedro Alves <pedro@codesourcery.com>
11403
11404 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11405 symbol error.
11406
0a5b1e09
PA
114072011-05-31 Pedro Alves <pedro@codesourcery.com>
11408
11409 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11410 assertion.
11411 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11412
6938fd34
YQ
114132011-05-26 Yao Qi <yao@codesourcery.com>
11414
11415 * Makefile.in (thread-db.o): Track dependence to
11416 common/gdb_thread_db.h.
11417 * thread-db.c: include gdb_thread_db.h from right place.
11418
b481f9e0
TT
114192011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11420
11421 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11422 __FILE__ and __LINE__ to internal_error.
11423
98a5dd13
DE
114242011-05-13 Doug Evans <dje@google.com>
11425
11426 * thread-db.c (try_thread_db_load_from_sdir): New function.
11427 (try_thread_db_load_from_dir): New function.
11428 (thread_db_load_search): Handle $sdir, ignore $pdir.
11429 Remove trying of system directories if search of
11430 libthread-db-search-path fails, that is now done via $sdir.
11431
d248b706
KY
114322011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11433
11434 * server.c (handle_query): Add EnableDisableTracepoints to the list
11435 of supported features.
43aaf8b6 11436 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11437 tracepoints.
43aaf8b6
PA
11438 (cmd_qtenable_disable): New.
11439 (cmd_qtstart): Install tracepoints even if disabled.
11440 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11441 receiving a QTEnable or QTDisable packet.
11442 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11443 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11444 tracepoints.
11445 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11446
84e578fb
DE
114472011-05-10 Doug Evans <dje@google.com>
11448
11449 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11450
71f55dd8
DE
114512011-05-04 Doug Evans <dje@google.com>
11452
11453 * linux-low.c (linux_join): Skip process lookup.
11454 * spu-low.c (spu_join): Ditto.
11455 * server.c (join_inferiors_callback): Delete.
11456 (process_serial_event): For 'D' packet (detach) call join_inferior
11457 directly.
11458
4d393d60
JM
114592011-05-04 Joseph Myers <joseph@codesourcery.com>
11460
11461 * README: Don't mention xscale*-*-linux*.
11462 * configure.srv (xscale*-*-linux*): Don't handle target.
11463
b00ad6ff
NF
114642011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11465
11466 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11467 casting pointers.
11468 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11469 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11470 (i386_emit_void_call_2): Likewise.
11471
af96c192
YQ
114722011-04-26 Yao Qi <yao@codesourcery.com>
11473
43aaf8b6
PA
11474 * linux-low.c: Move common macros to linux-ptrace.h.
11475 Include linux-ptrace.h.
af96c192
YQ
11476 * Makefile.in (linux_ptrace_h): New.
11477 (linux-low.o): Depends on linux-ptrace.h.
11478
03f2bd59
JK
114792011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11480
11481 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11482 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11483 (remote_prepare): New function with most of the TCP code from ...
11484 (remote_open): ... here. Detect PORT here unconditionally. Move also
11485 setting transport_is_reliable.
11486 * server.c (run_once): New variable.
11487 (gdbserver_usage): Document it.
11488 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11489 the first run if RUN_ONCE.
11490 * server.h (run_once, remote_prepare): New declarations.
11491
7a9dd1b2
TT
114922011-04-19 Tom Tromey <tromey@redhat.com>
11493
11494 * win32-low.c (handle_load_dll): Remove duplicate "the".
11495
81239425
PM
114962011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11497
11498 Remove support for old Cygwin 1.5 versions.
11499 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11500 function to avoid warning.
11501 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11502 warning.
11503
9e0627f1
PM
115042011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11505
11506 * gdbserver/server.h (Macro _): Define it if not available.
11507
588eebee
MS
115082011-03-14 Michael Snyder <msnyder@vmware.com>
11509
348af9f7 11510 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11511
43f70d4c
JB
115122011-03-10 Joel Brobecker <brobecker@adacore.com>
11513
11514 * Makefile.in (maintainer-clean realclean distclean): Remove
11515 "make ... subdir_do" command.
11516
348af9f7
MS
115172011-03-10 Michael Snyder <msnyder@vmware.com>
11518
11519 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11520
11521 * server.c (handle_v_run): Free alloced buffer on early return.
11522
e637a4f5
YQ
115232011-03-09 Yao Qi <yao@codesourcery.com>
11524
11525 Revert:
11526 2011-03-04 Yao Qi <yao@codesourcery.com>
11527
11528 * Makefile.in: Remove GNU make feature --directory.
11529
11530 2011-03-05 Yao Qi <yao@codesourcery.com>
11531
11532 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11533 (subdir_do): New make target. Copied from gdb/Makefile.
11534 (maintainer-clean, realclean, distclean, clean): Call corresponding
11535 make targets in common/Makefile.
11536
11537 2011-02-11 Yao Qi <yao@codesourcery.com>
11538
11539 * configure.ac: Call AC_PROG_RANLIB.
11540 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11541 * configure: Regenerate.
11542
e6edda56
JK
115432011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11544
11545 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11546
e5141119
JB
115472011-03-06 Yao Qi <yao@codesourcery.com>
11548
11549 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11550
64794aa4
JB
115512011-03-05 Yao Qi <yao@codesourcery.com>
11552
11553 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11554 (subdir_do): New make target. Copied from gdb/Makefile.
11555 (maintainer-clean, realclean, distclean, clean): Call corresponding
11556 make targets in common/Makefile.
11557
7a762829
YQ
115582011-03-04 Yao Qi <yao@codesourcery.com>
11559
11560 * Makefile.in: Remove GNU make feature --directory.
11561
348af9f7
MS
115622011-03-04 Michael Snyder <msnyder@vmware.com>
11563
11564 * server.c (queue_stop_reply): Call xmalloc not malloc.
11565
115662011-03-02 Michael Snyder <msnyder@vmware.com>
11567
11568 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11569
9f72fee2
MS
115702011-02-28 Michael Snyder <msnyder@vmware.com>
11571
588eebee
MS
11572 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11573 (cmd_qtframe): Ditto.
11574 (cmd_qtbuffer): Ditto.
11575 (cmd_bigqtbuffer): Ditto.
11576
9f72fee2
MS
11577 * utils.c (decimal2str): Initialize 'width' to nine, then
11578 don't mess with it.
11579
8040bd49
UW
115802011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11581
11582 * hostio.c (require_data): Free *data, not data.
11583
7e52cbd0
JK
115842011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11585
11586 * hostio.c (require_data): Use free, not xfree.
11587
9130f83e
MS
115882011-02-27 Michael Snyder <msnyder@vmware.com>
11589
4b812f4e
MS
11590 * server.c (handle_query): Discard unused value.
11591
9130f83e
MS
11592 * hostio.c (require_data): Free malloc memory before returning
11593 error.
11594
69d37113
MS
115952011-02-26 Michael Snyder <msnyder@vmware.com>
11596
11597 * linux-low.c (list_threads): Call closedir for dirent.
11598
35f5825a
MS
115992011-02-27 Michael Snyder <msnyder@vmware.com>
11600
2a589cef
MS
11601 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11602 a case statement falls through.
11603
0adea5f7
MS
11604 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11605
35f5825a
MS
11606 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11607 in comparison.
11608
238f1c74
MS
116092011-02-26 Michael Snyder <msnyder@vmware.com>
11610
11611 * utils.c (decimal2str): Eliminate dead code and dead param.
11612 (pulongest): Drop dead param from call to decimal2str.
11613 (plongest): Ditto.
11614
633ff500
JB
116152011-02-24 Joel Brobecker <brobecker@adacore.com>
11616
11617 Revert the following patch (not approved yet):
11618 2011-02-21 Hui Zhu <teawater@gmail.com>
11619 * tracepoint.c (tp_printf): New function.
11620 (eval_agent_expr): Handle gdb_agent_op_printf.
11621
f9c6ff72
HZ
116222011-02-21 Hui Zhu <teawater@gmail.com>
11623
11624 * tracepoint.c (tp_printf): New function.
11625 (eval_agent_expr): Handle gdb_agent_op_printf.
11626
94d5e490
TT
116272011-02-18 Tom Tromey <tromey@redhat.com>
11628
11629 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11630 (tracepoint.o): Likewise.
11631 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11632 (gdb_agent_op_names): Likewise.
11633
c7f96d2b
TT
116342011-02-18 Tom Tromey <tromey@redhat.com>
11635
11636 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11637 gdb_agent_op_rot>: New constants.
11638 (gdb_agent_op_names): Add pick and roll.
11639 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11640 cases.
11641
0feedb2c
JK
116422011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11643
11644 * aclocal.m4: Regenerated with aclocal-1.11.1.
11645
b3b9301e
PA
116462011-02-14 Pedro Alves <pedro@codesourcery.com>
11647
11648 * server.c (handle_qxfer_traceframe_info): New.
11649 (qxfer_packets): Register "traceframe-info".
11650 (handle_query): Report support for qXfer:traceframe-info:read+.
11651 * tracepoint.c (match_blocktype): New.
11652 (traceframe_find_block_type): Rename to ...
11653 (traceframe_walk_blocks): ... this. Add callback filter argument,
11654 and use it.
11655 (traceframe_find_block_type): New, reimplemented on top of
11656 traceframe_walk_blocks.
11657 (build_traceframe_info_xml): New.
11658 (traceframe_read_info): New.
11659 * server.h (traceframe_read_info): Declare.
11660
4f3e6fb7
YQ
116612011-02-11 Yao Qi <yao@codesourcery.com>
11662
11663 * configure.ac: Call AC_PROG_RANLIB.
11664 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11665 * configure: Regenerate.
11666
764880b7
PA
116672011-02-07 Pedro Alves <pedro@codesourcery.com>
11668
11669 * server.c (gdb_read_memory): Change return semantics to allow
11670 partial transfers.
11671 (handle_search_memory_1): Adjust.
11672 (process_serial_event) <'m' packet>: Handle partial transfers.
11673 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11674
1c79eb8a
PA
116752011-01-28 Pedro Alves <pedro@codesourcery.com>
11676
11677 * regcache.c (init_register_cache): Initialize
11678 regcache->register_status.
11679 (free_register_cache): Release regcache->register_status.
11680 (regcache_cpy): Copy register_status.
11681 (registers_to_string): Print 'x's for unavailable registers.
11682 (supply_register): Mark the register's status valid or
11683 unavailable, depending on whether a buffer was passed in or not.
11684 (supply_register_zeroed): New.
11685 (supply_regblock): Mark the registers' status valid or
11686 unavailable, depending on whether a buffer was passed in or not.
11687 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11688 (struct regcache): New `register_status' field.
11689 (supply_register_zeroed): Declare.
11690 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11691 supply_register_zeroed, rather than passing a NULL buffer to
11692 supply_register.
11693 * tracepoint.c (fetch_traceframe_registers): Update comment.
11694
85724a0e
PA
116952011-01-28 Pedro Alves <pedro@codesourcery.com>
11696
11697 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11698 buffer explicit.
11699
d08aafef
PA
117002011-01-25 Pedro Alves <pedro@codesourcery.com>
11701
11702 * server.h (decode_xfer_write): Change prototype.
11703 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11704 and don't extract the annex here.
11705 * server.c (decode_xfer_read): Remove `annex' parameter,
11706 and don't extract the annex here.
11707 (decode_xfer): New.
11708 (struct qxfer): New.
11709 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11710 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11711 (handle_qxfer_statictrace): New functions, abstracted out from
11712 handle_query, and made to use the struct qxfer interface.
11713 (handle_threads_qxfer_proper): Rename to ...
11714 (handle_qxfer_threads_proper): ... this.
11715 (handle_threads_qxfer): Rename to ...
11716 (handle_qxfer_threads): ... this. Adjust.
11717 (qxfer_packets): New array.
11718 (handle_qxfer): New function.
11719 (handle_query): Use handle_qxfer.
11720
493e2a69
MS
117212011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11722
11723 * gdbreplay.c: Shorten lines of >= 80 columns.
11724 * linux-low.c: Ditto.
11725 * linux-ppc-low.c: Ditto.
11726 * linux-s390-low.c: Ditto.
11727 * linux-sparc-low.c: Ditto.
11728 * linux-x86-low.c: Ditto.
11729 * linux-xtensa-low.c: Ditto.
11730 * mem-break.c: Ditto.
11731 * nto-low.c: Ditto.
11732 * regcache.h: Ditto.
11733 * remote-utils.c: Ditto.
11734 * server.c: Ditto.
11735 * server.h: Ditto.
11736 * thread-db.c: Ditto.
11737 * tracepoint.c: Ditto.
11738 * utils.c: Ditto.
11739 * win32-low.h: Ditto.
11740
44944448
JB
117412011-01-05 Joel Brobecker <brobecker@adacore.com>
11742
11743 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11744 update.
11745
71ce852c
JB
117462011-01-01 Joel Brobecker <brobecker@adacore.com>
11747
11748 * server.c (gdbserver_version): Update copyright year in version
11749 output.
11750 * gdbreplay.c (gdbreplay_version): Ditto.
11751
eb826dc6
MF
117522010-12-29 Jie Zhang <jie.zhang@analog.com>
11753
11754 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11755 * linux-bfin-low.c: New file.
11756 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11757 PT_DATA_ADDR for BFIN targets.
11758 * Makefile.in (SFILES): Add linux-bfin-low.c.
11759 (clean): Remove reg-bfin.c.
11760 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11761 * README: Mention supported Blackfin targets.
11762
39ab222a
MF
117632010-12-23 Mike Frysinger <vapier@gentoo.org>
11764
11765 * .gitignore: New file.
11766
a1f2ce7d
MF
117672010-11-16 Mike Frysinger <vapier@gentoo.org>
11768
11769 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11770
f474844c
JZ
117712010-10-22 Jie Zhang <jie@codesourcery.com>
11772
11773 * Makefile.in: Add FLAGS_TO_PASS variable.
11774 (install): Remove dependency of install-only and recursively
11775 invoke make for install-only.
11776
f1048712
DE
117772010-10-04 Doug Evans <dje@google.com>
11778
11779 * Makefile.in (uninstall): Use $(DESTDIR).
11780
b53a1623
PA
117812010-09-24 Pedro Alves <pedro@codesourcery.com>
11782
e6ee044d
PA
11783 PR gdb/11842
11784
b53a1623
PA
11785 * linux-x86-low.c (compat_siginfo_from_siginfo)
11786 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11787 si_code is < 0. Check for si_code == SI_TIMER before checking for
11788 si_code < 0.
11789
fa1bd1e4
JB
117902010-09-13 Joel Brobecker <brobecker@adacore.com>
11791
11792 * lynx-i386-low.c: New file.
11793 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11794
47fac8f8
JB
117952010-09-13 Joel Brobecker <brobecker@adacore.com>
11796
11797 * lynx-low.c (ptrace_request_to_str): Remove handling for
11798 request values that have been removed in LynxOS 5.x.
11799
1adfc54d
JB
118002010-09-13 Joel Brobecker <brobecker@adacore.com>
11801
11802 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11803 <ptrace.h>
11804
c2a66c29
NS
118052010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11806
11807 * configure.ac: Add --enable-inprocess-agent option.
11808 * configure: Rebuilt.
11809
32fcada3
YQ
118102010-09-06 Yao Qi <yao@codesourcery.com>
11811
11812 * linux-low.c (linux_kill): Remove unused variable.
11813 (linux_stabilize_threads): Likewise.
11814 * server.c (start_inferior): Likewise.
11815 (queue_stop_reply_callback): Likewise.
11816 * tracepoint.c (do_action_at_tracepoint): Likewise.
11817
0cccb683
YQ
118182010-09-06 Yao Qi <yao@codesourcery.com>
11819
11820 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11821 on return.
11822
423ec54c
JK
118232010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11824
11825 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11826
12ac6819
PA
118272010-09-06 Pedro Alves <pedro@codesourcery.com>
11828
11829 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11830 "$(IPA_DEPFILES)".
11831
8ed54b31
JB
118322010-09-01 Joel Brobecker <brobecker@adacore.com>
11833
11834 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11835 gdbserver/lynx-ppc-low.c: New files.
11836 * Makefile.in (lynx_low_h): New variable.
11837 (lynx-low.o, lynx-ppc-low.o): New rules.
11838 * configure.ac: On LynxOS, link with -lnetinet.
11839 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11840 * configure: regenerate.
11841
bb0116a4
JB
118422010-09-01 Joel Brobecker <brobecker@adacore.com>
11843
11844 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11845 * configure.ac: Add check for vasprintf and vsnprintf.
11846 * configure, config.in: Regenerate.
11847 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11848
a778ab81 118492010-09-01 Joel Brobecker <brobecker@adacore.com>
11850
11851 * gdbreplay.c: Move include of alloca.h up, next to include of
11852 malloc.h.
11853 * server.h: Add include of malloc.h.
11854 * mem-break.c: Remove include of malloc.h.
11855 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11856
8b034a19 118572010-09-01 Joel Brobecker <brobecker@adacore.com>
11858
11859 * Makefile.in (memmem.o): Build with -Wno-error.
11860
118612010-09-01 Joel Brobecker <brobecker@adacore.com>
11862
11863 * utils.c (xsnprintf): Make non-static.
11864 * server.h: Add xsnprintf declaration.
11865 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11866 replace calls to snprintf by calls to xsnprintf throughout.
11867
118682010-09-01 Joel Brobecker <brobecker@adacore.com>
11869
11870 * configure.ac: Add configure check for alloca.
11871 * configure, config.in: Regenerate.
11872 * server.h: Include alloca.h if it exists.
11873 * gdbreplay.c: Include alloca.h if it exists.
11874
1a981360
PA
118752010-08-28 Pedro Alves <pedro@codesourcery.com>
11876
11877 * linux-low.c (__SIGRTMIN): Define if not already defined.
11878 (linux_create_inferior): Check for __ANDROID__ rather than
11879 __SIGRTMIN.
11880 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11881 are already deferred.
11882 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11883 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11884 stopped and already has a pending signal to report.
11885 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11886 a pending signal to report or is moving out of a jump pad.
11887 (linux_init_signals): Check for __ANDROID__ rather than
11888 __SIGRTMIN.
11889
b4d51a55
PA
118902010-08-28 Pedro Alves <pedro@codesourcery.com>
11891
11892 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11893 debug_threads check. Avoid a linear search when not doing debug
11894 output.
11895
ec48365d
PA
118962010-08-27 Pedro Alves <pedro@codesourcery.com>
11897
11898 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11899 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11900 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11901 (process_event): Change local fd's type to gdb_fildes_t.
11902 (create_file_handler): Adjust prototype.
11903 (delete_file_handler): Adjust prototype.
11904 (handle_file_event): Adjust prototype. Use pfildes.
11905 (create_file_event): Adjsut prototype.
11906 * remote-utils.c (remote_desc, listen_desc): Change type to
11907 gdb_fildes_t.
11908 * server.h: New gdb_fildes_t typedef.
11909 [USE_WIN32API]: Include winsock2.h.
11910 (delete_file_handler, add_file_handler): Adjust prototypes.
11911 (pfildes): Declare.
11912 * utils.c (pfildes): New.
11913
854d88f0
PA
119142010-08-27 Pedro Alves <pedro@codesourcery.com>
11915
11916 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11917 * configure: Regenerate.
11918
0146f85b
PA
119192010-08-27 Pedro Alves <pedro@codesourcery.com>
11920
11921 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11922 (linux_done_accessing_memory): ... this.
11923 (linux_target_ops): Adjust.
11924 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11925 * nto-low.c (nto_target_ops): Adjust comment.
11926 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11927 * spu-low.c (spu_target_ops): Adjust comment.
11928 * target.h (target_ops): Rename unprepare_to_access_memory field
11929 to done_accessing_memory.
11930 (unprepare_to_access_memory): Rename to ...
11931 (done_accessing_memory): ... this.
11932
90d74c30
PA
119332010-08-26 Pedro Alves <pedro@codesourcery.com>
11934
11935 * linux-low.c (linux_prepare_to_access_memory): New.
11936 (linux_unprepare_to_access_memory): New.
11937 (linux_target_ops): Install them.
11938 * server.c (read_memory): Rename to ...
11939 (gdb_read_memory): ... this. Use
11940 prepare_to_access_memory/prepare_to_access_memory.
11941 (write_memory): Rename to ...
11942 (gdb_write_memory): ... this. Use
11943 prepare_to_access_memory/prepare_to_access_memory.
11944 (handle_search_memory_1): Adjust.
11945 (process_serial_event): Adjust.
11946 * target.h (struct target_ops): New fields
11947 prepare_to_access_memory and unprepare_to_access_memory.
11948 (prepare_to_access_memory, unprepare_to_access_memory): New.
11949 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11950 prepare_to_access_memory/prepare_to_access_memory.
11951 * nto-low.c (nto_target_ops): Adjust.
11952 * spu-low.c (spu_target_ops): Adjust.
11953 * win32-low.c (win32_target_ops): Adjust.
11954
fd467969
PA
119552010-08-26 Pedro Alves <pedro@codesourcery.com>
11956
11957 * Makefile.in (WARN_CFLAGS): Get it from configure.
11958 (WERROR_CFLAGS): New.
11959 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11960 * configure.ac: Introduce --enable-werror, which adds -Werror to
11961 the compiler command line. Enabled by default. Disable with
11962 --disable-werror. Add -Wdeclaration-after-statement
11963 Wpointer-arith and -Wformat-nonliteral to warning flags.
11964 * configure: Regenerate.
11965
331e2f5f
PA
119662010-08-26 Pedro Alves <pedro@codesourcery.com>
11967
11968 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11969
e581f2b4
PA
119702010-08-26 Pedro Alves <pedro@codesourcery.com>
11971
11972 * gdbreplay.c (remote_error): New.
11973 (gdbchar): New.
11974 (expect): Use gdbchar. Check for error reading from GDB.
11975 Clarify sync error output.
11976 (play): Check for errors writing to GDB.
11977 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11978 * remote-utils.c (getpkt): Check for errors writing to the remote
11979 descriptor.
11980
3c11dd79
PA
119812010-08-25 Pedro Alves <pedro@codesourcery.com>
11982
11983 * linux-low.c (linux_wait_1): Move non-debugging code out of
11984 `debug_threads' control.
11985
d20a8ad9
PA
119862010-08-25 Pedro Alves <pedro@codesourcery.com>
11987
11988 * linux-low.c (linux_wait_1): Don't set last_status here.
11989 * server.c (push_event, queue_stop_reply_callback): Assert we're
11990 not pushing a TARGET_WAITKIND_IGNORE event.
11991 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11992 (myresume, handle_target_event): Set the thread's last_resume_kind
11993 and last_status from the target returned status.
11994
964e4306
PA
119952010-08-25 Pedro Alves <pedro@codesourcery.com>
11996
11997 PR threads/10729
11998
11999 * linux-x86-low.c (update_debug_registers_callback): New.
12000 (i386_dr_low_set_addr): Use it.
12001 (i386_dr_low_get_addr): New.
12002 (i386_dr_low_set_control): Use update_debug_registers_callback.
12003 (i386_dr_low_get_control): New.
12004 (i386_dr_low_get_status): Adjust.
12005 * linux-low.c (linux_stop_lwp): New.
12006 * linux-low.h (linux_stop_lwp): Declare.
12007
12008 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12009 argument instead of a i386_debug_reg_state.
12010 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12011 a i386_debug_reg_state.
12012 (i386_insert_aligned_watchpoint): Adjust.
12013 (i386_remove_aligned_watchpoint): Adjust.
12014 (i386_low_stopped_data_address): Read the debug registers from the
12015 inferior instead of from the mirrors.
12016 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12017 (i386_dr_low_get_addr): Declare.
12018 (i386_dr_low_get_control): Declare.
12019 (i386_dr_low_get_status): Change prototype.
12020
12021 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12022 (i386_dr_low_get_addr): New.
12023 (i386_dr_low_get_control): New.
12024 (i386_dr_low_get_status): Adjust prototype. Return
12025 dr_status_mirror.
12026 (i386_initial_stuff): Clear dr_status_mirror and
12027 dr_control_mirror.
12028 (i386_get_thread_context): Adjust.
12029 (i386_set_thread_context): Adjust.
12030 (i386_thread_added): Adjust.
12031
5f21a75b
PA
120322010-08-24 Pedro Alves <pedro@codesourcery.com>
12033
12034 * linux-low.h (linux_thread_area): Delete declaration.
12035
3e4c1235
TS
120362010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12037
12038 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12039 after its termination.
12040
1971b033
PA
120412010-08-09 Pedro Alves <pedro@codesourcery.com>
12042
12043 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12044 (gdb_wants_all_stopped): Delete.
12045 (linux_wait_1): Don't call them.
12046 * server.c (handle_v_cont): Tag all threads as want-stopped.
12047 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12048 stopped as "client-wants-stopped".
12049
310444ac
PA
120502010-07-31 Pedro Alves <pedro@codesourcery.com>
12051
12052 * Makefile.in (signals_h): New.
12053 (server_h): Depend on it.
12054 (server.o): Don't depend on $(signals_def).
12055 (signals.o): Depend on $(signals_def).
12056
a19cae16
JK
120572010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12058
12059 * Makefile.in (signals_def): New.
12060 (server_h): Append include/gdb/signals.h and signals_def.
12061 (server.o): Append signals_def.
12062
30d50328
JK
120632010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12064
12065 * server.c (handle_target_event): Use target_signal_to_host for
12066 resume_info.sig initialization.
12067 * target.h (struct thread_resume) <sig>: New comment.
12068
5c3216e2
OS
120692010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12070
c6f46ca0
OS
12071 * server.c (handle_query): strcpy() the returned string from paddress()
12072 instead of sprintf().
5c3216e2
OS
12073 * utils.c (paddress): Return phex_nz().
12074
6bd31874
JB
120752010-07-07 Joel Brobecker <brobecker@adacore.com>
12076
12077 * server.c (handle_v_cont): Call mourn_inferior if process
12078 just exited.
12079 (myresume): Likewise.
12080
0fb4aa4b
PA
120812010-07-01 Pedro Alves <pedro@codesourcery.com>
12082
12083 Static tracepoints, and integration with UST.
12084
12085 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12086 * mem-break.c (uninsert_all_breakpoints)
12087 (reinsert_all_breakpoints): New.
12088 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12089 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12090 (gdb_agent_ust_loaded, helper_thread_id)
12091 (gdb_agent_helper_thread_id): New macros.
12092 (struct ipa_sym_addresses): Add addr_ust_loaded,
12093 addr_helper_thread_id, addr_cmd_buf.
12094 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12095 (in_process_agent_loaded_ust): New.
12096 (write_e_ust_not_loaded): New.
12097 (maybe_write_ipa_ust_not_loaded): New.
12098 (struct collect_static_trace_data_action): New.
12099 (enum tracepoint_type) <static_tracepoint>: New.
12100 (struct tracepoint) <handle>: Mention static tracepoints.
12101 (struct static_tracepoint_ctx): New.
12102 (CMD_BUF_SIZE): New.
12103 (add_tracepoint_action): Handle static tracepoint actions.
12104 (unprobe_marker_at): New.
12105 (clear_installed_tracepoints): Handle static tracepoints.
12106 (cmd_qtdp): Handle static tracepoints.
12107 (probe_marker_at): New.
12108 (cmd_qtstart): Handle static tracepoints.
12109 (response_tracepoint): Handle static tracepoints.
12110 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12111 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12112 (get_context_regcache): Handle static tracepoints.
12113 (do_action_at_tracepoint): Handle static tracepoint actions.
12114 (traceframe_find_block_type): Handle static trace data blocks.
12115 (traceframe_read_sdata): New.
12116 (download_tracepoints): Download static tracepoint actions.
12117 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12118 (GDB_PROBE_NAME): New.
12119 (ust_ops): New.
12120 (GET_UST_SYM): New.
12121 (USTF): New.
12122 (dlsym_ust): New.
12123 (ust_marker_to_static_tracepoint): New.
12124 (gdb_probe): New.
12125 (collect_ust_data_at_tracepoint): New.
12126 (gdb_ust_probe): New.
12127 (UNIX_PATH_MAX, SOCK_DIR): New.
12128 (gdb_ust_connect_sync_socket): New.
12129 (resume_thread, stop_thread): New.
12130 (run_inferior_command): New.
12131 (init_named_socket): New.
12132 (gdb_ust_socket_init): New.
12133 (cstr_to_hexstr): New.
12134 (next_st): New.
12135 (first_marker, next_marker): New.
12136 (response_ust_marker): New.
12137 (cmd_qtfstm, cmd_qtsstm): New.
12138 (unprobe_marker_at, probe_marker_at): New.
12139 (cmd_qtstmat, gdb_ust_thread): New.
12140 (gdb_ust_init): New.
12141 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12142 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12143 (ST_REGENTRY): New.
12144 (x86_64_st_collect_regmap): New.
12145 (X86_64_NUM_ST_COLLECT_GREGS): New.
12146 (AMD64_RIP_REGNUM): New.
12147 (supply_static_tracepoint_registers): New.
12148 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12149 (ST_REGENTRY): New.
12150 (i386_st_collect_regmap): New.
12151 (i386_NUM_ST_COLLECT_GREGS): New.
12152 (supply_static_tracepoint_registers): New.
12153 * server.c (handle_query): Handle qXfer:statictrace:read.
12154 <qSupported>: Report support for StaticTracepoints, and
12155 qXfer:statictrace:read features.
12156 * server.h (traceframe_read_sdata)
12157 (supply_static_tracepoint_registers): Declare.
12158 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12159 (unpack_varlen_hex): Include in IPA build.
12160 * Makefile.in (ustlibs, ustinc): New.
12161 (IPA_OBJS): Add remote-utils-ipa.o.
12162 ($(IPA_LIB)): Link -ldl and -lpthread.
12163 (UST_CFLAGS): New.
12164 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12165 * config.in, configure: Regenerate.
12166
9e4344e5
PA
121672010-06-20 Ian Lance Taylor <iant@google.com>
12168 Pedro Alves <pedro@codesourcery.com>
12169
12170 * linux-x86-low.c (always_true): Delete.
12171 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12172 trying to fool the compiler with always_true.
12173
c6beb2cb
PA
121742010-06-20 Pedro Alves <pedro@codesourcery.com>
12175
12176 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12177 conditions in gdbserver.
12178
d2ed6730
UW
121792010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12180
12181 * spu-low.c (spu_read_memory): Wrap around local store limit.
12182 (spu_write_memory): Likewise.
12183
4e29fb54
PA
121842010-06-15 Pedro Alves <pedro@codesourcery.com>
12185
12186 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12187 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12188 LONGEST uses.
12189 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12190 uses.
12191 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12192 uses with LONGEST uses.
12193
6a271cae
PA
121942010-06-14 Stan Shebs <stan@codesourcery.com>
12195 Pedro Alves <pedro@codesourcery.com>
12196
12197 Bytecode compiler.
12198
12199 * linux-x86-low.c: Include limits.h.
12200 (add_insns): New.
12201 (always_true): New.
12202 (EMIT_ASM): New.
12203 (EMIT_ASM32): New.
12204 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12205 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12206 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12207 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12208 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12209 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12210 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12211 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12212 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12213 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12214 (amd64_emit_void_call_2): New.
12215 (amd64_emit_ops): New.
12216 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12217 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12218 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12219 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12220 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12221 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12222 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12223 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12224 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12225 (i386_emit_stack_adjust, i386_emit_int_call_1)
12226 (i386_emit_void_call_2): New.
12227 (i386_emit_ops): New.
12228 (x86_emit_ops): New.
12229 (the_low_target): Install x86_emit_ops.
12230 * server.h (struct emit_ops): New.
12231 (get_raw_reg_func_addr): Declare.
12232 (current_insn_ptr, emit_error): Declare.
12233 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12234 (set_trace_state_variable_value): New defines.
12235 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12236 addr_get_trace_state_variable_value and
12237 addr_set_trace_state_variable_value.
12238 (symbol_list): New fields for get_raw_reg,
12239 get_trace_state_variable_value and set_trace_state_variable_value.
12240 (condfn): New typedef.
12241 (struct tracepoint): New field `compiled_cond'.
12242 (do_action_at_tracepoint): Clear compiled_cond.
12243 (get_trace_state_variable_value, set_trace_state_variable_value):
12244 Export in the IPA.
12245 (condition_true_at_tracepoint): If there's a compiled condition,
12246 run that.
12247 (current_insn_ptr, emit_error): New globals.
12248 (struct bytecode_address): New.
12249 (get_raw_reg_func_addr): New.
12250 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12251 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12252 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12253 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12254 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12255 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12256 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12257 (compile_tracepoint_condition, compile_bytecodes): New.
12258 * target.h (emit_ops): Forward declare.
12259 (struct target_ops): New field emit_ops.
12260 (target_emit_ops): New.
12261 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12262 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12263 * linux-low.c (linux_emit_ops): New.
12264 (linux_target_ops): Install it.
12265 * linux-low.h (struct linux_target_ops): New field emit_ops.
12266
92b72907
UW
122672010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12268
12269 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12270 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12271
fa593d66
PA
122722010-06-01 Pedro Alves <pedro@codesourcery.com>
12273 Stan Shebs <stan@codesourcery.com>
12274
12275 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12276 (all): Depend on $(extra_libraries).
12277 (install-only): Install the IPA.
12278 (IPA_OBJS, IPA_LIB): New.
12279 (clean): Remove the IPA lib.
12280 (IPAGENT_CFLAGS): New.
12281 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12282 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12283 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12284 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12285 * configure.ac: Check for atomic builtins support in the compiler.
12286 (IPA_DEPFILES, extra_libraries): Define.
12287 * configure.srv (ipa_obj): Add description.
12288 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12289 (i[34567]86-*-linux*): Set ipa_obj.
12290 (x86_64-*-linux*): Set ipa_obj.
12291 * linux-low.c (stabilizing_threads): New.
12292 (supports_fast_tracepoints): New.
12293 (linux_detach): Stabilize threads before detaching.
12294 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12295 the lwp is either not stabilizing, or is moving out of a jump pad.
12296 (linux_fast_tracepoint_collecting): New.
12297 (maybe_move_out_of_jump_pad): New.
12298 (enqueue_one_deferred_signal): New.
12299 (dequeue_one_deferred_signal): New.
12300 (linux_wait_for_event_1): If moving out of a jump pad, defer
12301 pending signals to later.
12302 (linux_stabilize_threads): New.
12303 (linux_wait_1): Check if threads need moving out of jump pads, and
12304 do it if so.
12305 (stuck_in_jump_pad_callback): New.
12306 (move_out_of_jump_pad_callback): New.
12307 (lwp_running): New.
12308 (linux_resume_one_lwp): Handle moving out of jump pads.
12309 (linux_set_resume_request): Dequeue deferred signals.
12310 (need_step_over_p): Also step over fast tracepoint jumps.
12311 (start_step_over): Also uninsert fast tracepoint jumps.
12312 (finish_step_over): Also reinsert fast tracepoint jumps.
12313 (linux_install_fast_tracepoint_jump): New.
12314 (linux_target_ops): Install linux_stabilize_threads and
12315 linux_install_fast_tracepoint_jump_pad.
12316 * linux-low.h (linux_target_ops) <get_thread_area,
12317 install_fast_tracepoint_jump_pad>: New fields.
12318 (struct lwp_info) <collecting_fast_tracepoint,
12319 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12320 (linux_get_thread_area): Declare.
12321 * linux-x86-low.c (jump_insn): New.
12322 (x86_get_thread_area): New.
12323 (append_insns): New.
12324 (push_opcode): New.
12325 (amd64_install_fast_tracepoint_jump_pad): New.
12326 (i386_install_fast_tracepoint_jump_pad): New.
12327 (x86_install_fast_tracepoint_jump_pad): New.
12328 (the_low_target): Install x86_get_thread_area and
12329 x86_install_fast_tracepoint_jump_pad.
12330 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12331 (struct fast_tracepoint_jump): New.
12332 (fast_tracepoint_jump_insn): New.
12333 (fast_tracepoint_jump_shadow): New.
12334 (find_fast_tracepoint_jump_at): New.
12335 (fast_tracepoint_jump_here): New.
12336 (delete_fast_tracepoint_jump): New.
12337 (set_fast_tracepoint_jump): New.
12338 (uninsert_fast_tracepoint_jumps_at): New.
12339 (reinsert_fast_tracepoint_jumps_at): New.
12340 (set_breakpoint_at): Use write_inferior_memory.
12341 (uninsert_raw_breakpoint): Use write_inferior_memory.
12342 (check_mem_read): Mask out fast tracepoint jumps.
12343 (check_mem_write): Mask out fast tracepoint jumps.
12344 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12345 (set_fast_tracepoint_jump): Declare.
12346 (delete_fast_tracepoint_jump)
12347 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12348 (reinsert_fast_tracepoint_jumps_at): Declare.
12349 * regcache.c: Don't compile many functions when building the
12350 in-process agent library.
12351 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12352 the register buffer in the heap.
12353 (free_register_cache): If the register buffer isn't owned by the
12354 regcache, don't free it.
12355 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12356 pre-existing register caches.
12357 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12358 type.
12359 (convert_ascii_to_int): : Constify `from' parameter type.
12360 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12361 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12362 the needed buffer in-place.
12363 (relocate_instruction): New.
12364 * server.c (handle_query) <qSymbols>: If the target supports
12365 tracepoints, give it a chance of looking up symbols. Report
12366 support for fast tracepoints.
12367 (handle_status): Stabilize threads.
12368 (process_serial_event): Adjust.
12369 * server.h (struct fast_tracepoint_jump): Forward declare.
12370 (struct process_info) <fast_tracepoint_jumps>: New field.
12371 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12372 (decode_X_packet, decode_M_packet): Adjust.
12373 (relocate_instruction): Declare.
12374 (in_process_agent_loaded): Declare.
12375 (tracepoint_look_up_symbols): Declare.
12376 (struct fast_tpoint_collect_status): Declare.
12377 (fast_tracepoint_collecting): Declare.
12378 (force_unlock_trace_buffer): Declare.
12379 (handle_tracepoint_bkpts): Declare.
12380 (initialize_low_tracepoint)
12381 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12382 * target.h (struct target_ops) <stabilize_threads,
12383 install_fast_tracepoint_jump_pad>: New fields.
12384 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12385 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12386 [HAVE_STDINT_H]: Include stdint.h.
12387 (trace_debug_1): Rename to ...
12388 (trace_vdebug): ... this.
12389 (trace_debug): Rename to ...
12390 (trace_debug_1): ... this. Add `level' parameter.
12391 (trace_debug): New.
12392 (ATTR_USED, ATTR_NOINLINE): New.
12393 (IP_AGENT_EXPORT): New.
12394 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12395 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12396 (about_to_request_buffer_space, trace_buffer_is_full)
12397 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12398 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12399 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12400 (traceframe_write_count, traceframes_created)
12401 (trace_state_variables)
12402 New renaming defines.
12403 (struct ipa_sym_addresses): New.
12404 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12405 (symbol_list): New.
12406 (ipa_sym_addrs): New.
12407 (all_tracepoint_symbols_looked_up): New.
12408 (in_process_agent_loaded): New.
12409 (write_e_ipa_not_loaded): New.
12410 (maybe_write_ipa_not_loaded): New.
12411 (tracepoint_look_up_symbols): New.
12412 (debug_threads) [IN_PROCESS_AGENT]: New.
12413 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12414 (UNKNOWN_SIDE_EFFECTS): New.
12415 (stop_tracing): New.
12416 (flush_trace_buffer): New.
12417 (stop_tracing_bkpt): New.
12418 (flush_trace_buffer_bkpt): New.
12419 (read_inferior_integer): New.
12420 (read_inferior_uinteger): New.
12421 (read_inferior_data_pointer): New.
12422 (write_inferior_data_pointer): New.
12423 (write_inferior_integer): New.
12424 (write_inferior_uinteger): New.
12425 (struct collect_static_trace_data_action): Delete.
12426 (enum tracepoint_type): New.
12427 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12428 <actions_str, step_actions, step_actions_str>: Only include in
12429 GDBserver.
fa593d66
PA
12430 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12431 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12432 (tracepoints): Use IP_AGENT_EXPORT.
12433 (last_tracepoint): Don't include in the IPA.
12434 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12435 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12436 (alloced_trace_state_variables): New.
12437 (trace_state_variables): Use IP_AGENT_EXPORT.
12438 (traceframe_t): Delete unused variable.
12439 (circular_trace_buffer): Don't include in the IPA.
12440 (trace_buffer_start): Delete.
12441 (struct trace_buffer_control): New.
12442 (trace_buffer_free): Delete.
12443 (struct ipa_trace_buffer_control): New.
12444 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12445 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12446 New.
12447 (trace_buffer_ctrl): New.
12448 (TRACE_BUFFER_CTRL_CURR): New.
12449 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12450 Reimplement as macros.
12451 (trace_buffer_wrap): Delete.
12452 (traceframe_write_count, traceframe_read_count)
12453 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12454 (struct tracepoint_hit_ctx) <type>: New field.
12455 (struct fast_tracepoint_ctx): New.
12456 (memory_barrier): New.
12457 (cmpxchg): New.
12458 (record_tracepoint_error): Update atomically in the IPA.
12459 (clear_inferior_trace_buffer): New.
12460 (about_to_request_buffer_space): New.
12461 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12462 updating the same buffer.
12463 (add_tracepoint): Default the tracepoint's type to trap
12464 tracepoint, and orig_size to -1.
12465 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12466 internal variables.
12467 (create_trace_state_variable): New parameter `gdb'. Handle it.
12468 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12469 (cmd_qtdp): Handle fast tracepoints.
12470 (cmd_qtdv): Adjust.
12471 (max_jump_pad_size): New.
12472 (gdb_jump_pad_head): New.
12473 (get_jump_space_head): New.
12474 (claim_jump_space): New.
12475 (sort_tracepoints): New.
12476 (MAX_JUMP_SIZE): New.
12477 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12478 IPA.
12479 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12480 support. Upload fast traceframes, and delete internal IPA
12481 breakpoints.
12482 (stop_tracing_handler): New.
12483 (flush_trace_buffer_handler): New.
12484 (cmd_qtstop): Upload fast tracepoints.
12485 (response_tracepoint): Handle fast tracepoints.
12486 (tracepoint_finished_step): Upload fast traceframes. Set the
12487 tracepoint hit context's tracepoint type.
12488 (handle_tracepoint_bkpts): New.
12489 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12490 type. Add comment about fast tracepoints.
12491 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12492 non-existing action_str field.
12493 (get_context_regcache): Handle fast tracepoints.
12494 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12495 to the regcache.
12496 (fast_tracepoint_from_jump_pad_address): New.
12497 (fast_tracepoint_from_ipa_tpoint_address): New.
12498 (collecting_t): New.
12499 (force_unlock_trace_buffer): New.
12500 (fast_tracepoint_collecting): New.
12501 (collecting): New.
12502 (gdb_collect): New.
12503 (write_inferior_data_ptr): New.
12504 (target_tp_heap): New.
12505 (target_malloc): New.
12506 (download_agent_expr): New.
12507 (UALIGN): New.
12508 (download_tracepoints): New.
12509 (download_trace_state_variables): New.
12510 (upload_fast_traceframes): New.
12511 (IPA_FIRST_TRACEFRAME): New.
12512 (IPA_NEXT_TRACEFRAME_1): New.
12513 (IPA_NEXT_TRACEFRAME): New.
12514 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12515 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12516 (gdb_jump_pad_buffer_end): New.
12517 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12518 (initialize_tracepoint): Adjust.
12519 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12520 buffer. Initialize the low module.
12521 * utils.c (PREFIX, TOOLNAME): New.
12522 (malloc_failure): Use PREFIX.
12523 (error): In the IPA, an error causes an exit.
12524 (fatal, warning): Use PREFIX.
12525 (internal_error): Use TOOLNAME.
12526 (NUMCELLS): Increase to 10.
12527 * configure, config.in: Regenerate.
12528
d149dd1d
PA
125292010-06-01 Pedro Alves <pedro@codesourcery.com>
12530
12531 * server.c (handle_query) <qSupported>: Do two passes over the
12532 qSupported string to avoid nesting strtok.
12533
f6528abd
JK
125342010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12535
12536 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12537 (CDEPS): New.
12538 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12539 -Wl,--dynamic-list.
12540 * configure: Regenerate.
12541 * proc-service.list: New.
12542
ca2a87a0
JK
125432010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12544
12545 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12546 New comment.
12547
363a6e9f
OS
125482010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12549
12550 * gdbreplay.c (remote_open): Check error return from socket() call by
12551 its equality to -1 not by it being negative.
12552 * remote-utils.c (remote_open): Likewise.
12553
d23b6cb1
PA
125542010-05-23 Pedro Alves <pedro@codesourcery.com>
12555
12556 * config.h: Regenerate.
12557
28d3cf85
MK
125582010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12559
12560 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12561 doesn't provide PTRACE_GET_THREAD_AREA.
12562
fea36a59
MK
125632010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12564
12565 * linux-m68k-low.c: Include <asm/ptrace.h>
12566 (ps_get_thread_area): Implement.
12567
24b066ba
DE
125682010-05-03 Doug Evans <dje@google.com>
12569
12570 * event-loop.c (struct callback_event): New struct.
12571 (callback_list): New global.
12572 (append_callback_event, delete_callback_event): New functions.
12573 (process_callback): New function.
12574 (start_event_loop): Call it.
12575 * remote-utils.c (NOT_SCHEDULED): Define.
12576 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12577 moved out of readchar.
12578 (readchar): Rewrite. Call reschedule before returning.
12579 (reset_readchar): New function.
12580 (remote_close): Call it.
12581 (process_remaining, reschedule): New functions.
12582 * server.h (callback_handler_func): New typedef.
12583 (append_callback_event, delete_callback_event): Declare.
12584
9836d6ea
PA
125852010-05-03 Pedro Alves <pedro@codesourcery.com>
12586
12587 * proc-service.c (ps_pglobal_lookup): Use
12588 thread_db_look_up_one_symbol.
12589 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12590 parameter. Use it instead of all_symbols_looked_up.
12591 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12592 field.
12593 (all_symbols_looked_up): Don't declare.
12594 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12595 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12596 field.
12597 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12598 Set all_symbols_looked_up here.
12599 (thread_db_look_up_one_symbol): New.
12600 (thread_db_get_tls_address): Adjust.
12601 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12602 thread_db object on the heap, and tentatively set it in the
12603 process structure.
12604 (thread_db_init): Don't set all_symbols_looked_up here.
12605 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12606
7984d532
PA
126072010-05-03 Pedro Alves <pedro@codesourcery.com>
12608
12609 * linux-low.c (linux_kill, linux_detach): Adjust.
12610 (status_pending_p_callback): Remove redundant statement. Check
12611 for !TARGET_WAITIKIND_IGNORE, instead of
12612 TARGET_WAITKIND_STOPPED.
12613 (handle_tracepoints): Make sure LWP is locked. Adjust.
12614 (linux_wait_for_event_1): Adjust.
12615 (linux_cancel_breakpoints): New.
12616 (unsuspend_one_lwp): New.
12617 (unsuspend_all_lwps): New.
12618 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12619 (send_sigstop_callback): Change return type to int, add new
12620 `except' parameter and handle it.
12621 (suspend_and_send_sigstop_callback): New.
12622 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12623 pass them down. If SUSPEND, also increment the lwp's suspend
12624 count.
12625 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12626 (need_step_over_p): Don't consider suspended LWPs.
12627 (start_step_over): Adjust.
12628 (proceed_one_lwp): Change return type to int, add new `except'
12629 parameter and handle it.
12630 (unsuspend_and_proceed_one_lwp): New.
12631 (proceed_all_lwps): Use find_inferior instead of
12632 for_each_inferior.
12633 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12634 also decrement the suspend count of LWPs. Pass `except' down,
12635 instead of hacking its suspend count.
12636 (linux_pause_all): Add `freeze' parameter. Adjust.
12637 (linux_unpause_all): New.
12638 (linux_target_ops): Install linux_unpause_all.
12639 * server.c (handle_status): Adjust.
12640 * target.h (struct target_ops): New fields `unpause_all' and
12641 `cancel_breakpoints'. Add new parameter to `pause_all'.
12642 (pause_all): Add new `freeze' parameter.
12643 (unpause_all): New.
12644 (cancel_breakpoints): New.
12645 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12646 cancel breakpoints.
12647 (cmd_qtstart): Pause threads.
12648 (stop_tracing): Pause threads, and cancel breakpoints.
12649 * win32-low.c (win32_target_ops): Adjust.
12650
e471f25b
PA
126512010-05-03 Pedro Alves <pedro@codesourcery.com>
12652
12653 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12654 the inferior right away from here...
12655 (linux_wait_1): ... to here, and adjust to check the thread's
12656 last_resume_kind instead of the lwp's step or stop_expected flags.
12657
1915ef4f
PA
126582010-05-02 Pedro Alves <pedro@codesourcery.com>
12659
12660 * README: Use consistent `GDB' and `GDBserver' spellings.
12661
f9e39928
PA
126622010-05-02 Pedro Alves <pedro@codesourcery.com>
12663
12664 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12665 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12666 (linux_detach_one_lwp): Assume the lwp is stopped.
12667 (any_thread_of): Delete.
12668 (linux_detach): Stop all lwps here. Don't blindly delete all
12669 breakpoints.
12670 (delete_lwp_callback): New.
12671 (linux_mourn): Delete all lwps of the process that is gone.
12672 (linux_wait_1): Don't delete the last lwp of the process here.
12673 * mem-break.h (mark_breakpoints_out): Declare.
12674 * mem-break.c (mark_breakpoints_out): New.
12675 (free_all_breakpoints): Use it.
12676 * server.c (handle_target_event): If the process is gone, mark
12677 breakpoints out.
12678 * thread-db.c (struct thread_db) <create_bp>: New field.
12679 (thread_db_enable_reporting): Fix prototype. Store a thread event
12680 breakpoint reference in the thread_db struct.
12681 (thread_db_load_search): Clear the thread_db object.
12682 (try_thread_db_load_1): Ditto.
12683 (switch_to_process): New.
12684 (disable_thread_event_reporting): Use it.
12685 (remove_thread_event_breakpoints): New.
12686 (thread_db_detach, thread_db_mourn): Use it.
12687
1e7fc18c
PA
126882010-05-01 Pedro Alves <pedro@codesourcery.com>
12689
12690 * linux-low.c (linux_enable_event_reporting): New.
12691 (linux_wait_for_event_1, handle_extended_wait): Use it.
12692
02fc4de7
PA
126932010-04-30 Pedro Alves <pedro@codesourcery.com>
12694
12695 * linux-low.c (linux_kill_one_lwp, linux_kill)
12696 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12697 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12698 SIGSTOP even if the LWP is stopped.
12699 (send_sigstop_callback): New.
12700 (stop_all_lwps): Use send_sigstop_callback instead.
12701 (linux_resume_one_thread): Adjust.
12702 (proceed_one_lwp): Still proceed an LWP that the client has
12703 requested to stop, if we haven't reported it as stopped yet. Make
12704 sure that LWPs the client want stopped, have a pending SIGSTOP.
12705
bc3b5632
DE
127062010-04-26 Doug Evans <dje@google.com>
12707
ae1ada35
DE
12708 * server.c (handle_general_set): Make static.
12709
bc3b5632
DE
12710 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12711 Print received char after testing for error/eof instead of before.
12712 (input_interrupt): Tweak comment.
12713
65730243
DE
127142010-04-23 Doug Evans <dje@google.com>
12715
12716 * server.c (start_inferior): Print inferior argv if --debug.
12717
a8ae7dc0
AR
127182010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12719
12720 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12721 * nto-x86-low.c: Include server.h
12722
1c07cc19
PM
127232010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12724
12725 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12726 be consistent with other sources of this directory.
12727 (init_registers_amd64): Correct name of source file of this function
12728 in the comment.
12729
e0a61e09
PM
127302010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12731
12732 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12733 64-bit executables.
12734
54709339
PM
127352010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12736
12737 * win32-i386-low.c: Add 64-bit support.
12738 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12739 (init_registers_amd64): Declare.
12740 (mappings): Add 64-bit version of array.
12741 (init_windows_x86): New function.
12742 (the_low_target): Change init_arch field to init_windows_x86.
12743
e8f0053d
PM
127442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12745
12746 * win32-low.c: Adapt to support also 64-bit architecture.
12747 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12748 (get_image_name): Use SIZE_T type for local variable `done'.
12749 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12750 (toolhelp_get_dll_name): Idem.
12751 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12752 Use uintptr_t typecast to avoid warning.
12753 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12754 (handle_exception): Use phex_nz to avoid warning.
12755 (win32_wait): Remove unused local variable `process'.
12756
c481e77e
PM
127572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12758
12759 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12760 `amd64-avx.o'.
12761
12ea4b69
PM
127622010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12763
12764 * configure.ac: Use `ws2_32' library for srv_mingw.
12765 * configure: Regenerate.
12766 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12767 * remote-utils.c: Likewise.
12768
f6d1620c
L
127692010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12770
12771 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12772 if __x86_64__ is defined.
12773
8e642873
PM
127742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12775
12776 * configure: Regenerate.
12777
711e434b
PM
127782010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12779
12780 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12781 * target.h (target_ops): New get_tib_address field.
12782 * win32-low.h (win32_thread_info): Add thread_local_base field.
12783 * win32-low.c (child_add_thread): Add tlb argument.
12784 Set thread_local_base field to TLB.
12785 (get_child_debug_event): Adapt to child_add_thread change.
12786 (win32_get_tib_address): New function.
12787 (win32_target_ops): Set get_tib_address field to
12788 win32_get_tib_address.
12789 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12790
505106cd
PA
127912010-04-12 Pedro Alves <pedro@codesourcery.com>
12792
505106cd
PA
12793 * linux-low.c (linux_mourn): Also remove the process.
12794 * server.c (handle_target_event): Don't remove the process here.
12795 * nto-low.c (nto_mourn): New.
12796 (nto_target_ops): Install it.
12797 * spu-low.c (spu_mourn): New.
12798 (spu_target_ops): Install it.
12799 * win32-low.c (win32_mourn): New.
12800 (win32_target_ops): Install it.
12801
e8470a06
PA
128022010-04-12 Pedro Alves <pedro@codesourcery.com>
12803
12804 * server.h (buffer_xml_printf): Remove redundant `;'.
12805
45ba0d02
PA
128062010-04-12 Pedro Alves <pedro@codesourcery.com>
12807
12808 * regcache.c (set_register_cache): Invalidate regcaches before
12809 changing the register cache layout.
12810 (regcache_invalidate_one): Allow a NULL regcache.
12811 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12812 regcaches before changing the register cache layout or the target
12813 regsets.
12814
59e04013
L
128152010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12816
12817 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12818 variable warning on Linux/x86-64.
12819
8336d594
PA
128202010-04-11 Pedro Alves <pedro@codesourcery.com>
12821
12822 GDBserver disconnected tracing support.
12823
12824 * linux-low.c (linux_remove_process): Delete.
12825 (add_lwp): Don't set last_resume_kind here.
12826 (linux_kill): Use `mourn'.
12827 (linux_detach): Use `thread_db_detach', and `mourn'.
12828 (linux_mourn): New.
12829 (linux_attach_lwp_1): Adjust comment.
12830 (linux_attach): last_resume_kind moved the thread_info; adjust.
12831 (status_pending_p_callback): Adjust.
12832 (linux_wait_for_event_1): Adjust.
12833 (count_events_callback, select_singlestep_lwp_callback)
12834 (select_event_lwp_callback, cancel_breakpoints_callback)
12835 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12836 (proceed_one_lwp): Adjust.
12837 (linux_async): Add debug output.
12838 (linux_thread_stopped): New.
12839 (linux_pause_all): New.
12840 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12841 linux_pause_all.
12842 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12843 (thread_db_free): Delete declaration.
12844 (thread_db_detach, thread_db_mourn): Declare.
12845 * thread-db.c (thread_db_init): Use thread_db_mourn.
12846 (thread_db_free): Delete, split in two.
12847 (disable_thread_event_reporting): New.
12848 (thread_db_detach): New.
12849 (thread_db_mourn): New.
12850
12851 * server.h (struct thread_info) <last_resume_kind>: New field.
12852 <attached>: Add comment.
12853 <gdb_detached>: New field.
12854 (handler_func): Change return type to int.
12855 (handle_serial_event, handle_target_event): Ditto.
12856 (gdb_connected): Declare.
12857 (tracing): Delete.
12858 (disconnected_tracing): Declare.
12859 (stop_tracing): Declare.
12860
12861 * server.c (handle_query) <qSupported>: Report support for
12862 disconnected tracing.
12863 (queue_stop_reply_callback): Account for running threads.
12864 (gdb_wants_thread_stopped): New.
12865 (gdb_wants_all_threads_stopped): New.
12866 (gdb_reattached_process): New.
12867 (handle_status): Clear the `gdb_detached' flag of all processes.
12868 In all-stop, stop all threads.
12869 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12870 (process_serial_event): If the remote connection breaks, or if an
12871 exit was forced with "monitor exit", force an event loop exit.
12872 Handle disconnected tracing on detach.
12873 (handle_serial_event): Adjust.
12874 (handle_target_event): If GDB isn't connected, forward events back
12875 to the inferior, unless the last process exited, in which case,
12876 exit gdbserver. Adjust interface.
12877
12878 * remote-utils.c (remote_open): Don't block in accept. Instead
12879 register an event loop source on the listen socket file
12880 descriptor. Refactor bits into ...
12881 (listen_desc): ... this new global.
12882 (gdb_connected): ... this new function.
12883 (enable_async_notification): ... this new function.
12884 (handle_accept_event): ... this new function.
12885 (remote_close): Clear remote_desc.
12886
12887 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12888
12889 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12890 New fields.
12891 (mourn_inferior): Define.
12892 (target_process_qsupported): Avoid the dangling else problem.
12893 (thread_stopped): Define.
12894 (pause_all): Define.
12895 (target_waitstatus_to_string): Declare.
12896 * target.c (target_waitstatus_to_string): New.
12897
12898 * tracepoint.c (tracing): Make extern.
12899 (disconnected_tracing): New.
12900 (stop_tracing): Make extern. Handle tracing stops due to GDB
12901 disconnecting.
12902 (cmd_qtdisconnected): New.
12903 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12904 (handle_tracepoint_general_set): Handle QTDisconnected.
12905
12906 * event-loop.c (event_handler_func): Change return type to int.
12907 (process_event): Bail out if the event handler wants the event
12908 loop to stop.
12909 (handle_file_event): Ditto.
12910 (start_event_loop): Bail out if the event handler wants the event
12911 loop to stop.
12912
12913 * nto-low.c (nto_target_ops): Adjust.
12914 * spu-low.c (spu_wait): Don't remove the process here.
12915 (spu_target_ops): Adjust.
12916 * win32-low.c (win32_wait): Don't remove the process here.
12917 (win32_target_ops): Adjust.
12918
5d267c4c
PA
129192010-04-11 Pedro Alves <pedro@codesourcery.com>
12920
12921 * regcache.c (realloc_register_cache): Invalidate inferior's
12922 regcache before recreating it.
12923
623ccd72
PA
129242010-04-09 Pedro Alves <pedro@codesourcery.com>
12925
12926 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12927
219f2f23
PA
129282010-04-09 Stan Shebs <stan@codesourcery.com>
12929 Pedro Alves <pedro@codesourcery.com>
12930
12931 * server.h (LONGEST): New.
12932 (struct thread_info) <while_stepping>: New field.
12933 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12934 Declare.
12935 (initialize_tracepoint, handle_tracepoint_general_set)
12936 (handle_tracepoint_query, tracepoint_finished_step)
12937 (tracepoint_was_hit, release_while_stepping_state_list):
12938 (current_traceframe): Declare.
12939 * server.c (handle_general_set): Handle tracepoint packets.
12940 (read_memory): New.
12941 (write_memory): New.
12942 (handle_search_memory_1): Use read_memory.
12943 (handle_query): Report support for conditional tracepoints, trace
12944 state variables, and tracepoint sources. Handle tracepoint
12945 queries.
12946 (main): Initialize the tracepoints module.
12947 (process_serial_event): Handle traceframe reads/writes.
12948
12949 * linux-low.c (handle_tracepoints): New.
12950 (linux_wait_1): Call it.
12951 (linux_resume_one_lwp): Handle while-stepping.
12952 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12953 (linux_target_ops): Install them.
12954 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12955 New field.
12956 * linux-x86-low.c (x86_supports_tracepoints): New.
12957 (the_low_target). Install it.
12958
12959 * mem-break.h (delete_breakpoint): Declare.
12960 * mem-break.c (delete_breakpoint): Make external.
12961
12962 * target.h (struct target_ops): Add `supports_tracepoints',
12963 `read_pc', and `write_pc' fields.
12964 (target_supports_tracepoints): Define.
12965 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12966 (phex_nz): New.
12967
12968 * regcache.h (struct regcache) <registers_owned>: New field.
12969 (init_register_cache, regcache_cpy): Declare.
12970 (regcache_read_pc, regcache_write_pc): Declare.
12971 (register_cache_size): Declare.
12972 (supply_regblock): Declare.
12973 * regcache.c (init_register_cache): New.
12974 (new_register_cache): Use it.
12975 (regcache_cpy): New.
12976 (register_cache_size): New.
12977 (supply_regblock): New.
12978 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12979
219f2f23
PA
12980 * tracepoint.c: New.
12981
12982 * Makefile.in (OBS): Add tracepoint.o.
12983 (tracepoint.o): New rule.
12984
3a13a53b
L
129852010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12986
12987 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12988 (i386-mmx.o): New.
12989 (i386-mmx.c): Likewise.
12990 (i386-mmx-linux.o): Likewise.
12991 (i386-mmx-linux.c): Likewise.
12992
12993 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12994 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12995 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12996 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12997
12998 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12999 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13000 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13001
1570b33e
L
130022010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13003
13004 * Makefile.in (clean): Updated.
13005 (i386-avx.o): New.
13006 (i386-avx.c): Likewise.
13007 (i386-avx-linux.o): Likewise.
13008 (i386-avx-linux.c): Likewise.
13009 (amd64-avx.o): Likewise.
13010 (amd64-avx.c): Likewise.
13011 (amd64-avx-linux.o): Likewise.
13012 (amd64-avx-linux.c): Likewise.
13013
13014 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13015 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13016 (srv_amd64_regobj): Add amd64-avx.o.
13017 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13018 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13019 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13020 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13021 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13022 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13023 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13024
13025 * i387-fp.c: Include "i386-xstate.h".
13026 (i387_xsave): New.
13027 (i387_cache_to_xsave): Likewise.
13028 (i387_xsave_to_cache): Likewise.
13029 (x86_xcr0): Likewise.
13030
13031 * i387-fp.h (i387_cache_to_xsave): Likewise.
13032 (i387_xsave_to_cache): Likewise.
13033 (x86_xcr0): Likewise.
13034
13035 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13036 * linux-crisv32-low.c (target_regsets): Likewise.
13037 * linux-m68k-low.c (target_regsets): Likewise.
13038 * linux-mips-low.c (target_regsets): Likewise.
13039 * linux-ppc-low.c (target_regsets): Likewise.
13040 * linux-s390-low.c (target_regsets): Likewise.
13041 * linux-sh-low.c (target_regsets): Likewise.
13042 * linux-sparc-low.c (target_regsets): Likewise.
13043 * linux-xtensa-low.c (target_regsets): Likewise.
13044
13045 * linux-low.c: Include <sys/uio.h>.
13046 (regsets_fetch_inferior_registers): Support nt_type.
13047 (regsets_store_inferior_registers): Likewise.
13048 (linux_process_qsupported): New.
13049 (linux_target_ops): Add linux_process_qsupported.
13050
13051 * linux-low.h (regset_info): Add nt_type.
13052 (linux_target_ops): Add process_qsupported.
13053
13054 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13055 and <sys/uio.h>.
13056 (init_registers_i386_avx_linux): New.
13057 (init_registers_amd64_avx_linux): Likewise.
13058 (xmltarget_i386_linux_no_xml): Likewise.
13059 (xmltarget_amd64_linux_no_xml): Likewise.
13060 (PTRACE_GETREGSET): Likewise.
13061 (PTRACE_SETREGSET): Likewise.
13062 (x86_fill_xstateregset): Likewise.
13063 (x86_store_xstateregset): Likewise.
13064 (use_xml): Likewise.
13065 (x86_linux_update_xmltarget): Likewise.
13066 (x86_linux_process_qsupported): Likewise.
13067 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13068 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13069 init_registers_i386_linux here. Call
13070 x86_linux_update_xmltarget.
13071 (the_low_target): Add x86_linux_process_qsupported.
13072
13073 * server.c (handle_query): Call target_process_qsupported.
13074
13075 * target.h (target_ops): Add process_qsupported.
13076 (target_process_qsupported): New.
13077
fc7238bb
PA
130782010-04-03 Pedro Alves <pedro@codesourcery.com>
13079
13080 * inferiors.c (add_thread): Set last_status kind to
13081 TARGET_WAITKIND_IGNORE.
13082 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13083 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13084 (linux_wait_1): Move `thread' local definition to block that uses
13085 it. Don't NULL initialize `event_child'.
13086 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13087 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13088 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13089
bdabb078
PA
130902010-04-01 Pedro Alves <pedro@codesourcery.com>
13091
13092 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13093 an extended waitstatus, or by a watchpoint.
13094 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13095 thread was stepping or has been stopped by a watchpoint.
13096
d3bbe7a0
PA
130972010-04-01 Pedro Alves <pedro@codesourcery.com>
13098
13099 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13100 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13101 of another, then delete the previous, and validate all
13102 breakpoints.
13103 (validate_inserted_breakpoint): New.
13104 (delete_disabled_breakpoints): New.
13105 (validate_breakpoints): New.
13106 (check_mem_read): Validate breakpoints before trusting their
13107 shadow. Delete disabled breakpoints.
13108 (check_mem_write): Validate breakpoints before trusting they
13109 should be inserted. Delete disabled breakpoints.
13110 * mem-break.h (validate_breakpoints):
13111 * server.c (handle_query): Validate breakpoints when we see a
13112 qSymbol query.
13113
8b07ae33
PA
131142010-04-01 Pedro Alves <pedro@codesourcery.com>
13115
13116 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13117 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13118 if we could tell there's a GDB breakpoint at stop_pc.
13119 (need_step_over_p): Don't do a step over if we find a GDB
13120 breakpoint at the resume PC.
13121
13122 * mem-break.c (struct raw_breakpoint): New.
13123 (enum bkpt_type): New type `gdb_breakpoint'.
13124 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13125 fields. New field `raw'.
13126 (find_raw_breakpoint_at): New.
13127 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13128 breakpoint instead.
13129 (set_breakpoint_at): Adjust.
13130 (delete_raw_breakpoint): New.
13131 (release_breakpoint): New.
13132 (delete_breakpoint): Rename to...
13133 (delete_breakpoint_1): ... this. Add proc parameter. Use
13134 release_breakpoint. Return ENOENT.
13135 (delete_breakpoint): Reimplement.
13136 (find_breakpoint_at): Delete.
13137 (find_gdb_breakpoint_at): New.
13138 (delete_breakpoint_at): Delete.
13139 (set_gdb_breakpoint_at): New.
13140 (delete_gdb_breakpoint_at): New.
13141 (gdb_breakpoint_here): New.
13142 (set_reinsert_breakpoint): Use release_breakpoint.
13143 (uninsert_breakpoint): Rename to ...
13144 (uninsert_raw_breakpoint): ... this.
13145 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13146 (reinsert_raw_breakpoint): Change parameter type to
13147 raw_breakpoint.
13148 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13149 instead.
13150 (check_breakpoints): Adjust. Use release_breakpoint.
13151 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13152 (breakpoint_inserted_here): Ditto.
13153 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13154 Don't trust the breakpoint's shadow if it is not inserted.
13155 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13156 (delete_all_breakpoints): Adjust.
13157 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13158 use delete_breakpoint_1.
13159
13160 * mem-break.h (breakpoints_supported): Delete declaration.
13161 (set_gdb_breakpoint_at): Declare.
13162 (gdb_breakpoint_here): Declare.
13163 (delete_breakpoint_at): Delete.
13164 (delete_gdb_breakpoint_at): Declare.
13165
13166 * server.h (struct raw_breakpoint): Forward declare.
13167 (struct process_info): New field `raw_breakpoints'.
13168
13169 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13170 breakpoints.
13171
6bf5e0ba
PA
131722010-03-24 Pedro Alves <pedro@codesourcery.com>
13173
13174 * linux-low.c (status_pending_p_callback): Fix comment.
13175 (linux_wait_for_event_1): Move most of the internal breakpoint
13176 handling from here...
13177 (linux_wait_1): ... to here.
13178 (count_events_callback): New.
13179 (select_singlestep_lwp_callback): New.
13180 (select_event_lwp_callback): New.
13181 (cancel_breakpoints_callback): New.
13182 (select_event_lwp): New.
13183 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13184 priority to all LWPs that have had events that should be reported
13185 to the client. Cancel breakpoints when about to reporting the
13186 event to the client, not while stopping lwps. No longer cancel
13187 finished single-steps here.
13188 (cancel_finished_single_step): Delete.
13189 (cancel_finished_single_steps): Delete.
13190
414a389f
PA
131912010-03-24 Pedro Alves <pedro@codesourcery.com>
13192
13193 * mem-break.c (enum bkpt_type): New.
13194 (struct breakpoint): New field `type'.
13195 (set_breakpoint_at): Change return type to struct breakpoint
13196 pointer. Set type to `other_breakpoint' by default.
13197 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13198 in the breakpoint list.
13199 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13200 (reinsert_breakpoint): Rename to ...
13201 (reinsert_raw_breakpoint): ... this.
13202 (reinsert_breakpoints_at): Adjust.
13203 * mem-break.h (struct breakpoint): Declare.
13204 (set_breakpoint_at): Change return type to struct breakpoint
13205 pointer.
13206
2280c721
PA
132072010-03-24 Pedro Alves <pedro@codesourcery.com>
13208
13209 * server.c (handle_query): Assign, not compare.
13210
d50171e4
PA
132112010-03-24 Pedro Alves <pedro@codesourcery.com>
13212
13213 Teach linux gdbserver to step-over-breakpoints.
13214
13215 * linux-low.c (can_hardware_single_step): New.
13216 (supports_breakpoints): New.
13217 (handle_extended_wait): If stopping threads, read the stop pc of
13218 the new cloned LWP.
13219 (get_pc): New.
13220 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13221 low target doesn't support retrieving the PC.
13222 (add_lwp): Set last_resume_kind to resume_continue.
13223 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13224 (linux_attach): Don't clear stop_expected. Set the lwp's
13225 last_resume_kind to resume_stop.
13226 (linux_detach_one_lwp): Don't check for removed breakpoints.
13227 (check_removed_breakpoint): Delete.
13228 (status_pending_p): Rename to ...
13229 (status_pending_p_callback): ... this. Don't check for removed
13230 breakpoints. Don't consider threads that are stopped from GDB's
13231 perspective.
13232 (linux_wait_for_lwp): Always read the stop_pc here.
13233 (cancel_breakpoint): New.
13234 (step_over_bkpt): New global.
13235 (linux_wait_for_event_1): Implement stepping over breakpoints.
13236 (gdb_wants_lwp_stopped): New.
13237 (gdb_wants_all_stopped): New.
13238 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13239 single-step traps here. Store the thread's last reported target
13240 wait status.
13241 (send_sigstop): Don't clear stop_expected. Always set it,
13242 instead.
13243 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13244 (cancel_finished_single_step): New.
13245 (cancel_finished_single_steps): New.
13246 (wait_for_sigstop): Don't cancel finished single-step traps here.
13247 (linux_resume_one_lwp): Don't check for removed breakpoints.
13248 Don't set `step' on non-hardware step archs.
13249 (linux_set_resume_request): Ignore resume_stop requests if already
13250 stopping or stopped. Set the lwp's last_resume_kind.
13251 (resume_status_pending_p): Don't check for removed breakpoints.
13252 (need_step_over_p): New.
13253 (start_step_over): New.
13254 (finish_step_over): New.
13255 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13256 requests. Clear the thread's last reported target waitstatus.
13257 Don't use the `suspended' flag. Don't consider pending breakpoints.
13258 (linux_resume): Start a step-over if necessary.
13259 (proceed_one_lwp): New.
13260 (proceed_all_lwps): New.
13261 (unstop_all_lwps): New.
13262 * linux-low.h (struct lwp_info): Rewrite comment for the
13263 `suspended' flag. Add the `stop_pc' field. Delete the
13264 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13265 Add `'last_resume_kind' and `need_step_over' fields.
13266 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13267 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13268 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13269 (set_raw_breakpoint_at): New.
13270 (set_breakpoint_at): Rewrite to use it.
13271 (reinsert_breakpoint_handler): Delete.
13272 (set_reinsert_breakpoint): New.
13273 (reinsert_breakpoint_by_bp): Delete.
13274 (delete_reinsert_breakpoints): New.
13275 (uninsert_breakpoint): Rewrite.
13276 (uninsert_breakpoints_at): New.
13277 (reinsert_breakpoint): Rewrite.
13278 (reinsert_breakpoints_at): New.
13279 (check_breakpoints): Rewrite.
13280 (breakpoint_here): New.
13281 (breakpoint_inserted_here): New.
13282 (check_mem_read): Adjust.
13283 * mem-break.h (breakpoints_supported, breakpoint_here)
13284 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13285 (reinsert_breakpoint_by_bp): Delete declaration.
13286 (delete_reinsert_breakpoints): Declare.
13287 (reinsert_breakpoint): Delete declaration.
13288 (reinsert_breakpoints_at): Declare.
13289 (uninsert_breakpoint): Delete declaration.
13290 (uninsert_breakpoints_at): Declare.
13291 (check_breakpoints): Adjust prototype.
13292 * server.h: Adjust include order.
13293 (struct thread_info): Declare here. Add a `last_status' field.
13294
30ba68cb
MS
132952010-03-23 Michael Snyder <msnyder@vmware.com>
13296
13297 * server.c (crc32): New function.
13298 (handle_query): Add handling for 'qCRC:' request.
13299
b9a881c2
PA
133002010-03-23 Pedro Alves <pedro@codesourcery.com>
13301
13302 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13303 lwp had been stopped by a watchpoint.
13304
e92d13d5
PA
133052010-03-16 Pedro Alves <pedro@codesourcery.com>
13306
13307 * server.h (internal_error): Declare.
13308 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13309 * utils.c (internal_error): New function.
13310
64daa791
AS
133112010-03-15 Andreas Schwab <schwab@redhat.com>
13312
13313 * configure.srv: Fix typo setting srv_regobj.
13314
f52cd8cd
PA
133152010-03-15 Pedro Alves <pedro@codesourcery.com>
13316
13317 * linux-low.c (fetch_register): Avoid passing a non string literal
13318 format to `error'.
13319 (usr_store_inferior_registers): Ditto.
13320
93ae6fdc
PA
133212010-03-14 Pedro Alves <pedro@codesourcery.com>
13322
13323 * linux-low.c (linux_write_memory): Bail out early if peeking
13324 memory failed.
13325
c3adc08c
PA
133262010-03-14 Pedro Alves <pedro@codesourcery.com>
13327
13328 * linux-low.h (struct lwp_info): New fields
13329 `stopped_by_watchpoint' and `stopped_data_address'.
13330 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13331 here, and cache them in the lwp object.
13332 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13333 directly.
13334 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13335 field.
13336 (linux_stopped_by_watchpoint): Rewrite.
13337 (linux_stopped_data_address): Rewrite.
13338
bce522a2
PA
133392010-03-06 Simo Melenius <simo.melenius@iki.fi>
13340
13341 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13342 switching the current inferior, not before.
13343
90884b2b
L
133442010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13345
13346 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13347 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13348 i386-linux.c and amd64-linux.c.
13349 (reg-i386.o): Removed.
13350 (reg-i386.c): Likewise.
13351 (reg-i386-linux.o): Likewise.
13352 (reg-i386-linux.c): Likewise.
13353 (reg-x86-64.o): Likewise.
13354 (reg-x86-64.c): Likewise.
13355 (reg-x86-64-linux.o): Likewise.
13356 (reg-x86-64-linux.c): Likewise.
13357 (i386.o): New.
13358 (i386.c): Likewise.
13359 (i386-linux.o): Likewise.
13360 (i386-linux.c): Likewise.
13361 (amd64.o): Likewise.
13362 (amd64.c): Likewise.
13363 (amd64-linux.o): Likewise.
13364 (amd64-linux.c): Likewise.
13365
13366 * configure.srv (srv_i386_regobj): New.
13367 (srv_i386_linux_regobj): Likewise.
13368 (srv_amd64_regobj): Likewise.
13369 (srv_amd64_linux_regobj): Likewise.
13370 (srv_i386_32bit_xmlfiles): Likewise.
13371 (srv_i386_64bit_xmlfiles): Likewise.
13372 (srv_i386_xmlfiles): Likewise.
13373 (srv_amd64_xmlfiles): Likewise.
13374 (srv_i386_linux_xmlfiles): Likewise.
13375 (srv_amd64_linux_xmlfiles): Likewise.
13376 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13377 srv_xmlfiles to $srv_i386_xmlfiles.
13378 (i[34567]86-*-mingw32ce*): Likewise.
13379 (i[34567]86-*-mingw*): Likewise.
13380 (i[34567]86-*-nto*): Likewise.
13381 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13382 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13383 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13384 (x86_64-*-linux*): Likewise.
13385
13386 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13387 (init_registers_amd64_linux): New.
13388 (x86_arch_setup): Replace init_registers_x86_64_linux with
13389 init_registers_amd64_linux.
13390
193f13e6
MK
133912010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13392
13393 * configure.ac: Check for libdl. If it is not available link against
13394 static libthread_db.
13395 * configure: Regenerate.
13396
85d721b8
PA
133972010-02-22 Pedro Alves <pedro@codesourcery.com>
13398
13399 PR9605
13400
13401 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13402 handing a read watchpoint.
13403 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13404
6076632b
DE
134052010-02-12 Doug Evans <dje@google.com>
13406
13407 * linux-low.c (linux_supports_tracefork_flag): Document.
13408 (linux_look_up_symbols): Add comment.
13409
3327ccf7
L
134102010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13411
13412 * regcache.c (supply_register): Clear regcache if buf is NULL.
13413
0718675c 134142010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13415 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13416
13417 * inferiors.c (find_inferior): Add function documentation.
13418 (unloaded_dll): Handle the case where the unloaded dll has not
13419 been previously registered in the dll list.
13420
177321bd
DJ
134212010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13422
13423 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13424 (thumb2_breakpoint): New.
13425 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13426
2b009048
DJ
134272010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13428
13429 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13430 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13431 breakpoints.
13432
3be029c7
PA
134332010-01-21 Pedro Alves <pedro@codesourcery.com>
13434
13435 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13436
18f5de3b
JK
134372010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13438
13439 * linux-s390-low.c (s390_collect_ptrace_register)
13440 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13441
3743bb4f
DE
134422010-01-21 Doug Evans <dje@google.com>
13443
14ce3065
DE
13444 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13445 (PTRACE_ARG4_TYPE): New macro.
13446 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13447 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13448 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13449 (usr_store_inferior_registers): Ditto.
13450 (linux_read_memory, linux_write_memory): Ditto.
13451 (linux_test_for_tracefork): Ditto.
13452
3743bb4f
DE
13453 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13454 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13455
8b315be5
PA
134562010-01-21 Pedro Alves <pedro@codesourcery.com>
13457
13458 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13459 target.
13460
85492558
PA
134612010-01-21 Pedro Alves <pedro@codesourcery.com>
13462
13463 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13464 prototype to take a regcache. Adjust.
13465
442ea881
PA
134662010-01-20 Pedro Alves <pedro@codesourcery.com>
13467
13468 * regcache.h (struct thread_info): Forward declare.
13469 (struct regcache): New.
13470 (new_register_cache): Adjust prototype.
13471 (get_thread_regcache): Declare.
13472 (free_register_cache): Adjust prototype.
13473 (registers_to_string, registers_from_string): Ditto.
13474 (supply_register, supply_register_by_name, collect_register)
13475 (collect_register_as_string, collect_register_by_name): Ditto.
13476 * regcache.c (struct inferior_regcache_data): Delete.
13477 (get_regcache): Rename to ...
13478 (get_thread_regcache): ... this. Adjust. Switch inferior before
13479 fetching registers.
13480 (regcache_invalidate_one): Adjust.
13481 (regcache_invalidate): Fix prototype.
13482 (new_register_cache): Return the new register cache.
13483 (free_register_cache): Change prototype.
13484 (realloc_register_cache): Adjust.
13485 (registers_to_string): Change prototype to take a regcache. Adjust.
13486 (registers_from_string): Ditto.
13487 (register_data): Ditto.
13488 (supply_register): Ditto.
13489 (supply_register_by_name): Ditto.
13490 (collect_register): Ditto.
13491 (collect_register_as_string): Ditto.
13492 (collect_register_by_name): Ditto.
13493 * server.c (process_serial_event): Adjust.
13494 * linux-low.h (regset_fill_func, regset_store_func): Change
13495 prototype.
13496 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13497 Change prototype.
13498 * linux-low.c (get_stop_pc): Adjust.
13499 (check_removed_breakpoint): Adjust.
13500 (linux_wait_for_event): Adjust.
13501 (linux_resume_one_lwp): Adjust.
13502 (fetch_register): Add regcache parameter. Adjust.
13503 (usr_store_inferior_registers): Ditto.
13504 (regsets_fetch_inferior_registers): Ditto.
13505 (regsets_store_inferior_registers): Ditto.
13506 (linux_fetch_registers, linux_store_registers): Ditto.
13507 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13508 regcache. Adjust.
43aaf8b6
PA
13509 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13510 Ditto.
442ea881
PA
13511 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13512 prototype to take a regcache.
13513 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13514 * remote-utils.c (convert_ascii_to_int, outreg)
13515 (prepare_resume_reply): Change prototype to take a regcache.
13516 Adjust.
13517 * target.h (struct target_ops) <fetch_registers, store_registers>:
13518 Change prototype to take a regcache.
13519 (fetch_inferior_registers, store_inferior_registers): Change
13520 prototype to take a regcache. Adjust.
13521 * proc-service.c (ps_lgetregs): Adjust.
13522 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13523 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13524 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13525 take a regcache. Adjust.
13526 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13527 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13528 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13529 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13530 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13531 (cris_cannot_fetch_register):
13532 (cris_breakpoint_at): Change prototype to take a regcache.
13533 Adjust.
13534 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13535 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13536 to take a regcache. Adjust.
13537 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13538 Adjust.
13539 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13540 take a regcache. Adjust.
13541 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13542 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13543 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13544 * linux-mips-low.c (mips_get_pc):
13545 (mips_set_pc): Change prototype to take a regcache. Adjust.
13546 (mips_reinsert_addr): Adjust.
13547 (mips_collect_register): Change prototype to take a regcache.
13548 Adjust.
13549 (mips_supply_register):
13550 (mips_collect_register_32bit, mips_supply_register_32bit)
13551 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13552 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13553 * linux-ppc-low.c (ppc_supply_ptrace_register)
13554 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13555 (parse_spufs_run): Adjust.
13556 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13557 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13558 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13559 take a regcache. Adjust.
13560 * linux-s390-low.c (s390_collect_ptrace_register)
13561 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13562 (s390_set_pc): Change prototype to take a regcache. Adjust.
13563 (s390_arch_setup): Adjust.
13564 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13565 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13566 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13567 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13568 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13569 regcache. Adjust.
13570 (sparc_breakpoint_at): Adjust.
13571 * linux-xtensa-low.c (xtensa_fill_gregset):
13572 (xtensa_store_gregset):
13573 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13574 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13575 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13576 prototype to take a regcache. Adjust.
13577 * win32-arm-low.c (arm_fetch_inferior_register)
13578 (arm_store_inferior_register): Change prototype to take a
13579 regcache. Adjust.
13580 * win32-i386-low.c (i386_fetch_inferior_register)
13581 (i386_store_inferior_register): Change prototype to take a
13582 regcache. Adjust.
13583 * win32-low.c (child_fetch_inferior_registers)
13584 (child_store_inferior_registers): Change prototype to take a
13585 regcache. Adjust.
13586 (win32_wait): Adjust.
13587 (win32_fetch_inferior_registers): Change prototype to take a
13588 regcache. Adjust.
13589 (win32_store_inferior_registers): Adjust.
13590 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13591 store_inferior_register>: Change prototype to take a regcache.
13592
60c3d7b0
DE
135932010-01-20 Doug Evans <dje@google.com>
13594
13595 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13596 #ifdef.
13597 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13598 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13599
dc146f7c
VP
136002010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13601
13602 * linux-low.c (linux_core_of_thread): New.
13603 (compare_ints, show_process, list_threads): New.
13604 (linux_qxfer_osdata): Report threads and cores.
13605 (linux_target_op): Register linux_core_of_thread.
13606 * remote-utils.c (prepare_resume_reply): Report the core.
13607 (buffer_xml_printf): Support %d specifier.
13608 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13609 New.
13610 (handle_query): Handle qXfer:threads. Announce availability
13611 thereof.
13612 * target.h (struct target_ops): New field core_of_thread.
13613
7803799a
UW
136142010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13615
13616 * Makefile.in (clean): Remove new generated files.
13617 (reg-s390.o, reg-s390.c): Remove rules.
13618 (reg-s390x.o, reg-s390x.c): Likewise.
13619 (s390-linux32.o, s390-linux32.c): Add rules.
13620 (s390-linux64.o, s390-linux64.c): Likewise.
13621 (s390x-linux64.o, s390x-linux64.c): Likewise.
13622 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13623 * linux-s390-low.c: Include <elf.h>.
13624 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13625 (init_registers_s390): Remove prototype.
13626 (init_registers_s390x): Likewise.
13627 (init_registers_s390_linux32): Add prototype.
13628 (init_registers_s390_linux64): Likewise.
13629 (init_registers_s390x_linux64): Likewise.
13630 (s390_num_regs_3264): New define.
13631 (s390_regmap_3264): New global variable.
13632 (s390_cannot_fetch_register): Remove obsolete check.
13633 (s390_cannot_store_register): Likewise.
13634 (s390_collect_ptrace_register): Handle upper/lower register halves.
13635 (s390_supply_ptrace_register): Likewise.
13636 (s390_fill_gregset): Update to register number changes.
13637 (s390_get_hwcap): New routine.
13638 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13639 Install appropriate regmap and register set.
13640
6e7ffa39
JB
136412010-01-01 Joel Brobecker <brobecker@adacore.com>
13642
13643 * server.c (gdbserver_version): Update copyright year to 2010.
13644 * gdbreplay.c (gdbreplay_version): Likewise.
13645
957f3f49
DE
136462009-12-28 Doug Evans <dje@google.com>
13647
13648 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13649 elf/external.h. Include <elf.h> instead but only if necessary.
13650
ca5c370d
PA
136512009-12-28 Pedro Alves <pedro@codesourcery.com>
13652
13653 * linux-low.c (linux_remove_process): Remove `detaching'
13654 parameter. Don't release/detach from thread_db here.
13655 (linux_kill): Release/detach from thread_db here, ...
13656 (linux_detach): ... and here, before actually detaching.
13657 (linux_wait_1): ... and here, when a process exits.
13658 * thread-db.c (any_thread_of): New.
13659 (thread_db_free): Switch the current inferior to a thread of the
13660 passed in process.
13661
4ee62156
DE
136622009-12-21 Doug Evans <dje@google.com>
13663
d90e6a88
DE
13664 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13665
c5f62d5f
DE
13666 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13667 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13668 warning ifndef __NR_tkill. Move setting of errno there too.
13669 Delete unnecessary resetting of errno after syscall.
13670 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13671
10e86dd7
DE
13672 * configure.ac: Check for dladdr.
13673 * config.in: Regenerate.
13674 * configure: Regenerate.
13675 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13676 (try_thread_db_load): Update.
13677
4ee62156
DE
13678 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13679
00f515da
DE
136802009-12-18 Doug Evans <dje@google.com>
13681
e9464885
DE
13682 * event-loop.c: Include unistd.h if it exists.
13683
07d4f67e
DE
13684 * linux-low.c (my_waitpid): Move definition away from being in
13685 between linux_tracefork_child/linux_test_for_tracefork.
13686
00f515da
DE
13687 * gdb_proc_service.h (psaddr_t): Fix type.
13688 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13689 signature to match glibc.
13690
1de1badb
DE
136912009-12-16 Doug Evans <dje@google.com>
13692
13693 * linux-low.c (linux_read_memory): Fix argument to read.
13694
aeeb81d1
PA
136952009-11-26 Pedro Alves <pedro@codesourcery.com>
13696
13697 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13698 events, don't leave current_inferior pointing at null.
13699
10357975
PA
137002009-11-26 Pedro Alves <pedro@codesourcery.com>
13701
13702 * win32-low.c (LOG): Delete.
13703 (OUTMSG): Output to stderr.
13704 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13705 on compile time LOG macro.
13706 (win32_wait): Fix debug output.
13707
cf6e3471
PA
137082009-11-26 Pedro Alves <pedro@codesourcery.com>
13709
13710 * win32-low.c (win32_add_one_solib): If the dll name is
13711 "ntdll.dll", prepend the system directory to the dll path.
13712
0c85e18e
MK
137132009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13714
13715 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13716
9ac544ce 137172009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13718 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13719
13720 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13721 * configure.ac: Check for __mcoldfire__ and set
13722 gdb_cv_m68k_is_coldfire.
13723 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13724 reg-cf.o and reg-m68k.o.
13725 * configure: Regenerated.
13726
fd7dd3e6
PA
137272009-11-16 Pedro Alves <pedro@codesourcery.com>
13728
13729 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13730 Pass it to thread_db_free.
13731 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13732 proper `detaching' argument to linux_remove_process.
13733 * linux-low.h (thread_db_free): Add `detaching' parameter.
13734 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13735 to thread_db_free.
13736 (thread_db_free): Add `detaching' parameter. Only
13737 call td_ta_clear_event if detaching from process.
13738
75aa492e
MK
137392009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13740
13741 * thread-db.c (thread_db_free): Fix typo.
13742
21e1bee4
PP
137432009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13744
13745 PR gdb/10838
13746 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13747
8838b45e
NS
137482009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13749
13750 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13751 with an i686 compiler.
13752 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13753 needed.
13754 * configure: Rebuilt.
13755
8a35fb51
SL
137562009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13757
13758 PR gdb/10783
13759
13760 * server.c (handle_search_memory_1): Correct read_addr initialization
13761 in loop for searching subsequent chunks.
13762
96f15937
PP
137632009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13764
13765 * configure.ac: New --with-libthread-db option.
13766 * thread-db.c: Allow direct dependence on libthread_db.
13767 (thread_db_free): Adjust.
13768 * config.in: Regenerate.
13769 * configure: Likewise.
889bf7c5 13770
5f7d1694
PP
137712009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13772
13773 PR gdb/10757
13774 * thread-db.c (attach_thread): New function.
13775 (maybe_attach_thread): Return success/failure.
13776 (find_new_threads_callback): Adjust.
889bf7c5
PA
13777 (thread_db_find_new_threads): Loop until no new threads.
13778
88e3b899
PA
137792009-10-13 Pedro Alves <pedro@codesourcery.com>
13780
13781 * proc-service.c (ps_lgetregs): Formatting.
13782
cdbfd419
PP
137832009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13784
13785 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13786 * configure.ac: Adjust.
13787 * linux-low.h (struct process_info_private): Move members to struct
13788 thread_db.
13789 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13790 * linux-low.c (linux_remove_process): Adjust.
13791 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13792 * server.c (handle_query): Move code ...
13793 (handle_monitor_command): ... here. New function.
13794 * target.h (struct target_ops): New member.
13795 * thread-db.c (struct thread_db): New.
13796 (libthread_db_search_path): New variable.
13797 (thread_db_create_event, thread_db_enable_reporting)
13798 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13799 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13800 (try_thread_db_load_1, dladdr_to_soname): New functions.
13801 (try_thread_db_load, thread_db_load_search): New functions.
13802 (thread_db_init): Search for libthread_db.
13803 (thread_db_free): New function.
13804 (thread_db_handle_monitor_command): Likewise.
13805 * config.in: Regenerate.
13806 * configure: Regenerate.
889bf7c5 13807
4168d2d6
UW
138082009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13809
13810 * spu-low.c (spu_kill): Wait for inferior to terminate.
13811 Call clear_inferiors.
13812 (spu_detach): Call clear_inferiors.
13813
81ecdfbb
RW
138142009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13815
13816 * aclocal.m4: Regenerate.
13817 * config.in: Likewise.
13818 * configure: Likewise.
13819
0b9ff2c0
UW
138202009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13821
13822 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13823 (parse_spufs_run): New function.
13824 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13825 (ppc_breakpoint_at): Handle SPU breakpoints.
13826
efcbbd14
UW
138272009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13828
13829 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13830 (SPUFS_MAGIC): Define.
13831 (spu_enumerate_spu_ids): New function.
13832 (linux_qxfer_spu): New function.
13833 (linux_target_ops): Install linux_qxfer_spu.
13834
f4d9bade
UW
138352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13836
13837 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13838 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13839 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13840 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13841 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13842 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13843 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13844 (init_registers_powerpc_cell32l): Add prototype.
13845 (init_registers_powerpc_cell64l): Likewise.
13846 (ppc_arch_setup): Detect Cell/B.E. architecture.
13847
96e946ca
RW
138482009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13849
13850 * Makefile.in (datarootdir): New variable.
13851
58d6951d
DJ
138522009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13853
13854 * linux-low.c (linux_write_memory): Update debugging output.
13855 * Makefile.in (clean): Add new descriptions.
13856 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13857 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13858 * configure.srv: Add new files for arm*-*-linux*.
13859 * linux-arm-low.c: Add new declarations.
13860 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13861 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13862 (HWCAP_VFPv3D16): New.
13863 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13864 instead of __IWMMXT__.
13865 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13866 (arm_arch_setup): New.
13867 (target_regsets): Remove #ifdef. Add VFP regset.
13868 (the_low_target): Use arm_arch_setup.
13869
12b42a12
DJ
138702009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13871
13872 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13873 the main thread again.
13874
ac8c974e
AR
138752009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13876
13877 Adding Neutrino gdbserver.
13878 * configure: Regenerated.
13879 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13880 * configure.srv (i[34567]86-*-nto*): New target.
13881 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13882 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13883 (nto_comctrl) [__QNX__]: New function.
13884 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13885
4424e0c3 138862009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13887
13888 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13889 srv_tgtobj.
13890
912cf4ba
PA
138912009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13892 Pedro Alves <pedro@codesourcery.com>
13893
13894 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13895 don't support CONTEXT_EXTENDED_REGISTERS.
13896 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13897 (the_low_target): Install them.
13898 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13899 failing with ERROR_PIPE_NOT_CONNECTED.
13900
aa5ca48f
DE
139012009-06-30 Doug Evans <dje@google.com>
13902 Pierre Muller <muller@ics.u-strasbg.fr>
13903
13904 Add h/w watchpoint support to x86-linux, win32-i386.
13905 * Makefile.in (SFILES): Add i386-low.c
13906 (i386_low_h): Define.
13907 (i386-low.o): Add dependencies.
13908 (linux-x86-low.o): Add i386-low.h dependency.
13909 (win32-i386-low.o): Ditto.
13910 * i386-low.c: New file.
13911 * i386-low.h: New file.
13912 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13913 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13914 * linux-low.c (linux_add_process): Initialize arch_private.
13915 (linux_remove_process): Free arch_private.
13916 (add_lwp): Initialize arch_private.
13917 (delete_lwp): Free arch_private.
13918 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13919 provided.
13920 * linux-low.h (process_info_private): New member arch_private.
13921 (lwp_info): New member arch_private.
13922 (linux_target_ops): New members new_process, new_thread,
13923 prepare_to_resume.
13924 (ptid_of): New macro.
13925 * linux-x86-low.c: Include stddef.h, i386-low.h.
13926 (arch_process_info): New struct.
13927 (arch_lwp_info): New struct.
13928 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13929 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13930 (i386_dr_low_get_status): New function.
13931 (x86_insert_point, x86_remove_point): New functions.
13932 (x86_stopped_by_watchpoint): New function.
13933 (x86_stopped_data_address): New function.
13934 (x86_linux_new_process, x86_linux_new_thread): New functions.
13935 (x86_linux_prepare_to_resume): New function.
13936 (the_low_target): Add entries for insert_point, remove_point,
13937 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13938 prepare_to_resume.
13939 * server.c (debug_hw_points): New global.
13940 (monitor_show_help): Document set debug-hw-points.
13941 (handle_query): Process "set debug-hw-points".
13942 * server.h (debug_hw_points): Declare.
13943 (paddress): Declare.
13944 * utils.c (NUMCELLS, CELLSIZE): New macros.
13945 (get_sell, xsnprintf, paddress): New functions.
13946 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13947 remove_point, stopped_by_watchpoint, stopped_data_address.
13948 * win32-i386-low.c: Include i386-low.h.
13949 (debug_reg_state): Replaces dr.
13950 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13951 (i386_dr_low_get_status): New function.
13952 (i386_insert_point, i386_remove_point): New functions.
13953 (i386_stopped_by_watchpoint): New function.
13954 (i386_stopped_data_address): New function.
13955 (i386_initial_stuff): Update.
13956 (get_thread_context,set_thread_context,i386_thread_added): Update.
13957 (the_low_target): Add entries for insert_point,
13958 remove_point, stopped_by_watchpoint, stopped_data_address.
13959 * win32-low.c (win32_insert_watchpoint): New function.
13960 (win32_remove_watchpoint): New function.
13961 (win32_stopped_by_watchpoint): New function.
13962 (win32_stopped_data_address): New function.
13963 (win32_target_ops): Add entries for insert_watchpoint,
13964 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13965 * win32-low.h (win32_target_ops): New members insert_point,
13966 remove_point, stopped_by_watchpoint, stopped_data_address.
13967
d993e290
PA
139682009-06-25 Pedro Alves <pedro@codesourcery.com>
13969
13970 * server.c (process_serial_event): Re-return unsupported, not
13971 error, if the type isn't recognized. Re-allow supporting only
13972 insert or remove packets. Also call require_running for
13973 breakpoints. Add missing break statement to default case. Tidy.
13974 * target.h (struct target_ops): Rename insert_watchpoint to
13975 insert_point, and remove_watchpoint to remove_point.
13976
13977 * linux-low.h (struct linux_target_ops): Likewise.
13978 * linux-low.c (linux_insert_watchpoint): Rename to ...
13979 (linux_insert_point): ... this. Adjust.
13980 (linux_remove_watchpoint): Rename to ...
13981 (linux_remove_point): ... this. Adjust.
13982 (linux_target_ops): Adjust.
13983 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13984 (cris_insert_point): ... this.
13985 (cris_remove_watchpoint): Rename to ...
13986 (cris_remove_point): ... this.
13987 (the_low_target): Adjust.
13988
0f54c268
PM
139892009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13990
13991 * server.c (handle_v_kill): Pass signal_pid to
13992 kill_inferior if multi_process is zero.
13993
c6314022
AR
139942009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13995
13996 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13997 * target.h (target_ops): Comment for *_watchpoint to make it clear
13998 the functions can get types '0' and '1'.
13999
4463ce24
AR
140002009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14001
14002 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14003 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14004 * regcache.c (get_regcache): Likewise.
14005 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14006 * win32-low.c (child_fetch_inferior_registers): Remove check for
14007 regno 0.
14008
cf8fd78b
PA
140092009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14010 Pedro Alves <pedro@codesourcery.com>
14011
14012 * target.h (struct target_ops) <supports_multi_process>: New
14013 callback.
14014 (target_supports_multi_process): New.
14015 * server.c (handle_query): Even if GDB reports support, only
14016 enable multi-process if the target also supports it. Report
14017 multi-process support only if the target backend supports it.
14018 * linux-low.c (linux_supports_multi_process): New function.
14019 (linux_target_ops): Install it as target_supports_multi_process
14020 callback.
14021
47c0c975
DE
140222009-05-24 Doug Evans <dje@google.com>
14023
e09875d4
DE
14024 Global renaming of find_thread_pid to find_thread_ptid.
14025 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14026 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14027 All callers updated.
14028
e27d73f6
DE
14029 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14030 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14031 directly.
14032
47c0c975
DE
14033 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14034 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14035 (linux_resume_one_lwp): Ditto.
14036
2acc282a
DE
140372009-05-23 Doug Evans <dje@google.com>
14038
14039 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14040 from struct inferior_list_entry * to struct lwp_info *.
14041 All callers updated.
14042
9f1036c1
DE
140432009-05-13 Doug Evans <dje@google.com>
14044
14045 * linux-x86-low.c: Don't include assert.h.
14046 (x86_siginfo_fixup): Use fatal, not assert.
14047 (x86_arch_setup): Fix comment.
14048
d0722149
DE
140492009-05-12 Doug Evans <dje@google.com>
14050
14051 Biarch support for i386/amd64 gdbserver.
14052 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14053 Add linux-x86-low.c.
14054 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14055 (linux-x86-low.o): Add.
14056 * linux-x86-64-low.c: Delete.
14057 * linux-i386-low.c: Delete.
14058 * linux-x86-low.c: New file.
14059 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14060 linux-x86-low.o.
14061 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14062 linux-x86-low.o.
14063 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14064 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14065 (linux_child_pid_to_exec_file): New function.
14066 (elf_64_header_p, elf_64_file_p): New functions.
14067 (siginfo_fixup): New function.
14068 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14069 give target a chance to convert layout.
14070 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14071 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14072
fdeb2a12
DE
140732009-05-07 Doug Evans <dje@google.com>
14074
14075 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14076 (regsets_store_inferior_registers): Ditto.
14077
a6dbe5df
PA
140782009-05-06 Pedro Alves <pedro@codesourcery.com>
14079
14080 PR server/10048
14081
14082 * linux-low.c (must_set_ptrace_flags): Delete.
14083 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14084 of the global.
14085 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14086 `lwp->must_set_ptrace_flags' instead.
ba42693b 14087 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14088 (linux_wait_1): ... not here.
14089
5091eb23
DE
140902009-04-30 Doug Evans <dje@google.com>
14091
9f767825
DE
14092 * inferiors.c (started_inferior_callback): New function.
14093 (attached_inferior_callback): New function.
14094 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14095 * server.c (print_started_pid, print_attached_pid): New functions.
14096 (detach_or_kill_for_exit): New function.
14097 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14098 * server.h (have_started_inferiors_p): Declare.
14099 (have_attached_inferiors_p): Declare.
14100
5091eb23
DE
14101 * inferiors.c (remove_process): Fix memory leak, free process.
14102 * linux-low.c (linux_remove_process): New function.
14103 (linux_kill): Call it instead of remove_process.
14104 (linux_detach, linux_wait_1): Ditto.
14105
155c8968
PA
141062009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14107
14108 * configure.srv: Add x86 Windows CE target.
14109
7fe519cb
UW
141102009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14111
14112 * inferiors.c (get_thread_process): Make global.
14113 * server.h (get_thread_process): Add prototype.
14114 * thread-db.c (find_one_thread): Use get_thread_process
14115 instead of current_process.
14116 (thread_db_get_tls_address): Do not crash if called when
14117 thread layer is not yet initialized.
14118
5472f405
UW
141192009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14120
14121 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14122 * spu-low.c (current_tid): Rename to ...
14123 (current_ptid): ... this.
14124 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14125 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14126 ptid_get_lwp (current_ptid) instead of current_tid.
14127 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14128 instead of current_tid. Use find_process_pid to verify pid
14129 argument is valid. Pass proper argument to remove_process.
14130 (spu_thread_alive): Compare current_ptid instead of current_tid.
14131 (spu_resume): Likewise.
14132
55ac2b99
PA
141332009-04-02 Pedro Alves <pedro@codesourcery.com>
14134
14135 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14136 variable.
14137
95954743
PA
141382009-04-01 Pedro Alves <pedro@codesourcery.com>
14139
14140 Implement the multiprocess extensions, and add linux multiprocess
14141 support.
14142
14143 * server.h (ULONGEST): Declare.
14144 (struct ptid, ptid_t): New.
14145 (minus_one_ptid, null_ptid): Declare.
14146 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14147 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14148 (struct inferior_list_entry): Change `id' type from unsigned from
14149 to ptid_t.
14150 (struct sym_cache, struct breakpoint, struct
14151 process_info_private): Forward declare.
14152 (struct process_info): Declare.
14153 (current_process): Declare.
14154 (all_processes): Declare.
14155 (initialize_inferiors): Declare.
14156 (add_thread): Adjust to use ptid_t.
14157 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14158 (add_process, remove_process, find_thread_pid): Declare.
14159 (find_inferior_id): Adjust to use ptid_t.
14160 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14161 (multi_process): Declare.
14162 (push_event): Adjust to use ptid_t.
14163 (read_ptid, write_ptid): Declare.
14164 (prepare_resume_reply): Adjust to use ptid_t.
14165 (clear_symbol_cache): Declare.
14166 * inferiors.c (all_processes): New.
14167 (null_ptid, minus_one_ptid): New.
14168 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14169 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14170 (add_thread): Change unsigned long to ptid. Remove gdb_id
14171 parameter. Adjust.
14172 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14173 (gdb_id_to_thread): Rename to ...
14174 (find_thread_pid): ... this. Change unsigned long to ptid.
14175 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14176 (loaded_dll, pull_pid_from_list): Adjust.
14177 (add_process, remove_process, find_process_pid)
14178 (get_thread_process, current_process, initialize_inferiors): New.
14179 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14180 (struct target_waitstatus) <related_pid>: Ditto.
14181 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14182 return type to int.
14183 (struct target_ops) <join>: Add `pid' argument.
14184 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14185 (struct target_ops) <wait>: Add `ptid' field. Change return type
14186 to ptid.
14187 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14188 (mywait): Add `ptid' argument. Change return type to ptid_t.
14189 (target_pid_to_str): Declare.
14190 * target.c (set_desired_inferior): Adjust to use ptids.
14191 (mywait): Add new `ptid' argument. Adjust.
14192 (target_pid_to_str): New.
14193 * mem-break.h (free_all_breakpoints): Declare.
14194 * mem-break.c (breakpoints): Delelete.
14195 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14196 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14197 to use per-process breakpoint list.
14198 (free_all_breakpoints): New.
14199 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14200 (symbol_cache, all_symbols_looked_up): Delete.
14201 (hexchars): New.
14202 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14203 read_ptid): New.
14204 (prepare_resume_reply): Change ptid argument's type from unsigned
14205 long to ptid_t. Adjust. Implement W;process and X;process.
14206 (free_sym_cache, clear_symbol_cache): New.
14207 (look_up_one_symbol): Adjust to per-process symbol cache. *
14208 * server.c (cont_thread, general_thread, step_thread): Change type
14209 to ptid_t.
14210 (attached): Delete.
14211 (multi_process): New.
14212 (last_ptid): Change type to ptid_t.
14213 (struct vstop_notif) <ptid>: Change type to ptid_t.
14214 (queue_stop_reply, push_event): Change `ptid' argument's type to
14215 ptid_t.
14216 (discard_queued_stop_replies): Add `pid' argument.
14217 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14218 changes. Don't reference the `attached' global.
14219 (attach_inferior): Adjust to mywait interface changes.
14220 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14221 features. Handle and report "multiprocess+". Handle
14222 "qAttached:PID".
14223 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14224 changes.
14225 (handle_v_kill): New.
14226 (handle_v_stopped): Adjust to use target_pid_to_str.
14227 (handle_v_requests): Allow multiple attaches and runs when
14228 multiprocess extensions are in effect. Handle "vKill".
14229 (myresume): Adjust to use ptids.
14230 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14231 (handle_status): Adjust to discard_queued_stop_replies interface
14232 change.
14233 (first_thread_of, kill_inferior_callback)
14234 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14235 (main): Call initialize_inferiors. Adjust to use ptids, killing
14236 and detaching from all inferiors. Handle multiprocess packet
14237 variants.
14238 * linux-low.h: Include gdb_proc_service.h.
14239 (struct process_info_private): New.
14240 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14241 <lwpid_of>: Use ptid_get_lwp.
14242 (get_lwp_thread): Adjust.
14243 (struct lwp_info): Add `dead' member.
14244 (find_lwp_pid): Declare.
14245 * linux-low.c (thread_db_active): Delete.
14246 (new_inferior): Adjust comment.
14247 (inferior_pid): Delete.
14248 (linux_add_process): New.
14249 (handle_extended_wait): Adjust.
14250 (add_lwp): Change unsigned long to ptid.
14251 (linux_create_inferior): Add process to processes table. Adjust
14252 to use ptids. Don't set new_inferior here.
14253 (linux_attach_lwp): Rename to ...
14254 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14255 it. Adjust to use ptids.
14256 (linux_attach_lwp): New.
14257 (linux_attach): Add process to processes table. Don't set
14258 new_inferior here.
14259 (struct counter): New.
14260 (second_thread_of_pid_p, last_thread_of_process_p): New.
14261 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14262 multiple processes.
14263 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14264 processes. Remove process from process table.
14265 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14266 to multiple processes.
14267 (any_thread_of): New.
14268 (linux_detach): Add `pid' argument, and handle it. Remove process
14269 from processes table.
14270 (linux_join): Add `pid' argument. Handle it.
14271 (linux_thread_alive): Change unsighed long argument to ptid_t.
14272 Consider dead lwps as not being alive.
14273 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14274 threads we're not interested in.
14275 (same_lwp, find_lwp_pid): New.
14276 (linux_wait_for_lwp): Change `pid' argument's type from int to
14277 ptid_t. Adjust.
14278 (linux_wait_for_event): Rename to ...
14279 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14280 from int to ptid_t. Adjust.
14281 (linux_wait_for_event): New.
14282 (linux_wait_1): Add `ptid' argument. Change return type to
14283 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14284 that exit from the process table.
14285 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14286 Adjust.
14287 (mark_lwp_dead): New.
14288 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14289 stopping all threads, mark its main lwp as dead.
14290 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14291 ptids.
14292 (fetch_register, usr_store_inferior_registers)
14293 (regsets_fetch_inferior_registers)
14294 (regsets_store_inferior_registers, linux_read_memory)
14295 (linux_write_memory): Inline `inferior_pid'.
14296 (linux_look_up_symbols): Adjust to use per-process
14297 `thread_db_active'.
14298 (linux_request_interrupt): Adjust to use ptids.
14299 (linux_read_auxv): Inline `inferior_pid'.
14300 (initialize_low): Don't reference thread_db_active.
14301 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14302 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14303 (ps_getpid): Return the pid of the current inferior.
14304 * thread-db.c (proc_handle, thread_agent): Delete.
14305 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14306 per-process data.
14307 (find_one_thread): Change argument type to ptid_t. Adjust to
14308 per-process data.
14309 (maybe_attach_thread): Adjust to per-process data and ptids.
14310 (thread_db_find_new_threads): Ditto.
14311 (thread_db_init): Ditto.
14312 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14313 processes table. Adjust to use ptids.
14314 (spu_kill, spu_detach): Adjust interface. Remove process from
14315 processes table.
14316 (spu_join, spu_thread_alive): Adjust interface.
14317 (spu_wait): Adjust interface. Remove process from processes
14318 table. Adjust to use ptids.
14319 * win32-low.c (current_inferior_tid): Delete.
14320 (current_inferior_ptid): New.
14321 (debug_event_ptid): New.
14322 (thread_rec): Take a ptid. Adjust.
14323 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14324 (child_delete_thread): Ditto.
14325 (do_initial_child_stuff): Add `attached' argument. Add process to
14326 processes table.
14327 (child_fetch_inferior_registers, child_store_inferior_registers):
14328 Adjust.
14329 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14330 (win32_attach): Pass 1 to do_initial_child_stuff.
14331 (win32_kill): Adjust interface. Remove process from processes
14332 table.
14333 (win32_detach): Ditto.
14334 (win32_join): Adjust interface.
14335 (win32_thread_alive): Take a ptid.
14336 (win32_resume): Adjust to use ptids.
14337 (get_child_debug_event): Ditto.
14338 (win32_wait): Adjust interface. Remove exiting process from
14339 processes table.
14340
bd99dc85
PA
143412009-04-01 Pedro Alves <pedro@codesourcery.com>
14342
14343 Non-stop mode support.
14344
14345 * server.h (non_stop): Declare.
14346 (gdb_client_data, handler_func): Declare.
14347 (delete_file_handler, add_file_handler, start_event_loop):
14348 Declare.
14349 (handle_serial_event, handle_target_event, push_event)
14350 (putpkt_notif): Declare.
14351 * target.h (enum resume_kind): New.
14352 (struct thread_resume): Replace `step' field by `kind' field.
14353 (TARGET_WNOHANG): Define.
14354 (struct target_ops) <wait>: Add `options' argument.
14355 <supports_non_stop, async, start_non_stop>: New fields.
14356 (target_supports_non_stop, target_async): New.
14357 (start_non_stop): Declare.
14358 (mywait): Add `options' argument.
14359 * target.c (mywait): Add `options' argument. Print child exit
14360 notifications here.
14361 (start_non_stop): New.
14362 * server.c (non_stop, own_buf, mem_buf): New globals.
14363 (struct vstop_notif): New.
14364 (notif_queue): New global.
14365 (queue_stop_reply, push_event, discard_queued_stop_replies)
14366 (send_next_stop_reply): New.
14367 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14368 interface changes.
14369 (attach_inferior): In non-stop mode, don't wait for the target
14370 here.
14371 (handle_general_set): Handle QNonStop.
14372 (handle_query): When handling qC, return the current general
14373 thread, instead of the first thread of the list.
14374 (handle_query): If the backend supports non-stop mode, include
14375 QNonStop+ in the qSupported query response.
14376 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14377 and non-stop mode.
14378 (handle_v_attach, handle_v_run): Handle non-stop mode.
14379 (handle_v_stopped): New.
14380 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14381 (myresume): Adjust to use resume_kind. Handle non-stop.
14382 (queue_stop_reply_callback): New.
14383 (handle_status): Handle non-stop mode.
14384 (main): Clear non_stop flag on reconnection. Use the event-loop.
14385 Refactor serial protocol handling from here ...
14386 (process_serial_event): ... to this new function. When GDB
14387 selects any thread, select one here. In non-stop mode, wait until
14388 GDB acks all pending events before exiting.
14389 (handle_serial_event, handle_target_event): New.
14390 * remote-utils.c (remote_open): Install remote_desc in the event
14391 loop.
14392 (remote_close): Remove remote_desc from the event loop.
14393 (putpkt_binary): Rename to...
14394 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14395 (putpkt_binary): New as wrapper around putpkt_binary_1.
14396 (putpkt_notif): New.
14397 (prepare_resume_reply): In non-stop mode, don't change the
14398 general_thread.
14399 * event-loop.c: New.
14400 * Makefile.in (OBJ): Add event-loop.o.
14401 (event-loop.o): New rule.
14402
14403 * linux-low.h (pid_of): Moved here.
14404 (lwpid_of): New.
14405 (get_lwp_thread): Use lwpid_of.
14406 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14407 * linux-low.c (pid_of): Delete.
14408 (inferior_pid): Use lwpid_of.
14409 (linux_event_pipe): New.
14410 (target_is_async_p): New.
14411 (delete_lwp): New.
14412 (handle_extended_wait): Use lwpid_of.
14413 (add_lwp): Don't set lwpid field.
14414 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14415 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14416 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14417 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14418 first. Adjust to linux_wait_for_event interface changes. Use
14419 lwpid_of.
14420 (linux_detach): Don't delete the main lwp here.
14421 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14422 (status_pending_p): Don't consider explicitly suspended lwps.
14423 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14424 pointer. Add OPTIONS argument. Change return type to int. Use
14425 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14426 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14427 pointer. Add status pointer argument. Return a pid instead of a
14428 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14429 changes. In non-stop mode, don't switch to a random thread.
14430 (linux_wait): Rename to...
14431 (linux_wait_1): ... this. Add target_options argument, and handle
14432 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14433 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14434 clean exit and signal exit code. Don't stop all threads in
14435 non-stop mode. In all-stop mode, only stop all threads when
14436 reporting a stop to GDB. Handle explicit thread stop requests.
14437 (async_file_flush, async_file_mark): New.
14438 (linux_wait): New.
14439 (send_sigstop): Use lwpid_of.
14440 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14441 interface changes. In non-stop mode, don't switch to a random
14442 thread.
14443 (linux_resume_one_lwp): Use lwpid_of.
14444 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14445 (linux_resume_one_thread): ... this. Handle resume_stop. In
14446 non-stop mode, don't look for pending flag in all threads.
14447 (resume_status_pending_p): Don't consider explicitly suspended
14448 threads.
14449 (my_waitpid): Reimplement. Emulate __WALL.
14450 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14451 Use lwpid_of.
14452 (sigchld_handler, linux_supports_non_stop, linux_async)
14453 (linux_start_non_stop): New.
14454 (linux_target_ops): Register linux_supports_non_stop, linux_async
14455 and linux_start_non_stop.
14456 (initialize_low): Install SIGCHLD handler.
14457 * thread-db.c (thread_db_create_event, find_one_thread)
14458 (thread_db_get_tls_address): Use lwpid_of.
14459 * win32-low.c (win32_detach): Adjust to use resume_kind.
14460 (win32_wait): Add `options' argument.
14461 * spu-low.c (spu_resume): Adjust to use resume_kind.
14462 (spu_wait): Add `options' argument.
14463
5b1c542e
PA
144642009-04-01 Pedro Alves <pedro@codesourcery.com>
14465
14466 Decouple target code from remote protocol.
14467
14468 * target.h (enum target_waitkind): New.
14469 (struct target_waitstatus): New.
14470 (struct target_ops) <wait>: Return an unsigned long. Take a
14471 target_waitstatus pointer instead of a char pointer.
14472 (mywait): Likewise.
14473 * target.c (mywait): Change prototype to return an unsigned long.
14474 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14475 * server.h (thread_from_wait, old_thread_from_wait): Delete
14476 declarations.
14477 (prepare_resume_reply): Change prototype to take a
14478 target_waitstatus.
14479 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14480 (last_status, last_ptid): New.
14481 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14482 pid instead of a signal.
14483 (attach_inferior): Remove "status" and "signal" parameters.
14484 Adjust.
14485 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14486 not as an address.
14487 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14488 (handle_v_requests, myresume): Remove "status" and "signal"
14489 parameters. Adjust.
14490 (handle_status): New.
14491 (main): Delete local `status'. Adjust.
14492 * remote-utils.c: Include target.h.
14493 (prepare_resume_reply): Change prototype to take a
14494 target_waitstatus. Adjust.
14495
14496 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14497 interface.
14498 * spu-low.c (spu_wait): Adjust.
14499 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14500 Delete.
14501 (win32_wait): Adjust.
14502
2bd7c093
PA
145032009-04-01 Pedro Alves <pedro@codesourcery.com>
14504
14505 * target.h (struct thread_resume): Delete leave_stopped member.
14506 (struct target_ops): Add a `n' argument to the `resume' callback.
14507 * server.c (start_inferior): Adjust.
14508 (handle_v_cont, myresume): Adjust.
14509 * linux-low.c (check_removed_breakpoint): Adjust to resume
14510 interface change, and to removed leave_stopped field.
14511 (resume_ptr): Delete.
14512 (struct thread_resume_array): New.
14513 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14514 resume interface change.
14515 (linux_continue_one_thread, linux_queue_one_thread)
14516 (resume_status_pending_p): Check if the resume field is NULL
14517 instead of checking the leave_stopped member.
14518 (linux_resume): Adjust to the target resume interface change.
14519 * spu-low.c (spu_resume): Adjust to the target resume interface
14520 change.
14521 * win32-low.c (win32_detach, win32_resume): Ditto.
14522
c35fafde
PA
145232009-04-01 Pedro Alves <pedro@codesourcery.com>
14524
14525 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14526 flag.
14527 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14528 pending.
14529 (linux_continue_one_thread): Only preserve the stepping flag if
14530 there's a pending breakpoint.
14531
0a59d50b
PA
145322009-03-31 Pedro Alves <pedro@codesourcery.com>
14533
14534 * server.c (main): After the inferior having exited, call
14535 remote_close before exiting gdbserver.
14536
f04c6d38
TJB
145372009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14538
14539 Fix size of FPSCR in Power 7 processors.
14540 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14541 (PPC_FEATURE_HAS_DFP): New #define.
14542 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14543 size of the FPSCR.
14544
78e5cee6
PA
145452009-03-23 Pedro Alves <pedro@codesourcery.com>
14546
14547 * server.c (handle_query) Whitespace and formatting.
14548
1b3f6016
PA
145492009-03-22 Pedro Alves <pedro@codesourcery.com>
14550
14551 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14552 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14553 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14554 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14555 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14556 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14557 Makefile.in, configure.ac: Fix whitespace throughout.
14558 * configure: Regenerate.
14559
a07b2135
PA
145602009-03-22 Pedro Alves <pedro@codesourcery.com>
14561
14562 * inferiors.c (find_inferior): Make it safe for the callback
14563 function to delete the currently iterated inferior.
14564
67cc2626
PA
145652009-03-22 Pedro Alves <pedro@codesourcery.com>
14566
14567 * Makefile.in (linuw_low_h): Move higher.
14568 (thread-db.o): Depend on $(linux_low_h).
14569
54a0b537
PA
145702009-03-17 Pedro Alves <pedro@codesourcery.com>
14571
14572 Rename "process" to "lwp" throughout.
14573
14574 * linux-low.c (all_processes): Rename to...
14575 (all_lwps): ... this.
14576 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14577 (add_process): Rename to ...
14578 (add_lwp): ... this. Adjust.
14579 (linux_create_inferior): Adjust.
14580 (linux_attach_lwp): Adjust.
14581 (linux_attach): Adjust.
14582 (linux_kill_one_process): Rename to ...
14583 (linux_kill_one_lwp): ... this. Adjust.
14584 (linux_kill): Adjust.
14585 (linux_detach_one_process): Rename to ...
14586 (linux_detach_one_lwp): ... this. Adjust.
14587 (linux_detach): Adjust.
14588 (check_removed_breakpoint): Adjust.
14589 (status_pending_p): Adjust.
14590 (linux_wait_for_process): Rename to ...
14591 (linux_wait_for_lwp): ... this. Adjust.
14592 (linux_wait_for_event): Adjust.
14593 (send_sigstop): Adjust.
14594 (wait_for_sigstop): Adjust.
14595 (stop_all_processes): Rename to ...
14596 (stop_all_lwps): ... this.
14597 (linux_resume_one_process): Rename to ...
14598 (linux_resume_one_lwp): ... this. Adjust.
14599 (linux_set_resume_request, linux_continue_one_thread)
14600 (linux_queue_one_thread, resume_status_pending_p)
14601 (usr_store_inferior_registers, regsets_store_inferior_registers)
14602 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14603 Adjust.
14604 * linux-low.h (get_process): Rename to ...
14605 (get_lwp): ... this. Adjust.
14606 (get_thread_process): Rename to ...
14607 (get_thread_lwp): ... this. Adjust.
14608 (get_process_thread): Rename to ...
14609 (get_lwp_thread): ... this. Adjust.
14610 (struct process_info): Rename to ...
14611 (struct lwp_info): ... this.
14612 (all_processes): Rename to ...
14613 (all_lwps): ... this.
14614 * proc-service.c (ps_lgetregs): Adjust.
14615 * thread-db.c (thread_db_create_event, find_one_thread)
14616 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14617
0b16c5cf
PA
146182009-03-14 Pedro Alves <pedro@codesourcery.com>
14619
14620 * server.c (handle_query): Handle "qAttached".
14621
32de4b9d
NS
146222009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14623
14624 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14625 GPLv3, update license URL.
14626
2aecd87f
DE
146272009-03-01 Doug Evans <dje@google.com>
14628
93efd302 14629 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14630 (server_h): Add gdb_signals.h.
14631 (signals.o): Update.
14632 * server.h (target_signal_from_host,target_signal_to_host_p)
14633 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14634
86b1f9c5
PM
146352009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14636
14637 * remote-utils.c (getpkt): Also generate remote-debug
14638 information if noack_mode is set.
14639
4aa995e1
PA
146402009-02-06 Pedro Alves <pedro@codesourcery.com>
14641
14642 * server.c (handle_query): Report qXfer:siginfo:read and
14643 qXfer:siginfo:write as supported and handle them.
14644 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14645 * linux-low.c (linux_xfer_siginfo): New.
14646 (linux_target_ops): Set it.
14647
62709adf
PA
146482009-01-26 Pedro Alves <pedro@codesourcery.com>
14649
14650 * server.c (gdbserver_usage): Mention --remote-debug.
14651 (main): Accept '--remote-debug' switch.
14652
aef93bd7
DE
146532009-01-18 Doug Evans <dje@google.com>
14654
14655 * regcache.c (new_register_cache): No need to check result of xcalloc.
14656 * server.c (handle_search_memory): Back out calls to xmalloc,
14657 result is checked and error is returned to user upon failure.
14658 (handle_query): Ditto. Add more checks for result of malloc.
14659 (handle_v_cont): Check result of malloc, report error back to
14660 user upon failure.
14661 (handle_v_run): Ditto. Call freeargv.
14662 * server.h (freeargv): Declare.
14663 * utils.c (freeargv): New fn.
14664
54363045
DE
146652009-01-15 Doug Evans <dje@google.com>
14666
f626972c
DE
14667 * gdbreplay.c (perror_with_name): Make arg const char *.
14668 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14669 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14670 * utils.c (perror_with_name): Make arg const char *.
54363045 14671
18aae699
PA
146722009-01-14 Pedro Alves <pedro@codesourcery.com>
14673
14674 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14675 when handling a EXIT_PROCESS_DEBUG_EVENT.
14676
ff703abe
JB
146772009-01-06 Joel Brobecker <brobecker@adacore.com>
14678
14679 * gdbreplay.c (gdbreplay_version): Update copyright year.
14680 * server.c (gdbserver_version): Likewise.
14681
f21cc1a2 146822009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14683
14684 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14685 (handle_extended_wait): Improve comment.
0e21c1ec 14686
bca929d3
DE
146872008-12-13 Doug Evans <dje@google.com>
14688
14689 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14690 * server.h (ATTR_MALLOC): New macro.
14691 (xmalloc,xcalloc,xstrdup): Declare.
14692 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14693 * inferiors.c: Ditto.
14694 * linux-low.c: Ditto.
14695 * mem-break.c: Ditto.
14696 * regcache.c: Ditto.
14697 * remote-utils.c: Ditto.
14698 * server.c: Ditto.
14699 * target.c: Ditto.
14700 * win32-low.c: Ditto.
14701
97438e3f
DE
147022008-12-12 Doug Evans <dje@google.com>
14703
896c7fbb
DE
14704 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14705 in debugging printf.
14706
97438e3f
DE
14707 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14708
e3b886f8
DE
147092008-12-09 Doug Evans <dje@google.com>
14710
14711 * linux-low.h (struct process_info): Delete member tid, unused.
14712 * thread-db.c (find_one_thread): Update.
14713 (maybe_attach_thread): Update.
14714
07e059b5
VP
147152008-12-02 Pedro Alves <pedro@codesourcery.com>
14716
889bf7c5
PA
14717 * target.h (struct target_ops): Add qxfer_osdata member.
14718 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14719 and dirent.h.
14720 (linux_qxfer_osdata): New functions.
14721 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14722 callback.
14723 * server.c (handle_query): Handle "qXfer:osdata:read:".
14724 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14725 (buffer_xml_printf): New functions.
14726 * server.h (struct buffer): New.
14727 (buffer_grow_str, buffer_grow_str0): New macros.
14728 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14729 (buffer_xml_printf): Declare.
07e059b5 14730
4cab47ab
DE
147312008-11-24 Doug Evans <dje@google.com>
14732
14733 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14734
f142445f
DJ
147352008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14736
14737 * server.c (handle_v_run): Always use the supplied argument list.
14738
d0107bb6 147392008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14740
d0107bb6
BW
14741 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14742 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14743
2c4ad781
TJB
147442008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14745
14746 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14747 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14748 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14749 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14750 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14751 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14752 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14753 XML target descriptions.
14754 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14755 when inferior is running on an ISA 2.05 or later processor. Add
14756 special case to return offset for full 64-bit slot of FPSCR when
14757 in 32-bits.
14758
dfb64f85
DJ
147592008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14760
14761 * Makefile.in (SFILES, clean): Added sparc64 files.
14762 (reg-sparc64.o, reg-sparc64.c): New.
14763 * configure.srv (sparc*-*-linux*): New configuration.
14764 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14765 syscall arguments for SPARC.
14766 (regsets_store_inferior_registers): Likewise.
14767 * linux-sparc-low.c: New file.
14768
66b6e1dd
DE
147692008-10-21 Doug Evans <dje@google.com>
14770
14771 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14772 (READLINE_DIR,READLINE_DEP): Delete.
14773 (INTERNAL_CFLAGS): Update.
14774 (LINTFLAGS): Update.
14775
9b710a42
PA
147762008-10-10 Pedro Alves <pedro@codesourcery.com>
14777
14778 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14779 whole argv from the last run, not just argv[0].
14780
5822d809
PA
147812008-09-08 Pedro Alves <pedro@codesourcery.com>
14782
14783 * regcache.c (new_register_cache): Return NULL if the register
14784 cache size isn't known yet.
14785 (free_register_cache): Avoid dereferencing a NULL regcache.
14786
74aac56f
DJ
147872008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14788
14789 * configure.srv: Merge MIPS and MIPS64.
14790
400b20f5
MR
147912008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14792
14793 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14794
677c5bb1
LM
147952008-08-18 Luis Machado <luisgpm@br.ibm.com>
14796
14797 * Makefile.in: Add required vsx dependencies.
14798
14799 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14800 Declare init_registers_powerpc_vsx32l.
14801 Declare init_registers_powerpc_vsx64l.
14802 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14803 (ppc_arch_setup): Check for VSX in hwcap.
14804 (ppc_fill_vsxregset): New function.
14805 (ppc_store_vsxregset): New function.
14806 Add new VSX entry in regset_info target_regsets.
14807
14808 * configure.srv: Add new VSX dependencies.
14809
a6f3e723
SL
148102008-08-12 Pedro Alves <pedro@codesourcery.com>
14811
14812 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14813 (remote_open): Set or clear transport_is_reliable.
14814 (putpkt_binary): Don't expect acks in noack mode.
14815 (getpkt): Don't send ack/nac in noack mode.
14816 * server.c (handle_general_set): Handle QStartNoAckMode.
14817 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14818 qSupported.
14819 (main): Reset noack_mode on every connection.
14820 * server.h (noack_mode): Declare.
14821
a417dc56
RW
148222008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14823
14824 * Makefile.in (GDBREPLAY_OBS): New variable.
14825 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14826
3221518c
UW
148272008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14828 Daniel Jacobowitz <dan@codesourcery.com>
14829
14830 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14831 (usr_store_inferior_registers): Likewise.
14832 (regsets_store_inferior_registers): Likewise.
14833
ec56be1b
PA
148342008-07-31 Rolf Jansen <rj@surtec.com>
14835 Pedro Alves <pedro@codesourcery.com>
14836
14837 * configure.ac: Check for memmem declaration.
14838 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14839 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14840 (disable_packet_qfThreadInfo): Unconditionally compile.
14841 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14842 * configure, config.in: Regenerate.
14843
2fe5e3ff
DE
148442008-07-28 Doug Kwan <dougkwan@google.com>
14845
14846 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14847 (linux_write_memory): Remove declaration of errno.
14848
836acd6d
UW
148492008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14850
14851 * linux-low.c (handle_extended_wait): Do not use "status"
14852 variable uninitialized.
14853
aeba519e
PA
148542008-07-07 Pedro Alves <pedro@codesourcery.com>
14855
14856 * server.c (handle_v_attach): Inhibit reporting dll changes.
14857
db42f210
PA
148582008-06-27 Pedro Alves <pedro@codesourcery.com>
14859
14860 * remote-utils.c (prepare_resume_reply): If requested, don't
14861 output "thread:TID" in the T stop reply.
14862
14863 * server.c (disable_packet_vCont, disable_packet_Tthread)
14864 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14865 (handle_query): If requested, disable support for qC, qfThreadInfo
14866 and qsThreadInfo.
14867 (handle_v_requests): If requested, disable support for vCont.
14868 (gdbserver_show_disableable): New.
14869 (main): Handle --disable-packet and --disable-packet=LIST.
14870
14871 * server.h (disable_packet_vCont, disable_packet_Tthread)
14872 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14873
8e4c5421
CD
148742008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14875
14876 * server.c (gdbserver_usage): Mention --version.
14877
6e23a804
DJ
148782008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14879
14880 * Makefile.in (gdbreplay.o): New rule.
14881
90aa6a40
JM
148822008-06-06 Joseph Myers <joseph@codesourcery.com>
14883
14884 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14885 message, not gdbserver.
14886
c16158bc 148872008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14888 Nathan Sidwell <nathan@codesourcery.com>
14889 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14890
14891 * acinclude.m4: Include ../../config/acx.m4.
14892 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14893 * configure, config.in: Regenerate.
14894 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14895 * server.c (gdbserver_version): Print PKGVERSION.
14896 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14897 (main): Adjust gdbserver_usage calls.
14898 * gdbreplay.c (version, host_name): Add declarations.
14899 (gdbreplay_version, gdbreplay_usage): New.
14900 (main): Accept --version and --help options.
14901
aeb75bf5
DJ
149022008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14903
14904 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14905 (arm_breakpoint_at): Handle Thumb.
14906 (the_low_target): Add comment.
14907
76b233dd
UW
149082008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14909
14910 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14911
08388c79
DE
149122008-05-09 Doug Evans <dje@google.com>
14913
a3c83fae
DE
14914 * server.h (decode_search_memory_packet): Declare.
14915 * remote-utils.c (decode_search_memory_packet): New fn.
14916 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14917 (handle_search_memory): New fn.
14918 (handle_query): Process qSearch:memory packets.
14919
bb9c3d36
UW
149202008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14921
14922 * regcache.c (registers_length): Remove.
14923 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14924 full register packet.
14925 * regcache.h (registers_length): Remove prototype.
14926 * server.h (PBUFSIZ): Define to 16384.
14927
7284e1be
UW
149282008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14929
14930 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14931 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14932 powerpc-64l.o, and powerpc-altivec64l.o.
14933 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14934 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14935 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14936 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14937 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14938 to srv_xmlfiles.
14939
14940 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14941 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14942 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14943 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14944 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14945 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14946 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14947 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14948 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14949 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14950 (clean): Update.
14951
14952 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14953 (init_registers_powerpc_32l): ... this new prototype.
14954 (init_registers_powerpc_32): Remove, replace by ...
14955 (init_registers_powerpc_altivec32l): ... this new prototype.
14956 (init_registers_powerpc_e500): Remove, replace by ...
14957 (init_registers_powerpc_e500l): ... this new prototype.
14958 (init_registers_ppc64): Remove, replace by ...
14959 (init_registers_powerpc_64l): ... this new prototype.
14960 (init_registers_powerpc_64): Remove, replace by ...
14961 (init_registers_powerpc_altivec64l): ... this new prototype.
14962 (ppc_num_regs): Set to 73.
14963 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14964 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14965 (ppc_cannot_store_register): Handle orig_r3 and trap.
14966 (ppc_arch_setup): Update init_registers_... calls.
14967 (ppc_fill_gregset): Handle orig_r3 and trap.
14968
14969 * inferiors.c (clear_inferiors): Reset current_inferior.
14970
fdc59709
PB
149712008-04-23 Paolo Bonzini <bonzini@gnu.org>
14972
889bf7c5
PA
14973 * acinclude.m4: Add override.m4.
14974 * configure: Regenerate.
fdc59709 14975
c9b2f845
UW
149762008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14977
14978 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14979 initial call to init_register_ppc64.
14980
550512b8
UW
149812008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14982
43aaf8b6
PA
14983 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14984 single powerpc*-*-linux* case.
550512b8
UW
14985 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14986
b6430ec3
UW
149872008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14988
14989 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14990 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14991 from reg_xmlfiles.
14992 * linux-ppc-low.c: Include <elf.h>.
14993 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14994 (ppc_hwcap): New global variable.
14995 (ppc_regmap): Remove __SPE__ #ifdef sections.
14996 (ppc_regmap_e500): New global variable.
14997 (ppc_cannot_store_register): Update __SPE__ special case.
14998 (ppc_get_hwcap): New function.
14999 (ppc_arch_setup): Use it to determine whether inferior supports
15000 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15001 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15002 Do not access registers if target does not support AltiVec.
15003 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15004 Do not access registers if target does not support SPE.
15005 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15006
52fa2412
UW
150072008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15008
15009 * linux-low.c (disabled_regsets, num_regsets): New.
15010 (use_regsets_p): Delete.
15011 (linux_wait_for_process): Clear disabled_regsets.
15012 (regsets_fetch_inferior_registers): Check and set it.
15013 (regsets_store_inferior_registers): Likewise.
15014 (linux_fetch_registers, linux_store_registers): Do not use
15015 use_regsets_p.
15016 (initialize_low): Allocate disabled_regsets.
15017
e28b3332
DJ
150182008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15019
15020 * Makefile.in (LIBOBJS): New.
15021 (OBS): Use LIBOBJS.
15022 (memmem.o): New rule.
15023 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15024 * configure: Regenerated.
15025
4536995d
UW
150262008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15027
15028 * server.c (handle_query): Never return "unsupported" for
15029 qXfer:features:read queries.
15030
221c031f
UW
150312008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15032
15033 * server.c (get_features_xml): Fix inverted condition.
15034 (handle_query): Always support qXfer:feature:read.
15035
ccd213ac
DJ
150362008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15037
15038 * server.c (wrapper_argv): New.
15039 (start_inferior): Handle wrapper_argv. If set, expect an extra
15040 trap.
15041 (gdbserver_usage): Document --wrapper.
15042 (main): Parse --wrapper.
15043
6fe305f7
UW
150442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15045
15046 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15047 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15048 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15049 (ppc_set_pc): Likewise.
15050 (ppc_arch_setup): New function.
15051 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15052 of collect_register.
889bf7c5 15053 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15054
5b0a002e
UW
150552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15056
15057 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15058 instead of linux-ppc64-low.o.
15059 * linux-ppc64-low.c: Remove file.
15060 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15061 (linux-ppc64-low.o): Remove rule.
15062
15063 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15064 (init_registers_powerpc_64): Likewise.
15065 (ppc_regmap): Conditionally define depending on __powerpc64__.
15066 (ppc_cannot_store_register): Do not special-case "fpscr" when
15067 compiled on __powerpc64__.
15068 (ppc_collect_ptrace_register): New function.
15069 (ppc_supply_ptrace_register): New function.
15070 (ppc_breakpoint): Change type to "unsigned int".
15071 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15072 (the_low_target): Conditionally provide initializers for the
889bf7c5 15073 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15074 collect_ptrace_register and supply_ptrace_register members.
15075
9b4b61c8
UW
150762008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15077
15078 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15079 * server.c (gdbserver_xmltarget): Define.
15080 (get_features_xml): Use it to replace "target.xml" and arch_string.
15081
15082 * configure.srv: Remove srv_xmltarget. Add XML files that were
15083 mentioned there to srv_xmlfiles instead. Remove conditional tests
15084 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15085 srv_xmlfiles and srv_regobj to include all possible choices.
15086 * configure.ac (srv_xmltarget): Remove.
15087 (srv_xmlfiles): Do not add "target.xml".
15088 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15089 checks for supplementary target information.
15090 * configure: Regenerate.
15091 * Makefile.in (XML_TARGET): Remove.
15092 (target.xml): Remove rule.
15093 (clean): Do not clean up target.xml.
15094 (.PRECIOUS): Do not mention target.xml.
15095
15096 * target.h (struct target_ops): Remove arch_string member.
15097 * linux-low.c (linux_arch_string): Remove.
15098 (linux_target_ops): Remove arch_string initializer.
15099 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15100 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15101 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15102 * spu-low.c (spu_arch_string): Remove.
15103 (spu_target_ops): Remove arch_string initializer.
15104 * win32-low.c (win32_arch_string): Remove.
15105 (win32_target_ops): Remove arch_string initializer.
15106 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15107 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15108 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15109
ee1a7ae4
UW
151102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15111
15112 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15113 by collect_ptrace_register and supply_ptrace_register hooks.
15114 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15115 instead of checking for the_low_target.left_pad_xfer.
15116 (usr_store_inferior_registers): Use collect_ptrace_register callback
15117 instead of checking for the_low_target.left_pad_xfer.
15118
15119 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15120 (s390_supply_ptrace_register): Likewise.
15121 (s390_fill_gregset): Call s390_collect_ptrace_register.
15122 (the_low_target): Update.
15123
15124 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15125 (ppc_supply_ptrace_register): Likewise.
15126 (the_low_target): Update.
15127
15128 * linux-i386-low.c (the_low_target): Update.
15129 * linux-x86-64-low.c (the_low_target): Update.
15130
d61ddec4
UW
151312008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15132
15133 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15134 reg-s390.o and reg-s390x.o.
15135
15136 * linux-low.c (new_inferior): New global variable.
15137 (linux_create_inferior, linux_attach): Set it.
15138 (linux_wait_for_process): Call the_low_target.arch_setup after the
15139 target has stopped for the first time.
15140 (initialize_low): Do not call the_low_target.arch_setup.
15141
15142 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15143 (s390_set_pc): Likewise.
15144 (s390_arch_setup): New function.
15145 (the_low_target): Use s390_arch_setup as arch_setup routine.
15146
15147 * regcache.c (realloc_register_cache): New function.
15148 (set_register_cache): Call it for each existing regcache.
15149
d05b4ac3
UW
151502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15151
15152 * server.h (init_registers): Remove prototype.
15153
15154 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15155 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15156 instead of init_registers ().
15157 * linux-arm-low.c (init_registers_arm): Add prototype.
15158 (init_registers_arm_with_iwmmxt): Likewise.
15159 (the_low_target): Add initializer for arch_setup field.
15160 * linux-cris-low.c (init_registers_cris): Add prototype.
15161 (the_low_target): Add initializer for arch_setup field.
15162 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15163 (the_low_target): Add initializer for arch_setup field.
15164 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15165 (the_low_target): Add initializer for arch_setup field.
15166 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15167 (the_low_target): Add initializer for arch_setup field.
15168 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15169 (the_low_target): Add initializer for arch_setup field.
15170 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15171 (the_low_target): Add initializer for arch_setup field.
15172 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15173 (init_registers_mips64_linux): Likewise.
15174 (the_low_target): Add initializer for arch_setup field.
15175 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15176 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15177 (the_low_target): Add initializer for arch_setup field.
15178 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15179 (init_registers_powerpc_64): Likewise.
15180 (the_low_target): Add initializer for arch_setup field.
15181 * linux-s390-low.c (init_registers_s390): Add prototype.
15182 (init_registers_s390x): Likewise.
15183 (the_low_target): Add initializer for arch_setup field.
15184 * linux-sh-low.c (init_registers_sh): Add prototype.
15185 (the_low_target): Add initializer for arch_setup field.
15186 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15187 (the_low_target): Add initializer for arch_setup field.
15188 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15189 (the_low_target): Add initializer for arch_setup field.
15190
15191 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15192 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15193 instead of init_registers ().
15194 * win32-arm-low.c (init_registers_arm): Add prototype.
15195 (the_low_target): Add initializer for arch_setup field.
15196 * win32-i386-low.c (init_registers_i386): Add prototype.
15197 (the_low_target): Add initializer for arch_setup field.
15198
15199 * spu-low.c (init_registers_spu): Add prototype.
15200 (initialize_low): Call initialie_registers_spu () instead of
15201 initialize_registers ().
15202
fd96d250
PA
152032008-02-19 Pedro Alves <pedro@codesourcery.com>
15204
15205 * server.c (handle_v_requests): When handling the vRun and vAttach
15206 packets, if already debugging a process, don't kill it. Return an
15207 error instead.
15208
d41b6bb4
DJ
152092008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15210
15211 * server.c (handle_query): Correct length check.
15212
5ac588cf
PA
152132008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15214
15215 * win32-low.c (do_initial_child_stuff): Add process handle
15216 parameter. Set current_process_handle and current_process_id from the
15217 parameters. Clear globals.
15218 (win32_create_inferior): Don't set current_process_handle and
15219 current_process_id here. Instead pass them on the call to
15220 do_initial_child_stuff.
15221 (win32_attach): Likewise.
15222 (win32_clear_inferiors): New.
15223 (win32_kill): Don't close the current process handle or the
15224 current thread handle here. Instead call win32_clear_inferiors.
15225 (win32_detach): Don't open a new handle to the process. Call
15226 win32_clear_inferiors.
15227 (win32_join): Don't rely on current_process_handle; open a new
15228 handle using the process id.
15229 (win32_wait): Call win32_clear_inferiors when the inferior process
15230 has exited.
15231
ecd7ecbc
DJ
152322008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15233
15234 * server.c (monitor_show_help): Add "exit".
15235
1525d545
MG
152362008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15237
ecd7ecbc 15238 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15239 (clean): Add reg-xtensa.c.
15240 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15241 * configure.srv (xtensa*-*-linux*) New target.
15242 * linux-xtensa-low.c: New.
15243 * xtensa-xtregs.c: New.
1525d545 15244
59a016f0
PA
152452008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15246
15247 * hostio.c: Don't include errno.h.
15248 (errno_to_fileio_errno): Move to hostio-errno.
15249 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15250 error number outputting to the target->hostio_last_error callback.
15251 (hostio_packet_error): Use FILEIO_EINVAL directly.
15252 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15253 calls to hostio_error.
15254 * hostio-errno.c: New.
15255 * server.h (hostio_last_error_from_errno): Declare.
15256 * target.h (target_ops): Add hostio_last_error member.
15257 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15258 as hostio_last_error handler.
889bf7c5 15259 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15260 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15261 (wince_hostio_last_error): New functions.
15262 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15263 as hostio_last_error handler.
15264 (win32_target_ops) [!_WIN32_WCE]: Register
15265 hostio_last_error_from_errno as hostio_last_error handler.
15266 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15267 (hostio-errno.o): New rule.
15268 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15269 * configure.srv (srv_hostio_err_objs): New variable. Default to
15270 hostio-errno.o.
15271 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15272 * configure: Regenerate.
15273
2d717e4f
DJ
152742008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15275
15276 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15277 (linux_kill, linux_detach): Clean up the process list.
15278 * remote-utils.c (remote_open): Improve port number parsing.
15279 (putpkt_binary, input_interrupt): Only send interrupts if the target
15280 is running.
15281 * server.c (extended_protocol): Make static.
15282 (attached): Define earlier.
15283 (exit_requested, response_needed, program_argv): New variables.
15284 (target_running): New.
15285 (start_inferior): Clear attached here.
15286 (attach_inferior): Set attached here.
15287 (require_running): Define.
15288 (handle_query): Use require_running and target_running. Implement
15289 "monitor exit".
15290 (handle_v_attach, handle_v_run): New.
15291 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15292 (gdbserver_usage): Update.
15293 (main): Redo argument parsing. Handle --debug and --multi. Handle
15294 --attach along with other options or after the port. Save
15295 program_argv. Support no initial program. Resynchronize
15296 communication with GDB after an error. Handle "monitor exit".
15297 Use require_running and target_running. Always allow the extended
15298 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15299 restart in extended mode.
15300 * README: Refer to the GDB manual. Update --attach usage.
15301
7407e2de
AS
153022007-12-20 Andreas Schwab <schwab@suse.de>
15303
15304 * linux-low.c (STACK_SIZE): Define.
15305 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15306 (linux_test_for_tracefork): Likewise.
15307
b65d95c5
DJ
153082007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15309
15310 * linux-low.c (linux_wait_for_event): Update messages. Do not
15311 reinsert auto-delete breakpoints.
15312 * mem-break.c (struct breakpoint): Change return type of handler to
15313 int.
15314 (set_breakpoint_at): Update handler type.
15315 (reinsert_breakpoint_handler): Return 1 instead of calling
15316 delete_breakpoint.
15317 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15318 setting a new one.
15319 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15320 * mem-break.h (set_breakpoint_at): Update handler type.
15321 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15322 * win32-low.c (auto_delete_breakpoint): New.
15323 (get_child_debug_event): Use it.
15324
4e799345
DJ
153252007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15326
15327 * configure.ac: Check for pread and pwrite.
15328 * hostio.c (handle_pread): Fall back to lseek and read.
15329 (handle_pwrite): Fall back to lseek and write.
15330 * config.in, configure: Regenerated.
15331
27524b67
DJ
153322007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15333
15334 * server.c (myresume): Add own_buf argument.
15335 (main): Update calls.
15336
a20d5e98
DJ
153372007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15338
15339 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15340 * remote-utils.c (remote_open): Do not call disable_async_io.
15341 (block_async_io): Delete.
15342 (unblock_async_io): Make static.
15343 (initialize_async_io): New.
15344 * server.c (handle_v_cont): Handle async I/O here.
15345 (myresume): Likewise. Move other common resume tasks here...
15346 (main): ... from here. Call initialize_async_io. Disable async
15347 I/O before the main loop.
15348 * server.h (initialize_async_io): Declare.
15349 (block_async_io, unblock_async_io): Delete prototypes.
15350 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15351
b79d787e
DJ
153522007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15353
15354 * remote-utils.c (readchar): Allow binary data in received messages.
15355
d97903b2
PA
153562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15357
15358 * win32-low.c (attaching): New global.
15359 (win32_create_inferior): Clear the `attaching' global.
15360 (win32_attach): Set the `attaching' global.
15361 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15362 attaching. Only set a breakpoint at the entry point if not
15363 attaching.
15364
311de423
PA
153652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15366
15367 * server.c (main): Don't report dll events on the initial
15368 connection on attaches.
15369
6c2d16d2
PA
153702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15371
15372 * server.c (main): Relax numerical bases supported for the pid of
15373 the --attach command line argument.
15374
5ca906e6
PA
153752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15376
15377 * win32-low.c (win32_attach): Call OpenProcess before
15378 DebugActiveProcess, not after. Add last error output to error
15379 call.
15380
9c6c8194
PA
153812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15382
15383 * win32-low.c (win32_get_thread_context)
15384 (win32_set_thread_context): New functions.
15385 (thread_rec): Use win32_get_thread_context.
15386 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15387 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15388 field.
15389
4d5d1aaa
PA
153902007-12-03 Leo Zayas
15391 Pedro Alves <pedro_alves@portugalmail.pt>
15392
15393 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15394 global variables.
15395 (child_add_thread): Minor cleanup.
15396 (child_continue): Resume artificially suspended threads before
15397 calling ContinueDebugEvent.
15398 (suspend_one_thread): New.
15399 (fake_breakpoint_event): New.
15400 (get_child_debug_event): Change return type to int. Check here if
15401 gdb sent an interrupt request. If a soft interrupt was requested,
15402 fake a breakpoint event. Return 0 if there is no event to handle,
15403 and 1 otherwise.
15404 (win32_wait): Don't check here if gdb sent an interrupt request.
15405 Ensure there is a valid event to handle.
15406 (win32_request_interrupt): Add soft interruption method as last
15407 resort.
15408
c436e841
PA
154092007-12-03 Leo Zayas
15410 Pedro Alves <pedro_alves@portugalmail.pt>
15411
15412 * win32-low.h (win32_thread_info): Add descriptions to the
15413 structure members. Replace `suspend_count' counter by a
15414 `suspended' flag.
15415 * win32-low.c (thread_rec): Update condition of when to get the
15416 context from the inferior. Rely on ContextFlags being set if it
15417 has already been retrieved. Only suspend the inferior thread if
15418 we haven't already. Warn if that fails.
15419 (continue_one_thread): s/suspend_count/suspended/. Only call
15420 ResumeThread once. Warn if that fails.
15421
e7b5fa67
PA
154222007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15423
15424 * win32-low.c (win32_wait): Don't read from the inferior when it
15425 has already exited.
15426
a385171d
PA
154272007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15428
15429 * Makefile.in (win32_low_h): New variable.
15430 (win32-low.o): Add dependency on $(win32_low_h).
15431 (win32-arm-low.o, win32-i386-low.o): New rules.
15432
f80c84b3
DJ
154332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15434
15435 * hostio.c: Correct copyright year.
15436
a6b151f1
DJ
154372007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15438
15439 * Makefile.in (OBS): Add hostio.o.
15440 (hostio.o): New rule.
15441 * server.h (handle_vFile): Declare.
15442 * hostio.c: New file.
15443 * server.c (handle_v_requests): Take packet_len and new_packet_len
15444 for binary packets. Call handle_vFile.
15445 (main): Update call to handle_v_requests.
15446
f9387fc3
DJ
154472007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15448
15449 * linux-low.c: Include <sched.h>.
15450
51c2684e
DJ
154512007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15452
15453 * linux-low.c (linux_tracefork_grandchild): New.
15454 (linux_tracefork_child): Use clone.
15455 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15456
75f83163
JB
154572007-10-31 Joel Brobecker <brobecker@adacore.com>
15458
15459 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15460
da5898ce
DJ
154612007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15462
15463 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15464
24a09b5f
DJ
154652007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15466
15467 * inferiors.c (change_inferior_id): Delete.
15468 (add_pid_to_list, pull_pid_from_list): New.
15469 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15470 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15471 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15472 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15473 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15474 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15475 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15476 (using_threads): Always set to 1.
15477 (handle_extended_wait): New.
15478 (add_process): Do not set TID.
15479 (linux_create_inferior): Set must_set_ptrace_flags.
15480 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15481 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15482 (linux_thread_alive): Rename TID argument to LWPID.
15483 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15484 (linux_wait_for_event): Do not use TID or check using_threads. Update
15485 call to dead_thread_notify. Call handle_extended_wait.
15486 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15487 (send_sigstop): Delete sigstop_sent.
15488 (wait_for_sigstop): Avoid TID.
15489 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15490 (linux_test_for_tracefork): New.
15491 (linux_lookup_signals): Use thread_db_active and
15492 linux_supports_tracefork_flag.
15493 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15494 * linux-low.h (get_process_thread): Avoid TID.
15495 (struct process_ifo): Move thread_known and tid to the end. Remove
15496 sigstop_sent.
15497 (linux_attach_lwp, thread_db_init): Update prototypes.
15498 * server.h (change_inferior_id): Delete prototype.
15499 (add_pid_to_list, pull_pid_from_list): New prototypes.
15500 * thread-db.c (thread_db_use_events): New.
15501 (find_first_thread): Rename to...
15502 (find_one_thread): ...this. Update callers and messages. Do not
15503 call fatal. Check thread_db_use_events. Do not call
15504 change_inferior_id or new_thread_notify.
15505 (maybe_attach_thread): Update. Do not call new_thread_notify.
15506 (thread_db_init): Set thread_db_use_events. Check use_events.
15507 * utils.c (fatal, warning): Correct message prefix.
15508
30ed0a8f
DJ
155092007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15510
15511 * Makefile.in (clean): Remove new files.
15512 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15513 (powerpc-64.o, powerpc-64.c): New rules.
15514 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15515 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15516 with SPE.
15517 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15518 SPE targets.
15519 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15520 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15521 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15522 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15523 (target_regsets): Add AltiVec and SPE register sets.
15524 * configure.ac: Check for AltiVec and SPE.
15525 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15526 (ppc_fill_vrregset, ppc_store_vrregset): New.
15527 (target_regsets): Add AltiVec register set.
15528 * configure: Regenerated.
15529
fd462a61
DJ
155302007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15531
15532 * linux-low.c (O_LARGEFILE): Define.
15533 (linux_read_memory): Use /proc/PID/mem.
15534 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15535 * configure, config.in: Regenerated.
15536
69f223ed
DJ
155372007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15538
15539 * linux-low.c (linux_wait_for_event): Do not pass signals while
15540 single-stepping.
15541
aec18585
PA
155422007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15543
15544 * win32-low.c (create_process): New.
15545 (win32_create_inferior): Use create_process instead of
15546 CreateProcess. If create_process failed retry appending an ".exe"
15547 suffix. Store the GetLastError result immediatelly after
15548 create_process calls and use it on the call to error.
15549
34d86ddd
PA
155502007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15551
15552 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15553
5a0e3bd0
JB
155542007-08-23 Joel Brobecker <brobecker@adacore.com>
15555
15556 * configure.ac: Switch license to GPLv3.
15557
f88c79e6
MS
155582007-08-01 Michael Snyder <msnyder@access-company.com>
15559
15560 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15561
6b3d9b83
PA
155622007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15563
15564 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15565 typedef.
15566 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15567 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15568 CloseToolhelp32Snapshot.
15569 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15570 CloseToolhelp32Snapshot.
15571
c588c53c
MS
155722007-07-27 Michael Snyder <michael.snyder@access-company.com>
15573
15574 * server.c (main): Check for inferior exit before main loop.
15575
aa0403d9
PA
155762007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15577
15578 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15579 instead of on tmp_desc.
15580
255e7678
DJ
155812007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15582 Daniel Jacobowitz <dan@codesourcery.com>
15583
15584 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15585 (add_thread): Minor cleanups.
15586 (clear_inferiors): Move lower in the file. Clear the DLL
15587 list.
15588 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15589 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15590 (xml_escape_text): New.
15591 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15592 for qSupported.
15593 (handle_v_cont): Report errors.
15594 (gdbserver_version): Update.
15595 (main): Correct size of own_buf. Do not report initial DLL events.
15596 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15597 (unloaded_dll, xml_escape_text): New.
15598 * win32-low.c (enum target_waitkind): Update comments.
15599 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15600 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15601 (win32_EnumProcessModules, win32_GetModuleInformation)
15602 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15603 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15604 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15605 (win32_Module32First, win32_Module32Next, load_toolhelp)
15606 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15607 (get_child_debug_event): Handle DLL events.
15608 (win32_wait): Likewise.
15609
0d37add9
DJ
156102007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15611
15612 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15613 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15614
45e2715e
PA
156152007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15616
15617 * win32-low.c (handle_output_debug_string): Ignore event if not
15618 waiting.
15619
c5674cf1
PA
156202007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15621
15622 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15623
2bbe3cc1
DJ
156242007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15625
15626 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15627
ae13219e
DJ
156282007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15629
15630 * inferiors.c (change_inferior_id): Add comment.
15631 * linux-low.c (check_removed_breakpoint): Add an early
15632 prototype. Improve debug output.
15633 (linux_attach): Doc update.
15634 (linux_detach_one_process, linux_detach): Clean up before releasing
15635 each process.
15636 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15637 * linux-low.h (struct process_info): Doc improvement.
15638 * mem-break.c (delete_all_breakpoints): New.
15639 * mem-break.h (delete_all_breakpoints): New prototype.
15640 * thread-db.c (find_first_thread): New.
15641 (thread_db_create_event): Call it instead of
15642 thread_db_find_new_threads. Clean up unused variables.
15643 (maybe_attach_thread): Remove first thread handling.
15644 (thread_db_find_new_threads): Use find_first_thread.
15645 (thread_db_get_tls_address): Likewise.
15646
4105de34
DJ
156472007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15648
15649 * thread-db.c (thread_db_find_new_threads): Add prototype.
15650 (thread_db_create_event): Check for the main thread before adding
15651 a new thread.
15652 (maybe_attach_thread): Only enable event reporting if TID == 0.
15653 (thread_db_get_tls_address): Check for new threads.
15654
2b876972
DJ
156552007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15656
15657 * linux-low.c (linux_create_inferior): Try execv before execvp.
15658 * spu-low.c (spu_create_inferior): Likewise.
15659
7a245884
DJ
156602007-06-13 Mike Frysinger <vapier@gentoo.org>
15661
15662 * linux-low.c (linux_create_inferior): Change execv to execvp.
15663 * spu-low.c (spu_create_inferior): Likewies.
15664
117ce543
DJ
156652007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15666
15667 * Makefile.in (clean): Clean new files instead of deleted ones.
15668 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15669 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15670 rules.
15671 * configure.srv: Specify XML files and new regformats for MIPS and
15672 MIPS64 GNU/Linux.
15673 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15674 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15675 an entry for the restart register.
15676 (mips_cannot_fetch_register, mips_cannot_store_register)
15677 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15678 register names to match the XML descriptions.
15679 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15680 restart register instead of $0.
15681
0e7f50da
UW
156822007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15683 Markus Deuling <deuling@de.ibm.com>
15684
15685 * remote-utils.c (decode_xfer_write): New function.
15686 * server.h (decode_xfer_write): Add prototype.
15687 * server.c (handle_query): Add PACKET_LEN argument. Support
15688 qXfer:spu:read and qXfer:spu:write packets.
15689 (main): Pass packet_len to handle_query.
15690 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15691 * target.h (target_ops): Add qxfer_spu.
15692
374c1d38
UW
156932007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15694
15695 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15696 accessing non-seekable spufs files.
15697
bb63802a
UW
156982007-05-16 Markus Deuling <deuling@de.ibm.com>
15699
889bf7c5 15700 * server.c (handle_query): Add reply for qC packet.
bb63802a 15701
7390519e
PA
157022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15703 Leo Zayas <lerele@champenstudios@com>
15704
15705 * server.h (check_remote_input_interrupt_request): New function.
15706 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15707 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15708 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15709 (check_remote_input_interrupt_request): New function.
15710 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15711 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15712 winapi_GenerateConsoleCtrlEvent): New typedefs.
15713 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15714 to 250 ms.
15715 (win32_wait): Check for remote interrupt request
15716 with check_remote_input_interrupt_request.
15717 (win32_request_interrupt): New function.
15718 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15719
34b34921
PA
157202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15721
15722 * win32-low.c (debug_registers_changed,
15723 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15724 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15725 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15726 (thread_rec): Get context using the low target.
15727 (child_add_thread): Call thread_added on the low target,
15728 which does the same thing.
15729 (regptr): Delete.
15730 (do_initial_child_stuff): Remove debug registers references.
15731 Set context using the low target. Resume threads after
15732 setting the contexts.
15733 (child_continue): Remove dead variable. Remove debug
15734 registers references.
15735 (child_fetch_inferior_registers): Go through the low target.
15736 (do_child_store_inferior_registers): Remove.
15737 (child_store_inferior_registers): Go through the low target.
15738 (win32_resume): Remove debug registers references.
15739 Set context using the low target.
15740 (handle_exception): Change return type to void. Don't record
15741 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15742 first chance exception.
889bf7c5 15743 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15744 goto loop. Always return after waiting for debug event.
15745 (win32_wait): Convert to switch statement. Handle spurious
15746 events.
15747
15748 * win32-i386-low.c (debug_registers_changed,
15749 debug_registers_used): New.
15750 (initial_stuff): Rename to ...
15751 (i386_initial_stuff): ... this. Clear debug registers
15752 state variables.
15753 (store_debug_registers): Delete.
15754 (i386_get_thread_context): New.
15755 (load_debug_registers): Delete.
15756 (i386_set_thread_context): New.
15757 (i386_thread_added): New.
15758 (single_step): Rename to ...
15759 (i386_single_step): ... this.
15760 (do_fetch_inferior_registers): Rename to ...
15761 (i386_fetch_inferior_register): ... this.
15762 (i386_store_inferior_register): New.
15763 (the_low_target): Adapt to new interface.
15764
15765 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15766 (arm_get_thread_context): New.
15767 (arm_set_thread_context): New.
15768 (regptr): New.
15769 (do_fetch_inferior_registers): Rename to ...
15770 (arm_fetch_inferior_register): ... this.
15771 (arm_store_inferior_register): New.
15772 (arm_wince_breakpoint): Reimplement as unsigned long.
15773 (arm_wince_breakpoint_len): Define.
15774 (the_low_target): Adapt to new interface.
15775
15776 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15777 load_debug_registers. Add get_thread_context, set_thread_context,
15778 thread_added and store_inferior_register. Rename
15779 fetch_inferior_registers to fetch_inferior_register.
15780 (regptr): Remove declaration.
15781
dd6953e1
PA
157822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15783
15784 * linux-low.c (linux_detach): Change return type to int. Return 0.
15785 * spu-low.c (spu_detach): Likewise.
15786
444d6139
PA
157872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15788
15789 * target.h (target_ops): Change return type of detach to int.
15790 Add join.
15791 (join_inferior): New.
15792 * server.c (main): Don't skip detach support on mingw32.
15793 If the inferior doesn't support detaching return error.
15794 Call join_inferior instead of using waitpid.
15795 * linux-low.c (linux_join): New.
15796 (linux_target_op): Add linux_join.
15797 * spu-low.c (spu_join): New.
15798 (spu_target_ops): Add spu_join.
15799 * win32-low.c (win32_detach): Adapt to new interface.
15800 Reopen current_process_handle before detaching. Issue a child
15801 resume before detaching.
15802 (win32_join): New.
15803 (win32_target_op): Add win32_join.
15804
1d5315fe
PA
158052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15806
15807 * win32-low.c (win32-attach): Fix return value.
15808 * target.h (target_ops): Describe ATTACH return values.
15809
bf914831
PA
158102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15811
15812 * win32-low.c (GETPROCADDRESS): Define.
15813 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15814 (winapi_DebugSetProcessKillOnExit): Likewise.
15815 (win32_create_inferior): Force usage of ansi CreateProcessA.
15816 (win32_attach): Use GETPROCADDRESS.
15817 (win32_detach): Likewise.
15818
f72f3e60
PA
158192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15820
15821 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15822
ed50f18f
PA
158232007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15824
15825 * win32-low.c: Commit leftover changes from 2007-03-29.
15826
0c2ead7e
DJ
158272007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15828
15829 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15830 fields short instead of int. Add explicit padding.
15831 (i387_cache_to_fsave): Remove unnecessary casts.
15832 (i387_fsave_to_cache): Doc fix.
15833 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15834
73725ff3
DJ
158352007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15836
15837 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15838 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15839
d99f33d8
PA
158402007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15841
15842 * configure.srv (arm*-*-mingw32ce*): Move near the other
15843 arm targets.
15844
68070c10
PA
158452007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15846
2482afc6 15847 * configure.ac: Add errno checking.
68070c10
PA
15848 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15849 sys/file.h and malloc.h.
15850 (AC_CHECK_DECLS): Add perror.
15851 (srv_mingwce): Handle.
2482afc6 15852 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15853 win32-i386-low.o to srv_tgtobj.
15854 (i[34567]86-*-mingw*): Likewise.
15855 (arm*-*-mingw32ce*): Add case.
15856 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15857 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15858 [__MINGW32CE__] (strerror): New function.
15859 [__MINGW32CE__] (errno): Define to GetLastError.
15860 [__MINGW32CE__] (COUNTOF): New macro.
15861 (remote_open): Remove extra close call.
15862 * mem-break.c (delete_breakpoint_at): New function.
15863 * mem-break.h (delete_breakpoint_at): Declare.
15864 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15865 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15866 [USE_WIN32API] (read, write): Add char* casts.
15867 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15868 * server.h: Include wincecompat.h on Windows CE.
15869 [HAVE_ERRNO_H]: Check.
15870 (perror): Declare if not declared.
15871 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15872 (perror_with_name): Remove errno declaration.
15873 * wincecompat.h: New.
15874 * wincecompat.c: New.
15875 * win32-low.h: New.
15876 * win32-arm-low.c: New.
15877 * win32-i386-low.c: New.
15878 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15879 (OUTMSG2): Make it safe.
15880 (_T): New macro.
15881 (COUNTOF): New macro.
15882 (NUM_REGS): Get it from the low target.
15883 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15884 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15885 (thread_rec): Let low target handle debug registers.
15886 (child_add_thread): Likewise.
15887 (child_init_thread_list): Likewise.
15888 (continue_one_thread): Likewise.
15889 (regptr): New.
15890 (do_child_fetch_inferior_registers): Move to ...
15891 * win32-i386-low.c: ... here, and rename to ...
15892 (do_fetch_inferior_registers): ... this.
889bf7c5 15893 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15894 Go through the low target.
15895 (do_child_store_inferior_registers): Use regptr.
15896 (strwinerror): New function.
15897 (win32_create_inferior): Handle Windows CE.
15898 Use strwinerror instead of strerror on Windows error
15899 codes. Add program to the error output.
15900 Don't close the main thread handle on Windows CE.
15901 (win32_attach): Use coredll.dll on Windows CE.
15902 (win32_kill): Close current process and current
15903 thread handles.
15904 (win32_detach): Use coredll.dll on Windows CE.
15905 (win32_resume): Let low target handle debug registers, and
15906 step request.
15907 (handle_exception): Add/Remove initial breakpoint. Avoid
15908 non-existant WSTOPSIG on Windows CE.
15909 (win32_read_inferior_memory): Cast to remove warning.
15910 (win32_arch_string): Go through the low target.
15911 (initialize_low): Call set_breakpoint_data with the low
15912 target's breakpoint.
15913 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15914 FOP_REGNUM, mappings): Move to ...
15915 * win32-i386-low.c: ... here.
15916 * win32-low.c (win32_thread_info): Move to ...
15917 * win32-low.h: ... here.
15918 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15919 win32-arm-low.c and wincecompat.c.
15920 (all:): Add $EXEEXT.
15921 (install-only:): Likewise.
15922 (gdbserver:): Likewise.
15923 (gdbreplay:): Likewise.
15924 * config.in: Regenerate.
15925 * configure: Regenerate.
15926
41093d81
PA
159272007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15928
15929 * win32-low.c: Rename typedef thread_info to
15930 win32_thread_info throughout.
15931
544afa54
PA
159322007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15933
15934 * win32-i386-low.c: Rename to ...
15935 * win32-low.c: ... this.
15936 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15937 * Makefile.in: Likewise.
15938
bce7165d
PA
159392007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15940
15941 * remote-utils.c (monitor_output): Constify msg parameter.
15942 * server.h (monitor_output): Likewise.
15943 * win32-i386-low.c (handle_output_debug_string): New.
15944 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15945 handle_output_debug_string.
15946 (get_child_debug_event): Likewise.
15947
506c7aa0
DJ
159482007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15949
15950 * server.c (main): Correct strtoul check.
15951
42c81e2a
DJ
159522007-03-27 Jon Ringle <jon@ringle.org>
15953
15954 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15955
9453113a
DJ
159562007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15957
15958 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15959
64a69107
DJ
159602007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15961
15962 * terminal.h: Check HAVE_SGTTY_H.
15963
159642007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15965
15966 * remote-utils.c (remote_open): Print out the assigned port number.
15967
c74d0ad8
DJ
159682007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15969
15970 * remote-utils.c (monitor_output): New function.
15971 * server.c (debug_threads): Define here.
15972 (monitor_show_help): New function.
15973 (handle_query): Handle qRcmd.
15974 (main): Do not handle 'd' packet.
15975 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15976 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15977 of debug_threads.
15978
de7c3b4a
PA
159792007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15980
15981 * Makefile.in (EXEEXT): New.
15982 (clean): Use $(EXEEXT).
15983
ef57601b
PA
159842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15985
15986 * target.h (target_ops): Rename send_signal to request_interrupt,
15987 and remove enum target_signal parameter.
15988 * linux-low.c (linux_request_interrupt): Rename from
15989 linux_send_signal, and always send SIGINT.
15990 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15991 and always send SIGINT.
15992 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15993 of send_signal.
15994 (input_interrupt): Likewise.
15995
820f2bda
PA
159962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15997
15998 * server.c (get_features_xml): Check if target implemented
15999 arch_string.
16000 * win32-i386-low.c (win32_arch_string): New.
16001 (win32_target_ops): Add win32_arch_string as arch_string member.
16002
ab39bf24
UW
160032007-02-22 Markus Deuling <deuling@de.ibm.com>
16004
16005 * spu-low.c (spu_arch_string): New.
16006 (spu_target_ops): Add spu_arch_string.
16007
61ff6e04
DJ
160082007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16009
16010 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16011 * configure.ac: Do not check for terminal.h.
16012 * configure, config.in: Regenerated.
16013
fb1e4ffc
DJ
160142007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16015
16016 * Makefile.in (OBS): Add $(XML_BUILTIN).
16017 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16018 (clean): Update.
16019 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16020 (arm-with-iwmmxt.c): New.
16021 * config.in, configure: Regenerate.
16022 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16023 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16024 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16025 (arm*-*-linux*): Add iWMMXt and regset support.
16026 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16027 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16028 (arm_store_wmmxregset, target_regsets): New.
16029 * server.c (get_features_xml): Take annex argument. Check builtin
16030 XML documents.
16031 (handle_query): Handle multiple annexes.
16032
0f48aa01
DJ
160332007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16034
16035 * remote-utils.c [USE_WIN32API] (read, write): Define.
16036 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16037 write.
16038
23181151
DJ
160392007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16040
16041 * linux-i386-low.c (the_low_target): Set arch_string.
16042 * linux-x86-64-low.c (the_low_target): Likewise.
16043 * linux-low.c (linux_arch_string): New.
16044 (linux_target_ops): Add it.
16045 * linux-low.h (struct linux_target_ops): Add arch_string.
16046 * server.c (write_qxfer_response): Use const void * for DATA.
16047 (get_features_xml): New.
16048 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16049 * target.h (struct target_ops): Add arch_string method.
16050
9d606399
DJ
160512007-01-03 Denis Pilat <denis.pilat@st.com>
16052 Daniel Jacobowitz <dan@codesourcery.com>
16053
16054 * linux-low.c (linux_kill): Handle being called with no threads.
16055 * win32-i386-low.c (win32_kill): Likewise.
16056 (get_child_debug_event): Clear current_process_handle.
16057
160582006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16059 Daniel Jacobowitz <dan@codesourcery.com>
16060
16061 * remote-utils.c (remote_open): Check the type of specified
16062 serial port devices before opening them.
16063 * server.c (main): Kill the inferior if an error occurs during
16064 the first remote_open.
16065
a5e13d24
DJ
160662006-12-05 Markus Deuling <deuling@de.ibm.com>
16067
16068 * README: Update supported targets.
16069
186947f7
DJ
160702006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16071
16072 * Makefile.in (clean): Remove reg-mips64.c.
16073 (reg-mips64.c, reg-mips64.o): New rules.
16074 * configure.srv: Handle mips64. Include regset support for mips.
16075 * linux-mips-low.c (union mips_register): New.
16076 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16077 (mips_breakpoint, mips_breakpoint_at): Use int.
16078 (mips_collect_register, mips_supply_register)
16079 (mips_collect_register_32bit, mips_supply_register_32bit)
16080 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16081 (mips_store_fpregset, target_regsets): New.
16082 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16083
a13e2c95
UW
160842006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16085
16086 * configure.srv: Add target "spu*-*-*".
16087 * Makefile.in (clean): Remove reg-spu.c.
16088 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16089 * spu-low.c: New file.
16090
cb7283db
DJ
160912006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16092
16093 * configure.ac: Correct td_thr_tls_get_addr test.
16094 * configure: Regenerated.
16095
89be2091
DJ
160962006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16097
16098 * linux-low.c (linux_wait_for_event): Reformat. Use the
16099 pass_signals array.
16100 * remote-utils.c (decode_address_to_semicolon): New.
16101 * server.c (pass_signals, handle_general_set): New.
16102 (handle_query): Mention QPassSignals for qSupported.
16103 (main): Call handle_general_set.
16104 * server.h (pass_signals, decode_address_to_semicolon): New.
16105
000ef4f0
DJ
161062006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16107
16108 * server.c (handle_query): Correct error handling for read_auxv.
16109
b7149293
UW
161102005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16111
16112 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16113 and srv_linux_thread_db to yes.
16114 * linux-s390-low.c (s390_fill_gregset): New function.
16115 (target_regsets): Define data structure.
16116
dae5f5cf
DJ
161172006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16118
16119 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16120 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16121 * config.in, configure: Regenerated.
16122 * inferiors.c (gdb_id_to_thread): New function.
16123 (gdb_id_to_thread_id): Use it.
16124 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16125 * linux-low.h (struct process_info): Add th member.
16126 (thread_db_get_tls_address): New prototype.
16127 * remote-utils.c (decode_address): Make non-static.
16128 * server.c (handle_query): Handle qGetTLSAddr.
16129 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16130 * target.h (struct target_ops): Add get_tls_address.
16131 * thread-db.c (maybe_attach_thread): Save the thread handle.
16132 (thread_db_get_tls_address): New.
16133
32ca6d61
DJ
161342006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16135
16136 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16137 (linux_resume_one_process): Take a siginfo_t *. Update all
16138 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16139 (struct pending_signals): Add a siginfo_t.
16140 (linux_wait_for_process): Always set last_status.
16141 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16142 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16143 * linux-low.h (struct process_info): Add last_status.
16144
5ffff7c1
DJ
161452006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16146
16147 * remote-utils.c (try_rle): New function.
16148 (putpkt_binary): Use it.
16149
8695c747
DJ
161502006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16151
16152 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16153 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16154 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16155 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16156 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16157 point registers.
16158
290fadea
RS
161592006-08-08 Richard Sandiford <richard@codesourcery.com>
16160
16161 * server.c (terminal_fd): New variable.
16162 (old_foreground_pgrp): Likewise.
16163 (restore_old_foreground_pgrp): New function.
16164 (start_inferior): Record the terminal file descriptor in terminal_fd
16165 and its original foreground group in old_foreground_pgrp. Register
16166 restore_old_foreground_pgrp with atexit().
16167
9f2e1e63
DJ
161682006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16169
16170 * server.c (handle_query): Correct qPart to qXfer.
16171
b80864fb
DJ
161722006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16173
16174 * configure.ac: Check for more headers which are missing on
16175 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16176 * configure.srv: Add Cygwin and mingw32.
16177 * remote-utils.c: Don't include headers unconditionally which
16178 are missing on mingw32. Include <winsock.h> for mingw32.
16179 (remote_open): Adjust for mingw32 support. Flush
16180 standard error after writing to it.
16181 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16182 (unblock_async_io, enable_async_io, disable_async_io)
16183 (readchar, getpkt): Update for Winsock support.
16184 (prepare_resume_reply): Expect a protocol signal number.
16185 * server.c: Disable <sys/wait.h> on mingw32.
16186 (start_inferior): Adjust for mingw32 support. Flush
16187 standard error after writing to it.
16188 (attach_inferior): Likewise. Use protocol signal
16189 numbers.
16190 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16191 and names.
16192 * win32-i386-low.c: New file.
16193 * Makefile.in (XM_CLIBS): Set.
16194 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16195 (win32-i386-low.o): New dependency rule.
16196 * linux-low.c (linux_wait): Use target signal numbers.
16197 * target.h (struct target_ops): Doc fix.
16198 * server.h (target_signal_to_name): New prototype.
16199 * gdbreplay.c: Don't include headers unconditionally which
16200 are missing on mingw32. Include <winsock.h> for mingw32.
16201 (remote_close, remote_open): Adjust for Winsock support.
16202 * configure, config.in: Regenerated.
16203
0876f84a
DJ
162042006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16205
16206 * server.c (decode_xfer_read, write_qxfer_response): New.
16207 (handle_query): Take a packet length argument. Handle
16208 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16209 the qSupported response.
16210 (main): Update call to handle_query.
16211
01f9e8fa
DJ
162122006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16213
16214 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16215 (putpkt_binary): Renamed from putpkt and adjusted for binary
16216 data.
16217 (putpkt): New wrapper for putpkt_binary.
16218 (readchar): Don't mask off the high bit.
16219 (decode_X_packet): New function.
16220 * server.c (main): Call putpkt_binary if a handler sets the packet
16221 length. Save the length of the incoming packet. Handle 'X'.
16222 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16223
be2a5f71
DJ
162242006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16225
16226 * server.c (handle_query): Handle qSupported.
16227
ea025f5f
DJ
162282006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16229
16230 * remote-utils.c (all_symbols_looked_up): New variable.
16231 (look_up_one_symbol): Check it.
16232 * server.h (look_up_one_symbol): New declaration.
16233 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16234
9308fc88
DJ
162352006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16236
16237 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16238 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16239 (PTRACE_GET_THREAD_AREA): Define.
16240 (ps_get_thread_area): New function.
16241
52fb6437
NS
162422006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16243
16244 * configure.srv (m68k*-*-uclinux*): New target.
16245 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16246 (linux_resume_one_process): Remove extraneous cast.
16247 (linux_read_offsets): New.
16248 (linux_target_op): Add linux_read_offsets on mmuless systems.
16249 * server.c (handle_query): Add qOffsets logic.
16250 * target.h (struct target_ops): Add read_offsets.
16251
21b0f40c
DJ
162522006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16253
16254 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16255 (PTRACE_GET_THREAD_AREA): Define.
16256 (ps_get_thread_area): New function.
16257 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16258 (linux-x86-64-low.o): Update.
16259
0050a760
DJ
162602006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16261
16262 * configure.ac: Remove checks for prfpregset_t.
16263 * gdb_proc_service.h: New file.
16264 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16265 new "gdb_proc_service.h".
16266 * proc-service.c: Likewise.
16267 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16268 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16269 * Makefile.in (gdb_proc_service_h): Updated.
16270 * configure, config.in: Regenerated.
16271
b92a518e
DJ
162722006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16273
16274 * remote-utils.c (prepare_resume_reply): Move declaration
16275 of gdb_id_from_wait to the top of the block.
16276
545587ee
DJ
162772006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16278
16279 * linux-low.c (regsets_store_inferior_registers): Read the regset
16280 from the target before filling it.
16281
9db87ebd
DJ
162822006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16283
16284 * server.c (attach_inferior): Return SIGTRAP for a successful
16285 attach.
16286
dd24457d
DJ
162872006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16288
16289 * Makefile.in (OBS): Add version.o.
16290 (STAGESTUFF): Delete.
16291 (version.o): Add dependencies.
16292 (version.c): Replace rule.
16293 (clean): Remove version.c.
16294 * server.c (gdbserver_version): New.
16295 (gdbserver_usage): Use printf.
16296 (main): Handle --version and --help.
16297 * server.h (version, host_name): Add declarations.
16298
6f0f660e
EZ
162992005-12-23 Eli Zaretskii <eliz@gnu.org>
16300
889bf7c5
PA
16301 * linux-arm-low.c:
16302 * linux-arm-low.c:
16303 * inferiors.c:
16304 * i387-fp.h:
16305 * i387-fp.c:
16306 * gdbreplay.c:
16307 * regcache.c:
16308 * proc-service.c:
16309 * mem-break.h:
16310 * mem-break.c:
16311 * linux-x86-64-low.c:
16312 * linux-sh-low.c:
16313 * linux-s390-low.c:
16314 * linux-ppc64-low.c:
16315 * linux-ppc-low.c:
16316 * linux-mips-low.c:
16317 * linux-m68k-low.c:
16318 * linux-m32r-low.c:
16319 * linux-low.h:
16320 * linux-low.c:
16321 * linux-ia64-low.c:
16322 * linux-i386-low.c:
16323 * linux-crisv32-low.c:
16324 * thread-db.c:
16325 * terminal.h:
16326 * target.h:
16327 * target.c:
16328 * server.h:
16329 * server.c:
16330 * remote-utils.c:
16331 * regcache.h:
16332 * utils.c:
16333 * Makefile.in:
16334 * configure.ac:
6f0f660e
EZ
16335 * gdbserver.1: Add (C) after Copyright. Update the FSF
16336 address.
16337
9d1fb177
DJ
163382005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16339
16340 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16341 (arm_breakpoint_at): Recognize both breakpoints.
16342 (the_low_target): Use the correct breakpoint instruction.
16343
011a70c2
DJ
163442005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16345
16346 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16347 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16348 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16349 (the_low_target): Update.
16350
7fb85e41
AS
163512005-10-25 Andreas Schwab <schwab@suse.de>
16352
16353 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16354
16355 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16356 (ia64_num_regs): Reduce to 462.
16357
3db0444b
DJ
163582005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16359
16360 * acinclude.m4: Correct quoting.
16361 * aclocal.m4: Regenerated.
16362
16363 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16364 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16365 (thread_db_init): Call thread_db_err_str.
16366 * configure.ac: Check for TD_VERSION.
16367 * config.in, configure: Regenerated.
16368
bee0189a
DJ
163692005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16370
16371 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16372
e9d25b98
DJ
163732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16374
16375 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16376 is not available. Define HAVE_PTRACE_GETREGS if it is.
16377 * config.in, configure: Regenerated.
16378 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16379 * linux-i386-low.c, linux-m68k-low.c: Update to use
16380 HAVE_PTRACE_GETREGS.
16381 * linux-low.c (regsets_fetch_inferior_registers)
16382 (regsets_store_inferior_registers): Only return 0 if we processed
16383 GENERAL_REGS.
16384 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16385 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16386
a06660f7
DJ
163872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16388
16389 * inferiors.c (struct thread_info): Add gdb_id.
16390 (add_thread): Add gdb_id argument.
16391 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16392 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16393 calls to add_thread.
16394 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16395 * server.c (handle_query): Use thread_to_gdb_id.
16396 (handle_v_cont, main): Use gdb_id_to_thread_id.
16397 * server.h (add_thread): Update prototype.
16398 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16399 prototypes.
16400
5a1f5858
DJ
164012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16402
16403 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16404 left-padded registers.
16405 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16406 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16407
e122f1f5
SE
164082005-07-01 Steve Ellcey <sje@cup.hp.com>
16409
16410 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16411 * configure: Regenerate.
16412 * config.in: Regenerate.
16413 * server.h (NEED_DECLARATION_STRERROR):
16414 Replace with !HAVE_DECL_STRERROR.
16415
d592fa2f
DJ
164162005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16417
16418 * linux-low.c (linux_wait, linux_send_signal): Don't test
16419 an unsigned long variable for > 0 if it could be MAX_ULONG.
16420 * server.c (myresume): Likewise.
16421 * target.c (set_desired_inferior): Likewise.
16422
ccbd4912
MK
164232005-06-13 Mark Kettenis <kettenis@gnu.org>
16424
16425 * configure.ac: Simplify and improve check for socklen_t.
16426 * configure, config.in: Regenerate.
16427
f450004a
DJ
164282005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16429
16430 * acconfig.h: Remove.
16431 * configure.ac: Add a test for socklen_t. Use three-argument
16432 AC_DEFINE throughout.
16433 * config.in: Regenerated using autoheader 2.59.
16434 * configure: Regenerated.
16435
16436 * gdbreplay.c (socklen_t): Provide a default.
16437 (remote_open): Use socklen_t.
16438 * remote-utils.c (socklen_t): Provide a default.
16439 (remote_open): Use socklen_t.
16440 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16441 unsigned char.
16442
16443 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16444 char for buffers.
16445 * linux-low.c (linux_read_memory, linux_write_memory)
16446 (linux_read_auxv): Likewise.
16447 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16448 (check_mem_write): Likewise.
16449 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16450 Likewise.
16451 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16452 (registers_from_string, register_data): Likewise.
16453 * server.c (handle_query, main): Likewise.
16454 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16455 (decode_M_packet): Likewise.
16456 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16457 * target.h (struct target_ops): Update read_memory, write_memory,
16458 and read_auxv.
16459 (read_inferior_memory, write_inferior_memory): Update.
16460 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16461 to unsigned char *.
16462 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16463 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16464 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16465 linux-s390-low.c, linux-sh-low.c: Update for changes in
16466 read_inferior_memory and the_low_target->breakpoint.
16467
eee84df1
DJ
164682005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16469
16470 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16471 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16472 * configure.srv: Add powerpc64-*-linux*.
16473 * linux-ppc64-low.c: New file.
16474
45b134e5
OF
164752005-05-23 Orjan Friberg <orjanf@axis.com>
16476
16477 * linux-cris-low.c: New file with support for CRIS.
16478 * linux-crisv32-low.c: Ditto for CRISv32.
16479 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16480 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16481 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16482 reg-crisv32.o, and reg-crisv32.c to make rules.
16483 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16484 recognized targets.
16485
48d93c75
UW
164862005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16487
16488 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16489 of sizeof (PTRACE_XFER_TYPE).
16490 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16491
e013ee27
OF
164922005-05-12 Orjan Friberg <orjanf@axis.com>
16493
889bf7c5 16494 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16495 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16496 pointers for hardware watchpoint support.
16497 * linux-low.h (struct linux_target_ops): Ditto.
16498 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16499 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16500 to linux_target_ops.
16501 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16502 reply packet.
16503 * server.c (main): Recognize 'Z' and 'z' packets.
16504
b0ded00b
UW
165052005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16506
16507 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16508 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16509 (the_low_target): Add new members.
16510
8643e2ad
DJ
165112005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16512
16513 * proc-service.c (ps_lgetregs): Search all_processes instead of
16514 all_threads.
16515
fc620387
DJ
165162005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16517
16518 * server.c (start_inferior): Change return type to int.
16519 (attach_inferior): Change sigptr to int *.
16520 (handle_v_cont, handle_v_requests): Change signal to int *.
16521 (main): Change signal to int.
16522
165232005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16524
16525 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16526 * configure.srv: Add m32r*-*-linux*.
16527 * linux-m32r-low.c: New file.
16528
e0e76420
DJ
165292005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16530
16531 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16532
a1928bad
DJ
165332005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16534
16535 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16536 Take unsigned long arguments for PIDs.
16537 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16538 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16539 (wait_for_sigstop, linux_resume_one_process)
16540 (regsets_fetch_inferior_registers, linux_send_signal)
16541 (linux_read_auxv): Likewise. Update the types of variables holding
16542 PIDs. Update format string specifiers.
16543 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16544 * remote-utils.c (prepare_resume_reply): Likewise.
16545 * server.c (cont_thread, general_thread, step_thread)
16546 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16547 unsigned long.
16548 (handle_query): Update format specifiers.
16549 (handle_v_cont, main): Use strtoul for thread IDs.
16550 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16551 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16552 (general_thread, step_thread, thread_from_wait)
16553 (old_thread_from_wait): Update.
16554 * target.h (struct thread_resume): Use unsigned long for THREAD.
16555 (struct target_ops): Use unsigned long for arguments to attach and
16556 thread_alive.
16557
dcdb98d2
DJ
165582005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16559
16560 * acinclude.m4: Include bfd/bfd.m4 directly.
16561 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16562 <agriffis@toolchain.org>.
16563 * aclocal.m4, configure: Regenerated.
16564
bec39cab
AC
165652005-01-07 Andrew Cagney <cagney@gnu.org>
16566
16567 * configure.ac: Rename configure.in, require autoconf 2.59.
16568 * configure: Re-generate.
16569
434c4c77
DJ
165702004-12-08 Daniel Jacobowitz <dan@debian.org>
16571
16572 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16573 LIBS when finished.
16574 * aclocal.m4: Regenerated.
16575 * configure: Regenerated.
16576
db1d3e1b
AS
165772004-11-21 Andreas Schwab <schwab@suse.de>
16578
16579 * linux-m68k-low.c (m68k_num_gregs): Define.
16580 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16581 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16582 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16583 (m68k_breakpoint_at): New. Add to the_low_target.
16584
16585 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16586 srv_linux_thread_db to yes.
16587
43360365
JB
165882004-10-20 Joel Brobecker <brobecker@gnat.com>
16589
16590 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16591 (ARCH_SET_FS): Likewise.
16592 (ARCH_GET_FS): Likewise.
16593 (ARCH_GET_GS): Likewise.
16594
fd500816
DJ
165952004-10-16 Daniel Jacobowitz <dan@debian.org>
16596
16597 * linux-i386-low.c (ps_get_thread_area): New.
16598 * linux-x86-64-low.c (ps_get_thread_area): New.
16599 * linux-low.c: Include <sys/syscall.h>.
16600 (linux_kill_one_process): Don't kill the first thread here.
16601 (linux_kill): Kill the first thread here.
16602 (kill_lwp): New function.
16603 (send_sigstop, linux_send_signal): Use it.
16604 * proc-service.c: Clean up #ifdefs.
16605 (fpregset_info): Delete.
16606 (ps_lgetregs): Update and enable implementation.
16607 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16608 implementations.
16609 * remote-utils.c (struct sym_cache, symbol_cache): New.
16610 (input_interrupt): Print a clearer message.
16611 (async_io_enabled): New variable.
16612 (enable_async_io, disable_async_io): Use it. Update comments.
16613 (look_up_one_symbol): Use the symbol cache.
16614 * thread-db.c (thread_db_look_up_symbols): New function.
16615 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16616
f6de3c42
DJ
166172004-10-16 Daniel Jacobowitz <dan@debian.org>
16618
16619 * configure.in: Test for -rdynamic.
16620 * configure: Regenerated.
16621 * Makefile (INTERNAL_LDFLAGS): New.
16622 (gdbserver, gdbreplay): Use it.
16623
2c0fc042
AC
166242004-09-02 Andrew Cagney <cagney@gnu.org>
16625
16626 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16627
075b3282
DJ
166282004-03-23 Daniel Jacobowitz <drow@mvista.com>
16629
16630 * linux-low.c (linux_wait): Clear all_processes list also.
16631
fa6a77dc
DJ
166322004-03-12 Daniel Jacobowitz <drow@mvista.com>
16633
16634 * linux-low.c: Include <errno.h>. Remove extern declaration of
16635 errno.
16636
6d782a97
DJ
166372004-03-12 Daniel Jacobowitz <drow@mvista.com>
16638
16639 * gdbreplay.c, server.h, utils.c: Update copyright years.
16640
3a7fb99b
DJ
166412004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16642
16643 * server.c (main): Print child status or termination signal from
16644 variable 'signal', not 'sig'.
16645
c3e735a6
DJ
166462004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16647
16648 * linux-low.c (linux_read_memory): Change return type to
16649 int. Check for and return error from ptrace().
16650 * target.c (read_inferior_memory): Change return type to int. Pass
16651 back return status from the_target->read_memory().
16652 * target.h (struct target_ops): Adapt *read_memory() prototype.
16653 Update comment.
16654 (read_inferior_memory): Adapt prototype.
16655 * server.c (main): Return an error packet if
16656 read_inferior_memory() returns an error.
16657
a59d1c82
DJ
166582004-03-04 Daniel Jacobowitz <drow@mvista.com>
16659
16660 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16661 Unify with other clean targets.
16662
dc3f8883
DJ
166632004-02-29 Daniel Jacobowitz <drow@mvista.com>
16664
16665 * server.c (handle_v_cont): Call set_desired_inferior.
16666
89a208da
DJ
166672004-02-29 Daniel Jacobowitz <drow@mvista.com>
16668
16669 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16670
62ea82f5
DJ
166712004-02-29 Daniel Jacobowitz <drow@mvista.com>
16672
16673 * linux-low.c (linux_wait): Unblock async I/O.
16674 (linux_resume): Block and enable async I/O.
16675 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16676 * server.h (block_async_io, unblock_async_io): Add prototypes.
16677
6910d122
DJ
166782004-02-29 Daniel Jacobowitz <drow@mvista.com>
16679
16680 * remote-utils.c (remote_open): Print a status notice after
16681 opening a TCP port.
16682 * server.c (attach_inferior): Print a status notice after
16683 attaching.
16684
166852004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16686
16687 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16688
c89dc5d4
DJ
166892004-02-26 Daniel Jacobowitz <drow@mvista.com>
16690
16691 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16692 error packet.
16693 * server.c, target.h: Update copyright years.
16694
4b8dad4a
RM
166952004-02-25 Roland McGrath <roland@redhat.com>
16696
16697 * target.h (struct target_ops): New member `read_auxv'.
16698 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16699 * linux-low.c (linux_read_auxv): New function.
16700 (linux_target_ops): Initialize `read_auxv' member to that.
16701
d7446758
JB
167022004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16703
16704 Committed by Jim Blandy <jimb@redhat.com>.
16705
16706 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16707 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16708 instead of GPR_SIZE to distiguish s390 and s390x targets.
16709
5544ad89
DJ
167102004-01-31 Daniel Jacobowitz <drow@mvista.com>
16711
16712 * linux-low.c: Update copyright year.
16713 (check_removed_breakpoint): Clear pending_is_breakpoint.
16714 (linux_set_resume_request, linux_queue_one_thread)
16715 (resume_status_pending_p): New functions.
16716 (linux_continue_one_thread): Use process->resume.
16717 (linux_resume): Only resume threads if there are no pending events.
16718 * linux-low.h (struct process_info): Add resume request
16719 pointer.
16720
2a68b70e
DJ
167212004-01-30 Daniel Jacobowitz <drow@mvista.com>
16722
16723 * regcache.c (new_register_cache): Clear the allocated register
16724 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16725
64386c31
DJ
167262003-10-13 Daniel Jacobowitz <drow@mvista.com>
16727
16728 * linux-low.c (linux_resume): Take a struct thread_resume *
16729 argument.
16730 (linux_wait): Update call.
16731 (resume_ptr): New static variable.
16732 (linux_continue_one_thread): Renamed from
16733 linux_continue_one_process. Use resume_ptr.
16734 (linux_resume): Use linux_continue_one_thread.
16735 * server.c (handle_v_cont, handle_v_requests): New functions.
16736 (myresume): New function.
16737 (main): Handle 'v' case.
16738 * target.h (struct thread_resume): New type.
16739 (struct target_ops): Change argument of "resume" to struct
16740 thread_resume *.
16741 (myresume): Delete macro.
16742
c938e9b0
L
167432003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16744
16745 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16746 (uninstall): Support DESTDIR.
16747
7f313d07
BC
16748Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16749
16750 * configure.srv: Add xscale*linux copy of arm*linux entry.
16751
3b2fc2ea
DJ
167522003-07-24 Daniel Jacobowitz <drow@mvista.com>
16753
16754 * linux-arm-low.c (arm_reinsert_addr): New function.
16755 (the_low_target): Add arm_reinsert_addr.
16756
1c0a559e
MK
167572003-07-08 Mark Kettenis <kettenis@gnu.org>
16758
16759 * mem-break.c: Remove whitespace at end of file.
16760
43d5792c
DJ
167612003-06-28 Daniel Jacobowitz <drow@mvista.com>
16762
16763 * configure.in: Check whether we need to prototype strerror.
16764 * server.h: Optionally prototype strerror.
16765 * gdbreplay.c (perror_with_name): Use strerror.
16766 * linux-low.c (linux_attach_lwp): Use strerror.
16767 * utils.c (perror_with_name): Use strerror.
16768 * config.in, configure: Regenerated.
16769
c8a86edf
DJ
167702003-06-28 Daniel Jacobowitz <drow@mvista.com>
16771
16772 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16773 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16774
73d37363
DJ
167752003-06-20 Daniel Jacobowitz <drow@mvista.com>
16776
16777 * Makefile.in (SFILES): Update.
16778 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16779 low-sun3.c: Remove files.
16780
6ad8ae5c
DJ
167812003-06-17 Daniel Jacobowitz <drow@mvista.com>
16782
16783 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16784 (linux_detach_one_process, linux_detach): New functions.
16785 (linux_target_ops): Add linux_detach.
16786 * server.c (main): Handle 'D' packet.
16787 * target.h (struct target_ops): Add "detach" member.
16788 (detach_inferior): Define.
16789
1581182a
MK
167902003-06-13 Mark Kettenis <kettenis@gnu.org>
16791
16792 From Kelley Cook <kelleycook@wideopenwest.com>:
16793 * configure.srv: Accept i[34567]86 variants.
16794
e5379b03
DJ
167952003-06-05 Daniel Jacobowitz <drow@mvista.com>
16796
16797 * linux-low.c (linux_wait_for_event): Correct comment typos.
16798 (linux_resume_one_process): Call check_removed_breakpoint.
16799 (linux_send_signal): New function.
16800 (linux_target_ops): Add linux_send_signal.
16801 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16802 of kill.
16803 * target.h (struct target_ops): Add send_signal.
16804
2ff29de4
JB
168052003-05-29 Jim Blandy <jimb@redhat.com>
16806
16807 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16808 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16809 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16810 away part of the register's value.
16811
254787d4
DJ
168122003-03-26 Daniel Jacobowitz <drow@mvista.com>
16813
16814 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16815 (linux_wait_for_event, linux_init_signals): Likewise.
16816
94e10508
DJ
168172003-03-17 Daniel Jacobowitz <drow@mvista.com>
16818
16819 * configure.in: Check for stdlib.h.
16820 * configure: Regenerated.
16821 * config.in: Regenerated.
16822
4c0711e0
DJ
168232003-01-04 Andreas Schwab <schwab@suse.de>
16824
16825 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16826
ef66e766
AC
168272003-01-02 Andrew Cagney <ac131313@redhat.com>
16828
16829 * Makefile.in: Remove obsolete code.
16830
a1358604
DJ
168312002-11-20 Daniel Jacobowitz <drow@mvista.com>
16832
16833 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16834 defined(PT_FPR0_HI).
16835
23ce3b1c
DJ
168362002-11-17 Stuart Hughes <seh@zee2.com>
16837
16838 * linux-arm-low.c (arm_num_regs): Increase.
16839 (arm_regmap): Include status register.
16840
168412002-11-17 Daniel Jacobowitz <drow@mvista.com>
16842
16843 * linux-low.c (register_addr): Remove incorrect -1 check.
16844
a9fa9f7d
DJ
168452002-08-29 Daniel Jacobowitz <drow@mvista.com>
16846
16847 * linux-low.c (linux_create_inferior): Call setpgid. Return
16848 the new PID.
16849 (unstopped_p, linux_signal_pid): Remove.
16850 (linux_target_ops): Remove linux_signal_pid.
16851 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16852 global instead of target method.
16853 * target.h (struct target_ops): Remove signal_pid. Update comment
16854 for create_inferior.
16855 * server.c (signal_pid): New variable.
16856 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16857 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16858 (attach_inferior): Set signal_pid.
16859
17574093
DJ
168602002-08-23 Daniel Jacobowitz <drow@mvista.com>
16861
16862 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16863
168642002-08-20 Jim Blandy <jimb@redhat.com>
16865
16866 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16867 default for this.
16868
168692002-08-01 Andrew Cagney <cagney@redhat.com>
16870
16871 * Makefile.in: Make chill references obsolete.
16872
168732002-07-24 Kevin Buettner <kevinb@redhat.com>
16874
16875 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16876 * configure: Regenerate.
16877 * config.in: Regenerate.
16878
168792002-07-09 David O'Brien <obrien@FreeBSD.org>
16880
16881 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16882 (perror_with_name, remote_close, remote_open, expect, play): Static.
16883
168842002-07-04 Michal Ludvig <mludvig@suse.cz>
16885
4b8dad4a 16886 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16887 byte offsets instead of an array of indexes.
16888 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16889
168902002-06-13 Daniel Jacobowitz <drow@mvista.com>
16891
16892 * regcache.c: Add comment.
16893
168942002-06-11 Daniel Jacobowitz <drow@mvista.com>
16895
16896 * thread-db.c: New file.
16897 * proc-service.c: New file.
16898 * acinclude.m4: New file.
16899 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16900 proc-service.o, and thread-db.o.
16901 (linux-low.o): Add USE_THREAD_DB.
16902 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16903 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16904 * aclocal.m4: Regenerated.
16905 * config.in: Regenerated.
16906 * configure: Regenerated.
16907 * configure.in: Check for proc_service.h, sys/procfs.h,
16908 thread_db.h, and linux/elf.h headrs.
16909 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16910 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16911 Check for -lthread_db and thread support.
16912 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16913 PowerPC, and SuperH.
16914 * i387-fp.c: Constify arguments.
16915 * i387-fp.h: Likewise.
16916 * inferiors.c: (struct thread_info): Renamed from
16917 `struct inferior_info'. Remove PID member. Use generic inferior
16918 list header. All uses updated.
16919 (inferiors, signal_pid): Removed.
16920 (all_threads): New variable.
16921 (get_thread): Define.
16922 (add_inferior_to_list): New function.
16923 (for_each_inferior): New function.
16924 (change_inferior_id): New function.
16925 (add_inferior): Removed.
16926 (remove_inferior): New function.
16927 (add_thread): New function.
16928 (free_one_thread): New function.
16929 (remove_thread): New function.
16930 (clear_inferiors): Use for_each_inferior and free_one_thread.
16931 (find_inferior): New function.
16932 (find_inferior_id): New function.
16933 (inferior_target_data): Update argument type.
16934 (set_inferior_target_data): Likewise.
16935 (inferior_regcache_data): Likewise.
16936 (set_inferior_regcache_data): Likewise.
16937 * linux-low.c (linux_bp_reinsert): Remove.
16938 (all_processes, stopping_threads, using_thrads)
16939 (struct pending_signals, debug_threads, pid_of): New.
16940 (inferior_pid): Replace with macro.
16941 (struct inferior_linux_data): Remove.
16942 (get_stop_pc, add_process): New functions.
16943 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16944 Use add_process and add_thread.
16945 (linux_attach_lwp): New function, based on old linux_attach. Use
16946 add_process and add_thread. Set stop_expected for new threads.
16947 (linux_attach): New function.
16948 (linux_kill_one_process): New function.
16949 (linux_kill): Kill all LWPs.
16950 (linux_thread_alive): Use find_inferior_id.
16951 (check_removed_breakpoints, status_pending_p): New functions.
16952 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16953 Update. Use WNOHANG. Wait for cloned processes also. Update process
16954 struct for the found process.
16955 (linux_wait_for_event): New function.
16956 (linux_wait): Use it. Support LWPs.
16957 (send_sigstop, wait_for_sigstop, stop_all_processes)
16958 (linux_resume_one_process, linux_continue_one_process): New functions.
16959 (linux_resume): Support LWPs.
16960 (REGISTER_RAW_SIZE): Remove.
16961 (fetch_register): Use register_size instead. Call supply_register.
16962 (usr_store_inferior_registers): Likewise. Call collect_register.
16963 Fix recursive case.
16964 (regsets_fetch_inferior_registers): Improve error message.
16965 (regsets_store_inferior_registers): Add debugging.
16966 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16967 (unstopped_p, linux_signal_pid): New functions.
16968 (linux_target_ops): Add linux_signal_pid.
16969 (linux_init_signals): New function.
16970 (initialize_low): Call it. Initialize using_threads.
16971 * regcache.c (inferior_regcache_data): Add valid
16972 flag.
16973 (get_regcache): Fetch registers lazily. Add fetch argument
16974 and update all callers.
16975 (regcache_invalidate_one, regcache_invalidate): New
16976 functions.
16977 (new_register_cache): Renamed from create_register_cache.
16978 Return the new regcache.
16979 (free_register_cache): Change argument to a void *.
16980 (registers_to_string, registers_from_string): Call get_regcache
16981 with fetch flag set.
16982 (register_data): Make static. Pass fetch flag to get_regcache.
16983 (supply_register): Call get_regcache with fetch flag clear.
16984 (collect_register): Call get_regcache with fetch flag set.
16985 (collect_register_as_string): New function.
16986 * regcache.h: Update.
16987 * remote-utils.c (putpkt): Flush after debug output and use
16988 stderr.
16989 Handle input interrupts while waiting for an ACK.
16990 (input_interrupt): Use signal_pid method.
16991 (getpkt): Flush after debug output and use stderr.
16992 (outreg): Use collect_register_as_string.
16993 (new_thread_notify, dead_thread_notify): New functions.
16994 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16995 and general_thread.
16996 (look_up_one_symbol): Flush after debug output.
16997 * server.c (step_thread, server_waiting): New variables.
16998 (start_inferior): Don't use signal_pid. Update call to mywait.
16999 (attach_inferior): Update call to mywait.
17000 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17001 (main): Don't fetch/store registers explicitly. Use
17002 set_desired_inferior. Support proposed ``Hs'' packet. Update
17003 calls to mywait.
17004 * server.h: Update.
17005 (struct inferior_list, struct_inferior_list_entry): New.
17006 * target.c (set_desired_inferior): New.
17007 (write_inferior_memory): Constify.
17008 (mywait): New function.
17009 * target.h: Update.
17010 (struct target_ops): New signal_pid method.
17011 (mywait): Removed macro, added prototype.
17012
17013 * linux-low.h (regset_func): Removed.
17014 (regset_fill_func, regset_store_func): New.
17015 (enum regset_type): New.
17016 (struct regset_info): Add type field. Use new operation types.
17017 (struct linux_target_ops): stop_pc renamed to get_pc.
17018 Add decr_pc_after_break and breakpoint_at.
17019 (get_process, get_thread_proess, get_process_thread)
17020 (strut process_info, all_processes, linux_attach_lwp)
17021 (thread_db_init): New.
17022
17023 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17024 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17025 (the_low_target): Add new members.
17026 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17027 (i386_store_fpxregset): Constify.
17028 (target_regsets): Add new kind identifier.
17029 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17030 (i386_set_pc): Add debugging.
17031 (i386_breakpoint_at): New function.
17032 (the_low_target): Add new members.
17033 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17034 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17035 (mips_breakpoint_at): New.
17036 (the_low_target): Add new members.
17037 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17038 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17039 (the_low_target): Add new members.
17040 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17041 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17042 (the_low_target): Add new members.
17043 * linux-x86-64-low.c (target_regsets): Add new kind
17044 identifier.
17045
170462002-05-15 Daniel Jacobowitz <drow@mvista.com>
17047
17048 From Martin Pool <mbp@samba.org>:
17049 * server.c (gdbserver_usage): New function.
17050 (main): Call it.
17051
170522002-05-14 Daniel Jacobowitz <drow@mvista.com>
17053
17054 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17055 stop_at -> stop_pc.
17056
170572002-05-04 Andrew Cagney <ac131313@redhat.com>
17058
17059 * Makefile.in: Remove obsolete code.
17060
170612002-04-24 Michal Ludvig <mludvig@suse.cz>
17062
17063 * linux-low.c (regsets_fetch_inferior_registers),
17064 (regsets_store_inferior_registers): Removed cast to int from
17065 ptrace() calls.
17066 * regcache.h: Added declaration of struct inferior_info.
17067
170682002-04-20 Daniel Jacobowitz <drow@mvista.com>
17069
17070 * inferiors.c (struct inferior_info): Add regcache_data.
17071 (add_inferior): Call create_register_cache.
17072 (clear_inferiors): Call free_register_cache.
17073 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17074 * regcache.c (struct inferior_regcache_data): New.
17075 (registers): Remove.
17076 (get_regcache): New function.
17077 (create_register_cache, free_register_cache): New functions.
17078 (set_register_cache): Don't initialize the register cache here.
17079 (registers_to_string, registers_from_string, register_data): Call
17080 get_regcache.
17081 * regcache.h: Add prototypes.
17082 * server.h: Likewise.
17083
170842002-04-20 Daniel Jacobowitz <drow@mvista.com>
17085
17086 * mem-break.c: New file.
17087 * mem-break.h: New file.
17088 * Makefile.in: Add mem-break.o rule; update server.h
17089 dependencies.
17090 * inferiors.c (struct inferior_info): Add target_data
17091 member.
17092 (clear_inferiors): Free target_data member if set.
17093 (inferior_target_data, set_inferior_target_data): New functions.
17094 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17095 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17096 * linux-low.c (linux_bp_reinsert): New variable.
17097 (struct inferior_linux_data): New.
17098 (linux_create_inferior): Use set_inferior_target_data.
17099 (linux_attach): Likewise. Call add_inferior.
17100 (linux_wait_for_one_inferior): New function.
17101 (linux_wait): Call it.
17102 (linux_write_memory): Add const.
17103 (initialize_low): Call set_breakpoint_data.
17104 * linux-low.h (struct linux_target_ops): Add breakpoint
17105 handling members.
17106 * server.c (attach_inferior): Remove extra add_inferior
17107 call.
17108 * server.h: Include mem-break.h. Update inferior.c
17109 prototypes.
17110 * target.c (read_inferior_memory)
17111 (write_inferior_memory): New functions.
17112 * target.h (read_inferior_memory)
17113 (write_inferior_memory): Change macros to prototypes.
17114 (struct target_ops): Update comments. Add const to write_memory
17115 definition.
17116
171172002-04-11 Daniel Jacobowitz <drow@mvista.com>
17118
17119 * linux-low.c (usr_store_inferior_registers): Support
17120 registers which are allowed to fail to store.
17121 * linux-low.h (linux_target_ops): Likewise.
17122 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17123 (ppc_cannot_store_register): FPSCR may not be storable.
17124
171252002-04-09 Daniel Jacobowitz <drow@mvista.com>
17126
17127 * server.h: Include <string.h> if HAVE_STRING_H.
17128 * ChangeLog: Correct paths in last ChangeLog entry.
17129
171302002-04-09 Daniel Jacobowitz <drow@mvista.com>
17131
17132 * linux-low.h: Remove obsolete prototypes.
17133 (struct linux_target_ops): New.
17134 (extern the_low_target): New.
17135 * linux-low.c (num_regs, regmap): Remove declarations.
17136 (register_addr): Use the_low_target explicitly.
17137 (fetch_register): Likewise.
17138 (usr_fetch_inferior_registers): Likewise.
17139 (usr_store_inferior_registers): Likewise.
17140 * linux-arm-low.c (num_regs): Remove.
17141 (arm_num_regs): Define.
17142 (arm_regmap): Renamed from regmap, made static.
17143 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17144 made static.
17145 (arm_cannot_store_register): Renamed from cannot_store_register,
17146 made static.
17147 (the_low_target): New.
17148 * linux-i386-low.c (num_regs): Remove.
17149 (i386_num_regs): Define.
17150 (i386_regmap): Renamed from regmap, made static.
17151 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17152 made static.
17153 (i386_cannot_store_register): Renamed from cannot_store_register,
17154 made static.
17155 (the_low_target): New.
17156 * linux-ia64-low.c (num_regs): Remove.
17157 (ia64_num_regs): Define.
17158 (ia64_regmap): Renamed from regmap, made static.
17159 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17160 made static.
17161 (ia64_cannot_store_register): Renamed from cannot_store_register,
17162 made static.
17163 (the_low_target): New.
17164 * linux-m68k-low.c (num_regs): Remove.
17165 (m68k_num_regs): Define.
17166 (m68k_regmap): Renamed from regmap, made static.
17167 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17168 made static.
17169 (m68k_cannot_store_register): Renamed from cannot_store_register,
17170 made static.
17171 (the_low_target): New.
17172 * linux-mips-low.c (num_regs): Remove.
17173 (mips_num_regs): Define.
17174 (mips_regmap): Renamed from regmap, made static.
17175 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17176 made static.
17177 (mips_cannot_store_register): Renamed from cannot_store_register,
17178 made static.
17179 (the_low_target): New.
17180 * linux-ppc-low.c (num_regs): Remove.
17181 (ppc_num_regs): Define.
17182 (ppc_regmap): Renamed from regmap, made static.
17183 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17184 made static.
17185 (ppc_cannot_store_register): Renamed from cannot_store_register,
17186 made static.
17187 (the_low_target): New.
17188 * linux-s390-low.c (num_regs): Remove.
17189 (s390_num_regs): Define.
17190 (s390_regmap): Renamed from regmap, made static.
17191 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17192 made static.
17193 (s390_cannot_store_register): Renamed from cannot_store_register,
17194 made static.
17195 (the_low_target): New.
17196 * linux-sh-low.c (num_regs): Remove.
17197 (sh_num_regs): Define.
17198 (sh_regmap): Renamed from regmap, made static.
17199 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17200 made static.
17201 (sh_cannot_store_register): Renamed from cannot_store_register,
17202 made static.
17203 (the_low_target): New.
17204 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17205 (the_low_target): New.
17206
172072002-04-09 Daniel Jacobowitz <drow@mvista.com>
17208
17209 * Makefile.in: Add stamp-h target.
17210 * configure.in: Create stamp-h.
17211 * configure: Regenerated.
17212
172132002-04-09 Daniel Jacobowitz <drow@mvista.com>
17214
17215 * inferiors.c: New file.
17216 * target.c: New file.
17217 * target.h: New file.
17218 * Makefile.in: Add target.o and inferiors.o. Update
17219 dependencies.
17220 * linux-low.c (inferior_pid): New static variable,
17221 moved from server.c.
17222 (linux_create_inferior): Renamed from create_inferior.
17223 Call add_inferior. Return 0 on success instead of a PID.
17224 (linux_attach): Renamed from myattach.
17225 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17226 (linux_thread_alive): Renamed from mythread_alive.
17227 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17228 child dies.
17229 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17230 (regsets_store_inferior_registers): Correct error message.
17231 Add missing ``return 0''.
17232 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17233 (linux_store_registers): Renamed from store_inferior_registers.
17234 (linux_read_memory): Renamed from read_inferior_memory.
17235 (linux_write_memory): Renamed from write_inferior_memory.
17236 (linux_target_ops): New structure.
17237 (initialize_low): Call set_target_ops ().
17238 * remote-utils.c (unhexify): New function.
17239 (hexify): New function.
17240 (input_interrupt): Send signals to ``signal_pid''.
17241 * server.c (inferior_pid): Remove.
17242 (start_inferior): Update create_inferior call.
17243 (attach_inferior): Call add_inferior.
17244 (handle_query): New function.
17245 (main): Call handle_query for `q' packets.
17246 * server.h: Include "target.h". Remove obsolete prototypes.
17247 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17248
172492002-04-09 Daniel Jacobowitz <drow@mvista.com>
17250
17251 * Makefile.in: Add WARN_CFLAGS. Update configury
17252 dependencies.
17253 * configure.in: Check for <string.h>
17254 * configure: Regenerate.
17255 * config.in: Regenerate.
17256 * gdbreplay.c: Include needed system headers.
17257 (remote_open): Remove strchr prototype.
17258 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17259 * regcache.c (supply_register): Change buf argument to const void *.
17260 (supply_register_by_name): Likewise.
17261 (collect_register): Change buf argument to void *.
17262 (collect_register_by_name): Likewise.
17263 * regcache.h: Add missing prototypes.
17264 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17265 * server.c (handle_query): New function.
17266 (attached): New static variable, moved out of main.
17267 (main): Quiet longjmp clobber warnings.
17268 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17269 * utils.c (error): Remove NORETURN.
17270 (fatal): Likewise.
This page took 2.43959 seconds and 4 git commands to generate.